@silexlabs/silex-dashboard 1.3.0 → 1.4.1-0

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,9 +1,8 @@
1
1
  /**
2
- * vue v3.5.13
2
+ * vue v3.5.22
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- /*! #__NO_SIDE_EFFECTS__ */
7
6
  // @__NO_SIDE_EFFECTS__
8
7
  function makeMap(str) {
9
8
  const map = /* @__PURE__ */ Object.create(null);
@@ -56,15 +55,15 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
56
55
  );
57
56
  const cacheStringFunction = (fn) => {
58
57
  const cache = /* @__PURE__ */ Object.create(null);
59
- return (str) => {
58
+ return ((str) => {
60
59
  const hit = cache[str];
61
60
  return hit || (cache[str] = fn(str));
62
- };
61
+ });
63
62
  };
64
- const camelizeRE = /-(\w)/g;
63
+ const camelizeRE = /-\w/g;
65
64
  const camelize = cacheStringFunction(
66
65
  (str) => {
67
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
66
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
68
67
  }
69
68
  );
70
69
  const hyphenateRE = /\B([A-Z])/g;
@@ -126,7 +125,7 @@ const PatchFlagNames = {
126
125
  [512]: `NEED_PATCH`,
127
126
  [1024]: `DYNAMIC_SLOTS`,
128
127
  [2048]: `DEV_ROOT_FRAGMENT`,
129
- [-1]: `HOISTED`,
128
+ [-1]: `CACHED`,
130
129
  [-2]: `BAIL`
131
130
  };
132
131
 
@@ -384,6 +383,24 @@ const stringifySymbol = (v, i = "") => {
384
383
  );
385
384
  };
386
385
 
386
+ function normalizeCssVarValue(value) {
387
+ if (value == null) {
388
+ return "initial";
389
+ }
390
+ if (typeof value === "string") {
391
+ return value === "" ? " " : value;
392
+ }
393
+ if (typeof value !== "number" || !Number.isFinite(value)) {
394
+ {
395
+ console.warn(
396
+ "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
397
+ value
398
+ );
399
+ }
400
+ }
401
+ return String(value);
402
+ }
403
+
387
404
  function warn$2(msg, ...args) {
388
405
  console.warn(`[Vue warn] ${msg}`, ...args);
389
406
  }
