@vue/runtime-dom 3.6.0-beta.7 → 3.6.0-beta.8

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-beta.7
2
+ * @vue/runtime-dom v3.6.0-beta.8
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -17,7 +17,6 @@ function makeMap(str) {
17
17
  for (const key of str.split(",")) map[key] = 1;
18
18
  return (val) => val in map;
19
19
  }
20
-
21
20
  //#endregion
22
21
  //#region packages/shared/src/general.ts
23
22
  const EMPTY_OBJ = Object.freeze({});
@@ -132,12 +131,7 @@ const getGlobalThis = () => {
132
131
  function canSetValueDirectly(tagName) {
133
132
  return tagName !== "PROGRESS" && !tagName.includes("-");
134
133
  }
135
-
136
- //#endregion
137
- //#region packages/shared/src/globalsAllowList.ts
138
- const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
139
- const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
140
-
134
+ const isGloballyAllowed = /* @__PURE__ */ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
141
135
  //#endregion
142
136
  //#region packages/shared/src/normalizeProp.ts
143
137
  function normalizeStyle(value) {
@@ -196,7 +190,6 @@ function normalizeProps(props) {
196
190
  if (style) props.style = normalizeStyle(style);
197
191
  return props;
198
192
  }
199
-
200
193
  //#endregion
201
194
  //#region packages/shared/src/domTagConfig.ts
202
195
  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
@@ -217,7 +210,6 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
217
210
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
218
211
  */
219
212
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
220
-
221
213
  //#endregion
222
214
  //#region packages/shared/src/domAttrConfig.ts
223
215
  /**
@@ -272,14 +264,12 @@ function shouldSetAsAttr(tagName, key) {
272
264
  if (key === "sandbox" && tagName === "IFRAME") return true;
273
265
  return false;
274
266
  }
275
-
276
267
  //#endregion
277
268
  //#region packages/shared/src/escapeHtml.ts
278
269
  const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
279
270
  function getEscapedCssVarName(key, doubleEscape) {
280
271
  return key.replace(cssVarNameEscapeSymbolsRE, (s) => doubleEscape ? s === "\"" ? "\\\\\\\"" : `\\\\${s}` : `\\${s}`);
281
272
  }
282
-
283
273
  //#endregion
284
274
  //#region packages/shared/src/looseEqual.ts
285
275
  function looseCompareArrays(a, b) {
@@ -315,7 +305,6 @@ function looseEqual(a, b) {
315
305
  function looseIndexOf(arr, val) {
316
306
  return arr.findIndex((item) => looseEqual(item, val));
317
307
  }
318
-
319
308
  //#endregion
320
309
  //#region packages/shared/src/toDisplayString.ts
321
310
  const isRef$1 = (val) => {
@@ -350,7 +339,6 @@ const stringifySymbol = (v, i = "") => {
350
339
  var _description;
351
340
  return isSymbol(v) ? `Symbol(${(_description = v.description) !== null && _description !== void 0 ? _description : i})` : v;
352
341
  };
353
-
354
342
  //#endregion
355
343
  //#region packages/shared/src/subSequence.ts
356
344
  function getSequence(arr) {
@@ -388,7 +376,6 @@ function getSequence(arr) {
388
376
  }
389
377
  return result;
390
378
  }
391
-
392
379
  //#endregion
393
380
  //#region packages/shared/src/cssVars.ts
394
381
  /**
@@ -401,7 +388,6 @@ function normalizeCssVarValue(value) {
401
388
  if (typeof value !== "number" || !Number.isFinite(value)) console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:", value);
402
389
  return String(value);
403
390
  }
404
-
405
391
  //#endregion
406
392
  //#region packages/reactivity/src/debug.ts
407
393
  const triggerEventInfos = [];
@@ -437,31 +423,11 @@ function setupFlagsHandler(target) {
437
423
  }
438
424
  });
439
425
  }
440
-
441
426
  //#endregion
442
427
  //#region packages/reactivity/src/warning.ts
443
428
  function warn$2(msg, ...args) {
444
429
  console.warn(`[Vue warn] ${msg}`, ...args);
445
430
  }
446
-
447
- //#endregion
448
- //#region packages/reactivity/src/system.ts
449
- const ReactiveFlags = {
450
- "None": 0,
451
- "0": "None",
452
- "Mutable": 1,
453
- "1": "Mutable",
454
- "Watching": 2,
455
- "2": "Watching",
456
- "RecursedCheck": 4,
457
- "4": "RecursedCheck",
458
- "Recursed": 8,
459
- "8": "Recursed",
460
- "Dirty": 16,
461
- "16": "Dirty",
462
- "Pending": 32,
463
- "32": "Pending"
464
- };
465
431
  const notifyBuffer = [];
466
432
  let batchDepth = 0;
467
433
  let activeSub = void 0;
@@ -669,7 +635,6 @@ function isValidLink(checkLink, sub) {
669
635
  }
670
636
  return false;
671
637
  }
672
-
673
638
  //#endregion
674
639
  //#region packages/reactivity/src/dep.ts
675
640
  var Dep = class {
@@ -780,7 +745,6 @@ function getDepFromReactive(object, key) {
780
745
  const depMap = targetMap.get(object);
781
746
  return depMap && depMap.get(key);
782
747
  }
783
-
784
748
  //#endregion
785
749
  //#region packages/reactivity/src/arrayInstrumentations.ts
786
750
  /**
@@ -928,16 +892,25 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
928
892
  }
929
893
  function reduce(self, method, fn, args) {
930
894
  const arr = shallowReadArray(self);
895
+ const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
931
896
  let wrappedFn = fn;
897
+ let wrapInitialAccumulator = false;
932
898
  if (arr !== self) {
933
- if (!/* @__PURE__ */ isShallow(self)) wrappedFn = function(acc, item, index) {
934
- return fn.call(this, acc, toWrapped(self, item), index, self);
935
- };
936
- else if (fn.length > 3) wrappedFn = function(acc, item, index) {
899
+ if (needsWrap) {
900
+ wrapInitialAccumulator = args.length === 0;
901
+ wrappedFn = function(acc, item, index) {
902
+ if (wrapInitialAccumulator) {
903
+ wrapInitialAccumulator = false;
904
+ acc = toWrapped(self, acc);
905
+ }
906
+ return fn.call(this, acc, toWrapped(self, item), index, self);
907
+ };
908
+ } else if (fn.length > 3) wrappedFn = function(acc, item, index) {
937
909
  return fn.call(this, acc, item, index, self);
938
910
  };
939
911
  }
940
- return arr[method](wrappedFn, ...args);
912
+ const result = arr[method](wrappedFn, ...args);
913
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
941
914
  }
