@vue/compat 3.2.44 → 3.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +751 -628
- package/dist/vue.cjs.prod.js +556 -418
- package/dist/vue.esm-browser.js +767 -635
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +772 -642
- package/dist/vue.global.js +761 -629
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +554 -434
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +559 -441
- package/dist/vue.runtime.global.js +548 -428
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -172,7 +172,7 @@ var Vue = (function () {
|
|
|
172
172
|
// These tag configs are shared between compiler-dom and runtime-dom, so they
|
|
173
173
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
174
174
|
const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
|
|
175
|
-
'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
175
|
+
'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
176
176
|
'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
|
|
177
177
|
'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
|
|
178
178
|
'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
|
|
@@ -184,7 +184,7 @@ var Vue = (function () {
|
|
|
184
184
|
const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
|
|
185
185
|
'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
|
|
186
186
|
'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
|
|
187
|
-
'
|
|
187
|
+
'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
|
|
188
188
|
'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
|
|
189
189
|
'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
|
|
190
190
|
'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
|
|
@@ -341,12 +341,13 @@ var Vue = (function () {
|
|
|
341
341
|
arr.splice(i, 1);
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
345
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
344
|
+
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
345
|
+
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
346
346
|
const isArray = Array.isArray;
|
|
347
347
|
const isMap = (val) => toTypeString(val) === '[object Map]';
|
|
348
348
|
const isSet = (val) => toTypeString(val) === '[object Set]';
|
|
349
349
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
|
350
|
+
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
|
350
351
|
const isFunction = (val) => typeof val === 'function';
|
|
351
352
|
const isString = (val) => typeof val === 'string';
|
|
352
353
|
const isSymbol = (val) => typeof val === 'symbol';
|
|
@@ -413,10 +414,22 @@ var Vue = (function () {
|
|
|
413
414
|
value
|
|
414
415
|
});
|
|
415
416
|
};
|
|
416
|
-
|
|
417
|
+
/**
|
|
418
|
+
* "123-foo" will be parsed to 123
|
|
419
|
+
* This is used for the .number modifier in v-model
|
|
420
|
+
*/
|
|
421
|
+
const looseToNumber = (val) => {
|
|
417
422
|
const n = parseFloat(val);
|
|
418
423
|
return isNaN(n) ? val : n;
|
|
419
424
|
};
|
|
425
|
+
/**
|
|
426
|
+
* Only conerces number-like strings
|
|
427
|
+
* "123-foo" will be returned as-is
|
|
428
|
+
*/
|
|
429
|
+
const toNumber = (val) => {
|
|
430
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
431
|
+
return isNaN(n) ? val : n;
|
|
432
|
+
};
|
|
420
433
|
let _globalThis;
|
|
421
434
|
const getGlobalThis = () => {
|
|
422
435
|
return (_globalThis ||
|
|
@@ -432,7 +445,7 @@ var Vue = (function () {
|
|
|
432
445
|
: {}));
|
|
433
446
|
};
|
|
434
447
|
|
|
435
|
-
function warn(msg, ...args) {
|
|
448
|
+
function warn$1(msg, ...args) {
|
|
436
449
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
437
450
|
}
|
|
438
451
|
|
|
@@ -443,7 +456,7 @@ var Vue = (function () {
|
|
|
443
456
|
/**
|
|
444
457
|
* @internal
|
|
445
458
|
*/
|
|
446
|
-
this.
|
|
459
|
+
this._active = true;
|
|
447
460
|
/**
|
|
448
461
|
* @internal
|
|
449
462
|
*/
|
|
@@ -458,8 +471,11 @@ var Vue = (function () {
|
|
|
458
471
|
(activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
459
472
|
}
|
|
460
473
|
}
|
|
474
|
+
get active() {
|
|
475
|
+
return this._active;
|
|
476
|
+
}
|
|
461
477
|
run(fn) {
|
|
462
|
-
if (this.
|
|
478
|
+
if (this._active) {
|
|
463
479
|
const currentEffectScope = activeEffectScope;
|
|
464
480
|
try {
|
|
465
481
|
activeEffectScope = this;
|
|
@@ -470,7 +486,7 @@ var Vue = (function () {
|
|
|
470
486
|
}
|
|
471
487
|
}
|
|
472
488
|
else {
|
|
473
|
-
warn(`cannot run an inactive effect scope.`);
|
|
489
|
+
warn$1(`cannot run an inactive effect scope.`);
|
|
474
490
|
}
|
|
475
491
|
}
|
|
476
492
|
/**
|
|
@@ -488,7 +504,7 @@ var Vue = (function () {
|
|
|
488
504
|
activeEffectScope = this.parent;
|
|
489
505
|
}
|
|
490
506
|
stop(fromParent) {
|
|
491
|
-
if (this.
|
|
507
|
+
if (this._active) {
|
|
492
508
|
let i, l;
|
|
493
509
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
494
510
|
this.effects[i].stop();
|
|
@@ -511,7 +527,7 @@ var Vue = (function () {
|
|
|
511
527
|
}
|
|
512
528
|
}
|
|
513
529
|
this.parent = undefined;
|
|
514
|
-
this.
|
|
530
|
+
this._active = false;
|
|
515
531
|
}
|
|
516
532
|
}
|
|
517
533
|
}
|
|
@@ -531,7 +547,7 @@ var Vue = (function () {
|
|
|
531
547
|
activeEffectScope.cleanups.push(fn);
|
|
532
548
|
}
|
|
533
549
|
else {
|
|
534
|
-
warn(`onScopeDispose() is called when there is no active effect scope` +
|
|
550
|
+
warn$1(`onScopeDispose() is called when there is no active effect scope` +
|
|
535
551
|
` to be associated with.`);
|
|
536
552
|
}
|
|
537
553
|
}
|
|
@@ -732,7 +748,7 @@ var Vue = (function () {
|
|
|
732
748
|
deps = [...depsMap.values()];
|
|
733
749
|
}
|
|
734
750
|
else if (key === 'length' && isArray(target)) {
|
|
735
|
-
const newLength =
|
|
751
|
+
const newLength = Number(newValue);
|
|
736
752
|
depsMap.forEach((dep, key) => {
|
|
737
753
|
if (key === 'length' || key >= newLength) {
|
|
738
754
|
deps.push(dep);
|
|
@@ -821,6 +837,10 @@ var Vue = (function () {
|
|
|
821
837
|
}
|
|
822
838
|
}
|
|
823
839
|
}
|
|
840
|
+
function getDepFromReactive(object, key) {
|
|
841
|
+
var _a;
|
|
842
|
+
return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
843
|
+
}
|
|
824
844
|
|
|
825
845
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
826
846
|
const builtInSymbols = new Set(
|
|
@@ -832,7 +852,7 @@ var Vue = (function () {
|
|
|
832
852
|
.filter(key => key !== 'arguments' && key !== 'caller')
|
|
833
853
|
.map(key => Symbol[key])
|
|
834
854
|
.filter(isSymbol));
|
|
835
|
-
const get = /*#__PURE__*/ createGetter();
|
|
855
|
+
const get$1 = /*#__PURE__*/ createGetter();
|
|
836
856
|
const shallowGet = /*#__PURE__*/ createGetter(false, true);
|
|
837
857
|
const readonlyGet = /*#__PURE__*/ createGetter(true);
|
|
838
858
|
const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
|
|
@@ -866,6 +886,11 @@ var Vue = (function () {
|
|
|
866
886
|
});
|
|
867
887
|
return instrumentations;
|
|
868
888
|
}
|
|
889
|
+
function hasOwnProperty(key) {
|
|
890
|
+
const obj = toRaw(this);
|
|
891
|
+
track(obj, "has" /* TrackOpTypes.HAS */, key);
|
|
892
|
+
return obj.hasOwnProperty(key);
|
|
893
|
+
}
|
|
869
894
|
function createGetter(isReadonly = false, shallow = false) {
|
|
870
895
|
return function get(target, key, receiver) {
|
|
871
896
|
if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
|
|
@@ -889,8 +914,13 @@ var Vue = (function () {
|
|
|
889
914
|
return target;
|
|
890
915
|
}
|
|
891
916
|
const targetIsArray = isArray(target);
|
|
892
|
-
if (!isReadonly
|
|
893
|
-
|
|
917
|
+
if (!isReadonly) {
|
|
918
|
+
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
|
919
|
+
return Reflect.get(arrayInstrumentations, key, receiver);
|
|
920
|
+
}
|
|
921
|
+
if (key === 'hasOwnProperty') {
|
|
922
|
+
return hasOwnProperty;
|
|
923
|
+
}
|
|
894
924
|
}
|
|
895
925
|
const res = Reflect.get(target, key, receiver);
|
|
896
926
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
@@ -915,7 +945,7 @@ var Vue = (function () {
|
|
|
915
945
|
return res;
|
|
916
946
|
};
|
|
917
947
|
}
|
|
918
|
-
const set = /*#__PURE__*/ createSetter();
|
|
948
|
+
const set$1 = /*#__PURE__*/ createSetter();
|
|
919
949
|
const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
920
950
|
function createSetter(shallow = false) {
|
|
921
951
|
return function set(target, key, value, receiver) {
|
|
@@ -958,7 +988,7 @@ var Vue = (function () {
|
|
|
958
988
|
}
|
|
959
989
|
return result;
|
|
960
990
|
}
|
|
961
|
-
function has(target, key) {
|
|
991
|
+
function has$1(target, key) {
|
|
962
992
|
const result = Reflect.has(target, key);
|
|
963
993
|
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
964
994
|
track(target, "has" /* TrackOpTypes.HAS */, key);
|
|
@@ -970,23 +1000,23 @@ var Vue = (function () {
|
|
|
970
1000
|
return Reflect.ownKeys(target);
|
|
971
1001
|
}
|
|
972
1002
|
const mutableHandlers = {
|
|
973
|
-
get,
|
|
974
|
-
set,
|
|
1003
|
+
get: get$1,
|
|
1004
|
+
set: set$1,
|
|
975
1005
|
deleteProperty,
|
|
976
|
-
has,
|
|
1006
|
+
has: has$1,
|
|
977
1007
|
ownKeys
|
|
978
1008
|
};
|
|
979
1009
|
const readonlyHandlers = {
|
|
980
1010
|
get: readonlyGet,
|
|
981
1011
|
set(target, key) {
|
|
982
1012
|
{
|
|
983
|
-
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1013
|
+
warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
984
1014
|
}
|
|
985
1015
|
return true;
|
|
986
1016
|
},
|
|
987
1017
|
deleteProperty(target, key) {
|
|
988
1018
|
{
|
|
989
|
-
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1019
|
+
warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
990
1020
|
}
|
|
991
1021
|
return true;
|
|
992
1022
|
}
|
|
@@ -1004,7 +1034,7 @@ var Vue = (function () {
|
|
|
1004
1034
|
|
|
1005
1035
|
const toShallow = (value) => value;
|
|
1006
1036
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1007
|
-
function get
|
|
1037
|
+
function get(target, key, isReadonly = false, isShallow = false) {
|
|
1008
1038
|
// #1772: readonly(reactive(Map)) should return readonly + reactive version
|
|
1009
1039
|
// of the value
|
|
1010
1040
|
target = target["__v_raw" /* ReactiveFlags.RAW */];
|
|
@@ -1030,7 +1060,7 @@ var Vue = (function () {
|
|
|
1030
1060
|
target.get(key);
|
|
1031
1061
|
}
|
|
1032
1062
|
}
|
|
1033
|
-
function has
|
|
1063
|
+
function has(key, isReadonly = false) {
|
|
1034
1064
|
const target = this["__v_raw" /* ReactiveFlags.RAW */];
|
|
1035
1065
|
const rawTarget = toRaw(target);
|
|
1036
1066
|
const rawKey = toRaw(key);
|
|
@@ -1060,7 +1090,7 @@ var Vue = (function () {
|
|
|
1060
1090
|
}
|
|
1061
1091
|
return this;
|
|
1062
1092
|
}
|
|
1063
|
-
function set
|
|
1093
|
+
function set(key, value) {
|
|
1064
1094
|
value = toRaw(value);
|
|
1065
1095
|
const target = toRaw(this);
|
|
1066
1096
|
const { has, get } = getProto(target);
|
|
@@ -1173,41 +1203,41 @@ var Vue = (function () {
|
|
|
1173
1203
|
function createInstrumentations() {
|
|
1174
1204
|
const mutableInstrumentations = {
|
|
1175
1205
|
get(key) {
|
|
1176
|
-
return get
|
|
1206
|
+
return get(this, key);
|
|
1177
1207
|
},
|
|
1178
1208
|
get size() {
|
|
1179
1209
|
return size(this);
|
|
1180
1210
|
},
|
|
1181
|
-
has
|
|
1211
|
+
has,
|
|
1182
1212
|
add,
|
|
1183
|
-
set
|
|
1213
|
+
set,
|
|
1184
1214
|
delete: deleteEntry,
|
|
1185
1215
|
clear,
|
|
1186
1216
|
forEach: createForEach(false, false)
|
|
1187
1217
|
};
|
|
1188
1218
|
const shallowInstrumentations = {
|
|
1189
1219
|
get(key) {
|
|
1190
|
-
return get
|
|
1220
|
+
return get(this, key, false, true);
|
|
1191
1221
|
},
|
|
1192
1222
|
get size() {
|
|
1193
1223
|
return size(this);
|
|
1194
1224
|
},
|
|
1195
|
-
has
|
|
1225
|
+
has,
|
|
1196
1226
|
add,
|
|
1197
|
-
set
|
|
1227
|
+
set,
|
|
1198
1228
|
delete: deleteEntry,
|
|
1199
1229
|
clear,
|
|
1200
1230
|
forEach: createForEach(false, true)
|
|
1201
1231
|
};
|
|
1202
1232
|
const readonlyInstrumentations = {
|
|
1203
1233
|
get(key) {
|
|
1204
|
-
return get
|
|
1234
|
+
return get(this, key, true);
|
|
1205
1235
|
},
|
|
1206
1236
|
get size() {
|
|
1207
1237
|
return size(this, true);
|
|
1208
1238
|
},
|
|
1209
1239
|
has(key) {
|
|
1210
|
-
return has
|
|
1240
|
+
return has.call(this, key, true);
|
|
1211
1241
|
},
|
|
1212
1242
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1213
1243
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1217,13 +1247,13 @@ var Vue = (function () {
|
|
|
1217
1247
|
};
|
|
1218
1248
|
const shallowReadonlyInstrumentations = {
|
|
1219
1249
|
get(key) {
|
|
1220
|
-
return get
|
|
1250
|
+
return get(this, key, true, true);
|
|
1221
1251
|
},
|
|
1222
1252
|
get size() {
|
|
1223
1253
|
return size(this, true);
|
|
1224
1254
|
},
|
|
1225
1255
|
has(key) {
|
|
1226
|
-
return has
|
|
1256
|
+
return has.call(this, key, true);
|
|
1227
1257
|
},
|
|
1228
1258
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1229
1259
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1414,9 +1444,10 @@ var Vue = (function () {
|
|
|
1414
1444
|
}
|
|
1415
1445
|
function triggerRefValue(ref, newVal) {
|
|
1416
1446
|
ref = toRaw(ref);
|
|
1417
|
-
|
|
1447
|
+
const dep = ref.dep;
|
|
1448
|
+
if (dep) {
|
|
1418
1449
|
{
|
|
1419
|
-
triggerEffects(
|
|
1450
|
+
triggerEffects(dep, {
|
|
1420
1451
|
target: ref,
|
|
1421
1452
|
type: "set" /* TriggerOpTypes.SET */,
|
|
1422
1453
|
key: 'value',
|
|
@@ -1528,6 +1559,9 @@ var Vue = (function () {
|
|
|
1528
1559
|
set value(newVal) {
|
|
1529
1560
|
this._object[this._key] = newVal;
|
|
1530
1561
|
}
|
|
1562
|
+
get dep() {
|
|
1563
|
+
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1564
|
+
}
|
|
1531
1565
|
}
|
|
1532
1566
|
function toRef(object, key, defaultValue) {
|
|
1533
1567
|
const val = object[key];
|
|
@@ -1569,7 +1603,7 @@ var Vue = (function () {
|
|
|
1569
1603
|
}
|
|
1570
1604
|
}
|
|
1571
1605
|
_a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
|
|
1572
|
-
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
1606
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1573
1607
|
let getter;
|
|
1574
1608
|
let setter;
|
|
1575
1609
|
const onlyGetter = isFunction(getterOrOptions);
|
|
@@ -1599,7 +1633,7 @@ var Vue = (function () {
|
|
|
1599
1633
|
function popWarningContext() {
|
|
1600
1634
|
stack.pop();
|
|
1601
1635
|
}
|
|
1602
|
-
function warn
|
|
1636
|
+
function warn(msg, ...args) {
|
|
1603
1637
|
// avoid props formatting or warn handler tracking deps that might be mutated
|
|
1604
1638
|
// during patch, leading to infinite recursion.
|
|
1605
1639
|
pauseTracking();
|
|
@@ -1705,6 +1739,20 @@ var Vue = (function () {
|
|
|
1705
1739
|
return raw ? value : [`${key}=`, value];
|
|
1706
1740
|
}
|
|
1707
1741
|
}
|
|
1742
|
+
/**
|
|
1743
|
+
* @internal
|
|
1744
|
+
*/
|
|
1745
|
+
function assertNumber(val, type) {
|
|
1746
|
+
if (val === undefined) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
else if (typeof val !== 'number') {
|
|
1750
|
+
warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
|
|
1751
|
+
}
|
|
1752
|
+
else if (isNaN(val)) {
|
|
1753
|
+
warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1708
1756
|
|
|
1709
1757
|
const ErrorTypeStrings = {
|
|
1710
1758
|
["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
|
|
@@ -1798,7 +1846,7 @@ var Vue = (function () {
|
|
|
1798
1846
|
if (contextVNode) {
|
|
1799
1847
|
pushWarningContext(contextVNode);
|
|
1800
1848
|
}
|
|
1801
|
-
warn
|
|
1849
|
+
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
1802
1850
|
if (contextVNode) {
|
|
1803
1851
|
popWarningContext();
|
|
1804
1852
|
}
|
|
@@ -1994,7 +2042,7 @@ var Vue = (function () {
|
|
|
1994
2042
|
if (count > RECURSION_LIMIT) {
|
|
1995
2043
|
const instance = fn.ownerInstance;
|
|
1996
2044
|
const componentName = instance && getComponentName(instance.type);
|
|
1997
|
-
warn
|
|
2045
|
+
warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
|
|
1998
2046
|
`This means you have a reactive effect that is mutating its own ` +
|
|
1999
2047
|
`dependencies and thus recursively triggering itself. Possible sources ` +
|
|
2000
2048
|
`include component template, render function, updated hook or ` +
|
|
@@ -2101,12 +2149,6 @@ var Vue = (function () {
|
|
|
2101
2149
|
// components to be unmounted and re-mounted. Queue the update so that we
|
|
2102
2150
|
// don't end up forcing the same parent to re-render multiple times.
|
|
2103
2151
|
queueJob(instance.parent.update);
|
|
2104
|
-
// instance is the inner component of an async custom element
|
|
2105
|
-
// invoke to reset styles
|
|
2106
|
-
if (instance.parent.type.__asyncLoader &&
|
|
2107
|
-
instance.parent.ceReload) {
|
|
2108
|
-
instance.parent.ceReload(newComp.styles);
|
|
2109
|
-
}
|
|
2110
2152
|
}
|
|
2111
2153
|
else if (instance.appContext.reload) {
|
|
2112
2154
|
// root instance mounted via createApp() has a reload method
|
|
@@ -2151,7 +2193,7 @@ var Vue = (function () {
|
|
|
2151
2193
|
let devtools;
|
|
2152
2194
|
let buffer = [];
|
|
2153
2195
|
let devtoolsNotInstalled = false;
|
|
2154
|
-
function emit(event, ...args) {
|
|
2196
|
+
function emit$2(event, ...args) {
|
|
2155
2197
|
if (devtools) {
|
|
2156
2198
|
devtools.emit(event, ...args);
|
|
2157
2199
|
}
|
|
@@ -2198,7 +2240,7 @@ var Vue = (function () {
|
|
|
2198
2240
|
}
|
|
2199
2241
|
}
|
|
2200
2242
|
function devtoolsInitApp(app, version) {
|
|
2201
|
-
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2243
|
+
emit$2("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2202
2244
|
Fragment,
|
|
2203
2245
|
Text,
|
|
2204
2246
|
Comment,
|
|
@@ -2206,7 +2248,7 @@ var Vue = (function () {
|
|
|
2206
2248
|
});
|
|
2207
2249
|
}
|
|
2208
2250
|
function devtoolsUnmountApp(app) {
|
|
2209
|
-
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2251
|
+
emit$2("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2210
2252
|
}
|
|
2211
2253
|
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2212
2254
|
const devtoolsComponentUpdated =
|
|
@@ -2222,21 +2264,21 @@ var Vue = (function () {
|
|
|
2222
2264
|
};
|
|
2223
2265
|
function createDevtoolsComponentHook(hook) {
|
|
2224
2266
|
return (component) => {
|
|
2225
|
-
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2267
|
+
emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2226
2268
|
};
|
|
2227
2269
|
}
|
|
2228
2270
|
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2229
2271
|
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2230
2272
|
function createDevtoolsPerformanceHook(hook) {
|
|
2231
2273
|
return (component, type, time) => {
|
|
2232
|
-
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2274
|
+
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
2233
2275
|
};
|
|
2234
2276
|
}
|
|
2235
2277
|
function devtoolsComponentEmit(component, event, params) {
|
|
2236
|
-
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2278
|
+
emit$2("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2237
2279
|
}
|
|
2238
2280
|
|
|
2239
|
-
const deprecationData = {
|
|
2281
|
+
const deprecationData$1 = {
|
|
2240
2282
|
["GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */]: {
|
|
2241
2283
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2242
2284
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
@@ -2500,7 +2542,7 @@ var Vue = (function () {
|
|
|
2500
2542
|
};
|
|
2501
2543
|
const instanceWarned = Object.create(null);
|
|
2502
2544
|
const warnCount = Object.create(null);
|
|
2503
|
-
function warnDeprecation(key, instance, ...args) {
|
|
2545
|
+
function warnDeprecation$1(key, instance, ...args) {
|
|
2504
2546
|
instance = instance || getCurrentInstance();
|
|
2505
2547
|
// check user config
|
|
2506
2548
|
const config = getCompatConfigForKey(key, instance);
|
|
@@ -2521,13 +2563,13 @@ var Vue = (function () {
|
|
|
2521
2563
|
// same warning, but different component. skip the long message and just
|
|
2522
2564
|
// log the key and count.
|
|
2523
2565
|
if (dupKey in warnCount) {
|
|
2524
|
-
warn
|
|
2566
|
+
warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
|
|
2525
2567
|
return;
|
|
2526
2568
|
}
|
|
2527
2569
|
warnCount[dupKey] = 0;
|
|
2528
|
-
const { message, link } = deprecationData[key];
|
|
2529
|
-
warn
|
|
2530
|
-
if (!isCompatEnabled(key, instance, true)) {
|
|
2570
|
+
const { message, link } = deprecationData$1[key];
|
|
2571
|
+
warn(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`);
|
|
2572
|
+
if (!isCompatEnabled$1(key, instance, true)) {
|
|
2531
2573
|
console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +
|
|
2532
2574
|
`lead to runtime errors.`);
|
|
2533
2575
|
}
|
|
@@ -2551,24 +2593,24 @@ var Vue = (function () {
|
|
|
2551
2593
|
seenConfigObjects.add(config);
|
|
2552
2594
|
for (const key of Object.keys(config)) {
|
|
2553
2595
|
if (key !== 'MODE' &&
|
|
2554
|
-
!(key in deprecationData) &&
|
|
2596
|
+
!(key in deprecationData$1) &&
|
|
2555
2597
|
!(key in warnedInvalidKeys)) {
|
|
2556
2598
|
if (key.startsWith('COMPILER_')) {
|
|
2557
2599
|
if (isRuntimeOnly()) {
|
|
2558
|
-
warn
|
|
2600
|
+
warn(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2559
2601
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2560
2602
|
`configured via compiler options in your build setup instead.\n` +
|
|
2561
2603
|
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2562
2604
|
}
|
|
2563
2605
|
}
|
|
2564
2606
|
else {
|
|
2565
|
-
warn
|
|
2607
|
+
warn(`Invalid deprecation config "${key}".`);
|
|
2566
2608
|
}
|
|
2567
2609
|
warnedInvalidKeys[key] = true;
|
|
2568
2610
|
}
|
|
2569
2611
|
}
|
|
2570
2612
|
if (instance && config["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */] != null) {
|
|
2571
|
-
warn
|
|
2613
|
+
warn(`Deprecation config "${"OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */}" can only be configured globally.`);
|
|
2572
2614
|
}
|
|
2573
2615
|
}
|
|
2574
2616
|
function getCompatConfigForKey(key, instance) {
|
|
@@ -2578,7 +2620,7 @@ var Vue = (function () {
|
|
|
2578
2620
|
}
|
|
2579
2621
|
return globalCompatConfig[key];
|
|
2580
2622
|
}
|
|
2581
|
-
function isCompatEnabled(key, instance, enableForBuiltIn = false) {
|
|
2623
|
+
function isCompatEnabled$1(key, instance, enableForBuiltIn = false) {
|
|
2582
2624
|
// skip compat for built-in components
|
|
2583
2625
|
if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
|
|
2584
2626
|
return false;
|
|
@@ -2599,11 +2641,11 @@ var Vue = (function () {
|
|
|
2599
2641
|
* Use this for features that are completely removed in non-compat build.
|
|
2600
2642
|
*/
|
|
2601
2643
|
function assertCompatEnabled(key, instance, ...args) {
|
|
2602
|
-
if (!isCompatEnabled(key, instance)) {
|
|
2644
|
+
if (!isCompatEnabled$1(key, instance)) {
|
|
2603
2645
|
throw new Error(`${key} compat has been disabled.`);
|
|
2604
2646
|
}
|
|
2605
2647
|
else {
|
|
2606
|
-
warnDeprecation(key, instance, ...args);
|
|
2648
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2607
2649
|
}
|
|
2608
2650
|
}
|
|
2609
2651
|
/**
|
|
@@ -2612,19 +2654,19 @@ var Vue = (function () {
|
|
|
2612
2654
|
*/
|
|
2613
2655
|
function softAssertCompatEnabled(key, instance, ...args) {
|
|
2614
2656
|
{
|
|
2615
|
-
warnDeprecation(key, instance, ...args);
|
|
2657
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2616
2658
|
}
|
|
2617
|
-
return isCompatEnabled(key, instance);
|
|
2659
|
+
return isCompatEnabled$1(key, instance);
|
|
2618
2660
|
}
|
|
2619
2661
|
/**
|
|
2620
2662
|
* Use this for features with the same syntax but with mutually exclusive
|
|
2621
2663
|
* behavior in 2 vs 3. Only warn if compat is enabled.
|
|
2622
2664
|
* e.g. render function
|
|
2623
2665
|
*/
|
|
2624
|
-
function checkCompatEnabled(key, instance, ...args) {
|
|
2625
|
-
const enabled = isCompatEnabled(key, instance);
|
|
2666
|
+
function checkCompatEnabled$1(key, instance, ...args) {
|
|
2667
|
+
const enabled = isCompatEnabled$1(key, instance);
|
|
2626
2668
|
if (enabled) {
|
|
2627
|
-
warnDeprecation(key, instance, ...args);
|
|
2669
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2628
2670
|
}
|
|
2629
2671
|
return enabled;
|
|
2630
2672
|
}
|
|
@@ -2702,7 +2744,7 @@ var Vue = (function () {
|
|
|
2702
2744
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2703
2745
|
const comp = type;
|
|
2704
2746
|
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
|
|
2705
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2747
|
+
if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2706
2748
|
// this is a special case where we want to use the vnode component's
|
|
2707
2749
|
// compat config instead of the current rendering instance (which is the
|
|
2708
2750
|
// parent of the component that exposes v-model)
|
|
@@ -2711,7 +2753,7 @@ var Vue = (function () {
|
|
|
2711
2753
|
}
|
|
2712
2754
|
if (!warnedTypes.has(comp)) {
|
|
2713
2755
|
pushWarningContext(vnode);
|
|
2714
|
-
warnDeprecation("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2756
|
+
warnDeprecation$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2715
2757
|
popWarningContext();
|
|
2716
2758
|
warnedTypes.add(comp);
|
|
2717
2759
|
}
|
|
@@ -2744,7 +2786,7 @@ var Vue = (function () {
|
|
|
2744
2786
|
}
|
|
2745
2787
|
}
|
|
2746
2788
|
function compatModelEmit(instance, event, args) {
|
|
2747
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2789
|
+
if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2748
2790
|
return;
|
|
2749
2791
|
}
|
|
2750
2792
|
const props = instance.vnode.props;
|
|
@@ -2754,7 +2796,7 @@ var Vue = (function () {
|
|
|
2754
2796
|
}
|
|
2755
2797
|
}
|
|
2756
2798
|
|
|
2757
|
-
function emit
|
|
2799
|
+
function emit(instance, event, ...rawArgs) {
|
|
2758
2800
|
if (instance.isUnmounted)
|
|
2759
2801
|
return;
|
|
2760
2802
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
@@ -2765,7 +2807,7 @@ var Vue = (function () {
|
|
|
2765
2807
|
!((event.startsWith('hook:') ||
|
|
2766
2808
|
event.startsWith(compatModelEventPrefix)))) {
|
|
2767
2809
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
2768
|
-
warn
|
|
2810
|
+
warn(`Component emitted event "${event}" but it is neither declared in ` +
|
|
2769
2811
|
`the emits option nor as an "${toHandlerKey(event)}" prop.`);
|
|
2770
2812
|
}
|
|
2771
2813
|
}
|
|
@@ -2774,7 +2816,7 @@ var Vue = (function () {
|
|
|
2774
2816
|
if (isFunction(validator)) {
|
|
2775
2817
|
const isValid = validator(...rawArgs);
|
|
2776
2818
|
if (!isValid) {
|
|
2777
|
-
warn
|
|
2819
|
+
warn(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
2778
2820
|
}
|
|
2779
2821
|
}
|
|
2780
2822
|
}
|
|
@@ -2791,7 +2833,7 @@ var Vue = (function () {
|
|
|
2791
2833
|
args = rawArgs.map(a => (isString(a) ? a.trim() : a));
|
|
2792
2834
|
}
|
|
2793
2835
|
if (number) {
|
|
2794
|
-
args = rawArgs.map(
|
|
2836
|
+
args = rawArgs.map(looseToNumber);
|
|
2795
2837
|
}
|
|
2796
2838
|
}
|
|
2797
2839
|
{
|
|
@@ -2800,7 +2842,7 @@ var Vue = (function () {
|
|
|
2800
2842
|
{
|
|
2801
2843
|
const lowerCaseEvent = event.toLowerCase();
|
|
2802
2844
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
2803
|
-
warn
|
|
2845
|
+
warn(`Event "${lowerCaseEvent}" is emitted in component ` +
|
|
2804
2846
|
`${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
|
|
2805
2847
|
`Note that HTML attributes are case-insensitive and you cannot use ` +
|
|
2806
2848
|
`v-on to listen to camelCase events when using in-DOM templates. ` +
|
|
@@ -3090,13 +3132,13 @@ var Vue = (function () {
|
|
|
3090
3132
|
}
|
|
3091
3133
|
}
|
|
3092
3134
|
if (extraAttrs.length) {
|
|
3093
|
-
warn
|
|
3135
|
+
warn(`Extraneous non-props attributes (` +
|
|
3094
3136
|
`${extraAttrs.join(', ')}) ` +
|
|
3095
3137
|
`were passed to component but could not be automatically inherited ` +
|
|
3096
3138
|
`because component renders fragment or text root nodes.`);
|
|
3097
3139
|
}
|
|
3098
3140
|
if (eventAttrs.length) {
|
|
3099
|
-
warn
|
|
3141
|
+
warn(`Extraneous non-emits event listeners (` +
|
|
3100
3142
|
`${eventAttrs.join(', ')}) ` +
|
|
3101
3143
|
`were passed to component but could not be automatically inherited ` +
|
|
3102
3144
|
`because component renders fragment or text root nodes. ` +
|
|
@@ -3106,13 +3148,13 @@ var Vue = (function () {
|
|
|
3106
3148
|
}
|
|
3107
3149
|
}
|
|
3108
3150
|
}
|
|
3109
|
-
if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3151
|
+
if (isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3110
3152
|
vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
|
|
3111
3153
|
root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
3112
3154
|
const { class: cls, style } = vnode.props || {};
|
|
3113
3155
|
if (cls || style) {
|
|
3114
3156
|
if (inheritAttrs === false) {
|
|
3115
|
-
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3157
|
+
warnDeprecation$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3116
3158
|
}
|
|
3117
3159
|
root = cloneVNode(root, {
|
|
3118
3160
|
class: cls,
|
|
@@ -3123,7 +3165,7 @@ var Vue = (function () {
|
|
|
3123
3165
|
// inherit directives
|
|
3124
3166
|
if (vnode.dirs) {
|
|
3125
3167
|
if (!isElementRoot(root)) {
|
|
3126
|
-
warn
|
|
3168
|
+
warn(`Runtime directive used on component with non-element root node. ` +
|
|
3127
3169
|
`The directives will not function as intended.`);
|
|
3128
3170
|
}
|
|
3129
3171
|
// clone before mutating since the root may be a hoisted vnode
|
|
@@ -3133,7 +3175,7 @@ var Vue = (function () {
|
|
|
3133
3175
|
// inherit transition data
|
|
3134
3176
|
if (vnode.transition) {
|
|
3135
3177
|
if (!isElementRoot(root)) {
|
|
3136
|
-
warn
|
|
3178
|
+
warn(`Component inside <Transition> renders non-element root node ` +
|
|
3137
3179
|
`that cannot be animated.`);
|
|
3138
3180
|
}
|
|
3139
3181
|
root.transition = vnode.transition;
|
|
@@ -3468,7 +3510,10 @@ var Vue = (function () {
|
|
|
3468
3510
|
console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
|
|
3469
3511
|
}
|
|
3470
3512
|
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
3471
|
-
const timeout =
|
|
3513
|
+
const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
|
|
3514
|
+
{
|
|
3515
|
+
assertNumber(timeout, `Suspense timeout`);
|
|
3516
|
+
}
|
|
3472
3517
|
const suspense = {
|
|
3473
3518
|
vnode,
|
|
3474
3519
|
parent,
|
|
@@ -3696,7 +3741,7 @@ var Vue = (function () {
|
|
|
3696
3741
|
if (isArray(s)) {
|
|
3697
3742
|
const singleChild = filterSingleRoot(s);
|
|
3698
3743
|
if (!singleChild) {
|
|
3699
|
-
warn
|
|
3744
|
+
warn(`<Suspense> slots expect a single root node.`);
|
|
3700
3745
|
}
|
|
3701
3746
|
s = singleChild;
|
|
3702
3747
|
}
|
|
@@ -3734,7 +3779,7 @@ var Vue = (function () {
|
|
|
3734
3779
|
function provide(key, value) {
|
|
3735
3780
|
if (!currentInstance) {
|
|
3736
3781
|
{
|
|
3737
|
-
warn
|
|
3782
|
+
warn(`provide() can only be used inside setup().`);
|
|
3738
3783
|
}
|
|
3739
3784
|
}
|
|
3740
3785
|
else {
|
|
@@ -3773,11 +3818,11 @@ var Vue = (function () {
|
|
|
3773
3818
|
: defaultValue;
|
|
3774
3819
|
}
|
|
3775
3820
|
else {
|
|
3776
|
-
warn
|
|
3821
|
+
warn(`injection "${String(key)}" not found.`);
|
|
3777
3822
|
}
|
|
3778
3823
|
}
|
|
3779
3824
|
else {
|
|
3780
|
-
warn
|
|
3825
|
+
warn(`inject() can only be used inside setup() or functional components.`);
|
|
3781
3826
|
}
|
|
3782
3827
|
}
|
|
3783
3828
|
|
|
@@ -3786,17 +3831,17 @@ var Vue = (function () {
|
|
|
3786
3831
|
return doWatch(effect, null, options);
|
|
3787
3832
|
}
|
|
3788
3833
|
function watchPostEffect(effect, options) {
|
|
3789
|
-
return doWatch(effect, null,
|
|
3834
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
|
|
3790
3835
|
}
|
|
3791
3836
|
function watchSyncEffect(effect, options) {
|
|
3792
|
-
return doWatch(effect, null,
|
|
3837
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
|
|
3793
3838
|
}
|
|
3794
3839
|
// initial value for watchers to trigger on undefined initial values
|
|
3795
3840
|
const INITIAL_WATCHER_VALUE = {};
|
|
3796
3841
|
// implementation
|
|
3797
3842
|
function watch(source, cb, options) {
|
|
3798
3843
|
if (!isFunction(cb)) {
|
|
3799
|
-
warn
|
|
3844
|
+
warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
|
|
3800
3845
|
`Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
|
|
3801
3846
|
`supports \`watch(source, cb, options?) signature.`);
|
|
3802
3847
|
}
|
|
@@ -3805,19 +3850,20 @@ var Vue = (function () {
|
|
|
3805
3850
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
3806
3851
|
if (!cb) {
|
|
3807
3852
|
if (immediate !== undefined) {
|
|
3808
|
-
warn
|
|
3853
|
+
warn(`watch() "immediate" option is only respected when using the ` +
|
|
3809
3854
|
`watch(source, callback, options?) signature.`);
|
|
3810
3855
|
}
|
|
3811
3856
|
if (deep !== undefined) {
|
|
3812
|
-
warn
|
|
3857
|
+
warn(`watch() "deep" option is only respected when using the ` +
|
|
3813
3858
|
`watch(source, callback, options?) signature.`);
|
|
3814
3859
|
}
|
|
3815
3860
|
}
|
|
3816
3861
|
const warnInvalidSource = (s) => {
|
|
3817
|
-
warn
|
|
3862
|
+
warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
|
|
3818
3863
|
`a reactive object, or an array of these types.`);
|
|
3819
3864
|
};
|
|
3820
|
-
const instance = currentInstance;
|
|
3865
|
+
const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
|
|
3866
|
+
// const instance = currentInstance
|
|
3821
3867
|
let getter;
|
|
3822
3868
|
let forceTrigger = false;
|
|
3823
3869
|
let isMultiSource = false;
|
|
@@ -3875,7 +3921,7 @@ var Vue = (function () {
|
|
|
3875
3921
|
getter = () => {
|
|
3876
3922
|
const val = baseGetter();
|
|
3877
3923
|
if (isArray(val) &&
|
|
3878
|
-
checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3924
|
+
checkCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3879
3925
|
traverse(val);
|
|
3880
3926
|
}
|
|
3881
3927
|
return val;
|
|
@@ -3907,7 +3953,7 @@ var Vue = (function () {
|
|
|
3907
3953
|
? newValue.some((v, i) => hasChanged(v, oldValue[i]))
|
|
3908
3954
|
: hasChanged(newValue, oldValue)) ||
|
|
3909
3955
|
(isArray(newValue) &&
|
|
3910
|
-
isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
3956
|
+
isCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
3911
3957
|
// cleanup before running cb again
|
|
3912
3958
|
if (cleanup) {
|
|
3913
3959
|
cleanup();
|
|
@@ -3917,7 +3963,7 @@ var Vue = (function () {
|
|
|
3917
3963
|
// pass undefined as the old value when it's changed for the first time
|
|
3918
3964
|
oldValue === INITIAL_WATCHER_VALUE
|
|
3919
3965
|
? undefined
|
|
3920
|
-
:
|
|
3966
|
+
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
|
|
3921
3967
|
? []
|
|
3922
3968
|
: oldValue,
|
|
3923
3969
|
onCleanup
|
|
@@ -4097,7 +4143,7 @@ var Vue = (function () {
|
|
|
4097
4143
|
if (c.type !== Comment) {
|
|
4098
4144
|
if (hasFound) {
|
|
4099
4145
|
// warn more than one non-comment child
|
|
4100
|
-
warn
|
|
4146
|
+
warn('<transition> can only be used on a single element or component. ' +
|
|
4101
4147
|
'Use <transition-group> for lists.');
|
|
4102
4148
|
break;
|
|
4103
4149
|
}
|
|
@@ -4115,7 +4161,7 @@ var Vue = (function () {
|
|
|
4115
4161
|
mode !== 'in-out' &&
|
|
4116
4162
|
mode !== 'out-in' &&
|
|
4117
4163
|
mode !== 'default') {
|
|
4118
|
-
warn
|
|
4164
|
+
warn(`invalid <transition> mode: ${mode}`);
|
|
4119
4165
|
}
|
|
4120
4166
|
if (state.isLeaving) {
|
|
4121
4167
|
return emptyPlaceholder(child);
|
|
@@ -4426,7 +4472,7 @@ var Vue = (function () {
|
|
|
4426
4472
|
return pendingRequest;
|
|
4427
4473
|
}
|
|
4428
4474
|
if (!comp) {
|
|
4429
|
-
warn
|
|
4475
|
+
warn(`Async component loader resolved to undefined. ` +
|
|
4430
4476
|
`If you are using retry(), make sure to return its return value.`);
|
|
4431
4477
|
}
|
|
4432
4478
|
// interop module default
|
|
@@ -4519,10 +4565,15 @@ var Vue = (function () {
|
|
|
4519
4565
|
}
|
|
4520
4566
|
});
|
|
4521
4567
|
}
|
|
4522
|
-
function createInnerComp(comp,
|
|
4568
|
+
function createInnerComp(comp, parent) {
|
|
4569
|
+
const { ref, props, children, ce } = parent.vnode;
|
|
4523
4570
|
const vnode = createVNode(comp, props, children);
|
|
4524
4571
|
// ensure inner component inherits the async wrapper's ref owner
|
|
4525
4572
|
vnode.ref = ref;
|
|
4573
|
+
// pass the custom element callback on to the inner comp
|
|
4574
|
+
// and remove it from the async wrapper
|
|
4575
|
+
vnode.ce = ce;
|
|
4576
|
+
delete parent.vnode.ce;
|
|
4526
4577
|
return vnode;
|
|
4527
4578
|
}
|
|
4528
4579
|
|
|
@@ -4608,7 +4659,7 @@ var Vue = (function () {
|
|
|
4608
4659
|
}
|
|
4609
4660
|
function pruneCacheEntry(key) {
|
|
4610
4661
|
const cached = cache.get(key);
|
|
4611
|
-
if (!current || cached
|
|
4662
|
+
if (!current || !isSameVNodeType(cached, current)) {
|
|
4612
4663
|
unmount(cached);
|
|
4613
4664
|
}
|
|
4614
4665
|
else if (current) {
|
|
@@ -4640,7 +4691,7 @@ var Vue = (function () {
|
|
|
4640
4691
|
cache.forEach(cached => {
|
|
4641
4692
|
const { subTree, suspense } = instance;
|
|
4642
4693
|
const vnode = getInnerChild(subTree);
|
|
4643
|
-
if (cached.type === vnode.type) {
|
|
4694
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
4644
4695
|
// current instance will be unmounted as part of keep-alive's unmount
|
|
4645
4696
|
resetShapeFlag(vnode);
|
|
4646
4697
|
// but invoke its deactivated hook here
|
|
@@ -4660,7 +4711,7 @@ var Vue = (function () {
|
|
|
4660
4711
|
const rawVNode = children[0];
|
|
4661
4712
|
if (children.length > 1) {
|
|
4662
4713
|
{
|
|
4663
|
-
warn
|
|
4714
|
+
warn(`KeepAlive should contain exactly one component child.`);
|
|
4664
4715
|
}
|
|
4665
4716
|
current = null;
|
|
4666
4717
|
return children;
|
|
@@ -4680,8 +4731,7 @@ var Vue = (function () {
|
|
|
4680
4731
|
: comp);
|
|
4681
4732
|
const { include, exclude, max } = props;
|
|
4682
4733
|
if ((include && (!name || !matches(include, name))) ||
|
|
4683
|
-
(exclude && name && matches(exclude, name))
|
|
4684
|
-
(hmrDirtyComponents.has(comp))) {
|
|
4734
|
+
(exclude && name && matches(exclude, name))) {
|
|
4685
4735
|
current = vnode;
|
|
4686
4736
|
return rawVNode;
|
|
4687
4737
|
}
|
|
@@ -4741,7 +4791,7 @@ var Vue = (function () {
|
|
|
4741
4791
|
else if (isString(pattern)) {
|
|
4742
4792
|
return pattern.split(',').includes(name);
|
|
4743
4793
|
}
|
|
4744
|
-
else if (pattern
|
|
4794
|
+
else if (isRegExp(pattern)) {
|
|
4745
4795
|
return pattern.test(name);
|
|
4746
4796
|
}
|
|
4747
4797
|
/* istanbul ignore next */
|
|
@@ -4794,14 +4844,9 @@ var Vue = (function () {
|
|
|
4794
4844
|
}, target);
|
|
4795
4845
|
}
|
|
4796
4846
|
function resetShapeFlag(vnode) {
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
}
|
|
4801
|
-
if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
4802
|
-
shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4803
|
-
}
|
|
4804
|
-
vnode.shapeFlag = shapeFlag;
|
|
4847
|
+
// bitwise operations to remove keep alive flags
|
|
4848
|
+
vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4849
|
+
vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4805
4850
|
}
|
|
4806
4851
|
function getInnerChild(vnode) {
|
|
4807
4852
|
return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
|
|
@@ -4840,7 +4885,7 @@ var Vue = (function () {
|
|
|
4840
4885
|
}
|
|
4841
4886
|
else {
|
|
4842
4887
|
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
|
|
4843
|
-
warn
|
|
4888
|
+
warn(`${apiName} is called when there is no active component instance to be ` +
|
|
4844
4889
|
`associated with. ` +
|
|
4845
4890
|
`Lifecycle injection APIs can only be used during execution of setup().` +
|
|
4846
4891
|
(` If you are using async setup(), make sure to register lifecycle ` +
|
|
@@ -4870,18 +4915,18 @@ var Vue = (function () {
|
|
|
4870
4915
|
const root = instance.subTree;
|
|
4871
4916
|
const children = [];
|
|
4872
4917
|
if (root) {
|
|
4873
|
-
walk(root, children);
|
|
4918
|
+
walk$1(root, children);
|
|
4874
4919
|
}
|
|
4875
4920
|
return children;
|
|
4876
4921
|
}
|
|
4877
|
-
function walk(vnode, children) {
|
|
4922
|
+
function walk$1(vnode, children) {
|
|
4878
4923
|
if (vnode.component) {
|
|
4879
4924
|
children.push(vnode.component.proxy);
|
|
4880
4925
|
}
|
|
4881
4926
|
else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
4882
4927
|
const vnodes = vnode.children;
|
|
4883
4928
|
for (let i = 0; i < vnodes.length; i++) {
|
|
4884
|
-
walk(vnodes[i], children);
|
|
4929
|
+
walk$1(vnodes[i], children);
|
|
4885
4930
|
}
|
|
4886
4931
|
}
|
|
4887
4932
|
}
|
|
@@ -4944,7 +4989,7 @@ var Vue = (function () {
|
|
|
4944
4989
|
*/
|
|
4945
4990
|
function validateDirectiveName(name) {
|
|
4946
4991
|
if (isBuiltInDirective(name)) {
|
|
4947
|
-
warn
|
|
4992
|
+
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
4948
4993
|
}
|
|
4949
4994
|
}
|
|
4950
4995
|
/**
|
|
@@ -4953,7 +4998,7 @@ var Vue = (function () {
|
|
|
4953
4998
|
function withDirectives(vnode, directives) {
|
|
4954
4999
|
const internalInstance = currentRenderingInstance;
|
|
4955
5000
|
if (internalInstance === null) {
|
|
4956
|
-
warn
|
|
5001
|
+
warn(`withDirectives can only be used inside render functions.`);
|
|
4957
5002
|
return vnode;
|
|
4958
5003
|
}
|
|
4959
5004
|
const instance = getExposeProxy(internalInstance) ||
|
|
@@ -5042,7 +5087,7 @@ var Vue = (function () {
|
|
|
5042
5087
|
* v2 compat only
|
|
5043
5088
|
* @internal
|
|
5044
5089
|
*/
|
|
5045
|
-
function resolveFilter(name) {
|
|
5090
|
+
function resolveFilter$1(name) {
|
|
5046
5091
|
return resolveAsset(FILTERS, name);
|
|
5047
5092
|
}
|
|
5048
5093
|
// implementation
|
|
@@ -5075,12 +5120,12 @@ var Vue = (function () {
|
|
|
5075
5120
|
? `\nIf this is a native custom element, make sure to exclude it from ` +
|
|
5076
5121
|
`component resolution via compilerOptions.isCustomElement.`
|
|
5077
5122
|
: ``;
|
|
5078
|
-
warn
|
|
5123
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
5079
5124
|
}
|
|
5080
5125
|
return res;
|
|
5081
5126
|
}
|
|
5082
5127
|
else {
|
|
5083
|
-
warn
|
|
5128
|
+
warn(`resolve${capitalize(type.slice(0, -1))} ` +
|
|
5084
5129
|
`can only be used in render() or setup().`);
|
|
5085
5130
|
}
|
|
5086
5131
|
}
|
|
@@ -5106,7 +5151,7 @@ var Vue = (function () {
|
|
|
5106
5151
|
return;
|
|
5107
5152
|
}
|
|
5108
5153
|
// v2 render function, try to provide compat
|
|
5109
|
-
if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
5154
|
+
if (checkCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
5110
5155
|
const wrapped = (Component.render = function compatRender() {
|
|
5111
5156
|
// @ts-ignore
|
|
5112
5157
|
return render.call(this, compatH);
|
|
@@ -5267,8 +5312,8 @@ var Vue = (function () {
|
|
|
5267
5312
|
}
|
|
5268
5313
|
function defineLegacyVNodeProperties(vnode) {
|
|
5269
5314
|
/* istanbul ignore if */
|
|
5270
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5271
|
-
isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5315
|
+
if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5316
|
+
isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5272
5317
|
const context = currentRenderingInstance;
|
|
5273
5318
|
const getInstance = () => vnode.component && vnode.component.proxy;
|
|
5274
5319
|
let componentOptions;
|
|
@@ -5358,7 +5403,7 @@ var Vue = (function () {
|
|
|
5358
5403
|
}
|
|
5359
5404
|
else if (typeof source === 'number') {
|
|
5360
5405
|
if (!Number.isInteger(source)) {
|
|
5361
|
-
warn
|
|
5406
|
+
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
5362
5407
|
}
|
|
5363
5408
|
ret = new Array(source);
|
|
5364
5409
|
for (let i = 0; i < source; i++) {
|
|
@@ -5429,11 +5474,13 @@ var Vue = (function () {
|
|
|
5429
5474
|
(currentRenderingInstance.parent &&
|
|
5430
5475
|
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
5431
5476
|
currentRenderingInstance.parent.isCE)) {
|
|
5432
|
-
|
|
5477
|
+
if (name !== 'default')
|
|
5478
|
+
props.name = name;
|
|
5479
|
+
return createVNode('slot', props, fallback && fallback());
|
|
5433
5480
|
}
|
|
5434
5481
|
let slot = slots[name];
|
|
5435
5482
|
if (slot && slot.length > 1) {
|
|
5436
|
-
warn
|
|
5483
|
+
warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
|
|
5437
5484
|
`function. You need to mark this component with $dynamic-slots in the ` +
|
|
5438
5485
|
`parent template.`);
|
|
5439
5486
|
slot = () => [];
|
|
@@ -5486,7 +5533,7 @@ var Vue = (function () {
|
|
|
5486
5533
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5487
5534
|
const ret = {};
|
|
5488
5535
|
if (!isObject(obj)) {
|
|
5489
|
-
warn
|
|
5536
|
+
warn(`v-on with no argument expects an object value.`);
|
|
5490
5537
|
return ret;
|
|
5491
5538
|
}
|
|
5492
5539
|
for (const key in obj) {
|
|
@@ -5647,7 +5694,7 @@ var Vue = (function () {
|
|
|
5647
5694
|
},
|
|
5648
5695
|
// overrides existing accessor
|
|
5649
5696
|
$slots: i => {
|
|
5650
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5697
|
+
if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5651
5698
|
i.render &&
|
|
5652
5699
|
i.render._compatWrapped) {
|
|
5653
5700
|
return new Proxy(i.slots, legacySlotProxyHandlers);
|
|
@@ -5672,7 +5719,7 @@ var Vue = (function () {
|
|
|
5672
5719
|
$listeners: getCompatListeners
|
|
5673
5720
|
});
|
|
5674
5721
|
/* istanbul ignore if */
|
|
5675
|
-
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5722
|
+
if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5676
5723
|
extend(map, {
|
|
5677
5724
|
// needed by many libs / render fns
|
|
5678
5725
|
$vnode: i => i.vnode,
|
|
@@ -5694,14 +5741,14 @@ var Vue = (function () {
|
|
|
5694
5741
|
$createElement: () => compatH,
|
|
5695
5742
|
_c: () => compatH,
|
|
5696
5743
|
_o: () => legacyMarkOnce,
|
|
5697
|
-
_n: () =>
|
|
5744
|
+
_n: () => looseToNumber,
|
|
5698
5745
|
_s: () => toDisplayString,
|
|
5699
5746
|
_l: () => renderList,
|
|
5700
5747
|
_t: i => legacyRenderSlot.bind(null, i),
|
|
5701
5748
|
_q: () => looseEqual,
|
|
5702
5749
|
_i: () => looseIndexOf,
|
|
5703
5750
|
_m: i => legacyRenderStatic.bind(null, i),
|
|
5704
|
-
_f: () => resolveFilter,
|
|
5751
|
+
_f: () => resolveFilter$1,
|
|
5705
5752
|
_k: i => legacyCheckKeyCodes.bind(null, i),
|
|
5706
5753
|
_b: () => legacyBindObjectProps,
|
|
5707
5754
|
_v: () => createTextVNode,
|
|
@@ -5749,6 +5796,7 @@ var Vue = (function () {
|
|
|
5749
5796
|
installCompatInstanceProperties(publicPropertiesMap);
|
|
5750
5797
|
}
|
|
5751
5798
|
const isReservedPrefix = (key) => key === '_' || key === '$';
|
|
5799
|
+
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
5752
5800
|
const PublicInstanceProxyHandlers = {
|
|
5753
5801
|
get({ _: instance }, key) {
|
|
5754
5802
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
@@ -5756,15 +5804,6 @@ var Vue = (function () {
|
|
|
5756
5804
|
if (key === '__isVue') {
|
|
5757
5805
|
return true;
|
|
5758
5806
|
}
|
|
5759
|
-
// prioritize <script setup> bindings during dev.
|
|
5760
|
-
// this allows even properties that start with _ or $ to be used - so that
|
|
5761
|
-
// it aligns with the production behavior where the render fn is inlined and
|
|
5762
|
-
// indeed has access to all declared variables.
|
|
5763
|
-
if (setupState !== EMPTY_OBJ &&
|
|
5764
|
-
setupState.__isScriptSetup &&
|
|
5765
|
-
hasOwn(setupState, key)) {
|
|
5766
|
-
return setupState[key];
|
|
5767
|
-
}
|
|
5768
5807
|
// data / props / ctx
|
|
5769
5808
|
// This getter gets called for every property access on the render context
|
|
5770
5809
|
// during render and is a major hotspot. The most expensive part of this
|
|
@@ -5787,7 +5826,7 @@ var Vue = (function () {
|
|
|
5787
5826
|
// default: just fallthrough
|
|
5788
5827
|
}
|
|
5789
5828
|
}
|
|
5790
|
-
else if (
|
|
5829
|
+
else if (hasSetupBinding(setupState, key)) {
|
|
5791
5830
|
accessCache[key] = 1 /* AccessTypes.SETUP */;
|
|
5792
5831
|
return setupState[key];
|
|
5793
5832
|
}
|
|
@@ -5855,32 +5894,37 @@ var Vue = (function () {
|
|
|
5855
5894
|
// to infinite warning loop
|
|
5856
5895
|
key.indexOf('__v') !== 0)) {
|
|
5857
5896
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
5858
|
-
warn
|
|
5897
|
+
warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
|
|
5859
5898
|
`character ("$" or "_") and is not proxied on the render context.`);
|
|
5860
5899
|
}
|
|
5861
5900
|
else if (instance === currentRenderingInstance) {
|
|
5862
|
-
warn
|
|
5901
|
+
warn(`Property ${JSON.stringify(key)} was accessed during render ` +
|
|
5863
5902
|
`but is not defined on instance.`);
|
|
5864
5903
|
}
|
|
5865
5904
|
}
|
|
5866
5905
|
},
|
|
5867
5906
|
set({ _: instance }, key, value) {
|
|
5868
5907
|
const { data, setupState, ctx } = instance;
|
|
5869
|
-
if (
|
|
5908
|
+
if (hasSetupBinding(setupState, key)) {
|
|
5870
5909
|
setupState[key] = value;
|
|
5871
5910
|
return true;
|
|
5872
5911
|
}
|
|
5912
|
+
else if (setupState.__isScriptSetup &&
|
|
5913
|
+
hasOwn(setupState, key)) {
|
|
5914
|
+
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
5915
|
+
return false;
|
|
5916
|
+
}
|
|
5873
5917
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
5874
5918
|
data[key] = value;
|
|
5875
5919
|
return true;
|
|
5876
5920
|
}
|
|
5877
5921
|
else if (hasOwn(instance.props, key)) {
|
|
5878
|
-
warn
|
|
5922
|
+
warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
5879
5923
|
return false;
|
|
5880
5924
|
}
|
|
5881
5925
|
if (key[0] === '$' && key.slice(1) in instance) {
|
|
5882
|
-
warn
|
|
5883
|
-
`Properties starting with $ are reserved and readonly
|
|
5926
|
+
warn(`Attempting to mutate public property "${key}". ` +
|
|
5927
|
+
`Properties starting with $ are reserved and readonly.`);
|
|
5884
5928
|
return false;
|
|
5885
5929
|
}
|
|
5886
5930
|
else {
|
|
@@ -5901,7 +5945,7 @@ var Vue = (function () {
|
|
|
5901
5945
|
let normalizedProps;
|
|
5902
5946
|
return (!!accessCache[key] ||
|
|
5903
5947
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
5904
|
-
(setupState
|
|
5948
|
+
hasSetupBinding(setupState, key) ||
|
|
5905
5949
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
5906
5950
|
hasOwn(ctx, key) ||
|
|
5907
5951
|
hasOwn(publicPropertiesMap, key) ||
|
|
@@ -5920,7 +5964,7 @@ var Vue = (function () {
|
|
|
5920
5964
|
};
|
|
5921
5965
|
{
|
|
5922
5966
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
5923
|
-
warn
|
|
5967
|
+
warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
|
|
5924
5968
|
`The keys will be empty in production mode to avoid performance overhead.`);
|
|
5925
5969
|
return Reflect.ownKeys(target);
|
|
5926
5970
|
};
|
|
@@ -5936,7 +5980,7 @@ var Vue = (function () {
|
|
|
5936
5980
|
has(_, key) {
|
|
5937
5981
|
const has = key[0] !== '_' && !isGloballyWhitelisted(key);
|
|
5938
5982
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
5939
|
-
warn
|
|
5983
|
+
warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
|
|
5940
5984
|
}
|
|
5941
5985
|
return has;
|
|
5942
5986
|
}
|
|
@@ -5986,7 +6030,7 @@ var Vue = (function () {
|
|
|
5986
6030
|
Object.keys(toRaw(setupState)).forEach(key => {
|
|
5987
6031
|
if (!setupState.__isScriptSetup) {
|
|
5988
6032
|
if (isReservedPrefix(key[0])) {
|
|
5989
|
-
warn
|
|
6033
|
+
warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
|
|
5990
6034
|
`which are reserved prefixes for Vue internals.`);
|
|
5991
6035
|
return;
|
|
5992
6036
|
}
|
|
@@ -6005,7 +6049,7 @@ var Vue = (function () {
|
|
|
6005
6049
|
const toVal = to[key];
|
|
6006
6050
|
const fromVal = from[key];
|
|
6007
6051
|
if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
|
|
6008
|
-
warnDeprecation("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
6052
|
+
warnDeprecation$1("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
6009
6053
|
deepMergeData(toVal, fromVal);
|
|
6010
6054
|
}
|
|
6011
6055
|
else {
|
|
@@ -6019,7 +6063,7 @@ var Vue = (function () {
|
|
|
6019
6063
|
const cache = Object.create(null);
|
|
6020
6064
|
return (type, key) => {
|
|
6021
6065
|
if (cache[key]) {
|
|
6022
|
-
warn
|
|
6066
|
+
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
6023
6067
|
}
|
|
6024
6068
|
else {
|
|
6025
6069
|
cache[key] = type;
|
|
@@ -6036,7 +6080,7 @@ var Vue = (function () {
|
|
|
6036
6080
|
// call beforeCreate first before accessing other options since
|
|
6037
6081
|
// the hook may mutate resolved options (#2791)
|
|
6038
6082
|
if (options.beforeCreate) {
|
|
6039
|
-
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
6083
|
+
callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
6040
6084
|
}
|
|
6041
6085
|
const {
|
|
6042
6086
|
// state
|
|
@@ -6086,24 +6130,24 @@ var Vue = (function () {
|
|
|
6086
6130
|
}
|
|
6087
6131
|
}
|
|
6088
6132
|
else {
|
|
6089
|
-
warn
|
|
6133
|
+
warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
|
|
6090
6134
|
`Did you reference the function correctly?`);
|
|
6091
6135
|
}
|
|
6092
6136
|
}
|
|
6093
6137
|
}
|
|
6094
6138
|
if (dataOptions) {
|
|
6095
6139
|
if (!isFunction(dataOptions)) {
|
|
6096
|
-
warn
|
|
6140
|
+
warn(`The data option must be a function. ` +
|
|
6097
6141
|
`Plain object usage is no longer supported.`);
|
|
6098
6142
|
}
|
|
6099
6143
|
const data = dataOptions.call(publicThis, publicThis);
|
|
6100
6144
|
if (isPromise(data)) {
|
|
6101
|
-
warn
|
|
6145
|
+
warn(`data() returned a Promise - note data() cannot be async; If you ` +
|
|
6102
6146
|
`intend to perform data fetching before component renders, use ` +
|
|
6103
6147
|
`async setup() + <Suspense>.`);
|
|
6104
6148
|
}
|
|
6105
6149
|
if (!isObject(data)) {
|
|
6106
|
-
warn
|
|
6150
|
+
warn(`data() should return an object.`);
|
|
6107
6151
|
}
|
|
6108
6152
|
else {
|
|
6109
6153
|
instance.data = reactive(data);
|
|
@@ -6134,15 +6178,15 @@ var Vue = (function () {
|
|
|
6134
6178
|
? opt.get.bind(publicThis, publicThis)
|
|
6135
6179
|
: NOOP;
|
|
6136
6180
|
if (get === NOOP) {
|
|
6137
|
-
warn
|
|
6181
|
+
warn(`Computed property "${key}" has no getter.`);
|
|
6138
6182
|
}
|
|
6139
6183
|
const set = !isFunction(opt) && isFunction(opt.set)
|
|
6140
6184
|
? opt.set.bind(publicThis)
|
|
6141
6185
|
: () => {
|
|
6142
|
-
warn
|
|
6186
|
+
warn(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6143
6187
|
}
|
|
6144
6188
|
;
|
|
6145
|
-
const c = computed
|
|
6189
|
+
const c = computed({
|
|
6146
6190
|
get,
|
|
6147
6191
|
set
|
|
6148
6192
|
});
|
|
@@ -6171,7 +6215,7 @@ var Vue = (function () {
|
|
|
6171
6215
|
});
|
|
6172
6216
|
}
|
|
6173
6217
|
if (created) {
|
|
6174
|
-
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6218
|
+
callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6175
6219
|
}
|
|
6176
6220
|
function registerLifecycleHook(register, hook) {
|
|
6177
6221
|
if (isArray(hook)) {
|
|
@@ -6231,7 +6275,7 @@ var Vue = (function () {
|
|
|
6231
6275
|
if (directives)
|
|
6232
6276
|
instance.directives = directives;
|
|
6233
6277
|
if (filters &&
|
|
6234
|
-
isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6278
|
+
isCompatEnabled$1("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6235
6279
|
instance.filters = filters;
|
|
6236
6280
|
}
|
|
6237
6281
|
}
|
|
@@ -6265,7 +6309,7 @@ var Vue = (function () {
|
|
|
6265
6309
|
}
|
|
6266
6310
|
else {
|
|
6267
6311
|
{
|
|
6268
|
-
warn
|
|
6312
|
+
warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
|
|
6269
6313
|
`and no longer needs \`.value\` in the next minor release. ` +
|
|
6270
6314
|
`To opt-in to the new behavior now, ` +
|
|
6271
6315
|
`set \`app.config.unwrapInjectedRef = true\` (this config is ` +
|
|
@@ -6282,7 +6326,7 @@ var Vue = (function () {
|
|
|
6282
6326
|
}
|
|
6283
6327
|
}
|
|
6284
6328
|
}
|
|
6285
|
-
function callHook(hook, instance, type) {
|
|
6329
|
+
function callHook$1(hook, instance, type) {
|
|
6286
6330
|
callWithAsyncErrorHandling(isArray(hook)
|
|
6287
6331
|
? hook.map(h => h.bind(instance.proxy))
|
|
6288
6332
|
: hook.bind(instance.proxy), instance, type);
|
|
@@ -6297,7 +6341,7 @@ var Vue = (function () {
|
|
|
6297
6341
|
watch(getter, handler);
|
|
6298
6342
|
}
|
|
6299
6343
|
else {
|
|
6300
|
-
warn
|
|
6344
|
+
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
6301
6345
|
}
|
|
6302
6346
|
}
|
|
6303
6347
|
else if (isFunction(raw)) {
|
|
@@ -6315,12 +6359,12 @@ var Vue = (function () {
|
|
|
6315
6359
|
watch(getter, handler, raw);
|
|
6316
6360
|
}
|
|
6317
6361
|
else {
|
|
6318
|
-
warn
|
|
6362
|
+
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
6319
6363
|
}
|
|
6320
6364
|
}
|
|
6321
6365
|
}
|
|
6322
6366
|
else {
|
|
6323
|
-
warn
|
|
6367
|
+
warn(`Invalid watch option: "${key}"`, raw);
|
|
6324
6368
|
}
|
|
6325
6369
|
}
|
|
6326
6370
|
/**
|
|
@@ -6338,7 +6382,7 @@ var Vue = (function () {
|
|
|
6338
6382
|
resolved = cached;
|
|
6339
6383
|
}
|
|
6340
6384
|
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6341
|
-
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6385
|
+
if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6342
6386
|
resolved = extend({}, base);
|
|
6343
6387
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6344
6388
|
resolved.propsData = instance.vnode.props;
|
|
@@ -6372,7 +6416,7 @@ var Vue = (function () {
|
|
|
6372
6416
|
}
|
|
6373
6417
|
for (const key in from) {
|
|
6374
6418
|
if (asMixin && key === 'expose') {
|
|
6375
|
-
warn
|
|
6419
|
+
warn(`"expose" option is ignored when declared in mixins or extends. ` +
|
|
6376
6420
|
`It should only be declared in the base component itself.`);
|
|
6377
6421
|
}
|
|
6378
6422
|
else {
|
|
@@ -6390,20 +6434,20 @@ var Vue = (function () {
|
|
|
6390
6434
|
methods: mergeObjectOptions,
|
|
6391
6435
|
computed: mergeObjectOptions,
|
|
6392
6436
|
// lifecycle
|
|
6393
|
-
beforeCreate: mergeAsArray,
|
|
6394
|
-
created: mergeAsArray,
|
|
6395
|
-
beforeMount: mergeAsArray,
|
|
6396
|
-
mounted: mergeAsArray,
|
|
6397
|
-
beforeUpdate: mergeAsArray,
|
|
6398
|
-
updated: mergeAsArray,
|
|
6399
|
-
beforeDestroy: mergeAsArray,
|
|
6400
|
-
beforeUnmount: mergeAsArray,
|
|
6401
|
-
destroyed: mergeAsArray,
|
|
6402
|
-
unmounted: mergeAsArray,
|
|
6403
|
-
activated: mergeAsArray,
|
|
6404
|
-
deactivated: mergeAsArray,
|
|
6405
|
-
errorCaptured: mergeAsArray,
|
|
6406
|
-
serverPrefetch: mergeAsArray,
|
|
6437
|
+
beforeCreate: mergeAsArray$1,
|
|
6438
|
+
created: mergeAsArray$1,
|
|
6439
|
+
beforeMount: mergeAsArray$1,
|
|
6440
|
+
mounted: mergeAsArray$1,
|
|
6441
|
+
beforeUpdate: mergeAsArray$1,
|
|
6442
|
+
updated: mergeAsArray$1,
|
|
6443
|
+
beforeDestroy: mergeAsArray$1,
|
|
6444
|
+
beforeUnmount: mergeAsArray$1,
|
|
6445
|
+
destroyed: mergeAsArray$1,
|
|
6446
|
+
unmounted: mergeAsArray$1,
|
|
6447
|
+
activated: mergeAsArray$1,
|
|
6448
|
+
deactivated: mergeAsArray$1,
|
|
6449
|
+
errorCaptured: mergeAsArray$1,
|
|
6450
|
+
serverPrefetch: mergeAsArray$1,
|
|
6407
6451
|
// assets
|
|
6408
6452
|
components: mergeObjectOptions,
|
|
6409
6453
|
directives: mergeObjectOptions,
|
|
@@ -6424,7 +6468,7 @@ var Vue = (function () {
|
|
|
6424
6468
|
return from;
|
|
6425
6469
|
}
|
|
6426
6470
|
return function mergedDataFn() {
|
|
6427
|
-
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6471
|
+
return (isCompatEnabled$1("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6428
6472
|
? deepMergeData
|
|
6429
6473
|
: extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
|
|
6430
6474
|
};
|
|
@@ -6442,7 +6486,7 @@ var Vue = (function () {
|
|
|
6442
6486
|
}
|
|
6443
6487
|
return raw;
|
|
6444
6488
|
}
|
|
6445
|
-
function mergeAsArray(to, from) {
|
|
6489
|
+
function mergeAsArray$1(to, from) {
|
|
6446
6490
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
6447
6491
|
}
|
|
6448
6492
|
function mergeObjectOptions(to, from) {
|
|
@@ -6455,7 +6499,7 @@ var Vue = (function () {
|
|
|
6455
6499
|
return to;
|
|
6456
6500
|
const merged = extend(Object.create(null), to);
|
|
6457
6501
|
for (const key in from) {
|
|
6458
|
-
merged[key] = mergeAsArray(to[key], from[key]);
|
|
6502
|
+
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
6459
6503
|
}
|
|
6460
6504
|
return merged;
|
|
6461
6505
|
}
|
|
@@ -6463,7 +6507,7 @@ var Vue = (function () {
|
|
|
6463
6507
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
6464
6508
|
return new Proxy({}, {
|
|
6465
6509
|
get(_, key) {
|
|
6466
|
-
warnDeprecation("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6510
|
+
warnDeprecation$1("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6467
6511
|
// $options
|
|
6468
6512
|
if (key === '$options') {
|
|
6469
6513
|
return resolveMergedOptions(instance);
|
|
@@ -6493,11 +6537,11 @@ var Vue = (function () {
|
|
|
6493
6537
|
return true;
|
|
6494
6538
|
}
|
|
6495
6539
|
if ((key === 'class' || key === 'style') &&
|
|
6496
|
-
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6540
|
+
isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6497
6541
|
return true;
|
|
6498
6542
|
}
|
|
6499
6543
|
if (isOn(key) &&
|
|
6500
|
-
isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6544
|
+
isCompatEnabled$1("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6501
6545
|
return true;
|
|
6502
6546
|
}
|
|
6503
6547
|
// vue-router
|
|
@@ -6725,7 +6769,7 @@ var Vue = (function () {
|
|
|
6725
6769
|
}
|
|
6726
6770
|
else {
|
|
6727
6771
|
setCurrentInstance(instance);
|
|
6728
|
-
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6772
|
+
value = propsDefaults[key] = defaultValue.call(isCompatEnabled$1("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6729
6773
|
? createPropsDefaultThis(instance, props, key)
|
|
6730
6774
|
: null, props);
|
|
6731
6775
|
unsetCurrentInstance();
|
|
@@ -6789,7 +6833,7 @@ var Vue = (function () {
|
|
|
6789
6833
|
if (isArray(raw)) {
|
|
6790
6834
|
for (let i = 0; i < raw.length; i++) {
|
|
6791
6835
|
if (!isString(raw[i])) {
|
|
6792
|
-
warn
|
|
6836
|
+
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
6793
6837
|
}
|
|
6794
6838
|
const normalizedKey = camelize(raw[i]);
|
|
6795
6839
|
if (validatePropName(normalizedKey)) {
|
|
@@ -6799,7 +6843,7 @@ var Vue = (function () {
|
|
|
6799
6843
|
}
|
|
6800
6844
|
else if (raw) {
|
|
6801
6845
|
if (!isObject(raw)) {
|
|
6802
|
-
warn
|
|
6846
|
+
warn(`invalid props options`, raw);
|
|
6803
6847
|
}
|
|
6804
6848
|
for (const key in raw) {
|
|
6805
6849
|
const normalizedKey = camelize(key);
|
|
@@ -6832,15 +6876,15 @@ var Vue = (function () {
|
|
|
6832
6876
|
return true;
|
|
6833
6877
|
}
|
|
6834
6878
|
else {
|
|
6835
|
-
warn
|
|
6879
|
+
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
6836
6880
|
}
|
|
6837
6881
|
return false;
|
|
6838
6882
|
}
|
|
6839
6883
|
// use function string name to check type constructors
|
|
6840
6884
|
// so that it works across vms / iframes.
|
|
6841
6885
|
function getType(ctor) {
|
|
6842
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
6843
|
-
return match ? match[
|
|
6886
|
+
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
6887
|
+
return match ? match[2] : ctor === null ? 'null' : '';
|
|
6844
6888
|
}
|
|
6845
6889
|
function isSameType(a, b) {
|
|
6846
6890
|
return getType(a) === getType(b);
|
|
@@ -6874,7 +6918,7 @@ var Vue = (function () {
|
|
|
6874
6918
|
const { type, required, validator } = prop;
|
|
6875
6919
|
// required!
|
|
6876
6920
|
if (required && isAbsent) {
|
|
6877
|
-
warn
|
|
6921
|
+
warn('Missing required prop: "' + name + '"');
|
|
6878
6922
|
return;
|
|
6879
6923
|
}
|
|
6880
6924
|
// missing but optional
|
|
@@ -6893,13 +6937,13 @@ var Vue = (function () {
|
|
|
6893
6937
|
isValid = valid;
|
|
6894
6938
|
}
|
|
6895
6939
|
if (!isValid) {
|
|
6896
|
-
warn
|
|
6940
|
+
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
6897
6941
|
return;
|
|
6898
6942
|
}
|
|
6899
6943
|
}
|
|
6900
6944
|
// custom validator
|
|
6901
6945
|
if (validator && !validator(value)) {
|
|
6902
|
-
warn
|
|
6946
|
+
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
6903
6947
|
}
|
|
6904
6948
|
}
|
|
6905
6949
|
const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
|
|
@@ -6996,7 +7040,7 @@ var Vue = (function () {
|
|
|
6996
7040
|
}
|
|
6997
7041
|
const normalized = withCtx((...args) => {
|
|
6998
7042
|
if (true && currentInstance) {
|
|
6999
|
-
warn
|
|
7043
|
+
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
7000
7044
|
`this will not track dependencies used in the slot. ` +
|
|
7001
7045
|
`Invoke the slot function inside the render function instead.`);
|
|
7002
7046
|
}
|
|
@@ -7015,8 +7059,8 @@ var Vue = (function () {
|
|
|
7015
7059
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
7016
7060
|
}
|
|
7017
7061
|
else if (value != null) {
|
|
7018
|
-
if (!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7019
|
-
warn
|
|
7062
|
+
if (!(isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7063
|
+
warn(`Non-function value encountered for slot "${key}". ` +
|
|
7020
7064
|
`Prefer function slots for better performance.`);
|
|
7021
7065
|
}
|
|
7022
7066
|
const normalized = normalizeSlotValue(value);
|
|
@@ -7026,8 +7070,8 @@ var Vue = (function () {
|
|
|
7026
7070
|
};
|
|
7027
7071
|
const normalizeVNodeSlots = (instance, children) => {
|
|
7028
7072
|
if (!isKeepAlive(instance.vnode) &&
|
|
7029
|
-
!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7030
|
-
warn
|
|
7073
|
+
!(isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7074
|
+
warn(`Non-function value encountered for default slot. ` +
|
|
7031
7075
|
`Prefer function slots for better performance.`);
|
|
7032
7076
|
}
|
|
7033
7077
|
const normalized = normalizeSlotValue(children);
|
|
@@ -7125,7 +7169,7 @@ var Vue = (function () {
|
|
|
7125
7169
|
},
|
|
7126
7170
|
set(newVal) {
|
|
7127
7171
|
if (!isCopyingConfig) {
|
|
7128
|
-
warnDeprecation(legacyConfigOptions[key], null);
|
|
7172
|
+
warnDeprecation$1(legacyConfigOptions[key], null);
|
|
7129
7173
|
}
|
|
7130
7174
|
val = newVal;
|
|
7131
7175
|
}
|
|
@@ -7151,7 +7195,7 @@ var Vue = (function () {
|
|
|
7151
7195
|
let singletonApp;
|
|
7152
7196
|
let singletonCtor;
|
|
7153
7197
|
// Legacy global Vue constructor
|
|
7154
|
-
function createCompatVue(createApp, createSingletonApp) {
|
|
7198
|
+
function createCompatVue$1(createApp, createSingletonApp) {
|
|
7155
7199
|
singletonApp = createSingletonApp({});
|
|
7156
7200
|
const Vue = (singletonCtor = function Vue(options = {}) {
|
|
7157
7201
|
return createCompatApp(options, Vue);
|
|
@@ -7176,7 +7220,7 @@ var Vue = (function () {
|
|
|
7176
7220
|
return vm;
|
|
7177
7221
|
}
|
|
7178
7222
|
}
|
|
7179
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7223
|
+
Vue.version = `2.6.14-compat:${"3.2.46"}`;
|
|
7180
7224
|
Vue.config = singletonApp.config;
|
|
7181
7225
|
Vue.use = (p, ...options) => {
|
|
7182
7226
|
if (p && isFunction(p.install)) {
|
|
@@ -7278,7 +7322,7 @@ var Vue = (function () {
|
|
|
7278
7322
|
});
|
|
7279
7323
|
// internal utils - these are technically internal but some plugins use it.
|
|
7280
7324
|
const util = {
|
|
7281
|
-
warn: warn
|
|
7325
|
+
warn: warn ,
|
|
7282
7326
|
extend,
|
|
7283
7327
|
mergeOptions: (parent, child, vm) => mergeOptions(parent, child, vm ? undefined : internalOptionMergeStrats),
|
|
7284
7328
|
defineReactive
|
|
@@ -7313,7 +7357,7 @@ var Vue = (function () {
|
|
|
7313
7357
|
return context.filters[name];
|
|
7314
7358
|
}
|
|
7315
7359
|
if (context.filters[name]) {
|
|
7316
|
-
warn
|
|
7360
|
+
warn(`Filter "${name}" has already been registered.`);
|
|
7317
7361
|
}
|
|
7318
7362
|
context.filters[name] = filter;
|
|
7319
7363
|
return app;
|
|
@@ -7325,7 +7369,7 @@ var Vue = (function () {
|
|
|
7325
7369
|
// so that app.use() can work with legacy plugins that extend prototypes
|
|
7326
7370
|
prototype: {
|
|
7327
7371
|
get() {
|
|
7328
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7372
|
+
warnDeprecation$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7329
7373
|
return app.config.globalProperties;
|
|
7330
7374
|
}
|
|
7331
7375
|
},
|
|
@@ -7362,7 +7406,7 @@ var Vue = (function () {
|
|
|
7362
7406
|
app.config[key] = isObject(val) ? Object.create(val) : val;
|
|
7363
7407
|
// compat for runtime ignoredElements -> isCustomElement
|
|
7364
7408
|
if (key === 'ignoredElements' &&
|
|
7365
|
-
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7409
|
+
isCompatEnabled$1("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7366
7410
|
!isRuntimeOnly() &&
|
|
7367
7411
|
isArray(val)) {
|
|
7368
7412
|
app.config.compilerOptions.isCustomElement = tag => {
|
|
@@ -7375,7 +7419,7 @@ var Vue = (function () {
|
|
|
7375
7419
|
}
|
|
7376
7420
|
function applySingletonPrototype(app, Ctor) {
|
|
7377
7421
|
// copy prototype augmentations as config.globalProperties
|
|
7378
|
-
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7422
|
+
const enabled = isCompatEnabled$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7379
7423
|
if (enabled) {
|
|
7380
7424
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
7381
7425
|
}
|
|
@@ -7390,7 +7434,7 @@ var Vue = (function () {
|
|
|
7390
7434
|
}
|
|
7391
7435
|
}
|
|
7392
7436
|
if (hasPrototypeAugmentations) {
|
|
7393
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7437
|
+
warnDeprecation$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7394
7438
|
}
|
|
7395
7439
|
}
|
|
7396
7440
|
function installCompatMount(app, context, render) {
|
|
@@ -7424,7 +7468,7 @@ var Vue = (function () {
|
|
|
7424
7468
|
// both runtime-core AND runtime-dom.
|
|
7425
7469
|
instance.ctx._compat_mount = (selectorOrEl) => {
|
|
7426
7470
|
if (isMounted) {
|
|
7427
|
-
warn
|
|
7471
|
+
warn(`Root instance is already mounted.`);
|
|
7428
7472
|
return;
|
|
7429
7473
|
}
|
|
7430
7474
|
let container;
|
|
@@ -7432,7 +7476,7 @@ var Vue = (function () {
|
|
|
7432
7476
|
// eslint-disable-next-line
|
|
7433
7477
|
const result = document.querySelector(selectorOrEl);
|
|
7434
7478
|
if (!result) {
|
|
7435
|
-
warn
|
|
7479
|
+
warn(`Failed to mount root instance: selector "${selectorOrEl}" returned null.`);
|
|
7436
7480
|
return;
|
|
7437
7481
|
}
|
|
7438
7482
|
container = result;
|
|
@@ -7460,7 +7504,7 @@ var Vue = (function () {
|
|
|
7460
7504
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7461
7505
|
const attr = container.attributes[i];
|
|
7462
7506
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
7463
|
-
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7507
|
+
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7464
7508
|
break;
|
|
7465
7509
|
}
|
|
7466
7510
|
}
|
|
@@ -7499,7 +7543,7 @@ var Vue = (function () {
|
|
|
7499
7543
|
if (bum) {
|
|
7500
7544
|
invokeArrayFns(bum);
|
|
7501
7545
|
}
|
|
7502
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7546
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7503
7547
|
instance.emit('hook:beforeDestroy');
|
|
7504
7548
|
}
|
|
7505
7549
|
// stop effects
|
|
@@ -7510,7 +7554,7 @@ var Vue = (function () {
|
|
|
7510
7554
|
if (um) {
|
|
7511
7555
|
invokeArrayFns(um);
|
|
7512
7556
|
}
|
|
7513
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7557
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7514
7558
|
instance.emit('hook:destroyed');
|
|
7515
7559
|
}
|
|
7516
7560
|
}
|
|
@@ -7602,21 +7646,21 @@ var Vue = (function () {
|
|
|
7602
7646
|
emitsCache: new WeakMap()
|
|
7603
7647
|
};
|
|
7604
7648
|
}
|
|
7605
|
-
let uid = 0;
|
|
7649
|
+
let uid$1 = 0;
|
|
7606
7650
|
function createAppAPI(render, hydrate) {
|
|
7607
7651
|
return function createApp(rootComponent, rootProps = null) {
|
|
7608
7652
|
if (!isFunction(rootComponent)) {
|
|
7609
7653
|
rootComponent = Object.assign({}, rootComponent);
|
|
7610
7654
|
}
|
|
7611
7655
|
if (rootProps != null && !isObject(rootProps)) {
|
|
7612
|
-
warn
|
|
7656
|
+
warn(`root props passed to app.mount() must be an object.`);
|
|
7613
7657
|
rootProps = null;
|
|
7614
7658
|
}
|
|
7615
7659
|
const context = createAppContext();
|
|
7616
7660
|
const installedPlugins = new Set();
|
|
7617
7661
|
let isMounted = false;
|
|
7618
7662
|
const app = (context.app = {
|
|
7619
|
-
_uid: uid++,
|
|
7663
|
+
_uid: uid$1++,
|
|
7620
7664
|
_component: rootComponent,
|
|
7621
7665
|
_props: rootProps,
|
|
7622
7666
|
_container: null,
|
|
@@ -7628,12 +7672,12 @@ var Vue = (function () {
|
|
|
7628
7672
|
},
|
|
7629
7673
|
set config(v) {
|
|
7630
7674
|
{
|
|
7631
|
-
warn
|
|
7675
|
+
warn(`app.config cannot be replaced. Modify individual options instead.`);
|
|
7632
7676
|
}
|
|
7633
7677
|
},
|
|
7634
7678
|
use(plugin, ...options) {
|
|
7635
7679
|
if (installedPlugins.has(plugin)) {
|
|
7636
|
-
warn
|
|
7680
|
+
warn(`Plugin has already been applied to target app.`);
|
|
7637
7681
|
}
|
|
7638
7682
|
else if (plugin && isFunction(plugin.install)) {
|
|
7639
7683
|
installedPlugins.add(plugin);
|
|
@@ -7644,7 +7688,7 @@ var Vue = (function () {
|
|
|
7644
7688
|
plugin(app, ...options);
|
|
7645
7689
|
}
|
|
7646
7690
|
else {
|
|
7647
|
-
warn
|
|
7691
|
+
warn(`A plugin must either be a function or an object with an "install" ` +
|
|
7648
7692
|
`function.`);
|
|
7649
7693
|
}
|
|
7650
7694
|
return app;
|
|
@@ -7655,7 +7699,7 @@ var Vue = (function () {
|
|
|
7655
7699
|
context.mixins.push(mixin);
|
|
7656
7700
|
}
|
|
7657
7701
|
else {
|
|
7658
|
-
warn
|
|
7702
|
+
warn('Mixin has already been applied to target app' +
|
|
7659
7703
|
(mixin.name ? `: ${mixin.name}` : ''));
|
|
7660
7704
|
}
|
|
7661
7705
|
}
|
|
@@ -7669,7 +7713,7 @@ var Vue = (function () {
|
|
|
7669
7713
|
return context.components[name];
|
|
7670
7714
|
}
|
|
7671
7715
|
if (context.components[name]) {
|
|
7672
|
-
warn
|
|
7716
|
+
warn(`Component "${name}" has already been registered in target app.`);
|
|
7673
7717
|
}
|
|
7674
7718
|
context.components[name] = component;
|
|
7675
7719
|
return app;
|
|
@@ -7682,7 +7726,7 @@ var Vue = (function () {
|
|
|
7682
7726
|
return context.directives[name];
|
|
7683
7727
|
}
|
|
7684
7728
|
if (context.directives[name]) {
|
|
7685
|
-
warn
|
|
7729
|
+
warn(`Directive "${name}" has already been registered in target app.`);
|
|
7686
7730
|
}
|
|
7687
7731
|
context.directives[name] = directive;
|
|
7688
7732
|
return app;
|
|
@@ -7691,7 +7735,7 @@ var Vue = (function () {
|
|
|
7691
7735
|
if (!isMounted) {
|
|
7692
7736
|
// #5571
|
|
7693
7737
|
if (rootContainer.__vue_app__) {
|
|
7694
|
-
warn
|
|
7738
|
+
warn(`There is already an app instance mounted on the host container.\n` +
|
|
7695
7739
|
` If you want to mount another app on the same host container,` +
|
|
7696
7740
|
` you need to unmount the previous app by calling \`app.unmount()\` first.`);
|
|
7697
7741
|
}
|
|
@@ -7721,7 +7765,7 @@ var Vue = (function () {
|
|
|
7721
7765
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
7722
7766
|
}
|
|
7723
7767
|
else {
|
|
7724
|
-
warn
|
|
7768
|
+
warn(`App has already been mounted.\n` +
|
|
7725
7769
|
`If you want to remount the same app, move your app creation logic ` +
|
|
7726
7770
|
`into a factory function and create fresh app instances for each ` +
|
|
7727
7771
|
`mount - e.g. \`const createMyApp = () => createApp(App)\``);
|
|
@@ -7737,12 +7781,12 @@ var Vue = (function () {
|
|
|
7737
7781
|
delete app._container.__vue_app__;
|
|
7738
7782
|
}
|
|
7739
7783
|
else {
|
|
7740
|
-
warn
|
|
7784
|
+
warn(`Cannot unmount an app that is not mounted.`);
|
|
7741
7785
|
}
|
|
7742
7786
|
},
|
|
7743
7787
|
provide(key, value) {
|
|
7744
7788
|
if (key in context.provides) {
|
|
7745
|
-
warn
|
|
7789
|
+
warn(`App already provides property with key "${String(key)}". ` +
|
|
7746
7790
|
`It will be overwritten with the new value.`);
|
|
7747
7791
|
}
|
|
7748
7792
|
context.provides[key] = value;
|
|
@@ -7775,7 +7819,7 @@ var Vue = (function () {
|
|
|
7775
7819
|
const value = isUnmount ? null : refValue;
|
|
7776
7820
|
const { i: owner, r: ref } = rawRef;
|
|
7777
7821
|
if (!owner) {
|
|
7778
|
-
warn
|
|
7822
|
+
warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
7779
7823
|
`A vnode with ref must be created inside the render function.`);
|
|
7780
7824
|
return;
|
|
7781
7825
|
}
|
|
@@ -7842,7 +7886,7 @@ var Vue = (function () {
|
|
|
7842
7886
|
refs[rawRef.k] = value;
|
|
7843
7887
|
}
|
|
7844
7888
|
else {
|
|
7845
|
-
warn
|
|
7889
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
7846
7890
|
}
|
|
7847
7891
|
};
|
|
7848
7892
|
if (value) {
|
|
@@ -7854,7 +7898,7 @@ var Vue = (function () {
|
|
|
7854
7898
|
}
|
|
7855
7899
|
}
|
|
7856
7900
|
else {
|
|
7857
|
-
warn
|
|
7901
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
7858
7902
|
}
|
|
7859
7903
|
}
|
|
7860
7904
|
}
|
|
@@ -7871,7 +7915,7 @@ var Vue = (function () {
|
|
|
7871
7915
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
7872
7916
|
const hydrate = (vnode, container) => {
|
|
7873
7917
|
if (!container.hasChildNodes()) {
|
|
7874
|
-
warn
|
|
7918
|
+
warn(`Attempting to hydrate existing markup but container is empty. ` +
|
|
7875
7919
|
`Performing full mount instead.`);
|
|
7876
7920
|
patch(null, vnode, container);
|
|
7877
7921
|
flushPostFlushCbs();
|
|
@@ -7914,7 +7958,7 @@ var Vue = (function () {
|
|
|
7914
7958
|
else {
|
|
7915
7959
|
if (node.data !== vnode.children) {
|
|
7916
7960
|
hasMismatch = true;
|
|
7917
|
-
warn
|
|
7961
|
+
warn(`Hydration text mismatch:` +
|
|
7918
7962
|
`\n- Client: ${JSON.stringify(node.data)}` +
|
|
7919
7963
|
`\n- Server: ${JSON.stringify(vnode.children)}`);
|
|
7920
7964
|
node.data = vnode.children;
|
|
@@ -8029,7 +8073,7 @@ var Vue = (function () {
|
|
|
8029
8073
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
8030
8074
|
}
|
|
8031
8075
|
else {
|
|
8032
|
-
warn
|
|
8076
|
+
warn('Invalid HostVNode type:', type, `(${typeof type})`);
|
|
8033
8077
|
}
|
|
8034
8078
|
}
|
|
8035
8079
|
if (ref != null) {
|
|
@@ -8090,7 +8134,7 @@ var Vue = (function () {
|
|
|
8090
8134
|
while (next) {
|
|
8091
8135
|
hasMismatch = true;
|
|
8092
8136
|
if (!hasWarned) {
|
|
8093
|
-
warn
|
|
8137
|
+
warn(`Hydration children mismatch in <${vnode.type}>: ` +
|
|
8094
8138
|
`server rendered element contains more child nodes than client vdom.`);
|
|
8095
8139
|
hasWarned = true;
|
|
8096
8140
|
}
|
|
@@ -8103,7 +8147,7 @@ var Vue = (function () {
|
|
|
8103
8147
|
else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
8104
8148
|
if (el.textContent !== vnode.children) {
|
|
8105
8149
|
hasMismatch = true;
|
|
8106
|
-
warn
|
|
8150
|
+
warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
8107
8151
|
`- Client: ${el.textContent}\n` +
|
|
8108
8152
|
`- Server: ${vnode.children}`);
|
|
8109
8153
|
el.textContent = vnode.children;
|
|
@@ -8130,7 +8174,7 @@ var Vue = (function () {
|
|
|
8130
8174
|
else {
|
|
8131
8175
|
hasMismatch = true;
|
|
8132
8176
|
if (!hasWarned) {
|
|
8133
|
-
warn
|
|
8177
|
+
warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
|
|
8134
8178
|
`server rendered element contains fewer child nodes than client vdom.`);
|
|
8135
8179
|
hasWarned = true;
|
|
8136
8180
|
}
|
|
@@ -8163,7 +8207,7 @@ var Vue = (function () {
|
|
|
8163
8207
|
};
|
|
8164
8208
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
8165
8209
|
hasMismatch = true;
|
|
8166
|
-
warn
|
|
8210
|
+
warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
8167
8211
|
? `(text)`
|
|
8168
8212
|
: isComment(node) && node.data === '['
|
|
8169
8213
|
? `(start of fragment)`
|
|
@@ -8331,7 +8375,7 @@ var Vue = (function () {
|
|
|
8331
8375
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8332
8376
|
}
|
|
8333
8377
|
else {
|
|
8334
|
-
warn
|
|
8378
|
+
warn('Invalid VNode type:', type, `(${typeof type})`);
|
|
8335
8379
|
}
|
|
8336
8380
|
}
|
|
8337
8381
|
// set ref
|
|
@@ -8421,6 +8465,8 @@ var Vue = (function () {
|
|
|
8421
8465
|
if (dirs) {
|
|
8422
8466
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
8423
8467
|
}
|
|
8468
|
+
// scopeId
|
|
8469
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
8424
8470
|
// props
|
|
8425
8471
|
if (props) {
|
|
8426
8472
|
for (const key in props) {
|
|
@@ -8444,8 +8490,6 @@ var Vue = (function () {
|
|
|
8444
8490
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8445
8491
|
}
|
|
8446
8492
|
}
|
|
8447
|
-
// scopeId
|
|
8448
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
8449
8493
|
{
|
|
8450
8494
|
Object.defineProperty(el, '__vnode', {
|
|
8451
8495
|
value: vnode,
|
|
@@ -8819,7 +8863,7 @@ var Vue = (function () {
|
|
|
8819
8863
|
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
8820
8864
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
8821
8865
|
}
|
|
8822
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8866
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8823
8867
|
instance.emit('hook:beforeMount');
|
|
8824
8868
|
}
|
|
8825
8869
|
toggleRecurse(instance, true);
|
|
@@ -8880,7 +8924,7 @@ var Vue = (function () {
|
|
|
8880
8924
|
const scopedInitialVNode = initialVNode;
|
|
8881
8925
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
8882
8926
|
}
|
|
8883
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8927
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8884
8928
|
queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
|
|
8885
8929
|
}
|
|
8886
8930
|
// activated hook for keep-alive roots.
|
|
@@ -8891,7 +8935,7 @@ var Vue = (function () {
|
|
|
8891
8935
|
isAsyncWrapper(parent.vnode) &&
|
|
8892
8936
|
parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
8893
8937
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
8894
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8938
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8895
8939
|
queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
|
|
8896
8940
|
}
|
|
8897
8941
|
}
|
|
@@ -8929,7 +8973,7 @@ var Vue = (function () {
|
|
|
8929
8973
|
if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
|
|
8930
8974
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8931
8975
|
}
|
|
8932
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8976
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8933
8977
|
instance.emit('hook:beforeUpdate');
|
|
8934
8978
|
}
|
|
8935
8979
|
toggleRecurse(instance, true);
|
|
@@ -8969,7 +9013,7 @@ var Vue = (function () {
|
|
|
8969
9013
|
if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
|
|
8970
9014
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
8971
9015
|
}
|
|
8972
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9016
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8973
9017
|
queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
|
|
8974
9018
|
}
|
|
8975
9019
|
{
|
|
@@ -9174,7 +9218,7 @@ var Vue = (function () {
|
|
|
9174
9218
|
: normalizeVNode(c2[i]));
|
|
9175
9219
|
if (nextChild.key != null) {
|
|
9176
9220
|
if (keyToNewIndexMap.has(nextChild.key)) {
|
|
9177
|
-
warn
|
|
9221
|
+
warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
|
|
9178
9222
|
}
|
|
9179
9223
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
9180
9224
|
}
|
|
@@ -9442,7 +9486,7 @@ var Vue = (function () {
|
|
|
9442
9486
|
if (bum) {
|
|
9443
9487
|
invokeArrayFns(bum);
|
|
9444
9488
|
}
|
|
9445
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9489
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9446
9490
|
instance.emit('hook:beforeDestroy');
|
|
9447
9491
|
}
|
|
9448
9492
|
// stop effects in component scope
|
|
@@ -9458,7 +9502,7 @@ var Vue = (function () {
|
|
|
9458
9502
|
if (um) {
|
|
9459
9503
|
queuePostRenderEffect(um, parentSuspense);
|
|
9460
9504
|
}
|
|
9461
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9505
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9462
9506
|
queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
|
|
9463
9507
|
}
|
|
9464
9508
|
queuePostRenderEffect(() => {
|
|
@@ -9563,6 +9607,10 @@ var Vue = (function () {
|
|
|
9563
9607
|
if (!shallow)
|
|
9564
9608
|
traverseStaticChildren(c1, c2);
|
|
9565
9609
|
}
|
|
9610
|
+
// #6852 also inherit for text nodes
|
|
9611
|
+
if (c2.type === Text) {
|
|
9612
|
+
c2.el = c1.el;
|
|
9613
|
+
}
|
|
9566
9614
|
// also inherit for comment nodes, but not placeholders (e.g. v-if which
|
|
9567
9615
|
// would have received .el during block patch)
|
|
9568
9616
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -9621,14 +9669,14 @@ var Vue = (function () {
|
|
|
9621
9669
|
const targetSelector = props && props.to;
|
|
9622
9670
|
if (isString(targetSelector)) {
|
|
9623
9671
|
if (!select) {
|
|
9624
|
-
warn
|
|
9672
|
+
warn(`Current renderer does not support string target for Teleports. ` +
|
|
9625
9673
|
`(missing querySelector renderer option)`);
|
|
9626
9674
|
return null;
|
|
9627
9675
|
}
|
|
9628
9676
|
else {
|
|
9629
9677
|
const target = select(targetSelector);
|
|
9630
9678
|
if (!target) {
|
|
9631
|
-
warn
|
|
9679
|
+
warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
|
|
9632
9680
|
`Note the target element must exist before the component is mounted - ` +
|
|
9633
9681
|
`i.e. the target cannot be rendered by the component itself, and ` +
|
|
9634
9682
|
`ideally should be outside of the entire Vue component tree.`);
|
|
@@ -9638,7 +9686,7 @@ var Vue = (function () {
|
|
|
9638
9686
|
}
|
|
9639
9687
|
else {
|
|
9640
9688
|
if (!targetSelector && !isTeleportDisabled(props)) {
|
|
9641
|
-
warn
|
|
9689
|
+
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
9642
9690
|
}
|
|
9643
9691
|
return targetSelector;
|
|
9644
9692
|
}
|
|
@@ -9671,7 +9719,7 @@ var Vue = (function () {
|
|
|
9671
9719
|
isSVG = isSVG || isTargetSVG(target);
|
|
9672
9720
|
}
|
|
9673
9721
|
else if (!disabled) {
|
|
9674
|
-
warn
|
|
9722
|
+
warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
|
|
9675
9723
|
}
|
|
9676
9724
|
const mount = (container, anchor) => {
|
|
9677
9725
|
// Teleport *always* has Array children. This is enforced in both the
|
|
@@ -9723,7 +9771,7 @@ var Vue = (function () {
|
|
|
9723
9771
|
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
9724
9772
|
}
|
|
9725
9773
|
else {
|
|
9726
|
-
warn
|
|
9774
|
+
warn('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
9727
9775
|
}
|
|
9728
9776
|
}
|
|
9729
9777
|
else if (wasDisabled) {
|
|
@@ -9733,6 +9781,7 @@ var Vue = (function () {
|
|
|
9733
9781
|
}
|
|
9734
9782
|
}
|
|
9735
9783
|
}
|
|
9784
|
+
updateCssVars(n2);
|
|
9736
9785
|
},
|
|
9737
9786
|
remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
9738
9787
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
@@ -9811,11 +9860,26 @@ var Vue = (function () {
|
|
|
9811
9860
|
hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
9812
9861
|
}
|
|
9813
9862
|
}
|
|
9863
|
+
updateCssVars(vnode);
|
|
9814
9864
|
}
|
|
9815
9865
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
9816
9866
|
}
|
|
9817
9867
|
// Force-casted public typing for h and TSX props inference
|
|
9818
9868
|
const Teleport = TeleportImpl;
|
|
9869
|
+
function updateCssVars(vnode) {
|
|
9870
|
+
// presence of .ut method indicates owner component uses css vars.
|
|
9871
|
+
// code path here can assume browser environment.
|
|
9872
|
+
const ctx = vnode.ctx;
|
|
9873
|
+
if (ctx && ctx.ut) {
|
|
9874
|
+
let node = vnode.children[0].el;
|
|
9875
|
+
while (node !== vnode.targetAnchor) {
|
|
9876
|
+
if (node.nodeType === 1)
|
|
9877
|
+
node.setAttribute('data-v-owner', ctx.uid);
|
|
9878
|
+
node = node.nextSibling;
|
|
9879
|
+
}
|
|
9880
|
+
ctx.ut();
|
|
9881
|
+
}
|
|
9882
|
+
}
|
|
9819
9883
|
|
|
9820
9884
|
const normalizedAsyncComponentMap = new Map();
|
|
9821
9885
|
function convertLegacyAsyncComponent(comp) {
|
|
@@ -9863,7 +9927,7 @@ var Vue = (function () {
|
|
|
9863
9927
|
}
|
|
9864
9928
|
// 2.x async component
|
|
9865
9929
|
if (isFunction(comp) &&
|
|
9866
|
-
checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
9930
|
+
checkCompatEnabled$1("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
9867
9931
|
// since after disabling this, plain functions are still valid usage, do not
|
|
9868
9932
|
// use softAssert here.
|
|
9869
9933
|
return convertLegacyAsyncComponent(comp);
|
|
@@ -9970,6 +10034,10 @@ var Vue = (function () {
|
|
|
9970
10034
|
function isSameVNodeType(n1, n2) {
|
|
9971
10035
|
if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
|
|
9972
10036
|
hmrDirtyComponents.has(n2.type)) {
|
|
10037
|
+
// #7042, ensure the vnode being unmounted during HMR
|
|
10038
|
+
// bitwise operations to remove keep alive flags
|
|
10039
|
+
n1.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
10040
|
+
n2.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
9973
10041
|
// HMR only: if the component has been hot-updated, force a reload.
|
|
9974
10042
|
return false;
|
|
9975
10043
|
}
|
|
@@ -10025,7 +10093,8 @@ var Vue = (function () {
|
|
|
10025
10093
|
patchFlag,
|
|
10026
10094
|
dynamicProps,
|
|
10027
10095
|
dynamicChildren: null,
|
|
10028
|
-
appContext: null
|
|
10096
|
+
appContext: null,
|
|
10097
|
+
ctx: currentRenderingInstance
|
|
10029
10098
|
};
|
|
10030
10099
|
if (needFullChildrenNormalization) {
|
|
10031
10100
|
normalizeChildren(vnode, children);
|
|
@@ -10043,7 +10112,7 @@ var Vue = (function () {
|
|
|
10043
10112
|
}
|
|
10044
10113
|
// validate key
|
|
10045
10114
|
if (vnode.key !== vnode.key) {
|
|
10046
|
-
warn
|
|
10115
|
+
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
10047
10116
|
}
|
|
10048
10117
|
// track vnode for block tree
|
|
10049
10118
|
if (isBlockTreeEnabled > 0 &&
|
|
@@ -10071,7 +10140,7 @@ var Vue = (function () {
|
|
|
10071
10140
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
10072
10141
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
10073
10142
|
if (!type) {
|
|
10074
|
-
warn
|
|
10143
|
+
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
10075
10144
|
}
|
|
10076
10145
|
type = Comment;
|
|
10077
10146
|
}
|
|
@@ -10133,7 +10202,7 @@ var Vue = (function () {
|
|
|
10133
10202
|
: 0;
|
|
10134
10203
|
if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
10135
10204
|
type = toRaw(type);
|
|
10136
|
-
warn
|
|
10205
|
+
warn(`Vue received a Component which was made a reactive object. This can ` +
|
|
10137
10206
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
10138
10207
|
`marking the component with \`markRaw\` or using \`shallowRef\` ` +
|
|
10139
10208
|
`instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
|
|
@@ -10200,7 +10269,9 @@ var Vue = (function () {
|
|
|
10200
10269
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
10201
10270
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
10202
10271
|
el: vnode.el,
|
|
10203
|
-
anchor: vnode.anchor
|
|
10272
|
+
anchor: vnode.anchor,
|
|
10273
|
+
ctx: vnode.ctx,
|
|
10274
|
+
ce: vnode.ce
|
|
10204
10275
|
};
|
|
10205
10276
|
{
|
|
10206
10277
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -10370,13 +10441,13 @@ var Vue = (function () {
|
|
|
10370
10441
|
}
|
|
10371
10442
|
|
|
10372
10443
|
const emptyAppContext = createAppContext();
|
|
10373
|
-
let uid
|
|
10444
|
+
let uid = 0;
|
|
10374
10445
|
function createComponentInstance(vnode, parent, suspense) {
|
|
10375
10446
|
const type = vnode.type;
|
|
10376
10447
|
// inherit parent app context - or - if root, adopt from root vnode
|
|
10377
10448
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
10378
10449
|
const instance = {
|
|
10379
|
-
uid: uid
|
|
10450
|
+
uid: uid++,
|
|
10380
10451
|
vnode,
|
|
10381
10452
|
type,
|
|
10382
10453
|
parent,
|
|
@@ -10446,7 +10517,7 @@ var Vue = (function () {
|
|
|
10446
10517
|
instance.ctx = createDevRenderContext(instance);
|
|
10447
10518
|
}
|
|
10448
10519
|
instance.root = parent ? parent.root : instance;
|
|
10449
|
-
instance.emit = emit
|
|
10520
|
+
instance.emit = emit.bind(null, instance);
|
|
10450
10521
|
// apply custom element special handling
|
|
10451
10522
|
if (vnode.ce) {
|
|
10452
10523
|
vnode.ce(instance);
|
|
@@ -10467,7 +10538,7 @@ var Vue = (function () {
|
|
|
10467
10538
|
function validateComponentName(name, config) {
|
|
10468
10539
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
10469
10540
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
10470
|
-
warn
|
|
10541
|
+
warn('Do not use built-in or reserved HTML elements as component id: ' + name);
|
|
10471
10542
|
}
|
|
10472
10543
|
}
|
|
10473
10544
|
function isStatefulComponent(instance) {
|
|
@@ -10506,7 +10577,7 @@ var Vue = (function () {
|
|
|
10506
10577
|
}
|
|
10507
10578
|
}
|
|
10508
10579
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
10509
|
-
warn
|
|
10580
|
+
warn(`"compilerOptions" is only supported when using a build of Vue that ` +
|
|
10510
10581
|
`includes the runtime compiler. Since you are using a runtime-only ` +
|
|
10511
10582
|
`build, the options should be passed via your build tool config instead.`);
|
|
10512
10583
|
}
|
|
@@ -10547,7 +10618,7 @@ var Vue = (function () {
|
|
|
10547
10618
|
instance.asyncDep = setupResult;
|
|
10548
10619
|
if (!instance.suspense) {
|
|
10549
10620
|
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
10550
|
-
warn
|
|
10621
|
+
warn(`Component <${name}>: setup function returned a promise, but no ` +
|
|
10551
10622
|
`<Suspense> boundary was found in the parent component tree. ` +
|
|
10552
10623
|
`A component with async setup() must be nested in a <Suspense> ` +
|
|
10553
10624
|
`in order to be rendered.`);
|
|
@@ -10571,7 +10642,7 @@ var Vue = (function () {
|
|
|
10571
10642
|
}
|
|
10572
10643
|
else if (isObject(setupResult)) {
|
|
10573
10644
|
if (isVNode(setupResult)) {
|
|
10574
|
-
warn
|
|
10645
|
+
warn(`setup() should not return VNodes directly - ` +
|
|
10575
10646
|
`return a render function instead.`);
|
|
10576
10647
|
}
|
|
10577
10648
|
// setup returned bindings.
|
|
@@ -10585,18 +10656,18 @@ var Vue = (function () {
|
|
|
10585
10656
|
}
|
|
10586
10657
|
}
|
|
10587
10658
|
else if (setupResult !== undefined) {
|
|
10588
|
-
warn
|
|
10659
|
+
warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
|
|
10589
10660
|
}
|
|
10590
10661
|
finishComponentSetup(instance, isSSR);
|
|
10591
10662
|
}
|
|
10592
|
-
let compile;
|
|
10663
|
+
let compile$1;
|
|
10593
10664
|
let installWithProxy;
|
|
10594
10665
|
/**
|
|
10595
10666
|
* For runtime-dom to register the compiler.
|
|
10596
10667
|
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
10597
10668
|
*/
|
|
10598
10669
|
function registerRuntimeCompiler(_compile) {
|
|
10599
|
-
compile = _compile;
|
|
10670
|
+
compile$1 = _compile;
|
|
10600
10671
|
installWithProxy = i => {
|
|
10601
10672
|
if (i.render._rc) {
|
|
10602
10673
|
i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
|
|
@@ -10604,7 +10675,7 @@ var Vue = (function () {
|
|
|
10604
10675
|
};
|
|
10605
10676
|
}
|
|
10606
10677
|
// dev only
|
|
10607
|
-
const isRuntimeOnly = () => !compile;
|
|
10678
|
+
const isRuntimeOnly = () => !compile$1;
|
|
10608
10679
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
10609
10680
|
const Component = instance.type;
|
|
10610
10681
|
{
|
|
@@ -10618,7 +10689,7 @@ var Vue = (function () {
|
|
|
10618
10689
|
if (!instance.render) {
|
|
10619
10690
|
// only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
|
|
10620
10691
|
// is done by server-renderer
|
|
10621
|
-
if (!isSSR && compile && !Component.render) {
|
|
10692
|
+
if (!isSSR && compile$1 && !Component.render) {
|
|
10622
10693
|
const template = (instance.vnode.props &&
|
|
10623
10694
|
instance.vnode.props['inline-template']) ||
|
|
10624
10695
|
Component.template ||
|
|
@@ -10641,7 +10712,7 @@ var Vue = (function () {
|
|
|
10641
10712
|
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
10642
10713
|
}
|
|
10643
10714
|
}
|
|
10644
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
10715
|
+
Component.render = compile$1(template, finalCompilerOptions);
|
|
10645
10716
|
{
|
|
10646
10717
|
endMeasure(instance, `compile`);
|
|
10647
10718
|
}
|
|
@@ -10667,14 +10738,14 @@ var Vue = (function () {
|
|
|
10667
10738
|
// the runtime compilation of template in SSR is done by server-render
|
|
10668
10739
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
10669
10740
|
/* istanbul ignore if */
|
|
10670
|
-
if (!compile && Component.template) {
|
|
10671
|
-
warn
|
|
10741
|
+
if (!compile$1 && Component.template) {
|
|
10742
|
+
warn(`Component provided template option but ` +
|
|
10672
10743
|
`runtime compilation is not supported in this build of Vue.` +
|
|
10673
10744
|
(` Use "vue.global.js" instead.`
|
|
10674
10745
|
) /* should not happen */);
|
|
10675
10746
|
}
|
|
10676
10747
|
else {
|
|
10677
|
-
warn
|
|
10748
|
+
warn(`Component is missing template or render function.`);
|
|
10678
10749
|
}
|
|
10679
10750
|
}
|
|
10680
10751
|
}
|
|
@@ -10686,11 +10757,11 @@ var Vue = (function () {
|
|
|
10686
10757
|
return target[key];
|
|
10687
10758
|
},
|
|
10688
10759
|
set() {
|
|
10689
|
-
warn
|
|
10760
|
+
warn(`setupContext.attrs is readonly.`);
|
|
10690
10761
|
return false;
|
|
10691
10762
|
},
|
|
10692
10763
|
deleteProperty() {
|
|
10693
|
-
warn
|
|
10764
|
+
warn(`setupContext.attrs is readonly.`);
|
|
10694
10765
|
return false;
|
|
10695
10766
|
}
|
|
10696
10767
|
}
|
|
@@ -10698,8 +10769,24 @@ var Vue = (function () {
|
|
|
10698
10769
|
}
|
|
10699
10770
|
function createSetupContext(instance) {
|
|
10700
10771
|
const expose = exposed => {
|
|
10701
|
-
|
|
10702
|
-
|
|
10772
|
+
{
|
|
10773
|
+
if (instance.exposed) {
|
|
10774
|
+
warn(`expose() should be called only once per setup().`);
|
|
10775
|
+
}
|
|
10776
|
+
if (exposed != null) {
|
|
10777
|
+
let exposedType = typeof exposed;
|
|
10778
|
+
if (exposedType === 'object') {
|
|
10779
|
+
if (isArray(exposed)) {
|
|
10780
|
+
exposedType = 'array';
|
|
10781
|
+
}
|
|
10782
|
+
else if (isRef(exposed)) {
|
|
10783
|
+
exposedType = 'ref';
|
|
10784
|
+
}
|
|
10785
|
+
}
|
|
10786
|
+
if (exposedType !== 'object') {
|
|
10787
|
+
warn(`expose() should be passed a plain object, received ${exposedType}.`);
|
|
10788
|
+
}
|
|
10789
|
+
}
|
|
10703
10790
|
}
|
|
10704
10791
|
instance.exposed = exposed || {};
|
|
10705
10792
|
};
|
|
@@ -10774,13 +10861,13 @@ var Vue = (function () {
|
|
|
10774
10861
|
return isFunction(value) && '__vccOpts' in value;
|
|
10775
10862
|
}
|
|
10776
10863
|
|
|
10777
|
-
const computed
|
|
10864
|
+
const computed = ((getterOrOptions, debugOptions) => {
|
|
10778
10865
|
// @ts-ignore
|
|
10779
|
-
return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
10866
|
+
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
10780
10867
|
});
|
|
10781
10868
|
|
|
10782
10869
|
// dev only
|
|
10783
|
-
const warnRuntimeUsage = (method) => warn
|
|
10870
|
+
const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
|
|
10784
10871
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
10785
10872
|
`compiled away and passing it at runtime has no effect.`);
|
|
10786
10873
|
// implementation
|
|
@@ -10847,7 +10934,7 @@ var Vue = (function () {
|
|
|
10847
10934
|
function getContext() {
|
|
10848
10935
|
const i = getCurrentInstance();
|
|
10849
10936
|
if (!i) {
|
|
10850
|
-
warn
|
|
10937
|
+
warn(`useContext() called without active instance.`);
|
|
10851
10938
|
}
|
|
10852
10939
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
10853
10940
|
}
|
|
@@ -10874,7 +10961,7 @@ var Vue = (function () {
|
|
|
10874
10961
|
props[key] = { default: defaults[key] };
|
|
10875
10962
|
}
|
|
10876
10963
|
else {
|
|
10877
|
-
warn
|
|
10964
|
+
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
10878
10965
|
}
|
|
10879
10966
|
}
|
|
10880
10967
|
return props;
|
|
@@ -10917,7 +11004,7 @@ var Vue = (function () {
|
|
|
10917
11004
|
function withAsyncContext(getAwaitable) {
|
|
10918
11005
|
const ctx = getCurrentInstance();
|
|
10919
11006
|
if (!ctx) {
|
|
10920
|
-
warn
|
|
11007
|
+
warn(`withAsyncContext called without active current instance. ` +
|
|
10921
11008
|
`This is likely a bug.`);
|
|
10922
11009
|
}
|
|
10923
11010
|
let awaitable = getAwaitable();
|
|
@@ -10962,7 +11049,7 @@ var Vue = (function () {
|
|
|
10962
11049
|
const ssrContextKey = Symbol(`ssrContext` );
|
|
10963
11050
|
const useSSRContext = () => {
|
|
10964
11051
|
{
|
|
10965
|
-
warn
|
|
11052
|
+
warn(`useSSRContext() is not supported in the global build.`);
|
|
10966
11053
|
}
|
|
10967
11054
|
};
|
|
10968
11055
|
|
|
@@ -11183,7 +11270,7 @@ var Vue = (function () {
|
|
|
11183
11270
|
}
|
|
11184
11271
|
|
|
11185
11272
|
// Core API ------------------------------------------------------------------
|
|
11186
|
-
const version = "3.2.
|
|
11273
|
+
const version = "3.2.46";
|
|
11187
11274
|
/**
|
|
11188
11275
|
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
11189
11276
|
* @internal
|
|
@@ -11192,12 +11279,12 @@ var Vue = (function () {
|
|
|
11192
11279
|
/**
|
|
11193
11280
|
* @internal only exposed in compat builds
|
|
11194
11281
|
*/
|
|
11195
|
-
const resolveFilter
|
|
11282
|
+
const resolveFilter = resolveFilter$1 ;
|
|
11196
11283
|
const _compatUtils = {
|
|
11197
|
-
warnDeprecation,
|
|
11198
|
-
createCompatVue,
|
|
11199
|
-
isCompatEnabled,
|
|
11200
|
-
checkCompatEnabled,
|
|
11284
|
+
warnDeprecation: warnDeprecation$1,
|
|
11285
|
+
createCompatVue: createCompatVue$1,
|
|
11286
|
+
isCompatEnabled: isCompatEnabled$1,
|
|
11287
|
+
checkCompatEnabled: checkCompatEnabled$1,
|
|
11201
11288
|
softAssertCompatEnabled
|
|
11202
11289
|
};
|
|
11203
11290
|
/**
|
|
@@ -11307,9 +11394,6 @@ var Vue = (function () {
|
|
|
11307
11394
|
const style = el.style;
|
|
11308
11395
|
const isCssString = isString(next);
|
|
11309
11396
|
if (next && !isCssString) {
|
|
11310
|
-
for (const key in next) {
|
|
11311
|
-
setStyle(style, key, next[key]);
|
|
11312
|
-
}
|
|
11313
11397
|
if (prev && !isString(prev)) {
|
|
11314
11398
|
for (const key in prev) {
|
|
11315
11399
|
if (next[key] == null) {
|
|
@@ -11317,6 +11401,9 @@ var Vue = (function () {
|
|
|
11317
11401
|
}
|
|
11318
11402
|
}
|
|
11319
11403
|
}
|
|
11404
|
+
for (const key in next) {
|
|
11405
|
+
setStyle(style, key, next[key]);
|
|
11406
|
+
}
|
|
11320
11407
|
}
|
|
11321
11408
|
else {
|
|
11322
11409
|
const currentDisplay = style.display;
|
|
@@ -11347,7 +11434,7 @@ var Vue = (function () {
|
|
|
11347
11434
|
val = '';
|
|
11348
11435
|
{
|
|
11349
11436
|
if (semicolonRE.test(val)) {
|
|
11350
|
-
warn
|
|
11437
|
+
warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
11351
11438
|
}
|
|
11352
11439
|
}
|
|
11353
11440
|
if (name.startsWith('--')) {
|
|
@@ -11509,7 +11596,7 @@ var Vue = (function () {
|
|
|
11509
11596
|
catch (e) {
|
|
11510
11597
|
// do not warn if value is auto-coerced from nullish values
|
|
11511
11598
|
if (!needRemove) {
|
|
11512
|
-
warn
|
|
11599
|
+
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
|
11513
11600
|
`value ${value} is invalid.`, e);
|
|
11514
11601
|
}
|
|
11515
11602
|
}
|
|
@@ -11713,16 +11800,25 @@ var Vue = (function () {
|
|
|
11713
11800
|
}
|
|
11714
11801
|
else {
|
|
11715
11802
|
if (this.shadowRoot) {
|
|
11716
|
-
warn
|
|
11803
|
+
warn(`Custom element has pre-rendered declarative shadow root but is not ` +
|
|
11717
11804
|
`defined as hydratable. Use \`defineSSRCustomElement\`.`);
|
|
11718
11805
|
}
|
|
11719
11806
|
this.attachShadow({ mode: 'open' });
|
|
11807
|
+
if (!this._def.__asyncLoader) {
|
|
11808
|
+
// for sync component defs we can immediately resolve props
|
|
11809
|
+
this._resolveProps(this._def);
|
|
11810
|
+
}
|
|
11720
11811
|
}
|
|
11721
11812
|
}
|
|
11722
11813
|
connectedCallback() {
|
|
11723
11814
|
this._connected = true;
|
|
11724
11815
|
if (!this._instance) {
|
|
11725
|
-
this.
|
|
11816
|
+
if (this._resolved) {
|
|
11817
|
+
this._update();
|
|
11818
|
+
}
|
|
11819
|
+
else {
|
|
11820
|
+
this._resolveDef();
|
|
11821
|
+
}
|
|
11726
11822
|
}
|
|
11727
11823
|
}
|
|
11728
11824
|
disconnectedCallback() {
|
|
@@ -11738,9 +11834,6 @@ var Vue = (function () {
|
|
|
11738
11834
|
* resolve inner component definition (handle possible async component)
|
|
11739
11835
|
*/
|
|
11740
11836
|
_resolveDef() {
|
|
11741
|
-
if (this._resolved) {
|
|
11742
|
-
return;
|
|
11743
|
-
}
|
|
11744
11837
|
this._resolved = true;
|
|
11745
11838
|
// set initial attrs
|
|
11746
11839
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
@@ -11752,38 +11845,26 @@ var Vue = (function () {
|
|
|
11752
11845
|
this._setAttr(m.attributeName);
|
|
11753
11846
|
}
|
|
11754
11847
|
}).observe(this, { attributes: true });
|
|
11755
|
-
const resolve = (def) => {
|
|
11756
|
-
const { props
|
|
11757
|
-
const hasOptions = !isArray(props);
|
|
11758
|
-
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
11848
|
+
const resolve = (def, isAsync = false) => {
|
|
11849
|
+
const { props, styles } = def;
|
|
11759
11850
|
// cast Number-type props set before resolve
|
|
11760
11851
|
let numberProps;
|
|
11761
|
-
if (
|
|
11762
|
-
for (const key in
|
|
11852
|
+
if (props && !isArray(props)) {
|
|
11853
|
+
for (const key in props) {
|
|
11763
11854
|
const opt = props[key];
|
|
11764
11855
|
if (opt === Number || (opt && opt.type === Number)) {
|
|
11765
|
-
|
|
11766
|
-
|
|
11856
|
+
if (key in this._props) {
|
|
11857
|
+
this._props[key] = toNumber(this._props[key]);
|
|
11858
|
+
}
|
|
11859
|
+
(numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
|
|
11767
11860
|
}
|
|
11768
11861
|
}
|
|
11769
11862
|
}
|
|
11770
11863
|
this._numberProps = numberProps;
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
}
|
|
11776
|
-
}
|
|
11777
|
-
// defining getter/setters on prototype
|
|
11778
|
-
for (const key of rawKeys.map(camelize)) {
|
|
11779
|
-
Object.defineProperty(this, key, {
|
|
11780
|
-
get() {
|
|
11781
|
-
return this._getProp(key);
|
|
11782
|
-
},
|
|
11783
|
-
set(val) {
|
|
11784
|
-
this._setProp(key, val);
|
|
11785
|
-
}
|
|
11786
|
-
});
|
|
11864
|
+
if (isAsync) {
|
|
11865
|
+
// defining getter/setters on prototype
|
|
11866
|
+
// for sync defs, this already happened in the constructor
|
|
11867
|
+
this._resolveProps(def);
|
|
11787
11868
|
}
|
|
11788
11869
|
// apply CSS
|
|
11789
11870
|
this._applyStyles(styles);
|
|
@@ -11792,12 +11873,33 @@ var Vue = (function () {
|
|
|
11792
11873
|
};
|
|
11793
11874
|
const asyncDef = this._def.__asyncLoader;
|
|
11794
11875
|
if (asyncDef) {
|
|
11795
|
-
asyncDef().then(resolve);
|
|
11876
|
+
asyncDef().then(def => resolve(def, true));
|
|
11796
11877
|
}
|
|
11797
11878
|
else {
|
|
11798
11879
|
resolve(this._def);
|
|
11799
11880
|
}
|
|
11800
11881
|
}
|
|
11882
|
+
_resolveProps(def) {
|
|
11883
|
+
const { props } = def;
|
|
11884
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11885
|
+
// check if there are props set pre-upgrade or connect
|
|
11886
|
+
for (const key of Object.keys(this)) {
|
|
11887
|
+
if (key[0] !== '_' && declaredPropKeys.includes(key)) {
|
|
11888
|
+
this._setProp(key, this[key], true, false);
|
|
11889
|
+
}
|
|
11890
|
+
}
|
|
11891
|
+
// defining getter/setters on prototype
|
|
11892
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
11893
|
+
Object.defineProperty(this, key, {
|
|
11894
|
+
get() {
|
|
11895
|
+
return this._getProp(key);
|
|
11896
|
+
},
|
|
11897
|
+
set(val) {
|
|
11898
|
+
this._setProp(key, val);
|
|
11899
|
+
}
|
|
11900
|
+
});
|
|
11901
|
+
}
|
|
11902
|
+
}
|
|
11801
11903
|
_setAttr(key) {
|
|
11802
11904
|
let value = this.getAttribute(key);
|
|
11803
11905
|
const camelKey = camelize(key);
|
|
@@ -11853,27 +11955,31 @@ var Vue = (function () {
|
|
|
11853
11955
|
this._styles.length = 0;
|
|
11854
11956
|
}
|
|
11855
11957
|
this._applyStyles(newStyles);
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
if (!this._def.__asyncLoader) {
|
|
11859
|
-
// reload
|
|
11860
|
-
this._instance = null;
|
|
11861
|
-
this._update();
|
|
11862
|
-
}
|
|
11958
|
+
this._instance = null;
|
|
11959
|
+
this._update();
|
|
11863
11960
|
};
|
|
11864
11961
|
}
|
|
11865
|
-
|
|
11866
|
-
instance.emit = (event, ...args) => {
|
|
11962
|
+
const dispatch = (event, args) => {
|
|
11867
11963
|
this.dispatchEvent(new CustomEvent(event, {
|
|
11868
11964
|
detail: args
|
|
11869
11965
|
}));
|
|
11870
11966
|
};
|
|
11967
|
+
// intercept emit
|
|
11968
|
+
instance.emit = (event, ...args) => {
|
|
11969
|
+
// dispatch both the raw and hyphenated versions of an event
|
|
11970
|
+
// to match Vue behavior
|
|
11971
|
+
dispatch(event, args);
|
|
11972
|
+
if (hyphenate(event) !== event) {
|
|
11973
|
+
dispatch(hyphenate(event), args);
|
|
11974
|
+
}
|
|
11975
|
+
};
|
|
11871
11976
|
// locate nearest Vue custom element parent for provide/inject
|
|
11872
11977
|
let parent = this;
|
|
11873
11978
|
while ((parent =
|
|
11874
11979
|
parent && (parent.parentNode || parent.host))) {
|
|
11875
11980
|
if (parent instanceof VueElement) {
|
|
11876
11981
|
instance.parent = parent._instance;
|
|
11982
|
+
instance.provides = parent._instance.provides;
|
|
11877
11983
|
break;
|
|
11878
11984
|
}
|
|
11879
11985
|
}
|
|
@@ -11900,7 +12006,7 @@ var Vue = (function () {
|
|
|
11900
12006
|
/* istanbul ignore else */
|
|
11901
12007
|
{
|
|
11902
12008
|
{
|
|
11903
|
-
warn
|
|
12009
|
+
warn(`useCssModule() is not supported in the global build.`);
|
|
11904
12010
|
}
|
|
11905
12011
|
return EMPTY_OBJ;
|
|
11906
12012
|
}
|
|
@@ -11914,10 +12020,17 @@ var Vue = (function () {
|
|
|
11914
12020
|
const instance = getCurrentInstance();
|
|
11915
12021
|
/* istanbul ignore next */
|
|
11916
12022
|
if (!instance) {
|
|
11917
|
-
warn
|
|
12023
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11918
12024
|
return;
|
|
11919
12025
|
}
|
|
11920
|
-
const
|
|
12026
|
+
const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
|
|
12027
|
+
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node => setVarsOnNode(node, vars));
|
|
12028
|
+
});
|
|
12029
|
+
const setVars = () => {
|
|
12030
|
+
const vars = getter(instance.proxy);
|
|
12031
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
12032
|
+
updateTeleports(vars);
|
|
12033
|
+
};
|
|
11921
12034
|
watchPostEffect(setVars);
|
|
11922
12035
|
onMounted(() => {
|
|
11923
12036
|
const ob = new MutationObserver(setVars);
|
|
@@ -11964,7 +12077,7 @@ var Vue = (function () {
|
|
|
11964
12077
|
}
|
|
11965
12078
|
}
|
|
11966
12079
|
|
|
11967
|
-
const TRANSITION = 'transition';
|
|
12080
|
+
const TRANSITION$1 = 'transition';
|
|
11968
12081
|
const ANIMATION = 'animation';
|
|
11969
12082
|
// DOM Transition is a higher-order-component based on the platform-agnostic
|
|
11970
12083
|
// base Transition component, with DOM-specific logic.
|
|
@@ -11997,7 +12110,7 @@ var Vue = (function () {
|
|
|
11997
12110
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
11998
12111
|
* with custom HOCs.
|
|
11999
12112
|
*/
|
|
12000
|
-
const callHook
|
|
12113
|
+
const callHook = (hook, args = []) => {
|
|
12001
12114
|
if (isArray(hook)) {
|
|
12002
12115
|
hook.forEach(h => h(...args));
|
|
12003
12116
|
}
|
|
@@ -12064,11 +12177,16 @@ var Vue = (function () {
|
|
|
12064
12177
|
return (el, done) => {
|
|
12065
12178
|
const hook = isAppear ? onAppear : onEnter;
|
|
12066
12179
|
const resolve = () => finishEnter(el, isAppear, done);
|
|
12067
|
-
callHook
|
|
12180
|
+
callHook(hook, [el, resolve]);
|
|
12068
12181
|
nextFrame(() => {
|
|
12069
12182
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
12070
12183
|
if (legacyClassEnabled) {
|
|
12071
|
-
|
|
12184
|
+
const legacyClass = isAppear
|
|
12185
|
+
? legacyAppearFromClass
|
|
12186
|
+
: legacyEnterFromClass;
|
|
12187
|
+
if (legacyClass) {
|
|
12188
|
+
removeTransitionClass(el, legacyClass);
|
|
12189
|
+
}
|
|
12072
12190
|
}
|
|
12073
12191
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
12074
12192
|
if (!hasExplicitCallback(hook)) {
|
|
@@ -12079,17 +12197,17 @@ var Vue = (function () {
|
|
|
12079
12197
|
};
|
|
12080
12198
|
return extend(baseProps, {
|
|
12081
12199
|
onBeforeEnter(el) {
|
|
12082
|
-
callHook
|
|
12200
|
+
callHook(onBeforeEnter, [el]);
|
|
12083
12201
|
addTransitionClass(el, enterFromClass);
|
|
12084
|
-
if (legacyClassEnabled) {
|
|
12202
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
12085
12203
|
addTransitionClass(el, legacyEnterFromClass);
|
|
12086
12204
|
}
|
|
12087
12205
|
addTransitionClass(el, enterActiveClass);
|
|
12088
12206
|
},
|
|
12089
12207
|
onBeforeAppear(el) {
|
|
12090
|
-
callHook
|
|
12208
|
+
callHook(onBeforeAppear, [el]);
|
|
12091
12209
|
addTransitionClass(el, appearFromClass);
|
|
12092
|
-
if (legacyClassEnabled) {
|
|
12210
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
12093
12211
|
addTransitionClass(el, legacyAppearFromClass);
|
|
12094
12212
|
}
|
|
12095
12213
|
addTransitionClass(el, appearActiveClass);
|
|
@@ -12100,7 +12218,7 @@ var Vue = (function () {
|
|
|
12100
12218
|
el._isLeaving = true;
|
|
12101
12219
|
const resolve = () => finishLeave(el, done);
|
|
12102
12220
|
addTransitionClass(el, leaveFromClass);
|
|
12103
|
-
if (legacyClassEnabled) {
|
|
12221
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
12104
12222
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
12105
12223
|
}
|
|
12106
12224
|
// force reflow so *-leave-from classes immediately take effect (#2593)
|
|
@@ -12112,7 +12230,7 @@ var Vue = (function () {
|
|
|
12112
12230
|
return;
|
|
12113
12231
|
}
|
|
12114
12232
|
removeTransitionClass(el, leaveFromClass);
|
|
12115
|
-
if (legacyClassEnabled) {
|
|
12233
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
12116
12234
|
removeTransitionClass(el, legacyLeaveFromClass);
|
|
12117
12235
|
}
|
|
12118
12236
|
addTransitionClass(el, leaveToClass);
|
|
@@ -12120,19 +12238,19 @@ var Vue = (function () {
|
|
|
12120
12238
|
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
12121
12239
|
}
|
|
12122
12240
|
});
|
|
12123
|
-
callHook
|
|
12241
|
+
callHook(onLeave, [el, resolve]);
|
|
12124
12242
|
},
|
|
12125
12243
|
onEnterCancelled(el) {
|
|
12126
12244
|
finishEnter(el, false);
|
|
12127
|
-
callHook
|
|
12245
|
+
callHook(onEnterCancelled, [el]);
|
|
12128
12246
|
},
|
|
12129
12247
|
onAppearCancelled(el) {
|
|
12130
12248
|
finishEnter(el, true);
|
|
12131
|
-
callHook
|
|
12249
|
+
callHook(onAppearCancelled, [el]);
|
|
12132
12250
|
},
|
|
12133
12251
|
onLeaveCancelled(el) {
|
|
12134
12252
|
finishLeave(el);
|
|
12135
|
-
callHook
|
|
12253
|
+
callHook(onLeaveCancelled, [el]);
|
|
12136
12254
|
}
|
|
12137
12255
|
});
|
|
12138
12256
|
}
|
|
@@ -12150,18 +12268,10 @@ var Vue = (function () {
|
|
|
12150
12268
|
}
|
|
12151
12269
|
function NumberOf(val) {
|
|
12152
12270
|
const res = toNumber(val);
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
}
|
|
12156
|
-
function validateDuration(val) {
|
|
12157
|
-
if (typeof val !== 'number') {
|
|
12158
|
-
warn$1(`<transition> explicit duration is not a valid number - ` +
|
|
12159
|
-
`got ${JSON.stringify(val)}.`);
|
|
12160
|
-
}
|
|
12161
|
-
else if (isNaN(val)) {
|
|
12162
|
-
warn$1(`<transition> explicit duration is NaN - ` +
|
|
12163
|
-
'the duration expression might be incorrect.');
|
|
12271
|
+
{
|
|
12272
|
+
assertNumber(res, '<transition> explicit duration');
|
|
12164
12273
|
}
|
|
12274
|
+
return res;
|
|
12165
12275
|
}
|
|
12166
12276
|
function addTransitionClass(el, cls) {
|
|
12167
12277
|
cls.split(/\s+/).forEach(c => c && el.classList.add(c));
|
|
@@ -12220,8 +12330,8 @@ var Vue = (function () {
|
|
|
12220
12330
|
const styles = window.getComputedStyle(el);
|
|
12221
12331
|
// JSDOM may return undefined for transition properties
|
|
12222
12332
|
const getStyleProperties = (key) => (styles[key] || '').split(', ');
|
|
12223
|
-
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
12224
|
-
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
12333
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
12334
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
12225
12335
|
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
12226
12336
|
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
12227
12337
|
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
@@ -12230,9 +12340,9 @@ var Vue = (function () {
|
|
|
12230
12340
|
let timeout = 0;
|
|
12231
12341
|
let propCount = 0;
|
|
12232
12342
|
/* istanbul ignore if */
|
|
12233
|
-
if (expectedType === TRANSITION) {
|
|
12343
|
+
if (expectedType === TRANSITION$1) {
|
|
12234
12344
|
if (transitionTimeout > 0) {
|
|
12235
|
-
type = TRANSITION;
|
|
12345
|
+
type = TRANSITION$1;
|
|
12236
12346
|
timeout = transitionTimeout;
|
|
12237
12347
|
propCount = transitionDurations.length;
|
|
12238
12348
|
}
|
|
@@ -12249,17 +12359,17 @@ var Vue = (function () {
|
|
|
12249
12359
|
type =
|
|
12250
12360
|
timeout > 0
|
|
12251
12361
|
? transitionTimeout > animationTimeout
|
|
12252
|
-
? TRANSITION
|
|
12362
|
+
? TRANSITION$1
|
|
12253
12363
|
: ANIMATION
|
|
12254
12364
|
: null;
|
|
12255
12365
|
propCount = type
|
|
12256
|
-
? type === TRANSITION
|
|
12366
|
+
? type === TRANSITION$1
|
|
12257
12367
|
? transitionDurations.length
|
|
12258
12368
|
: animationDurations.length
|
|
12259
12369
|
: 0;
|
|
12260
12370
|
}
|
|
12261
|
-
const hasTransform = type === TRANSITION &&
|
|
12262
|
-
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
|
|
12371
|
+
const hasTransform = type === TRANSITION$1 &&
|
|
12372
|
+
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION$1}Property`).toString());
|
|
12263
12373
|
return {
|
|
12264
12374
|
type,
|
|
12265
12375
|
timeout,
|
|
@@ -12348,7 +12458,7 @@ var Vue = (function () {
|
|
|
12348
12458
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
12349
12459
|
}
|
|
12350
12460
|
else {
|
|
12351
|
-
warn
|
|
12461
|
+
warn(`<TransitionGroup> children must be keyed.`);
|
|
12352
12462
|
}
|
|
12353
12463
|
}
|
|
12354
12464
|
if (prevChildren) {
|
|
@@ -12365,6 +12475,14 @@ var Vue = (function () {
|
|
|
12365
12475
|
{
|
|
12366
12476
|
TransitionGroupImpl.__isBuiltIn = true;
|
|
12367
12477
|
}
|
|
12478
|
+
/**
|
|
12479
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
12480
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
12481
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
12482
|
+
* in a function and mark the function's invocation as pure.
|
|
12483
|
+
*/
|
|
12484
|
+
const removeMode = (props) => delete props.mode;
|
|
12485
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
12368
12486
|
const TransitionGroup = TransitionGroupImpl;
|
|
12369
12487
|
function callPendingCbs(c) {
|
|
12370
12488
|
const el = c.el;
|
|
@@ -12440,7 +12558,7 @@ var Vue = (function () {
|
|
|
12440
12558
|
domValue = domValue.trim();
|
|
12441
12559
|
}
|
|
12442
12560
|
if (castToNumber) {
|
|
12443
|
-
domValue =
|
|
12561
|
+
domValue = looseToNumber(domValue);
|
|
12444
12562
|
}
|
|
12445
12563
|
el._assign(domValue);
|
|
12446
12564
|
});
|
|
@@ -12475,7 +12593,8 @@ var Vue = (function () {
|
|
|
12475
12593
|
if (trim && el.value.trim() === value) {
|
|
12476
12594
|
return;
|
|
12477
12595
|
}
|
|
12478
|
-
if ((number || el.type === 'number') &&
|
|
12596
|
+
if ((number || el.type === 'number') &&
|
|
12597
|
+
looseToNumber(el.value) === value) {
|
|
12479
12598
|
return;
|
|
12480
12599
|
}
|
|
12481
12600
|
}
|
|
@@ -12564,7 +12683,7 @@ var Vue = (function () {
|
|
|
12564
12683
|
addEventListener(el, 'change', () => {
|
|
12565
12684
|
const selectedVal = Array.prototype.filter
|
|
12566
12685
|
.call(el.options, (o) => o.selected)
|
|
12567
|
-
.map((o) => number ?
|
|
12686
|
+
.map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
12568
12687
|
el._assign(el.multiple
|
|
12569
12688
|
? isSetModel
|
|
12570
12689
|
? new Set(selectedVal)
|
|
@@ -12588,7 +12707,7 @@ var Vue = (function () {
|
|
|
12588
12707
|
function setSelected(el, value) {
|
|
12589
12708
|
const isMultiple = el.multiple;
|
|
12590
12709
|
if (isMultiple && !isArray(value) && !isSet(value)) {
|
|
12591
|
-
warn
|
|
12710
|
+
warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
|
12592
12711
|
`but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
|
|
12593
12712
|
return;
|
|
12594
12713
|
}
|
|
@@ -12884,7 +13003,7 @@ var Vue = (function () {
|
|
|
12884
13003
|
return isCustomElement;
|
|
12885
13004
|
},
|
|
12886
13005
|
set() {
|
|
12887
|
-
warn
|
|
13006
|
+
warn(`The \`isCustomElement\` config option is deprecated. Use ` +
|
|
12888
13007
|
`\`compilerOptions.isCustomElement\` instead.`);
|
|
12889
13008
|
}
|
|
12890
13009
|
});
|
|
@@ -12898,11 +13017,11 @@ var Vue = (function () {
|
|
|
12898
13017
|
`- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
|
|
12899
13018
|
Object.defineProperty(app.config, 'compilerOptions', {
|
|
12900
13019
|
get() {
|
|
12901
|
-
warn
|
|
13020
|
+
warn(msg);
|
|
12902
13021
|
return compilerOptions;
|
|
12903
13022
|
},
|
|
12904
13023
|
set() {
|
|
12905
|
-
warn
|
|
13024
|
+
warn(msg);
|
|
12906
13025
|
}
|
|
12907
13026
|
});
|
|
12908
13027
|
}
|
|
@@ -12911,14 +13030,14 @@ var Vue = (function () {
|
|
|
12911
13030
|
if (isString(container)) {
|
|
12912
13031
|
const res = document.querySelector(container);
|
|
12913
13032
|
if (!res) {
|
|
12914
|
-
warn
|
|
13033
|
+
warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
|
12915
13034
|
}
|
|
12916
13035
|
return res;
|
|
12917
13036
|
}
|
|
12918
13037
|
if (window.ShadowRoot &&
|
|
12919
13038
|
container instanceof window.ShadowRoot &&
|
|
12920
13039
|
container.mode === 'closed') {
|
|
12921
|
-
warn
|
|
13040
|
+
warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
12922
13041
|
}
|
|
12923
13042
|
return container;
|
|
12924
13043
|
}
|
|
@@ -12929,150 +13048,151 @@ var Vue = (function () {
|
|
|
12929
13048
|
|
|
12930
13049
|
var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
12931
13050
|
__proto__: null,
|
|
12932
|
-
|
|
12933
|
-
|
|
13051
|
+
BaseTransition: BaseTransition,
|
|
13052
|
+
Comment: Comment,
|
|
13053
|
+
EffectScope: EffectScope,
|
|
13054
|
+
Fragment: Fragment,
|
|
13055
|
+
KeepAlive: KeepAlive,
|
|
13056
|
+
ReactiveEffect: ReactiveEffect,
|
|
13057
|
+
Static: Static,
|
|
13058
|
+
Suspense: Suspense,
|
|
13059
|
+
Teleport: Teleport,
|
|
13060
|
+
Text: Text,
|
|
13061
|
+
Transition: Transition,
|
|
13062
|
+
TransitionGroup: TransitionGroup,
|
|
13063
|
+
VueElement: VueElement,
|
|
13064
|
+
assertNumber: assertNumber,
|
|
13065
|
+
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
13066
|
+
callWithErrorHandling: callWithErrorHandling,
|
|
13067
|
+
camelize: camelize,
|
|
13068
|
+
capitalize: capitalize,
|
|
13069
|
+
cloneVNode: cloneVNode,
|
|
13070
|
+
compatUtils: compatUtils,
|
|
13071
|
+
computed: computed,
|
|
12934
13072
|
createApp: createApp,
|
|
13073
|
+
createBlock: createBlock,
|
|
13074
|
+
createCommentVNode: createCommentVNode,
|
|
13075
|
+
createElementBlock: createElementBlock,
|
|
13076
|
+
createElementVNode: createBaseVNode,
|
|
13077
|
+
createHydrationRenderer: createHydrationRenderer,
|
|
13078
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
13079
|
+
createRenderer: createRenderer,
|
|
12935
13080
|
createSSRApp: createSSRApp,
|
|
12936
|
-
|
|
13081
|
+
createSlots: createSlots,
|
|
13082
|
+
createStaticVNode: createStaticVNode,
|
|
13083
|
+
createTextVNode: createTextVNode,
|
|
13084
|
+
createVNode: createVNode,
|
|
13085
|
+
customRef: customRef,
|
|
13086
|
+
defineAsyncComponent: defineAsyncComponent,
|
|
13087
|
+
defineComponent: defineComponent,
|
|
12937
13088
|
defineCustomElement: defineCustomElement,
|
|
13089
|
+
defineEmits: defineEmits,
|
|
13090
|
+
defineExpose: defineExpose,
|
|
13091
|
+
defineProps: defineProps,
|
|
12938
13092
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
ref: ref,
|
|
12954
|
-
readonly: readonly,
|
|
12955
|
-
unref: unref,
|
|
12956
|
-
proxyRefs: proxyRefs,
|
|
12957
|
-
isRef: isRef,
|
|
12958
|
-
toRef: toRef,
|
|
12959
|
-
toRefs: toRefs,
|
|
13093
|
+
get devtools () { return devtools; },
|
|
13094
|
+
effect: effect,
|
|
13095
|
+
effectScope: effectScope,
|
|
13096
|
+
getCurrentInstance: getCurrentInstance,
|
|
13097
|
+
getCurrentScope: getCurrentScope,
|
|
13098
|
+
getTransitionRawChildren: getTransitionRawChildren,
|
|
13099
|
+
guardReactiveProps: guardReactiveProps,
|
|
13100
|
+
h: h,
|
|
13101
|
+
handleError: handleError,
|
|
13102
|
+
hydrate: hydrate,
|
|
13103
|
+
initCustomFormatter: initCustomFormatter,
|
|
13104
|
+
initDirectivesForSSR: initDirectivesForSSR,
|
|
13105
|
+
inject: inject,
|
|
13106
|
+
isMemoSame: isMemoSame,
|
|
12960
13107
|
isProxy: isProxy,
|
|
12961
13108
|
isReactive: isReactive,
|
|
12962
13109
|
isReadonly: isReadonly,
|
|
13110
|
+
isRef: isRef,
|
|
13111
|
+
isRuntimeOnly: isRuntimeOnly,
|
|
12963
13112
|
isShallow: isShallow,
|
|
12964
|
-
|
|
12965
|
-
triggerRef: triggerRef,
|
|
12966
|
-
shallowRef: shallowRef,
|
|
12967
|
-
shallowReactive: shallowReactive,
|
|
12968
|
-
shallowReadonly: shallowReadonly,
|
|
13113
|
+
isVNode: isVNode,
|
|
12969
13114
|
markRaw: markRaw,
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
onScopeDispose: onScopeDispose,
|
|
12978
|
-
computed: computed$1,
|
|
12979
|
-
watch: watch,
|
|
12980
|
-
watchEffect: watchEffect,
|
|
12981
|
-
watchPostEffect: watchPostEffect,
|
|
12982
|
-
watchSyncEffect: watchSyncEffect,
|
|
13115
|
+
mergeDefaults: mergeDefaults,
|
|
13116
|
+
mergeProps: mergeProps,
|
|
13117
|
+
nextTick: nextTick,
|
|
13118
|
+
normalizeClass: normalizeClass,
|
|
13119
|
+
normalizeProps: normalizeProps,
|
|
13120
|
+
normalizeStyle: normalizeStyle,
|
|
13121
|
+
onActivated: onActivated,
|
|
12983
13122
|
onBeforeMount: onBeforeMount,
|
|
12984
|
-
onMounted: onMounted,
|
|
12985
|
-
onBeforeUpdate: onBeforeUpdate,
|
|
12986
|
-
onUpdated: onUpdated,
|
|
12987
13123
|
onBeforeUnmount: onBeforeUnmount,
|
|
12988
|
-
|
|
12989
|
-
onActivated: onActivated,
|
|
13124
|
+
onBeforeUpdate: onBeforeUpdate,
|
|
12990
13125
|
onDeactivated: onDeactivated,
|
|
13126
|
+
onErrorCaptured: onErrorCaptured,
|
|
13127
|
+
onMounted: onMounted,
|
|
12991
13128
|
onRenderTracked: onRenderTracked,
|
|
12992
13129
|
onRenderTriggered: onRenderTriggered,
|
|
12993
|
-
|
|
13130
|
+
onScopeDispose: onScopeDispose,
|
|
12994
13131
|
onServerPrefetch: onServerPrefetch,
|
|
13132
|
+
onUnmounted: onUnmounted,
|
|
13133
|
+
onUpdated: onUpdated,
|
|
13134
|
+
openBlock: openBlock,
|
|
13135
|
+
popScopeId: popScopeId,
|
|
12995
13136
|
provide: provide,
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
defineComponent: defineComponent,
|
|
12999
|
-
defineAsyncComponent: defineAsyncComponent,
|
|
13000
|
-
useAttrs: useAttrs,
|
|
13001
|
-
useSlots: useSlots,
|
|
13002
|
-
defineProps: defineProps,
|
|
13003
|
-
defineEmits: defineEmits,
|
|
13004
|
-
defineExpose: defineExpose,
|
|
13005
|
-
withDefaults: withDefaults,
|
|
13006
|
-
mergeDefaults: mergeDefaults,
|
|
13007
|
-
createPropsRestProxy: createPropsRestProxy,
|
|
13008
|
-
withAsyncContext: withAsyncContext,
|
|
13009
|
-
getCurrentInstance: getCurrentInstance,
|
|
13010
|
-
h: h,
|
|
13011
|
-
createVNode: createVNode,
|
|
13012
|
-
cloneVNode: cloneVNode,
|
|
13013
|
-
mergeProps: mergeProps,
|
|
13014
|
-
isVNode: isVNode,
|
|
13015
|
-
Fragment: Fragment,
|
|
13016
|
-
Text: Text,
|
|
13017
|
-
Comment: Comment,
|
|
13018
|
-
Static: Static,
|
|
13019
|
-
Teleport: Teleport,
|
|
13020
|
-
Suspense: Suspense,
|
|
13021
|
-
KeepAlive: KeepAlive,
|
|
13022
|
-
BaseTransition: BaseTransition,
|
|
13023
|
-
withDirectives: withDirectives,
|
|
13024
|
-
useSSRContext: useSSRContext,
|
|
13025
|
-
ssrContextKey: ssrContextKey,
|
|
13026
|
-
createRenderer: createRenderer,
|
|
13027
|
-
createHydrationRenderer: createHydrationRenderer,
|
|
13137
|
+
proxyRefs: proxyRefs,
|
|
13138
|
+
pushScopeId: pushScopeId,
|
|
13028
13139
|
queuePostFlushCb: queuePostFlushCb,
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13140
|
+
reactive: reactive,
|
|
13141
|
+
readonly: readonly,
|
|
13142
|
+
ref: ref,
|
|
13143
|
+
registerRuntimeCompiler: registerRuntimeCompiler,
|
|
13144
|
+
render: render,
|
|
13145
|
+
renderList: renderList,
|
|
13146
|
+
renderSlot: renderSlot,
|
|
13033
13147
|
resolveComponent: resolveComponent,
|
|
13034
13148
|
resolveDirective: resolveDirective,
|
|
13035
13149
|
resolveDynamicComponent: resolveDynamicComponent,
|
|
13036
|
-
|
|
13037
|
-
isRuntimeOnly: isRuntimeOnly,
|
|
13038
|
-
useTransitionState: useTransitionState,
|
|
13150
|
+
resolveFilter: resolveFilter,
|
|
13039
13151
|
resolveTransitionHooks: resolveTransitionHooks,
|
|
13040
|
-
setTransitionHooks: setTransitionHooks,
|
|
13041
|
-
getTransitionRawChildren: getTransitionRawChildren,
|
|
13042
|
-
initCustomFormatter: initCustomFormatter,
|
|
13043
|
-
get devtools () { return devtools; },
|
|
13044
|
-
setDevtoolsHook: setDevtoolsHook,
|
|
13045
|
-
withCtx: withCtx,
|
|
13046
|
-
pushScopeId: pushScopeId,
|
|
13047
|
-
popScopeId: popScopeId,
|
|
13048
|
-
withScopeId: withScopeId,
|
|
13049
|
-
renderList: renderList,
|
|
13050
|
-
toHandlers: toHandlers,
|
|
13051
|
-
renderSlot: renderSlot,
|
|
13052
|
-
createSlots: createSlots,
|
|
13053
|
-
withMemo: withMemo,
|
|
13054
|
-
isMemoSame: isMemoSame,
|
|
13055
|
-
openBlock: openBlock,
|
|
13056
|
-
createBlock: createBlock,
|
|
13057
13152
|
setBlockTracking: setBlockTracking,
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13153
|
+
setDevtoolsHook: setDevtoolsHook,
|
|
13154
|
+
setTransitionHooks: setTransitionHooks,
|
|
13155
|
+
shallowReactive: shallowReactive,
|
|
13156
|
+
shallowReadonly: shallowReadonly,
|
|
13157
|
+
shallowRef: shallowRef,
|
|
13158
|
+
ssrContextKey: ssrContextKey,
|
|
13159
|
+
ssrUtils: ssrUtils,
|
|
13160
|
+
stop: stop,
|
|
13064
13161
|
toDisplayString: toDisplayString,
|
|
13065
|
-
camelize: camelize,
|
|
13066
|
-
capitalize: capitalize,
|
|
13067
13162
|
toHandlerKey: toHandlerKey,
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13163
|
+
toHandlers: toHandlers,
|
|
13164
|
+
toRaw: toRaw,
|
|
13165
|
+
toRef: toRef,
|
|
13166
|
+
toRefs: toRefs,
|
|
13071
13167
|
transformVNodeArgs: transformVNodeArgs,
|
|
13168
|
+
triggerRef: triggerRef,
|
|
13169
|
+
unref: unref,
|
|
13170
|
+
useAttrs: useAttrs,
|
|
13171
|
+
useCssModule: useCssModule,
|
|
13172
|
+
useCssVars: useCssVars,
|
|
13173
|
+
useSSRContext: useSSRContext,
|
|
13174
|
+
useSlots: useSlots,
|
|
13175
|
+
useTransitionState: useTransitionState,
|
|
13176
|
+
vModelCheckbox: vModelCheckbox,
|
|
13177
|
+
vModelDynamic: vModelDynamic,
|
|
13178
|
+
vModelRadio: vModelRadio,
|
|
13179
|
+
vModelSelect: vModelSelect,
|
|
13180
|
+
vModelText: vModelText,
|
|
13181
|
+
vShow: vShow,
|
|
13072
13182
|
version: version,
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13183
|
+
warn: warn,
|
|
13184
|
+
watch: watch,
|
|
13185
|
+
watchEffect: watchEffect,
|
|
13186
|
+
watchPostEffect: watchPostEffect,
|
|
13187
|
+
watchSyncEffect: watchSyncEffect,
|
|
13188
|
+
withAsyncContext: withAsyncContext,
|
|
13189
|
+
withCtx: withCtx,
|
|
13190
|
+
withDefaults: withDefaults,
|
|
13191
|
+
withDirectives: withDirectives,
|
|
13192
|
+
withKeys: withKeys,
|
|
13193
|
+
withMemo: withMemo,
|
|
13194
|
+
withModifiers: withModifiers,
|
|
13195
|
+
withScopeId: withScopeId
|
|
13076
13196
|
});
|
|
13077
13197
|
|
|
13078
13198
|
function initDev() {
|
|
@@ -13106,7 +13226,7 @@ var Vue = (function () {
|
|
|
13106
13226
|
}
|
|
13107
13227
|
return app;
|
|
13108
13228
|
}
|
|
13109
|
-
function createCompatVue
|
|
13229
|
+
function createCompatVue() {
|
|
13110
13230
|
const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp);
|
|
13111
13231
|
extend(Vue, runtimeDom);
|
|
13112
13232
|
return Vue;
|
|
@@ -13168,7 +13288,7 @@ var Vue = (function () {
|
|
|
13168
13288
|
[34 /* ErrorCodes.X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
|
|
13169
13289
|
[35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
|
|
13170
13290
|
[36 /* ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
|
|
13171
|
-
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template
|
|
13291
|
+
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>. ` +
|
|
13172
13292
|
`When there are multiple named slots, all slots should use <template> ` +
|
|
13173
13293
|
`syntax to avoid scope ambiguity.`,
|
|
13174
13294
|
[38 /* ErrorCodes.X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
|
|
@@ -13178,15 +13298,16 @@ var Vue = (function () {
|
|
|
13178
13298
|
[41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
|
|
13179
13299
|
[42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
|
|
13180
13300
|
[43 /* ErrorCodes.X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13181
|
-
[44 /* ErrorCodes.
|
|
13182
|
-
[45 /* ErrorCodes.
|
|
13301
|
+
[44 /* ErrorCodes.X_V_MODEL_ON_PROPS */]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
13302
|
+
[45 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
|
|
13303
|
+
[46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
|
|
13183
13304
|
// generic errors
|
|
13184
|
-
[
|
|
13185
|
-
[
|
|
13186
|
-
[
|
|
13187
|
-
[
|
|
13305
|
+
[47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
13306
|
+
[48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
|
|
13307
|
+
[49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
13308
|
+
[50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
|
|
13188
13309
|
// just to fulfill types
|
|
13189
|
-
[
|
|
13310
|
+
[51 /* ErrorCodes.__EXTEND_POINT__ */]: ``
|
|
13190
13311
|
};
|
|
13191
13312
|
|
|
13192
13313
|
const FRAGMENT = Symbol(`Fragment` );
|
|
@@ -13290,7 +13411,7 @@ var Vue = (function () {
|
|
|
13290
13411
|
return {
|
|
13291
13412
|
type: 0 /* NodeTypes.ROOT */,
|
|
13292
13413
|
children,
|
|
13293
|
-
helpers:
|
|
13414
|
+
helpers: new Set(),
|
|
13294
13415
|
components: [],
|
|
13295
13416
|
directives: [],
|
|
13296
13417
|
hoists: [],
|
|
@@ -13588,7 +13709,7 @@ var Vue = (function () {
|
|
|
13588
13709
|
!p.arg.isStatic) // v-bind:[foo]
|
|
13589
13710
|
);
|
|
13590
13711
|
}
|
|
13591
|
-
function isText(node) {
|
|
13712
|
+
function isText$1(node) {
|
|
13592
13713
|
return node.type === 5 /* NodeTypes.INTERPOLATION */ || node.type === 2 /* NodeTypes.TEXT */;
|
|
13593
13714
|
}
|
|
13594
13715
|
function isVSlot(p) {
|
|
@@ -13736,7 +13857,7 @@ var Vue = (function () {
|
|
|
13736
13857
|
}
|
|
13737
13858
|
}
|
|
13738
13859
|
|
|
13739
|
-
const deprecationData
|
|
13860
|
+
const deprecationData = {
|
|
13740
13861
|
["COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */]: {
|
|
13741
13862
|
message: `Platform-native elements with "is" prop will no longer be ` +
|
|
13742
13863
|
`treated as components in Vue 3 unless the "is" value is explicitly ` +
|
|
@@ -13800,26 +13921,26 @@ var Vue = (function () {
|
|
|
13800
13921
|
return value;
|
|
13801
13922
|
}
|
|
13802
13923
|
}
|
|
13803
|
-
function isCompatEnabled
|
|
13924
|
+
function isCompatEnabled(key, context) {
|
|
13804
13925
|
const mode = getCompatValue('MODE', context);
|
|
13805
13926
|
const value = getCompatValue(key, context);
|
|
13806
13927
|
// in v3 mode, only enable if explicitly set to true
|
|
13807
13928
|
// otherwise enable for any non-false value
|
|
13808
13929
|
return mode === 3 ? value === true : value !== false;
|
|
13809
13930
|
}
|
|
13810
|
-
function checkCompatEnabled
|
|
13811
|
-
const enabled = isCompatEnabled
|
|
13931
|
+
function checkCompatEnabled(key, context, loc, ...args) {
|
|
13932
|
+
const enabled = isCompatEnabled(key, context);
|
|
13812
13933
|
if (enabled) {
|
|
13813
|
-
warnDeprecation
|
|
13934
|
+
warnDeprecation(key, context, loc, ...args);
|
|
13814
13935
|
}
|
|
13815
13936
|
return enabled;
|
|
13816
13937
|
}
|
|
13817
|
-
function warnDeprecation
|
|
13938
|
+
function warnDeprecation(key, context, loc, ...args) {
|
|
13818
13939
|
const val = getCompatValue(key, context);
|
|
13819
13940
|
if (val === 'suppress-warning') {
|
|
13820
13941
|
return;
|
|
13821
13942
|
}
|
|
13822
|
-
const { message, link } = deprecationData
|
|
13943
|
+
const { message, link } = deprecationData[key];
|
|
13823
13944
|
const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`;
|
|
13824
13945
|
const err = new SyntaxError(msg);
|
|
13825
13946
|
err.code = key;
|
|
@@ -13941,12 +14062,12 @@ var Vue = (function () {
|
|
|
13941
14062
|
else if (/[a-z]/i.test(s[1])) {
|
|
13942
14063
|
node = parseElement(context, ancestors);
|
|
13943
14064
|
// 2.x <template> with no directive compat
|
|
13944
|
-
if (isCompatEnabled
|
|
14065
|
+
if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context) &&
|
|
13945
14066
|
node &&
|
|
13946
14067
|
node.tag === 'template' &&
|
|
13947
14068
|
!node.props.some(p => p.type === 7 /* NodeTypes.DIRECTIVE */ &&
|
|
13948
14069
|
isSpecialTemplateDirective(p.name))) {
|
|
13949
|
-
warnDeprecation
|
|
14070
|
+
warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context, node.loc);
|
|
13950
14071
|
node = node.children;
|
|
13951
14072
|
}
|
|
13952
14073
|
}
|
|
@@ -14146,7 +14267,7 @@ var Vue = (function () {
|
|
|
14146
14267
|
{
|
|
14147
14268
|
const inlineTemplateProp = element.props.find(p => p.type === 6 /* NodeTypes.ATTRIBUTE */ && p.name === 'inline-template');
|
|
14148
14269
|
if (inlineTemplateProp &&
|
|
14149
|
-
checkCompatEnabled
|
|
14270
|
+
checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) {
|
|
14150
14271
|
const loc = getSelection(context, element.loc.end);
|
|
14151
14272
|
inlineTemplateProp.value = {
|
|
14152
14273
|
type: 2 /* NodeTypes.TEXT */,
|
|
@@ -14223,7 +14344,7 @@ var Vue = (function () {
|
|
|
14223
14344
|
return;
|
|
14224
14345
|
}
|
|
14225
14346
|
// 2.x deprecation checks
|
|
14226
|
-
if (isCompatEnabled
|
|
14347
|
+
if (isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* CompilerDeprecationTypes.COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) {
|
|
14227
14348
|
let hasIf = false;
|
|
14228
14349
|
let hasFor = false;
|
|
14229
14350
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -14237,7 +14358,7 @@ var Vue = (function () {
|
|
|
14237
14358
|
}
|
|
14238
14359
|
}
|
|
14239
14360
|
if (hasIf && hasFor) {
|
|
14240
|
-
warnDeprecation
|
|
14361
|
+
warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* CompilerDeprecationTypes.COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
|
|
14241
14362
|
break;
|
|
14242
14363
|
}
|
|
14243
14364
|
}
|
|
@@ -14289,7 +14410,7 @@ var Vue = (function () {
|
|
|
14289
14410
|
if (p.value.content.startsWith('vue:')) {
|
|
14290
14411
|
return true;
|
|
14291
14412
|
}
|
|
14292
|
-
else if (checkCompatEnabled
|
|
14413
|
+
else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
|
|
14293
14414
|
return true;
|
|
14294
14415
|
}
|
|
14295
14416
|
}
|
|
@@ -14305,7 +14426,7 @@ var Vue = (function () {
|
|
|
14305
14426
|
p.name === 'bind' &&
|
|
14306
14427
|
isStaticArgOf(p.arg, 'is') &&
|
|
14307
14428
|
true &&
|
|
14308
|
-
checkCompatEnabled
|
|
14429
|
+
checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
|
|
14309
14430
|
return true;
|
|
14310
14431
|
}
|
|
14311
14432
|
}
|
|
@@ -14431,12 +14552,12 @@ var Vue = (function () {
|
|
|
14431
14552
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
14432
14553
|
if (dirName === 'bind' && arg) {
|
|
14433
14554
|
if (modifiers.includes('sync') &&
|
|
14434
|
-
checkCompatEnabled
|
|
14555
|
+
checkCompatEnabled("COMPILER_V_BIND_SYNC" /* CompilerDeprecationTypes.COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) {
|
|
14435
14556
|
dirName = 'model';
|
|
14436
14557
|
modifiers.splice(modifiers.indexOf('sync'), 1);
|
|
14437
14558
|
}
|
|
14438
14559
|
if (modifiers.includes('prop')) {
|
|
14439
|
-
checkCompatEnabled
|
|
14560
|
+
checkCompatEnabled("COMPILER_V_BIND_PROP" /* CompilerDeprecationTypes.COMPILER_V_BIND_PROP */, context, loc);
|
|
14440
14561
|
}
|
|
14441
14562
|
}
|
|
14442
14563
|
return {
|
|
@@ -14651,7 +14772,7 @@ var Vue = (function () {
|
|
|
14651
14772
|
}
|
|
14652
14773
|
|
|
14653
14774
|
function hoistStatic(root, context) {
|
|
14654
|
-
walk
|
|
14775
|
+
walk(root, context,
|
|
14655
14776
|
// Root node is unfortunately non-hoistable due to potential parent
|
|
14656
14777
|
// fallthrough attributes.
|
|
14657
14778
|
isSingleElementRoot(root, root.children[0]));
|
|
@@ -14662,7 +14783,7 @@ var Vue = (function () {
|
|
|
14662
14783
|
child.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
14663
14784
|
!isSlotOutlet(child));
|
|
14664
14785
|
}
|
|
14665
|
-
function walk
|
|
14786
|
+
function walk(node, context, doNotHoistNode = false) {
|
|
14666
14787
|
const { children } = node;
|
|
14667
14788
|
const originalCount = children.length;
|
|
14668
14789
|
let hoistedCount = 0;
|
|
@@ -14711,19 +14832,19 @@ var Vue = (function () {
|
|
|
14711
14832
|
if (isComponent) {
|
|
14712
14833
|
context.scopes.vSlot++;
|
|
14713
14834
|
}
|
|
14714
|
-
walk
|
|
14835
|
+
walk(child, context);
|
|
14715
14836
|
if (isComponent) {
|
|
14716
14837
|
context.scopes.vSlot--;
|
|
14717
14838
|
}
|
|
14718
14839
|
}
|
|
14719
14840
|
else if (child.type === 11 /* NodeTypes.FOR */) {
|
|
14720
14841
|
// Do not hoist v-for single child because it has to be a block
|
|
14721
|
-
walk
|
|
14842
|
+
walk(child, context, child.children.length === 1);
|
|
14722
14843
|
}
|
|
14723
14844
|
else if (child.type === 9 /* NodeTypes.IF */) {
|
|
14724
14845
|
for (let i = 0; i < child.branches.length; i++) {
|
|
14725
14846
|
// Do not hoist v-if single child because it has to be a block
|
|
14726
|
-
walk
|
|
14847
|
+
walk(child.branches[i], context, child.branches[i].children.length === 1);
|
|
14727
14848
|
}
|
|
14728
14849
|
}
|
|
14729
14850
|
}
|
|
@@ -15071,7 +15192,7 @@ var Vue = (function () {
|
|
|
15071
15192
|
createRootCodegen(root, context);
|
|
15072
15193
|
}
|
|
15073
15194
|
// finalize meta information
|
|
15074
|
-
root.helpers = [...context.helpers.keys()];
|
|
15195
|
+
root.helpers = new Set([...context.helpers.keys()]);
|
|
15075
15196
|
root.components = [...context.components];
|
|
15076
15197
|
root.directives = [...context.directives];
|
|
15077
15198
|
root.imports = context.imports;
|
|
@@ -15277,12 +15398,16 @@ var Vue = (function () {
|
|
|
15277
15398
|
if (options.onContextCreated)
|
|
15278
15399
|
options.onContextCreated(context);
|
|
15279
15400
|
const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
|
|
15280
|
-
const
|
|
15401
|
+
const helpers = Array.from(ast.helpers);
|
|
15402
|
+
const hasHelpers = helpers.length > 0;
|
|
15281
15403
|
const useWithBlock = !prefixIdentifiers && mode !== 'module';
|
|
15404
|
+
const isSetupInlined = !true ;
|
|
15282
15405
|
// preambles
|
|
15283
15406
|
// in setup() inline mode, the preamble is generated in a sub context
|
|
15284
15407
|
// and returned separately.
|
|
15285
|
-
const preambleContext =
|
|
15408
|
+
const preambleContext = isSetupInlined
|
|
15409
|
+
? createCodegenContext(ast, options)
|
|
15410
|
+
: context;
|
|
15286
15411
|
{
|
|
15287
15412
|
genFunctionPreamble(ast, preambleContext);
|
|
15288
15413
|
}
|
|
@@ -15300,7 +15425,7 @@ var Vue = (function () {
|
|
|
15300
15425
|
// function mode const declarations should be inside with block
|
|
15301
15426
|
// also they should be renamed to avoid collision with user properties
|
|
15302
15427
|
if (hasHelpers) {
|
|
15303
|
-
push(`const { ${
|
|
15428
|
+
push(`const { ${helpers.map(aliasHelper).join(', ')} } = _Vue`);
|
|
15304
15429
|
push(`\n`);
|
|
15305
15430
|
newline();
|
|
15306
15431
|
}
|
|
@@ -15352,7 +15477,7 @@ var Vue = (function () {
|
|
|
15352
15477
|
return {
|
|
15353
15478
|
ast,
|
|
15354
15479
|
code: context.code,
|
|
15355
|
-
preamble: ``,
|
|
15480
|
+
preamble: isSetupInlined ? preambleContext.code : ``,
|
|
15356
15481
|
// SourceMapGenerator does have toJSON() method but it's not in the types
|
|
15357
15482
|
map: context.map ? context.map.toJSON() : undefined
|
|
15358
15483
|
};
|
|
@@ -15364,7 +15489,8 @@ var Vue = (function () {
|
|
|
15364
15489
|
// In prefix mode, we place the const declaration at top so it's done
|
|
15365
15490
|
// only once; But if we not prefixing, we place the declaration inside the
|
|
15366
15491
|
// with block so it doesn't incur the `in` check cost for every helper access.
|
|
15367
|
-
|
|
15492
|
+
const helpers = Array.from(ast.helpers);
|
|
15493
|
+
if (helpers.length > 0) {
|
|
15368
15494
|
{
|
|
15369
15495
|
// "with" mode.
|
|
15370
15496
|
// save Vue in a separate variable to avoid collision
|
|
@@ -15380,7 +15506,7 @@ var Vue = (function () {
|
|
|
15380
15506
|
CREATE_TEXT,
|
|
15381
15507
|
CREATE_STATIC
|
|
15382
15508
|
]
|
|
15383
|
-
.filter(helper =>
|
|
15509
|
+
.filter(helper => helpers.includes(helper))
|
|
15384
15510
|
.map(aliasHelper)
|
|
15385
15511
|
.join(', ');
|
|
15386
15512
|
push(`const { ${staticHelpers} } = _Vue\n`);
|
|
@@ -15427,7 +15553,7 @@ var Vue = (function () {
|
|
|
15427
15553
|
}
|
|
15428
15554
|
context.pure = false;
|
|
15429
15555
|
}
|
|
15430
|
-
function isText
|
|
15556
|
+
function isText(n) {
|
|
15431
15557
|
return (isString(n) ||
|
|
15432
15558
|
n.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ||
|
|
15433
15559
|
n.type === 2 /* NodeTypes.TEXT */ ||
|
|
@@ -15436,7 +15562,7 @@ var Vue = (function () {
|
|
|
15436
15562
|
}
|
|
15437
15563
|
function genNodeListAsArray(nodes, context) {
|
|
15438
15564
|
const multilines = nodes.length > 3 ||
|
|
15439
|
-
(nodes.some(n => isArray(n) || !isText
|
|
15565
|
+
(nodes.some(n => isArray(n) || !isText(n)));
|
|
15440
15566
|
context.push(`[`);
|
|
15441
15567
|
multilines && context.indent();
|
|
15442
15568
|
genNodeList(nodes, context, multilines);
|
|
@@ -15776,11 +15902,11 @@ var Vue = (function () {
|
|
|
15776
15902
|
}
|
|
15777
15903
|
|
|
15778
15904
|
// these keywords should not appear inside expressions, but operators like
|
|
15779
|
-
// typeof, instanceof and in are allowed
|
|
15905
|
+
// 'typeof', 'instanceof', and 'in' are allowed
|
|
15780
15906
|
const prohibitedKeywordRE = new RegExp('\\b' +
|
|
15781
|
-
('
|
|
15782
|
-
'
|
|
15783
|
-
'
|
|
15907
|
+
('arguments,await,break,case,catch,class,const,continue,debugger,default,' +
|
|
15908
|
+
'delete,do,else,export,extends,finally,for,function,if,import,let,new,' +
|
|
15909
|
+
'return,super,switch,throw,try,var,void,while,with,yield')
|
|
15784
15910
|
.split(',')
|
|
15785
15911
|
.join('\\b|\\b') +
|
|
15786
15912
|
'\\b');
|
|
@@ -15811,7 +15937,7 @@ var Vue = (function () {
|
|
|
15811
15937
|
if (keywordMatch) {
|
|
15812
15938
|
message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
|
|
15813
15939
|
}
|
|
15814
|
-
context.onError(createCompilerError(
|
|
15940
|
+
context.onError(createCompilerError(45 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
|
|
15815
15941
|
}
|
|
15816
15942
|
}
|
|
15817
15943
|
|
|
@@ -16605,7 +16731,7 @@ var Vue = (function () {
|
|
|
16605
16731
|
// 2. Force keep-alive to always be updated, since it uses raw children.
|
|
16606
16732
|
patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
|
|
16607
16733
|
if (node.children.length > 1) {
|
|
16608
|
-
context.onError(createCompilerError(
|
|
16734
|
+
context.onError(createCompilerError(46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
|
|
16609
16735
|
start: node.children[0].loc.start,
|
|
16610
16736
|
end: node.children[node.children.length - 1].loc.end,
|
|
16611
16737
|
source: ''
|
|
@@ -16678,7 +16804,7 @@ var Vue = (function () {
|
|
|
16678
16804
|
const isProp = findProp(node, 'is');
|
|
16679
16805
|
if (isProp) {
|
|
16680
16806
|
if (isExplicitDynamic ||
|
|
16681
|
-
(isCompatEnabled
|
|
16807
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))) {
|
|
16682
16808
|
const exp = isProp.type === 6 /* NodeTypes.ATTRIBUTE */
|
|
16683
16809
|
? isProp.value && createSimpleExpression(isProp.value.content, true)
|
|
16684
16810
|
: isProp.exp;
|
|
@@ -16806,7 +16932,7 @@ var Vue = (function () {
|
|
|
16806
16932
|
if (name === 'is' &&
|
|
16807
16933
|
(isComponentTag(tag) ||
|
|
16808
16934
|
(value && value.content.startsWith('vue:')) ||
|
|
16809
|
-
(isCompatEnabled
|
|
16935
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context)))) {
|
|
16810
16936
|
continue;
|
|
16811
16937
|
}
|
|
16812
16938
|
properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc)));
|
|
@@ -16832,7 +16958,7 @@ var Vue = (function () {
|
|
|
16832
16958
|
(isVBind &&
|
|
16833
16959
|
isStaticArgOf(arg, 'is') &&
|
|
16834
16960
|
(isComponentTag(tag) ||
|
|
16835
|
-
(isCompatEnabled
|
|
16961
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))))) {
|
|
16836
16962
|
continue;
|
|
16837
16963
|
}
|
|
16838
16964
|
// skip v-on in SSR compilation
|
|
@@ -16878,10 +17004,10 @@ var Vue = (function () {
|
|
|
16878
17004
|
}
|
|
16879
17005
|
});
|
|
16880
17006
|
if (hasOverridableKeys) {
|
|
16881
|
-
checkCompatEnabled
|
|
17007
|
+
checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context, loc);
|
|
16882
17008
|
}
|
|
16883
17009
|
}
|
|
16884
|
-
if (isCompatEnabled
|
|
17010
|
+
if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context)) {
|
|
16885
17011
|
mergeArgs.unshift(exp);
|
|
16886
17012
|
continue;
|
|
16887
17013
|
}
|
|
@@ -17061,7 +17187,7 @@ var Vue = (function () {
|
|
|
17061
17187
|
const existing = knownProps.get(name);
|
|
17062
17188
|
if (existing) {
|
|
17063
17189
|
if (name === 'style' || name === 'class' || isOn(name)) {
|
|
17064
|
-
mergeAsArray
|
|
17190
|
+
mergeAsArray(existing, prop);
|
|
17065
17191
|
}
|
|
17066
17192
|
// unexpected duplicate, should have emitted error during parse
|
|
17067
17193
|
}
|
|
@@ -17072,7 +17198,7 @@ var Vue = (function () {
|
|
|
17072
17198
|
}
|
|
17073
17199
|
return deduped;
|
|
17074
17200
|
}
|
|
17075
|
-
function mergeAsArray
|
|
17201
|
+
function mergeAsArray(existing, incoming) {
|
|
17076
17202
|
if (existing.value.type === 17 /* NodeTypes.JS_ARRAY_EXPRESSION */) {
|
|
17077
17203
|
existing.value.elements.push(incoming.value);
|
|
17078
17204
|
}
|
|
@@ -17200,7 +17326,7 @@ var Vue = (function () {
|
|
|
17200
17326
|
}
|
|
17201
17327
|
|
|
17202
17328
|
const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
17203
|
-
const transformOn = (dir, node, context, augmentor) => {
|
|
17329
|
+
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
17204
17330
|
const { loc, modifiers, arg } = dir;
|
|
17205
17331
|
if (!dir.exp && !modifiers.length) {
|
|
17206
17332
|
context.onError(createCompilerError(35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */, loc));
|
|
@@ -17360,11 +17486,11 @@ var Vue = (function () {
|
|
|
17360
17486
|
let hasText = false;
|
|
17361
17487
|
for (let i = 0; i < children.length; i++) {
|
|
17362
17488
|
const child = children[i];
|
|
17363
|
-
if (isText(child)) {
|
|
17489
|
+
if (isText$1(child)) {
|
|
17364
17490
|
hasText = true;
|
|
17365
17491
|
for (let j = i + 1; j < children.length; j++) {
|
|
17366
17492
|
const next = children[j];
|
|
17367
|
-
if (isText(next)) {
|
|
17493
|
+
if (isText$1(next)) {
|
|
17368
17494
|
if (!currentContainer) {
|
|
17369
17495
|
currentContainer = children[i] = createCompoundExpression([child], child.loc);
|
|
17370
17496
|
}
|
|
@@ -17406,7 +17532,7 @@ var Vue = (function () {
|
|
|
17406
17532
|
// runtime normalization.
|
|
17407
17533
|
for (let i = 0; i < children.length; i++) {
|
|
17408
17534
|
const child = children[i];
|
|
17409
|
-
if (isText(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
17535
|
+
if (isText$1(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
17410
17536
|
const callArgs = [];
|
|
17411
17537
|
// createTextVNode defaults to single whitespace, so if it is a
|
|
17412
17538
|
// single space the code could be an empty call to save bytes.
|
|
@@ -17431,13 +17557,13 @@ var Vue = (function () {
|
|
|
17431
17557
|
}
|
|
17432
17558
|
};
|
|
17433
17559
|
|
|
17434
|
-
const seen = new WeakSet();
|
|
17560
|
+
const seen$1 = new WeakSet();
|
|
17435
17561
|
const transformOnce = (node, context) => {
|
|
17436
17562
|
if (node.type === 1 /* NodeTypes.ELEMENT */ && findDir(node, 'once', true)) {
|
|
17437
|
-
if (seen.has(node) || context.inVOnce) {
|
|
17563
|
+
if (seen$1.has(node) || context.inVOnce) {
|
|
17438
17564
|
return;
|
|
17439
17565
|
}
|
|
17440
|
-
seen.add(node);
|
|
17566
|
+
seen$1.add(node);
|
|
17441
17567
|
context.inVOnce = true;
|
|
17442
17568
|
context.helper(SET_BLOCK_TRACKING);
|
|
17443
17569
|
return () => {
|
|
@@ -17450,7 +17576,7 @@ var Vue = (function () {
|
|
|
17450
17576
|
}
|
|
17451
17577
|
};
|
|
17452
17578
|
|
|
17453
|
-
const transformModel = (dir, node, context) => {
|
|
17579
|
+
const transformModel$1 = (dir, node, context) => {
|
|
17454
17580
|
const { exp, arg } = dir;
|
|
17455
17581
|
if (!exp) {
|
|
17456
17582
|
context.onError(createCompilerError(41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */, dir.loc));
|
|
@@ -17460,8 +17586,14 @@ var Vue = (function () {
|
|
|
17460
17586
|
const expString = exp.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ? exp.content : rawExp;
|
|
17461
17587
|
// im SFC <script setup> inline mode, the exp may have been transformed into
|
|
17462
17588
|
// _unref(exp)
|
|
17463
|
-
context.bindingMetadata[rawExp];
|
|
17464
|
-
|
|
17589
|
+
const bindingType = context.bindingMetadata[rawExp];
|
|
17590
|
+
// check props
|
|
17591
|
+
if (bindingType === "props" /* BindingTypes.PROPS */ ||
|
|
17592
|
+
bindingType === "props-aliased" /* BindingTypes.PROPS_ALIASED */) {
|
|
17593
|
+
context.onError(createCompilerError(44 /* ErrorCodes.X_V_MODEL_ON_PROPS */, exp.loc));
|
|
17594
|
+
return createTransformProps();
|
|
17595
|
+
}
|
|
17596
|
+
const maybeRef = !true ;
|
|
17465
17597
|
if (!expString.trim() ||
|
|
17466
17598
|
(!isMemberExpression(expString) && !maybeRef)) {
|
|
17467
17599
|
context.onError(createCompilerError(42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
|
|
@@ -17470,7 +17602,7 @@ var Vue = (function () {
|
|
|
17470
17602
|
const propName = arg ? arg : createSimpleExpression('modelValue', true);
|
|
17471
17603
|
const eventName = arg
|
|
17472
17604
|
? isStaticExp(arg)
|
|
17473
|
-
? `onUpdate:${arg.content}`
|
|
17605
|
+
? `onUpdate:${camelize(arg.content)}`
|
|
17474
17606
|
: createCompoundExpression(['"onUpdate:" + ', arg])
|
|
17475
17607
|
: `onUpdate:modelValue`;
|
|
17476
17608
|
let assignmentExp;
|
|
@@ -17508,7 +17640,7 @@ var Vue = (function () {
|
|
|
17508
17640
|
|
|
17509
17641
|
const validDivisionCharRE = /[\w).+\-_$\]]/;
|
|
17510
17642
|
const transformFilter = (node, context) => {
|
|
17511
|
-
if (!isCompatEnabled
|
|
17643
|
+
if (!isCompatEnabled("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context)) {
|
|
17512
17644
|
return;
|
|
17513
17645
|
}
|
|
17514
17646
|
if (node.type === 5 /* NodeTypes.INTERPOLATION */) {
|
|
@@ -17649,7 +17781,7 @@ var Vue = (function () {
|
|
|
17649
17781
|
lastFilterIndex = i + 1;
|
|
17650
17782
|
}
|
|
17651
17783
|
if (filters.length) {
|
|
17652
|
-
warnDeprecation
|
|
17784
|
+
warnDeprecation("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context, node.loc);
|
|
17653
17785
|
for (i = 0; i < filters.length; i++) {
|
|
17654
17786
|
expression = wrapFilter(expression, filters[i], context);
|
|
17655
17787
|
}
|
|
@@ -17671,14 +17803,14 @@ var Vue = (function () {
|
|
|
17671
17803
|
}
|
|
17672
17804
|
}
|
|
17673
17805
|
|
|
17674
|
-
const seen
|
|
17806
|
+
const seen = new WeakSet();
|
|
17675
17807
|
const transformMemo = (node, context) => {
|
|
17676
17808
|
if (node.type === 1 /* NodeTypes.ELEMENT */) {
|
|
17677
17809
|
const dir = findDir(node, 'memo');
|
|
17678
|
-
if (!dir || seen
|
|
17810
|
+
if (!dir || seen.has(node)) {
|
|
17679
17811
|
return;
|
|
17680
17812
|
}
|
|
17681
|
-
seen
|
|
17813
|
+
seen.add(node);
|
|
17682
17814
|
return () => {
|
|
17683
17815
|
const codegenNode = node.codegenNode ||
|
|
17684
17816
|
context.currentNode.codegenNode;
|
|
@@ -17714,9 +17846,9 @@ var Vue = (function () {
|
|
|
17714
17846
|
transformText
|
|
17715
17847
|
],
|
|
17716
17848
|
{
|
|
17717
|
-
on: transformOn,
|
|
17849
|
+
on: transformOn$1,
|
|
17718
17850
|
bind: transformBind,
|
|
17719
|
-
model: transformModel
|
|
17851
|
+
model: transformModel$1
|
|
17720
17852
|
}
|
|
17721
17853
|
];
|
|
17722
17854
|
}
|
|
@@ -17728,18 +17860,18 @@ var Vue = (function () {
|
|
|
17728
17860
|
/* istanbul ignore if */
|
|
17729
17861
|
{
|
|
17730
17862
|
if (options.prefixIdentifiers === true) {
|
|
17731
|
-
onError(createCompilerError(
|
|
17863
|
+
onError(createCompilerError(47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
|
|
17732
17864
|
}
|
|
17733
17865
|
else if (isModuleMode) {
|
|
17734
|
-
onError(createCompilerError(
|
|
17866
|
+
onError(createCompilerError(48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
|
|
17735
17867
|
}
|
|
17736
17868
|
}
|
|
17737
17869
|
const prefixIdentifiers = !true ;
|
|
17738
17870
|
if (options.cacheHandlers) {
|
|
17739
|
-
onError(createCompilerError(
|
|
17871
|
+
onError(createCompilerError(49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
|
|
17740
17872
|
}
|
|
17741
17873
|
if (options.scopeId && !isModuleMode) {
|
|
17742
|
-
onError(createCompilerError(
|
|
17874
|
+
onError(createCompilerError(50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
|
|
17743
17875
|
}
|
|
17744
17876
|
const ast = isString(template) ? baseParse(template, options) : template;
|
|
17745
17877
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|
|
@@ -17767,7 +17899,7 @@ var Vue = (function () {
|
|
|
17767
17899
|
const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` );
|
|
17768
17900
|
const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` );
|
|
17769
17901
|
const V_SHOW = Symbol(`vShow` );
|
|
17770
|
-
const TRANSITION
|
|
17902
|
+
const TRANSITION = Symbol(`Transition` );
|
|
17771
17903
|
const TRANSITION_GROUP = Symbol(`TransitionGroup` );
|
|
17772
17904
|
registerRuntimeHelpers({
|
|
17773
17905
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
@@ -17778,7 +17910,7 @@ var Vue = (function () {
|
|
|
17778
17910
|
[V_ON_WITH_MODIFIERS]: `withModifiers`,
|
|
17779
17911
|
[V_ON_WITH_KEYS]: `withKeys`,
|
|
17780
17912
|
[V_SHOW]: `vShow`,
|
|
17781
|
-
[TRANSITION
|
|
17913
|
+
[TRANSITION]: `Transition`,
|
|
17782
17914
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
17783
17915
|
});
|
|
17784
17916
|
|
|
@@ -17806,7 +17938,7 @@ var Vue = (function () {
|
|
|
17806
17938
|
decodeEntities: decodeHtmlBrowser ,
|
|
17807
17939
|
isBuiltInComponent: (tag) => {
|
|
17808
17940
|
if (isBuiltInType(tag, `Transition`)) {
|
|
17809
|
-
return TRANSITION
|
|
17941
|
+
return TRANSITION;
|
|
17810
17942
|
}
|
|
17811
17943
|
else if (isBuiltInType(tag, `TransitionGroup`)) {
|
|
17812
17944
|
return TRANSITION_GROUP;
|
|
@@ -17897,26 +18029,26 @@ var Vue = (function () {
|
|
|
17897
18029
|
return createCompilerError(code, loc, DOMErrorMessages );
|
|
17898
18030
|
}
|
|
17899
18031
|
const DOMErrorMessages = {
|
|
17900
|
-
[
|
|
17901
|
-
[
|
|
17902
|
-
[
|
|
17903
|
-
[
|
|
17904
|
-
[
|
|
17905
|
-
[
|
|
17906
|
-
[
|
|
17907
|
-
[
|
|
17908
|
-
[
|
|
17909
|
-
[
|
|
17910
|
-
[
|
|
18032
|
+
[51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
|
|
18033
|
+
[52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
|
|
18034
|
+
[53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
|
|
18035
|
+
[54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
|
|
18036
|
+
[55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
18037
|
+
[56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
|
|
18038
|
+
[57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
18039
|
+
[58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
18040
|
+
[59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
|
|
18041
|
+
[60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
|
|
18042
|
+
[61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
|
|
17911
18043
|
};
|
|
17912
18044
|
|
|
17913
18045
|
const transformVHtml = (dir, node, context) => {
|
|
17914
18046
|
const { exp, loc } = dir;
|
|
17915
18047
|
if (!exp) {
|
|
17916
|
-
context.onError(createDOMCompilerError(
|
|
18048
|
+
context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
|
|
17917
18049
|
}
|
|
17918
18050
|
if (node.children.length) {
|
|
17919
|
-
context.onError(createDOMCompilerError(
|
|
18051
|
+
context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
|
|
17920
18052
|
node.children.length = 0;
|
|
17921
18053
|
}
|
|
17922
18054
|
return {
|
|
@@ -17929,10 +18061,10 @@ var Vue = (function () {
|
|
|
17929
18061
|
const transformVText = (dir, node, context) => {
|
|
17930
18062
|
const { exp, loc } = dir;
|
|
17931
18063
|
if (!exp) {
|
|
17932
|
-
context.onError(createDOMCompilerError(
|
|
18064
|
+
context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
|
|
17933
18065
|
}
|
|
17934
18066
|
if (node.children.length) {
|
|
17935
|
-
context.onError(createDOMCompilerError(
|
|
18067
|
+
context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
|
|
17936
18068
|
node.children.length = 0;
|
|
17937
18069
|
}
|
|
17938
18070
|
return {
|
|
@@ -17946,19 +18078,19 @@ var Vue = (function () {
|
|
|
17946
18078
|
};
|
|
17947
18079
|
};
|
|
17948
18080
|
|
|
17949
|
-
const transformModel
|
|
17950
|
-
const baseResult = transformModel(dir, node, context);
|
|
18081
|
+
const transformModel = (dir, node, context) => {
|
|
18082
|
+
const baseResult = transformModel$1(dir, node, context);
|
|
17951
18083
|
// base transform has errors OR component v-model (only need props)
|
|
17952
18084
|
if (!baseResult.props.length || node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
17953
18085
|
return baseResult;
|
|
17954
18086
|
}
|
|
17955
18087
|
if (dir.arg) {
|
|
17956
|
-
context.onError(createDOMCompilerError(
|
|
18088
|
+
context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
|
|
17957
18089
|
}
|
|
17958
18090
|
function checkDuplicatedValue() {
|
|
17959
18091
|
const value = findProp(node, 'value');
|
|
17960
18092
|
if (value) {
|
|
17961
|
-
context.onError(createDOMCompilerError(
|
|
18093
|
+
context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
|
|
17962
18094
|
}
|
|
17963
18095
|
}
|
|
17964
18096
|
const { tag } = node;
|
|
@@ -17986,7 +18118,7 @@ var Vue = (function () {
|
|
|
17986
18118
|
break;
|
|
17987
18119
|
case 'file':
|
|
17988
18120
|
isInvalidType = true;
|
|
17989
|
-
context.onError(createDOMCompilerError(
|
|
18121
|
+
context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
|
|
17990
18122
|
break;
|
|
17991
18123
|
default:
|
|
17992
18124
|
// text type
|
|
@@ -18020,7 +18152,7 @@ var Vue = (function () {
|
|
|
18020
18152
|
}
|
|
18021
18153
|
}
|
|
18022
18154
|
else {
|
|
18023
|
-
context.onError(createDOMCompilerError(
|
|
18155
|
+
context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
|
|
18024
18156
|
}
|
|
18025
18157
|
// native vmodel doesn't need the `modelValue` props since they are also
|
|
18026
18158
|
// passed to the runtime as `binding.value`. removing it reduces code size.
|
|
@@ -18047,7 +18179,7 @@ var Vue = (function () {
|
|
|
18047
18179
|
for (let i = 0; i < modifiers.length; i++) {
|
|
18048
18180
|
const modifier = modifiers[i];
|
|
18049
18181
|
if (modifier === 'native' &&
|
|
18050
|
-
checkCompatEnabled
|
|
18182
|
+
checkCompatEnabled("COMPILER_V_ON_NATIVE" /* CompilerDeprecationTypes.COMPILER_V_ON_NATIVE */, context, loc)) {
|
|
18051
18183
|
eventOptionModifiers.push(modifier);
|
|
18052
18184
|
}
|
|
18053
18185
|
else if (isEventOptionModifier(modifier)) {
|
|
@@ -18101,8 +18233,8 @@ var Vue = (function () {
|
|
|
18101
18233
|
])
|
|
18102
18234
|
: key;
|
|
18103
18235
|
};
|
|
18104
|
-
const transformOn
|
|
18105
|
-
return transformOn(dir, node, context, baseResult => {
|
|
18236
|
+
const transformOn = (dir, node, context) => {
|
|
18237
|
+
return transformOn$1(dir, node, context, baseResult => {
|
|
18106
18238
|
const { modifiers } = dir;
|
|
18107
18239
|
if (!modifiers.length)
|
|
18108
18240
|
return baseResult;
|
|
@@ -18144,7 +18276,7 @@ var Vue = (function () {
|
|
|
18144
18276
|
const transformShow = (dir, node, context) => {
|
|
18145
18277
|
const { exp, loc } = dir;
|
|
18146
18278
|
if (!exp) {
|
|
18147
|
-
context.onError(createDOMCompilerError(
|
|
18279
|
+
context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
|
|
18148
18280
|
}
|
|
18149
18281
|
return {
|
|
18150
18282
|
props: [],
|
|
@@ -18156,14 +18288,14 @@ var Vue = (function () {
|
|
|
18156
18288
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
18157
18289
|
node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
18158
18290
|
const component = context.isBuiltInComponent(node.tag);
|
|
18159
|
-
if (component === TRANSITION
|
|
18291
|
+
if (component === TRANSITION) {
|
|
18160
18292
|
return () => {
|
|
18161
18293
|
if (!node.children.length) {
|
|
18162
18294
|
return;
|
|
18163
18295
|
}
|
|
18164
18296
|
// warn multiple transition children
|
|
18165
18297
|
if (hasMultipleChildren(node)) {
|
|
18166
|
-
context.onError(createDOMCompilerError(
|
|
18298
|
+
context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
|
|
18167
18299
|
start: node.children[0].loc.start,
|
|
18168
18300
|
end: node.children[node.children.length - 1].loc.end,
|
|
18169
18301
|
source: ''
|
|
@@ -18202,7 +18334,7 @@ var Vue = (function () {
|
|
|
18202
18334
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
18203
18335
|
node.tagType === 0 /* ElementTypes.ELEMENT */ &&
|
|
18204
18336
|
(node.tag === 'script' || node.tag === 'style')) {
|
|
18205
|
-
context.onError(createDOMCompilerError(
|
|
18337
|
+
context.onError(createDOMCompilerError(61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
|
|
18206
18338
|
context.removeNode();
|
|
18207
18339
|
}
|
|
18208
18340
|
};
|
|
@@ -18215,11 +18347,11 @@ var Vue = (function () {
|
|
|
18215
18347
|
cloak: noopDirectiveTransform,
|
|
18216
18348
|
html: transformVHtml,
|
|
18217
18349
|
text: transformVText,
|
|
18218
|
-
model: transformModel
|
|
18219
|
-
on: transformOn
|
|
18350
|
+
model: transformModel,
|
|
18351
|
+
on: transformOn,
|
|
18220
18352
|
show: transformShow
|
|
18221
18353
|
};
|
|
18222
|
-
function compile
|
|
18354
|
+
function compile(template, options = {}) {
|
|
18223
18355
|
return baseCompile(template, extend({}, parserOptions, options, {
|
|
18224
18356
|
nodeTransforms: [
|
|
18225
18357
|
// ignore <script> and <tag>
|
|
@@ -18242,7 +18374,7 @@ var Vue = (function () {
|
|
|
18242
18374
|
template = template.innerHTML;
|
|
18243
18375
|
}
|
|
18244
18376
|
else {
|
|
18245
|
-
warn
|
|
18377
|
+
warn(`invalid template option: `, template);
|
|
18246
18378
|
return NOOP;
|
|
18247
18379
|
}
|
|
18248
18380
|
}
|
|
@@ -18254,7 +18386,7 @@ var Vue = (function () {
|
|
|
18254
18386
|
if (template[0] === '#') {
|
|
18255
18387
|
const el = document.querySelector(template);
|
|
18256
18388
|
if (!el) {
|
|
18257
|
-
warn
|
|
18389
|
+
warn(`Template element not found or is empty: ${template}`);
|
|
18258
18390
|
}
|
|
18259
18391
|
// __UNSAFE__
|
|
18260
18392
|
// Reason: potential execution of JS expressions in in-DOM template.
|
|
@@ -18263,9 +18395,9 @@ var Vue = (function () {
|
|
|
18263
18395
|
template = el ? el.innerHTML : ``;
|
|
18264
18396
|
}
|
|
18265
18397
|
if ((!options || !options.whitespace)) {
|
|
18266
|
-
warnDeprecation("CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */, null);
|
|
18398
|
+
warnDeprecation$1("CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */, null);
|
|
18267
18399
|
}
|
|
18268
|
-
const { code } = compile
|
|
18400
|
+
const { code } = compile(template, extend({
|
|
18269
18401
|
hoistStatic: true,
|
|
18270
18402
|
whitespace: 'preserve',
|
|
18271
18403
|
onError: onError ,
|
|
@@ -18277,7 +18409,7 @@ var Vue = (function () {
|
|
|
18277
18409
|
: `Template compilation error: ${err.message}`;
|
|
18278
18410
|
const codeFrame = err.loc &&
|
|
18279
18411
|
generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
|
|
18280
|
-
warn
|
|
18412
|
+
warn(codeFrame ? `${message}\n${codeFrame}` : message);
|
|
18281
18413
|
}
|
|
18282
18414
|
// The wildcard import results in a huge object with every export
|
|
18283
18415
|
// with keys that cannot be mangled, and can be quite heavy size-wise.
|
|
@@ -18288,9 +18420,9 @@ var Vue = (function () {
|
|
|
18288
18420
|
return (compileCache[key] = render);
|
|
18289
18421
|
}
|
|
18290
18422
|
registerRuntimeCompiler(compileToFunction);
|
|
18291
|
-
const Vue = createCompatVue
|
|
18423
|
+
const Vue = createCompatVue();
|
|
18292
18424
|
Vue.compile = compileToFunction;
|
|
18293
18425
|
|
|
18294
18426
|
return Vue;
|
|
18295
18427
|
|
|
18296
|
-
}()
|
|
18428
|
+
})();
|