vue 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 +7 -10
- package/dist/vue.cjs.prod.js +7 -10
- package/dist/vue.esm-browser.js +649 -521
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +532 -405
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +411 -296
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +414 -299
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +12 -12
package/dist/vue.global.js
CHANGED
|
@@ -172,7 +172,7 @@ var Vue = (function (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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 (exports) {
|
|
|
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
|
|
@@ -2148,9 +2190,10 @@ var Vue = (function (exports) {
|
|
|
2148
2190
|
};
|
|
2149
2191
|
}
|
|
2150
2192
|
|
|
2193
|
+
exports.devtools = void 0;
|
|
2151
2194
|
let buffer = [];
|
|
2152
2195
|
let devtoolsNotInstalled = false;
|
|
2153
|
-
function emit(event, ...args) {
|
|
2196
|
+
function emit$1(event, ...args) {
|
|
2154
2197
|
if (exports.devtools) {
|
|
2155
2198
|
exports.devtools.emit(event, ...args);
|
|
2156
2199
|
}
|
|
@@ -2197,7 +2240,7 @@ var Vue = (function (exports) {
|
|
|
2197
2240
|
}
|
|
2198
2241
|
}
|
|
2199
2242
|
function devtoolsInitApp(app, version) {
|
|
2200
|
-
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2243
|
+
emit$1("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2201
2244
|
Fragment,
|
|
2202
2245
|
Text,
|
|
2203
2246
|
Comment,
|
|
@@ -2205,7 +2248,7 @@ var Vue = (function (exports) {
|
|
|
2205
2248
|
});
|
|
2206
2249
|
}
|
|
2207
2250
|
function devtoolsUnmountApp(app) {
|
|
2208
|
-
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2251
|
+
emit$1("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2209
2252
|
}
|
|
2210
2253
|
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2211
2254
|
const devtoolsComponentUpdated =
|
|
@@ -2221,21 +2264,21 @@ var Vue = (function (exports) {
|
|
|
2221
2264
|
};
|
|
2222
2265
|
function createDevtoolsComponentHook(hook) {
|
|
2223
2266
|
return (component) => {
|
|
2224
|
-
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2267
|
+
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2225
2268
|
};
|
|
2226
2269
|
}
|
|
2227
2270
|
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2228
2271
|
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2229
2272
|
function createDevtoolsPerformanceHook(hook) {
|
|
2230
2273
|
return (component, type, time) => {
|
|
2231
|
-
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2274
|
+
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
2232
2275
|
};
|
|
2233
2276
|
}
|
|
2234
2277
|
function devtoolsComponentEmit(component, event, params) {
|
|
2235
|
-
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2278
|
+
emit$1("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2236
2279
|
}
|
|
2237
2280
|
|
|
2238
|
-
function emit
|
|
2281
|
+
function emit(instance, event, ...rawArgs) {
|
|
2239
2282
|
if (instance.isUnmounted)
|
|
2240
2283
|
return;
|
|
2241
2284
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
@@ -2245,7 +2288,7 @@ var Vue = (function (exports) {
|
|
|
2245
2288
|
if (!(event in emitsOptions) &&
|
|
2246
2289
|
!(false )) {
|
|
2247
2290
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
2248
|
-
warn
|
|
2291
|
+
warn(`Component emitted event "${event}" but it is neither declared in ` +
|
|
2249
2292
|
`the emits option nor as an "${toHandlerKey(event)}" prop.`);
|
|
2250
2293
|
}
|
|
2251
2294
|
}
|
|
@@ -2254,7 +2297,7 @@ var Vue = (function (exports) {
|
|
|
2254
2297
|
if (isFunction(validator)) {
|
|
2255
2298
|
const isValid = validator(...rawArgs);
|
|
2256
2299
|
if (!isValid) {
|
|
2257
|
-
warn
|
|
2300
|
+
warn(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
2258
2301
|
}
|
|
2259
2302
|
}
|
|
2260
2303
|
}
|
|
@@ -2271,7 +2314,7 @@ var Vue = (function (exports) {
|
|
|
2271
2314
|
args = rawArgs.map(a => (isString(a) ? a.trim() : a));
|
|
2272
2315
|
}
|
|
2273
2316
|
if (number) {
|
|
2274
|
-
args = rawArgs.map(
|
|
2317
|
+
args = rawArgs.map(looseToNumber);
|
|
2275
2318
|
}
|
|
2276
2319
|
}
|
|
2277
2320
|
{
|
|
@@ -2280,7 +2323,7 @@ var Vue = (function (exports) {
|
|
|
2280
2323
|
{
|
|
2281
2324
|
const lowerCaseEvent = event.toLowerCase();
|
|
2282
2325
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
2283
|
-
warn
|
|
2326
|
+
warn(`Event "${lowerCaseEvent}" is emitted in component ` +
|
|
2284
2327
|
`${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
|
|
2285
2328
|
`Note that HTML attributes are case-insensitive and you cannot use ` +
|
|
2286
2329
|
`v-on to listen to camelCase events when using in-DOM templates. ` +
|
|
@@ -2555,13 +2598,13 @@ var Vue = (function (exports) {
|
|
|
2555
2598
|
}
|
|
2556
2599
|
}
|
|
2557
2600
|
if (extraAttrs.length) {
|
|
2558
|
-
warn
|
|
2601
|
+
warn(`Extraneous non-props attributes (` +
|
|
2559
2602
|
`${extraAttrs.join(', ')}) ` +
|
|
2560
2603
|
`were passed to component but could not be automatically inherited ` +
|
|
2561
2604
|
`because component renders fragment or text root nodes.`);
|
|
2562
2605
|
}
|
|
2563
2606
|
if (eventAttrs.length) {
|
|
2564
|
-
warn
|
|
2607
|
+
warn(`Extraneous non-emits event listeners (` +
|
|
2565
2608
|
`${eventAttrs.join(', ')}) ` +
|
|
2566
2609
|
`were passed to component but could not be automatically inherited ` +
|
|
2567
2610
|
`because component renders fragment or text root nodes. ` +
|
|
@@ -2574,7 +2617,7 @@ var Vue = (function (exports) {
|
|
|
2574
2617
|
// inherit directives
|
|
2575
2618
|
if (vnode.dirs) {
|
|
2576
2619
|
if (!isElementRoot(root)) {
|
|
2577
|
-
warn
|
|
2620
|
+
warn(`Runtime directive used on component with non-element root node. ` +
|
|
2578
2621
|
`The directives will not function as intended.`);
|
|
2579
2622
|
}
|
|
2580
2623
|
// clone before mutating since the root may be a hoisted vnode
|
|
@@ -2584,7 +2627,7 @@ var Vue = (function (exports) {
|
|
|
2584
2627
|
// inherit transition data
|
|
2585
2628
|
if (vnode.transition) {
|
|
2586
2629
|
if (!isElementRoot(root)) {
|
|
2587
|
-
warn
|
|
2630
|
+
warn(`Component inside <Transition> renders non-element root node ` +
|
|
2588
2631
|
`that cannot be animated.`);
|
|
2589
2632
|
}
|
|
2590
2633
|
root.transition = vnode.transition;
|
|
@@ -2919,7 +2962,10 @@ var Vue = (function (exports) {
|
|
|
2919
2962
|
console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
|
|
2920
2963
|
}
|
|
2921
2964
|
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
2922
|
-
const timeout =
|
|
2965
|
+
const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
|
|
2966
|
+
{
|
|
2967
|
+
assertNumber(timeout, `Suspense timeout`);
|
|
2968
|
+
}
|
|
2923
2969
|
const suspense = {
|
|
2924
2970
|
vnode,
|
|
2925
2971
|
parent,
|
|
@@ -3147,7 +3193,7 @@ var Vue = (function (exports) {
|
|
|
3147
3193
|
if (isArray(s)) {
|
|
3148
3194
|
const singleChild = filterSingleRoot(s);
|
|
3149
3195
|
if (!singleChild) {
|
|
3150
|
-
warn
|
|
3196
|
+
warn(`<Suspense> slots expect a single root node.`);
|
|
3151
3197
|
}
|
|
3152
3198
|
s = singleChild;
|
|
3153
3199
|
}
|
|
@@ -3185,7 +3231,7 @@ var Vue = (function (exports) {
|
|
|
3185
3231
|
function provide(key, value) {
|
|
3186
3232
|
if (!currentInstance) {
|
|
3187
3233
|
{
|
|
3188
|
-
warn
|
|
3234
|
+
warn(`provide() can only be used inside setup().`);
|
|
3189
3235
|
}
|
|
3190
3236
|
}
|
|
3191
3237
|
else {
|
|
@@ -3224,11 +3270,11 @@ var Vue = (function (exports) {
|
|
|
3224
3270
|
: defaultValue;
|
|
3225
3271
|
}
|
|
3226
3272
|
else {
|
|
3227
|
-
warn
|
|
3273
|
+
warn(`injection "${String(key)}" not found.`);
|
|
3228
3274
|
}
|
|
3229
3275
|
}
|
|
3230
3276
|
else {
|
|
3231
|
-
warn
|
|
3277
|
+
warn(`inject() can only be used inside setup() or functional components.`);
|
|
3232
3278
|
}
|
|
3233
3279
|
}
|
|
3234
3280
|
|
|
@@ -3237,17 +3283,17 @@ var Vue = (function (exports) {
|
|
|
3237
3283
|
return doWatch(effect, null, options);
|
|
3238
3284
|
}
|
|
3239
3285
|
function watchPostEffect(effect, options) {
|
|
3240
|
-
return doWatch(effect, null,
|
|
3286
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
|
|
3241
3287
|
}
|
|
3242
3288
|
function watchSyncEffect(effect, options) {
|
|
3243
|
-
return doWatch(effect, null,
|
|
3289
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
|
|
3244
3290
|
}
|
|
3245
3291
|
// initial value for watchers to trigger on undefined initial values
|
|
3246
3292
|
const INITIAL_WATCHER_VALUE = {};
|
|
3247
3293
|
// implementation
|
|
3248
3294
|
function watch(source, cb, options) {
|
|
3249
3295
|
if (!isFunction(cb)) {
|
|
3250
|
-
warn
|
|
3296
|
+
warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
|
|
3251
3297
|
`Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
|
|
3252
3298
|
`supports \`watch(source, cb, options?) signature.`);
|
|
3253
3299
|
}
|
|
@@ -3256,19 +3302,20 @@ var Vue = (function (exports) {
|
|
|
3256
3302
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
3257
3303
|
if (!cb) {
|
|
3258
3304
|
if (immediate !== undefined) {
|
|
3259
|
-
warn
|
|
3305
|
+
warn(`watch() "immediate" option is only respected when using the ` +
|
|
3260
3306
|
`watch(source, callback, options?) signature.`);
|
|
3261
3307
|
}
|
|
3262
3308
|
if (deep !== undefined) {
|
|
3263
|
-
warn
|
|
3309
|
+
warn(`watch() "deep" option is only respected when using the ` +
|
|
3264
3310
|
`watch(source, callback, options?) signature.`);
|
|
3265
3311
|
}
|
|
3266
3312
|
}
|
|
3267
3313
|
const warnInvalidSource = (s) => {
|
|
3268
|
-
warn
|
|
3314
|
+
warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
|
|
3269
3315
|
`a reactive object, or an array of these types.`);
|
|
3270
3316
|
};
|
|
3271
|
-
const instance = currentInstance;
|
|
3317
|
+
const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
|
|
3318
|
+
// const instance = currentInstance
|
|
3272
3319
|
let getter;
|
|
3273
3320
|
let forceTrigger = false;
|
|
3274
3321
|
let isMultiSource = false;
|
|
@@ -3355,7 +3402,7 @@ var Vue = (function (exports) {
|
|
|
3355
3402
|
// pass undefined as the old value when it's changed for the first time
|
|
3356
3403
|
oldValue === INITIAL_WATCHER_VALUE
|
|
3357
3404
|
? undefined
|
|
3358
|
-
:
|
|
3405
|
+
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
|
|
3359
3406
|
? []
|
|
3360
3407
|
: oldValue,
|
|
3361
3408
|
onCleanup
|
|
@@ -3535,7 +3582,7 @@ var Vue = (function (exports) {
|
|
|
3535
3582
|
if (c.type !== Comment) {
|
|
3536
3583
|
if (hasFound) {
|
|
3537
3584
|
// warn more than one non-comment child
|
|
3538
|
-
warn
|
|
3585
|
+
warn('<transition> can only be used on a single element or component. ' +
|
|
3539
3586
|
'Use <transition-group> for lists.');
|
|
3540
3587
|
break;
|
|
3541
3588
|
}
|
|
@@ -3553,7 +3600,7 @@ var Vue = (function (exports) {
|
|
|
3553
3600
|
mode !== 'in-out' &&
|
|
3554
3601
|
mode !== 'out-in' &&
|
|
3555
3602
|
mode !== 'default') {
|
|
3556
|
-
warn
|
|
3603
|
+
warn(`invalid <transition> mode: ${mode}`);
|
|
3557
3604
|
}
|
|
3558
3605
|
if (state.isLeaving) {
|
|
3559
3606
|
return emptyPlaceholder(child);
|
|
@@ -3861,7 +3908,7 @@ var Vue = (function (exports) {
|
|
|
3861
3908
|
return pendingRequest;
|
|
3862
3909
|
}
|
|
3863
3910
|
if (!comp) {
|
|
3864
|
-
warn
|
|
3911
|
+
warn(`Async component loader resolved to undefined. ` +
|
|
3865
3912
|
`If you are using retry(), make sure to return its return value.`);
|
|
3866
3913
|
}
|
|
3867
3914
|
// interop module default
|
|
@@ -3954,10 +4001,15 @@ var Vue = (function (exports) {
|
|
|
3954
4001
|
}
|
|
3955
4002
|
});
|
|
3956
4003
|
}
|
|
3957
|
-
function createInnerComp(comp,
|
|
4004
|
+
function createInnerComp(comp, parent) {
|
|
4005
|
+
const { ref, props, children, ce } = parent.vnode;
|
|
3958
4006
|
const vnode = createVNode(comp, props, children);
|
|
3959
4007
|
// ensure inner component inherits the async wrapper's ref owner
|
|
3960
4008
|
vnode.ref = ref;
|
|
4009
|
+
// pass the custom element callback on to the inner comp
|
|
4010
|
+
// and remove it from the async wrapper
|
|
4011
|
+
vnode.ce = ce;
|
|
4012
|
+
delete parent.vnode.ce;
|
|
3961
4013
|
return vnode;
|
|
3962
4014
|
}
|
|
3963
4015
|
|
|
@@ -4043,7 +4095,7 @@ var Vue = (function (exports) {
|
|
|
4043
4095
|
}
|
|
4044
4096
|
function pruneCacheEntry(key) {
|
|
4045
4097
|
const cached = cache.get(key);
|
|
4046
|
-
if (!current || cached
|
|
4098
|
+
if (!current || !isSameVNodeType(cached, current)) {
|
|
4047
4099
|
unmount(cached);
|
|
4048
4100
|
}
|
|
4049
4101
|
else if (current) {
|
|
@@ -4075,7 +4127,7 @@ var Vue = (function (exports) {
|
|
|
4075
4127
|
cache.forEach(cached => {
|
|
4076
4128
|
const { subTree, suspense } = instance;
|
|
4077
4129
|
const vnode = getInnerChild(subTree);
|
|
4078
|
-
if (cached.type === vnode.type) {
|
|
4130
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
4079
4131
|
// current instance will be unmounted as part of keep-alive's unmount
|
|
4080
4132
|
resetShapeFlag(vnode);
|
|
4081
4133
|
// but invoke its deactivated hook here
|
|
@@ -4095,7 +4147,7 @@ var Vue = (function (exports) {
|
|
|
4095
4147
|
const rawVNode = children[0];
|
|
4096
4148
|
if (children.length > 1) {
|
|
4097
4149
|
{
|
|
4098
|
-
warn
|
|
4150
|
+
warn(`KeepAlive should contain exactly one component child.`);
|
|
4099
4151
|
}
|
|
4100
4152
|
current = null;
|
|
4101
4153
|
return children;
|
|
@@ -4115,8 +4167,7 @@ var Vue = (function (exports) {
|
|
|
4115
4167
|
: comp);
|
|
4116
4168
|
const { include, exclude, max } = props;
|
|
4117
4169
|
if ((include && (!name || !matches(include, name))) ||
|
|
4118
|
-
(exclude && name && matches(exclude, name))
|
|
4119
|
-
(hmrDirtyComponents.has(comp))) {
|
|
4170
|
+
(exclude && name && matches(exclude, name))) {
|
|
4120
4171
|
current = vnode;
|
|
4121
4172
|
return rawVNode;
|
|
4122
4173
|
}
|
|
@@ -4173,7 +4224,7 @@ var Vue = (function (exports) {
|
|
|
4173
4224
|
else if (isString(pattern)) {
|
|
4174
4225
|
return pattern.split(',').includes(name);
|
|
4175
4226
|
}
|
|
4176
|
-
else if (pattern
|
|
4227
|
+
else if (isRegExp(pattern)) {
|
|
4177
4228
|
return pattern.test(name);
|
|
4178
4229
|
}
|
|
4179
4230
|
/* istanbul ignore next */
|
|
@@ -4226,14 +4277,9 @@ var Vue = (function (exports) {
|
|
|
4226
4277
|
}, target);
|
|
4227
4278
|
}
|
|
4228
4279
|
function resetShapeFlag(vnode) {
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
}
|
|
4233
|
-
if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
4234
|
-
shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4235
|
-
}
|
|
4236
|
-
vnode.shapeFlag = shapeFlag;
|
|
4280
|
+
// bitwise operations to remove keep alive flags
|
|
4281
|
+
vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
4282
|
+
vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
4237
4283
|
}
|
|
4238
4284
|
function getInnerChild(vnode) {
|
|
4239
4285
|
return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
|
|
@@ -4272,7 +4318,7 @@ var Vue = (function (exports) {
|
|
|
4272
4318
|
}
|
|
4273
4319
|
else {
|
|
4274
4320
|
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
|
|
4275
|
-
warn
|
|
4321
|
+
warn(`${apiName} is called when there is no active component instance to be ` +
|
|
4276
4322
|
`associated with. ` +
|
|
4277
4323
|
`Lifecycle injection APIs can only be used during execution of setup().` +
|
|
4278
4324
|
(` If you are using async setup(), make sure to register lifecycle ` +
|
|
@@ -4311,7 +4357,7 @@ var Vue = (function (exports) {
|
|
|
4311
4357
|
*/
|
|
4312
4358
|
function validateDirectiveName(name) {
|
|
4313
4359
|
if (isBuiltInDirective(name)) {
|
|
4314
|
-
warn
|
|
4360
|
+
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
4315
4361
|
}
|
|
4316
4362
|
}
|
|
4317
4363
|
/**
|
|
@@ -4320,7 +4366,7 @@ var Vue = (function (exports) {
|
|
|
4320
4366
|
function withDirectives(vnode, directives) {
|
|
4321
4367
|
const internalInstance = currentRenderingInstance;
|
|
4322
4368
|
if (internalInstance === null) {
|
|
4323
|
-
warn
|
|
4369
|
+
warn(`withDirectives can only be used inside render functions.`);
|
|
4324
4370
|
return vnode;
|
|
4325
4371
|
}
|
|
4326
4372
|
const instance = getExposeProxy(internalInstance) ||
|
|
@@ -4431,12 +4477,12 @@ var Vue = (function (exports) {
|
|
|
4431
4477
|
? `\nIf this is a native custom element, make sure to exclude it from ` +
|
|
4432
4478
|
`component resolution via compilerOptions.isCustomElement.`
|
|
4433
4479
|
: ``;
|
|
4434
|
-
warn
|
|
4480
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
4435
4481
|
}
|
|
4436
4482
|
return res;
|
|
4437
4483
|
}
|
|
4438
4484
|
else {
|
|
4439
|
-
warn
|
|
4485
|
+
warn(`resolve${capitalize(type.slice(0, -1))} ` +
|
|
4440
4486
|
`can only be used in render() or setup().`);
|
|
4441
4487
|
}
|
|
4442
4488
|
}
|
|
@@ -4461,7 +4507,7 @@ var Vue = (function (exports) {
|
|
|
4461
4507
|
}
|
|
4462
4508
|
else if (typeof source === 'number') {
|
|
4463
4509
|
if (!Number.isInteger(source)) {
|
|
4464
|
-
warn
|
|
4510
|
+
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
4465
4511
|
}
|
|
4466
4512
|
ret = new Array(source);
|
|
4467
4513
|
for (let i = 0; i < source; i++) {
|
|
@@ -4532,11 +4578,13 @@ var Vue = (function (exports) {
|
|
|
4532
4578
|
(currentRenderingInstance.parent &&
|
|
4533
4579
|
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
4534
4580
|
currentRenderingInstance.parent.isCE)) {
|
|
4535
|
-
|
|
4581
|
+
if (name !== 'default')
|
|
4582
|
+
props.name = name;
|
|
4583
|
+
return createVNode('slot', props, fallback && fallback());
|
|
4536
4584
|
}
|
|
4537
4585
|
let slot = slots[name];
|
|
4538
4586
|
if (slot && slot.length > 1) {
|
|
4539
|
-
warn
|
|
4587
|
+
warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
|
|
4540
4588
|
`function. You need to mark this component with $dynamic-slots in the ` +
|
|
4541
4589
|
`parent template.`);
|
|
4542
4590
|
slot = () => [];
|
|
@@ -4589,7 +4637,7 @@ var Vue = (function (exports) {
|
|
|
4589
4637
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
4590
4638
|
const ret = {};
|
|
4591
4639
|
if (!isObject(obj)) {
|
|
4592
|
-
warn
|
|
4640
|
+
warn(`v-on with no argument expects an object value.`);
|
|
4593
4641
|
return ret;
|
|
4594
4642
|
}
|
|
4595
4643
|
for (const key in obj) {
|
|
@@ -4632,6 +4680,7 @@ var Vue = (function (exports) {
|
|
|
4632
4680
|
$watch: i => (instanceWatch.bind(i) )
|
|
4633
4681
|
});
|
|
4634
4682
|
const isReservedPrefix = (key) => key === '_' || key === '$';
|
|
4683
|
+
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
4635
4684
|
const PublicInstanceProxyHandlers = {
|
|
4636
4685
|
get({ _: instance }, key) {
|
|
4637
4686
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
@@ -4639,15 +4688,6 @@ var Vue = (function (exports) {
|
|
|
4639
4688
|
if (key === '__isVue') {
|
|
4640
4689
|
return true;
|
|
4641
4690
|
}
|
|
4642
|
-
// prioritize <script setup> bindings during dev.
|
|
4643
|
-
// this allows even properties that start with _ or $ to be used - so that
|
|
4644
|
-
// it aligns with the production behavior where the render fn is inlined and
|
|
4645
|
-
// indeed has access to all declared variables.
|
|
4646
|
-
if (setupState !== EMPTY_OBJ &&
|
|
4647
|
-
setupState.__isScriptSetup &&
|
|
4648
|
-
hasOwn(setupState, key)) {
|
|
4649
|
-
return setupState[key];
|
|
4650
|
-
}
|
|
4651
4691
|
// data / props / ctx
|
|
4652
4692
|
// This getter gets called for every property access on the render context
|
|
4653
4693
|
// during render and is a major hotspot. The most expensive part of this
|
|
@@ -4670,7 +4710,7 @@ var Vue = (function (exports) {
|
|
|
4670
4710
|
// default: just fallthrough
|
|
4671
4711
|
}
|
|
4672
4712
|
}
|
|
4673
|
-
else if (
|
|
4713
|
+
else if (hasSetupBinding(setupState, key)) {
|
|
4674
4714
|
accessCache[key] = 1 /* AccessTypes.SETUP */;
|
|
4675
4715
|
return setupState[key];
|
|
4676
4716
|
}
|
|
@@ -4729,32 +4769,37 @@ var Vue = (function (exports) {
|
|
|
4729
4769
|
// to infinite warning loop
|
|
4730
4770
|
key.indexOf('__v') !== 0)) {
|
|
4731
4771
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
4732
|
-
warn
|
|
4772
|
+
warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
|
|
4733
4773
|
`character ("$" or "_") and is not proxied on the render context.`);
|
|
4734
4774
|
}
|
|
4735
4775
|
else if (instance === currentRenderingInstance) {
|
|
4736
|
-
warn
|
|
4776
|
+
warn(`Property ${JSON.stringify(key)} was accessed during render ` +
|
|
4737
4777
|
`but is not defined on instance.`);
|
|
4738
4778
|
}
|
|
4739
4779
|
}
|
|
4740
4780
|
},
|
|
4741
4781
|
set({ _: instance }, key, value) {
|
|
4742
4782
|
const { data, setupState, ctx } = instance;
|
|
4743
|
-
if (
|
|
4783
|
+
if (hasSetupBinding(setupState, key)) {
|
|
4744
4784
|
setupState[key] = value;
|
|
4745
4785
|
return true;
|
|
4746
4786
|
}
|
|
4787
|
+
else if (setupState.__isScriptSetup &&
|
|
4788
|
+
hasOwn(setupState, key)) {
|
|
4789
|
+
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
4790
|
+
return false;
|
|
4791
|
+
}
|
|
4747
4792
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
4748
4793
|
data[key] = value;
|
|
4749
4794
|
return true;
|
|
4750
4795
|
}
|
|
4751
4796
|
else if (hasOwn(instance.props, key)) {
|
|
4752
|
-
warn
|
|
4797
|
+
warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
4753
4798
|
return false;
|
|
4754
4799
|
}
|
|
4755
4800
|
if (key[0] === '$' && key.slice(1) in instance) {
|
|
4756
|
-
warn
|
|
4757
|
-
`Properties starting with $ are reserved and readonly
|
|
4801
|
+
warn(`Attempting to mutate public property "${key}". ` +
|
|
4802
|
+
`Properties starting with $ are reserved and readonly.`);
|
|
4758
4803
|
return false;
|
|
4759
4804
|
}
|
|
4760
4805
|
else {
|
|
@@ -4775,7 +4820,7 @@ var Vue = (function (exports) {
|
|
|
4775
4820
|
let normalizedProps;
|
|
4776
4821
|
return (!!accessCache[key] ||
|
|
4777
4822
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
4778
|
-
(setupState
|
|
4823
|
+
hasSetupBinding(setupState, key) ||
|
|
4779
4824
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
4780
4825
|
hasOwn(ctx, key) ||
|
|
4781
4826
|
hasOwn(publicPropertiesMap, key) ||
|
|
@@ -4794,7 +4839,7 @@ var Vue = (function (exports) {
|
|
|
4794
4839
|
};
|
|
4795
4840
|
{
|
|
4796
4841
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
4797
|
-
warn
|
|
4842
|
+
warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
|
|
4798
4843
|
`The keys will be empty in production mode to avoid performance overhead.`);
|
|
4799
4844
|
return Reflect.ownKeys(target);
|
|
4800
4845
|
};
|
|
@@ -4810,7 +4855,7 @@ var Vue = (function (exports) {
|
|
|
4810
4855
|
has(_, key) {
|
|
4811
4856
|
const has = key[0] !== '_' && !isGloballyWhitelisted(key);
|
|
4812
4857
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
4813
|
-
warn
|
|
4858
|
+
warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
|
|
4814
4859
|
}
|
|
4815
4860
|
return has;
|
|
4816
4861
|
}
|
|
@@ -4860,7 +4905,7 @@ var Vue = (function (exports) {
|
|
|
4860
4905
|
Object.keys(toRaw(setupState)).forEach(key => {
|
|
4861
4906
|
if (!setupState.__isScriptSetup) {
|
|
4862
4907
|
if (isReservedPrefix(key[0])) {
|
|
4863
|
-
warn
|
|
4908
|
+
warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
|
|
4864
4909
|
`which are reserved prefixes for Vue internals.`);
|
|
4865
4910
|
return;
|
|
4866
4911
|
}
|
|
@@ -4878,7 +4923,7 @@ var Vue = (function (exports) {
|
|
|
4878
4923
|
const cache = Object.create(null);
|
|
4879
4924
|
return (type, key) => {
|
|
4880
4925
|
if (cache[key]) {
|
|
4881
|
-
warn
|
|
4926
|
+
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
4882
4927
|
}
|
|
4883
4928
|
else {
|
|
4884
4929
|
cache[key] = type;
|
|
@@ -4895,7 +4940,7 @@ var Vue = (function (exports) {
|
|
|
4895
4940
|
// call beforeCreate first before accessing other options since
|
|
4896
4941
|
// the hook may mutate resolved options (#2791)
|
|
4897
4942
|
if (options.beforeCreate) {
|
|
4898
|
-
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
4943
|
+
callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
4899
4944
|
}
|
|
4900
4945
|
const {
|
|
4901
4946
|
// state
|
|
@@ -4945,24 +4990,24 @@ var Vue = (function (exports) {
|
|
|
4945
4990
|
}
|
|
4946
4991
|
}
|
|
4947
4992
|
else {
|
|
4948
|
-
warn
|
|
4993
|
+
warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
|
|
4949
4994
|
`Did you reference the function correctly?`);
|
|
4950
4995
|
}
|
|
4951
4996
|
}
|
|
4952
4997
|
}
|
|
4953
4998
|
if (dataOptions) {
|
|
4954
4999
|
if (!isFunction(dataOptions)) {
|
|
4955
|
-
warn
|
|
5000
|
+
warn(`The data option must be a function. ` +
|
|
4956
5001
|
`Plain object usage is no longer supported.`);
|
|
4957
5002
|
}
|
|
4958
5003
|
const data = dataOptions.call(publicThis, publicThis);
|
|
4959
5004
|
if (isPromise(data)) {
|
|
4960
|
-
warn
|
|
5005
|
+
warn(`data() returned a Promise - note data() cannot be async; If you ` +
|
|
4961
5006
|
`intend to perform data fetching before component renders, use ` +
|
|
4962
5007
|
`async setup() + <Suspense>.`);
|
|
4963
5008
|
}
|
|
4964
5009
|
if (!isObject(data)) {
|
|
4965
|
-
warn
|
|
5010
|
+
warn(`data() should return an object.`);
|
|
4966
5011
|
}
|
|
4967
5012
|
else {
|
|
4968
5013
|
instance.data = reactive(data);
|
|
@@ -4993,15 +5038,15 @@ var Vue = (function (exports) {
|
|
|
4993
5038
|
? opt.get.bind(publicThis, publicThis)
|
|
4994
5039
|
: NOOP;
|
|
4995
5040
|
if (get === NOOP) {
|
|
4996
|
-
warn
|
|
5041
|
+
warn(`Computed property "${key}" has no getter.`);
|
|
4997
5042
|
}
|
|
4998
5043
|
const set = !isFunction(opt) && isFunction(opt.set)
|
|
4999
5044
|
? opt.set.bind(publicThis)
|
|
5000
5045
|
: () => {
|
|
5001
|
-
warn
|
|
5046
|
+
warn(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5002
5047
|
}
|
|
5003
5048
|
;
|
|
5004
|
-
const c = computed
|
|
5049
|
+
const c = computed({
|
|
5005
5050
|
get,
|
|
5006
5051
|
set
|
|
5007
5052
|
});
|
|
@@ -5030,7 +5075,7 @@ var Vue = (function (exports) {
|
|
|
5030
5075
|
});
|
|
5031
5076
|
}
|
|
5032
5077
|
if (created) {
|
|
5033
|
-
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
5078
|
+
callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
5034
5079
|
}
|
|
5035
5080
|
function registerLifecycleHook(register, hook) {
|
|
5036
5081
|
if (isArray(hook)) {
|
|
@@ -5110,7 +5155,7 @@ var Vue = (function (exports) {
|
|
|
5110
5155
|
}
|
|
5111
5156
|
else {
|
|
5112
5157
|
{
|
|
5113
|
-
warn
|
|
5158
|
+
warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
|
|
5114
5159
|
`and no longer needs \`.value\` in the next minor release. ` +
|
|
5115
5160
|
`To opt-in to the new behavior now, ` +
|
|
5116
5161
|
`set \`app.config.unwrapInjectedRef = true\` (this config is ` +
|
|
@@ -5127,7 +5172,7 @@ var Vue = (function (exports) {
|
|
|
5127
5172
|
}
|
|
5128
5173
|
}
|
|
5129
5174
|
}
|
|
5130
|
-
function callHook(hook, instance, type) {
|
|
5175
|
+
function callHook$1(hook, instance, type) {
|
|
5131
5176
|
callWithAsyncErrorHandling(isArray(hook)
|
|
5132
5177
|
? hook.map(h => h.bind(instance.proxy))
|
|
5133
5178
|
: hook.bind(instance.proxy), instance, type);
|
|
@@ -5142,7 +5187,7 @@ var Vue = (function (exports) {
|
|
|
5142
5187
|
watch(getter, handler);
|
|
5143
5188
|
}
|
|
5144
5189
|
else {
|
|
5145
|
-
warn
|
|
5190
|
+
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5146
5191
|
}
|
|
5147
5192
|
}
|
|
5148
5193
|
else if (isFunction(raw)) {
|
|
@@ -5160,12 +5205,12 @@ var Vue = (function (exports) {
|
|
|
5160
5205
|
watch(getter, handler, raw);
|
|
5161
5206
|
}
|
|
5162
5207
|
else {
|
|
5163
|
-
warn
|
|
5208
|
+
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5164
5209
|
}
|
|
5165
5210
|
}
|
|
5166
5211
|
}
|
|
5167
5212
|
else {
|
|
5168
|
-
warn
|
|
5213
|
+
warn(`Invalid watch option: "${key}"`, raw);
|
|
5169
5214
|
}
|
|
5170
5215
|
}
|
|
5171
5216
|
/**
|
|
@@ -5209,7 +5254,7 @@ var Vue = (function (exports) {
|
|
|
5209
5254
|
}
|
|
5210
5255
|
for (const key in from) {
|
|
5211
5256
|
if (asMixin && key === 'expose') {
|
|
5212
|
-
warn
|
|
5257
|
+
warn(`"expose" option is ignored when declared in mixins or extends. ` +
|
|
5213
5258
|
`It should only be declared in the base component itself.`);
|
|
5214
5259
|
}
|
|
5215
5260
|
else {
|
|
@@ -5227,20 +5272,20 @@ var Vue = (function (exports) {
|
|
|
5227
5272
|
methods: mergeObjectOptions,
|
|
5228
5273
|
computed: mergeObjectOptions,
|
|
5229
5274
|
// lifecycle
|
|
5230
|
-
beforeCreate: mergeAsArray,
|
|
5231
|
-
created: mergeAsArray,
|
|
5232
|
-
beforeMount: mergeAsArray,
|
|
5233
|
-
mounted: mergeAsArray,
|
|
5234
|
-
beforeUpdate: mergeAsArray,
|
|
5235
|
-
updated: mergeAsArray,
|
|
5236
|
-
beforeDestroy: mergeAsArray,
|
|
5237
|
-
beforeUnmount: mergeAsArray,
|
|
5238
|
-
destroyed: mergeAsArray,
|
|
5239
|
-
unmounted: mergeAsArray,
|
|
5240
|
-
activated: mergeAsArray,
|
|
5241
|
-
deactivated: mergeAsArray,
|
|
5242
|
-
errorCaptured: mergeAsArray,
|
|
5243
|
-
serverPrefetch: mergeAsArray,
|
|
5275
|
+
beforeCreate: mergeAsArray$1,
|
|
5276
|
+
created: mergeAsArray$1,
|
|
5277
|
+
beforeMount: mergeAsArray$1,
|
|
5278
|
+
mounted: mergeAsArray$1,
|
|
5279
|
+
beforeUpdate: mergeAsArray$1,
|
|
5280
|
+
updated: mergeAsArray$1,
|
|
5281
|
+
beforeDestroy: mergeAsArray$1,
|
|
5282
|
+
beforeUnmount: mergeAsArray$1,
|
|
5283
|
+
destroyed: mergeAsArray$1,
|
|
5284
|
+
unmounted: mergeAsArray$1,
|
|
5285
|
+
activated: mergeAsArray$1,
|
|
5286
|
+
deactivated: mergeAsArray$1,
|
|
5287
|
+
errorCaptured: mergeAsArray$1,
|
|
5288
|
+
serverPrefetch: mergeAsArray$1,
|
|
5244
5289
|
// assets
|
|
5245
5290
|
components: mergeObjectOptions,
|
|
5246
5291
|
directives: mergeObjectOptions,
|
|
@@ -5274,7 +5319,7 @@ var Vue = (function (exports) {
|
|
|
5274
5319
|
}
|
|
5275
5320
|
return raw;
|
|
5276
5321
|
}
|
|
5277
|
-
function mergeAsArray(to, from) {
|
|
5322
|
+
function mergeAsArray$1(to, from) {
|
|
5278
5323
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
5279
5324
|
}
|
|
5280
5325
|
function mergeObjectOptions(to, from) {
|
|
@@ -5287,7 +5332,7 @@ var Vue = (function (exports) {
|
|
|
5287
5332
|
return to;
|
|
5288
5333
|
const merged = extend(Object.create(null), to);
|
|
5289
5334
|
for (const key in from) {
|
|
5290
|
-
merged[key] = mergeAsArray(to[key], from[key]);
|
|
5335
|
+
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
5291
5336
|
}
|
|
5292
5337
|
return merged;
|
|
5293
5338
|
}
|
|
@@ -5542,7 +5587,7 @@ var Vue = (function (exports) {
|
|
|
5542
5587
|
if (isArray(raw)) {
|
|
5543
5588
|
for (let i = 0; i < raw.length; i++) {
|
|
5544
5589
|
if (!isString(raw[i])) {
|
|
5545
|
-
warn
|
|
5590
|
+
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
5546
5591
|
}
|
|
5547
5592
|
const normalizedKey = camelize(raw[i]);
|
|
5548
5593
|
if (validatePropName(normalizedKey)) {
|
|
@@ -5552,7 +5597,7 @@ var Vue = (function (exports) {
|
|
|
5552
5597
|
}
|
|
5553
5598
|
else if (raw) {
|
|
5554
5599
|
if (!isObject(raw)) {
|
|
5555
|
-
warn
|
|
5600
|
+
warn(`invalid props options`, raw);
|
|
5556
5601
|
}
|
|
5557
5602
|
for (const key in raw) {
|
|
5558
5603
|
const normalizedKey = camelize(key);
|
|
@@ -5585,15 +5630,15 @@ var Vue = (function (exports) {
|
|
|
5585
5630
|
return true;
|
|
5586
5631
|
}
|
|
5587
5632
|
else {
|
|
5588
|
-
warn
|
|
5633
|
+
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5589
5634
|
}
|
|
5590
5635
|
return false;
|
|
5591
5636
|
}
|
|
5592
5637
|
// use function string name to check type constructors
|
|
5593
5638
|
// so that it works across vms / iframes.
|
|
5594
5639
|
function getType(ctor) {
|
|
5595
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
5596
|
-
return match ? match[
|
|
5640
|
+
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
5641
|
+
return match ? match[2] : ctor === null ? 'null' : '';
|
|
5597
5642
|
}
|
|
5598
5643
|
function isSameType(a, b) {
|
|
5599
5644
|
return getType(a) === getType(b);
|
|
@@ -5627,7 +5672,7 @@ var Vue = (function (exports) {
|
|
|
5627
5672
|
const { type, required, validator } = prop;
|
|
5628
5673
|
// required!
|
|
5629
5674
|
if (required && isAbsent) {
|
|
5630
|
-
warn
|
|
5675
|
+
warn('Missing required prop: "' + name + '"');
|
|
5631
5676
|
return;
|
|
5632
5677
|
}
|
|
5633
5678
|
// missing but optional
|
|
@@ -5646,13 +5691,13 @@ var Vue = (function (exports) {
|
|
|
5646
5691
|
isValid = valid;
|
|
5647
5692
|
}
|
|
5648
5693
|
if (!isValid) {
|
|
5649
|
-
warn
|
|
5694
|
+
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5650
5695
|
return;
|
|
5651
5696
|
}
|
|
5652
5697
|
}
|
|
5653
5698
|
// custom validator
|
|
5654
5699
|
if (validator && !validator(value)) {
|
|
5655
|
-
warn
|
|
5700
|
+
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5656
5701
|
}
|
|
5657
5702
|
}
|
|
5658
5703
|
const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
|
|
@@ -5749,7 +5794,7 @@ var Vue = (function (exports) {
|
|
|
5749
5794
|
}
|
|
5750
5795
|
const normalized = withCtx((...args) => {
|
|
5751
5796
|
if (true && currentInstance) {
|
|
5752
|
-
warn
|
|
5797
|
+
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
5753
5798
|
`this will not track dependencies used in the slot. ` +
|
|
5754
5799
|
`Invoke the slot function inside the render function instead.`);
|
|
5755
5800
|
}
|
|
@@ -5769,7 +5814,7 @@ var Vue = (function (exports) {
|
|
|
5769
5814
|
}
|
|
5770
5815
|
else if (value != null) {
|
|
5771
5816
|
{
|
|
5772
|
-
warn
|
|
5817
|
+
warn(`Non-function value encountered for slot "${key}". ` +
|
|
5773
5818
|
`Prefer function slots for better performance.`);
|
|
5774
5819
|
}
|
|
5775
5820
|
const normalized = normalizeSlotValue(value);
|
|
@@ -5780,7 +5825,7 @@ var Vue = (function (exports) {
|
|
|
5780
5825
|
const normalizeVNodeSlots = (instance, children) => {
|
|
5781
5826
|
if (!isKeepAlive(instance.vnode) &&
|
|
5782
5827
|
!(false )) {
|
|
5783
|
-
warn
|
|
5828
|
+
warn(`Non-function value encountered for default slot. ` +
|
|
5784
5829
|
`Prefer function slots for better performance.`);
|
|
5785
5830
|
}
|
|
5786
5831
|
const normalized = normalizeSlotValue(children);
|
|
@@ -5881,21 +5926,21 @@ var Vue = (function (exports) {
|
|
|
5881
5926
|
emitsCache: new WeakMap()
|
|
5882
5927
|
};
|
|
5883
5928
|
}
|
|
5884
|
-
let uid = 0;
|
|
5929
|
+
let uid$1 = 0;
|
|
5885
5930
|
function createAppAPI(render, hydrate) {
|
|
5886
5931
|
return function createApp(rootComponent, rootProps = null) {
|
|
5887
5932
|
if (!isFunction(rootComponent)) {
|
|
5888
5933
|
rootComponent = Object.assign({}, rootComponent);
|
|
5889
5934
|
}
|
|
5890
5935
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5891
|
-
warn
|
|
5936
|
+
warn(`root props passed to app.mount() must be an object.`);
|
|
5892
5937
|
rootProps = null;
|
|
5893
5938
|
}
|
|
5894
5939
|
const context = createAppContext();
|
|
5895
5940
|
const installedPlugins = new Set();
|
|
5896
5941
|
let isMounted = false;
|
|
5897
5942
|
const app = (context.app = {
|
|
5898
|
-
_uid: uid++,
|
|
5943
|
+
_uid: uid$1++,
|
|
5899
5944
|
_component: rootComponent,
|
|
5900
5945
|
_props: rootProps,
|
|
5901
5946
|
_container: null,
|
|
@@ -5907,12 +5952,12 @@ var Vue = (function (exports) {
|
|
|
5907
5952
|
},
|
|
5908
5953
|
set config(v) {
|
|
5909
5954
|
{
|
|
5910
|
-
warn
|
|
5955
|
+
warn(`app.config cannot be replaced. Modify individual options instead.`);
|
|
5911
5956
|
}
|
|
5912
5957
|
},
|
|
5913
5958
|
use(plugin, ...options) {
|
|
5914
5959
|
if (installedPlugins.has(plugin)) {
|
|
5915
|
-
warn
|
|
5960
|
+
warn(`Plugin has already been applied to target app.`);
|
|
5916
5961
|
}
|
|
5917
5962
|
else if (plugin && isFunction(plugin.install)) {
|
|
5918
5963
|
installedPlugins.add(plugin);
|
|
@@ -5923,7 +5968,7 @@ var Vue = (function (exports) {
|
|
|
5923
5968
|
plugin(app, ...options);
|
|
5924
5969
|
}
|
|
5925
5970
|
else {
|
|
5926
|
-
warn
|
|
5971
|
+
warn(`A plugin must either be a function or an object with an "install" ` +
|
|
5927
5972
|
`function.`);
|
|
5928
5973
|
}
|
|
5929
5974
|
return app;
|
|
@@ -5934,7 +5979,7 @@ var Vue = (function (exports) {
|
|
|
5934
5979
|
context.mixins.push(mixin);
|
|
5935
5980
|
}
|
|
5936
5981
|
else {
|
|
5937
|
-
warn
|
|
5982
|
+
warn('Mixin has already been applied to target app' +
|
|
5938
5983
|
(mixin.name ? `: ${mixin.name}` : ''));
|
|
5939
5984
|
}
|
|
5940
5985
|
}
|
|
@@ -5948,7 +5993,7 @@ var Vue = (function (exports) {
|
|
|
5948
5993
|
return context.components[name];
|
|
5949
5994
|
}
|
|
5950
5995
|
if (context.components[name]) {
|
|
5951
|
-
warn
|
|
5996
|
+
warn(`Component "${name}" has already been registered in target app.`);
|
|
5952
5997
|
}
|
|
5953
5998
|
context.components[name] = component;
|
|
5954
5999
|
return app;
|
|
@@ -5961,7 +6006,7 @@ var Vue = (function (exports) {
|
|
|
5961
6006
|
return context.directives[name];
|
|
5962
6007
|
}
|
|
5963
6008
|
if (context.directives[name]) {
|
|
5964
|
-
warn
|
|
6009
|
+
warn(`Directive "${name}" has already been registered in target app.`);
|
|
5965
6010
|
}
|
|
5966
6011
|
context.directives[name] = directive;
|
|
5967
6012
|
return app;
|
|
@@ -5970,7 +6015,7 @@ var Vue = (function (exports) {
|
|
|
5970
6015
|
if (!isMounted) {
|
|
5971
6016
|
// #5571
|
|
5972
6017
|
if (rootContainer.__vue_app__) {
|
|
5973
|
-
warn
|
|
6018
|
+
warn(`There is already an app instance mounted on the host container.\n` +
|
|
5974
6019
|
` If you want to mount another app on the same host container,` +
|
|
5975
6020
|
` you need to unmount the previous app by calling \`app.unmount()\` first.`);
|
|
5976
6021
|
}
|
|
@@ -6000,7 +6045,7 @@ var Vue = (function (exports) {
|
|
|
6000
6045
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
6001
6046
|
}
|
|
6002
6047
|
else {
|
|
6003
|
-
warn
|
|
6048
|
+
warn(`App has already been mounted.\n` +
|
|
6004
6049
|
`If you want to remount the same app, move your app creation logic ` +
|
|
6005
6050
|
`into a factory function and create fresh app instances for each ` +
|
|
6006
6051
|
`mount - e.g. \`const createMyApp = () => createApp(App)\``);
|
|
@@ -6016,12 +6061,12 @@ var Vue = (function (exports) {
|
|
|
6016
6061
|
delete app._container.__vue_app__;
|
|
6017
6062
|
}
|
|
6018
6063
|
else {
|
|
6019
|
-
warn
|
|
6064
|
+
warn(`Cannot unmount an app that is not mounted.`);
|
|
6020
6065
|
}
|
|
6021
6066
|
},
|
|
6022
6067
|
provide(key, value) {
|
|
6023
6068
|
if (key in context.provides) {
|
|
6024
|
-
warn
|
|
6069
|
+
warn(`App already provides property with key "${String(key)}". ` +
|
|
6025
6070
|
`It will be overwritten with the new value.`);
|
|
6026
6071
|
}
|
|
6027
6072
|
context.provides[key] = value;
|
|
@@ -6051,7 +6096,7 @@ var Vue = (function (exports) {
|
|
|
6051
6096
|
const value = isUnmount ? null : refValue;
|
|
6052
6097
|
const { i: owner, r: ref } = rawRef;
|
|
6053
6098
|
if (!owner) {
|
|
6054
|
-
warn
|
|
6099
|
+
warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
6055
6100
|
`A vnode with ref must be created inside the render function.`);
|
|
6056
6101
|
return;
|
|
6057
6102
|
}
|
|
@@ -6118,7 +6163,7 @@ var Vue = (function (exports) {
|
|
|
6118
6163
|
refs[rawRef.k] = value;
|
|
6119
6164
|
}
|
|
6120
6165
|
else {
|
|
6121
|
-
warn
|
|
6166
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
6122
6167
|
}
|
|
6123
6168
|
};
|
|
6124
6169
|
if (value) {
|
|
@@ -6130,7 +6175,7 @@ var Vue = (function (exports) {
|
|
|
6130
6175
|
}
|
|
6131
6176
|
}
|
|
6132
6177
|
else {
|
|
6133
|
-
warn
|
|
6178
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
6134
6179
|
}
|
|
6135
6180
|
}
|
|
6136
6181
|
}
|
|
@@ -6147,7 +6192,7 @@ var Vue = (function (exports) {
|
|
|
6147
6192
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
6148
6193
|
const hydrate = (vnode, container) => {
|
|
6149
6194
|
if (!container.hasChildNodes()) {
|
|
6150
|
-
warn
|
|
6195
|
+
warn(`Attempting to hydrate existing markup but container is empty. ` +
|
|
6151
6196
|
`Performing full mount instead.`);
|
|
6152
6197
|
patch(null, vnode, container);
|
|
6153
6198
|
flushPostFlushCbs();
|
|
@@ -6190,7 +6235,7 @@ var Vue = (function (exports) {
|
|
|
6190
6235
|
else {
|
|
6191
6236
|
if (node.data !== vnode.children) {
|
|
6192
6237
|
hasMismatch = true;
|
|
6193
|
-
warn
|
|
6238
|
+
warn(`Hydration text mismatch:` +
|
|
6194
6239
|
`\n- Client: ${JSON.stringify(node.data)}` +
|
|
6195
6240
|
`\n- Server: ${JSON.stringify(vnode.children)}`);
|
|
6196
6241
|
node.data = vnode.children;
|
|
@@ -6305,7 +6350,7 @@ var Vue = (function (exports) {
|
|
|
6305
6350
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
6306
6351
|
}
|
|
6307
6352
|
else {
|
|
6308
|
-
warn
|
|
6353
|
+
warn('Invalid HostVNode type:', type, `(${typeof type})`);
|
|
6309
6354
|
}
|
|
6310
6355
|
}
|
|
6311
6356
|
if (ref != null) {
|
|
@@ -6366,7 +6411,7 @@ var Vue = (function (exports) {
|
|
|
6366
6411
|
while (next) {
|
|
6367
6412
|
hasMismatch = true;
|
|
6368
6413
|
if (!hasWarned) {
|
|
6369
|
-
warn
|
|
6414
|
+
warn(`Hydration children mismatch in <${vnode.type}>: ` +
|
|
6370
6415
|
`server rendered element contains more child nodes than client vdom.`);
|
|
6371
6416
|
hasWarned = true;
|
|
6372
6417
|
}
|
|
@@ -6379,7 +6424,7 @@ var Vue = (function (exports) {
|
|
|
6379
6424
|
else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
6380
6425
|
if (el.textContent !== vnode.children) {
|
|
6381
6426
|
hasMismatch = true;
|
|
6382
|
-
warn
|
|
6427
|
+
warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
6383
6428
|
`- Client: ${el.textContent}\n` +
|
|
6384
6429
|
`- Server: ${vnode.children}`);
|
|
6385
6430
|
el.textContent = vnode.children;
|
|
@@ -6406,7 +6451,7 @@ var Vue = (function (exports) {
|
|
|
6406
6451
|
else {
|
|
6407
6452
|
hasMismatch = true;
|
|
6408
6453
|
if (!hasWarned) {
|
|
6409
|
-
warn
|
|
6454
|
+
warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
|
|
6410
6455
|
`server rendered element contains fewer child nodes than client vdom.`);
|
|
6411
6456
|
hasWarned = true;
|
|
6412
6457
|
}
|
|
@@ -6439,7 +6484,7 @@ var Vue = (function (exports) {
|
|
|
6439
6484
|
};
|
|
6440
6485
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
6441
6486
|
hasMismatch = true;
|
|
6442
|
-
warn
|
|
6487
|
+
warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
6443
6488
|
? `(text)`
|
|
6444
6489
|
: isComment(node) && node.data === '['
|
|
6445
6490
|
? `(start of fragment)`
|
|
@@ -6607,7 +6652,7 @@ var Vue = (function (exports) {
|
|
|
6607
6652
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
6608
6653
|
}
|
|
6609
6654
|
else {
|
|
6610
|
-
warn
|
|
6655
|
+
warn('Invalid VNode type:', type, `(${typeof type})`);
|
|
6611
6656
|
}
|
|
6612
6657
|
}
|
|
6613
6658
|
// set ref
|
|
@@ -6697,6 +6742,8 @@ var Vue = (function (exports) {
|
|
|
6697
6742
|
if (dirs) {
|
|
6698
6743
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6699
6744
|
}
|
|
6745
|
+
// scopeId
|
|
6746
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
6700
6747
|
// props
|
|
6701
6748
|
if (props) {
|
|
6702
6749
|
for (const key in props) {
|
|
@@ -6720,8 +6767,6 @@ var Vue = (function (exports) {
|
|
|
6720
6767
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6721
6768
|
}
|
|
6722
6769
|
}
|
|
6723
|
-
// scopeId
|
|
6724
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
6725
6770
|
{
|
|
6726
6771
|
Object.defineProperty(el, '__vnode', {
|
|
6727
6772
|
value: vnode,
|
|
@@ -7431,7 +7476,7 @@ var Vue = (function (exports) {
|
|
|
7431
7476
|
: normalizeVNode(c2[i]));
|
|
7432
7477
|
if (nextChild.key != null) {
|
|
7433
7478
|
if (keyToNewIndexMap.has(nextChild.key)) {
|
|
7434
|
-
warn
|
|
7479
|
+
warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
|
|
7435
7480
|
}
|
|
7436
7481
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
7437
7482
|
}
|
|
@@ -7814,6 +7859,10 @@ var Vue = (function (exports) {
|
|
|
7814
7859
|
if (!shallow)
|
|
7815
7860
|
traverseStaticChildren(c1, c2);
|
|
7816
7861
|
}
|
|
7862
|
+
// #6852 also inherit for text nodes
|
|
7863
|
+
if (c2.type === Text) {
|
|
7864
|
+
c2.el = c1.el;
|
|
7865
|
+
}
|
|
7817
7866
|
// also inherit for comment nodes, but not placeholders (e.g. v-if which
|
|
7818
7867
|
// would have received .el during block patch)
|
|
7819
7868
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -7872,14 +7921,14 @@ var Vue = (function (exports) {
|
|
|
7872
7921
|
const targetSelector = props && props.to;
|
|
7873
7922
|
if (isString(targetSelector)) {
|
|
7874
7923
|
if (!select) {
|
|
7875
|
-
warn
|
|
7924
|
+
warn(`Current renderer does not support string target for Teleports. ` +
|
|
7876
7925
|
`(missing querySelector renderer option)`);
|
|
7877
7926
|
return null;
|
|
7878
7927
|
}
|
|
7879
7928
|
else {
|
|
7880
7929
|
const target = select(targetSelector);
|
|
7881
7930
|
if (!target) {
|
|
7882
|
-
warn
|
|
7931
|
+
warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
|
|
7883
7932
|
`Note the target element must exist before the component is mounted - ` +
|
|
7884
7933
|
`i.e. the target cannot be rendered by the component itself, and ` +
|
|
7885
7934
|
`ideally should be outside of the entire Vue component tree.`);
|
|
@@ -7889,7 +7938,7 @@ var Vue = (function (exports) {
|
|
|
7889
7938
|
}
|
|
7890
7939
|
else {
|
|
7891
7940
|
if (!targetSelector && !isTeleportDisabled(props)) {
|
|
7892
|
-
warn
|
|
7941
|
+
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
7893
7942
|
}
|
|
7894
7943
|
return targetSelector;
|
|
7895
7944
|
}
|
|
@@ -7922,7 +7971,7 @@ var Vue = (function (exports) {
|
|
|
7922
7971
|
isSVG = isSVG || isTargetSVG(target);
|
|
7923
7972
|
}
|
|
7924
7973
|
else if (!disabled) {
|
|
7925
|
-
warn
|
|
7974
|
+
warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
|
|
7926
7975
|
}
|
|
7927
7976
|
const mount = (container, anchor) => {
|
|
7928
7977
|
// Teleport *always* has Array children. This is enforced in both the
|
|
@@ -7974,7 +8023,7 @@ var Vue = (function (exports) {
|
|
|
7974
8023
|
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
7975
8024
|
}
|
|
7976
8025
|
else {
|
|
7977
|
-
warn
|
|
8026
|
+
warn('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
7978
8027
|
}
|
|
7979
8028
|
}
|
|
7980
8029
|
else if (wasDisabled) {
|
|
@@ -7984,6 +8033,7 @@ var Vue = (function (exports) {
|
|
|
7984
8033
|
}
|
|
7985
8034
|
}
|
|
7986
8035
|
}
|
|
8036
|
+
updateCssVars(n2);
|
|
7987
8037
|
},
|
|
7988
8038
|
remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
7989
8039
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
@@ -8062,11 +8112,26 @@ var Vue = (function (exports) {
|
|
|
8062
8112
|
hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
8063
8113
|
}
|
|
8064
8114
|
}
|
|
8115
|
+
updateCssVars(vnode);
|
|
8065
8116
|
}
|
|
8066
8117
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
8067
8118
|
}
|
|
8068
8119
|
// Force-casted public typing for h and TSX props inference
|
|
8069
8120
|
const Teleport = TeleportImpl;
|
|
8121
|
+
function updateCssVars(vnode) {
|
|
8122
|
+
// presence of .ut method indicates owner component uses css vars.
|
|
8123
|
+
// code path here can assume browser environment.
|
|
8124
|
+
const ctx = vnode.ctx;
|
|
8125
|
+
if (ctx && ctx.ut) {
|
|
8126
|
+
let node = vnode.children[0].el;
|
|
8127
|
+
while (node !== vnode.targetAnchor) {
|
|
8128
|
+
if (node.nodeType === 1)
|
|
8129
|
+
node.setAttribute('data-v-owner', ctx.uid);
|
|
8130
|
+
node = node.nextSibling;
|
|
8131
|
+
}
|
|
8132
|
+
ctx.ut();
|
|
8133
|
+
}
|
|
8134
|
+
}
|
|
8070
8135
|
|
|
8071
8136
|
const Fragment = Symbol('Fragment' );
|
|
8072
8137
|
const Text = Symbol('Text' );
|
|
@@ -8161,6 +8226,10 @@ var Vue = (function (exports) {
|
|
|
8161
8226
|
function isSameVNodeType(n1, n2) {
|
|
8162
8227
|
if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
|
|
8163
8228
|
hmrDirtyComponents.has(n2.type)) {
|
|
8229
|
+
// #7042, ensure the vnode being unmounted during HMR
|
|
8230
|
+
// bitwise operations to remove keep alive flags
|
|
8231
|
+
n1.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
8232
|
+
n2.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
8164
8233
|
// HMR only: if the component has been hot-updated, force a reload.
|
|
8165
8234
|
return false;
|
|
8166
8235
|
}
|
|
@@ -8216,7 +8285,8 @@ var Vue = (function (exports) {
|
|
|
8216
8285
|
patchFlag,
|
|
8217
8286
|
dynamicProps,
|
|
8218
8287
|
dynamicChildren: null,
|
|
8219
|
-
appContext: null
|
|
8288
|
+
appContext: null,
|
|
8289
|
+
ctx: currentRenderingInstance
|
|
8220
8290
|
};
|
|
8221
8291
|
if (needFullChildrenNormalization) {
|
|
8222
8292
|
normalizeChildren(vnode, children);
|
|
@@ -8234,7 +8304,7 @@ var Vue = (function (exports) {
|
|
|
8234
8304
|
}
|
|
8235
8305
|
// validate key
|
|
8236
8306
|
if (vnode.key !== vnode.key) {
|
|
8237
|
-
warn
|
|
8307
|
+
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
8238
8308
|
}
|
|
8239
8309
|
// track vnode for block tree
|
|
8240
8310
|
if (isBlockTreeEnabled > 0 &&
|
|
@@ -8258,7 +8328,7 @@ var Vue = (function (exports) {
|
|
|
8258
8328
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
8259
8329
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
8260
8330
|
if (!type) {
|
|
8261
|
-
warn
|
|
8331
|
+
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
8262
8332
|
}
|
|
8263
8333
|
type = Comment;
|
|
8264
8334
|
}
|
|
@@ -8316,7 +8386,7 @@ var Vue = (function (exports) {
|
|
|
8316
8386
|
: 0;
|
|
8317
8387
|
if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
8318
8388
|
type = toRaw(type);
|
|
8319
|
-
warn
|
|
8389
|
+
warn(`Vue received a Component which was made a reactive object. This can ` +
|
|
8320
8390
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
8321
8391
|
`marking the component with \`markRaw\` or using \`shallowRef\` ` +
|
|
8322
8392
|
`instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
|
|
@@ -8383,7 +8453,9 @@ var Vue = (function (exports) {
|
|
|
8383
8453
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
8384
8454
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
8385
8455
|
el: vnode.el,
|
|
8386
|
-
anchor: vnode.anchor
|
|
8456
|
+
anchor: vnode.anchor,
|
|
8457
|
+
ctx: vnode.ctx,
|
|
8458
|
+
ce: vnode.ce
|
|
8387
8459
|
};
|
|
8388
8460
|
return cloned;
|
|
8389
8461
|
}
|
|
@@ -8550,13 +8622,13 @@ var Vue = (function (exports) {
|
|
|
8550
8622
|
}
|
|
8551
8623
|
|
|
8552
8624
|
const emptyAppContext = createAppContext();
|
|
8553
|
-
let uid
|
|
8625
|
+
let uid = 0;
|
|
8554
8626
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8555
8627
|
const type = vnode.type;
|
|
8556
8628
|
// inherit parent app context - or - if root, adopt from root vnode
|
|
8557
8629
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
8558
8630
|
const instance = {
|
|
8559
|
-
uid: uid
|
|
8631
|
+
uid: uid++,
|
|
8560
8632
|
vnode,
|
|
8561
8633
|
type,
|
|
8562
8634
|
parent,
|
|
@@ -8626,7 +8698,7 @@ var Vue = (function (exports) {
|
|
|
8626
8698
|
instance.ctx = createDevRenderContext(instance);
|
|
8627
8699
|
}
|
|
8628
8700
|
instance.root = parent ? parent.root : instance;
|
|
8629
|
-
instance.emit = emit
|
|
8701
|
+
instance.emit = emit.bind(null, instance);
|
|
8630
8702
|
// apply custom element special handling
|
|
8631
8703
|
if (vnode.ce) {
|
|
8632
8704
|
vnode.ce(instance);
|
|
@@ -8647,7 +8719,7 @@ var Vue = (function (exports) {
|
|
|
8647
8719
|
function validateComponentName(name, config) {
|
|
8648
8720
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
8649
8721
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
8650
|
-
warn
|
|
8722
|
+
warn('Do not use built-in or reserved HTML elements as component id: ' + name);
|
|
8651
8723
|
}
|
|
8652
8724
|
}
|
|
8653
8725
|
function isStatefulComponent(instance) {
|
|
@@ -8686,7 +8758,7 @@ var Vue = (function (exports) {
|
|
|
8686
8758
|
}
|
|
8687
8759
|
}
|
|
8688
8760
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
8689
|
-
warn
|
|
8761
|
+
warn(`"compilerOptions" is only supported when using a build of Vue that ` +
|
|
8690
8762
|
`includes the runtime compiler. Since you are using a runtime-only ` +
|
|
8691
8763
|
`build, the options should be passed via your build tool config instead.`);
|
|
8692
8764
|
}
|
|
@@ -8727,7 +8799,7 @@ var Vue = (function (exports) {
|
|
|
8727
8799
|
instance.asyncDep = setupResult;
|
|
8728
8800
|
if (!instance.suspense) {
|
|
8729
8801
|
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
8730
|
-
warn
|
|
8802
|
+
warn(`Component <${name}>: setup function returned a promise, but no ` +
|
|
8731
8803
|
`<Suspense> boundary was found in the parent component tree. ` +
|
|
8732
8804
|
`A component with async setup() must be nested in a <Suspense> ` +
|
|
8733
8805
|
`in order to be rendered.`);
|
|
@@ -8751,7 +8823,7 @@ var Vue = (function (exports) {
|
|
|
8751
8823
|
}
|
|
8752
8824
|
else if (isObject(setupResult)) {
|
|
8753
8825
|
if (isVNode(setupResult)) {
|
|
8754
|
-
warn
|
|
8826
|
+
warn(`setup() should not return VNodes directly - ` +
|
|
8755
8827
|
`return a render function instead.`);
|
|
8756
8828
|
}
|
|
8757
8829
|
// setup returned bindings.
|
|
@@ -8765,18 +8837,18 @@ var Vue = (function (exports) {
|
|
|
8765
8837
|
}
|
|
8766
8838
|
}
|
|
8767
8839
|
else if (setupResult !== undefined) {
|
|
8768
|
-
warn
|
|
8840
|
+
warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
|
|
8769
8841
|
}
|
|
8770
8842
|
finishComponentSetup(instance, isSSR);
|
|
8771
8843
|
}
|
|
8772
|
-
let compile;
|
|
8844
|
+
let compile$1;
|
|
8773
8845
|
let installWithProxy;
|
|
8774
8846
|
/**
|
|
8775
8847
|
* For runtime-dom to register the compiler.
|
|
8776
8848
|
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
8777
8849
|
*/
|
|
8778
8850
|
function registerRuntimeCompiler(_compile) {
|
|
8779
|
-
compile = _compile;
|
|
8851
|
+
compile$1 = _compile;
|
|
8780
8852
|
installWithProxy = i => {
|
|
8781
8853
|
if (i.render._rc) {
|
|
8782
8854
|
i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
|
|
@@ -8784,7 +8856,7 @@ var Vue = (function (exports) {
|
|
|
8784
8856
|
};
|
|
8785
8857
|
}
|
|
8786
8858
|
// dev only
|
|
8787
|
-
const isRuntimeOnly = () => !compile;
|
|
8859
|
+
const isRuntimeOnly = () => !compile$1;
|
|
8788
8860
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
8789
8861
|
const Component = instance.type;
|
|
8790
8862
|
// template / render function normalization
|
|
@@ -8792,7 +8864,7 @@ var Vue = (function (exports) {
|
|
|
8792
8864
|
if (!instance.render) {
|
|
8793
8865
|
// only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
|
|
8794
8866
|
// is done by server-renderer
|
|
8795
|
-
if (!isSSR && compile && !Component.render) {
|
|
8867
|
+
if (!isSSR && compile$1 && !Component.render) {
|
|
8796
8868
|
const template = Component.template ||
|
|
8797
8869
|
resolveMergedOptions(instance).template;
|
|
8798
8870
|
if (template) {
|
|
@@ -8805,7 +8877,7 @@ var Vue = (function (exports) {
|
|
|
8805
8877
|
isCustomElement,
|
|
8806
8878
|
delimiters
|
|
8807
8879
|
}, compilerOptions), componentCompilerOptions);
|
|
8808
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
8880
|
+
Component.render = compile$1(template, finalCompilerOptions);
|
|
8809
8881
|
{
|
|
8810
8882
|
endMeasure(instance, `compile`);
|
|
8811
8883
|
}
|
|
@@ -8831,14 +8903,14 @@ var Vue = (function (exports) {
|
|
|
8831
8903
|
// the runtime compilation of template in SSR is done by server-render
|
|
8832
8904
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8833
8905
|
/* istanbul ignore if */
|
|
8834
|
-
if (!compile && Component.template) {
|
|
8835
|
-
warn
|
|
8906
|
+
if (!compile$1 && Component.template) {
|
|
8907
|
+
warn(`Component provided template option but ` +
|
|
8836
8908
|
`runtime compilation is not supported in this build of Vue.` +
|
|
8837
8909
|
(` Use "vue.global.js" instead.`
|
|
8838
8910
|
) /* should not happen */);
|
|
8839
8911
|
}
|
|
8840
8912
|
else {
|
|
8841
|
-
warn
|
|
8913
|
+
warn(`Component is missing template or render function.`);
|
|
8842
8914
|
}
|
|
8843
8915
|
}
|
|
8844
8916
|
}
|
|
@@ -8850,11 +8922,11 @@ var Vue = (function (exports) {
|
|
|
8850
8922
|
return target[key];
|
|
8851
8923
|
},
|
|
8852
8924
|
set() {
|
|
8853
|
-
warn
|
|
8925
|
+
warn(`setupContext.attrs is readonly.`);
|
|
8854
8926
|
return false;
|
|
8855
8927
|
},
|
|
8856
8928
|
deleteProperty() {
|
|
8857
|
-
warn
|
|
8929
|
+
warn(`setupContext.attrs is readonly.`);
|
|
8858
8930
|
return false;
|
|
8859
8931
|
}
|
|
8860
8932
|
}
|
|
@@ -8862,8 +8934,24 @@ var Vue = (function (exports) {
|
|
|
8862
8934
|
}
|
|
8863
8935
|
function createSetupContext(instance) {
|
|
8864
8936
|
const expose = exposed => {
|
|
8865
|
-
|
|
8866
|
-
|
|
8937
|
+
{
|
|
8938
|
+
if (instance.exposed) {
|
|
8939
|
+
warn(`expose() should be called only once per setup().`);
|
|
8940
|
+
}
|
|
8941
|
+
if (exposed != null) {
|
|
8942
|
+
let exposedType = typeof exposed;
|
|
8943
|
+
if (exposedType === 'object') {
|
|
8944
|
+
if (isArray(exposed)) {
|
|
8945
|
+
exposedType = 'array';
|
|
8946
|
+
}
|
|
8947
|
+
else if (isRef(exposed)) {
|
|
8948
|
+
exposedType = 'ref';
|
|
8949
|
+
}
|
|
8950
|
+
}
|
|
8951
|
+
if (exposedType !== 'object') {
|
|
8952
|
+
warn(`expose() should be passed a plain object, received ${exposedType}.`);
|
|
8953
|
+
}
|
|
8954
|
+
}
|
|
8867
8955
|
}
|
|
8868
8956
|
instance.exposed = exposed || {};
|
|
8869
8957
|
};
|
|
@@ -8938,13 +9026,13 @@ var Vue = (function (exports) {
|
|
|
8938
9026
|
return isFunction(value) && '__vccOpts' in value;
|
|
8939
9027
|
}
|
|
8940
9028
|
|
|
8941
|
-
const computed
|
|
9029
|
+
const computed = ((getterOrOptions, debugOptions) => {
|
|
8942
9030
|
// @ts-ignore
|
|
8943
|
-
return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9031
|
+
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
8944
9032
|
});
|
|
8945
9033
|
|
|
8946
9034
|
// dev only
|
|
8947
|
-
const warnRuntimeUsage = (method) => warn
|
|
9035
|
+
const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
|
|
8948
9036
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
8949
9037
|
`compiled away and passing it at runtime has no effect.`);
|
|
8950
9038
|
// implementation
|
|
@@ -9011,7 +9099,7 @@ var Vue = (function (exports) {
|
|
|
9011
9099
|
function getContext() {
|
|
9012
9100
|
const i = getCurrentInstance();
|
|
9013
9101
|
if (!i) {
|
|
9014
|
-
warn
|
|
9102
|
+
warn(`useContext() called without active instance.`);
|
|
9015
9103
|
}
|
|
9016
9104
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
9017
9105
|
}
|
|
@@ -9038,7 +9126,7 @@ var Vue = (function (exports) {
|
|
|
9038
9126
|
props[key] = { default: defaults[key] };
|
|
9039
9127
|
}
|
|
9040
9128
|
else {
|
|
9041
|
-
warn
|
|
9129
|
+
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
9042
9130
|
}
|
|
9043
9131
|
}
|
|
9044
9132
|
return props;
|
|
@@ -9081,7 +9169,7 @@ var Vue = (function (exports) {
|
|
|
9081
9169
|
function withAsyncContext(getAwaitable) {
|
|
9082
9170
|
const ctx = getCurrentInstance();
|
|
9083
9171
|
if (!ctx) {
|
|
9084
|
-
warn
|
|
9172
|
+
warn(`withAsyncContext called without active current instance. ` +
|
|
9085
9173
|
`This is likely a bug.`);
|
|
9086
9174
|
}
|
|
9087
9175
|
let awaitable = getAwaitable();
|
|
@@ -9126,7 +9214,7 @@ var Vue = (function (exports) {
|
|
|
9126
9214
|
const ssrContextKey = Symbol(`ssrContext` );
|
|
9127
9215
|
const useSSRContext = () => {
|
|
9128
9216
|
{
|
|
9129
|
-
warn
|
|
9217
|
+
warn(`useSSRContext() is not supported in the global build.`);
|
|
9130
9218
|
}
|
|
9131
9219
|
};
|
|
9132
9220
|
|
|
@@ -9347,7 +9435,7 @@ var Vue = (function (exports) {
|
|
|
9347
9435
|
}
|
|
9348
9436
|
|
|
9349
9437
|
// Core API ------------------------------------------------------------------
|
|
9350
|
-
const version = "3.2.
|
|
9438
|
+
const version = "3.2.46";
|
|
9351
9439
|
/**
|
|
9352
9440
|
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
9353
9441
|
* @internal
|
|
@@ -9464,9 +9552,6 @@ var Vue = (function (exports) {
|
|
|
9464
9552
|
const style = el.style;
|
|
9465
9553
|
const isCssString = isString(next);
|
|
9466
9554
|
if (next && !isCssString) {
|
|
9467
|
-
for (const key in next) {
|
|
9468
|
-
setStyle(style, key, next[key]);
|
|
9469
|
-
}
|
|
9470
9555
|
if (prev && !isString(prev)) {
|
|
9471
9556
|
for (const key in prev) {
|
|
9472
9557
|
if (next[key] == null) {
|
|
@@ -9474,6 +9559,9 @@ var Vue = (function (exports) {
|
|
|
9474
9559
|
}
|
|
9475
9560
|
}
|
|
9476
9561
|
}
|
|
9562
|
+
for (const key in next) {
|
|
9563
|
+
setStyle(style, key, next[key]);
|
|
9564
|
+
}
|
|
9477
9565
|
}
|
|
9478
9566
|
else {
|
|
9479
9567
|
const currentDisplay = style.display;
|
|
@@ -9504,7 +9592,7 @@ var Vue = (function (exports) {
|
|
|
9504
9592
|
val = '';
|
|
9505
9593
|
{
|
|
9506
9594
|
if (semicolonRE.test(val)) {
|
|
9507
|
-
warn
|
|
9595
|
+
warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
9508
9596
|
}
|
|
9509
9597
|
}
|
|
9510
9598
|
if (name.startsWith('--')) {
|
|
@@ -9628,7 +9716,7 @@ var Vue = (function (exports) {
|
|
|
9628
9716
|
catch (e) {
|
|
9629
9717
|
// do not warn if value is auto-coerced from nullish values
|
|
9630
9718
|
if (!needRemove) {
|
|
9631
|
-
warn
|
|
9719
|
+
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
|
9632
9720
|
`value ${value} is invalid.`, e);
|
|
9633
9721
|
}
|
|
9634
9722
|
}
|
|
@@ -9832,16 +9920,25 @@ var Vue = (function (exports) {
|
|
|
9832
9920
|
}
|
|
9833
9921
|
else {
|
|
9834
9922
|
if (this.shadowRoot) {
|
|
9835
|
-
warn
|
|
9923
|
+
warn(`Custom element has pre-rendered declarative shadow root but is not ` +
|
|
9836
9924
|
`defined as hydratable. Use \`defineSSRCustomElement\`.`);
|
|
9837
9925
|
}
|
|
9838
9926
|
this.attachShadow({ mode: 'open' });
|
|
9927
|
+
if (!this._def.__asyncLoader) {
|
|
9928
|
+
// for sync component defs we can immediately resolve props
|
|
9929
|
+
this._resolveProps(this._def);
|
|
9930
|
+
}
|
|
9839
9931
|
}
|
|
9840
9932
|
}
|
|
9841
9933
|
connectedCallback() {
|
|
9842
9934
|
this._connected = true;
|
|
9843
9935
|
if (!this._instance) {
|
|
9844
|
-
this.
|
|
9936
|
+
if (this._resolved) {
|
|
9937
|
+
this._update();
|
|
9938
|
+
}
|
|
9939
|
+
else {
|
|
9940
|
+
this._resolveDef();
|
|
9941
|
+
}
|
|
9845
9942
|
}
|
|
9846
9943
|
}
|
|
9847
9944
|
disconnectedCallback() {
|
|
@@ -9857,9 +9954,6 @@ var Vue = (function (exports) {
|
|
|
9857
9954
|
* resolve inner component definition (handle possible async component)
|
|
9858
9955
|
*/
|
|
9859
9956
|
_resolveDef() {
|
|
9860
|
-
if (this._resolved) {
|
|
9861
|
-
return;
|
|
9862
|
-
}
|
|
9863
9957
|
this._resolved = true;
|
|
9864
9958
|
// set initial attrs
|
|
9865
9959
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
@@ -9871,38 +9965,26 @@ var Vue = (function (exports) {
|
|
|
9871
9965
|
this._setAttr(m.attributeName);
|
|
9872
9966
|
}
|
|
9873
9967
|
}).observe(this, { attributes: true });
|
|
9874
|
-
const resolve = (def) => {
|
|
9875
|
-
const { props
|
|
9876
|
-
const hasOptions = !isArray(props);
|
|
9877
|
-
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
9968
|
+
const resolve = (def, isAsync = false) => {
|
|
9969
|
+
const { props, styles } = def;
|
|
9878
9970
|
// cast Number-type props set before resolve
|
|
9879
9971
|
let numberProps;
|
|
9880
|
-
if (
|
|
9881
|
-
for (const key in
|
|
9972
|
+
if (props && !isArray(props)) {
|
|
9973
|
+
for (const key in props) {
|
|
9882
9974
|
const opt = props[key];
|
|
9883
9975
|
if (opt === Number || (opt && opt.type === Number)) {
|
|
9884
|
-
|
|
9885
|
-
|
|
9976
|
+
if (key in this._props) {
|
|
9977
|
+
this._props[key] = toNumber(this._props[key]);
|
|
9978
|
+
}
|
|
9979
|
+
(numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
|
|
9886
9980
|
}
|
|
9887
9981
|
}
|
|
9888
9982
|
}
|
|
9889
9983
|
this._numberProps = numberProps;
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
}
|
|
9895
|
-
}
|
|
9896
|
-
// defining getter/setters on prototype
|
|
9897
|
-
for (const key of rawKeys.map(camelize)) {
|
|
9898
|
-
Object.defineProperty(this, key, {
|
|
9899
|
-
get() {
|
|
9900
|
-
return this._getProp(key);
|
|
9901
|
-
},
|
|
9902
|
-
set(val) {
|
|
9903
|
-
this._setProp(key, val);
|
|
9904
|
-
}
|
|
9905
|
-
});
|
|
9984
|
+
if (isAsync) {
|
|
9985
|
+
// defining getter/setters on prototype
|
|
9986
|
+
// for sync defs, this already happened in the constructor
|
|
9987
|
+
this._resolveProps(def);
|
|
9906
9988
|
}
|
|
9907
9989
|
// apply CSS
|
|
9908
9990
|
this._applyStyles(styles);
|
|
@@ -9911,12 +9993,33 @@ var Vue = (function (exports) {
|
|
|
9911
9993
|
};
|
|
9912
9994
|
const asyncDef = this._def.__asyncLoader;
|
|
9913
9995
|
if (asyncDef) {
|
|
9914
|
-
asyncDef().then(resolve);
|
|
9996
|
+
asyncDef().then(def => resolve(def, true));
|
|
9915
9997
|
}
|
|
9916
9998
|
else {
|
|
9917
9999
|
resolve(this._def);
|
|
9918
10000
|
}
|
|
9919
10001
|
}
|
|
10002
|
+
_resolveProps(def) {
|
|
10003
|
+
const { props } = def;
|
|
10004
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
10005
|
+
// check if there are props set pre-upgrade or connect
|
|
10006
|
+
for (const key of Object.keys(this)) {
|
|
10007
|
+
if (key[0] !== '_' && declaredPropKeys.includes(key)) {
|
|
10008
|
+
this._setProp(key, this[key], true, false);
|
|
10009
|
+
}
|
|
10010
|
+
}
|
|
10011
|
+
// defining getter/setters on prototype
|
|
10012
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
10013
|
+
Object.defineProperty(this, key, {
|
|
10014
|
+
get() {
|
|
10015
|
+
return this._getProp(key);
|
|
10016
|
+
},
|
|
10017
|
+
set(val) {
|
|
10018
|
+
this._setProp(key, val);
|
|
10019
|
+
}
|
|
10020
|
+
});
|
|
10021
|
+
}
|
|
10022
|
+
}
|
|
9920
10023
|
_setAttr(key) {
|
|
9921
10024
|
let value = this.getAttribute(key);
|
|
9922
10025
|
const camelKey = camelize(key);
|
|
@@ -9972,27 +10075,31 @@ var Vue = (function (exports) {
|
|
|
9972
10075
|
this._styles.length = 0;
|
|
9973
10076
|
}
|
|
9974
10077
|
this._applyStyles(newStyles);
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
if (!this._def.__asyncLoader) {
|
|
9978
|
-
// reload
|
|
9979
|
-
this._instance = null;
|
|
9980
|
-
this._update();
|
|
9981
|
-
}
|
|
10078
|
+
this._instance = null;
|
|
10079
|
+
this._update();
|
|
9982
10080
|
};
|
|
9983
10081
|
}
|
|
9984
|
-
|
|
9985
|
-
instance.emit = (event, ...args) => {
|
|
10082
|
+
const dispatch = (event, args) => {
|
|
9986
10083
|
this.dispatchEvent(new CustomEvent(event, {
|
|
9987
10084
|
detail: args
|
|
9988
10085
|
}));
|
|
9989
10086
|
};
|
|
10087
|
+
// intercept emit
|
|
10088
|
+
instance.emit = (event, ...args) => {
|
|
10089
|
+
// dispatch both the raw and hyphenated versions of an event
|
|
10090
|
+
// to match Vue behavior
|
|
10091
|
+
dispatch(event, args);
|
|
10092
|
+
if (hyphenate(event) !== event) {
|
|
10093
|
+
dispatch(hyphenate(event), args);
|
|
10094
|
+
}
|
|
10095
|
+
};
|
|
9990
10096
|
// locate nearest Vue custom element parent for provide/inject
|
|
9991
10097
|
let parent = this;
|
|
9992
10098
|
while ((parent =
|
|
9993
10099
|
parent && (parent.parentNode || parent.host))) {
|
|
9994
10100
|
if (parent instanceof VueElement) {
|
|
9995
10101
|
instance.parent = parent._instance;
|
|
10102
|
+
instance.provides = parent._instance.provides;
|
|
9996
10103
|
break;
|
|
9997
10104
|
}
|
|
9998
10105
|
}
|
|
@@ -10019,7 +10126,7 @@ var Vue = (function (exports) {
|
|
|
10019
10126
|
/* istanbul ignore else */
|
|
10020
10127
|
{
|
|
10021
10128
|
{
|
|
10022
|
-
warn
|
|
10129
|
+
warn(`useCssModule() is not supported in the global build.`);
|
|
10023
10130
|
}
|
|
10024
10131
|
return EMPTY_OBJ;
|
|
10025
10132
|
}
|
|
@@ -10033,10 +10140,17 @@ var Vue = (function (exports) {
|
|
|
10033
10140
|
const instance = getCurrentInstance();
|
|
10034
10141
|
/* istanbul ignore next */
|
|
10035
10142
|
if (!instance) {
|
|
10036
|
-
warn
|
|
10143
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
10037
10144
|
return;
|
|
10038
10145
|
}
|
|
10039
|
-
const
|
|
10146
|
+
const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
|
|
10147
|
+
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node => setVarsOnNode(node, vars));
|
|
10148
|
+
});
|
|
10149
|
+
const setVars = () => {
|
|
10150
|
+
const vars = getter(instance.proxy);
|
|
10151
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
10152
|
+
updateTeleports(vars);
|
|
10153
|
+
};
|
|
10040
10154
|
watchPostEffect(setVars);
|
|
10041
10155
|
onMounted(() => {
|
|
10042
10156
|
const ob = new MutationObserver(setVars);
|
|
@@ -10083,7 +10197,7 @@ var Vue = (function (exports) {
|
|
|
10083
10197
|
}
|
|
10084
10198
|
}
|
|
10085
10199
|
|
|
10086
|
-
const TRANSITION = 'transition';
|
|
10200
|
+
const TRANSITION$1 = 'transition';
|
|
10087
10201
|
const ANIMATION = 'animation';
|
|
10088
10202
|
// DOM Transition is a higher-order-component based on the platform-agnostic
|
|
10089
10203
|
// base Transition component, with DOM-specific logic.
|
|
@@ -10113,7 +10227,7 @@ var Vue = (function (exports) {
|
|
|
10113
10227
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
10114
10228
|
* with custom HOCs.
|
|
10115
10229
|
*/
|
|
10116
|
-
const callHook
|
|
10230
|
+
const callHook = (hook, args = []) => {
|
|
10117
10231
|
if (isArray(hook)) {
|
|
10118
10232
|
hook.forEach(h => h(...args));
|
|
10119
10233
|
}
|
|
@@ -10163,7 +10277,7 @@ var Vue = (function (exports) {
|
|
|
10163
10277
|
return (el, done) => {
|
|
10164
10278
|
const hook = isAppear ? onAppear : onEnter;
|
|
10165
10279
|
const resolve = () => finishEnter(el, isAppear, done);
|
|
10166
|
-
callHook
|
|
10280
|
+
callHook(hook, [el, resolve]);
|
|
10167
10281
|
nextFrame(() => {
|
|
10168
10282
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
10169
10283
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
@@ -10175,12 +10289,12 @@ var Vue = (function (exports) {
|
|
|
10175
10289
|
};
|
|
10176
10290
|
return extend(baseProps, {
|
|
10177
10291
|
onBeforeEnter(el) {
|
|
10178
|
-
callHook
|
|
10292
|
+
callHook(onBeforeEnter, [el]);
|
|
10179
10293
|
addTransitionClass(el, enterFromClass);
|
|
10180
10294
|
addTransitionClass(el, enterActiveClass);
|
|
10181
10295
|
},
|
|
10182
10296
|
onBeforeAppear(el) {
|
|
10183
|
-
callHook
|
|
10297
|
+
callHook(onBeforeAppear, [el]);
|
|
10184
10298
|
addTransitionClass(el, appearFromClass);
|
|
10185
10299
|
addTransitionClass(el, appearActiveClass);
|
|
10186
10300
|
},
|
|
@@ -10204,19 +10318,19 @@ var Vue = (function (exports) {
|
|
|
10204
10318
|
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
10205
10319
|
}
|
|
10206
10320
|
});
|
|
10207
|
-
callHook
|
|
10321
|
+
callHook(onLeave, [el, resolve]);
|
|
10208
10322
|
},
|
|
10209
10323
|
onEnterCancelled(el) {
|
|
10210
10324
|
finishEnter(el, false);
|
|
10211
|
-
callHook
|
|
10325
|
+
callHook(onEnterCancelled, [el]);
|
|
10212
10326
|
},
|
|
10213
10327
|
onAppearCancelled(el) {
|
|
10214
10328
|
finishEnter(el, true);
|
|
10215
|
-
callHook
|
|
10329
|
+
callHook(onAppearCancelled, [el]);
|
|
10216
10330
|
},
|
|
10217
10331
|
onLeaveCancelled(el) {
|
|
10218
10332
|
finishLeave(el);
|
|
10219
|
-
callHook
|
|
10333
|
+
callHook(onLeaveCancelled, [el]);
|
|
10220
10334
|
}
|
|
10221
10335
|
});
|
|
10222
10336
|
}
|
|
@@ -10234,18 +10348,10 @@ var Vue = (function (exports) {
|
|
|
10234
10348
|
}
|
|
10235
10349
|
function NumberOf(val) {
|
|
10236
10350
|
const res = toNumber(val);
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
}
|
|
10240
|
-
function validateDuration(val) {
|
|
10241
|
-
if (typeof val !== 'number') {
|
|
10242
|
-
warn$1(`<transition> explicit duration is not a valid number - ` +
|
|
10243
|
-
`got ${JSON.stringify(val)}.`);
|
|
10244
|
-
}
|
|
10245
|
-
else if (isNaN(val)) {
|
|
10246
|
-
warn$1(`<transition> explicit duration is NaN - ` +
|
|
10247
|
-
'the duration expression might be incorrect.');
|
|
10351
|
+
{
|
|
10352
|
+
assertNumber(res, '<transition> explicit duration');
|
|
10248
10353
|
}
|
|
10354
|
+
return res;
|
|
10249
10355
|
}
|
|
10250
10356
|
function addTransitionClass(el, cls) {
|
|
10251
10357
|
cls.split(/\s+/).forEach(c => c && el.classList.add(c));
|
|
@@ -10304,8 +10410,8 @@ var Vue = (function (exports) {
|
|
|
10304
10410
|
const styles = window.getComputedStyle(el);
|
|
10305
10411
|
// JSDOM may return undefined for transition properties
|
|
10306
10412
|
const getStyleProperties = (key) => (styles[key] || '').split(', ');
|
|
10307
|
-
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
10308
|
-
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
10413
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
10414
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
10309
10415
|
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
10310
10416
|
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
10311
10417
|
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
@@ -10314,9 +10420,9 @@ var Vue = (function (exports) {
|
|
|
10314
10420
|
let timeout = 0;
|
|
10315
10421
|
let propCount = 0;
|
|
10316
10422
|
/* istanbul ignore if */
|
|
10317
|
-
if (expectedType === TRANSITION) {
|
|
10423
|
+
if (expectedType === TRANSITION$1) {
|
|
10318
10424
|
if (transitionTimeout > 0) {
|
|
10319
|
-
type = TRANSITION;
|
|
10425
|
+
type = TRANSITION$1;
|
|
10320
10426
|
timeout = transitionTimeout;
|
|
10321
10427
|
propCount = transitionDurations.length;
|
|
10322
10428
|
}
|
|
@@ -10333,17 +10439,17 @@ var Vue = (function (exports) {
|
|
|
10333
10439
|
type =
|
|
10334
10440
|
timeout > 0
|
|
10335
10441
|
? transitionTimeout > animationTimeout
|
|
10336
|
-
? TRANSITION
|
|
10442
|
+
? TRANSITION$1
|
|
10337
10443
|
: ANIMATION
|
|
10338
10444
|
: null;
|
|
10339
10445
|
propCount = type
|
|
10340
|
-
? type === TRANSITION
|
|
10446
|
+
? type === TRANSITION$1
|
|
10341
10447
|
? transitionDurations.length
|
|
10342
10448
|
: animationDurations.length
|
|
10343
10449
|
: 0;
|
|
10344
10450
|
}
|
|
10345
|
-
const hasTransform = type === TRANSITION &&
|
|
10346
|
-
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
|
|
10451
|
+
const hasTransform = type === TRANSITION$1 &&
|
|
10452
|
+
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION$1}Property`).toString());
|
|
10347
10453
|
return {
|
|
10348
10454
|
type,
|
|
10349
10455
|
timeout,
|
|
@@ -10428,7 +10534,7 @@ var Vue = (function (exports) {
|
|
|
10428
10534
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10429
10535
|
}
|
|
10430
10536
|
else {
|
|
10431
|
-
warn
|
|
10537
|
+
warn(`<TransitionGroup> children must be keyed.`);
|
|
10432
10538
|
}
|
|
10433
10539
|
}
|
|
10434
10540
|
if (prevChildren) {
|
|
@@ -10442,6 +10548,14 @@ var Vue = (function (exports) {
|
|
|
10442
10548
|
};
|
|
10443
10549
|
}
|
|
10444
10550
|
};
|
|
10551
|
+
/**
|
|
10552
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
10553
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
10554
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
10555
|
+
* in a function and mark the function's invocation as pure.
|
|
10556
|
+
*/
|
|
10557
|
+
const removeMode = (props) => delete props.mode;
|
|
10558
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
10445
10559
|
const TransitionGroup = TransitionGroupImpl;
|
|
10446
10560
|
function callPendingCbs(c) {
|
|
10447
10561
|
const el = c.el;
|
|
@@ -10517,7 +10631,7 @@ var Vue = (function (exports) {
|
|
|
10517
10631
|
domValue = domValue.trim();
|
|
10518
10632
|
}
|
|
10519
10633
|
if (castToNumber) {
|
|
10520
|
-
domValue =
|
|
10634
|
+
domValue = looseToNumber(domValue);
|
|
10521
10635
|
}
|
|
10522
10636
|
el._assign(domValue);
|
|
10523
10637
|
});
|
|
@@ -10552,7 +10666,8 @@ var Vue = (function (exports) {
|
|
|
10552
10666
|
if (trim && el.value.trim() === value) {
|
|
10553
10667
|
return;
|
|
10554
10668
|
}
|
|
10555
|
-
if ((number || el.type === 'number') &&
|
|
10669
|
+
if ((number || el.type === 'number') &&
|
|
10670
|
+
looseToNumber(el.value) === value) {
|
|
10556
10671
|
return;
|
|
10557
10672
|
}
|
|
10558
10673
|
}
|
|
@@ -10641,7 +10756,7 @@ var Vue = (function (exports) {
|
|
|
10641
10756
|
addEventListener(el, 'change', () => {
|
|
10642
10757
|
const selectedVal = Array.prototype.filter
|
|
10643
10758
|
.call(el.options, (o) => o.selected)
|
|
10644
|
-
.map((o) => number ?
|
|
10759
|
+
.map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
10645
10760
|
el._assign(el.multiple
|
|
10646
10761
|
? isSetModel
|
|
10647
10762
|
? new Set(selectedVal)
|
|
@@ -10665,7 +10780,7 @@ var Vue = (function (exports) {
|
|
|
10665
10780
|
function setSelected(el, value) {
|
|
10666
10781
|
const isMultiple = el.multiple;
|
|
10667
10782
|
if (isMultiple && !isArray(value) && !isSet(value)) {
|
|
10668
|
-
warn
|
|
10783
|
+
warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
|
10669
10784
|
`but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
|
|
10670
10785
|
return;
|
|
10671
10786
|
}
|
|
@@ -10918,7 +11033,7 @@ var Vue = (function (exports) {
|
|
|
10918
11033
|
return isCustomElement;
|
|
10919
11034
|
},
|
|
10920
11035
|
set() {
|
|
10921
|
-
warn
|
|
11036
|
+
warn(`The \`isCustomElement\` config option is deprecated. Use ` +
|
|
10922
11037
|
`\`compilerOptions.isCustomElement\` instead.`);
|
|
10923
11038
|
}
|
|
10924
11039
|
});
|
|
@@ -10932,11 +11047,11 @@ var Vue = (function (exports) {
|
|
|
10932
11047
|
`- 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`;
|
|
10933
11048
|
Object.defineProperty(app.config, 'compilerOptions', {
|
|
10934
11049
|
get() {
|
|
10935
|
-
warn
|
|
11050
|
+
warn(msg);
|
|
10936
11051
|
return compilerOptions;
|
|
10937
11052
|
},
|
|
10938
11053
|
set() {
|
|
10939
|
-
warn
|
|
11054
|
+
warn(msg);
|
|
10940
11055
|
}
|
|
10941
11056
|
});
|
|
10942
11057
|
}
|
|
@@ -10945,14 +11060,14 @@ var Vue = (function (exports) {
|
|
|
10945
11060
|
if (isString(container)) {
|
|
10946
11061
|
const res = document.querySelector(container);
|
|
10947
11062
|
if (!res) {
|
|
10948
|
-
warn
|
|
11063
|
+
warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
|
10949
11064
|
}
|
|
10950
11065
|
return res;
|
|
10951
11066
|
}
|
|
10952
11067
|
if (window.ShadowRoot &&
|
|
10953
11068
|
container instanceof window.ShadowRoot &&
|
|
10954
11069
|
container.mode === 'closed') {
|
|
10955
|
-
warn
|
|
11070
|
+
warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
10956
11071
|
}
|
|
10957
11072
|
return container;
|
|
10958
11073
|
}
|
|
@@ -10963,6 +11078,7 @@ var Vue = (function (exports) {
|
|
|
10963
11078
|
|
|
10964
11079
|
function initDev() {
|
|
10965
11080
|
{
|
|
11081
|
+
/* istanbul ignore if */
|
|
10966
11082
|
{
|
|
10967
11083
|
console.info(`You are running a development build of Vue.\n` +
|
|
10968
11084
|
`Make sure to use the production build (*.prod.js) when deploying for production.`);
|
|
@@ -11027,7 +11143,7 @@ var Vue = (function (exports) {
|
|
|
11027
11143
|
[34 /* ErrorCodes.X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
|
|
11028
11144
|
[35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
|
|
11029
11145
|
[36 /* ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
|
|
11030
|
-
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template
|
|
11146
|
+
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>. ` +
|
|
11031
11147
|
`When there are multiple named slots, all slots should use <template> ` +
|
|
11032
11148
|
`syntax to avoid scope ambiguity.`,
|
|
11033
11149
|
[38 /* ErrorCodes.X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
|
|
@@ -11037,15 +11153,16 @@ var Vue = (function (exports) {
|
|
|
11037
11153
|
[41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
|
|
11038
11154
|
[42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
|
|
11039
11155
|
[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.`,
|
|
11040
|
-
[44 /* ErrorCodes.
|
|
11041
|
-
[45 /* ErrorCodes.
|
|
11156
|
+
[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.`,
|
|
11157
|
+
[45 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
|
|
11158
|
+
[46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
|
|
11042
11159
|
// generic errors
|
|
11043
|
-
[
|
|
11044
|
-
[
|
|
11045
|
-
[
|
|
11046
|
-
[
|
|
11160
|
+
[47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
11161
|
+
[48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
|
|
11162
|
+
[49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
11163
|
+
[50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
|
|
11047
11164
|
// just to fulfill types
|
|
11048
|
-
[
|
|
11165
|
+
[51 /* ErrorCodes.__EXTEND_POINT__ */]: ``
|
|
11049
11166
|
};
|
|
11050
11167
|
|
|
11051
11168
|
const FRAGMENT = Symbol(`Fragment` );
|
|
@@ -11149,7 +11266,7 @@ var Vue = (function (exports) {
|
|
|
11149
11266
|
return {
|
|
11150
11267
|
type: 0 /* NodeTypes.ROOT */,
|
|
11151
11268
|
children,
|
|
11152
|
-
helpers:
|
|
11269
|
+
helpers: new Set(),
|
|
11153
11270
|
components: [],
|
|
11154
11271
|
directives: [],
|
|
11155
11272
|
hoists: [],
|
|
@@ -11447,7 +11564,7 @@ var Vue = (function (exports) {
|
|
|
11447
11564
|
!p.arg.isStatic) // v-bind:[foo]
|
|
11448
11565
|
);
|
|
11449
11566
|
}
|
|
11450
|
-
function isText(node) {
|
|
11567
|
+
function isText$1(node) {
|
|
11451
11568
|
return node.type === 5 /* NodeTypes.INTERPOLATION */ || node.type === 2 /* NodeTypes.TEXT */;
|
|
11452
11569
|
}
|
|
11453
11570
|
function isVSlot(p) {
|
|
@@ -12871,7 +12988,7 @@ var Vue = (function (exports) {
|
|
|
12871
12988
|
createRootCodegen(root, context);
|
|
12872
12989
|
}
|
|
12873
12990
|
// finalize meta information
|
|
12874
|
-
root.helpers = [...context.helpers.keys()];
|
|
12991
|
+
root.helpers = new Set([...context.helpers.keys()]);
|
|
12875
12992
|
root.components = [...context.components];
|
|
12876
12993
|
root.directives = [...context.directives];
|
|
12877
12994
|
root.imports = context.imports;
|
|
@@ -13074,12 +13191,16 @@ var Vue = (function (exports) {
|
|
|
13074
13191
|
if (options.onContextCreated)
|
|
13075
13192
|
options.onContextCreated(context);
|
|
13076
13193
|
const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
|
|
13077
|
-
const
|
|
13194
|
+
const helpers = Array.from(ast.helpers);
|
|
13195
|
+
const hasHelpers = helpers.length > 0;
|
|
13078
13196
|
const useWithBlock = !prefixIdentifiers && mode !== 'module';
|
|
13197
|
+
const isSetupInlined = !true ;
|
|
13079
13198
|
// preambles
|
|
13080
13199
|
// in setup() inline mode, the preamble is generated in a sub context
|
|
13081
13200
|
// and returned separately.
|
|
13082
|
-
const preambleContext =
|
|
13201
|
+
const preambleContext = isSetupInlined
|
|
13202
|
+
? createCodegenContext(ast, options)
|
|
13203
|
+
: context;
|
|
13083
13204
|
{
|
|
13084
13205
|
genFunctionPreamble(ast, preambleContext);
|
|
13085
13206
|
}
|
|
@@ -13097,7 +13218,7 @@ var Vue = (function (exports) {
|
|
|
13097
13218
|
// function mode const declarations should be inside with block
|
|
13098
13219
|
// also they should be renamed to avoid collision with user properties
|
|
13099
13220
|
if (hasHelpers) {
|
|
13100
|
-
push(`const { ${
|
|
13221
|
+
push(`const { ${helpers.map(aliasHelper).join(', ')} } = _Vue`);
|
|
13101
13222
|
push(`\n`);
|
|
13102
13223
|
newline();
|
|
13103
13224
|
}
|
|
@@ -13144,7 +13265,7 @@ var Vue = (function (exports) {
|
|
|
13144
13265
|
return {
|
|
13145
13266
|
ast,
|
|
13146
13267
|
code: context.code,
|
|
13147
|
-
preamble: ``,
|
|
13268
|
+
preamble: isSetupInlined ? preambleContext.code : ``,
|
|
13148
13269
|
// SourceMapGenerator does have toJSON() method but it's not in the types
|
|
13149
13270
|
map: context.map ? context.map.toJSON() : undefined
|
|
13150
13271
|
};
|
|
@@ -13156,7 +13277,8 @@ var Vue = (function (exports) {
|
|
|
13156
13277
|
// In prefix mode, we place the const declaration at top so it's done
|
|
13157
13278
|
// only once; But if we not prefixing, we place the declaration inside the
|
|
13158
13279
|
// with block so it doesn't incur the `in` check cost for every helper access.
|
|
13159
|
-
|
|
13280
|
+
const helpers = Array.from(ast.helpers);
|
|
13281
|
+
if (helpers.length > 0) {
|
|
13160
13282
|
{
|
|
13161
13283
|
// "with" mode.
|
|
13162
13284
|
// save Vue in a separate variable to avoid collision
|
|
@@ -13172,7 +13294,7 @@ var Vue = (function (exports) {
|
|
|
13172
13294
|
CREATE_TEXT,
|
|
13173
13295
|
CREATE_STATIC
|
|
13174
13296
|
]
|
|
13175
|
-
.filter(helper =>
|
|
13297
|
+
.filter(helper => helpers.includes(helper))
|
|
13176
13298
|
.map(aliasHelper)
|
|
13177
13299
|
.join(', ');
|
|
13178
13300
|
push(`const { ${staticHelpers} } = _Vue\n`);
|
|
@@ -13217,7 +13339,7 @@ var Vue = (function (exports) {
|
|
|
13217
13339
|
}
|
|
13218
13340
|
context.pure = false;
|
|
13219
13341
|
}
|
|
13220
|
-
function isText
|
|
13342
|
+
function isText(n) {
|
|
13221
13343
|
return (isString(n) ||
|
|
13222
13344
|
n.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ||
|
|
13223
13345
|
n.type === 2 /* NodeTypes.TEXT */ ||
|
|
@@ -13226,7 +13348,7 @@ var Vue = (function (exports) {
|
|
|
13226
13348
|
}
|
|
13227
13349
|
function genNodeListAsArray(nodes, context) {
|
|
13228
13350
|
const multilines = nodes.length > 3 ||
|
|
13229
|
-
(nodes.some(n => isArray(n) || !isText
|
|
13351
|
+
(nodes.some(n => isArray(n) || !isText(n)));
|
|
13230
13352
|
context.push(`[`);
|
|
13231
13353
|
multilines && context.indent();
|
|
13232
13354
|
genNodeList(nodes, context, multilines);
|
|
@@ -13563,11 +13685,11 @@ var Vue = (function (exports) {
|
|
|
13563
13685
|
}
|
|
13564
13686
|
|
|
13565
13687
|
// these keywords should not appear inside expressions, but operators like
|
|
13566
|
-
// typeof, instanceof and in are allowed
|
|
13688
|
+
// 'typeof', 'instanceof', and 'in' are allowed
|
|
13567
13689
|
const prohibitedKeywordRE = new RegExp('\\b' +
|
|
13568
|
-
('
|
|
13569
|
-
'
|
|
13570
|
-
'
|
|
13690
|
+
('arguments,await,break,case,catch,class,const,continue,debugger,default,' +
|
|
13691
|
+
'delete,do,else,export,extends,finally,for,function,if,import,let,new,' +
|
|
13692
|
+
'return,super,switch,throw,try,var,void,while,with,yield')
|
|
13571
13693
|
.split(',')
|
|
13572
13694
|
.join('\\b|\\b') +
|
|
13573
13695
|
'\\b');
|
|
@@ -13598,7 +13720,7 @@ var Vue = (function (exports) {
|
|
|
13598
13720
|
if (keywordMatch) {
|
|
13599
13721
|
message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
|
|
13600
13722
|
}
|
|
13601
|
-
context.onError(createCompilerError(
|
|
13723
|
+
context.onError(createCompilerError(45 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
|
|
13602
13724
|
}
|
|
13603
13725
|
}
|
|
13604
13726
|
|
|
@@ -14389,7 +14511,7 @@ var Vue = (function (exports) {
|
|
|
14389
14511
|
// 2. Force keep-alive to always be updated, since it uses raw children.
|
|
14390
14512
|
patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
|
|
14391
14513
|
if (node.children.length > 1) {
|
|
14392
|
-
context.onError(createCompilerError(
|
|
14514
|
+
context.onError(createCompilerError(46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
|
|
14393
14515
|
start: node.children[0].loc.start,
|
|
14394
14516
|
end: node.children[node.children.length - 1].loc.end,
|
|
14395
14517
|
source: ''
|
|
@@ -14816,7 +14938,7 @@ var Vue = (function (exports) {
|
|
|
14816
14938
|
const existing = knownProps.get(name);
|
|
14817
14939
|
if (existing) {
|
|
14818
14940
|
if (name === 'style' || name === 'class' || isOn(name)) {
|
|
14819
|
-
mergeAsArray
|
|
14941
|
+
mergeAsArray(existing, prop);
|
|
14820
14942
|
}
|
|
14821
14943
|
// unexpected duplicate, should have emitted error during parse
|
|
14822
14944
|
}
|
|
@@ -14827,7 +14949,7 @@ var Vue = (function (exports) {
|
|
|
14827
14949
|
}
|
|
14828
14950
|
return deduped;
|
|
14829
14951
|
}
|
|
14830
|
-
function mergeAsArray
|
|
14952
|
+
function mergeAsArray(existing, incoming) {
|
|
14831
14953
|
if (existing.value.type === 17 /* NodeTypes.JS_ARRAY_EXPRESSION */) {
|
|
14832
14954
|
existing.value.elements.push(incoming.value);
|
|
14833
14955
|
}
|
|
@@ -14955,7 +15077,7 @@ var Vue = (function (exports) {
|
|
|
14955
15077
|
}
|
|
14956
15078
|
|
|
14957
15079
|
const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
14958
|
-
const transformOn = (dir, node, context, augmentor) => {
|
|
15080
|
+
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
14959
15081
|
const { loc, modifiers, arg } = dir;
|
|
14960
15082
|
if (!dir.exp && !modifiers.length) {
|
|
14961
15083
|
context.onError(createCompilerError(35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */, loc));
|
|
@@ -15115,11 +15237,11 @@ var Vue = (function (exports) {
|
|
|
15115
15237
|
let hasText = false;
|
|
15116
15238
|
for (let i = 0; i < children.length; i++) {
|
|
15117
15239
|
const child = children[i];
|
|
15118
|
-
if (isText(child)) {
|
|
15240
|
+
if (isText$1(child)) {
|
|
15119
15241
|
hasText = true;
|
|
15120
15242
|
for (let j = i + 1; j < children.length; j++) {
|
|
15121
15243
|
const next = children[j];
|
|
15122
|
-
if (isText(next)) {
|
|
15244
|
+
if (isText$1(next)) {
|
|
15123
15245
|
if (!currentContainer) {
|
|
15124
15246
|
currentContainer = children[i] = createCompoundExpression([child], child.loc);
|
|
15125
15247
|
}
|
|
@@ -15161,7 +15283,7 @@ var Vue = (function (exports) {
|
|
|
15161
15283
|
// runtime normalization.
|
|
15162
15284
|
for (let i = 0; i < children.length; i++) {
|
|
15163
15285
|
const child = children[i];
|
|
15164
|
-
if (isText(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
15286
|
+
if (isText$1(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
15165
15287
|
const callArgs = [];
|
|
15166
15288
|
// createTextVNode defaults to single whitespace, so if it is a
|
|
15167
15289
|
// single space the code could be an empty call to save bytes.
|
|
@@ -15186,13 +15308,13 @@ var Vue = (function (exports) {
|
|
|
15186
15308
|
}
|
|
15187
15309
|
};
|
|
15188
15310
|
|
|
15189
|
-
const seen = new WeakSet();
|
|
15311
|
+
const seen$1 = new WeakSet();
|
|
15190
15312
|
const transformOnce = (node, context) => {
|
|
15191
15313
|
if (node.type === 1 /* NodeTypes.ELEMENT */ && findDir(node, 'once', true)) {
|
|
15192
|
-
if (seen.has(node) || context.inVOnce) {
|
|
15314
|
+
if (seen$1.has(node) || context.inVOnce) {
|
|
15193
15315
|
return;
|
|
15194
15316
|
}
|
|
15195
|
-
seen.add(node);
|
|
15317
|
+
seen$1.add(node);
|
|
15196
15318
|
context.inVOnce = true;
|
|
15197
15319
|
context.helper(SET_BLOCK_TRACKING);
|
|
15198
15320
|
return () => {
|
|
@@ -15205,7 +15327,7 @@ var Vue = (function (exports) {
|
|
|
15205
15327
|
}
|
|
15206
15328
|
};
|
|
15207
15329
|
|
|
15208
|
-
const transformModel = (dir, node, context) => {
|
|
15330
|
+
const transformModel$1 = (dir, node, context) => {
|
|
15209
15331
|
const { exp, arg } = dir;
|
|
15210
15332
|
if (!exp) {
|
|
15211
15333
|
context.onError(createCompilerError(41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */, dir.loc));
|
|
@@ -15215,8 +15337,14 @@ var Vue = (function (exports) {
|
|
|
15215
15337
|
const expString = exp.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ? exp.content : rawExp;
|
|
15216
15338
|
// im SFC <script setup> inline mode, the exp may have been transformed into
|
|
15217
15339
|
// _unref(exp)
|
|
15218
|
-
context.bindingMetadata[rawExp];
|
|
15219
|
-
|
|
15340
|
+
const bindingType = context.bindingMetadata[rawExp];
|
|
15341
|
+
// check props
|
|
15342
|
+
if (bindingType === "props" /* BindingTypes.PROPS */ ||
|
|
15343
|
+
bindingType === "props-aliased" /* BindingTypes.PROPS_ALIASED */) {
|
|
15344
|
+
context.onError(createCompilerError(44 /* ErrorCodes.X_V_MODEL_ON_PROPS */, exp.loc));
|
|
15345
|
+
return createTransformProps();
|
|
15346
|
+
}
|
|
15347
|
+
const maybeRef = !true ;
|
|
15220
15348
|
if (!expString.trim() ||
|
|
15221
15349
|
(!isMemberExpression(expString) && !maybeRef)) {
|
|
15222
15350
|
context.onError(createCompilerError(42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
|
|
@@ -15225,7 +15353,7 @@ var Vue = (function (exports) {
|
|
|
15225
15353
|
const propName = arg ? arg : createSimpleExpression('modelValue', true);
|
|
15226
15354
|
const eventName = arg
|
|
15227
15355
|
? isStaticExp(arg)
|
|
15228
|
-
? `onUpdate:${arg.content}`
|
|
15356
|
+
? `onUpdate:${camelize(arg.content)}`
|
|
15229
15357
|
: createCompoundExpression(['"onUpdate:" + ', arg])
|
|
15230
15358
|
: `onUpdate:modelValue`;
|
|
15231
15359
|
let assignmentExp;
|
|
@@ -15261,14 +15389,14 @@ var Vue = (function (exports) {
|
|
|
15261
15389
|
return { props };
|
|
15262
15390
|
}
|
|
15263
15391
|
|
|
15264
|
-
const seen
|
|
15392
|
+
const seen = new WeakSet();
|
|
15265
15393
|
const transformMemo = (node, context) => {
|
|
15266
15394
|
if (node.type === 1 /* NodeTypes.ELEMENT */) {
|
|
15267
15395
|
const dir = findDir(node, 'memo');
|
|
15268
|
-
if (!dir || seen
|
|
15396
|
+
if (!dir || seen.has(node)) {
|
|
15269
15397
|
return;
|
|
15270
15398
|
}
|
|
15271
|
-
seen
|
|
15399
|
+
seen.add(node);
|
|
15272
15400
|
return () => {
|
|
15273
15401
|
const codegenNode = node.codegenNode ||
|
|
15274
15402
|
context.currentNode.codegenNode;
|
|
@@ -15304,9 +15432,9 @@ var Vue = (function (exports) {
|
|
|
15304
15432
|
transformText
|
|
15305
15433
|
],
|
|
15306
15434
|
{
|
|
15307
|
-
on: transformOn,
|
|
15435
|
+
on: transformOn$1,
|
|
15308
15436
|
bind: transformBind,
|
|
15309
|
-
model: transformModel
|
|
15437
|
+
model: transformModel$1
|
|
15310
15438
|
}
|
|
15311
15439
|
];
|
|
15312
15440
|
}
|
|
@@ -15318,18 +15446,18 @@ var Vue = (function (exports) {
|
|
|
15318
15446
|
/* istanbul ignore if */
|
|
15319
15447
|
{
|
|
15320
15448
|
if (options.prefixIdentifiers === true) {
|
|
15321
|
-
onError(createCompilerError(
|
|
15449
|
+
onError(createCompilerError(47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
|
|
15322
15450
|
}
|
|
15323
15451
|
else if (isModuleMode) {
|
|
15324
|
-
onError(createCompilerError(
|
|
15452
|
+
onError(createCompilerError(48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
|
|
15325
15453
|
}
|
|
15326
15454
|
}
|
|
15327
15455
|
const prefixIdentifiers = !true ;
|
|
15328
15456
|
if (options.cacheHandlers) {
|
|
15329
|
-
onError(createCompilerError(
|
|
15457
|
+
onError(createCompilerError(49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
|
|
15330
15458
|
}
|
|
15331
15459
|
if (options.scopeId && !isModuleMode) {
|
|
15332
|
-
onError(createCompilerError(
|
|
15460
|
+
onError(createCompilerError(50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
|
|
15333
15461
|
}
|
|
15334
15462
|
const ast = isString(template) ? baseParse(template, options) : template;
|
|
15335
15463
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|
|
@@ -15357,7 +15485,7 @@ var Vue = (function (exports) {
|
|
|
15357
15485
|
const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` );
|
|
15358
15486
|
const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` );
|
|
15359
15487
|
const V_SHOW = Symbol(`vShow` );
|
|
15360
|
-
const TRANSITION
|
|
15488
|
+
const TRANSITION = Symbol(`Transition` );
|
|
15361
15489
|
const TRANSITION_GROUP = Symbol(`TransitionGroup` );
|
|
15362
15490
|
registerRuntimeHelpers({
|
|
15363
15491
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
@@ -15368,7 +15496,7 @@ var Vue = (function (exports) {
|
|
|
15368
15496
|
[V_ON_WITH_MODIFIERS]: `withModifiers`,
|
|
15369
15497
|
[V_ON_WITH_KEYS]: `withKeys`,
|
|
15370
15498
|
[V_SHOW]: `vShow`,
|
|
15371
|
-
[TRANSITION
|
|
15499
|
+
[TRANSITION]: `Transition`,
|
|
15372
15500
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
15373
15501
|
});
|
|
15374
15502
|
|
|
@@ -15396,7 +15524,7 @@ var Vue = (function (exports) {
|
|
|
15396
15524
|
decodeEntities: decodeHtmlBrowser ,
|
|
15397
15525
|
isBuiltInComponent: (tag) => {
|
|
15398
15526
|
if (isBuiltInType(tag, `Transition`)) {
|
|
15399
|
-
return TRANSITION
|
|
15527
|
+
return TRANSITION;
|
|
15400
15528
|
}
|
|
15401
15529
|
else if (isBuiltInType(tag, `TransitionGroup`)) {
|
|
15402
15530
|
return TRANSITION_GROUP;
|
|
@@ -15487,26 +15615,26 @@ var Vue = (function (exports) {
|
|
|
15487
15615
|
return createCompilerError(code, loc, DOMErrorMessages );
|
|
15488
15616
|
}
|
|
15489
15617
|
const DOMErrorMessages = {
|
|
15490
|
-
[
|
|
15491
|
-
[
|
|
15492
|
-
[
|
|
15493
|
-
[
|
|
15494
|
-
[
|
|
15495
|
-
[
|
|
15496
|
-
[
|
|
15497
|
-
[
|
|
15498
|
-
[
|
|
15499
|
-
[
|
|
15500
|
-
[
|
|
15618
|
+
[51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
|
|
15619
|
+
[52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
|
|
15620
|
+
[53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
|
|
15621
|
+
[54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
|
|
15622
|
+
[55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
15623
|
+
[56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
|
|
15624
|
+
[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.`,
|
|
15625
|
+
[58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
15626
|
+
[59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
|
|
15627
|
+
[60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
|
|
15628
|
+
[61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
|
|
15501
15629
|
};
|
|
15502
15630
|
|
|
15503
15631
|
const transformVHtml = (dir, node, context) => {
|
|
15504
15632
|
const { exp, loc } = dir;
|
|
15505
15633
|
if (!exp) {
|
|
15506
|
-
context.onError(createDOMCompilerError(
|
|
15634
|
+
context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
|
|
15507
15635
|
}
|
|
15508
15636
|
if (node.children.length) {
|
|
15509
|
-
context.onError(createDOMCompilerError(
|
|
15637
|
+
context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
|
|
15510
15638
|
node.children.length = 0;
|
|
15511
15639
|
}
|
|
15512
15640
|
return {
|
|
@@ -15519,10 +15647,10 @@ var Vue = (function (exports) {
|
|
|
15519
15647
|
const transformVText = (dir, node, context) => {
|
|
15520
15648
|
const { exp, loc } = dir;
|
|
15521
15649
|
if (!exp) {
|
|
15522
|
-
context.onError(createDOMCompilerError(
|
|
15650
|
+
context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
|
|
15523
15651
|
}
|
|
15524
15652
|
if (node.children.length) {
|
|
15525
|
-
context.onError(createDOMCompilerError(
|
|
15653
|
+
context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
|
|
15526
15654
|
node.children.length = 0;
|
|
15527
15655
|
}
|
|
15528
15656
|
return {
|
|
@@ -15536,19 +15664,19 @@ var Vue = (function (exports) {
|
|
|
15536
15664
|
};
|
|
15537
15665
|
};
|
|
15538
15666
|
|
|
15539
|
-
const transformModel
|
|
15540
|
-
const baseResult = transformModel(dir, node, context);
|
|
15667
|
+
const transformModel = (dir, node, context) => {
|
|
15668
|
+
const baseResult = transformModel$1(dir, node, context);
|
|
15541
15669
|
// base transform has errors OR component v-model (only need props)
|
|
15542
15670
|
if (!baseResult.props.length || node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
15543
15671
|
return baseResult;
|
|
15544
15672
|
}
|
|
15545
15673
|
if (dir.arg) {
|
|
15546
|
-
context.onError(createDOMCompilerError(
|
|
15674
|
+
context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
|
|
15547
15675
|
}
|
|
15548
15676
|
function checkDuplicatedValue() {
|
|
15549
15677
|
const value = findProp(node, 'value');
|
|
15550
15678
|
if (value) {
|
|
15551
|
-
context.onError(createDOMCompilerError(
|
|
15679
|
+
context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
|
|
15552
15680
|
}
|
|
15553
15681
|
}
|
|
15554
15682
|
const { tag } = node;
|
|
@@ -15576,7 +15704,7 @@ var Vue = (function (exports) {
|
|
|
15576
15704
|
break;
|
|
15577
15705
|
case 'file':
|
|
15578
15706
|
isInvalidType = true;
|
|
15579
|
-
context.onError(createDOMCompilerError(
|
|
15707
|
+
context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
|
|
15580
15708
|
break;
|
|
15581
15709
|
default:
|
|
15582
15710
|
// text type
|
|
@@ -15610,7 +15738,7 @@ var Vue = (function (exports) {
|
|
|
15610
15738
|
}
|
|
15611
15739
|
}
|
|
15612
15740
|
else {
|
|
15613
|
-
context.onError(createDOMCompilerError(
|
|
15741
|
+
context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
|
|
15614
15742
|
}
|
|
15615
15743
|
// native vmodel doesn't need the `modelValue` props since they are also
|
|
15616
15744
|
// passed to the runtime as `binding.value`. removing it reduces code size.
|
|
@@ -15687,8 +15815,8 @@ var Vue = (function (exports) {
|
|
|
15687
15815
|
])
|
|
15688
15816
|
: key;
|
|
15689
15817
|
};
|
|
15690
|
-
const transformOn
|
|
15691
|
-
return transformOn(dir, node, context, baseResult => {
|
|
15818
|
+
const transformOn = (dir, node, context) => {
|
|
15819
|
+
return transformOn$1(dir, node, context, baseResult => {
|
|
15692
15820
|
const { modifiers } = dir;
|
|
15693
15821
|
if (!modifiers.length)
|
|
15694
15822
|
return baseResult;
|
|
@@ -15730,7 +15858,7 @@ var Vue = (function (exports) {
|
|
|
15730
15858
|
const transformShow = (dir, node, context) => {
|
|
15731
15859
|
const { exp, loc } = dir;
|
|
15732
15860
|
if (!exp) {
|
|
15733
|
-
context.onError(createDOMCompilerError(
|
|
15861
|
+
context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
|
|
15734
15862
|
}
|
|
15735
15863
|
return {
|
|
15736
15864
|
props: [],
|
|
@@ -15742,14 +15870,14 @@ var Vue = (function (exports) {
|
|
|
15742
15870
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
15743
15871
|
node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
15744
15872
|
const component = context.isBuiltInComponent(node.tag);
|
|
15745
|
-
if (component === TRANSITION
|
|
15873
|
+
if (component === TRANSITION) {
|
|
15746
15874
|
return () => {
|
|
15747
15875
|
if (!node.children.length) {
|
|
15748
15876
|
return;
|
|
15749
15877
|
}
|
|
15750
15878
|
// warn multiple transition children
|
|
15751
15879
|
if (hasMultipleChildren(node)) {
|
|
15752
|
-
context.onError(createDOMCompilerError(
|
|
15880
|
+
context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
|
|
15753
15881
|
start: node.children[0].loc.start,
|
|
15754
15882
|
end: node.children[node.children.length - 1].loc.end,
|
|
15755
15883
|
source: ''
|
|
@@ -15788,7 +15916,7 @@ var Vue = (function (exports) {
|
|
|
15788
15916
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
15789
15917
|
node.tagType === 0 /* ElementTypes.ELEMENT */ &&
|
|
15790
15918
|
(node.tag === 'script' || node.tag === 'style')) {
|
|
15791
|
-
context.onError(createDOMCompilerError(
|
|
15919
|
+
context.onError(createDOMCompilerError(61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
|
|
15792
15920
|
context.removeNode();
|
|
15793
15921
|
}
|
|
15794
15922
|
};
|
|
@@ -15801,11 +15929,11 @@ var Vue = (function (exports) {
|
|
|
15801
15929
|
cloak: noopDirectiveTransform,
|
|
15802
15930
|
html: transformVHtml,
|
|
15803
15931
|
text: transformVText,
|
|
15804
|
-
model: transformModel
|
|
15805
|
-
on: transformOn
|
|
15932
|
+
model: transformModel,
|
|
15933
|
+
on: transformOn,
|
|
15806
15934
|
show: transformShow
|
|
15807
15935
|
};
|
|
15808
|
-
function compile
|
|
15936
|
+
function compile(template, options = {}) {
|
|
15809
15937
|
return baseCompile(template, extend({}, parserOptions, options, {
|
|
15810
15938
|
nodeTransforms: [
|
|
15811
15939
|
// ignore <script> and <tag>
|
|
@@ -15831,7 +15959,7 @@ var Vue = (function (exports) {
|
|
|
15831
15959
|
template = template.innerHTML;
|
|
15832
15960
|
}
|
|
15833
15961
|
else {
|
|
15834
|
-
warn
|
|
15962
|
+
warn(`invalid template option: `, template);
|
|
15835
15963
|
return NOOP;
|
|
15836
15964
|
}
|
|
15837
15965
|
}
|
|
@@ -15843,7 +15971,7 @@ var Vue = (function (exports) {
|
|
|
15843
15971
|
if (template[0] === '#') {
|
|
15844
15972
|
const el = document.querySelector(template);
|
|
15845
15973
|
if (!el) {
|
|
15846
|
-
warn
|
|
15974
|
+
warn(`Template element not found or is empty: ${template}`);
|
|
15847
15975
|
}
|
|
15848
15976
|
// __UNSAFE__
|
|
15849
15977
|
// Reason: potential execution of JS expressions in in-DOM template.
|
|
@@ -15859,14 +15987,14 @@ var Vue = (function (exports) {
|
|
|
15859
15987
|
if (!opts.isCustomElement && typeof customElements !== 'undefined') {
|
|
15860
15988
|
opts.isCustomElement = tag => !!customElements.get(tag);
|
|
15861
15989
|
}
|
|
15862
|
-
const { code } = compile
|
|
15990
|
+
const { code } = compile(template, opts);
|
|
15863
15991
|
function onError(err, asWarning = false) {
|
|
15864
15992
|
const message = asWarning
|
|
15865
15993
|
? err.message
|
|
15866
15994
|
: `Template compilation error: ${err.message}`;
|
|
15867
15995
|
const codeFrame = err.loc &&
|
|
15868
15996
|
generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
|
|
15869
|
-
warn
|
|
15997
|
+
warn(codeFrame ? `${message}\n${codeFrame}` : message);
|
|
15870
15998
|
}
|
|
15871
15999
|
// The wildcard import results in a huge object with every export
|
|
15872
16000
|
// with keys that cannot be mangled, and can be quite heavy size-wise.
|
|
@@ -15891,6 +16019,7 @@ var Vue = (function (exports) {
|
|
|
15891
16019
|
exports.Transition = Transition;
|
|
15892
16020
|
exports.TransitionGroup = TransitionGroup;
|
|
15893
16021
|
exports.VueElement = VueElement;
|
|
16022
|
+
exports.assertNumber = assertNumber;
|
|
15894
16023
|
exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
|
|
15895
16024
|
exports.callWithErrorHandling = callWithErrorHandling;
|
|
15896
16025
|
exports.camelize = camelize;
|
|
@@ -15898,7 +16027,7 @@ var Vue = (function (exports) {
|
|
|
15898
16027
|
exports.cloneVNode = cloneVNode;
|
|
15899
16028
|
exports.compatUtils = compatUtils;
|
|
15900
16029
|
exports.compile = compileToFunction;
|
|
15901
|
-
exports.computed = computed
|
|
16030
|
+
exports.computed = computed;
|
|
15902
16031
|
exports.createApp = createApp;
|
|
15903
16032
|
exports.createBlock = createBlock;
|
|
15904
16033
|
exports.createCommentVNode = createCommentVNode;
|
|
@@ -16009,7 +16138,7 @@ var Vue = (function (exports) {
|
|
|
16009
16138
|
exports.vModelText = vModelText;
|
|
16010
16139
|
exports.vShow = vShow;
|
|
16011
16140
|
exports.version = version;
|
|
16012
|
-
exports.warn = warn
|
|
16141
|
+
exports.warn = warn;
|
|
16013
16142
|
exports.watch = watch;
|
|
16014
16143
|
exports.watchEffect = watchEffect;
|
|
16015
16144
|
exports.watchPostEffect = watchPostEffect;
|
|
@@ -16023,8 +16152,6 @@ var Vue = (function (exports) {
|
|
|
16023
16152
|
exports.withModifiers = withModifiers;
|
|
16024
16153
|
exports.withScopeId = withScopeId;
|
|
16025
16154
|
|
|
16026
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
16027
|
-
|
|
16028
16155
|
return exports;
|
|
16029
16156
|
|
|
16030
|
-
}({})
|
|
16157
|
+
})({});
|