942
915
  function searchProxy(self, method, args) {
943
916
  const arr = /* @__PURE__ */ toRaw(self);
@@ -957,7 +930,6 @@ function noTracking(self, method, args = []) {
957
930
  endBatch();
958
931
  return res;
959
932
  }
960
-
961
933
  //#endregion
962
934
  //#region packages/reactivity/src/baseHandlers.ts
963
935
  const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
@@ -1066,7 +1038,6 @@ const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1066
1038
  const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1067
1039
  const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
1068
1040
  const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1069
-
1070
1041
  //#endregion
1071
1042
  //#region packages/reactivity/src/collectionHandlers.ts
1072
1043
  const toShallow = (value) => value;
@@ -1151,11 +1122,13 @@ function createInstrumentations(readonly, shallow) {
1151
1122
  clear: createReadonlyMethod("clear")
1152
1123
  } : {
1153
1124
  add(value) {
1154
- if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
1155
1125
  const target = /* @__PURE__ */ toRaw(this);
1156
- if (!getProto(target).has.call(target, value)) {
1157
- target.add(value);
1158
- trigger(target, "add", value, value);
1126
+ const proto = getProto(target);
1127
+ const rawValue = /* @__PURE__ */ toRaw(value);
1128
+ const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
1129
+ if (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {
1130
+ target.add(valueToAdd);
1131
+ trigger(target, "add", valueToAdd, valueToAdd);
1159
1132
  }
1160
1133
  return this;
1161
1134
  },
@@ -1226,7 +1199,6 @@ function checkIdentityKeys(target, has, key) {
1226
1199
  warn$2(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
1227
1200
  }
1228
1201
  }
1229
-
1230
1202
  //#endregion
1231
1203
  //#region packages/reactivity/src/reactive.ts
1232
1204
  const reactiveMap = /* @__PURE__ */ new WeakMap();
@@ -1490,7 +1462,6 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
1490
1462
  * @param value - The value for which a readonly proxy shall be created.
1491
1463
  */
1492
1464
  const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1493
-
1494
1465
  //#endregion
1495
1466
  //#region packages/reactivity/src/ref.ts
1496
1467
  /* @__NO_SIDE_EFFECTS__ */
@@ -1559,7 +1530,7 @@ var RefImpl = class {
1559
1530
  }
1560
1531
  }
1561
1532
  update() {
1562
- this.flags &= ~16;
1533
+ this.flags &= -17;
1563
1534
  return hasChanged(this._oldValue, this._oldValue = this._rawValue);
1564
1535
  }
1565
1536
  };
@@ -1765,7 +1736,6 @@ function toRef(source, key, defaultValue) {
1765
1736
  function propertyToRef(source, key, defaultValue) {
1766
1737
  return new ObjectRefImpl(source, key, defaultValue);
1767
1738
  }
1768
-
1769
1739
  //#endregion
1770
1740
  //#region packages/reactivity/src/effect.ts
1771
1741
  var ReactiveEffect = class {
@@ -1874,7 +1844,6 @@ function cleanup(sub) {
1874
1844
  sub.cleanupsLength = 0;
1875
1845
  }
1876
1846
  }
1877
-
1878
1847
  //#endregion
1879
1848
  //#region packages/reactivity/src/effectScope.ts
1880
1849
  let activeEffectScope;
@@ -1983,7 +1952,6 @@ function onScopeDispose(fn, failSilently = false) {
1983
1952
  if (activeEffectScope !== void 0) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
1984
1953
  else if (!failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
1985
1954
  }
1986
-
1987
1955
  //#endregion
1988
1956
  //#region packages/reactivity/src/computed.ts
1989
1957
  /**
@@ -2007,7 +1975,7 @@ var ComputedRefImpl = class {
2007
1975
  if (flags & 32) if (checkDirty(this.deps, this)) {
2008
1976
  this.flags = flags | 16;
2009
1977
  return true;
2010
- } else this.flags = flags & ~32;
1978
+ } else this.flags = flags & -33;
2011
1979
  return false;
2012
1980
  }
2013
1981
  /**
@@ -2016,7 +1984,7 @@ var ComputedRefImpl = class {
2016
1984
  */
2017
1985
  set _dirty(v) {
2018
1986
  if (v) this.flags |= 16;
2019
- else this.flags &= ~(16 | 32);
1987
+ else this.flags &= -49;
2020
1988
  }
2021
1989
  constructor(fn, setter) {
2022
1990
  this.fn = fn;
@@ -2026,7 +1994,7 @@ var ComputedRefImpl = class {
2026
1994
  this.subsTail = void 0;
2027
1995
  this.deps = void 0;
2028
1996
  this.depsTail = void 0;
2029
- this.flags = 1 | 16;
1997
+ this.flags = 17;
2030
1998
  this.__v_isRef = true;
2031
1999
  this["__v_isReadonly"] = !setter;
2032
2000
  }
@@ -2037,7 +2005,7 @@ var ComputedRefImpl = class {
2037
2005
  const subs = this.subs;
2038
2006
  if (subs !== void 0) shallowPropagate(subs);
2039
2007
  }
2040
- } else if (flags & 32) this.flags = flags & ~32;
2008
+ } else if (flags & 32) this.flags = flags & -33;
2041
2009
  if (activeSub !== void 0) {
2042
2010
  onTrack(activeSub, {
2043
2011
  target: this,
@@ -2084,7 +2052,6 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2084
2052
  }
2085
2053
  return cRef;
2086
2054
  }
2087
-
2088
2055
  //#endregion
2089
2056
  //#region packages/reactivity/src/constants.ts
2090
2057
  const TrackOpTypes = {
@@ -2098,7 +2065,6 @@ const TriggerOpTypes = {
2098
2065
  "DELETE": "delete",
2099
2066
  "CLEAR": "clear"
2100
2067
  };
2101
-
2102
2068
  //#endregion
2103
2069
  //#region packages/reactivity/src/watch.ts
2104
2070
  const INITIAL_WATCHER_VALUE = {};
@@ -2241,7 +2207,6 @@ function traverse(value, depth = Infinity, seen) {
2241
2207
  }
2242
2208
  return value;
2243
2209
  }
2244
-
2245
2210
  //#endregion
2246
2211
  //#region packages/runtime-core/src/warning.ts
2247
2212
  const stack = [];
@@ -2268,8 +2233,8 @@ function warn$1(msg, ...args) {
2268
2233
  const trace = getComponentTrace();
2269
2234
  if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
2270
2235
  msg + args.map((a) => {
2271
- var _a$toString, _a$toString2;
2272
- return (_a$toString = (_a$toString2 = a.toString) === null || _a$toString2 === void 0 ? void 0 : _a$toString2.call(a)) !== null && _a$toString !== void 0 ? _a$toString : JSON.stringify(a);
2236
+ const toString = a.toString;
2237
+ return toString == null ? JSON.stringify(a) : toString.call(a);
2273
2238
  }).join(""),
2274
2239
  instance && instance.proxy || instance,
2275
2240
  trace.map(({ ctx }) => `at <${formatComponentName(instance, ctx.type)}>`).join("\n"),
@@ -2359,7 +2324,6 @@ function assertNumber(val, type) {
2359
2324
  else if (isNaN(val)) warn$1(`${type} is NaN - the duration expression might be incorrect.`);
2360
2325
  }
2361
2326
  /* v8 ignore stop */
2362
-
2363
2327
  //#endregion
2364
2328
  //#region packages/runtime-core/src/errorHandling.ts
2365
2329
  const ErrorCodes = {
@@ -2482,7 +2446,6 @@ function logError(err, type, instance, throwInDev = true, throwInProd = false) {
2482
2446
  else console.error(err);
2483
2447
  }
2484
2448
  }
2485
-
2486
2449
  //#endregion
2487
2450
  //#region packages/runtime-core/src/scheduler.ts
2488
2451
  const jobs = [];
@@ -2635,7 +2598,6 @@ function checkRecursiveUpdates(seen, fn) {
2635
2598
  seen.set(fn, count + 1);
2636
2599
  return false;
2637
2600
  }
2638
-
2639
2601
  //#endregion
2640
2602
  //#region packages/runtime-core/src/hmr.ts
2641
2603
  let isHmrUpdating = false;
@@ -2757,7 +2719,6 @@ function tryWrap(fn) {
2757
2719
  }
2758
2720
  };
2759
2721
  }
2760
-
2761
2722
  //#endregion
2762
2723
  //#region packages/runtime-core/src/devtools.ts
2763
2724
  let devtools$1;
@@ -2826,7 +2787,6 @@ function createDevtoolsPerformanceHook(hook) {
2826
2787
  function devtoolsComponentEmit(component, event, params) {
2827
2788
  emit$1("component:emit", component.appContext.app, component, event, params);
2828
2789
  }
2829
-
2830
2790
  //#endregion
2831
2791
  //#region packages/runtime-core/src/componentRenderContext.ts
2832
2792
  /**
@@ -2896,7 +2856,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
2896
2856
  renderFnWithContext._d = true;
2897
2857
  return renderFnWithContext;
2898
2858
  }
2899
-
2900
2859
  //#endregion
2901
2860
  //#region packages/runtime-core/src/directives.ts
2902
2861
  function validateDirectiveName(name) {
@@ -2951,7 +2910,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2951
2910
  }
2952
2911
  }
2953
2912
  }
2954
-
2955
2913
  //#endregion
2956
2914
  //#region packages/runtime-core/src/apiInject.ts
2957
2915
  function provide(key, value) {
@@ -2980,7 +2938,6 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
2980
2938
  function hasInjectionContext() {
2981
2939
  return !!(getCurrentGenericInstance() || currentApp);
2982
2940
  }
2983
-
2984
2941
  //#endregion
2985
2942
  //#region packages/runtime-core/src/helpers/useSsrContext.ts
2986
2943
  const ssrContextKey = Symbol.for("v-scx");
@@ -2991,7 +2948,6 @@ const useSSRContext = () => {
2991
2948
  return ctx;
2992
2949
  }
2993
2950
  };
2994
-
2995
2951
  //#endregion
2996
2952
  //#region packages/runtime-core/src/apiWatch.ts
2997
2953
  function watchEffect(effect, options) {
@@ -3074,7 +3030,6 @@ function createPathGetter(ctx, path) {
3074
3030
  return cur;
3075
3031
  };
3076
3032
  }
3077
-
3078
3033
  //#endregion
3079
3034
  //#region packages/runtime-core/src/components/Teleport.ts
3080
3035
  const TeleportEndKey = Symbol("_vte");
@@ -3272,7 +3227,6 @@ function prepareAnchor(target, vnode, createText, insert, anchor = null) {
3272
3227
  }
3273
3228
  return targetAnchor;
3274
3229
  }
3275
-
3276
3230
  //#endregion
3277
3231
  //#region packages/runtime-core/src/components/BaseTransition.ts
3278
3232
  const leaveCbKey = Symbol("_leaveCb");
@@ -3535,14 +3489,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
3535
3489
  function checkTransitionMode(mode) {
3536
3490
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
3537
3491
  }
3538
-
3539
3492
  //#endregion
3540
3493
  //#region packages/runtime-core/src/apiDefineComponent.ts
3541
3494
  /* @__NO_SIDE_EFFECTS__ */
3542
3495
  function defineComponent(options, extraOptions) {
3543
3496
  return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
3544
3497
  }
3545
-
3546
3498
  //#endregion
3547
3499
  //#region packages/runtime-core/src/helpers/useId.ts
3548
3500
  function useId() {
@@ -3564,7 +3516,6 @@ function markAsyncBoundary(instance) {
3564
3516
  0
3565
3517
  ];
3566
3518
  }
3567
-
3568
3519
  //#endregion
3569
3520
  //#region packages/runtime-core/src/helpers/useTemplateRef.ts
3570
3521
  const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
@@ -3588,7 +3539,6 @@ function isTemplateRefKey(refs, key) {
3588
3539
  let desc;
3589
3540
  return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
3590
3541
  }
3591
-
3592
3542
  //#endregion
3593
3543
  //#region packages/runtime-core/src/rendererTemplateRef.ts
3594
3544
  const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
@@ -3687,20 +3637,12 @@ function invalidatePendingSetRef(rawRef) {
3687
3637
  pendingSetRefMap.delete(rawRef);
3688
3638
  }
3689
3639
  }
3690
-
3691
3640
  //#endregion
3692
3641
  //#region packages/runtime-core/src/hydration.ts
3693
3642
  let isHydratingEnabled = false;
3694
3643
  function setIsHydratingEnabled(value) {
3695
3644
  isHydratingEnabled = value;
3696
3645
  }
3697
- /**
3698
- * VDOM hydration state.
3699
- * Also used by vapor interop plugin for tree-shaking:
3700
- * In non-hydration builds, this is never set to true, so the logic in
3701
- * vaporInteropImpl's hydrate/hydrateSlot can be tree-shaken.
3702
- */
3703
- let isHydrating = false;
3704
3646
  let hasLoggedMismatchError = false;
3705
3647
  const logMismatchError = () => {
3706
3648
  if (hasLoggedMismatchError) return;
@@ -3726,9 +3668,7 @@ function createHydrationFunctions(rendererInternals) {
3726
3668
  container._vnode = vnode;
3727
3669
  return;
3728
3670
  }
3729
- isHydrating = true;
3730
3671
  hydrateNode(container.firstChild, vnode, null, null, null);
3731
- isHydrating = false;
3732
3672
  flushPostFlushCbs();
3733
3673
  container._vnode = vnode;
3734
3674
  };
@@ -4097,7 +4037,6 @@ function isMismatchAllowed(el, allowedType) {
4097
4037
  return list.includes(MismatchTypeString[allowedType]);
4098
4038
  }
4099
4039
  }
4100
-
4101
4040
  //#endregion
4102
4041
  //#region packages/runtime-core/src/hydrationStrategies.ts
4103
4042
  let requestIdleCallback;
@@ -4186,7 +4125,6 @@ function forEachElement(node, cb) {
4186
4125
  }
4187
4126
  } else cb(node);
4188
4127
  }
