@vue/compat 3.3.4 → 3.3.5
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 +968 -957
- package/dist/vue.cjs.prod.js +818 -809
- package/dist/vue.esm-browser.js +1000 -989
- package/dist/vue.esm-browser.prod.js +6 -1
- package/dist/vue.esm-bundler.js +1008 -997
- package/dist/vue.global.js +988 -977
- package/dist/vue.global.prod.js +6 -1
- package/dist/vue.runtime.esm-browser.js +996 -980
- package/dist/vue.runtime.esm-browser.prod.js +6 -1
- package/dist/vue.runtime.esm-bundler.js +1003 -987
- package/dist/vue.runtime.global.js +985 -969
- package/dist/vue.runtime.global.prod.js +6 -1
- package/package.json +3 -3
|
@@ -37,7 +37,7 @@ var Vue = (function () {
|
|
|
37
37
|
const isSymbol = (val) => typeof val === "symbol";
|
|
38
38
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
39
39
|
const isPromise = (val) => {
|
|
40
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
40
|
+
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
41
41
|
};
|
|
42
42
|
const objectToString = Object.prototype.toString;
|
|
43
43
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -68,12 +68,13 @@ var Vue = (function () {
|
|
|
68
68
|
const hyphenate = cacheStringFunction(
|
|
69
69
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
70
70
|
);
|
|
71
|
-
const capitalize = cacheStringFunction(
|
|
72
|
-
|
|
73
|
-
);
|
|
74
|
-
const toHandlerKey = cacheStringFunction(
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
const capitalize = cacheStringFunction((str) => {
|
|
72
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
73
|
+
});
|
|
74
|
+
const toHandlerKey = cacheStringFunction((str) => {
|
|
75
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
76
|
+
return s;
|
|
77
|
+
});
|
|
77
78
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
78
79
|
const invokeArrayFns = (fns, arg) => {
|
|
79
80
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -100,8 +101,8 @@ var Vue = (function () {
|
|
|
100
101
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
101
102
|
};
|
|
102
103
|
|
|
103
|
-
const
|
|
104
|
-
const
|
|
104
|
+
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
105
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
105
106
|
|
|
106
107
|
function normalizeStyle(value) {
|
|
107
108
|
if (isArray(value)) {
|
|
@@ -116,9 +117,7 @@ var Vue = (function () {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
return res;
|
|
119
|
-
} else if (isString(value)) {
|
|
120
|
-
return value;
|
|
121
|
-
} else if (isObject(value)) {
|
|
120
|
+
} else if (isString(value) || isObject(value)) {
|
|
122
121
|
return value;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
@@ -465,7 +464,7 @@ var Vue = (function () {
|
|
|
465
464
|
}
|
|
466
465
|
}
|
|
467
466
|
function effect(fn, options) {
|
|
468
|
-
if (fn.effect) {
|
|
467
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
469
468
|
fn = fn.effect.fn;
|
|
470
469
|
}
|
|
471
470
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -631,10 +630,6 @@ var Vue = (function () {
|
|
|
631
630
|
const builtInSymbols = new Set(
|
|
632
631
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
633
632
|
);
|
|
634
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
635
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
636
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
637
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
638
633
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
639
634
|
function createArrayInstrumentations() {
|
|
640
635
|
const instrumentations = {};
|
|
@@ -667,8 +662,13 @@ var Vue = (function () {
|
|
|
667
662
|
track(obj, "has", key);
|
|
668
663
|
return obj.hasOwnProperty(key);
|
|
669
664
|
}
|
|
670
|
-
|
|
671
|
-
|
|
665
|
+
class BaseReactiveHandler {
|
|
666
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
667
|
+
this._isReadonly = _isReadonly;
|
|
668
|
+
this._shallow = _shallow;
|
|
669
|
+
}
|
|
670
|
+
get(target, key, receiver) {
|
|
671
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
672
672
|
if (key === "__v_isReactive") {
|
|
673
673
|
return !isReadonly2;
|
|
674
674
|
} else if (key === "__v_isReadonly") {
|
|
@@ -704,17 +704,18 @@ var Vue = (function () {
|
|
|
704
704
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
705
705
|
}
|
|
706
706
|
return res;
|
|
707
|
-
}
|
|
707
|
+
}
|
|
708
708
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
709
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
710
|
+
constructor(shallow = false) {
|
|
711
|
+
super(false, shallow);
|
|
712
|
+
}
|
|
713
|
+
set(target, key, value, receiver) {
|
|
713
714
|
let oldValue = target[key];
|
|
714
715
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
715
716
|
return false;
|
|
716
717
|
}
|
|
717
|
-
if (!
|
|
718
|
+
if (!this._shallow) {
|
|
718
719
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
719
720
|
oldValue = toRaw(oldValue);
|
|
720
721
|
value = toRaw(value);
|
|
@@ -734,37 +735,36 @@ var Vue = (function () {
|
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
737
|
return result;
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
function deleteProperty(target, key) {
|
|
740
|
-
const hadKey = hasOwn(target, key);
|
|
741
|
-
const oldValue = target[key];
|
|
742
|
-
const result = Reflect.deleteProperty(target, key);
|
|
743
|
-
if (result && hadKey) {
|
|
744
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
745
738
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
739
|
+
deleteProperty(target, key) {
|
|
740
|
+
const hadKey = hasOwn(target, key);
|
|
741
|
+
const oldValue = target[key];
|
|
742
|
+
const result = Reflect.deleteProperty(target, key);
|
|
743
|
+
if (result && hadKey) {
|
|
744
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
745
|
+
}
|
|
746
|
+
return result;
|
|
747
|
+
}
|
|
748
|
+
has(target, key) {
|
|
749
|
+
const result = Reflect.has(target, key);
|
|
750
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
751
|
+
track(target, "has", key);
|
|
752
|
+
}
|
|
753
|
+
return result;
|
|
754
|
+
}
|
|
755
|
+
ownKeys(target) {
|
|
756
|
+
track(
|
|
757
|
+
target,
|
|
758
|
+
"iterate",
|
|
759
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
760
|
+
);
|
|
761
|
+
return Reflect.ownKeys(target);
|
|
752
762
|
}
|
|
753
|
-
return result;
|
|
754
|
-
}
|
|
755
|
-
function ownKeys(target) {
|
|
756
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
757
|
-
return Reflect.ownKeys(target);
|
|
758
763
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
has: has$1,
|
|
764
|
-
ownKeys
|
|
765
|
-
};
|
|
766
|
-
const readonlyHandlers = {
|
|
767
|
-
get: readonlyGet,
|
|
764
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
765
|
+
constructor(shallow = false) {
|
|
766
|
+
super(true, shallow);
|
|
767
|
+
}
|
|
768
768
|
set(target, key) {
|
|
769
769
|
{
|
|
770
770
|
warn$1(
|
|
@@ -773,7 +773,7 @@ var Vue = (function () {
|
|
|
773
773
|
);
|
|
774
774
|
}
|
|
775
775
|
return true;
|
|
776
|
-
}
|
|
776
|
+
}
|
|
777
777
|
deleteProperty(target, key) {
|
|
778
778
|
{
|
|
779
779
|
warn$1(
|
|
@@ -783,22 +783,13 @@ var Vue = (function () {
|
|
|
783
783
|
}
|
|
784
784
|
return true;
|
|
785
785
|
}
|
|
786
|
-
}
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
get: shallowGet,
|
|
792
|
-
set: shallowSet
|
|
793
|
-
}
|
|
794
|
-
);
|
|
795
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
796
|
-
{},
|
|
797
|
-
readonlyHandlers,
|
|
798
|
-
{
|
|
799
|
-
get: shallowReadonlyGet
|
|
800
|
-
}
|
|
786
|
+
}
|
|
787
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
788
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
789
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
790
|
+
true
|
|
801
791
|
);
|
|
792
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
802
793
|
|
|
803
794
|
const toShallow = (value) => value;
|
|
804
795
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -807,7 +798,7 @@ var Vue = (function () {
|
|
|
807
798
|
const rawTarget = toRaw(target);
|
|
808
799
|
const rawKey = toRaw(key);
|
|
809
800
|
if (!isReadonly) {
|
|
810
|
-
if (key
|
|
801
|
+
if (hasChanged(key, rawKey)) {
|
|
811
802
|
track(rawTarget, "get", key);
|
|
812
803
|
}
|
|
813
804
|
track(rawTarget, "get", rawKey);
|
|
@@ -827,7 +818,7 @@ var Vue = (function () {
|
|
|
827
818
|
const rawTarget = toRaw(target);
|
|
828
819
|
const rawKey = toRaw(key);
|
|
829
820
|
if (!isReadonly) {
|
|
830
|
-
if (key
|
|
821
|
+
if (hasChanged(key, rawKey)) {
|
|
831
822
|
track(rawTarget, "has", key);
|
|
832
823
|
}
|
|
833
824
|
track(rawTarget, "has", rawKey);
|
|
@@ -1357,11 +1348,7 @@ var Vue = (function () {
|
|
|
1357
1348
|
}
|
|
1358
1349
|
function propertyToRef(source, key, defaultValue) {
|
|
1359
1350
|
const val = source[key];
|
|
1360
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1361
|
-
source,
|
|
1362
|
-
key,
|
|
1363
|
-
defaultValue
|
|
1364
|
-
);
|
|
1351
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1365
1352
|
}
|
|
1366
1353
|
|
|
1367
1354
|
class ComputedRefImpl {
|
|
@@ -3655,9 +3642,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3655
3642
|
}
|
|
3656
3643
|
if (cb) {
|
|
3657
3644
|
const newValue = effect.run();
|
|
3658
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
3659
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
3660
|
-
) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled("WATCH_ARRAY", instance)) {
|
|
3645
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled("WATCH_ARRAY", instance)) {
|
|
3661
3646
|
if (cleanup) {
|
|
3662
3647
|
cleanup();
|
|
3663
3648
|
}
|
|
@@ -3831,6 +3816,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3831
3816
|
}
|
|
3832
3817
|
}
|
|
3833
3818
|
|
|
3819
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3820
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3834
3821
|
function useTransitionState() {
|
|
3835
3822
|
const state = {
|
|
3836
3823
|
isMounted: false,
|
|
@@ -3951,9 +3938,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3951
3938
|
oldInnerChild
|
|
3952
3939
|
);
|
|
3953
3940
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3954
|
-
el
|
|
3941
|
+
el[leaveCbKey] = () => {
|
|
3955
3942
|
earlyRemove();
|
|
3956
|
-
el
|
|
3943
|
+
el[leaveCbKey] = void 0;
|
|
3957
3944
|
delete enterHooks.delayedLeave;
|
|
3958
3945
|
};
|
|
3959
3946
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -4027,15 +4014,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4027
4014
|
return;
|
|
4028
4015
|
}
|
|
4029
4016
|
}
|
|
4030
|
-
if (el
|
|
4031
|
-
el
|
|
4017
|
+
if (el[leaveCbKey]) {
|
|
4018
|
+
el[leaveCbKey](
|
|
4032
4019
|
true
|
|
4033
4020
|
/* cancelled */
|
|
4034
4021
|
);
|
|
4035
4022
|
}
|
|
4036
4023
|
const leavingVNode = leavingVNodesCache[key];
|
|
4037
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
4038
|
-
leavingVNode.el
|
|
4024
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
4025
|
+
leavingVNode.el[leaveCbKey]();
|
|
4039
4026
|
}
|
|
4040
4027
|
callHook(hook, [el]);
|
|
4041
4028
|
},
|
|
@@ -4053,7 +4040,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4053
4040
|
}
|
|
4054
4041
|
}
|
|
4055
4042
|
let called = false;
|
|
4056
|
-
const done = el
|
|
4043
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
4057
4044
|
if (called)
|
|
4058
4045
|
return;
|
|
4059
4046
|
called = true;
|
|
@@ -4065,7 +4052,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4065
4052
|
if (hooks.delayedLeave) {
|
|
4066
4053
|
hooks.delayedLeave();
|
|
4067
4054
|
}
|
|
4068
|
-
el
|
|
4055
|
+
el[enterCbKey$1] = void 0;
|
|
4069
4056
|
};
|
|
4070
4057
|
if (hook) {
|
|
4071
4058
|
callAsyncHook(hook, [el, done]);
|
|
@@ -4075,8 +4062,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4075
4062
|
},
|
|
4076
4063
|
leave(el, remove) {
|
|
4077
4064
|
const key2 = String(vnode.key);
|
|
4078
|
-
if (el
|
|
4079
|
-
el
|
|
4065
|
+
if (el[enterCbKey$1]) {
|
|
4066
|
+
el[enterCbKey$1](
|
|
4080
4067
|
true
|
|
4081
4068
|
/* cancelled */
|
|
4082
4069
|
);
|
|
@@ -4086,7 +4073,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4086
4073
|
}
|
|
4087
4074
|
callHook(onBeforeLeave, [el]);
|
|
4088
4075
|
let called = false;
|
|
4089
|
-
const done = el
|
|
4076
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
4090
4077
|
if (called)
|
|
4091
4078
|
return;
|
|
4092
4079
|
called = true;
|
|
@@ -4096,7 +4083,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4096
4083
|
} else {
|
|
4097
4084
|
callHook(onAfterLeave, [el]);
|
|
4098
4085
|
}
|
|
4099
|
-
el
|
|
4086
|
+
el[leaveCbKey] = void 0;
|
|
4100
4087
|
if (leavingVNodesCache[key2] === vnode) {
|
|
4101
4088
|
delete leavingVNodesCache[key2];
|
|
4102
4089
|
}
|
|
@@ -4158,6 +4145,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4158
4145
|
return ret;
|
|
4159
4146
|
}
|
|
4160
4147
|
|
|
4148
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4149
|
+
// @__NO_SIDE_EFFECTS__
|
|
4161
4150
|
function defineComponent(options, extraOptions) {
|
|
4162
4151
|
return isFunction(options) ? (
|
|
4163
4152
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -4167,6 +4156,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4167
4156
|
}
|
|
4168
4157
|
|
|
4169
4158
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4159
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
4160
|
+
// @__NO_SIDE_EFFECTS__
|
|
4170
4161
|
function defineAsyncComponent(source) {
|
|
4171
4162
|
if (isFunction(source)) {
|
|
4172
4163
|
source = { loader: source };
|
|
@@ -5179,6 +5170,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5179
5170
|
function installCompatInstanceProperties(map) {
|
|
5180
5171
|
const set = (target, key, val) => {
|
|
5181
5172
|
target[key] = val;
|
|
5173
|
+
return target[key];
|
|
5182
5174
|
};
|
|
5183
5175
|
const del = (target, key) => {
|
|
5184
5176
|
delete target[key];
|
|
@@ -5456,7 +5448,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5456
5448
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
5457
5449
|
},
|
|
5458
5450
|
has(_, key) {
|
|
5459
|
-
const has = key[0] !== "_" && !
|
|
5451
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
5460
5452
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
5461
5453
|
warn(
|
|
5462
5454
|
`Property ${JSON.stringify(
|
|
@@ -6193,7 +6185,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6193
6185
|
return vm;
|
|
6194
6186
|
}
|
|
6195
6187
|
}
|
|
6196
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6188
|
+
Vue.version = `2.6.14-compat:${"3.3.5"}`;
|
|
6197
6189
|
Vue.config = singletonApp.config;
|
|
6198
6190
|
Vue.use = (p, ...options) => {
|
|
6199
6191
|
if (p && isFunction(p.install)) {
|
|
@@ -6601,7 +6593,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6601
6593
|
},
|
|
6602
6594
|
set() {
|
|
6603
6595
|
warn(
|
|
6604
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
6596
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
6605
6597
|
);
|
|
6606
6598
|
}
|
|
6607
6599
|
});
|
|
@@ -6688,10 +6680,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6688
6680
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
6689
6681
|
);
|
|
6690
6682
|
}
|
|
6691
|
-
const vnode = createVNode(
|
|
6692
|
-
rootComponent,
|
|
6693
|
-
rootProps
|
|
6694
|
-
);
|
|
6683
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
6695
6684
|
vnode.appContext = context;
|
|
6696
6685
|
{
|
|
6697
6686
|
context.reload = () => {
|
|
@@ -7514,8 +7503,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7514
7503
|
hasMismatch = true;
|
|
7515
7504
|
warn(
|
|
7516
7505
|
`Hydration text mismatch:
|
|
7517
|
-
-
|
|
7518
|
-
|
|
7506
|
+
- Server rendered: ${JSON.stringify(
|
|
7507
|
+
node.data
|
|
7508
|
+
)}
|
|
7509
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
7519
7510
|
);
|
|
7520
7511
|
node.data = vnode.children;
|
|
7521
7512
|
}
|
|
@@ -7718,8 +7709,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7718
7709
|
hasMismatch = true;
|
|
7719
7710
|
warn(
|
|
7720
7711
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
7721
|
-
-
|
|
7722
|
-
-
|
|
7712
|
+
- Server rendered: ${el.textContent}
|
|
7713
|
+
- Client rendered: ${vnode.children}`
|
|
7723
7714
|
);
|
|
7724
7715
|
el.textContent = vnode.children;
|
|
7725
7716
|
}
|
|
@@ -9501,6 +9492,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9501
9492
|
internals,
|
|
9502
9493
|
1
|
|
9503
9494
|
);
|
|
9495
|
+
} else {
|
|
9496
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
9497
|
+
n2.props.to = n1.props.to;
|
|
9498
|
+
}
|
|
9504
9499
|
}
|
|
9505
9500
|
} else {
|
|
9506
9501
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -10354,9 +10349,12 @@ Component that was made reactive: `,
|
|
|
10354
10349
|
if (!skipOptions) {
|
|
10355
10350
|
setCurrentInstance(instance);
|
|
10356
10351
|
pauseTracking();
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10352
|
+
try {
|
|
10353
|
+
applyOptions(instance);
|
|
10354
|
+
} finally {
|
|
10355
|
+
resetTracking();
|
|
10356
|
+
unsetCurrentInstance();
|
|
10357
|
+
}
|
|
10360
10358
|
}
|
|
10361
10359
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
10362
10360
|
if (!compile && Component.template) {
|
|
@@ -10716,7 +10714,7 @@ Component that was made reactive: `,
|
|
|
10716
10714
|
return true;
|
|
10717
10715
|
}
|
|
10718
10716
|
|
|
10719
|
-
const version = "3.3.
|
|
10717
|
+
const version = "3.3.5";
|
|
10720
10718
|
const ssrUtils = null;
|
|
10721
10719
|
const resolveFilter = resolveFilter$1 ;
|
|
10722
10720
|
const _compatUtils = {
|
|
@@ -10795,922 +10793,977 @@ Component that was made reactive: `,
|
|
|
10795
10793
|
}
|
|
10796
10794
|
};
|
|
10797
10795
|
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
} else if (isSVG) {
|
|
10806
|
-
el.setAttribute("class", value);
|
|
10807
|
-
} else {
|
|
10808
|
-
el.className = value;
|
|
10809
|
-
}
|
|
10796
|
+
const TRANSITION = "transition";
|
|
10797
|
+
const ANIMATION = "animation";
|
|
10798
|
+
const vtcKey = Symbol("_vtc");
|
|
10799
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
10800
|
+
Transition.displayName = "Transition";
|
|
10801
|
+
{
|
|
10802
|
+
Transition.__isBuiltIn = true;
|
|
10810
10803
|
}
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10804
|
+
const DOMTransitionPropsValidators = {
|
|
10805
|
+
name: String,
|
|
10806
|
+
type: String,
|
|
10807
|
+
css: {
|
|
10808
|
+
type: Boolean,
|
|
10809
|
+
default: true
|
|
10810
|
+
},
|
|
10811
|
+
duration: [String, Number, Object],
|
|
10812
|
+
enterFromClass: String,
|
|
10813
|
+
enterActiveClass: String,
|
|
10814
|
+
enterToClass: String,
|
|
10815
|
+
appearFromClass: String,
|
|
10816
|
+
appearActiveClass: String,
|
|
10817
|
+
appearToClass: String,
|
|
10818
|
+
leaveFromClass: String,
|
|
10819
|
+
leaveActiveClass: String,
|
|
10820
|
+
leaveToClass: String
|
|
10821
|
+
};
|
|
10822
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
10823
|
+
{},
|
|
10824
|
+
BaseTransitionPropsValidators,
|
|
10825
|
+
DOMTransitionPropsValidators
|
|
10826
|
+
);
|
|
10827
|
+
const callHook = (hook, args = []) => {
|
|
10828
|
+
if (isArray(hook)) {
|
|
10829
|
+
hook.forEach((h2) => h2(...args));
|
|
10830
|
+
} else if (hook) {
|
|
10831
|
+
hook(...args);
|
|
10838
10832
|
}
|
|
10839
|
-
}
|
|
10840
|
-
const
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
if (
|
|
10847
|
-
|
|
10848
|
-
{
|
|
10849
|
-
if (semicolonRE.test(val)) {
|
|
10850
|
-
warn(
|
|
10851
|
-
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
10852
|
-
);
|
|
10853
|
-
}
|
|
10854
|
-
}
|
|
10855
|
-
if (name.startsWith("--")) {
|
|
10856
|
-
style.setProperty(name, val);
|
|
10857
|
-
} else {
|
|
10858
|
-
const prefixed = autoPrefix(style, name);
|
|
10859
|
-
if (importantRE.test(val)) {
|
|
10860
|
-
style.setProperty(
|
|
10861
|
-
hyphenate(prefixed),
|
|
10862
|
-
val.replace(importantRE, ""),
|
|
10863
|
-
"important"
|
|
10864
|
-
);
|
|
10865
|
-
} else {
|
|
10866
|
-
style[prefixed] = val;
|
|
10867
|
-
}
|
|
10833
|
+
};
|
|
10834
|
+
const hasExplicitCallback = (hook) => {
|
|
10835
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
10836
|
+
};
|
|
10837
|
+
function resolveTransitionProps(rawProps) {
|
|
10838
|
+
const baseProps = {};
|
|
10839
|
+
for (const key in rawProps) {
|
|
10840
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
10841
|
+
baseProps[key] = rawProps[key];
|
|
10868
10842
|
}
|
|
10869
10843
|
}
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
const prefixCache = {};
|
|
10873
|
-
function autoPrefix(style, rawName) {
|
|
10874
|
-
const cached = prefixCache[rawName];
|
|
10875
|
-
if (cached) {
|
|
10876
|
-
return cached;
|
|
10877
|
-
}
|
|
10878
|
-
let name = camelize(rawName);
|
|
10879
|
-
if (name !== "filter" && name in style) {
|
|
10880
|
-
return prefixCache[rawName] = name;
|
|
10881
|
-
}
|
|
10882
|
-
name = capitalize(name);
|
|
10883
|
-
for (let i = 0; i < prefixes.length; i++) {
|
|
10884
|
-
const prefixed = prefixes[i] + name;
|
|
10885
|
-
if (prefixed in style) {
|
|
10886
|
-
return prefixCache[rawName] = prefixed;
|
|
10887
|
-
}
|
|
10844
|
+
if (rawProps.css === false) {
|
|
10845
|
+
return baseProps;
|
|
10888
10846
|
}
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
}
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10847
|
+
const {
|
|
10848
|
+
name = "v",
|
|
10849
|
+
type,
|
|
10850
|
+
duration,
|
|
10851
|
+
enterFromClass = `${name}-enter-from`,
|
|
10852
|
+
enterActiveClass = `${name}-enter-active`,
|
|
10853
|
+
enterToClass = `${name}-enter-to`,
|
|
10854
|
+
appearFromClass = enterFromClass,
|
|
10855
|
+
appearActiveClass = enterActiveClass,
|
|
10856
|
+
appearToClass = enterToClass,
|
|
10857
|
+
leaveFromClass = `${name}-leave-from`,
|
|
10858
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
10859
|
+
leaveToClass = `${name}-leave-to`
|
|
10860
|
+
} = rawProps;
|
|
10861
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
10862
|
+
let legacyEnterFromClass;
|
|
10863
|
+
let legacyAppearFromClass;
|
|
10864
|
+
let legacyLeaveFromClass;
|
|
10865
|
+
if (legacyClassEnabled) {
|
|
10866
|
+
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
10867
|
+
if (!rawProps.enterFromClass) {
|
|
10868
|
+
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
10903
10869
|
}
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
el.removeAttribute(key);
|
|
10907
|
-
} else {
|
|
10908
|
-
el.setAttribute(key, isBoolean ? "" : value);
|
|
10870
|
+
if (!rawProps.appearFromClass) {
|
|
10871
|
+
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
10909
10872
|
}
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
10913
|
-
function compatCoerceAttr(el, key, value, instance = null) {
|
|
10914
|
-
if (isEnumeratedAttr(key)) {
|
|
10915
|
-
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
10916
|
-
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
10917
|
-
"ATTR_ENUMERATED_COERCION",
|
|
10918
|
-
instance,
|
|
10919
|
-
key,
|
|
10920
|
-
value,
|
|
10921
|
-
v2CoercedValue
|
|
10922
|
-
)) {
|
|
10923
|
-
el.setAttribute(key, v2CoercedValue);
|
|
10924
|
-
return true;
|
|
10873
|
+
if (!rawProps.leaveFromClass) {
|
|
10874
|
+
legacyLeaveFromClass = toLegacyClass(leaveFromClass);
|
|
10925
10875
|
}
|
|
10926
|
-
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
|
|
10927
|
-
"ATTR_FALSE_VALUE",
|
|
10928
|
-
instance,
|
|
10929
|
-
key
|
|
10930
|
-
)) {
|
|
10931
|
-
el.removeAttribute(key);
|
|
10932
|
-
return true;
|
|
10933
10876
|
}
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
el
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
}
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10877
|
+
const durations = normalizeDuration(duration);
|
|
10878
|
+
const enterDuration = durations && durations[0];
|
|
10879
|
+
const leaveDuration = durations && durations[1];
|
|
10880
|
+
const {
|
|
10881
|
+
onBeforeEnter,
|
|
10882
|
+
onEnter,
|
|
10883
|
+
onEnterCancelled,
|
|
10884
|
+
onLeave,
|
|
10885
|
+
onLeaveCancelled,
|
|
10886
|
+
onBeforeAppear = onBeforeEnter,
|
|
10887
|
+
onAppear = onEnter,
|
|
10888
|
+
onAppearCancelled = onEnterCancelled
|
|
10889
|
+
} = baseProps;
|
|
10890
|
+
const finishEnter = (el, isAppear, done) => {
|
|
10891
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10892
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10893
|
+
done && done();
|
|
10894
|
+
};
|
|
10895
|
+
const finishLeave = (el, done) => {
|
|
10896
|
+
el._isLeaving = false;
|
|
10897
|
+
removeTransitionClass(el, leaveFromClass);
|
|
10898
|
+
removeTransitionClass(el, leaveToClass);
|
|
10899
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
10900
|
+
done && done();
|
|
10901
|
+
};
|
|
10902
|
+
const makeEnterHook = (isAppear) => {
|
|
10903
|
+
return (el, done) => {
|
|
10904
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
10905
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
10906
|
+
callHook(hook, [el, resolve]);
|
|
10907
|
+
nextFrame(() => {
|
|
10908
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
10909
|
+
if (legacyClassEnabled) {
|
|
10910
|
+
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
10911
|
+
if (legacyClass) {
|
|
10912
|
+
removeTransitionClass(el, legacyClass);
|
|
10913
|
+
}
|
|
10914
|
+
}
|
|
10915
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10916
|
+
if (!hasExplicitCallback(hook)) {
|
|
10917
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
10918
|
+
}
|
|
10919
|
+
});
|
|
10920
|
+
};
|
|
10921
|
+
};
|
|
10922
|
+
return extend(baseProps, {
|
|
10923
|
+
onBeforeEnter(el) {
|
|
10924
|
+
callHook(onBeforeEnter, [el]);
|
|
10925
|
+
addTransitionClass(el, enterFromClass);
|
|
10926
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
10927
|
+
addTransitionClass(el, legacyEnterFromClass);
|
|
10985
10928
|
}
|
|
10929
|
+
addTransitionClass(el, enterActiveClass);
|
|
10930
|
+
},
|
|
10931
|
+
onBeforeAppear(el) {
|
|
10932
|
+
callHook(onBeforeAppear, [el]);
|
|
10933
|
+
addTransitionClass(el, appearFromClass);
|
|
10934
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
10935
|
+
addTransitionClass(el, legacyAppearFromClass);
|
|
10936
|
+
}
|
|
10937
|
+
addTransitionClass(el, appearActiveClass);
|
|
10938
|
+
},
|
|
10939
|
+
onEnter: makeEnterHook(false),
|
|
10940
|
+
onAppear: makeEnterHook(true),
|
|
10941
|
+
onLeave(el, done) {
|
|
10942
|
+
el._isLeaving = true;
|
|
10943
|
+
const resolve = () => finishLeave(el, done);
|
|
10944
|
+
addTransitionClass(el, leaveFromClass);
|
|
10945
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
10946
|
+
addTransitionClass(el, legacyLeaveFromClass);
|
|
10947
|
+
}
|
|
10948
|
+
forceReflow();
|
|
10949
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10950
|
+
nextFrame(() => {
|
|
10951
|
+
if (!el._isLeaving) {
|
|
10952
|
+
return;
|
|
10953
|
+
}
|
|
10954
|
+
removeTransitionClass(el, leaveFromClass);
|
|
10955
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
10956
|
+
removeTransitionClass(el, legacyLeaveFromClass);
|
|
10957
|
+
}
|
|
10958
|
+
addTransitionClass(el, leaveToClass);
|
|
10959
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
10960
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
10961
|
+
}
|
|
10962
|
+
});
|
|
10963
|
+
callHook(onLeave, [el, resolve]);
|
|
10964
|
+
},
|
|
10965
|
+
onEnterCancelled(el) {
|
|
10966
|
+
finishEnter(el, false);
|
|
10967
|
+
callHook(onEnterCancelled, [el]);
|
|
10968
|
+
},
|
|
10969
|
+
onAppearCancelled(el) {
|
|
10970
|
+
finishEnter(el, true);
|
|
10971
|
+
callHook(onAppearCancelled, [el]);
|
|
10972
|
+
},
|
|
10973
|
+
onLeaveCancelled(el) {
|
|
10974
|
+
finishLeave(el);
|
|
10975
|
+
callHook(onLeaveCancelled, [el]);
|
|
10986
10976
|
}
|
|
10977
|
+
});
|
|
10978
|
+
}
|
|
10979
|
+
function normalizeDuration(duration) {
|
|
10980
|
+
if (duration == null) {
|
|
10981
|
+
return null;
|
|
10982
|
+
} else if (isObject(duration)) {
|
|
10983
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
10984
|
+
} else {
|
|
10985
|
+
const n = NumberOf(duration);
|
|
10986
|
+
return [n, n];
|
|
10987
10987
|
}
|
|
10988
|
-
try {
|
|
10989
|
-
el[key] = value;
|
|
10990
|
-
} catch (e) {
|
|
10991
|
-
if (!needRemove) {
|
|
10992
|
-
warn(
|
|
10993
|
-
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
10994
|
-
e
|
|
10995
|
-
);
|
|
10996
|
-
}
|
|
10997
|
-
}
|
|
10998
|
-
needRemove && el.removeAttribute(key);
|
|
10999
10988
|
}
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
10989
|
+
function NumberOf(val) {
|
|
10990
|
+
const res = toNumber(val);
|
|
10991
|
+
{
|
|
10992
|
+
assertNumber(res, "<transition> explicit duration");
|
|
10993
|
+
}
|
|
10994
|
+
return res;
|
|
11003
10995
|
}
|
|
11004
|
-
function
|
|
11005
|
-
|
|
10996
|
+
function addTransitionClass(el, cls) {
|
|
10997
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
10998
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
11006
10999
|
}
|
|
11007
|
-
function
|
|
11008
|
-
|
|
11009
|
-
const
|
|
11010
|
-
if (
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
if (nextValue) {
|
|
11015
|
-
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11016
|
-
addEventListener(el, name, invoker, options);
|
|
11017
|
-
} else if (existingInvoker) {
|
|
11018
|
-
removeEventListener(el, name, existingInvoker, options);
|
|
11019
|
-
invokers[rawName] = void 0;
|
|
11000
|
+
function removeTransitionClass(el, cls) {
|
|
11001
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11002
|
+
const _vtc = el[vtcKey];
|
|
11003
|
+
if (_vtc) {
|
|
11004
|
+
_vtc.delete(cls);
|
|
11005
|
+
if (!_vtc.size) {
|
|
11006
|
+
el[vtcKey] = void 0;
|
|
11020
11007
|
}
|
|
11021
11008
|
}
|
|
11022
11009
|
}
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11010
|
+
function nextFrame(cb) {
|
|
11011
|
+
requestAnimationFrame(() => {
|
|
11012
|
+
requestAnimationFrame(cb);
|
|
11013
|
+
});
|
|
11014
|
+
}
|
|
11015
|
+
let endId = 0;
|
|
11016
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
11017
|
+
const id = el._endId = ++endId;
|
|
11018
|
+
const resolveIfNotStale = () => {
|
|
11019
|
+
if (id === el._endId) {
|
|
11020
|
+
resolve();
|
|
11032
11021
|
}
|
|
11022
|
+
};
|
|
11023
|
+
if (explicitTimeout) {
|
|
11024
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
11033
11025
|
}
|
|
11034
|
-
const
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11026
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
11027
|
+
if (!type) {
|
|
11028
|
+
return resolve();
|
|
11029
|
+
}
|
|
11030
|
+
const endEvent = type + "end";
|
|
11031
|
+
let ended = 0;
|
|
11032
|
+
const end = () => {
|
|
11033
|
+
el.removeEventListener(endEvent, onEnd);
|
|
11034
|
+
resolveIfNotStale();
|
|
11035
|
+
};
|
|
11036
|
+
const onEnd = (e) => {
|
|
11037
|
+
if (e.target === el && ++ended >= propCount) {
|
|
11038
|
+
end();
|
|
11046
11039
|
}
|
|
11047
|
-
callWithAsyncErrorHandling(
|
|
11048
|
-
patchStopImmediatePropagation(e, invoker.value),
|
|
11049
|
-
instance,
|
|
11050
|
-
5,
|
|
11051
|
-
[e]
|
|
11052
|
-
);
|
|
11053
11040
|
};
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11041
|
+
setTimeout(() => {
|
|
11042
|
+
if (ended < propCount) {
|
|
11043
|
+
end();
|
|
11044
|
+
}
|
|
11045
|
+
}, timeout + 1);
|
|
11046
|
+
el.addEventListener(endEvent, onEnd);
|
|
11057
11047
|
}
|
|
11058
|
-
function
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11048
|
+
function getTransitionInfo(el, expectedType) {
|
|
11049
|
+
const styles = window.getComputedStyle(el);
|
|
11050
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
11051
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
11052
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
11053
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
11054
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
11055
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
11056
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11057
|
+
let type = null;
|
|
11058
|
+
let timeout = 0;
|
|
11059
|
+
let propCount = 0;
|
|
11060
|
+
if (expectedType === TRANSITION) {
|
|
11061
|
+
if (transitionTimeout > 0) {
|
|
11062
|
+
type = TRANSITION;
|
|
11063
|
+
timeout = transitionTimeout;
|
|
11064
|
+
propCount = transitionDurations.length;
|
|
11065
|
+
}
|
|
11066
|
+
} else if (expectedType === ANIMATION) {
|
|
11067
|
+
if (animationTimeout > 0) {
|
|
11068
|
+
type = ANIMATION;
|
|
11069
|
+
timeout = animationTimeout;
|
|
11070
|
+
propCount = animationDurations.length;
|
|
11071
|
+
}
|
|
11066
11072
|
} else {
|
|
11067
|
-
|
|
11073
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
11074
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
11075
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
11068
11076
|
}
|
|
11077
|
+
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
11078
|
+
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
11079
|
+
);
|
|
11080
|
+
return {
|
|
11081
|
+
type,
|
|
11082
|
+
timeout,
|
|
11083
|
+
propCount,
|
|
11084
|
+
hasTransform
|
|
11085
|
+
};
|
|
11086
|
+
}
|
|
11087
|
+
function getTimeout(delays, durations) {
|
|
11088
|
+
while (delays.length < durations.length) {
|
|
11089
|
+
delays = delays.concat(delays);
|
|
11090
|
+
}
|
|
11091
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11092
|
+
}
|
|
11093
|
+
function toMs(s) {
|
|
11094
|
+
if (s === "auto")
|
|
11095
|
+
return 0;
|
|
11096
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11097
|
+
}
|
|
11098
|
+
function forceReflow() {
|
|
11099
|
+
return document.body.offsetHeight;
|
|
11069
11100
|
}
|
|
11070
11101
|
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
if (
|
|
11074
|
-
|
|
11075
|
-
}
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
}
|
|
11081
|
-
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
11082
|
-
patchDOMProp(
|
|
11083
|
-
el,
|
|
11084
|
-
key,
|
|
11085
|
-
nextValue,
|
|
11086
|
-
prevChildren,
|
|
11087
|
-
parentComponent,
|
|
11088
|
-
parentSuspense,
|
|
11089
|
-
unmountChildren
|
|
11090
|
-
);
|
|
11102
|
+
function patchClass(el, value, isSVG) {
|
|
11103
|
+
const transitionClasses = el[vtcKey];
|
|
11104
|
+
if (transitionClasses) {
|
|
11105
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
11106
|
+
}
|
|
11107
|
+
if (value == null) {
|
|
11108
|
+
el.removeAttribute("class");
|
|
11109
|
+
} else if (isSVG) {
|
|
11110
|
+
el.setAttribute("class", value);
|
|
11091
11111
|
} else {
|
|
11092
|
-
|
|
11093
|
-
el._trueValue = nextValue;
|
|
11094
|
-
} else if (key === "false-value") {
|
|
11095
|
-
el._falseValue = nextValue;
|
|
11096
|
-
}
|
|
11097
|
-
patchAttr(el, key, nextValue, isSVG, parentComponent);
|
|
11112
|
+
el.className = value;
|
|
11098
11113
|
}
|
|
11099
|
-
}
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11114
|
+
}
|
|
11115
|
+
|
|
11116
|
+
const vShowOldKey = Symbol("_vod");
|
|
11117
|
+
const vShow = {
|
|
11118
|
+
beforeMount(el, { value }, { transition }) {
|
|
11119
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
11120
|
+
if (transition && value) {
|
|
11121
|
+
transition.beforeEnter(el);
|
|
11122
|
+
} else {
|
|
11123
|
+
setDisplay(el, value);
|
|
11104
11124
|
}
|
|
11105
|
-
|
|
11106
|
-
|
|
11125
|
+
},
|
|
11126
|
+
mounted(el, { value }, { transition }) {
|
|
11127
|
+
if (transition && value) {
|
|
11128
|
+
transition.enter(el);
|
|
11107
11129
|
}
|
|
11108
|
-
|
|
11109
|
-
}
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11130
|
+
},
|
|
11131
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
11132
|
+
if (!value === !oldValue)
|
|
11133
|
+
return;
|
|
11134
|
+
if (transition) {
|
|
11135
|
+
if (value) {
|
|
11136
|
+
transition.beforeEnter(el);
|
|
11137
|
+
setDisplay(el, true);
|
|
11138
|
+
transition.enter(el);
|
|
11139
|
+
} else {
|
|
11140
|
+
transition.leave(el, () => {
|
|
11141
|
+
setDisplay(el, false);
|
|
11142
|
+
});
|
|
11143
|
+
}
|
|
11144
|
+
} else {
|
|
11145
|
+
setDisplay(el, value);
|
|
11146
|
+
}
|
|
11147
|
+
},
|
|
11148
|
+
beforeUnmount(el, { value }) {
|
|
11149
|
+
setDisplay(el, value);
|
|
11124
11150
|
}
|
|
11125
|
-
|
|
11151
|
+
};
|
|
11152
|
+
function setDisplay(el, value) {
|
|
11153
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11126
11154
|
}
|
|
11127
11155
|
|
|
11128
|
-
function
|
|
11129
|
-
const
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11156
|
+
function patchStyle(el, prev, next) {
|
|
11157
|
+
const style = el.style;
|
|
11158
|
+
const isCssString = isString(next);
|
|
11159
|
+
if (next && !isCssString) {
|
|
11160
|
+
if (prev && !isString(prev)) {
|
|
11161
|
+
for (const key in prev) {
|
|
11162
|
+
if (next[key] == null) {
|
|
11163
|
+
setStyle(style, key, "");
|
|
11164
|
+
}
|
|
11165
|
+
}
|
|
11133
11166
|
}
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11167
|
+
for (const key in next) {
|
|
11168
|
+
setStyle(style, key, next[key]);
|
|
11169
|
+
}
|
|
11170
|
+
} else {
|
|
11171
|
+
const currentDisplay = style.display;
|
|
11172
|
+
if (isCssString) {
|
|
11173
|
+
if (prev !== next) {
|
|
11174
|
+
style.cssText = next;
|
|
11175
|
+
}
|
|
11176
|
+
} else if (prev) {
|
|
11177
|
+
el.removeAttribute("style");
|
|
11178
|
+
}
|
|
11179
|
+
if (vShowOldKey in el) {
|
|
11180
|
+
style.display = currentDisplay;
|
|
11181
|
+
}
|
|
11182
|
+
}
|
|
11137
11183
|
}
|
|
11138
|
-
const
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
/**
|
|
11149
|
-
* @internal
|
|
11150
|
-
*/
|
|
11151
|
-
this._instance = null;
|
|
11152
|
-
this._connected = false;
|
|
11153
|
-
this._resolved = false;
|
|
11154
|
-
this._numberProps = null;
|
|
11155
|
-
if (this.shadowRoot && hydrate2) {
|
|
11156
|
-
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11157
|
-
} else {
|
|
11158
|
-
if (this.shadowRoot) {
|
|
11184
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
11185
|
+
const importantRE = /\s*!important$/;
|
|
11186
|
+
function setStyle(style, name, val) {
|
|
11187
|
+
if (isArray(val)) {
|
|
11188
|
+
val.forEach((v) => setStyle(style, name, v));
|
|
11189
|
+
} else {
|
|
11190
|
+
if (val == null)
|
|
11191
|
+
val = "";
|
|
11192
|
+
{
|
|
11193
|
+
if (semicolonRE.test(val)) {
|
|
11159
11194
|
warn(
|
|
11160
|
-
`
|
|
11195
|
+
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
11161
11196
|
);
|
|
11162
11197
|
}
|
|
11163
|
-
this.attachShadow({ mode: "open" });
|
|
11164
|
-
if (!this._def.__asyncLoader) {
|
|
11165
|
-
this._resolveProps(this._def);
|
|
11166
|
-
}
|
|
11167
11198
|
}
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
if (
|
|
11173
|
-
|
|
11199
|
+
if (name.startsWith("--")) {
|
|
11200
|
+
style.setProperty(name, val);
|
|
11201
|
+
} else {
|
|
11202
|
+
const prefixed = autoPrefix(style, name);
|
|
11203
|
+
if (importantRE.test(val)) {
|
|
11204
|
+
style.setProperty(
|
|
11205
|
+
hyphenate(prefixed),
|
|
11206
|
+
val.replace(importantRE, ""),
|
|
11207
|
+
"important"
|
|
11208
|
+
);
|
|
11174
11209
|
} else {
|
|
11175
|
-
|
|
11210
|
+
style[prefixed] = val;
|
|
11176
11211
|
}
|
|
11177
11212
|
}
|
|
11178
11213
|
}
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
});
|
|
11214
|
+
}
|
|
11215
|
+
const prefixes = ["Webkit", "Moz", "ms"];
|
|
11216
|
+
const prefixCache = {};
|
|
11217
|
+
function autoPrefix(style, rawName) {
|
|
11218
|
+
const cached = prefixCache[rawName];
|
|
11219
|
+
if (cached) {
|
|
11220
|
+
return cached;
|
|
11187
11221
|
}
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11222
|
+
let name = camelize(rawName);
|
|
11223
|
+
if (name !== "filter" && name in style) {
|
|
11224
|
+
return prefixCache[rawName] = name;
|
|
11225
|
+
}
|
|
11226
|
+
name = capitalize(name);
|
|
11227
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
11228
|
+
const prefixed = prefixes[i] + name;
|
|
11229
|
+
if (prefixed in style) {
|
|
11230
|
+
return prefixCache[rawName] = prefixed;
|
|
11195
11231
|
}
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
for (const key in props) {
|
|
11206
|
-
const opt = props[key];
|
|
11207
|
-
if (opt === Number || opt && opt.type === Number) {
|
|
11208
|
-
if (key in this._props) {
|
|
11209
|
-
this._props[key] = toNumber(this._props[key]);
|
|
11210
|
-
}
|
|
11211
|
-
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11212
|
-
}
|
|
11213
|
-
}
|
|
11214
|
-
}
|
|
11215
|
-
this._numberProps = numberProps;
|
|
11216
|
-
if (isAsync) {
|
|
11217
|
-
this._resolveProps(def);
|
|
11218
|
-
}
|
|
11219
|
-
this._applyStyles(styles);
|
|
11220
|
-
this._update();
|
|
11221
|
-
};
|
|
11222
|
-
const asyncDef = this._def.__asyncLoader;
|
|
11223
|
-
if (asyncDef) {
|
|
11224
|
-
asyncDef().then((def) => resolve(def, true));
|
|
11232
|
+
}
|
|
11233
|
+
return rawName;
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11236
|
+
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
11237
|
+
function patchAttr(el, key, value, isSVG, instance) {
|
|
11238
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
11239
|
+
if (value == null) {
|
|
11240
|
+
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
11225
11241
|
} else {
|
|
11226
|
-
|
|
11242
|
+
el.setAttributeNS(xlinkNS, key, value);
|
|
11227
11243
|
}
|
|
11228
|
-
}
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11232
|
-
for (const key of Object.keys(this)) {
|
|
11233
|
-
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11234
|
-
this._setProp(key, this[key], true, false);
|
|
11235
|
-
}
|
|
11244
|
+
} else {
|
|
11245
|
+
if (compatCoerceAttr(el, key, value, instance)) {
|
|
11246
|
+
return;
|
|
11236
11247
|
}
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
set(val) {
|
|
11243
|
-
this._setProp(key, val);
|
|
11244
|
-
}
|
|
11245
|
-
});
|
|
11248
|
+
const isBoolean = isSpecialBooleanAttr(key);
|
|
11249
|
+
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
11250
|
+
el.removeAttribute(key);
|
|
11251
|
+
} else {
|
|
11252
|
+
el.setAttribute(key, isBoolean ? "" : value);
|
|
11246
11253
|
}
|
|
11247
11254
|
}
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11255
|
+
}
|
|
11256
|
+
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
11257
|
+
function compatCoerceAttr(el, key, value, instance = null) {
|
|
11258
|
+
if (isEnumeratedAttr(key)) {
|
|
11259
|
+
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
11260
|
+
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
11261
|
+
"ATTR_ENUMERATED_COERCION",
|
|
11262
|
+
instance,
|
|
11263
|
+
key,
|
|
11264
|
+
value,
|
|
11265
|
+
v2CoercedValue
|
|
11266
|
+
)) {
|
|
11267
|
+
el.setAttribute(key, v2CoercedValue);
|
|
11268
|
+
return true;
|
|
11253
11269
|
}
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
return
|
|
11270
|
+
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
|
|
11271
|
+
"ATTR_FALSE_VALUE",
|
|
11272
|
+
instance,
|
|
11273
|
+
key
|
|
11274
|
+
)) {
|
|
11275
|
+
el.removeAttribute(key);
|
|
11276
|
+
return true;
|
|
11261
11277
|
}
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
this._update();
|
|
11270
|
-
}
|
|
11271
|
-
if (shouldReflect) {
|
|
11272
|
-
if (val === true) {
|
|
11273
|
-
this.setAttribute(hyphenate(key), "");
|
|
11274
|
-
} else if (typeof val === "string" || typeof val === "number") {
|
|
11275
|
-
this.setAttribute(hyphenate(key), val + "");
|
|
11276
|
-
} else if (!val) {
|
|
11277
|
-
this.removeAttribute(hyphenate(key));
|
|
11278
|
-
}
|
|
11279
|
-
}
|
|
11278
|
+
return false;
|
|
11279
|
+
}
|
|
11280
|
+
|
|
11281
|
+
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
11282
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
11283
|
+
if (prevChildren) {
|
|
11284
|
+
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
11280
11285
|
}
|
|
11286
|
+
el[key] = value == null ? "" : value;
|
|
11287
|
+
return;
|
|
11281
11288
|
}
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
const
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
instance.isCE = true;
|
|
11291
|
-
{
|
|
11292
|
-
instance.ceReload = (newStyles) => {
|
|
11293
|
-
if (this._styles) {
|
|
11294
|
-
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
11295
|
-
this._styles.length = 0;
|
|
11296
|
-
}
|
|
11297
|
-
this._applyStyles(newStyles);
|
|
11298
|
-
this._instance = null;
|
|
11299
|
-
this._update();
|
|
11300
|
-
};
|
|
11301
|
-
}
|
|
11302
|
-
const dispatch = (event, args) => {
|
|
11303
|
-
this.dispatchEvent(
|
|
11304
|
-
new CustomEvent(event, {
|
|
11305
|
-
detail: args
|
|
11306
|
-
})
|
|
11307
|
-
);
|
|
11308
|
-
};
|
|
11309
|
-
instance.emit = (event, ...args) => {
|
|
11310
|
-
dispatch(event, args);
|
|
11311
|
-
if (hyphenate(event) !== event) {
|
|
11312
|
-
dispatch(hyphenate(event), args);
|
|
11313
|
-
}
|
|
11314
|
-
};
|
|
11315
|
-
let parent = this;
|
|
11316
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11317
|
-
if (parent instanceof VueElement) {
|
|
11318
|
-
instance.parent = parent._instance;
|
|
11319
|
-
instance.provides = parent._instance.provides;
|
|
11320
|
-
break;
|
|
11321
|
-
}
|
|
11322
|
-
}
|
|
11323
|
-
};
|
|
11289
|
+
const tag = el.tagName;
|
|
11290
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
11291
|
+
!tag.includes("-")) {
|
|
11292
|
+
el._value = value;
|
|
11293
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
11294
|
+
const newValue = value == null ? "" : value;
|
|
11295
|
+
if (oldValue !== newValue) {
|
|
11296
|
+
el.value = newValue;
|
|
11324
11297
|
}
|
|
11325
|
-
|
|
11298
|
+
if (value == null) {
|
|
11299
|
+
el.removeAttribute(key);
|
|
11300
|
+
}
|
|
11301
|
+
return;
|
|
11326
11302
|
}
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11303
|
+
let needRemove = false;
|
|
11304
|
+
if (value === "" || value == null) {
|
|
11305
|
+
const type = typeof el[key];
|
|
11306
|
+
if (type === "boolean") {
|
|
11307
|
+
value = includeBooleanAttr(value);
|
|
11308
|
+
} else if (value == null && type === "string") {
|
|
11309
|
+
value = "";
|
|
11310
|
+
needRemove = true;
|
|
11311
|
+
} else if (type === "number") {
|
|
11312
|
+
value = 0;
|
|
11313
|
+
needRemove = true;
|
|
11314
|
+
}
|
|
11315
|
+
} else {
|
|
11316
|
+
if (value === false && compatUtils.isCompatEnabled(
|
|
11317
|
+
"ATTR_FALSE_VALUE",
|
|
11318
|
+
parentComponent
|
|
11319
|
+
)) {
|
|
11320
|
+
const type = typeof el[key];
|
|
11321
|
+
if (type === "string" || type === "number") {
|
|
11322
|
+
compatUtils.warnDeprecation(
|
|
11323
|
+
"ATTR_FALSE_VALUE",
|
|
11324
|
+
parentComponent,
|
|
11325
|
+
key
|
|
11326
|
+
);
|
|
11327
|
+
value = type === "number" ? 0 : "";
|
|
11328
|
+
needRemove = true;
|
|
11329
|
+
}
|
|
11337
11330
|
}
|
|
11338
11331
|
}
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11332
|
+
try {
|
|
11333
|
+
el[key] = value;
|
|
11334
|
+
} catch (e) {
|
|
11335
|
+
if (!needRemove) {
|
|
11336
|
+
warn(
|
|
11337
|
+
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
11338
|
+
e
|
|
11339
|
+
);
|
|
11345
11340
|
}
|
|
11346
|
-
return EMPTY_OBJ;
|
|
11347
11341
|
}
|
|
11342
|
+
needRemove && el.removeAttribute(key);
|
|
11348
11343
|
}
|
|
11349
11344
|
|
|
11350
|
-
function
|
|
11351
|
-
|
|
11352
|
-
if (!instance) {
|
|
11353
|
-
warn(`useCssVars is called without current active component instance.`);
|
|
11354
|
-
return;
|
|
11355
|
-
}
|
|
11356
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11357
|
-
Array.from(
|
|
11358
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11359
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
11360
|
-
};
|
|
11361
|
-
const setVars = () => {
|
|
11362
|
-
const vars = getter(instance.proxy);
|
|
11363
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
11364
|
-
updateTeleports(vars);
|
|
11365
|
-
};
|
|
11366
|
-
watchPostEffect(setVars);
|
|
11367
|
-
onMounted(() => {
|
|
11368
|
-
const ob = new MutationObserver(setVars);
|
|
11369
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11370
|
-
onUnmounted(() => ob.disconnect());
|
|
11371
|
-
});
|
|
11345
|
+
function addEventListener(el, event, handler, options) {
|
|
11346
|
+
el.addEventListener(event, handler, options);
|
|
11372
11347
|
}
|
|
11373
|
-
function
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11348
|
+
function removeEventListener(el, event, handler, options) {
|
|
11349
|
+
el.removeEventListener(event, handler, options);
|
|
11350
|
+
}
|
|
11351
|
+
const veiKey = Symbol("_vei");
|
|
11352
|
+
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
11353
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
11354
|
+
const existingInvoker = invokers[rawName];
|
|
11355
|
+
if (nextValue && existingInvoker) {
|
|
11356
|
+
existingInvoker.value = nextValue;
|
|
11357
|
+
} else {
|
|
11358
|
+
const [name, options] = parseName(rawName);
|
|
11359
|
+
if (nextValue) {
|
|
11360
|
+
const invoker = invokers[rawName] = createInvoker(nextValue, instance);
|
|
11361
|
+
addEventListener(el, name, invoker, options);
|
|
11362
|
+
} else if (existingInvoker) {
|
|
11363
|
+
removeEventListener(el, name, existingInvoker, options);
|
|
11364
|
+
invokers[rawName] = void 0;
|
|
11381
11365
|
}
|
|
11382
11366
|
}
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
setVarsOnNode(el, vars);
|
|
11394
|
-
if (el === anchor)
|
|
11395
|
-
break;
|
|
11396
|
-
el = el.nextSibling;
|
|
11367
|
+
}
|
|
11368
|
+
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
11369
|
+
function parseName(name) {
|
|
11370
|
+
let options;
|
|
11371
|
+
if (optionsModifierRE.test(name)) {
|
|
11372
|
+
options = {};
|
|
11373
|
+
let m;
|
|
11374
|
+
while (m = name.match(optionsModifierRE)) {
|
|
11375
|
+
name = name.slice(0, name.length - m[0].length);
|
|
11376
|
+
options[m[0].toLowerCase()] = true;
|
|
11397
11377
|
}
|
|
11398
11378
|
}
|
|
11379
|
+
const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
|
|
11380
|
+
return [event, options];
|
|
11399
11381
|
}
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11382
|
+
let cachedNow = 0;
|
|
11383
|
+
const p = /* @__PURE__ */ Promise.resolve();
|
|
11384
|
+
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
11385
|
+
function createInvoker(initialValue, instance) {
|
|
11386
|
+
const invoker = (e) => {
|
|
11387
|
+
if (!e._vts) {
|
|
11388
|
+
e._vts = Date.now();
|
|
11389
|
+
} else if (e._vts <= invoker.attached) {
|
|
11390
|
+
return;
|
|
11405
11391
|
}
|
|
11392
|
+
callWithAsyncErrorHandling(
|
|
11393
|
+
patchStopImmediatePropagation(e, invoker.value),
|
|
11394
|
+
instance,
|
|
11395
|
+
5,
|
|
11396
|
+
[e]
|
|
11397
|
+
);
|
|
11398
|
+
};
|
|
11399
|
+
invoker.value = initialValue;
|
|
11400
|
+
invoker.attached = getNow();
|
|
11401
|
+
return invoker;
|
|
11402
|
+
}
|
|
11403
|
+
function patchStopImmediatePropagation(e, value) {
|
|
11404
|
+
if (isArray(value)) {
|
|
11405
|
+
const originalStop = e.stopImmediatePropagation;
|
|
11406
|
+
e.stopImmediatePropagation = () => {
|
|
11407
|
+
originalStop.call(e);
|
|
11408
|
+
e._stopped = true;
|
|
11409
|
+
};
|
|
11410
|
+
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
11411
|
+
} else {
|
|
11412
|
+
return value;
|
|
11406
11413
|
}
|
|
11407
11414
|
}
|
|
11408
11415
|
|
|
11409
|
-
const
|
|
11410
|
-
const
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11416
|
+
const nativeOnRE = /^on[a-z]/;
|
|
11417
|
+
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11418
|
+
if (key === "class") {
|
|
11419
|
+
patchClass(el, nextValue, isSVG);
|
|
11420
|
+
} else if (key === "style") {
|
|
11421
|
+
patchStyle(el, prevValue, nextValue);
|
|
11422
|
+
} else if (isOn(key)) {
|
|
11423
|
+
if (!isModelListener(key)) {
|
|
11424
|
+
patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
11425
|
+
}
|
|
11426
|
+
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
11427
|
+
patchDOMProp(
|
|
11428
|
+
el,
|
|
11429
|
+
key,
|
|
11430
|
+
nextValue,
|
|
11431
|
+
prevChildren,
|
|
11432
|
+
parentComponent,
|
|
11433
|
+
parentSuspense,
|
|
11434
|
+
unmountChildren
|
|
11435
|
+
);
|
|
11436
|
+
} else {
|
|
11437
|
+
if (key === "true-value") {
|
|
11438
|
+
el._trueValue = nextValue;
|
|
11439
|
+
} else if (key === "false-value") {
|
|
11440
|
+
el._falseValue = nextValue;
|
|
11441
|
+
}
|
|
11442
|
+
patchAttr(el, key, nextValue, isSVG, parentComponent);
|
|
11443
|
+
}
|
|
11433
11444
|
};
|
|
11434
|
-
|
|
11435
|
-
{
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11445
|
+
function shouldSetAsProp(el, key, value, isSVG) {
|
|
11446
|
+
if (isSVG) {
|
|
11447
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
11448
|
+
return true;
|
|
11449
|
+
}
|
|
11450
|
+
if (key in el && nativeOnRE.test(key) && isFunction(value)) {
|
|
11451
|
+
return true;
|
|
11452
|
+
}
|
|
11453
|
+
return false;
|
|
11454
|
+
}
|
|
11455
|
+
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
11456
|
+
return false;
|
|
11457
|
+
}
|
|
11458
|
+
if (key === "form") {
|
|
11459
|
+
return false;
|
|
11460
|
+
}
|
|
11461
|
+
if (key === "list" && el.tagName === "INPUT") {
|
|
11462
|
+
return false;
|
|
11463
|
+
}
|
|
11464
|
+
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11465
|
+
return false;
|
|
11466
|
+
}
|
|
11467
|
+
if (nativeOnRE.test(key) && isString(value)) {
|
|
11468
|
+
return false;
|
|
11469
|
+
}
|
|
11470
|
+
return key in el;
|
|
11471
|
+
}
|
|
11472
|
+
|
|
11473
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11474
|
+
// @__NO_SIDE_EFFECTS__
|
|
11475
|
+
function defineCustomElement(options, hydrate2) {
|
|
11476
|
+
const Comp = defineComponent(options);
|
|
11477
|
+
class VueCustomElement extends VueElement {
|
|
11478
|
+
constructor(initialProps) {
|
|
11479
|
+
super(Comp, initialProps, hydrate2);
|
|
11480
|
+
}
|
|
11444
11481
|
}
|
|
11482
|
+
VueCustomElement.def = Comp;
|
|
11483
|
+
return VueCustomElement;
|
|
11484
|
+
}
|
|
11485
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
11486
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
11487
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
11445
11488
|
};
|
|
11446
|
-
const
|
|
11447
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
11489
|
+
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
11448
11490
|
};
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11491
|
+
class VueElement extends BaseClass {
|
|
11492
|
+
constructor(_def, _props = {}, hydrate2) {
|
|
11493
|
+
super();
|
|
11494
|
+
this._def = _def;
|
|
11495
|
+
this._props = _props;
|
|
11496
|
+
/**
|
|
11497
|
+
* @internal
|
|
11498
|
+
*/
|
|
11499
|
+
this._instance = null;
|
|
11500
|
+
this._connected = false;
|
|
11501
|
+
this._resolved = false;
|
|
11502
|
+
this._numberProps = null;
|
|
11503
|
+
this._ob = null;
|
|
11504
|
+
if (this.shadowRoot && hydrate2) {
|
|
11505
|
+
hydrate2(this._createVNode(), this.shadowRoot);
|
|
11506
|
+
} else {
|
|
11507
|
+
if (this.shadowRoot) {
|
|
11508
|
+
warn(
|
|
11509
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
11510
|
+
);
|
|
11511
|
+
}
|
|
11512
|
+
this.attachShadow({ mode: "open" });
|
|
11513
|
+
if (!this._def.__asyncLoader) {
|
|
11514
|
+
this._resolveProps(this._def);
|
|
11515
|
+
}
|
|
11454
11516
|
}
|
|
11455
11517
|
}
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
enterActiveClass = `${name}-enter-active`,
|
|
11465
|
-
enterToClass = `${name}-enter-to`,
|
|
11466
|
-
appearFromClass = enterFromClass,
|
|
11467
|
-
appearActiveClass = enterActiveClass,
|
|
11468
|
-
appearToClass = enterToClass,
|
|
11469
|
-
leaveFromClass = `${name}-leave-from`,
|
|
11470
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
11471
|
-
leaveToClass = `${name}-leave-to`
|
|
11472
|
-
} = rawProps;
|
|
11473
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
11474
|
-
let legacyEnterFromClass;
|
|
11475
|
-
let legacyAppearFromClass;
|
|
11476
|
-
let legacyLeaveFromClass;
|
|
11477
|
-
if (legacyClassEnabled) {
|
|
11478
|
-
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
11479
|
-
if (!rawProps.enterFromClass) {
|
|
11480
|
-
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
11481
|
-
}
|
|
11482
|
-
if (!rawProps.appearFromClass) {
|
|
11483
|
-
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
11518
|
+
connectedCallback() {
|
|
11519
|
+
this._connected = true;
|
|
11520
|
+
if (!this._instance) {
|
|
11521
|
+
if (this._resolved) {
|
|
11522
|
+
this._update();
|
|
11523
|
+
} else {
|
|
11524
|
+
this._resolveDef();
|
|
11525
|
+
}
|
|
11484
11526
|
}
|
|
11485
|
-
|
|
11486
|
-
|
|
11527
|
+
}
|
|
11528
|
+
disconnectedCallback() {
|
|
11529
|
+
this._connected = false;
|
|
11530
|
+
if (this._ob) {
|
|
11531
|
+
this._ob.disconnect();
|
|
11532
|
+
this._ob = null;
|
|
11487
11533
|
}
|
|
11534
|
+
nextTick(() => {
|
|
11535
|
+
if (!this._connected) {
|
|
11536
|
+
render(null, this.shadowRoot);
|
|
11537
|
+
this._instance = null;
|
|
11538
|
+
}
|
|
11539
|
+
});
|
|
11488
11540
|
}
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
const makeEnterHook = (isAppear) => {
|
|
11515
|
-
return (el, done) => {
|
|
11516
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
11517
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
11518
|
-
callHook(hook, [el, resolve]);
|
|
11519
|
-
nextFrame(() => {
|
|
11520
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
11521
|
-
if (legacyClassEnabled) {
|
|
11522
|
-
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
11523
|
-
if (legacyClass) {
|
|
11524
|
-
removeTransitionClass(el, legacyClass);
|
|
11541
|
+
/**
|
|
11542
|
+
* resolve inner component definition (handle possible async component)
|
|
11543
|
+
*/
|
|
11544
|
+
_resolveDef() {
|
|
11545
|
+
this._resolved = true;
|
|
11546
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11547
|
+
this._setAttr(this.attributes[i].name);
|
|
11548
|
+
}
|
|
11549
|
+
this._ob = new MutationObserver((mutations) => {
|
|
11550
|
+
for (const m of mutations) {
|
|
11551
|
+
this._setAttr(m.attributeName);
|
|
11552
|
+
}
|
|
11553
|
+
});
|
|
11554
|
+
this._ob.observe(this, { attributes: true });
|
|
11555
|
+
const resolve = (def, isAsync = false) => {
|
|
11556
|
+
const { props, styles } = def;
|
|
11557
|
+
let numberProps;
|
|
11558
|
+
if (props && !isArray(props)) {
|
|
11559
|
+
for (const key in props) {
|
|
11560
|
+
const opt = props[key];
|
|
11561
|
+
if (opt === Number || opt && opt.type === Number) {
|
|
11562
|
+
if (key in this._props) {
|
|
11563
|
+
this._props[key] = toNumber(this._props[key]);
|
|
11564
|
+
}
|
|
11565
|
+
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
11525
11566
|
}
|
|
11526
11567
|
}
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
}
|
|
11568
|
+
}
|
|
11569
|
+
this._numberProps = numberProps;
|
|
11570
|
+
if (isAsync) {
|
|
11571
|
+
this._resolveProps(def);
|
|
11572
|
+
}
|
|
11573
|
+
this._applyStyles(styles);
|
|
11574
|
+
this._update();
|
|
11532
11575
|
};
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11576
|
+
const asyncDef = this._def.__asyncLoader;
|
|
11577
|
+
if (asyncDef) {
|
|
11578
|
+
asyncDef().then((def) => resolve(def, true));
|
|
11579
|
+
} else {
|
|
11580
|
+
resolve(this._def);
|
|
11581
|
+
}
|
|
11582
|
+
}
|
|
11583
|
+
_resolveProps(def) {
|
|
11584
|
+
const { props } = def;
|
|
11585
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
11586
|
+
for (const key of Object.keys(this)) {
|
|
11587
|
+
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
11588
|
+
this._setProp(key, this[key], true, false);
|
|
11540
11589
|
}
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11590
|
+
}
|
|
11591
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
11592
|
+
Object.defineProperty(this, key, {
|
|
11593
|
+
get() {
|
|
11594
|
+
return this._getProp(key);
|
|
11595
|
+
},
|
|
11596
|
+
set(val) {
|
|
11597
|
+
this._setProp(key, val);
|
|
11598
|
+
}
|
|
11599
|
+
});
|
|
11600
|
+
}
|
|
11601
|
+
}
|
|
11602
|
+
_setAttr(key) {
|
|
11603
|
+
let value = this.getAttribute(key);
|
|
11604
|
+
const camelKey = camelize(key);
|
|
11605
|
+
if (this._numberProps && this._numberProps[camelKey]) {
|
|
11606
|
+
value = toNumber(value);
|
|
11607
|
+
}
|
|
11608
|
+
this._setProp(camelKey, value, false);
|
|
11609
|
+
}
|
|
11610
|
+
/**
|
|
11611
|
+
* @internal
|
|
11612
|
+
*/
|
|
11613
|
+
_getProp(key) {
|
|
11614
|
+
return this._props[key];
|
|
11615
|
+
}
|
|
11616
|
+
/**
|
|
11617
|
+
* @internal
|
|
11618
|
+
*/
|
|
11619
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11620
|
+
if (val !== this._props[key]) {
|
|
11621
|
+
this._props[key] = val;
|
|
11622
|
+
if (shouldUpdate && this._instance) {
|
|
11623
|
+
this._update();
|
|
11548
11624
|
}
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11558
|
-
addTransitionClass(el, legacyLeaveFromClass);
|
|
11625
|
+
if (shouldReflect) {
|
|
11626
|
+
if (val === true) {
|
|
11627
|
+
this.setAttribute(hyphenate(key), "");
|
|
11628
|
+
} else if (typeof val === "string" || typeof val === "number") {
|
|
11629
|
+
this.setAttribute(hyphenate(key), val + "");
|
|
11630
|
+
} else if (!val) {
|
|
11631
|
+
this.removeAttribute(hyphenate(key));
|
|
11632
|
+
}
|
|
11559
11633
|
}
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11634
|
+
}
|
|
11635
|
+
}
|
|
11636
|
+
_update() {
|
|
11637
|
+
render(this._createVNode(), this.shadowRoot);
|
|
11638
|
+
}
|
|
11639
|
+
_createVNode() {
|
|
11640
|
+
const vnode = createVNode(this._def, extend({}, this._props));
|
|
11641
|
+
if (!this._instance) {
|
|
11642
|
+
vnode.ce = (instance) => {
|
|
11643
|
+
this._instance = instance;
|
|
11644
|
+
instance.isCE = true;
|
|
11645
|
+
{
|
|
11646
|
+
instance.ceReload = (newStyles) => {
|
|
11647
|
+
if (this._styles) {
|
|
11648
|
+
this._styles.forEach((s) => this.shadowRoot.removeChild(s));
|
|
11649
|
+
this._styles.length = 0;
|
|
11650
|
+
}
|
|
11651
|
+
this._applyStyles(newStyles);
|
|
11652
|
+
this._instance = null;
|
|
11653
|
+
this._update();
|
|
11654
|
+
};
|
|
11565
11655
|
}
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11656
|
+
const dispatch = (event, args) => {
|
|
11657
|
+
this.dispatchEvent(
|
|
11658
|
+
new CustomEvent(event, {
|
|
11659
|
+
detail: args
|
|
11660
|
+
})
|
|
11661
|
+
);
|
|
11662
|
+
};
|
|
11663
|
+
instance.emit = (event, ...args) => {
|
|
11664
|
+
dispatch(event, args);
|
|
11665
|
+
if (hyphenate(event) !== event) {
|
|
11666
|
+
dispatch(hyphenate(event), args);
|
|
11667
|
+
}
|
|
11668
|
+
};
|
|
11669
|
+
let parent = this;
|
|
11670
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
11671
|
+
if (parent instanceof VueElement) {
|
|
11672
|
+
instance.parent = parent._instance;
|
|
11673
|
+
instance.provides = parent._instance.provides;
|
|
11674
|
+
break;
|
|
11675
|
+
}
|
|
11569
11676
|
}
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11677
|
+
};
|
|
11678
|
+
}
|
|
11679
|
+
return vnode;
|
|
11680
|
+
}
|
|
11681
|
+
_applyStyles(styles) {
|
|
11682
|
+
if (styles) {
|
|
11683
|
+
styles.forEach((css) => {
|
|
11684
|
+
const s = document.createElement("style");
|
|
11685
|
+
s.textContent = css;
|
|
11686
|
+
this.shadowRoot.appendChild(s);
|
|
11687
|
+
{
|
|
11688
|
+
(this._styles || (this._styles = [])).push(s);
|
|
11573
11689
|
}
|
|
11574
11690
|
});
|
|
11575
|
-
callHook(onLeave, [el, resolve]);
|
|
11576
|
-
},
|
|
11577
|
-
onEnterCancelled(el) {
|
|
11578
|
-
finishEnter(el, false);
|
|
11579
|
-
callHook(onEnterCancelled, [el]);
|
|
11580
|
-
},
|
|
11581
|
-
onAppearCancelled(el) {
|
|
11582
|
-
finishEnter(el, true);
|
|
11583
|
-
callHook(onAppearCancelled, [el]);
|
|
11584
|
-
},
|
|
11585
|
-
onLeaveCancelled(el) {
|
|
11586
|
-
finishLeave(el);
|
|
11587
|
-
callHook(onLeaveCancelled, [el]);
|
|
11588
11691
|
}
|
|
11589
|
-
});
|
|
11590
|
-
}
|
|
11591
|
-
function normalizeDuration(duration) {
|
|
11592
|
-
if (duration == null) {
|
|
11593
|
-
return null;
|
|
11594
|
-
} else if (isObject(duration)) {
|
|
11595
|
-
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
11596
|
-
} else {
|
|
11597
|
-
const n = NumberOf(duration);
|
|
11598
|
-
return [n, n];
|
|
11599
11692
|
}
|
|
11600
11693
|
}
|
|
11601
|
-
|
|
11602
|
-
|
|
11694
|
+
|
|
11695
|
+
function useCssModule(name = "$style") {
|
|
11603
11696
|
{
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
return res;
|
|
11607
|
-
}
|
|
11608
|
-
function addTransitionClass(el, cls) {
|
|
11609
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
11610
|
-
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
11611
|
-
}
|
|
11612
|
-
function removeTransitionClass(el, cls) {
|
|
11613
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
11614
|
-
const { _vtc } = el;
|
|
11615
|
-
if (_vtc) {
|
|
11616
|
-
_vtc.delete(cls);
|
|
11617
|
-
if (!_vtc.size) {
|
|
11618
|
-
el._vtc = void 0;
|
|
11697
|
+
{
|
|
11698
|
+
warn(`useCssModule() is not supported in the global build.`);
|
|
11619
11699
|
}
|
|
11700
|
+
return EMPTY_OBJ;
|
|
11620
11701
|
}
|
|
11621
11702
|
}
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
11629
|
-
const id = el._endId = ++endId;
|
|
11630
|
-
const resolveIfNotStale = () => {
|
|
11631
|
-
if (id === el._endId) {
|
|
11632
|
-
resolve();
|
|
11633
|
-
}
|
|
11634
|
-
};
|
|
11635
|
-
if (explicitTimeout) {
|
|
11636
|
-
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
11637
|
-
}
|
|
11638
|
-
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
11639
|
-
if (!type) {
|
|
11640
|
-
return resolve();
|
|
11703
|
+
|
|
11704
|
+
function useCssVars(getter) {
|
|
11705
|
+
const instance = getCurrentInstance();
|
|
11706
|
+
if (!instance) {
|
|
11707
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11708
|
+
return;
|
|
11641
11709
|
}
|
|
11642
|
-
const
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
resolveIfNotStale();
|
|
11710
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11711
|
+
Array.from(
|
|
11712
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11713
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11647
11714
|
};
|
|
11648
|
-
const
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11715
|
+
const setVars = () => {
|
|
11716
|
+
const vars = getter(instance.proxy);
|
|
11717
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11718
|
+
updateTeleports(vars);
|
|
11652
11719
|
};
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
}
|
|
11657
|
-
|
|
11658
|
-
|
|
11720
|
+
watchPostEffect(setVars);
|
|
11721
|
+
onMounted(() => {
|
|
11722
|
+
const ob = new MutationObserver(setVars);
|
|
11723
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11724
|
+
onUnmounted(() => ob.disconnect());
|
|
11725
|
+
});
|
|
11659
11726
|
}
|
|
11660
|
-
function
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
11669
|
-
let type = null;
|
|
11670
|
-
let timeout = 0;
|
|
11671
|
-
let propCount = 0;
|
|
11672
|
-
if (expectedType === TRANSITION) {
|
|
11673
|
-
if (transitionTimeout > 0) {
|
|
11674
|
-
type = TRANSITION;
|
|
11675
|
-
timeout = transitionTimeout;
|
|
11676
|
-
propCount = transitionDurations.length;
|
|
11727
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11728
|
+
if (vnode.shapeFlag & 128) {
|
|
11729
|
+
const suspense = vnode.suspense;
|
|
11730
|
+
vnode = suspense.activeBranch;
|
|
11731
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11732
|
+
suspense.effects.push(() => {
|
|
11733
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11734
|
+
});
|
|
11677
11735
|
}
|
|
11678
|
-
}
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11736
|
+
}
|
|
11737
|
+
while (vnode.component) {
|
|
11738
|
+
vnode = vnode.component.subTree;
|
|
11739
|
+
}
|
|
11740
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11741
|
+
setVarsOnNode(vnode.el, vars);
|
|
11742
|
+
} else if (vnode.type === Fragment) {
|
|
11743
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11744
|
+
} else if (vnode.type === Static) {
|
|
11745
|
+
let { el, anchor } = vnode;
|
|
11746
|
+
while (el) {
|
|
11747
|
+
setVarsOnNode(el, vars);
|
|
11748
|
+
if (el === anchor)
|
|
11749
|
+
break;
|
|
11750
|
+
el = el.nextSibling;
|
|
11683
11751
|
}
|
|
11684
|
-
} else {
|
|
11685
|
-
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
11686
|
-
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
11687
|
-
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
11688
11752
|
}
|
|
11689
|
-
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
11690
|
-
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
11691
|
-
);
|
|
11692
|
-
return {
|
|
11693
|
-
type,
|
|
11694
|
-
timeout,
|
|
11695
|
-
propCount,
|
|
11696
|
-
hasTransform
|
|
11697
|
-
};
|
|
11698
11753
|
}
|
|
11699
|
-
function
|
|
11700
|
-
|
|
11701
|
-
|
|
11754
|
+
function setVarsOnNode(el, vars) {
|
|
11755
|
+
if (el.nodeType === 1) {
|
|
11756
|
+
const style = el.style;
|
|
11757
|
+
for (const key in vars) {
|
|
11758
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11759
|
+
}
|
|
11702
11760
|
}
|
|
11703
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
11704
|
-
}
|
|
11705
|
-
function toMs(s) {
|
|
11706
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11707
|
-
}
|
|
11708
|
-
function forceReflow() {
|
|
11709
|
-
return document.body.offsetHeight;
|
|
11710
11761
|
}
|
|
11711
11762
|
|
|
11712
11763
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
11713
11764
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11765
|
+
const moveCbKey = Symbol("_moveCb");
|
|
11766
|
+
const enterCbKey = Symbol("_enterCb");
|
|
11714
11767
|
const TransitionGroupImpl = {
|
|
11715
11768
|
name: "TransitionGroup",
|
|
11716
11769
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -11743,13 +11796,13 @@ Component that was made reactive: `,
|
|
|
11743
11796
|
const style = el.style;
|
|
11744
11797
|
addTransitionClass(el, moveClass);
|
|
11745
11798
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
11746
|
-
const cb = el
|
|
11799
|
+
const cb = el[moveCbKey] = (e) => {
|
|
11747
11800
|
if (e && e.target !== el) {
|
|
11748
11801
|
return;
|
|
11749
11802
|
}
|
|
11750
11803
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
11751
11804
|
el.removeEventListener("transitionend", cb);
|
|
11752
|
-
el
|
|
11805
|
+
el[moveCbKey] = null;
|
|
11753
11806
|
removeTransitionClass(el, moveClass);
|
|
11754
11807
|
}
|
|
11755
11808
|
};
|
|
@@ -11801,11 +11854,11 @@ Component that was made reactive: `,
|
|
|
11801
11854
|
const TransitionGroup = TransitionGroupImpl;
|
|
11802
11855
|
function callPendingCbs(c) {
|
|
11803
11856
|
const el = c.el;
|
|
11804
|
-
if (el
|
|
11805
|
-
el
|
|
11857
|
+
if (el[moveCbKey]) {
|
|
11858
|
+
el[moveCbKey]();
|
|
11806
11859
|
}
|
|
11807
|
-
if (el
|
|
11808
|
-
el
|
|
11860
|
+
if (el[enterCbKey]) {
|
|
11861
|
+
el[enterCbKey]();
|
|
11809
11862
|
}
|
|
11810
11863
|
}
|
|
11811
11864
|
function recordPosition(c) {
|
|
@@ -11825,8 +11878,9 @@ Component that was made reactive: `,
|
|
|
11825
11878
|
}
|
|
11826
11879
|
function hasCSSTransform(el, root, moveClass) {
|
|
11827
11880
|
const clone = el.cloneNode();
|
|
11828
|
-
|
|
11829
|
-
|
|
11881
|
+
const _vtc = el[vtcKey];
|
|
11882
|
+
if (_vtc) {
|
|
11883
|
+
_vtc.forEach((cls) => {
|
|
11830
11884
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
11831
11885
|
});
|
|
11832
11886
|
}
|
|
@@ -11853,9 +11907,10 @@ Component that was made reactive: `,
|
|
|
11853
11907
|
target.dispatchEvent(new Event("input"));
|
|
11854
11908
|
}
|
|
11855
11909
|
}
|
|
11910
|
+
const assignKey = Symbol("_assign");
|
|
11856
11911
|
const vModelText = {
|
|
11857
11912
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
11858
|
-
el
|
|
11913
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11859
11914
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
11860
11915
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
11861
11916
|
if (e.target.composing)
|
|
@@ -11867,7 +11922,7 @@ Component that was made reactive: `,
|
|
|
11867
11922
|
if (castToNumber) {
|
|
11868
11923
|
domValue = looseToNumber(domValue);
|
|
11869
11924
|
}
|
|
11870
|
-
el
|
|
11925
|
+
el[assignKey](domValue);
|
|
11871
11926
|
});
|
|
11872
11927
|
if (trim) {
|
|
11873
11928
|
addEventListener(el, "change", () => {
|
|
@@ -11885,7 +11940,7 @@ Component that was made reactive: `,
|
|
|
11885
11940
|
el.value = value == null ? "" : value;
|
|
11886
11941
|
},
|
|
11887
11942
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
11888
|
-
el
|
|
11943
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11889
11944
|
if (el.composing)
|
|
11890
11945
|
return;
|
|
11891
11946
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -11909,12 +11964,12 @@ Component that was made reactive: `,
|
|
|
11909
11964
|
// #4096 array checkboxes need to be deep traversed
|
|
11910
11965
|
deep: true,
|
|
11911
11966
|
created(el, _, vnode) {
|
|
11912
|
-
el
|
|
11967
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11913
11968
|
addEventListener(el, "change", () => {
|
|
11914
11969
|
const modelValue = el._modelValue;
|
|
11915
11970
|
const elementValue = getValue(el);
|
|
11916
11971
|
const checked = el.checked;
|
|
11917
|
-
const assign = el
|
|
11972
|
+
const assign = el[assignKey];
|
|
11918
11973
|
if (isArray(modelValue)) {
|
|
11919
11974
|
const index = looseIndexOf(modelValue, elementValue);
|
|
11920
11975
|
const found = index !== -1;
|
|
@@ -11941,7 +11996,7 @@ Component that was made reactive: `,
|
|
|
11941
11996
|
// set initial checked on mount to wait for true-value/false-value
|
|
11942
11997
|
mounted: setChecked,
|
|
11943
11998
|
beforeUpdate(el, binding, vnode) {
|
|
11944
|
-
el
|
|
11999
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11945
12000
|
setChecked(el, binding, vnode);
|
|
11946
12001
|
}
|
|
11947
12002
|
};
|
|
@@ -11958,13 +12013,13 @@ Component that was made reactive: `,
|
|
|
11958
12013
|
const vModelRadio = {
|
|
11959
12014
|
created(el, { value }, vnode) {
|
|
11960
12015
|
el.checked = looseEqual(value, vnode.props.value);
|
|
11961
|
-
el
|
|
12016
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11962
12017
|
addEventListener(el, "change", () => {
|
|
11963
|
-
el
|
|
12018
|
+
el[assignKey](getValue(el));
|
|
11964
12019
|
});
|
|
11965
12020
|
},
|
|
11966
12021
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
11967
|
-
el
|
|
12022
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11968
12023
|
if (value !== oldValue) {
|
|
11969
12024
|
el.checked = looseEqual(value, vnode.props.value);
|
|
11970
12025
|
}
|
|
@@ -11979,11 +12034,11 @@ Component that was made reactive: `,
|
|
|
11979
12034
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
11980
12035
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
11981
12036
|
);
|
|
11982
|
-
el
|
|
12037
|
+
el[assignKey](
|
|
11983
12038
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
11984
12039
|
);
|
|
11985
12040
|
});
|
|
11986
|
-
el
|
|
12041
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11987
12042
|
},
|
|
11988
12043
|
// set value in mounted & updated because <select> relies on its children
|
|
11989
12044
|
// <option>s.
|
|
@@ -11991,7 +12046,7 @@ Component that was made reactive: `,
|
|
|
11991
12046
|
setSelected(el, value);
|
|
11992
12047
|
},
|
|
11993
12048
|
beforeUpdate(el, _binding, vnode) {
|
|
11994
|
-
el
|
|
12049
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
11995
12050
|
},
|
|
11996
12051
|
updated(el, { value }) {
|
|
11997
12052
|
setSelected(el, value);
|
|
@@ -12154,45 +12209,6 @@ Component that was made reactive: `,
|
|
|
12154
12209
|
};
|
|
12155
12210
|
};
|
|
12156
12211
|
|
|
12157
|
-
const vShow = {
|
|
12158
|
-
beforeMount(el, { value }, { transition }) {
|
|
12159
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
12160
|
-
if (transition && value) {
|
|
12161
|
-
transition.beforeEnter(el);
|
|
12162
|
-
} else {
|
|
12163
|
-
setDisplay(el, value);
|
|
12164
|
-
}
|
|
12165
|
-
},
|
|
12166
|
-
mounted(el, { value }, { transition }) {
|
|
12167
|
-
if (transition && value) {
|
|
12168
|
-
transition.enter(el);
|
|
12169
|
-
}
|
|
12170
|
-
},
|
|
12171
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
12172
|
-
if (!value === !oldValue)
|
|
12173
|
-
return;
|
|
12174
|
-
if (transition) {
|
|
12175
|
-
if (value) {
|
|
12176
|
-
transition.beforeEnter(el);
|
|
12177
|
-
setDisplay(el, true);
|
|
12178
|
-
transition.enter(el);
|
|
12179
|
-
} else {
|
|
12180
|
-
transition.leave(el, () => {
|
|
12181
|
-
setDisplay(el, false);
|
|
12182
|
-
});
|
|
12183
|
-
}
|
|
12184
|
-
} else {
|
|
12185
|
-
setDisplay(el, value);
|
|
12186
|
-
}
|
|
12187
|
-
},
|
|
12188
|
-
beforeUnmount(el, { value }) {
|
|
12189
|
-
setDisplay(el, value);
|
|
12190
|
-
}
|
|
12191
|
-
};
|
|
12192
|
-
function setDisplay(el, value) {
|
|
12193
|
-
el.style.display = value ? el._vod : "none";
|
|
12194
|
-
}
|
|
12195
|
-
|
|
12196
12212
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
12197
12213
|
let renderer;
|
|
12198
12214
|
let enabledHydration = false;
|