@vue/runtime-core 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/runtime-core.cjs.js +164 -142
- package/dist/runtime-core.cjs.prod.js +68 -51
- package/dist/runtime-core.d.ts +27 -15
- package/dist/runtime-core.esm-bundler.js +164 -145
- package/package.json +3 -3
|
@@ -10,9 +10,7 @@ function pushWarningContext(vnode) {
|
|
|
10
10
|
function popWarningContext() {
|
|
11
11
|
stack.pop();
|
|
12
12
|
}
|
|
13
|
-
function warn(msg, ...args) {
|
|
14
|
-
if (!!!(process.env.NODE_ENV !== "production"))
|
|
15
|
-
return;
|
|
13
|
+
function warn$1(msg, ...args) {
|
|
16
14
|
pauseTracking();
|
|
17
15
|
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
18
16
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
@@ -115,9 +113,9 @@ function assertNumber(val, type) {
|
|
|
115
113
|
if (val === void 0) {
|
|
116
114
|
return;
|
|
117
115
|
} else if (typeof val !== "number") {
|
|
118
|
-
warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
116
|
+
warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
119
117
|
} else if (isNaN(val)) {
|
|
120
|
-
warn(`${type} is NaN - the duration expression might be incorrect.`);
|
|
118
|
+
warn$1(`${type} is NaN - the duration expression might be incorrect.`);
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
|
|
@@ -182,7 +180,7 @@ const ErrorTypeStrings$1 = {
|
|
|
182
180
|
[11]: "app warnHandler",
|
|
183
181
|
[12]: "ref function",
|
|
184
182
|
[13]: "async component loader",
|
|
185
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://
|
|
183
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
186
184
|
};
|
|
187
185
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
188
186
|
let res;
|
|
@@ -245,7 +243,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
245
243
|
if (contextVNode) {
|
|
246
244
|
pushWarningContext(contextVNode);
|
|
247
245
|
}
|
|
248
|
-
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
246
|
+
warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
249
247
|
if (contextVNode) {
|
|
250
248
|
popWarningContext();
|
|
251
249
|
}
|
|
@@ -545,22 +543,22 @@ function tryWrap(fn) {
|
|
|
545
543
|
};
|
|
546
544
|
}
|
|
547
545
|
|
|
548
|
-
let devtools;
|
|
546
|
+
let devtools$1;
|
|
549
547
|
let buffer = [];
|
|
550
548
|
let devtoolsNotInstalled = false;
|
|
551
549
|
function emit$1(event, ...args) {
|
|
552
|
-
if (devtools) {
|
|
553
|
-
devtools.emit(event, ...args);
|
|
550
|
+
if (devtools$1) {
|
|
551
|
+
devtools$1.emit(event, ...args);
|
|
554
552
|
} else if (!devtoolsNotInstalled) {
|
|
555
553
|
buffer.push({ event, args });
|
|
556
554
|
}
|
|
557
555
|
}
|
|
558
|
-
function setDevtoolsHook(hook, target) {
|
|
556
|
+
function setDevtoolsHook$1(hook, target) {
|
|
559
557
|
var _a, _b;
|
|
560
|
-
devtools = hook;
|
|
561
|
-
if (devtools) {
|
|
562
|
-
devtools.enabled = true;
|
|
563
|
-
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
558
|
+
devtools$1 = hook;
|
|
559
|
+
if (devtools$1) {
|
|
560
|
+
devtools$1.enabled = true;
|
|
561
|
+
buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
|
|
564
562
|
buffer = [];
|
|
565
563
|
} else if (
|
|
566
564
|
// handle late devtools injection - only do this if we are in an actual
|
|
@@ -572,10 +570,10 @@ function setDevtoolsHook(hook, target) {
|
|
|
572
570
|
) {
|
|
573
571
|
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
|
|
574
572
|
replay.push((newHook) => {
|
|
575
|
-
setDevtoolsHook(newHook, target);
|
|
573
|
+
setDevtoolsHook$1(newHook, target);
|
|
576
574
|
});
|
|
577
575
|
setTimeout(() => {
|
|
578
|
-
if (!devtools) {
|
|
576
|
+
if (!devtools$1) {
|
|
579
577
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
580
578
|
devtoolsNotInstalled = true;
|
|
581
579
|
buffer = [];
|
|
@@ -605,8 +603,8 @@ const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
|
605
603
|
"component:removed" /* COMPONENT_REMOVED */
|
|
606
604
|
);
|
|
607
605
|
const devtoolsComponentRemoved = (component) => {
|
|
608
|
-
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
609
|
-
!devtools.cleanupBuffer(component)) {
|
|
606
|
+
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
607
|
+
!devtools$1.cleanupBuffer(component)) {
|
|
610
608
|
_devtoolsComponentRemoved(component);
|
|
611
609
|
}
|
|
612
610
|
};
|
|
@@ -654,7 +652,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
654
652
|
if (emitsOptions) {
|
|
655
653
|
if (!(event in emitsOptions) && true) {
|
|
656
654
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
657
|
-
warn(
|
|
655
|
+
warn$1(
|
|
658
656
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
659
657
|
);
|
|
660
658
|
}
|
|
@@ -663,7 +661,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
663
661
|
if (isFunction(validator)) {
|
|
664
662
|
const isValid = validator(...rawArgs);
|
|
665
663
|
if (!isValid) {
|
|
666
|
-
warn(
|
|
664
|
+
warn$1(
|
|
667
665
|
`Invalid event arguments: event validation failed for event "${event}".`
|
|
668
666
|
);
|
|
669
667
|
}
|
|
@@ -690,11 +688,13 @@ function emit(instance, event, ...rawArgs) {
|
|
|
690
688
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
691
689
|
const lowerCaseEvent = event.toLowerCase();
|
|
692
690
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
693
|
-
warn(
|
|
691
|
+
warn$1(
|
|
694
692
|
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
695
693
|
instance,
|
|
696
694
|
instance.type
|
|
697
|
-
)} 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(
|
|
695
|
+
)} 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(
|
|
696
|
+
event
|
|
697
|
+
)}" instead of "${event}".`
|
|
698
698
|
);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
@@ -858,7 +858,7 @@ function renderComponentRoot(instance) {
|
|
|
858
858
|
const proxyToUse = withProxy || proxy;
|
|
859
859
|
const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
860
860
|
get(target, key, receiver) {
|
|
861
|
-
warn(
|
|
861
|
+
warn$1(
|
|
862
862
|
`Property '${String(
|
|
863
863
|
key
|
|
864
864
|
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
@@ -939,12 +939,12 @@ function renderComponentRoot(instance) {
|
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
if (extraAttrs.length) {
|
|
942
|
-
warn(
|
|
942
|
+
warn$1(
|
|
943
943
|
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
946
|
if (eventAttrs.length) {
|
|
947
|
-
warn(
|
|
947
|
+
warn$1(
|
|
948
948
|
`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.`
|
|
949
949
|
);
|
|
950
950
|
}
|
|
@@ -953,7 +953,7 @@ function renderComponentRoot(instance) {
|
|
|
953
953
|
}
|
|
954
954
|
if (vnode.dirs) {
|
|
955
955
|
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
956
|
-
warn(
|
|
956
|
+
warn$1(
|
|
957
957
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
958
958
|
);
|
|
959
959
|
}
|
|
@@ -962,7 +962,7 @@ function renderComponentRoot(instance) {
|
|
|
962
962
|
}
|
|
963
963
|
if (vnode.transition) {
|
|
964
964
|
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
965
|
-
warn(
|
|
965
|
+
warn$1(
|
|
966
966
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
967
967
|
);
|
|
968
968
|
}
|
|
@@ -1137,7 +1137,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
1137
1137
|
const selfName = getComponentName(
|
|
1138
1138
|
Component,
|
|
1139
1139
|
false
|
|
1140
|
-
/* do not include inferred name to avoid breaking existing code */
|
|
1141
1140
|
);
|
|
1142
1141
|
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
1143
1142
|
return Component;
|
|
@@ -1155,11 +1154,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
1155
1154
|
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
1156
1155
|
const extra = type === COMPONENTS ? `
|
|
1157
1156
|
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
1158
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
1157
|
+
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
1159
1158
|
}
|
|
1160
1159
|
return res;
|
|
1161
1160
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1162
|
-
warn(
|
|
1161
|
+
warn$1(
|
|
1163
1162
|
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
1164
1163
|
);
|
|
1165
1164
|
}
|
|
@@ -1667,6 +1666,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
|
|
|
1667
1666
|
parentSuspense,
|
|
1668
1667
|
parentComponent,
|
|
1669
1668
|
node.parentNode,
|
|
1669
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1670
1670
|
document.createElement("div"),
|
|
1671
1671
|
null,
|
|
1672
1672
|
namespace,
|
|
@@ -1674,7 +1674,6 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
|
|
|
1674
1674
|
optimized,
|
|
1675
1675
|
rendererInternals,
|
|
1676
1676
|
true
|
|
1677
|
-
/* hydrating */
|
|
1678
1677
|
);
|
|
1679
1678
|
const result = hydrateNode(
|
|
1680
1679
|
node,
|
|
@@ -1715,7 +1714,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
1715
1714
|
if (isArray(s)) {
|
|
1716
1715
|
const singleChild = filterSingleRoot(s);
|
|
1717
1716
|
if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
1718
|
-
warn(`<Suspense> slots expect a single root node.`);
|
|
1717
|
+
warn$1(`<Suspense> slots expect a single root node.`);
|
|
1719
1718
|
}
|
|
1720
1719
|
s = singleChild;
|
|
1721
1720
|
}
|
|
@@ -1770,13 +1769,20 @@ function watchSyncEffect(effect, options) {
|
|
|
1770
1769
|
const INITIAL_WATCHER_VALUE = {};
|
|
1771
1770
|
function watch(source, cb, options) {
|
|
1772
1771
|
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
1773
|
-
warn(
|
|
1772
|
+
warn$1(
|
|
1774
1773
|
`\`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.`
|
|
1775
1774
|
);
|
|
1776
1775
|
}
|
|
1777
1776
|
return doWatch(source, cb, options);
|
|
1778
1777
|
}
|
|
1779
|
-
function doWatch(source, cb, {
|
|
1778
|
+
function doWatch(source, cb, {
|
|
1779
|
+
immediate,
|
|
1780
|
+
deep,
|
|
1781
|
+
flush,
|
|
1782
|
+
once,
|
|
1783
|
+
onTrack,
|
|
1784
|
+
onTrigger
|
|
1785
|
+
} = EMPTY_OBJ) {
|
|
1780
1786
|
var _a;
|
|
1781
1787
|
if (cb && once) {
|
|
1782
1788
|
const _cb = cb;
|
|
@@ -1787,23 +1793,23 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
|
|
|
1787
1793
|
}
|
|
1788
1794
|
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
1789
1795
|
if (immediate !== void 0) {
|
|
1790
|
-
warn(
|
|
1796
|
+
warn$1(
|
|
1791
1797
|
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1792
1798
|
);
|
|
1793
1799
|
}
|
|
1794
1800
|
if (deep !== void 0) {
|
|
1795
|
-
warn(
|
|
1801
|
+
warn$1(
|
|
1796
1802
|
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1797
1803
|
);
|
|
1798
1804
|
}
|
|
1799
1805
|
if (once !== void 0) {
|
|
1800
|
-
warn(
|
|
1806
|
+
warn$1(
|
|
1801
1807
|
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1802
1808
|
);
|
|
1803
1809
|
}
|
|
1804
1810
|
}
|
|
1805
1811
|
const warnInvalidSource = (s) => {
|
|
1806
|
-
warn(
|
|
1812
|
+
warn$1(
|
|
1807
1813
|
`Invalid watch source: `,
|
|
1808
1814
|
s,
|
|
1809
1815
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
@@ -2009,13 +2015,13 @@ function traverse(value, seen) {
|
|
|
2009
2015
|
|
|
2010
2016
|
function validateDirectiveName(name) {
|
|
2011
2017
|
if (isBuiltInDirective(name)) {
|
|
2012
|
-
warn("Do not use built-in directive ids as custom directive id: " + name);
|
|
2018
|
+
warn$1("Do not use built-in directive ids as custom directive id: " + name);
|
|
2013
2019
|
}
|
|
2014
2020
|
}
|
|
2015
2021
|
function withDirectives(vnode, directives) {
|
|
2016
2022
|
const internalInstance = currentRenderingInstance;
|
|
2017
2023
|
if (internalInstance === null) {
|
|
2018
|
-
!!(process.env.NODE_ENV !== "production") && warn(`withDirectives can only be used inside render functions.`);
|
|
2024
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
|
2019
2025
|
return vnode;
|
|
2020
2026
|
}
|
|
2021
2027
|
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
|
@@ -2122,7 +2128,7 @@ const BaseTransitionImpl = {
|
|
|
2122
2128
|
for (const c of children) {
|
|
2123
2129
|
if (c.type !== Comment) {
|
|
2124
2130
|
if (!!(process.env.NODE_ENV !== "production") && hasFound) {
|
|
2125
|
-
warn(
|
|
2131
|
+
warn$1(
|
|
2126
2132
|
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
2127
2133
|
);
|
|
2128
2134
|
break;
|
|
@@ -2137,7 +2143,7 @@ const BaseTransitionImpl = {
|
|
|
2137
2143
|
const rawProps = toRaw(props);
|
|
2138
2144
|
const { mode } = rawProps;
|
|
2139
2145
|
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
2140
|
-
warn(`invalid <transition> mode: ${mode}`);
|
|
2146
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
2141
2147
|
}
|
|
2142
2148
|
if (state.isLeaving) {
|
|
2143
2149
|
return emptyPlaceholder(child);
|
|
@@ -2452,7 +2458,7 @@ function defineAsyncComponent(source) {
|
|
|
2452
2458
|
return pendingRequest;
|
|
2453
2459
|
}
|
|
2454
2460
|
if (!!(process.env.NODE_ENV !== "production") && !comp) {
|
|
2455
|
-
warn(
|
|
2461
|
+
warn$1(
|
|
2456
2462
|
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
2457
2463
|
);
|
|
2458
2464
|
}
|
|
@@ -2484,7 +2490,6 @@ function defineAsyncComponent(source) {
|
|
|
2484
2490
|
instance,
|
|
2485
2491
|
13,
|
|
2486
2492
|
!errorComponent
|
|
2487
|
-
/* do not throw in dev if user provided error component */
|
|
2488
2493
|
);
|
|
2489
2494
|
};
|
|
2490
2495
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
@@ -2692,7 +2697,7 @@ const KeepAliveImpl = {
|
|
|
2692
2697
|
const rawVNode = children[0];
|
|
2693
2698
|
if (children.length > 1) {
|
|
2694
2699
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2695
|
-
warn(`KeepAlive should contain exactly one component child.`);
|
|
2700
|
+
warn$1(`KeepAlive should contain exactly one component child.`);
|
|
2696
2701
|
}
|
|
2697
2702
|
current = null;
|
|
2698
2703
|
return children;
|
|
@@ -2821,7 +2826,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2821
2826
|
return wrappedHook;
|
|
2822
2827
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
2823
2828
|
const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
|
|
2824
|
-
warn(
|
|
2829
|
+
warn$1(
|
|
2825
2830
|
`${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.` )
|
|
2826
2831
|
);
|
|
2827
2832
|
}
|
|
@@ -2857,7 +2862,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2857
2862
|
}
|
|
2858
2863
|
} else if (typeof source === "number") {
|
|
2859
2864
|
if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
|
|
2860
|
-
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
2865
|
+
warn$1(`The v-for range expect an integer value but got ${source}.`);
|
|
2861
2866
|
}
|
|
2862
2867
|
ret = new Array(source);
|
|
2863
2868
|
for (let i = 0; i < source; i++) {
|
|
@@ -2913,7 +2918,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
2913
2918
|
}
|
|
2914
2919
|
let slot = slots[name];
|
|
2915
2920
|
if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) {
|
|
2916
|
-
warn(
|
|
2921
|
+
warn$1(
|
|
2917
2922
|
`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.`
|
|
2918
2923
|
);
|
|
2919
2924
|
slot = () => [];
|
|
@@ -2956,7 +2961,7 @@ function ensureValidVNode(vnodes) {
|
|
|
2956
2961
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
2957
2962
|
const ret = {};
|
|
2958
2963
|
if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) {
|
|
2959
|
-
warn(`v-on with no argument expects an object value.`);
|
|
2964
|
+
warn$1(`v-on with no argument expects an object value.`);
|
|
2960
2965
|
return ret;
|
|
2961
2966
|
}
|
|
2962
2967
|
for (const key in obj) {
|
|
@@ -3066,13 +3071,13 @@ const PublicInstanceProxyHandlers = {
|
|
|
3066
3071
|
// to infinite warning loop
|
|
3067
3072
|
key.indexOf("__v") !== 0)) {
|
|
3068
3073
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
3069
|
-
warn(
|
|
3074
|
+
warn$1(
|
|
3070
3075
|
`Property ${JSON.stringify(
|
|
3071
3076
|
key
|
|
3072
3077
|
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
|
|
3073
3078
|
);
|
|
3074
3079
|
} else if (instance === currentRenderingInstance) {
|
|
3075
|
-
warn(
|
|
3080
|
+
warn$1(
|
|
3076
3081
|
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
|
|
3077
3082
|
);
|
|
3078
3083
|
}
|
|
@@ -3084,17 +3089,17 @@ const PublicInstanceProxyHandlers = {
|
|
|
3084
3089
|
setupState[key] = value;
|
|
3085
3090
|
return true;
|
|
3086
3091
|
} else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
|
|
3087
|
-
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
3092
|
+
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
3088
3093
|
return false;
|
|
3089
3094
|
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3090
3095
|
data[key] = value;
|
|
3091
3096
|
return true;
|
|
3092
3097
|
} else if (hasOwn(instance.props, key)) {
|
|
3093
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
3098
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
3094
3099
|
return false;
|
|
3095
3100
|
}
|
|
3096
3101
|
if (key[0] === "$" && key.slice(1) in instance) {
|
|
3097
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
3102
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
3098
3103
|
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
|
|
3099
3104
|
);
|
|
3100
3105
|
return false;
|
|
@@ -3128,7 +3133,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
3128
3133
|
};
|
|
3129
3134
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
3130
3135
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
3131
|
-
warn(
|
|
3136
|
+
warn$1(
|
|
3132
3137
|
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
|
|
3133
3138
|
);
|
|
3134
3139
|
return Reflect.ownKeys(target);
|
|
@@ -3147,7 +3152,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
3147
3152
|
has(_, key) {
|
|
3148
3153
|
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
3149
3154
|
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3150
|
-
warn(
|
|
3155
|
+
warn$1(
|
|
3151
3156
|
`Property ${JSON.stringify(
|
|
3152
3157
|
key
|
|
3153
3158
|
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
@@ -3197,7 +3202,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3197
3202
|
Object.keys(toRaw(setupState)).forEach((key) => {
|
|
3198
3203
|
if (!setupState.__isScriptSetup) {
|
|
3199
3204
|
if (isReservedPrefix(key[0])) {
|
|
3200
|
-
warn(
|
|
3205
|
+
warn$1(
|
|
3201
3206
|
`setup() return property ${JSON.stringify(
|
|
3202
3207
|
key
|
|
3203
3208
|
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
|
|
@@ -3214,7 +3219,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3214
3219
|
});
|
|
3215
3220
|
}
|
|
3216
3221
|
|
|
3217
|
-
const warnRuntimeUsage = (method) => warn(
|
|
3222
|
+
const warnRuntimeUsage = (method) => warn$1(
|
|
3218
3223
|
`${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.`
|
|
3219
3224
|
);
|
|
3220
3225
|
function defineProps() {
|
|
@@ -3262,17 +3267,17 @@ function useSlots() {
|
|
|
3262
3267
|
function useAttrs() {
|
|
3263
3268
|
return getContext().attrs;
|
|
3264
3269
|
}
|
|
3265
|
-
function useModel(props, name) {
|
|
3270
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
3266
3271
|
const i = getCurrentInstance();
|
|
3267
3272
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
3268
|
-
warn(`useModel() called without active instance.`);
|
|
3273
|
+
warn$1(`useModel() called without active instance.`);
|
|
3269
3274
|
return ref();
|
|
3270
3275
|
}
|
|
3271
3276
|
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) {
|
|
3272
|
-
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
3277
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
3273
3278
|
return ref();
|
|
3274
3279
|
}
|
|
3275
|
-
|
|
3280
|
+
const res = customRef((track, trigger) => {
|
|
3276
3281
|
let localValue;
|
|
3277
3282
|
watchSyncEffect(() => {
|
|
3278
3283
|
const propValue = props[name];
|
|
@@ -3284,7 +3289,7 @@ function useModel(props, name) {
|
|
|
3284
3289
|
return {
|
|
3285
3290
|
get() {
|
|
3286
3291
|
track();
|
|
3287
|
-
return localValue;
|
|
3292
|
+
return options.get ? options.get(localValue) : localValue;
|
|
3288
3293
|
},
|
|
3289
3294
|
set(value) {
|
|
3290
3295
|
const rawProps = i.vnode.props;
|
|
@@ -3292,15 +3297,29 @@ function useModel(props, name) {
|
|
|
3292
3297
|
localValue = value;
|
|
3293
3298
|
trigger();
|
|
3294
3299
|
}
|
|
3295
|
-
i.emit(`update:${name}`, value);
|
|
3300
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
3296
3301
|
}
|
|
3297
3302
|
};
|
|
3298
3303
|
});
|
|
3304
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
3305
|
+
res[Symbol.iterator] = () => {
|
|
3306
|
+
let i2 = 0;
|
|
3307
|
+
return {
|
|
3308
|
+
next() {
|
|
3309
|
+
if (i2 < 2) {
|
|
3310
|
+
return { value: i2++ ? props[modifierKey] : res, done: false };
|
|
3311
|
+
} else {
|
|
3312
|
+
return { done: true };
|
|
3313
|
+
}
|
|
3314
|
+
}
|
|
3315
|
+
};
|
|
3316
|
+
};
|
|
3317
|
+
return res;
|
|
3299
3318
|
}
|
|
3300
3319
|
function getContext() {
|
|
3301
3320
|
const i = getCurrentInstance();
|
|
3302
3321
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
3303
|
-
warn(`useContext() called without active instance.`);
|
|
3322
|
+
warn$1(`useContext() called without active instance.`);
|
|
3304
3323
|
}
|
|
3305
3324
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
3306
3325
|
}
|
|
@@ -3325,7 +3344,7 @@ function mergeDefaults(raw, defaults) {
|
|
|
3325
3344
|
} else if (opt === null) {
|
|
3326
3345
|
opt = props[key] = { default: defaults[key] };
|
|
3327
3346
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3328
|
-
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
3347
|
+
warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
3329
3348
|
}
|
|
3330
3349
|
if (opt && defaults[`__skip_${key}`]) {
|
|
3331
3350
|
opt.skipFactory = true;
|
|
@@ -3355,7 +3374,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
3355
3374
|
function withAsyncContext(getAwaitable) {
|
|
3356
3375
|
const ctx = getCurrentInstance();
|
|
3357
3376
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) {
|
|
3358
|
-
warn(
|
|
3377
|
+
warn$1(
|
|
3359
3378
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
3360
3379
|
);
|
|
3361
3380
|
}
|
|
@@ -3374,7 +3393,7 @@ function createDuplicateChecker() {
|
|
|
3374
3393
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
3375
3394
|
return (type, key) => {
|
|
3376
3395
|
if (cache[key]) {
|
|
3377
|
-
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
3396
|
+
warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
3378
3397
|
} else {
|
|
3379
3398
|
cache[key] = type;
|
|
3380
3399
|
}
|
|
@@ -3452,7 +3471,7 @@ function applyOptions(instance) {
|
|
|
3452
3471
|
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
3453
3472
|
}
|
|
3454
3473
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3455
|
-
warn(
|
|
3474
|
+
warn$1(
|
|
3456
3475
|
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
|
|
3457
3476
|
);
|
|
3458
3477
|
}
|
|
@@ -3460,18 +3479,18 @@ function applyOptions(instance) {
|
|
|
3460
3479
|
}
|
|
3461
3480
|
if (dataOptions) {
|
|
3462
3481
|
if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) {
|
|
3463
|
-
warn(
|
|
3482
|
+
warn$1(
|
|
3464
3483
|
`The data option must be a function. Plain object usage is no longer supported.`
|
|
3465
3484
|
);
|
|
3466
3485
|
}
|
|
3467
3486
|
const data = dataOptions.call(publicThis, publicThis);
|
|
3468
3487
|
if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) {
|
|
3469
|
-
warn(
|
|
3488
|
+
warn$1(
|
|
3470
3489
|
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
|
|
3471
3490
|
);
|
|
3472
3491
|
}
|
|
3473
3492
|
if (!isObject(data)) {
|
|
3474
|
-
!!(process.env.NODE_ENV !== "production") && warn(`data() should return an object.`);
|
|
3493
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`);
|
|
3475
3494
|
} else {
|
|
3476
3495
|
instance.data = reactive(data);
|
|
3477
3496
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -3495,10 +3514,10 @@ function applyOptions(instance) {
|
|
|
3495
3514
|
const opt = computedOptions[key];
|
|
3496
3515
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
3497
3516
|
if (!!(process.env.NODE_ENV !== "production") && get === NOOP) {
|
|
3498
|
-
warn(`Computed property "${key}" has no getter.`);
|
|
3517
|
+
warn$1(`Computed property "${key}" has no getter.`);
|
|
3499
3518
|
}
|
|
3500
3519
|
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
3501
|
-
warn(
|
|
3520
|
+
warn$1(
|
|
3502
3521
|
`Write operation failed: computed property "${key}" is readonly.`
|
|
3503
3522
|
);
|
|
3504
3523
|
} : NOOP;
|
|
@@ -3587,7 +3606,6 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
3587
3606
|
opt.from || key,
|
|
3588
3607
|
opt.default,
|
|
3589
3608
|
true
|
|
3590
|
-
/* treat default function as factory */
|
|
3591
3609
|
);
|
|
3592
3610
|
} else {
|
|
3593
3611
|
injected = inject(opt.from || key);
|
|
@@ -3624,7 +3642,7 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3624
3642
|
if (isFunction(handler)) {
|
|
3625
3643
|
watch(getter, handler);
|
|
3626
3644
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3627
|
-
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3645
|
+
warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3628
3646
|
}
|
|
3629
3647
|
} else if (isFunction(raw)) {
|
|
3630
3648
|
watch(getter, raw.bind(publicThis));
|
|
@@ -3636,11 +3654,11 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3636
3654
|
if (isFunction(handler)) {
|
|
3637
3655
|
watch(getter, handler, raw);
|
|
3638
3656
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3639
|
-
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3657
|
+
warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3640
3658
|
}
|
|
3641
3659
|
}
|
|
3642
3660
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3643
|
-
warn(`Invalid watch option: "${key}"`, raw);
|
|
3661
|
+
warn$1(`Invalid watch option: "${key}"`, raw);
|
|
3644
3662
|
}
|
|
3645
3663
|
}
|
|
3646
3664
|
function resolveMergedOptions(instance) {
|
|
@@ -3685,7 +3703,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
3685
3703
|
}
|
|
3686
3704
|
for (const key in from) {
|
|
3687
3705
|
if (asMixin && key === "expose") {
|
|
3688
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
3706
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
3689
3707
|
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
|
|
3690
3708
|
);
|
|
3691
3709
|
} else {
|
|
@@ -3813,7 +3831,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3813
3831
|
rootComponent = extend({}, rootComponent);
|
|
3814
3832
|
}
|
|
3815
3833
|
if (rootProps != null && !isObject(rootProps)) {
|
|
3816
|
-
!!(process.env.NODE_ENV !== "production") && warn(`root props passed to app.mount() must be an object.`);
|
|
3834
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`);
|
|
3817
3835
|
rootProps = null;
|
|
3818
3836
|
}
|
|
3819
3837
|
const context = createAppContext();
|
|
@@ -3832,14 +3850,14 @@ function createAppAPI(render, hydrate) {
|
|
|
3832
3850
|
},
|
|
3833
3851
|
set config(v) {
|
|
3834
3852
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3835
|
-
warn(
|
|
3853
|
+
warn$1(
|
|
3836
3854
|
`app.config cannot be replaced. Modify individual options instead.`
|
|
3837
3855
|
);
|
|
3838
3856
|
}
|
|
3839
3857
|
},
|
|
3840
3858
|
use(plugin, ...options) {
|
|
3841
3859
|
if (installedPlugins.has(plugin)) {
|
|
3842
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Plugin has already been applied to target app.`);
|
|
3860
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`);
|
|
3843
3861
|
} else if (plugin && isFunction(plugin.install)) {
|
|
3844
3862
|
installedPlugins.add(plugin);
|
|
3845
3863
|
plugin.install(app, ...options);
|
|
@@ -3847,7 +3865,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3847
3865
|
installedPlugins.add(plugin);
|
|
3848
3866
|
plugin(app, ...options);
|
|
3849
3867
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3850
|
-
warn(
|
|
3868
|
+
warn$1(
|
|
3851
3869
|
`A plugin must either be a function or an object with an "install" function.`
|
|
3852
3870
|
);
|
|
3853
3871
|
}
|
|
@@ -3858,12 +3876,12 @@ function createAppAPI(render, hydrate) {
|
|
|
3858
3876
|
if (!context.mixins.includes(mixin)) {
|
|
3859
3877
|
context.mixins.push(mixin);
|
|
3860
3878
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3861
|
-
warn(
|
|
3879
|
+
warn$1(
|
|
3862
3880
|
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
|
|
3863
3881
|
);
|
|
3864
3882
|
}
|
|
3865
3883
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3866
|
-
warn("Mixins are only available in builds supporting Options API");
|
|
3884
|
+
warn$1("Mixins are only available in builds supporting Options API");
|
|
3867
3885
|
}
|
|
3868
3886
|
return app;
|
|
3869
3887
|
},
|
|
@@ -3875,7 +3893,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3875
3893
|
return context.components[name];
|
|
3876
3894
|
}
|
|
3877
3895
|
if (!!(process.env.NODE_ENV !== "production") && context.components[name]) {
|
|
3878
|
-
warn(`Component "${name}" has already been registered in target app.`);
|
|
3896
|
+
warn$1(`Component "${name}" has already been registered in target app.`);
|
|
3879
3897
|
}
|
|
3880
3898
|
context.components[name] = component;
|
|
3881
3899
|
return app;
|
|
@@ -3888,7 +3906,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3888
3906
|
return context.directives[name];
|
|
3889
3907
|
}
|
|
3890
3908
|
if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) {
|
|
3891
|
-
warn(`Directive "${name}" has already been registered in target app.`);
|
|
3909
|
+
warn$1(`Directive "${name}" has already been registered in target app.`);
|
|
3892
3910
|
}
|
|
3893
3911
|
context.directives[name] = directive;
|
|
3894
3912
|
return app;
|
|
@@ -3896,7 +3914,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3896
3914
|
mount(rootContainer, isHydrate, namespace) {
|
|
3897
3915
|
if (!isMounted) {
|
|
3898
3916
|
if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) {
|
|
3899
|
-
warn(
|
|
3917
|
+
warn$1(
|
|
3900
3918
|
`There is already an app instance mounted on the host container.
|
|
3901
3919
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
3902
3920
|
);
|
|
@@ -3931,7 +3949,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3931
3949
|
}
|
|
3932
3950
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
3933
3951
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3934
|
-
warn(
|
|
3952
|
+
warn$1(
|
|
3935
3953
|
`App has already been mounted.
|
|
3936
3954
|
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)\``
|
|
3937
3955
|
);
|
|
@@ -3946,12 +3964,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
3946
3964
|
}
|
|
3947
3965
|
delete app._container.__vue_app__;
|
|
3948
3966
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3949
|
-
warn(`Cannot unmount an app that is not mounted.`);
|
|
3967
|
+
warn$1(`Cannot unmount an app that is not mounted.`);
|
|
3950
3968
|
}
|
|
3951
3969
|
},
|
|
3952
3970
|
provide(key, value) {
|
|
3953
3971
|
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
3954
|
-
warn(
|
|
3972
|
+
warn$1(
|
|
3955
3973
|
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
3956
3974
|
);
|
|
3957
3975
|
}
|
|
@@ -3975,7 +3993,7 @@ let currentApp = null;
|
|
|
3975
3993
|
function provide(key, value) {
|
|
3976
3994
|
if (!currentInstance) {
|
|
3977
3995
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3978
|
-
warn(`provide() can only be used inside setup().`);
|
|
3996
|
+
warn$1(`provide() can only be used inside setup().`);
|
|
3979
3997
|
}
|
|
3980
3998
|
} else {
|
|
3981
3999
|
let provides = currentInstance.provides;
|
|
@@ -3995,10 +4013,10 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3995
4013
|
} else if (arguments.length > 1) {
|
|
3996
4014
|
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
3997
4015
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3998
|
-
warn(`injection "${String(key)}" not found.`);
|
|
4016
|
+
warn$1(`injection "${String(key)}" not found.`);
|
|
3999
4017
|
}
|
|
4000
4018
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4001
|
-
warn(`inject() can only be used inside setup() or functional components.`);
|
|
4019
|
+
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
4002
4020
|
}
|
|
4003
4021
|
}
|
|
4004
4022
|
function hasInjectionContext() {
|
|
@@ -4075,7 +4093,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4075
4093
|
value,
|
|
4076
4094
|
instance,
|
|
4077
4095
|
false
|
|
4078
|
-
/* isAbsent */
|
|
4079
4096
|
);
|
|
4080
4097
|
}
|
|
4081
4098
|
} else {
|
|
@@ -4107,7 +4124,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4107
4124
|
void 0,
|
|
4108
4125
|
instance,
|
|
4109
4126
|
true
|
|
4110
|
-
/* isAbsent */
|
|
4111
4127
|
);
|
|
4112
4128
|
}
|
|
4113
4129
|
} else {
|
|
@@ -4242,7 +4258,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
4242
4258
|
if (isArray(raw)) {
|
|
4243
4259
|
for (let i = 0; i < raw.length; i++) {
|
|
4244
4260
|
if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) {
|
|
4245
|
-
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
4261
|
+
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
4246
4262
|
}
|
|
4247
4263
|
const normalizedKey = camelize(raw[i]);
|
|
4248
4264
|
if (validatePropName(normalizedKey)) {
|
|
@@ -4251,7 +4267,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
4251
4267
|
}
|
|
4252
4268
|
} else if (raw) {
|
|
4253
4269
|
if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) {
|
|
4254
|
-
warn(`invalid props options`, raw);
|
|
4270
|
+
warn$1(`invalid props options`, raw);
|
|
4255
4271
|
}
|
|
4256
4272
|
for (const key in raw) {
|
|
4257
4273
|
const normalizedKey = camelize(key);
|
|
@@ -4280,7 +4296,7 @@ function validatePropName(key) {
|
|
|
4280
4296
|
if (key[0] !== "$") {
|
|
4281
4297
|
return true;
|
|
4282
4298
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4283
|
-
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
4299
|
+
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
4284
4300
|
}
|
|
4285
4301
|
return false;
|
|
4286
4302
|
}
|
|
@@ -4318,7 +4334,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
4318
4334
|
function validateProp(name, value, prop, props, isAbsent) {
|
|
4319
4335
|
const { type, required, validator, skipCheck } = prop;
|
|
4320
4336
|
if (required && isAbsent) {
|
|
4321
|
-
warn('Missing required prop: "' + name + '"');
|
|
4337
|
+
warn$1('Missing required prop: "' + name + '"');
|
|
4322
4338
|
return;
|
|
4323
4339
|
}
|
|
4324
4340
|
if (value == null && !required) {
|
|
@@ -4334,12 +4350,12 @@ function validateProp(name, value, prop, props, isAbsent) {
|
|
|
4334
4350
|
isValid = valid;
|
|
4335
4351
|
}
|
|
4336
4352
|
if (!isValid) {
|
|
4337
|
-
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
4353
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
4338
4354
|
return;
|
|
4339
4355
|
}
|
|
4340
4356
|
}
|
|
4341
4357
|
if (validator && !validator(value, props)) {
|
|
4342
|
-
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
4358
|
+
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
4343
4359
|
}
|
|
4344
4360
|
}
|
|
4345
4361
|
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
@@ -4411,7 +4427,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
4411
4427
|
}
|
|
4412
4428
|
const normalized = withCtx((...args) => {
|
|
4413
4429
|
if (!!(process.env.NODE_ENV !== "production") && currentInstance) {
|
|
4414
|
-
warn(
|
|
4430
|
+
warn$1(
|
|
4415
4431
|
`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.`
|
|
4416
4432
|
);
|
|
4417
4433
|
}
|
|
@@ -4430,7 +4446,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
4430
4446
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
4431
4447
|
} else if (value != null) {
|
|
4432
4448
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
4433
|
-
warn(
|
|
4449
|
+
warn$1(
|
|
4434
4450
|
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
4435
4451
|
);
|
|
4436
4452
|
}
|
|
@@ -4441,7 +4457,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
4441
4457
|
};
|
|
4442
4458
|
const normalizeVNodeSlots = (instance, children) => {
|
|
4443
4459
|
if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) {
|
|
4444
|
-
warn(
|
|
4460
|
+
warn$1(
|
|
4445
4461
|
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
4446
4462
|
);
|
|
4447
4463
|
}
|
|
@@ -4523,7 +4539,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4523
4539
|
const value = isUnmount ? null : refValue;
|
|
4524
4540
|
const { i: owner, r: ref } = rawRef;
|
|
4525
4541
|
if (!!(process.env.NODE_ENV !== "production") && !owner) {
|
|
4526
|
-
warn(
|
|
4542
|
+
warn$1(
|
|
4527
4543
|
`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
|
|
4528
4544
|
);
|
|
4529
4545
|
return;
|
|
@@ -4578,7 +4594,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4578
4594
|
if (rawRef.k)
|
|
4579
4595
|
refs[rawRef.k] = value;
|
|
4580
4596
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4581
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4597
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4582
4598
|
}
|
|
4583
4599
|
};
|
|
4584
4600
|
if (value) {
|
|
@@ -4588,7 +4604,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4588
4604
|
doSet();
|
|
4589
4605
|
}
|
|
4590
4606
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4591
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4607
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4592
4608
|
}
|
|
4593
4609
|
}
|
|
4594
4610
|
}
|
|
@@ -4620,7 +4636,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4620
4636
|
} = rendererInternals;
|
|
4621
4637
|
const hydrate = (vnode, container) => {
|
|
4622
4638
|
if (!container.hasChildNodes()) {
|
|
4623
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4639
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4624
4640
|
`Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
|
|
4625
4641
|
);
|
|
4626
4642
|
patch(null, vnode, container);
|
|
@@ -4680,7 +4696,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4680
4696
|
} else {
|
|
4681
4697
|
if (node.data !== vnode.children) {
|
|
4682
4698
|
hasMismatch = true;
|
|
4683
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4699
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4684
4700
|
`Hydration text mismatch in`,
|
|
4685
4701
|
node.parentNode,
|
|
4686
4702
|
`
|
|
@@ -4815,7 +4831,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4815
4831
|
hydrateNode
|
|
4816
4832
|
);
|
|
4817
4833
|
} else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {
|
|
4818
|
-
warn("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4834
|
+
warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4819
4835
|
}
|
|
4820
4836
|
}
|
|
4821
4837
|
if (ref != null) {
|
|
@@ -4856,7 +4872,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4856
4872
|
while (next) {
|
|
4857
4873
|
hasMismatch = true;
|
|
4858
4874
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4859
|
-
warn(
|
|
4875
|
+
warn$1(
|
|
4860
4876
|
`Hydration children mismatch on`,
|
|
4861
4877
|
el,
|
|
4862
4878
|
`
|
|
@@ -4871,7 +4887,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4871
4887
|
} else if (shapeFlag & 8) {
|
|
4872
4888
|
if (el.textContent !== vnode.children) {
|
|
4873
4889
|
hasMismatch = true;
|
|
4874
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4890
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4875
4891
|
`Hydration text content mismatch on`,
|
|
4876
4892
|
el,
|
|
4877
4893
|
`
|
|
@@ -4950,7 +4966,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4950
4966
|
} else {
|
|
4951
4967
|
hasMismatch = true;
|
|
4952
4968
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4953
|
-
warn(
|
|
4969
|
+
warn$1(
|
|
4954
4970
|
`Hydration children mismatch on`,
|
|
4955
4971
|
container,
|
|
4956
4972
|
`
|
|
@@ -4997,7 +5013,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4997
5013
|
};
|
|
4998
5014
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4999
5015
|
hasMismatch = true;
|
|
5000
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
5016
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
5001
5017
|
`Hydration node mismatch:
|
|
5002
5018
|
- rendered on server:`,
|
|
5003
5019
|
node,
|
|
@@ -5096,7 +5112,7 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
5096
5112
|
}
|
|
5097
5113
|
if (mismatchType) {
|
|
5098
5114
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
5099
|
-
warn(
|
|
5115
|
+
warn$1(
|
|
5100
5116
|
`Hydration ${mismatchType} mismatch on`,
|
|
5101
5117
|
el,
|
|
5102
5118
|
`
|
|
@@ -5202,7 +5218,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5202
5218
|
const target = getGlobalThis();
|
|
5203
5219
|
target.__VUE__ = true;
|
|
5204
5220
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5205
|
-
setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5221
|
+
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5206
5222
|
}
|
|
5207
5223
|
const {
|
|
5208
5224
|
insert: hostInsert,
|
|
@@ -5311,7 +5327,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5311
5327
|
internals
|
|
5312
5328
|
);
|
|
5313
5329
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
5314
|
-
warn("Invalid VNode type:", type, `(${typeof type})`);
|
|
5330
|
+
warn$1("Invalid VNode type:", type, `(${typeof type})`);
|
|
5315
5331
|
}
|
|
5316
5332
|
}
|
|
5317
5333
|
if (ref != null && parentComponent) {
|
|
@@ -6291,7 +6307,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6291
6307
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
6292
6308
|
if (nextChild.key != null) {
|
|
6293
6309
|
if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) {
|
|
6294
|
-
warn(
|
|
6310
|
+
warn$1(
|
|
6295
6311
|
`Duplicate keys found during update:`,
|
|
6296
6312
|
JSON.stringify(nextChild.key),
|
|
6297
6313
|
`Make sure keys are unique.`
|
|
@@ -6720,14 +6736,14 @@ const resolveTarget = (props, select) => {
|
|
|
6720
6736
|
const targetSelector = props && props.to;
|
|
6721
6737
|
if (isString(targetSelector)) {
|
|
6722
6738
|
if (!select) {
|
|
6723
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6739
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
6724
6740
|
`Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
|
|
6725
6741
|
);
|
|
6726
6742
|
return null;
|
|
6727
6743
|
} else {
|
|
6728
6744
|
const target = select(targetSelector);
|
|
6729
6745
|
if (!target) {
|
|
6730
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6746
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
6731
6747
|
`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.`
|
|
6732
6748
|
);
|
|
6733
6749
|
}
|
|
@@ -6735,7 +6751,7 @@ const resolveTarget = (props, select) => {
|
|
|
6735
6751
|
}
|
|
6736
6752
|
} else {
|
|
6737
6753
|
if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) {
|
|
6738
|
-
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
6754
|
+
warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
6739
6755
|
}
|
|
6740
6756
|
return targetSelector;
|
|
6741
6757
|
}
|
|
@@ -6771,7 +6787,7 @@ const TeleportImpl = {
|
|
|
6771
6787
|
namespace = "mathml";
|
|
6772
6788
|
}
|
|
6773
6789
|
} else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
|
|
6774
|
-
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
6790
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
6775
6791
|
}
|
|
6776
6792
|
const mount = (container2, anchor2) => {
|
|
6777
6793
|
if (shapeFlag & 16) {
|
|
@@ -6858,7 +6874,7 @@ const TeleportImpl = {
|
|
|
6858
6874
|
0
|
|
6859
6875
|
);
|
|
6860
6876
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
6861
|
-
warn(
|
|
6877
|
+
warn$1(
|
|
6862
6878
|
"Invalid Teleport target on update:",
|
|
6863
6879
|
target,
|
|
6864
6880
|
`(${typeof target})`
|
|
@@ -7021,7 +7037,6 @@ function createElementBlock(type, props, children, patchFlag, dynamicProps, shap
|
|
|
7021
7037
|
dynamicProps,
|
|
7022
7038
|
shapeFlag,
|
|
7023
7039
|
true
|
|
7024
|
-
/* isBlock */
|
|
7025
7040
|
)
|
|
7026
7041
|
);
|
|
7027
7042
|
}
|
|
@@ -7034,7 +7049,6 @@ function createBlock(type, props, children, patchFlag, dynamicProps) {
|
|
|
7034
7049
|
patchFlag,
|
|
7035
7050
|
dynamicProps,
|
|
7036
7051
|
true
|
|
7037
|
-
/* isBlock: prevent a block from tracking itself */
|
|
7038
7052
|
)
|
|
7039
7053
|
);
|
|
7040
7054
|
}
|
|
@@ -7108,7 +7122,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
7108
7122
|
vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
7109
7123
|
}
|
|
7110
7124
|
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
|
|
7111
|
-
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7125
|
+
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7112
7126
|
}
|
|
7113
7127
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
7114
7128
|
!isBlockNode && // has current parent block
|
|
@@ -7127,7 +7141,7 @@ const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithA
|
|
|
7127
7141
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
7128
7142
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
7129
7143
|
if (!!(process.env.NODE_ENV !== "production") && !type) {
|
|
7130
|
-
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
7144
|
+
warn$1(`Invalid vnode type when creating vnode: ${type}.`);
|
|
7131
7145
|
}
|
|
7132
7146
|
type = Comment;
|
|
7133
7147
|
}
|
|
@@ -7170,7 +7184,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
7170
7184
|
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
7171
7185
|
if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
|
|
7172
7186
|
type = toRaw(type);
|
|
7173
|
-
warn(
|
|
7187
|
+
warn$1(
|
|
7174
7188
|
`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\`.`,
|
|
7175
7189
|
`
|
|
7176
7190
|
Component that was made reactive: `,
|
|
@@ -7485,7 +7499,7 @@ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
|
7485
7499
|
function validateComponentName(name, config) {
|
|
7486
7500
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
7487
7501
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
7488
|
-
warn(
|
|
7502
|
+
warn$1(
|
|
7489
7503
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
7490
7504
|
);
|
|
7491
7505
|
}
|
|
@@ -7524,7 +7538,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7524
7538
|
}
|
|
7525
7539
|
}
|
|
7526
7540
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
7527
|
-
warn(
|
|
7541
|
+
warn$1(
|
|
7528
7542
|
`"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.`
|
|
7529
7543
|
);
|
|
7530
7544
|
}
|
|
@@ -7543,7 +7557,10 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7543
7557
|
setup,
|
|
7544
7558
|
instance,
|
|
7545
7559
|
0,
|
|
7546
|
-
[
|
|
7560
|
+
[
|
|
7561
|
+
!!(process.env.NODE_ENV !== "production") ? shallowReadonly(instance.props) : instance.props,
|
|
7562
|
+
setupContext
|
|
7563
|
+
]
|
|
7547
7564
|
);
|
|
7548
7565
|
resetTracking();
|
|
7549
7566
|
unsetCurrentInstance();
|
|
@@ -7559,7 +7576,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7559
7576
|
instance.asyncDep = setupResult;
|
|
7560
7577
|
if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) {
|
|
7561
7578
|
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
7562
|
-
warn(
|
|
7579
|
+
warn$1(
|
|
7563
7580
|
`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.`
|
|
7564
7581
|
);
|
|
7565
7582
|
}
|
|
@@ -7580,7 +7597,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
7580
7597
|
}
|
|
7581
7598
|
} else if (isObject(setupResult)) {
|
|
7582
7599
|
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) {
|
|
7583
|
-
warn(
|
|
7600
|
+
warn$1(
|
|
7584
7601
|
`setup() should not return VNodes directly - return a render function instead.`
|
|
7585
7602
|
);
|
|
7586
7603
|
}
|
|
@@ -7592,7 +7609,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
7592
7609
|
exposeSetupStateOnRenderContext(instance);
|
|
7593
7610
|
}
|
|
7594
7611
|
} else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) {
|
|
7595
|
-
warn(
|
|
7612
|
+
warn$1(
|
|
7596
7613
|
`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
|
|
7597
7614
|
);
|
|
7598
7615
|
}
|
|
@@ -7653,12 +7670,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7653
7670
|
}
|
|
7654
7671
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
7655
7672
|
if (!compile && Component.template) {
|
|
7656
|
-
warn(
|
|
7673
|
+
warn$1(
|
|
7657
7674
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` )
|
|
7658
|
-
/* should not happen */
|
|
7659
7675
|
);
|
|
7660
7676
|
} else {
|
|
7661
|
-
warn(`Component is missing template or render function.`);
|
|
7677
|
+
warn$1(`Component is missing template or render function.`);
|
|
7662
7678
|
}
|
|
7663
7679
|
}
|
|
7664
7680
|
}
|
|
@@ -7672,11 +7688,11 @@ function getAttrsProxy(instance) {
|
|
|
7672
7688
|
return target[key];
|
|
7673
7689
|
},
|
|
7674
7690
|
set() {
|
|
7675
|
-
warn(`setupContext.attrs is readonly.`);
|
|
7691
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7676
7692
|
return false;
|
|
7677
7693
|
},
|
|
7678
7694
|
deleteProperty() {
|
|
7679
|
-
warn(`setupContext.attrs is readonly.`);
|
|
7695
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7680
7696
|
return false;
|
|
7681
7697
|
}
|
|
7682
7698
|
} : {
|
|
@@ -7699,7 +7715,7 @@ function createSetupContext(instance) {
|
|
|
7699
7715
|
const expose = (exposed) => {
|
|
7700
7716
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7701
7717
|
if (instance.exposed) {
|
|
7702
|
-
warn(`expose() should be called only once per setup().`);
|
|
7718
|
+
warn$1(`expose() should be called only once per setup().`);
|
|
7703
7719
|
}
|
|
7704
7720
|
if (exposed != null) {
|
|
7705
7721
|
let exposedType = typeof exposed;
|
|
@@ -7711,7 +7727,7 @@ function createSetupContext(instance) {
|
|
|
7711
7727
|
}
|
|
7712
7728
|
}
|
|
7713
7729
|
if (exposedType !== "object") {
|
|
7714
|
-
warn(
|
|
7730
|
+
warn$1(
|
|
7715
7731
|
`expose() should be passed a plain object, received ${exposedType}.`
|
|
7716
7732
|
);
|
|
7717
7733
|
}
|
|
@@ -7820,7 +7836,7 @@ const useSSRContext = () => {
|
|
|
7820
7836
|
{
|
|
7821
7837
|
const ctx = inject(ssrContextKey);
|
|
7822
7838
|
if (!ctx) {
|
|
7823
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
7839
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
7824
7840
|
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
7825
7841
|
);
|
|
7826
7842
|
}
|
|
@@ -8033,8 +8049,11 @@ function isMemoSame(cached, memo) {
|
|
|
8033
8049
|
return true;
|
|
8034
8050
|
}
|
|
8035
8051
|
|
|
8036
|
-
const version = "3.4.0-rc.
|
|
8052
|
+
const version = "3.4.0-rc.3";
|
|
8053
|
+
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8037
8054
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8055
|
+
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
|
8056
|
+
const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? setDevtoolsHook$1 : NOOP;
|
|
8038
8057
|
const _ssrUtils = {
|
|
8039
8058
|
createComponentInstance,
|
|
8040
8059
|
setupComponent,
|