@@ -396,6 +413,10 @@ class EffectScope {
396
413
  * @internal
397
414
  */
398
415
  this._active = true;
416
+ /**
417
+ * @internal track `on` calls, allow `on` call multiple times
418
+ */
419
+ this._on = 0;
399
420
  /**
400
421
  * @internal
401
422
  */
@@ -466,14 +487,20 @@ class EffectScope {
466
487
  * @internal
467
488
  */
468
489
  on() {
469
- activeEffectScope = this;
490
+ if (++this._on === 1) {
491
+ this.prevScope = activeEffectScope;
492
+ activeEffectScope = this;
493
+ }
470
494
  }
471
495
  /**
472
496
  * This should only be called on non-detached scopes
473
497
  * @internal
474
498
  */
475
499
  off() {
476
- activeEffectScope = this.parent;
500
+ if (this._on > 0 && --this._on === 0) {
501
+ activeEffectScope = this.prevScope;
502
+ this.prevScope = void 0;
503
+ }
477
504
  }
478
505
  stop(fromParent) {
479
506
  if (this._active) {
@@ -555,7 +582,7 @@ class ReactiveEffect {
555
582
  }
556
583
  resume() {
557
584
  if (this.flags & 64) {
558
- this.flags &= ~64;
585
+ this.flags &= -65;
559
586
  if (pausedQueueEffects.has(this)) {
560
587
  pausedQueueEffects.delete(this);
561
588
  this.trigger();
@@ -595,7 +622,7 @@ class ReactiveEffect {
595
622
  cleanupDeps(this);
596
623
  activeSub = prevEffect;
597
624
  shouldTrack = prevShouldTrack;
598
- this.flags &= ~2;
625
+ this.flags &= -3;
599
626
  }
600
627
  }
601
628
  stop() {
@@ -606,7 +633,7 @@ class ReactiveEffect {
606
633
  this.deps = this.depsTail = void 0;
607
634
  cleanupEffect(this);
608
635
  this.onStop && this.onStop();
609
- this.flags &= ~1;
636
+ this.flags &= -2;
610
637
  }
611
638
  }
612
639
  trigger() {
@@ -656,7 +683,7 @@ function endBatch() {
656
683
  while (e) {
657
684
  const next = e.next;
658
685
  e.next = void 0;
659
- e.flags &= ~8;
686
+ e.flags &= -9;
660
687
  e = next;
661
688
  }
662
689
  }
@@ -667,7 +694,7 @@ function endBatch() {
667
694
  while (e) {
668
695
  const next = e.next;
669
696
  e.next = void 0;
670
- e.flags &= ~8;
697
+ e.flags &= -9;
671
698
  if (e.flags & 1) {
672
699
  try {
673
700
  ;
@@ -723,17 +750,16 @@ function refreshComputed(computed) {
723
750
  if (computed.flags & 4 && !(computed.flags & 16)) {
724
751
  return;
725
752
  }
726
- computed.flags &= ~16;
753
+ computed.flags &= -17;
727
754
  if (computed.globalVersion === globalVersion) {
728
755
  return;
729
756
  }
730
757
  computed.globalVersion = globalVersion;
731
- const dep = computed.dep;
732
- computed.flags |= 2;
733
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
734
- computed.flags &= ~2;
758
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
735
759
  return;
736
760
  }
761
+ computed.flags |= 2;
762
+ const dep = computed.dep;
737
763
  const prevSub = activeSub;
738
764
  const prevShouldTrack = shouldTrack;
739
765
  activeSub = computed;
@@ -742,6 +768,7 @@ function refreshComputed(computed) {
742
768
  prepareDeps(computed);
743
769
  const value = computed.fn(computed._value);
744
770
  if (dep.version === 0 || hasChanged(value, computed._value)) {
771
+ computed.flags |= 128;
745
772
  computed._value = value;
746
773
  dep.version++;
747
774
  }
@@ -752,7 +779,7 @@ function refreshComputed(computed) {
752
779
  activeSub = prevSub;
753
780
  shouldTrack = prevShouldTrack;
754
781
  cleanupDeps(computed);
755
- computed.flags &= ~2;
782
+ computed.flags &= -3;
756
783
  }
757
784
  }
758
785
  function removeSub(link, soft = false) {
@@ -771,7 +798,7 @@ function removeSub(link, soft = false) {
771
798
  if (dep.subs === link) {
772
799
  dep.subs = prevSub;
773
800
  if (!prevSub && dep.computed) {
774
- dep.computed.flags &= ~4;
801
+ dep.computed.flags &= -5;
775
802
  for (let l = dep.computed.deps; l; l = l.nextDep) {
776
803
  removeSub(l, true);
777
804
  }
@@ -847,6 +874,7 @@ class Link {
847
874
  }
848
875
  }
849
876
  class Dep {
877
+ // TODO isolatedDeclarations "__v_skip"
850
878
  constructor(computed) {
851
879
  this.computed = computed;
852
880
  this.version = 0;
@@ -867,6 +895,10 @@ class Dep {
867
895
  * Subscriber counter
868
896
  */
869
897
  this.sc = 0;
898
+ /**
899
+ * @internal
900
+ */
901
+ this.__v_skip = true;
870
902
  {
871
903
  this.subsHead = void 0;
872
904
  }
@@ -1131,7 +1163,7 @@ const arrayInstrumentations = {
1131
1163
  join(separator) {
1132
1164
  return reactiveReadArray(this).join(separator);
1133
1165
  },
1134
- // keys() iterator only reads `length`, no optimisation required
1166
+ // keys() iterator only reads `length`, no optimization required
1135
1167
  lastIndexOf(...args) {
1136
1168
  return searchProxy(this, "lastIndexOf", args);
1137
1169
  },
@@ -1183,7 +1215,7 @@ function iterator(self, method, wrapValue) {
1183
1215
  iter._next = iter.next;
1184
1216
  iter.next = () => {
1185
1217
  const result = iter._next();
1186
- if (result.value) {
1218
+ if (!result.done) {
1187
1219
  result.value = wrapValue(result.value);
1188
1220
  }
1189
1221
  return result;
@@ -1310,7 +1342,8 @@ class BaseReactiveHandler {
1310
1342
  return res;
1311
1343
  }
1312
1344
  if (isRef(res)) {
1313
- return targetIsArray && isIntegerKey(key) ? res : res.value;
1345
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1346
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
1314
1347
  }
1315
1348
  if (isObject(res)) {
1316
1349
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -1332,7 +1365,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
1332
1365
  }
1333
1366
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1334
1367
  if (isOldValueReadonly) {
1335
- return false;
1368
+ {
1369
+ warn$2(
1370
+ `Set operation on key "${String(key)}" failed: target is readonly.`,
1371
+ target[key]
1372
+ );
1373
+ }
1374
+ return true;
1336
1375
  } else {
1337
1376
  oldValue.value = value;
1338
1377
  return true;
@@ -1477,7 +1516,7 @@ function createInstrumentations(readonly, shallow) {
1477
1516
  get size() {
1478
1517
  const target = this["__v_raw"];
1479
1518
  !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1480
- return Reflect.get(target, "size", target);
1519
+ return target.size;
1481
1520
  },
1482
1521
  has(key) {
1483
1522
  const target = this["__v_raw"];
@@ -1704,14 +1743,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1704
1743
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1705
1744
  return target;
1706
1745
  }
1707
- const existingProxy = proxyMap.get(target);
1708
- if (existingProxy) {
1709
- return existingProxy;
1710
- }
1711
1746
  const targetType = getTargetType(target);
1712
1747
  if (targetType === 0 /* INVALID */) {
1713
1748
  return target;
1714
1749
  }
1750
+ const existingProxy = proxyMap.get(target);
1751
+ if (existingProxy) {
1752
+ return existingProxy;
1753
+ }
1715
1754
  const proxy = new Proxy(
1716
1755
  target,
1717
1756
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2134,11 +2173,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2134
2173
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
2135
2174
  boundCleanup
2136
2175
  ];
2176
+ oldValue = newValue;
2137
2177
  call ? call(cb, 3, args) : (
2138
2178
  // @ts-expect-error
2139
2179
  cb(...args)
2140
2180
  );
2141
- oldValue = newValue;
2142
2181
  } finally {
2143
2182
  activeWatcher = currentWatcher;
2144
2183
  }
@@ -2188,11 +2227,11 @@ function traverse(value, depth = Infinity, seen) {
2188
2227
  if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2189
2228
  return value;
2190
2229
  }
2191
- seen = seen || /* @__PURE__ */ new Set();
2192
- if (seen.has(value)) {
2230
+ seen = seen || /* @__PURE__ */ new Map();
2231
+ if ((seen.get(value) || 0) >= depth) {
2193
2232
  return value;
2194
2233
  }
2195
- seen.add(value);
2234
+ seen.set(value, depth);
2196
2235
  depth--;
2197
2236
  if (isRef(value)) {
2198
2237
  traverse(value.value, depth, seen);
@@ -2555,11 +2594,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2555
2594
  queue.splice(i, 1);
2556
2595
  i--;
2557
2596
  if (cb.flags & 4) {
2558
- cb.flags &= ~1;
2597
+ cb.flags &= -2;
2559
2598
  }
2560
2599
  cb();
2561
2600
  if (!(cb.flags & 4)) {
2562
- cb.flags &= ~1;
2601
+ cb.flags &= -2;
2563
2602
  }
2564
2603
  }
2565
2604
  }
@@ -2584,10 +2623,10 @@ function flushPostFlushCbs(seen) {
2584
2623
  continue;
2585
2624
  }
2586
2625
  if (cb.flags & 4) {
2587
- cb.flags &= ~1;
2626
+ cb.flags &= -2;
2588
2627
  }
2589
2628
  if (!(cb.flags & 8)) cb();
2590
- cb.flags &= ~1;
2629
+ cb.flags &= -2;
2591
2630
  }
2592
2631
  activePostFlushCbs = null;
2593
2632
  postFlushIndex = 0;
@@ -2623,7 +2662,7 @@ function flushJobs(seen) {
2623
2662
  for (; flushIndex < queue.length; flushIndex++) {
2624
2663
  const job = queue[flushIndex];
2625
2664
  if (job) {
2626
- job.flags &= ~1;
2665
+ job.flags &= -2;
2627
2666
  }
2628
2667
  }
2629
2668
  flushIndex = -1;
@@ -2699,7 +2738,9 @@ function rerender(id, newRender) {
2699
2738
  }
2700
2739
  instance.renderCache = [];
2701
2740
  isHmrUpdating = true;
2702
- instance.update();
2741
+ if (!(instance.job.flags & 8)) {
2742
+ instance.update();
2743
+ }
2703
2744
  isHmrUpdating = false;
2704
2745
  });
2705
2746
  }
@@ -2729,10 +2770,12 @@ function reload(id, newComp) {
2729
2770
  dirtyInstances.delete(instance);
2730
2771
  } else if (instance.parent) {
2731
2772
  queueJob(() => {
2732
- isHmrUpdating = true;
2733
- instance.parent.update();
2734
- isHmrUpdating = false;
2735
- dirtyInstances.delete(instance);
2773
+ if (!(instance.job.flags & 8)) {
2774
+ isHmrUpdating = true;
2775
+ instance.parent.update();
2776
+ isHmrUpdating = false;
2777
+ dirtyInstances.delete(instance);
2778
+ }
2736
2779
  });
2737
2780
  } else if (instance.appContext.reload) {
2738
2781
  instance.appContext.reload();
@@ -2836,7 +2879,6 @@ const devtoolsComponentRemoved = (component) => {
2836
2879
  _devtoolsComponentRemoved(component);
2837
2880
  }
2838
2881
  };
2839
- /*! #__NO_SIDE_EFFECTS__ */
2840
2882
  // @__NO_SIDE_EFFECTS__
2841
2883
  function createDevtoolsComponentHook(hook) {
2842
2884
  return (component) => {
@@ -3022,9 +3064,6 @@ const TeleportImpl = {
3022
3064
  insert(mainAnchor, container, anchor);
3023
3065
  const mount = (container2, anchor2) => {
3024
3066
  if (shapeFlag & 16) {
3025
- if (parentComponent && parentComponent.isCE) {
3026
- parentComponent.ce._teleportTarget = container2;
3027
- }
3028
3067
  mountChildren(
3029
3068
  children,
3030
3069
  container2,
@@ -3046,6 +3085,9 @@ const TeleportImpl = {
3046
3085
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
3047
3086
  namespace = "mathml";
3048
3087
  }
3088
+ if (parentComponent && parentComponent.isCE) {
3089
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3090
+ }
3049
3091
  if (!disabled) {
3050
3092
  mount(target, targetAnchor);
3051
3093
  updateCssVars(n2, false);
@@ -3063,15 +3105,16 @@ const TeleportImpl = {
3063
3105
  updateCssVars(n2, true);
3064
3106
  }
3065
3107
  if (isTeleportDeferred(n2.props)) {
3108
+ n2.el.__isMounted = false;
3066
3109
  queuePostRenderEffect(() => {
3067
3110
  mountToTarget();
3068
- n2.el.__isMounted = true;
3111
+ delete n2.el.__isMounted;
3069
3112
  }, parentSuspense);
3070
3113
  } else {
3071
3114
  mountToTarget();
3072
3115
  }
3073
3116
  } else {
3074
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3117
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
3075
3118
  queuePostRenderEffect(() => {
3076
3119
  TeleportImpl.process(
3077
3120
  n1,
@@ -3085,7 +3128,6 @@ const TeleportImpl = {
3085
3128
  optimized,
3086
3129
  internals
3087
3130
  );
3088
- delete n1.el.__isMounted;
3089
3131
  }, parentSuspense);
3090
3132
  return;
3091
3133
  }
@@ -3112,7 +3154,7 @@ const TeleportImpl = {
3112
3154
  namespace,
3113
3155
  slotScopeIds
3114
3156
  );
3115
- traverseStaticChildren(n1, n2, true);
3157
+ traverseStaticChildren(n1, n2, false);
3116
3158
  } else if (!optimized) {
3117
3159
  patchChildren(
3118
3160
  n1,
@@ -3234,26 +3276,34 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3234
3276
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3235
3277
  o: { nextSibling, parentNode, querySelector, insert, createText }
3236
3278
  }, hydrateChildren) {
3279
+ function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
3280
+ vnode2.anchor = hydrateChildren(
3281
+ nextSibling(node2),
3282
+ vnode2,
3283
+ parentNode(node2),
3284
+ parentComponent,
3285
+ parentSuspense,
3286
+ slotScopeIds,
3287
+ optimized
3288
+ );
3289
+ vnode2.targetStart = targetStart;
3290
+ vnode2.targetAnchor = targetAnchor;
3291
+ }
3237
3292
  const target = vnode.target = resolveTarget(
3238
3293
  vnode.props,
3239
3294
  querySelector
3240
3295
  );
3296
+ const disabled = isTeleportDisabled(vnode.props);
3241
3297
  if (target) {
3242
- const disabled = isTeleportDisabled(vnode.props);
3243
3298
  const targetNode = target._lpa || target.firstChild;
3244
3299
  if (vnode.shapeFlag & 16) {
3245
3300
  if (disabled) {
3246
- vnode.anchor = hydrateChildren(
3247
- nextSibling(node),
3301
+ hydrateDisabledTeleport(
3302
+ node,
3248
3303
  vnode,
3249
- parentNode(node),
3250
- parentComponent,
3251
- parentSuspense,
3252
- slotScopeIds,
3253
- optimized
3304
+ targetNode,
3305
+ targetNode && nextSibling(targetNode)
3254
3306
  );
3255
- vnode.targetStart = targetNode;
3256
- vnode.targetAnchor = targetNode && nextSibling(targetNode);
3257
3307
  } else {
3258
3308
  vnode.anchor = nextSibling(node);
3259
3309
  let targetAnchor = targetNode;
@@ -3284,6 +3334,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3284
3334
  }
3285
3335
  }
3286
3336
  updateCssVars(vnode, disabled);
3337
+ } else if (disabled) {
3338
+ if (vnode.shapeFlag & 16) {
3339
+ hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
3340
+ }
3287
3341
  }
3288
3342
  return vnode.anchor && nextSibling(vnode.anchor);
3289
3343
  }
@@ -3395,7 +3449,7 @@ const BaseTransitionImpl = {
3395
3449
  setTransitionHooks(innerChild, enterHooks);
3396
3450
  }
3397
3451
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3398
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3452
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3399
3453
  let leavingHooks = resolveTransitionHooks(
3400
3454
  oldInnerChild,
3401
3455
  rawProps,
@@ -3675,7 +3729,6 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
3675
3729
  return ret;
3676
3730
  }
3677
3731
 
3678
- /*! #__NO_SIDE_EFFECTS__ */
3679
3732
  // @__NO_SIDE_EFFECTS__
3680
3733
  function defineComponent(options, extraOptions) {
3681
3734
  return isFunction(options) ? (
@@ -3728,6 +3781,7 @@ function useTemplateRef(key) {
3728
3781
  return ret;
3729
3782
  }
3730
3783
 
3784
+ const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
3731
3785
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3732
3786
  if (isArray(rawRef)) {
3733
3787
  rawRef.forEach(
@@ -3760,7 +3814,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3760
3814
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3761
3815
  const setupState = owner.setupState;
3762
3816
  const rawSetupState = toRaw(setupState);
3763
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3817
+ const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
3764
3818
  {
3765
3819
  if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
3766
3820
  warn$1(
@@ -3773,14 +3827,22 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3773
3827
  }
3774
3828
  return hasOwn(rawSetupState, key);
3775
3829
  };
3830
+ const canSetRef = (ref2) => {
3831
+ return !knownTemplateRefs.has(ref2);
3832
+ };
3776
3833
  if (oldRef != null && oldRef !== ref) {
3834
+ invalidatePendingSetRef(oldRawRef);
3777
3835
  if (isString(oldRef)) {
3778
3836
  refs[oldRef] = null;
3779
3837
  if (canSetSetupRef(oldRef)) {
3780
3838
  setupState[oldRef] = null;
3781
3839
  }
3782
3840
  } else if (isRef(oldRef)) {
3783
- oldRef.value = null;
3841
+ if (canSetRef(oldRef)) {
3842
+ oldRef.value = null;
3843
+ }
3844
+ const oldRawRefAtom = oldRawRef;
3845
+ if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
3784
3846
  }
3785
3847
  }
3786
3848
  if (isFunction(ref)) {
@@ -3791,7 +3853,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3791
3853
  if (_isString || _isRef) {
3792
3854
  const doSet = () => {
3793
3855
  if (rawRef.f) {
3794
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3856
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
3795
3857
  if (isUnmount) {
3796
3858
  isArray(existing) && remove(existing, refValue);
3797
3859
  } else {
@@ -3802,8 +3864,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3802
3864
  setupState[ref] = refs[ref];
3803
3865
  }
3804
3866
  } else {
3805
- ref.value = [refValue];
3806
- if (rawRef.k) refs[rawRef.k] = ref.value;
3867
+ const newVal = [refValue];
3868
+ if (canSetRef(ref)) {
3869
+ ref.value = newVal;
3870
+ }
3871
+ if (rawRef.k) refs[rawRef.k] = newVal;
3807
3872
  }
3808
3873
  } else if (!existing.includes(refValue)) {
3809
3874
  existing.push(refValue);
@@ -3815,16 +3880,24 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3815
3880
  setupState[ref] = value;
3816
3881
  }
3817
3882
  } else if (_isRef) {
3818
- ref.value = value;
3883
+ if (canSetRef(ref)) {
3884
+ ref.value = value;
3885
+ }
3819
3886
  if (rawRef.k) refs[rawRef.k] = value;
3820
3887
  } else {
3821
3888
  warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
3822
3889
  }
3823
3890
  };
3824
3891
  if (value) {
3825
- doSet.id = -1;
3826
- queuePostRenderEffect(doSet, parentSuspense);
3892
+ const job = () => {
3893
+ doSet();
3894
+ pendingSetRefMap.delete(rawRef);
3895
+ };
3896
+ job.id = -1;
3897
+ pendingSetRefMap.set(rawRef, job);
3898
+ queuePostRenderEffect(job, parentSuspense);
3827
3899
  } else {
3900
+ invalidatePendingSetRef(rawRef);
3828
3901
  doSet();
3829
3902
  }
3830
3903
  } else {
@@ -3832,6 +3905,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3832
3905
  }
3833
3906
  }
3834
3907
  }
3908
+ function invalidatePendingSetRef(rawRef) {
3909
+ const pendingSetRef = pendingSetRefMap.get(rawRef);
3910
+ if (pendingSetRef) {
3911
+ pendingSetRef.flags |= 8;
3912
+ pendingSetRefMap.delete(rawRef);
3913
+ }
3914
+ }
3835
3915
 
3836
3916
  let hasLoggedMismatchError = false;
3837
3917
  const logMismatchError = () => {
@@ -4073,6 +4153,8 @@ function createHydrationFunctions(rendererInternals) {
4073
4153
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4074
4154
  const content = el.content.firstChild;
4075
4155
  if (needCallTransitionHooks) {
4156
+ const cls = content.getAttribute("class");
4157
+ if (cls) content.$cls = cls;
4076
4158
  transition.beforeEnter(content);
4077
4159
  }
4078
4160
  replaceNode(content, el, parentComponent);
@@ -4325,7 +4407,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
4325
4407
  let actual;
4326
4408
  let expected;
4327
4409
  if (key === "class") {
4328
- actual = el.getAttribute("class");
4410
+ if (el.$cls) {
4411
+ actual = el.$cls;
4412
+ delete el.$cls;
4413
+ } else {
4414
+ actual = el.getAttribute("class");
4415
+ }
4329
4416
  expected = normalizeClass(clientValue);
4330
4417
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
4331
4418
  mismatchType = 2 /* CLASS */;
@@ -4429,10 +4516,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
4429
4516
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
4430
4517
  const cssVars = instance.getCssVars();
4431
4518
  for (const key in cssVars) {
4432
- expectedMap.set(
4433
- `--${getEscapedCssVarName(key)}`,
4434
- String(cssVars[key])
4435
- );
4519
+ const value = normalizeCssVarValue(cssVars[key]);
4520
+ expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
4436
4521
  }
4437
4522
  }
4438
4523
  if (vnode === root && instance.parent) {
@@ -4463,7 +4548,7 @@ function isMismatchAllowed(el, allowedType) {
4463
4548
  if (allowedType === 0 /* TEXT */ && list.includes("children")) {
4464
4549
  return true;
4465
4550
  }
4466
- return allowedAttr.split(",").includes(MismatchTypeString[allowedType]);
4551
+ return list.includes(MismatchTypeString[allowedType]);
4467
4552
  }
4468
4553
  }
4469
4554
 
@@ -4559,7 +4644,6 @@ function forEachElement(node, cb) {
4559
4644
  }
4560
4645
 
4561
4646
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4562
- /*! #__NO_SIDE_EFFECTS__ */
4563
4647
  // @__NO_SIDE_EFFECTS__
4564
4648
  function defineAsyncComponent(source) {
4565
4649
  if (isFunction(source)) {
@@ -4620,15 +4704,28 @@ function defineAsyncComponent(source) {
4620
4704
  name: "AsyncComponentWrapper",
4621
4705
  __asyncLoader: load,
4622
4706
  __asyncHydrate(el, instance, hydrate) {
4707
+ let patched = false;
4708
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
4709
+ const performHydrate = () => {
4710
+ if (patched) {
4711
+ {
4712
+ warn$1(
4713
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
4714
+ );
4715
+ }
4716
+ return;
4717
+ }
4718
+ hydrate();
4719
+ };
4623
4720
  const doHydrate = hydrateStrategy ? () => {
4624
4721
  const teardown = hydrateStrategy(
4625
- hydrate,
4722
+ performHydrate,
4626
4723
  (cb) => forEachElement(el, cb)
4627
4724
  );
4628
4725
  if (teardown) {
4629
4726
  (instance.bum || (instance.bum = [])).push(teardown);
4630
4727
  }
4631
- } : hydrate;
4728
+ } : performHydrate;
4632
4729
  if (resolvedComp) {
4633
4730
  doHydrate();
4634
4731
  } else {
@@ -4797,6 +4894,9 @@ const KeepAliveImpl = {
4797
4894
  {
4798
4895
  devtoolsComponentAdded(instance2);
4799
4896
  }
4897
+ {
4898
+ instance2.__keepAliveStorageContainer = storageContainer;
4899
+ }
4800
4900
  };
4801
4901
  function unmount(vnode) {
4802
4902
  resetShapeFlag(vnode);
@@ -4884,7 +4984,7 @@ const KeepAliveImpl = {
4884
4984
  );
4885
4985
  const { include, exclude, max } = props;
4886
4986
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4887
- vnode.shapeFlag &= ~256;
4987
+ vnode.shapeFlag &= -257;
4888
4988
  current = vnode;
4889
4989
  return rawVNode;
4890
4990
  }
@@ -4971,8 +5071,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
4971
5071
  }, target);
4972
5072
  }
4973
5073
  function resetShapeFlag(vnode) {
4974
- vnode.shapeFlag &= ~256;
4975
- vnode.shapeFlag &= ~512;
5074
+ vnode.shapeFlag &= -257;
5075
+ vnode.shapeFlag &= -513;
4976
5076
  }
4977
5077
  function getInnerChild(vnode) {
4978
5078
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5087,14 +5187,16 @@ function renderList(source, renderItem, cache, index) {
5087
5187
  if (sourceIsArray || isString(source)) {
5088
5188
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5089
5189
  let needsWrap = false;
5190
+ let isReadonlySource = false;
5090
5191
  if (sourceIsReactiveArray) {
5091
5192
  needsWrap = !isShallow(source);
5193
+ isReadonlySource = isReadonly(source);
5092
5194
  source = shallowReadArray(source);
5093
5195
  }
5094
5196
  ret = new Array(source.length);
5095
5197
  for (let i = 0, l = source.length; i < l; i++) {
5096
5198
  ret[i] = renderItem(
5097
- needsWrap ? toReactive(source[i]) : source[i],
5199
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5098
5200
  i,
5099
5201
  void 0,
5100
5202
  cached && cached[i]
@@ -5151,12 +5253,13 @@ function createSlots(slots, dynamicSlots) {
5151
5253
 
5152
5254
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5153
5255
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
5256
+ const hasProps = Object.keys(props).length > 0;
5154
5257
  if (name !== "default") props.name = name;
5155
5258
  return openBlock(), createBlock(
5156
5259
  Fragment,
5157
5260
  null,
5158
5261
  [createVNode("slot", props, fallback && fallback())],
5159
- 64
5262
+ hasProps ? -2 : 64
5160
5263
  );
5161
5264
  }
5162
5265
  let slot = slots[name];
@@ -5361,10 +5464,10 @@ const PublicInstanceProxyHandlers = {
5361
5464
  return true;
5362
5465
  },
5363
5466
  has({
5364
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
5467
+ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
5365
5468
  }, key) {
5366
- let normalizedProps;
5367
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
5469
+ let normalizedProps, cssModules;
5470
+ return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
5368
5471
  },
5369
5472
  defineProperty(target, key, descriptor) {
5370
5473
  if (descriptor.get != null) {
@@ -5502,15 +5605,15 @@ function withDefaults(props, defaults) {
5502
5605
  return null;
5503
5606
  }
5504
5607
  function useSlots() {
5505
- return getContext().slots;
5608
+ return getContext("useSlots").slots;
5506
5609
  }
5507
5610
  function useAttrs() {
5508
- return getContext().attrs;
5611
+ return getContext("useAttrs").attrs;
5509
5612
  }
5510
- function getContext() {
5613
+ function getContext(calledFunctionName) {
5511
5614
  const i = getCurrentInstance();
5512
5615
  if (!i) {
5513
- warn$1(`useContext() called without active instance.`);
5616
+ warn$1(`${calledFunctionName}() called without active instance.`);
5514
5617
  }
5515
5618
  return i.setupContext || (i.setupContext = createSetupContext(i));
5516
5619
  }
@@ -5761,7 +5864,8 @@ function applyOptions(instance) {
5761
5864
  expose.forEach((key) => {
5762
5865
  Object.defineProperty(exposed, key, {
5763
5866
  get: () => publicThis[key],
5764
- set: (val) => publicThis[key] = val
5867
+ set: (val) => publicThis[key] = val,
5868
+ enumerable: true
5765
5869
  });
5766
5870
  });
5767
5871
  } else if (!instance.exposed) {
@@ -6116,11 +6220,9 @@ function createAppAPI(render, hydrate) {
6116
6220
  }
6117
6221
  {
6118
6222
  context.reload = () => {
6119
- render(
6120
- cloneVNode(vnode),
6121
- rootContainer,
6122
- namespace
6123
- );
6223
+ const cloned = cloneVNode(vnode);
6224
+ cloned.el = null;
6225
+ render(cloned, rootContainer, namespace);
6124
6226
  };
6125
6227
  }
6126
6228
  if (isHydrate && hydrate) {
@@ -6170,9 +6272,15 @@ If you want to remount the same app, move your app creation logic into a factory
6170
6272
  },
6171
6273
  provide(key, value) {
6172
6274
  if (key in context.provides) {
6173
- warn$1(
6174
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6175
- );
6275
+ if (hasOwn(context.provides, key)) {
6276
+ warn$1(
6277
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6278
+ );
6279
+ } else {
6280
+ warn$1(
6281
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
6282
+ );
6283
+ }
6176
6284
  }
6177
6285
  context.provides[key] = value;
6178
6286
  return app;
@@ -6207,9 +6315,9 @@ function provide(key, value) {
6207
6315
  }
6208
6316
  }
6209
6317
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
6210
- const instance = currentInstance || currentRenderingInstance;
6318
+ const instance = getCurrentInstance();
6211
6319
  if (instance || currentApp) {
6212
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6320
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6213
6321
  if (provides && key in provides) {
6214
6322
  return provides[key];
6215
6323
  } else if (arguments.length > 1) {
@@ -6222,7 +6330,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
6222
6330
  }
6223
6331
  }
6224
6332
  function hasInjectionContext() {
6225
- return !!(currentInstance || currentRenderingInstance || currentApp);
6333
+ return !!(getCurrentInstance() || currentApp);
6226
6334
  }
6227
6335
 
6228
6336
  const internalObjectProto = {};
@@ -6636,14 +6744,14 @@ function isBoolean(...args) {
6636
6744
  return args.some((elem) => elem.toLowerCase() === "boolean");
6637
6745
  }
6638
6746
 
6639
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
6747
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
6640
6748
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
6641
6749
  const normalizeSlot = (key, rawSlot, ctx) => {
6642
6750
  if (rawSlot._n) {
6643
6751
  return rawSlot;
6644
6752
  }
6645
6753
  const normalized = withCtx((...args) => {
6646
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
6754
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
6647
6755
  warn$1(
6648
6756
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
6649
6757
  );
@@ -6682,7 +6790,7 @@ const normalizeVNodeSlots = (instance, children) => {
6682
6790
  };
6683
6791
  const assignSlots = (slots, children, optimized) => {
6684
6792
  for (const key in children) {
6685
- if (optimized || key !== "_") {
6793
+ if (optimized || !isInternalKey(key)) {
6686
6794
  slots[key] = children[key];
6687
6795
  }
6688
6796
  }
@@ -6750,12 +6858,10 @@ function endMeasure(instance, type) {
6750
6858
  if (instance.appContext.config.performance && isSupported()) {
6751
6859
  const startTag = `vue-${type}-${instance.uid}`;
6752
6860
  const endTag = startTag + `:end`;
6861
+ const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
6753
6862
  perf.mark(endTag);
6754
- perf.measure(
6755
- `<${formatComponentName(instance, instance.type)}> ${type}`,
6756
- startTag,
6757
- endTag
6758
- );
6863
+ perf.measure(measureName, startTag, endTag);
6864
+ perf.clearMeasures(measureName);
6759
6865
  perf.clearMarks(startTag);
6760
6866
  perf.clearMarks(endTag);
6761
6867
  }
@@ -6901,6 +7007,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6901
7007
  }
6902
7008
  if (ref != null && parentComponent) {
6903
7009
  setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
7010
+ } else if (ref == null && n1 && n1.ref != null) {
7011
+ setRef(n1.ref, null, parentSuspense, n1, true);
6904
7012
  }
6905
7013
  };
6906
7014
  const processText = (n1, n2, container, anchor) => {
@@ -7206,7 +7314,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7206
7314
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
7207
7315
  // which also requires the correct parent container
7208
7316
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
7209
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
7317
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
7210
7318
  // In other cases, the parent container is not actually used so we
7211
7319
  // just pass the block element here to avoid a DOM parentNode call.
7212
7320
  fallbackContainer
@@ -7368,12 +7476,13 @@ function baseCreateRenderer(options, createHydrationFns) {
7368
7476
  endMeasure(instance, `init`);
7369
7477
  }
7370
7478
  }
7479
+ if (isHmrUpdating) initialVNode.el = null;
7371
7480
  if (instance.asyncDep) {
7372
- if (isHmrUpdating) initialVNode.el = null;
7373
7481
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
7374
7482
  if (!initialVNode.el) {
7375
7483
  const placeholder = instance.subTree = createVNode(Comment);
7376
7484
  processCommentNode(null, placeholder, container, anchor);
7485
+ initialVNode.placeholder = placeholder.el;
7377
7486
  }
7378
7487
  } else {
7379
7488
  setupRenderEffect(
@@ -7460,7 +7569,8 @@ function baseCreateRenderer(options, createHydrationFns) {
7460
7569
  hydrateSubTree();
7461
7570
  }
7462
7571
  } else {
7463
- if (root.ce) {
7572
+ if (root.ce && // @ts-expect-error _def is private
7573
+ root.ce._def.shadowRoot !== false) {
7464
7574
  root.ce._injectChildStyle(type);
7465
7575
  }
7466
7576
  {
@@ -7874,7 +7984,11 @@ function baseCreateRenderer(options, createHydrationFns) {
7874
7984
  for (i = toBePatched - 1; i >= 0; i--) {
7875
7985
  const nextIndex = s2 + i;
7876
7986
  const nextChild = c2[nextIndex];
7877
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
7987
+ const anchorVNode = c2[nextIndex + 1];
7988
+ const anchor = nextIndex + 1 < l2 ? (
7989
+ // #13559, fallback to el placeholder for unresolved async component
7990
+ anchorVNode.el || anchorVNode.placeholder
7991
+ ) : parentAnchor;
7878
7992
  if (newIndexToOldIndexMap[i] === 0) {
7879
7993
  patch(
7880
7994
  null,
@@ -7931,8 +8045,20 @@ function baseCreateRenderer(options, createHydrationFns) {
7931
8045
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
7932
8046
  } else {
7933
8047
  const { leave, delayLeave, afterLeave } = transition;
7934
- const remove2 = () => hostInsert(el, container, anchor);
8048
+ const remove2 = () => {
8049
+ if (vnode.ctx.isUnmounted) {
8050
+ hostRemove(el);
8051
+ } else {
8052
+ hostInsert(el, container, anchor);
8053
+ }
8054
+ };
7935
8055
  const performLeave = () => {
8056
+ if (el._isLeaving) {
8057
+ el[leaveCbKey](
8058
+ true
8059
+ /* cancelled */
8060
+ );
8061
+ }
7936
8062
  leave(el, () => {
7937
8063
  remove2();
7938
8064
  afterLeave && afterLeave();
@@ -7964,7 +8090,9 @@ function baseCreateRenderer(options, createHydrationFns) {
7964
8090
  optimized = false;
7965
8091
  }
7966
8092
  if (ref != null) {
8093
+ pauseTracking();
7967
8094
  setRef(ref, null, parentSuspense, vnode, true);
8095
+ resetTracking();
7968
8096
  }
7969
8097
  if (cacheIndex != null) {
7970
8098
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -8093,12 +8221,6 @@ function baseCreateRenderer(options, createHydrationFns) {
8093
8221
  queuePostRenderEffect(() => {
8094
8222
  instance.isUnmounted = true;
8095
8223
  }, parentSuspense);
8096
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
8097
- parentSuspense.deps--;
8098
- if (parentSuspense.deps === 0) {
8099
- parentSuspense.resolve();
8100
- }
8101
- }
8102
8224
  {
8103
8225
  devtoolsComponentRemoved(instance);
8104
8226
  }
@@ -8177,8 +8299,8 @@ function toggleRecurse({ effect, job }, allowed) {
8177
8299
  effect.flags |= 32;
8178
8300
  job.flags |= 4;
8179
8301
  } else {
8180
- effect.flags &= ~32;
8181
- job.flags &= ~4;
8302
+ effect.flags &= -33;
8303
+ job.flags &= -5;
8182
8304
  }
8183
8305
  }
8184
8306
  function needTransition(parentSuspense, transition) {
@@ -8199,12 +8321,16 @@ function traverseStaticChildren(n1, n2, shallow = false) {
8199
8321
  if (!shallow && c2.patchFlag !== -2)
8200
8322
  traverseStaticChildren(c1, c2);
8201
8323
  }
8202
- if (c2.type === Text) {
8324
+ if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
8325
+ c2.patchFlag !== -1) {
8203
8326
  c2.el = c1.el;
8204
8327
  }
8205
8328
  if (c2.type === Comment && !c2.el) {
8206
8329
  c2.el = c1.el;
8207
8330
  }
8331
+ {
8332
+ c2.el && (c2.el.__vnode = c2);
8333
+ }
8208
8334
  }
8209
8335
  }
8210
8336
  }
@@ -8556,8 +8682,9 @@ function emit(instance, event, ...rawArgs) {
8556
8682
  );
8557
8683
  }
8558
8684
  }
8685
+ const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
8559
8686
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
8560
- const cache = appContext.emitsCache;
8687
+ const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
8561
8688
  const cached = cache.get(comp);
8562
8689
  if (cached !== void 0) {
8563
8690
  return cached;
@@ -9005,7 +9132,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
9005
9132
  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
9006
9133
  if (pendingBranch) {
9007
9134
  suspense.pendingBranch = newBranch;
9008
- if (isSameVNodeType(newBranch, pendingBranch)) {
9135
+ if (isSameVNodeType(pendingBranch, newBranch)) {
9009
9136
  patch(
9010
9137
  pendingBranch,
9011
9138
  newBranch,
@@ -9076,7 +9203,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
9076
9203
  );
9077
9204
  setActiveBranch(suspense, newFallback);
9078
9205
  }
9079
- } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9206
+ } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9080
9207
  patch(
9081
9208
  activeBranch,
9082
9209
  newBranch,
@@ -9107,7 +9234,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
9107
9234
  }
9108
9235
  }
9109
9236
  } else {
9110
- if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
9237
+ if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
9111
9238
  patch(
9112
9239
  activeBranch,
9113
9240
  newBranch,
@@ -9550,8 +9677,8 @@ function isSameVNodeType(n1, n2) {
9550
9677
  if (n2.shapeFlag & 6 && n1.component) {
9551
9678
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
9552
9679
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
9553
- n1.shapeFlag &= ~256;
9554
- n2.shapeFlag &= ~512;
9680
+ n1.shapeFlag &= -257;
9681
+ n2.shapeFlag &= -513;
9555
9682
  return false;
9556
9683
  }
9557
9684
  }
@@ -9741,6 +9868,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
9741
9868
  suspense: vnode.suspense,
9742
9869
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
9743
9870
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
9871
+ placeholder: vnode.placeholder,
9744
9872
  el: vnode.el,
9745
9873
  anchor: vnode.anchor,
9746
9874
  ctx: vnode.ctx,
@@ -10012,7 +10140,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
10012
10140
  const { props, children } = instance.vnode;
10013
10141
  const isStateful = isStatefulComponent(instance);
10014
10142
  initProps(instance, props, isStateful, isSSR);
10015
- initSlots(instance, children, optimized);
10143
+ initSlots(instance, children, optimized || isSSR);
10016
10144
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
10017
10145
  isSSR && setInSSRSetupState(false);
10018
10146
  return setupResult;
@@ -10263,7 +10391,7 @@ function getComponentPublicInstance(instance) {
10263
10391
  return instance.proxy;
10264
10392
  }
10265
10393
  }
10266
- const classifyRE = /(?:^|[-_])(\w)/g;
10394
+ const classifyRE = /(?:^|[-_])\w/g;
10267
10395
  const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
10268
10396
  function getComponentName(Component, includeInferred = true) {
10269
10397
  return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
@@ -10306,23 +10434,28 @@ const computed = (getterOrOptions, debugOptions) => {
10306
10434
  };
10307
10435
 
10308
10436
  function h(type, propsOrChildren, children) {
10309
- const l = arguments.length;
10310
- if (l === 2) {
10311
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10312
- if (isVNode(propsOrChildren)) {
10313
- return createVNode(type, null, [propsOrChildren]);
10437
+ try {
10438
+ setBlockTracking(-1);
10439
+ const l = arguments.length;
10440
+ if (l === 2) {
10441
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
10442
+ if (isVNode(propsOrChildren)) {
10443
+ return createVNode(type, null, [propsOrChildren]);
10444
+ }
10445
+ return createVNode(type, propsOrChildren);
10446
+ } else {
10447
+ return createVNode(type, null, propsOrChildren);
10314
10448
  }
10315
- return createVNode(type, propsOrChildren);
10316
10449
  } else {
10317
- return createVNode(type, null, propsOrChildren);
10318
- }
10319
- } else {
10320
- if (l > 3) {
10321
- children = Array.prototype.slice.call(arguments, 2);
10322
- } else if (l === 3 && isVNode(children)) {
10323
- children = [children];
10450
+ if (l > 3) {
10451
+ children = Array.prototype.slice.call(arguments, 2);
10452
+ } else if (l === 3 && isVNode(children)) {
10453
+ children = [children];
10454
+ }
10455
+ return createVNode(type, propsOrChildren, children);
10324
10456
  }
10325
- return createVNode(type, propsOrChildren, children);
10457
+ } finally {
10458
+ setBlockTracking(1);
10326
10459
  }
10327
10460
  }
10328
10461
 
@@ -10343,13 +10476,15 @@ function initCustomFormatter() {
10343
10476
  if (obj.__isVue) {
10344
10477
  return ["div", vueStyle, `VueInstance`];
10345
10478
  } else if (isRef(obj)) {
10479
+ pauseTracking();
10480
+ const value = obj.value;
10481
+ resetTracking();
10346
10482
  return [
10347
10483
  "div",
10348
10484
  {},
10349
10485
  ["span", vueStyle, genRefFlag(obj)],
10350
10486
  "<",
10351
- // avoid debugger accessing value affecting behavior
10352
- formatValue("_value" in obj ? obj._value : obj),
10487
+ formatValue(value),
10353
10488
  `>`
10354
10489
  ];
10355
10490
  } else if (isReactive(obj)) {
@@ -10530,7 +10665,7 @@ function isMemoSame(cached, memo) {
10530
10665
  return true;
10531
10666
  }
10532
10667
 
10533
- const version = "3.5.13";
10668
+ const version = "3.5.22";
10534
10669
  const warn = warn$1 ;
10535
10670
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10536
10671
  const devtools = devtools$1 ;
@@ -10759,11 +10894,11 @@ function resolveTransitionProps(rawProps) {
10759
10894
  const resolve = () => finishLeave(el, done);
10760
10895
  addTransitionClass(el, leaveFromClass);
10761
10896
  if (!el._enterCancelled) {
10762
- forceReflow();
10897
+ forceReflow(el);
10763
10898
  addTransitionClass(el, leaveActiveClass);
10764
10899
  } else {
10765
10900
  addTransitionClass(el, leaveActiveClass);
10766
- forceReflow();
10901
+ forceReflow(el);
10767
10902
  }
10768
10903
  nextFrame(() => {
10769
10904
  if (!el._isLeaving) {
@@ -10889,7 +11024,7 @@ function getTransitionInfo(el, expectedType) {
10889
11024
  type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
10890
11025
  propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
10891
11026
  }
10892
- const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
11027
+ const hasTransform = type === TRANSITION$1 && /\b(?:transform|all)(?:,|$)/.test(
10893
11028
  getStyleProperties(`${TRANSITION$1}Property`).toString()
10894
11029
  );
10895
11030
  return {
@@ -10909,8 +11044,9 @@ function toMs(s) {
10909
11044
  if (s === "auto") return 0;
10910
11045
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
10911
11046
  }
10912
- function forceReflow() {
10913
- return document.body.offsetHeight;
11047
+ function forceReflow(el) {
11048
+ const targetDocument = el ? el.ownerDocument : document;
11049
+ return targetDocument.body.offsetHeight;
10914
11050
  }
10915
11051
 
10916
11052
  function patchClass(el, value, isSVG) {
@@ -10930,6 +11066,8 @@ function patchClass(el, value, isSVG) {
10930
11066
  const vShowOriginalDisplay = Symbol("_vod");
10931
11067
  const vShowHidden = Symbol("_vsh");
10932
11068
  const vShow = {
11069
+ // used for prop mismatch check during hydration
11070
+ name: "show",
10933
11071
  beforeMount(el, { value }, { transition }) {
10934
11072
  el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
10935
11073
  if (transition && value) {
@@ -10963,9 +11101,6 @@ const vShow = {
10963
11101
  setDisplay(el, value);
10964
11102
  }
10965
11103
  };
10966
- {
10967
- vShow.name = "show";
10968
- }
10969
11104
  function setDisplay(el, value) {
10970
11105
  el.style.display = value ? el[vShowOriginalDisplay] : "none";
10971
11106
  el[vShowHidden] = !value;
@@ -11043,14 +11178,15 @@ function setVarsOnNode(el, vars) {
11043
11178
  const style = el.style;
11044
11179
  let cssText = "";
11045
11180
  for (const key in vars) {
11046
- style.setProperty(`--${key}`, vars[key]);
11047
- cssText += `--${key}: ${vars[key]};`;
11181
+ const value = normalizeCssVarValue(vars[key]);
11182
+ style.setProperty(`--${key}`, value);
11183
+ cssText += `--${key}: ${value};`;
11048
11184
  }
11049
11185
  style[CSS_VAR_TEXT] = cssText;
11050
11186
  }
11051
11187
  }
11052
11188
 
11053
- const displayRE = /(^|;)\s*display\s*:/;
11189
+ const displayRE = /(?:^|;)\s*display\s*:/;
11054
11190
  function patchStyle(el, prev, next) {
11055
11191
  const style = el.style;
11056
11192
  const isCssString = isString(next);
@@ -11348,7 +11484,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
11348
11484
  }
11349
11485
  return false;
11350
11486
  }
11351
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11487
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
11352
11488
  return false;
11353
11489
  }
11354
11490
  if (key === "form") {
@@ -11373,11 +11509,10 @@ function shouldSetAsProp(el, key, value, isSVG) {
11373
11509
  }
11374
11510
 
11375
11511
  const REMOVAL = {};
11376
- /*! #__NO_SIDE_EFFECTS__ */
11377
11512
  // @__NO_SIDE_EFFECTS__
11378
11513
  function defineCustomElement(options, extraOptions, _createApp) {
11379
- const Comp = defineComponent(options, extraOptions);
11380
- if (isPlainObject(Comp)) extend(Comp, extraOptions);
11514
+ let Comp = defineComponent(options, extraOptions);
11515
+ if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
11381
11516
  class VueCustomElement extends VueElement {
11382
11517
  constructor(initialProps) {
11383
11518
  super(Comp, initialProps, _createApp);
@@ -11386,10 +11521,9 @@ function defineCustomElement(options, extraOptions, _createApp) {
11386
11521
  VueCustomElement.def = Comp;
11387
11522
  return VueCustomElement;
11388
11523
  }
11389
- /*! #__NO_SIDE_EFFECTS__ */
11390
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11524
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
11391
11525
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
11392
- };
11526
+ });
11393
11527
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
11394
11528
  };
11395
11529
  class VueElement extends BaseClass {
@@ -11425,19 +11559,20 @@ class VueElement extends BaseClass {
11425
11559
  );
11426
11560
  }
11427
11561
  if (_def.shadowRoot !== false) {
11428
- this.attachShadow({ mode: "open" });
11562
+ this.attachShadow(
11563
+ extend({}, _def.shadowRootOptions, {
11564
+ mode: "open"
11565
+ })
11566
+ );
11429
11567
  this._root = this.shadowRoot;
11430
11568
  } else {
11431
11569
  this._root = this;
11432
11570
  }
11433
11571
  }
11434
- if (!this._def.__asyncLoader) {
11435
- this._resolveProps(this._def);
11436
- }
11437
11572
  }
11438
11573
  connectedCallback() {
11439
11574
  if (!this.isConnected) return;
11440
- if (!this.shadowRoot) {
11575
+ if (!this.shadowRoot && !this._resolved) {
11441
11576
  this._parseSlots();
11442
11577
  }
11443
11578
  this._connected = true;
@@ -11450,8 +11585,7 @@ class VueElement extends BaseClass {
11450
11585
  }
11451
11586
  if (!this._instance) {
11452
11587
  if (this._resolved) {
11453
- this._setParent();
11454
- this._update();
11588
+ this._mount(this._def);
11455
11589
  } else {
11456
11590
  if (parent && parent._pendingResolve) {
11457
11591
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -11467,7 +11601,15 @@ class VueElement extends BaseClass {
11467
11601
  _setParent(parent = this._parent) {
11468
11602
  if (parent) {
11469
11603
  this._instance.parent = parent._instance;
11470
- this._instance.provides = parent._instance.provides;
11604
+ this._inheritParentContext(parent);
11605
+ }
11606
+ }
11607
+ _inheritParentContext(parent = this._parent) {
11608
+ if (parent && this._app) {
11609
+ Object.setPrototypeOf(
11610
+ this._app._context.provides,
11611
+ parent._instance.provides
11612
+ );
11471
11613
  }
11472
11614
  }
11473
11615
  disconnectedCallback() {
@@ -11481,9 +11623,18 @@ class VueElement extends BaseClass {
11481
11623
  this._app && this._app.unmount();
11482
11624
  if (this._instance) this._instance.ce = void 0;
11483
11625
  this._app = this._instance = null;
11626
+ if (this._teleportTargets) {
11627
+ this._teleportTargets.clear();
11628
+ this._teleportTargets = void 0;
11629
+ }
11484
11630
  }
11485
11631
  });
11486
11632
  }
11633
+ _processMutations(mutations) {
11634
+ for (const m of mutations) {
11635
+ this._setAttr(m.attributeName);
11636
+ }
11637
+ }
11487
11638
  /**
11488
11639
  * resolve inner component definition (handle possible async component)
11489
11640
  */
@@ -11494,11 +11645,7 @@ class VueElement extends BaseClass {
11494
11645
  for (let i = 0; i < this.attributes.length; i++) {
11495
11646
  this._setAttr(this.attributes[i].name);
11496
11647
  }
11497
- this._ob = new MutationObserver((mutations) => {
11498
- for (const m of mutations) {
11499
- this._setAttr(m.attributeName);
11500
- }
11501
- });
11648
+ this._ob = new MutationObserver(this._processMutations.bind(this));
11502
11649
  this._ob.observe(this, { attributes: true });
11503
11650
  const resolve = (def, isAsync = false) => {
11504
11651
  this._resolved = true;
@@ -11517,9 +11664,7 @@ class VueElement extends BaseClass {
11517
11664
  }
11518
11665
  }
11519
11666
  this._numberProps = numberProps;
11520
- if (isAsync) {
11521
- this._resolveProps(def);
11522
- }
11667
+ this._resolveProps(def);
11523
11668
  if (this.shadowRoot) {
11524
11669
  this._applyStyles(styles);
11525
11670
  } else if (styles) {
@@ -11531,9 +11676,10 @@ class VueElement extends BaseClass {
11531
11676
  };
11532
11677
  const asyncDef = this._def.__asyncLoader;
11533
11678
  if (asyncDef) {
11534
- this._pendingResolve = asyncDef().then(
11535
- (def) => resolve(this._def = def, true)
11536
- );
11679
+ this._pendingResolve = asyncDef().then((def) => {
11680
+ def.configureApp = this._def.configureApp;
11681
+ resolve(this._def = def, true);
11682
+ });
11537
11683
  } else {
11538
11684
  resolve(this._def);
11539
11685
  }
@@ -11543,6 +11689,7 @@ class VueElement extends BaseClass {
11543
11689
  def.name = "VueElement";
11544
11690
  }
11545
11691
  this._app = this._createApp(def);
11692
+ this._inheritParentContext();
11546
11693
  if (def.configureApp) {
11547
11694
  def.configureApp(this._app);
11548
11695
  }
@@ -11614,7 +11761,10 @@ class VueElement extends BaseClass {
11614
11761
  }
11615
11762
  if (shouldReflect) {
11616
11763
  const ob = this._ob;
11617
- ob && ob.disconnect();
11764
+ if (ob) {
11765
+ this._processMutations(ob.takeRecords());
11766
+ ob.disconnect();
11767
+ }
11618
11768
  if (val === true) {
11619
11769
  this.setAttribute(hyphenate(key), "");
11620
11770
  } else if (typeof val === "string" || typeof val === "number") {
@@ -11627,7 +11777,9 @@ class VueElement extends BaseClass {
11627
11777
  }
11628
11778
  }
11629
11779
  _update() {
11630
- render(this._createVNode(), this._root);
11780
+ const vnode = this._createVNode();
11781
+ if (this._app) vnode.appContext = this._app._context;
11782
+ render(vnode, this._root);
11631
11783
  }
11632
11784
  _createVNode() {
11633
11785
  const baseProps = {};
@@ -11716,7 +11868,7 @@ class VueElement extends BaseClass {
11716
11868
  * Only called when shadowRoot is false
11717
11869
  */
11718
11870
  _renderSlots() {
11719
- const outlets = (this._teleportTarget || this).querySelectorAll("slot");
11871
+ const outlets = this._getSlots();
11720
11872
  const scopeId = this._instance.type.__scopeId;
11721
11873
  for (let i = 0; i < outlets.length; i++) {
11722
11874
  const o = outlets[i];
@@ -11742,6 +11894,19 @@ class VueElement extends BaseClass {
11742
11894
  parent.removeChild(o);
11743
11895
  }
11744
11896
  }
11897
+ /**
11898
+ * @internal
11899
+ */
11900
+ _getSlots() {
11901
+ const roots = [this];
11902
+ if (this._teleportTargets) {
11903
+ roots.push(...this._teleportTargets);
11904
+ }
11905
+ return roots.reduce((res, i) => {
11906
+ res.push(...Array.from(i.querySelectorAll("slot")));
11907
+ return res;
11908
+ }, []);
11909
+ }
11745
11910
  /**
11746
11911
  * @internal
11747
11912
  */
@@ -11837,12 +12002,13 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11837
12002
  instance.vnode.el,
11838
12003
  moveClass
11839
12004
  )) {
12005
+ prevChildren = [];
11840
12006
  return;
11841
12007
  }
11842
12008
  prevChildren.forEach(callPendingCbs);
11843
12009
  prevChildren.forEach(recordPosition);
11844
12010
  const movedChildren = prevChildren.filter(applyTranslation);
11845
- forceReflow();
12011
+ forceReflow(instance.vnode.el);
11846
12012
  movedChildren.forEach((c) => {
11847
12013
  const el = c.el;
11848
12014
  const style = el.style;
@@ -11852,7 +12018,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11852
12018
  if (e && e.target !== el) {
11853
12019
  return;
11854
12020
  }
11855
- if (!e || /transform$/.test(e.propertyName)) {
12021
+ if (!e || e.propertyName.endsWith("transform")) {
11856
12022
  el.removeEventListener("transitionend", cb);
11857
12023
  el[moveCbKey] = null;
11858
12024
  removeTransitionClass(el, moveClass);
@@ -11860,6 +12026,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
11860
12026
  };
11861
12027
  el.addEventListener("transitionend", cb);
11862
12028
  });
12029
+ prevChildren = [];
11863
12030
  });
11864
12031
  return () => {
11865
12032
  const rawProps = toRaw(props);
@@ -12242,13 +12409,13 @@ const modifierGuards = {
12242
12409
  const withModifiers = (fn, modifiers) => {
12243
12410
  const cache = fn._withMods || (fn._withMods = {});
12244
12411
  const cacheKey = modifiers.join(".");
12245
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
12412
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
12246
12413
  for (let i = 0; i < modifiers.length; i++) {
12247
12414
  const guard = modifierGuards[modifiers[i]];
12248
12415
  if (guard && guard(event, modifiers)) return;
12249
12416
  }
12250
12417
  return fn(event, ...args);
12251
- });
12418
+ }));
12252
12419
  };
12253
12420
  const keyNames = {
12254
12421
  esc: "escape",
@@ -12262,7 +12429,7 @@ const keyNames = {
12262
12429
  const withKeys = (fn, modifiers) => {
12263
12430
  const cache = fn._withKeys || (fn._withKeys = {});
12264
12431
  const cacheKey = modifiers.join(".");
12265
- return cache[cacheKey] || (cache[cacheKey] = (event) => {
12432
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
12266
12433
  if (!("key" in event)) {
12267
12434
  return;
12268
12435
  }
@@ -12272,7 +12439,7 @@ const withKeys = (fn, modifiers) => {
12272
12439
  )) {
12273
12440
  return fn(event);
12274
12441
  }
12275
- });
12442
+ }));
12276
12443
  };
12277
12444
 
12278
12445
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -12286,13 +12453,13 @@ function ensureHydrationRenderer() {
12286
12453
  enabledHydration = true;
12287
12454
  return renderer;
12288
12455
  }
12289
- const render = (...args) => {
12456
+ const render = ((...args) => {
12290
12457
  ensureRenderer().render(...args);
12291
- };
12292
- const hydrate = (...args) => {
12458
+ });
12459
+ const hydrate = ((...args) => {
12293
12460
  ensureHydrationRenderer().hydrate(...args);
12294
- };
12295
- const createApp = (...args) => {
12461
+ });
12462
+ const createApp = ((...args) => {
12296
12463
  const app = ensureRenderer().createApp(...args);
12297
12464
  {
12298
12465
  injectNativeTagCheck(app);
@@ -12317,8 +12484,8 @@ const createApp = (...args) => {
12317
12484
  return proxy;
12318
12485
  };
12319
12486
  return app;
12320
- };
12321
- const createSSRApp = (...args) => {
12487
+ });
12488
+ const createSSRApp = ((...args) => {
12322
12489
  const app = ensureHydrationRenderer().createApp(...args);
12323
12490
  {
12324
12491
  injectNativeTagCheck(app);
@@ -12332,7 +12499,7 @@ const createSSRApp = (...args) => {
12332
12499
  }
12333
12500
  };
12334
12501
  return app;
12335
- };
12502
+ });
12336
12503
  function resolveRootNamespace(container) {
12337
12504
  if (container instanceof SVGElement) {
12338
12505
  return "svg";
@@ -13474,7 +13641,7 @@ class Tokenizer {
13474
13641
  this.buffer = input;
13475
13642
  while (this.index < this.buffer.length) {
13476
13643
  const c = this.buffer.charCodeAt(this.index);
13477
- if (c === 10) {
13644
+ if (c === 10 && this.state !== 33) {
13478
13645
  this.newlines.push(this.index);
13479
13646
  }
13480
13647
  switch (this.state) {
@@ -13751,7 +13918,7 @@ function isCoreComponent(tag) {
13751
13918
  return BASE_TRANSITION;
13752
13919
  }
13753
13920
  }
13754
- const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
13921
+ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
13755
13922
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
13756
13923
  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
13757
13924
  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
@@ -13820,7 +13987,7 @@ const isMemberExpressionBrowser = (exp) => {
13820
13987
  return !currentOpenBracketCount && !currentOpenParensCount;
13821
13988
  };
13822
13989
  const isMemberExpression = isMemberExpressionBrowser ;
13823
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
13990
+ const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
13824
13991
  const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
13825
13992
  const isFnExpression = isFnExpressionBrowser ;
13826
13993
  function assert(condition, msg) {
@@ -13863,6 +14030,9 @@ function hasDynamicKeyVBind(node) {
13863
14030
  function isText$1(node) {
13864
14031
  return node.type === 5 || node.type === 2;
13865
14032
  }
14033
+ function isVPre(p) {
14034
+ return p.type === 7 && p.name === "pre";
14035
+ }
13866
14036
  function isVSlot(p) {
13867
14037
  return p.type === 7 && p.name === "slot";
13868
14038
  }
@@ -14121,7 +14291,7 @@ const tokenizer = new Tokenizer(stack, {
14121
14291
  ondirarg(start, end) {
14122
14292
  if (start === end) return;
14123
14293
  const arg = getSlice(start, end);
14124
- if (inVPre) {
14294
+ if (inVPre && !isVPre(currentProp)) {
14125
14295
  currentProp.name += arg;
14126
14296
  setLocEnd(currentProp.nameLoc, end);
14127
14297
  } else {
@@ -14136,7 +14306,7 @@ const tokenizer = new Tokenizer(stack, {
14136
14306
  },
14137
14307
  ondirmodifier(start, end) {
14138
14308
  const mod = getSlice(start, end);
14139
- if (inVPre) {
14309
+ if (inVPre && !isVPre(currentProp)) {
14140
14310
  currentProp.name += "." + mod;
14141
14311
  setLocEnd(currentProp.nameLoc, end);
14142
14312
  } else if (currentProp.name === "slot") {
@@ -14479,7 +14649,7 @@ function isUpperCase(c) {
14479
14649
  return c > 64 && c < 91;
14480
14650
  }
14481
14651
  const windowsNewlineRE = /\r\n/g;
14482
- function condenseWhitespace(nodes, tag) {
14652
+ function condenseWhitespace(nodes) {
14483
14653
  const shouldCondense = currentOptions.whitespace !== "preserve";
14484
14654
  let removedWhitespace = false;
14485
14655
  for (let i = 0; i < nodes.length; i++) {
@@ -14643,12 +14813,12 @@ function cacheStatic(root, context) {
14643
14813
  context,
14644
14814
  // Root node is unfortunately non-hoistable due to potential parent
14645
14815
  // fallthrough attributes.
14646
- isSingleElementRoot(root, root.children[0])
14816
+ !!getSingleElementRoot(root)
14647
14817
  );
14648
14818
  }
14649
- function isSingleElementRoot(root, child) {
14650
- const { children } = root;
14651
- return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
14819
+ function getSingleElementRoot(root) {
14820
+ const children = root.children.filter((x) => x.type !== 3);
14821
+ return children.length === 1 && children[0].type === 1 && !isSlotOutlet(children[0]) ? children[0] : null;
14652
14822
  }
14653
14823
  function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14654
14824
  const { children } = node;
@@ -14681,6 +14851,11 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14681
14851
  } else if (child.type === 12) {
14682
14852
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
14683
14853
  if (constantType >= 2) {
14854
+ if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
14855
+ child.codegenNode.arguments.push(
14856
+ -1 + (` /* ${PatchFlagNames[-1]} */` )
14857
+ );
14858
+ }
14684
14859
  toCache.push(child);
14685
14860
  continue;
14686
14861
  }
@@ -14741,9 +14916,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14741
14916
  }
14742
14917
  function getCacheExpression(value) {
14743
14918
  const exp = context.cache(value);
14744
- if (inFor && context.hmr) {
14745
- exp.needArraySpread = true;
14746
- }
14919
+ exp.needArraySpread = true;
14747
14920
  return exp;
14748
14921
  }
14749
14922
  function getSlotNode(node2, name) {
@@ -15096,15 +15269,15 @@ function createRootCodegen(root, context) {
15096
15269
  const { helper } = context;
15097
15270
  const { children } = root;
15098
15271
  if (children.length === 1) {
15099
- const child = children[0];
15100
- if (isSingleElementRoot(root, child) && child.codegenNode) {
15101
- const codegenNode = child.codegenNode;
15272
+ const singleElementRootChild = getSingleElementRoot(root);
15273
+ if (singleElementRootChild && singleElementRootChild.codegenNode) {
15274
+ const codegenNode = singleElementRootChild.codegenNode;
15102
15275
  if (codegenNode.type === 13) {
15103
15276
  convertToBlock(codegenNode, context);
15104
15277
  }
15105
15278
  root.codegenNode = codegenNode;
15106
15279
  } else {
15107
- root.codegenNode = child;
15280
+ root.codegenNode = children[0];
15108
15281
  }
15109
15282
  } else if (children.length > 1) {
15110
15283
  let patchFlag = 64;
@@ -15856,7 +16029,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
15856
16029
  }
15857
16030
 
15858
16031
  const transformIf = createStructuralDirectiveTransform(
15859
- /^(if|else|else-if)$/,
16032
+ /^(?:if|else|else-if)$/,
15860
16033
  (node, dir, context) => {
15861
16034
  return processIf(node, dir, context, (ifNode, branch, isRoot) => {
15862
16035
  const siblings = context.parent.children;
@@ -15925,7 +16098,7 @@ function processIf(node, dir, context, processCodegen) {
15925
16098
  continue;
15926
16099
  }
15927
16100
  if (sibling && sibling.type === 9) {
15928
- if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
16101
+ if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
15929
16102
  context.onError(
15930
16103
  createCompilerError(30, node.loc)
15931
16104
  );
@@ -16074,80 +16247,6 @@ function getParentCondition(node) {
16074
16247
  }
16075
16248
  }
16076
16249
 
16077
- const transformBind = (dir, _node, context) => {
16078
- const { modifiers, loc } = dir;
16079
- const arg = dir.arg;
16080
- let { exp } = dir;
16081
- if (exp && exp.type === 4 && !exp.content.trim()) {
16082
- {
16083
- exp = void 0;
16084
- }
16085
- }
16086
- if (!exp) {
16087
- if (arg.type !== 4 || !arg.isStatic) {
16088
- context.onError(
16089
- createCompilerError(
16090
- 52,
16091
- arg.loc
16092
- )
16093
- );
16094
- return {
16095
- props: [
16096
- createObjectProperty(arg, createSimpleExpression("", true, loc))
16097
- ]
16098
- };
16099
- }
16100
- transformBindShorthand(dir);
16101
- exp = dir.exp;
16102
- }
16103
- if (arg.type !== 4) {
16104
- arg.children.unshift(`(`);
16105
- arg.children.push(`) || ""`);
16106
- } else if (!arg.isStatic) {
16107
- arg.content = `${arg.content} || ""`;
16108
- }
16109
- if (modifiers.some((mod) => mod.content === "camel")) {
16110
- if (arg.type === 4) {
16111
- if (arg.isStatic) {
16112
- arg.content = camelize(arg.content);
16113
- } else {
16114
- arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
16115
- }
16116
- } else {
16117
- arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
16118
- arg.children.push(`)`);
16119
- }
16120
- }
16121
- if (!context.inSSR) {
16122
- if (modifiers.some((mod) => mod.content === "prop")) {
16123
- injectPrefix(arg, ".");
16124
- }
16125
- if (modifiers.some((mod) => mod.content === "attr")) {
16126
- injectPrefix(arg, "^");
16127
- }
16128
- }
16129
- return {
16130
- props: [createObjectProperty(arg, exp)]
16131
- };
16132
- };
16133
- const transformBindShorthand = (dir, context) => {
16134
- const arg = dir.arg;
16135
- const propName = camelize(arg.content);
16136
- dir.exp = createSimpleExpression(propName, false, arg.loc);
16137
- };
16138
- const injectPrefix = (arg, prefix) => {
16139
- if (arg.type === 4) {
16140
- if (arg.isStatic) {
16141
- arg.content = prefix + arg.content;
16142
- } else {
16143
- arg.content = `\`${prefix}\${${arg.content}}\``;
16144
- }
16145
- } else {
16146
- arg.children.unshift(`'${prefix}' + (`);
16147
- arg.children.push(`)`);
16148
- }
16149
- };
16150
-
16151
16250
  const transformFor = createStructuralDirectiveTransform(
16152
16251
  "for",
16153
16252
  (node, dir, context) => {
@@ -16159,10 +16258,7 @@ const transformFor = createStructuralDirectiveTransform(
16159
16258
  const isTemplate = isTemplateNode(node);
16160
16259
  const memo = findDir(node, "memo");
16161
16260
  const keyProp = findProp(node, `key`, false, true);
16162
- const isDirKey = keyProp && keyProp.type === 7;
16163
- if (isDirKey && !keyProp.exp) {
16164
- transformBindShorthand(keyProp);
16165
- }
16261
+ keyProp && keyProp.type === 7;
16166
16262
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
16167
16263
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
16168
16264
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
@@ -16443,7 +16539,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
16443
16539
  );
16444
16540
  } else if (vElse = findDir(
16445
16541
  slotElement,
16446
- /^else(-if)?$/,
16542
+ /^else(?:-if)?$/,
16447
16543
  true
16448
16544
  /* allowEmpty */
16449
16545
  )) {
@@ -16451,11 +16547,11 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
16451
16547
  let prev;
16452
16548
  while (j--) {
16453
16549
  prev = children[j];
16454
- if (prev.type !== 3) {
16550
+ if (prev.type !== 3 && isNonWhitespaceContent(prev)) {
16455
16551
  break;
16456
16552
  }
16457
16553
  }
16458
- if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
16554
+ if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) {
16459
16555
  let conditional = dynamicSlots[dynamicSlots.length - 1];
16460
16556
  while (conditional.alternate.type === 19) {
16461
16557
  conditional = conditional.alternate;
@@ -17272,6 +17368,58 @@ const transformOn$1 = (dir, node, context, augmentor) => {
17272
17368
  return ret;
17273
17369
  };
17274
17370
 
17371
+ const transformBind = (dir, _node, context) => {
17372
+ const { modifiers, loc } = dir;
17373
+ const arg = dir.arg;
17374
+ let { exp } = dir;
17375
+ if (exp && exp.type === 4 && !exp.content.trim()) {
17376
+ {
17377
+ exp = void 0;
17378
+ }
17379
+ }
17380
+ if (arg.type !== 4) {
17381
+ arg.children.unshift(`(`);
17382
+ arg.children.push(`) || ""`);
17383
+ } else if (!arg.isStatic) {
17384
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
17385
+ }
17386
+ if (modifiers.some((mod) => mod.content === "camel")) {
17387
+ if (arg.type === 4) {
17388
+ if (arg.isStatic) {
17389
+ arg.content = camelize(arg.content);
17390
+ } else {
17391
+ arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
17392
+ }
17393
+ } else {
17394
+ arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
17395
+ arg.children.push(`)`);
17396
+ }
17397
+ }
17398
+ if (!context.inSSR) {
17399
+ if (modifiers.some((mod) => mod.content === "prop")) {
17400
+ injectPrefix(arg, ".");
17401
+ }
17402
+ if (modifiers.some((mod) => mod.content === "attr")) {
17403
+ injectPrefix(arg, "^");
17404
+ }
17405
+ }
17406
+ return {
17407
+ props: [createObjectProperty(arg, exp)]
17408
+ };
17409
+ };
17410
+ const injectPrefix = (arg, prefix) => {
17411
+ if (arg.type === 4) {
17412
+ if (arg.isStatic) {
17413
+ arg.content = prefix + arg.content;
17414
+ } else {
17415
+ arg.content = `\`${prefix}\${${arg.content}}\``;
17416
+ }
17417
+ } else {
17418
+ arg.children.unshift(`'${prefix}' + (`);
17419
+ arg.children.push(`)`);
17420
+ }
17421
+ };
17422
+
17275
17423
  const transformText = (node, context) => {
17276
17424
  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
17277
17425
  return () => {
@@ -17383,8 +17531,7 @@ const transformModel$1 = (dir, node, context) => {
17383
17531
  context.onError(createCompilerError(44, exp.loc));
17384
17532
  return createTransformProps();
17385
17533
  }
17386
- const maybeRef = false;
17387
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
17534
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
17388
17535
  context.onError(
17389
17536
  createCompilerError(42, exp.loc)
17390
17537
  );
@@ -17432,7 +17579,7 @@ const seen = /* @__PURE__ */ new WeakSet();
17432
17579
  const transformMemo = (node, context) => {
17433
17580
  if (node.type === 1) {
17434
17581
  const dir = findDir(node, "memo");
17435
- if (!dir || seen.has(node)) {
17582
+ if (!dir || seen.has(node) || context.inSSR) {
17436
17583
  return;
17437
17584
  }
17438
17585
  seen.add(node);
@@ -17454,9 +17601,35 @@ const transformMemo = (node, context) => {
17454
17601
  }
17455
17602
  };
17456
17603
 
17604
+ const transformVBindShorthand = (node, context) => {
17605
+ if (node.type === 1) {
17606
+ for (const prop of node.props) {
17607
+ if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
17608
+ const arg = prop.arg;
17609
+ if (arg.type !== 4 || !arg.isStatic) {
17610
+ context.onError(
17611
+ createCompilerError(
17612
+ 52,
17613
+ arg.loc
17614
+ )
17615
+ );
17616
+ prop.exp = createSimpleExpression("", true, arg.loc);
17617
+ } else {
17618
+ const propName = camelize(arg.content);
17619
+ if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
17620
+ propName[0] === "-") {
17621
+ prop.exp = createSimpleExpression(propName, false, arg.loc);
17622
+ }
17623
+ }
17624
+ }
17625
+ }
17626
+ }
17627
+ };
17628
+
17457
17629
  function getBaseTransformPreset(prefixIdentifiers) {
17458
17630
  return [
17459
17631
  [
17632
+ transformVBindShorthand,
17460
17633
  transformOnce,
17461
17634
  transformIf,
17462
17635
  transformMemo,
@@ -17953,6 +18126,9 @@ const ignoreSideEffectTags = (node, context) => {
17953
18126
  };
17954
18127
 
17955
18128
  function isValidHTMLNesting(parent, child) {
18129
+ if (parent === "template") {
18130
+ return true;
18131
+ }
17956
18132
  if (parent in onlyValidChildren) {
17957
18133
  return onlyValidChildren[parent].has(child);
17958
18134
  }