@vue/runtime-dom 3.4.20 → 3.4.22
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-dom.cjs.js +48 -24
- package/dist/runtime-dom.cjs.prod.js +37 -23
- package/dist/runtime-dom.d.ts +4 -3
- package/dist/runtime-dom.esm-browser.js +117 -81
- package/dist/runtime-dom.esm-browser.prod.js +6 -5
- package/dist/runtime-dom.esm-bundler.js +51 -27
- package/dist/runtime-dom.global.js +117 -81
- package/dist/runtime-dom.global.prod.js +6 -5
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn,
|
|
6
|
+
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, onMounted, watchPostEffect, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
|
7
7
|
export * from '@vue/runtime-core';
|
|
8
|
-
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener,
|
|
8
|
+
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
|
|
9
9
|
|
|
10
10
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
11
11
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
@@ -430,8 +430,8 @@ function useCssVars(getter) {
|
|
|
430
430
|
setVarsOnVNode(instance.subTree, vars);
|
|
431
431
|
updateTeleports(vars);
|
|
432
432
|
};
|
|
433
|
-
watchPostEffect(setVars);
|
|
434
433
|
onMounted(() => {
|
|
434
|
+
watchPostEffect(setVars);
|
|
435
435
|
const ob = new MutationObserver(setVars);
|
|
436
436
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
437
437
|
onUnmounted(() => ob.disconnect());
|
|
@@ -606,15 +606,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
606
606
|
const tag = el.tagName;
|
|
607
607
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
608
608
|
!tag.includes("-")) {
|
|
609
|
-
el._value = value;
|
|
610
609
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
611
610
|
const newValue = value == null ? "" : value;
|
|
612
|
-
if (oldValue !== newValue) {
|
|
611
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
613
612
|
el.value = newValue;
|
|
614
613
|
}
|
|
615
614
|
if (value == null) {
|
|
616
615
|
el.removeAttribute(key);
|
|
617
616
|
}
|
|
617
|
+
el._value = value;
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
620
|
let needRemove = false;
|
|
@@ -654,11 +654,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
654
654
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
655
655
|
const existingInvoker = invokers[rawName];
|
|
656
656
|
if (nextValue && existingInvoker) {
|
|
657
|
-
existingInvoker.value = nextValue;
|
|
657
|
+
existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
|
|
658
658
|
} else {
|
|
659
659
|
const [name, options] = parseName(rawName);
|
|
660
660
|
if (nextValue) {
|
|
661
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
661
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
662
|
+
!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue,
|
|
663
|
+
instance
|
|
664
|
+
);
|
|
662
665
|
addEventListener(el, name, invoker, options);
|
|
663
666
|
} else if (existingInvoker) {
|
|
664
667
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -701,6 +704,16 @@ function createInvoker(initialValue, instance) {
|
|
|
701
704
|
invoker.attached = getNow();
|
|
702
705
|
return invoker;
|
|
703
706
|
}
|
|
707
|
+
function sanitizeEventValue(value, propName) {
|
|
708
|
+
if (isFunction(value) || isArray(value)) {
|
|
709
|
+
return value;
|
|
710
|
+
}
|
|
711
|
+
warn(
|
|
712
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
713
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
714
|
+
);
|
|
715
|
+
return NOOP;
|
|
716
|
+
}
|
|
704
717
|
function patchStopImmediatePropagation(e, value) {
|
|
705
718
|
if (isArray(value)) {
|
|
706
719
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -708,7 +721,9 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
708
721
|
originalStop.call(e);
|
|
709
722
|
e._stopped = true;
|
|
710
723
|
};
|
|
711
|
-
return value.map(
|
|
724
|
+
return value.map(
|
|
725
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
726
|
+
);
|
|
712
727
|
} else {
|
|
713
728
|
return value;
|
|
714
729
|
}
|
|
@@ -909,7 +924,7 @@ class VueElement extends BaseClass {
|
|
|
909
924
|
}
|
|
910
925
|
}
|
|
911
926
|
_setAttr(key) {
|
|
912
|
-
let value = this.getAttribute(key);
|
|
927
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
913
928
|
const camelKey = camelize$1(key);
|
|
914
929
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
915
930
|
value = toNumber(value);
|
|
@@ -1075,7 +1090,28 @@ const TransitionGroupImpl = {
|
|
|
1075
1090
|
const rawProps = toRaw(props);
|
|
1076
1091
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
1077
1092
|
let tag = rawProps.tag || Fragment;
|
|
1078
|
-
prevChildren =
|
|
1093
|
+
prevChildren = [];
|
|
1094
|
+
if (children) {
|
|
1095
|
+
for (let i = 0; i < children.length; i++) {
|
|
1096
|
+
const child = children[i];
|
|
1097
|
+
if (child.el && child.el instanceof Element) {
|
|
1098
|
+
prevChildren.push(child);
|
|
1099
|
+
setTransitionHooks(
|
|
1100
|
+
child,
|
|
1101
|
+
resolveTransitionHooks(
|
|
1102
|
+
child,
|
|
1103
|
+
cssTransitionProps,
|
|
1104
|
+
state,
|
|
1105
|
+
instance
|
|
1106
|
+
)
|
|
1107
|
+
);
|
|
1108
|
+
positionMap.set(
|
|
1109
|
+
child,
|
|
1110
|
+
child.el.getBoundingClientRect()
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1079
1115
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
1080
1116
|
for (let i = 0; i < children.length; i++) {
|
|
1081
1117
|
const child = children[i];
|
|
@@ -1088,16 +1124,6 @@ const TransitionGroupImpl = {
|
|
|
1088
1124
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
1089
1125
|
}
|
|
1090
1126
|
}
|
|
1091
|
-
if (prevChildren) {
|
|
1092
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
1093
|
-
const child = prevChildren[i];
|
|
1094
|
-
setTransitionHooks(
|
|
1095
|
-
child,
|
|
1096
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
1097
|
-
);
|
|
1098
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
1127
|
return createVNode(tag, null, children);
|
|
1102
1128
|
};
|
|
1103
1129
|
}
|
|
@@ -1196,7 +1222,7 @@ const vModelText = {
|
|
|
1196
1222
|
el[assignKey] = getModelAssigner(vnode);
|
|
1197
1223
|
if (el.composing)
|
|
1198
1224
|
return;
|
|
1199
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
1225
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
1200
1226
|
const newValue = value == null ? "" : value;
|
|
1201
1227
|
if (elValue === newValue) {
|
|
1202
1228
|
return;
|
|
@@ -1299,14 +1325,14 @@ const vModelSelect = {
|
|
|
1299
1325
|
// set value in mounted & updated because <select> relies on its children
|
|
1300
1326
|
// <option>s.
|
|
1301
1327
|
mounted(el, { value, modifiers: { number } }) {
|
|
1302
|
-
setSelected(el, value
|
|
1328
|
+
setSelected(el, value);
|
|
1303
1329
|
},
|
|
1304
1330
|
beforeUpdate(el, _binding, vnode) {
|
|
1305
1331
|
el[assignKey] = getModelAssigner(vnode);
|
|
1306
1332
|
},
|
|
1307
1333
|
updated(el, { value, modifiers: { number } }) {
|
|
1308
1334
|
if (!el._assigning) {
|
|
1309
|
-
setSelected(el, value
|
|
1335
|
+
setSelected(el, value);
|
|
1310
1336
|
}
|
|
1311
1337
|
}
|
|
1312
1338
|
};
|
|
@@ -1326,9 +1352,7 @@ function setSelected(el, value, number) {
|
|
|
1326
1352
|
if (isArrayValue) {
|
|
1327
1353
|
const optionType = typeof optionValue;
|
|
1328
1354
|
if (optionType === "string" || optionType === "number") {
|
|
1329
|
-
option.selected = value.
|
|
1330
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
1331
|
-
);
|
|
1355
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
1332
1356
|
} else {
|
|
1333
1357
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
1334
1358
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
var VueRuntimeDOM = (function (exports) {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
10
|
+
// @__NO_SIDE_EFFECTS__
|
|
9
11
|
function makeMap(str, expectsLowerCase) {
|
|
10
12
|
const set = new Set(str.split(","));
|
|
11
13
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -292,7 +294,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
292
294
|
};
|
|
293
295
|
const stringifySymbol = (v, i = "") => {
|
|
294
296
|
var _a;
|
|
295
|
-
return
|
|
297
|
+
return (
|
|
298
|
+
// Symbol.description in es2019+ so we need to cast here to pass
|
|
299
|
+
// the lib: es2016 check
|
|
300
|
+
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
301
|
+
);
|
|
296
302
|
};
|
|
297
303
|
|
|
298
304
|
function warn$2(msg, ...args) {
|
|
@@ -728,6 +734,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
728
734
|
return instrumentations;
|
|
729
735
|
}
|
|
730
736
|
function hasOwnProperty(key) {
|
|
737
|
+
if (!isSymbol(key))
|
|
738
|
+
key = String(key);
|
|
731
739
|
const obj = toRaw(this);
|
|
732
740
|
track(obj, "has", key);
|
|
733
741
|
return obj.hasOwnProperty(key);
|
|
@@ -1080,23 +1088,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1080
1088
|
clear: createReadonlyMethod("clear"),
|
|
1081
1089
|
forEach: createForEach(true, true)
|
|
1082
1090
|
};
|
|
1083
|
-
const iteratorMethods = [
|
|
1091
|
+
const iteratorMethods = [
|
|
1092
|
+
"keys",
|
|
1093
|
+
"values",
|
|
1094
|
+
"entries",
|
|
1095
|
+
Symbol.iterator
|
|
1096
|
+
];
|
|
1084
1097
|
iteratorMethods.forEach((method) => {
|
|
1085
|
-
mutableInstrumentations2[method] = createIterableMethod(
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
false
|
|
1089
|
-
);
|
|
1090
|
-
readonlyInstrumentations2[method] = createIterableMethod(
|
|
1091
|
-
method,
|
|
1092
|
-
true,
|
|
1093
|
-
false
|
|
1094
|
-
);
|
|
1095
|
-
shallowInstrumentations2[method] = createIterableMethod(
|
|
1096
|
-
method,
|
|
1097
|
-
false,
|
|
1098
|
-
true
|
|
1099
|
-
);
|
|
1098
|
+
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
1099
|
+
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1100
|
+
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1100
1101
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1101
1102
|
method,
|
|
1102
1103
|
true,
|
|
@@ -1253,7 +1254,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1253
1254
|
return !!(value && value["__v_isShallow"]);
|
|
1254
1255
|
}
|
|
1255
1256
|
function isProxy(value) {
|
|
1256
|
-
return
|
|
1257
|
+
return value ? !!value["__v_raw"] : false;
|
|
1257
1258
|
}
|
|
1258
1259
|
function toRaw(observed) {
|
|
1259
1260
|
const raw = observed && observed["__v_raw"];
|
|
@@ -1536,7 +1537,10 @@ getter: `, this.getter);
|
|
|
1536
1537
|
instance,
|
|
1537
1538
|
11,
|
|
1538
1539
|
[
|
|
1539
|
-
msg + args.
|
|
1540
|
+
msg + args.map((a) => {
|
|
1541
|
+
var _a, _b;
|
|
1542
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1543
|
+
}).join(""),
|
|
1540
1544
|
instance && instance.proxy,
|
|
1541
1545
|
trace.map(
|
|
1542
1546
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -1712,11 +1716,17 @@ getter: `, this.getter);
|
|
|
1712
1716
|
}
|
|
1713
1717
|
return res;
|
|
1714
1718
|
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1719
|
+
if (isArray(fn)) {
|
|
1720
|
+
const values = [];
|
|
1721
|
+
for (let i = 0; i < fn.length; i++) {
|
|
1722
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1723
|
+
}
|
|
1724
|
+
return values;
|
|
1725
|
+
} else {
|
|
1726
|
+
warn$1(
|
|
1727
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
1728
|
+
);
|
|
1718
1729
|
}
|
|
1719
|
-
return values;
|
|
1720
1730
|
}
|
|
1721
1731
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1722
1732
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1737,12 +1747,14 @@ getter: `, this.getter);
|
|
|
1737
1747
|
}
|
|
1738
1748
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1739
1749
|
if (appErrorHandler) {
|
|
1750
|
+
pauseTracking();
|
|
1740
1751
|
callWithErrorHandling(
|
|
1741
1752
|
appErrorHandler,
|
|
1742
1753
|
null,
|
|
1743
1754
|
10,
|
|
1744
1755
|
[err, exposedInstance, errorInfo]
|
|
1745
1756
|
);
|
|
1757
|
+
resetTracking();
|
|
1746
1758
|
return;
|
|
1747
1759
|
}
|
|
1748
1760
|
}
|
|
@@ -2118,6 +2130,8 @@ getter: `, this.getter);
|
|
|
2118
2130
|
_devtoolsComponentRemoved(component);
|
|
2119
2131
|
}
|
|
2120
2132
|
};
|
|
2133
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2134
|
+
// @__NO_SIDE_EFFECTS__
|
|
2121
2135
|
function createDevtoolsComponentHook(hook) {
|
|
2122
2136
|
return (component) => {
|
|
2123
2137
|
emit$1(
|
|
@@ -2703,7 +2717,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2703
2717
|
rendererInternals
|
|
2704
2718
|
);
|
|
2705
2719
|
} else {
|
|
2706
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2720
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
2707
2721
|
n2.suspense = n1.suspense;
|
|
2708
2722
|
n2.suspense.vnode = n2;
|
|
2709
2723
|
n2.el = n1.el;
|
|
@@ -4188,7 +4202,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4188
4202
|
return () => {
|
|
4189
4203
|
pendingCacheKey = null;
|
|
4190
4204
|
if (!slots.default) {
|
|
4191
|
-
return null;
|
|
4205
|
+
return current = null;
|
|
4192
4206
|
}
|
|
4193
4207
|
const children = slots.default();
|
|
4194
4208
|
const rawVNode = children[0];
|
|
@@ -4501,6 +4515,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4501
4515
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
4502
4516
|
const PublicInstanceProxyHandlers = {
|
|
4503
4517
|
get({ _: instance }, key) {
|
|
4518
|
+
if (key === "__v_skip") {
|
|
4519
|
+
return true;
|
|
4520
|
+
}
|
|
4504
4521
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
4505
4522
|
if (key === "__isVue") {
|
|
4506
4523
|
return true;
|
|
@@ -5468,10 +5485,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5468
5485
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
5469
5486
|
}
|
|
5470
5487
|
|
|
5488
|
+
const attrsProto = {};
|
|
5471
5489
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5472
5490
|
const props = {};
|
|
5473
|
-
const attrs =
|
|
5474
|
-
def(attrs, InternalObjectKey, 1);
|
|
5491
|
+
const attrs = Object.create(attrsProto);
|
|
5475
5492
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5476
5493
|
setFullProps(instance, rawProps, props, attrs);
|
|
5477
5494
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -5586,7 +5603,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5586
5603
|
}
|
|
5587
5604
|
}
|
|
5588
5605
|
if (hasAttrsChanged) {
|
|
5589
|
-
trigger(instance, "set", "
|
|
5606
|
+
trigger(instance.attrs, "set", "");
|
|
5590
5607
|
}
|
|
5591
5608
|
{
|
|
5592
5609
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -5922,7 +5939,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5922
5939
|
const type = children._;
|
|
5923
5940
|
if (type) {
|
|
5924
5941
|
instance.slots = toRaw(children);
|
|
5925
|
-
def(
|
|
5942
|
+
def(instance.slots, "_", type);
|
|
5926
5943
|
} else {
|
|
5927
5944
|
normalizeObjectSlots(
|
|
5928
5945
|
children,
|
|
@@ -5934,7 +5951,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5934
5951
|
normalizeVNodeSlots(instance, children);
|
|
5935
5952
|
}
|
|
5936
5953
|
}
|
|
5937
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
5938
5954
|
};
|
|
5939
5955
|
const updateSlots = (instance, children, optimized) => {
|
|
5940
5956
|
const { vnode, slots } = instance;
|
|
@@ -6106,6 +6122,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6106
6122
|
}
|
|
6107
6123
|
};
|
|
6108
6124
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
6125
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
6109
6126
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
6110
6127
|
const onMismatch = () => handleMismatch(
|
|
6111
6128
|
node,
|
|
@@ -8540,7 +8557,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8540
8557
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
8541
8558
|
);
|
|
8542
8559
|
};
|
|
8543
|
-
const InternalObjectKey = `__vInternal`;
|
|
8544
8560
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8545
8561
|
const normalizeRef = ({
|
|
8546
8562
|
ref,
|
|
@@ -8673,7 +8689,7 @@ Component that was made reactive: `,
|
|
|
8673
8689
|
function guardReactiveProps(props) {
|
|
8674
8690
|
if (!props)
|
|
8675
8691
|
return null;
|
|
8676
|
-
return isProxy(props) ||
|
|
8692
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
8677
8693
|
}
|
|
8678
8694
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8679
8695
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -8778,7 +8794,7 @@ Component that was made reactive: `,
|
|
|
8778
8794
|
} else {
|
|
8779
8795
|
type = 32;
|
|
8780
8796
|
const slotFlag = children._;
|
|
8781
|
-
if (!slotFlag
|
|
8797
|
+
if (!slotFlag) {
|
|
8782
8798
|
children._ctx = currentRenderingInstance;
|
|
8783
8799
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8784
8800
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -8999,7 +9015,7 @@ Component that was made reactive: `,
|
|
|
8999
9015
|
}
|
|
9000
9016
|
}
|
|
9001
9017
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
9002
|
-
instance.proxy =
|
|
9018
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
9003
9019
|
{
|
|
9004
9020
|
exposePropsOnRenderContext(instance);
|
|
9005
9021
|
}
|
|
@@ -9131,26 +9147,21 @@ Component that was made reactive: `,
|
|
|
9131
9147
|
}
|
|
9132
9148
|
}
|
|
9133
9149
|
}
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
return false;
|
|
9150
|
-
}
|
|
9151
|
-
}
|
|
9152
|
-
));
|
|
9153
|
-
}
|
|
9150
|
+
const attrsProxyHandlers = {
|
|
9151
|
+
get(target, key) {
|
|
9152
|
+
markAttrsAccessed();
|
|
9153
|
+
track(target, "get", "");
|
|
9154
|
+
return target[key];
|
|
9155
|
+
},
|
|
9156
|
+
set() {
|
|
9157
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9158
|
+
return false;
|
|
9159
|
+
},
|
|
9160
|
+
deleteProperty() {
|
|
9161
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9162
|
+
return false;
|
|
9163
|
+
}
|
|
9164
|
+
} ;
|
|
9154
9165
|
function getSlotsProxy(instance) {
|
|
9155
9166
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
9156
9167
|
get(target, key) {
|
|
@@ -9184,9 +9195,10 @@ Component that was made reactive: `,
|
|
|
9184
9195
|
instance.exposed = exposed || {};
|
|
9185
9196
|
};
|
|
9186
9197
|
{
|
|
9198
|
+
let attrsProxy;
|
|
9187
9199
|
return Object.freeze({
|
|
9188
9200
|
get attrs() {
|
|
9189
|
-
return
|
|
9201
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
9190
9202
|
},
|
|
9191
9203
|
get slots() {
|
|
9192
9204
|
return getSlotsProxy(instance);
|
|
@@ -9531,7 +9543,7 @@ Component that was made reactive: `,
|
|
|
9531
9543
|
return true;
|
|
9532
9544
|
}
|
|
9533
9545
|
|
|
9534
|
-
const version = "3.4.
|
|
9546
|
+
const version = "3.4.22";
|
|
9535
9547
|
const warn = warn$1 ;
|
|
9536
9548
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9537
9549
|
const devtools = devtools$1 ;
|
|
@@ -9957,8 +9969,8 @@ Component that was made reactive: `,
|
|
|
9957
9969
|
setVarsOnVNode(instance.subTree, vars);
|
|
9958
9970
|
updateTeleports(vars);
|
|
9959
9971
|
};
|
|
9960
|
-
watchPostEffect(setVars);
|
|
9961
9972
|
onMounted(() => {
|
|
9973
|
+
watchPostEffect(setVars);
|
|
9962
9974
|
const ob = new MutationObserver(setVars);
|
|
9963
9975
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
9964
9976
|
onUnmounted(() => ob.disconnect());
|
|
@@ -10133,15 +10145,15 @@ Component that was made reactive: `,
|
|
|
10133
10145
|
const tag = el.tagName;
|
|
10134
10146
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
10135
10147
|
!tag.includes("-")) {
|
|
10136
|
-
el._value = value;
|
|
10137
10148
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
10138
10149
|
const newValue = value == null ? "" : value;
|
|
10139
|
-
if (oldValue !== newValue) {
|
|
10150
|
+
if (oldValue !== newValue || !("_value" in el)) {
|
|
10140
10151
|
el.value = newValue;
|
|
10141
10152
|
}
|
|
10142
10153
|
if (value == null) {
|
|
10143
10154
|
el.removeAttribute(key);
|
|
10144
10155
|
}
|
|
10156
|
+
el._value = value;
|
|
10145
10157
|
return;
|
|
10146
10158
|
}
|
|
10147
10159
|
let needRemove = false;
|
|
@@ -10181,11 +10193,14 @@ Component that was made reactive: `,
|
|
|
10181
10193
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
10182
10194
|
const existingInvoker = invokers[rawName];
|
|
10183
10195
|
if (nextValue && existingInvoker) {
|
|
10184
|
-
existingInvoker.value = nextValue;
|
|
10196
|
+
existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
|
|
10185
10197
|
} else {
|
|
10186
10198
|
const [name, options] = parseName(rawName);
|
|
10187
10199
|
if (nextValue) {
|
|
10188
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
10200
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
10201
|
+
sanitizeEventValue(nextValue, rawName) ,
|
|
10202
|
+
instance
|
|
10203
|
+
);
|
|
10189
10204
|
addEventListener(el, name, invoker, options);
|
|
10190
10205
|
} else if (existingInvoker) {
|
|
10191
10206
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10228,6 +10243,16 @@ Component that was made reactive: `,
|
|
|
10228
10243
|
invoker.attached = getNow();
|
|
10229
10244
|
return invoker;
|
|
10230
10245
|
}
|
|
10246
|
+
function sanitizeEventValue(value, propName) {
|
|
10247
|
+
if (isFunction(value) || isArray(value)) {
|
|
10248
|
+
return value;
|
|
10249
|
+
}
|
|
10250
|
+
warn(
|
|
10251
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
10252
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
10253
|
+
);
|
|
10254
|
+
return NOOP;
|
|
10255
|
+
}
|
|
10231
10256
|
function patchStopImmediatePropagation(e, value) {
|
|
10232
10257
|
if (isArray(value)) {
|
|
10233
10258
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -10235,7 +10260,9 @@ Component that was made reactive: `,
|
|
|
10235
10260
|
originalStop.call(e);
|
|
10236
10261
|
e._stopped = true;
|
|
10237
10262
|
};
|
|
10238
|
-
return value.map(
|
|
10263
|
+
return value.map(
|
|
10264
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
10265
|
+
);
|
|
10239
10266
|
} else {
|
|
10240
10267
|
return value;
|
|
10241
10268
|
}
|
|
@@ -10436,7 +10463,7 @@ Component that was made reactive: `,
|
|
|
10436
10463
|
}
|
|
10437
10464
|
}
|
|
10438
10465
|
_setAttr(key) {
|
|
10439
|
-
let value = this.getAttribute(key);
|
|
10466
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
10440
10467
|
const camelKey = camelize(key);
|
|
10441
10468
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
10442
10469
|
value = toNumber(value);
|
|
@@ -10590,7 +10617,28 @@ Component that was made reactive: `,
|
|
|
10590
10617
|
const rawProps = toRaw(props);
|
|
10591
10618
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
10592
10619
|
let tag = rawProps.tag || Fragment;
|
|
10593
|
-
prevChildren =
|
|
10620
|
+
prevChildren = [];
|
|
10621
|
+
if (children) {
|
|
10622
|
+
for (let i = 0; i < children.length; i++) {
|
|
10623
|
+
const child = children[i];
|
|
10624
|
+
if (child.el && child.el instanceof Element) {
|
|
10625
|
+
prevChildren.push(child);
|
|
10626
|
+
setTransitionHooks(
|
|
10627
|
+
child,
|
|
10628
|
+
resolveTransitionHooks(
|
|
10629
|
+
child,
|
|
10630
|
+
cssTransitionProps,
|
|
10631
|
+
state,
|
|
10632
|
+
instance
|
|
10633
|
+
)
|
|
10634
|
+
);
|
|
10635
|
+
positionMap.set(
|
|
10636
|
+
child,
|
|
10637
|
+
child.el.getBoundingClientRect()
|
|
10638
|
+
);
|
|
10639
|
+
}
|
|
10640
|
+
}
|
|
10641
|
+
}
|
|
10594
10642
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
10595
10643
|
for (let i = 0; i < children.length; i++) {
|
|
10596
10644
|
const child = children[i];
|
|
@@ -10603,16 +10651,6 @@ Component that was made reactive: `,
|
|
|
10603
10651
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
10604
10652
|
}
|
|
10605
10653
|
}
|
|
10606
|
-
if (prevChildren) {
|
|
10607
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
10608
|
-
const child = prevChildren[i];
|
|
10609
|
-
setTransitionHooks(
|
|
10610
|
-
child,
|
|
10611
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
10612
|
-
);
|
|
10613
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
10614
|
-
}
|
|
10615
|
-
}
|
|
10616
10654
|
return createVNode(tag, null, children);
|
|
10617
10655
|
};
|
|
10618
10656
|
}
|
|
@@ -10711,7 +10749,7 @@ Component that was made reactive: `,
|
|
|
10711
10749
|
el[assignKey] = getModelAssigner(vnode);
|
|
10712
10750
|
if (el.composing)
|
|
10713
10751
|
return;
|
|
10714
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10752
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
10715
10753
|
const newValue = value == null ? "" : value;
|
|
10716
10754
|
if (elValue === newValue) {
|
|
10717
10755
|
return;
|
|
@@ -10814,14 +10852,14 @@ Component that was made reactive: `,
|
|
|
10814
10852
|
// set value in mounted & updated because <select> relies on its children
|
|
10815
10853
|
// <option>s.
|
|
10816
10854
|
mounted(el, { value, modifiers: { number } }) {
|
|
10817
|
-
setSelected(el, value
|
|
10855
|
+
setSelected(el, value);
|
|
10818
10856
|
},
|
|
10819
10857
|
beforeUpdate(el, _binding, vnode) {
|
|
10820
10858
|
el[assignKey] = getModelAssigner(vnode);
|
|
10821
10859
|
},
|
|
10822
10860
|
updated(el, { value, modifiers: { number } }) {
|
|
10823
10861
|
if (!el._assigning) {
|
|
10824
|
-
setSelected(el, value
|
|
10862
|
+
setSelected(el, value);
|
|
10825
10863
|
}
|
|
10826
10864
|
}
|
|
10827
10865
|
};
|
|
@@ -10841,9 +10879,7 @@ Component that was made reactive: `,
|
|
|
10841
10879
|
if (isArrayValue) {
|
|
10842
10880
|
const optionType = typeof optionValue;
|
|
10843
10881
|
if (optionType === "string" || optionType === "number") {
|
|
10844
|
-
option.selected = value.
|
|
10845
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
10846
|
-
);
|
|
10882
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10847
10883
|
} else {
|
|
10848
10884
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10849
10885
|
}
|