4189
-
4190
4128
  //#endregion
4191
4129
  //#region packages/runtime-core/src/apiAsyncComponent.ts
4192
4130
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -4323,11 +4261,10 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
4323
4261
  if (getResolvedComp()) doHydrate();
4324
4262
  else load().then(() => !instance.isUnmounted && doHydrate());
4325
4263
  }
4326
-
4327
4264
  //#endregion
4328
4265
  //#region packages/runtime-core/src/components/KeepAlive.ts
4329
4266
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
4330
- const KeepAliveImpl = {
4267
+ const KeepAlive = {
4331
4268
  name: `KeepAlive`,
4332
4269
  __isKeepAlive: true,
4333
4270
  props: {
@@ -4461,7 +4398,6 @@ const KeepAliveImpl = {
4461
4398
  };
4462
4399
  }
4463
4400
  };
4464
- const KeepAlive = KeepAliveImpl;
4465
4401
  function matches(pattern, name) {
4466
4402
  if (isArray(pattern)) return pattern.some((p) => matches(p, name));
4467
4403
  else if (isString(pattern)) return pattern.split(",").includes(name);
@@ -4541,7 +4477,6 @@ function deactivate(vnode, container, { m: move }, parentComponent, parentSuspen
4541
4477
  }, void 0, parentSuspense);
4542
4478
  devtoolsComponentAdded(instance);
4543
4479
  }
