@histoire/vendors 0.17.0 → 0.17.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/client/b-pinia.js +9 -8
- package/dist/client/b-vue-router.js +13 -13
- package/dist/client/node_modules/@babel/parser/package.json +5 -5
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +9 -0
- package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +9 -3
- package/dist/client/node_modules/@vue/compiler-core/package.json +4 -4
- package/dist/client/node_modules/@vue/compiler-dom/package.json +3 -3
- package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +8 -7
- package/dist/client/node_modules/@vue/compiler-sfc/package.json +16 -18
- package/dist/client/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/dist/client/node_modules/@vue/devtools-api/package.json +1 -1
- package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +50 -74
- package/dist/client/node_modules/@vue/reactivity/package.json +2 -2
- package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +9 -0
- package/dist/client/node_modules/@vue/reactivity-transform/package.json +7 -7
- package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +77 -204
- package/dist/client/node_modules/@vue/runtime-core/package.json +3 -3
- package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +16 -14
- package/dist/client/node_modules/@vue/runtime-dom/package.json +4 -4
- package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +0 -2
- package/dist/client/node_modules/@vue/server-renderer/package.json +4 -4
- package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +8 -3
- package/dist/client/node_modules/@vue/shared/package.json +1 -1
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2/index.d.ts +2 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2.7/index.d.ts +2 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +1 -1
- package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2/index.d.ts +2 -0
- package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2.7/index.d.ts +2 -0
- package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +1 -1
- package/dist/client/node_modules/magic-string/dist/magic-string.cjs.d.ts +4 -4
- package/dist/client/node_modules/magic-string/package.json +1 -1
- package/dist/client/node_modules/nanoid/package.json +33 -11
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +9 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +2 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +2 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +1 -1
- package/dist/client/node_modules/pinia/package.json +1 -1
- package/dist/client/node_modules/postcss/lib/container.d.ts +32 -32
- package/dist/client/node_modules/postcss/lib/input.d.ts +13 -13
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +26 -26
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +3 -3
- package/dist/client/node_modules/postcss/lib/result.d.ts +10 -10
- package/dist/client/node_modules/postcss/package.json +1 -1
- package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +1 -6
- package/dist/client/node_modules/vue/jsx.d.ts +1 -6
- package/dist/client/node_modules/vue/package.json +16 -6
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +21 -16
- package/dist/client/node_modules/vue-router/package.json +19 -15
- package/dist/client/vue.runtime.esm-bundler.js +707 -645
- package/package.json +7 -7
|
@@ -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++) {
|
|
@@ -124,8 +125,9 @@ const slotFlagsText = {
|
|
|
124
125
|
[3]: "FORWARDED"
|
|
125
126
|
};
|
|
126
127
|
|
|
127
|
-
const
|
|
128
|
-
const
|
|
128
|
+
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";
|
|
129
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
130
|
+
const isGloballyWhitelisted = isGloballyAllowed;
|
|
129
131
|
|
|
130
132
|
const range = 2;
|
|
131
133
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
|
@@ -180,9 +182,7 @@ function normalizeStyle(value) {
|
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
184
|
return res;
|
|
183
|
-
} else if (isString(value)) {
|
|
184
|
-
return value;
|
|
185
|
-
} else if (isObject(value)) {
|
|
185
|
+
} else if (isString(value) || isObject(value)) {
|
|
186
186
|
return value;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -616,7 +616,7 @@ function cleanupEffect(effect2) {
|
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
function effect(fn, options) {
|
|
619
|
-
if (fn.effect) {
|
|
619
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
620
620
|
fn = fn.effect.fn;
|
|
621
621
|
}
|
|
622
622
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -699,7 +699,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
699
699
|
} else if (key === "length" && isArray(target)) {
|
|
700
700
|
const newLength = Number(newValue);
|
|
701
701
|
depsMap.forEach((dep, key2) => {
|
|
702
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
702
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
703
703
|
deps.push(dep);
|
|
704
704
|
}
|
|
705
705
|
});
|
|
@@ -790,10 +790,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
790
790
|
const builtInSymbols = new Set(
|
|
791
791
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
792
792
|
);
|
|
793
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
794
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
795
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
796
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
797
793
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
798
794
|
function createArrayInstrumentations() {
|
|
799
795
|
const instrumentations = {};
|
|
@@ -826,8 +822,13 @@ function hasOwnProperty(key) {
|
|
|
826
822
|
track(obj, "has", key);
|
|
827
823
|
return obj.hasOwnProperty(key);
|
|
828
824
|
}
|
|
829
|
-
|
|
830
|
-
|
|
825
|
+
class BaseReactiveHandler {
|
|
826
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
827
|
+
this._isReadonly = _isReadonly;
|
|
828
|
+
this._shallow = _shallow;
|
|
829
|
+
}
|
|
830
|
+
get(target, key, receiver) {
|
|
831
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
831
832
|
if (key === "__v_isReactive") {
|
|
832
833
|
return !isReadonly2;
|
|
833
834
|
} else if (key === "__v_isReadonly") {
|
|
@@ -863,17 +864,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
863
864
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
864
865
|
}
|
|
865
866
|
return res;
|
|
866
|
-
}
|
|
867
|
+
}
|
|
867
868
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
869
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
870
|
+
constructor(shallow = false) {
|
|
871
|
+
super(false, shallow);
|
|
872
|
+
}
|
|
873
|
+
set(target, key, value, receiver) {
|
|
872
874
|
let oldValue = target[key];
|
|
873
875
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
874
876
|
return false;
|
|
875
877
|
}
|
|
876
|
-
if (!
|
|
878
|
+
if (!this._shallow) {
|
|
877
879
|
if (!isShallow$1(value) && !isReadonly(value)) {
|
|
878
880
|
oldValue = toRaw(oldValue);
|
|
879
881
|
value = toRaw(value);
|
|
@@ -893,37 +895,36 @@ function createSetter(shallow = false) {
|
|
|
893
895
|
}
|
|
894
896
|
}
|
|
895
897
|
return result;
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
function deleteProperty(target, key) {
|
|
899
|
-
const hadKey = hasOwn(target, key);
|
|
900
|
-
const oldValue = target[key];
|
|
901
|
-
const result = Reflect.deleteProperty(target, key);
|
|
902
|
-
if (result && hadKey) {
|
|
903
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
904
898
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
899
|
+
deleteProperty(target, key) {
|
|
900
|
+
const hadKey = hasOwn(target, key);
|
|
901
|
+
const oldValue = target[key];
|
|
902
|
+
const result = Reflect.deleteProperty(target, key);
|
|
903
|
+
if (result && hadKey) {
|
|
904
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
905
|
+
}
|
|
906
|
+
return result;
|
|
907
|
+
}
|
|
908
|
+
has(target, key) {
|
|
909
|
+
const result = Reflect.has(target, key);
|
|
910
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
911
|
+
track(target, "has", key);
|
|
912
|
+
}
|
|
913
|
+
return result;
|
|
914
|
+
}
|
|
915
|
+
ownKeys(target) {
|
|
916
|
+
track(
|
|
917
|
+
target,
|
|
918
|
+
"iterate",
|
|
919
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
920
|
+
);
|
|
921
|
+
return Reflect.ownKeys(target);
|
|
911
922
|
}
|
|
912
|
-
return result;
|
|
913
|
-
}
|
|
914
|
-
function ownKeys(target) {
|
|
915
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
916
|
-
return Reflect.ownKeys(target);
|
|
917
923
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
has: has$1,
|
|
923
|
-
ownKeys
|
|
924
|
-
};
|
|
925
|
-
const readonlyHandlers = {
|
|
926
|
-
get: readonlyGet,
|
|
924
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
925
|
+
constructor(shallow = false) {
|
|
926
|
+
super(true, shallow);
|
|
927
|
+
}
|
|
927
928
|
set(target, key) {
|
|
928
929
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
929
930
|
warn$1(
|
|
@@ -932,7 +933,7 @@ const readonlyHandlers = {
|
|
|
932
933
|
);
|
|
933
934
|
}
|
|
934
935
|
return true;
|
|
935
|
-
}
|
|
936
|
+
}
|
|
936
937
|
deleteProperty(target, key) {
|
|
937
938
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
938
939
|
warn$1(
|
|
@@ -942,22 +943,13 @@ const readonlyHandlers = {
|
|
|
942
943
|
}
|
|
943
944
|
return true;
|
|
944
945
|
}
|
|
945
|
-
}
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
get: shallowGet,
|
|
951
|
-
set: shallowSet
|
|
952
|
-
}
|
|
953
|
-
);
|
|
954
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
955
|
-
{},
|
|
956
|
-
readonlyHandlers,
|
|
957
|
-
{
|
|
958
|
-
get: shallowReadonlyGet
|
|
959
|
-
}
|
|
946
|
+
}
|
|
947
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
948
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
949
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
950
|
+
true
|
|
960
951
|
);
|
|
952
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
961
953
|
|
|
962
954
|
const toShallow = (value) => value;
|
|
963
955
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -966,7 +958,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
966
958
|
const rawTarget = toRaw(target);
|
|
967
959
|
const rawKey = toRaw(key);
|
|
968
960
|
if (!isReadonly) {
|
|
969
|
-
if (key
|
|
961
|
+
if (hasChanged(key, rawKey)) {
|
|
970
962
|
track(rawTarget, "get", key);
|
|
971
963
|
}
|
|
972
964
|
track(rawTarget, "get", rawKey);
|
|
@@ -986,7 +978,7 @@ function has(key, isReadonly = false) {
|
|
|
986
978
|
const rawTarget = toRaw(target);
|
|
987
979
|
const rawKey = toRaw(key);
|
|
988
980
|
if (!isReadonly) {
|
|
989
|
-
if (key
|
|
981
|
+
if (hasChanged(key, rawKey)) {
|
|
990
982
|
track(rawTarget, "has", key);
|
|
991
983
|
}
|
|
992
984
|
track(rawTarget, "has", rawKey);
|
|
@@ -1520,11 +1512,7 @@ function toRef(source, key, defaultValue) {
|
|
|
1520
1512
|
}
|
|
1521
1513
|
function propertyToRef(source, key, defaultValue) {
|
|
1522
1514
|
const val = source[key];
|
|
1523
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1524
|
-
source,
|
|
1525
|
-
key,
|
|
1526
|
-
defaultValue
|
|
1527
|
-
);
|
|
1515
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1528
1516
|
}
|
|
1529
1517
|
|
|
1530
1518
|
class ComputedRefImpl {
|
|
@@ -1892,8 +1880,13 @@ function findInsertionIndex(id) {
|
|
|
1892
1880
|
let end = queue.length;
|
|
1893
1881
|
while (start < end) {
|
|
1894
1882
|
const middle = start + end >>> 1;
|
|
1895
|
-
const
|
|
1896
|
-
middleJobId
|
|
1883
|
+
const middleJob = queue[middle];
|
|
1884
|
+
const middleJobId = getId(middleJob);
|
|
1885
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1886
|
+
start = middle + 1;
|
|
1887
|
+
} else {
|
|
1888
|
+
end = middle;
|
|
1889
|
+
}
|
|
1897
1890
|
}
|
|
1898
1891
|
return start;
|
|
1899
1892
|
}
|
|
@@ -2695,6 +2688,61 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
2695
2688
|
}
|
|
2696
2689
|
}
|
|
2697
2690
|
|
|
2691
|
+
const COMPONENTS = "components";
|
|
2692
|
+
const DIRECTIVES = "directives";
|
|
2693
|
+
function resolveComponent(name, maybeSelfReference) {
|
|
2694
|
+
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2695
|
+
}
|
|
2696
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2697
|
+
function resolveDynamicComponent(component) {
|
|
2698
|
+
if (isString(component)) {
|
|
2699
|
+
return resolveAsset(COMPONENTS, component, false) || component;
|
|
2700
|
+
} else {
|
|
2701
|
+
return component || NULL_DYNAMIC_COMPONENT;
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
function resolveDirective(name) {
|
|
2705
|
+
return resolveAsset(DIRECTIVES, name);
|
|
2706
|
+
}
|
|
2707
|
+
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
2708
|
+
const instance = currentRenderingInstance || currentInstance;
|
|
2709
|
+
if (instance) {
|
|
2710
|
+
const Component = instance.type;
|
|
2711
|
+
if (type === COMPONENTS) {
|
|
2712
|
+
const selfName = getComponentName(
|
|
2713
|
+
Component,
|
|
2714
|
+
false
|
|
2715
|
+
/* do not include inferred name to avoid breaking existing code */
|
|
2716
|
+
);
|
|
2717
|
+
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
2718
|
+
return Component;
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
const res = (
|
|
2722
|
+
// local registration
|
|
2723
|
+
// check instance[type] first which is resolved for options API
|
|
2724
|
+
resolve(instance[type] || Component[type], name) || // global registration
|
|
2725
|
+
resolve(instance.appContext[type], name)
|
|
2726
|
+
);
|
|
2727
|
+
if (!res && maybeSelfReference) {
|
|
2728
|
+
return Component;
|
|
2729
|
+
}
|
|
2730
|
+
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
2731
|
+
const extra = type === COMPONENTS ? `
|
|
2732
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
2733
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2734
|
+
}
|
|
2735
|
+
return res;
|
|
2736
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
2737
|
+
warn(
|
|
2738
|
+
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
2739
|
+
);
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
function resolve(registry, name) {
|
|
2743
|
+
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2698
2746
|
const isSuspense = (type) => type.__isSuspense;
|
|
2699
2747
|
const SuspenseImpl = {
|
|
2700
2748
|
name: "Suspense",
|
|
@@ -3008,14 +3056,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3008
3056
|
parentComponent: parentComponent2,
|
|
3009
3057
|
container: container2
|
|
3010
3058
|
} = suspense;
|
|
3059
|
+
let delayEnter = false;
|
|
3011
3060
|
if (suspense.isHydrating) {
|
|
3012
3061
|
suspense.isHydrating = false;
|
|
3013
3062
|
} else if (!resume) {
|
|
3014
|
-
|
|
3063
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
3015
3064
|
if (delayEnter) {
|
|
3016
3065
|
activeBranch.transition.afterLeave = () => {
|
|
3017
3066
|
if (pendingId === suspense.pendingId) {
|
|
3018
3067
|
move(pendingBranch, container2, anchor2, 0);
|
|
3068
|
+
queuePostFlushCb(effects);
|
|
3019
3069
|
}
|
|
3020
3070
|
};
|
|
3021
3071
|
}
|
|
@@ -3041,7 +3091,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3041
3091
|
}
|
|
3042
3092
|
parent = parent.parent;
|
|
3043
3093
|
}
|
|
3044
|
-
if (!hasUnresolvedAncestor) {
|
|
3094
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
3045
3095
|
queuePostFlushCb(effects);
|
|
3046
3096
|
}
|
|
3047
3097
|
suspense.effects = [];
|
|
@@ -3227,7 +3277,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
3227
3277
|
}
|
|
3228
3278
|
if (isArray(s)) {
|
|
3229
3279
|
const singleChild = filterSingleRoot(s);
|
|
3230
|
-
if (!!(process.env.NODE_ENV !== "production") && !singleChild) {
|
|
3280
|
+
if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
3231
3281
|
warn(`<Suspense> slots expect a single root node.`);
|
|
3232
3282
|
}
|
|
3233
3283
|
s = singleChild;
|
|
@@ -3393,9 +3443,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3393
3443
|
}
|
|
3394
3444
|
if (cb) {
|
|
3395
3445
|
const newValue = effect.run();
|
|
3396
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
3397
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
3398
|
-
) : hasChanged(newValue, oldValue)) || false) {
|
|
3446
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
|
|
3399
3447
|
if (cleanup) {
|
|
3400
3448
|
cleanup();
|
|
3401
3449
|
}
|
|
@@ -3568,6 +3616,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3568
3616
|
}
|
|
3569
3617
|
}
|
|
3570
3618
|
|
|
3619
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3620
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3571
3621
|
function useTransitionState() {
|
|
3572
3622
|
const state = {
|
|
3573
3623
|
isMounted: false,
|
|
@@ -3690,9 +3740,9 @@ const BaseTransitionImpl = {
|
|
|
3690
3740
|
oldInnerChild
|
|
3691
3741
|
);
|
|
3692
3742
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3693
|
-
el
|
|
3743
|
+
el[leaveCbKey] = () => {
|
|
3694
3744
|
earlyRemove();
|
|
3695
|
-
el
|
|
3745
|
+
el[leaveCbKey] = void 0;
|
|
3696
3746
|
delete enterHooks.delayedLeave;
|
|
3697
3747
|
};
|
|
3698
3748
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -3763,15 +3813,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3763
3813
|
return;
|
|
3764
3814
|
}
|
|
3765
3815
|
}
|
|
3766
|
-
if (el
|
|
3767
|
-
el
|
|
3816
|
+
if (el[leaveCbKey]) {
|
|
3817
|
+
el[leaveCbKey](
|
|
3768
3818
|
true
|
|
3769
3819
|
/* cancelled */
|
|
3770
3820
|
);
|
|
3771
3821
|
}
|
|
3772
3822
|
const leavingVNode = leavingVNodesCache[key];
|
|
3773
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
3774
|
-
leavingVNode.el
|
|
3823
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
3824
|
+
leavingVNode.el[leaveCbKey]();
|
|
3775
3825
|
}
|
|
3776
3826
|
callHook(hook, [el]);
|
|
3777
3827
|
},
|
|
@@ -3789,7 +3839,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3789
3839
|
}
|
|
3790
3840
|
}
|
|
3791
3841
|
let called = false;
|
|
3792
|
-
const done = el
|
|
3842
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
3793
3843
|
if (called)
|
|
3794
3844
|
return;
|
|
3795
3845
|
called = true;
|
|
@@ -3801,7 +3851,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3801
3851
|
if (hooks.delayedLeave) {
|
|
3802
3852
|
hooks.delayedLeave();
|
|
3803
3853
|
}
|
|
3804
|
-
el
|
|
3854
|
+
el[enterCbKey$1] = void 0;
|
|
3805
3855
|
};
|
|
3806
3856
|
if (hook) {
|
|
3807
3857
|
callAsyncHook(hook, [el, done]);
|
|
@@ -3811,8 +3861,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3811
3861
|
},
|
|
3812
3862
|
leave(el, remove) {
|
|
3813
3863
|
const key2 = String(vnode.key);
|
|
3814
|
-
if (el
|
|
3815
|
-
el
|
|
3864
|
+
if (el[enterCbKey$1]) {
|
|
3865
|
+
el[enterCbKey$1](
|
|
3816
3866
|
true
|
|
3817
3867
|
/* cancelled */
|
|
3818
3868
|
);
|
|
@@ -3822,7 +3872,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3822
3872
|
}
|
|
3823
3873
|
callHook(onBeforeLeave, [el]);
|
|
3824
3874
|
let called = false;
|
|
3825
|
-
const done = el
|
|
3875
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
3826
3876
|
if (called)
|
|
3827
3877
|
return;
|
|
3828
3878
|
called = true;
|
|
@@ -3832,7 +3882,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3832
3882
|
} else {
|
|
3833
3883
|
callHook(onAfterLeave, [el]);
|
|
3834
3884
|
}
|
|
3835
|
-
el
|
|
3885
|
+
el[leaveCbKey] = void 0;
|
|
3836
3886
|
if (leavingVNodesCache[key2] === vnode) {
|
|
3837
3887
|
delete leavingVNodesCache[key2];
|
|
3838
3888
|
}
|
|
@@ -3894,6 +3944,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3894
3944
|
return ret;
|
|
3895
3945
|
}
|
|
3896
3946
|
|
|
3947
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3948
|
+
// @__NO_SIDE_EFFECTS__
|
|
3897
3949
|
function defineComponent(options, extraOptions) {
|
|
3898
3950
|
return isFunction(options) ? (
|
|
3899
3951
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -3903,6 +3955,8 @@ function defineComponent(options, extraOptions) {
|
|
|
3903
3955
|
}
|
|
3904
3956
|
|
|
3905
3957
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
3958
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3959
|
+
// @__NO_SIDE_EFFECTS__
|
|
3906
3960
|
function defineAsyncComponent(source) {
|
|
3907
3961
|
if (isFunction(source)) {
|
|
3908
3962
|
source = { loader: source };
|
|
@@ -4337,61 +4391,6 @@ function onErrorCaptured(hook, target = currentInstance) {
|
|
|
4337
4391
|
injectHook("ec", hook, target);
|
|
4338
4392
|
}
|
|
4339
4393
|
|
|
4340
|
-
const COMPONENTS = "components";
|
|
4341
|
-
const DIRECTIVES = "directives";
|
|
4342
|
-
function resolveComponent(name, maybeSelfReference) {
|
|
4343
|
-
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4344
|
-
}
|
|
4345
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4346
|
-
function resolveDynamicComponent(component) {
|
|
4347
|
-
if (isString(component)) {
|
|
4348
|
-
return resolveAsset(COMPONENTS, component, false) || component;
|
|
4349
|
-
} else {
|
|
4350
|
-
return component || NULL_DYNAMIC_COMPONENT;
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
function resolveDirective(name) {
|
|
4354
|
-
return resolveAsset(DIRECTIVES, name);
|
|
4355
|
-
}
|
|
4356
|
-
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
4357
|
-
const instance = currentRenderingInstance || currentInstance;
|
|
4358
|
-
if (instance) {
|
|
4359
|
-
const Component = instance.type;
|
|
4360
|
-
if (type === COMPONENTS) {
|
|
4361
|
-
const selfName = getComponentName(
|
|
4362
|
-
Component,
|
|
4363
|
-
false
|
|
4364
|
-
/* do not include inferred name to avoid breaking existing code */
|
|
4365
|
-
);
|
|
4366
|
-
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
4367
|
-
return Component;
|
|
4368
|
-
}
|
|
4369
|
-
}
|
|
4370
|
-
const res = (
|
|
4371
|
-
// local registration
|
|
4372
|
-
// check instance[type] first which is resolved for options API
|
|
4373
|
-
resolve(instance[type] || Component[type], name) || // global registration
|
|
4374
|
-
resolve(instance.appContext[type], name)
|
|
4375
|
-
);
|
|
4376
|
-
if (!res && maybeSelfReference) {
|
|
4377
|
-
return Component;
|
|
4378
|
-
}
|
|
4379
|
-
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
4380
|
-
const extra = type === COMPONENTS ? `
|
|
4381
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
4382
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
4383
|
-
}
|
|
4384
|
-
return res;
|
|
4385
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4386
|
-
warn(
|
|
4387
|
-
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
4388
|
-
);
|
|
4389
|
-
}
|
|
4390
|
-
}
|
|
4391
|
-
function resolve(registry, name) {
|
|
4392
|
-
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
4393
|
-
}
|
|
4394
|
-
|
|
4395
4394
|
function renderList(source, renderItem, cache, index) {
|
|
4396
4395
|
let ret;
|
|
4397
4396
|
const cached = cache && cache[index];
|
|
@@ -4687,7 +4686,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
4687
4686
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
4688
4687
|
},
|
|
4689
4688
|
has(_, key) {
|
|
4690
|
-
const has = key[0] !== "_" && !
|
|
4689
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
4691
4690
|
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
4692
4691
|
warn(
|
|
4693
4692
|
`Property ${JSON.stringify(
|
|
@@ -5365,12 +5364,12 @@ function createAppAPI(render, hydrate) {
|
|
|
5365
5364
|
},
|
|
5366
5365
|
set() {
|
|
5367
5366
|
warn(
|
|
5368
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
5367
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
5369
5368
|
);
|
|
5370
5369
|
}
|
|
5371
5370
|
});
|
|
5372
5371
|
}
|
|
5373
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
5372
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
5374
5373
|
let isMounted = false;
|
|
5375
5374
|
const app = context.app = {
|
|
5376
5375
|
_uid: uid$1++,
|
|
@@ -5454,10 +5453,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5454
5453
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
5455
5454
|
);
|
|
5456
5455
|
}
|
|
5457
|
-
const vnode = createVNode(
|
|
5458
|
-
rootComponent,
|
|
5459
|
-
rootProps
|
|
5460
|
-
);
|
|
5456
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
5461
5457
|
vnode.appContext = context;
|
|
5462
5458
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5463
5459
|
context.reload = () => {
|
|
@@ -6039,7 +6035,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
6039
6035
|
}
|
|
6040
6036
|
if (needDeletionCheck) {
|
|
6041
6037
|
for (const key in slots) {
|
|
6042
|
-
if (!isInternalKey(key) &&
|
|
6038
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
6043
6039
|
delete slots[key];
|
|
6044
6040
|
}
|
|
6045
6041
|
}
|
|
@@ -6203,8 +6199,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6203
6199
|
hasMismatch = true;
|
|
6204
6200
|
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6205
6201
|
`Hydration text mismatch:
|
|
6206
|
-
-
|
|
6207
|
-
|
|
6202
|
+
- Server rendered: ${JSON.stringify(
|
|
6203
|
+
node.data
|
|
6204
|
+
)}
|
|
6205
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
6208
6206
|
);
|
|
6209
6207
|
node.data = vnode.children;
|
|
6210
6208
|
}
|
|
@@ -6212,7 +6210,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6212
6210
|
}
|
|
6213
6211
|
break;
|
|
6214
6212
|
case Comment:
|
|
6215
|
-
if (
|
|
6213
|
+
if (isTemplateNode(node)) {
|
|
6214
|
+
nextNode = nextSibling(node);
|
|
6215
|
+
replaceNode(
|
|
6216
|
+
vnode.el = node.content.firstChild,
|
|
6217
|
+
node,
|
|
6218
|
+
parentComponent
|
|
6219
|
+
);
|
|
6220
|
+
} else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
6216
6221
|
nextNode = onMismatch();
|
|
6217
6222
|
} else {
|
|
6218
6223
|
nextNode = nextSibling(node);
|
|
@@ -6255,7 +6260,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6255
6260
|
break;
|
|
6256
6261
|
default:
|
|
6257
6262
|
if (shapeFlag & 1) {
|
|
6258
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
6263
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
6259
6264
|
nextNode = onMismatch();
|
|
6260
6265
|
} else {
|
|
6261
6266
|
nextNode = hydrateElement(
|
|
@@ -6270,6 +6275,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6270
6275
|
} else if (shapeFlag & 6) {
|
|
6271
6276
|
vnode.slotScopeIds = slotScopeIds;
|
|
6272
6277
|
const container = parentNode(node);
|
|
6278
|
+
if (isFragmentStart) {
|
|
6279
|
+
nextNode = locateClosingAnchor(node);
|
|
6280
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
6281
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
6282
|
+
} else {
|
|
6283
|
+
nextNode = nextSibling(node);
|
|
6284
|
+
}
|
|
6273
6285
|
mountComponent(
|
|
6274
6286
|
vnode,
|
|
6275
6287
|
container,
|
|
@@ -6279,10 +6291,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6279
6291
|
isSVGContainer(container),
|
|
6280
6292
|
optimized
|
|
6281
6293
|
);
|
|
6282
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
6283
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
6284
|
-
nextNode = nextSibling(nextNode);
|
|
6285
|
-
}
|
|
6286
6294
|
if (isAsyncWrapper(vnode)) {
|
|
6287
6295
|
let subTree;
|
|
6288
6296
|
if (isFragmentStart) {
|
|
@@ -6332,7 +6340,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6332
6340
|
};
|
|
6333
6341
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6334
6342
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6335
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
6343
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6336
6344
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
6337
6345
|
if (!!(process.env.NODE_ENV !== "production") || forcePatchValue || patchFlag !== -1) {
|
|
6338
6346
|
if (dirs) {
|
|
@@ -6369,12 +6377,23 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6369
6377
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
6370
6378
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6371
6379
|
}
|
|
6380
|
+
let needCallTransitionHooks = false;
|
|
6381
|
+
if (isTemplateNode(el)) {
|
|
6382
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
6383
|
+
const content = el.content.firstChild;
|
|
6384
|
+
if (needCallTransitionHooks) {
|
|
6385
|
+
transition.beforeEnter(content);
|
|
6386
|
+
}
|
|
6387
|
+
replaceNode(content, el, parentComponent);
|
|
6388
|
+
vnode.el = el = content;
|
|
6389
|
+
}
|
|
6372
6390
|
if (dirs) {
|
|
6373
6391
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6374
6392
|
}
|
|
6375
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
6393
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
6376
6394
|
queueEffectWithSuspense(() => {
|
|
6377
6395
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6396
|
+
needCallTransitionHooks && transition.enter(el);
|
|
6378
6397
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
6379
6398
|
}, parentSuspense);
|
|
6380
6399
|
}
|
|
@@ -6407,8 +6426,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6407
6426
|
hasMismatch = true;
|
|
6408
6427
|
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6409
6428
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
6410
|
-
-
|
|
6411
|
-
-
|
|
6429
|
+
- Server rendered: ${el.textContent}
|
|
6430
|
+
- Client rendered: ${vnode.children}`
|
|
6412
6431
|
);
|
|
6413
6432
|
el.textContent = vnode.children;
|
|
6414
6433
|
}
|
|
@@ -6492,7 +6511,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6492
6511
|
);
|
|
6493
6512
|
vnode.el = null;
|
|
6494
6513
|
if (isFragment) {
|
|
6495
|
-
const end =
|
|
6514
|
+
const end = locateClosingAnchor(node);
|
|
6496
6515
|
while (true) {
|
|
6497
6516
|
const next2 = nextSibling(node);
|
|
6498
6517
|
if (next2 && next2 !== end) {
|
|
@@ -6517,14 +6536,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6517
6536
|
);
|
|
6518
6537
|
return next;
|
|
6519
6538
|
};
|
|
6520
|
-
const
|
|
6539
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
6521
6540
|
let match = 0;
|
|
6522
6541
|
while (node) {
|
|
6523
6542
|
node = nextSibling(node);
|
|
6524
6543
|
if (node && isComment(node)) {
|
|
6525
|
-
if (node.data ===
|
|
6544
|
+
if (node.data === open)
|
|
6526
6545
|
match++;
|
|
6527
|
-
if (node.data ===
|
|
6546
|
+
if (node.data === close) {
|
|
6528
6547
|
if (match === 0) {
|
|
6529
6548
|
return nextSibling(node);
|
|
6530
6549
|
} else {
|
|
@@ -6535,6 +6554,22 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6535
6554
|
}
|
|
6536
6555
|
return node;
|
|
6537
6556
|
};
|
|
6557
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
6558
|
+
const parentNode2 = oldNode.parentNode;
|
|
6559
|
+
if (parentNode2) {
|
|
6560
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
6561
|
+
}
|
|
6562
|
+
let parent = parentComponent;
|
|
6563
|
+
while (parent) {
|
|
6564
|
+
if (parent.vnode.el === oldNode) {
|
|
6565
|
+
parent.vnode.el = parent.subTree.el = newNode;
|
|
6566
|
+
}
|
|
6567
|
+
parent = parent.parent;
|
|
6568
|
+
}
|
|
6569
|
+
};
|
|
6570
|
+
const isTemplateNode = (node) => {
|
|
6571
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
6572
|
+
};
|
|
6538
6573
|
return [hydrate, hydrateNode];
|
|
6539
6574
|
}
|
|
6540
6575
|
|
|
@@ -6885,7 +6920,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6885
6920
|
if (dirs) {
|
|
6886
6921
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6887
6922
|
}
|
|
6888
|
-
const needCallTransitionHooks = (
|
|
6923
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
6889
6924
|
if (needCallTransitionHooks) {
|
|
6890
6925
|
transition.beforeEnter(el);
|
|
6891
6926
|
}
|
|
@@ -7788,8 +7823,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7788
7823
|
moveStaticNode(vnode, container, anchor);
|
|
7789
7824
|
return;
|
|
7790
7825
|
}
|
|
7791
|
-
const
|
|
7792
|
-
if (
|
|
7826
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
7827
|
+
if (needTransition2) {
|
|
7793
7828
|
if (moveType === 0) {
|
|
7794
7829
|
transition.beforeEnter(el);
|
|
7795
7830
|
hostInsert(el, container, anchor);
|
|
@@ -8009,6 +8044,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8009
8044
|
function toggleRecurse({ effect, update }, allowed) {
|
|
8010
8045
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
8011
8046
|
}
|
|
8047
|
+
function needTransition(parentSuspense, transition) {
|
|
8048
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
8049
|
+
}
|
|
8012
8050
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
8013
8051
|
const ch1 = n1.children;
|
|
8014
8052
|
const ch2 = n2.children;
|
|
@@ -8190,6 +8228,10 @@ const TeleportImpl = {
|
|
|
8190
8228
|
internals,
|
|
8191
8229
|
1
|
|
8192
8230
|
);
|
|
8231
|
+
} else {
|
|
8232
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
8233
|
+
n2.props.to = n1.props.to;
|
|
8234
|
+
}
|
|
8193
8235
|
}
|
|
8194
8236
|
} else {
|
|
8195
8237
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -8230,19 +8272,18 @@ const TeleportImpl = {
|
|
|
8230
8272
|
if (target) {
|
|
8231
8273
|
hostRemove(targetAnchor);
|
|
8232
8274
|
}
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
}
|
|
8275
|
+
doRemove && hostRemove(anchor);
|
|
8276
|
+
if (shapeFlag & 16) {
|
|
8277
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
8278
|
+
for (let i = 0; i < children.length; i++) {
|
|
8279
|
+
const child = children[i];
|
|
8280
|
+
unmount(
|
|
8281
|
+
child,
|
|
8282
|
+
parentComponent,
|
|
8283
|
+
parentSuspense,
|
|
8284
|
+
shouldRemove,
|
|
8285
|
+
!!child.dynamicChildren
|
|
8286
|
+
);
|
|
8246
8287
|
}
|
|
8247
8288
|
}
|
|
8248
8289
|
},
|
|
@@ -8326,7 +8367,7 @@ function updateCssVars(vnode) {
|
|
|
8326
8367
|
const ctx = vnode.ctx;
|
|
8327
8368
|
if (ctx && ctx.ut) {
|
|
8328
8369
|
let node = vnode.children[0].el;
|
|
8329
|
-
while (node !== vnode.targetAnchor) {
|
|
8370
|
+
while (node && node !== vnode.targetAnchor) {
|
|
8330
8371
|
if (node.nodeType === 1)
|
|
8331
8372
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
8332
8373
|
node = node.nextSibling;
|
|
@@ -8984,9 +9025,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8984
9025
|
if (true && true) {
|
|
8985
9026
|
setCurrentInstance(instance);
|
|
8986
9027
|
pauseTracking();
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
9028
|
+
try {
|
|
9029
|
+
applyOptions(instance);
|
|
9030
|
+
} finally {
|
|
9031
|
+
resetTracking();
|
|
9032
|
+
unsetCurrentInstance();
|
|
9033
|
+
}
|
|
8990
9034
|
}
|
|
8991
9035
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
8992
9036
|
if (!compile$1 && Component.template) {
|
|
@@ -9370,7 +9414,7 @@ function isMemoSame(cached, memo) {
|
|
|
9370
9414
|
return true;
|
|
9371
9415
|
}
|
|
9372
9416
|
|
|
9373
|
-
const version = "3.3.
|
|
9417
|
+
const version = "3.3.8";
|
|
9374
9418
|
const _ssrUtils = {
|
|
9375
9419
|
createComponentInstance,
|
|
9376
9420
|
setupComponent,
|
|
@@ -9450,28 +9494,344 @@ const nodeOps = {
|
|
|
9450
9494
|
}
|
|
9451
9495
|
};
|
|
9452
9496
|
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9497
|
+
const TRANSITION = "transition";
|
|
9498
|
+
const ANIMATION = "animation";
|
|
9499
|
+
const vtcKey = Symbol("_vtc");
|
|
9500
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
9501
|
+
Transition.displayName = "Transition";
|
|
9502
|
+
const DOMTransitionPropsValidators = {
|
|
9503
|
+
name: String,
|
|
9504
|
+
type: String,
|
|
9505
|
+
css: {
|
|
9506
|
+
type: Boolean,
|
|
9507
|
+
default: true
|
|
9508
|
+
},
|
|
9509
|
+
duration: [String, Number, Object],
|
|
9510
|
+
enterFromClass: String,
|
|
9511
|
+
enterActiveClass: String,
|
|
9512
|
+
enterToClass: String,
|
|
9513
|
+
appearFromClass: String,
|
|
9514
|
+
appearActiveClass: String,
|
|
9515
|
+
appearToClass: String,
|
|
9516
|
+
leaveFromClass: String,
|
|
9517
|
+
leaveActiveClass: String,
|
|
9518
|
+
leaveToClass: String
|
|
9519
|
+
};
|
|
9520
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9521
|
+
{},
|
|
9522
|
+
BaseTransitionPropsValidators,
|
|
9523
|
+
DOMTransitionPropsValidators
|
|
9524
|
+
);
|
|
9525
|
+
const callHook = (hook, args = []) => {
|
|
9526
|
+
if (isArray(hook)) {
|
|
9527
|
+
hook.forEach((h2) => h2(...args));
|
|
9528
|
+
} else if (hook) {
|
|
9529
|
+
hook(...args);
|
|
9457
9530
|
}
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9531
|
+
};
|
|
9532
|
+
const hasExplicitCallback = (hook) => {
|
|
9533
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
9534
|
+
};
|
|
9535
|
+
function resolveTransitionProps(rawProps) {
|
|
9536
|
+
const baseProps = {};
|
|
9537
|
+
for (const key in rawProps) {
|
|
9538
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
9539
|
+
baseProps[key] = rawProps[key];
|
|
9540
|
+
}
|
|
9464
9541
|
}
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
const
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9542
|
+
if (rawProps.css === false) {
|
|
9543
|
+
return baseProps;
|
|
9544
|
+
}
|
|
9545
|
+
const {
|
|
9546
|
+
name = "v",
|
|
9547
|
+
type,
|
|
9548
|
+
duration,
|
|
9549
|
+
enterFromClass = `${name}-enter-from`,
|
|
9550
|
+
enterActiveClass = `${name}-enter-active`,
|
|
9551
|
+
enterToClass = `${name}-enter-to`,
|
|
9552
|
+
appearFromClass = enterFromClass,
|
|
9553
|
+
appearActiveClass = enterActiveClass,
|
|
9554
|
+
appearToClass = enterToClass,
|
|
9555
|
+
leaveFromClass = `${name}-leave-from`,
|
|
9556
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
9557
|
+
leaveToClass = `${name}-leave-to`
|
|
9558
|
+
} = rawProps;
|
|
9559
|
+
const durations = normalizeDuration(duration);
|
|
9560
|
+
const enterDuration = durations && durations[0];
|
|
9561
|
+
const leaveDuration = durations && durations[1];
|
|
9562
|
+
const {
|
|
9563
|
+
onBeforeEnter,
|
|
9564
|
+
onEnter,
|
|
9565
|
+
onEnterCancelled,
|
|
9566
|
+
onLeave,
|
|
9567
|
+
onLeaveCancelled,
|
|
9568
|
+
onBeforeAppear = onBeforeEnter,
|
|
9569
|
+
onAppear = onEnter,
|
|
9570
|
+
onAppearCancelled = onEnterCancelled
|
|
9571
|
+
} = baseProps;
|
|
9572
|
+
const finishEnter = (el, isAppear, done) => {
|
|
9573
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9574
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
9575
|
+
done && done();
|
|
9576
|
+
};
|
|
9577
|
+
const finishLeave = (el, done) => {
|
|
9578
|
+
el._isLeaving = false;
|
|
9579
|
+
removeTransitionClass(el, leaveFromClass);
|
|
9580
|
+
removeTransitionClass(el, leaveToClass);
|
|
9581
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
9582
|
+
done && done();
|
|
9583
|
+
};
|
|
9584
|
+
const makeEnterHook = (isAppear) => {
|
|
9585
|
+
return (el, done) => {
|
|
9586
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
9587
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
9588
|
+
callHook(hook, [el, resolve]);
|
|
9589
|
+
nextFrame(() => {
|
|
9590
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
9591
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9592
|
+
if (!hasExplicitCallback(hook)) {
|
|
9593
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
9594
|
+
}
|
|
9595
|
+
});
|
|
9596
|
+
};
|
|
9597
|
+
};
|
|
9598
|
+
return extend(baseProps, {
|
|
9599
|
+
onBeforeEnter(el) {
|
|
9600
|
+
callHook(onBeforeEnter, [el]);
|
|
9601
|
+
addTransitionClass(el, enterFromClass);
|
|
9602
|
+
addTransitionClass(el, enterActiveClass);
|
|
9603
|
+
},
|
|
9604
|
+
onBeforeAppear(el) {
|
|
9605
|
+
callHook(onBeforeAppear, [el]);
|
|
9606
|
+
addTransitionClass(el, appearFromClass);
|
|
9607
|
+
addTransitionClass(el, appearActiveClass);
|
|
9608
|
+
},
|
|
9609
|
+
onEnter: makeEnterHook(false),
|
|
9610
|
+
onAppear: makeEnterHook(true),
|
|
9611
|
+
onLeave(el, done) {
|
|
9612
|
+
el._isLeaving = true;
|
|
9613
|
+
const resolve = () => finishLeave(el, done);
|
|
9614
|
+
addTransitionClass(el, leaveFromClass);
|
|
9615
|
+
forceReflow();
|
|
9616
|
+
addTransitionClass(el, leaveActiveClass);
|
|
9617
|
+
nextFrame(() => {
|
|
9618
|
+
if (!el._isLeaving) {
|
|
9619
|
+
return;
|
|
9620
|
+
}
|
|
9621
|
+
removeTransitionClass(el, leaveFromClass);
|
|
9622
|
+
addTransitionClass(el, leaveToClass);
|
|
9623
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
9624
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
9625
|
+
}
|
|
9626
|
+
});
|
|
9627
|
+
callHook(onLeave, [el, resolve]);
|
|
9628
|
+
},
|
|
9629
|
+
onEnterCancelled(el) {
|
|
9630
|
+
finishEnter(el, false);
|
|
9631
|
+
callHook(onEnterCancelled, [el]);
|
|
9632
|
+
},
|
|
9633
|
+
onAppearCancelled(el) {
|
|
9634
|
+
finishEnter(el, true);
|
|
9635
|
+
callHook(onAppearCancelled, [el]);
|
|
9636
|
+
},
|
|
9637
|
+
onLeaveCancelled(el) {
|
|
9638
|
+
finishLeave(el);
|
|
9639
|
+
callHook(onLeaveCancelled, [el]);
|
|
9640
|
+
}
|
|
9641
|
+
});
|
|
9642
|
+
}
|
|
9643
|
+
function normalizeDuration(duration) {
|
|
9644
|
+
if (duration == null) {
|
|
9645
|
+
return null;
|
|
9646
|
+
} else if (isObject(duration)) {
|
|
9647
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
9648
|
+
} else {
|
|
9649
|
+
const n = NumberOf(duration);
|
|
9650
|
+
return [n, n];
|
|
9651
|
+
}
|
|
9652
|
+
}
|
|
9653
|
+
function NumberOf(val) {
|
|
9654
|
+
const res = toNumber(val);
|
|
9655
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
9656
|
+
assertNumber(res, "<transition> explicit duration");
|
|
9657
|
+
}
|
|
9658
|
+
return res;
|
|
9659
|
+
}
|
|
9660
|
+
function addTransitionClass(el, cls) {
|
|
9661
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
9662
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
9663
|
+
}
|
|
9664
|
+
function removeTransitionClass(el, cls) {
|
|
9665
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
9666
|
+
const _vtc = el[vtcKey];
|
|
9667
|
+
if (_vtc) {
|
|
9668
|
+
_vtc.delete(cls);
|
|
9669
|
+
if (!_vtc.size) {
|
|
9670
|
+
el[vtcKey] = void 0;
|
|
9671
|
+
}
|
|
9672
|
+
}
|
|
9673
|
+
}
|
|
9674
|
+
function nextFrame(cb) {
|
|
9675
|
+
requestAnimationFrame(() => {
|
|
9676
|
+
requestAnimationFrame(cb);
|
|
9677
|
+
});
|
|
9678
|
+
}
|
|
9679
|
+
let endId = 0;
|
|
9680
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
9681
|
+
const id = el._endId = ++endId;
|
|
9682
|
+
const resolveIfNotStale = () => {
|
|
9683
|
+
if (id === el._endId) {
|
|
9684
|
+
resolve();
|
|
9685
|
+
}
|
|
9686
|
+
};
|
|
9687
|
+
if (explicitTimeout) {
|
|
9688
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
9689
|
+
}
|
|
9690
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
9691
|
+
if (!type) {
|
|
9692
|
+
return resolve();
|
|
9693
|
+
}
|
|
9694
|
+
const endEvent = type + "end";
|
|
9695
|
+
let ended = 0;
|
|
9696
|
+
const end = () => {
|
|
9697
|
+
el.removeEventListener(endEvent, onEnd);
|
|
9698
|
+
resolveIfNotStale();
|
|
9699
|
+
};
|
|
9700
|
+
const onEnd = (e) => {
|
|
9701
|
+
if (e.target === el && ++ended >= propCount) {
|
|
9702
|
+
end();
|
|
9703
|
+
}
|
|
9704
|
+
};
|
|
9705
|
+
setTimeout(() => {
|
|
9706
|
+
if (ended < propCount) {
|
|
9707
|
+
end();
|
|
9708
|
+
}
|
|
9709
|
+
}, timeout + 1);
|
|
9710
|
+
el.addEventListener(endEvent, onEnd);
|
|
9711
|
+
}
|
|
9712
|
+
function getTransitionInfo(el, expectedType) {
|
|
9713
|
+
const styles = window.getComputedStyle(el);
|
|
9714
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
9715
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
9716
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
9717
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
9718
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
9719
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
9720
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
9721
|
+
let type = null;
|
|
9722
|
+
let timeout = 0;
|
|
9723
|
+
let propCount = 0;
|
|
9724
|
+
if (expectedType === TRANSITION) {
|
|
9725
|
+
if (transitionTimeout > 0) {
|
|
9726
|
+
type = TRANSITION;
|
|
9727
|
+
timeout = transitionTimeout;
|
|
9728
|
+
propCount = transitionDurations.length;
|
|
9729
|
+
}
|
|
9730
|
+
} else if (expectedType === ANIMATION) {
|
|
9731
|
+
if (animationTimeout > 0) {
|
|
9732
|
+
type = ANIMATION;
|
|
9733
|
+
timeout = animationTimeout;
|
|
9734
|
+
propCount = animationDurations.length;
|
|
9735
|
+
}
|
|
9736
|
+
} else {
|
|
9737
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
9738
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
9739
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
9740
|
+
}
|
|
9741
|
+
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
9742
|
+
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
9743
|
+
);
|
|
9744
|
+
return {
|
|
9745
|
+
type,
|
|
9746
|
+
timeout,
|
|
9747
|
+
propCount,
|
|
9748
|
+
hasTransform
|
|
9749
|
+
};
|
|
9750
|
+
}
|
|
9751
|
+
function getTimeout(delays, durations) {
|
|
9752
|
+
while (delays.length < durations.length) {
|
|
9753
|
+
delays = delays.concat(delays);
|
|
9754
|
+
}
|
|
9755
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
9756
|
+
}
|
|
9757
|
+
function toMs(s) {
|
|
9758
|
+
if (s === "auto")
|
|
9759
|
+
return 0;
|
|
9760
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
9761
|
+
}
|
|
9762
|
+
function forceReflow() {
|
|
9763
|
+
return document.body.offsetHeight;
|
|
9764
|
+
}
|
|
9765
|
+
|
|
9766
|
+
function patchClass(el, value, isSVG) {
|
|
9767
|
+
const transitionClasses = el[vtcKey];
|
|
9768
|
+
if (transitionClasses) {
|
|
9769
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
9770
|
+
}
|
|
9771
|
+
if (value == null) {
|
|
9772
|
+
el.removeAttribute("class");
|
|
9773
|
+
} else if (isSVG) {
|
|
9774
|
+
el.setAttribute("class", value);
|
|
9775
|
+
} else {
|
|
9776
|
+
el.className = value;
|
|
9777
|
+
}
|
|
9778
|
+
}
|
|
9779
|
+
|
|
9780
|
+
const vShowOldKey = Symbol("_vod");
|
|
9781
|
+
const vShow = {
|
|
9782
|
+
beforeMount(el, { value }, { transition }) {
|
|
9783
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
9784
|
+
if (transition && value) {
|
|
9785
|
+
transition.beforeEnter(el);
|
|
9786
|
+
} else {
|
|
9787
|
+
setDisplay(el, value);
|
|
9788
|
+
}
|
|
9789
|
+
},
|
|
9790
|
+
mounted(el, { value }, { transition }) {
|
|
9791
|
+
if (transition && value) {
|
|
9792
|
+
transition.enter(el);
|
|
9793
|
+
}
|
|
9794
|
+
},
|
|
9795
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
9796
|
+
if (!value === !oldValue)
|
|
9797
|
+
return;
|
|
9798
|
+
if (transition) {
|
|
9799
|
+
if (value) {
|
|
9800
|
+
transition.beforeEnter(el);
|
|
9801
|
+
setDisplay(el, true);
|
|
9802
|
+
transition.enter(el);
|
|
9803
|
+
} else {
|
|
9804
|
+
transition.leave(el, () => {
|
|
9805
|
+
setDisplay(el, false);
|
|
9806
|
+
});
|
|
9807
|
+
}
|
|
9808
|
+
} else {
|
|
9809
|
+
setDisplay(el, value);
|
|
9810
|
+
}
|
|
9811
|
+
},
|
|
9812
|
+
beforeUnmount(el, { value }) {
|
|
9813
|
+
setDisplay(el, value);
|
|
9814
|
+
}
|
|
9815
|
+
};
|
|
9816
|
+
function setDisplay(el, value) {
|
|
9817
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
9818
|
+
}
|
|
9819
|
+
function initVShowForSSR() {
|
|
9820
|
+
vShow.getSSRProps = ({ value }) => {
|
|
9821
|
+
if (!value) {
|
|
9822
|
+
return { style: { display: "none" } };
|
|
9823
|
+
}
|
|
9824
|
+
};
|
|
9825
|
+
}
|
|
9826
|
+
|
|
9827
|
+
function patchStyle(el, prev, next) {
|
|
9828
|
+
const style = el.style;
|
|
9829
|
+
const isCssString = isString(next);
|
|
9830
|
+
if (next && !isCssString) {
|
|
9831
|
+
if (prev && !isString(prev)) {
|
|
9832
|
+
for (const key in prev) {
|
|
9833
|
+
if (next[key] == null) {
|
|
9834
|
+
setStyle(style, key, "");
|
|
9475
9835
|
}
|
|
9476
9836
|
}
|
|
9477
9837
|
}
|
|
@@ -9487,7 +9847,7 @@ function patchStyle(el, prev, next) {
|
|
|
9487
9847
|
} else if (prev) {
|
|
9488
9848
|
el.removeAttribute("style");
|
|
9489
9849
|
}
|
|
9490
|
-
if (
|
|
9850
|
+
if (vShowOldKey in el) {
|
|
9491
9851
|
style.display = currentDisplay;
|
|
9492
9852
|
}
|
|
9493
9853
|
}
|
|
@@ -9616,8 +9976,9 @@ function addEventListener(el, event, handler, options) {
|
|
|
9616
9976
|
function removeEventListener(el, event, handler, options) {
|
|
9617
9977
|
el.removeEventListener(event, handler, options);
|
|
9618
9978
|
}
|
|
9979
|
+
const veiKey = Symbol("_vei");
|
|
9619
9980
|
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
9620
|
-
const invokers = el
|
|
9981
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
9621
9982
|
const existingInvoker = invokers[rawName];
|
|
9622
9983
|
if (nextValue && existingInvoker) {
|
|
9623
9984
|
existingInvoker.value = nextValue;
|
|
@@ -9737,6 +10098,8 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9737
10098
|
return key in el;
|
|
9738
10099
|
}
|
|
9739
10100
|
|
|
10101
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
10102
|
+
// @__NO_SIDE_EFFECTS__
|
|
9740
10103
|
function defineCustomElement(options, hydrate2) {
|
|
9741
10104
|
const Comp = defineComponent(options);
|
|
9742
10105
|
class VueCustomElement extends VueElement {
|
|
@@ -9747,8 +10110,9 @@ function defineCustomElement(options, hydrate2) {
|
|
|
9747
10110
|
VueCustomElement.def = Comp;
|
|
9748
10111
|
return VueCustomElement;
|
|
9749
10112
|
}
|
|
9750
|
-
|
|
9751
|
-
|
|
10113
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
10114
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
10115
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
9752
10116
|
};
|
|
9753
10117
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
9754
10118
|
};
|
|
@@ -9764,6 +10128,7 @@ class VueElement extends BaseClass {
|
|
|
9764
10128
|
this._connected = false;
|
|
9765
10129
|
this._resolved = false;
|
|
9766
10130
|
this._numberProps = null;
|
|
10131
|
+
this._ob = null;
|
|
9767
10132
|
if (this.shadowRoot && hydrate2) {
|
|
9768
10133
|
hydrate2(this._createVNode(), this.shadowRoot);
|
|
9769
10134
|
} else {
|
|
@@ -9790,6 +10155,10 @@ class VueElement extends BaseClass {
|
|
|
9790
10155
|
}
|
|
9791
10156
|
disconnectedCallback() {
|
|
9792
10157
|
this._connected = false;
|
|
10158
|
+
if (this._ob) {
|
|
10159
|
+
this._ob.disconnect();
|
|
10160
|
+
this._ob = null;
|
|
10161
|
+
}
|
|
9793
10162
|
nextTick(() => {
|
|
9794
10163
|
if (!this._connected) {
|
|
9795
10164
|
render(null, this.shadowRoot);
|
|
@@ -9805,11 +10174,12 @@ class VueElement extends BaseClass {
|
|
|
9805
10174
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
9806
10175
|
this._setAttr(this.attributes[i].name);
|
|
9807
10176
|
}
|
|
9808
|
-
new MutationObserver((mutations) => {
|
|
10177
|
+
this._ob = new MutationObserver((mutations) => {
|
|
9809
10178
|
for (const m of mutations) {
|
|
9810
10179
|
this._setAttr(m.attributeName);
|
|
9811
10180
|
}
|
|
9812
|
-
})
|
|
10181
|
+
});
|
|
10182
|
+
this._ob.observe(this, { attributes: true });
|
|
9813
10183
|
const resolve = (def, isAsync = false) => {
|
|
9814
10184
|
const { props, styles } = def;
|
|
9815
10185
|
let numberProps;
|
|
@@ -9920,384 +10290,120 @@ class VueElement extends BaseClass {
|
|
|
9920
10290
|
};
|
|
9921
10291
|
instance.emit = (event, ...args) => {
|
|
9922
10292
|
dispatch(event, args);
|
|
9923
|
-
if (hyphenate(event) !== event) {
|
|
9924
|
-
dispatch(hyphenate(event), args);
|
|
9925
|
-
}
|
|
9926
|
-
};
|
|
9927
|
-
let parent = this;
|
|
9928
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
9929
|
-
if (parent instanceof VueElement) {
|
|
9930
|
-
instance.parent = parent._instance;
|
|
9931
|
-
instance.provides = parent._instance.provides;
|
|
9932
|
-
break;
|
|
9933
|
-
}
|
|
9934
|
-
}
|
|
9935
|
-
};
|
|
9936
|
-
}
|
|
9937
|
-
return vnode;
|
|
9938
|
-
}
|
|
9939
|
-
_applyStyles(styles) {
|
|
9940
|
-
if (styles) {
|
|
9941
|
-
styles.forEach((css) => {
|
|
9942
|
-
const s = document.createElement("style");
|
|
9943
|
-
s.textContent = css;
|
|
9944
|
-
this.shadowRoot.appendChild(s);
|
|
9945
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
9946
|
-
(this._styles || (this._styles = [])).push(s);
|
|
9947
|
-
}
|
|
9948
|
-
});
|
|
9949
|
-
}
|
|
9950
|
-
}
|
|
9951
|
-
}
|
|
9952
|
-
|
|
9953
|
-
function useCssModule(name = "$style") {
|
|
9954
|
-
{
|
|
9955
|
-
const instance = getCurrentInstance();
|
|
9956
|
-
if (!instance) {
|
|
9957
|
-
!!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
|
|
9958
|
-
return EMPTY_OBJ;
|
|
9959
|
-
}
|
|
9960
|
-
const modules = instance.type.__cssModules;
|
|
9961
|
-
if (!modules) {
|
|
9962
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
|
|
9963
|
-
return EMPTY_OBJ;
|
|
9964
|
-
}
|
|
9965
|
-
const mod = modules[name];
|
|
9966
|
-
if (!mod) {
|
|
9967
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`);
|
|
9968
|
-
return EMPTY_OBJ;
|
|
9969
|
-
}
|
|
9970
|
-
return mod;
|
|
9971
|
-
}
|
|
9972
|
-
}
|
|
9973
|
-
|
|
9974
|
-
function useCssVars(getter) {
|
|
9975
|
-
const instance = getCurrentInstance();
|
|
9976
|
-
if (!instance) {
|
|
9977
|
-
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
9978
|
-
return;
|
|
9979
|
-
}
|
|
9980
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
9981
|
-
Array.from(
|
|
9982
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
9983
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
9984
|
-
};
|
|
9985
|
-
const setVars = () => {
|
|
9986
|
-
const vars = getter(instance.proxy);
|
|
9987
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
9988
|
-
updateTeleports(vars);
|
|
9989
|
-
};
|
|
9990
|
-
watchPostEffect(setVars);
|
|
9991
|
-
onMounted(() => {
|
|
9992
|
-
const ob = new MutationObserver(setVars);
|
|
9993
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
9994
|
-
onUnmounted(() => ob.disconnect());
|
|
9995
|
-
});
|
|
9996
|
-
}
|
|
9997
|
-
function setVarsOnVNode(vnode, vars) {
|
|
9998
|
-
if (vnode.shapeFlag & 128) {
|
|
9999
|
-
const suspense = vnode.suspense;
|
|
10000
|
-
vnode = suspense.activeBranch;
|
|
10001
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
10002
|
-
suspense.effects.push(() => {
|
|
10003
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10004
|
-
});
|
|
10005
|
-
}
|
|
10006
|
-
}
|
|
10007
|
-
while (vnode.component) {
|
|
10008
|
-
vnode = vnode.component.subTree;
|
|
10009
|
-
}
|
|
10010
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
10011
|
-
setVarsOnNode(vnode.el, vars);
|
|
10012
|
-
} else if (vnode.type === Fragment) {
|
|
10013
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10014
|
-
} else if (vnode.type === Static) {
|
|
10015
|
-
let { el, anchor } = vnode;
|
|
10016
|
-
while (el) {
|
|
10017
|
-
setVarsOnNode(el, vars);
|
|
10018
|
-
if (el === anchor)
|
|
10019
|
-
break;
|
|
10020
|
-
el = el.nextSibling;
|
|
10021
|
-
}
|
|
10022
|
-
}
|
|
10023
|
-
}
|
|
10024
|
-
function setVarsOnNode(el, vars) {
|
|
10025
|
-
if (el.nodeType === 1) {
|
|
10026
|
-
const style = el.style;
|
|
10027
|
-
for (const key in vars) {
|
|
10028
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
10029
|
-
}
|
|
10030
|
-
}
|
|
10031
|
-
}
|
|
10032
|
-
|
|
10033
|
-
const TRANSITION = "transition";
|
|
10034
|
-
const ANIMATION = "animation";
|
|
10035
|
-
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
10036
|
-
Transition.displayName = "Transition";
|
|
10037
|
-
const DOMTransitionPropsValidators = {
|
|
10038
|
-
name: String,
|
|
10039
|
-
type: String,
|
|
10040
|
-
css: {
|
|
10041
|
-
type: Boolean,
|
|
10042
|
-
default: true
|
|
10043
|
-
},
|
|
10044
|
-
duration: [String, Number, Object],
|
|
10045
|
-
enterFromClass: String,
|
|
10046
|
-
enterActiveClass: String,
|
|
10047
|
-
enterToClass: String,
|
|
10048
|
-
appearFromClass: String,
|
|
10049
|
-
appearActiveClass: String,
|
|
10050
|
-
appearToClass: String,
|
|
10051
|
-
leaveFromClass: String,
|
|
10052
|
-
leaveActiveClass: String,
|
|
10053
|
-
leaveToClass: String
|
|
10054
|
-
};
|
|
10055
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
10056
|
-
{},
|
|
10057
|
-
BaseTransitionPropsValidators,
|
|
10058
|
-
DOMTransitionPropsValidators
|
|
10059
|
-
);
|
|
10060
|
-
const callHook = (hook, args = []) => {
|
|
10061
|
-
if (isArray(hook)) {
|
|
10062
|
-
hook.forEach((h2) => h2(...args));
|
|
10063
|
-
} else if (hook) {
|
|
10064
|
-
hook(...args);
|
|
10065
|
-
}
|
|
10066
|
-
};
|
|
10067
|
-
const hasExplicitCallback = (hook) => {
|
|
10068
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
10069
|
-
};
|
|
10070
|
-
function resolveTransitionProps(rawProps) {
|
|
10071
|
-
const baseProps = {};
|
|
10072
|
-
for (const key in rawProps) {
|
|
10073
|
-
if (!(key in DOMTransitionPropsValidators)) {
|
|
10074
|
-
baseProps[key] = rawProps[key];
|
|
10075
|
-
}
|
|
10076
|
-
}
|
|
10077
|
-
if (rawProps.css === false) {
|
|
10078
|
-
return baseProps;
|
|
10079
|
-
}
|
|
10080
|
-
const {
|
|
10081
|
-
name = "v",
|
|
10082
|
-
type,
|
|
10083
|
-
duration,
|
|
10084
|
-
enterFromClass = `${name}-enter-from`,
|
|
10085
|
-
enterActiveClass = `${name}-enter-active`,
|
|
10086
|
-
enterToClass = `${name}-enter-to`,
|
|
10087
|
-
appearFromClass = enterFromClass,
|
|
10088
|
-
appearActiveClass = enterActiveClass,
|
|
10089
|
-
appearToClass = enterToClass,
|
|
10090
|
-
leaveFromClass = `${name}-leave-from`,
|
|
10091
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
10092
|
-
leaveToClass = `${name}-leave-to`
|
|
10093
|
-
} = rawProps;
|
|
10094
|
-
const durations = normalizeDuration(duration);
|
|
10095
|
-
const enterDuration = durations && durations[0];
|
|
10096
|
-
const leaveDuration = durations && durations[1];
|
|
10097
|
-
const {
|
|
10098
|
-
onBeforeEnter,
|
|
10099
|
-
onEnter,
|
|
10100
|
-
onEnterCancelled,
|
|
10101
|
-
onLeave,
|
|
10102
|
-
onLeaveCancelled,
|
|
10103
|
-
onBeforeAppear = onBeforeEnter,
|
|
10104
|
-
onAppear = onEnter,
|
|
10105
|
-
onAppearCancelled = onEnterCancelled
|
|
10106
|
-
} = baseProps;
|
|
10107
|
-
const finishEnter = (el, isAppear, done) => {
|
|
10108
|
-
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10109
|
-
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10110
|
-
done && done();
|
|
10111
|
-
};
|
|
10112
|
-
const finishLeave = (el, done) => {
|
|
10113
|
-
el._isLeaving = false;
|
|
10114
|
-
removeTransitionClass(el, leaveFromClass);
|
|
10115
|
-
removeTransitionClass(el, leaveToClass);
|
|
10116
|
-
removeTransitionClass(el, leaveActiveClass);
|
|
10117
|
-
done && done();
|
|
10118
|
-
};
|
|
10119
|
-
const makeEnterHook = (isAppear) => {
|
|
10120
|
-
return (el, done) => {
|
|
10121
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
10122
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
10123
|
-
callHook(hook, [el, resolve]);
|
|
10124
|
-
nextFrame(() => {
|
|
10125
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
10126
|
-
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10127
|
-
if (!hasExplicitCallback(hook)) {
|
|
10128
|
-
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
10129
|
-
}
|
|
10130
|
-
});
|
|
10131
|
-
};
|
|
10132
|
-
};
|
|
10133
|
-
return extend(baseProps, {
|
|
10134
|
-
onBeforeEnter(el) {
|
|
10135
|
-
callHook(onBeforeEnter, [el]);
|
|
10136
|
-
addTransitionClass(el, enterFromClass);
|
|
10137
|
-
addTransitionClass(el, enterActiveClass);
|
|
10138
|
-
},
|
|
10139
|
-
onBeforeAppear(el) {
|
|
10140
|
-
callHook(onBeforeAppear, [el]);
|
|
10141
|
-
addTransitionClass(el, appearFromClass);
|
|
10142
|
-
addTransitionClass(el, appearActiveClass);
|
|
10143
|
-
},
|
|
10144
|
-
onEnter: makeEnterHook(false),
|
|
10145
|
-
onAppear: makeEnterHook(true),
|
|
10146
|
-
onLeave(el, done) {
|
|
10147
|
-
el._isLeaving = true;
|
|
10148
|
-
const resolve = () => finishLeave(el, done);
|
|
10149
|
-
addTransitionClass(el, leaveFromClass);
|
|
10150
|
-
forceReflow();
|
|
10151
|
-
addTransitionClass(el, leaveActiveClass);
|
|
10152
|
-
nextFrame(() => {
|
|
10153
|
-
if (!el._isLeaving) {
|
|
10154
|
-
return;
|
|
10293
|
+
if (hyphenate(event) !== event) {
|
|
10294
|
+
dispatch(hyphenate(event), args);
|
|
10295
|
+
}
|
|
10296
|
+
};
|
|
10297
|
+
let parent = this;
|
|
10298
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
10299
|
+
if (parent instanceof VueElement) {
|
|
10300
|
+
instance.parent = parent._instance;
|
|
10301
|
+
instance.provides = parent._instance.provides;
|
|
10302
|
+
break;
|
|
10303
|
+
}
|
|
10155
10304
|
}
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10305
|
+
};
|
|
10306
|
+
}
|
|
10307
|
+
return vnode;
|
|
10308
|
+
}
|
|
10309
|
+
_applyStyles(styles) {
|
|
10310
|
+
if (styles) {
|
|
10311
|
+
styles.forEach((css) => {
|
|
10312
|
+
const s = document.createElement("style");
|
|
10313
|
+
s.textContent = css;
|
|
10314
|
+
this.shadowRoot.appendChild(s);
|
|
10315
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10316
|
+
(this._styles || (this._styles = [])).push(s);
|
|
10160
10317
|
}
|
|
10161
10318
|
});
|
|
10162
|
-
callHook(onLeave, [el, resolve]);
|
|
10163
|
-
},
|
|
10164
|
-
onEnterCancelled(el) {
|
|
10165
|
-
finishEnter(el, false);
|
|
10166
|
-
callHook(onEnterCancelled, [el]);
|
|
10167
|
-
},
|
|
10168
|
-
onAppearCancelled(el) {
|
|
10169
|
-
finishEnter(el, true);
|
|
10170
|
-
callHook(onAppearCancelled, [el]);
|
|
10171
|
-
},
|
|
10172
|
-
onLeaveCancelled(el) {
|
|
10173
|
-
finishLeave(el);
|
|
10174
|
-
callHook(onLeaveCancelled, [el]);
|
|
10175
10319
|
}
|
|
10176
|
-
});
|
|
10177
|
-
}
|
|
10178
|
-
function normalizeDuration(duration) {
|
|
10179
|
-
if (duration == null) {
|
|
10180
|
-
return null;
|
|
10181
|
-
} else if (isObject(duration)) {
|
|
10182
|
-
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
10183
|
-
} else {
|
|
10184
|
-
const n = NumberOf(duration);
|
|
10185
|
-
return [n, n];
|
|
10186
|
-
}
|
|
10187
|
-
}
|
|
10188
|
-
function NumberOf(val) {
|
|
10189
|
-
const res = toNumber(val);
|
|
10190
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10191
|
-
assertNumber(res, "<transition> explicit duration");
|
|
10192
10320
|
}
|
|
10193
|
-
return res;
|
|
10194
|
-
}
|
|
10195
|
-
function addTransitionClass(el, cls) {
|
|
10196
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
10197
|
-
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
10198
10321
|
}
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10322
|
+
|
|
10323
|
+
function useCssModule(name = "$style") {
|
|
10324
|
+
{
|
|
10325
|
+
const instance = getCurrentInstance();
|
|
10326
|
+
if (!instance) {
|
|
10327
|
+
!!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
|
|
10328
|
+
return EMPTY_OBJ;
|
|
10206
10329
|
}
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
requestAnimationFrame(cb);
|
|
10212
|
-
});
|
|
10213
|
-
}
|
|
10214
|
-
let endId = 0;
|
|
10215
|
-
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
10216
|
-
const id = el._endId = ++endId;
|
|
10217
|
-
const resolveIfNotStale = () => {
|
|
10218
|
-
if (id === el._endId) {
|
|
10219
|
-
resolve();
|
|
10330
|
+
const modules = instance.type.__cssModules;
|
|
10331
|
+
if (!modules) {
|
|
10332
|
+
!!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
|
|
10333
|
+
return EMPTY_OBJ;
|
|
10220
10334
|
}
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10335
|
+
const mod = modules[name];
|
|
10336
|
+
if (!mod) {
|
|
10337
|
+
!!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`);
|
|
10338
|
+
return EMPTY_OBJ;
|
|
10339
|
+
}
|
|
10340
|
+
return mod;
|
|
10224
10341
|
}
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10342
|
+
}
|
|
10343
|
+
|
|
10344
|
+
function useCssVars(getter) {
|
|
10345
|
+
const instance = getCurrentInstance();
|
|
10346
|
+
if (!instance) {
|
|
10347
|
+
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
10348
|
+
return;
|
|
10228
10349
|
}
|
|
10229
|
-
const
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
resolveIfNotStale();
|
|
10350
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
10351
|
+
Array.from(
|
|
10352
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
10353
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
10234
10354
|
};
|
|
10235
|
-
const
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10355
|
+
const setVars = () => {
|
|
10356
|
+
const vars = getter(instance.proxy);
|
|
10357
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
10358
|
+
updateTeleports(vars);
|
|
10239
10359
|
};
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
}
|
|
10244
|
-
|
|
10245
|
-
|
|
10360
|
+
watchPostEffect(setVars);
|
|
10361
|
+
onMounted(() => {
|
|
10362
|
+
const ob = new MutationObserver(setVars);
|
|
10363
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10364
|
+
onUnmounted(() => ob.disconnect());
|
|
10365
|
+
});
|
|
10246
10366
|
}
|
|
10247
|
-
function
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
10256
|
-
let type = null;
|
|
10257
|
-
let timeout = 0;
|
|
10258
|
-
let propCount = 0;
|
|
10259
|
-
if (expectedType === TRANSITION) {
|
|
10260
|
-
if (transitionTimeout > 0) {
|
|
10261
|
-
type = TRANSITION;
|
|
10262
|
-
timeout = transitionTimeout;
|
|
10263
|
-
propCount = transitionDurations.length;
|
|
10367
|
+
function setVarsOnVNode(vnode, vars) {
|
|
10368
|
+
if (vnode.shapeFlag & 128) {
|
|
10369
|
+
const suspense = vnode.suspense;
|
|
10370
|
+
vnode = suspense.activeBranch;
|
|
10371
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
10372
|
+
suspense.effects.push(() => {
|
|
10373
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10374
|
+
});
|
|
10264
10375
|
}
|
|
10265
|
-
}
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10376
|
+
}
|
|
10377
|
+
while (vnode.component) {
|
|
10378
|
+
vnode = vnode.component.subTree;
|
|
10379
|
+
}
|
|
10380
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
10381
|
+
setVarsOnNode(vnode.el, vars);
|
|
10382
|
+
} else if (vnode.type === Fragment) {
|
|
10383
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10384
|
+
} else if (vnode.type === Static) {
|
|
10385
|
+
let { el, anchor } = vnode;
|
|
10386
|
+
while (el) {
|
|
10387
|
+
setVarsOnNode(el, vars);
|
|
10388
|
+
if (el === anchor)
|
|
10389
|
+
break;
|
|
10390
|
+
el = el.nextSibling;
|
|
10270
10391
|
}
|
|
10271
|
-
} else {
|
|
10272
|
-
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
10273
|
-
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
10274
|
-
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
10275
10392
|
}
|
|
10276
|
-
const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
|
|
10277
|
-
getStyleProperties(`${TRANSITION}Property`).toString()
|
|
10278
|
-
);
|
|
10279
|
-
return {
|
|
10280
|
-
type,
|
|
10281
|
-
timeout,
|
|
10282
|
-
propCount,
|
|
10283
|
-
hasTransform
|
|
10284
|
-
};
|
|
10285
10393
|
}
|
|
10286
|
-
function
|
|
10287
|
-
|
|
10288
|
-
|
|
10394
|
+
function setVarsOnNode(el, vars) {
|
|
10395
|
+
if (el.nodeType === 1) {
|
|
10396
|
+
const style = el.style;
|
|
10397
|
+
for (const key in vars) {
|
|
10398
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
10399
|
+
}
|
|
10289
10400
|
}
|
|
10290
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
10291
|
-
}
|
|
10292
|
-
function toMs(s) {
|
|
10293
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
10294
|
-
}
|
|
10295
|
-
function forceReflow() {
|
|
10296
|
-
return document.body.offsetHeight;
|
|
10297
10401
|
}
|
|
10298
10402
|
|
|
10299
10403
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
10300
10404
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
10405
|
+
const moveCbKey = Symbol("_moveCb");
|
|
10406
|
+
const enterCbKey = Symbol("_enterCb");
|
|
10301
10407
|
const TransitionGroupImpl = {
|
|
10302
10408
|
name: "TransitionGroup",
|
|
10303
10409
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -10330,13 +10436,13 @@ const TransitionGroupImpl = {
|
|
|
10330
10436
|
const style = el.style;
|
|
10331
10437
|
addTransitionClass(el, moveClass);
|
|
10332
10438
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
10333
|
-
const cb = el
|
|
10439
|
+
const cb = el[moveCbKey] = (e) => {
|
|
10334
10440
|
if (e && e.target !== el) {
|
|
10335
10441
|
return;
|
|
10336
10442
|
}
|
|
10337
10443
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
10338
10444
|
el.removeEventListener("transitionend", cb);
|
|
10339
|
-
el
|
|
10445
|
+
el[moveCbKey] = null;
|
|
10340
10446
|
removeTransitionClass(el, moveClass);
|
|
10341
10447
|
}
|
|
10342
10448
|
};
|
|
@@ -10379,11 +10485,11 @@ const removeMode = (props) => delete props.mode;
|
|
|
10379
10485
|
const TransitionGroup = TransitionGroupImpl;
|
|
10380
10486
|
function callPendingCbs(c) {
|
|
10381
10487
|
const el = c.el;
|
|
10382
|
-
if (el
|
|
10383
|
-
el
|
|
10488
|
+
if (el[moveCbKey]) {
|
|
10489
|
+
el[moveCbKey]();
|
|
10384
10490
|
}
|
|
10385
|
-
if (el
|
|
10386
|
-
el
|
|
10491
|
+
if (el[enterCbKey]) {
|
|
10492
|
+
el[enterCbKey]();
|
|
10387
10493
|
}
|
|
10388
10494
|
}
|
|
10389
10495
|
function recordPosition(c) {
|
|
@@ -10403,8 +10509,9 @@ function applyTranslation(c) {
|
|
|
10403
10509
|
}
|
|
10404
10510
|
function hasCSSTransform(el, root, moveClass) {
|
|
10405
10511
|
const clone = el.cloneNode();
|
|
10406
|
-
|
|
10407
|
-
|
|
10512
|
+
const _vtc = el[vtcKey];
|
|
10513
|
+
if (_vtc) {
|
|
10514
|
+
_vtc.forEach((cls) => {
|
|
10408
10515
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
10409
10516
|
});
|
|
10410
10517
|
}
|
|
@@ -10431,9 +10538,10 @@ function onCompositionEnd(e) {
|
|
|
10431
10538
|
target.dispatchEvent(new Event("input"));
|
|
10432
10539
|
}
|
|
10433
10540
|
}
|
|
10541
|
+
const assignKey = Symbol("_assign");
|
|
10434
10542
|
const vModelText = {
|
|
10435
10543
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
10436
|
-
el
|
|
10544
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10437
10545
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
10438
10546
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
10439
10547
|
if (e.target.composing)
|
|
@@ -10445,7 +10553,7 @@ const vModelText = {
|
|
|
10445
10553
|
if (castToNumber) {
|
|
10446
10554
|
domValue = looseToNumber(domValue);
|
|
10447
10555
|
}
|
|
10448
|
-
el
|
|
10556
|
+
el[assignKey](domValue);
|
|
10449
10557
|
});
|
|
10450
10558
|
if (trim) {
|
|
10451
10559
|
addEventListener(el, "change", () => {
|
|
@@ -10463,7 +10571,7 @@ const vModelText = {
|
|
|
10463
10571
|
el.value = value == null ? "" : value;
|
|
10464
10572
|
},
|
|
10465
10573
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
10466
|
-
el
|
|
10574
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10467
10575
|
if (el.composing)
|
|
10468
10576
|
return;
|
|
10469
10577
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -10487,12 +10595,12 @@ const vModelCheckbox = {
|
|
|
10487
10595
|
// #4096 array checkboxes need to be deep traversed
|
|
10488
10596
|
deep: true,
|
|
10489
10597
|
created(el, _, vnode) {
|
|
10490
|
-
el
|
|
10598
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10491
10599
|
addEventListener(el, "change", () => {
|
|
10492
10600
|
const modelValue = el._modelValue;
|
|
10493
10601
|
const elementValue = getValue(el);
|
|
10494
10602
|
const checked = el.checked;
|
|
10495
|
-
const assign = el
|
|
10603
|
+
const assign = el[assignKey];
|
|
10496
10604
|
if (isArray(modelValue)) {
|
|
10497
10605
|
const index = looseIndexOf(modelValue, elementValue);
|
|
10498
10606
|
const found = index !== -1;
|
|
@@ -10519,7 +10627,7 @@ const vModelCheckbox = {
|
|
|
10519
10627
|
// set initial checked on mount to wait for true-value/false-value
|
|
10520
10628
|
mounted: setChecked,
|
|
10521
10629
|
beforeUpdate(el, binding, vnode) {
|
|
10522
|
-
el
|
|
10630
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10523
10631
|
setChecked(el, binding, vnode);
|
|
10524
10632
|
}
|
|
10525
10633
|
};
|
|
@@ -10536,13 +10644,13 @@ function setChecked(el, { value, oldValue }, vnode) {
|
|
|
10536
10644
|
const vModelRadio = {
|
|
10537
10645
|
created(el, { value }, vnode) {
|
|
10538
10646
|
el.checked = looseEqual(value, vnode.props.value);
|
|
10539
|
-
el
|
|
10647
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10540
10648
|
addEventListener(el, "change", () => {
|
|
10541
|
-
el
|
|
10649
|
+
el[assignKey](getValue(el));
|
|
10542
10650
|
});
|
|
10543
10651
|
},
|
|
10544
10652
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
10545
|
-
el
|
|
10653
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10546
10654
|
if (value !== oldValue) {
|
|
10547
10655
|
el.checked = looseEqual(value, vnode.props.value);
|
|
10548
10656
|
}
|
|
@@ -10557,11 +10665,11 @@ const vModelSelect = {
|
|
|
10557
10665
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
10558
10666
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
10559
10667
|
);
|
|
10560
|
-
el
|
|
10668
|
+
el[assignKey](
|
|
10561
10669
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
10562
10670
|
);
|
|
10563
10671
|
});
|
|
10564
|
-
el
|
|
10672
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10565
10673
|
},
|
|
10566
10674
|
// set value in mounted & updated because <select> relies on its children
|
|
10567
10675
|
// <option>s.
|
|
@@ -10569,7 +10677,7 @@ const vModelSelect = {
|
|
|
10569
10677
|
setSelected(el, value);
|
|
10570
10678
|
},
|
|
10571
10679
|
beforeUpdate(el, _binding, vnode) {
|
|
10572
|
-
el
|
|
10680
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
10573
10681
|
},
|
|
10574
10682
|
updated(el, { value }) {
|
|
10575
10683
|
setSelected(el, value);
|
|
@@ -10730,52 +10838,6 @@ const withKeys = (fn, modifiers) => {
|
|
|
10730
10838
|
};
|
|
10731
10839
|
};
|
|
10732
10840
|
|
|
10733
|
-
const vShow = {
|
|
10734
|
-
beforeMount(el, { value }, { transition }) {
|
|
10735
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
10736
|
-
if (transition && value) {
|
|
10737
|
-
transition.beforeEnter(el);
|
|
10738
|
-
} else {
|
|
10739
|
-
setDisplay(el, value);
|
|
10740
|
-
}
|
|
10741
|
-
},
|
|
10742
|
-
mounted(el, { value }, { transition }) {
|
|
10743
|
-
if (transition && value) {
|
|
10744
|
-
transition.enter(el);
|
|
10745
|
-
}
|
|
10746
|
-
},
|
|
10747
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
10748
|
-
if (!value === !oldValue)
|
|
10749
|
-
return;
|
|
10750
|
-
if (transition) {
|
|
10751
|
-
if (value) {
|
|
10752
|
-
transition.beforeEnter(el);
|
|
10753
|
-
setDisplay(el, true);
|
|
10754
|
-
transition.enter(el);
|
|
10755
|
-
} else {
|
|
10756
|
-
transition.leave(el, () => {
|
|
10757
|
-
setDisplay(el, false);
|
|
10758
|
-
});
|
|
10759
|
-
}
|
|
10760
|
-
} else {
|
|
10761
|
-
setDisplay(el, value);
|
|
10762
|
-
}
|
|
10763
|
-
},
|
|
10764
|
-
beforeUnmount(el, { value }) {
|
|
10765
|
-
setDisplay(el, value);
|
|
10766
|
-
}
|
|
10767
|
-
};
|
|
10768
|
-
function setDisplay(el, value) {
|
|
10769
|
-
el.style.display = value ? el._vod : "none";
|
|
10770
|
-
}
|
|
10771
|
-
function initVShowForSSR() {
|
|
10772
|
-
vShow.getSSRProps = ({ value }) => {
|
|
10773
|
-
if (!value) {
|
|
10774
|
-
return { style: { display: "none" } };
|
|
10775
|
-
}
|
|
10776
|
-
};
|
|
10777
|
-
}
|
|
10778
|
-
|
|
10779
10841
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
10780
10842
|
let renderer;
|
|
10781
10843
|
let enabledHydration = false;
|