@flemo/core 1.24.0 → 1.25.0
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/core/engine/diagnosticFlags.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +809 -809
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -579,7 +579,7 @@ var j = (e, t, n) => {
|
|
|
579
579
|
let { regexp: r } = i(e);
|
|
580
580
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
581
581
|
return -1;
|
|
582
|
-
},
|
|
582
|
+
}, ne = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, M = async (e, t, n, r) => {
|
|
583
583
|
let i, a = new Promise((t) => {
|
|
584
584
|
i = e.subscribe(() => t(!0));
|
|
585
585
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -587,7 +587,7 @@ var j = (e, t, n) => {
|
|
|
587
587
|
let s = await Promise.race([a, o]);
|
|
588
588
|
i(), s && r();
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function re(e) {
|
|
591
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
592
592
|
let e = r.readState();
|
|
593
593
|
if (!e?.id) return null;
|
|
@@ -616,7 +616,7 @@ function ne(e) {
|
|
|
616
616
|
let e = j(u.until, d, f);
|
|
617
617
|
return e < 0 ? 0 : e;
|
|
618
618
|
}
|
|
619
|
-
return Math.min(
|
|
619
|
+
return Math.min(ne(u?.skip, 0), Math.max(0, d));
|
|
620
620
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
621
621
|
y("PUSHING"), b(h);
|
|
622
622
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -643,7 +643,7 @@ function ne(e) {
|
|
|
643
643
|
return g({
|
|
644
644
|
...C,
|
|
645
645
|
frameIndex: T + 1
|
|
646
|
-
}), await
|
|
646
|
+
}), await M(r, i, v, () => {
|
|
647
647
|
o(), r.pushState({
|
|
648
648
|
id: h,
|
|
649
649
|
index: T + 1,
|
|
@@ -676,7 +676,7 @@ function ne(e) {
|
|
|
676
676
|
let e = j(u.until, d, f);
|
|
677
677
|
return e < 0 ? 0 : e + 1;
|
|
678
678
|
}
|
|
679
|
-
return Math.min(
|
|
679
|
+
return Math.min(ne(u?.skip, 0) + 1, d + 1);
|
|
680
680
|
})();
|
|
681
681
|
if (y <= 0) {
|
|
682
682
|
a.abort();
|
|
@@ -708,7 +708,7 @@ function ne(e) {
|
|
|
708
708
|
return v(y - 1), g({
|
|
709
709
|
...w,
|
|
710
710
|
frameIndex: E
|
|
711
|
-
}), y <= d ? await
|
|
711
|
+
}), y <= d ? await M(r, i, y, () => {
|
|
712
712
|
o(), r.pushState({
|
|
713
713
|
id: h,
|
|
714
714
|
index: E,
|
|
@@ -717,7 +717,7 @@ function ne(e) {
|
|
|
717
717
|
transitionName: p,
|
|
718
718
|
layoutId: m
|
|
719
719
|
}, S);
|
|
720
|
-
}) : await
|
|
720
|
+
}) : await M(r, i, d, () => {
|
|
721
721
|
o(), r.replaceState({
|
|
722
722
|
id: h,
|
|
723
723
|
index: E,
|
|
@@ -776,7 +776,7 @@ function ne(e) {
|
|
|
776
776
|
let r = j(e.until, t, n);
|
|
777
777
|
return r < 0 ? 0 : r;
|
|
778
778
|
}
|
|
779
|
-
let r =
|
|
779
|
+
let r = ne(e?.skip, 1);
|
|
780
780
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
781
781
|
}, e?.transitionName);
|
|
782
782
|
}
|
|
@@ -784,14 +784,14 @@ function ne(e) {
|
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
787
|
+
var ie = (e) => {
|
|
788
788
|
let t = e;
|
|
789
789
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
790
|
+
}, ae = (e, t) => {
|
|
791
791
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
792
792
|
return n ? `${e}?${n}` : e;
|
|
793
793
|
};
|
|
794
|
-
function
|
|
794
|
+
function oe(e) {
|
|
795
795
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
796
796
|
return {
|
|
797
797
|
pushStep: async (e) => {
|
|
@@ -849,7 +849,7 @@ function ae(e) {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function se(e, t) {
|
|
853
853
|
return e.subscribe((e) => {
|
|
854
854
|
let n = e.state;
|
|
855
855
|
n?.step && s.addTask(async () => {
|
|
@@ -859,7 +859,7 @@ function oe(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function ce(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function se(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function le(e, t) {
|
|
871
871
|
return i(e).regexp.test(t);
|
|
872
872
|
}
|
|
873
873
|
//#endregion
|
|
874
874
|
//#region src/screen/store.ts
|
|
875
|
-
var
|
|
875
|
+
var ue = (e, t) => {
|
|
876
876
|
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
877
|
...e,
|
|
878
878
|
height: t?.height
|
|
879
879
|
};
|
|
880
880
|
};
|
|
881
|
-
function
|
|
881
|
+
function de() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function ue() {
|
|
|
892
892
|
topBar: n.topBar ? {} : void 0,
|
|
893
893
|
bottomBar: n.bottomBar ? {} : void 0
|
|
894
894
|
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
-
topBar:
|
|
896
|
-
bottomBar:
|
|
895
|
+
topBar: ue(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: ue(i.bottomBar, o?.bottomBar)
|
|
897
897
|
}, c = a?.topBar === n.topBar && a?.bottomBar === n.bottomBar, l = o?.topBar?.id === s.topBar?.id && o?.topBar?.height === s.topBar?.height && o?.bottomBar?.id === s.bottomBar?.id && o?.bottomBar?.height === s.bottomBar?.height && !!o?.topBar == !!s.topBar && !!o?.bottomBar == !!s.bottomBar;
|
|
898
898
|
return c && l ? e : {
|
|
899
899
|
sharedBars: {
|
|
@@ -942,14 +942,14 @@ function ue() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var fe = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, pe = /* @__PURE__ */ new Map();
|
|
949
|
+
function me(e) {
|
|
950
950
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
951
951
|
if (s) {
|
|
952
|
-
let e =
|
|
952
|
+
let e = pe.get(s);
|
|
953
953
|
if (e) {
|
|
954
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
955
955
|
let t = e.history.getState();
|
|
@@ -979,25 +979,25 @@ function pe(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? fe : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
984
|
navigate: te(),
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
985
|
+
transition: ce(i),
|
|
986
|
+
screen: de(),
|
|
987
987
|
driver: m,
|
|
988
988
|
markSelfInduced: h.mark,
|
|
989
989
|
consume: h.consume,
|
|
990
990
|
routerKey: e.routerKey,
|
|
991
991
|
zoneEntryId: e.zoneEntryId,
|
|
992
|
-
ownsPathname: (e) =>
|
|
992
|
+
ownsPathname: (e) => le(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && pe.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function he(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,162 +1010,162 @@ function me(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var ge = "flemo:motion-driver-force", _e = !1, ve = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(ge);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(ge);
|
|
1020
1020
|
if (e === null) return null;
|
|
1021
1021
|
let [t, n] = e.split("@"), r = Number(n);
|
|
1022
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!
|
|
1022
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!_e && typeof console < "u" && (_e = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${ge}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(ge), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
},
|
|
1026
|
+
}, N = () => {
|
|
1027
1027
|
if (typeof navigator > "u") return !1;
|
|
1028
1028
|
let e = navigator.userAgentData?.brands;
|
|
1029
1029
|
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
1030
|
let t = navigator.userAgent ?? "";
|
|
1031
1031
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
-
},
|
|
1032
|
+
}, ye = () => {
|
|
1033
1033
|
if (typeof navigator > "u") return !1;
|
|
1034
1034
|
let e = navigator.userAgentData?.brands;
|
|
1035
1035
|
if (Array.isArray(e)) return !1;
|
|
1036
1036
|
let t = navigator.userAgent ?? "";
|
|
1037
1037
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t) && (navigator.maxTouchPoints ?? 0) > 0;
|
|
1038
|
-
},
|
|
1038
|
+
}, be = ((e = !1) => ({
|
|
1039
1039
|
playerAllowed: () => {
|
|
1040
|
-
let t =
|
|
1040
|
+
let t = ve();
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
|
-
pinnedDriver:
|
|
1044
|
-
}))(!0),
|
|
1043
|
+
pinnedDriver: ve
|
|
1044
|
+
}))(!0), xe = 28, Se = 42, Ce = 8, we = 20, Te = 6, Ee = 400, De = 8, Oe = "flemo:lpm", ke = () => !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && typeof requestAnimationFrame == "function", Ae = () => {
|
|
1045
1045
|
try {
|
|
1046
|
-
return typeof sessionStorage < "u" && sessionStorage.getItem(
|
|
1046
|
+
return typeof sessionStorage < "u" && sessionStorage.getItem(Oe) === "1";
|
|
1047
1047
|
} catch {
|
|
1048
1048
|
return !1;
|
|
1049
1049
|
}
|
|
1050
|
-
},
|
|
1050
|
+
}, je = (e) => {
|
|
1051
1051
|
try {
|
|
1052
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Oe, e ? "1" : "0");
|
|
1053
1053
|
} catch {}
|
|
1054
|
-
},
|
|
1055
|
-
if (
|
|
1056
|
-
|
|
1054
|
+
}, Me = !1, Ne = !1, Pe = !1, Fe = 12, Ie = 8, P = [], Le = null, F = !1, Re = !1, ze = !1, Be = () => {
|
|
1055
|
+
if (F || !ke()) return;
|
|
1056
|
+
F = !0;
|
|
1057
1057
|
let e = (t) => {
|
|
1058
|
-
if (
|
|
1059
|
-
let e = [...
|
|
1060
|
-
t[t.length - 1] - t[0] <=
|
|
1058
|
+
if (Le !== null && (P.push(t - Le), P.length > Fe && P.shift(), P.length >= Ie)) {
|
|
1059
|
+
let e = [...P].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
+
t[t.length - 1] - t[0] <= Ce && (Re = n >= xe && n <= Se, ze = !0);
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
Le = t, requestAnimationFrame(e);
|
|
1063
1063
|
};
|
|
1064
1064
|
requestAnimationFrame(e);
|
|
1065
|
-
},
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
1065
|
+
}, Ve = () => Me || ze && Re, He = () => ke(), Ue = (e = 0) => {
|
|
1066
|
+
if (Ne || !ke()) return;
|
|
1067
|
+
Ne = !0;
|
|
1068
1068
|
let t = [], n = null, r = (i) => {
|
|
1069
|
-
if (n !== null && t.push(i - n), n = i, t.length <
|
|
1069
|
+
if (n !== null && t.push(i - n), n = i, t.length < Te) {
|
|
1070
1070
|
requestAnimationFrame(r);
|
|
1071
1071
|
return;
|
|
1072
1072
|
}
|
|
1073
|
-
|
|
1074
|
-
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >=
|
|
1073
|
+
Ne = !1;
|
|
1074
|
+
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= xe && o[o.length - 1] <= Se && o[o.length - 1] - o[0] <= Ce, c = o[o.length - 1] <= we;
|
|
1075
1075
|
if (s || c) {
|
|
1076
|
-
|
|
1076
|
+
Me = s, s && o[Math.floor(o.length / 2)], je(Me);
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
-
e + 1 <
|
|
1080
|
+
e + 1 < De && typeof setTimeout == "function" && setTimeout(() => Ue(e + 1), Ee);
|
|
1081
1081
|
};
|
|
1082
1082
|
requestAnimationFrame(r);
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1085
|
-
document.visibilityState === "visible" &&
|
|
1083
|
+
}, We = () => {
|
|
1084
|
+
Be(), Ue(), !(Pe || typeof document > "u" || typeof document.addEventListener != "function") && (Pe = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
|
+
document.visibilityState === "visible" && Ue();
|
|
1086
1086
|
}));
|
|
1087
1087
|
};
|
|
1088
|
-
|
|
1089
|
-
var
|
|
1088
|
+
ke() && (Me = Ae(), Be(), Ue());
|
|
1089
|
+
var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
1090
1090
|
try {
|
|
1091
|
-
return typeof sessionStorage < "u" ? sessionStorage.getItem(
|
|
1091
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(Ye) : null;
|
|
1092
1092
|
} catch {
|
|
1093
1093
|
return null;
|
|
1094
1094
|
}
|
|
1095
|
-
},
|
|
1095
|
+
}, Ze = (e) => {
|
|
1096
1096
|
try {
|
|
1097
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1097
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Ye, e);
|
|
1098
1098
|
} catch {}
|
|
1099
|
-
},
|
|
1099
|
+
}, Qe = Xe(), $e = Qe === "high", et = Qe !== null && Qe !== "high" ? Math.min(qe, Math.max(0, parseInt(Qe, 10) || 0)) : 0, tt = (e, t) => {
|
|
1100
1100
|
if (!(!Number.isFinite(e) || e <= 0)) {
|
|
1101
1101
|
if (e < 12) {
|
|
1102
1102
|
if (t !== void 0 && t > 24) return;
|
|
1103
|
-
|
|
1103
|
+
$e = !0, et = 0, Ze("high");
|
|
1104
1104
|
return;
|
|
1105
1105
|
}
|
|
1106
|
-
if (e >=
|
|
1107
|
-
|
|
1106
|
+
if (e >= Ge && e <= Ke) {
|
|
1107
|
+
et = Math.min(qe, et + 1), $e || Ze(String(et));
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
e <
|
|
1110
|
+
e < Ge && (et = 0, $e || Ze("0"));
|
|
1111
1111
|
}
|
|
1112
|
-
},
|
|
1112
|
+
}, nt = () => !$e && et >= qe, rt = () => nt() && N() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Je, I = (e) => {
|
|
1113
1113
|
try {
|
|
1114
1114
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1115
|
} catch {
|
|
1116
1116
|
return null;
|
|
1117
1117
|
}
|
|
1118
|
-
},
|
|
1119
|
-
let e =
|
|
1118
|
+
}, it = () => I("flemo:landing-snap") === "on", at = () => {
|
|
1119
|
+
let e = I("flemo:imghold");
|
|
1120
1120
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
},
|
|
1121
|
+
}, ot = () => N() && (navigator.maxTouchPoints ?? 0) > 0, st = () => {
|
|
1122
1122
|
try {
|
|
1123
1123
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 :
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : He() || rt() || ot();
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return !1;
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1129
|
-
let e =
|
|
1128
|
+
}, ct = () => I("flemo:handoff") === "on", lt = () => I("flemo:arrivalhold") !== "off", ut = () => I("flemo:preraster") === "on", dt = () => ut() || rt(), ft = () => {
|
|
1129
|
+
let e = I("flemo:imgoffload");
|
|
1130
1130
|
return e === "on" || e === "off" ? e : null;
|
|
1131
|
-
}, dt, ft = () => {
|
|
1132
|
-
if (dt !== void 0) return dt;
|
|
1133
|
-
let e = L("flemo:apply");
|
|
1134
|
-
return dt = e === "scrub" ? e : null, dt;
|
|
1135
1131
|
}, pt, mt = () => {
|
|
1136
1132
|
if (pt !== void 0) return pt;
|
|
1137
|
-
let e =
|
|
1138
|
-
return pt = e === "
|
|
1133
|
+
let e = I("flemo:apply");
|
|
1134
|
+
return pt = e === "scrub" ? e : null, pt;
|
|
1139
1135
|
}, ht, gt = () => {
|
|
1140
1136
|
if (ht !== void 0) return ht;
|
|
1141
|
-
let e =
|
|
1142
|
-
return ht = e === "
|
|
1137
|
+
let e = I("flemo:handoff");
|
|
1138
|
+
return ht = e === "on" ? e : null, ht;
|
|
1143
1139
|
}, _t, vt = () => {
|
|
1144
1140
|
if (_t !== void 0) return _t;
|
|
1145
|
-
let e =
|
|
1146
|
-
return _t =
|
|
1141
|
+
let e = I("flemo:snap");
|
|
1142
|
+
return _t = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, _t;
|
|
1147
1143
|
}, yt, bt = () => {
|
|
1148
1144
|
if (yt !== void 0) return yt;
|
|
1149
|
-
let e =
|
|
1150
|
-
return yt = Number.isFinite(t) && t
|
|
1151
|
-
}, xt, St = () =>
|
|
1145
|
+
let e = I("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1146
|
+
return yt = Number.isFinite(t) && t > 0 ? t : 4, yt;
|
|
1147
|
+
}, xt, St = () => {
|
|
1148
|
+
if (xt !== void 0) return xt;
|
|
1149
|
+
let e = I("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1150
|
+
return xt = Number.isFinite(t) && t >= 0 ? t : 100, xt;
|
|
1151
|
+
}, Ct, wt = () => (Ct === void 0 && (Ct = I("flemo:layers") === "resident"), Ct), Tt, Et = () => (Tt === void 0 && (Tt = I("flemo:freeze") === "shallow"), Tt);
|
|
1152
1152
|
(() => {
|
|
1153
1153
|
try {
|
|
1154
1154
|
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
1155
1155
|
/[?&]flemo-freeze=shallow\b/.test(location.search) ? sessionStorage.setItem("flemo:freeze", "shallow") : /[?&]flemo-freeze=off\b/.test(location.search) && sessionStorage.removeItem("flemo:freeze");
|
|
1156
1156
|
} catch {}
|
|
1157
1157
|
})();
|
|
1158
|
-
function
|
|
1158
|
+
function Dt(e) {
|
|
1159
1159
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1160
1160
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1161
|
-
return !e.isActive && t ?
|
|
1161
|
+
return !e.isActive && t ? Et() ? "live" : "deferred" : "live";
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return
|
|
1163
|
+
function Ot(e) {
|
|
1164
|
+
return Dt(e) !== "live";
|
|
1165
1165
|
}
|
|
1166
1166
|
//#endregion
|
|
1167
1167
|
//#region src/transition/createTransition.ts
|
|
1168
|
-
function
|
|
1168
|
+
function kt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1169
1169
|
return {
|
|
1170
1170
|
name: e,
|
|
1171
1171
|
initial: t,
|
|
@@ -1186,7 +1186,7 @@ function Dt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1186
1186
|
}
|
|
1187
1187
|
//#endregion
|
|
1188
1188
|
//#region src/transition/createRawTransition.ts
|
|
1189
|
-
function
|
|
1189
|
+
function At({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1190
1190
|
return {
|
|
1191
1191
|
name: e,
|
|
1192
1192
|
initial: t,
|
|
@@ -1207,15 +1207,15 @@ function Ot({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1207
1207
|
}
|
|
1208
1208
|
//#endregion
|
|
1209
1209
|
//#region src/transition/cupertino.ts
|
|
1210
|
-
var
|
|
1210
|
+
var jt = (e, t, n) => {
|
|
1211
1211
|
let [r, i] = t, [a, o] = n;
|
|
1212
1212
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1213
|
-
},
|
|
1213
|
+
}, Mt = 30, Nt = .7, Pt = [
|
|
1214
1214
|
.32,
|
|
1215
1215
|
.72,
|
|
1216
1216
|
0,
|
|
1217
1217
|
1
|
|
1218
|
-
],
|
|
1218
|
+
], Ft = kt({
|
|
1219
1219
|
name: "cupertino",
|
|
1220
1220
|
initial: { x: "100%" },
|
|
1221
1221
|
idle: {
|
|
@@ -1225,29 +1225,29 @@ var kt = (e, t, n) => {
|
|
|
1225
1225
|
enter: {
|
|
1226
1226
|
value: { x: 0 },
|
|
1227
1227
|
options: {
|
|
1228
|
-
duration:
|
|
1229
|
-
ease:
|
|
1228
|
+
duration: Nt,
|
|
1229
|
+
ease: Pt
|
|
1230
1230
|
}
|
|
1231
1231
|
},
|
|
1232
1232
|
enterBack: {
|
|
1233
1233
|
value: { x: "100%" },
|
|
1234
1234
|
options: {
|
|
1235
|
-
duration:
|
|
1236
|
-
ease:
|
|
1235
|
+
duration: Nt,
|
|
1236
|
+
ease: Pt
|
|
1237
1237
|
}
|
|
1238
1238
|
},
|
|
1239
1239
|
exit: {
|
|
1240
|
-
value: { x: `-${
|
|
1240
|
+
value: { x: `-${Mt}%` },
|
|
1241
1241
|
options: {
|
|
1242
|
-
duration:
|
|
1243
|
-
ease:
|
|
1242
|
+
duration: Nt,
|
|
1243
|
+
ease: Pt
|
|
1244
1244
|
}
|
|
1245
1245
|
},
|
|
1246
1246
|
exitBack: {
|
|
1247
1247
|
value: { x: 0 },
|
|
1248
1248
|
options: {
|
|
1249
|
-
duration:
|
|
1250
|
-
ease:
|
|
1249
|
+
duration: Nt,
|
|
1250
|
+
ease: Pt
|
|
1251
1251
|
}
|
|
1252
1252
|
},
|
|
1253
1253
|
options: {
|
|
@@ -1255,24 +1255,24 @@ var kt = (e, t, n) => {
|
|
|
1255
1255
|
swipeDirection: "x",
|
|
1256
1256
|
onSwipeStart: async () => !0,
|
|
1257
1257
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1258
|
-
let { offset: o } = t, s = o.x, c =
|
|
1259
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1258
|
+
let { offset: o } = t, s = o.x, c = jt(s, [0, window.innerWidth], [0, 100]);
|
|
1259
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + Mt / 100 * c}%` }, { duration: 0 }), c;
|
|
1260
1260
|
},
|
|
1261
1261
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1262
1262
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1263
1263
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1264
1264
|
duration: .3,
|
|
1265
|
-
ease:
|
|
1266
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1265
|
+
ease: Pt
|
|
1266
|
+
}), n(i, { x: c ? 0 : `-${Mt}%` }, {
|
|
1267
1267
|
duration: .3,
|
|
1268
|
-
ease:
|
|
1268
|
+
ease: Pt
|
|
1269
1269
|
})]), c;
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
|
-
}),
|
|
1272
|
+
}), It = (e, t, n) => {
|
|
1273
1273
|
let [r, i] = t, [a, o] = n;
|
|
1274
1274
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1275
|
-
},
|
|
1275
|
+
}, Lt = kt({
|
|
1276
1276
|
name: "layout",
|
|
1277
1277
|
initial: { opacity: .97 },
|
|
1278
1278
|
idle: {
|
|
@@ -1300,7 +1300,7 @@ var kt = (e, t, n) => {
|
|
|
1300
1300
|
swipeDirection: "y",
|
|
1301
1301
|
onSwipeStart: async () => !0,
|
|
1302
1302
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1303
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1303
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = It(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
1304
1304
|
return i?.(!0, 100), n(r, {
|
|
1305
1305
|
y: f,
|
|
1306
1306
|
opacity: c
|
|
@@ -1317,7 +1317,7 @@ var kt = (e, t, n) => {
|
|
|
1317
1317
|
}, { duration: .3 })]), c;
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
}),
|
|
1320
|
+
}), Rt = kt({
|
|
1321
1321
|
name: "material",
|
|
1322
1322
|
initial: { y: "100%" },
|
|
1323
1323
|
idle: {
|
|
@@ -1425,7 +1425,7 @@ var kt = (e, t, n) => {
|
|
|
1425
1425
|
})]), c;
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
|
-
}),
|
|
1428
|
+
}), zt = kt({
|
|
1429
1429
|
name: "none",
|
|
1430
1430
|
initial: {},
|
|
1431
1431
|
idle: {
|
|
@@ -1448,20 +1448,20 @@ var kt = (e, t, n) => {
|
|
|
1448
1448
|
value: {},
|
|
1449
1449
|
options: { duration: 0 }
|
|
1450
1450
|
}
|
|
1451
|
-
}),
|
|
1452
|
-
["none",
|
|
1453
|
-
["cupertino",
|
|
1454
|
-
["material",
|
|
1455
|
-
["layout",
|
|
1451
|
+
}), Bt = /* @__PURE__ */ new Map([
|
|
1452
|
+
["none", zt],
|
|
1453
|
+
["cupertino", Ft],
|
|
1454
|
+
["material", Rt],
|
|
1455
|
+
["layout", Lt]
|
|
1456
1456
|
]);
|
|
1457
1457
|
//#endregion
|
|
1458
1458
|
//#region src/transition/resolveTransition.ts
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1459
|
+
function L(e) {
|
|
1460
|
+
return Bt.get(e) ?? Bt.get("none");
|
|
1461
1461
|
}
|
|
1462
1462
|
//#endregion
|
|
1463
1463
|
//#region src/transition/decorator/createDecorator.ts
|
|
1464
|
-
function
|
|
1464
|
+
function Vt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1465
1465
|
return {
|
|
1466
1466
|
name: e,
|
|
1467
1467
|
initial: t,
|
|
@@ -1482,7 +1482,7 @@ function zt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
//#endregion
|
|
1484
1484
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1485
|
-
function
|
|
1485
|
+
function Ht({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1486
1486
|
return {
|
|
1487
1487
|
name: e,
|
|
1488
1488
|
initial: t,
|
|
@@ -1503,30 +1503,30 @@ function Bt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1503
1503
|
}
|
|
1504
1504
|
//#endregion
|
|
1505
1505
|
//#region src/transition/decorator/overlay.ts
|
|
1506
|
-
var
|
|
1506
|
+
var Ut = "rgba(0, 0, 0, 0.1)", Wt = Vt({
|
|
1507
1507
|
name: "overlay",
|
|
1508
1508
|
initial: {
|
|
1509
1509
|
opacity: 0,
|
|
1510
|
-
backgroundColor:
|
|
1510
|
+
backgroundColor: Ut
|
|
1511
1511
|
},
|
|
1512
1512
|
idle: {
|
|
1513
1513
|
value: {
|
|
1514
1514
|
opacity: 0,
|
|
1515
|
-
backgroundColor:
|
|
1515
|
+
backgroundColor: Ut
|
|
1516
1516
|
},
|
|
1517
1517
|
options: { duration: 0 }
|
|
1518
1518
|
},
|
|
1519
1519
|
enter: {
|
|
1520
1520
|
value: {
|
|
1521
1521
|
opacity: 1,
|
|
1522
|
-
backgroundColor:
|
|
1522
|
+
backgroundColor: Ut
|
|
1523
1523
|
},
|
|
1524
1524
|
options: { duration: .7 }
|
|
1525
1525
|
},
|
|
1526
1526
|
exit: {
|
|
1527
1527
|
value: {
|
|
1528
1528
|
opacity: 0,
|
|
1529
|
-
backgroundColor:
|
|
1529
|
+
backgroundColor: Ut
|
|
1530
1530
|
},
|
|
1531
1531
|
options: { duration: .7 }
|
|
1532
1532
|
},
|
|
@@ -1535,10 +1535,10 @@ var Vt = "rgba(0, 0, 0, 0.1)", Ht = zt({
|
|
|
1535
1535
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1536
1536
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1537
1537
|
}
|
|
1538
|
-
}),
|
|
1538
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Wt]]);
|
|
1539
1539
|
//#endregion
|
|
1540
1540
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1541
|
-
function
|
|
1541
|
+
function Gt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1542
1542
|
return {
|
|
1543
1543
|
name: e,
|
|
1544
1544
|
initial: t,
|
|
@@ -1559,7 +1559,7 @@ function Ut({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1559
1559
|
}
|
|
1560
1560
|
//#endregion
|
|
1561
1561
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1562
|
-
function
|
|
1562
|
+
function Kt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1563
1563
|
return {
|
|
1564
1564
|
name: e,
|
|
1565
1565
|
initial: t,
|
|
@@ -1580,7 +1580,7 @@ function Wt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1580
1580
|
}
|
|
1581
1581
|
//#endregion
|
|
1582
1582
|
//#region src/transition/partTransition/partTransition.ts
|
|
1583
|
-
var
|
|
1583
|
+
var z = /* @__PURE__ */ new Map(), qt = {
|
|
1584
1584
|
"IDLE-true": "self",
|
|
1585
1585
|
"IDLE-false": "self",
|
|
1586
1586
|
"PUSHING-true": "initial",
|
|
@@ -1591,17 +1591,17 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1591
1591
|
"POPPING-false": "PUSHING-false",
|
|
1592
1592
|
"COMPLETED-true": "self",
|
|
1593
1593
|
"COMPLETED-false": "self"
|
|
1594
|
-
},
|
|
1594
|
+
}, Jt = Object.keys(qt), Yt = (e) => {
|
|
1595
1595
|
if (!e) return 0;
|
|
1596
1596
|
let t = e.duration;
|
|
1597
1597
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1598
|
-
},
|
|
1599
|
-
let n =
|
|
1598
|
+
}, Xt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Zt = (e, t) => {
|
|
1599
|
+
let n = qt[t];
|
|
1600
1600
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1601
|
-
},
|
|
1602
|
-
let n =
|
|
1601
|
+
}, B = (e, t) => {
|
|
1602
|
+
let n = Zt(e, t);
|
|
1603
1603
|
if (n === null) return null;
|
|
1604
|
-
let r = e.variants[t], i =
|
|
1604
|
+
let r = e.variants[t], i = Yt(r.options), a = Xt(r.options);
|
|
1605
1605
|
return i <= 0 && a <= 0 ? null : {
|
|
1606
1606
|
from: n,
|
|
1607
1607
|
to: r.value,
|
|
@@ -1609,7 +1609,7 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1609
1609
|
delay: a,
|
|
1610
1610
|
ease: r.options?.ease
|
|
1611
1611
|
};
|
|
1612
|
-
},
|
|
1612
|
+
}, Qt = Jt, $t = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), en = (e) => typeof e == "object" && !!e && !Array.isArray(e), tn = /* @__PURE__ */ new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), nn = (e, t) => t.startsWith("--") || tn.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, rn = (e, t) => typeof t == "number" ? nn(t, e) : typeof t == "string" ? t : "", an = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), on = /* @__PURE__ */ new Set([
|
|
1613
1613
|
"x",
|
|
1614
1614
|
"y",
|
|
1615
1615
|
"z",
|
|
@@ -1620,7 +1620,7 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1620
1620
|
"rotateX",
|
|
1621
1621
|
"rotateY",
|
|
1622
1622
|
"rotateZ"
|
|
1623
|
-
]),
|
|
1623
|
+
]), sn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, cn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, ln = /^1(\.0+)?$/, un = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && ln.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && cn.test(t.trim()) : t === 0 || typeof t == "string" && sn.test(t.trim()), dn = (e, t) => {
|
|
1624
1624
|
switch (e) {
|
|
1625
1625
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1626
1626
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1634,16 +1634,16 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1634
1634
|
case "rotateY": return `rotateY(${t})`;
|
|
1635
1635
|
default: return "";
|
|
1636
1636
|
}
|
|
1637
|
-
},
|
|
1637
|
+
}, fn = (e) => {
|
|
1638
1638
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1639
|
-
if (!
|
|
1639
|
+
if (!en(e)) return;
|
|
1640
1640
|
let n = [];
|
|
1641
1641
|
for (let r of Object.keys(e)) {
|
|
1642
|
-
let i = e[r], a =
|
|
1643
|
-
if (a !== "") if (
|
|
1642
|
+
let i = e[r], a = rn(r, i);
|
|
1643
|
+
if (a !== "") if (on.has(r)) n.push(`${r}:${a}`);
|
|
1644
1644
|
else {
|
|
1645
|
-
let e = t.get(
|
|
1646
|
-
e.add(a), t.set(
|
|
1645
|
+
let e = t.get(an(r)) ?? /* @__PURE__ */ new Set();
|
|
1646
|
+
e.add(a), t.set(an(r), e);
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
r.add(n.sort().join("|"));
|
|
@@ -1653,13 +1653,13 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1653
1653
|
n = r.size > 1;
|
|
1654
1654
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1655
1655
|
return n && a.push("transform"), a;
|
|
1656
|
-
},
|
|
1657
|
-
if (!
|
|
1656
|
+
}, pn = (e) => {
|
|
1657
|
+
if (!en(e)) return [];
|
|
1658
1658
|
let t = [], n = !0, r = [];
|
|
1659
1659
|
for (let i of Object.keys(e)) {
|
|
1660
|
-
let a = e[i], o =
|
|
1661
|
-
o !== "" && (
|
|
1662
|
-
property:
|
|
1660
|
+
let a = e[i], o = rn(i, a);
|
|
1661
|
+
o !== "" && (on.has(i) ? (t.push(dn(i, o)), un(i, a) || (n = !1)) : r.push({
|
|
1662
|
+
property: an(i),
|
|
1663
1663
|
value: o
|
|
1664
1664
|
}));
|
|
1665
1665
|
}
|
|
@@ -1667,7 +1667,7 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1667
1667
|
property: "transform",
|
|
1668
1668
|
value: n ? "none" : t.join(" ")
|
|
1669
1669
|
}), r;
|
|
1670
|
-
},
|
|
1670
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), mn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1671
1671
|
linear: "linear",
|
|
1672
1672
|
easeIn: "ease-in",
|
|
1673
1673
|
easeOut: "ease-out",
|
|
@@ -1677,29 +1677,29 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1677
1677
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1678
1678
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1679
1679
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1680
|
-
}[e] ?? "ease" : "ease",
|
|
1680
|
+
}[e] ?? "ease" : "ease", hn = (e, t) => {
|
|
1681
1681
|
let [n, r] = t.split("-");
|
|
1682
1682
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1683
|
-
},
|
|
1683
|
+
}, gn = (e, t) => {
|
|
1684
1684
|
let [n, r] = t.split("-");
|
|
1685
1685
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1686
|
-
},
|
|
1686
|
+
}, _n = (e, t) => {
|
|
1687
1687
|
let [n, r] = t.split("-");
|
|
1688
1688
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1689
|
-
},
|
|
1689
|
+
}, vn = (e, t) => {
|
|
1690
1690
|
let [n, r] = t.split("-");
|
|
1691
1691
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1692
|
-
},
|
|
1693
|
-
let o =
|
|
1692
|
+
}, yn = (e, t, n) => `flemo-${e}-${$t(t)}-${n}`, bn = (e, t, n, r, i, a) => {
|
|
1693
|
+
let o = pn(r), s = pn(i.value), c = Yt(i.options), l = Xt(i.options), u = mn(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${_n(t, n)}` : d;
|
|
1694
1694
|
if (s.length === 0 && o.length === 0) return "";
|
|
1695
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1696
|
-
let p =
|
|
1695
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${V(s)}\n animation: none;\n}`;
|
|
1696
|
+
let p = yn(e, t, n), m = [
|
|
1697
1697
|
`@keyframes ${p} {`,
|
|
1698
1698
|
" from {",
|
|
1699
|
-
|
|
1699
|
+
V(o).replace(/^/gm, " "),
|
|
1700
1700
|
" }",
|
|
1701
1701
|
" to {",
|
|
1702
|
-
|
|
1702
|
+
V(s).replace(/^/gm, " "),
|
|
1703
1703
|
" }",
|
|
1704
1704
|
"}"
|
|
1705
1705
|
].join("\n"), h = [
|
|
@@ -1713,65 +1713,65 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1713
1713
|
let t = g(n);
|
|
1714
1714
|
if (t <= 0 || c <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1715
1715
|
let r = c + t, i = (t / r * 100).toFixed(3), a = `${p}-lpm`, u = f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n");
|
|
1716
|
-
return `\n@keyframes ${a} {\n 0%, ${i}% {\n${
|
|
1716
|
+
return `\n@keyframes ${a} {\n 0%, ${i}% {\n${V(o).replace(/^/gm, " ")}\n }\n 100% {\n${V(s).replace(/^/gm, " ")}\n }\n}\n${u} {\n animation-name: ${a};\n animation-duration: ${r.toFixed(3)}s;\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1717
1717
|
})(), v = (() => {
|
|
1718
1718
|
if (e !== "part") return "";
|
|
1719
1719
|
let t = g(n);
|
|
1720
1720
|
return t <= 0 || c <= 0 ? "" : `\n${f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n")} {\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1721
1721
|
})(), y = new Map(o.map((e) => [e.property, e.value])), b = new Map(s.map((e) => [e.property, e.value])), x = Array.from(/* @__PURE__ */ new Set([...y.keys(), ...b.keys()])).filter((e) => y.get(e) !== b.get(e)), S = x.length > 0 ? ` will-change: ${x.join(", ")};\n` : "", C = n.split("-")[0];
|
|
1722
|
-
return `${m}\n${`${f} {\n animation: ${h};\n${S}${C === "PUSHING" || C === "REPLACING" ? " contain: layout;\n" : ""}}`}${_}${v}${e === "screen" && n.endsWith("-false") &&
|
|
1723
|
-
},
|
|
1722
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${S}${C === "PUSHING" || C === "REPLACING" ? " contain: layout;\n" : ""}}`}${_}${v}${e === "screen" && n.endsWith("-false") && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1723
|
+
}, xn = (e) => {
|
|
1724
1724
|
if (!e) return !1;
|
|
1725
1725
|
if (e.opacity === 0) return !0;
|
|
1726
1726
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1727
1727
|
return t(e.x) || t(e.y);
|
|
1728
|
-
},
|
|
1729
|
-
let i =
|
|
1730
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1731
|
-
},
|
|
1728
|
+
}, Sn = (e, t, n, r) => {
|
|
1729
|
+
let i = pn(r.value);
|
|
1730
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1731
|
+
}, Cn = (e, t, n = []) => {
|
|
1732
1732
|
let r = [];
|
|
1733
1733
|
for (let t of e) {
|
|
1734
1734
|
let e = t.name;
|
|
1735
|
-
for (let n of
|
|
1736
|
-
let i = t.variants[n], a =
|
|
1735
|
+
for (let n of Jt) {
|
|
1736
|
+
let i = t.variants[n], a = qt[n];
|
|
1737
1737
|
if (a === "self") {
|
|
1738
|
-
r.push(
|
|
1738
|
+
r.push(Sn(hn, e, n, i));
|
|
1739
1739
|
continue;
|
|
1740
1740
|
}
|
|
1741
1741
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1742
|
-
r.push(
|
|
1742
|
+
r.push(bn("screen", e, n, o, i, hn));
|
|
1743
1743
|
}
|
|
1744
1744
|
}
|
|
1745
1745
|
for (let e of t) {
|
|
1746
1746
|
let t = e.name;
|
|
1747
|
-
for (let n of
|
|
1748
|
-
let i = e.variants[n], a =
|
|
1747
|
+
for (let n of Qt) {
|
|
1748
|
+
let i = e.variants[n], a = qt[n];
|
|
1749
1749
|
if (a === "self") {
|
|
1750
|
-
r.push(
|
|
1750
|
+
r.push(Sn(gn, t, n, i));
|
|
1751
1751
|
continue;
|
|
1752
1752
|
}
|
|
1753
1753
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1754
|
-
r.push(
|
|
1754
|
+
r.push(bn("decorator", t, n, o, i, gn));
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
for (let e of n) {
|
|
1758
1758
|
let t = e.name;
|
|
1759
|
-
for (let n of
|
|
1760
|
-
let i = e.variants[n], a =
|
|
1759
|
+
for (let n of Qt) {
|
|
1760
|
+
let i = e.variants[n], a = qt[n];
|
|
1761
1761
|
if (a === "self") {
|
|
1762
|
-
r.push(
|
|
1762
|
+
r.push(Sn(vn, t, n, i));
|
|
1763
1763
|
continue;
|
|
1764
1764
|
}
|
|
1765
1765
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1766
|
-
r.push(
|
|
1766
|
+
r.push(bn("part", t, n, o, i, vn));
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
1769
|
return [
|
|
1770
1770
|
...r.filter((e) => e.length > 0),
|
|
1771
|
-
|
|
1772
|
-
|
|
1771
|
+
wn,
|
|
1772
|
+
Tn
|
|
1773
1773
|
].join("\n\n");
|
|
1774
|
-
},
|
|
1774
|
+
}, wn = [
|
|
1775
1775
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1776
1776
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1777
1777
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1782,49 +1782,49 @@ var B = /* @__PURE__ */ new Map(), Gt = {
|
|
|
1782
1782
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1783
1783
|
" animation-play-state: paused !important;",
|
|
1784
1784
|
"}"
|
|
1785
|
-
].join("\n"),
|
|
1785
|
+
].join("\n"), Tn = [
|
|
1786
1786
|
"[data-flemo-held-arrival] {",
|
|
1787
1787
|
" display: none !important;",
|
|
1788
1788
|
"}"
|
|
1789
|
-
].join("\n"),
|
|
1790
|
-
let n =
|
|
1789
|
+
].join("\n"), H = (e, t) => {
|
|
1790
|
+
let n = qt[t];
|
|
1791
1791
|
if (n === "self") return !1;
|
|
1792
|
-
let r = e.variants[t], i =
|
|
1792
|
+
let r = e.variants[t], i = Yt(r.options), a = Xt(r.options);
|
|
1793
1793
|
if (i <= 0 && a <= 0) return !1;
|
|
1794
|
-
let o =
|
|
1794
|
+
let o = pn(n === "initial" ? e.initial : e.variants[n].value), s = pn(r.value);
|
|
1795
1795
|
return o.length > 0 || s.length > 0;
|
|
1796
|
-
},
|
|
1796
|
+
}, En = {
|
|
1797
1797
|
REPLACING: 180,
|
|
1798
1798
|
PUSHING: 100,
|
|
1799
1799
|
POPPING: 80
|
|
1800
|
-
},
|
|
1801
|
-
function
|
|
1800
|
+
}, Dn = "data-flemo";
|
|
1801
|
+
function On() {
|
|
1802
1802
|
if (f()) return;
|
|
1803
|
-
let e =
|
|
1804
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1803
|
+
let e = Cn(Bt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${Dn}]`);
|
|
1804
|
+
t || (t = document.createElement("style"), t.setAttribute(Dn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1805
1805
|
}
|
|
1806
1806
|
//#endregion
|
|
1807
1807
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1808
|
-
var
|
|
1808
|
+
var kn = /* @__PURE__ */ new Map(), An = /* @__PURE__ */ new Map(), jn = /* @__PURE__ */ new Map(), Mn = (e, t) => {
|
|
1809
1809
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1810
|
-
},
|
|
1810
|
+
}, Nn = (e, t) => {
|
|
1811
1811
|
let n = (e.get(t) ?? 1) - 1;
|
|
1812
1812
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1813
1813
|
};
|
|
1814
|
-
function
|
|
1815
|
-
for (let t of e)
|
|
1816
|
-
for (let e of t)
|
|
1817
|
-
for (let e of n)
|
|
1818
|
-
return
|
|
1819
|
-
for (let t of e)
|
|
1820
|
-
for (let e of t)
|
|
1821
|
-
for (let e of n) jn
|
|
1822
|
-
|
|
1814
|
+
function Pn(e, t, n = []) {
|
|
1815
|
+
for (let t of e) Bt.set(t.name, t), Mn(kn, t.name);
|
|
1816
|
+
for (let e of t) R.set(e.name, e), Mn(An, e.name);
|
|
1817
|
+
for (let e of n) z.set(e.name, e), Mn(jn, e.name);
|
|
1818
|
+
return On(), () => {
|
|
1819
|
+
for (let t of e) Nn(kn, t.name) && Bt.delete(t.name);
|
|
1820
|
+
for (let e of t) Nn(An, e.name) && R.delete(e.name);
|
|
1821
|
+
for (let e of n) Nn(jn, e.name) && z.delete(e.name);
|
|
1822
|
+
On();
|
|
1823
1823
|
};
|
|
1824
1824
|
}
|
|
1825
1825
|
//#endregion
|
|
1826
1826
|
//#region src/transition/enteringInitialStyle.ts
|
|
1827
|
-
function
|
|
1827
|
+
function Fn(e) {
|
|
1828
1828
|
let { initial: t, isActive: n, status: r } = e;
|
|
1829
1829
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1830
1830
|
let i = {};
|
|
@@ -1832,10 +1832,10 @@ function Nn(e) {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
//#endregion
|
|
1834
1834
|
//#region src/transition/settleScrub.ts
|
|
1835
|
-
var
|
|
1835
|
+
var In = () => ({
|
|
1836
1836
|
request: (e) => requestAnimationFrame(e),
|
|
1837
1837
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1838
|
-
}),
|
|
1838
|
+
}), Ln = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Rn = ((e = In()) => {
|
|
1839
1839
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1840
1840
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1841
1841
|
}, i = (e, n) => {
|
|
@@ -1868,7 +1868,7 @@ var Pn = () => ({
|
|
|
1868
1868
|
if (typeof r.animate != "function") return null;
|
|
1869
1869
|
i(r, "current");
|
|
1870
1870
|
let u = {};
|
|
1871
|
-
for (let e of o) u[
|
|
1871
|
+
for (let e of o) u[Ln(e.property)] = e.value;
|
|
1872
1872
|
let d;
|
|
1873
1873
|
try {
|
|
1874
1874
|
d = r.animate([u], {
|
|
@@ -1905,18 +1905,18 @@ var Pn = () => ({
|
|
|
1905
1905
|
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1906
1906
|
}
|
|
1907
1907
|
};
|
|
1908
|
-
})(),
|
|
1909
|
-
let r =
|
|
1910
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
1908
|
+
})(), zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @__PURE__ */ new WeakMap(), Vn = Symbol("flemo-inline-writer"), Hn = /* @__PURE__ */ new WeakMap(), U = (e, t, n = Vn) => {
|
|
1909
|
+
let r = Bn.get(e);
|
|
1910
|
+
r || (r = /* @__PURE__ */ new Map(), Bn.set(e, r));
|
|
1911
1911
|
let i = r.get(t);
|
|
1912
1912
|
i || (i = {
|
|
1913
1913
|
original: e.style.getPropertyValue(t),
|
|
1914
1914
|
owners: /* @__PURE__ */ new Set()
|
|
1915
1915
|
}, r.set(t, i)), i.owners.add(n);
|
|
1916
|
-
},
|
|
1917
|
-
|
|
1918
|
-
let r =
|
|
1919
|
-
(!n ||
|
|
1916
|
+
}, W = (e, t, n) => {
|
|
1917
|
+
Rn.cancel(e, n);
|
|
1918
|
+
let r = Bn.get(e);
|
|
1919
|
+
(!n || Hn.get(e) === n) && (e.style.transition = "", Hn.delete(e));
|
|
1920
1920
|
let i = (t) => {
|
|
1921
1921
|
let i = r?.get(t);
|
|
1922
1922
|
if (!i) {
|
|
@@ -1934,27 +1934,27 @@ var Pn = () => ({
|
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
1936
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1937
|
-
},
|
|
1938
|
-
if (!
|
|
1939
|
-
let i = e, a =
|
|
1937
|
+
}, Un = (e, t, n = {}, r) => {
|
|
1938
|
+
if (!zn(e)) return Promise.resolve();
|
|
1939
|
+
let i = e, a = pn(t);
|
|
1940
1940
|
if (a.length === 0) return Promise.resolve();
|
|
1941
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1941
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = mn(n.ease);
|
|
1942
1942
|
if (o <= 0 && s <= 0) {
|
|
1943
|
-
|
|
1944
|
-
for (let e of a)
|
|
1943
|
+
Rn.takeover(i, r), i.style.transition = "none", Hn.set(i, r);
|
|
1944
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1945
1945
|
return Promise.resolve();
|
|
1946
1946
|
}
|
|
1947
|
-
let l =
|
|
1947
|
+
let l = be.playerAllowed() ? Rn.settle(i, a, {
|
|
1948
1948
|
durationMs: o * 1e3,
|
|
1949
1949
|
delayMs: s * 1e3,
|
|
1950
1950
|
easing: c
|
|
1951
1951
|
}, (e) => {
|
|
1952
|
-
|
|
1952
|
+
U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1953
1953
|
}, r) : null;
|
|
1954
1954
|
if (l) return l;
|
|
1955
1955
|
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1956
|
-
i.style.transition = u,
|
|
1957
|
-
for (let e of a)
|
|
1956
|
+
i.style.transition = u, Hn.set(i, r), i.offsetWidth;
|
|
1957
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1958
1958
|
return new Promise((e) => {
|
|
1959
1959
|
let t = !1, n = () => {
|
|
1960
1960
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1963,65 +1963,65 @@ var Pn = () => ({
|
|
|
1963
1963
|
};
|
|
1964
1964
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1965
1965
|
});
|
|
1966
|
-
},
|
|
1966
|
+
}, Wn = (e) => {
|
|
1967
1967
|
if (typeof e.querySelectorAll == "function") {
|
|
1968
1968
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1969
1969
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1970
1970
|
}
|
|
1971
|
-
},
|
|
1972
|
-
function
|
|
1973
|
-
let e =
|
|
1974
|
-
if (
|
|
1971
|
+
}, Gn = 0, Kn = [], qn = [];
|
|
1972
|
+
function Jn() {
|
|
1973
|
+
let e = Gn === 0;
|
|
1974
|
+
if (Gn += 1, e) for (let e of qn) e();
|
|
1975
1975
|
let t = !1;
|
|
1976
1976
|
return () => {
|
|
1977
|
-
if (t || (t = !0, --
|
|
1978
|
-
let e =
|
|
1979
|
-
|
|
1977
|
+
if (t || (t = !0, --Gn, Gn > 0)) return;
|
|
1978
|
+
let e = Kn;
|
|
1979
|
+
Kn = [];
|
|
1980
1980
|
for (let t of e) t();
|
|
1981
1981
|
};
|
|
1982
1982
|
}
|
|
1983
|
-
var
|
|
1984
|
-
function
|
|
1985
|
-
return
|
|
1986
|
-
|
|
1983
|
+
var Yn = () => Gn > 0;
|
|
1984
|
+
function Xn(e) {
|
|
1985
|
+
return qn.push(e), () => {
|
|
1986
|
+
qn = qn.filter((t) => t !== e);
|
|
1987
1987
|
};
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1990
|
-
|
|
1989
|
+
function Zn(e) {
|
|
1990
|
+
Gn === 0 ? e() : Kn.push(e);
|
|
1991
1991
|
}
|
|
1992
1992
|
//#endregion
|
|
1993
1993
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1994
|
-
var
|
|
1994
|
+
var Qn = 8, $n = 2, G = 96, er = 15e3, tr = 3e3, nr = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", K = "data-flemo-image-src", rr = "flemo-image-scale-v1", ir = /* @__PURE__ */ new Set([
|
|
1995
1995
|
"PUSHING",
|
|
1996
1996
|
"POPPING",
|
|
1997
1997
|
"REPLACING"
|
|
1998
|
-
]),
|
|
1998
|
+
]), ar = (e) => {
|
|
1999
1999
|
let t = e.closest("[data-flemo-screen]");
|
|
2000
|
-
return !!t &&
|
|
2001
|
-
},
|
|
2000
|
+
return !!t && ir.has(t.getAttribute("data-flemo-status") ?? "");
|
|
2001
|
+
}, or = (e) => {
|
|
2002
2002
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2003
2003
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2004
2004
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2005
|
-
},
|
|
2005
|
+
}, sr = "onmessage = async (e) => {\n const { url, targetWidth, neededArea, ratio } = e.data;\n try {\n const response = await fetch(url);\n if (!response.ok) throw new Error(\"http \" + response.status);\n const blob = await response.blob();\n const full = await createImageBitmap(blob);\n if (full.width * full.height <= neededArea * ratio) {\n full.close();\n postMessage({ url, skip: true });\n return;\n }\n const scale = targetWidth / full.width;\n const canvas = new OffscreenCanvas(targetWidth, Math.max(1, Math.round(full.height * scale)));\n const context = canvas.getContext(\"2d\");\n context.imageSmoothingQuality = \"high\";\n context.drawImage(full, 0, 0, canvas.width, canvas.height);\n full.close();\n const out = await canvas.convertToBlob({ type: \"image/jpeg\", quality: 0.85 });\n postMessage({ url, blob: out });\n } catch (error) {\n postMessage({ url, error: String(error) });\n }\n};", cr = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", lr = async (e, t) => {
|
|
2006
2006
|
try {
|
|
2007
2007
|
if (typeof caches > "u") return;
|
|
2008
|
-
await (await caches.open(
|
|
2008
|
+
await (await caches.open(rr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2009
2009
|
} catch {}
|
|
2010
|
-
},
|
|
2010
|
+
}, ur = async (e) => {
|
|
2011
2011
|
try {
|
|
2012
2012
|
if (typeof caches > "u") return null;
|
|
2013
|
-
let t = await (await caches.open(
|
|
2013
|
+
let t = await (await caches.open(rr)).match(e);
|
|
2014
2014
|
return t ? await t.blob() : null;
|
|
2015
2015
|
} catch {
|
|
2016
2016
|
return null;
|
|
2017
2017
|
}
|
|
2018
2018
|
};
|
|
2019
|
-
function
|
|
2020
|
-
if (!
|
|
2019
|
+
function dr(e) {
|
|
2020
|
+
if (!cr()) return () => {};
|
|
2021
2021
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = (e) => !!e && e !== "skip" && e !== "opaque", a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new Set(), u = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, d = () => {
|
|
2022
2022
|
if (t) return t;
|
|
2023
2023
|
try {
|
|
2024
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
2024
|
+
t = new Worker(URL.createObjectURL(new Blob([sr])));
|
|
2025
2025
|
} catch {
|
|
2026
2026
|
return null;
|
|
2027
2027
|
}
|
|
@@ -2036,7 +2036,7 @@ function lr(e) {
|
|
|
2036
2036
|
return;
|
|
2037
2037
|
}
|
|
2038
2038
|
let a = URL.createObjectURL(n);
|
|
2039
|
-
l.add(a),
|
|
2039
|
+
l.add(a), lr(t, n), f(t, a);
|
|
2040
2040
|
}, t;
|
|
2041
2041
|
}, f = (e, t) => {
|
|
2042
2042
|
r.has(e) || r.set(e, t);
|
|
@@ -2045,21 +2045,21 @@ function lr(e) {
|
|
|
2045
2045
|
let n = () => {
|
|
2046
2046
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2047
2047
|
};
|
|
2048
|
-
if (!
|
|
2048
|
+
if (!Yn()) {
|
|
2049
2049
|
n();
|
|
2050
2050
|
return;
|
|
2051
2051
|
}
|
|
2052
2052
|
let r = !1, i = () => {
|
|
2053
2053
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2054
|
-
}, o = setTimeout(i,
|
|
2055
|
-
a.add(i),
|
|
2054
|
+
}, o = setTimeout(i, tr);
|
|
2055
|
+
a.add(i), Zn(i);
|
|
2056
2056
|
}, m = (e, t) => {
|
|
2057
2057
|
let n = () => {
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2058
|
+
if (Yn()) {
|
|
2059
|
+
Zn(t);
|
|
2060
2060
|
return;
|
|
2061
2061
|
}
|
|
2062
|
-
if (!
|
|
2062
|
+
if (!ar(e) || typeof requestAnimationFrame != "function") {
|
|
2063
2063
|
t();
|
|
2064
2064
|
return;
|
|
2065
2065
|
}
|
|
@@ -2071,10 +2071,10 @@ function lr(e) {
|
|
|
2071
2071
|
e.style.visibility = "hidden";
|
|
2072
2072
|
let r = !1, i = () => {
|
|
2073
2073
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2074
|
-
}, o = setTimeout(i,
|
|
2074
|
+
}, o = setTimeout(i, tr);
|
|
2075
2075
|
a.add(i), m(e, i);
|
|
2076
|
-
}, g = (e, t) => !
|
|
2077
|
-
e.setAttribute(
|
|
2076
|
+
}, g = (e, t) => !Yn() && !ar(e) ? !1 : (e.setAttribute(K, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2077
|
+
e.setAttribute(K, t), e.src = a, h(e, () => {
|
|
2078
2078
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2079
2079
|
if (n) return;
|
|
2080
2080
|
let a = r.get(t);
|
|
@@ -2085,12 +2085,12 @@ function lr(e) {
|
|
|
2085
2085
|
if (n) {
|
|
2086
2086
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2087
2087
|
if (i(t)) {
|
|
2088
|
-
e.setAttribute(
|
|
2088
|
+
e.setAttribute(K, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2089
2089
|
let r = e.closest("picture");
|
|
2090
2090
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2091
2091
|
e.src = t;
|
|
2092
2092
|
}
|
|
2093
|
-
} else e.getAttribute("src") ===
|
|
2093
|
+
} else e.getAttribute("src") === nr && (i(t) ? e.src = t : (e.removeAttribute(K), e.src = n.url));
|
|
2094
2094
|
p(e, n.previousVisibility);
|
|
2095
2095
|
}
|
|
2096
2096
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2099,14 +2099,14 @@ function lr(e) {
|
|
|
2099
2099
|
y.clear();
|
|
2100
2100
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2101
2101
|
}, S = () => {
|
|
2102
|
-
b || (b = !0,
|
|
2102
|
+
b || (b = !0, Zn(() => {
|
|
2103
2103
|
if (n) return;
|
|
2104
2104
|
let e = globalThis.requestIdleCallback;
|
|
2105
2105
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2106
2106
|
}));
|
|
2107
2107
|
}, C = (e, t, n) => {
|
|
2108
2108
|
if (r.has(e) || o.has(e)) return;
|
|
2109
|
-
if (
|
|
2109
|
+
if (Yn() && N()) {
|
|
2110
2110
|
y.has(e) || y.set(e, {
|
|
2111
2111
|
boxWidth: t,
|
|
2112
2112
|
boxHeight: n
|
|
@@ -2116,28 +2116,28 @@ function lr(e) {
|
|
|
2116
2116
|
let i = d();
|
|
2117
2117
|
if (!i) return;
|
|
2118
2118
|
o.add(e);
|
|
2119
|
-
let a = Math.round(Math.max(
|
|
2119
|
+
let a = Math.round(Math.max(G, t * u()) * $n), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2120
2120
|
i.postMessage({
|
|
2121
2121
|
url: e,
|
|
2122
2122
|
targetWidth: a,
|
|
2123
2123
|
neededArea: s,
|
|
2124
2124
|
ratio: 8
|
|
2125
2125
|
});
|
|
2126
|
-
}, w =
|
|
2127
|
-
if (
|
|
2126
|
+
}, w = Xn(() => {
|
|
2127
|
+
if (N() && !(!t || o.size === 0)) {
|
|
2128
2128
|
t.terminate(), t = null;
|
|
2129
2129
|
for (let e of o) {
|
|
2130
2130
|
if (y.has(e)) continue;
|
|
2131
2131
|
let t = {
|
|
2132
|
-
boxWidth:
|
|
2133
|
-
boxHeight:
|
|
2132
|
+
boxWidth: G,
|
|
2133
|
+
boxHeight: G
|
|
2134
2134
|
};
|
|
2135
2135
|
for (let [n, r] of s) {
|
|
2136
2136
|
if (r.url !== e) continue;
|
|
2137
2137
|
let i = n.getBoundingClientRect();
|
|
2138
2138
|
t = {
|
|
2139
|
-
boxWidth: i.width ||
|
|
2140
|
-
boxHeight: i.height ||
|
|
2139
|
+
boxWidth: i.width || G,
|
|
2140
|
+
boxHeight: i.height || G
|
|
2141
2141
|
};
|
|
2142
2142
|
break;
|
|
2143
2143
|
}
|
|
@@ -2151,17 +2151,17 @@ function lr(e) {
|
|
|
2151
2151
|
let a = {
|
|
2152
2152
|
url: "",
|
|
2153
2153
|
previousVisibility: e.style.visibility,
|
|
2154
|
-
timeout: setTimeout(() => v(e, null),
|
|
2154
|
+
timeout: setTimeout(() => v(e, null), er),
|
|
2155
2155
|
responsive: !0
|
|
2156
2156
|
}, o = () => {
|
|
2157
2157
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2158
2158
|
here, so the final fallback arm is unreachable. */
|
|
2159
2159
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2160
|
-
if (!(/^https?:/.test(t) &&
|
|
2160
|
+
if (!(/^https?:/.test(t) && or({
|
|
2161
2161
|
naturalWidth: e.naturalWidth,
|
|
2162
2162
|
naturalHeight: e.naturalHeight,
|
|
2163
|
-
boxWidth: i.width ||
|
|
2164
|
-
boxHeight: i.height ||
|
|
2163
|
+
boxWidth: i.width || G,
|
|
2164
|
+
boxHeight: i.height || G,
|
|
2165
2165
|
devicePixelRatio: u()
|
|
2166
2166
|
}))) {
|
|
2167
2167
|
v(e, null);
|
|
@@ -2173,7 +2173,7 @@ function lr(e) {
|
|
|
2173
2173
|
v(e, o);
|
|
2174
2174
|
return;
|
|
2175
2175
|
}
|
|
2176
|
-
|
|
2176
|
+
ur(t).then((a) => {
|
|
2177
2177
|
if (!(n || !s.has(e))) {
|
|
2178
2178
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2179
2179
|
releases every held element of the url first, so a still-held
|
|
@@ -2189,7 +2189,7 @@ function lr(e) {
|
|
|
2189
2189
|
l.add(e), f(t, e);
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
2192
|
-
C(t, i.width ||
|
|
2192
|
+
C(t, i.width || G, i.height || G);
|
|
2193
2193
|
}
|
|
2194
2194
|
});
|
|
2195
2195
|
};
|
|
@@ -2212,20 +2212,20 @@ function lr(e) {
|
|
|
2212
2212
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2213
2213
|
if (!t) {
|
|
2214
2214
|
let t = e.getBoundingClientRect();
|
|
2215
|
-
C(a, t.width ||
|
|
2215
|
+
C(a, t.width || G, t.height || G);
|
|
2216
2216
|
return;
|
|
2217
2217
|
}
|
|
2218
2218
|
let n = e.getBoundingClientRect();
|
|
2219
|
-
if (!
|
|
2219
|
+
if (!or({
|
|
2220
2220
|
naturalWidth: e.naturalWidth,
|
|
2221
2221
|
naturalHeight: e.naturalHeight,
|
|
2222
|
-
boxWidth: n.width ||
|
|
2223
|
-
boxHeight: n.height ||
|
|
2222
|
+
boxWidth: n.width || G,
|
|
2223
|
+
boxHeight: n.height || G,
|
|
2224
2224
|
devicePixelRatio: u()
|
|
2225
2225
|
})) return;
|
|
2226
2226
|
let o = r.get(a);
|
|
2227
2227
|
if (i(o)) {
|
|
2228
|
-
|
|
2228
|
+
Yn() || ar(e) ? _(e, a, o) : (e.setAttribute(K, a), e.src = o);
|
|
2229
2229
|
return;
|
|
2230
2230
|
}
|
|
2231
2231
|
if (o === "opaque") {
|
|
@@ -2241,14 +2241,14 @@ function lr(e) {
|
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
2243
|
if (o) {
|
|
2244
|
-
|
|
2244
|
+
Yn() || ar(e) ? _(e, a, o) : (e.setAttribute(K, a), e.src = o);
|
|
2245
2245
|
return;
|
|
2246
2246
|
}
|
|
2247
2247
|
s.set(e, {
|
|
2248
2248
|
url: a,
|
|
2249
2249
|
previousVisibility: e.style.visibility,
|
|
2250
|
-
timeout: setTimeout(() => v(e, null),
|
|
2251
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
2250
|
+
timeout: setTimeout(() => v(e, null), er)
|
|
2251
|
+
}), e.style.visibility = "hidden", e.setAttribute(K, a), e.src = nr, ur(a).then((t) => {
|
|
2252
2252
|
if (n || r.has(a)) return;
|
|
2253
2253
|
if (t) {
|
|
2254
2254
|
let e = URL.createObjectURL(t);
|
|
@@ -2258,7 +2258,7 @@ function lr(e) {
|
|
|
2258
2258
|
let i = () => {
|
|
2259
2259
|
if (n) return;
|
|
2260
2260
|
let t = e.getBoundingClientRect();
|
|
2261
|
-
C(a, t.width ||
|
|
2261
|
+
C(a, t.width || G, t.height || G);
|
|
2262
2262
|
};
|
|
2263
2263
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2264
2264
|
});
|
|
@@ -2275,21 +2275,21 @@ function lr(e) {
|
|
|
2275
2275
|
let k = (e) => {
|
|
2276
2276
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2277
2277
|
if (n && !n.responsive) {
|
|
2278
|
-
t === n.url && (e.src =
|
|
2278
|
+
t === n.url && (e.src = nr);
|
|
2279
2279
|
return;
|
|
2280
2280
|
}
|
|
2281
|
-
let a = e.getAttribute(
|
|
2281
|
+
let a = e.getAttribute(K);
|
|
2282
2282
|
if (a) if (t === a) {
|
|
2283
2283
|
let t = r.get(a);
|
|
2284
2284
|
i(t) && (e.src = t);
|
|
2285
|
-
} else t !==
|
|
2285
|
+
} else t !== nr && !t.startsWith("blob:") && e.removeAttribute(K);
|
|
2286
2286
|
}, ee = !1, A = new MutationObserver((t) => {
|
|
2287
2287
|
if (!n) {
|
|
2288
|
-
if (
|
|
2288
|
+
if (Yn()) {
|
|
2289
2289
|
if (ee) return;
|
|
2290
|
-
ee = !0,
|
|
2290
|
+
ee = !0, Zn(() => {
|
|
2291
2291
|
if (ee = !1, !n) {
|
|
2292
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
2292
|
+
for (let t of Array.from(e.querySelectorAll(`img[${K}]`))) k(t);
|
|
2293
2293
|
for (let e of [...s.keys()]) k(e);
|
|
2294
2294
|
}
|
|
2295
2295
|
});
|
|
@@ -2311,23 +2311,23 @@ function lr(e) {
|
|
|
2311
2311
|
l.clear();
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
|
-
var
|
|
2315
|
-
function
|
|
2316
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2317
|
-
dispose:
|
|
2314
|
+
var fr = null;
|
|
2315
|
+
function pr() {
|
|
2316
|
+
return typeof document > "u" || !document.body ? () => {} : (fr ? fr.count += 1 : fr = {
|
|
2317
|
+
dispose: dr(document.body),
|
|
2318
2318
|
count: 1
|
|
2319
2319
|
}, () => {
|
|
2320
|
-
|
|
2320
|
+
fr && (--fr.count, fr.count <= 0 && (fr.dispose(), fr = null));
|
|
2321
2321
|
});
|
|
2322
2322
|
}
|
|
2323
2323
|
//#endregion
|
|
2324
2324
|
//#region src/core/engine/arrivalHold.ts
|
|
2325
|
-
var
|
|
2326
|
-
function
|
|
2325
|
+
var mr = "data-flemo-held-arrival";
|
|
2326
|
+
function hr(e) {
|
|
2327
2327
|
if (typeof MutationObserver > "u") return () => {};
|
|
2328
2328
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2329
2329
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2330
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2330
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${mr}], [${K}]`) !== null;
|
|
2331
2331
|
}, s = (e, t, n, r) => e ? n === e.glass ? (e.pendingEcho ? e.pendingEcho = !1 : e.latest = n, e) : (e.latest = n, r(e.glass), e.pendingEcho = !0, e) : n === t ? null : (r(t), {
|
|
2332
2332
|
glass: t,
|
|
2333
2333
|
latest: n,
|
|
@@ -2357,12 +2357,12 @@ function pr(e) {
|
|
|
2357
2357
|
if (i.type === "childList") {
|
|
2358
2358
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2359
2359
|
if (e instanceof Element && t.delete(e)) {
|
|
2360
|
-
e.removeAttribute(
|
|
2360
|
+
e.removeAttribute(mr);
|
|
2361
2361
|
continue;
|
|
2362
2362
|
}
|
|
2363
2363
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2364
2364
|
}
|
|
2365
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2365
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(mr, ""), t.add(e), l(i.target).added.push(e));
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
for (let [e, t] of u) {
|
|
@@ -2397,7 +2397,7 @@ function pr(e) {
|
|
|
2397
2397
|
c.disconnect();
|
|
2398
2398
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2399
2399
|
n.clear();
|
|
2400
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2400
|
+
for (let e of t) e instanceof HTMLElement && Wn(e), e.removeAttribute(mr);
|
|
2401
2401
|
t.clear();
|
|
2402
2402
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2403
2403
|
i.clear();
|
|
@@ -2407,57 +2407,57 @@ function pr(e) {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
//#endregion
|
|
2409
2409
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2410
|
-
var
|
|
2410
|
+
var gr = "data-flemo-warm", _r = 3e3, vr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], yr = {
|
|
2411
2411
|
duration: 500,
|
|
2412
2412
|
iterations: Infinity,
|
|
2413
2413
|
direction: "alternate",
|
|
2414
2414
|
easing: "linear"
|
|
2415
|
-
},
|
|
2416
|
-
|
|
2415
|
+
}, br = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", xr = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==", q = null, Sr = null, J = null, Cr = null, wr = 0, Tr = () => {
|
|
2416
|
+
wr = 0, Cr?.cancel(), Cr = null, J?.remove(), J = null;
|
|
2417
2417
|
};
|
|
2418
|
-
function
|
|
2418
|
+
function Er() {
|
|
2419
2419
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2420
|
-
if (
|
|
2421
|
-
|
|
2420
|
+
if (wr += 1, !J) {
|
|
2421
|
+
J = document.createElement("div"), J.setAttribute(gr, ""), J.setAttribute("aria-hidden", "true"), J.setAttribute("style", br), document.body.appendChild(J);
|
|
2422
2422
|
try {
|
|
2423
|
-
|
|
2423
|
+
Cr = J.animate(vr, yr);
|
|
2424
2424
|
} catch {
|
|
2425
|
-
|
|
2425
|
+
Cr = null;
|
|
2426
2426
|
}
|
|
2427
|
-
if (!
|
|
2428
|
-
|
|
2429
|
-
let e =
|
|
2430
|
-
|
|
2427
|
+
if (!q && rt()) try {
|
|
2428
|
+
q = document.createElement("video"), q.muted = !0, q.loop = !0, q.playsInline = !0, q.setAttribute("aria-hidden", "true"), q.setAttribute("data-flemo-warm-video", ""), q.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), q.src = xr, document.body.appendChild(q), q.play()?.catch?.(() => {});
|
|
2429
|
+
let e = q;
|
|
2430
|
+
Sr = () => {
|
|
2431
2431
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2432
|
-
}, document.addEventListener("visibilitychange",
|
|
2432
|
+
}, document.addEventListener("visibilitychange", Sr);
|
|
2433
2433
|
} catch {
|
|
2434
|
-
|
|
2434
|
+
q = null;
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
let e = !1, t = setTimeout(() => {
|
|
2438
|
-
e || (e = !0, --
|
|
2439
|
-
},
|
|
2438
|
+
e || (e = !0, --wr, wr <= 0 && Tr());
|
|
2439
|
+
}, _r);
|
|
2440
2440
|
return () => {
|
|
2441
|
-
e || (e = !0, clearTimeout(t), --
|
|
2441
|
+
e || (e = !0, clearTimeout(t), --wr, wr <= 0 && Tr());
|
|
2442
2442
|
};
|
|
2443
2443
|
}
|
|
2444
2444
|
//#endregion
|
|
2445
2445
|
//#region src/core/engine/emulationNotice.ts
|
|
2446
|
-
var
|
|
2446
|
+
var Dr = () => {
|
|
2447
2447
|
if (typeof navigator > "u") return !1;
|
|
2448
2448
|
let e = navigator.platform ?? "";
|
|
2449
2449
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2452
|
-
},
|
|
2450
|
+
}, Or = !1, kr = () => {
|
|
2451
|
+
Or || !N() || !Dr() || (Or = !0, console.warn("[flemo] DevTools device emulation detected. The emulated view is composited through an extra scaling pass, so transitions can show text shimmer and settle flashes that do NOT exist in a plain window or on a real device. Judge motion quality outside device emulation."));
|
|
2452
|
+
}, Ar = "data-flemo-img-hold", jr = (e) => !(e.complete && e.naturalWidth > 0), Mr = 4, Nr = (e) => {
|
|
2453
2453
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2454
2454
|
let t = e.getBoundingClientRect(), n = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, r = Math.max(1, t.width * n) * Math.max(1, t.height * n);
|
|
2455
|
-
return e.naturalWidth * e.naturalHeight > r *
|
|
2456
|
-
},
|
|
2457
|
-
function
|
|
2455
|
+
return e.naturalWidth * e.naturalHeight > r * Mr;
|
|
2456
|
+
}, Pr = (e, t) => jr(e) || !t && Nr(e);
|
|
2457
|
+
function Fr(e, t, n = !1) {
|
|
2458
2458
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2459
2459
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2460
|
-
e.getAttribute(
|
|
2460
|
+
e.getAttribute(Ar) === null && (r.has(e) || !Pr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(Ar, "")));
|
|
2461
2461
|
};
|
|
2462
2462
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2463
2463
|
let a = new MutationObserver((e) => {
|
|
@@ -2471,7 +2471,7 @@ function Nr(e, t, n = !1) {
|
|
|
2471
2471
|
let o = !1, s = () => {
|
|
2472
2472
|
if (!o) {
|
|
2473
2473
|
o = !0, a.disconnect();
|
|
2474
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
2474
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(Ar);
|
|
2475
2475
|
r.clear();
|
|
2476
2476
|
}
|
|
2477
2477
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2481,25 +2481,25 @@ function Nr(e, t, n = !1) {
|
|
|
2481
2481
|
}
|
|
2482
2482
|
//#endregion
|
|
2483
2483
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2484
|
-
var
|
|
2484
|
+
var Ir = () => {}, Lr = .004, Rr = (e, t) => {
|
|
2485
2485
|
let n = e.ownerDocument?.defaultView;
|
|
2486
2486
|
if (!n) return !1;
|
|
2487
2487
|
let r = e;
|
|
2488
2488
|
for (; r;) {
|
|
2489
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2489
|
+
if (Number(n.getComputedStyle(r).opacity) <= Lr) return !0;
|
|
2490
2490
|
if (r === t) break;
|
|
2491
2491
|
r = r.parentElement;
|
|
2492
2492
|
}
|
|
2493
2493
|
return !1;
|
|
2494
2494
|
};
|
|
2495
|
-
function
|
|
2496
|
-
if (typeof e.getAnimations != "function") return
|
|
2495
|
+
function zr(e) {
|
|
2496
|
+
if (typeof e.getAnimations != "function") return Ir;
|
|
2497
2497
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2498
2498
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2499
2499
|
if (t.size >= 128) return;
|
|
2500
2500
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2501
2501
|
let r = n.effect?.target;
|
|
2502
|
-
if (r instanceof Element &&
|
|
2502
|
+
if (r instanceof Element && Rr(r, e)) try {
|
|
2503
2503
|
n.pause(), t.add(n);
|
|
2504
2504
|
} catch {}
|
|
2505
2505
|
}
|
|
@@ -2528,7 +2528,7 @@ function Lr(e) {
|
|
|
2528
2528
|
}
|
|
2529
2529
|
//#endregion
|
|
2530
2530
|
//#region src/transition/cubicBezier.ts
|
|
2531
|
-
var
|
|
2531
|
+
var Br = (e, t, n, r) => {
|
|
2532
2532
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
2533
2533
|
return (e) => {
|
|
2534
2534
|
if (e <= 0) return 0;
|
|
@@ -2540,7 +2540,7 @@ var Rr = (e, t, n, r) => {
|
|
|
2540
2540
|
}
|
|
2541
2541
|
return a((t + n) / 2);
|
|
2542
2542
|
};
|
|
2543
|
-
},
|
|
2543
|
+
}, Vr = (e) => e, Hr = {
|
|
2544
2544
|
ease: [
|
|
2545
2545
|
.25,
|
|
2546
2546
|
.1,
|
|
@@ -2595,20 +2595,20 @@ var Rr = (e, t, n, r) => {
|
|
|
2595
2595
|
.66,
|
|
2596
2596
|
-.56
|
|
2597
2597
|
]
|
|
2598
|
-
},
|
|
2598
|
+
}, Ur = (e) => {
|
|
2599
2599
|
if (Array.isArray(e)) {
|
|
2600
2600
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2601
2601
|
let [t, n, r, i] = e;
|
|
2602
|
-
return
|
|
2602
|
+
return Br(t, n, r, i);
|
|
2603
2603
|
}
|
|
2604
|
-
return
|
|
2604
|
+
return Vr;
|
|
2605
2605
|
}
|
|
2606
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2607
|
-
},
|
|
2606
|
+
return typeof e == "string" ? e === "linear" ? Vr : Br(...Hr[e] ?? Hr.ease) : Br(...Hr.ease);
|
|
2607
|
+
}, Wr = 1 / 255, Gr = 400, Kr = 24, qr = /* @__PURE__ */ new Set([
|
|
2608
2608
|
"x",
|
|
2609
2609
|
"y",
|
|
2610
2610
|
"opacity"
|
|
2611
|
-
]),
|
|
2611
|
+
]), Jr = (e, t, n) => {
|
|
2612
2612
|
if (!e || typeof e != "object") return;
|
|
2613
2613
|
let r = e[t];
|
|
2614
2614
|
if (r === void 0) return;
|
|
@@ -2626,7 +2626,7 @@ var Rr = (e, t, n, r) => {
|
|
|
2626
2626
|
return Number.isNaN(e) ? null : e;
|
|
2627
2627
|
}
|
|
2628
2628
|
return null;
|
|
2629
|
-
},
|
|
2629
|
+
}, Yr = (e, t, n) => {
|
|
2630
2630
|
let r = /* @__PURE__ */ new Set();
|
|
2631
2631
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2632
2632
|
if (r.size === 0) return null;
|
|
@@ -2634,28 +2634,28 @@ var Rr = (e, t, n, r) => {
|
|
|
2634
2634
|
for (let a of r) {
|
|
2635
2635
|
let r = e.from && typeof e.from == "object" ? e.from[a] : void 0, o = e.to && typeof e.to == "object" ? e.to[a] : void 0;
|
|
2636
2636
|
if (r !== void 0 && r === o) continue;
|
|
2637
|
-
if (!
|
|
2638
|
-
let s =
|
|
2637
|
+
if (!qr.has(a)) return null;
|
|
2638
|
+
let s = Jr(e.from, a, t), c = Jr(e.to, a, t);
|
|
2639
2639
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2640
2640
|
let l = Math.abs(c - s);
|
|
2641
2641
|
if (l === 0) continue;
|
|
2642
|
-
let u = a === "opacity" ?
|
|
2642
|
+
let u = a === "opacity" ? Wr : 1 / Math.max(1, n);
|
|
2643
2643
|
i = Math.min(i, u / l);
|
|
2644
2644
|
}
|
|
2645
2645
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2646
|
-
},
|
|
2646
|
+
}, Y = (e, t, n) => {
|
|
2647
2647
|
if (e.duration <= 0) return null;
|
|
2648
|
-
let r =
|
|
2648
|
+
let r = Yr(e, t, n);
|
|
2649
2649
|
if (r === null) return null;
|
|
2650
|
-
let i =
|
|
2651
|
-
for (let e =
|
|
2650
|
+
let i = Ur(e.ease), a = Gr;
|
|
2651
|
+
for (let e = Gr; e >= 0 && !(Math.abs(1 - i(e / Gr)) > r); --e) a = e;
|
|
2652
2652
|
if (a === 0) return null;
|
|
2653
|
-
let o = (e.delay + e.duration * (a /
|
|
2654
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2655
|
-
},
|
|
2653
|
+
let o = (e.delay + e.duration * (a / Gr)) * 1e3;
|
|
2654
|
+
return (e.delay + e.duration) * 1e3 - o < Kr ? null : o;
|
|
2655
|
+
}, Xr = 1e3 / 120, Zr = 4, X = 400, Qr = 4, Z = (e) => {
|
|
2656
2656
|
let t = +e.toFixed(5);
|
|
2657
2657
|
return Object.is(t, -0) ? 0 : t;
|
|
2658
|
-
},
|
|
2658
|
+
}, $r = (e, t, n) => {
|
|
2659
2659
|
if (e.duration <= 0) return null;
|
|
2660
2660
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2661
2661
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
@@ -2664,37 +2664,37 @@ var Rr = (e, t, n, r) => {
|
|
|
2664
2664
|
let i = e.from && typeof e.from == "object" ? e.from[n] : void 0, o = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2665
2665
|
if (i !== void 0 && i === o) continue;
|
|
2666
2666
|
if (n !== "x" && n !== "y") return null;
|
|
2667
|
-
let s =
|
|
2667
|
+
let s = Jr(e.from, n, t), c = Jr(e.to, n, t);
|
|
2668
2668
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2669
2669
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2670
2670
|
}
|
|
2671
|
-
if (a <
|
|
2672
|
-
let o =
|
|
2673
|
-
for (let e = 0; e <=
|
|
2674
|
-
let c = e.duration * 1e3 /
|
|
2671
|
+
if (a < Zr) return null;
|
|
2672
|
+
let o = Ur(e.ease), s = Array(401);
|
|
2673
|
+
for (let e = 0; e <= X; e += 1) s[e] = o(e / X);
|
|
2674
|
+
let c = e.duration * 1e3 / X, l = 40 / a * c / Xr, u = X, d = 0;
|
|
2675
2675
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2676
|
-
for (let e = u; e <
|
|
2676
|
+
for (let e = u; e < X; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2677
2677
|
let f = (1 - s[u]) * a;
|
|
2678
2678
|
if (f <= 1) return null;
|
|
2679
2679
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2680
2680
|
let t = 1 - e / a;
|
|
2681
|
-
for (; m <
|
|
2681
|
+
for (; m < X && s[m] < t;) m += 1;
|
|
2682
2682
|
if (m === 0) return 0;
|
|
2683
2683
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2684
|
-
return (m - 1 + i) /
|
|
2684
|
+
return (m - 1 + i) / X * 100;
|
|
2685
2685
|
}, g = h(p), _ = [];
|
|
2686
|
-
for (let e = 0; 100 /
|
|
2686
|
+
for (let e = 0; 100 / X * e < g; e += Qr) _.push(`${Z(s[e])} ${Z(e / X * 100)}%`);
|
|
2687
2687
|
let v = g;
|
|
2688
2688
|
for (let e = p; e >= 2; --e) {
|
|
2689
2689
|
let t = h(e - 1);
|
|
2690
2690
|
if (t > v) {
|
|
2691
|
-
let n =
|
|
2692
|
-
_.push(`${n} ${
|
|
2691
|
+
let n = Z(1 - e / a);
|
|
2692
|
+
_.push(`${n} ${Z(v)}%`, `${n} ${Z(t)}%`);
|
|
2693
2693
|
}
|
|
2694
2694
|
v = t;
|
|
2695
2695
|
}
|
|
2696
|
-
return _.push(`1 ${
|
|
2697
|
-
},
|
|
2696
|
+
return _.push(`1 ${Z(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2697
|
+
}, ei = 12, ti = (e, t, n, r) => {
|
|
2698
2698
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2699
2699
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2700
2700
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2703,24 +2703,24 @@ var Rr = (e, t, n, r) => {
|
|
|
2703
2703
|
let r = e.from && typeof e.from == "object" ? e.from[n] : void 0, a = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2704
2704
|
if (r !== void 0 && r === a) continue;
|
|
2705
2705
|
if (n !== "x" && n !== "y") return null;
|
|
2706
|
-
let s =
|
|
2706
|
+
let s = Jr(e.from, n, t), c = Jr(e.to, n, t);
|
|
2707
2707
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2708
2708
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2709
2709
|
}
|
|
2710
|
-
if (o <
|
|
2711
|
-
let s =
|
|
2712
|
-
for (let e = 0; e <=
|
|
2713
|
-
let l = e.duration * 1e3, u = l /
|
|
2710
|
+
if (o < ei) return null;
|
|
2711
|
+
let s = Ur(e.ease), c = Array(401);
|
|
2712
|
+
for (let e = 0; e <= X; e += 1) c[e] = s(e / X);
|
|
2713
|
+
let l = e.duration * 1e3, u = l / X, d = 1 / o * (u / r), f = X, p = 0;
|
|
2714
2714
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2715
|
-
if (f === 0 || f >=
|
|
2716
|
-
for (let e = f; e <
|
|
2715
|
+
if (f === 0 || f >= X) return null;
|
|
2716
|
+
for (let e = f; e < X; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2717
2717
|
let m = (1 - c[f]) * o;
|
|
2718
|
-
if (m <= 1 || m >
|
|
2719
|
-
let h = f /
|
|
2718
|
+
if (m <= 1 || m > ei) return null;
|
|
2719
|
+
let h = f / X * 100, g = m * r / l * 100;
|
|
2720
2720
|
if (h + g >= 100) return null;
|
|
2721
2721
|
let _ = [];
|
|
2722
|
-
for (let e = 0; e <= f; e +=
|
|
2723
|
-
return _.push(`${
|
|
2722
|
+
for (let e = 0; e <= f; e += Qr) _.push(`${Z(c[e])} ${Z(e / X * 100)}%`);
|
|
2723
|
+
return _.push(`${Z(c[f])} ${Z(h)}%`), _.push(`1 ${Z(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2724
2724
|
};
|
|
2725
2725
|
(() => {
|
|
2726
2726
|
try {
|
|
@@ -2728,12 +2728,12 @@ var Rr = (e, t, n, r) => {
|
|
|
2728
2728
|
/[?&]flemo-layers=resident\b/.test(location.search) ? sessionStorage.setItem("flemo:layers", "resident") : /[?&]flemo-layers=off\b/.test(location.search) && sessionStorage.removeItem("flemo:layers");
|
|
2729
2729
|
} catch {}
|
|
2730
2730
|
})();
|
|
2731
|
-
var
|
|
2731
|
+
var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (e, t) => {
|
|
2732
2732
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2733
|
-
},
|
|
2733
|
+
}, ai = (e, t) => {
|
|
2734
2734
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2735
2735
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2736
|
-
},
|
|
2736
|
+
}, oi = (e, t) => {
|
|
2737
2737
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2738
2738
|
for (let e of t.willChange.split(",")) {
|
|
2739
2739
|
let t = e.trim();
|
|
@@ -2744,13 +2744,13 @@ var ei = /* @__PURE__ */ new WeakMap(), ti = Symbol("flemo-layer-owner"), ni = (
|
|
|
2744
2744
|
e.containment && (r = !0);
|
|
2745
2745
|
}
|
|
2746
2746
|
e.style.willChange = [...n].join(", ");
|
|
2747
|
-
let i =
|
|
2747
|
+
let i = ai(t.contain, r);
|
|
2748
2748
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2749
|
-
},
|
|
2750
|
-
let i =
|
|
2749
|
+
}, si = (e, t, n = !1, r = ri) => {
|
|
2750
|
+
let i = fn(t), a = ni.get(e);
|
|
2751
2751
|
if (i.length === 0) {
|
|
2752
2752
|
if (!a) return;
|
|
2753
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2753
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), ii(e, a), ni.delete(e)) : oi(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), ii(e, a), ni.delete(e));
|
|
2754
2754
|
return;
|
|
2755
2755
|
}
|
|
2756
2756
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2759,18 +2759,18 @@ var ei = /* @__PURE__ */ new WeakMap(), ti = Symbol("flemo-layer-owner"), ni = (
|
|
|
2759
2759
|
willChange: e.style.willChange,
|
|
2760
2760
|
contain: e.style.contain,
|
|
2761
2761
|
pending: null
|
|
2762
|
-
},
|
|
2762
|
+
}, ni.set(e, a)), a.owners.set(r, {
|
|
2763
2763
|
properties: i,
|
|
2764
2764
|
containment: n
|
|
2765
|
-
}), a.settleOwner = null,
|
|
2766
|
-
},
|
|
2767
|
-
let n =
|
|
2765
|
+
}), a.settleOwner = null, oi(e, a);
|
|
2766
|
+
}, Q = (e, t = ri) => {
|
|
2767
|
+
let n = ni.get(e);
|
|
2768
2768
|
if (!(!n || !n.owners.has(t))) {
|
|
2769
2769
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2770
|
-
|
|
2770
|
+
oi(e, n);
|
|
2771
2771
|
return;
|
|
2772
2772
|
}
|
|
2773
|
-
if (
|
|
2773
|
+
if (wt() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2774
2774
|
n.pending != null && clearTimeout(n.pending), n.pending = null, n.settleOwner = null, e.style.willChange = "transform", n.contain ? e.style.contain = n.contain : e.style.removeProperty("contain");
|
|
2775
2775
|
return;
|
|
2776
2776
|
}
|
|
@@ -2778,33 +2778,33 @@ var ei = /* @__PURE__ */ new WeakMap(), ti = Symbol("flemo-layer-owner"), ni = (
|
|
|
2778
2778
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2779
2779
|
the pre-hold behavior. */
|
|
2780
2780
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2781
|
-
|
|
2781
|
+
ii(e, n), ni.delete(e);
|
|
2782
2782
|
return;
|
|
2783
2783
|
}
|
|
2784
|
-
|
|
2784
|
+
ci(e, n);
|
|
2785
2785
|
}
|
|
2786
|
-
},
|
|
2786
|
+
}, ci = (e, t) => {
|
|
2787
2787
|
t.pending = setTimeout(() => {
|
|
2788
|
-
if (t.pending = null,
|
|
2789
|
-
|
|
2790
|
-
|
|
2788
|
+
if (t.pending = null, Yn()) {
|
|
2789
|
+
Zn(() => {
|
|
2790
|
+
ni.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && ci(e, t);
|
|
2791
2791
|
});
|
|
2792
2792
|
return;
|
|
2793
2793
|
}
|
|
2794
|
-
|
|
2794
|
+
ii(e, t), ni.delete(e);
|
|
2795
2795
|
}, 300);
|
|
2796
|
-
},
|
|
2796
|
+
}, li = (e, t, n) => {
|
|
2797
2797
|
let r = e.driver;
|
|
2798
2798
|
return r === "native" || r === "player" ? r : "player";
|
|
2799
|
-
},
|
|
2799
|
+
}, ui = 1e3 / 60 * 2, di = "flemo-", fi = /* @__PURE__ */ new WeakMap(), pi = (e, t, n) => {
|
|
2800
2800
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2801
2801
|
let e = r.animationName;
|
|
2802
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2802
|
+
if (typeof e != "string" || !e.startsWith(di) || r.playState !== "running" || fi.get(r) === n) continue;
|
|
2803
2803
|
let i = r.startTime;
|
|
2804
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2804
|
+
typeof i == "number" && (r.startTime = i + t, fi.set(r, n));
|
|
2805
2805
|
}
|
|
2806
|
-
},
|
|
2807
|
-
function
|
|
2806
|
+
}, mi = /* @__PURE__ */ new WeakSet(), hi = 1e3, gi = 3e3;
|
|
2807
|
+
function _i(e, t, n) {
|
|
2808
2808
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2809
2809
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2810
2810
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2818,7 +2818,7 @@ function gi(e, t, n) {
|
|
|
2818
2818
|
i = !0, m.disconnect();
|
|
2819
2819
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2820
2820
|
let e = t.animationName;
|
|
2821
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2821
|
+
if (typeof e != "string" || !e.startsWith(di) || t.playState !== "running" || mi.has(t)) continue;
|
|
2822
2822
|
let n = t.currentTime;
|
|
2823
2823
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2824
2824
|
try {
|
|
@@ -2826,18 +2826,18 @@ function gi(e, t, n) {
|
|
|
2826
2826
|
} catch {
|
|
2827
2827
|
continue;
|
|
2828
2828
|
}
|
|
2829
|
-
|
|
2829
|
+
mi.add(t), c.push(t);
|
|
2830
2830
|
}
|
|
2831
2831
|
}
|
|
2832
2832
|
if (c.length === 0) return;
|
|
2833
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2834
|
-
let e =
|
|
2833
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, hi));
|
|
2834
|
+
let e = Si(t, () => {
|
|
2835
2835
|
a || n?.();
|
|
2836
2836
|
});
|
|
2837
2837
|
if (l = e, typeof setTimeout == "function") {
|
|
2838
2838
|
let t = setTimeout(() => {
|
|
2839
2839
|
l === e && (l = null), e();
|
|
2840
|
-
},
|
|
2840
|
+
}, gi), n = e;
|
|
2841
2841
|
l = () => {
|
|
2842
2842
|
clearTimeout(t), n();
|
|
2843
2843
|
};
|
|
@@ -2852,16 +2852,16 @@ function gi(e, t, n) {
|
|
|
2852
2852
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2853
2853
|
};
|
|
2854
2854
|
}
|
|
2855
|
-
var
|
|
2856
|
-
function
|
|
2855
|
+
var vi = 150, yi = 4e3, bi = 400;
|
|
2856
|
+
function xi(e, t, n = !0, r = !1) {
|
|
2857
2857
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2858
2858
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2859
2859
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2860
2860
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2861
2861
|
let t = e.animationName;
|
|
2862
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2862
|
+
if (typeof t != "string" || !t.startsWith(di) || e.playState !== "running" || mi.has(e)) continue;
|
|
2863
2863
|
let n = e.currentTime;
|
|
2864
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2864
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (mi.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2865
2865
|
}
|
|
2866
2866
|
if (i.length === 0) return () => {};
|
|
2867
2867
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2874,7 +2874,7 @@ function bi(e, t, n = !0, r = !1) {
|
|
|
2874
2874
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2875
2875
|
let o = (a.get(n) ?? 0) + e;
|
|
2876
2876
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2877
|
-
let s = r +
|
|
2877
|
+
let s = r + yi;
|
|
2878
2878
|
t = Math.max(t, s - o);
|
|
2879
2879
|
}
|
|
2880
2880
|
return t;
|
|
@@ -2882,7 +2882,7 @@ function bi(e, t, n = !0, r = !1) {
|
|
|
2882
2882
|
if (c) return;
|
|
2883
2883
|
if (d === null && (d = e), f !== null) {
|
|
2884
2884
|
let t = e - f;
|
|
2885
|
-
p += Math.min(Math.max(0, t),
|
|
2885
|
+
p += Math.min(Math.max(0, t), ui);
|
|
2886
2886
|
}
|
|
2887
2887
|
if (f = e, !l) {
|
|
2888
2888
|
if (l = !0, r) {
|
|
@@ -2894,7 +2894,7 @@ function bi(e, t, n = !0, r = !1) {
|
|
|
2894
2894
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2895
2895
|
let i = a.get(t) ?? 0;
|
|
2896
2896
|
if (n <= i + 33.333333333333336) continue;
|
|
2897
|
-
let o = n - (i +
|
|
2897
|
+
let o = n - (i + ui);
|
|
2898
2898
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2899
2899
|
}
|
|
2900
2900
|
e > 0 && t?.(e);
|
|
@@ -2908,13 +2908,13 @@ function bi(e, t, n = !0, r = !1) {
|
|
|
2908
2908
|
if (e.playState !== "running") continue;
|
|
2909
2909
|
let t = e.startTime;
|
|
2910
2910
|
if (typeof t == "number") {
|
|
2911
|
-
e.startTime = t +
|
|
2911
|
+
e.startTime = t + yi;
|
|
2912
2912
|
continue;
|
|
2913
2913
|
}
|
|
2914
2914
|
let n = e.timeline?.currentTime;
|
|
2915
|
-
typeof n == "number" && (e.startTime = n +
|
|
2915
|
+
typeof n == "number" && (e.startTime = n + yi);
|
|
2916
2916
|
}
|
|
2917
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2917
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + ui), bi)), o = requestAnimationFrame(h);
|
|
2918
2918
|
return;
|
|
2919
2919
|
}
|
|
2920
2920
|
if (!u) {
|
|
@@ -2937,13 +2937,13 @@ function bi(e, t, n = !0, r = !1) {
|
|
|
2937
2937
|
t?.(g);
|
|
2938
2938
|
return;
|
|
2939
2939
|
}
|
|
2940
|
-
e - d <
|
|
2940
|
+
e - d < vi && (o = requestAnimationFrame(h));
|
|
2941
2941
|
};
|
|
2942
2942
|
return o = requestAnimationFrame(h), () => {
|
|
2943
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2943
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + ui);
|
|
2944
2944
|
};
|
|
2945
2945
|
}
|
|
2946
|
-
function
|
|
2946
|
+
function Si(e, t) {
|
|
2947
2947
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2948
2948
|
exotic embedders. */
|
|
2949
2949
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2952,8 +2952,8 @@ function xi(e, t) {
|
|
|
2952
2952
|
if (r !== null) {
|
|
2953
2953
|
let n = o - r;
|
|
2954
2954
|
if (n > 33.333333333333336) {
|
|
2955
|
-
let r = n -
|
|
2956
|
-
for (let t of e()) t &&
|
|
2955
|
+
let r = n - ui;
|
|
2956
|
+
for (let t of e()) t && pi(t, r, o);
|
|
2957
2957
|
t?.(r);
|
|
2958
2958
|
}
|
|
2959
2959
|
}
|
|
@@ -2964,29 +2964,29 @@ function xi(e, t) {
|
|
|
2964
2964
|
i = !0, cancelAnimationFrame(n);
|
|
2965
2965
|
};
|
|
2966
2966
|
}
|
|
2967
|
-
var
|
|
2968
|
-
function
|
|
2967
|
+
var Ci = /* @__PURE__ */ new WeakMap();
|
|
2968
|
+
function wi(e, t, n, r = !0, i = !1) {
|
|
2969
2969
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2970
|
-
let a =
|
|
2971
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2970
|
+
let a = Ci.get(e);
|
|
2971
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => Ti(e);
|
|
2972
2972
|
let o = null, s = !1, c = !1, l = () => {
|
|
2973
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
2973
|
+
s || c || (s = !0, u.disconnect(), o = xi(t, n, r, i));
|
|
2974
2974
|
}, u = new MutationObserver(() => {
|
|
2975
2975
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2976
2976
|
});
|
|
2977
2977
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2978
2978
|
attributes: !0,
|
|
2979
2979
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
2980
|
-
}),
|
|
2980
|
+
}), Ci.set(e, {
|
|
2981
2981
|
refs: 1,
|
|
2982
2982
|
pendingDrop: null,
|
|
2983
2983
|
dispose: () => {
|
|
2984
|
-
c = !0, u.disconnect(), o?.(),
|
|
2984
|
+
c = !0, u.disconnect(), o?.(), Ci.delete(e);
|
|
2985
2985
|
}
|
|
2986
|
-
}), () =>
|
|
2986
|
+
}), () => Ti(e);
|
|
2987
2987
|
}
|
|
2988
|
-
var
|
|
2989
|
-
let t =
|
|
2988
|
+
var Ti = (e) => {
|
|
2989
|
+
let t = Ci.get(e);
|
|
2990
2990
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2991
2991
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2992
2992
|
if (typeof setTimeout != "function") {
|
|
@@ -2995,36 +2995,36 @@ var wi = (e) => {
|
|
|
2995
2995
|
}
|
|
2996
2996
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2997
2997
|
}
|
|
2998
|
-
},
|
|
2999
|
-
let e =
|
|
3000
|
-
|
|
2998
|
+
}, Ei = !1, Di = 0, Oi = [], ki = () => {
|
|
2999
|
+
let e = Oi;
|
|
3000
|
+
Oi = [];
|
|
3001
3001
|
for (let t of e) t();
|
|
3002
|
-
},
|
|
3003
|
-
if (
|
|
3004
|
-
|
|
3002
|
+
}, Ai = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), ji = () => {
|
|
3003
|
+
if (Ei || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3004
|
+
Ei = !0;
|
|
3005
3005
|
let e = window.fetch.bind(window);
|
|
3006
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
3007
|
-
|
|
3006
|
+
window.fetch = (...t) => e(...t).then((e) => Di <= 0 || Ai(e) ? e : new Promise((t) => {
|
|
3007
|
+
Oi.push(() => t(e));
|
|
3008
3008
|
}), (e) => {
|
|
3009
|
-
if (
|
|
3009
|
+
if (Di <= 0) throw e;
|
|
3010
3010
|
return new Promise((t, n) => {
|
|
3011
|
-
|
|
3011
|
+
Oi.push(() => n(e));
|
|
3012
3012
|
});
|
|
3013
3013
|
});
|
|
3014
|
-
},
|
|
3015
|
-
function
|
|
3014
|
+
}, Mi = 2e3;
|
|
3015
|
+
function Ni(e = Mi) {
|
|
3016
3016
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3017
|
-
if (
|
|
3018
|
-
|
|
3017
|
+
if (ji(), !Ei) return () => {};
|
|
3018
|
+
Di += 1;
|
|
3019
3019
|
let t = !1, n = null, r = () => {
|
|
3020
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
3020
|
+
t || (t = !0, n !== null && clearTimeout(n), Di = Math.max(0, Di - 1), Di === 0 && ki());
|
|
3021
3021
|
};
|
|
3022
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
3022
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(Mi, e))), r;
|
|
3023
3023
|
}
|
|
3024
|
-
|
|
3024
|
+
ji();
|
|
3025
3025
|
//#endregion
|
|
3026
3026
|
//#region src/core/engine/transitionPlayer.ts
|
|
3027
|
-
var
|
|
3027
|
+
var Pi = [
|
|
3028
3028
|
"x",
|
|
3029
3029
|
"y",
|
|
3030
3030
|
"z",
|
|
@@ -3035,7 +3035,7 @@ var Ni = [
|
|
|
3035
3035
|
"rotateX",
|
|
3036
3036
|
"rotateY",
|
|
3037
3037
|
"rotateZ"
|
|
3038
|
-
],
|
|
3038
|
+
], Fi = new Set(Pi), Ii = {
|
|
3039
3039
|
x: 0,
|
|
3040
3040
|
y: 0,
|
|
3041
3041
|
z: 0,
|
|
@@ -3046,7 +3046,7 @@ var Ni = [
|
|
|
3046
3046
|
rotateX: 0,
|
|
3047
3047
|
rotateY: 0,
|
|
3048
3048
|
rotateZ: 0
|
|
3049
|
-
},
|
|
3049
|
+
}, Li = (e, t) => {
|
|
3050
3050
|
if (typeof t == "number") return {
|
|
3051
3051
|
value: t,
|
|
3052
3052
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3065,18 +3065,18 @@ var Ni = [
|
|
|
3065
3065
|
value: i,
|
|
3066
3066
|
unit: a === "" && i === 0 ? "px" : a
|
|
3067
3067
|
};
|
|
3068
|
-
},
|
|
3069
|
-
let n = e.match(
|
|
3070
|
-
if (n.length !== r.length || e.replace(
|
|
3068
|
+
}, Ri = /-?\d*\.?\d+/g, zi = (e, t) => {
|
|
3069
|
+
let n = e.match(Ri) ?? [], r = t.match(Ri) ?? [];
|
|
3070
|
+
if (n.length !== r.length || e.replace(Ri, " ") !== t.replace(Ri, " ")) return null;
|
|
3071
3071
|
let i = n.map(Number), a = r.map(Number);
|
|
3072
3072
|
return (t) => {
|
|
3073
3073
|
let n = 0;
|
|
3074
|
-
return e.replace(
|
|
3074
|
+
return e.replace(Ri, () => {
|
|
3075
3075
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3076
3076
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3077
3077
|
});
|
|
3078
3078
|
};
|
|
3079
|
-
},
|
|
3079
|
+
}, Bi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Vi = (e) => typeof e == "object" && !!e && !Array.isArray(e), Hi = (e) => Vi(e) ? Object.keys(e) : [], Ui = (e, t) => Vi(e) ? e[t] : void 0, Wi = {
|
|
3080
3080
|
x: 0,
|
|
3081
3081
|
y: 0,
|
|
3082
3082
|
z: 0,
|
|
@@ -3087,41 +3087,41 @@ var Ni = [
|
|
|
3087
3087
|
rotateX: 2,
|
|
3088
3088
|
rotateY: 2,
|
|
3089
3089
|
rotateZ: 2
|
|
3090
|
-
},
|
|
3090
|
+
}, Gi = (e) => {
|
|
3091
3091
|
let t = 0, n = -1;
|
|
3092
3092
|
for (let r of e) {
|
|
3093
|
-
if (!
|
|
3094
|
-
let e =
|
|
3093
|
+
if (!Fi.has(r)) continue;
|
|
3094
|
+
let e = Wi[r];
|
|
3095
3095
|
if (e < t) return !1;
|
|
3096
3096
|
if (t = e, e === 2) {
|
|
3097
|
-
let e =
|
|
3097
|
+
let e = Pi.indexOf(r);
|
|
3098
3098
|
if (e < n) return !1;
|
|
3099
3099
|
n = e;
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
3102
3102
|
return !0;
|
|
3103
|
-
},
|
|
3103
|
+
}, Ki = (e) => {
|
|
3104
3104
|
let t = [];
|
|
3105
3105
|
for (let n of e) {
|
|
3106
|
-
if (!
|
|
3107
|
-
let e =
|
|
3106
|
+
if (!Fi.has(n)) continue;
|
|
3107
|
+
let e = Wi[n] === 0 ? "T" : n;
|
|
3108
3108
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3109
3109
|
}
|
|
3110
3110
|
return t;
|
|
3111
|
-
}, Ki = (e, t) => {
|
|
3112
|
-
let n = Gi(e), r = Gi(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3113
|
-
return i.every((e, t) => a[t] === e);
|
|
3114
3111
|
}, qi = (e, t) => {
|
|
3115
|
-
let n =
|
|
3116
|
-
|
|
3112
|
+
let n = Ki(e), r = Ki(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3113
|
+
return i.every((e, t) => a[t] === e);
|
|
3114
|
+
}, Ji = (e, t) => {
|
|
3115
|
+
let n = Hi(e.from), r = Hi(e.to);
|
|
3116
|
+
if (!Gi(n) || !Gi(r) || !qi(n, r)) return null;
|
|
3117
3117
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3118
3118
|
for (let n of i) {
|
|
3119
|
-
let r =
|
|
3120
|
-
if (
|
|
3119
|
+
let r = Ui(e.from, n), i = Ui(e.to, n);
|
|
3120
|
+
if (Fi.has(n)) {
|
|
3121
3121
|
let e = n, o = {
|
|
3122
|
-
value:
|
|
3122
|
+
value: Ii[e],
|
|
3123
3123
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3124
|
-
}, s = r === void 0 ? o :
|
|
3124
|
+
}, s = r === void 0 ? o : Li(e, r), c = i === void 0 ? o : Li(e, i);
|
|
3125
3125
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3126
3126
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3127
3127
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3152,15 +3152,15 @@ var Ni = [
|
|
|
3152
3152
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3153
3153
|
if (l === u) {
|
|
3154
3154
|
c.push({
|
|
3155
|
-
property:
|
|
3155
|
+
property: Bi(n),
|
|
3156
3156
|
value: l
|
|
3157
3157
|
});
|
|
3158
3158
|
continue;
|
|
3159
3159
|
}
|
|
3160
|
-
let d =
|
|
3160
|
+
let d = zi(l, u);
|
|
3161
3161
|
if (!d) return null;
|
|
3162
3162
|
s.push({
|
|
3163
|
-
property:
|
|
3163
|
+
property: Bi(n),
|
|
3164
3164
|
mix: d
|
|
3165
3165
|
});
|
|
3166
3166
|
}
|
|
@@ -3170,26 +3170,26 @@ var Ni = [
|
|
|
3170
3170
|
strings: s,
|
|
3171
3171
|
constants: c
|
|
3172
3172
|
};
|
|
3173
|
-
},
|
|
3174
|
-
if (!
|
|
3173
|
+
}, Yi = 1, Xi = 1e3 / 60, Zi = (e) => !N() && e > 0 && e < 3, Qi = .6, $i = 600, ea = (e, t) => {
|
|
3174
|
+
if (!rt()) return !1;
|
|
3175
3175
|
for (let n of e.transforms) {
|
|
3176
3176
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3177
3177
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3178
3178
|
if (n.from.unit === "%") {
|
|
3179
|
-
if (e / 100 >=
|
|
3180
|
-
} else if (e * Math.max(1, t) >=
|
|
3179
|
+
if (e / 100 >= Qi) return !1;
|
|
3180
|
+
} else if (e * Math.max(1, t) >= $i) return !1;
|
|
3181
3181
|
}
|
|
3182
3182
|
return !0;
|
|
3183
|
-
},
|
|
3183
|
+
}, ta = 12, na = (e, t, n, r, i = Xi) => {
|
|
3184
3184
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3185
|
-
for (let u of
|
|
3185
|
+
for (let u of Pi) {
|
|
3186
3186
|
let d = e.find((e) => e.prop === u);
|
|
3187
3187
|
if (!d) continue;
|
|
3188
3188
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3189
3189
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3190
|
-
let e = u === "x" ? r.x : r.y, t =
|
|
3190
|
+
let e = u === "x" ? r.x : r.y, t = vt(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && Zi(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= bt() : e === null || c * Xi / Math.max(1, i) >= Yi, h = d.to.value;
|
|
3191
3191
|
d.from.unit === "%" && (h *= d.percentBase);
|
|
3192
|
-
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <=
|
|
3192
|
+
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <= ta), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3193
3193
|
if (b) {
|
|
3194
3194
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3195
3195
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3197,42 +3197,42 @@ var Ni = [
|
|
|
3197
3197
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3198
3198
|
continue;
|
|
3199
3199
|
}
|
|
3200
|
-
let p =
|
|
3200
|
+
let p = Ii[u];
|
|
3201
3201
|
f !== p && (l = !1), u === "z" ? c.push(`translateZ(${f}px)`) : u === "scale" ? c.push(`scale(${f})`) : u === "scaleX" ? c.push(`scaleX(${f})`) : u === "scaleY" ? c.push(`scaleY(${f})`) : u === "rotate" || u === "rotateZ" ? c.push(`rotate(${f}deg)`) : u === "rotateX" ? c.push(`rotateX(${f}deg)`) : u === "rotateY" && c.push(`rotateY(${f}deg)`);
|
|
3202
3202
|
}
|
|
3203
3203
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3204
|
-
},
|
|
3204
|
+
}, ra = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ia = (e) => {
|
|
3205
3205
|
let t = {};
|
|
3206
|
-
for (let n of
|
|
3206
|
+
for (let n of pn(e)) t[ra(n.property)] = n.value;
|
|
3207
3207
|
return t;
|
|
3208
|
-
},
|
|
3208
|
+
}, aa = (e, t) => {
|
|
3209
3209
|
if (typeof e.animate != "function") return null;
|
|
3210
3210
|
try {
|
|
3211
|
-
let n = e.animate([
|
|
3211
|
+
let n = e.animate([ia(t.from), ia(t.to)], {
|
|
3212
3212
|
duration: Math.max(0, t.duration * 1e3),
|
|
3213
3213
|
delay: Math.max(0, t.delay * 1e3),
|
|
3214
|
-
easing:
|
|
3214
|
+
easing: mn(t.ease),
|
|
3215
3215
|
fill: "both"
|
|
3216
3216
|
});
|
|
3217
3217
|
return n.pause(), n.currentTime = 0, n;
|
|
3218
3218
|
} catch {
|
|
3219
3219
|
return null;
|
|
3220
3220
|
}
|
|
3221
|
-
},
|
|
3222
|
-
Number.isFinite(e) && (e <
|
|
3223
|
-
},
|
|
3221
|
+
}, oa = 1.6, sa = 1e3 / 600, ca = 28, la = 42, ua = Xi, da = () => ua, fa = (e) => {
|
|
3222
|
+
Number.isFinite(e) && (e < sa || e > la || (ua = Math.min(Xi, Math.max(sa, e))));
|
|
3223
|
+
}, pa = () => ({
|
|
3224
3224
|
request: (e) => requestAnimationFrame(e),
|
|
3225
3225
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3226
3226
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3227
|
-
}),
|
|
3227
|
+
}), ma = ((e = pa()) => {
|
|
3228
3228
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3229
3229
|
join: (n, r) => {
|
|
3230
|
-
let i =
|
|
3230
|
+
let i = mt() === "scrub", s = !i && !N() && gt() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : Ji(r.motion, r.element), l = !c || s ? aa(r.element, r.motion) : null, u = l ? null : c;
|
|
3231
3231
|
if (!u && !l) return null;
|
|
3232
3232
|
let d = t.get(n);
|
|
3233
3233
|
d || (d = {
|
|
3234
3234
|
tracks: [],
|
|
3235
|
-
frameIntervalMs:
|
|
3235
|
+
frameIntervalMs: ua,
|
|
3236
3236
|
recentGaps: [],
|
|
3237
3237
|
navCutMs: null,
|
|
3238
3238
|
navComplete: null,
|
|
@@ -3242,7 +3242,7 @@ var Ni = [
|
|
|
3242
3242
|
lastTime: null,
|
|
3243
3243
|
frameHandle: null
|
|
3244
3244
|
}, t.set(n, d));
|
|
3245
|
-
let f =
|
|
3245
|
+
let f = Y(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
3246
3246
|
...r,
|
|
3247
3247
|
onComplete: void 0,
|
|
3248
3248
|
parsed: u,
|
|
@@ -3256,19 +3256,19 @@ var Ni = [
|
|
|
3256
3256
|
snapMemory: {
|
|
3257
3257
|
x: null,
|
|
3258
3258
|
y: null,
|
|
3259
|
-
glide: u ?
|
|
3259
|
+
glide: u ? ea(u, e.devicePixelRatio() || 1) : !1
|
|
3260
3260
|
}
|
|
3261
3261
|
};
|
|
3262
3262
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3263
3263
|
let m = Symbol("flemo-player-track");
|
|
3264
|
-
if (
|
|
3265
|
-
u.transforms.length > 0 &&
|
|
3266
|
-
for (let e of u.strings)
|
|
3267
|
-
for (let e of u.constants)
|
|
3264
|
+
if (Rn.takeover(p.element), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3265
|
+
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3266
|
+
for (let e of u.strings) U(p.element, e.property, m);
|
|
3267
|
+
for (let e of u.constants) U(p.element, e.property, m);
|
|
3268
3268
|
a(p, 0);
|
|
3269
3269
|
}
|
|
3270
3270
|
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3271
|
-
p.detached = !0, p.scrub?.cancel(),
|
|
3271
|
+
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
3272
3272
|
let r = t.get(n);
|
|
3273
3273
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3274
3274
|
};
|
|
@@ -3283,13 +3283,13 @@ var Ni = [
|
|
|
3283
3283
|
}
|
|
3284
3284
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
3285
3285
|
let t = r.get(e);
|
|
3286
|
-
return t || (t =
|
|
3286
|
+
return t || (t = Ur(e.motion.ease), r.set(e, t)), t;
|
|
3287
3287
|
};
|
|
3288
3288
|
function a(t, n, r) {
|
|
3289
3289
|
let { element: i, parsed: a } = t;
|
|
3290
3290
|
if (!(!a || !i.isConnected)) {
|
|
3291
3291
|
if (a.transforms.length > 0) {
|
|
3292
|
-
let o =
|
|
3292
|
+
let o = na(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3293
3293
|
o !== "" && (i.style.transform = o);
|
|
3294
3294
|
}
|
|
3295
3295
|
if (a.opacity) {
|
|
@@ -3310,10 +3310,10 @@ var Ni = [
|
|
|
3310
3310
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3311
3311
|
let d;
|
|
3312
3312
|
try {
|
|
3313
|
-
d = o.animate([
|
|
3313
|
+
d = o.animate([ia(r.motion.from), ia(r.motion.to)], {
|
|
3314
3314
|
duration: c,
|
|
3315
3315
|
delay: -u,
|
|
3316
|
-
easing:
|
|
3316
|
+
easing: mn(r.motion.ease),
|
|
3317
3317
|
fill: "both"
|
|
3318
3318
|
});
|
|
3319
3319
|
} catch {
|
|
@@ -3327,12 +3327,12 @@ var Ni = [
|
|
|
3327
3327
|
let l = r.startTime ?? c;
|
|
3328
3328
|
if (r.lastTime !== null) {
|
|
3329
3329
|
let e = c - r.lastTime;
|
|
3330
|
-
if (n.onFrameGap?.(e), e >=
|
|
3330
|
+
if (n.onFrameGap?.(e), e >= sa && e <= la) {
|
|
3331
3331
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3332
|
-
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >=
|
|
3333
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3332
|
+
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >= ca);
|
|
3333
|
+
r.frameIntervalMs = Math.min(i ? la : Xi, Math.max(sa, n)), ua = r.frameIntervalMs, n < 12 && tt(n, t[t.length - 1]);
|
|
3334
3334
|
}
|
|
3335
|
-
e >
|
|
3335
|
+
e > oa * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3336
3336
|
}
|
|
3337
3337
|
r.startTime = l, r.lastTime = c;
|
|
3338
3338
|
let u = !0, d = !1;
|
|
@@ -3353,7 +3353,7 @@ var Ni = [
|
|
|
3353
3353
|
continue;
|
|
3354
3354
|
}
|
|
3355
3355
|
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3356
|
-
if (t.handoff && f >=
|
|
3356
|
+
if (t.handoff && f >= St() && f < i && s(e, r, t, a)) {
|
|
3357
3357
|
u = !1;
|
|
3358
3358
|
continue;
|
|
3359
3359
|
}
|
|
@@ -3371,7 +3371,7 @@ var Ni = [
|
|
|
3371
3371
|
}
|
|
3372
3372
|
return n;
|
|
3373
3373
|
})();
|
|
3374
|
-
|
|
3374
|
+
ma.onFrameGap = (e) => {
|
|
3375
3375
|
if (typeof window < "u") {
|
|
3376
3376
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3377
3377
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3379,102 +3379,102 @@ pa.onFrameGap = (e) => {
|
|
|
3379
3379
|
};
|
|
3380
3380
|
//#endregion
|
|
3381
3381
|
//#region src/core/engine/types.ts
|
|
3382
|
-
var
|
|
3382
|
+
var ha = "data-flemo-skip-animation", $ = () => {}, ga = 400, _a = 4, va = 100, ya = 1500, ba = "data-flemo-part-name", xa = /* @__PURE__ */ new WeakMap(), Sa = "data-flemo-anim-hold", Ca = (e) => {
|
|
3383
3383
|
let t = e.parentElement ?? e;
|
|
3384
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3384
|
+
return Array.from(t.querySelectorAll(`[${ba}]`)).filter((n) => {
|
|
3385
3385
|
let r = n.closest("[data-flemo-screen]");
|
|
3386
3386
|
return !r || r === e || !t.contains(r);
|
|
3387
3387
|
});
|
|
3388
|
-
}, Ca = (e, t) => {
|
|
3389
|
-
let [n, r] = t.split("-");
|
|
3390
|
-
return Sa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3391
3388
|
}, wa = (e, t) => {
|
|
3389
|
+
let [n, r] = t.split("-");
|
|
3390
|
+
return Ca(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3391
|
+
}, Ta = (e, t) => {
|
|
3392
3392
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3393
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3393
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ba}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3394
3394
|
if (n === null) return !0;
|
|
3395
3395
|
let t = e.closest("[data-flemo-router]");
|
|
3396
3396
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3397
3397
|
});
|
|
3398
|
-
},
|
|
3398
|
+
}, Ea = (e, t) => Ta(e, t).filter((e) => e.parentElement?.closest(`[${Sa}]`) == null), Da = (e) => {
|
|
3399
3399
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3400
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3401
|
-
if (e.parentElement?.closest(`[${
|
|
3400
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ba}][${Sa}]`)).filter((e) => {
|
|
3401
|
+
if (e.parentElement?.closest(`[${Sa}]`) != null) return !1;
|
|
3402
3402
|
if (t === null) return !0;
|
|
3403
3403
|
let n = e.closest("[data-flemo-router]");
|
|
3404
3404
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3405
3405
|
});
|
|
3406
|
-
},
|
|
3406
|
+
}, Oa = (e, t, n) => {
|
|
3407
3407
|
let r = 0;
|
|
3408
3408
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3409
|
-
if (!
|
|
3410
|
-
let n =
|
|
3409
|
+
if (!H(t, e)) continue;
|
|
3410
|
+
let n = B(t, e);
|
|
3411
3411
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3412
3412
|
}
|
|
3413
|
-
for (let t of
|
|
3414
|
-
let e =
|
|
3415
|
-
if (!e || !
|
|
3416
|
-
let a =
|
|
3413
|
+
for (let t of Ta(e, n)) {
|
|
3414
|
+
let e = z.get(t.getAttribute(ba)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3415
|
+
if (!e || !H(e, i)) continue;
|
|
3416
|
+
let a = B(e, i);
|
|
3417
3417
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3418
3418
|
}
|
|
3419
|
-
let i = t.decoratorName ?
|
|
3419
|
+
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3420
3420
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3421
|
-
if (!
|
|
3422
|
-
let t =
|
|
3421
|
+
if (!H(i, e)) continue;
|
|
3422
|
+
let t = B(i, e);
|
|
3423
3423
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3424
3424
|
}
|
|
3425
3425
|
return r;
|
|
3426
|
-
},
|
|
3427
|
-
|
|
3428
|
-
},
|
|
3429
|
-
|
|
3430
|
-
},
|
|
3431
|
-
if (
|
|
3432
|
-
|
|
3433
|
-
let e = ++
|
|
3434
|
-
if (e !==
|
|
3435
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length <
|
|
3426
|
+
}, ka = (e) => e === "POPPING" && !ct() || e === "PUSHING" && st() && !ct(), Aa = 12, ja = null, Ma = () => {
|
|
3427
|
+
ja = typeof requestAnimationFrame == "function" ? requestAnimationFrame(Ma) : null;
|
|
3428
|
+
}, Na = () => (ja === null && typeof requestAnimationFrame == "function" && (ja = requestAnimationFrame(Ma)), $), Pa = !1, Fa = 0, Ia = () => {
|
|
3429
|
+
Pa &&= (Fa += 1, !1);
|
|
3430
|
+
}, La = 2, Ra = 8, za = () => {
|
|
3431
|
+
if (Pa || typeof requestAnimationFrame != "function") return;
|
|
3432
|
+
Pa = !0;
|
|
3433
|
+
let e = ++Fa, t = [], n = La, r = null, i = (a) => {
|
|
3434
|
+
if (e !== Fa) return;
|
|
3435
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Ra) {
|
|
3436
3436
|
requestAnimationFrame(i);
|
|
3437
3437
|
return;
|
|
3438
3438
|
}
|
|
3439
|
-
|
|
3439
|
+
Pa = !1;
|
|
3440
3440
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3441
|
-
|
|
3441
|
+
fa(s), tt(s, o[o.length - 1]);
|
|
3442
3442
|
};
|
|
3443
3443
|
requestAnimationFrame(i);
|
|
3444
|
-
},
|
|
3445
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l =
|
|
3446
|
-
if (
|
|
3447
|
-
|
|
3448
|
-
let e = f(
|
|
3449
|
-
e && (
|
|
3450
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (
|
|
3444
|
+
}, Ba = (e, t, n, r) => {
|
|
3445
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = N() && it(), u = !l && N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && da() < Aa, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? $r(e, t, d) : u ? ti(e, t, d, da()) : null : null;
|
|
3446
|
+
if (H(t, n)) {
|
|
3447
|
+
si(i, t, c, r);
|
|
3448
|
+
let e = f(B(t, n) ?? null, i);
|
|
3449
|
+
e && (U(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3450
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (si(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3451
3451
|
}
|
|
3452
3452
|
if (a && t.decoratorName) {
|
|
3453
|
-
let e =
|
|
3454
|
-
e &&
|
|
3453
|
+
let e = R.get(t.decoratorName);
|
|
3454
|
+
e && H(e, n) && si(a, e, c, r);
|
|
3455
3455
|
}
|
|
3456
|
-
for (let e of
|
|
3457
|
-
let t =
|
|
3458
|
-
if (t &&
|
|
3459
|
-
|
|
3460
|
-
let i = f(
|
|
3461
|
-
i && (
|
|
3456
|
+
for (let e of wa(i, n)) {
|
|
3457
|
+
let t = z.get(e.getAttribute(ba));
|
|
3458
|
+
if (t && H(t, n)) {
|
|
3459
|
+
si(e, t, c, r);
|
|
3460
|
+
let i = f(B(t, n) ?? null, e);
|
|
3461
|
+
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3462
3462
|
}
|
|
3463
3463
|
}
|
|
3464
|
-
},
|
|
3464
|
+
}, Va = (e, t) => {
|
|
3465
3465
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3466
3466
|
if (n) {
|
|
3467
|
-
|
|
3468
|
-
for (let e of
|
|
3467
|
+
Q(n, t);
|
|
3468
|
+
for (let e of Ca(n)) Q(e, t);
|
|
3469
3469
|
}
|
|
3470
|
-
r &&
|
|
3471
|
-
for (let e of i ?? []) e &&
|
|
3472
|
-
},
|
|
3470
|
+
r && Q(r, t);
|
|
3471
|
+
for (let e of i ?? []) e && Q(e, t);
|
|
3472
|
+
}, Ha = 4, Ua = (e) => `${Math.round(e * 1e3) / 1e3}s`, Wa = (e) => {
|
|
3473
3473
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3474
|
-
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (
|
|
3474
|
+
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (U(t, "animation-delay", e.writer), t.style.animationDelay = Ua(n.seconds), a = !0), i = !1;
|
|
3475
3475
|
}, s = (a) => {
|
|
3476
3476
|
if (i || a.target !== t || a.animationName !== n && a.animationName !== `${n}-lpm`) return;
|
|
3477
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3477
|
+
if (!e.isLive() || e.budgetUsed() >= Ha) {
|
|
3478
3478
|
e.onTerminal();
|
|
3479
3479
|
return;
|
|
3480
3480
|
}
|
|
@@ -3497,15 +3497,15 @@ var ma = "data-flemo-skip-animation", $ = () => {}, ha = 400, ga = 4, _a = 100,
|
|
|
3497
3497
|
t.addEventListener("animationcancel", s);
|
|
3498
3498
|
},
|
|
3499
3499
|
detach: () => {
|
|
3500
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3500
|
+
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
3501
3501
|
},
|
|
3502
3502
|
fullRestart: () => {
|
|
3503
3503
|
o({ mode: "clear" });
|
|
3504
3504
|
}
|
|
3505
3505
|
};
|
|
3506
3506
|
};
|
|
3507
|
-
function
|
|
3508
|
-
|
|
3507
|
+
function Ga(e) {
|
|
3508
|
+
We();
|
|
3509
3509
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3510
3510
|
if (!c) return;
|
|
3511
3511
|
let { land: e, cancel: t } = c;
|
|
@@ -3530,20 +3530,20 @@ function Wa(e) {
|
|
|
3530
3530
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3531
3531
|
if (h) {
|
|
3532
3532
|
let { scope: e } = d();
|
|
3533
|
-
if (e) if (_ && !g) for (let t of
|
|
3534
|
-
else for (let t of
|
|
3533
|
+
if (e) if (_ && !g) for (let t of Ea(e, m)) t.setAttribute(Sa, "true");
|
|
3534
|
+
else for (let t of Da(e)) t.removeAttribute(Sa);
|
|
3535
3535
|
}
|
|
3536
3536
|
if (_) {
|
|
3537
3537
|
let { scope: e, bars: n } = d();
|
|
3538
3538
|
if (e) {
|
|
3539
|
-
|
|
3540
|
-
for (let n of
|
|
3541
|
-
for (let e of n ?? []) e &&
|
|
3539
|
+
Wn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3540
|
+
for (let n of Ca(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3541
|
+
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3542
3542
|
}
|
|
3543
3543
|
}
|
|
3544
|
-
_ && (
|
|
3544
|
+
_ && (kr(), o &&= (clearTimeout(o), null), a ||= Er()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3545
3545
|
o = null, a?.(), a = null;
|
|
3546
|
-
},
|
|
3546
|
+
}, ga) : (a(), a = null));
|
|
3547
3547
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3548
3548
|
if (!y && i) {
|
|
3549
3549
|
let e = i;
|
|
@@ -3553,39 +3553,39 @@ function Wa(e) {
|
|
|
3553
3553
|
let e = r;
|
|
3554
3554
|
r = null, _ ? e() : u(e);
|
|
3555
3555
|
}
|
|
3556
|
-
if (v && !r &&
|
|
3556
|
+
if (v && !r && lt()) {
|
|
3557
3557
|
l();
|
|
3558
3558
|
let { scope: e } = d();
|
|
3559
3559
|
if (e) {
|
|
3560
|
-
|
|
3561
|
-
let t =
|
|
3560
|
+
Rn.takeover(e);
|
|
3561
|
+
let t = hr(e), n = zr(e), i = Oa(e, L(f), m), a = Ni(i + ya), o = at(), s = o === "on" ? Fr(e, i + ya) : o === null && rt() ? Fr(e, i + ya, !0) : $, c = Jn();
|
|
3562
3562
|
r = () => {
|
|
3563
3563
|
a(), s(), n(), t(), c();
|
|
3564
3564
|
};
|
|
3565
3565
|
}
|
|
3566
3566
|
}
|
|
3567
|
-
if (y && !i &&
|
|
3567
|
+
if (y && !i && lt()) {
|
|
3568
3568
|
l();
|
|
3569
|
-
let { scope: e } = d(), t =
|
|
3570
|
-
e && (t === "on" || t === null &&
|
|
3569
|
+
let { scope: e } = d(), t = at();
|
|
3570
|
+
e && (t === "on" || t === null && rt()) && (i = Fr(e, Oa(e, L(f), m) + ya, !0));
|
|
3571
3571
|
}
|
|
3572
3572
|
let b = (t, n, r) => {
|
|
3573
3573
|
let i = e.getTransitionTaskId();
|
|
3574
|
-
if (!i || (
|
|
3575
|
-
if (
|
|
3576
|
-
if (!
|
|
3577
|
-
if (!
|
|
3578
|
-
if (!
|
|
3574
|
+
if (!i || (be.pinnedDriver(), N() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3575
|
+
if (N() && be.pinnedDriver() !== "raf") return za(), null;
|
|
3576
|
+
if (!N() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform ?? "") || !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ka(t.split("-")[0])) return null;
|
|
3577
|
+
if (!N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return Ue(), null;
|
|
3578
|
+
if (!be.playerAllowed()) return null;
|
|
3579
3579
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3580
3580
|
if (!a) return null;
|
|
3581
|
-
let l =
|
|
3582
|
-
if (
|
|
3581
|
+
let l = L(f);
|
|
3582
|
+
if (be.pinnedDriver() !== "raf") {
|
|
3583
3583
|
let e = t.split("-")[0];
|
|
3584
|
-
if (
|
|
3584
|
+
if (li(l, e, a) === "native") return null;
|
|
3585
3585
|
}
|
|
3586
|
-
let u =
|
|
3586
|
+
let u = B(l, t);
|
|
3587
3587
|
if (!u) return null;
|
|
3588
|
-
let p = [], h =
|
|
3588
|
+
let p = [], h = ma.join(i, {
|
|
3589
3589
|
element: a,
|
|
3590
3590
|
motion: u,
|
|
3591
3591
|
role: n,
|
|
@@ -3596,7 +3596,7 @@ function Wa(e) {
|
|
|
3596
3596
|
p.push(h);
|
|
3597
3597
|
for (let e of c ?? []) {
|
|
3598
3598
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3599
|
-
let n =
|
|
3599
|
+
let n = ma.join(i, {
|
|
3600
3600
|
element: e,
|
|
3601
3601
|
motion: u,
|
|
3602
3602
|
role: "passive",
|
|
@@ -3605,9 +3605,9 @@ function Wa(e) {
|
|
|
3605
3605
|
n && p.push(n);
|
|
3606
3606
|
}
|
|
3607
3607
|
if (o && l.decoratorName) {
|
|
3608
|
-
let e =
|
|
3608
|
+
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3609
3609
|
if (n) {
|
|
3610
|
-
let e =
|
|
3610
|
+
let e = ma.join(i, {
|
|
3611
3611
|
element: o,
|
|
3612
3612
|
motion: n,
|
|
3613
3613
|
role: "passive",
|
|
@@ -3616,10 +3616,10 @@ function Wa(e) {
|
|
|
3616
3616
|
e && p.push(e);
|
|
3617
3617
|
}
|
|
3618
3618
|
}
|
|
3619
|
-
for (let e of
|
|
3620
|
-
let n =
|
|
3619
|
+
for (let e of wa(a, t)) {
|
|
3620
|
+
let n = z.get(e.getAttribute(ba)), r = n ? B(n, t) : null;
|
|
3621
3621
|
if (!r) continue;
|
|
3622
|
-
let a =
|
|
3622
|
+
let a = ma.join(i, {
|
|
3623
3623
|
element: e,
|
|
3624
3624
|
motion: r,
|
|
3625
3625
|
role: "passive"
|
|
@@ -3628,8 +3628,8 @@ function Wa(e) {
|
|
|
3628
3628
|
}
|
|
3629
3629
|
return () => p.forEach((e) => e());
|
|
3630
3630
|
}, x = (e, n) => {
|
|
3631
|
-
let r = [], { decorator: i, bars: a } = d(), o =
|
|
3632
|
-
let a = 0, o =
|
|
3631
|
+
let r = [], { decorator: i, bars: a } = d(), o = L(f), s = (e, n, i) => {
|
|
3632
|
+
let a = 0, o = Wa({
|
|
3633
3633
|
element: e,
|
|
3634
3634
|
expectedName: n,
|
|
3635
3635
|
motion: i,
|
|
@@ -3642,15 +3642,15 @@ function Wa(e) {
|
|
|
3642
3642
|
onTerminal: $
|
|
3643
3643
|
});
|
|
3644
3644
|
o.attach(), r.push(o.detach);
|
|
3645
|
-
}, c =
|
|
3645
|
+
}, c = yn("screen", f, n), l = B(o, n);
|
|
3646
3646
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3647
3647
|
if (i && o.decoratorName) {
|
|
3648
|
-
let e =
|
|
3649
|
-
t && s(i,
|
|
3648
|
+
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3649
|
+
t && s(i, yn("decorator", o.decoratorName, n), t);
|
|
3650
3650
|
}
|
|
3651
|
-
for (let t of
|
|
3652
|
-
let e = t.getAttribute(
|
|
3653
|
-
i && s(t,
|
|
3651
|
+
for (let t of wa(e, n)) {
|
|
3652
|
+
let e = t.getAttribute(ba), r = z.get(e), i = r ? B(r, n) : null;
|
|
3653
|
+
i && s(t, yn("part", e, n), i);
|
|
3654
3654
|
}
|
|
3655
3655
|
return r;
|
|
3656
3656
|
};
|
|
@@ -3658,12 +3658,12 @@ function Wa(e) {
|
|
|
3658
3658
|
if (m === "COMPLETED") {
|
|
3659
3659
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3660
3660
|
if (e) {
|
|
3661
|
-
|
|
3662
|
-
for (let t of
|
|
3661
|
+
W(e);
|
|
3662
|
+
for (let t of Ca(e)) W(t);
|
|
3663
3663
|
}
|
|
3664
|
-
n &&
|
|
3665
|
-
for (let e of r ?? []) e &&
|
|
3666
|
-
return
|
|
3664
|
+
n && W(n);
|
|
3665
|
+
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3666
|
+
return Va({
|
|
3667
3667
|
scope: e,
|
|
3668
3668
|
decorator: n,
|
|
3669
3669
|
bars: r ?? []
|
|
@@ -3671,22 +3671,22 @@ function Wa(e) {
|
|
|
3671
3671
|
}
|
|
3672
3672
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3673
3673
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3674
|
-
e &&
|
|
3674
|
+
e && Ba({
|
|
3675
3675
|
scope: e,
|
|
3676
3676
|
decorator: n,
|
|
3677
3677
|
bars: r ?? []
|
|
3678
|
-
},
|
|
3678
|
+
}, L(f), `${m}-false`, t);
|
|
3679
3679
|
}
|
|
3680
3680
|
if (_ && g) {
|
|
3681
3681
|
let e = `${m}-false`, n = b(e, "passive");
|
|
3682
3682
|
if (n) return n;
|
|
3683
3683
|
let { scope: r } = d();
|
|
3684
3684
|
if (r) {
|
|
3685
|
-
let n =
|
|
3686
|
-
if (
|
|
3687
|
-
let a =
|
|
3685
|
+
let n = L(f), i = [];
|
|
3686
|
+
if (H(n, e)) {
|
|
3687
|
+
let a = B(n, e), o = 0, s = Wa({
|
|
3688
3688
|
element: r,
|
|
3689
|
-
expectedName:
|
|
3689
|
+
expectedName: yn("screen", f, e),
|
|
3690
3690
|
motion: a,
|
|
3691
3691
|
writer: t,
|
|
3692
3692
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3704,15 +3704,15 @@ function Wa(e) {
|
|
|
3704
3704
|
return $;
|
|
3705
3705
|
}
|
|
3706
3706
|
if (m === "COMPLETED") {
|
|
3707
|
-
|
|
3707
|
+
Ia(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3708
3708
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3709
3709
|
if (n) {
|
|
3710
|
-
|
|
3711
|
-
for (let e of
|
|
3710
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute(ha);
|
|
3711
|
+
for (let e of Ca(n)) W(e);
|
|
3712
3712
|
}
|
|
3713
|
-
r && (
|
|
3714
|
-
for (let e of i ?? []) e &&
|
|
3715
|
-
return
|
|
3713
|
+
r && (W(r), r.removeAttribute(ha));
|
|
3714
|
+
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3715
|
+
return Va({
|
|
3716
3716
|
scope: n,
|
|
3717
3717
|
decorator: r,
|
|
3718
3718
|
bars: i ?? []
|
|
@@ -3723,19 +3723,19 @@ function Wa(e) {
|
|
|
3723
3723
|
if (!S) return $;
|
|
3724
3724
|
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3725
3725
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3726
|
-
}, E =
|
|
3726
|
+
}, E = L(f), D = `${m}-true`, O = S.getAttribute(ha) === "true", k = !O && H(E, D);
|
|
3727
3727
|
if (!O) {
|
|
3728
3728
|
let { decorator: e, bars: n } = d();
|
|
3729
|
-
|
|
3729
|
+
Ba({
|
|
3730
3730
|
scope: S,
|
|
3731
3731
|
decorator: e,
|
|
3732
3732
|
bars: n ?? []
|
|
3733
3733
|
}, E, D, t);
|
|
3734
3734
|
}
|
|
3735
|
-
k &&
|
|
3736
|
-
let ee = `${m}-false`, A =
|
|
3737
|
-
for (let e of
|
|
3738
|
-
let t =
|
|
3735
|
+
k && N() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || da() < Aa) && (w = Na());
|
|
3736
|
+
let ee = `${m}-false`, A = H(E, ee) ? B(E, ee) : null, te = [];
|
|
3737
|
+
for (let e of Ta(S, m)) {
|
|
3738
|
+
let t = z.get(e.getAttribute(ba)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3739
3739
|
r && te.push({
|
|
3740
3740
|
element: e,
|
|
3741
3741
|
motion: r
|
|
@@ -3743,107 +3743,107 @@ function Wa(e) {
|
|
|
3743
3743
|
}
|
|
3744
3744
|
let j = A ? (A.delay + A.duration) * 1e3 : 0;
|
|
3745
3745
|
for (let { motion: e } of te) j = Math.max(j, (e.delay + e.duration) * 1e3);
|
|
3746
|
-
let
|
|
3746
|
+
let ne = [];
|
|
3747
3747
|
{
|
|
3748
|
-
let e = E.decoratorName ?
|
|
3748
|
+
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3749
3749
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3750
|
-
if (!
|
|
3751
|
-
let n =
|
|
3752
|
-
n && (
|
|
3750
|
+
if (!H(e, t)) continue;
|
|
3751
|
+
let n = B(e, t);
|
|
3752
|
+
n && (ne.push(n), j = Math.max(j, (n.delay + n.duration) * 1e3));
|
|
3753
3753
|
}
|
|
3754
3754
|
}
|
|
3755
3755
|
if (!k) {
|
|
3756
3756
|
if (!O && j > 0) {
|
|
3757
3757
|
if (!g) return C && s.markGateHeld(C), $;
|
|
3758
3758
|
let e = j + 50;
|
|
3759
|
-
C && s.anchorGate(C, e +
|
|
3759
|
+
C && s.anchorGate(C, e + ya);
|
|
3760
3760
|
let t = setTimeout(T, e);
|
|
3761
3761
|
return () => clearTimeout(t);
|
|
3762
3762
|
}
|
|
3763
3763
|
return queueMicrotask(T), $;
|
|
3764
3764
|
}
|
|
3765
|
-
let
|
|
3765
|
+
let M = B(E, D);
|
|
3766
3766
|
if (C) if (g) {
|
|
3767
|
-
let e = (
|
|
3768
|
-
s.anchorGate(C, Math.max(e, j) +
|
|
3767
|
+
let e = (M.delay + M.duration) * 1e3;
|
|
3768
|
+
s.anchorGate(C, Math.max(e, j) + ya);
|
|
3769
3769
|
} else s.markGateHeld(C);
|
|
3770
|
-
let
|
|
3771
|
-
|
|
3772
|
-
let
|
|
3770
|
+
let re = !O && !!M, ie = E.driver === "native" && !N(), ae = !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He(), oe = N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ye(), se = !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ka(m), ce = ae || oe || se, le = null;
|
|
3771
|
+
re && !N() && !ie && !ae && !se && (le = wi(S, () => [S.ownerDocument.documentElement], () => xa.get(S)?.(), !1));
|
|
3772
|
+
let ue = ce ? En[m] ?? 0 : 0, de = ae && (m === "PUSHING" || m === "POPPING");
|
|
3773
3773
|
{
|
|
3774
3774
|
let e = S.ownerDocument.documentElement;
|
|
3775
|
-
|
|
3775
|
+
ce ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm");
|
|
3776
3776
|
}
|
|
3777
|
-
let
|
|
3778
|
-
|
|
3779
|
-
let
|
|
3780
|
-
|
|
3781
|
-
},
|
|
3782
|
-
|
|
3783
|
-
},
|
|
3777
|
+
let fe = null;
|
|
3778
|
+
re && ie && (fe = _i(S, () => [S.ownerDocument.documentElement], () => xa.get(S)?.()));
|
|
3779
|
+
let pe = yn("screen", f, D), me, he = () => {
|
|
3780
|
+
me !== void 0 && (clearTimeout(me), me = void 0);
|
|
3781
|
+
}, ge = 0, _e, ve = [], xe, Se = () => {
|
|
3782
|
+
ve.forEach((e) => cancelAnimationFrame(e)), ve = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3783
|
+
}, Ce = () => {
|
|
3784
3784
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3785
3785
|
shields exotic embedders. */
|
|
3786
3786
|
if (typeof requestAnimationFrame != "function") {
|
|
3787
3787
|
T();
|
|
3788
3788
|
return;
|
|
3789
3789
|
}
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
},
|
|
3790
|
+
xe = setTimeout(() => {
|
|
3791
|
+
Se(), T();
|
|
3792
|
+
}, va);
|
|
3793
3793
|
let e = (t) => {
|
|
3794
3794
|
if (t <= 0) {
|
|
3795
|
-
|
|
3795
|
+
Se(), T();
|
|
3796
3796
|
return;
|
|
3797
3797
|
}
|
|
3798
|
-
|
|
3798
|
+
ve.push(requestAnimationFrame(() => e(t - 1)));
|
|
3799
3799
|
};
|
|
3800
|
-
e(
|
|
3801
|
-
},
|
|
3802
|
-
if (
|
|
3803
|
-
|
|
3800
|
+
e(_a);
|
|
3801
|
+
}, we = () => {
|
|
3802
|
+
if (ge <= 0) {
|
|
3803
|
+
Ce();
|
|
3804
3804
|
return;
|
|
3805
3805
|
}
|
|
3806
|
-
|
|
3807
|
-
},
|
|
3808
|
-
e.target === S && (e.animationName ===
|
|
3806
|
+
_e = setTimeout(Ce, ge);
|
|
3807
|
+
}, Te = $, Ee = $, De = $, Oe = (e) => {
|
|
3808
|
+
e.target === S && (e.animationName === pe || e.animationName === `${pe}-lpm`) && (S.removeEventListener("animationend", Oe), he(), Te(), we());
|
|
3809
3809
|
};
|
|
3810
|
-
S.addEventListener("animationend",
|
|
3811
|
-
let
|
|
3812
|
-
|
|
3813
|
-
let
|
|
3810
|
+
S.addEventListener("animationend", Oe);
|
|
3811
|
+
let ke = re && g ? b(D, "active", Ce) : null, Ae = (M.delay + M.duration) * 1e3, je = Math.max(Ae, j) + 1500, Me = C ? setTimeout(() => void s.resolveTask(C), je) : void 0;
|
|
3812
|
+
ge = Math.max(0, j - Ae);
|
|
3813
|
+
let Ne = Ae * 1 + ue + 250, Pe = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Fe = Wa({
|
|
3814
3814
|
element: S,
|
|
3815
|
-
expectedName:
|
|
3816
|
-
motion:
|
|
3815
|
+
expectedName: pe,
|
|
3816
|
+
motion: M,
|
|
3817
3817
|
writer: t,
|
|
3818
|
-
isLive:
|
|
3818
|
+
isLive: Pe,
|
|
3819
3819
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3820
3820
|
spendBudget: () => {
|
|
3821
|
-
|
|
3821
|
+
Ee(), De(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3822
3822
|
},
|
|
3823
3823
|
onTerminal: T
|
|
3824
3824
|
});
|
|
3825
|
-
|
|
3826
|
-
let
|
|
3827
|
-
|
|
3828
|
-
},
|
|
3829
|
-
if (
|
|
3830
|
-
|
|
3825
|
+
Te = Fe.detach;
|
|
3826
|
+
let Ie = !1, P = () => {
|
|
3827
|
+
he(), me = setTimeout(Le, Ne);
|
|
3828
|
+
}, Le = () => {
|
|
3829
|
+
if (he(), Pe() && !Ie) {
|
|
3830
|
+
Ie = !0, Ee(), De(), Fe.fullRestart(), P();
|
|
3831
3831
|
return;
|
|
3832
3832
|
}
|
|
3833
3833
|
T();
|
|
3834
|
-
},
|
|
3835
|
-
|
|
3836
|
-
|
|
3834
|
+
}, F = !ke && g, Re = F ? x(S, D) : [];
|
|
3835
|
+
F && (Fe.attach(), C && P()), F && (ie || ae) && xa.set(S, () => {
|
|
3836
|
+
Ee(), De(), C && me !== void 0 && P();
|
|
3837
3837
|
});
|
|
3838
|
-
let
|
|
3839
|
-
|
|
3840
|
-
}) : null,
|
|
3841
|
-
|
|
3838
|
+
let ze = F && ie ? Si(() => [S.ownerDocument.documentElement], () => {
|
|
3839
|
+
Ee(), De(), C && me !== void 0 && P();
|
|
3840
|
+
}) : null, Be, Ve = () => {
|
|
3841
|
+
Be !== void 0 && (clearTimeout(Be), Be = void 0);
|
|
3842
3842
|
};
|
|
3843
|
-
if (
|
|
3844
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3843
|
+
if (Ee = Ve, F && C && !de && !se) {
|
|
3844
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Y(M, S, e), n = A ? Y(A, S, e) : 0, r = 0;
|
|
3845
3845
|
for (let { element: t, motion: n } of te) {
|
|
3846
|
-
let i =
|
|
3846
|
+
let i = Y(n, t, e);
|
|
3847
3847
|
if (i === null) {
|
|
3848
3848
|
r = null;
|
|
3849
3849
|
break;
|
|
@@ -3851,10 +3851,10 @@ function Wa(e) {
|
|
|
3851
3851
|
r = Math.max(r, i);
|
|
3852
3852
|
}
|
|
3853
3853
|
let i = 0;
|
|
3854
|
-
if (
|
|
3854
|
+
if (ne.length > 0) {
|
|
3855
3855
|
let t = d().decorator;
|
|
3856
|
-
if (t) for (let n of
|
|
3857
|
-
let r =
|
|
3856
|
+
if (t) for (let n of ne) {
|
|
3857
|
+
let r = Y(n, t, e);
|
|
3858
3858
|
if (r === null) {
|
|
3859
3859
|
i = null;
|
|
3860
3860
|
break;
|
|
@@ -3863,17 +3863,17 @@ function Wa(e) {
|
|
|
3863
3863
|
}
|
|
3864
3864
|
}
|
|
3865
3865
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3866
|
-
a !== null && a + 17 <
|
|
3867
|
-
|
|
3868
|
-
}, a * 1 + 17 +
|
|
3866
|
+
a !== null && a + 17 < Ae + ge && (Be = setTimeout(() => {
|
|
3867
|
+
Be = void 0, Pe() && (S.removeEventListener("animationend", Oe), he(), Te(), Ce());
|
|
3868
|
+
}, a * 1 + 17 + ue));
|
|
3869
3869
|
}
|
|
3870
|
-
let
|
|
3871
|
-
|
|
3870
|
+
let We, Ge = () => {
|
|
3871
|
+
We !== void 0 && (clearTimeout(We), We = void 0);
|
|
3872
3872
|
};
|
|
3873
|
-
if (
|
|
3874
|
-
let e =
|
|
3873
|
+
if (De = Ge, F && r && !de && !se && !rt()) {
|
|
3874
|
+
let e = Y(M, S, 1), t = A ? Y(A, S, 1) : 0, n = 0;
|
|
3875
3875
|
for (let { element: e, motion: t } of te) {
|
|
3876
|
-
let r =
|
|
3876
|
+
let r = Y(t, e, 1);
|
|
3877
3877
|
if (r === null) {
|
|
3878
3878
|
n = null;
|
|
3879
3879
|
break;
|
|
@@ -3881,10 +3881,10 @@ function Wa(e) {
|
|
|
3881
3881
|
n = Math.max(n, r);
|
|
3882
3882
|
}
|
|
3883
3883
|
let i = 0;
|
|
3884
|
-
if (
|
|
3884
|
+
if (ne.length > 0) {
|
|
3885
3885
|
let e = d().decorator;
|
|
3886
|
-
if (e) for (let t of
|
|
3887
|
-
let n =
|
|
3886
|
+
if (e) for (let t of ne) {
|
|
3887
|
+
let n = Y(t, e, 1);
|
|
3888
3888
|
if (n === null) {
|
|
3889
3889
|
i = null;
|
|
3890
3890
|
break;
|
|
@@ -3893,18 +3893,18 @@ function Wa(e) {
|
|
|
3893
3893
|
}
|
|
3894
3894
|
}
|
|
3895
3895
|
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3896
|
-
a !== null && (
|
|
3897
|
-
|
|
3896
|
+
a !== null && (We = setTimeout(() => {
|
|
3897
|
+
We = void 0;
|
|
3898
3898
|
let e = r;
|
|
3899
3899
|
e && (r = null, e());
|
|
3900
|
-
}, a * 1 +
|
|
3900
|
+
}, a * 1 + ue));
|
|
3901
3901
|
}
|
|
3902
3902
|
return () => {
|
|
3903
|
-
if (w(),
|
|
3904
|
-
|
|
3905
|
-
for (let e of
|
|
3903
|
+
if (w(), Me !== void 0 && clearTimeout(Me), _e !== void 0 && clearTimeout(_e), Se(), fe?.(), le?.(), ze?.(), Ve(), Ge(), S.removeEventListener("animationend", Oe), F) {
|
|
3904
|
+
Fe.detach();
|
|
3905
|
+
for (let e of Re) e();
|
|
3906
3906
|
}
|
|
3907
|
-
|
|
3907
|
+
he(), ke?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3908
3908
|
};
|
|
3909
3909
|
},
|
|
3910
3910
|
activeResumeEntryCount: () => n.size
|
|
@@ -3912,20 +3912,20 @@ function Wa(e) {
|
|
|
3912
3912
|
}
|
|
3913
3913
|
//#endregion
|
|
3914
3914
|
//#region src/utils/findScrollable.ts
|
|
3915
|
-
function
|
|
3916
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3915
|
+
function Ka(e, t) {
|
|
3916
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = qa(e);
|
|
3917
3917
|
if (!o) return {
|
|
3918
3918
|
element: null,
|
|
3919
3919
|
hasMarker: !1
|
|
3920
3920
|
};
|
|
3921
3921
|
let s = o.closest?.(r);
|
|
3922
|
-
if (s instanceof HTMLElement &&
|
|
3922
|
+
if (s instanceof HTMLElement && Ja(s, n) && (!a || Ya(s, n))) return {
|
|
3923
3923
|
element: s,
|
|
3924
3924
|
hasMarker: !0
|
|
3925
3925
|
};
|
|
3926
3926
|
let c = o, l = 0;
|
|
3927
3927
|
for (; c && l < i;) {
|
|
3928
|
-
if (
|
|
3928
|
+
if (Ja(c, n) && (!a || Ya(c, n))) return {
|
|
3929
3929
|
element: c,
|
|
3930
3930
|
hasMarker: !1
|
|
3931
3931
|
};
|
|
@@ -3936,7 +3936,7 @@ function Ga(e, t) {
|
|
|
3936
3936
|
hasMarker: !1
|
|
3937
3937
|
};
|
|
3938
3938
|
}
|
|
3939
|
-
function
|
|
3939
|
+
function qa(e) {
|
|
3940
3940
|
if (!e) return null;
|
|
3941
3941
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3942
3942
|
if (n && n.length) {
|
|
@@ -3944,34 +3944,34 @@ function Ka(e) {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
return e instanceof HTMLElement ? e : null;
|
|
3946
3946
|
}
|
|
3947
|
-
function
|
|
3947
|
+
function Ja(e, t) {
|
|
3948
3948
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3951
|
-
if (!
|
|
3950
|
+
function Ya(e, t) {
|
|
3951
|
+
if (!Ja(e, t) || typeof window > "u") return !1;
|
|
3952
3952
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3953
3953
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3954
3954
|
}
|
|
3955
3955
|
//#endregion
|
|
3956
3956
|
//#region src/screen/computeBarRiding.ts
|
|
3957
|
-
function
|
|
3957
|
+
function Xa(e, t) {
|
|
3958
3958
|
return !!e && !!t && e.id === t.id;
|
|
3959
3959
|
}
|
|
3960
|
-
function
|
|
3960
|
+
function Za(e) {
|
|
3961
3961
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3962
3962
|
app: !1,
|
|
3963
3963
|
nav: !1
|
|
3964
3964
|
};
|
|
3965
3965
|
let t = e.hasTopBar ? { id: e.topBarId } : void 0, n = e.hasNavBar ? { id: e.bottomBarId } : void 0, r = e.partnerMetadata?.topBar ?? (e.partnerBars?.topBar ? {} : void 0), i = e.partnerMetadata?.bottomBar ?? (e.partnerBars?.bottomBar ? {} : void 0);
|
|
3966
3966
|
return {
|
|
3967
|
-
app: e.hasTopBar && !
|
|
3968
|
-
nav: e.hasNavBar && !
|
|
3967
|
+
app: e.hasTopBar && !Xa(t, r),
|
|
3968
|
+
nav: e.hasNavBar && !Xa(n, i)
|
|
3969
3969
|
};
|
|
3970
3970
|
}
|
|
3971
3971
|
//#endregion
|
|
3972
3972
|
//#region src/core/engine/createSwipeController.ts
|
|
3973
|
-
var
|
|
3974
|
-
function
|
|
3973
|
+
var Qa = "data-flemo-skip-animation";
|
|
3974
|
+
function $a(e) {
|
|
3975
3975
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3976
3976
|
current: [],
|
|
3977
3977
|
prev: []
|
|
@@ -4020,9 +4020,9 @@ function Qa(e) {
|
|
|
4020
4020
|
y: e.clientY
|
|
4021
4021
|
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4022
4022
|
}, w = (r, a, o) => {
|
|
4023
|
-
let s =
|
|
4024
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
4025
|
-
else if (r === n) for (let e of i.prev)
|
|
4023
|
+
let s = Un(r, a, o, t);
|
|
4024
|
+
if (r === e.getElements().scope) for (let e of i.current) Un(e, a, o, t);
|
|
4025
|
+
else if (r === n) for (let e of i.prev) Un(e, a, o, t);
|
|
4026
4026
|
return s;
|
|
4027
4027
|
}, T = (n) => {
|
|
4028
4028
|
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = n?.querySelector("[data-flemo-bar=\"app\"]"), s = n?.querySelector("[data-flemo-bar=\"nav\"]"), c = (e) => {
|
|
@@ -4030,17 +4030,17 @@ function Qa(e) {
|
|
|
4030
4030
|
let t = e.getAttribute("data-flemo-bar-id");
|
|
4031
4031
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4032
4032
|
}, l = e.hasSharedTopBar() ? { id: e.getSharedTopBarId?.() } : void 0, u = e.hasSharedBottomBar() ? { id: e.getSharedBottomBarId?.() } : void 0, d = a?.topBar ?? (r?.topBar ? {} : c(o)), f = a?.bottomBar ?? (r?.bottomBar ? {} : c(s)), p = [], { sharedTopBar: m, sharedBottomBar: h } = e.getElements();
|
|
4033
|
-
m && l && !
|
|
4033
|
+
m && l && !Xa(l, d) && p.push(m), h && u && !Xa(u, f) && p.push(h);
|
|
4034
4034
|
let g = [];
|
|
4035
|
-
n && (o && d && !
|
|
4035
|
+
n && (o && d && !Xa(d, l) && g.push(o), s && f && !Xa(f, u) && g.push(s)), i = {
|
|
4036
4036
|
current: p,
|
|
4037
4037
|
prev: g
|
|
4038
4038
|
};
|
|
4039
|
-
for (let n of p)
|
|
4040
|
-
for (let n of g)
|
|
4039
|
+
for (let n of p) si(n, e.getTransition(), !1, t);
|
|
4040
|
+
for (let n of g) si(n, e.getTransition(), !1, t);
|
|
4041
4041
|
}, E = () => {
|
|
4042
|
-
for (let e of i.current)
|
|
4043
|
-
for (let e of i.prev)
|
|
4042
|
+
for (let e of i.current) W(e, void 0, t), Q(e, t);
|
|
4043
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4044
4044
|
i = {
|
|
4045
4045
|
current: [],
|
|
4046
4046
|
prev: []
|
|
@@ -4053,10 +4053,10 @@ function Qa(e) {
|
|
|
4053
4053
|
};
|
|
4054
4054
|
}, O = (e, n, r) => {
|
|
4055
4055
|
let i = (i, a) => {
|
|
4056
|
-
let o =
|
|
4056
|
+
let o = z.get(i.getAttribute("data-flemo-part-name"));
|
|
4057
4057
|
if (!o) return;
|
|
4058
4058
|
let s = {
|
|
4059
|
-
animate: (e, n, r) =>
|
|
4059
|
+
animate: (e, n, r) => Un(e, n, r, t),
|
|
4060
4060
|
element: i,
|
|
4061
4061
|
active: a
|
|
4062
4062
|
};
|
|
@@ -4065,7 +4065,7 @@ function Qa(e) {
|
|
|
4065
4065
|
for (let e of a.current) i(e, !0);
|
|
4066
4066
|
for (let e of a.prev) i(e, !1);
|
|
4067
4067
|
}, k = () => {
|
|
4068
|
-
for (let e of [...a.current, ...a.prev])
|
|
4068
|
+
for (let e of [...a.current, ...a.prev]) W(e, void 0, t);
|
|
4069
4069
|
a = {
|
|
4070
4070
|
current: [],
|
|
4071
4071
|
prev: []
|
|
@@ -4102,7 +4102,7 @@ function Qa(e) {
|
|
|
4102
4102
|
prevScreen: n,
|
|
4103
4103
|
onStart: (e) => {
|
|
4104
4104
|
g?.onSwipeStart?.(e, {
|
|
4105
|
-
animate:
|
|
4105
|
+
animate: Un,
|
|
4106
4106
|
currentDecorator: l,
|
|
4107
4107
|
prevDecorator: r
|
|
4108
4108
|
}), O("start", e, 0);
|
|
@@ -4125,7 +4125,7 @@ function Qa(e) {
|
|
|
4125
4125
|
prevScreen: n,
|
|
4126
4126
|
onProgress: (e, t) => {
|
|
4127
4127
|
s?.onSwipe?.(e, t, {
|
|
4128
|
-
animate:
|
|
4128
|
+
animate: Un,
|
|
4129
4129
|
currentDecorator: o,
|
|
4130
4130
|
prevDecorator: r
|
|
4131
4131
|
}), O("swipe", e, t);
|
|
@@ -4165,16 +4165,16 @@ function Qa(e) {
|
|
|
4165
4165
|
onStart: (e) => {
|
|
4166
4166
|
let t = !s && e;
|
|
4167
4167
|
p?.onSwipeEnd?.(t, {
|
|
4168
|
-
animate:
|
|
4168
|
+
animate: Un,
|
|
4169
4169
|
currentDecorator: f,
|
|
4170
4170
|
prevDecorator: r
|
|
4171
4171
|
}), O("end", t, 0);
|
|
4172
4172
|
}
|
|
4173
4173
|
});
|
|
4174
4174
|
if (!s && g) {
|
|
4175
|
-
d?.setAttribute(
|
|
4176
|
-
for (let e of i.current)
|
|
4177
|
-
for (let e of i.prev)
|
|
4175
|
+
d?.setAttribute(Qa, "true"), f?.setAttribute(Qa, "true");
|
|
4176
|
+
for (let e of i.current) Q(e, t);
|
|
4177
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4178
4178
|
i = {
|
|
4179
4179
|
current: [],
|
|
4180
4180
|
prev: []
|
|
@@ -4182,14 +4182,14 @@ function Qa(e) {
|
|
|
4182
4182
|
current: [],
|
|
4183
4183
|
prev: []
|
|
4184
4184
|
}, e.back();
|
|
4185
|
-
} else d &&
|
|
4185
|
+
} else d && W(d, void 0, t), n && W(n, void 0, t), f && W(f), r && W(r), E(), k(), e.setDragStatus("IDLE");
|
|
4186
4186
|
};
|
|
4187
4187
|
return {
|
|
4188
4188
|
pointerDown: (t) => {
|
|
4189
|
-
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g =
|
|
4189
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = Ka(t.target, {
|
|
4190
4190
|
direction: "x",
|
|
4191
4191
|
verifyByScroll: !0
|
|
4192
|
-
}), _ =
|
|
4192
|
+
}), _ = Ka(t.target, {
|
|
4193
4193
|
direction: "y",
|
|
4194
4194
|
verifyByScroll: !0
|
|
4195
4195
|
}), v = t.clientX, y = t.clientY);
|
|
@@ -4228,31 +4228,31 @@ function Qa(e) {
|
|
|
4228
4228
|
}
|
|
4229
4229
|
//#endregion
|
|
4230
4230
|
//#region src/screen/pendingNetwork.ts
|
|
4231
|
-
var
|
|
4232
|
-
|
|
4233
|
-
},
|
|
4234
|
-
if (!(
|
|
4235
|
-
if (
|
|
4231
|
+
var eo = 0, to = !1, no = () => {
|
|
4232
|
+
eo = Math.max(0, eo - 1);
|
|
4233
|
+
}, ro = () => {
|
|
4234
|
+
if (!(to || typeof window > "u")) {
|
|
4235
|
+
if (to = !0, typeof window.fetch == "function") {
|
|
4236
4236
|
let e = window.fetch.bind(window);
|
|
4237
4237
|
window.fetch = (...t) => {
|
|
4238
|
-
|
|
4238
|
+
eo += 1;
|
|
4239
4239
|
let n;
|
|
4240
4240
|
try {
|
|
4241
4241
|
n = e(...t);
|
|
4242
4242
|
} catch (e) {
|
|
4243
|
-
throw
|
|
4243
|
+
throw no(), e;
|
|
4244
4244
|
}
|
|
4245
|
-
return n.then((e) => (
|
|
4246
|
-
throw
|
|
4245
|
+
return n.then((e) => (no(), e), (e) => {
|
|
4246
|
+
throw no(), e;
|
|
4247
4247
|
});
|
|
4248
4248
|
};
|
|
4249
4249
|
}
|
|
4250
4250
|
if (typeof XMLHttpRequest == "function") {
|
|
4251
4251
|
let e = XMLHttpRequest.prototype.send;
|
|
4252
4252
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4253
|
-
|
|
4253
|
+
eo += 1;
|
|
4254
4254
|
let n = !1, r = () => {
|
|
4255
|
-
n || (n = !0,
|
|
4255
|
+
n || (n = !0, no());
|
|
4256
4256
|
};
|
|
4257
4257
|
this.addEventListener("loadend", r);
|
|
4258
4258
|
try {
|
|
@@ -4263,28 +4263,28 @@ var $a = 0, eo = !1, to = () => {
|
|
|
4263
4263
|
};
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
4266
|
-
},
|
|
4266
|
+
}, io = () => (ro(), eo > 0);
|
|
4267
4267
|
//#endregion
|
|
4268
4268
|
//#region src/screen/animStartAnchor.ts
|
|
4269
|
-
function
|
|
4269
|
+
function ao(e) {
|
|
4270
4270
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4271
4271
|
}
|
|
4272
|
-
var
|
|
4273
|
-
function so(e) {
|
|
4274
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, oo);
|
|
4275
|
-
}
|
|
4272
|
+
var oo = 300, so = 20;
|
|
4276
4273
|
function co(e) {
|
|
4277
|
-
|
|
4274
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, so);
|
|
4275
|
+
}
|
|
4276
|
+
function lo(e) {
|
|
4277
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of co(e)) t.decode().catch(() => {});
|
|
4278
4278
|
}
|
|
4279
|
-
var
|
|
4279
|
+
var uo = 3, fo = 40, po = (e) => {
|
|
4280
4280
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4281
4281
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4282
4282
|
/* v8 ignore stop */
|
|
4283
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4284
|
-
},
|
|
4283
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * fo) / t < uo;
|
|
4284
|
+
}, mo = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4285
4285
|
let t = e.animationName;
|
|
4286
4286
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4287
|
-
}),
|
|
4287
|
+
}), ho = (e) => {
|
|
4288
4288
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4289
4289
|
which already requires querySelectorAll. */
|
|
4290
4290
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4292,12 +4292,12 @@ var lo = 3, uo = 40, fo = (e) => {
|
|
|
4292
4292
|
the guard shields exotic embedders. */
|
|
4293
4293
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4294
4294
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4295
|
-
if (r >=
|
|
4295
|
+
if (r >= so) break;
|
|
4296
4296
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4297
4297
|
}
|
|
4298
4298
|
return !1;
|
|
4299
4299
|
};
|
|
4300
|
-
function
|
|
4300
|
+
function go(e, t = {}) {
|
|
4301
4301
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4302
4302
|
if (n) return;
|
|
4303
4303
|
let r = t.scope;
|
|
@@ -4305,7 +4305,7 @@ function ho(e, t = {}) {
|
|
|
4305
4305
|
e();
|
|
4306
4306
|
return;
|
|
4307
4307
|
}
|
|
4308
|
-
let i =
|
|
4308
|
+
let i = co(r);
|
|
4309
4309
|
if (i.length === 0) {
|
|
4310
4310
|
e();
|
|
4311
4311
|
return;
|
|
@@ -4323,15 +4323,15 @@ function ho(e, t = {}) {
|
|
|
4323
4323
|
return;
|
|
4324
4324
|
}
|
|
4325
4325
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4326
|
-
if (!n.renderSettleOnly && !
|
|
4326
|
+
if (!n.renderSettleOnly && !po(r)) {
|
|
4327
4327
|
e();
|
|
4328
4328
|
return;
|
|
4329
4329
|
}
|
|
4330
4330
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4331
4331
|
the fallback only shields exotic embedders. */
|
|
4332
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
4332
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => po(r) && mo(r), f = () => io() || ho(r), p = () => {
|
|
4333
4333
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4334
|
-
}, m = () => n.renderSettleOnly ? 6 : !
|
|
4334
|
+
}, m = () => n.renderSettleOnly ? 6 : !po(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4335
4335
|
if (!n.renderSettleOnly) {
|
|
4336
4336
|
p();
|
|
4337
4337
|
return;
|
|
@@ -4410,14 +4410,14 @@ function ho(e, t = {}) {
|
|
|
4410
4410
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4411
4411
|
};
|
|
4412
4412
|
}
|
|
4413
|
-
function
|
|
4414
|
-
let n =
|
|
4413
|
+
function _o(e, t = {}) {
|
|
4414
|
+
let n = go(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4415
4415
|
return () => {
|
|
4416
4416
|
n(), clearTimeout(i);
|
|
4417
4417
|
};
|
|
4418
4418
|
}
|
|
4419
|
-
var
|
|
4420
|
-
function
|
|
4419
|
+
var vo = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4420
|
+
function yo() {
|
|
4421
4421
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4422
4422
|
clearTimeout(n.backstop), e.delete(t);
|
|
4423
4423
|
let r = [...n.members];
|
|
@@ -4427,14 +4427,14 @@ function vo() {
|
|
|
4427
4427
|
return { join: (r, i, a) => {
|
|
4428
4428
|
let o = e.get(r);
|
|
4429
4429
|
if (o) {
|
|
4430
|
-
let e =
|
|
4430
|
+
let e = vo(a);
|
|
4431
4431
|
if (e > o.backstopMs) {
|
|
4432
4432
|
clearTimeout(o.backstop);
|
|
4433
4433
|
let n = o;
|
|
4434
4434
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4435
4435
|
}
|
|
4436
4436
|
} else {
|
|
4437
|
-
let n =
|
|
4437
|
+
let n = vo(a), i = {
|
|
4438
4438
|
members: /* @__PURE__ */ new Set(),
|
|
4439
4439
|
backstop: setTimeout(() => t(r, i), n),
|
|
4440
4440
|
backstopMs: n
|
|
@@ -4444,7 +4444,7 @@ function vo() {
|
|
|
4444
4444
|
let s = o, c = {
|
|
4445
4445
|
release: i,
|
|
4446
4446
|
ready: !1,
|
|
4447
|
-
cancelReadiness:
|
|
4447
|
+
cancelReadiness: go(() => {
|
|
4448
4448
|
c.ready = !0, n(s) && t(r, s);
|
|
4449
4449
|
}, a)
|
|
4450
4450
|
};
|
|
@@ -4461,7 +4461,7 @@ function vo() {
|
|
|
4461
4461
|
}
|
|
4462
4462
|
//#endregion
|
|
4463
4463
|
//#region src/screen/observeBarHeight.ts
|
|
4464
|
-
function
|
|
4464
|
+
function bo(e, t) {
|
|
4465
4465
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4466
4466
|
let n = new ResizeObserver(([e]) => {
|
|
4467
4467
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4472,14 +4472,14 @@ function yo(e, t) {
|
|
|
4472
4472
|
}
|
|
4473
4473
|
//#endregion
|
|
4474
4474
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4475
|
-
var
|
|
4476
|
-
function
|
|
4475
|
+
var xo = 0;
|
|
4476
|
+
function So(e) {
|
|
4477
4477
|
let t = 0, n = () => {
|
|
4478
4478
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
4479
4479
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4480
4480
|
t = t < 0 ? 0 : t;
|
|
4481
|
-
let n = t -
|
|
4482
|
-
n = n < 0 ? 0 : n,
|
|
4481
|
+
let n = t - xo;
|
|
4482
|
+
n = n < 0 ? 0 : n, xo ||= t, e(t, n);
|
|
4483
4483
|
});
|
|
4484
4484
|
};
|
|
4485
4485
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -4488,14 +4488,14 @@ function xo(e) {
|
|
|
4488
4488
|
}
|
|
4489
4489
|
//#endregion
|
|
4490
4490
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4491
|
-
var
|
|
4492
|
-
function
|
|
4493
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
4494
|
-
if (
|
|
4495
|
-
|
|
4491
|
+
var Co = () => {}, wo = "data-flemo-gpu-prewarm", To = 2e3, Eo = 1200, Do = 120, Oo = 3, ko = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Ao = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", jo = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Mo = "cold", No = 0, Po = null;
|
|
4492
|
+
function Fo() {
|
|
4493
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !N()) return Co;
|
|
4494
|
+
if (No += 1, Mo === "cold") {
|
|
4495
|
+
Mo = "scheduled";
|
|
4496
4496
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4497
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
4498
|
-
|
|
4497
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: To }) : null, t = e === null ? setTimeout(n, Eo) : null;
|
|
4498
|
+
Po = () => {
|
|
4499
4499
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4500
4500
|
};
|
|
4501
4501
|
}, n = () => {
|
|
@@ -4503,13 +4503,13 @@ function Po() {
|
|
|
4503
4503
|
t();
|
|
4504
4504
|
return;
|
|
4505
4505
|
}
|
|
4506
|
-
|
|
4506
|
+
Po = null, Mo = "done";
|
|
4507
4507
|
let n = document.createElement("div");
|
|
4508
|
-
n.setAttribute(
|
|
4508
|
+
n.setAttribute(wo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", ko);
|
|
4509
4509
|
let r = document.createElement("div");
|
|
4510
|
-
r.setAttribute("style",
|
|
4510
|
+
r.setAttribute("style", Ao), r.textContent = "flemo";
|
|
4511
4511
|
let i = document.createElement("div");
|
|
4512
|
-
i.setAttribute("style",
|
|
4512
|
+
i.setAttribute("style", jo);
|
|
4513
4513
|
let a = document.createElement("div");
|
|
4514
4514
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4515
4515
|
let o = document.createElement("div");
|
|
@@ -4530,14 +4530,14 @@ function Po() {
|
|
|
4530
4530
|
c.setAttribute("style", "border-top:1px solid #ccd;padding:2px 0;"), c.textContent = "의원 기록 표결 발의 가나다라", a.append(o, s, c), n.append(r, i, a), document.body.appendChild(n);
|
|
4531
4531
|
try {
|
|
4532
4532
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4533
|
-
duration:
|
|
4534
|
-
iterations:
|
|
4533
|
+
duration: Do,
|
|
4534
|
+
iterations: Oo
|
|
4535
4535
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4536
|
-
duration:
|
|
4537
|
-
iterations:
|
|
4536
|
+
duration: Do,
|
|
4537
|
+
iterations: Oo
|
|
4538
4538
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4539
|
-
duration:
|
|
4540
|
-
iterations:
|
|
4539
|
+
duration: Do,
|
|
4540
|
+
iterations: Oo
|
|
4541
4541
|
});
|
|
4542
4542
|
} catch {}
|
|
4543
4543
|
setTimeout(() => n.remove(), 450);
|
|
@@ -4546,12 +4546,12 @@ function Po() {
|
|
|
4546
4546
|
}
|
|
4547
4547
|
let e = !1;
|
|
4548
4548
|
return () => {
|
|
4549
|
-
e || (e = !0,
|
|
4549
|
+
e || (e = !0, No = Math.max(0, No - 1), No === 0 && Mo === "scheduled" && (Po?.(), Po = null, Mo = "cold"));
|
|
4550
4550
|
};
|
|
4551
4551
|
}
|
|
4552
4552
|
//#endregion
|
|
4553
4553
|
//#region src/utils/isOpaqueColor.ts
|
|
4554
|
-
function
|
|
4554
|
+
function Io(e) {
|
|
4555
4555
|
let t = e.trim().toLowerCase();
|
|
4556
4556
|
if (t === "transparent" || t === "") return !1;
|
|
4557
4557
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4562,7 +4562,7 @@ function Fo(e) {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
//#endregion
|
|
4564
4564
|
//#region src/utils/buildRoutePath.ts
|
|
4565
|
-
function
|
|
4565
|
+
function Lo(e, n) {
|
|
4566
4566
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
4567
4567
|
return {
|
|
4568
4568
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4570,4 +4570,4 @@ function Io(e, n) {
|
|
|
4570
4570
|
};
|
|
4571
4571
|
}
|
|
4572
4572
|
//#endregion
|
|
4573
|
-
export {
|
|
4573
|
+
export { oo as ANIM_HOLD_RELEASE_BACKSTOP_MS, K as OFFLOADED_SRC_ATTR, Qn as OVERSIZE_AREA_RATIO, ha as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, ao as animHoldKey, Un as animateInline, yn as animationName, ae as appendParamsQuery, On as applyTransitionStyles, Lo as buildRoutePath, Ya as canProgrammaticallyScroll, W as clearInlineAnimation, fn as collectAnimatedProperties, Cn as compileTransitionStyles, Za as computeBarRiding, Ot as computeScreenFreeze, Dt as computeScreenFreezeMode, b as consumeSelfInducedPop, yo as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Vt as createDecorator, c as createHistoryStore, x as createHistorySync, dr as createImageDecodeOffloader, A as createMemoryHistoryDriver, te as createNavigateStore, re as createNavigationController, Gt as createPartTransition, Ht as createRawDecorator, Kt as createRawPartTransition, At as createRawTransition, me as createRouterScope, he as createScreenSelector, de as createScreenStore, _ as createSelfPopGuard, oe as createStepController, $a as createSwipeController, kt as createTransition, Ga as createTransitionEngine, ce as createTransitionStore, Ft as cupertino, R as decoratorMap, N as detectBlinkEngine, lo as eagerlyDecodeImages, mn as easingToCss, Fo as ensureGpuPipelinePrewarm, pr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Fn as enteringInitialStyle, Ka as findScrollable, l as getMatchedPathPattern, u as getParams, He as governedCompiledActive, Er as holdCompositorWarm, ye as isLegacyAndroidBlink, Io as isOpaqueColor, f as isServer, Lt as layout, Ve as lowPowerCadenceActive, y as markSelfInducedPop, le as matchesPathname, Rt as material, zt as none, bo as observeBarHeight, So as observeViewportScrollHeight, Ja as overflowsAxis, Wt as overlay, z as partTransitionMap, ft as readImageOffloadOverride, dt as readLayerPromotionFlag, ut as readPrerasterFlag, st as readSettleGateFlag, ie as readStepParams, Pn as registerTransitionDefinitions, ee as releaseScopeHistorySync, L as resolveTransition, _o as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Xa as sharedBarsMatch, or as shouldOffloadImage, rt as steadySixtyPlayerEligible, se as subscribeStepParamsRestore, pn as targetToDecls, Bt as transitionMap, H as variantHasAnimation };
|