@vue/runtime-dom 3.3.4 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-dom.cjs.js +560 -542
- package/dist/runtime-dom.cjs.prod.js +451 -433
- package/dist/runtime-dom.d.ts +15 -13
- package/dist/runtime-dom.esm-browser.js +510 -496
- package/dist/runtime-dom.esm-browser.prod.js +6 -1
- package/dist/runtime-dom.esm-bundler.js +449 -431
- package/dist/runtime-dom.global.js +510 -496
- package/dist/runtime-dom.global.prod.js +6 -1
- package/package.json +4 -4
|
@@ -34,7 +34,7 @@ const isString = (val) => typeof val === "string";
|
|
|
34
34
|
const isSymbol = (val) => typeof val === "symbol";
|
|
35
35
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
36
36
|
const isPromise = (val) => {
|
|
37
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
37
|
+
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
38
38
|
};
|
|
39
39
|
const objectToString = Object.prototype.toString;
|
|
40
40
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -65,12 +65,13 @@ const hyphenateRE = /\B([A-Z])/g;
|
|
|
65
65
|
const hyphenate = cacheStringFunction(
|
|
66
66
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
67
67
|
);
|
|
68
|
-
const capitalize = cacheStringFunction(
|
|
69
|
-
|
|
70
|
-
);
|
|
71
|
-
const toHandlerKey = cacheStringFunction(
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
const capitalize = cacheStringFunction((str) => {
|
|
69
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
70
|
+
});
|
|
71
|
+
const toHandlerKey = cacheStringFunction((str) => {
|
|
72
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
73
|
+
return s;
|
|
74
|
+
});
|
|
74
75
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
75
76
|
const invokeArrayFns = (fns, arg) => {
|
|
76
77
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -97,8 +98,8 @@ const getGlobalThis = () => {
|
|
|
97
98
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
98
99
|
};
|
|
99
100
|
|
|
100
|
-
const
|
|
101
|
-
const
|
|
101
|
+
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";
|
|
102
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
102
103
|
|
|
103
104
|
function normalizeStyle(value) {
|
|
104
105
|
if (isArray(value)) {
|
|
@@ -113,9 +114,7 @@ function normalizeStyle(value) {
|
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
return res;
|
|
116
|
-
} else if (isString(value)) {
|
|
117
|
-
return value;
|
|
118
|
-
} else if (isObject(value)) {
|
|
117
|
+
} else if (isString(value) || isObject(value)) {
|
|
119
118
|
return value;
|
|
120
119
|
}
|
|
121
120
|
}
|
|
@@ -462,7 +461,7 @@ function cleanupEffect(effect2) {
|
|
|
462
461
|
}
|
|
463
462
|
}
|
|
464
463
|
function effect(fn, options) {
|
|
465
|
-
if (fn.effect) {
|
|
464
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
466
465
|
fn = fn.effect.fn;
|
|
467
466
|
}
|
|
468
467
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -628,10 +627,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
628
627
|
const builtInSymbols = new Set(
|
|
629
628
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
630
629
|
);
|
|
631
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
632
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
633
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
634
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
635
630
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
636
631
|
function createArrayInstrumentations() {
|
|
637
632
|
const instrumentations = {};
|
|
@@ -664,8 +659,13 @@ function hasOwnProperty(key) {
|
|
|
664
659
|
track(obj, "has", key);
|
|
665
660
|
return obj.hasOwnProperty(key);
|
|
666
661
|
}
|
|
667
|
-
|
|
668
|
-
|
|
662
|
+
class BaseReactiveHandler {
|
|
663
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
664
|
+
this._isReadonly = _isReadonly;
|
|
665
|
+
this._shallow = _shallow;
|
|
666
|
+
}
|
|
667
|
+
get(target, key, receiver) {
|
|
668
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
669
669
|
if (key === "__v_isReactive") {
|
|
670
670
|
return !isReadonly2;
|
|
671
671
|
} else if (key === "__v_isReadonly") {
|
|
@@ -701,17 +701,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
701
701
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
702
702
|
}
|
|
703
703
|
return res;
|
|
704
|
-
}
|
|
704
|
+
}
|
|
705
705
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
706
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
707
|
+
constructor(shallow = false) {
|
|
708
|
+
super(false, shallow);
|
|
709
|
+
}
|
|
710
|
+
set(target, key, value, receiver) {
|
|
710
711
|
let oldValue = target[key];
|
|
711
712
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
712
713
|
return false;
|
|
713
714
|
}
|
|
714
|
-
if (!
|
|
715
|
+
if (!this._shallow) {
|
|
715
716
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
716
717
|
oldValue = toRaw(oldValue);
|
|
717
718
|
value = toRaw(value);
|
|
@@ -731,37 +732,36 @@ function createSetter(shallow = false) {
|
|
|
731
732
|
}
|
|
732
733
|
}
|
|
733
734
|
return result;
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
function deleteProperty(target, key) {
|
|
737
|
-
const hadKey = hasOwn(target, key);
|
|
738
|
-
const oldValue = target[key];
|
|
739
|
-
const result = Reflect.deleteProperty(target, key);
|
|
740
|
-
if (result && hadKey) {
|
|
741
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
742
735
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
736
|
+
deleteProperty(target, key) {
|
|
737
|
+
const hadKey = hasOwn(target, key);
|
|
738
|
+
const oldValue = target[key];
|
|
739
|
+
const result = Reflect.deleteProperty(target, key);
|
|
740
|
+
if (result && hadKey) {
|
|
741
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
742
|
+
}
|
|
743
|
+
return result;
|
|
744
|
+
}
|
|
745
|
+
has(target, key) {
|
|
746
|
+
const result = Reflect.has(target, key);
|
|
747
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
748
|
+
track(target, "has", key);
|
|
749
|
+
}
|
|
750
|
+
return result;
|
|
751
|
+
}
|
|
752
|
+
ownKeys(target) {
|
|
753
|
+
track(
|
|
754
|
+
target,
|
|
755
|
+
"iterate",
|
|
756
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
757
|
+
);
|
|
758
|
+
return Reflect.ownKeys(target);
|
|
749
759
|
}
|
|
750
|
-
return result;
|
|
751
|
-
}
|
|
752
|
-
function ownKeys(target) {
|
|
753
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
754
|
-
return Reflect.ownKeys(target);
|
|
755
760
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
has: has$1,
|
|
761
|
-
ownKeys
|
|
762
|
-
};
|
|
763
|
-
const readonlyHandlers = {
|
|
764
|
-
get: readonlyGet,
|
|
761
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
762
|
+
constructor(shallow = false) {
|
|
763
|
+
super(true, shallow);
|
|
764
|
+
}
|
|
765
765
|
set(target, key) {
|
|
766
766
|
{
|
|
767
767
|
warn$1(
|
|
@@ -770,7 +770,7 @@ const readonlyHandlers = {
|
|
|
770
770
|
);
|
|
771
771
|
}
|
|
772
772
|
return true;
|
|
773
|
-
}
|
|
773
|
+
}
|
|
774
774
|
deleteProperty(target, key) {
|
|
775
775
|
{
|
|
776
776
|
warn$1(
|
|
@@ -780,22 +780,13 @@ const readonlyHandlers = {
|
|
|
780
780
|
}
|
|
781
781
|
return true;
|
|
782
782
|
}
|
|
783
|
-
}
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
get: shallowGet,
|
|
789
|
-
set: shallowSet
|
|
790
|
-
}
|
|
791
|
-
);
|
|
792
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
793
|
-
{},
|
|
794
|
-
readonlyHandlers,
|
|
795
|
-
{
|
|
796
|
-
get: shallowReadonlyGet
|
|
797
|
-
}
|
|
783
|
+
}
|
|
784
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
785
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
786
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
787
|
+
true
|
|
798
788
|
);
|
|
789
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
799
790
|
|
|
800
791
|
const toShallow = (value) => value;
|
|
801
792
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -804,7 +795,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
804
795
|
const rawTarget = toRaw(target);
|
|
805
796
|
const rawKey = toRaw(key);
|
|
806
797
|
if (!isReadonly) {
|
|
807
|
-
if (key
|
|
798
|
+
if (hasChanged(key, rawKey)) {
|
|
808
799
|
track(rawTarget, "get", key);
|
|
809
800
|
}
|
|
810
801
|
track(rawTarget, "get", rawKey);
|
|
@@ -824,7 +815,7 @@ function has(key, isReadonly = false) {
|
|
|
824
815
|
const rawTarget = toRaw(target);
|
|
825
816
|
const rawKey = toRaw(key);
|
|
826
817
|
if (!isReadonly) {
|
|
827
|
-
if (key
|
|
818
|
+
if (hasChanged(key, rawKey)) {
|
|
828
819
|
track(rawTarget, "has", key);
|
|
829
820
|
}
|
|
830
821
|
track(rawTarget, "has", rawKey);
|
|
@@ -1354,11 +1345,7 @@ function toRef(source, key, defaultValue) {
|
|
|
1354
1345
|
}
|
|
1355
1346
|
function propertyToRef(source, key, defaultValue) {
|
|
1356
1347
|
const val = source[key];
|
|
1357
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1358
|
-
source,
|
|
1359
|
-
key,
|
|
1360
|
-
defaultValue
|
|
1361
|
-
);
|
|
1348
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1362
1349
|
}
|
|
1363
1350
|
|
|
1364
1351
|
class ComputedRefImpl {
|
|
@@ -3131,9 +3118,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3131
3118
|
}
|
|
3132
3119
|
if (cb) {
|
|
3133
3120
|
const newValue = effect.run();
|
|
3134
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
3135
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
3136
|
-
) : hasChanged(newValue, oldValue)) || false) {
|
|
3121
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
|
|
3137
3122
|
if (cleanup) {
|
|
3138
3123
|
cleanup();
|
|
3139
3124
|
}
|
|
@@ -3304,6 +3289,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3304
3289
|
}
|
|
3305
3290
|
}
|
|
3306
3291
|
|
|
3292
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3293
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3307
3294
|
function useTransitionState() {
|
|
3308
3295
|
const state = {
|
|
3309
3296
|
isMounted: false,
|
|
@@ -3424,9 +3411,9 @@ const BaseTransitionImpl = {
|
|
|
3424
3411
|
oldInnerChild
|
|
3425
3412
|
);
|
|
3426
3413
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3427
|
-
el
|
|
3414
|
+
el[leaveCbKey] = () => {
|
|
3428
3415
|
earlyRemove();
|
|
3429
|
-
el
|
|
3416
|
+
el[leaveCbKey] = void 0;
|
|
3430
3417
|
delete enterHooks.delayedLeave;
|
|
3431
3418
|
};
|
|
3432
3419
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -3497,15 +3484,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3497
3484
|
return;
|
|
3498
3485
|
}
|
|
3499
3486
|
}
|
|
3500
|
-
if (el
|
|
3501
|
-
el
|
|
3487
|
+
if (el[leaveCbKey]) {
|
|
3488
|
+
el[leaveCbKey](
|
|
3502
3489
|
true
|
|
3503
3490
|
/* cancelled */
|
|
3504
3491
|
);
|
|
3505
3492
|
}
|
|
3506
3493
|
const leavingVNode = leavingVNodesCache[key];
|
|
3507
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
3508
|
-
leavingVNode.el
|
|
3494
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
3495
|
+
leavingVNode.el[leaveCbKey]();
|
|
3509
3496
|
}
|
|
3510
3497
|
callHook(hook, [el]);
|
|
3511
3498
|
},
|
|
@@ -3523,7 +3510,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3523
3510
|
}
|
|
3524
3511
|
}
|
|
3525
3512
|
let called = false;
|
|
3526
|
-
const done = el
|
|
3513
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
3527
3514
|
if (called)
|
|
3528
3515
|
return;
|
|
3529
3516
|
called = true;
|
|
@@ -3535,7 +3522,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3535
3522
|
if (hooks.delayedLeave) {
|
|
3536
3523
|
hooks.delayedLeave();
|
|
3537
3524
|
}
|
|
3538
|
-
el
|
|
3525
|
+
el[enterCbKey$1] = void 0;
|
|
3539
3526
|
};
|
|
3540
3527
|
if (hook) {
|
|
3541
3528
|
callAsyncHook(hook, [el, done]);
|
|
@@ -3545,8 +3532,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3545
3532
|
},
|
|
3546
3533
|
leave(el, remove) {
|
|
3547
3534
|
const key2 = String(vnode.key);
|
|
3548
|
-
if (el
|
|
3549
|
-
el
|
|
3535
|
+
if (el[enterCbKey$1]) {
|
|
3536
|
+
el[enterCbKey$1](
|
|
3550
3537
|
true
|
|
3551
3538
|
/* cancelled */
|
|
3552
3539
|
);
|
|
@@ -3556,7 +3543,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3556
3543
|
}
|
|
3557
3544
|
callHook(onBeforeLeave, [el]);
|
|
3558
3545
|
let called = false;
|
|
3559
|
-
const done = el
|
|
3546
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
3560
3547
|
if (called)
|
|
3561
3548
|
return;
|
|
3562
3549
|
called = true;
|
|
@@ -3566,7 +3553,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3566
3553
|
} else {
|
|
3567
3554
|
callHook(onAfterLeave, [el]);
|
|
3568
3555
|
}
|
|
3569
|
-
el
|
|
3556
|
+
el[leaveCbKey] = void 0;
|
|
3570
3557
|
if (leavingVNodesCache[key2] === vnode) {
|
|
3571
3558
|
delete leavingVNodesCache[key2];
|
|
3572
3559
|
}
|
|
@@ -3628,6 +3615,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3628
3615
|
return ret;
|
|
3629
3616
|
}
|
|
3630
3617
|
|
|
3618
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3619
|
+
// @__NO_SIDE_EFFECTS__
|
|
3631
3620
|
function defineComponent(options, extraOptions) {
|
|
3632
3621
|
return isFunction(options) ? (
|
|
3633
3622
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -3637,6 +3626,8 @@ function defineComponent(options, extraOptions) {
|
|
|
3637
3626
|
}
|
|
3638
3627
|
|
|
3639
3628
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
3629
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3630
|
+
// @__NO_SIDE_EFFECTS__
|
|
3640
3631
|
function defineAsyncComponent(source) {
|
|
3641
3632
|
if (isFunction(source)) {
|
|
3642
3633
|
source = { loader: source };
|
|
@@ -4415,7 +4406,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
4415
4406
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
4416
4407
|
},
|
|
4417
4408
|
has(_, key) {
|
|
4418
|
-
const has = key[0] !== "_" && !
|
|
4409
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
4419
4410
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
4420
4411
|
warn(
|
|
4421
4412
|
`Property ${JSON.stringify(
|
|
@@ -5091,12 +5082,12 @@ function createAppAPI(render, hydrate) {
|
|
|
5091
5082
|
},
|
|
5092
5083
|
set() {
|
|
5093
5084
|
warn(
|
|
5094
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
5085
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
5095
5086
|
);
|
|
5096
5087
|
}
|
|
5097
5088
|
});
|
|
5098
5089
|
}
|
|
5099
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
5090
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
5100
5091
|
let isMounted = false;
|
|
5101
5092
|
const app = context.app = {
|
|
5102
5093
|
_uid: uid$1++,
|
|
@@ -5178,10 +5169,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5178
5169
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
5179
5170
|
);
|
|
5180
5171
|
}
|
|
5181
|
-
const vnode = createVNode(
|
|
5182
|
-
rootComponent,
|
|
5183
|
-
rootProps
|
|
5184
|
-
);
|
|
5172
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
5185
5173
|
vnode.appContext = context;
|
|
5186
5174
|
{
|
|
5187
5175
|
context.reload = () => {
|
|
@@ -5763,7 +5751,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
5763
5751
|
}
|
|
5764
5752
|
if (needDeletionCheck) {
|
|
5765
5753
|
for (const key in slots) {
|
|
5766
|
-
if (!isInternalKey(key) &&
|
|
5754
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
5767
5755
|
delete slots[key];
|
|
5768
5756
|
}
|
|
5769
5757
|
}
|
|
@@ -5927,8 +5915,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5927
5915
|
hasMismatch = true;
|
|
5928
5916
|
warn(
|
|
5929
5917
|
`Hydration text mismatch:
|
|
5930
|
-
-
|
|
5931
|
-
|
|
5918
|
+
- Server rendered: ${JSON.stringify(
|
|
5919
|
+
node.data
|
|
5920
|
+
)}
|
|
5921
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
5932
5922
|
);
|
|
5933
5923
|
node.data = vnode.children;
|
|
5934
5924
|
}
|
|
@@ -6131,8 +6121,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6131
6121
|
hasMismatch = true;
|
|
6132
6122
|
warn(
|
|
6133
6123
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
6134
|
-
-
|
|
6135
|
-
-
|
|
6124
|
+
- Server rendered: ${el.textContent}
|
|
6125
|
+
- Client rendered: ${vnode.children}`
|
|
6136
6126
|
);
|
|
6137
6127
|
el.textContent = vnode.children;
|
|
6138
6128
|
}
|
|
@@ -7880,6 +7870,10 @@ const TeleportImpl = {
|
|
|
7880
7870
|
internals,
|
|
7881
7871
|
1
|
|
7882
7872
|
);
|
|
7873
|
+
} else {
|
|
7874
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
7875
|
+
n2.props.to = n1.props.to;
|
|
7876
|
+
}
|
|
7883
7877
|
}
|
|
7884
7878
|
} else {
|
|
7885
7879
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -7920,19 +7914,18 @@ const TeleportImpl = {
|
|
|
7920
7914
|
if (target) {
|
|
7921
7915
|
hostRemove(targetAnchor);
|
|
7922
7916
|
}
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
}
|
|
7917
|
+
doRemove && hostRemove(anchor);
|
|
7918
|
+
if (shapeFlag & 16) {
|
|
7919
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
7920
|
+
for (let i = 0; i < children.length; i++) {
|
|
7921
|
+
const child = children[i];
|
|
7922
|
+
unmount(
|
|
7923
|
+
child,
|
|
7924
|
+
parentComponent,
|
|
7925
|
+
parentSuspense,
|
|
7926
|
+
shouldRemove,
|
|
7927
|
+
!!child.dynamicChildren
|
|
7928
|
+
);
|
|
7936
7929
|
}
|
|
7937
7930
|
}
|
|
7938
7931
|
},
|
|
@@ -8016,7 +8009,7 @@ function updateCssVars(vnode) {
|
|
|
8016
8009
|
const ctx = vnode.ctx;
|
|
8017
8010
|
if (ctx && ctx.ut) {
|
|
8018
8011
|
let node = vnode.children[0].el;
|
|
8019
|
-
while (node !== vnode.targetAnchor) {
|
|
8012
|
+
while (node && node !== vnode.targetAnchor) {
|
|
8020
8013
|
if (node.nodeType === 1)
|
|
8021
8014
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
8022
8015
|
node = node.nextSibling;
|
|
@@ -8660,9 +8653,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8660
8653
|
{
|
|
8661
8654
|
setCurrentInstance(instance);
|
|
8662
8655
|
pauseTracking();
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8656
|
+
try {
|
|
8657
|
+
applyOptions(instance);
|
|
8658
|
+
} finally {
|
|
8659
|
+
resetTracking();
|
|
8660
|
+
unsetCurrentInstance();
|
|
8661
|
+
}
|
|
8666
8662
|
}
|
|
8667
8663
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8668
8664
|
if (!compile && Component.template) {
|
|
@@ -9028,7 +9024,7 @@ function isMemoSame(cached, memo) {
|
|
|
9028
9024
|
return true;
|
|
9029
9025
|
}
|
|
9030
9026
|
|
|
9031
|
-
const version = "3.3.
|
|
9027
|
+
const version = "3.3.6";
|
|
9032
9028
|
const ssrUtils = null;
|
|
9033
9029
|
const resolveFilter = null;
|
|
9034
9030
|
const compatUtils = null;
|
|
@@ -9100,58 +9096,367 @@ const nodeOps = {
|
|
|
9100
9096
|
}
|
|
9101
9097
|
};
|
|
9102
9098
|
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9099
|
+
const TRANSITION = "transition";
|
|
9100
|
+
const ANIMATION = "animation";
|
|
9101
|
+
const vtcKey = Symbol("_vtc");
|
|
9102
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
9103
|
+
Transition.displayName = "Transition";
|
|
9104
|
+
const DOMTransitionPropsValidators = {
|
|
9105
|
+
name: String,
|
|
9106
|
+
type: String,
|
|
9107
|
+
css: {
|
|
9108
|
+
type: Boolean,
|
|
9109
|
+
default: true
|
|
9110
|
+
},
|
|
9111
|
+
duration: [String, Number, Object],
|
|
9112
|
+
enterFromClass: String,
|
|
9113
|
+
enterActiveClass: String,
|
|
9114
|
+
enterToClass: String,
|
|
9115
|
+
appearFromClass: String,
|
|
9116
|
+
appearActiveClass: String,
|
|
9117
|
+
appearToClass: String,
|
|
9118
|
+
leaveFromClass: String,
|
|
9119
|
+
leaveActiveClass: String,
|
|
9120
|
+
leaveToClass: String
|
|
9121
|
+
};
|
|
9122
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9123
|
+
{},
|
|
9124
|
+
BaseTransitionPropsValidators,
|
|
9125
|
+
DOMTransitionPropsValidators
|
|
9126
|
+
);
|
|
9127
|
+
const callHook = (hook, args = []) => {
|
|
9128
|
+
if (isArray(hook)) {
|
|
9129
|
+
hook.forEach((h2) => h2(...args));
|
|
9130
|
+
} else if (hook) {
|
|
9131
|
+
hook(...args);
|
|
9107
9132
|
}
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9133
|
+
};
|
|
9134
|
+
const hasExplicitCallback = (hook) => {
|
|
9135
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
9136
|
+
};
|
|
9137
|
+
function resolveTransitionProps(rawProps) {
|
|
9138
|
+
const baseProps = {};
|
|
9139
|
+
for (const key in rawProps) {
|
|
9140
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
9141
|
+
baseProps[key] = rawProps[key];
|
|
9142
|
+
}
|
|
9114
9143
|
}
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
const
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9144
|
+
if (rawProps.css === false) {
|
|
9145
|
+
return baseProps;
|
|
9146
|
+
}
|
|
9147
|
+
const {
|
|
9148
|
+
name = "v",
|
|
9149
|
+
type,
|
|
9150
|
+
duration,
|
|
9151
|
+
enterFromClass = `${name}-enter-from`,
|
|
9152
|
+
enterActiveClass = `${name}-enter-active`,
|
|
9153
|
+
enterToClass = `${name}-enter-to`,
|
|
9154
|
+
appearFromClass = enterFromClass,
|
|
9155
|
+
appearActiveClass = enterActiveClass,
|
|
9156
|
+
appearToClass = enterToClass,
|
|
9157
|
+
leaveFromClass = `${name}-leave-from`,
|
|
9158
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
9159
|
+
leaveToClass = `${name}-leave-to`
|
|
9160
|
+
} = rawProps;
|
|
9161
|
+
const durations = normalizeDuration(duration);
|
|
9162
|
+
const enterDuration = durations && durations[0];
|
|
9163
|
+
const leaveDuration = durations && durations[1];
|
|
9164
|
+
const {
|
|
9165
|
+
onBeforeEnter,
|
|
9166
|
+
onEnter,
|
|
9167
|
+
onEnterCancelled,
|
|
9168
|
+
onLeave,
|
|
9169
|
+
onLeaveCancelled,
|
|
9170
|
+
onBeforeAppear = onBeforeEnter,
|
|
9171
|
+
onAppear = onEnter,
|
|
9172
|
+
onAppearCancelled = onEnterCancelled
|
|
9173
|
+
} = baseProps;
|
|
9174
|
+
const finishEnter = (el, isAppear, done) => {
|
|
9175
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9176
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
9177
|
+
done && done();
|
|
9178
|
+
};
|
|
9179
|
+
const finishLeave = (el, done) => {
|
|
9180
|
+
el._isLeaving = false;
|
|
9181
|
+
removeTransitionClass(el, leaveFromClass);
|
|
9182
|
+
removeTransitionClass(el, leaveToClass);
|
|
9183
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
9184
|
+
done && done();
|
|
9185
|
+
};
|
|
9186
|
+
const makeEnterHook = (isAppear) => {
|
|
9187
|
+
return (el, done) => {
|
|
9188
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
9189
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
9190
|
+
callHook(hook, [el, resolve]);
|
|
9191
|
+
nextFrame(() => {
|
|
9192
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
9193
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9194
|
+
if (!hasExplicitCallback(hook)) {
|
|
9195
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
9125
9196
|
}
|
|
9126
|
-
}
|
|
9127
|
-
}
|
|
9128
|
-
|
|
9129
|
-
|
|
9197
|
+
});
|
|
9198
|
+
};
|
|
9199
|
+
};
|
|
9200
|
+
return extend(baseProps, {
|
|
9201
|
+
onBeforeEnter(el) {
|
|
9202
|
+
callHook(onBeforeEnter, [el]);
|
|
9203
|
+
addTransitionClass(el, enterFromClass);
|
|
9204
|
+
addTransitionClass(el, enterActiveClass);
|
|
9205
|
+
},
|
|
9206
|
+
onBeforeAppear(el) {
|
|
9207
|
+
callHook(onBeforeAppear, [el]);
|
|
9208
|
+
addTransitionClass(el, appearFromClass);
|
|
9209
|
+
addTransitionClass(el, appearActiveClass);
|
|
9210
|
+
},
|
|
9211
|
+
onEnter: makeEnterHook(false),
|
|
9212
|
+
onAppear: makeEnterHook(true),
|
|
9213
|
+
onLeave(el, done) {
|
|
9214
|
+
el._isLeaving = true;
|
|
9215
|
+
const resolve = () => finishLeave(el, done);
|
|
9216
|
+
addTransitionClass(el, leaveFromClass);
|
|
9217
|
+
forceReflow();
|
|
9218
|
+
addTransitionClass(el, leaveActiveClass);
|
|
9219
|
+
nextFrame(() => {
|
|
9220
|
+
if (!el._isLeaving) {
|
|
9221
|
+
return;
|
|
9222
|
+
}
|
|
9223
|
+
removeTransitionClass(el, leaveFromClass);
|
|
9224
|
+
addTransitionClass(el, leaveToClass);
|
|
9225
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
9226
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
9227
|
+
}
|
|
9228
|
+
});
|
|
9229
|
+
callHook(onLeave, [el, resolve]);
|
|
9230
|
+
},
|
|
9231
|
+
onEnterCancelled(el) {
|
|
9232
|
+
finishEnter(el, false);
|
|
9233
|
+
callHook(onEnterCancelled, [el]);
|
|
9234
|
+
},
|
|
9235
|
+
onAppearCancelled(el) {
|
|
9236
|
+
finishEnter(el, true);
|
|
9237
|
+
callHook(onAppearCancelled, [el]);
|
|
9238
|
+
},
|
|
9239
|
+
onLeaveCancelled(el) {
|
|
9240
|
+
finishLeave(el);
|
|
9241
|
+
callHook(onLeaveCancelled, [el]);
|
|
9130
9242
|
}
|
|
9243
|
+
});
|
|
9244
|
+
}
|
|
9245
|
+
function normalizeDuration(duration) {
|
|
9246
|
+
if (duration == null) {
|
|
9247
|
+
return null;
|
|
9248
|
+
} else if (isObject(duration)) {
|
|
9249
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
9131
9250
|
} else {
|
|
9132
|
-
const
|
|
9133
|
-
|
|
9134
|
-
if (prev !== next) {
|
|
9135
|
-
style.cssText = next;
|
|
9136
|
-
}
|
|
9137
|
-
} else if (prev) {
|
|
9138
|
-
el.removeAttribute("style");
|
|
9139
|
-
}
|
|
9140
|
-
if ("_vod" in el) {
|
|
9141
|
-
style.display = currentDisplay;
|
|
9142
|
-
}
|
|
9251
|
+
const n = NumberOf(duration);
|
|
9252
|
+
return [n, n];
|
|
9143
9253
|
}
|
|
9144
9254
|
}
|
|
9145
|
-
|
|
9146
|
-
const
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9255
|
+
function NumberOf(val) {
|
|
9256
|
+
const res = toNumber(val);
|
|
9257
|
+
{
|
|
9258
|
+
assertNumber(res, "<transition> explicit duration");
|
|
9259
|
+
}
|
|
9260
|
+
return res;
|
|
9261
|
+
}
|
|
9262
|
+
function addTransitionClass(el, cls) {
|
|
9263
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
9264
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
9265
|
+
}
|
|
9266
|
+
function removeTransitionClass(el, cls) {
|
|
9267
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
9268
|
+
const _vtc = el[vtcKey];
|
|
9269
|
+
if (_vtc) {
|
|
9270
|
+
_vtc.delete(cls);
|
|
9271
|
+
if (!_vtc.size) {
|
|
9272
|
+
el[vtcKey] = void 0;
|
|
9273
|
+
}
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9276
|
+
function nextFrame(cb) {
|
|
9277
|
+
requestAnimationFrame(() => {
|
|
9278
|
+
requestAnimationFrame(cb);
|
|
9279
|
+
});
|
|
9280
|
+
}
|
|
9281
|
+
let endId = 0;
|
|
9282
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
9283
|
+
const id = el._endId = ++endId;
|
|
9284
|
+
const resolveIfNotStale = () => {
|
|
9285
|
+
if (id === el._endId) {
|
|
9286
|
+
resolve();
|
|
9287
|
+
}
|
|
9288
|
+
};
|
|
9289
|
+
if (explicitTimeout) {
|
|
9290
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
9291
|
+
}
|
|
9292
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
9293
|
+
if (!type) {
|
|
9294
|
+
return resolve();
|
|
9295
|
+
}
|
|
9296
|
+
const endEvent = type + "end";
|
|
9297
|
+
let ended = 0;
|
|
9298
|
+
const end = () => {
|
|
9299
|
+
el.removeEventListener(endEvent, onEnd);
|
|
9300
|
+
resolveIfNotStale();
|
|
9301
|
+
};
|
|
9302
|
+
const onEnd = (e) => {
|
|
9303
|
+
if (e.target === el && ++ended >= propCount) {
|
|
9304
|
+
end();
|
|
9305
|
+
}
|
|
9306
|
+
};
|
|
9307
|
+
setTimeout(() => {
|
|
9308
|
+
if (ended < propCount) {
|
|
9309
|
+
end();
|
|
9310
|
+
}
|
|
9311
|
+
}, timeout + 1);
|
|
9312
|
+
el.addEventListener(endEvent, onEnd);
|
|
9313
|
+
}
|
|
9314
|
+
function getTransitionInfo(el, expectedType) {
|
|
9315
|
+
const styles = window.getComputedStyle(el);
|
|
9316
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
9317
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
9318
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
9319
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
9320
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
9321
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
9322
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
9323
|
+
let type = null;
|
|
9324
|
+
let timeout = 0;
|
|
9325
|
+
let propCount = 0;
|
|
9326
|
+
if (expectedType === TRANSITION) {
|
|
9327
|
+
if (transitionTimeout > 0) {
|
|
9328
|
+
type = TRANSITION;
|
|
9329
|
+
timeout = transitionTimeout;
|
|
9330
|
+
propCount = transitionDurations.length;
|
|
9331
|
+
}
|
|
9332
|
+
} else if (expectedType === ANIMATION) {
|
|
9333
|
+
if (animationTimeout > 0) {
|
|
9334
|
+
type = ANIMATION;
|
|
9335
|
+
timeout = animationTimeout;
|
|
9336
|
+
propCount = animationDurations.length;
|
|
9337
|
+
}
|
|
9338
|
+
} else {
|
|
9339
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
9340
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
9341
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
9342
|
+
}
|
|
9343
|
+
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
9344
|
+
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
9345
|
+
);
|
|
9346
|
+
return {
|
|
9347
|
+
type,
|
|
9348
|
+
timeout,
|
|
9349
|
+
propCount,
|
|
9350
|
+
hasTransform
|
|
9351
|
+
};
|
|
9352
|
+
}
|
|
9353
|
+
function getTimeout(delays, durations) {
|
|
9354
|
+
while (delays.length < durations.length) {
|
|
9355
|
+
delays = delays.concat(delays);
|
|
9356
|
+
}
|
|
9357
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
9358
|
+
}
|
|
9359
|
+
function toMs(s) {
|
|
9360
|
+
if (s === "auto")
|
|
9361
|
+
return 0;
|
|
9362
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
9363
|
+
}
|
|
9364
|
+
function forceReflow() {
|
|
9365
|
+
return document.body.offsetHeight;
|
|
9366
|
+
}
|
|
9367
|
+
|
|
9368
|
+
function patchClass(el, value, isSVG) {
|
|
9369
|
+
const transitionClasses = el[vtcKey];
|
|
9370
|
+
if (transitionClasses) {
|
|
9371
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
9372
|
+
}
|
|
9373
|
+
if (value == null) {
|
|
9374
|
+
el.removeAttribute("class");
|
|
9375
|
+
} else if (isSVG) {
|
|
9376
|
+
el.setAttribute("class", value);
|
|
9377
|
+
} else {
|
|
9378
|
+
el.className = value;
|
|
9379
|
+
}
|
|
9380
|
+
}
|
|
9381
|
+
|
|
9382
|
+
const vShowOldKey = Symbol("_vod");
|
|
9383
|
+
const vShow = {
|
|
9384
|
+
beforeMount(el, { value }, { transition }) {
|
|
9385
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
9386
|
+
if (transition && value) {
|
|
9387
|
+
transition.beforeEnter(el);
|
|
9388
|
+
} else {
|
|
9389
|
+
setDisplay(el, value);
|
|
9390
|
+
}
|
|
9391
|
+
},
|
|
9392
|
+
mounted(el, { value }, { transition }) {
|
|
9393
|
+
if (transition && value) {
|
|
9394
|
+
transition.enter(el);
|
|
9395
|
+
}
|
|
9396
|
+
},
|
|
9397
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
9398
|
+
if (!value === !oldValue)
|
|
9399
|
+
return;
|
|
9400
|
+
if (transition) {
|
|
9401
|
+
if (value) {
|
|
9402
|
+
transition.beforeEnter(el);
|
|
9403
|
+
setDisplay(el, true);
|
|
9404
|
+
transition.enter(el);
|
|
9405
|
+
} else {
|
|
9406
|
+
transition.leave(el, () => {
|
|
9407
|
+
setDisplay(el, false);
|
|
9408
|
+
});
|
|
9409
|
+
}
|
|
9410
|
+
} else {
|
|
9411
|
+
setDisplay(el, value);
|
|
9412
|
+
}
|
|
9413
|
+
},
|
|
9414
|
+
beforeUnmount(el, { value }) {
|
|
9415
|
+
setDisplay(el, value);
|
|
9416
|
+
}
|
|
9417
|
+
};
|
|
9418
|
+
function setDisplay(el, value) {
|
|
9419
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
9420
|
+
}
|
|
9421
|
+
|
|
9422
|
+
function patchStyle(el, prev, next) {
|
|
9423
|
+
const style = el.style;
|
|
9424
|
+
const isCssString = isString(next);
|
|
9425
|
+
if (next && !isCssString) {
|
|
9426
|
+
if (prev && !isString(prev)) {
|
|
9427
|
+
for (const key in prev) {
|
|
9428
|
+
if (next[key] == null) {
|
|
9429
|
+
setStyle(style, key, "");
|
|
9430
|
+
}
|
|
9431
|
+
}
|
|
9432
|
+
}
|
|
9433
|
+
for (const key in next) {
|
|
9434
|
+
setStyle(style, key, next[key]);
|
|
9435
|
+
}
|
|
9436
|
+
} else {
|
|
9437
|
+
const currentDisplay = style.display;
|
|
9438
|
+
if (isCssString) {
|
|
9439
|
+
if (prev !== next) {
|
|
9440
|
+
style.cssText = next;
|
|
9441
|
+
}
|
|
9442
|
+
} else if (prev) {
|
|
9443
|
+
el.removeAttribute("style");
|
|
9444
|
+
}
|
|
9445
|
+
if (vShowOldKey in el) {
|
|
9446
|
+
style.display = currentDisplay;
|
|
9447
|
+
}
|
|
9448
|
+
}
|
|
9449
|
+
}
|
|
9450
|
+
const semicolonRE = /[^\\];\s*$/;
|
|
9451
|
+
const importantRE = /\s*!important$/;
|
|
9452
|
+
function setStyle(style, name, val) {
|
|
9453
|
+
if (isArray(val)) {
|
|
9454
|
+
val.forEach((v) => setStyle(style, name, v));
|
|
9455
|
+
} else {
|
|
9456
|
+
if (val == null)
|
|
9457
|
+
val = "";
|
|
9458
|
+
{
|
|
9459
|
+
if (semicolonRE.test(val)) {
|
|
9155
9460
|
warn(
|
|
9156
9461
|
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
9157
9462
|
);
|
|
@@ -9266,8 +9571,9 @@ function addEventListener(el, event, handler, options) {
|
|
|
9266
9571
|
function removeEventListener(el, event, handler, options) {
|
|
9267
9572
|
el.removeEventListener(event, handler, options);
|
|
9268
9573
|
}
|
|
9574
|
+
const veiKey = Symbol("_vei");
|
|
9269
9575
|
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
9270
|
-
const invokers = el
|
|
9576
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
9271
9577
|
const existingInvoker = invokers[rawName];
|
|
9272
9578
|
if (nextValue && existingInvoker) {
|
|
9273
9579
|
existingInvoker.value = nextValue;
|
|
@@ -9387,6 +9693,8 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9387
9693
|
return key in el;
|
|
9388
9694
|
}
|
|
9389
9695
|
|
|
9696
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
9697
|
+
// @__NO_SIDE_EFFECTS__
|
|
9390
9698
|
function defineCustomElement(options, hydrate2) {
|
|
9391
9699
|
const Comp = defineComponent(options);
|
|
9392
9700
|
class VueCustomElement extends VueElement {
|
|
@@ -9397,8 +9705,9 @@ function defineCustomElement(options, hydrate2) {
|
|
|
9397
9705
|
VueCustomElement.def = Comp;
|
|
9398
9706
|
return VueCustomElement;
|
|
9399
9707
|
}
|
|
9400
|
-
|
|
9401
|
-
|
|
9708
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
9709
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
9710
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
9402
9711
|
};
|
|
9403
9712
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
9404
9713
|
};
|
|
@@ -9414,6 +9723,7 @@ class VueElement extends BaseClass {
|
|
|
9414
9723
|
this._connected = false;
|
|
9415
9724
|
this._resolved = false;
|
|
9416
9725
|
this._numberProps = null;
|
|
9726
|
+
this._ob = null;
|
|
9417
9727
|
if (this.shadowRoot && hydrate2) {
|
|
9418
9728
|
hydrate2(this._createVNode(), this.shadowRoot);
|
|
9419
9729
|
} else {
|
|
@@ -9440,6 +9750,10 @@ class VueElement extends BaseClass {
|
|
|
9440
9750
|
}
|
|
9441
9751
|
disconnectedCallback() {
|
|
9442
9752
|
this._connected = false;
|
|
9753
|
+
if (this._ob) {
|
|
9754
|
+
this._ob.disconnect();
|
|
9755
|
+
this._ob = null;
|
|
9756
|
+
}
|
|
9443
9757
|
nextTick(() => {
|
|
9444
9758
|
if (!this._connected) {
|
|
9445
9759
|
render(null, this.shadowRoot);
|
|
@@ -9455,11 +9769,12 @@ class VueElement extends BaseClass {
|
|
|
9455
9769
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
9456
9770
|
this._setAttr(this.attributes[i].name);
|
|
9457
9771
|
}
|
|
9458
|
-
new MutationObserver((mutations) => {
|
|
9772
|
+
this._ob = new MutationObserver((mutations) => {
|
|
9459
9773
|
for (const m of mutations) {
|
|
9460
9774
|
this._setAttr(m.attributeName);
|
|
9461
9775
|
}
|
|
9462
|
-
})
|
|
9776
|
+
});
|
|
9777
|
+
this._ob.observe(this, { attributes: true });
|
|
9463
9778
|
const resolve = (def, isAsync = false) => {
|
|
9464
9779
|
const { props, styles } = def;
|
|
9465
9780
|
let numberProps;
|
|
@@ -9680,274 +9995,10 @@ function setVarsOnNode(el, vars) {
|
|
|
9680
9995
|
}
|
|
9681
9996
|
}
|
|
9682
9997
|
|
|
9683
|
-
const TRANSITION = "transition";
|
|
9684
|
-
const ANIMATION = "animation";
|
|
9685
|
-
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
9686
|
-
Transition.displayName = "Transition";
|
|
9687
|
-
const DOMTransitionPropsValidators = {
|
|
9688
|
-
name: String,
|
|
9689
|
-
type: String,
|
|
9690
|
-
css: {
|
|
9691
|
-
type: Boolean,
|
|
9692
|
-
default: true
|
|
9693
|
-
},
|
|
9694
|
-
duration: [String, Number, Object],
|
|
9695
|
-
enterFromClass: String,
|
|
9696
|
-
enterActiveClass: String,
|
|
9697
|
-
enterToClass: String,
|
|
9698
|
-
appearFromClass: String,
|
|
9699
|
-
appearActiveClass: String,
|
|
9700
|
-
appearToClass: String,
|
|
9701
|
-
leaveFromClass: String,
|
|
9702
|
-
leaveActiveClass: String,
|
|
9703
|
-
leaveToClass: String
|
|
9704
|
-
};
|
|
9705
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9706
|
-
{},
|
|
9707
|
-
BaseTransitionPropsValidators,
|
|
9708
|
-
DOMTransitionPropsValidators
|
|
9709
|
-
);
|
|
9710
|
-
const callHook = (hook, args = []) => {
|
|
9711
|
-
if (isArray(hook)) {
|
|
9712
|
-
hook.forEach((h2) => h2(...args));
|
|
9713
|
-
} else if (hook) {
|
|
9714
|
-
hook(...args);
|
|
9715
|
-
}
|
|
9716
|
-
};
|
|
9717
|
-
const hasExplicitCallback = (hook) => {
|
|
9718
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
9719
|
-
};
|
|
9720
|
-
function resolveTransitionProps(rawProps) {
|
|
9721
|
-
const baseProps = {};
|
|
9722
|
-
for (const key in rawProps) {
|
|
9723
|
-
if (!(key in DOMTransitionPropsValidators)) {
|
|
9724
|
-
baseProps[key] = rawProps[key];
|
|
9725
|
-
}
|
|
9726
|
-
}
|
|
9727
|
-
if (rawProps.css === false) {
|
|
9728
|
-
return baseProps;
|
|
9729
|
-
}
|
|
9730
|
-
const {
|
|
9731
|
-
name = "v",
|
|
9732
|
-
type,
|
|
9733
|
-
duration,
|
|
9734
|
-
enterFromClass = `${name}-enter-from`,
|
|
9735
|
-
enterActiveClass = `${name}-enter-active`,
|
|
9736
|
-
enterToClass = `${name}-enter-to`,
|
|
9737
|
-
appearFromClass = enterFromClass,
|
|
9738
|
-
appearActiveClass = enterActiveClass,
|
|
9739
|
-
appearToClass = enterToClass,
|
|
9740
|
-
leaveFromClass = `${name}-leave-from`,
|
|
9741
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
9742
|
-
leaveToClass = `${name}-leave-to`
|
|
9743
|
-
} = rawProps;
|
|
9744
|
-
const durations = normalizeDuration(duration);
|
|
9745
|
-
const enterDuration = durations && durations[0];
|
|
9746
|
-
const leaveDuration = durations && durations[1];
|
|
9747
|
-
const {
|
|
9748
|
-
onBeforeEnter,
|
|
9749
|
-
onEnter,
|
|
9750
|
-
onEnterCancelled,
|
|
9751
|
-
onLeave,
|
|
9752
|
-
onLeaveCancelled,
|
|
9753
|
-
onBeforeAppear = onBeforeEnter,
|
|
9754
|
-
onAppear = onEnter,
|
|
9755
|
-
onAppearCancelled = onEnterCancelled
|
|
9756
|
-
} = baseProps;
|
|
9757
|
-
const finishEnter = (el, isAppear, done) => {
|
|
9758
|
-
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9759
|
-
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
9760
|
-
done && done();
|
|
9761
|
-
};
|
|
9762
|
-
const finishLeave = (el, done) => {
|
|
9763
|
-
el._isLeaving = false;
|
|
9764
|
-
removeTransitionClass(el, leaveFromClass);
|
|
9765
|
-
removeTransitionClass(el, leaveToClass);
|
|
9766
|
-
removeTransitionClass(el, leaveActiveClass);
|
|
9767
|
-
done && done();
|
|
9768
|
-
};
|
|
9769
|
-
const makeEnterHook = (isAppear) => {
|
|
9770
|
-
return (el, done) => {
|
|
9771
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
9772
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
9773
|
-
callHook(hook, [el, resolve]);
|
|
9774
|
-
nextFrame(() => {
|
|
9775
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
9776
|
-
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9777
|
-
if (!hasExplicitCallback(hook)) {
|
|
9778
|
-
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
9779
|
-
}
|
|
9780
|
-
});
|
|
9781
|
-
};
|
|
9782
|
-
};
|
|
9783
|
-
return extend(baseProps, {
|
|
9784
|
-
onBeforeEnter(el) {
|
|
9785
|
-
callHook(onBeforeEnter, [el]);
|
|
9786
|
-
addTransitionClass(el, enterFromClass);
|
|
9787
|
-
addTransitionClass(el, enterActiveClass);
|
|
9788
|
-
},
|
|
9789
|
-
onBeforeAppear(el) {
|
|
9790
|
-
callHook(onBeforeAppear, [el]);
|
|
9791
|
-
addTransitionClass(el, appearFromClass);
|
|
9792
|
-
addTransitionClass(el, appearActiveClass);
|
|
9793
|
-
},
|
|
9794
|
-
onEnter: makeEnterHook(false),
|
|
9795
|
-
onAppear: makeEnterHook(true),
|
|
9796
|
-
onLeave(el, done) {
|
|
9797
|
-
el._isLeaving = true;
|
|
9798
|
-
const resolve = () => finishLeave(el, done);
|
|
9799
|
-
addTransitionClass(el, leaveFromClass);
|
|
9800
|
-
forceReflow();
|
|
9801
|
-
addTransitionClass(el, leaveActiveClass);
|
|
9802
|
-
nextFrame(() => {
|
|
9803
|
-
if (!el._isLeaving) {
|
|
9804
|
-
return;
|
|
9805
|
-
}
|
|
9806
|
-
removeTransitionClass(el, leaveFromClass);
|
|
9807
|
-
addTransitionClass(el, leaveToClass);
|
|
9808
|
-
if (!hasExplicitCallback(onLeave)) {
|
|
9809
|
-
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
9810
|
-
}
|
|
9811
|
-
});
|
|
9812
|
-
callHook(onLeave, [el, resolve]);
|
|
9813
|
-
},
|
|
9814
|
-
onEnterCancelled(el) {
|
|
9815
|
-
finishEnter(el, false);
|
|
9816
|
-
callHook(onEnterCancelled, [el]);
|
|
9817
|
-
},
|
|
9818
|
-
onAppearCancelled(el) {
|
|
9819
|
-
finishEnter(el, true);
|
|
9820
|
-
callHook(onAppearCancelled, [el]);
|
|
9821
|
-
},
|
|
9822
|
-
onLeaveCancelled(el) {
|
|
9823
|
-
finishLeave(el);
|
|
9824
|
-
callHook(onLeaveCancelled, [el]);
|
|
9825
|
-
}
|
|
9826
|
-
});
|
|
9827
|
-
}
|
|
9828
|
-
function normalizeDuration(duration) {
|
|
9829
|
-
if (duration == null) {
|
|
9830
|
-
return null;
|
|
9831
|
-
} else if (isObject(duration)) {
|
|
9832
|
-
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
9833
|
-
} else {
|
|
9834
|
-
const n = NumberOf(duration);
|
|
9835
|
-
return [n, n];
|
|
9836
|
-
}
|
|
9837
|
-
}
|
|
9838
|
-
function NumberOf(val) {
|
|
9839
|
-
const res = toNumber(val);
|
|
9840
|
-
{
|
|
9841
|
-
assertNumber(res, "<transition> explicit duration");
|
|
9842
|
-
}
|
|
9843
|
-
return res;
|
|
9844
|
-
}
|
|
9845
|
-
function addTransitionClass(el, cls) {
|
|
9846
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
9847
|
-
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
9848
|
-
}
|
|
9849
|
-
function removeTransitionClass(el, cls) {
|
|
9850
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
9851
|
-
const { _vtc } = el;
|
|
9852
|
-
if (_vtc) {
|
|
9853
|
-
_vtc.delete(cls);
|
|
9854
|
-
if (!_vtc.size) {
|
|
9855
|
-
el._vtc = void 0;
|
|
9856
|
-
}
|
|
9857
|
-
}
|
|
9858
|
-
}
|
|
9859
|
-
function nextFrame(cb) {
|
|
9860
|
-
requestAnimationFrame(() => {
|
|
9861
|
-
requestAnimationFrame(cb);
|
|
9862
|
-
});
|
|
9863
|
-
}
|
|
9864
|
-
let endId = 0;
|
|
9865
|
-
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
9866
|
-
const id = el._endId = ++endId;
|
|
9867
|
-
const resolveIfNotStale = () => {
|
|
9868
|
-
if (id === el._endId) {
|
|
9869
|
-
resolve();
|
|
9870
|
-
}
|
|
9871
|
-
};
|
|
9872
|
-
if (explicitTimeout) {
|
|
9873
|
-
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
9874
|
-
}
|
|
9875
|
-
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
9876
|
-
if (!type) {
|
|
9877
|
-
return resolve();
|
|
9878
|
-
}
|
|
9879
|
-
const endEvent = type + "end";
|
|
9880
|
-
let ended = 0;
|
|
9881
|
-
const end = () => {
|
|
9882
|
-
el.removeEventListener(endEvent, onEnd);
|
|
9883
|
-
resolveIfNotStale();
|
|
9884
|
-
};
|
|
9885
|
-
const onEnd = (e) => {
|
|
9886
|
-
if (e.target === el && ++ended >= propCount) {
|
|
9887
|
-
end();
|
|
9888
|
-
}
|
|
9889
|
-
};
|
|
9890
|
-
setTimeout(() => {
|
|
9891
|
-
if (ended < propCount) {
|
|
9892
|
-
end();
|
|
9893
|
-
}
|
|
9894
|
-
}, timeout + 1);
|
|
9895
|
-
el.addEventListener(endEvent, onEnd);
|
|
9896
|
-
}
|
|
9897
|
-
function getTransitionInfo(el, expectedType) {
|
|
9898
|
-
const styles = window.getComputedStyle(el);
|
|
9899
|
-
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
9900
|
-
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
9901
|
-
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
9902
|
-
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
9903
|
-
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
9904
|
-
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
9905
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
9906
|
-
let type = null;
|
|
9907
|
-
let timeout = 0;
|
|
9908
|
-
let propCount = 0;
|
|
9909
|
-
if (expectedType === TRANSITION) {
|
|
9910
|
-
if (transitionTimeout > 0) {
|
|
9911
|
-
type = TRANSITION;
|
|
9912
|
-
timeout = transitionTimeout;
|
|
9913
|
-
propCount = transitionDurations.length;
|
|
9914
|
-
}
|
|
9915
|
-
} else if (expectedType === ANIMATION) {
|
|
9916
|
-
if (animationTimeout > 0) {
|
|
9917
|
-
type = ANIMATION;
|
|
9918
|
-
timeout = animationTimeout;
|
|
9919
|
-
propCount = animationDurations.length;
|
|
9920
|
-
}
|
|
9921
|
-
} else {
|
|
9922
|
-
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
9923
|
-
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
9924
|
-
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
9925
|
-
}
|
|
9926
|
-
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
9927
|
-
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
9928
|
-
);
|
|
9929
|
-
return {
|
|
9930
|
-
type,
|
|
9931
|
-
timeout,
|
|
9932
|
-
propCount,
|
|
9933
|
-
hasTransform
|
|
9934
|
-
};
|
|
9935
|
-
}
|
|
9936
|
-
function getTimeout(delays, durations) {
|
|
9937
|
-
while (delays.length < durations.length) {
|
|
9938
|
-
delays = delays.concat(delays);
|
|
9939
|
-
}
|
|
9940
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
9941
|
-
}
|
|
9942
|
-
function toMs(s) {
|
|
9943
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
9944
|
-
}
|
|
9945
|
-
function forceReflow() {
|
|
9946
|
-
return document.body.offsetHeight;
|
|
9947
|
-
}
|
|
9948
|
-
|
|
9949
9998
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
9950
9999
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
10000
|
+
const moveCbKey = Symbol("_moveCb");
|
|
10001
|
+
const enterCbKey = Symbol("_enterCb");
|
|
9951
10002
|
const TransitionGroupImpl = {
|
|
9952
10003
|
name: "TransitionGroup",
|
|
9953
10004
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -9980,13 +10031,13 @@ const TransitionGroupImpl = {
|
|
|
9980
10031
|
const style = el.style;
|
|
9981
10032
|
addTransitionClass(el, moveClass);
|
|
9982
10033
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
9983
|
-
const cb = el
|
|
10034
|
+
const cb = el[moveCbKey] = (e) => {
|
|
9984
10035
|
if (e && e.target !== el) {
|
|
9985
10036
|
return;
|
|
9986
10037
|
}
|
|
9987
10038
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
9988
10039
|
el.removeEventListener("transitionend", cb);
|
|
9989
|
-
el
|
|
10040
|
+
el[moveCbKey] = null;
|
|
9990
10041
|
removeTransitionClass(el, moveClass);
|
|
9991
10042
|
}
|
|
9992
10043
|
};
|
|
@@ -10029,11 +10080,11 @@ const removeMode = (props) => delete props.mode;
|
|
|
10029
10080
|
const TransitionGroup = TransitionGroupImpl;
|
|
10030
10081
|
function callPendingCbs(c) {
|
|
10031
10082
|
const el = c.el;
|
|
10032
|
-
if (el
|
|
10033
|
-
el
|
|
10083
|
+
if (el[moveCbKey]) {
|
|
10084
|
+
el[moveCbKey]();
|
|
10034
10085
|
}
|
|
10035
|
-
if (el
|
|
10036
|
-
el
|
|
10086
|
+
if (el[enterCbKey]) {
|
|
10087
|
+
el[enterCbKey]();
|
|
10037
10088
|
}
|
|
10038
10089
|
}
|
|
10039
10090
|
function recordPosition(c) {
|
|
@@ -10053,8 +10104,9 @@ function applyTranslation(c) {
|
|
|
10053
10104
|
}
|
|
10054
10105
|
function hasCSSTransform(el, root, moveClass) {
|
|
10055
10106
|
const clone = el.cloneNode();
|
|
10056
|
-
|
|
10057
|
-
|
|
10107
|
+
const _vtc = el[vtcKey];
|
|
10108
|
+
if (_vtc) {
|
|
10109
|
+
_vtc.forEach((cls) => {
|
|
10058
10110
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
10059
10111
|
});
|
|
10060
10112
|
}
|
|
@@ -10081,9 +10133,10 @@ function onCompositionEnd(e) {
|
|
|
10081
10133
|
target.dispatchEvent(new Event("input"));
|
|
10082
10134
|
}
|
|
10083
10135
|
}
|
|
10136
|
+
const assignKey = Symbol("_assign");
|
|
10084
10137
|
const vModelText = {
|
|
10085
10138
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
10086
|
-
el
|
|
10139
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10087
10140
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
10088
10141
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
10089
10142
|
if (e.target.composing)
|
|
@@ -10095,7 +10148,7 @@ const vModelText = {
|
|
|
10095
10148
|
if (castToNumber) {
|
|
10096
10149
|
domValue = looseToNumber(domValue);
|
|
10097
10150
|
}
|
|
10098
|
-
el
|
|
10151
|
+
el[assignKey](domValue);
|
|
10099
10152
|
});
|
|
10100
10153
|
if (trim) {
|
|
10101
10154
|
addEventListener(el, "change", () => {
|
|
@@ -10113,7 +10166,7 @@ const vModelText = {
|
|
|
10113
10166
|
el.value = value == null ? "" : value;
|
|
10114
10167
|
},
|
|
10115
10168
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
10116
|
-
el
|
|
10169
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10117
10170
|
if (el.composing)
|
|
10118
10171
|
return;
|
|
10119
10172
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -10137,12 +10190,12 @@ const vModelCheckbox = {
|
|
|
10137
10190
|
// #4096 array checkboxes need to be deep traversed
|
|
10138
10191
|
deep: true,
|
|
10139
10192
|
created(el, _, vnode) {
|
|
10140
|
-
el
|
|
10193
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10141
10194
|
addEventListener(el, "change", () => {
|
|
10142
10195
|
const modelValue = el._modelValue;
|
|
10143
10196
|
const elementValue = getValue(el);
|
|
10144
10197
|
const checked = el.checked;
|
|
10145
|
-
const assign = el
|
|
10198
|
+
const assign = el[assignKey];
|
|
10146
10199
|
if (isArray(modelValue)) {
|
|
10147
10200
|
const index = looseIndexOf(modelValue, elementValue);
|
|
10148
10201
|
const found = index !== -1;
|
|
@@ -10169,7 +10222,7 @@ const vModelCheckbox = {
|
|
|
10169
10222
|
// set initial checked on mount to wait for true-value/false-value
|
|
10170
10223
|
mounted: setChecked,
|
|
10171
10224
|
beforeUpdate(el, binding, vnode) {
|
|
10172
|
-
el
|
|
10225
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10173
10226
|
setChecked(el, binding, vnode);
|
|
10174
10227
|
}
|
|
10175
10228
|
};
|
|
@@ -10186,13 +10239,13 @@ function setChecked(el, { value, oldValue }, vnode) {
|
|
|
10186
10239
|
const vModelRadio = {
|
|
10187
10240
|
created(el, { value }, vnode) {
|
|
10188
10241
|
el.checked = looseEqual(value, vnode.props.value);
|
|
10189
|
-
el
|
|
10242
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10190
10243
|
addEventListener(el, "change", () => {
|
|
10191
|
-
el
|
|
10244
|
+
el[assignKey](getValue(el));
|
|
10192
10245
|
});
|
|
10193
10246
|
},
|
|
10194
10247
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
10195
|
-
el
|
|
10248
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10196
10249
|
if (value !== oldValue) {
|
|
10197
10250
|
el.checked = looseEqual(value, vnode.props.value);
|
|
10198
10251
|
}
|
|
@@ -10207,11 +10260,11 @@ const vModelSelect = {
|
|
|
10207
10260
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
10208
10261
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
10209
10262
|
);
|
|
10210
|
-
el
|
|
10263
|
+
el[assignKey](
|
|
10211
10264
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
10212
10265
|
);
|
|
10213
10266
|
});
|
|
10214
|
-
el
|
|
10267
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10215
10268
|
},
|
|
10216
10269
|
// set value in mounted & updated because <select> relies on its children
|
|
10217
10270
|
// <option>s.
|
|
@@ -10219,7 +10272,7 @@ const vModelSelect = {
|
|
|
10219
10272
|
setSelected(el, value);
|
|
10220
10273
|
},
|
|
10221
10274
|
beforeUpdate(el, _binding, vnode) {
|
|
10222
|
-
el
|
|
10275
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10223
10276
|
},
|
|
10224
10277
|
updated(el, { value }) {
|
|
10225
10278
|
setSelected(el, value);
|
|
@@ -10346,45 +10399,6 @@ const withKeys = (fn, modifiers) => {
|
|
|
10346
10399
|
};
|
|
10347
10400
|
};
|
|
10348
10401
|
|
|
10349
|
-
const vShow = {
|
|
10350
|
-
beforeMount(el, { value }, { transition }) {
|
|
10351
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
10352
|
-
if (transition && value) {
|
|
10353
|
-
transition.beforeEnter(el);
|
|
10354
|
-
} else {
|
|
10355
|
-
setDisplay(el, value);
|
|
10356
|
-
}
|
|
10357
|
-
},
|
|
10358
|
-
mounted(el, { value }, { transition }) {
|
|
10359
|
-
if (transition && value) {
|
|
10360
|
-
transition.enter(el);
|
|
10361
|
-
}
|
|
10362
|
-
},
|
|
10363
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
10364
|
-
if (!value === !oldValue)
|
|
10365
|
-
return;
|
|
10366
|
-
if (transition) {
|
|
10367
|
-
if (value) {
|
|
10368
|
-
transition.beforeEnter(el);
|
|
10369
|
-
setDisplay(el, true);
|
|
10370
|
-
transition.enter(el);
|
|
10371
|
-
} else {
|
|
10372
|
-
transition.leave(el, () => {
|
|
10373
|
-
setDisplay(el, false);
|
|
10374
|
-
});
|
|
10375
|
-
}
|
|
10376
|
-
} else {
|
|
10377
|
-
setDisplay(el, value);
|
|
10378
|
-
}
|
|
10379
|
-
},
|
|
10380
|
-
beforeUnmount(el, { value }) {
|
|
10381
|
-
setDisplay(el, value);
|
|
10382
|
-
}
|
|
10383
|
-
};
|
|
10384
|
-
function setDisplay(el, value) {
|
|
10385
|
-
el.style.display = value ? el._vod : "none";
|
|
10386
|
-
}
|
|
10387
|
-
|
|
10388
10402
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
10389
10403
|
let renderer;
|
|
10390
10404
|
let enabledHydration = false;
|