@vue/runtime-dom 3.2.44 → 3.2.46

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.
@@ -99,7 +99,7 @@ var VueRuntimeDOM = (function (exports) {
99
99
  // These tag configs are shared between compiler-dom and runtime-dom, so they
100
100
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
101
101
  const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
102
- 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
102
+ 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
103
103
  'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
104
104
  'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
105
105
  'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
@@ -111,7 +111,7 @@ var VueRuntimeDOM = (function (exports) {
111
111
  const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
112
112
  'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
113
113
  'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
114
- 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
114
+ 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
115
115
  'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
116
116
  'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
117
117
  'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
@@ -262,12 +262,13 @@ var VueRuntimeDOM = (function (exports) {
262
262
  arr.splice(i, 1);
263
263
  }
264
264
  };
265
- const hasOwnProperty = Object.prototype.hasOwnProperty;
266
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
265
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
266
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
267
267
  const isArray = Array.isArray;
268
268
  const isMap = (val) => toTypeString(val) === '[object Map]';
269
269
  const isSet = (val) => toTypeString(val) === '[object Set]';
270
270
  const isDate = (val) => toTypeString(val) === '[object Date]';
271
+ const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
271
272
  const isFunction = (val) => typeof val === 'function';
272
273
  const isString = (val) => typeof val === 'string';
273
274
  const isSymbol = (val) => typeof val === 'symbol';
@@ -334,10 +335,22 @@ var VueRuntimeDOM = (function (exports) {
334
335
  value
335
336
  });
336
337
  };
337
- const toNumber = (val) => {
338
+ /**
339
+ * "123-foo" will be parsed to 123
340
+ * This is used for the .number modifier in v-model
341
+ */
342
+ const looseToNumber = (val) => {
338
343
  const n = parseFloat(val);
339
344
  return isNaN(n) ? val : n;
340
345
  };
346
+ /**
347
+ * Only conerces number-like strings
348
+ * "123-foo" will be returned as-is
349
+ */
350
+ const toNumber = (val) => {
351
+ const n = isString(val) ? Number(val) : NaN;
352
+ return isNaN(n) ? val : n;
353
+ };
341
354
  let _globalThis;
342
355
  const getGlobalThis = () => {
343
356
  return (_globalThis ||
@@ -353,7 +366,7 @@ var VueRuntimeDOM = (function (exports) {
353
366
  : {}));
354
367
  };
355
368
 
356
- function warn(msg, ...args) {
369
+ function warn$1(msg, ...args) {
357
370
  console.warn(`[Vue warn] ${msg}`, ...args);
358
371
  }
359
372
 
@@ -364,7 +377,7 @@ var VueRuntimeDOM = (function (exports) {
364
377
  /**
365
378
  * @internal
366
379
  */
367
- this.active = true;
380
+ this._active = true;
368
381
  /**
369
382
  * @internal
370
383
  */
@@ -379,8 +392,11 @@ var VueRuntimeDOM = (function (exports) {
379
392
  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
380
393
  }
381
394
  }
395
+ get active() {
396
+ return this._active;
397
+ }
382
398
  run(fn) {
383
- if (this.active) {
399
+ if (this._active) {
384
400
  const currentEffectScope = activeEffectScope;
385
401
  try {
386
402
  activeEffectScope = this;
@@ -391,7 +407,7 @@ var VueRuntimeDOM = (function (exports) {
391
407
  }
392
408
  }
393
409
  else {
394
- warn(`cannot run an inactive effect scope.`);
410
+ warn$1(`cannot run an inactive effect scope.`);
395
411
  }
396
412
  }
397
413
  /**
@@ -409,7 +425,7 @@ var VueRuntimeDOM = (function (exports) {
409
425
  activeEffectScope = this.parent;
410
426
  }
411
427
  stop(fromParent) {
412
- if (this.active) {
428
+ if (this._active) {
413
429
  let i, l;
414
430
  for (i = 0, l = this.effects.length; i < l; i++) {
415
431
  this.effects[i].stop();
@@ -432,7 +448,7 @@ var VueRuntimeDOM = (function (exports) {
432
448
  }
433
449
  }
434
450
  this.parent = undefined;
435
- this.active = false;
451
+ this._active = false;
436
452
  }
437
453
  }
438
454
  }
@@ -452,7 +468,7 @@ var VueRuntimeDOM = (function (exports) {
452
468
  activeEffectScope.cleanups.push(fn);
453
469
  }
454
470
  else {
455
- warn(`onScopeDispose() is called when there is no active effect scope` +
471
+ warn$1(`onScopeDispose() is called when there is no active effect scope` +
456
472
  ` to be associated with.`);
457
473
  }
458
474
  }
@@ -653,7 +669,7 @@ var VueRuntimeDOM = (function (exports) {
653
669
  deps = [...depsMap.values()];
654
670
  }
655
671
  else if (key === 'length' && isArray(target)) {
656
- const newLength = toNumber(newValue);
672
+ const newLength = Number(newValue);
657
673
  depsMap.forEach((dep, key) => {
658
674
  if (key === 'length' || key >= newLength) {
659
675
  deps.push(dep);
@@ -742,6 +758,10 @@ var VueRuntimeDOM = (function (exports) {
742
758
  }
743
759
  }
744
760
  }
761
+ function getDepFromReactive(object, key) {
762
+ var _a;
763
+ return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
764
+ }
745
765
 
746
766
  const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
747
767
  const builtInSymbols = new Set(
@@ -753,7 +773,7 @@ var VueRuntimeDOM = (function (exports) {
753
773
  .filter(key => key !== 'arguments' && key !== 'caller')
754
774
  .map(key => Symbol[key])
755
775
  .filter(isSymbol));
756
- const get = /*#__PURE__*/ createGetter();
776
+ const get$1 = /*#__PURE__*/ createGetter();
757
777
  const shallowGet = /*#__PURE__*/ createGetter(false, true);
758
778
  const readonlyGet = /*#__PURE__*/ createGetter(true);
759
779
  const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
@@ -787,6 +807,11 @@ var VueRuntimeDOM = (function (exports) {
787
807
  });
788
808
  return instrumentations;
789
809
  }
810
+ function hasOwnProperty(key) {
811
+ const obj = toRaw(this);
812
+ track(obj, "has" /* TrackOpTypes.HAS */, key);
813
+ return obj.hasOwnProperty(key);
814
+ }
790
815
  function createGetter(isReadonly = false, shallow = false) {
791
816
  return function get(target, key, receiver) {
792
817
  if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
@@ -810,8 +835,13 @@ var VueRuntimeDOM = (function (exports) {
810
835
  return target;
811
836
  }
812
837
  const targetIsArray = isArray(target);
813
- if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {
814
- return Reflect.get(arrayInstrumentations, key, receiver);
838
+ if (!isReadonly) {
839
+ if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
840
+ return Reflect.get(arrayInstrumentations, key, receiver);
841
+ }
842
+ if (key === 'hasOwnProperty') {
843
+ return hasOwnProperty;
844
+ }
815
845
  }
816
846
  const res = Reflect.get(target, key, receiver);
817
847
  if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
@@ -836,7 +866,7 @@ var VueRuntimeDOM = (function (exports) {
836
866
  return res;
837
867
  };
838
868
  }
839
- const set = /*#__PURE__*/ createSetter();
869
+ const set$1 = /*#__PURE__*/ createSetter();
840
870
  const shallowSet = /*#__PURE__*/ createSetter(true);
841
871
  function createSetter(shallow = false) {
842
872
  return function set(target, key, value, receiver) {
@@ -879,7 +909,7 @@ var VueRuntimeDOM = (function (exports) {
879
909
  }
880
910
  return result;
881
911
  }
882
- function has(target, key) {
912
+ function has$1(target, key) {
883
913
  const result = Reflect.has(target, key);
884
914
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
885
915
  track(target, "has" /* TrackOpTypes.HAS */, key);
@@ -891,23 +921,23 @@ var VueRuntimeDOM = (function (exports) {
891
921
  return Reflect.ownKeys(target);
892
922
  }
893
923
  const mutableHandlers = {
894
- get,
895
- set,
924
+ get: get$1,
925
+ set: set$1,
896
926
  deleteProperty,
897
- has,
927
+ has: has$1,
898
928
  ownKeys
899
929
  };
900
930
  const readonlyHandlers = {
901
931
  get: readonlyGet,
902
932
  set(target, key) {
903
933
  {
904
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
934
+ warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
905
935
  }
906
936
  return true;
907
937
  },
908
938
  deleteProperty(target, key) {
909
939
  {
910
- warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
940
+ warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
911
941
  }
912
942
  return true;
913
943
  }
@@ -925,7 +955,7 @@ var VueRuntimeDOM = (function (exports) {
925
955
 
926
956
  const toShallow = (value) => value;
927
957
  const getProto = (v) => Reflect.getPrototypeOf(v);
928
- function get$1(target, key, isReadonly = false, isShallow = false) {
958
+ function get(target, key, isReadonly = false, isShallow = false) {
929
959
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
930
960
  // of the value
931
961
  target = target["__v_raw" /* ReactiveFlags.RAW */];
@@ -951,7 +981,7 @@ var VueRuntimeDOM = (function (exports) {
951
981
  target.get(key);
952
982
  }
953
983
  }
954
- function has$1(key, isReadonly = false) {
984
+ function has(key, isReadonly = false) {
955
985
  const target = this["__v_raw" /* ReactiveFlags.RAW */];
956
986
  const rawTarget = toRaw(target);
957
987
  const rawKey = toRaw(key);
@@ -981,7 +1011,7 @@ var VueRuntimeDOM = (function (exports) {
981
1011
  }
982
1012
  return this;
983
1013
  }
984
- function set$1(key, value) {
1014
+ function set(key, value) {
985
1015
  value = toRaw(value);
986
1016
  const target = toRaw(this);
987
1017
  const { has, get } = getProto(target);
@@ -1094,41 +1124,41 @@ var VueRuntimeDOM = (function (exports) {
1094
1124
  function createInstrumentations() {
1095
1125
  const mutableInstrumentations = {
1096
1126
  get(key) {
1097
- return get$1(this, key);
1127
+ return get(this, key);
1098
1128
  },
1099
1129
  get size() {
1100
1130
  return size(this);
1101
1131
  },
1102
- has: has$1,
1132
+ has,
1103
1133
  add,
1104
- set: set$1,
1134
+ set,
1105
1135
  delete: deleteEntry,
1106
1136
  clear,
1107
1137
  forEach: createForEach(false, false)
1108
1138
  };
1109
1139
  const shallowInstrumentations = {
1110
1140
  get(key) {
1111
- return get$1(this, key, false, true);
1141
+ return get(this, key, false, true);
1112
1142
  },
1113
1143
  get size() {
1114
1144
  return size(this);
1115
1145
  },
1116
- has: has$1,
1146
+ has,
1117
1147
  add,
1118
- set: set$1,
1148
+ set,
1119
1149
  delete: deleteEntry,
1120
1150
  clear,
1121
1151
  forEach: createForEach(false, true)
1122
1152
  };
1123
1153
  const readonlyInstrumentations = {
1124
1154
  get(key) {
1125
- return get$1(this, key, true);
1155
+ return get(this, key, true);
1126
1156
  },
1127
1157
  get size() {
1128
1158
  return size(this, true);
1129
1159
  },
1130
1160
  has(key) {
1131
- return has$1.call(this, key, true);
1161
+ return has.call(this, key, true);
1132
1162
  },
1133
1163
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1134
1164
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1138,13 +1168,13 @@ var VueRuntimeDOM = (function (exports) {
1138
1168
  };
1139
1169
  const shallowReadonlyInstrumentations = {
1140
1170
  get(key) {
1141
- return get$1(this, key, true, true);
1171
+ return get(this, key, true, true);
1142
1172
  },
1143
1173
  get size() {
1144
1174
  return size(this, true);
1145
1175
  },
1146
1176
  has(key) {
1147
- return has$1.call(this, key, true);
1177
+ return has.call(this, key, true);
1148
1178
  },
1149
1179
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1150
1180
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1335,9 +1365,10 @@ var VueRuntimeDOM = (function (exports) {
1335
1365
  }
1336
1366
  function triggerRefValue(ref, newVal) {
1337
1367
  ref = toRaw(ref);
1338
- if (ref.dep) {
1368
+ const dep = ref.dep;
1369
+ if (dep) {
1339
1370
  {
1340
- triggerEffects(ref.dep, {
1371
+ triggerEffects(dep, {
1341
1372
  target: ref,
1342
1373
  type: "set" /* TriggerOpTypes.SET */,
1343
1374
  key: 'value',
@@ -1449,6 +1480,9 @@ var VueRuntimeDOM = (function (exports) {
1449
1480
  set value(newVal) {
1450
1481
  this._object[this._key] = newVal;
1451
1482
  }
1483
+ get dep() {
1484
+ return getDepFromReactive(toRaw(this._object), this._key);
1485
+ }
1452
1486
  }
1453
1487
  function toRef(object, key, defaultValue) {
1454
1488
  const val = object[key];
@@ -1490,7 +1524,7 @@ var VueRuntimeDOM = (function (exports) {
1490
1524
  }
1491
1525
  }
1492
1526
  _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1493
- function computed(getterOrOptions, debugOptions, isSSR = false) {
1527
+ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1494
1528
  let getter;
1495
1529
  let setter;
1496
1530
  const onlyGetter = isFunction(getterOrOptions);
@@ -1520,7 +1554,7 @@ var VueRuntimeDOM = (function (exports) {
1520
1554
  function popWarningContext() {
1521
1555
  stack.pop();
1522
1556
  }
1523
- function warn$1(msg, ...args) {
1557
+ function warn(msg, ...args) {
1524
1558
  // avoid props formatting or warn handler tracking deps that might be mutated
1525
1559
  // during patch, leading to infinite recursion.
1526
1560
  pauseTracking();
@@ -1626,6 +1660,20 @@ var VueRuntimeDOM = (function (exports) {
1626
1660
  return raw ? value : [`${key}=`, value];
1627
1661
  }
1628
1662
  }
1663
+ /**
1664
+ * @internal
1665
+ */
1666
+ function assertNumber(val, type) {
1667
+ if (val === undefined) {
1668
+ return;
1669
+ }
1670
+ else if (typeof val !== 'number') {
1671
+ warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
1672
+ }
1673
+ else if (isNaN(val)) {
1674
+ warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
1675
+ }
1676
+ }
1629
1677
 
1630
1678
  const ErrorTypeStrings = {
1631
1679
  ["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
@@ -1719,7 +1767,7 @@ var VueRuntimeDOM = (function (exports) {
1719
1767
  if (contextVNode) {
1720
1768
  pushWarningContext(contextVNode);
1721
1769
  }
1722
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1770
+ warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1723
1771
  if (contextVNode) {
1724
1772
  popWarningContext();
1725
1773
  }
@@ -1915,7 +1963,7 @@ var VueRuntimeDOM = (function (exports) {
1915
1963
  if (count > RECURSION_LIMIT) {
1916
1964
  const instance = fn.ownerInstance;
1917
1965
  const componentName = instance && getComponentName(instance.type);
1918
- warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1966
+ warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
1919
1967
  `This means you have a reactive effect that is mutating its own ` +
1920
1968
  `dependencies and thus recursively triggering itself. Possible sources ` +
1921
1969
  `include component template, render function, updated hook or ` +
@@ -2022,12 +2070,6 @@ var VueRuntimeDOM = (function (exports) {
2022
2070
  // components to be unmounted and re-mounted. Queue the update so that we
2023
2071
  // don't end up forcing the same parent to re-render multiple times.
2024
2072
  queueJob(instance.parent.update);
2025
- // instance is the inner component of an async custom element
2026
- // invoke to reset styles
2027
- if (instance.parent.type.__asyncLoader &&
2028
- instance.parent.ceReload) {
2029
- instance.parent.ceReload(newComp.styles);
2030
- }
2031
2073
  }
2032
2074
  else if (instance.appContext.reload) {
2033
2075
  // root instance mounted via createApp() has a reload method
@@ -2069,9 +2111,10 @@ var VueRuntimeDOM = (function (exports) {
2069
2111
  };
2070
2112
  }
2071
2113
 
2114
+ exports.devtools = void 0;
2072
2115
  let buffer = [];
2073
2116
  let devtoolsNotInstalled = false;
2074
- function emit(event, ...args) {
2117
+ function emit$1(event, ...args) {
2075
2118
  if (exports.devtools) {
2076
2119
  exports.devtools.emit(event, ...args);
2077
2120
  }
@@ -2118,7 +2161,7 @@ var VueRuntimeDOM = (function (exports) {
2118
2161
  }
2119
2162
  }
2120
2163
  function devtoolsInitApp(app, version) {
2121
- emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2164
+ emit$1("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2122
2165
  Fragment,
2123
2166
  Text,
2124
2167
  Comment,
@@ -2126,7 +2169,7 @@ var VueRuntimeDOM = (function (exports) {
2126
2169
  });
2127
2170
  }
2128
2171
  function devtoolsUnmountApp(app) {
2129
- emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2172
+ emit$1("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2130
2173
  }
2131
2174
  const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
2132
2175
  const devtoolsComponentUpdated =
@@ -2142,21 +2185,21 @@ var VueRuntimeDOM = (function (exports) {
2142
2185
  };
2143
2186
  function createDevtoolsComponentHook(hook) {
2144
2187
  return (component) => {
2145
- emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2188
+ emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2146
2189
  };
2147
2190
  }
2148
2191
  const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
2149
2192
  const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
2150
2193
  function createDevtoolsPerformanceHook(hook) {
2151
2194
  return (component, type, time) => {
2152
- emit(hook, component.appContext.app, component.uid, component, type, time);
2195
+ emit$1(hook, component.appContext.app, component.uid, component, type, time);
2153
2196
  };
2154
2197
  }
2155
2198
  function devtoolsComponentEmit(component, event, params) {
2156
- emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2199
+ emit$1("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2157
2200
  }
2158
2201
 
2159
- function emit$1(instance, event, ...rawArgs) {
2202
+ function emit(instance, event, ...rawArgs) {
2160
2203
  if (instance.isUnmounted)
2161
2204
  return;
2162
2205
  const props = instance.vnode.props || EMPTY_OBJ;
@@ -2166,7 +2209,7 @@ var VueRuntimeDOM = (function (exports) {
2166
2209
  if (!(event in emitsOptions) &&
2167
2210
  !(false )) {
2168
2211
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2169
- warn$1(`Component emitted event "${event}" but it is neither declared in ` +
2212
+ warn(`Component emitted event "${event}" but it is neither declared in ` +
2170
2213
  `the emits option nor as an "${toHandlerKey(event)}" prop.`);
2171
2214
  }
2172
2215
  }
@@ -2175,7 +2218,7 @@ var VueRuntimeDOM = (function (exports) {
2175
2218
  if (isFunction(validator)) {
2176
2219
  const isValid = validator(...rawArgs);
2177
2220
  if (!isValid) {
2178
- warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
2221
+ warn(`Invalid event arguments: event validation failed for event "${event}".`);
2179
2222
  }
2180
2223
  }
2181
2224
  }
@@ -2192,7 +2235,7 @@ var VueRuntimeDOM = (function (exports) {
2192
2235
  args = rawArgs.map(a => (isString(a) ? a.trim() : a));
2193
2236
  }
2194
2237
  if (number) {
2195
- args = rawArgs.map(toNumber);
2238
+ args = rawArgs.map(looseToNumber);
2196
2239
  }
2197
2240
  }
2198
2241
  {
@@ -2201,7 +2244,7 @@ var VueRuntimeDOM = (function (exports) {
2201
2244
  {
2202
2245
  const lowerCaseEvent = event.toLowerCase();
2203
2246
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2204
- warn$1(`Event "${lowerCaseEvent}" is emitted in component ` +
2247
+ warn(`Event "${lowerCaseEvent}" is emitted in component ` +
2205
2248
  `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
2206
2249
  `Note that HTML attributes are case-insensitive and you cannot use ` +
2207
2250
  `v-on to listen to camelCase events when using in-DOM templates. ` +
@@ -2476,13 +2519,13 @@ var VueRuntimeDOM = (function (exports) {
2476
2519
  }
2477
2520
  }
2478
2521
  if (extraAttrs.length) {
2479
- warn$1(`Extraneous non-props attributes (` +
2522
+ warn(`Extraneous non-props attributes (` +
2480
2523
  `${extraAttrs.join(', ')}) ` +
2481
2524
  `were passed to component but could not be automatically inherited ` +
2482
2525
  `because component renders fragment or text root nodes.`);
2483
2526
  }
2484
2527
  if (eventAttrs.length) {
2485
- warn$1(`Extraneous non-emits event listeners (` +
2528
+ warn(`Extraneous non-emits event listeners (` +
2486
2529
  `${eventAttrs.join(', ')}) ` +
2487
2530
  `were passed to component but could not be automatically inherited ` +
2488
2531
  `because component renders fragment or text root nodes. ` +
@@ -2495,7 +2538,7 @@ var VueRuntimeDOM = (function (exports) {
2495
2538
  // inherit directives
2496
2539
  if (vnode.dirs) {
2497
2540
  if (!isElementRoot(root)) {
2498
- warn$1(`Runtime directive used on component with non-element root node. ` +
2541
+ warn(`Runtime directive used on component with non-element root node. ` +
2499
2542
  `The directives will not function as intended.`);
2500
2543
  }
2501
2544
  // clone before mutating since the root may be a hoisted vnode
@@ -2505,7 +2548,7 @@ var VueRuntimeDOM = (function (exports) {
2505
2548
  // inherit transition data
2506
2549
  if (vnode.transition) {
2507
2550
  if (!isElementRoot(root)) {
2508
- warn$1(`Component inside <Transition> renders non-element root node ` +
2551
+ warn(`Component inside <Transition> renders non-element root node ` +
2509
2552
  `that cannot be animated.`);
2510
2553
  }
2511
2554
  root.transition = vnode.transition;
@@ -2840,7 +2883,10 @@ var VueRuntimeDOM = (function (exports) {
2840
2883
  console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
2841
2884
  }
2842
2885
  const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
2843
- const timeout = toNumber(vnode.props && vnode.props.timeout);
2886
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
2887
+ {
2888
+ assertNumber(timeout, `Suspense timeout`);
2889
+ }
2844
2890
  const suspense = {
2845
2891
  vnode,
2846
2892
  parent,
@@ -3068,7 +3114,7 @@ var VueRuntimeDOM = (function (exports) {
3068
3114
  if (isArray(s)) {
3069
3115
  const singleChild = filterSingleRoot(s);
3070
3116
  if (!singleChild) {
3071
- warn$1(`<Suspense> slots expect a single root node.`);
3117
+ warn(`<Suspense> slots expect a single root node.`);
3072
3118
  }
3073
3119
  s = singleChild;
3074
3120
  }
@@ -3106,7 +3152,7 @@ var VueRuntimeDOM = (function (exports) {
3106
3152
  function provide(key, value) {
3107
3153
  if (!currentInstance) {
3108
3154
  {
3109
- warn$1(`provide() can only be used inside setup().`);
3155
+ warn(`provide() can only be used inside setup().`);
3110
3156
  }
3111
3157
  }
3112
3158
  else {
@@ -3145,11 +3191,11 @@ var VueRuntimeDOM = (function (exports) {
3145
3191
  : defaultValue;
3146
3192
  }
3147
3193
  else {
3148
- warn$1(`injection "${String(key)}" not found.`);
3194
+ warn(`injection "${String(key)}" not found.`);
3149
3195
  }
3150
3196
  }
3151
3197
  else {
3152
- warn$1(`inject() can only be used inside setup() or functional components.`);
3198
+ warn(`inject() can only be used inside setup() or functional components.`);
3153
3199
  }
3154
3200
  }
3155
3201
 
@@ -3158,17 +3204,17 @@ var VueRuntimeDOM = (function (exports) {
3158
3204
  return doWatch(effect, null, options);
3159
3205
  }
3160
3206
  function watchPostEffect(effect, options) {
3161
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3207
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
3162
3208
  }
3163
3209
  function watchSyncEffect(effect, options) {
3164
- return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3210
+ return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
3165
3211
  }
3166
3212
  // initial value for watchers to trigger on undefined initial values
3167
3213
  const INITIAL_WATCHER_VALUE = {};
3168
3214
  // implementation
3169
3215
  function watch(source, cb, options) {
3170
3216
  if (!isFunction(cb)) {
3171
- warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3217
+ warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
3172
3218
  `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
3173
3219
  `supports \`watch(source, cb, options?) signature.`);
3174
3220
  }
@@ -3177,19 +3223,20 @@ var VueRuntimeDOM = (function (exports) {
3177
3223
  function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
3178
3224
  if (!cb) {
3179
3225
  if (immediate !== undefined) {
3180
- warn$1(`watch() "immediate" option is only respected when using the ` +
3226
+ warn(`watch() "immediate" option is only respected when using the ` +
3181
3227
  `watch(source, callback, options?) signature.`);
3182
3228
  }
3183
3229
  if (deep !== undefined) {
3184
- warn$1(`watch() "deep" option is only respected when using the ` +
3230
+ warn(`watch() "deep" option is only respected when using the ` +
3185
3231
  `watch(source, callback, options?) signature.`);
3186
3232
  }
3187
3233
  }
3188
3234
  const warnInvalidSource = (s) => {
3189
- warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3235
+ warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
3190
3236
  `a reactive object, or an array of these types.`);
3191
3237
  };
3192
- const instance = currentInstance;
3238
+ const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
3239
+ // const instance = currentInstance
3193
3240
  let getter;
3194
3241
  let forceTrigger = false;
3195
3242
  let isMultiSource = false;
@@ -3276,7 +3323,7 @@ var VueRuntimeDOM = (function (exports) {
3276
3323
  // pass undefined as the old value when it's changed for the first time
3277
3324
  oldValue === INITIAL_WATCHER_VALUE
3278
3325
  ? undefined
3279
- : (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
3326
+ : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
3280
3327
  ? []
3281
3328
  : oldValue,
3282
3329
  onCleanup
@@ -3456,7 +3503,7 @@ var VueRuntimeDOM = (function (exports) {
3456
3503
  if (c.type !== Comment) {
3457
3504
  if (hasFound) {
3458
3505
  // warn more than one non-comment child
3459
- warn$1('<transition> can only be used on a single element or component. ' +
3506
+ warn('<transition> can only be used on a single element or component. ' +
3460
3507
  'Use <transition-group> for lists.');
3461
3508
  break;
3462
3509
  }
@@ -3474,7 +3521,7 @@ var VueRuntimeDOM = (function (exports) {
3474
3521
  mode !== 'in-out' &&
3475
3522
  mode !== 'out-in' &&
3476
3523
  mode !== 'default') {
3477
- warn$1(`invalid <transition> mode: ${mode}`);
3524
+ warn(`invalid <transition> mode: ${mode}`);
3478
3525
  }
3479
3526
  if (state.isLeaving) {
3480
3527
  return emptyPlaceholder(child);
@@ -3782,7 +3829,7 @@ var VueRuntimeDOM = (function (exports) {
3782
3829
  return pendingRequest;
3783
3830
  }
3784
3831
  if (!comp) {
3785
- warn$1(`Async component loader resolved to undefined. ` +
3832
+ warn(`Async component loader resolved to undefined. ` +
3786
3833
  `If you are using retry(), make sure to return its return value.`);
3787
3834
  }
3788
3835
  // interop module default
@@ -3875,10 +3922,15 @@ var VueRuntimeDOM = (function (exports) {
3875
3922
  }
3876
3923
  });
3877
3924
  }
3878
- function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) {
3925
+ function createInnerComp(comp, parent) {
3926
+ const { ref, props, children, ce } = parent.vnode;
3879
3927
  const vnode = createVNode(comp, props, children);
3880
3928
  // ensure inner component inherits the async wrapper's ref owner
3881
3929
  vnode.ref = ref;
3930
+ // pass the custom element callback on to the inner comp
3931
+ // and remove it from the async wrapper
3932
+ vnode.ce = ce;
3933
+ delete parent.vnode.ce;
3882
3934
  return vnode;
3883
3935
  }
3884
3936
 
@@ -3964,7 +4016,7 @@ var VueRuntimeDOM = (function (exports) {
3964
4016
  }
3965
4017
  function pruneCacheEntry(key) {
3966
4018
  const cached = cache.get(key);
3967
- if (!current || cached.type !== current.type) {
4019
+ if (!current || !isSameVNodeType(cached, current)) {
3968
4020
  unmount(cached);
3969
4021
  }
3970
4022
  else if (current) {
@@ -3996,7 +4048,7 @@ var VueRuntimeDOM = (function (exports) {
3996
4048
  cache.forEach(cached => {
3997
4049
  const { subTree, suspense } = instance;
3998
4050
  const vnode = getInnerChild(subTree);
3999
- if (cached.type === vnode.type) {
4051
+ if (cached.type === vnode.type && cached.key === vnode.key) {
4000
4052
  // current instance will be unmounted as part of keep-alive's unmount
4001
4053
  resetShapeFlag(vnode);
4002
4054
  // but invoke its deactivated hook here
@@ -4016,7 +4068,7 @@ var VueRuntimeDOM = (function (exports) {
4016
4068
  const rawVNode = children[0];
4017
4069
  if (children.length > 1) {
4018
4070
  {
4019
- warn$1(`KeepAlive should contain exactly one component child.`);
4071
+ warn(`KeepAlive should contain exactly one component child.`);
4020
4072
  }
4021
4073
  current = null;
4022
4074
  return children;
@@ -4036,8 +4088,7 @@ var VueRuntimeDOM = (function (exports) {
4036
4088
  : comp);
4037
4089
  const { include, exclude, max } = props;
4038
4090
  if ((include && (!name || !matches(include, name))) ||
4039
- (exclude && name && matches(exclude, name)) ||
4040
- (hmrDirtyComponents.has(comp))) {
4091
+ (exclude && name && matches(exclude, name))) {
4041
4092
  current = vnode;
4042
4093
  return rawVNode;
4043
4094
  }
@@ -4094,7 +4145,7 @@ var VueRuntimeDOM = (function (exports) {
4094
4145
  else if (isString(pattern)) {
4095
4146
  return pattern.split(',').includes(name);
4096
4147
  }
4097
- else if (pattern.test) {
4148
+ else if (isRegExp(pattern)) {
4098
4149
  return pattern.test(name);
4099
4150
  }
4100
4151
  /* istanbul ignore next */
@@ -4147,14 +4198,9 @@ var VueRuntimeDOM = (function (exports) {
4147
4198
  }, target);
4148
4199
  }
4149
4200
  function resetShapeFlag(vnode) {
4150
- let shapeFlag = vnode.shapeFlag;
4151
- if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
4152
- shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4153
- }
4154
- if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
4155
- shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4156
- }
4157
- vnode.shapeFlag = shapeFlag;
4201
+ // bitwise operations to remove keep alive flags
4202
+ vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4203
+ vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4158
4204
  }
4159
4205
  function getInnerChild(vnode) {
4160
4206
  return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
@@ -4193,7 +4239,7 @@ var VueRuntimeDOM = (function (exports) {
4193
4239
  }
4194
4240
  else {
4195
4241
  const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
4196
- warn$1(`${apiName} is called when there is no active component instance to be ` +
4242
+ warn(`${apiName} is called when there is no active component instance to be ` +
4197
4243
  `associated with. ` +
4198
4244
  `Lifecycle injection APIs can only be used during execution of setup().` +
4199
4245
  (` If you are using async setup(), make sure to register lifecycle ` +
@@ -4232,7 +4278,7 @@ var VueRuntimeDOM = (function (exports) {
4232
4278
  */
4233
4279
  function validateDirectiveName(name) {
4234
4280
  if (isBuiltInDirective(name)) {
4235
- warn$1('Do not use built-in directive ids as custom directive id: ' + name);
4281
+ warn('Do not use built-in directive ids as custom directive id: ' + name);
4236
4282
  }
4237
4283
  }
4238
4284
  /**
@@ -4241,7 +4287,7 @@ var VueRuntimeDOM = (function (exports) {
4241
4287
  function withDirectives(vnode, directives) {
4242
4288
  const internalInstance = currentRenderingInstance;
4243
4289
  if (internalInstance === null) {
4244
- warn$1(`withDirectives can only be used inside render functions.`);
4290
+ warn(`withDirectives can only be used inside render functions.`);
4245
4291
  return vnode;
4246
4292
  }
4247
4293
  const instance = getExposeProxy(internalInstance) ||
@@ -4352,12 +4398,12 @@ var VueRuntimeDOM = (function (exports) {
4352
4398
  ? `\nIf this is a native custom element, make sure to exclude it from ` +
4353
4399
  `component resolution via compilerOptions.isCustomElement.`
4354
4400
  : ``;
4355
- warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4401
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4356
4402
  }
4357
4403
  return res;
4358
4404
  }
4359
4405
  else {
4360
- warn$1(`resolve${capitalize(type.slice(0, -1))} ` +
4406
+ warn(`resolve${capitalize(type.slice(0, -1))} ` +
4361
4407
  `can only be used in render() or setup().`);
4362
4408
  }
4363
4409
  }
@@ -4382,7 +4428,7 @@ var VueRuntimeDOM = (function (exports) {
4382
4428
  }
4383
4429
  else if (typeof source === 'number') {
4384
4430
  if (!Number.isInteger(source)) {
4385
- warn$1(`The v-for range expect an integer value but got ${source}.`);
4431
+ warn(`The v-for range expect an integer value but got ${source}.`);
4386
4432
  }
4387
4433
  ret = new Array(source);
4388
4434
  for (let i = 0; i < source; i++) {
@@ -4453,11 +4499,13 @@ var VueRuntimeDOM = (function (exports) {
4453
4499
  (currentRenderingInstance.parent &&
4454
4500
  isAsyncWrapper(currentRenderingInstance.parent) &&
4455
4501
  currentRenderingInstance.parent.isCE)) {
4456
- return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
4502
+ if (name !== 'default')
4503
+ props.name = name;
4504
+ return createVNode('slot', props, fallback && fallback());
4457
4505
  }
4458
4506
  let slot = slots[name];
4459
4507
  if (slot && slot.length > 1) {
4460
- warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4508
+ warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
4461
4509
  `function. You need to mark this component with $dynamic-slots in the ` +
4462
4510
  `parent template.`);
4463
4511
  slot = () => [];
@@ -4510,7 +4558,7 @@ var VueRuntimeDOM = (function (exports) {
4510
4558
  function toHandlers(obj, preserveCaseIfNecessary) {
4511
4559
  const ret = {};
4512
4560
  if (!isObject(obj)) {
4513
- warn$1(`v-on with no argument expects an object value.`);
4561
+ warn(`v-on with no argument expects an object value.`);
4514
4562
  return ret;
4515
4563
  }
4516
4564
  for (const key in obj) {
@@ -4553,6 +4601,7 @@ var VueRuntimeDOM = (function (exports) {
4553
4601
  $watch: i => (instanceWatch.bind(i) )
4554
4602
  });
4555
4603
  const isReservedPrefix = (key) => key === '_' || key === '$';
4604
+ const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
4556
4605
  const PublicInstanceProxyHandlers = {
4557
4606
  get({ _: instance }, key) {
4558
4607
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
@@ -4560,15 +4609,6 @@ var VueRuntimeDOM = (function (exports) {
4560
4609
  if (key === '__isVue') {
4561
4610
  return true;
4562
4611
  }
4563
- // prioritize <script setup> bindings during dev.
4564
- // this allows even properties that start with _ or $ to be used - so that
4565
- // it aligns with the production behavior where the render fn is inlined and
4566
- // indeed has access to all declared variables.
4567
- if (setupState !== EMPTY_OBJ &&
4568
- setupState.__isScriptSetup &&
4569
- hasOwn(setupState, key)) {
4570
- return setupState[key];
4571
- }
4572
4612
  // data / props / ctx
4573
4613
  // This getter gets called for every property access on the render context
4574
4614
  // during render and is a major hotspot. The most expensive part of this
@@ -4591,7 +4631,7 @@ var VueRuntimeDOM = (function (exports) {
4591
4631
  // default: just fallthrough
4592
4632
  }
4593
4633
  }
4594
- else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4634
+ else if (hasSetupBinding(setupState, key)) {
4595
4635
  accessCache[key] = 1 /* AccessTypes.SETUP */;
4596
4636
  return setupState[key];
4597
4637
  }
@@ -4650,32 +4690,37 @@ var VueRuntimeDOM = (function (exports) {
4650
4690
  // to infinite warning loop
4651
4691
  key.indexOf('__v') !== 0)) {
4652
4692
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
4653
- warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4693
+ warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
4654
4694
  `character ("$" or "_") and is not proxied on the render context.`);
4655
4695
  }
4656
4696
  else if (instance === currentRenderingInstance) {
4657
- warn$1(`Property ${JSON.stringify(key)} was accessed during render ` +
4697
+ warn(`Property ${JSON.stringify(key)} was accessed during render ` +
4658
4698
  `but is not defined on instance.`);
4659
4699
  }
4660
4700
  }
4661
4701
  },
4662
4702
  set({ _: instance }, key, value) {
4663
4703
  const { data, setupState, ctx } = instance;
4664
- if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4704
+ if (hasSetupBinding(setupState, key)) {
4665
4705
  setupState[key] = value;
4666
4706
  return true;
4667
4707
  }
4708
+ else if (setupState.__isScriptSetup &&
4709
+ hasOwn(setupState, key)) {
4710
+ warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
4711
+ return false;
4712
+ }
4668
4713
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
4669
4714
  data[key] = value;
4670
4715
  return true;
4671
4716
  }
4672
4717
  else if (hasOwn(instance.props, key)) {
4673
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
4718
+ warn(`Attempting to mutate prop "${key}". Props are readonly.`);
4674
4719
  return false;
4675
4720
  }
4676
4721
  if (key[0] === '$' && key.slice(1) in instance) {
4677
- warn$1(`Attempting to mutate public property "${key}". ` +
4678
- `Properties starting with $ are reserved and readonly.`, instance);
4722
+ warn(`Attempting to mutate public property "${key}". ` +
4723
+ `Properties starting with $ are reserved and readonly.`);
4679
4724
  return false;
4680
4725
  }
4681
4726
  else {
@@ -4696,7 +4741,7 @@ var VueRuntimeDOM = (function (exports) {
4696
4741
  let normalizedProps;
4697
4742
  return (!!accessCache[key] ||
4698
4743
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
4699
- (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
4744
+ hasSetupBinding(setupState, key) ||
4700
4745
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
4701
4746
  hasOwn(ctx, key) ||
4702
4747
  hasOwn(publicPropertiesMap, key) ||
@@ -4715,7 +4760,7 @@ var VueRuntimeDOM = (function (exports) {
4715
4760
  };
4716
4761
  {
4717
4762
  PublicInstanceProxyHandlers.ownKeys = (target) => {
4718
- warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4763
+ warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
4719
4764
  `The keys will be empty in production mode to avoid performance overhead.`);
4720
4765
  return Reflect.ownKeys(target);
4721
4766
  };
@@ -4731,7 +4776,7 @@ var VueRuntimeDOM = (function (exports) {
4731
4776
  has(_, key) {
4732
4777
  const has = key[0] !== '_' && !isGloballyWhitelisted(key);
4733
4778
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
4734
- warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4779
+ warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
4735
4780
  }
4736
4781
  return has;
4737
4782
  }
@@ -4781,7 +4826,7 @@ var VueRuntimeDOM = (function (exports) {
4781
4826
  Object.keys(toRaw(setupState)).forEach(key => {
4782
4827
  if (!setupState.__isScriptSetup) {
4783
4828
  if (isReservedPrefix(key[0])) {
4784
- warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4829
+ warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
4785
4830
  `which are reserved prefixes for Vue internals.`);
4786
4831
  return;
4787
4832
  }
@@ -4799,7 +4844,7 @@ var VueRuntimeDOM = (function (exports) {
4799
4844
  const cache = Object.create(null);
4800
4845
  return (type, key) => {
4801
4846
  if (cache[key]) {
4802
- warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
4847
+ warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4803
4848
  }
4804
4849
  else {
4805
4850
  cache[key] = type;
@@ -4816,7 +4861,7 @@ var VueRuntimeDOM = (function (exports) {
4816
4861
  // call beforeCreate first before accessing other options since
4817
4862
  // the hook may mutate resolved options (#2791)
4818
4863
  if (options.beforeCreate) {
4819
- callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4864
+ callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4820
4865
  }
4821
4866
  const {
4822
4867
  // state
@@ -4866,24 +4911,24 @@ var VueRuntimeDOM = (function (exports) {
4866
4911
  }
4867
4912
  }
4868
4913
  else {
4869
- warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4914
+ warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
4870
4915
  `Did you reference the function correctly?`);
4871
4916
  }
4872
4917
  }
4873
4918
  }
4874
4919
  if (dataOptions) {
4875
4920
  if (!isFunction(dataOptions)) {
4876
- warn$1(`The data option must be a function. ` +
4921
+ warn(`The data option must be a function. ` +
4877
4922
  `Plain object usage is no longer supported.`);
4878
4923
  }
4879
4924
  const data = dataOptions.call(publicThis, publicThis);
4880
4925
  if (isPromise(data)) {
4881
- warn$1(`data() returned a Promise - note data() cannot be async; If you ` +
4926
+ warn(`data() returned a Promise - note data() cannot be async; If you ` +
4882
4927
  `intend to perform data fetching before component renders, use ` +
4883
4928
  `async setup() + <Suspense>.`);
4884
4929
  }
4885
4930
  if (!isObject(data)) {
4886
- warn$1(`data() should return an object.`);
4931
+ warn(`data() should return an object.`);
4887
4932
  }
4888
4933
  else {
4889
4934
  instance.data = reactive(data);
@@ -4914,15 +4959,15 @@ var VueRuntimeDOM = (function (exports) {
4914
4959
  ? opt.get.bind(publicThis, publicThis)
4915
4960
  : NOOP;
4916
4961
  if (get === NOOP) {
4917
- warn$1(`Computed property "${key}" has no getter.`);
4962
+ warn(`Computed property "${key}" has no getter.`);
4918
4963
  }
4919
4964
  const set = !isFunction(opt) && isFunction(opt.set)
4920
4965
  ? opt.set.bind(publicThis)
4921
4966
  : () => {
4922
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
4967
+ warn(`Write operation failed: computed property "${key}" is readonly.`);
4923
4968
  }
4924
4969
  ;
4925
- const c = computed$1({
4970
+ const c = computed({
4926
4971
  get,
4927
4972
  set
4928
4973
  });
@@ -4951,7 +4996,7 @@ var VueRuntimeDOM = (function (exports) {
4951
4996
  });
4952
4997
  }
4953
4998
  if (created) {
4954
- callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
4999
+ callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
4955
5000
  }
4956
5001
  function registerLifecycleHook(register, hook) {
4957
5002
  if (isArray(hook)) {
@@ -5031,7 +5076,7 @@ var VueRuntimeDOM = (function (exports) {
5031
5076
  }
5032
5077
  else {
5033
5078
  {
5034
- warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5079
+ warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
5035
5080
  `and no longer needs \`.value\` in the next minor release. ` +
5036
5081
  `To opt-in to the new behavior now, ` +
5037
5082
  `set \`app.config.unwrapInjectedRef = true\` (this config is ` +
@@ -5048,7 +5093,7 @@ var VueRuntimeDOM = (function (exports) {
5048
5093
  }
5049
5094
  }
5050
5095
  }
5051
- function callHook(hook, instance, type) {
5096
+ function callHook$1(hook, instance, type) {
5052
5097
  callWithAsyncErrorHandling(isArray(hook)
5053
5098
  ? hook.map(h => h.bind(instance.proxy))
5054
5099
  : hook.bind(instance.proxy), instance, type);
@@ -5063,7 +5108,7 @@ var VueRuntimeDOM = (function (exports) {
5063
5108
  watch(getter, handler);
5064
5109
  }
5065
5110
  else {
5066
- warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
5111
+ warn(`Invalid watch handler specified by key "${raw}"`, handler);
5067
5112
  }
5068
5113
  }
5069
5114
  else if (isFunction(raw)) {
@@ -5081,12 +5126,12 @@ var VueRuntimeDOM = (function (exports) {
5081
5126
  watch(getter, handler, raw);
5082
5127
  }
5083
5128
  else {
5084
- warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5129
+ warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
5085
5130
  }
5086
5131
  }
5087
5132
  }
5088
5133
  else {
5089
- warn$1(`Invalid watch option: "${key}"`, raw);
5134
+ warn(`Invalid watch option: "${key}"`, raw);
5090
5135
  }
5091
5136
  }
5092
5137
  /**
@@ -5130,7 +5175,7 @@ var VueRuntimeDOM = (function (exports) {
5130
5175
  }
5131
5176
  for (const key in from) {
5132
5177
  if (asMixin && key === 'expose') {
5133
- warn$1(`"expose" option is ignored when declared in mixins or extends. ` +
5178
+ warn(`"expose" option is ignored when declared in mixins or extends. ` +
5134
5179
  `It should only be declared in the base component itself.`);
5135
5180
  }
5136
5181
  else {
@@ -5463,7 +5508,7 @@ var VueRuntimeDOM = (function (exports) {
5463
5508
  if (isArray(raw)) {
5464
5509
  for (let i = 0; i < raw.length; i++) {
5465
5510
  if (!isString(raw[i])) {
5466
- warn$1(`props must be strings when using array syntax.`, raw[i]);
5511
+ warn(`props must be strings when using array syntax.`, raw[i]);
5467
5512
  }
5468
5513
  const normalizedKey = camelize(raw[i]);
5469
5514
  if (validatePropName(normalizedKey)) {
@@ -5473,7 +5518,7 @@ var VueRuntimeDOM = (function (exports) {
5473
5518
  }
5474
5519
  else if (raw) {
5475
5520
  if (!isObject(raw)) {
5476
- warn$1(`invalid props options`, raw);
5521
+ warn(`invalid props options`, raw);
5477
5522
  }
5478
5523
  for (const key in raw) {
5479
5524
  const normalizedKey = camelize(key);
@@ -5506,15 +5551,15 @@ var VueRuntimeDOM = (function (exports) {
5506
5551
  return true;
5507
5552
  }
5508
5553
  else {
5509
- warn$1(`Invalid prop name: "${key}" is a reserved property.`);
5554
+ warn(`Invalid prop name: "${key}" is a reserved property.`);
5510
5555
  }
5511
5556
  return false;
5512
5557
  }
5513
5558
  // use function string name to check type constructors
5514
5559
  // so that it works across vms / iframes.
5515
5560
  function getType(ctor) {
5516
- const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
5517
- return match ? match[1] : ctor === null ? 'null' : '';
5561
+ const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
5562
+ return match ? match[2] : ctor === null ? 'null' : '';
5518
5563
  }
5519
5564
  function isSameType(a, b) {
5520
5565
  return getType(a) === getType(b);
@@ -5548,7 +5593,7 @@ var VueRuntimeDOM = (function (exports) {
5548
5593
  const { type, required, validator } = prop;
5549
5594
  // required!
5550
5595
  if (required && isAbsent) {
5551
- warn$1('Missing required prop: "' + name + '"');
5596
+ warn('Missing required prop: "' + name + '"');
5552
5597
  return;
5553
5598
  }
5554
5599
  // missing but optional
@@ -5567,13 +5612,13 @@ var VueRuntimeDOM = (function (exports) {
5567
5612
  isValid = valid;
5568
5613
  }
5569
5614
  if (!isValid) {
5570
- warn$1(getInvalidTypeMessage(name, value, expectedTypes));
5615
+ warn(getInvalidTypeMessage(name, value, expectedTypes));
5571
5616
  return;
5572
5617
  }
5573
5618
  }
5574
5619
  // custom validator
5575
5620
  if (validator && !validator(value)) {
5576
- warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
5621
+ warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5577
5622
  }
5578
5623
  }
5579
5624
  const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
@@ -5670,7 +5715,7 @@ var VueRuntimeDOM = (function (exports) {
5670
5715
  }
5671
5716
  const normalized = withCtx((...args) => {
5672
5717
  if (true && currentInstance) {
5673
- warn$1(`Slot "${key}" invoked outside of the render function: ` +
5718
+ warn(`Slot "${key}" invoked outside of the render function: ` +
5674
5719
  `this will not track dependencies used in the slot. ` +
5675
5720
  `Invoke the slot function inside the render function instead.`);
5676
5721
  }
@@ -5690,7 +5735,7 @@ var VueRuntimeDOM = (function (exports) {
5690
5735
  }
5691
5736
  else if (value != null) {
5692
5737
  {
5693
- warn$1(`Non-function value encountered for slot "${key}". ` +
5738
+ warn(`Non-function value encountered for slot "${key}". ` +
5694
5739
  `Prefer function slots for better performance.`);
5695
5740
  }
5696
5741
  const normalized = normalizeSlotValue(value);
@@ -5701,7 +5746,7 @@ var VueRuntimeDOM = (function (exports) {
5701
5746
  const normalizeVNodeSlots = (instance, children) => {
5702
5747
  if (!isKeepAlive(instance.vnode) &&
5703
5748
  !(false )) {
5704
- warn$1(`Non-function value encountered for default slot. ` +
5749
+ warn(`Non-function value encountered for default slot. ` +
5705
5750
  `Prefer function slots for better performance.`);
5706
5751
  }
5707
5752
  const normalized = normalizeSlotValue(children);
@@ -5802,21 +5847,21 @@ var VueRuntimeDOM = (function (exports) {
5802
5847
  emitsCache: new WeakMap()
5803
5848
  };
5804
5849
  }
5805
- let uid = 0;
5850
+ let uid$1 = 0;
5806
5851
  function createAppAPI(render, hydrate) {
5807
5852
  return function createApp(rootComponent, rootProps = null) {
5808
5853
  if (!isFunction(rootComponent)) {
5809
5854
  rootComponent = Object.assign({}, rootComponent);
5810
5855
  }
5811
5856
  if (rootProps != null && !isObject(rootProps)) {
5812
- warn$1(`root props passed to app.mount() must be an object.`);
5857
+ warn(`root props passed to app.mount() must be an object.`);
5813
5858
  rootProps = null;
5814
5859
  }
5815
5860
  const context = createAppContext();
5816
5861
  const installedPlugins = new Set();
5817
5862
  let isMounted = false;
5818
5863
  const app = (context.app = {
5819
- _uid: uid++,
5864
+ _uid: uid$1++,
5820
5865
  _component: rootComponent,
5821
5866
  _props: rootProps,
5822
5867
  _container: null,
@@ -5828,12 +5873,12 @@ var VueRuntimeDOM = (function (exports) {
5828
5873
  },
5829
5874
  set config(v) {
5830
5875
  {
5831
- warn$1(`app.config cannot be replaced. Modify individual options instead.`);
5876
+ warn(`app.config cannot be replaced. Modify individual options instead.`);
5832
5877
  }
5833
5878
  },
5834
5879
  use(plugin, ...options) {
5835
5880
  if (installedPlugins.has(plugin)) {
5836
- warn$1(`Plugin has already been applied to target app.`);
5881
+ warn(`Plugin has already been applied to target app.`);
5837
5882
  }
5838
5883
  else if (plugin && isFunction(plugin.install)) {
5839
5884
  installedPlugins.add(plugin);
@@ -5844,7 +5889,7 @@ var VueRuntimeDOM = (function (exports) {
5844
5889
  plugin(app, ...options);
5845
5890
  }
5846
5891
  else {
5847
- warn$1(`A plugin must either be a function or an object with an "install" ` +
5892
+ warn(`A plugin must either be a function or an object with an "install" ` +
5848
5893
  `function.`);
5849
5894
  }
5850
5895
  return app;
@@ -5855,7 +5900,7 @@ var VueRuntimeDOM = (function (exports) {
5855
5900
  context.mixins.push(mixin);
5856
5901
  }
5857
5902
  else {
5858
- warn$1('Mixin has already been applied to target app' +
5903
+ warn('Mixin has already been applied to target app' +
5859
5904
  (mixin.name ? `: ${mixin.name}` : ''));
5860
5905
  }
5861
5906
  }
@@ -5869,7 +5914,7 @@ var VueRuntimeDOM = (function (exports) {
5869
5914
  return context.components[name];
5870
5915
  }
5871
5916
  if (context.components[name]) {
5872
- warn$1(`Component "${name}" has already been registered in target app.`);
5917
+ warn(`Component "${name}" has already been registered in target app.`);
5873
5918
  }
5874
5919
  context.components[name] = component;
5875
5920
  return app;
@@ -5882,7 +5927,7 @@ var VueRuntimeDOM = (function (exports) {
5882
5927
  return context.directives[name];
5883
5928
  }
5884
5929
  if (context.directives[name]) {
5885
- warn$1(`Directive "${name}" has already been registered in target app.`);
5930
+ warn(`Directive "${name}" has already been registered in target app.`);
5886
5931
  }
5887
5932
  context.directives[name] = directive;
5888
5933
  return app;
@@ -5891,7 +5936,7 @@ var VueRuntimeDOM = (function (exports) {
5891
5936
  if (!isMounted) {
5892
5937
  // #5571
5893
5938
  if (rootContainer.__vue_app__) {
5894
- warn$1(`There is already an app instance mounted on the host container.\n` +
5939
+ warn(`There is already an app instance mounted on the host container.\n` +
5895
5940
  ` If you want to mount another app on the same host container,` +
5896
5941
  ` you need to unmount the previous app by calling \`app.unmount()\` first.`);
5897
5942
  }
@@ -5921,7 +5966,7 @@ var VueRuntimeDOM = (function (exports) {
5921
5966
  return getExposeProxy(vnode.component) || vnode.component.proxy;
5922
5967
  }
5923
5968
  else {
5924
- warn$1(`App has already been mounted.\n` +
5969
+ warn(`App has already been mounted.\n` +
5925
5970
  `If you want to remount the same app, move your app creation logic ` +
5926
5971
  `into a factory function and create fresh app instances for each ` +
5927
5972
  `mount - e.g. \`const createMyApp = () => createApp(App)\``);
@@ -5937,12 +5982,12 @@ var VueRuntimeDOM = (function (exports) {
5937
5982
  delete app._container.__vue_app__;
5938
5983
  }
5939
5984
  else {
5940
- warn$1(`Cannot unmount an app that is not mounted.`);
5985
+ warn(`Cannot unmount an app that is not mounted.`);
5941
5986
  }
5942
5987
  },
5943
5988
  provide(key, value) {
5944
5989
  if (key in context.provides) {
5945
- warn$1(`App already provides property with key "${String(key)}". ` +
5990
+ warn(`App already provides property with key "${String(key)}". ` +
5946
5991
  `It will be overwritten with the new value.`);
5947
5992
  }
5948
5993
  context.provides[key] = value;
@@ -5972,7 +6017,7 @@ var VueRuntimeDOM = (function (exports) {
5972
6017
  const value = isUnmount ? null : refValue;
5973
6018
  const { i: owner, r: ref } = rawRef;
5974
6019
  if (!owner) {
5975
- warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
6020
+ warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
5976
6021
  `A vnode with ref must be created inside the render function.`);
5977
6022
  return;
5978
6023
  }
@@ -6039,7 +6084,7 @@ var VueRuntimeDOM = (function (exports) {
6039
6084
  refs[rawRef.k] = value;
6040
6085
  }
6041
6086
  else {
6042
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6087
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6043
6088
  }
6044
6089
  };
6045
6090
  if (value) {
@@ -6051,7 +6096,7 @@ var VueRuntimeDOM = (function (exports) {
6051
6096
  }
6052
6097
  }
6053
6098
  else {
6054
- warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
6099
+ warn('Invalid template ref type:', ref, `(${typeof ref})`);
6055
6100
  }
6056
6101
  }
6057
6102
  }
@@ -6068,7 +6113,7 @@ var VueRuntimeDOM = (function (exports) {
6068
6113
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
6069
6114
  const hydrate = (vnode, container) => {
6070
6115
  if (!container.hasChildNodes()) {
6071
- warn$1(`Attempting to hydrate existing markup but container is empty. ` +
6116
+ warn(`Attempting to hydrate existing markup but container is empty. ` +
6072
6117
  `Performing full mount instead.`);
6073
6118
  patch(null, vnode, container);
6074
6119
  flushPostFlushCbs();
@@ -6111,7 +6156,7 @@ var VueRuntimeDOM = (function (exports) {
6111
6156
  else {
6112
6157
  if (node.data !== vnode.children) {
6113
6158
  hasMismatch = true;
6114
- warn$1(`Hydration text mismatch:` +
6159
+ warn(`Hydration text mismatch:` +
6115
6160
  `\n- Client: ${JSON.stringify(node.data)}` +
6116
6161
  `\n- Server: ${JSON.stringify(vnode.children)}`);
6117
6162
  node.data = vnode.children;
@@ -6226,7 +6271,7 @@ var VueRuntimeDOM = (function (exports) {
6226
6271
  nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
6227
6272
  }
6228
6273
  else {
6229
- warn$1('Invalid HostVNode type:', type, `(${typeof type})`);
6274
+ warn('Invalid HostVNode type:', type, `(${typeof type})`);
6230
6275
  }
6231
6276
  }
6232
6277
  if (ref != null) {
@@ -6287,7 +6332,7 @@ var VueRuntimeDOM = (function (exports) {
6287
6332
  while (next) {
6288
6333
  hasMismatch = true;
6289
6334
  if (!hasWarned) {
6290
- warn$1(`Hydration children mismatch in <${vnode.type}>: ` +
6335
+ warn(`Hydration children mismatch in <${vnode.type}>: ` +
6291
6336
  `server rendered element contains more child nodes than client vdom.`);
6292
6337
  hasWarned = true;
6293
6338
  }
@@ -6300,7 +6345,7 @@ var VueRuntimeDOM = (function (exports) {
6300
6345
  else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
6301
6346
  if (el.textContent !== vnode.children) {
6302
6347
  hasMismatch = true;
6303
- warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
6348
+ warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
6304
6349
  `- Client: ${el.textContent}\n` +
6305
6350
  `- Server: ${vnode.children}`);
6306
6351
  el.textContent = vnode.children;
@@ -6327,7 +6372,7 @@ var VueRuntimeDOM = (function (exports) {
6327
6372
  else {
6328
6373
  hasMismatch = true;
6329
6374
  if (!hasWarned) {
6330
- warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6375
+ warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
6331
6376
  `server rendered element contains fewer child nodes than client vdom.`);
6332
6377
  hasWarned = true;
6333
6378
  }
@@ -6360,7 +6405,7 @@ var VueRuntimeDOM = (function (exports) {
6360
6405
  };
6361
6406
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
6362
6407
  hasMismatch = true;
6363
- warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6408
+ warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
6364
6409
  ? `(text)`
6365
6410
  : isComment(node) && node.data === '['
6366
6411
  ? `(start of fragment)`
@@ -6528,7 +6573,7 @@ var VueRuntimeDOM = (function (exports) {
6528
6573
  type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
6529
6574
  }
6530
6575
  else {
6531
- warn$1('Invalid VNode type:', type, `(${typeof type})`);
6576
+ warn('Invalid VNode type:', type, `(${typeof type})`);
6532
6577
  }
6533
6578
  }
6534
6579
  // set ref
@@ -6618,6 +6663,8 @@ var VueRuntimeDOM = (function (exports) {
6618
6663
  if (dirs) {
6619
6664
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6620
6665
  }
6666
+ // scopeId
6667
+ setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6621
6668
  // props
6622
6669
  if (props) {
6623
6670
  for (const key in props) {
@@ -6641,8 +6688,6 @@ var VueRuntimeDOM = (function (exports) {
6641
6688
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
6642
6689
  }
6643
6690
  }
6644
- // scopeId
6645
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6646
6691
  {
6647
6692
  Object.defineProperty(el, '__vnode', {
6648
6693
  value: vnode,
@@ -7352,7 +7397,7 @@ var VueRuntimeDOM = (function (exports) {
7352
7397
  : normalizeVNode(c2[i]));
7353
7398
  if (nextChild.key != null) {
7354
7399
  if (keyToNewIndexMap.has(nextChild.key)) {
7355
- warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7400
+ warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
7356
7401
  }
7357
7402
  keyToNewIndexMap.set(nextChild.key, i);
7358
7403
  }
@@ -7735,6 +7780,10 @@ var VueRuntimeDOM = (function (exports) {
7735
7780
  if (!shallow)
7736
7781
  traverseStaticChildren(c1, c2);
7737
7782
  }
7783
+ // #6852 also inherit for text nodes
7784
+ if (c2.type === Text) {
7785
+ c2.el = c1.el;
7786
+ }
7738
7787
  // also inherit for comment nodes, but not placeholders (e.g. v-if which
7739
7788
  // would have received .el during block patch)
7740
7789
  if (c2.type === Comment && !c2.el) {
@@ -7793,14 +7842,14 @@ var VueRuntimeDOM = (function (exports) {
7793
7842
  const targetSelector = props && props.to;
7794
7843
  if (isString(targetSelector)) {
7795
7844
  if (!select) {
7796
- warn$1(`Current renderer does not support string target for Teleports. ` +
7845
+ warn(`Current renderer does not support string target for Teleports. ` +
7797
7846
  `(missing querySelector renderer option)`);
7798
7847
  return null;
7799
7848
  }
7800
7849
  else {
7801
7850
  const target = select(targetSelector);
7802
7851
  if (!target) {
7803
- warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7852
+ warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
7804
7853
  `Note the target element must exist before the component is mounted - ` +
7805
7854
  `i.e. the target cannot be rendered by the component itself, and ` +
7806
7855
  `ideally should be outside of the entire Vue component tree.`);
@@ -7810,7 +7859,7 @@ var VueRuntimeDOM = (function (exports) {
7810
7859
  }
7811
7860
  else {
7812
7861
  if (!targetSelector && !isTeleportDisabled(props)) {
7813
- warn$1(`Invalid Teleport target: ${targetSelector}`);
7862
+ warn(`Invalid Teleport target: ${targetSelector}`);
7814
7863
  }
7815
7864
  return targetSelector;
7816
7865
  }
@@ -7843,7 +7892,7 @@ var VueRuntimeDOM = (function (exports) {
7843
7892
  isSVG = isSVG || isTargetSVG(target);
7844
7893
  }
7845
7894
  else if (!disabled) {
7846
- warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`);
7895
+ warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
7847
7896
  }
7848
7897
  const mount = (container, anchor) => {
7849
7898
  // Teleport *always* has Array children. This is enforced in both the
@@ -7895,7 +7944,7 @@ var VueRuntimeDOM = (function (exports) {
7895
7944
  moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
7896
7945
  }
7897
7946
  else {
7898
- warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
7947
+ warn('Invalid Teleport target on update:', target, `(${typeof target})`);
7899
7948
  }
7900
7949
  }
7901
7950
  else if (wasDisabled) {
@@ -7905,6 +7954,7 @@ var VueRuntimeDOM = (function (exports) {
7905
7954
  }
7906
7955
  }
7907
7956
  }
7957
+ updateCssVars(n2);
7908
7958
  },
7909
7959
  remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
7910
7960
  const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
@@ -7983,11 +8033,26 @@ var VueRuntimeDOM = (function (exports) {
7983
8033
  hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
7984
8034
  }
7985
8035
  }
8036
+ updateCssVars(vnode);
7986
8037
  }
7987
8038
  return vnode.anchor && nextSibling(vnode.anchor);
7988
8039
  }
7989
8040
  // Force-casted public typing for h and TSX props inference
7990
8041
  const Teleport = TeleportImpl;
8042
+ function updateCssVars(vnode) {
8043
+ // presence of .ut method indicates owner component uses css vars.
8044
+ // code path here can assume browser environment.
8045
+ const ctx = vnode.ctx;
8046
+ if (ctx && ctx.ut) {
8047
+ let node = vnode.children[0].el;
8048
+ while (node !== vnode.targetAnchor) {
8049
+ if (node.nodeType === 1)
8050
+ node.setAttribute('data-v-owner', ctx.uid);
8051
+ node = node.nextSibling;
8052
+ }
8053
+ ctx.ut();
8054
+ }
8055
+ }
7991
8056
 
7992
8057
  const Fragment = Symbol('Fragment' );
7993
8058
  const Text = Symbol('Text' );
@@ -8082,6 +8147,10 @@ var VueRuntimeDOM = (function (exports) {
8082
8147
  function isSameVNodeType(n1, n2) {
8083
8148
  if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
8084
8149
  hmrDirtyComponents.has(n2.type)) {
8150
+ // #7042, ensure the vnode being unmounted during HMR
8151
+ // bitwise operations to remove keep alive flags
8152
+ n1.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
8153
+ n2.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
8085
8154
  // HMR only: if the component has been hot-updated, force a reload.
8086
8155
  return false;
8087
8156
  }
@@ -8137,7 +8206,8 @@ var VueRuntimeDOM = (function (exports) {
8137
8206
  patchFlag,
8138
8207
  dynamicProps,
8139
8208
  dynamicChildren: null,
8140
- appContext: null
8209
+ appContext: null,
8210
+ ctx: currentRenderingInstance
8141
8211
  };
8142
8212
  if (needFullChildrenNormalization) {
8143
8213
  normalizeChildren(vnode, children);
@@ -8155,7 +8225,7 @@ var VueRuntimeDOM = (function (exports) {
8155
8225
  }
8156
8226
  // validate key
8157
8227
  if (vnode.key !== vnode.key) {
8158
- warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8228
+ warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
8159
8229
  }
8160
8230
  // track vnode for block tree
8161
8231
  if (isBlockTreeEnabled > 0 &&
@@ -8179,7 +8249,7 @@ var VueRuntimeDOM = (function (exports) {
8179
8249
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
8180
8250
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
8181
8251
  if (!type) {
8182
- warn$1(`Invalid vnode type when creating vnode: ${type}.`);
8252
+ warn(`Invalid vnode type when creating vnode: ${type}.`);
8183
8253
  }
8184
8254
  type = Comment;
8185
8255
  }
@@ -8237,7 +8307,7 @@ var VueRuntimeDOM = (function (exports) {
8237
8307
  : 0;
8238
8308
  if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
8239
8309
  type = toRaw(type);
8240
- warn$1(`Vue received a Component which was made a reactive object. This can ` +
8310
+ warn(`Vue received a Component which was made a reactive object. This can ` +
8241
8311
  `lead to unnecessary performance overhead, and should be avoided by ` +
8242
8312
  `marking the component with \`markRaw\` or using \`shallowRef\` ` +
8243
8313
  `instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
@@ -8304,7 +8374,9 @@ var VueRuntimeDOM = (function (exports) {
8304
8374
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
8305
8375
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8306
8376
  el: vnode.el,
8307
- anchor: vnode.anchor
8377
+ anchor: vnode.anchor,
8378
+ ctx: vnode.ctx,
8379
+ ce: vnode.ce
8308
8380
  };
8309
8381
  return cloned;
8310
8382
  }
@@ -8471,13 +8543,13 @@ var VueRuntimeDOM = (function (exports) {
8471
8543
  }
8472
8544
 
8473
8545
  const emptyAppContext = createAppContext();
8474
- let uid$1 = 0;
8546
+ let uid = 0;
8475
8547
  function createComponentInstance(vnode, parent, suspense) {
8476
8548
  const type = vnode.type;
8477
8549
  // inherit parent app context - or - if root, adopt from root vnode
8478
8550
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
8479
8551
  const instance = {
8480
- uid: uid$1++,
8552
+ uid: uid++,
8481
8553
  vnode,
8482
8554
  type,
8483
8555
  parent,
@@ -8547,7 +8619,7 @@ var VueRuntimeDOM = (function (exports) {
8547
8619
  instance.ctx = createDevRenderContext(instance);
8548
8620
  }
8549
8621
  instance.root = parent ? parent.root : instance;
8550
- instance.emit = emit$1.bind(null, instance);
8622
+ instance.emit = emit.bind(null, instance);
8551
8623
  // apply custom element special handling
8552
8624
  if (vnode.ce) {
8553
8625
  vnode.ce(instance);
@@ -8568,7 +8640,7 @@ var VueRuntimeDOM = (function (exports) {
8568
8640
  function validateComponentName(name, config) {
8569
8641
  const appIsNativeTag = config.isNativeTag || NO;
8570
8642
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
8571
- warn$1('Do not use built-in or reserved HTML elements as component id: ' + name);
8643
+ warn('Do not use built-in or reserved HTML elements as component id: ' + name);
8572
8644
  }
8573
8645
  }
8574
8646
  function isStatefulComponent(instance) {
@@ -8607,7 +8679,7 @@ var VueRuntimeDOM = (function (exports) {
8607
8679
  }
8608
8680
  }
8609
8681
  if (Component.compilerOptions && isRuntimeOnly()) {
8610
- warn$1(`"compilerOptions" is only supported when using a build of Vue that ` +
8682
+ warn(`"compilerOptions" is only supported when using a build of Vue that ` +
8611
8683
  `includes the runtime compiler. Since you are using a runtime-only ` +
8612
8684
  `build, the options should be passed via your build tool config instead.`);
8613
8685
  }
@@ -8648,7 +8720,7 @@ var VueRuntimeDOM = (function (exports) {
8648
8720
  instance.asyncDep = setupResult;
8649
8721
  if (!instance.suspense) {
8650
8722
  const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
8651
- warn$1(`Component <${name}>: setup function returned a promise, but no ` +
8723
+ warn(`Component <${name}>: setup function returned a promise, but no ` +
8652
8724
  `<Suspense> boundary was found in the parent component tree. ` +
8653
8725
  `A component with async setup() must be nested in a <Suspense> ` +
8654
8726
  `in order to be rendered.`);
@@ -8672,7 +8744,7 @@ var VueRuntimeDOM = (function (exports) {
8672
8744
  }
8673
8745
  else if (isObject(setupResult)) {
8674
8746
  if (isVNode(setupResult)) {
8675
- warn$1(`setup() should not return VNodes directly - ` +
8747
+ warn(`setup() should not return VNodes directly - ` +
8676
8748
  `return a render function instead.`);
8677
8749
  }
8678
8750
  // setup returned bindings.
@@ -8686,7 +8758,7 @@ var VueRuntimeDOM = (function (exports) {
8686
8758
  }
8687
8759
  }
8688
8760
  else if (setupResult !== undefined) {
8689
- warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8761
+ warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
8690
8762
  }
8691
8763
  finishComponentSetup(instance, isSSR);
8692
8764
  }
@@ -8753,13 +8825,13 @@ var VueRuntimeDOM = (function (exports) {
8753
8825
  if (!Component.render && instance.render === NOOP && !isSSR) {
8754
8826
  /* istanbul ignore if */
8755
8827
  if (!compile && Component.template) {
8756
- warn$1(`Component provided template option but ` +
8828
+ warn(`Component provided template option but ` +
8757
8829
  `runtime compilation is not supported in this build of Vue.` +
8758
8830
  (` Use "vue.global.js" instead.`
8759
8831
  ) /* should not happen */);
8760
8832
  }
8761
8833
  else {
8762
- warn$1(`Component is missing template or render function.`);
8834
+ warn(`Component is missing template or render function.`);
8763
8835
  }
8764
8836
  }
8765
8837
  }
@@ -8771,11 +8843,11 @@ var VueRuntimeDOM = (function (exports) {
8771
8843
  return target[key];
8772
8844
  },
8773
8845
  set() {
8774
- warn$1(`setupContext.attrs is readonly.`);
8846
+ warn(`setupContext.attrs is readonly.`);
8775
8847
  return false;
8776
8848
  },
8777
8849
  deleteProperty() {
8778
- warn$1(`setupContext.attrs is readonly.`);
8850
+ warn(`setupContext.attrs is readonly.`);
8779
8851
  return false;
8780
8852
  }
8781
8853
  }
@@ -8783,8 +8855,24 @@ var VueRuntimeDOM = (function (exports) {
8783
8855
  }
8784
8856
  function createSetupContext(instance) {
8785
8857
  const expose = exposed => {
8786
- if (instance.exposed) {
8787
- warn$1(`expose() should be called only once per setup().`);
8858
+ {
8859
+ if (instance.exposed) {
8860
+ warn(`expose() should be called only once per setup().`);
8861
+ }
8862
+ if (exposed != null) {
8863
+ let exposedType = typeof exposed;
8864
+ if (exposedType === 'object') {
8865
+ if (isArray(exposed)) {
8866
+ exposedType = 'array';
8867
+ }
8868
+ else if (isRef(exposed)) {
8869
+ exposedType = 'ref';
8870
+ }
8871
+ }
8872
+ if (exposedType !== 'object') {
8873
+ warn(`expose() should be passed a plain object, received ${exposedType}.`);
8874
+ }
8875
+ }
8788
8876
  }
8789
8877
  instance.exposed = exposed || {};
8790
8878
  };
@@ -8859,13 +8947,13 @@ var VueRuntimeDOM = (function (exports) {
8859
8947
  return isFunction(value) && '__vccOpts' in value;
8860
8948
  }
8861
8949
 
8862
- const computed$1 = ((getterOrOptions, debugOptions) => {
8950
+ const computed = ((getterOrOptions, debugOptions) => {
8863
8951
  // @ts-ignore
8864
- return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
8952
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8865
8953
  });
8866
8954
 
8867
8955
  // dev only
8868
- const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` +
8956
+ const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
8869
8957
  `<script setup> of a single file component. Its arguments should be ` +
8870
8958
  `compiled away and passing it at runtime has no effect.`);
8871
8959
  // implementation
@@ -8932,7 +9020,7 @@ var VueRuntimeDOM = (function (exports) {
8932
9020
  function getContext() {
8933
9021
  const i = getCurrentInstance();
8934
9022
  if (!i) {
8935
- warn$1(`useContext() called without active instance.`);
9023
+ warn(`useContext() called without active instance.`);
8936
9024
  }
8937
9025
  return i.setupContext || (i.setupContext = createSetupContext(i));
8938
9026
  }
@@ -8959,7 +9047,7 @@ var VueRuntimeDOM = (function (exports) {
8959
9047
  props[key] = { default: defaults[key] };
8960
9048
  }
8961
9049
  else {
8962
- warn$1(`props default key "${key}" has no corresponding declaration.`);
9050
+ warn(`props default key "${key}" has no corresponding declaration.`);
8963
9051
  }
8964
9052
  }
8965
9053
  return props;
@@ -9002,7 +9090,7 @@ var VueRuntimeDOM = (function (exports) {
9002
9090
  function withAsyncContext(getAwaitable) {
9003
9091
  const ctx = getCurrentInstance();
9004
9092
  if (!ctx) {
9005
- warn$1(`withAsyncContext called without active current instance. ` +
9093
+ warn(`withAsyncContext called without active current instance. ` +
9006
9094
  `This is likely a bug.`);
9007
9095
  }
9008
9096
  let awaitable = getAwaitable();
@@ -9047,7 +9135,7 @@ var VueRuntimeDOM = (function (exports) {
9047
9135
  const ssrContextKey = Symbol(`ssrContext` );
9048
9136
  const useSSRContext = () => {
9049
9137
  {
9050
- warn$1(`useSSRContext() is not supported in the global build.`);
9138
+ warn(`useSSRContext() is not supported in the global build.`);
9051
9139
  }
9052
9140
  };
9053
9141
 
@@ -9268,7 +9356,7 @@ var VueRuntimeDOM = (function (exports) {
9268
9356
  }
9269
9357
 
9270
9358
  // Core API ------------------------------------------------------------------
9271
- const version = "3.2.44";
9359
+ const version = "3.2.46";
9272
9360
  /**
9273
9361
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9274
9362
  * @internal
@@ -9385,9 +9473,6 @@ var VueRuntimeDOM = (function (exports) {
9385
9473
  const style = el.style;
9386
9474
  const isCssString = isString(next);
9387
9475
  if (next && !isCssString) {
9388
- for (const key in next) {
9389
- setStyle(style, key, next[key]);
9390
- }
9391
9476
  if (prev && !isString(prev)) {
9392
9477
  for (const key in prev) {
9393
9478
  if (next[key] == null) {
@@ -9395,6 +9480,9 @@ var VueRuntimeDOM = (function (exports) {
9395
9480
  }
9396
9481
  }
9397
9482
  }
9483
+ for (const key in next) {
9484
+ setStyle(style, key, next[key]);
9485
+ }
9398
9486
  }
9399
9487
  else {
9400
9488
  const currentDisplay = style.display;
@@ -9425,7 +9513,7 @@ var VueRuntimeDOM = (function (exports) {
9425
9513
  val = '';
9426
9514
  {
9427
9515
  if (semicolonRE.test(val)) {
9428
- warn$1(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9516
+ warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
9429
9517
  }
9430
9518
  }
9431
9519
  if (name.startsWith('--')) {
@@ -9549,7 +9637,7 @@ var VueRuntimeDOM = (function (exports) {
9549
9637
  catch (e) {
9550
9638
  // do not warn if value is auto-coerced from nullish values
9551
9639
  if (!needRemove) {
9552
- warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9640
+ warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
9553
9641
  `value ${value} is invalid.`, e);
9554
9642
  }
9555
9643
  }
@@ -9753,16 +9841,25 @@ var VueRuntimeDOM = (function (exports) {
9753
9841
  }
9754
9842
  else {
9755
9843
  if (this.shadowRoot) {
9756
- warn$1(`Custom element has pre-rendered declarative shadow root but is not ` +
9844
+ warn(`Custom element has pre-rendered declarative shadow root but is not ` +
9757
9845
  `defined as hydratable. Use \`defineSSRCustomElement\`.`);
9758
9846
  }
9759
9847
  this.attachShadow({ mode: 'open' });
9848
+ if (!this._def.__asyncLoader) {
9849
+ // for sync component defs we can immediately resolve props
9850
+ this._resolveProps(this._def);
9851
+ }
9760
9852
  }
9761
9853
  }
9762
9854
  connectedCallback() {
9763
9855
  this._connected = true;
9764
9856
  if (!this._instance) {
9765
- this._resolveDef();
9857
+ if (this._resolved) {
9858
+ this._update();
9859
+ }
9860
+ else {
9861
+ this._resolveDef();
9862
+ }
9766
9863
  }
9767
9864
  }
9768
9865
  disconnectedCallback() {
@@ -9778,9 +9875,6 @@ var VueRuntimeDOM = (function (exports) {
9778
9875
  * resolve inner component definition (handle possible async component)
9779
9876
  */
9780
9877
  _resolveDef() {
9781
- if (this._resolved) {
9782
- return;
9783
- }
9784
9878
  this._resolved = true;
9785
9879
  // set initial attrs
9786
9880
  for (let i = 0; i < this.attributes.length; i++) {
@@ -9792,38 +9886,26 @@ var VueRuntimeDOM = (function (exports) {
9792
9886
  this._setAttr(m.attributeName);
9793
9887
  }
9794
9888
  }).observe(this, { attributes: true });
9795
- const resolve = (def) => {
9796
- const { props = {}, styles } = def;
9797
- const hasOptions = !isArray(props);
9798
- const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
9889
+ const resolve = (def, isAsync = false) => {
9890
+ const { props, styles } = def;
9799
9891
  // cast Number-type props set before resolve
9800
9892
  let numberProps;
9801
- if (hasOptions) {
9802
- for (const key in this._props) {
9893
+ if (props && !isArray(props)) {
9894
+ for (const key in props) {
9803
9895
  const opt = props[key];
9804
9896
  if (opt === Number || (opt && opt.type === Number)) {
9805
- this._props[key] = toNumber(this._props[key]);
9806
- (numberProps || (numberProps = Object.create(null)))[key] = true;
9897
+ if (key in this._props) {
9898
+ this._props[key] = toNumber(this._props[key]);
9899
+ }
9900
+ (numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
9807
9901
  }
9808
9902
  }
9809
9903
  }
9810
9904
  this._numberProps = numberProps;
9811
- // check if there are props set pre-upgrade or connect
9812
- for (const key of Object.keys(this)) {
9813
- if (key[0] !== '_') {
9814
- this._setProp(key, this[key], true, false);
9815
- }
9816
- }
9817
- // defining getter/setters on prototype
9818
- for (const key of rawKeys.map(camelize)) {
9819
- Object.defineProperty(this, key, {
9820
- get() {
9821
- return this._getProp(key);
9822
- },
9823
- set(val) {
9824
- this._setProp(key, val);
9825
- }
9826
- });
9905
+ if (isAsync) {
9906
+ // defining getter/setters on prototype
9907
+ // for sync defs, this already happened in the constructor
9908
+ this._resolveProps(def);
9827
9909
  }
9828
9910
  // apply CSS
9829
9911
  this._applyStyles(styles);
@@ -9832,12 +9914,33 @@ var VueRuntimeDOM = (function (exports) {
9832
9914
  };
9833
9915
  const asyncDef = this._def.__asyncLoader;
9834
9916
  if (asyncDef) {
9835
- asyncDef().then(resolve);
9917
+ asyncDef().then(def => resolve(def, true));
9836
9918
  }
9837
9919
  else {
9838
9920
  resolve(this._def);
9839
9921
  }
9840
9922
  }
9923
+ _resolveProps(def) {
9924
+ const { props } = def;
9925
+ const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
9926
+ // check if there are props set pre-upgrade or connect
9927
+ for (const key of Object.keys(this)) {
9928
+ if (key[0] !== '_' && declaredPropKeys.includes(key)) {
9929
+ this._setProp(key, this[key], true, false);
9930
+ }
9931
+ }
9932
+ // defining getter/setters on prototype
9933
+ for (const key of declaredPropKeys.map(camelize)) {
9934
+ Object.defineProperty(this, key, {
9935
+ get() {
9936
+ return this._getProp(key);
9937
+ },
9938
+ set(val) {
9939
+ this._setProp(key, val);
9940
+ }
9941
+ });
9942
+ }
9943
+ }
9841
9944
  _setAttr(key) {
9842
9945
  let value = this.getAttribute(key);
9843
9946
  const camelKey = camelize(key);
@@ -9893,27 +9996,31 @@ var VueRuntimeDOM = (function (exports) {
9893
9996
  this._styles.length = 0;
9894
9997
  }
9895
9998
  this._applyStyles(newStyles);
9896
- // if this is an async component, ceReload is called from the inner
9897
- // component so no need to reload the async wrapper
9898
- if (!this._def.__asyncLoader) {
9899
- // reload
9900
- this._instance = null;
9901
- this._update();
9902
- }
9999
+ this._instance = null;
10000
+ this._update();
9903
10001
  };
9904
10002
  }
9905
- // intercept emit
9906
- instance.emit = (event, ...args) => {
10003
+ const dispatch = (event, args) => {
9907
10004
  this.dispatchEvent(new CustomEvent(event, {
9908
10005
  detail: args
9909
10006
  }));
9910
10007
  };
10008
+ // intercept emit
10009
+ instance.emit = (event, ...args) => {
10010
+ // dispatch both the raw and hyphenated versions of an event
10011
+ // to match Vue behavior
10012
+ dispatch(event, args);
10013
+ if (hyphenate(event) !== event) {
10014
+ dispatch(hyphenate(event), args);
10015
+ }
10016
+ };
9911
10017
  // locate nearest Vue custom element parent for provide/inject
9912
10018
  let parent = this;
9913
10019
  while ((parent =
9914
10020
  parent && (parent.parentNode || parent.host))) {
9915
10021
  if (parent instanceof VueElement) {
9916
10022
  instance.parent = parent._instance;
10023
+ instance.provides = parent._instance.provides;
9917
10024
  break;
9918
10025
  }
9919
10026
  }
@@ -9940,7 +10047,7 @@ var VueRuntimeDOM = (function (exports) {
9940
10047
  /* istanbul ignore else */
9941
10048
  {
9942
10049
  {
9943
- warn$1(`useCssModule() is not supported in the global build.`);
10050
+ warn(`useCssModule() is not supported in the global build.`);
9944
10051
  }
9945
10052
  return EMPTY_OBJ;
9946
10053
  }
@@ -9954,10 +10061,17 @@ var VueRuntimeDOM = (function (exports) {
9954
10061
  const instance = getCurrentInstance();
9955
10062
  /* istanbul ignore next */
9956
10063
  if (!instance) {
9957
- warn$1(`useCssVars is called without current active component instance.`);
10064
+ warn(`useCssVars is called without current active component instance.`);
9958
10065
  return;
9959
10066
  }
9960
- const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));
10067
+ const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
10068
+ Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node => setVarsOnNode(node, vars));
10069
+ });
10070
+ const setVars = () => {
10071
+ const vars = getter(instance.proxy);
10072
+ setVarsOnVNode(instance.subTree, vars);
10073
+ updateTeleports(vars);
10074
+ };
9961
10075
  watchPostEffect(setVars);
9962
10076
  onMounted(() => {
9963
10077
  const ob = new MutationObserver(setVars);
@@ -10034,7 +10148,7 @@ var VueRuntimeDOM = (function (exports) {
10034
10148
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
10035
10149
  * with custom HOCs.
10036
10150
  */
10037
- const callHook$1 = (hook, args = []) => {
10151
+ const callHook = (hook, args = []) => {
10038
10152
  if (isArray(hook)) {
10039
10153
  hook.forEach(h => h(...args));
10040
10154
  }
@@ -10084,7 +10198,7 @@ var VueRuntimeDOM = (function (exports) {
10084
10198
  return (el, done) => {
10085
10199
  const hook = isAppear ? onAppear : onEnter;
10086
10200
  const resolve = () => finishEnter(el, isAppear, done);
10087
- callHook$1(hook, [el, resolve]);
10201
+ callHook(hook, [el, resolve]);
10088
10202
  nextFrame(() => {
10089
10203
  removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
10090
10204
  addTransitionClass(el, isAppear ? appearToClass : enterToClass);
@@ -10096,12 +10210,12 @@ var VueRuntimeDOM = (function (exports) {
10096
10210
  };
10097
10211
  return extend(baseProps, {
10098
10212
  onBeforeEnter(el) {
10099
- callHook$1(onBeforeEnter, [el]);
10213
+ callHook(onBeforeEnter, [el]);
10100
10214
  addTransitionClass(el, enterFromClass);
10101
10215
  addTransitionClass(el, enterActiveClass);
10102
10216
  },
10103
10217
  onBeforeAppear(el) {
10104
- callHook$1(onBeforeAppear, [el]);
10218
+ callHook(onBeforeAppear, [el]);
10105
10219
  addTransitionClass(el, appearFromClass);
10106
10220
  addTransitionClass(el, appearActiveClass);
10107
10221
  },
@@ -10125,19 +10239,19 @@ var VueRuntimeDOM = (function (exports) {
10125
10239
  whenTransitionEnds(el, type, leaveDuration, resolve);
10126
10240
  }
10127
10241
  });
10128
- callHook$1(onLeave, [el, resolve]);
10242
+ callHook(onLeave, [el, resolve]);
10129
10243
  },
10130
10244
  onEnterCancelled(el) {
10131
10245
  finishEnter(el, false);
10132
- callHook$1(onEnterCancelled, [el]);
10246
+ callHook(onEnterCancelled, [el]);
10133
10247
  },
10134
10248
  onAppearCancelled(el) {
10135
10249
  finishEnter(el, true);
10136
- callHook$1(onAppearCancelled, [el]);
10250
+ callHook(onAppearCancelled, [el]);
10137
10251
  },
10138
10252
  onLeaveCancelled(el) {
10139
10253
  finishLeave(el);
10140
- callHook$1(onLeaveCancelled, [el]);
10254
+ callHook(onLeaveCancelled, [el]);
10141
10255
  }
10142
10256
  });
10143
10257
  }
@@ -10155,18 +10269,10 @@ var VueRuntimeDOM = (function (exports) {
10155
10269
  }
10156
10270
  function NumberOf(val) {
10157
10271
  const res = toNumber(val);
10158
- validateDuration(res);
10159
- return res;
10160
- }
10161
- function validateDuration(val) {
10162
- if (typeof val !== 'number') {
10163
- warn$1(`<transition> explicit duration is not a valid number - ` +
10164
- `got ${JSON.stringify(val)}.`);
10165
- }
10166
- else if (isNaN(val)) {
10167
- warn$1(`<transition> explicit duration is NaN - ` +
10168
- 'the duration expression might be incorrect.');
10272
+ {
10273
+ assertNumber(res, '<transition> explicit duration');
10169
10274
  }
10275
+ return res;
10170
10276
  }
10171
10277
  function addTransitionClass(el, cls) {
10172
10278
  cls.split(/\s+/).forEach(c => c && el.classList.add(c));
@@ -10349,7 +10455,7 @@ var VueRuntimeDOM = (function (exports) {
10349
10455
  setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
10350
10456
  }
10351
10457
  else {
10352
- warn$1(`<TransitionGroup> children must be keyed.`);
10458
+ warn(`<TransitionGroup> children must be keyed.`);
10353
10459
  }
10354
10460
  }
10355
10461
  if (prevChildren) {
@@ -10363,6 +10469,14 @@ var VueRuntimeDOM = (function (exports) {
10363
10469
  };
10364
10470
  }
10365
10471
  };
10472
+ /**
10473
+ * TransitionGroup does not support "mode" so we need to remove it from the
10474
+ * props declarations, but direct delete operation is considered a side effect
10475
+ * and will make the entire transition feature non-tree-shakeable, so we do it
10476
+ * in a function and mark the function's invocation as pure.
10477
+ */
10478
+ const removeMode = (props) => delete props.mode;
10479
+ /*#__PURE__*/ removeMode(TransitionGroupImpl.props);
10366
10480
  const TransitionGroup = TransitionGroupImpl;
10367
10481
  function callPendingCbs(c) {
10368
10482
  const el = c.el;
@@ -10438,7 +10552,7 @@ var VueRuntimeDOM = (function (exports) {
10438
10552
  domValue = domValue.trim();
10439
10553
  }
10440
10554
  if (castToNumber) {
10441
- domValue = toNumber(domValue);
10555
+ domValue = looseToNumber(domValue);
10442
10556
  }
10443
10557
  el._assign(domValue);
10444
10558
  });
@@ -10473,7 +10587,8 @@ var VueRuntimeDOM = (function (exports) {
10473
10587
  if (trim && el.value.trim() === value) {
10474
10588
  return;
10475
10589
  }
10476
- if ((number || el.type === 'number') && toNumber(el.value) === value) {
10590
+ if ((number || el.type === 'number') &&
10591
+ looseToNumber(el.value) === value) {
10477
10592
  return;
10478
10593
  }
10479
10594
  }
@@ -10562,7 +10677,7 @@ var VueRuntimeDOM = (function (exports) {
10562
10677
  addEventListener(el, 'change', () => {
10563
10678
  const selectedVal = Array.prototype.filter
10564
10679
  .call(el.options, (o) => o.selected)
10565
- .map((o) => number ? toNumber(getValue(o)) : getValue(o));
10680
+ .map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
10566
10681
  el._assign(el.multiple
10567
10682
  ? isSetModel
10568
10683
  ? new Set(selectedVal)
@@ -10586,7 +10701,7 @@ var VueRuntimeDOM = (function (exports) {
10586
10701
  function setSelected(el, value) {
10587
10702
  const isMultiple = el.multiple;
10588
10703
  if (isMultiple && !isArray(value) && !isSet(value)) {
10589
- warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10704
+ warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
10590
10705
  `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
10591
10706
  return;
10592
10707
  }
@@ -10839,7 +10954,7 @@ var VueRuntimeDOM = (function (exports) {
10839
10954
  return isCustomElement;
10840
10955
  },
10841
10956
  set() {
10842
- warn$1(`The \`isCustomElement\` config option is deprecated. Use ` +
10957
+ warn(`The \`isCustomElement\` config option is deprecated. Use ` +
10843
10958
  `\`compilerOptions.isCustomElement\` instead.`);
10844
10959
  }
10845
10960
  });
@@ -10853,11 +10968,11 @@ var VueRuntimeDOM = (function (exports) {
10853
10968
  `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
10854
10969
  Object.defineProperty(app.config, 'compilerOptions', {
10855
10970
  get() {
10856
- warn$1(msg);
10971
+ warn(msg);
10857
10972
  return compilerOptions;
10858
10973
  },
10859
10974
  set() {
10860
- warn$1(msg);
10975
+ warn(msg);
10861
10976
  }
10862
10977
  });
10863
10978
  }
@@ -10866,14 +10981,14 @@ var VueRuntimeDOM = (function (exports) {
10866
10981
  if (isString(container)) {
10867
10982
  const res = document.querySelector(container);
10868
10983
  if (!res) {
10869
- warn$1(`Failed to mount app: mount target selector "${container}" returned null.`);
10984
+ warn(`Failed to mount app: mount target selector "${container}" returned null.`);
10870
10985
  }
10871
10986
  return res;
10872
10987
  }
10873
10988
  if (window.ShadowRoot &&
10874
10989
  container instanceof window.ShadowRoot &&
10875
10990
  container.mode === 'closed') {
10876
- warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10991
+ warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10877
10992
  }
10878
10993
  return container;
10879
10994
  }
@@ -10895,13 +11010,14 @@ var VueRuntimeDOM = (function (exports) {
10895
11010
  exports.Transition = Transition;
10896
11011
  exports.TransitionGroup = TransitionGroup;
10897
11012
  exports.VueElement = VueElement;
11013
+ exports.assertNumber = assertNumber;
10898
11014
  exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
10899
11015
  exports.callWithErrorHandling = callWithErrorHandling;
10900
11016
  exports.camelize = camelize;
10901
11017
  exports.capitalize = capitalize;
10902
11018
  exports.cloneVNode = cloneVNode;
10903
11019
  exports.compatUtils = compatUtils;
10904
- exports.computed = computed$1;
11020
+ exports.computed = computed;
10905
11021
  exports.createApp = createApp;
10906
11022
  exports.createBlock = createBlock;
10907
11023
  exports.createCommentVNode = createCommentVNode;
@@ -11012,7 +11128,7 @@ var VueRuntimeDOM = (function (exports) {
11012
11128
  exports.vModelText = vModelText;
11013
11129
  exports.vShow = vShow;
11014
11130
  exports.version = version;
11015
- exports.warn = warn$1;
11131
+ exports.warn = warn;
11016
11132
  exports.watch = watch;
11017
11133
  exports.watchEffect = watchEffect;
11018
11134
  exports.watchPostEffect = watchPostEffect;
@@ -11026,8 +11142,6 @@ var VueRuntimeDOM = (function (exports) {
11026
11142
  exports.withModifiers = withModifiers;
11027
11143
  exports.withScopeId = withScopeId;
11028
11144
 
11029
- Object.defineProperty(exports, '__esModule', { value: true });
11030
-
11031
11145
  return exports;
11032
11146
 
11033
- }({}));
11147
+ })({});