@vue/compat 3.4.0-rc.1 → 3.4.0-rc.3

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.
@@ -280,7 +280,7 @@ const stringifySymbol = (v, i = "") => {
280
280
  return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
281
281
  };
282
282
 
283
- function warn$1(msg, ...args) {
283
+ function warn$2(msg, ...args) {
284
284
  console.warn(`[Vue warn] ${msg}`, ...args);
285
285
  }
286
286
 
@@ -320,7 +320,7 @@ class EffectScope {
320
320
  activeEffectScope = currentEffectScope;
321
321
  }
322
322
  } else {
323
- warn$1(`cannot run an inactive effect scope.`);
323
+ warn$2(`cannot run an inactive effect scope.`);
324
324
  }
325
325
  }
326
326
  /**
@@ -378,7 +378,7 @@ function onScopeDispose(fn) {
378
378
  if (activeEffectScope) {
379
379
  activeEffectScope.cleanups.push(fn);
380
380
  } else {
381
- warn$1(
381
+ warn$2(
382
382
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
383
383
  );
384
384
  }
@@ -826,7 +826,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
826
826
  }
827
827
  set(target, key) {
828
828
  {
829
- warn$1(
829
+ warn$2(
830
830
  `Set operation on key "${String(key)}" failed: target is readonly.`,
831
831
  target
832
832
  );
@@ -835,7 +835,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
835
835
  }
836
836
  deleteProperty(target, key) {
837
837
  {
838
- warn$1(
838
+ warn$2(
839
839
  `Delete operation on key "${String(key)}" failed: target is readonly.`,
840
840
  target
841
841
  );
@@ -1493,7 +1493,7 @@ function pushWarningContext(vnode) {
1493
1493
  function popWarningContext() {
1494
1494
  stack.pop();
1495
1495
  }
1496
- function warn(msg, ...args) {
1496
+ function warn$1(msg, ...args) {
1497
1497
  pauseTracking();
1498
1498
  const instance = stack.length ? stack[stack.length - 1].component : null;
1499
1499
  const appWarnHandler = instance && instance.appContext.config.warnHandler;
@@ -1594,9 +1594,9 @@ function assertNumber(val, type) {
1594
1594
  if (val === void 0) {
1595
1595
  return;
1596
1596
  } else if (typeof val !== "number") {
1597
- warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1597
+ warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1598
1598
  } else if (isNaN(val)) {
1599
- warn(`${type} is NaN - the duration expression might be incorrect.`);
1599
+ warn$1(`${type} is NaN - the duration expression might be incorrect.`);
1600
1600
  }
1601
1601
  }
1602
1602
 
@@ -1661,7 +1661,7 @@ const ErrorTypeStrings$1 = {
1661
1661
  [11]: "app warnHandler",
1662
1662
  [12]: "ref function",
1663
1663
  [13]: "async component loader",
1664
- [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1664
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
1665
1665
  };
1666
1666
  function callWithErrorHandling(fn, instance, type, args) {
1667
1667
  let res;
@@ -1724,7 +1724,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
1724
1724
  if (contextVNode) {
1725
1725
  pushWarningContext(contextVNode);
1726
1726
  }
1727
- warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1727
+ warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1728
1728
  if (contextVNode) {
1729
1729
  popWarningContext();
1730
1730
  }
@@ -2022,22 +2022,22 @@ function tryWrap(fn) {
2022
2022
  };
2023
2023
  }
2024
2024
 
2025
- let devtools;
2025
+ let devtools$1;
2026
2026
  let buffer = [];
2027
2027
  let devtoolsNotInstalled = false;
2028
2028
  function emit$2(event, ...args) {
2029
- if (devtools) {
2030
- devtools.emit(event, ...args);
2029
+ if (devtools$1) {
2030
+ devtools$1.emit(event, ...args);
2031
2031
  } else if (!devtoolsNotInstalled) {
2032
2032
  buffer.push({ event, args });
2033
2033
  }
2034
2034
  }
2035
- function setDevtoolsHook(hook, target) {
2035
+ function setDevtoolsHook$1(hook, target) {
2036
2036
  var _a, _b;
2037
- devtools = hook;
2038
- if (devtools) {
2039
- devtools.enabled = true;
2040
- buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
2037
+ devtools$1 = hook;
2038
+ if (devtools$1) {
2039
+ devtools$1.enabled = true;
2040
+ buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
2041
2041
  buffer = [];
2042
2042
  } else if (
2043
2043
  // handle late devtools injection - only do this if we are in an actual
@@ -2049,10 +2049,10 @@ function setDevtoolsHook(hook, target) {
2049
2049
  ) {
2050
2050
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
2051
2051
  replay.push((newHook) => {
2052
- setDevtoolsHook(newHook, target);
2052
+ setDevtoolsHook$1(newHook, target);
2053
2053
  });
2054
2054
  setTimeout(() => {
2055
- if (!devtools) {
2055
+ if (!devtools$1) {
2056
2056
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
2057
2057
  devtoolsNotInstalled = true;
2058
2058
  buffer = [];
@@ -2082,8 +2082,8 @@ const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
2082
2082
  "component:removed" /* COMPONENT_REMOVED */
2083
2083
  );
2084
2084
  const devtoolsComponentRemoved = (component) => {
2085
- if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2086
- !devtools.cleanupBuffer(component)) {
2085
+ if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2086
+ !devtools$1.cleanupBuffer(component)) {
2087
2087
  _devtoolsComponentRemoved(component);
2088
2088
  }
2089
2089
  };
@@ -2382,12 +2382,12 @@ function warnDeprecation(key, instance, ...args) {
2382
2382
  }
2383
2383
  instanceWarned[componentDupKey] = true;
2384
2384
  if (dupKey in warnCount) {
2385
- warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
2385
+ warn$1(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
2386
2386
  return;
2387
2387
  }
2388
2388
  warnCount[dupKey] = 0;
2389
2389
  const { message, link } = deprecationData[key];
2390
- warn(
2390
+ warn$1(
2391
2391
  `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
2392
2392
  Details: ${link}` : ``}`
2393
2393
  );
@@ -2417,19 +2417,19 @@ function validateCompatConfig(config, instance) {
2417
2417
  if (key !== "MODE" && !(key in deprecationData) && !(key in warnedInvalidKeys)) {
2418
2418
  if (key.startsWith("COMPILER_")) {
2419
2419
  if (isRuntimeOnly()) {
2420
- warn(
2420
+ warn$1(
2421
2421
  `Deprecation config "${key}" is compiler-specific and you are running a runtime-only build of Vue. This deprecation should be configured via compiler options in your build setup instead.
2422
2422
  Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2423
2423
  );
2424
2424
  }
2425
2425
  } else {
2426
- warn(`Invalid deprecation config "${key}".`);
2426
+ warn$1(`Invalid deprecation config "${key}".`);
2427
2427
  }