4544
-
4545
4480
  //#endregion
4546
4481
  //#region packages/runtime-core/src/apiLifecycle.ts
4547
4482
  function injectHook(type, hook, target = currentInstance, prepend = false) {
@@ -4577,23 +4512,19 @@ const onRenderTracked = /* @__PURE__ */ createHook("rtc");
4577
4512
  function onErrorCaptured(hook, target = currentInstance) {
4578
4513
  injectHook("ec", hook, target);
4579
4514
  }
4580
-
4581
- //#endregion
4582
- //#region packages/runtime-core/src/helpers/resolveAssets.ts
4583
- const COMPONENTS = "components";
4584
4515
  const DIRECTIVES = "directives";
4585
4516
  /**
4586
4517
  * @private
4587
4518
  */
4588
4519
  function resolveComponent(name, maybeSelfReference) {
4589
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4520
+ return resolveAsset("components", name, true, maybeSelfReference) || name;
4590
4521
  }
4591
4522
  const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4592
4523
  /**
4593
4524
  * @private
4594
4525
  */
4595
4526
  function resolveDynamicComponent(component) {
4596
- if (isString(component)) return resolveAsset(COMPONENTS, component, false) || component;
4527
+ if (isString(component)) return resolveAsset("components", component, false) || component;
4597
4528
  else return component || NULL_DYNAMIC_COMPONENT;
4598
4529
  }
4599
4530
  /**
@@ -4606,14 +4537,14 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
4606
4537
  const instance = currentRenderingInstance || currentInstance;
4607
4538
  if (instance) {
4608
4539
  const Component = instance.type;
4609
- if (type === COMPONENTS) {
4540
+ if (type === "components") {
4610
4541
  const selfName = getComponentName(Component, false);
4611
4542
  if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) return Component;
4612
4543
  }
4613
4544
  const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
4614
4545
  if (!res && maybeSelfReference) return Component;
4615
4546
  if (warnMissing && !res) {
4616
- const extra = type === COMPONENTS ? "\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement." : ``;
4547
+ const extra = type === "components" ? "\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement." : ``;
4617
4548
  warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4618
4549
  }
4619
4550
  return res;
@@ -4622,7 +4553,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
4622
4553
  function resolve(registry, name) {
4623
4554
  return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4624
4555
  }
4625
-
4626
4556
  //#endregion
4627
4557
  //#region packages/runtime-core/src/helpers/renderList.ts
4628
4558
  /**
@@ -4643,11 +4573,14 @@ function renderList(source, renderItem, cache, index) {
4643
4573
  }
4644
4574
  ret = new Array(source.length);
4645
4575
  for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
4646
- } else if (typeof source === "number") {
4647
- if (!Number.isInteger(source)) warn$1(`The v-for range expect an integer value but got ${source}.`);
4576
+ } else if (typeof source === "number") if (!Number.isInteger(source) || source < 0) {
4577
+ warn$1(`The v-for range expects a positive integer value but got ${source}.`);
4578
+ ret = [];
4579
+ } else {
4648
4580
  ret = new Array(source);
4649
4581
  for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
4650
- } else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
4582
+ }
4583
+ else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
4651
4584
  else {
4652
4585
  const keys = Object.keys(source);
4653
4586
  ret = new Array(keys.length);
@@ -4660,7 +4593,6 @@ function renderList(source, renderItem, cache, index) {
4660
4593
  if (cache) cache[index] = ret;
4661
4594
  return ret;
4662
4595
  }
4663
-
4664
4596
  //#endregion
4665
4597
  //#region packages/runtime-core/src/helpers/createSlots.ts
4666
4598
  /**
@@ -4679,7 +4611,6 @@ function createSlots(slots, dynamicSlots) {
4679
4611
  }
4680
4612
  return slots;
4681
4613
  }
4682
-
4683
4614
  //#endregion
4684
4615
  //#region packages/runtime-core/src/helpers/renderSlot.ts
4685
4616
  /**
@@ -4730,7 +4661,6 @@ function ensureVaporSlotFallback(vnodes, fallback) {
4730
4661
  if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
4731
4662
  }
4732
4663
  }
4733
-
4734
4664
  //#endregion
4735
4665
  //#region packages/runtime-core/src/helpers/toHandlers.ts
4736
4666
  /**
@@ -4746,7 +4676,6 @@ function toHandlers(obj, preserveCaseIfNecessary) {
4746
4676
  for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
4747
4677
  return ret;
4748
4678
  }
4749
-
4750
4679
  //#endregion
4751
4680
  //#region packages/runtime-core/src/componentPublicInstance.ts
4752
4681
  /**
@@ -4925,7 +4854,6 @@ function exposeSetupStateOnRenderContext(instance) {
4925
4854
  }
4926
4855
  });
4927
4856
  }
4928
-
4929
4857
  //#endregion
4930
4858
  //#region packages/runtime-core/src/apiSetupHelpers.ts
4931
4859
  const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`);
@@ -4964,6 +4892,22 @@ function defineExpose(exposed) {
4964
4892
  function defineOptions(options) {
4965
4893
  warnRuntimeUsage(`defineOptions`);
4966
4894
  }
4895
+ /**
4896
+ * Vue `<script setup>` compiler macro for providing type hints to IDEs for
4897
+ * slot name and slot props type checking.
4898
+ *
4899
+ * Example usage:
4900
+ * ```ts
4901
+ * const slots = defineSlots<{
4902
+ * default(props: { msg: string }): any
4903
+ * }>()
4904
+ * ```
4905
+ *
4906
+ * This is only usable inside `<script setup>`, is compiled away in the
4907
+ * output and should **not** be actually called at runtime.
4908
+ *
4909
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
4910
+ */
4967
4911
  function defineSlots() {
4968
4912
  warnRuntimeUsage(`defineSlots`);
4969
4913
  return null;
@@ -5080,21 +5024,29 @@ function createPropsRestProxy(props, excludedKeys) {
5080
5024
  */
5081
5025
  function withAsyncContext(getAwaitable) {
5082
5026
  const ctx = getCurrentGenericInstance();
5027
+ const inSSRSetup = isInSSRComponentSetup;
5083
5028
  if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
5084
5029
  let awaitable = getAwaitable();
5085
5030
  setCurrentInstance(null, void 0);
5086
- const cleanup = () => setCurrentInstance(null, void 0);
5087
- if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
5031
+ if (inSSRSetup) setInSSRSetupState(false);
5032
+ const restore = () => {
5088
5033
  setCurrentInstance(ctx);
5034
+ if (inSSRSetup) setInSSRSetupState(true);
5035
+ };
5036
+ const cleanup = () => {
5037
+ setCurrentInstance(null, void 0);
5038
+ if (inSSRSetup) setInSSRSetupState(false);
5039
+ };
5040
+ if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
5041
+ restore();
5089
5042
  Promise.resolve().then(() => Promise.resolve().then(cleanup));
5090
5043
  throw e;
5091
5044
  });
5092
5045
  return [awaitable, () => {
5093
- setCurrentInstance(ctx);
5046
+ restore();
5094
5047
  Promise.resolve().then(cleanup);
5095
5048
  }];
5096
5049
  }
5097
-
5098
5050
  //#endregion
5099
5051
  //#region packages/runtime-core/src/componentOptions.ts
5100
5052
  function createDuplicateChecker() {
@@ -5339,7 +5291,6 @@ function mergeWatchOptions(to, from) {
5339
5291
  for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
5340
5292
  return merged;
5341
5293
  }
5342
-
5343
5294
  //#endregion
5344
5295
  //#region packages/runtime-core/src/apiCreateApp.ts
5345
5296
  function createAppContext() {
@@ -5471,7 +5422,6 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
5471
5422
  * `app.runWithContext()`.
5472
5423
  */
5473
5424
  let currentApp = null;
5474
-
5475
5425
  //#endregion
5476
5426
  //#region packages/runtime-core/src/helpers/useModel.ts
5477
5427
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -5544,7 +5494,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
5544
5494
  const getModelModifiers = (props, modelName, getter) => {
5545
5495
  return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
5546
5496
  };
5547
-
5548
5497
  //#endregion
5549
5498
  //#region packages/runtime-core/src/componentEmits.ts
5550
5499
  function emit(instance, event, ...rawArgs) {
@@ -5634,7 +5583,6 @@ function isEmitListener(options, key) {
5634
5583
  key = key.slice(2).replace(/Once$/, "");
5635
5584
  return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
5636
5585
  }
5637
-
5638
5586
  //#endregion
5639
5587
  //#region packages/runtime-core/src/componentRenderUtils.ts
5640
5588
  /**
@@ -5826,7 +5774,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
5826
5774
  } else break;
5827
5775
  }
5828
5776
  }
5829
-
5830
5777
  //#endregion
5831
5778
  //#region packages/runtime-core/src/internalObject.ts
5832
5779
  /**
@@ -5838,7 +5785,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
5838
5785
  const internalObjectProto = {};
5839
5786
  const createInternalObject = () => Object.create(internalObjectProto);
5840
5787
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
5841
-
5842
5788
  //#endregion
5843
5789
  //#region packages/runtime-core/src/componentProps.ts
5844
5790
  function initProps(instance, rawProps, isStateful, isSSR = false) {
@@ -6134,7 +6080,6 @@ function isExplicable(type) {
6134
6080
  function isBoolean(...args) {
6135
6081
  return args.some((elem) => elem.toLowerCase() === "boolean");
6136
6082
  }
6137
-
6138
6083
  //#endregion
6139
6084
  //#region packages/runtime-core/src/componentSlots.ts
6140
6085
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -6203,7 +6148,6 @@ const updateSlots = (instance, children, optimized) => {
6203
6148
  for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
6204
6149
  }
6205
6150
  };
6206
-
6207
6151
  //#endregion
6208
6152
  //#region packages/runtime-core/src/profiling.ts
6209
6153
  let supported;
@@ -6242,7 +6186,6 @@ function isSupported() {
6242
6186
  } else supported = false;
6243
6187
  return supported;
6244
6188
  }
6245
-
6246
6189
  //#endregion
6247
6190
  //#region packages/runtime-core/src/renderer.ts
6248
6191
  const MoveType = {
@@ -6630,7 +6573,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6630
6573
  if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
6631
6574
  else hydrateSubTree();
6632
6575
  } else {
6633
- if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
6576
+ if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);
6634
6577
  startMeasure(instance, `render`);
6635
6578
  const subTree = instance.subTree = renderComponentRoot(instance);
6636
6579
  endMeasure(instance, `render`);
@@ -7144,12 +7087,11 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
7144
7087
  if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
7145
7088
  return null;
7146
7089
  }
7147
-
7148
7090
  //#endregion
7149
7091
  //#region packages/runtime-core/src/components/Suspense.ts
7150
7092
  const isSuspense = (type) => type.__isSuspense;
7151
7093
  let suspenseId = 0;
7152
- const SuspenseImpl = {
7094
+ const Suspense = {
7153
7095
  name: "Suspense",
7154
7096
  __isSuspense: true,
7155
7097
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -7167,7 +7109,6 @@ const SuspenseImpl = {
7167
7109
  hydrate: hydrateSuspense,
7168
7110
  normalize: normalizeSuspenseChildren
7169
7111
  };
7170
- const Suspense = SuspenseImpl;
7171
7112
  function triggerEvent(vnode, name) {
7172
7113
  const eventListener = vnode.props && vnode.props[name];
7173
7114
  if (isFunction(eventListener)) eventListener();
@@ -7428,7 +7369,6 @@ function isVNodeSuspensible(vnode) {
7428
7369
  const suspensible = vnode.props && vnode.props.suspensible;
7429
7370
  return suspensible != null && suspensible !== false;
7430
7371
  }
7431
-
7432
7372
  //#endregion
7433
7373
  //#region packages/runtime-core/src/vnode.ts
7434
7374
  const Fragment = Symbol.for("v-fgt");
@@ -7746,7 +7686,6 @@ function mergeProps(...args) {
7746
7686
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
7747
7687
  callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
7748
7688
  }
7749
-
7750
7689
  //#endregion
7751
7690
  //#region packages/runtime-core/src/componentCurrentInstance.ts
7752
7691
  /**
@@ -7763,8 +7702,7 @@ let setInSSRSetupState;
7763
7702
  /**
7764
7703
  * @internal
7765
7704
  */
7766
- let simpleSetCurrentInstance;
7767
- simpleSetCurrentInstance = (i) => {
7705
+ let simpleSetCurrentInstance = (i) => {
7768
7706
  currentInstance = i;
7769
7707
  };
7770
7708
  setInSSRSetupState = (v) => {
@@ -7806,7 +7744,6 @@ const useInstanceOption = (key, silent = false) => {
7806
7744
  value: instance[key]
7807
7745
  };
7808
7746
  };
7809
-
7810
7747
  //#endregion
7811
7748
  //#region packages/runtime-core/src/component.ts
7812
7749
  const emptyAppContext = /* @__PURE__ */ createAppContext();
@@ -8101,13 +8038,11 @@ function formatComponentName(instance, Component, isRoot = false) {
8101
8038
  function isClassComponent(value) {
8102
8039
  return isFunction(value) && "__vccOpts" in value;
8103
8040
  }
8104
-
8105
8041
  //#endregion
8106
8042
  //#region packages/runtime-core/src/apiComputed.ts
8107
8043
  const computed = (getterOrOptions, debugOptions) => {
8108
8044
  return /* @__PURE__ */ computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8109
8045
  };
8110
-
8111
8046
  //#endregion
8112
8047
  //#region packages/runtime-core/src/h.ts
8113
8048
  function h(type, propsOrChildren, children) {
@@ -8127,7 +8062,6 @@ function h(type, propsOrChildren, children) {
8127
8062
  setBlockTracking(1);
8128
8063
  }
8129
8064
  }
8130
-
8131
8065
  //#endregion
8132
8066
  //#region packages/runtime-core/src/customFormatter.ts
8133
8067
  function initCustomFormatter() {
@@ -8292,7 +8226,6 @@ function initCustomFormatter() {
8292
8226
  if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
8293
8227
  else window.devtoolsFormatters = [formatter];
8294
8228
  }
8295
-
8296
8229
  //#endregion
8297
8230
  //#region packages/runtime-core/src/helpers/withMemo.ts
8298
8231
  function withMemo(memo, render, cache, index) {
@@ -8310,10 +8243,9 @@ function isMemoSame(cached, memo) {
8310
8243
  if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
8311
8244
  return true;
8312
8245
  }
8313
-
8314
8246
  //#endregion
8315
8247
  //#region packages/runtime-core/src/index.ts
8316
- const version = "3.6.0-beta.7";
8248
+ const version = "3.6.0-beta.8";
8317
8249
  const warn = warn$1;
8318
8250
  /**
8319
8251
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -8336,7 +8268,6 @@ const resolveFilter = null;
8336
8268
  */
8337
8269
  const compatUtils = null;
8338
8270
  const DeprecationTypes = null;
8339
-
8340
8271
  //#endregion
8341
8272
  //#region packages/runtime-dom/src/nodeOps.ts
8342
8273
  let policy = void 0;
@@ -8397,7 +8328,6 @@ const nodeOps = {
8397
8328
  return [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];
8398
8329
  }
8399
8330
  };
8400
-
8401
8331
  //#endregion
8402
8332
  //#region packages/runtime-dom/src/components/Transition.ts
8403
8333
  const TRANSITION = "transition";
@@ -8636,7 +8566,6 @@ function toMs(s) {
8636
8566
  function forceReflow(el) {
8637
8567
  return (el ? el.ownerDocument : document).body.offsetHeight;
8638
8568
  }
8639
-
8640
8569
  //#endregion
8641
8570
  //#region packages/runtime-dom/src/modules/class.ts
8642
8571
  function patchClass(el, value, isSVG) {
@@ -8646,7 +8575,6 @@ function patchClass(el, value, isSVG) {
8646
8575
  else if (isSVG) el.setAttribute("class", value);
8647
8576
  else el.className = value;
8648
8577
  }
8649
-
8650
8578
  //#endregion
8651
8579
  //#region packages/runtime-dom/src/directives/vShow.ts
8652
8580
  const vShowOriginalDisplay = Symbol("_vod");
@@ -8680,7 +8608,6 @@ function setDisplay(el, value) {
8680
8608
  el.style.display = value ? el[vShowOriginalDisplay] : "none";
8681
8609
  el[vShowHidden] = !value;
8682
8610
  }
8683
-
8684
8611
  //#endregion
8685
8612
  //#region packages/runtime-dom/src/helpers/useCssVars.ts
8686
8613
  const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT");
@@ -8765,7 +8692,6 @@ function setVarsOnNode(el, vars) {
8765
8692
  style[CSS_VAR_TEXT] = cssText;
8766
8693
  }
8767
8694
  }
8768
-
8769
8695
  //#endregion
8770
8696
  //#region packages/runtime-dom/src/modules/style.ts
8771
8697
  const displayRE = /(?:^|;)\s*display\s*:/;
@@ -8830,7 +8756,6 @@ function autoPrefix(style, rawName) {
8830
8756
  }
8831
8757
  return rawName;
8832
8758
  }
8833
-
8834
8759
  //#endregion
8835
8760
  //#region packages/runtime-dom/src/modules/attrs.ts
8836
8761
  const xlinkNS = "http://www.w3.org/1999/xlink";
@@ -8840,7 +8765,6 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
8840
8765
  else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
8841
8766
  else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
8842
8767
  }
8843
-
8844
8768
  //#endregion
8845
8769
  //#region packages/runtime-dom/src/modules/props.ts
8846
8770
  function patchDOMProp(el, key, value, parentComponent, attrName) {
@@ -8876,7 +8800,6 @@ function patchDOMProp(el, key, value, parentComponent, attrName) {
8876
8800
  }
8877
8801
  needRemove && el.removeAttribute(attrName || key);
8878
8802
  }
8879
-
8880
8803
  //#endregion
8881
8804
  //#region packages/runtime-dom/src/modules/events.ts
8882
8805
  function addEventListener(el, event, handler, options) {
@@ -8940,7 +8863,6 @@ function patchStopImmediatePropagation(e, value) {
8940
8863
  return value.map((fn) => (e) => !e._stopped && fn && fn(e));
8941
8864
  } else return value;
8942
8865
  }
8943
-
8944
8866
  //#endregion
8945
8867
  //#region packages/runtime-dom/src/patchProp.ts
8946
8868
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -8952,7 +8874,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
8952
8874
  } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
8953
8875
  patchDOMProp(el, key, nextValue, parentComponent);
8954
8876
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
8955
- } else if (el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
8877
+ } else if (el._isVueCE && (shouldSetAsPropForVueCE(el, key) || el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
8956
8878
  else {
8957
8879
  if (key === "true-value") el._trueValue = nextValue;
8958
8880
  else if (key === "false-value") el._falseValue = nextValue;
@@ -8969,7 +8891,12 @@ function shouldSetAsProp(el, key, value, isSVG) {
8969
8891
  if (isNativeOn(key) && isString(value)) return false;
8970
8892
  return key in el;
8971
8893
  }
8972
-
8894
+ function shouldSetAsPropForVueCE(el, key) {
8895
+ const props = el._def.props;
8896
+ if (!props) return false;
8897
+ const camelKey = camelize(key);
8898
+ return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
8899
+ }
8973
8900
  //#endregion
8974
8901
  //#region packages/runtime-dom/src/apiCustomElement.ts
8975
8902
  const REMOVAL = {};
@@ -8999,6 +8926,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
8999
8926
  this._resolved = false;
9000
8927
  this._numberProps = null;
9001
8928
  this._styleChildren = /* @__PURE__ */ new WeakSet();
8929
+ this._styleAnchors = /* @__PURE__ */ new WeakMap();
9002
8930
  this._patching = false;
9003
8931
  this._dirty = false;
9004
8932
  this._ob = null;
@@ -9017,7 +8945,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
9017
8945
  if (!this.shadowRoot && !this._resolved) this._parseSlots();
9018
8946
  this._connected = true;
9019
8947
  let parent = this;
9020
- while (parent = parent && (parent.parentNode || parent.host)) if (parent instanceof VueElementBase) {
8948
+ while (parent = parent && (parent.assignedSlot || parent.parentNode || parent.host)) if (parent instanceof VueElementBase) {
9021
8949
  this._parent = parent;
9022
8950
  break;
9023
8951
  }
@@ -9110,6 +9038,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
9110
9038
  this._styles.forEach((s) => this._root.removeChild(s));
9111
9039
  this._styles.length = 0;
9112
9040
  }
9041
+ this._styleAnchors.delete(this._def);
9113
9042
  this._applyStyles(newStyles);
9114
9043
  if (!this._instance.vapor) this._instance = null;
9115
9044
  this._update();
@@ -9175,18 +9104,26 @@ var VueElementBase = class VueElementBase extends BaseClass {
9175
9104
  }
9176
9105
  }
9177
9106
  }
9178
- _applyStyles(styles, owner) {
9107
+ _applyStyles(styles, owner, parentComp) {
9179
9108
  if (!styles) return;
9180
9109
  if (owner) {
9181
9110
  if (owner === this._def || this._styleChildren.has(owner)) return;
9182
9111
  this._styleChildren.add(owner);
9183
9112
  }
9184
9113
  const nonce = this._nonce;
9114
+ const root = this.shadowRoot;
9115
+ const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
9116
+ let last = null;
9185
9117
  for (let i = styles.length - 1; i >= 0; i--) {
9186
9118
  const s = document.createElement("style");
9187
9119
  if (nonce) s.setAttribute("nonce", nonce);
9188
9120
  s.textContent = styles[i];
9189
- this.shadowRoot.prepend(s);
9121
+ root.insertBefore(s, last || insertionAnchor);
9122
+ last = s;
9123
+ if (i === 0) {
9124
+ if (!parentComp) this._styleAnchors.set(this._def, s);
9125
+ if (owner) this._styleAnchors.set(owner, s);
9126
+ }
9190
9127
  if (owner) {
9191
9128
  if (owner.__hmrId) {
9192
9129
  if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
@@ -9197,6 +9134,20 @@ var VueElementBase = class VueElementBase extends BaseClass {
9197
9134
  } else (this._styles || (this._styles = [])).push(s);
9198
9135
  }
9199
9136
  }
9137
+ _getStyleAnchor(comp) {
9138
+ if (!comp) return null;
9139
+ const anchor = this._styleAnchors.get(comp);
9140
+ if (anchor && anchor.parentNode === this.shadowRoot) return anchor;
9141
+ if (anchor) this._styleAnchors.delete(comp);
9142
+ return null;
9143
+ }
9144
+ _getRootStyleInsertionAnchor(root) {
9145
+ for (let i = 0; i < root.childNodes.length; i++) {
9146
+ const node = root.childNodes[i];
9147
+ if (!(node instanceof HTMLStyleElement)) return node;
9148
+ }
9149
+ return null;
9150
+ }
9200
9151
  /**
9201
9152
  * Only called when shadowRoot is false
9202
9153
  */
@@ -9259,8 +9210,8 @@ var VueElementBase = class VueElementBase extends BaseClass {
9259
9210
  /**
9260
9211
  * @internal
9261
9212
  */
9262
- _injectChildStyle(comp) {
9263
- this._applyStyles(comp.styles, comp);
9213
+ _injectChildStyle(comp, parentComp) {
9214
+ this._applyStyles(comp.styles, comp, parentComp);
9264
9215
  }
9265
9216
  /**
9266
9217
  * @internal
@@ -9287,6 +9238,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
9287
9238
  */
9288
9239
  _removeChildStyle(comp) {
9289
9240
  this._styleChildren.delete(comp);
9241
+ this._styleAnchors.delete(comp);
9290
9242
  if (this._childStyles && comp.__hmrId) {
9291
9243
  const oldStyles = this._childStyles.get(comp.__hmrId);
9292
9244
  if (oldStyles) {
@@ -9355,7 +9307,6 @@ function useShadowRoot() {
9355
9307
  const el = useHost("useShadowRoot");
9356
9308
  return el && el.shadowRoot;
9357
9309
  }
9358
-
9359
9310
  //#endregion
9360
9311
  //#region packages/runtime-dom/src/helpers/useCssModule.ts
9361
9312
  function useCssModule(name = "$style") {
@@ -9378,7 +9329,6 @@ function useCssModule(name = "$style") {
9378
9329
  return mod;
9379
9330
  }
9380
9331
  }
9381
-
9382
9332
  //#endregion
9383
9333
  //#region packages/runtime-dom/src/components/TransitionGroup.ts
9384
9334
  const positionMap = /* @__PURE__ */ new WeakMap();
@@ -9393,7 +9343,7 @@ const decorate = (t) => {
9393
9343
  delete t.props.mode;
9394
9344
  return t;
9395
9345
  };
9396
- const TransitionGroupImpl = /* @__PURE__ */ decorate({
9346
+ const TransitionGroup = /* @__PURE__ */ decorate({
9397
9347
  name: "TransitionGroup",
9398
9348
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
9399
9349
  tag: String,
@@ -9444,7 +9394,6 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
9444
9394
  };
9445
9395
  }
9446
9396
  });
9447
- const TransitionGroup = TransitionGroupImpl;
9448
9397
  function callPendingCbs(el) {
9449
9398
  if (el[moveCbKey]) el[moveCbKey]();
9450
9399
  if (el[enterCbKey]) el[enterCbKey]();
@@ -9510,7 +9459,6 @@ const handleMovedChildren = (el, moveClass) => {
9510
9459
  };
9511
9460
  el.addEventListener("transitionend", cb);
9512
9461
  };
9513
-
9514
9462
  //#endregion
9515
9463
  //#region packages/runtime-dom/src/directives/vModel.ts
9516
9464
  const getModelAssigner = (vnode) => {
@@ -9742,7 +9690,6 @@ function callModelHook(el, binding, vnode, prevVNode, hook) {
9742
9690
  const fn = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type)[hook];
9743
9691
  fn && fn(el, binding, vnode, prevVNode);
9744
9692
  }
9745
-
9746
9693
  //#endregion
9747
9694
  //#region packages/runtime-dom/src/directives/vOn.ts
9748
9695
  const systemModifiers = [
@@ -9800,7 +9747,6 @@ const withKeys = (fn, modifiers) => {
9800
9747
  if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);
9801
9748
  }));
9802
9749
  };
9803
-
9804
9750
  //#endregion
9805
9751
  //#region packages/runtime-dom/src/index.ts
9806
9752
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -9902,6 +9848,5 @@ function normalizeContainer(container) {
9902
9848
  * @internal
9903
9849
  */
9904
9850
  const initDirectivesForSSR = NOOP;
9905
-
9906
9851
  //#endregion
9907
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
9852
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };