@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.
package/dist/vue.cjs.js CHANGED
@@ -396,7 +396,7 @@ const stringifySymbol = (v, i = "") => {
396
396
  return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
397
397
  };
398
398
 
399
- function warn$1(msg, ...args) {
399
+ function warn$2(msg, ...args) {
400
400
  console.warn(`[Vue warn] ${msg}`, ...args);
401
401
  }
402
402
 
@@ -436,7 +436,7 @@ class EffectScope {
436
436
  activeEffectScope = currentEffectScope;
437
437
  }
438
438
  } else {
439
- warn$1(`cannot run an inactive effect scope.`);
439
+ warn$2(`cannot run an inactive effect scope.`);
440
440
  }
441
441
  }
442
442
  /**
@@ -494,7 +494,7 @@ function onScopeDispose(fn) {
494
494
  if (activeEffectScope) {
495
495
  activeEffectScope.cleanups.push(fn);
496
496
  } else {
497
- warn$1(
497
+ warn$2(
498
498
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
499
499
  );
500
500
  }
@@ -942,7 +942,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
942
942
  }
943
943
  set(target, key) {
944
944
  {
945
- warn$1(
945
+ warn$2(
946
946
  `Set operation on key "${String(key)}" failed: target is readonly.`,
947
947
  target
948
948
  );
@@ -951,7 +951,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
951
951
  }
952
952
  deleteProperty(target, key) {
953
953
  {
954
- warn$1(
954
+ warn$2(
955
955
  `Delete operation on key "${String(key)}" failed: target is readonly.`,
956
956
  target
957
957
  );
@@ -1609,7 +1609,7 @@ function pushWarningContext(vnode) {
1609
1609
  function popWarningContext() {
1610
1610
  stack$1.pop();
1611
1611
  }
1612
- function warn(msg, ...args) {
1612
+ function warn$1(msg, ...args) {
1613
1613
  pauseTracking();
1614
1614
  const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null;
1615
1615
  const appWarnHandler = instance && instance.appContext.config.warnHandler;
@@ -1710,9 +1710,9 @@ function assertNumber(val, type) {
1710
1710
  if (val === void 0) {
1711
1711
  return;
1712
1712
  } else if (typeof val !== "number") {
1713
- warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1713
+ warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
1714
1714
  } else if (isNaN(val)) {
1715
- warn(`${type} is NaN - the duration expression might be incorrect.`);
1715
+ warn$1(`${type} is NaN - the duration expression might be incorrect.`);
1716
1716
  }
1717
1717
  }
1718
1718
 
@@ -1777,7 +1777,7 @@ const ErrorTypeStrings$1 = {
1777
1777
  [11]: "app warnHandler",
1778
1778
  [12]: "ref function",
1779
1779
  [13]: "async component loader",
1780
- [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1780
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
1781
1781
  };
1782
1782
  function callWithErrorHandling(fn, instance, type, args) {
1783
1783
  let res;
@@ -1840,7 +1840,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
1840
1840
  if (contextVNode) {
1841
1841
  pushWarningContext(contextVNode);
1842
1842
  }
1843
- warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1843
+ warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1844
1844
  if (contextVNode) {
1845
1845
  popWarningContext();
1846
1846
  }
@@ -2138,22 +2138,22 @@ function tryWrap(fn) {
2138
2138
  };
2139
2139
  }
2140
2140
 
2141
- let devtools;
2141
+ let devtools$1;
2142
2142
  let buffer = [];
2143
2143
  let devtoolsNotInstalled = false;
2144
2144
  function emit$2(event, ...args) {
2145
- if (devtools) {
2146
- devtools.emit(event, ...args);
2145
+ if (devtools$1) {
2146
+ devtools$1.emit(event, ...args);
2147
2147
  } else if (!devtoolsNotInstalled) {
2148
2148
  buffer.push({ event, args });
2149
2149
  }
2150
2150
  }
2151
- function setDevtoolsHook(hook, target) {
2151
+ function setDevtoolsHook$1(hook, target) {
2152
2152
  var _a, _b;
2153
- devtools = hook;
2154
- if (devtools) {
2155
- devtools.enabled = true;
2156
- buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
2153
+ devtools$1 = hook;
2154
+ if (devtools$1) {
2155
+ devtools$1.enabled = true;
2156
+ buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
2157
2157
  buffer = [];
2158
2158
  } else if (
2159
2159
  // handle late devtools injection - only do this if we are in an actual
@@ -2165,10 +2165,10 @@ function setDevtoolsHook(hook, target) {
2165
2165
  ) {
2166
2166
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
2167
2167
  replay.push((newHook) => {
2168
- setDevtoolsHook(newHook, target);
2168
+ setDevtoolsHook$1(newHook, target);
2169
2169
  });
2170
2170
  setTimeout(() => {
2171
- if (!devtools) {
2171
+ if (!devtools$1) {
2172
2172
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
2173
2173
  devtoolsNotInstalled = true;
2174
2174
  buffer = [];
@@ -2198,8 +2198,8 @@ const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
2198
2198
  "component:removed" /* COMPONENT_REMOVED */
2199
2199
  );
2200
2200
  const devtoolsComponentRemoved = (component) => {
2201
- if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2202
- !devtools.cleanupBuffer(component)) {
2201
+ if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
2202
+ !devtools$1.cleanupBuffer(component)) {
2203
2203
  _devtoolsComponentRemoved(component);
2204
2204
  }
2205
2205
  };
@@ -2498,12 +2498,12 @@ function warnDeprecation$1(key, instance, ...args) {
2498
2498
  }
2499
2499
  instanceWarned[componentDupKey] = true;
2500
2500
  if (dupKey in warnCount) {
2501
- warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
2501
+ warn$1(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
2502
2502
  return;
2503
2503
  }
2504
2504
  warnCount[dupKey] = 0;
2505
2505
  const { message, link } = deprecationData$1[key];
2506
- warn(
2506
+ warn$1(
2507
2507
  `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
2508
2508
  Details: ${link}` : ``}`
2509
2509
  );
@@ -2533,19 +2533,19 @@ function validateCompatConfig(config, instance) {
2533
2533
  if (key !== "MODE" && !(key in deprecationData$1) && !(key in warnedInvalidKeys)) {
2534
2534
  if (key.startsWith("COMPILER_")) {
2535
2535
  if (isRuntimeOnly()) {
2536
- warn(
2536
+ warn$1(
2537
2537
  `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.
2538
2538
  Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2539
2539
  );
2540
2540
  }
2541
2541
  } else {
2542
- warn(`Invalid deprecation config "${key}".`);
2542
+ warn$1(`Invalid deprecation config "${key}".`);
2543
2543
  }
2544
2544
  warnedInvalidKeys[key] = true;
2545
2545
  }
2546
2546
  }
2547
2547
  if (instance && config["OPTIONS_DATA_MERGE"] != null) {
2548
- warn(
2548
+ warn$1(
2549
2549
  `Deprecation config "${"OPTIONS_DATA_MERGE"}" can only be configured globally.`
2550
2550
  );
2551
2551
  }
@@ -2735,7 +2735,7 @@ function emit(instance, event, ...rawArgs) {
2735
2735
  if (emitsOptions) {
2736
2736
  if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
2737
2737
  if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2738
- warn(
2738
+ warn$1(
2739
2739
  `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
2740
2740
  );
2741
2741
  }
@@ -2744,7 +2744,7 @@ function emit(instance, event, ...rawArgs) {
2744
2744
  if (isFunction(validator)) {
2745
2745
  const isValid = validator(...rawArgs);
2746
2746
  if (!isValid) {
2747
- warn(
2747
+ warn$1(
2748
2748
  `Invalid event arguments: event validation failed for event "${event}".`
2749
2749
  );
2750
2750
  }
@@ -2771,11 +2771,13 @@ function emit(instance, event, ...rawArgs) {
2771
2771
  {
2772
2772
  const lowerCaseEvent = event.toLowerCase();
2773
2773
  if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2774
- warn(
2774
+ warn$1(
2775
2775
  `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
2776
2776
  instance,
2777
2777
  instance.type
2778
- )} 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}".`
2778
+ )} 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(
2779
+ event
2780
+ )}" instead of "${event}".`
2779
2781
  );
2780
2782
  }
2781
2783
  }
@@ -2952,7 +2954,7 @@ function renderComponentRoot(instance) {
2952
2954
  const proxyToUse = withProxy || proxy;
2953
2955
  const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
2954
2956
  get(target, key, receiver) {
2955
- warn(
2957
+ warn$1(
2956
2958
  `Property '${String(
2957
2959
  key
2958
2960
  )}' was accessed via 'this'. Avoid using 'this' in templates.`
@@ -3033,12 +3035,12 @@ function renderComponentRoot(instance) {
3033
3035
  }
3034
3036
  }
3035
3037
  if (extraAttrs.length) {
3036
- warn(
3038
+ warn$1(
3037
3039
  `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
3038
3040
  );
3039
3041
  }
3040
3042
  if (eventAttrs.length) {
3041
- warn(
3043
+ warn$1(
3042
3044
  `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.`
3043
3045
  );
3044
3046
  }
@@ -3063,7 +3065,7 @@ function renderComponentRoot(instance) {
3063
3065
  }
3064
3066
  if (vnode.dirs) {
3065
3067
  if (!isElementRoot(root)) {
3066
- warn(
3068
+ warn$1(
3067
3069
  `Runtime directive used on component with non-element root node. The directives will not function as intended.`
3068
3070
  );
3069
3071
  }
@@ -3072,7 +3074,7 @@ function renderComponentRoot(instance) {
3072
3074
  }
3073
3075
  if (vnode.transition) {
3074
3076
  if (!isElementRoot(root)) {
3075
- warn(
3077
+ warn$1(
3076
3078
  `Component inside <Transition> renders non-element root node that cannot be animated.`
3077
3079
  );
3078
3080
  }
@@ -3251,7 +3253,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
3251
3253
  const selfName = getComponentName(
3252
3254
  Component,
3253
3255
  false
3254
- /* do not include inferred name to avoid breaking existing code */
3255
3256
  );
3256
3257
  if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
3257
3258
  return Component;
@@ -3269,11 +3270,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
3269
3270
  if (warnMissing && !res) {
3270
3271
  const extra = type === COMPONENTS ? `
3271
3272
  If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
3272
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3273
+ warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3273
3274
  }
3274
3275
  return res;
3275
3276
  } else {
3276
- warn(
3277
+ warn$1(
3277
3278
  `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
3278
3279
  );
3279
3280
  }
@@ -3781,6 +3782,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
3781
3782
  parentSuspense,
3782
3783
  parentComponent,
3783
3784
  node.parentNode,
3785
+ // eslint-disable-next-line no-restricted-globals
3784
3786
  document.createElement("div"),
3785
3787
  null,
3786
3788
  namespace,
@@ -3788,7 +3790,6 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
3788
3790
  optimized,
3789
3791
  rendererInternals,
3790
3792
  true
3791
- /* hydrating */
3792
3793
  );
3793
3794
  const result = hydrateNode(
3794
3795
  node,
@@ -3829,7 +3830,7 @@ function normalizeSuspenseSlot(s) {
3829
3830
  if (isArray(s)) {
3830
3831
  const singleChild = filterSingleRoot(s);
3831
3832
  if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3832
- warn(`<Suspense> slots expect a single root node.`);
3833
+ warn$1(`<Suspense> slots expect a single root node.`);
3833
3834
  }
3834
3835
  s = singleChild;
3835
3836
  }
@@ -3922,13 +3923,20 @@ function watchSyncEffect(effect, options) {
3922
3923
  const INITIAL_WATCHER_VALUE = {};
3923
3924
  function watch(source, cb, options) {
3924
3925
  if (!isFunction(cb)) {
3925
- warn(
3926
+ warn$1(
3926
3927
  `\`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.`
3927
3928
  );
3928
3929
  }
3929
3930
  return doWatch(source, cb, options);
3930
3931
  }
3931
- function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger } = EMPTY_OBJ) {
3932
+ function doWatch(source, cb, {
3933
+ immediate,
3934
+ deep,
3935
+ flush,
3936
+ once,
3937
+ onTrack,
3938
+ onTrigger
3939
+ } = EMPTY_OBJ) {
3932
3940
  var _a;
3933
3941
  if (cb && once) {
3934
3942
  const _cb = cb;
@@ -3939,23 +3947,23 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
3939
3947
  }
3940
3948
  if (!cb) {
3941
3949
  if (immediate !== void 0) {
3942
- warn(
3950
+ warn$1(
3943
3951
  `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3944
3952
  );
3945
3953
  }
3946
3954
  if (deep !== void 0) {
3947
- warn(
3955
+ warn$1(
3948
3956
  `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3949
3957
  );
3950
3958
  }
3951
3959
  if (once !== void 0) {
3952
- warn(
3960
+ warn$1(
3953
3961
  `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3954
3962
  );
3955
3963
  }
3956
3964
  }
3957
3965
  const warnInvalidSource = (s) => {
3958
- warn(
3966
+ warn$1(
3959
3967
  `Invalid watch source: `,
3960
3968
  s,
3961
3969
  `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
@@ -4171,13 +4179,13 @@ function traverse(value, seen) {
4171
4179
 
4172
4180
  function validateDirectiveName(name) {
4173
4181
  if (isBuiltInDirective(name)) {
4174
- warn("Do not use built-in directive ids as custom directive id: " + name);
4182
+ warn$1("Do not use built-in directive ids as custom directive id: " + name);
4175
4183
  }
4176
4184
  }
4177
4185
  function withDirectives(vnode, directives) {
4178
4186
  const internalInstance = currentRenderingInstance;
4179
4187
  if (internalInstance === null) {
4180
- warn(`withDirectives can only be used inside render functions.`);
4188
+ warn$1(`withDirectives can only be used inside render functions.`);
4181
4189
  return vnode;
4182
4190
  }
4183
4191
  const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
@@ -4287,7 +4295,7 @@ const BaseTransitionImpl = {
4287
4295
  for (const c of children) {
4288
4296
  if (c.type !== Comment) {
4289
4297
  if (hasFound) {
4290
- warn(
4298
+ warn$1(
4291
4299
  "<transition> can only be used on a single element or component. Use <transition-group> for lists."
4292
4300
  );
4293
4301
  break;
@@ -4300,7 +4308,7 @@ const BaseTransitionImpl = {
4300
4308
  const rawProps = toRaw(props);
4301
4309
  const { mode } = rawProps;
4302
4310
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
4303
- warn(`invalid <transition> mode: ${mode}`);
4311
+ warn$1(`invalid <transition> mode: ${mode}`);
4304
4312
  }
4305
4313
  if (state.isLeaving) {
4306
4314
  return emptyPlaceholder(child);
@@ -4618,7 +4626,7 @@ function defineAsyncComponent(source) {
4618
4626
  return pendingRequest;
4619
4627
  }
4620
4628
  if (!comp) {
4621
- warn(
4629
+ warn$1(
4622
4630
  `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
4623
4631
  );
4624
4632
  }
@@ -4650,7 +4658,6 @@ function defineAsyncComponent(source) {
4650
4658
  instance,
4651
4659
  13,
4652
4660
  !errorComponent
4653
- /* do not throw in dev if user provided error component */
4654
4661
  );
4655
4662
  };
4656
4663
  if (suspensible && instance.suspense || isInSSRComponentSetup) {
@@ -4858,7 +4865,7 @@ const KeepAliveImpl = {
4858
4865
  const rawVNode = children[0];
4859
4866
  if (children.length > 1) {
4860
4867
  {
4861
- warn(`KeepAlive should contain exactly one component child.`);
4868
+ warn$1(`KeepAlive should contain exactly one component child.`);
4862
4869
  }
4863
4870
  current = null;
4864
4871
  return children;
@@ -4990,7 +4997,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
4990
4997
  return wrappedHook;
4991
4998
  } else {
4992
4999
  const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
4993
- warn(
5000
+ warn$1(
4994
5001
  `${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.` )
4995
5002
  );
4996
5003
  }
@@ -5052,8 +5059,8 @@ function getCompatListeners(instance) {
5052
5059
  }
5053
5060
 
5054
5061
  function convertLegacyRenderFn(instance) {
5055
- const Component2 = instance.type;
5056
- const render = Component2.render;
5062
+ const Component = instance.type;
5063
+ const render = Component.render;
5057
5064
  if (!render || render._rc || render._compatChecked || render._compatWrapped) {
5058
5065
  return;
5059
5066
  }
@@ -5062,7 +5069,7 @@ function convertLegacyRenderFn(instance) {
5062
5069
  return;
5063
5070
  }
5064
5071
  if (checkCompatEnabled$1("RENDER_FUNCTION", instance)) {
5065
- const wrapped = Component2.render = function compatRender() {
5072
+ const wrapped = Component.render = function compatRender() {
5066
5073
  return render.call(this, compatH);
5067
5074
  };
5068
5075
  wrapped._compatWrapped = true;
@@ -5221,12 +5228,10 @@ function defineLegacyVNodeProperties(vnode) {
5221
5228
  "RENDER_FUNCTION",
5222
5229
  currentRenderingInstance,
5223
5230
  true
5224
- /* enable for built-ins */
5225
5231
  ) && isCompatEnabled$1(
5226
5232
  "PRIVATE_APIS",
5227
5233
  currentRenderingInstance,
5228
5234
  true
5229
- /* enable for built-ins */
5230
5235
  )) {
5231
5236
  const context = currentRenderingInstance;
5232
5237
  const getInstance = () => vnode.component && vnode.component.proxy;
@@ -5312,7 +5317,7 @@ function renderList(source, renderItem, cache, index) {
5312
5317
  }
5313
5318
  } else if (typeof source === "number") {
5314
5319
  if (!Number.isInteger(source)) {
5315
- warn(`The v-for range expect an integer value but got ${source}.`);
5320
+ warn$1(`The v-for range expect an integer value but got ${source}.`);
5316
5321
  }
5317
5322
  ret = new Array(source);
5318
5323
  for (let i = 0; i < source; i++) {
@@ -5368,7 +5373,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5368
5373
  }
5369
5374
  let slot = slots[name];
5370
5375
  if (slot && slot.length > 1) {
5371
- warn(
5376
+ warn$1(
5372
5377
  `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.`
5373
5378
  );
5374
5379
  slot = () => [];
@@ -5411,7 +5416,7 @@ function ensureValidVNode(vnodes) {
5411
5416
  function toHandlers(obj, preserveCaseIfNecessary) {
5412
5417
  const ret = {};
5413
5418
  if (!isObject(obj)) {
5414
- warn(`v-on with no argument expects an object value.`);
5419
+ warn$1(`v-on with no argument expects an object value.`);
5415
5420
  return ret;
5416
5421
  }
5417
5422
  for (const key in obj) {
@@ -5556,7 +5561,6 @@ function installCompatInstanceProperties(map) {
5556
5561
  assertCompatEnabled(
5557
5562
  "GLOBAL_MOUNT",
5558
5563
  null
5559
- /* this warning is global */
5560
5564
  );
5561
5565
  return i.ctx._compat_mount || NOOP;
5562
5566
  },
@@ -5740,13 +5744,13 @@ const PublicInstanceProxyHandlers = {
5740
5744
  // to infinite warning loop
5741
5745
  key.indexOf("__v") !== 0)) {
5742
5746
  if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
5743
- warn(
5747
+ warn$1(
5744
5748
  `Property ${JSON.stringify(
5745
5749
  key
5746
5750
  )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
5747
5751
  );
5748
5752
  } else if (instance === currentRenderingInstance) {
5749
- warn(
5753
+ warn$1(
5750
5754
  `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
5751
5755
  );
5752
5756
  }
@@ -5758,17 +5762,17 @@ const PublicInstanceProxyHandlers = {
5758
5762
  setupState[key] = value;
5759
5763
  return true;
5760
5764
  } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
5761
- warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
5765
+ warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
5762
5766
  return false;
5763
5767
  } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5764
5768
  data[key] = value;
5765
5769
  return true;
5766
5770
  } else if (hasOwn(instance.props, key)) {
5767
- warn(`Attempting to mutate prop "${key}". Props are readonly.`);
5771
+ warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
5768
5772
  return false;
5769
5773
  }
5770
5774
  if (key[0] === "$" && key.slice(1) in instance) {
5771
- warn(
5775
+ warn$1(
5772
5776
  `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
5773
5777
  );
5774
5778
  return false;
@@ -5802,7 +5806,7 @@ const PublicInstanceProxyHandlers = {
5802
5806
  };
5803
5807
  {
5804
5808
  PublicInstanceProxyHandlers.ownKeys = (target) => {
5805
- warn(
5809
+ warn$1(
5806
5810
  `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
5807
5811
  );
5808
5812
  return Reflect.ownKeys(target);
@@ -5821,7 +5825,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
5821
5825
  has(_, key) {
5822
5826
  const has = key[0] !== "_" && !isGloballyAllowed(key);
5823
5827
  if (!has && PublicInstanceProxyHandlers.has(_, key)) {
5824
- warn(
5828
+ warn$1(
5825
5829
  `Property ${JSON.stringify(
5826
5830
  key
5827
5831
  )} should not start with _ which is a reserved prefix for Vue internals.`
@@ -5871,7 +5875,7 @@ function exposeSetupStateOnRenderContext(instance) {
5871
5875
  Object.keys(toRaw(setupState)).forEach((key) => {
5872
5876
  if (!setupState.__isScriptSetup) {
5873
5877
  if (isReservedPrefix(key[0])) {
5874
- warn(
5878
+ warn$1(
5875
5879
  `setup() return property ${JSON.stringify(
5876
5880
  key
5877
5881
  )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
@@ -5902,7 +5906,7 @@ function deepMergeData(to, from) {
5902
5906
  return to;
5903
5907
  }
5904
5908
 
5905
- const warnRuntimeUsage = (method) => warn(
5909
+ const warnRuntimeUsage = (method) => warn$1(
5906
5910
  `${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.`
5907
5911
  );
5908
5912
  function defineProps() {
@@ -5950,17 +5954,17 @@ function useSlots() {
5950
5954
  function useAttrs() {
5951
5955
  return getContext().attrs;
5952
5956
  }
5953
- function useModel(props, name) {
5957
+ function useModel(props, name, options = EMPTY_OBJ) {
5954
5958
  const i = getCurrentInstance();
5955
5959
  if (!i) {
5956
- warn(`useModel() called without active instance.`);
5960
+ warn$1(`useModel() called without active instance.`);
5957
5961
  return ref();
5958
5962
  }
5959
5963
  if (!i.propsOptions[0][name]) {
5960
- warn(`useModel() called with prop "${name}" which is not declared.`);
5964
+ warn$1(`useModel() called with prop "${name}" which is not declared.`);
5961
5965
  return ref();
5962
5966
  }
5963
- return customRef((track, trigger) => {
5967
+ const res = customRef((track, trigger) => {
5964
5968
  let localValue;
5965
5969
  watchSyncEffect(() => {
5966
5970
  const propValue = props[name];
@@ -5972,7 +5976,7 @@ function useModel(props, name) {
5972
5976
  return {
5973
5977
  get() {
5974
5978
  track();
5975
- return localValue;
5979
+ return options.get ? options.get(localValue) : localValue;
5976
5980
  },
5977
5981
  set(value) {
5978
5982
  const rawProps = i.vnode.props;
@@ -5980,15 +5984,29 @@ function useModel(props, name) {
5980
5984
  localValue = value;
5981
5985
  trigger();
5982
5986
  }
5983
- i.emit(`update:${name}`, value);
5987
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
5984
5988
  }
5985
5989
  };
5986
5990
  });
5991
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
5992
+ res[Symbol.iterator] = () => {
5993
+ let i2 = 0;
5994
+ return {
5995
+ next() {
5996
+ if (i2 < 2) {
5997
+ return { value: i2++ ? props[modifierKey] : res, done: false };
5998
+ } else {
5999
+ return { done: true };
6000
+ }
6001
+ }
6002
+ };
6003
+ };
6004
+ return res;
5987
6005
  }
5988
6006
  function getContext() {
5989
6007
  const i = getCurrentInstance();
5990
6008
  if (!i) {
5991
- warn(`useContext() called without active instance.`);
6009
+ warn$1(`useContext() called without active instance.`);
5992
6010
  }
5993
6011
  return i.setupContext || (i.setupContext = createSetupContext(i));
5994
6012
  }
@@ -6013,7 +6031,7 @@ function mergeDefaults(raw, defaults) {
6013
6031
  } else if (opt === null) {
6014
6032
  opt = props[key] = { default: defaults[key] };
6015
6033
  } else {
6016
- warn(`props default key "${key}" has no corresponding declaration.`);
6034
+ warn$1(`props default key "${key}" has no corresponding declaration.`);
6017
6035
  }
6018
6036
  if (opt && defaults[`__skip_${key}`]) {
6019
6037
  opt.skipFactory = true;
@@ -6043,7 +6061,7 @@ function createPropsRestProxy(props, excludedKeys) {
6043
6061
  function withAsyncContext(getAwaitable) {
6044
6062
  const ctx = getCurrentInstance();
6045
6063
  if (!ctx) {
6046
- warn(
6064
+ warn$1(
6047
6065
  `withAsyncContext called without active current instance. This is likely a bug.`
6048
6066
  );
6049
6067
  }
@@ -6062,7 +6080,7 @@ function createDuplicateChecker() {
6062
6080
  const cache = /* @__PURE__ */ Object.create(null);
6063
6081
  return (type, key) => {
6064
6082
  if (cache[key]) {
6065
- warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
6083
+ warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
6066
6084
  } else {
6067
6085
  cache[key] = type;
6068
6086
  }
@@ -6138,7 +6156,7 @@ function applyOptions(instance) {
6138
6156
  checkDuplicateProperties("Methods" /* METHODS */, key);
6139
6157
  }
6140
6158
  } else {
6141
- warn(
6159
+ warn$1(
6142
6160
  `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
6143
6161
  );
6144
6162
  }
@@ -6146,18 +6164,18 @@ function applyOptions(instance) {
6146
6164
  }
6147
6165
  if (dataOptions) {
6148
6166
  if (!isFunction(dataOptions)) {
6149
- warn(
6167
+ warn$1(
6150
6168
  `The data option must be a function. Plain object usage is no longer supported.`
6151
6169
  );
6152
6170
  }
6153
6171
  const data = dataOptions.call(publicThis, publicThis);
6154
6172
  if (isPromise(data)) {
6155
- warn(
6173
+ warn$1(
6156
6174
  `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
6157
6175
  );
6158
6176
  }
6159
6177
  if (!isObject(data)) {
6160
- warn(`data() should return an object.`);
6178
+ warn$1(`data() should return an object.`);
6161
6179
  } else {
6162
6180
  instance.data = reactive(data);
6163
6181
  {
@@ -6181,10 +6199,10 @@ function applyOptions(instance) {
6181
6199
  const opt = computedOptions[key];
6182
6200
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
6183
6201
  if (get === NOOP) {
6184
- warn(`Computed property "${key}" has no getter.`);
6202
+ warn$1(`Computed property "${key}" has no getter.`);
6185
6203
  }
6186
6204
  const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
6187
- warn(
6205
+ warn$1(
6188
6206
  `Write operation failed: computed property "${key}" is readonly.`
6189
6207
  );
6190
6208
  } ;
@@ -6284,7 +6302,6 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
6284
6302
  opt.from || key,
6285
6303
  opt.default,
6286
6304
  true
6287
- /* treat default function as factory */
6288
6305
  );
6289
6306
  } else {
6290
6307
  injected = inject(opt.from || key);
@@ -6321,7 +6338,7 @@ function createWatcher(raw, ctx, publicThis, key) {
6321
6338
  if (isFunction(handler)) {
6322
6339
  watch(getter, handler);
6323
6340
  } else {
6324
- warn(`Invalid watch handler specified by key "${raw}"`, handler);
6341
+ warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
6325
6342
  }
6326
6343
  } else if (isFunction(raw)) {
6327
6344
  watch(getter, raw.bind(publicThis));
@@ -6333,11 +6350,11 @@ function createWatcher(raw, ctx, publicThis, key) {
6333
6350
  if (isFunction(handler)) {
6334
6351
  watch(getter, handler, raw);
6335
6352
  } else {
6336
- warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6353
+ warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6337
6354
  }
6338
6355
  }
6339
6356
  } else {
6340
- warn(`Invalid watch option: "${key}"`, raw);
6357
+ warn$1(`Invalid watch option: "${key}"`, raw);
6341
6358
  }
6342
6359
  }
6343
6360
  function resolveMergedOptions(instance) {
@@ -6389,7 +6406,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
6389
6406
  }
6390
6407
  for (const key in from) {
6391
6408
  if (asMixin && key === "expose") {
6392
- warn(
6409
+ warn$1(
6393
6410
  `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
6394
6411
  );
6395
6412
  } else {
@@ -6557,7 +6574,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6557
6574
  return vm;
6558
6575
  }
6559
6576
  }
6560
- Vue.version = `2.6.14-compat:${"3.4.0-rc.1"}`;
6577
+ Vue.version = `2.6.14-compat:${"3.4.0-rc.3"}`;
6561
6578
  Vue.config = singletonApp.config;
6562
6579
  Vue.use = (p, ...options) => {
6563
6580
  if (p && isFunction(p.install)) {
@@ -6658,7 +6675,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6658
6675
  }
6659
6676
  };
6660
6677
  const util = {
6661
- warn: warn ,
6678
+ warn: warn$1 ,
6662
6679
  extend,
6663
6680
  mergeOptions: (parent, child, vm) => mergeOptions(
6664
6681
  parent,
@@ -6695,7 +6712,7 @@ function installFilterMethod(app, context) {
6695
6712
  return context.filters[name];
6696
6713
  }
6697
6714
  if (context.filters[name]) {
6698
- warn(`Filter "${name}" has already been registered.`);
6715
+ warn$1(`Filter "${name}" has already been registered.`);
6699
6716
  }
6700
6717
  context.filters[name] = filter;
6701
6718
  return app;
@@ -6786,14 +6803,14 @@ function installCompatMount(app, context, render) {
6786
6803
  vnode.isCompatRoot = true;
6787
6804
  instance.ctx._compat_mount = (selectorOrEl) => {
6788
6805
  if (isMounted) {
6789
- warn(`Root instance is already mounted.`);
6806
+ warn$1(`Root instance is already mounted.`);
6790
6807
  return;
6791
6808
  }
6792
6809
  let container;
6793
6810
  if (typeof selectorOrEl === "string") {
6794
6811
  const result = document.querySelector(selectorOrEl);
6795
6812
  if (!result) {
6796
- warn(
6813
+ warn$1(
6797
6814
  `Failed to mount root instance: selector "${selectorOrEl}" returned null.`
6798
6815
  );
6799
6816
  return;
@@ -6958,7 +6975,7 @@ function createAppAPI(render, hydrate) {
6958
6975
  rootComponent = extend({}, rootComponent);
6959
6976
  }
6960
6977
  if (rootProps != null && !isObject(rootProps)) {
6961
- warn(`root props passed to app.mount() must be an object.`);
6978
+ warn$1(`root props passed to app.mount() must be an object.`);
6962
6979
  rootProps = null;
6963
6980
  }
6964
6981
  const context = createAppContext();
@@ -6977,14 +6994,14 @@ function createAppAPI(render, hydrate) {
6977
6994
  },
6978
6995
  set config(v) {
6979
6996
  {
6980
- warn(
6997
+ warn$1(
6981
6998
  `app.config cannot be replaced. Modify individual options instead.`
6982
6999
  );
6983
7000
  }
6984
7001
  },
6985
7002
  use(plugin, ...options) {
6986
7003
  if (installedPlugins.has(plugin)) {
6987
- warn(`Plugin has already been applied to target app.`);
7004
+ warn$1(`Plugin has already been applied to target app.`);
6988
7005
  } else if (plugin && isFunction(plugin.install)) {
6989
7006
  installedPlugins.add(plugin);
6990
7007
  plugin.install(app, ...options);
@@ -6992,7 +7009,7 @@ function createAppAPI(render, hydrate) {
6992
7009
  installedPlugins.add(plugin);
6993
7010
  plugin(app, ...options);
6994
7011
  } else {
6995
- warn(
7012
+ warn$1(
6996
7013
  `A plugin must either be a function or an object with an "install" function.`
6997
7014
  );
6998
7015
  }
@@ -7003,7 +7020,7 @@ function createAppAPI(render, hydrate) {
7003
7020
  if (!context.mixins.includes(mixin)) {
7004
7021
  context.mixins.push(mixin);
7005
7022
  } else {
7006
- warn(
7023
+ warn$1(
7007
7024
  "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
7008
7025
  );
7009
7026
  }
@@ -7018,7 +7035,7 @@ function createAppAPI(render, hydrate) {
7018
7035
  return context.components[name];
7019
7036
  }
7020
7037
  if (context.components[name]) {
7021
- warn(`Component "${name}" has already been registered in target app.`);
7038
+ warn$1(`Component "${name}" has already been registered in target app.`);
7022
7039
  }
7023
7040
  context.components[name] = component;
7024
7041
  return app;
@@ -7031,7 +7048,7 @@ function createAppAPI(render, hydrate) {
7031
7048
  return context.directives[name];
7032
7049
  }
7033
7050
  if (context.directives[name]) {
7034
- warn(`Directive "${name}" has already been registered in target app.`);
7051
+ warn$1(`Directive "${name}" has already been registered in target app.`);
7035
7052
  }
7036
7053
  context.directives[name] = directive;
7037
7054
  return app;
@@ -7039,7 +7056,7 @@ function createAppAPI(render, hydrate) {
7039
7056
  mount(rootContainer, isHydrate, namespace) {
7040
7057
  if (!isMounted) {
7041
7058
  if (rootContainer.__vue_app__) {
7042
- warn(
7059
+ warn$1(
7043
7060
  `There is already an app instance mounted on the host container.
7044
7061
  If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
7045
7062
  );
@@ -7074,7 +7091,7 @@ function createAppAPI(render, hydrate) {
7074
7091
  }
7075
7092
  return getExposeProxy(vnode.component) || vnode.component.proxy;
7076
7093
  } else {
7077
- warn(
7094
+ warn$1(
7078
7095
  `App has already been mounted.
7079
7096
  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)\``
7080
7097
  );
@@ -7089,12 +7106,12 @@ If you want to remount the same app, move your app creation logic into a factory
7089
7106
  }
7090
7107
  delete app._container.__vue_app__;
7091
7108
  } else {
7092
- warn(`Cannot unmount an app that is not mounted.`);
7109
+ warn$1(`Cannot unmount an app that is not mounted.`);
7093
7110
  }
7094
7111
  },
7095
7112
  provide(key, value) {
7096
7113
  if (key in context.provides) {
7097
- warn(
7114
+ warn$1(
7098
7115
  `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
7099
7116
  );
7100
7117
  }
@@ -7121,7 +7138,7 @@ let currentApp = null;
7121
7138
  function provide(key, value) {
7122
7139
  if (!currentInstance) {
7123
7140
  {
7124
- warn(`provide() can only be used inside setup().`);
7141
+ warn$1(`provide() can only be used inside setup().`);
7125
7142
  }
7126
7143
  } else {
7127
7144
  let provides = currentInstance.provides;
@@ -7141,10 +7158,10 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
7141
7158
  } else if (arguments.length > 1) {
7142
7159
  return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
7143
7160
  } else {
7144
- warn(`injection "${String(key)}" not found.`);
7161
+ warn$1(`injection "${String(key)}" not found.`);
7145
7162
  }
7146
7163
  } else {
7147
- warn(`inject() can only be used inside setup() or functional components.`);
7164
+ warn$1(`inject() can only be used inside setup() or functional components.`);
7148
7165
  }
7149
7166
  }
7150
7167
  function hasInjectionContext() {
@@ -7264,7 +7281,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7264
7281
  value,
7265
7282
  instance,
7266
7283
  false
7267
- /* isAbsent */
7268
7284
  );
7269
7285
  }
7270
7286
  } else {
@@ -7303,7 +7319,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7303
7319
  void 0,
7304
7320
  instance,
7305
7321
  true
7306
- /* isAbsent */
7307
7322
  );
7308
7323
  }
7309
7324
  } else {
@@ -7460,7 +7475,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
7460
7475
  if (isArray(raw)) {
7461
7476
  for (let i = 0; i < raw.length; i++) {
7462
7477
  if (!isString(raw[i])) {
7463
- warn(`props must be strings when using array syntax.`, raw[i]);
7478
+ warn$1(`props must be strings when using array syntax.`, raw[i]);
7464
7479
  }
7465
7480
  const normalizedKey = camelize(raw[i]);
7466
7481
  if (validatePropName(normalizedKey)) {
@@ -7469,7 +7484,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
7469
7484
  }
7470
7485
  } else if (raw) {
7471
7486
  if (!isObject(raw)) {
7472
- warn(`invalid props options`, raw);
7487
+ warn$1(`invalid props options`, raw);
7473
7488
  }
7474
7489
  for (const key in raw) {
7475
7490
  const normalizedKey = camelize(key);
@@ -7498,7 +7513,7 @@ function validatePropName(key) {
7498
7513
  if (key[0] !== "$") {
7499
7514
  return true;
7500
7515
  } else {
7501
- warn(`Invalid prop name: "${key}" is a reserved property.`);
7516
+ warn$1(`Invalid prop name: "${key}" is a reserved property.`);
7502
7517
  }
7503
7518
  return false;
7504
7519
  }
@@ -7536,7 +7551,7 @@ function validateProps(rawProps, props, instance) {
7536
7551
  function validateProp(name, value, prop, props, isAbsent) {
7537
7552
  const { type, required, validator, skipCheck } = prop;
7538
7553
  if (required && isAbsent) {
7539
- warn('Missing required prop: "' + name + '"');
7554
+ warn$1('Missing required prop: "' + name + '"');
7540
7555
  return;
7541
7556
  }
7542
7557
  if (value == null && !required) {
@@ -7552,12 +7567,12 @@ function validateProp(name, value, prop, props, isAbsent) {
7552
7567
  isValid = valid;
7553
7568
  }
7554
7569
  if (!isValid) {
7555
- warn(getInvalidTypeMessage(name, value, expectedTypes));
7570
+ warn$1(getInvalidTypeMessage(name, value, expectedTypes));
7556
7571
  return;
7557
7572
  }
7558
7573
  }
7559
7574
  if (validator && !validator(value, props)) {
7560
- warn('Invalid prop: custom validator check failed for prop "' + name + '".');
7575
+ warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
7561
7576
  }
7562
7577
  }
7563
7578
  const isSimpleType = /* @__PURE__ */ makeMap(
@@ -7629,7 +7644,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
7629
7644
  }
7630
7645
  const normalized = withCtx((...args) => {
7631
7646
  if (currentInstance) {
7632
- warn(
7647
+ warn$1(
7633
7648
  `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.`
7634
7649
  );
7635
7650
  }
@@ -7648,7 +7663,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
7648
7663
  slots[key] = normalizeSlot(key, value, ctx);
7649
7664
  } else if (value != null) {
7650
7665
  if (!isCompatEnabled$1("RENDER_FUNCTION", instance)) {
7651
- warn(
7666
+ warn$1(
7652
7667
  `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
7653
7668
  );
7654
7669
  }
@@ -7659,7 +7674,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
7659
7674
  };
7660
7675
  const normalizeVNodeSlots = (instance, children) => {
7661
7676
  if (!isKeepAlive(instance.vnode) && !isCompatEnabled$1("RENDER_FUNCTION", instance)) {
7662
- warn(
7677
+ warn$1(
7663
7678
  `Non-function value encountered for default slot. Prefer function slots for better performance.`
7664
7679
  );
7665
7680
  }
@@ -7743,7 +7758,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7743
7758
  const value = isUnmount ? null : refValue;
7744
7759
  const { i: owner, r: ref } = rawRef;
7745
7760
  if (!owner) {
7746
- warn(
7761
+ warn$1(
7747
7762
  `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
7748
7763
  );
7749
7764
  return;
@@ -7798,7 +7813,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7798
7813
  if (rawRef.k)
7799
7814
  refs[rawRef.k] = value;
7800
7815
  } else {
7801
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
7816
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
7802
7817
  }
7803
7818
  };
7804
7819
  if (value) {
@@ -7808,7 +7823,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7808
7823
  doSet();
7809
7824
  }
7810
7825
  } else {
7811
- warn("Invalid template ref type:", ref, `(${typeof ref})`);
7826
+ warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
7812
7827
  }
7813
7828
  }
7814
7829
  }
@@ -7840,7 +7855,7 @@ function createHydrationFunctions(rendererInternals) {
7840
7855
  } = rendererInternals;
7841
7856
  const hydrate = (vnode, container) => {
7842
7857
  if (!container.hasChildNodes()) {
7843
- warn(
7858
+ warn$1(
7844
7859
  `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
7845
7860
  );
7846
7861
  patch(null, vnode, container);
@@ -7900,7 +7915,7 @@ function createHydrationFunctions(rendererInternals) {
7900
7915
  } else {
7901
7916
  if (node.data !== vnode.children) {
7902
7917
  hasMismatch = true;
7903
- warn(
7918
+ warn$1(
7904
7919
  `Hydration text mismatch in`,
7905
7920
  node.parentNode,
7906
7921
  `
@@ -8035,7 +8050,7 @@ function createHydrationFunctions(rendererInternals) {
8035
8050
  hydrateNode
8036
8051
  );
8037
8052
  } else {
8038
- warn("Invalid HostVNode type:", type, `(${typeof type})`);
8053
+ warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
8039
8054
  }
8040
8055
  }
8041
8056
  if (ref != null) {
@@ -8076,7 +8091,7 @@ function createHydrationFunctions(rendererInternals) {
8076
8091
  while (next) {
8077
8092
  hasMismatch = true;
8078
8093
  if (!hasWarned) {
8079
- warn(
8094
+ warn$1(
8080
8095
  `Hydration children mismatch on`,
8081
8096
  el,
8082
8097
  `
@@ -8091,7 +8106,7 @@ Server rendered element contains more child nodes than client vdom.`
8091
8106
  } else if (shapeFlag & 8) {
8092
8107
  if (el.textContent !== vnode.children) {
8093
8108
  hasMismatch = true;
8094
- warn(
8109
+ warn$1(
8095
8110
  `Hydration text content mismatch on`,
8096
8111
  el,
8097
8112
  `
@@ -8160,7 +8175,7 @@ Server rendered element contains more child nodes than client vdom.`
8160
8175
  } else {
8161
8176
  hasMismatch = true;
8162
8177
  if (!hasWarned) {
8163
- warn(
8178
+ warn$1(
8164
8179
  `Hydration children mismatch on`,
8165
8180
  container,
8166
8181
  `
@@ -8207,7 +8222,7 @@ Server rendered element contains fewer child nodes than client vdom.`
8207
8222
  };
8208
8223
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
8209
8224
  hasMismatch = true;
8210
- warn(
8225
+ warn$1(
8211
8226
  `Hydration node mismatch:
8212
8227
  - rendered on server:`,
8213
8228
  node,
@@ -8306,7 +8321,7 @@ function propHasMismatch(el, key, clientValue) {
8306
8321
  }
8307
8322
  if (mismatchType) {
8308
8323
  const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8309
- warn(
8324
+ warn$1(
8310
8325
  `Hydration ${mismatchType} mismatch on`,
8311
8326
  el,
8312
8327
  `
@@ -8385,7 +8400,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8385
8400
  const target = getGlobalThis();
8386
8401
  target.__VUE__ = true;
8387
8402
  {
8388
- setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
8403
+ setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
8389
8404
  }
8390
8405
  const {
8391
8406
  insert: hostInsert,
@@ -8494,7 +8509,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8494
8509
  internals
8495
8510
  );
8496
8511
  } else {
8497
- warn("Invalid VNode type:", type, `(${typeof type})`);
8512
+ warn$1("Invalid VNode type:", type, `(${typeof type})`);
8498
8513
  }
8499
8514
  }
8500
8515
  if (ref != null && parentComponent) {
@@ -9488,7 +9503,7 @@ function baseCreateRenderer(options, createHydrationFns) {
9488
9503
  const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
9489
9504
  if (nextChild.key != null) {
9490
9505
  if (keyToNewIndexMap.has(nextChild.key)) {
9491
- warn(
9506
+ warn$1(
9492
9507
  `Duplicate keys found during update:`,
9493
9508
  JSON.stringify(nextChild.key),
9494
9509
  `Make sure keys are unique.`
@@ -9926,14 +9941,14 @@ const resolveTarget = (props, select) => {
9926
9941
  const targetSelector = props && props.to;
9927
9942
  if (isString(targetSelector)) {
9928
9943
  if (!select) {
9929
- warn(
9944
+ warn$1(
9930
9945
  `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
9931
9946
  );
9932
9947
  return null;
9933
9948
  } else {
9934
9949
  const target = select(targetSelector);
9935
9950
  if (!target) {
9936
- warn(
9951
+ warn$1(
9937
9952
  `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.`
9938
9953
  );
9939
9954
  }
@@ -9941,7 +9956,7 @@ const resolveTarget = (props, select) => {
9941
9956
  }
9942
9957
  } else {
9943
9958
  if (!targetSelector && !isTeleportDisabled(props)) {
9944
- warn(`Invalid Teleport target: ${targetSelector}`);
9959
+ warn$1(`Invalid Teleport target: ${targetSelector}`);
9945
9960
  }
9946
9961
  return targetSelector;
9947
9962
  }
@@ -9977,7 +9992,7 @@ const TeleportImpl = {
9977
9992
  namespace = "mathml";
9978
9993
  }
9979
9994
  } else if (!disabled) {
9980
- warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
9995
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
9981
9996
  }
9982
9997
  const mount = (container2, anchor2) => {
9983
9998
  if (shapeFlag & 16) {
@@ -10064,7 +10079,7 @@ const TeleportImpl = {
10064
10079
  0
10065
10080
  );
10066
10081
  } else {
10067
- warn(
10082
+ warn$1(
10068
10083
  "Invalid Teleport target on update:",
10069
10084
  target,
10070
10085
  `(${typeof target})`
@@ -10278,7 +10293,6 @@ function createElementBlock(type, props, children, patchFlag, dynamicProps, shap
10278
10293
  dynamicProps,
10279
10294
  shapeFlag,
10280
10295
  true
10281
- /* isBlock */
10282
10296
  )
10283
10297
  );
10284
10298
  }
@@ -10291,7 +10305,6 @@ function createBlock(type, props, children, patchFlag, dynamicProps) {
10291
10305
  patchFlag,
10292
10306
  dynamicProps,
10293
10307
  true
10294
- /* isBlock: prevent a block from tracking itself */
10295
10308
  )
10296
10309
  );
10297
10310
  }
@@ -10365,7 +10378,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
10365
10378
  vnode.shapeFlag |= isString(children) ? 8 : 16;
10366
10379
  }
10367
10380
  if (vnode.key !== vnode.key) {
10368
- warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
10381
+ warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
10369
10382
  }
10370
10383
  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
10371
10384
  !isBlockNode && // has current parent block
@@ -10388,7 +10401,7 @@ const createVNode = createVNodeWithArgsTransform ;
10388
10401
  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
10389
10402
  if (!type || type === NULL_DYNAMIC_COMPONENT) {
10390
10403
  if (!type) {
10391
- warn(`Invalid vnode type when creating vnode: ${type}.`);
10404
+ warn$1(`Invalid vnode type when creating vnode: ${type}.`);
10392
10405
  }
10393
10406
  type = Comment;
10394
10407
  }
@@ -10434,7 +10447,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
10434
10447
  const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
10435
10448
  if (shapeFlag & 4 && isProxy(type)) {
10436
10449
  type = toRaw(type);
10437
- warn(
10450
+ warn$1(
10438
10451
  `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\`.`,
10439
10452
  `
10440
10453
  Component that was made reactive: `,
@@ -10750,7 +10763,7 @@ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
10750
10763
  function validateComponentName(name, config) {
10751
10764
  const appIsNativeTag = config.isNativeTag || NO;
10752
10765
  if (isBuiltInTag(name) || appIsNativeTag(name)) {
10753
- warn(
10766
+ warn$1(
10754
10767
  "Do not use built-in or reserved HTML elements as component id: " + name
10755
10768
  );
10756
10769
  }
@@ -10789,7 +10802,7 @@ function setupStatefulComponent(instance, isSSR) {
10789
10802
  }
10790
10803
  }
10791
10804
  if (Component.compilerOptions && isRuntimeOnly()) {
10792
- warn(
10805
+ warn$1(
10793
10806
  `"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.`
10794
10807
  );
10795
10808
  }
@@ -10808,7 +10821,10 @@ function setupStatefulComponent(instance, isSSR) {
10808
10821
  setup,
10809
10822
  instance,
10810
10823
  0,
10811
- [shallowReadonly(instance.props) , setupContext]
10824
+ [
10825
+ shallowReadonly(instance.props) ,
10826
+ setupContext
10827
+ ]
10812
10828
  );
10813
10829
  resetTracking();
10814
10830
  unsetCurrentInstance();
@@ -10824,7 +10840,7 @@ function setupStatefulComponent(instance, isSSR) {
10824
10840
  instance.asyncDep = setupResult;
10825
10841
  if (!instance.suspense) {
10826
10842
  const name = (_a = Component.name) != null ? _a : "Anonymous";
10827
- warn(
10843
+ warn$1(
10828
10844
  `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.`
10829
10845
  );
10830
10846
  }
@@ -10845,7 +10861,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
10845
10861
  }
10846
10862
  } else if (isObject(setupResult)) {
10847
10863
  if (isVNode(setupResult)) {
10848
- warn(
10864
+ warn$1(
10849
10865
  `setup() should not return VNodes directly - return a render function instead.`
10850
10866
  );
10851
10867
  }
@@ -10857,7 +10873,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
10857
10873
  exposeSetupStateOnRenderContext(instance);
10858
10874
  }
10859
10875
  } else if (setupResult !== void 0) {
10860
- warn(
10876
+ warn$1(
10861
10877
  `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
10862
10878
  );
10863
10879
  }
@@ -10930,12 +10946,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
10930
10946
  }
10931
10947
  if (!Component.render && instance.render === NOOP && !isSSR) {
10932
10948
  if (!compile$1 && Component.template) {
10933
- warn(
10949
+ warn$1(
10934
10950
  `Component provided template option but runtime compilation is not supported in this build of Vue.` + (``)
10935
- /* should not happen */
10936
10951
  );
10937
10952
  } else {
10938
- warn(`Component is missing template or render function.`);
10953
+ warn$1(`Component is missing template or render function.`);
10939
10954
  }
10940
10955
  }
10941
10956
  }
@@ -10949,11 +10964,11 @@ function getAttrsProxy(instance) {
10949
10964
  return target[key];
10950
10965
  },
10951
10966
  set() {
10952
- warn(`setupContext.attrs is readonly.`);
10967
+ warn$1(`setupContext.attrs is readonly.`);
10953
10968
  return false;
10954
10969
  },
10955
10970
  deleteProperty() {
10956
- warn(`setupContext.attrs is readonly.`);
10971
+ warn$1(`setupContext.attrs is readonly.`);
10957
10972
  return false;
10958
10973
  }
10959
10974
  }
@@ -10971,7 +10986,7 @@ function createSetupContext(instance) {
10971
10986
  const expose = (exposed) => {
10972
10987
  {
10973
10988
  if (instance.exposed) {
10974
- warn(`expose() should be called only once per setup().`);
10989
+ warn$1(`expose() should be called only once per setup().`);
10975
10990
  }
10976
10991
  if (exposed != null) {
10977
10992
  let exposedType = typeof exposed;
@@ -10983,7 +10998,7 @@ function createSetupContext(instance) {
10983
10998
  }
10984
10999
  }
10985
11000
  if (exposedType !== "object") {
10986
- warn(
11001
+ warn$1(
10987
11002
  `expose() should be passed a plain object, received ${exposedType}.`
10988
11003
  );
10989
11004
  }
@@ -11083,7 +11098,7 @@ const useSSRContext = () => {
11083
11098
  {
11084
11099
  const ctx = inject(ssrContextKey);
11085
11100
  if (!ctx) {
11086
- warn(
11101
+ warn$1(
11087
11102
  `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
11088
11103
  );
11089
11104
  }
@@ -11292,8 +11307,11 @@ function isMemoSame(cached, memo) {
11292
11307
  return true;
11293
11308
  }
11294
11309
 
11295
- const version = "3.4.0-rc.1";
11310
+ const version = "3.4.0-rc.3";
11311
+ const warn = warn$1 ;
11296
11312
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11313
+ const devtools = devtools$1 ;
11314
+ const setDevtoolsHook = setDevtoolsHook$1 ;
11297
11315
  const _ssrUtils = {
11298
11316
  createComponentInstance,
11299
11317
  setupComponent,
@@ -13003,7 +13021,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
13003
13021
  defineProps: defineProps,
13004
13022
  defineSSRCustomElement: defineSSRCustomElement,
13005
13023
  defineSlots: defineSlots,
13006
- get devtools () { return devtools; },
13024
+ devtools: devtools,
13007
13025
  effect: effect,
13008
13026
  effectScope: effectScope,
13009
13027
  getCurrentInstance: getCurrentInstance,
@@ -16132,7 +16150,6 @@ function createRootCodegen(root, context) {
16132
16150
  true,
16133
16151
  void 0,
16134
16152
  false
16135
- /* isComponent */
16136
16153
  );
16137
16154
  } else ;
16138
16155
  }
@@ -16323,7 +16340,7 @@ function createCodegenContext(ast, {
16323
16340
  generatedLine: context.line,
16324
16341
  generatedColumn: context.column - 1,
16325
16342
  source: filename,
16326
- // @ts-ignore it is possible to be null
16343
+ // @ts-expect-error it is possible to be null
16327
16344
  name
16328
16345
  });
16329
16346
  }
@@ -17527,7 +17544,6 @@ const transformFor = createStructuralDirectiveTransform(
17527
17544
  true,
17528
17545
  void 0,
17529
17546
  false
17530
- /* isComponent */
17531
17547
  );
17532
17548
  } else {
17533
17549
  childBlock = children[0].codegenNode;
@@ -17584,7 +17600,6 @@ const transformFor = createStructuralDirectiveTransform(
17584
17600
  createForLoopParams(forNode.parseResult),
17585
17601
  childBlock,
17586
17602
  true
17587
- /* force newline */
17588
17603
  )
17589
17604
  );
17590
17605
  }
@@ -17842,13 +17857,15 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
17842
17857
  createForLoopParams(parseResult),
17843
17858
  buildDynamicSlot(slotName, slotFunction),
17844
17859
  true
17845
- /* force newline */
17846
17860
  )
17847
17861
  ])
17848
17862
  );
17849
17863
  } else {
17850
17864
  context.onError(
17851
- createCompilerError(32, vFor.loc)
17865
+ createCompilerError(
17866
+ 32,
17867
+ vFor.loc
17868
+ )
17852
17869
  );
17853
17870
  }
17854
17871
  } else {