2428
2428
  warnedInvalidKeys[key] = true;
2429
2429
  }
2430
2430
  }
2431
2431
  if (instance && config["OPTIONS_DATA_MERGE"] != null) {
2432
- warn(
2432
+ warn$1(
2433
2433
  `Deprecation config "${"OPTIONS_DATA_MERGE"}" can only be configured globally.`
2434
2434
  );
2435
2435
  }
@@ -2619,7 +2619,7 @@ function emit(instance, event, ...rawArgs) {
2619
2619
  if (emitsOptions) {
2620
2620
  if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
2621
2621
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2622
- warn(
2622
+ warn$1(
2623
2623
  `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
2624
2624
  );
2625
2625
  }
@@ -2628,7 +2628,7 @@ function emit(instance, event, ...rawArgs) {
2628
2628
  if (isFunction(validator)) {
2629
2629
  const isValid = validator(...rawArgs);
2630
2630
  if (!isValid) {
2631
- warn(
2631
+ warn$1(
2632
2632
  `Invalid event arguments: event validation failed for event "${event}".`
2633
2633
  );
2634
2634
  }
@@ -2655,11 +2655,13 @@ function emit(instance, event, ...rawArgs) {
2655
2655
  {
2656
2656
  const lowerCaseEvent = event.toLowerCase();
2657
2657
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2658
- warn(
2658
+ warn$1(
2659
2659
  `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
2660
2660
  instance,
2661
2661
  instance.type
2662
- )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`
2662
+ )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
2663
+ event
2664
+ )}" instead of "${event}".`
2663
2665
  );
2664
2666
  }
2665
2667
  }
@@ -2836,7 +2838,7 @@ function renderComponentRoot(instance) {
2836
2838
  const proxyToUse = withProxy || proxy;
2837
2839
  const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
2838
2840
  get(target, key, receiver) {
2839
- warn(
2841
+ warn$1(
2840
2842
  `Property '${String(
2841
2843
  key
2842
2844
  )}' was accessed via 'this'. Avoid using 'this' in templates.`
@@ -2917,12 +2919,12 @@ function renderComponentRoot(instance) {
2917
2919
  }
2918
2920
  }
2919
2921
  if (extraAttrs.length) {
2920
- warn(
2922
+ warn$1(
2921
2923
  `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
2922
2924
  );
2923
2925
  }
2924
2926
  if (eventAttrs.length) {
2925
- warn(
2927
+ warn$1(
2926
2928
  `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
2927
2929
  );
2928
2930
  }
@@ -2947,7 +2949,7 @@ function renderComponentRoot(instance) {
2947
2949
  }
2948
2950
  if (vnode.dirs) {
2949
2951
  if (!isElementRoot(root)) {
2950
- warn(
2952
+ warn$1(
2951
2953
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
2952
2954
  );
2953
2955
  }
@@ -2956,7 +2958,7 @@ function renderComponentRoot(instance) {
2956
2958
  }
2957
2959
  if (vnode.transition) {
2958
2960
  if (!isElementRoot(root)) {
2959
- warn(
2961
+ warn$1(
2960
2962
  `Component inside <Transition> renders non-element root node that cannot be animated.`
2961
2963
  );
2962
2964
  }
@@ -3135,7 +3137,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
3135
3137
  const selfName = getComponentName(
3136
3138
  Component,
3137
3139
  false
3138
- /* do not include inferred name to avoid breaking existing code */
3139
3140
  );
3140
3141
  if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
3141
3142
  return Component;
@@ -3153,11 +3154,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
3153
3154
  if (warnMissing && !res) {
3154
3155
  const extra = type === COMPONENTS ? `
3155
3156
  If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
3156
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3157
+ warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3157
3158
  }
3158
3159
  return res;
3159
3160
  } else {
3160
- warn(
3161
+ warn$1(
3161
3162
  `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
3162
3163
  );
3163
3164
  }
@@ -3665,6 +3666,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
3665
3666
  parentSuspense,
3666
3667
  parentComponent,
3667
3668
  node.parentNode,
3669
+ // eslint-disable-next-line no-restricted-globals
3668
3670
  document.createElement("div"),
3669
3671
  null,
3670
3672
  namespace,
@@ -3672,7 +3674,6 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
3672
3674
  optimized,
3673
3675
  rendererInternals,
3674
3676
  true
3675
- /* hydrating */
3676
3677
  );
3677
3678
  const result = hydrateNode(
3678
3679
  node,
@@ -3713,7 +3714,7 @@ function normalizeSuspenseSlot(s) {
3713
3714
  if (isArray(s)) {
3714
3715
  const singleChild = filterSingleRoot(s);
3715
3716
  if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3716
- warn(`<Suspense> slots expect a single root node.`);
3717
+ warn$1(`<Suspense> slots expect a single root node.`);
3717
3718
  }
3718
3719
  s = singleChild;
3719
3720
  }
@@ -3806,13 +3807,20 @@ function watchSyncEffect(effect, options) {
3806
3807
  const INITIAL_WATCHER_VALUE = {};
3807
3808
  function watch(source, cb, options) {
3808
3809
  if (!isFunction(cb)) {
3809
- warn(
3810
+ warn$1(
3810
3811
  `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3811
3812
  );
3812
3813
  }
3813
3814
  return doWatch(source, cb, options);
3814
3815
  }
3815
- function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger } = EMPTY_OBJ) {
3816
+ function doWatch(source, cb, {
3817
+ immediate,
3818
+ deep,
3819
+ flush,
3820
+ once,
3821
+ onTrack,
3822
+ onTrigger
3823
+ } = EMPTY_OBJ) {
3816
3824
  var _a;
3817
3825
  if (cb && once) {
3818
3826
  const _cb = cb;
@@ -3823,23 +3831,23 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
3823
3831
  }
3824
3832
  if (!cb) {
3825
3833
  if (immediate !== void 0) {
3826
- warn(
3834
+ warn$1(
3827
3835
  `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3828
3836
  );
3829
3837
  }
3830
3838
  if (deep !== void 0) {
3831
- warn(
3839
+ warn$1(
3832
3840
  `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3833
3841
  );
3834
3842
  }
3835
3843
  if (once !== void 0) {
3836
- warn(
3844
+ warn$1(
3837
3845
  `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3838
3846
  );
3839
3847
  }
3840
3848
  }
3841
3849
  const warnInvalidSource = (s) => {
3842
- warn(
3850
+ warn$1(
3843
3851
  `Invalid watch source: `,
3844
3852
  s,
3845
3853
  `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
@@ -4034,13 +4042,13 @@ function traverse(value, seen) {
4034
4042
 
4035
4043
  function validateDirectiveName(name) {
4036
4044
  if (isBuiltInDirective(name)) {
4037
- warn("Do not use built-in directive ids as custom directive id: " + name);
4045
+ warn$1("Do not use built-in directive ids as custom directive id: " + name);
4038
4046
  }
4039
4047
  }
4040
4048
  function withDirectives(vnode, directives) {
4041
4049
  const internalInstance = currentRenderingInstance;
4042
4050
  if (internalInstance === null) {
4043
- warn(`withDirectives can only be used inside render functions.`);
4051
+ warn$1(`withDirectives can only be used inside render functions.`);
4044
4052
  return vnode;
4045
4053
  }
4046
4054
  const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
@@ -4150,7 +4158,7 @@ const BaseTransitionImpl = {
4150
4158
  for (const c of children) {
4151
4159
  if (c.type !== Comment) {
4152
4160
  if (hasFound) {
4153
- warn(
4161
+ warn$1(
4154
4162
  "<transition> can only be used on a single element or component. Use <transition-group> for lists."
4155
4163
  );
4156
4164
  break;
@@ -4163,7 +4171,7 @@ const BaseTransitionImpl = {
4163
4171
  const rawProps = toRaw(props);
4164
4172
  const { mode } = rawProps;
4165
4173
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
4166
- warn(`invalid <transition> mode: ${mode}`);
4174
+ warn$1(`invalid <transition> mode: ${mode}`);
4167
4175
  }
4168
4176
  if (state.isLeaving) {
4169
4177
  return emptyPlaceholder(child);
@@ -4481,7 +4489,7 @@ function defineAsyncComponent(source) {
4481
4489
  return pendingRequest;
4482
4490
  }
4483
4491
  if (!comp) {
4484
- warn(
4492
+ warn$1(
4485
4493
  `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
4486
4494
  );
4487
4495
  }
@@ -4513,7 +4521,6 @@ function defineAsyncComponent(source) {
4513
4521
  instance,
4514
4522
  13,
4515
4523
  !errorComponent
4516
- /* do not throw in dev if user provided error component */
4517
4524
  );
4518
4525
  };
4519
4526
  if (suspensible && instance.suspense || false) {
@@ -4715,7 +4722,7 @@ const KeepAliveImpl = {
4715
4722
  const rawVNode = children[0];
4716
4723
  if (children.length > 1) {
4717
4724
  {
4718
- warn(`KeepAlive should contain exactly one component child.`);
4725
+ warn$1(`KeepAlive should contain exactly one component child.`);
4719
4726
  }
4720
4727
  current = null;
4721
4728
  return children;
@@ -4847,7 +4854,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
4847
4854
  return wrappedHook;
4848
4855
  } else {
4849
4856
  const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
4850
- warn(
4857
+ warn$1(
4851
4858
  `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
4852
4859
  );
4853
4860
  }
@@ -4909,8 +4916,8 @@ function getCompatListeners(instance) {
4909
4916
  }
4910
4917
 
4911
4918
  function convertLegacyRenderFn(instance) {
4912
- const Component2 = instance.type;
4913
- const render = Component2.render;
4919
+ const Component = instance.type;
4920
+ const render = Component.render;
4914
4921
  if (!render || render._rc || render._compatChecked || render._compatWrapped) {
4915
4922
  return;
4916
4923
  }
@@ -4919,7 +4926,7 @@ function convertLegacyRenderFn(instance) {
4919
4926
  return;
4920
4927
  }
4921
4928
  if (checkCompatEnabled("RENDER_FUNCTION", instance)) {
4922
- const wrapped = Component2.render = function compatRender() {
4929
+ const wrapped = Component.render = function compatRender() {
4923
4930
  return render.call(this, compatH);
4924
4931
  };
4925
4932
  wrapped._compatWrapped = true;
@@ -5078,12 +5085,10 @@ function defineLegacyVNodeProperties(vnode) {
5078
5085
  "RENDER_FUNCTION",
5079
5086
  currentRenderingInstance,
5080
5087
  true
5081
- /* enable for built-ins */
5082
5088
  ) && isCompatEnabled(
5083
5089
  "PRIVATE_APIS",
5084
5090
  currentRenderingInstance,
5085
5091
  true
5086
- /* enable for built-ins */
5087
5092
  )) {
5088
5093
  const context = currentRenderingInstance;
5089
5094
  const getInstance = () => vnode.component && vnode.component.proxy;
@@ -5169,7 +5174,7 @@ function renderList(source, renderItem, cache, index) {
5169
5174
  }
5170
5175
  } else if (typeof source === "number") {
5171
5176
  if (!Number.isInteger(source)) {
5172
- warn(`The v-for range expect an integer value but got ${source}.`);
5177
+ warn$1(`The v-for range expect an integer value but got ${source}.`);
5173
5178
  }
5174
5179
  ret = new Array(source);
5175
5180
  for (let i = 0; i < source; i++) {
@@ -5225,7 +5230,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5225
5230
  }
5226
5231
  let slot = slots[name];
5227
5232
  if (slot && slot.length > 1) {
5228
- warn(
5233
+ warn$1(
5229
5234
  `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
5230
5235
  );
5231
5236
  slot = () => [];
@@ -5268,7 +5273,7 @@ function ensureValidVNode(vnodes) {
5268
5273
  function toHandlers(obj, preserveCaseIfNecessary) {
5269
5274
  const ret = {};
5270
5275
  if (!isObject(obj)) {
5271
- warn(`v-on with no argument expects an object value.`);
5276
+ warn$1(`v-on with no argument expects an object value.`);
5272
5277
  return ret;
5273
5278
  }
5274
5279
  for (const key in obj) {
@@ -5413,7 +5418,6 @@ function installCompatInstanceProperties(map) {
5413
5418
  assertCompatEnabled(
5414
5419
  "GLOBAL_MOUNT",
5415
5420
  null
5416
- /* this warning is global */
5417
5421
  );
5418
5422
  return i.ctx._compat_mount || NOOP;
5419
5423
  },
@@ -5597,13 +5601,13 @@ const PublicInstanceProxyHandlers = {
5597
5601
  // to infinite warning loop
5598
5602
  key.indexOf("__v") !== 0)) {
5599
5603
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
5600
- warn(
5604
+ warn$1(
5601
5605
  `Property ${JSON.stringify(
5602
5606
  key
5603
5607
  )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
5604
5608
  );
5605
5609
  } else if (instance === currentRenderingInstance) {
5606
- warn(
5610
+ warn$1(
5607
5611
  `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
5608
5612
  );
5609
5613
  }
@@ -5615,17 +5619,17 @@ const PublicInstanceProxyHandlers = {
5615
5619
  setupState[key] = value;
5616
5620
  return true;
5617
5621
  } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
5618
- warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
5622
+ warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
5619
5623
  return false;
5620
5624
  } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5621
5625
  data[key] = value;
5622
5626
  return true;
5623
5627
  } else if (hasOwn(instance.props, key)) {
5624
- warn(`Attempting to mutate prop "${key}". Props are readonly.`);
5628
+ warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
5625
5629
  return false;
5626
5630
  }
5627
5631
  if (key[0] === "$" && key.slice(1) in instance) {
5628
- warn(
5632
+ warn$1(
5629
5633
  `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
5630
5634
  );
5631
5635
  return false;
@@ -5659,7 +5663,7 @@ const PublicInstanceProxyHandlers = {
5659
5663
  };
5660
5664
  {
5661
5665
  PublicInstanceProxyHandlers.ownKeys = (target) => {
5662
- warn(
5666
+ warn$1(
5663
5667
  `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
5664
5668
  );
5665
5669
  return Reflect.ownKeys(target);
@@ -5678,7 +5682,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
5678
5682
  has(_, key) {
5679
5683
  const has = key[0] !== "_" && !isGloballyAllowed(key);
5680
5684
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
5681
- warn(
5685
+ warn$1(
5682
5686
  `Property ${JSON.stringify(
5683
5687
  key
5684
5688
  )} should not start with _ which is a reserved prefix for Vue internals.`
@@ -5728,7 +5732,7 @@ function exposeSetupStateOnRenderContext(instance) {
5728
5732
  Object.keys(toRaw(setupState)).forEach((key) => {
5729
5733
  if (!setupState.__isScriptSetup) {
5730
5734
  if (isReservedPrefix(key[0])) {
5731
- warn(
5735
+ warn$1(
5732
5736
  `setup() return property ${JSON.stringify(
5733
5737
  key
5734
5738
  )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
@@ -5759,7 +5763,7 @@ function deepMergeData(to, from) {
5759
5763
  return to;
5760
5764
  }
5761
5765
 
5762
- const warnRuntimeUsage = (method) => warn(
5766
+ const warnRuntimeUsage = (method) => warn$1(
5763
5767
  `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
5764
5768
  );
5765
5769
  function defineProps() {
@@ -5807,17 +5811,17 @@ function useSlots() {
5807
5811
  function useAttrs() {
5808
5812
  return getContext().attrs;
5809
5813
  }
5810
- function useModel(props, name) {
5814
+ function useModel(props, name, options = EMPTY_OBJ) {
5811
5815
  const i = getCurrentInstance();
5812
5816
  if (!i) {
5813
- warn(`useModel() called without active instance.`);
5817
+ warn$1(`useModel() called without active instance.`);
5814
5818
  return ref();
5815
5819
  }
5816
5820
  if (!i.propsOptions[0][name]) {
5817
- warn(`useModel() called with prop "${name}" which is not declared.`);
5821
+ warn$1(`useModel() called with prop "${name}" which is not declared.`);
5818
5822
  return ref();
5819
5823
  }
5820
- return customRef((track, trigger) => {
5824
+ const res = customRef((track, trigger) => {
5821
5825
  let localValue;
5822
5826
  watchSyncEffect(() => {
5823
5827
  const propValue = props[name];
@@ -5829,7 +5833,7 @@ function useModel(props, name) {
5829
5833
  return {
5830
5834
  get() {
5831
5835
  track();
5832
- return localValue;
5836
+ return options.get ? options.get(localValue) : localValue;
5833
5837
  },
5834
5838
  set(value) {
5835
5839
  const rawProps = i.vnode.props;
@@ -5837,15 +5841,29 @@ function useModel(props, name) {
5837
5841
  localValue = value;
5838
5842
  trigger();
5839
5843
  }
5840
- i.emit(`update:${name}`, value);
5844
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
5841
5845
  }
5842
5846
  };
5843
5847
  });
5848
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
5849
+ res[Symbol.iterator] = () => {
5850
+ let i2 = 0;
5851
+ return {
5852
+ next() {
5853
+ if (i2 < 2) {
5854
+ return { value: i2++ ? props[modifierKey] : res, done: false };
5855
+ } else {
5856
+ return { done: true };
5857
+ }
5858
+ }
5859
+ };
5860
+ };
5861
+ return res;
5844
5862
  }
5845
5863
  function getContext() {
5846
5864
  const i = getCurrentInstance();
5847
5865
  if (!i) {
5848
- warn(`useContext() called without active instance.`);
5866
+ warn$1(`useContext() called without active instance.`);
5849
5867
  }
5850
5868
  return i.setupContext || (i.setupContext = createSetupContext(i));
5851
5869
  }
@@ -5870,7 +5888,7 @@ function mergeDefaults(raw, defaults) {
5870
5888
  } else if (opt === null) {
5871
5889
  opt = props[key] = { default: defaults[key] };
5872
5890
  } else {
5873
- warn(`props default key "${key}" has no corresponding declaration.`);
5891
+ warn$1(`props default key "${key}" has no corresponding declaration.`);
5874
5892
  }
5875
5893
  if (opt && defaults[`__skip_${key}`]) {
5876
5894
  opt.skipFactory = true;
@@ -5900,7 +5918,7 @@ function createPropsRestProxy(props, excludedKeys) {
5900
5918
  function withAsyncContext(getAwaitable) {
5901
5919
  const ctx = getCurrentInstance();
5902
5920
  if (!ctx) {
5903
- warn(
5921
+ warn$1(
5904
5922
  `withAsyncContext called without active current instance. This is likely a bug.`
5905
5923
  );
5906
5924
  }
@@ -5919,7 +5937,7 @@ function createDuplicateChecker() {
5919
5937
  const cache = /* @__PURE__ */ Object.create(null);
5920
5938
  return (type, key) => {
5921
5939
  if (cache[key]) {
5922
- warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
5940
+ warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
5923
5941
  } else {
5924
5942
  cache[key] = type;
5925
5943
  }
@@ -5995,7 +6013,7 @@ function applyOptions(instance) {
5995
6013
  checkDuplicateProperties("Methods" /* METHODS */, key);
5996
6014
  }
5997
6015
  } else {
5998
- warn(
6016
+ warn$1(
5999
6017
  `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
6000
6018
  );
6001
6019
  }
@@ -6003,18 +6021,18 @@ function applyOptions(instance) {
6003
6021
  }
6004
6022
  if (dataOptions) {
6005
6023
  if (!isFunction(dataOptions)) {
6006
- warn(
6024
+ warn$1(
6007
6025
  `The data option must be a function. Plain object usage is no longer supported.`
6008
6026
  );
6009
6027
  }
6010
6028
  const data = dataOptions.call(publicThis, publicThis);
6011
6029
  if (isPromise(data)) {
6012
- warn(
6030
+ warn$1(
6013
6031
  `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
6014
6032
  );
6015
6033
  }
6016
6034
  if (!isObject(data)) {
6017
- warn(`data() should return an object.`);
6035
+ warn$1(`data() should return an object.`);
6018
6036
  } else {
6019
6037
  instance.data = reactive(data);
6020
6038
  {
@@ -6038,10 +6056,10 @@ function applyOptions(instance) {
6038
6056
  const opt = computedOptions[key];
6039
6057
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
6040
6058
  if (get === NOOP) {
6041
- warn(`Computed property "${key}" has no getter.`);
6059
+ warn$1(`Computed property "${key}" has no getter.`);
6042
6060
  }
6043
6061
  const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
6044
- warn(
6062
+ warn$1(
6045
6063
  `Write operation failed: computed property "${key}" is readonly.`
6046
6064
  );
6047
6065
  } ;
@@ -6141,7 +6159,6 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
6141
6159
  opt.from || key,
6142
6160
  opt.default,
6143
6161
  true
6144
- /* treat default function as factory */
6145
6162
  );
6146
6163
  } else {
6147
6164
  injected = inject(opt.from || key);
@@ -6178,7 +6195,7 @@ function createWatcher(raw, ctx, publicThis, key) {
6178
6195
  if (isFunction(handler)) {
6179
6196
  watch(getter, handler);
6180
6197
  } else {
6181
- warn(`Invalid watch handler specified by key "${raw}"`, handler);
6198
+ warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
6182
6199
  }
6183
6200
  } else if (isFunction(raw)) {
6184
6201
  watch(getter, raw.bind(publicThis));
@@ -6190,11 +6207,11 @@ function createWatcher(raw, ctx, publicThis, key) {
6190
6207
  if (isFunction(handler)) {
6191
6208
  watch(getter, handler, raw);
6192
6209
  } else {
6193
- warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6210
+ warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6194
6211
  }
6195
6212
  }
6196
6213
  } else {
6197
- warn(`Invalid watch option: "${key}"`, raw);
6214
+ warn$1(`Invalid watch option: "${key}"`, raw);
6198
6215
  }
6199
6216
  }
6200
6217
  function resolveMergedOptions(instance) {
@@ -6246,7 +6263,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
6246
6263
  }
6247
6264
  for (const key in from) {
6248
6265
  if (asMixin && key === "expose") {
6249
- warn(
6266
+ warn$1(
6250
6267
  `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
6251
6268
  );
6252
6269
  } else {
@@ -6414,7 +6431,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6414
6431
  return vm;
6415
6432
  }
6416
6433
  }
6417
- Vue.version = `2.6.14-compat:${"3.4.0-rc.1"}`;
6434
+ Vue.version = `2.6.14-compat:${"3.4.0-rc.3"}`;
6418
6435
  Vue.config = singletonApp.config;
6419
6436
  Vue.use = (p, ...options) => {
6420
6437
  if (p && isFunction(p.install)) {
@@ -6515,7 +6532,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6515
6532
  }
6516
6533
  };
6517
6534
  const util = {
6518
- warn: warn ,
6535
+ warn: warn$1 ,
6519
6536
  extend,
6520
6537
  mergeOptions: (parent, child, vm) => mergeOptions(
6521
6538
  parent,
@@ -6552,7 +6569,7 @@ function installFilterMethod(app, context) {
6552
6569
  return context.filters[name];
6553
6570
  }
6554
6571
  if (context.filters[name]) {
6555
- warn(`Filter "${name}" has already been registered.`);
6572
+ warn$1(`Filter "${name}" has already been registered.`);
6556
6573
  }
6557
6574
  context.filters[name] = filter;
6558
6575
  return app;
@@ -6643,14 +6660,14 @@ function installCompatMount(app, context, render) {
6643
6660
  vnode.isCompatRoot = true;
6644
6661
  instance.ctx._compat_mount = (selectorOrEl) => {
6645
6662
  if (isMounted) {
6646
- warn(`Root instance is already mounted.`);
6663
+ warn$1(`Root instance is already mounted.`);
6647
6664
  return;
6648
6665
  }
6649
6666
  let container;
6650
6667
  if (typeof selectorOrEl === "string") {
6651
6668
  const result = document.querySelector(selectorOrEl);
6652
6669
  if (!result) {
6653
- warn(
6670
+ warn$1(
6654
6671
  `Failed to mount root instance: selector "${selectorOrEl}" returned null.`
6655
6672
  );
6656
6673
  return;
@@ -6815,7 +6832,7 @@ function createAppAPI(render, hydrate) {
6815
6832
  rootComponent = extend({}, rootComponent);
6816
6833
  }
6817
6834
  if (rootProps != null && !isObject(rootProps)) {
6818
- warn(`root props passed to app.mount() must be an object.`);
6835
+ warn$1(`root props passed to app.mount() must be an object.`);
6819
6836
  rootProps = null;
6820
6837
  }
6821
6838
  const context = createAppContext();
@@ -6834,14 +6851,14 @@ function createAppAPI(render, hydrate) {
6834
6851
  },
6835
6852
  set config(v) {
6836
6853
  {
6837
- warn(
6854
+ warn$1(
6838
6855
  `app.config cannot be replaced. Modify individual options instead.`
6839
6856
  );
6840
6857
  }
6841
6858
  },
6842
6859
  use(plugin, ...options) {
6843
6860
  if (installedPlugins.has(plugin)) {
6844
- warn(`Plugin has already been applied to target app.`);
6861
+ warn$1(`Plugin has already been applied to target app.`);
6845
6862
  } else if (plugin && isFunction(plugin.install)) {
6846
6863
  installedPlugins.add(plugin);
6847
6864
  plugin.install(app, ...options);
@@ -6849,7 +6866,7 @@ function createAppAPI(render, hydrate) {
6849
6866
  installedPlugins.add(plugin);
6850
6867
  plugin(app, ...options);
6851
6868
  } else {
6852
- warn(
6869
+ warn$1(
6853
6870
  `A plugin must either be a function or an object with an "install" function.`
6854
6871
  );
6855
6872
  }
@@ -6860,7 +6877,7 @@ function createAppAPI(render, hydrate) {
6860
6877
  if (!context.mixins.includes(mixin)) {
6861
6878
  context.mixins.push(mixin);
6862
6879
  } else {
6863
- warn(
6880
+ warn$1(
6864
6881
  "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
6865
6882
  );
6866
6883
  }
@@ -6875,7 +6892,7 @@ function createAppAPI(render, hydrate) {
6875
6892
  return context.components[name];
6876
6893
  }
6877
6894
  if (context.components[name]) {
6878
- warn(`Component "${name}" has already been registered in target app.`);
6895
+ warn$1(`Component "${name}" has already been registered in target app.`);
6879
6896
  }
6880
6897
  context.components[name] = component;
6881
6898
  return app;
@@ -6888,7 +6905,7 @@ function createAppAPI(render, hydrate) {
6888
6905
  return context.directives[name];
6889
6906
  }
6890
6907
  if (context.directives[name]) {
6891
- warn(`Directive "${name}" has already been registered in target app.`);
6908
+ warn$1(`Directive "${name}" has already been registered in target app.`);
6892
6909
  }
6893
6910
  context.directives[name] = directive;
6894
6911
  return app;
@@ -6896,7 +6913,7 @@ function createAppAPI(render, hydrate) {
6896
6913
  mount(rootContainer, isHydrate, namespace) {
6897
6914
  if (!isMounted) {
6898
6915
  if (rootContainer.__vue_app__) {
6899
- warn(
6916
+ warn$1(
6900
6917
  `There is already an app instance mounted on the host container.
6901
6918
  If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
6902
6919
  );
@@ -6931,7 +6948,7 @@ function createAppAPI(render, hydrate) {
6931
6948
  }
6932
6949
  return getExposeProxy(vnode.component) || vnode.component.proxy;
6933
6950
  } else {
6934
- warn(
6951
+ warn$1(
6935
6952
  `App has already been mounted.
6936
6953
  If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
6937
6954
  );
@@ -6946,12 +6963,12 @@ If you want to remount the same app, move your app creation logic into a factory
6946
6963
  }
6947
6964
  delete app._container.__vue_app__;
6948
6965
  } else {
6949
- warn(`Cannot unmount an app that is not mounted.`);
6966
+ warn$1(`Cannot unmount an app that is not mounted.`);
6950
6967
  }
6951
6968
  },
6952
6969
  provide(key, value) {
6953
6970
  if (key in context.provides) {
6954
- warn(
6971
+ warn$1(
6955
6972
  `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
6956
6973
  );
6957
6974
  }
@@ -6978,7 +6995,7 @@ let currentApp = null;
6978
6995
  function provide(key, value) {
6979
6996
  if (!currentInstance) {
6980
6997
  {
6981
- warn(`provide() can only be used inside setup().`);
6998
+ warn$1(`provide() can only be used inside setup().`);
6982
6999
  }
6983
7000
  } else {
6984
7001
  let provides = currentInstance.provides;
@@ -6998,10 +7015,10 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
6998
7015
  } else if (arguments.length > 1) {
6999
7016
  return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
7000
7017
  } else {
7001
- warn(`injection "${String(key)}" not found.`);
7018
+ warn$1(`injection "${String(key)}" not found.`);
7002
7019
  }
7003
7020
  } else {
7004
- warn(`inject() can only be used inside setup() or functional components.`);
7021
+ warn$1(`inject() can only be used inside setup() or functional components.`);
7005
7022
  }
7006
7023
  }
7007
7024
  function hasInjectionContext() {
@@ -7121,7 +7138,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7121
7138
  value,
7122
7139
  instance,
7123
7140
  false
7124
- /* isAbsent */
7125
7141
  );
7126
7142
  }
7127
7143
  } else {
@@ -7160,7 +7176,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7160
7176
  void 0,
7161
7177
  instance,
7162
7178
  true
7163
- /* isAbsent */
7164
7179
  );
7165
7180
  }
7166
7181
  } else {
@@ -7317,7 +7332,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
7317
7332
  if (isArray(raw)) {
7318
7333
  for (let i = 0; i < raw.length; i++) {
7319
7334
  if (!isString(raw[i])) {
7320
- warn(`props must be strings when using array syntax.`, raw[i]);
7335
+ warn$1(`props must be strings when using array syntax.`, raw[i]);
7321
7336
  }
7322
7337
  const normalizedKey = camelize(raw[i]);
7323
7338
  if (validatePropName(normalizedKey)) {
@@ -7326,7 +7341,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
7326
7341
  }
7327
7342
  } else if (raw) {
7328
7343
  if (!isObject(raw)) {
7329
- warn(`invalid props options`, raw);
7344
+ warn$1(`invalid props options`, raw);
7330
7345
  }
7331
7346
  for (const key in raw) {
7332
7347
  const normalizedKey = camelize(key);
@@ -7355,7 +7370,7 @@ function validatePropName(key) {
7355
7370
  if (key[0] !== "$") {
7356
7371
  return true;
7357
7372
  } else {
7358
- warn(`Invalid prop name: "${key}" is a reserved property.`);
7373
+ warn$1(`Invalid prop name: "${key}" is a reserved property.`);
7359
7374
  }
7360
7375
  return false;
7361
7376
  }
@@ -7393,7 +7408,7 @@ function validateProps(rawProps, props, instance) {
7393
7408
  function validateProp(name, value, prop, props, isAbsent) {
7394
7409
  const { type, required, validator, skipCheck } = prop;
7395
7410
  if (required && isAbsent) {
7396
- warn('Missing required prop: "' + name + '"');
7411
+ warn$1('Missing required prop: "' + name + '"');
7397
7412
  return;
7398
7413
  }
7399
7414
  if (value == null && !required) {
@@ -7409,12 +7424,12 @@ function validateProp(name, value, prop, props, isAbsent) {
7409
7424
  isValid = valid;
7410
7425
  }
7411
7426
  if (!isValid) {
7412
- warn(getInvalidTypeMessage(name, value, expectedTypes));
7427
+ warn$1(getInvalidTypeMessage(name, value, expectedTypes));
7413
7428
  return;
7414
7429
  }
7415
7430
  }
7416
7431
  if (validator && !validator(value, props)) {
7417
- warn('Invalid prop: custom validator check failed for prop "' + name + '".');
7432
+ warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
7418
7433
  }
7419
7434
  }
7420
7435
  const isSimpleType = /* @__PURE__ */ makeMap(
@@ -7486,7 +7501,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
7486
7501
  }
7487
7502
  const normalized = withCtx((...args) => {
7488
7503
  if (currentInstance) {
7489
- warn(
7504
+ warn$1(
7490
7505
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
7491
7506
  );
7492
7507
  }
@@ -7505,7 +7520,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
7505
7520
  slots[key] = normalizeSlot(key, value, ctx);
7506
7521
  } else if (value != null) {
7507
7522
  if (!isCompatEnabled("RENDER_FUNCTION", instance)) {
7508
- warn(
7523
+ warn$1(
7509
7524
  `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
7510
7525
  );
7511
7526
  }
@@ -7516,7 +7531,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
7516
7531
  };
7517
7532
  const normalizeVNodeSlots = (instance, children) => {
7518
7533
  if (!isKeepAlive(instance.vnode) && !isCompatEnabled("RENDER_FUNCTION", instance)) {
7519
- warn(
7534
+ warn$1(
7520
7535
  `Non-function value encountered for default slot. Prefer function slots for better performance.`
7521
7536
  );
7522
7537
  }
@@ -7600,7 +7615,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7600
7615
  const value = isUnmount ? null : refValue;
7601
7616
  const { i: owner, r: ref } = rawRef;
7602
7617
  if (!owner) {
7603
- warn(
7618
+ warn$1(
7604
7619
  `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
7605
7620
  );
7606
7621
  return;
@@ -7655,7 +7670,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7655
7670
  if (rawRef.k)
7656
7671
  refs[rawRef.k] = value;
7657
7672
  } else {
7658
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
7673
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
7659
7674
  }
7660
7675
  };
7661
7676
  if (value) {
@@ -7665,7 +7680,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7665
7680
  doSet();
7666
7681
  }
7667
7682
  } else {
7668
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
7683
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
7669
7684
  }
7670
7685
  }
7671
7686
  }
@@ -7697,7 +7712,7 @@ function createHydrationFunctions(rendererInternals) {
7697
7712
  } = rendererInternals;
7698
7713
  const hydrate = (vnode, container) => {
7699
7714
  if (!container.hasChildNodes()) {
7700
- warn(
7715
+ warn$1(
7701
7716
  `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
7702
7717
  );
7703
7718
  patch(null, vnode, container);
@@ -7757,7 +7772,7 @@ function createHydrationFunctions(rendererInternals) {
7757
7772
  } else {
7758
7773
  if (node.data !== vnode.children) {
7759
7774
  hasMismatch = true;
7760
- warn(
7775
+ warn$1(
7761
7776
  `Hydration text mismatch in`,
7762
7777
  node.parentNode,
7763
7778
  `
@@ -7892,7 +7907,7 @@ function createHydrationFunctions(rendererInternals) {
7892
7907
  hydrateNode
7893
7908
  );
7894
7909
  } else {
7895
- warn("Invalid HostVNode type:", type, `(${typeof type})`);
7910
+ warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
7896
7911
  }
7897
7912
  }
7898
7913
  if (ref != null) {
@@ -7933,7 +7948,7 @@ function createHydrationFunctions(rendererInternals) {
7933
7948
  while (next) {
7934
7949
  hasMismatch = true;
7935
7950
  if (!hasWarned) {
7936
- warn(
7951
+ warn$1(
7937
7952
  `Hydration children mismatch on`,
7938
7953
  el,
7939
7954
  `
@@ -7948,7 +7963,7 @@ Server rendered element contains more child nodes than client vdom.`
7948
7963
  } else if (shapeFlag & 8) {
7949
7964
  if (el.textContent !== vnode.children) {
7950
7965
  hasMismatch = true;
7951
- warn(
7966
+ warn$1(
7952
7967
  `Hydration text content mismatch on`,
7953
7968
  el,
7954
7969
  `
@@ -8017,7 +8032,7 @@ Server rendered element contains more child nodes than client vdom.`
8017
8032
  } else {
8018
8033
  hasMismatch = true;
8019
8034
  if (!hasWarned) {
8020
- warn(
8035
+ warn$1(
8021
8036
  `Hydration children mismatch on`,
8022
8037
  container,
8023
8038
  `
@@ -8064,7 +8079,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8064
8079
  };
8065
8080
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
8066
8081
  hasMismatch = true;
8067
- warn(
8082
+ warn$1(
8068
8083
  `Hydration node mismatch:
8069
8084
  - rendered on server:`,
8070
8085
  node,
@@ -8163,7 +8178,7 @@ function propHasMismatch(el, key, clientValue) {
8163
8178
  }
8164
8179
  if (mismatchType) {
8165
8180
  const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8166
- warn(
8181
+ warn$1(
8167
8182
  `Hydration ${mismatchType} mismatch on`,
8168
8183
  el,
8169
8184
  `
@@ -8242,7 +8257,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8242
8257
  const target = getGlobalThis();
8243
8258
  target.__VUE__ = true;
8244
8259
  {
8245
- setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
8260
+ setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
8246
8261
  }
8247
8262
  const {
8248
8263
  insert: hostInsert,
@@ -8351,7 +8366,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8351
8366
  internals
8352
8367
  );
8353
8368
  } else {
8354
- warn("Invalid VNode type:", type, `(${typeof type})`);
8369
+ warn$1("Invalid VNode type:", type, `(${typeof type})`);
8355
8370
  }
8356
8371
  }
8357
8372
  if (ref != null && parentComponent) {
@@ -9345,7 +9360,7 @@ function baseCreateRenderer(options, createHydrationFns) {
9345
9360
  const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
9346
9361
  if (nextChild.key != null) {
9347
9362
  if (keyToNewIndexMap.has(nextChild.key)) {
9348
- warn(
9363
+ warn$1(
9349
9364
  `Duplicate keys found during update:`,
9350
9365
  JSON.stringify(nextChild.key),
9351
9366
  `Make sure keys are unique.`
@@ -9783,14 +9798,14 @@ const resolveTarget = (props, select) => {
9783
9798
  const targetSelector = props && props.to;
9784
9799
  if (isString(targetSelector)) {
9785
9800
  if (!select) {
9786
- warn(
9801
+ warn$1(
9787
9802
  `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
9788
9803
  );
9789
9804
  return null;
9790
9805
  } else {
9791
9806
  const target = select(targetSelector);
9792
9807
  if (!target) {
9793
- warn(
9808
+ warn$1(
9794
9809
  `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
9795
9810
  );
9796
9811
  }
@@ -9798,7 +9813,7 @@ const resolveTarget = (props, select) => {
9798
9813
  }
9799
9814
  } else {
9800
9815
  if (!targetSelector && !isTeleportDisabled(props)) {
9801
- warn(`Invalid Teleport target: ${targetSelector}`);
9816
+ warn$1(`Invalid Teleport target: ${targetSelector}`);
9802
9817
  }
9803
9818
  return targetSelector;
9804
9819
  }
@@ -9834,7 +9849,7 @@ const TeleportImpl = {
9834
9849
  namespace = "mathml";
9835
9850
  }
9836
9851
  } else if (!disabled) {
9837
- warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
9852
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
9838
9853
  }
9839
9854
  const mount = (container2, anchor2) => {
9840
9855
  if (shapeFlag & 16) {
@@ -9921,7 +9936,7 @@ const TeleportImpl = {
9921
9936
  0
9922
9937
  );
9923
9938
  } else {
9924
- warn(
9939
+ warn$1(
9925
9940
  "Invalid Teleport target on update:",
9926
9941
  target,
9927
9942
  `(${typeof target})`
@@ -10135,7 +10150,6 @@ function createElementBlock(type, props, children, patchFlag, dynamicProps, shap
10135
10150
  dynamicProps,
10136
10151
  shapeFlag,
10137
10152
  true
10138
- /* isBlock */
10139
10153
  )
10140
10154
  );
10141
10155
  }
@@ -10148,7 +10162,6 @@ function createBlock(type, props, children, patchFlag, dynamicProps) {
10148
10162
  patchFlag,
10149
10163
  dynamicProps,
10150
10164
  true
10151
- /* isBlock: prevent a block from tracking itself */
10152
10165
  )
10153
10166
  );
10154
10167
  }
@@ -10222,7 +10235,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
10222
10235
  vnode.shapeFlag |= isString(children) ? 8 : 16;
10223
10236
  }
10224
10237
  if (vnode.key !== vnode.key) {
10225
- warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
10238
+ warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
10226
10239
  }
10227
10240
  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
10228
10241
  !isBlockNode && // has current parent block
@@ -10245,7 +10258,7 @@ const createVNode = createVNodeWithArgsTransform ;
10245
10258
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
10246
10259
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
10247
10260
  if (!type) {
10248
- warn(`Invalid vnode type when creating vnode: ${type}.`);
10261
+ warn$1(`Invalid vnode type when creating vnode: ${type}.`);
10249
10262
  }
10250
10263
  type = Comment;
10251
10264
  }
@@ -10291,7 +10304,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
10291
10304
  const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
10292
10305
  if (shapeFlag & 4 && isProxy(type)) {
10293
10306
  type = toRaw(type);
10294
- warn(
10307
+ warn$1(
10295
10308
  `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
10296
10309
  `
10297
10310
  Component that was made reactive: `,
@@ -10592,7 +10605,7 @@ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
10592
10605
  function validateComponentName(name, config) {
10593
10606
  const appIsNativeTag = config.isNativeTag || NO;
10594
10607
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
10595
- warn(
10608
+ warn$1(
10596
10609
  "Do not use built-in or reserved HTML elements as component id: " + name
10597
10610
  );
10598
10611
  }
@@ -10631,7 +10644,7 @@ function setupStatefulComponent(instance, isSSR) {
10631
10644
  }
10632
10645
  }
10633
10646
  if (Component.compilerOptions && isRuntimeOnly()) {
10634
- warn(
10647
+ warn$1(
10635
10648
  `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
10636
10649
  );
10637
10650
  }
@@ -10650,7 +10663,10 @@ function setupStatefulComponent(instance, isSSR) {
10650
10663
  setup,
10651
10664
  instance,
10652
10665
  0,
10653
- [shallowReadonly(instance.props) , setupContext]
10666
+ [
10667
+ shallowReadonly(instance.props) ,
10668
+ setupContext
10669
+ ]
10654
10670
  );
10655
10671
  resetTracking();
10656
10672
  unsetCurrentInstance();
@@ -10666,7 +10682,7 @@ function setupStatefulComponent(instance, isSSR) {
10666
10682
  instance.asyncDep = setupResult;
10667
10683
  if (!instance.suspense) {
10668
10684
  const name = (_a = Component.name) != null ? _a : "Anonymous";
10669
- warn(
10685
+ warn$1(
10670
10686
  `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
10671
10687
  );
10672
10688
  }
@@ -10685,7 +10701,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
10685
10701
  }
10686
10702
  } else if (isObject(setupResult)) {
10687
10703
  if (isVNode(setupResult)) {
10688
- warn(
10704
+ warn$1(
10689
10705
  `setup() should not return VNodes directly - return a render function instead.`
10690
10706
  );
10691
10707
  }
@@ -10697,7 +10713,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
10697
10713
  exposeSetupStateOnRenderContext(instance);
10698
10714
  }
10699
10715
  } else if (setupResult !== void 0) {
10700
- warn(
10716
+ warn$1(
10701
10717
  `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
10702
10718
  );
10703
10719
  }
@@ -10770,12 +10786,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
10770
10786
  }
10771
10787
  if (!Component.render && instance.render === NOOP && !isSSR) {
10772
10788
  if (!compile && Component.template) {
10773
- warn(
10789
+ warn$1(
10774
10790
  `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` )
10775
- /* should not happen */
10776
10791
  );
10777
10792
  } else {
10778
- warn(`Component is missing template or render function.`);
10793
+ warn$1(`Component is missing template or render function.`);
10779
10794
  }
10780
10795
  }
10781
10796
  }
@@ -10789,11 +10804,11 @@ function getAttrsProxy(instance) {
10789
10804
  return target[key];
10790
10805
  },
10791
10806
  set() {
10792
- warn(`setupContext.attrs is readonly.`);
10807
+ warn$1(`setupContext.attrs is readonly.`);
10793
10808
  return false;
10794
10809
  },
10795
10810
  deleteProperty() {
10796
- warn(`setupContext.attrs is readonly.`);
10811
+ warn$1(`setupContext.attrs is readonly.`);
10797
10812
  return false;
10798
10813
  }
10799
10814
  }
@@ -10811,7 +10826,7 @@ function createSetupContext(instance) {
10811
10826
  const expose = (exposed) => {
10812
10827
  {
10813
10828
  if (instance.exposed) {
10814
- warn(`expose() should be called only once per setup().`);
10829
+ warn$1(`expose() should be called only once per setup().`);
10815
10830
  }
10816
10831
  if (exposed != null) {
10817
10832
  let exposedType = typeof exposed;
@@ -10823,7 +10838,7 @@ function createSetupContext(instance) {
10823
10838
  }
10824
10839
  }
10825
10840
  if (exposedType !== "object") {
10826
- warn(
10841
+ warn$1(
10827
10842
  `expose() should be passed a plain object, received ${exposedType}.`
10828
10843
  );
10829
10844
  }
@@ -10923,7 +10938,7 @@ const useSSRContext = () => {
10923
10938
  {
10924
10939
  const ctx = inject(ssrContextKey);
10925
10940
  if (!ctx) {
10926
- warn(
10941
+ warn$1(
10927
10942
  `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
10928
10943
  );
10929
10944
  }
@@ -11132,8 +11147,11 @@ function isMemoSame(cached, memo) {
11132
11147
  return true;
11133
11148
  }
11134
11149
 
11135
- const version = "3.4.0-rc.1";
11150
+ const version = "3.4.0-rc.3";
11151
+ const warn = warn$1 ;
11136
11152
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11153
+ const devtools = devtools$1 ;
11154
+ const setDevtoolsHook = setDevtoolsHook$1 ;
11137
11155
  const ssrUtils = null;
11138
11156
  const resolveFilter = resolveFilter$1 ;
11139
11157
  const _compatUtils = {
@@ -12845,7 +12863,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
12845
12863
  defineProps: defineProps,
12846
12864
  defineSSRCustomElement: defineSSRCustomElement,
12847
12865
  defineSlots: defineSlots,
12848
- get devtools () { return devtools; },
12866
+ devtools: devtools,
12849
12867
  effect: effect,
12850
12868
  effectScope: effectScope,
12851
12869
  getCurrentInstance: getCurrentInstance,
@@ -12991,7 +13009,6 @@ Vue.compile = () => {
12991
13009
  {
12992
13010
  warn(
12993
13011
  `Runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` )
12994
- /* should not happen */
12995
13012
  );
12996
13013
  }
12997
13014
  };