@flemo/core 1.25.1 → 1.27.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/__tests__/createTransitionEngine.desktopHead.test.d.ts +1 -0
- package/dist/core/engine/diagnosticFlags.d.ts +4 -0
- package/dist/core/engine/driverPolicy.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +855 -860
- package/dist/transition/__tests__/compileTransitionStyles.test.d.ts +3 -0
- package/dist/transition/compileTransitionStyles.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -518,12 +518,12 @@ function k(e) {
|
|
|
518
518
|
ownsPathname: e.ownsPathname
|
|
519
519
|
}));
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function A(e) {
|
|
522
522
|
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
526
|
-
function
|
|
526
|
+
function j(e) {
|
|
527
527
|
let t = [{
|
|
528
528
|
state: e?.state ?? null,
|
|
529
529
|
url: e?.url ?? "/"
|
|
@@ -565,7 +565,7 @@ function A(e) {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/navigate/store.ts
|
|
568
|
-
function
|
|
568
|
+
function ee() {
|
|
569
569
|
return e((e) => ({
|
|
570
570
|
status: "IDLE",
|
|
571
571
|
transitionTaskId: null,
|
|
@@ -575,11 +575,11 @@ function te() {
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region src/navigate/createNavigationController.ts
|
|
578
|
-
var
|
|
578
|
+
var M = (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
|
+
}, te = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, N = 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 ne(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;
|
|
@@ -613,10 +613,10 @@ function re(e) {
|
|
|
613
613
|
}
|
|
614
614
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
615
615
|
if (u?.until != null) {
|
|
616
|
-
let e =
|
|
616
|
+
let e = M(u.until, d, f);
|
|
617
617
|
return e < 0 ? 0 : e;
|
|
618
618
|
}
|
|
619
|
-
return Math.min(
|
|
619
|
+
return Math.min(te(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 re(e) {
|
|
|
643
643
|
return g({
|
|
644
644
|
...C,
|
|
645
645
|
frameIndex: T + 1
|
|
646
|
-
}), await
|
|
646
|
+
}), await N(r, i, v, () => {
|
|
647
647
|
o(), r.pushState({
|
|
648
648
|
id: h,
|
|
649
649
|
index: T + 1,
|
|
@@ -673,10 +673,10 @@ function re(e) {
|
|
|
673
673
|
}
|
|
674
674
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
675
675
|
if (u?.until != null) {
|
|
676
|
-
let e =
|
|
676
|
+
let e = M(u.until, d, f);
|
|
677
677
|
return e < 0 ? 0 : e + 1;
|
|
678
678
|
}
|
|
679
|
-
return Math.min(
|
|
679
|
+
return Math.min(te(u?.skip, 0) + 1, d + 1);
|
|
680
680
|
})();
|
|
681
681
|
if (y <= 0) {
|
|
682
682
|
a.abort();
|
|
@@ -708,7 +708,7 @@ function re(e) {
|
|
|
708
708
|
return v(y - 1), g({
|
|
709
709
|
...w,
|
|
710
710
|
frameIndex: E
|
|
711
|
-
}), y <= d ? await
|
|
711
|
+
}), y <= d ? await N(r, i, y, () => {
|
|
712
712
|
o(), r.pushState({
|
|
713
713
|
id: h,
|
|
714
714
|
index: E,
|
|
@@ -717,7 +717,7 @@ function re(e) {
|
|
|
717
717
|
transitionName: p,
|
|
718
718
|
layoutId: m
|
|
719
719
|
}, S);
|
|
720
|
-
}) : await
|
|
720
|
+
}) : await N(r, i, d, () => {
|
|
721
721
|
o(), r.replaceState({
|
|
722
722
|
id: h,
|
|
723
723
|
index: E,
|
|
@@ -773,10 +773,10 @@ function re(e) {
|
|
|
773
773
|
pop: async (e) => {
|
|
774
774
|
await d((t, n) => {
|
|
775
775
|
if (e?.until != null) {
|
|
776
|
-
let r =
|
|
776
|
+
let r = M(e.until, t, n);
|
|
777
777
|
return r < 0 ? 0 : r;
|
|
778
778
|
}
|
|
779
|
-
let r =
|
|
779
|
+
let r = te(e?.skip, 1);
|
|
780
780
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
781
781
|
}, e?.transitionName);
|
|
782
782
|
}
|
|
@@ -784,14 +784,14 @@ function re(e) {
|
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
787
|
+
var re = (e) => {
|
|
788
788
|
let t = e;
|
|
789
789
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
790
|
+
}, ie = (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 ae(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 oe(e) {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function oe(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 se(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function se(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function ce(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function ce(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 le = (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 ue() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function de() {
|
|
|
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: le(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: le(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 de() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var de = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, fe = /* @__PURE__ */ new Map();
|
|
949
|
+
function pe(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 = fe.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();
|
|
@@ -969,7 +969,7 @@ function me(e) {
|
|
|
969
969
|
index: 0,
|
|
970
970
|
histories: [p]
|
|
971
971
|
}), e.hostedScope;
|
|
972
|
-
let m = a ?
|
|
972
|
+
let m = a ? j({
|
|
973
973
|
state: {
|
|
974
974
|
id: p.id,
|
|
975
975
|
index: 0,
|
|
@@ -979,25 +979,25 @@ function me(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? de : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
|
-
navigate:
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
984
|
+
navigate: ee(),
|
|
985
|
+
transition: se(i),
|
|
986
|
+
screen: ue(),
|
|
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) => ce(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && fe.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function me(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,82 +1010,82 @@ function he(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var P = "flemo:motion-driver-force", he = !1, ge = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(P);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(P);
|
|
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 ? (!he && typeof console < "u" && (he = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${P}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(P), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
},
|
|
1026
|
+
}, F = () => {
|
|
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
|
+
}, _e = () => {
|
|
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
|
+
}, ve = () => typeof navigator > "u" ? !1 : !F() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), ye = () => F() && typeof navigator < "u" && navigator.maxTouchPoints === 0, be = ((e = !1) => ({
|
|
1039
1039
|
playerAllowed: () => {
|
|
1040
|
-
let t =
|
|
1040
|
+
let t = ge();
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
|
-
pinnedDriver:
|
|
1044
|
-
}))(!0),
|
|
1043
|
+
pinnedDriver: ge
|
|
1044
|
+
}))(!0), xe = 28, Se = 42, Ce = 8, we = 20, Te = 6, Ee = 400, De = 8, Oe = "flemo:lpm", ke = () => !F() && 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, Le = [], I = null, Re = !1, ze = !1, Be = !1, Ve = () => {
|
|
1055
|
+
if (Re || !ke()) return;
|
|
1056
|
+
Re = !0;
|
|
1057
1057
|
let e = (t) => {
|
|
1058
|
-
if (
|
|
1059
|
-
let e = [...
|
|
1060
|
-
t[t.length - 1] - t[0] <=
|
|
1058
|
+
if (I !== null && (Le.push(t - I), Le.length > Fe && Le.shift(), Le.length >= Ie)) {
|
|
1059
|
+
let e = [...Le].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 && (ze = n >= xe && n <= Se, Be = !0);
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
I = t, requestAnimationFrame(e);
|
|
1063
1063
|
};
|
|
1064
1064
|
requestAnimationFrame(e);
|
|
1065
|
-
}, He = () =>
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
1065
|
+
}, He = () => Me || Be && ze, Ue = () => ke(), We = (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(() => We(e + 1), Ee);
|
|
1081
1081
|
};
|
|
1082
1082
|
requestAnimationFrame(r);
|
|
1083
1083
|
}, Ge = () => {
|
|
1084
|
-
Ve(), We(), !(
|
|
1084
|
+
Ve(), We(), !(Pe || typeof document > "u" || typeof document.addEventListener != "function") && (Pe = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
1085
|
document.visibilityState === "visible" && We();
|
|
1086
1086
|
}));
|
|
1087
1087
|
};
|
|
1088
|
-
|
|
1088
|
+
ke() && (Me = Ae(), Ve(), We());
|
|
1089
1089
|
var Ke = 14, qe = 22, Je = 2, Ye = 1.5, Xe = "flemo:sixty", Ze = () => {
|
|
1090
1090
|
try {
|
|
1091
1091
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(Xe) : null;
|
|
@@ -1096,8 +1096,8 @@ var Ke = 14, qe = 22, Je = 2, Ye = 1.5, Xe = "flemo:sixty", Ze = () => {
|
|
|
1096
1096
|
try {
|
|
1097
1097
|
typeof sessionStorage < "u" && sessionStorage.setItem(Xe, e);
|
|
1098
1098
|
} catch {}
|
|
1099
|
-
}, $e = Ze(), et = $e === "high", tt = $e !== null && $e !== "high" ? Math.min(Je, Math.max(0, parseInt($e, 10) || 0)) : 0, nt = (e, t) => {
|
|
1100
|
-
if (!(!Number.isFinite(e) || e <= 0)) {
|
|
1099
|
+
}, $e = Ze(), et = $e === "high", tt = $e !== null && $e !== "high" ? Math.min(Je, Math.max(0, parseInt($e, 10) || 0)) : 0, nt = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, rt = (e, t) => {
|
|
1100
|
+
if (!(!Number.isFinite(e) || e <= 0) && nt()) {
|
|
1101
1101
|
if (e < 12) {
|
|
1102
1102
|
if (t !== void 0 && t > 24) return;
|
|
1103
1103
|
et = !0, tt = 0, Qe("high");
|
|
@@ -1109,63 +1109,75 @@ var Ke = 14, qe = 22, Je = 2, Ye = 1.5, Xe = "flemo:sixty", Ze = () => {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
e < Ke && (tt = 0, et || Qe("0"));
|
|
1111
1111
|
}
|
|
1112
|
-
},
|
|
1112
|
+
}, it = () => !et && tt >= Je, at = () => it() && F() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Ye, L = (e) => {
|
|
1113
1113
|
try {
|
|
1114
1114
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1115
|
} catch {
|
|
1116
1116
|
return null;
|
|
1117
1117
|
}
|
|
1118
|
-
},
|
|
1118
|
+
}, ot = () => L("flemo:landing-snap") === "on", st = () => {
|
|
1119
1119
|
let e = L("flemo:imghold");
|
|
1120
1120
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
},
|
|
1121
|
+
}, ct = () => F() && (navigator.maxTouchPoints ?? 0) > 0, lt = () => {
|
|
1122
1122
|
try {
|
|
1123
1123
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 : Ue() ||
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : Ue() || at() || ct() || ve();
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return !1;
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1128
|
+
}, ut = () => L("flemo:handoff") === "on", dt = () => L("flemo:arrivalhold") !== "off", ft = () => {
|
|
1129
|
+
let e = L("flemo:deskflip");
|
|
1130
|
+
return e === "on" || e !== "off" && ve();
|
|
1131
|
+
}, pt = () => {
|
|
1132
|
+
let e = L("flemo:creep");
|
|
1133
|
+
return e === "on" || e !== "off" && Ue();
|
|
1134
|
+
}, mt = () => {
|
|
1135
|
+
let e = L("flemo:relcommit");
|
|
1136
|
+
return e === "defer" || e !== "sync" && Ue();
|
|
1137
|
+
}, ht = () => {
|
|
1138
|
+
let e = L("flemo:deskhead");
|
|
1139
|
+
return e === "on" || e !== "off" && ve();
|
|
1140
|
+
}, gt = () => L("flemo:preraster") === "on", _t = () => gt() || ye() || ve() || Ue(), vt = () => {
|
|
1129
1141
|
let e = L("flemo:imgoffload");
|
|
1130
1142
|
return e === "on" || e === "off" ? e : null;
|
|
1131
|
-
}, pt, mt = () => {
|
|
1132
|
-
if (pt !== void 0) return pt;
|
|
1133
|
-
let e = L("flemo:apply");
|
|
1134
|
-
return pt = e === "scrub" ? e : null, pt;
|
|
1135
|
-
}, ht, gt = () => {
|
|
1136
|
-
if (ht !== void 0) return ht;
|
|
1137
|
-
let e = L("flemo:handoff");
|
|
1138
|
-
return ht = e === "on" ? e : null, ht;
|
|
1139
|
-
}, _t, vt = () => {
|
|
1140
|
-
if (_t !== void 0) return _t;
|
|
1141
|
-
let e = L("flemo:snap");
|
|
1142
|
-
return _t = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, _t;
|
|
1143
1143
|
}, yt, bt = () => {
|
|
1144
1144
|
if (yt !== void 0) return yt;
|
|
1145
|
-
let e = L("flemo:
|
|
1146
|
-
return yt =
|
|
1145
|
+
let e = L("flemo:apply");
|
|
1146
|
+
return yt = e === "scrub" ? e : null, yt;
|
|
1147
1147
|
}, xt, St = () => {
|
|
1148
1148
|
if (xt !== void 0) return xt;
|
|
1149
|
+
let e = L("flemo:handoff");
|
|
1150
|
+
return xt = e === "on" ? e : null, xt;
|
|
1151
|
+
}, Ct, wt = () => {
|
|
1152
|
+
if (Ct !== void 0) return Ct;
|
|
1153
|
+
let e = L("flemo:snap");
|
|
1154
|
+
return Ct = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, Ct;
|
|
1155
|
+
}, Tt, Et = () => {
|
|
1156
|
+
if (Tt !== void 0) return Tt;
|
|
1157
|
+
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1158
|
+
return Tt = Number.isFinite(t) && t > 0 ? t : 4, Tt;
|
|
1159
|
+
}, Dt, Ot = () => {
|
|
1160
|
+
if (Dt !== void 0) return Dt;
|
|
1149
1161
|
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1150
|
-
return
|
|
1151
|
-
},
|
|
1152
|
-
(
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
function
|
|
1162
|
+
return Dt = Number.isFinite(t) && t >= 0 ? t : 100, Dt;
|
|
1163
|
+
}, kt, At = () => {
|
|
1164
|
+
if (kt !== void 0) return kt;
|
|
1165
|
+
let e = L("flemo:layers");
|
|
1166
|
+
return kt = e === "resident" || e !== "off" && Ue(), kt;
|
|
1167
|
+
}, jt, Mt = () => (jt === void 0 && (jt = L("flemo:freeze") === "shallow"), jt);
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region src/screen/computeScreenFreeze.ts
|
|
1170
|
+
function Nt(e) {
|
|
1159
1171
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1160
1172
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1161
|
-
return !e.isActive && t ?
|
|
1173
|
+
return !e.isActive && t ? Mt() ? "live" : "deferred" : "live";
|
|
1162
1174
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return
|
|
1175
|
+
function Pt(e) {
|
|
1176
|
+
return Nt(e) !== "live";
|
|
1165
1177
|
}
|
|
1166
1178
|
//#endregion
|
|
1167
1179
|
//#region src/transition/createTransition.ts
|
|
1168
|
-
function
|
|
1180
|
+
function Ft({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1169
1181
|
return {
|
|
1170
1182
|
name: e,
|
|
1171
1183
|
initial: t,
|
|
@@ -1186,7 +1198,7 @@ function kt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1186
1198
|
}
|
|
1187
1199
|
//#endregion
|
|
1188
1200
|
//#region src/transition/createRawTransition.ts
|
|
1189
|
-
function
|
|
1201
|
+
function It({ 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
1202
|
return {
|
|
1191
1203
|
name: e,
|
|
1192
1204
|
initial: t,
|
|
@@ -1207,15 +1219,15 @@ function At({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1207
1219
|
}
|
|
1208
1220
|
//#endregion
|
|
1209
1221
|
//#region src/transition/cupertino.ts
|
|
1210
|
-
var
|
|
1222
|
+
var Lt = (e, t, n) => {
|
|
1211
1223
|
let [r, i] = t, [a, o] = n;
|
|
1212
1224
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1213
|
-
},
|
|
1225
|
+
}, Rt = 30, zt = .7, Bt = [
|
|
1214
1226
|
.32,
|
|
1215
1227
|
.72,
|
|
1216
1228
|
0,
|
|
1217
1229
|
1
|
|
1218
|
-
],
|
|
1230
|
+
], Vt = Ft({
|
|
1219
1231
|
name: "cupertino",
|
|
1220
1232
|
initial: { x: "100%" },
|
|
1221
1233
|
idle: {
|
|
@@ -1225,29 +1237,29 @@ var jt = (e, t, n) => {
|
|
|
1225
1237
|
enter: {
|
|
1226
1238
|
value: { x: 0 },
|
|
1227
1239
|
options: {
|
|
1228
|
-
duration:
|
|
1229
|
-
ease:
|
|
1240
|
+
duration: zt,
|
|
1241
|
+
ease: Bt
|
|
1230
1242
|
}
|
|
1231
1243
|
},
|
|
1232
1244
|
enterBack: {
|
|
1233
1245
|
value: { x: "100%" },
|
|
1234
1246
|
options: {
|
|
1235
|
-
duration:
|
|
1236
|
-
ease:
|
|
1247
|
+
duration: zt,
|
|
1248
|
+
ease: Bt
|
|
1237
1249
|
}
|
|
1238
1250
|
},
|
|
1239
1251
|
exit: {
|
|
1240
|
-
value: { x: `-${
|
|
1252
|
+
value: { x: `-${Rt}%` },
|
|
1241
1253
|
options: {
|
|
1242
|
-
duration:
|
|
1243
|
-
ease:
|
|
1254
|
+
duration: zt,
|
|
1255
|
+
ease: Bt
|
|
1244
1256
|
}
|
|
1245
1257
|
},
|
|
1246
1258
|
exitBack: {
|
|
1247
1259
|
value: { x: 0 },
|
|
1248
1260
|
options: {
|
|
1249
|
-
duration:
|
|
1250
|
-
ease:
|
|
1261
|
+
duration: zt,
|
|
1262
|
+
ease: Bt
|
|
1251
1263
|
}
|
|
1252
1264
|
},
|
|
1253
1265
|
options: {
|
|
@@ -1255,24 +1267,24 @@ var jt = (e, t, n) => {
|
|
|
1255
1267
|
swipeDirection: "x",
|
|
1256
1268
|
onSwipeStart: async () => !0,
|
|
1257
1269
|
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 +
|
|
1270
|
+
let { offset: o } = t, s = o.x, c = Lt(s, [0, window.innerWidth], [0, 100]);
|
|
1271
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + Rt / 100 * c}%` }, { duration: 0 }), c;
|
|
1260
1272
|
},
|
|
1261
1273
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1262
1274
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1263
1275
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1264
1276
|
duration: .3,
|
|
1265
|
-
ease:
|
|
1266
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1277
|
+
ease: Bt
|
|
1278
|
+
}), n(i, { x: c ? 0 : `-${Rt}%` }, {
|
|
1267
1279
|
duration: .3,
|
|
1268
|
-
ease:
|
|
1280
|
+
ease: Bt
|
|
1269
1281
|
})]), c;
|
|
1270
1282
|
}
|
|
1271
1283
|
}
|
|
1272
|
-
}),
|
|
1284
|
+
}), Ht = (e, t, n) => {
|
|
1273
1285
|
let [r, i] = t, [a, o] = n;
|
|
1274
1286
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1275
|
-
},
|
|
1287
|
+
}, Ut = Ft({
|
|
1276
1288
|
name: "layout",
|
|
1277
1289
|
initial: { opacity: .97 },
|
|
1278
1290
|
idle: {
|
|
@@ -1300,7 +1312,7 @@ var jt = (e, t, n) => {
|
|
|
1300
1312
|
swipeDirection: "y",
|
|
1301
1313
|
onSwipeStart: async () => !0,
|
|
1302
1314
|
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 =
|
|
1315
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = Ht(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
1316
|
return i?.(!0, 100), n(r, {
|
|
1305
1317
|
y: f,
|
|
1306
1318
|
opacity: c
|
|
@@ -1317,7 +1329,7 @@ var jt = (e, t, n) => {
|
|
|
1317
1329
|
}, { duration: .3 })]), c;
|
|
1318
1330
|
}
|
|
1319
1331
|
}
|
|
1320
|
-
}),
|
|
1332
|
+
}), Wt = Ft({
|
|
1321
1333
|
name: "material",
|
|
1322
1334
|
initial: { y: "100%" },
|
|
1323
1335
|
idle: {
|
|
@@ -1425,7 +1437,7 @@ var jt = (e, t, n) => {
|
|
|
1425
1437
|
})]), c;
|
|
1426
1438
|
}
|
|
1427
1439
|
}
|
|
1428
|
-
}),
|
|
1440
|
+
}), Gt = Ft({
|
|
1429
1441
|
name: "none",
|
|
1430
1442
|
initial: {},
|
|
1431
1443
|
idle: {
|
|
@@ -1448,20 +1460,20 @@ var jt = (e, t, n) => {
|
|
|
1448
1460
|
value: {},
|
|
1449
1461
|
options: { duration: 0 }
|
|
1450
1462
|
}
|
|
1451
|
-
}),
|
|
1452
|
-
["none",
|
|
1453
|
-
["cupertino",
|
|
1454
|
-
["material",
|
|
1455
|
-
["layout",
|
|
1463
|
+
}), Kt = /* @__PURE__ */ new Map([
|
|
1464
|
+
["none", Gt],
|
|
1465
|
+
["cupertino", Vt],
|
|
1466
|
+
["material", Wt],
|
|
1467
|
+
["layout", Ut]
|
|
1456
1468
|
]);
|
|
1457
1469
|
//#endregion
|
|
1458
1470
|
//#region src/transition/resolveTransition.ts
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1471
|
+
function qt(e) {
|
|
1472
|
+
return Kt.get(e) ?? Kt.get("none");
|
|
1461
1473
|
}
|
|
1462
1474
|
//#endregion
|
|
1463
1475
|
//#region src/transition/decorator/createDecorator.ts
|
|
1464
|
-
function
|
|
1476
|
+
function Jt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1465
1477
|
return {
|
|
1466
1478
|
name: e,
|
|
1467
1479
|
initial: t,
|
|
@@ -1482,7 +1494,7 @@ function Vt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1482
1494
|
}
|
|
1483
1495
|
//#endregion
|
|
1484
1496
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1485
|
-
function
|
|
1497
|
+
function Yt({ 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
1498
|
return {
|
|
1487
1499
|
name: e,
|
|
1488
1500
|
initial: t,
|
|
@@ -1503,30 +1515,30 @@ function Ht({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1503
1515
|
}
|
|
1504
1516
|
//#endregion
|
|
1505
1517
|
//#region src/transition/decorator/overlay.ts
|
|
1506
|
-
var
|
|
1518
|
+
var Xt = "rgba(0, 0, 0, 0.1)", Zt = Jt({
|
|
1507
1519
|
name: "overlay",
|
|
1508
1520
|
initial: {
|
|
1509
1521
|
opacity: 0,
|
|
1510
|
-
backgroundColor:
|
|
1522
|
+
backgroundColor: Xt
|
|
1511
1523
|
},
|
|
1512
1524
|
idle: {
|
|
1513
1525
|
value: {
|
|
1514
1526
|
opacity: 0,
|
|
1515
|
-
backgroundColor:
|
|
1527
|
+
backgroundColor: Xt
|
|
1516
1528
|
},
|
|
1517
1529
|
options: { duration: 0 }
|
|
1518
1530
|
},
|
|
1519
1531
|
enter: {
|
|
1520
1532
|
value: {
|
|
1521
1533
|
opacity: 1,
|
|
1522
|
-
backgroundColor:
|
|
1534
|
+
backgroundColor: Xt
|
|
1523
1535
|
},
|
|
1524
1536
|
options: { duration: .7 }
|
|
1525
1537
|
},
|
|
1526
1538
|
exit: {
|
|
1527
1539
|
value: {
|
|
1528
1540
|
opacity: 0,
|
|
1529
|
-
backgroundColor:
|
|
1541
|
+
backgroundColor: Xt
|
|
1530
1542
|
},
|
|
1531
1543
|
options: { duration: .7 }
|
|
1532
1544
|
},
|
|
@@ -1535,10 +1547,10 @@ var Ut = "rgba(0, 0, 0, 0.1)", Wt = Vt({
|
|
|
1535
1547
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1536
1548
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1537
1549
|
}
|
|
1538
|
-
}),
|
|
1550
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Zt]]);
|
|
1539
1551
|
//#endregion
|
|
1540
1552
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1541
|
-
function
|
|
1553
|
+
function Qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1542
1554
|
return {
|
|
1543
1555
|
name: e,
|
|
1544
1556
|
initial: t,
|
|
@@ -1559,7 +1571,7 @@ function Gt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1559
1571
|
}
|
|
1560
1572
|
//#endregion
|
|
1561
1573
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1562
|
-
function
|
|
1574
|
+
function $t({ 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
1575
|
return {
|
|
1564
1576
|
name: e,
|
|
1565
1577
|
initial: t,
|
|
@@ -1580,7 +1592,7 @@ function Kt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1580
1592
|
}
|
|
1581
1593
|
//#endregion
|
|
1582
1594
|
//#region src/transition/partTransition/partTransition.ts
|
|
1583
|
-
var
|
|
1595
|
+
var z = /* @__PURE__ */ new Map(), en = {
|
|
1584
1596
|
"IDLE-true": "self",
|
|
1585
1597
|
"IDLE-false": "self",
|
|
1586
1598
|
"PUSHING-true": "initial",
|
|
@@ -1591,17 +1603,17 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1591
1603
|
"POPPING-false": "PUSHING-false",
|
|
1592
1604
|
"COMPLETED-true": "self",
|
|
1593
1605
|
"COMPLETED-false": "self"
|
|
1594
|
-
},
|
|
1606
|
+
}, tn = Object.keys(en), nn = (e) => {
|
|
1595
1607
|
if (!e) return 0;
|
|
1596
1608
|
let t = e.duration;
|
|
1597
1609
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1598
|
-
},
|
|
1599
|
-
let n =
|
|
1610
|
+
}, rn = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, an = (e, t) => {
|
|
1611
|
+
let n = en[t];
|
|
1600
1612
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1601
|
-
},
|
|
1602
|
-
let n =
|
|
1613
|
+
}, B = (e, t) => {
|
|
1614
|
+
let n = an(e, t);
|
|
1603
1615
|
if (n === null) return null;
|
|
1604
|
-
let r = e.variants[t], i =
|
|
1616
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1605
1617
|
return i <= 0 && a <= 0 ? null : {
|
|
1606
1618
|
from: n,
|
|
1607
1619
|
to: r.value,
|
|
@@ -1609,7 +1621,7 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1609
1621
|
delay: a,
|
|
1610
1622
|
ease: r.options?.ease
|
|
1611
1623
|
};
|
|
1612
|
-
},
|
|
1624
|
+
}, on = tn, sn = "translateZ(0.02px)", cn = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ln = (e) => typeof e == "object" && !!e && !Array.isArray(e), un = /* @__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(".")), dn = (e, t) => t.startsWith("--") || un.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, fn = (e, t) => typeof t == "number" ? dn(t, e) : typeof t == "string" ? t : "", pn = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), mn = /* @__PURE__ */ new Set([
|
|
1613
1625
|
"x",
|
|
1614
1626
|
"y",
|
|
1615
1627
|
"z",
|
|
@@ -1620,7 +1632,7 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1620
1632
|
"rotateX",
|
|
1621
1633
|
"rotateY",
|
|
1622
1634
|
"rotateZ"
|
|
1623
|
-
]),
|
|
1635
|
+
]), hn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, gn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, _n = /^1(\.0+)?$/, vn = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && _n.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && gn.test(t.trim()) : t === 0 || typeof t == "string" && hn.test(t.trim()), yn = (e, t) => {
|
|
1624
1636
|
switch (e) {
|
|
1625
1637
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1626
1638
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1634,16 +1646,16 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1634
1646
|
case "rotateY": return `rotateY(${t})`;
|
|
1635
1647
|
default: return "";
|
|
1636
1648
|
}
|
|
1637
|
-
},
|
|
1649
|
+
}, bn = (e) => {
|
|
1638
1650
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1639
|
-
if (!
|
|
1651
|
+
if (!ln(e)) return;
|
|
1640
1652
|
let n = [];
|
|
1641
1653
|
for (let r of Object.keys(e)) {
|
|
1642
|
-
let i = e[r], a =
|
|
1643
|
-
if (a !== "") if (
|
|
1654
|
+
let i = e[r], a = fn(r, i);
|
|
1655
|
+
if (a !== "") if (mn.has(r)) n.push(`${r}:${a}`);
|
|
1644
1656
|
else {
|
|
1645
|
-
let e = t.get(
|
|
1646
|
-
e.add(a), t.set(
|
|
1657
|
+
let e = t.get(pn(r)) ?? /* @__PURE__ */ new Set();
|
|
1658
|
+
e.add(a), t.set(pn(r), e);
|
|
1647
1659
|
}
|
|
1648
1660
|
}
|
|
1649
1661
|
r.add(n.sort().join("|"));
|
|
@@ -1653,13 +1665,13 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1653
1665
|
n = r.size > 1;
|
|
1654
1666
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1655
1667
|
return n && a.push("transform"), a;
|
|
1656
|
-
},
|
|
1657
|
-
if (!
|
|
1668
|
+
}, xn = (e) => {
|
|
1669
|
+
if (!ln(e)) return [];
|
|
1658
1670
|
let t = [], n = !0, r = [];
|
|
1659
1671
|
for (let i of Object.keys(e)) {
|
|
1660
|
-
let a = e[i], o =
|
|
1661
|
-
o !== "" && (
|
|
1662
|
-
property:
|
|
1672
|
+
let a = e[i], o = fn(i, a);
|
|
1673
|
+
o !== "" && (mn.has(i) ? (t.push(yn(i, o)), vn(i, a) || (n = !1)) : r.push({
|
|
1674
|
+
property: pn(i),
|
|
1663
1675
|
value: o
|
|
1664
1676
|
}));
|
|
1665
1677
|
}
|
|
@@ -1667,7 +1679,7 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1667
1679
|
property: "transform",
|
|
1668
1680
|
value: n ? "none" : t.join(" ")
|
|
1669
1681
|
}), r;
|
|
1670
|
-
},
|
|
1682
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Sn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1671
1683
|
linear: "linear",
|
|
1672
1684
|
easeIn: "ease-in",
|
|
1673
1685
|
easeOut: "ease-out",
|
|
@@ -1677,101 +1689,119 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1677
1689
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1678
1690
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1679
1691
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1680
|
-
}[e] ?? "ease" : "ease",
|
|
1692
|
+
}[e] ?? "ease" : "ease", Cn = (e, t) => {
|
|
1681
1693
|
let [n, r] = t.split("-");
|
|
1682
1694
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1683
|
-
},
|
|
1695
|
+
}, wn = (e, t) => {
|
|
1684
1696
|
let [n, r] = t.split("-");
|
|
1685
1697
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1686
|
-
},
|
|
1698
|
+
}, Tn = (e, t) => {
|
|
1687
1699
|
let [n, r] = t.split("-");
|
|
1688
1700
|
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
|
-
},
|
|
1701
|
+
}, En = (e, t) => {
|
|
1690
1702
|
let [n, r] = t.split("-");
|
|
1691
1703
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1704
|
+
}, Dn = (e, t, n) => `flemo-${e}-${cn(t)}-${n}`, On = [
|
|
1705
|
+
"-lpm",
|
|
1706
|
+
"-deskhead",
|
|
1707
|
+
"-lpmcreep"
|
|
1708
|
+
], kn = (e, t) => e === t || On.some((n) => e === `${t}${n}`), An = (e, t, n, r, i, a) => {
|
|
1709
|
+
let o = xn(r), s = xn(i.value), c = new Set(o.filter((e) => s.some((t) => t.property === e.property && t.value === e.value)).map((e) => e.property)), l = o.filter((e) => c.has(e.property)), u = o.filter((e) => !c.has(e.property)), d = s.filter((e) => !c.has(e.property)), f = nn(i.options), p = rn(i.options), m = Sn(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${Tn(t, n)}` : h;
|
|
1694
1710
|
if (s.length === 0 && o.length === 0) return "";
|
|
1695
|
-
if (
|
|
1696
|
-
let
|
|
1697
|
-
`@keyframes ${
|
|
1711
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${V(s)}\n animation: none;\n}`;
|
|
1712
|
+
let _ = Dn(e, t, n), v = [
|
|
1713
|
+
`@keyframes ${_} {`,
|
|
1698
1714
|
" from {",
|
|
1699
|
-
|
|
1715
|
+
V(u).replace(/^/gm, " "),
|
|
1700
1716
|
" }",
|
|
1701
1717
|
" to {",
|
|
1702
|
-
|
|
1718
|
+
V(d).replace(/^/gm, " "),
|
|
1703
1719
|
" }",
|
|
1704
1720
|
"}"
|
|
1705
|
-
].join("\n"),
|
|
1706
|
-
`${
|
|
1707
|
-
`${
|
|
1708
|
-
|
|
1709
|
-
|
|
1721
|
+
].join("\n"), y = [
|
|
1722
|
+
`${_}`,
|
|
1723
|
+
`${f}s`,
|
|
1724
|
+
m,
|
|
1725
|
+
p > 0 ? `${p}s` : null,
|
|
1710
1726
|
"both"
|
|
1711
|
-
].filter(Boolean).join(" "),
|
|
1727
|
+
].filter(Boolean).join(" "), b = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, x = (e) => e.startsWith("REPLACING") || e.startsWith("PUSHING") ? .033 : e.startsWith("POPPING") ? .017 : 0, S = (t, n, r, i) => {
|
|
1728
|
+
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1729
|
+
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1730
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${V(u).replace(/^/gm, " ")}\n }\n 100% {\n${V(d).replace(/^/gm, " ")}\n }\n}\n${m} {\n animation-name: ${l};\n animation-duration: ${a.toFixed(3)}s;\n animation-delay: ${(i ? p + r : p).toFixed(3)}s;\n}`;
|
|
1731
|
+
}, C = (t, n) => e !== "part" || n <= 0 || f <= 0 ? "" : `\n${((e = "") => g.split(",\n").map((n) => `:root[${t}]${e} ${n}`).join(",\n"))()} {\n animation-delay: ${(p + n).toFixed(3)}s;\n}`, w = (() => {
|
|
1732
|
+
/* v8 ignore next */
|
|
1712
1733
|
if (e === "part") return "";
|
|
1713
|
-
let t =
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1734
|
+
let t = b(n);
|
|
1735
|
+
/* v8 ignore next -- same guard as headBlock's: a variant with nothing to
|
|
1736
|
+
animate never reaches a head. */
|
|
1737
|
+
if (t <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1738
|
+
let r = (() => {
|
|
1739
|
+
let e = u.find((e) => e.property === "transform");
|
|
1740
|
+
if (!e) return [...u, {
|
|
1741
|
+
property: "transform",
|
|
1742
|
+
value: sn
|
|
1743
|
+
}];
|
|
1744
|
+
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1745
|
+
return u.map((e) => e.property === "transform" ? {
|
|
1746
|
+
property: "transform",
|
|
1747
|
+
value: `${t}${sn}`
|
|
1748
|
+
} : e);
|
|
1749
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-lpmcreep`, l = g.split(",\n").map((e) => `:root[data-flemo-lpm][data-flemo-creep] ${e}`).join(",\n");
|
|
1750
|
+
return `\n@keyframes ${c} {\n 0% {\n${V(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${V(r).replace(/^/gm, " ")}\n }\n 100% {\n${V(d).replace(/^/gm, " ")}\n }\n}\n${l} {\n animation-name: ${c};\n animation-duration: ${i.toFixed(3)}s;\n animation-delay: ${(p + t).toFixed(3)}s;\n}`;
|
|
1751
|
+
})(), T = S("data-flemo-lpm", "lpm", b(n), !0), E = C("data-flemo-lpm", b(n)), D = S("data-flemo-desk-head", "deskhead", x(n), !1), O = C("data-flemo-desk-head", x(n)), k = new Map(u.map((e) => [e.property, e.value])), A = new Map(d.map((e) => [e.property, e.value])), j = Array.from(/* @__PURE__ */ new Set([...k.keys(), ...A.keys()])).filter((e) => k.get(e) !== A.get(e)), ee = j.length > 0 ? ` will-change: ${j.join(", ")};\n` : "", M = n.split("-")[0], te = M === "PUSHING" || M === "REPLACING" ? " contain: layout;\n" : "";
|
|
1752
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${V(l)}\n` : ""}${ee}${te}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1753
|
+
}, jn = (e) => {
|
|
1724
1754
|
if (!e) return !1;
|
|
1725
1755
|
if (e.opacity === 0) return !0;
|
|
1726
1756
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1727
1757
|
return t(e.x) || t(e.y);
|
|
1728
|
-
},
|
|
1729
|
-
let i =
|
|
1730
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1731
|
-
},
|
|
1758
|
+
}, Mn = (e, t, n, r) => {
|
|
1759
|
+
let i = xn(r.value);
|
|
1760
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1761
|
+
}, Nn = (e, t, n = []) => {
|
|
1732
1762
|
let r = [];
|
|
1733
1763
|
for (let t of e) {
|
|
1734
1764
|
let e = t.name;
|
|
1735
|
-
for (let n of
|
|
1736
|
-
let i = t.variants[n], a =
|
|
1765
|
+
for (let n of tn) {
|
|
1766
|
+
let i = t.variants[n], a = en[n];
|
|
1737
1767
|
if (a === "self") {
|
|
1738
|
-
r.push(
|
|
1768
|
+
r.push(Mn(Cn, e, n, i));
|
|
1739
1769
|
continue;
|
|
1740
1770
|
}
|
|
1741
1771
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1742
|
-
r.push(
|
|
1772
|
+
r.push(An("screen", e, n, o, i, Cn));
|
|
1743
1773
|
}
|
|
1744
1774
|
}
|
|
1745
1775
|
for (let e of t) {
|
|
1746
1776
|
let t = e.name;
|
|
1747
|
-
for (let n of
|
|
1748
|
-
let i = e.variants[n], a =
|
|
1777
|
+
for (let n of on) {
|
|
1778
|
+
let i = e.variants[n], a = en[n];
|
|
1749
1779
|
if (a === "self") {
|
|
1750
|
-
r.push(
|
|
1780
|
+
r.push(Mn(wn, t, n, i));
|
|
1751
1781
|
continue;
|
|
1752
1782
|
}
|
|
1753
1783
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1754
|
-
r.push(
|
|
1784
|
+
r.push(An("decorator", t, n, o, i, wn));
|
|
1755
1785
|
}
|
|
1756
1786
|
}
|
|
1757
1787
|
for (let e of n) {
|
|
1758
1788
|
let t = e.name;
|
|
1759
|
-
for (let n of
|
|
1760
|
-
let i = e.variants[n], a =
|
|
1789
|
+
for (let n of on) {
|
|
1790
|
+
let i = e.variants[n], a = en[n];
|
|
1761
1791
|
if (a === "self") {
|
|
1762
|
-
r.push(
|
|
1792
|
+
r.push(Mn(En, t, n, i));
|
|
1763
1793
|
continue;
|
|
1764
1794
|
}
|
|
1765
1795
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1766
|
-
r.push(
|
|
1796
|
+
r.push(An("part", t, n, o, i, En));
|
|
1767
1797
|
}
|
|
1768
1798
|
}
|
|
1769
1799
|
return [
|
|
1770
1800
|
...r.filter((e) => e.length > 0),
|
|
1771
|
-
|
|
1772
|
-
|
|
1801
|
+
Pn,
|
|
1802
|
+
Fn
|
|
1773
1803
|
].join("\n\n");
|
|
1774
|
-
},
|
|
1804
|
+
}, Pn = [
|
|
1775
1805
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1776
1806
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1777
1807
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1782,49 +1812,53 @@ var B = /* @__PURE__ */ new Map(), qt = {
|
|
|
1782
1812
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1783
1813
|
" animation-play-state: paused !important;",
|
|
1784
1814
|
"}"
|
|
1785
|
-
].join("\n"),
|
|
1815
|
+
].join("\n"), Fn = [
|
|
1786
1816
|
"[data-flemo-held-arrival] {",
|
|
1787
1817
|
" display: none !important;",
|
|
1788
1818
|
"}"
|
|
1789
|
-
].join("\n"),
|
|
1790
|
-
let n =
|
|
1819
|
+
].join("\n"), H = (e, t) => {
|
|
1820
|
+
let n = en[t];
|
|
1791
1821
|
if (n === "self") return !1;
|
|
1792
|
-
let r = e.variants[t], i =
|
|
1822
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1793
1823
|
if (i <= 0 && a <= 0) return !1;
|
|
1794
|
-
let o =
|
|
1824
|
+
let o = xn(n === "initial" ? e.initial : e.variants[n].value), s = xn(r.value);
|
|
1795
1825
|
return o.length > 0 || s.length > 0;
|
|
1796
|
-
},
|
|
1826
|
+
}, In = {
|
|
1827
|
+
REPLACING: 33,
|
|
1828
|
+
PUSHING: 33,
|
|
1829
|
+
POPPING: 17
|
|
1830
|
+
}, Ln = {
|
|
1797
1831
|
REPLACING: 180,
|
|
1798
1832
|
PUSHING: 100,
|
|
1799
1833
|
POPPING: 80
|
|
1800
|
-
},
|
|
1801
|
-
function
|
|
1834
|
+
}, Rn = "data-flemo";
|
|
1835
|
+
function zn() {
|
|
1802
1836
|
if (f()) return;
|
|
1803
|
-
let e =
|
|
1804
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1837
|
+
let e = Nn(Kt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${Rn}]`);
|
|
1838
|
+
t || (t = document.createElement("style"), t.setAttribute(Rn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1805
1839
|
}
|
|
1806
1840
|
//#endregion
|
|
1807
1841
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1808
|
-
var
|
|
1842
|
+
var Bn = /* @__PURE__ */ new Map(), Vn = /* @__PURE__ */ new Map(), Hn = /* @__PURE__ */ new Map(), Un = (e, t) => {
|
|
1809
1843
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1810
|
-
},
|
|
1844
|
+
}, Wn = (e, t) => {
|
|
1811
1845
|
let n = (e.get(t) ?? 1) - 1;
|
|
1812
1846
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1813
1847
|
};
|
|
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)
|
|
1822
|
-
|
|
1848
|
+
function Gn(e, t, n = []) {
|
|
1849
|
+
for (let t of e) Kt.set(t.name, t), Un(Bn, t.name);
|
|
1850
|
+
for (let e of t) R.set(e.name, e), Un(Vn, e.name);
|
|
1851
|
+
for (let e of n) z.set(e.name, e), Un(Hn, e.name);
|
|
1852
|
+
return zn(), () => {
|
|
1853
|
+
for (let t of e) Wn(Bn, t.name) && Kt.delete(t.name);
|
|
1854
|
+
for (let e of t) Wn(Vn, e.name) && R.delete(e.name);
|
|
1855
|
+
for (let e of n) Wn(Hn, e.name) && z.delete(e.name);
|
|
1856
|
+
zn();
|
|
1823
1857
|
};
|
|
1824
1858
|
}
|
|
1825
1859
|
//#endregion
|
|
1826
1860
|
//#region src/transition/enteringInitialStyle.ts
|
|
1827
|
-
function
|
|
1861
|
+
function Kn(e) {
|
|
1828
1862
|
let { initial: t, isActive: n, status: r } = e;
|
|
1829
1863
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1830
1864
|
let i = {};
|
|
@@ -1832,10 +1866,10 @@ function Fn(e) {
|
|
|
1832
1866
|
}
|
|
1833
1867
|
//#endregion
|
|
1834
1868
|
//#region src/transition/settleScrub.ts
|
|
1835
|
-
var
|
|
1869
|
+
var qn = () => ({
|
|
1836
1870
|
request: (e) => requestAnimationFrame(e),
|
|
1837
1871
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1838
|
-
}),
|
|
1872
|
+
}), Jn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Yn = ((e = qn()) => {
|
|
1839
1873
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1840
1874
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1841
1875
|
}, i = (e, n) => {
|
|
@@ -1868,7 +1902,7 @@ var In = () => ({
|
|
|
1868
1902
|
if (typeof r.animate != "function") return null;
|
|
1869
1903
|
i(r, "current");
|
|
1870
1904
|
let u = {};
|
|
1871
|
-
for (let e of o) u[
|
|
1905
|
+
for (let e of o) u[Jn(e.property)] = e.value;
|
|
1872
1906
|
let d;
|
|
1873
1907
|
try {
|
|
1874
1908
|
d = r.animate([u], {
|
|
@@ -1905,18 +1939,18 @@ var In = () => ({
|
|
|
1905
1939
|
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1906
1940
|
}
|
|
1907
1941
|
};
|
|
1908
|
-
})(),
|
|
1909
|
-
let r =
|
|
1910
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
1942
|
+
})(), Xn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Zn = /* @__PURE__ */ new WeakMap(), Qn = Symbol("flemo-inline-writer"), $n = /* @__PURE__ */ new WeakMap(), U = (e, t, n = Qn) => {
|
|
1943
|
+
let r = Zn.get(e);
|
|
1944
|
+
r || (r = /* @__PURE__ */ new Map(), Zn.set(e, r));
|
|
1911
1945
|
let i = r.get(t);
|
|
1912
1946
|
i || (i = {
|
|
1913
1947
|
original: e.style.getPropertyValue(t),
|
|
1914
1948
|
owners: /* @__PURE__ */ new Set()
|
|
1915
1949
|
}, r.set(t, i)), i.owners.add(n);
|
|
1916
|
-
},
|
|
1917
|
-
|
|
1918
|
-
let r =
|
|
1919
|
-
(!n ||
|
|
1950
|
+
}, W = (e, t, n) => {
|
|
1951
|
+
Yn.cancel(e, n);
|
|
1952
|
+
let r = Zn.get(e);
|
|
1953
|
+
(!n || $n.get(e) === n) && (e.style.transition = "", $n.delete(e));
|
|
1920
1954
|
let i = (t) => {
|
|
1921
1955
|
let i = r?.get(t);
|
|
1922
1956
|
if (!i) {
|
|
@@ -1934,27 +1968,27 @@ var In = () => ({
|
|
|
1934
1968
|
return;
|
|
1935
1969
|
}
|
|
1936
1970
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1937
|
-
},
|
|
1938
|
-
if (!
|
|
1939
|
-
let i = e, a =
|
|
1971
|
+
}, er = (e, t, n = {}, r) => {
|
|
1972
|
+
if (!Xn(e)) return Promise.resolve();
|
|
1973
|
+
let i = e, a = xn(t);
|
|
1940
1974
|
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 =
|
|
1975
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = Sn(n.ease);
|
|
1942
1976
|
if (o <= 0 && s <= 0) {
|
|
1943
|
-
|
|
1944
|
-
for (let e of a)
|
|
1977
|
+
Yn.takeover(i, r), i.style.transition = "none", $n.set(i, r);
|
|
1978
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1945
1979
|
return Promise.resolve();
|
|
1946
1980
|
}
|
|
1947
|
-
let l =
|
|
1981
|
+
let l = be.playerAllowed() ? Yn.settle(i, a, {
|
|
1948
1982
|
durationMs: o * 1e3,
|
|
1949
1983
|
delayMs: s * 1e3,
|
|
1950
1984
|
easing: c
|
|
1951
1985
|
}, (e) => {
|
|
1952
|
-
|
|
1986
|
+
U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1953
1987
|
}, r) : null;
|
|
1954
1988
|
if (l) return l;
|
|
1955
1989
|
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1956
|
-
i.style.transition = u,
|
|
1957
|
-
for (let e of a)
|
|
1990
|
+
i.style.transition = u, $n.set(i, r), i.offsetWidth;
|
|
1991
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1958
1992
|
return new Promise((e) => {
|
|
1959
1993
|
let t = !1, n = () => {
|
|
1960
1994
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1963,65 +1997,65 @@ var In = () => ({
|
|
|
1963
1997
|
};
|
|
1964
1998
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1965
1999
|
});
|
|
1966
|
-
},
|
|
2000
|
+
}, tr = (e) => {
|
|
1967
2001
|
if (typeof e.querySelectorAll == "function") {
|
|
1968
2002
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1969
2003
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1970
2004
|
}
|
|
1971
|
-
},
|
|
1972
|
-
function
|
|
1973
|
-
let e =
|
|
1974
|
-
if (
|
|
2005
|
+
}, nr = 0, rr = [], ir = [];
|
|
2006
|
+
function ar() {
|
|
2007
|
+
let e = nr === 0;
|
|
2008
|
+
if (nr += 1, e) for (let e of ir) e();
|
|
1975
2009
|
let t = !1;
|
|
1976
2010
|
return () => {
|
|
1977
|
-
if (t || (t = !0, --
|
|
1978
|
-
let e =
|
|
1979
|
-
|
|
2011
|
+
if (t || (t = !0, --nr, nr > 0)) return;
|
|
2012
|
+
let e = rr;
|
|
2013
|
+
rr = [];
|
|
1980
2014
|
for (let t of e) t();
|
|
1981
2015
|
};
|
|
1982
2016
|
}
|
|
1983
|
-
var
|
|
1984
|
-
function
|
|
1985
|
-
return
|
|
1986
|
-
|
|
2017
|
+
var G = () => nr > 0;
|
|
2018
|
+
function or(e) {
|
|
2019
|
+
return ir.push(e), () => {
|
|
2020
|
+
ir = ir.filter((t) => t !== e);
|
|
1987
2021
|
};
|
|
1988
2022
|
}
|
|
1989
|
-
function
|
|
1990
|
-
|
|
2023
|
+
function sr(e) {
|
|
2024
|
+
nr === 0 ? e() : rr.push(e);
|
|
1991
2025
|
}
|
|
1992
2026
|
//#endregion
|
|
1993
2027
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1994
|
-
var
|
|
2028
|
+
var cr = 8, lr = 2, K = 96, ur = 15e3, dr = 3e3, fr = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = "data-flemo-image-src", pr = "flemo-image-scale-v1", mr = /* @__PURE__ */ new Set([
|
|
1995
2029
|
"PUSHING",
|
|
1996
2030
|
"POPPING",
|
|
1997
2031
|
"REPLACING"
|
|
1998
|
-
]),
|
|
2032
|
+
]), hr = (e) => {
|
|
1999
2033
|
let t = e.closest("[data-flemo-screen]");
|
|
2000
|
-
return !!t &&
|
|
2001
|
-
},
|
|
2034
|
+
return !!t && mr.has(t.getAttribute("data-flemo-status") ?? "");
|
|
2035
|
+
}, gr = (e) => {
|
|
2002
2036
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2003
2037
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2004
2038
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2005
|
-
},
|
|
2039
|
+
}, _r = "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};", vr = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", yr = async (e, t) => {
|
|
2006
2040
|
try {
|
|
2007
2041
|
if (typeof caches > "u") return;
|
|
2008
|
-
await (await caches.open(
|
|
2042
|
+
await (await caches.open(pr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2009
2043
|
} catch {}
|
|
2010
|
-
},
|
|
2044
|
+
}, br = async (e) => {
|
|
2011
2045
|
try {
|
|
2012
2046
|
if (typeof caches > "u") return null;
|
|
2013
|
-
let t = await (await caches.open(
|
|
2047
|
+
let t = await (await caches.open(pr)).match(e);
|
|
2014
2048
|
return t ? await t.blob() : null;
|
|
2015
2049
|
} catch {
|
|
2016
2050
|
return null;
|
|
2017
2051
|
}
|
|
2018
2052
|
};
|
|
2019
|
-
function
|
|
2020
|
-
if (!
|
|
2053
|
+
function xr(e) {
|
|
2054
|
+
if (!vr()) return () => {};
|
|
2021
2055
|
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
2056
|
if (t) return t;
|
|
2023
2057
|
try {
|
|
2024
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
2058
|
+
t = new Worker(URL.createObjectURL(new Blob([_r])));
|
|
2025
2059
|
} catch {
|
|
2026
2060
|
return null;
|
|
2027
2061
|
}
|
|
@@ -2036,7 +2070,7 @@ function dr(e) {
|
|
|
2036
2070
|
return;
|
|
2037
2071
|
}
|
|
2038
2072
|
let a = URL.createObjectURL(n);
|
|
2039
|
-
l.add(a),
|
|
2073
|
+
l.add(a), yr(t, n), f(t, a);
|
|
2040
2074
|
}, t;
|
|
2041
2075
|
}, f = (e, t) => {
|
|
2042
2076
|
r.has(e) || r.set(e, t);
|
|
@@ -2045,21 +2079,21 @@ function dr(e) {
|
|
|
2045
2079
|
let n = () => {
|
|
2046
2080
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2047
2081
|
};
|
|
2048
|
-
if (!
|
|
2082
|
+
if (!G()) {
|
|
2049
2083
|
n();
|
|
2050
2084
|
return;
|
|
2051
2085
|
}
|
|
2052
2086
|
let r = !1, i = () => {
|
|
2053
2087
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2054
|
-
}, o = setTimeout(i,
|
|
2055
|
-
a.add(i),
|
|
2088
|
+
}, o = setTimeout(i, dr);
|
|
2089
|
+
a.add(i), sr(i);
|
|
2056
2090
|
}, m = (e, t) => {
|
|
2057
2091
|
let n = () => {
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2092
|
+
if (G()) {
|
|
2093
|
+
sr(t);
|
|
2060
2094
|
return;
|
|
2061
2095
|
}
|
|
2062
|
-
if (!
|
|
2096
|
+
if (!hr(e) || typeof requestAnimationFrame != "function") {
|
|
2063
2097
|
t();
|
|
2064
2098
|
return;
|
|
2065
2099
|
}
|
|
@@ -2071,9 +2105,9 @@ function dr(e) {
|
|
|
2071
2105
|
e.style.visibility = "hidden";
|
|
2072
2106
|
let r = !1, i = () => {
|
|
2073
2107
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2074
|
-
}, o = setTimeout(i,
|
|
2108
|
+
}, o = setTimeout(i, dr);
|
|
2075
2109
|
a.add(i), m(e, i);
|
|
2076
|
-
}, g = (e, t) => !
|
|
2110
|
+
}, g = (e, t) => !G() && !hr(e) ? !1 : (e.setAttribute(q, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2077
2111
|
e.setAttribute(q, t), e.src = a, h(e, () => {
|
|
2078
2112
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2079
2113
|
if (n) return;
|
|
@@ -2090,7 +2124,7 @@ function dr(e) {
|
|
|
2090
2124
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2091
2125
|
e.src = t;
|
|
2092
2126
|
}
|
|
2093
|
-
} else e.getAttribute("src") ===
|
|
2127
|
+
} else e.getAttribute("src") === fr && (i(t) ? e.src = t : (e.removeAttribute(q), e.src = n.url));
|
|
2094
2128
|
p(e, n.previousVisibility);
|
|
2095
2129
|
}
|
|
2096
2130
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2099,14 +2133,14 @@ function dr(e) {
|
|
|
2099
2133
|
y.clear();
|
|
2100
2134
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2101
2135
|
}, S = () => {
|
|
2102
|
-
b || (b = !0,
|
|
2136
|
+
b || (b = !0, sr(() => {
|
|
2103
2137
|
if (n) return;
|
|
2104
2138
|
let e = globalThis.requestIdleCallback;
|
|
2105
2139
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2106
2140
|
}));
|
|
2107
2141
|
}, C = (e, t, n) => {
|
|
2108
2142
|
if (r.has(e) || o.has(e)) return;
|
|
2109
|
-
if (
|
|
2143
|
+
if (G() && F()) {
|
|
2110
2144
|
y.has(e) || y.set(e, {
|
|
2111
2145
|
boxWidth: t,
|
|
2112
2146
|
boxHeight: n
|
|
@@ -2116,15 +2150,15 @@ function dr(e) {
|
|
|
2116
2150
|
let i = d();
|
|
2117
2151
|
if (!i) return;
|
|
2118
2152
|
o.add(e);
|
|
2119
|
-
let a = Math.round(Math.max(K, t * u()) *
|
|
2153
|
+
let a = Math.round(Math.max(K, t * u()) * lr), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2120
2154
|
i.postMessage({
|
|
2121
2155
|
url: e,
|
|
2122
2156
|
targetWidth: a,
|
|
2123
2157
|
neededArea: s,
|
|
2124
2158
|
ratio: 8
|
|
2125
2159
|
});
|
|
2126
|
-
}, w =
|
|
2127
|
-
if (
|
|
2160
|
+
}, w = or(() => {
|
|
2161
|
+
if (F() && !(!t || o.size === 0)) {
|
|
2128
2162
|
t.terminate(), t = null;
|
|
2129
2163
|
for (let e of o) {
|
|
2130
2164
|
if (y.has(e)) continue;
|
|
@@ -2151,13 +2185,13 @@ function dr(e) {
|
|
|
2151
2185
|
let a = {
|
|
2152
2186
|
url: "",
|
|
2153
2187
|
previousVisibility: e.style.visibility,
|
|
2154
|
-
timeout: setTimeout(() => v(e, null),
|
|
2188
|
+
timeout: setTimeout(() => v(e, null), ur),
|
|
2155
2189
|
responsive: !0
|
|
2156
2190
|
}, o = () => {
|
|
2157
2191
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2158
2192
|
here, so the final fallback arm is unreachable. */
|
|
2159
2193
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2160
|
-
if (!(/^https?:/.test(t) &&
|
|
2194
|
+
if (!(/^https?:/.test(t) && gr({
|
|
2161
2195
|
naturalWidth: e.naturalWidth,
|
|
2162
2196
|
naturalHeight: e.naturalHeight,
|
|
2163
2197
|
boxWidth: i.width || K,
|
|
@@ -2173,7 +2207,7 @@ function dr(e) {
|
|
|
2173
2207
|
v(e, o);
|
|
2174
2208
|
return;
|
|
2175
2209
|
}
|
|
2176
|
-
|
|
2210
|
+
br(t).then((a) => {
|
|
2177
2211
|
if (!(n || !s.has(e))) {
|
|
2178
2212
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2179
2213
|
releases every held element of the url first, so a still-held
|
|
@@ -2216,7 +2250,7 @@ function dr(e) {
|
|
|
2216
2250
|
return;
|
|
2217
2251
|
}
|
|
2218
2252
|
let n = e.getBoundingClientRect();
|
|
2219
|
-
if (!
|
|
2253
|
+
if (!gr({
|
|
2220
2254
|
naturalWidth: e.naturalWidth,
|
|
2221
2255
|
naturalHeight: e.naturalHeight,
|
|
2222
2256
|
boxWidth: n.width || K,
|
|
@@ -2225,7 +2259,7 @@ function dr(e) {
|
|
|
2225
2259
|
})) return;
|
|
2226
2260
|
let o = r.get(a);
|
|
2227
2261
|
if (i(o)) {
|
|
2228
|
-
|
|
2262
|
+
G() || hr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2229
2263
|
return;
|
|
2230
2264
|
}
|
|
2231
2265
|
if (o === "opaque") {
|
|
@@ -2241,14 +2275,14 @@ function dr(e) {
|
|
|
2241
2275
|
return;
|
|
2242
2276
|
}
|
|
2243
2277
|
if (o) {
|
|
2244
|
-
|
|
2278
|
+
G() || hr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2245
2279
|
return;
|
|
2246
2280
|
}
|
|
2247
2281
|
s.set(e, {
|
|
2248
2282
|
url: a,
|
|
2249
2283
|
previousVisibility: e.style.visibility,
|
|
2250
|
-
timeout: setTimeout(() => v(e, null),
|
|
2251
|
-
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src =
|
|
2284
|
+
timeout: setTimeout(() => v(e, null), ur)
|
|
2285
|
+
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src = fr, br(a).then((t) => {
|
|
2252
2286
|
if (n || r.has(a)) return;
|
|
2253
2287
|
if (t) {
|
|
2254
2288
|
let e = URL.createObjectURL(t);
|
|
@@ -2275,20 +2309,20 @@ function dr(e) {
|
|
|
2275
2309
|
let k = (e) => {
|
|
2276
2310
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2277
2311
|
if (n && !n.responsive) {
|
|
2278
|
-
t === n.url && (e.src =
|
|
2312
|
+
t === n.url && (e.src = fr);
|
|
2279
2313
|
return;
|
|
2280
2314
|
}
|
|
2281
2315
|
let a = e.getAttribute(q);
|
|
2282
2316
|
if (a) if (t === a) {
|
|
2283
2317
|
let t = r.get(a);
|
|
2284
2318
|
i(t) && (e.src = t);
|
|
2285
|
-
} else t !==
|
|
2286
|
-
},
|
|
2319
|
+
} else t !== fr && !t.startsWith("blob:") && e.removeAttribute(q);
|
|
2320
|
+
}, A = !1, j = new MutationObserver((t) => {
|
|
2287
2321
|
if (!n) {
|
|
2288
|
-
if (
|
|
2289
|
-
if (
|
|
2290
|
-
|
|
2291
|
-
if (
|
|
2322
|
+
if (G()) {
|
|
2323
|
+
if (A) return;
|
|
2324
|
+
A = !0, sr(() => {
|
|
2325
|
+
if (A = !1, !n) {
|
|
2292
2326
|
for (let t of Array.from(e.querySelectorAll(`img[${q}]`))) k(t);
|
|
2293
2327
|
for (let e of [...s.keys()]) k(e);
|
|
2294
2328
|
}
|
|
@@ -2298,12 +2332,12 @@ function dr(e) {
|
|
|
2298
2332
|
for (let e of t) e.attributeName === "src" && k(e.target);
|
|
2299
2333
|
}
|
|
2300
2334
|
});
|
|
2301
|
-
return
|
|
2335
|
+
return j.observe(e, {
|
|
2302
2336
|
subtree: !0,
|
|
2303
2337
|
attributes: !0,
|
|
2304
2338
|
attributeFilter: ["src"]
|
|
2305
2339
|
}), () => {
|
|
2306
|
-
n = !0, w(), O.disconnect(),
|
|
2340
|
+
n = !0, w(), O.disconnect(), j.disconnect(), t?.terminate(), t = null;
|
|
2307
2341
|
for (let e of [...s.keys()]) v(e, null);
|
|
2308
2342
|
for (let e of [...a]) e();
|
|
2309
2343
|
o.clear(), r.clear();
|
|
@@ -2311,23 +2345,23 @@ function dr(e) {
|
|
|
2311
2345
|
l.clear();
|
|
2312
2346
|
};
|
|
2313
2347
|
}
|
|
2314
|
-
var
|
|
2315
|
-
function
|
|
2316
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2317
|
-
dispose:
|
|
2348
|
+
var Sr = null;
|
|
2349
|
+
function Cr() {
|
|
2350
|
+
return typeof document > "u" || !document.body ? () => {} : (Sr ? Sr.count += 1 : Sr = {
|
|
2351
|
+
dispose: xr(document.body),
|
|
2318
2352
|
count: 1
|
|
2319
2353
|
}, () => {
|
|
2320
|
-
|
|
2354
|
+
Sr && (--Sr.count, Sr.count <= 0 && (Sr.dispose(), Sr = null));
|
|
2321
2355
|
});
|
|
2322
2356
|
}
|
|
2323
2357
|
//#endregion
|
|
2324
2358
|
//#region src/core/engine/arrivalHold.ts
|
|
2325
|
-
var
|
|
2326
|
-
function
|
|
2359
|
+
var wr = "data-flemo-held-arrival";
|
|
2360
|
+
function Tr(e) {
|
|
2327
2361
|
if (typeof MutationObserver > "u") return () => {};
|
|
2328
2362
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2329
2363
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2330
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2364
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${wr}], [${q}]`) !== null;
|
|
2331
2365
|
}, 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
2366
|
glass: t,
|
|
2333
2367
|
latest: n,
|
|
@@ -2357,12 +2391,12 @@ function hr(e) {
|
|
|
2357
2391
|
if (i.type === "childList") {
|
|
2358
2392
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2359
2393
|
if (e instanceof Element && t.delete(e)) {
|
|
2360
|
-
e.removeAttribute(
|
|
2394
|
+
e.removeAttribute(wr);
|
|
2361
2395
|
continue;
|
|
2362
2396
|
}
|
|
2363
2397
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2364
2398
|
}
|
|
2365
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2399
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(wr, ""), t.add(e), l(i.target).added.push(e));
|
|
2366
2400
|
}
|
|
2367
2401
|
}
|
|
2368
2402
|
for (let [e, t] of u) {
|
|
@@ -2397,7 +2431,7 @@ function hr(e) {
|
|
|
2397
2431
|
c.disconnect();
|
|
2398
2432
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2399
2433
|
n.clear();
|
|
2400
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2434
|
+
for (let e of t) e instanceof HTMLElement && tr(e), e.removeAttribute(wr);
|
|
2401
2435
|
t.clear();
|
|
2402
2436
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2403
2437
|
i.clear();
|
|
@@ -2407,57 +2441,57 @@ function hr(e) {
|
|
|
2407
2441
|
}
|
|
2408
2442
|
//#endregion
|
|
2409
2443
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2410
|
-
var
|
|
2444
|
+
var Er = "data-flemo-warm", Dr = 3e3, Or = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], kr = {
|
|
2411
2445
|
duration: 500,
|
|
2412
2446
|
iterations: Infinity,
|
|
2413
2447
|
direction: "alternate",
|
|
2414
2448
|
easing: "linear"
|
|
2415
|
-
},
|
|
2416
|
-
|
|
2449
|
+
}, Ar = "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;", jr = "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==", J = null, Mr = null, Y = null, Nr = null, Pr = 0, Fr = () => {
|
|
2450
|
+
Pr = 0, Nr?.cancel(), Nr = null, Y?.remove(), Y = null;
|
|
2417
2451
|
};
|
|
2418
|
-
function
|
|
2452
|
+
function Ir() {
|
|
2419
2453
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2420
|
-
if (
|
|
2421
|
-
Y = document.createElement("div"), Y.setAttribute(
|
|
2454
|
+
if (Pr += 1, !Y) {
|
|
2455
|
+
Y = document.createElement("div"), Y.setAttribute(Er, ""), Y.setAttribute("aria-hidden", "true"), Y.setAttribute("style", Ar), document.body.appendChild(Y);
|
|
2422
2456
|
try {
|
|
2423
|
-
|
|
2457
|
+
Nr = Y.animate(Or, kr);
|
|
2424
2458
|
} catch {
|
|
2425
|
-
|
|
2459
|
+
Nr = null;
|
|
2426
2460
|
}
|
|
2427
|
-
if (!J &&
|
|
2428
|
-
J = document.createElement("video"), J.muted = !0, J.loop = !0, J.playsInline = !0, J.setAttribute("aria-hidden", "true"), J.setAttribute("data-flemo-warm-video", ""), J.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), J.src =
|
|
2461
|
+
if (!J && at()) try {
|
|
2462
|
+
J = document.createElement("video"), J.muted = !0, J.loop = !0, J.playsInline = !0, J.setAttribute("aria-hidden", "true"), J.setAttribute("data-flemo-warm-video", ""), J.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), J.src = jr, document.body.appendChild(J), J.play()?.catch?.(() => {});
|
|
2429
2463
|
let e = J;
|
|
2430
|
-
|
|
2464
|
+
Mr = () => {
|
|
2431
2465
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2432
|
-
}, document.addEventListener("visibilitychange",
|
|
2466
|
+
}, document.addEventListener("visibilitychange", Mr);
|
|
2433
2467
|
} catch {
|
|
2434
2468
|
J = null;
|
|
2435
2469
|
}
|
|
2436
2470
|
}
|
|
2437
2471
|
let e = !1, t = setTimeout(() => {
|
|
2438
|
-
e || (e = !0, --
|
|
2439
|
-
},
|
|
2472
|
+
e || (e = !0, --Pr, Pr <= 0 && Fr());
|
|
2473
|
+
}, Dr);
|
|
2440
2474
|
return () => {
|
|
2441
|
-
e || (e = !0, clearTimeout(t), --
|
|
2475
|
+
e || (e = !0, clearTimeout(t), --Pr, Pr <= 0 && Fr());
|
|
2442
2476
|
};
|
|
2443
2477
|
}
|
|
2444
2478
|
//#endregion
|
|
2445
2479
|
//#region src/core/engine/emulationNotice.ts
|
|
2446
|
-
var
|
|
2480
|
+
var Lr = () => {
|
|
2447
2481
|
if (typeof navigator > "u") return !1;
|
|
2448
2482
|
let e = navigator.platform ?? "";
|
|
2449
2483
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2452
|
-
},
|
|
2484
|
+
}, Rr = !1, zr = () => {
|
|
2485
|
+
Rr || !F() || !Lr() || (Rr = !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."));
|
|
2486
|
+
}, Br = "data-flemo-img-hold", Vr = (e) => !(e.complete && e.naturalWidth > 0), Hr = 4, Ur = (e) => {
|
|
2453
2487
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2454
2488
|
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
|
|
2489
|
+
return e.naturalWidth * e.naturalHeight > r * Hr;
|
|
2490
|
+
}, Wr = (e, t) => Vr(e) || !t && Ur(e);
|
|
2491
|
+
function Gr(e, t, n = !1) {
|
|
2458
2492
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2459
2493
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2460
|
-
e.getAttribute(
|
|
2494
|
+
e.getAttribute(Br) === null && (r.has(e) || !Wr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(Br, "")));
|
|
2461
2495
|
};
|
|
2462
2496
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2463
2497
|
let a = new MutationObserver((e) => {
|
|
@@ -2471,7 +2505,7 @@ function Fr(e, t, n = !1) {
|
|
|
2471
2505
|
let o = !1, s = () => {
|
|
2472
2506
|
if (!o) {
|
|
2473
2507
|
o = !0, a.disconnect();
|
|
2474
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
2508
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(Br);
|
|
2475
2509
|
r.clear();
|
|
2476
2510
|
}
|
|
2477
2511
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2481,25 +2515,25 @@ function Fr(e, t, n = !1) {
|
|
|
2481
2515
|
}
|
|
2482
2516
|
//#endregion
|
|
2483
2517
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2484
|
-
var
|
|
2518
|
+
var Kr = () => {}, qr = .004, Jr = (e, t) => {
|
|
2485
2519
|
let n = e.ownerDocument?.defaultView;
|
|
2486
2520
|
if (!n) return !1;
|
|
2487
2521
|
let r = e;
|
|
2488
2522
|
for (; r;) {
|
|
2489
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2523
|
+
if (Number(n.getComputedStyle(r).opacity) <= qr) return !0;
|
|
2490
2524
|
if (r === t) break;
|
|
2491
2525
|
r = r.parentElement;
|
|
2492
2526
|
}
|
|
2493
2527
|
return !1;
|
|
2494
2528
|
};
|
|
2495
|
-
function
|
|
2496
|
-
if (typeof e.getAnimations != "function") return
|
|
2529
|
+
function Yr(e) {
|
|
2530
|
+
if (typeof e.getAnimations != "function") return Kr;
|
|
2497
2531
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2498
2532
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2499
2533
|
if (t.size >= 128) return;
|
|
2500
2534
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2501
2535
|
let r = n.effect?.target;
|
|
2502
|
-
if (r instanceof Element &&
|
|
2536
|
+
if (r instanceof Element && Jr(r, e)) try {
|
|
2503
2537
|
n.pause(), t.add(n);
|
|
2504
2538
|
} catch {}
|
|
2505
2539
|
}
|
|
@@ -2528,7 +2562,7 @@ function zr(e) {
|
|
|
2528
2562
|
}
|
|
2529
2563
|
//#endregion
|
|
2530
2564
|
//#region src/transition/cubicBezier.ts
|
|
2531
|
-
var
|
|
2565
|
+
var Xr = (e, t, n, r) => {
|
|
2532
2566
|
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
2567
|
return (e) => {
|
|
2534
2568
|
if (e <= 0) return 0;
|
|
@@ -2540,7 +2574,7 @@ var Br = (e, t, n, r) => {
|
|
|
2540
2574
|
}
|
|
2541
2575
|
return a((t + n) / 2);
|
|
2542
2576
|
};
|
|
2543
|
-
},
|
|
2577
|
+
}, Zr = (e) => e, Qr = {
|
|
2544
2578
|
ease: [
|
|
2545
2579
|
.25,
|
|
2546
2580
|
.1,
|
|
@@ -2595,20 +2629,20 @@ var Br = (e, t, n, r) => {
|
|
|
2595
2629
|
.66,
|
|
2596
2630
|
-.56
|
|
2597
2631
|
]
|
|
2598
|
-
},
|
|
2632
|
+
}, $r = (e) => {
|
|
2599
2633
|
if (Array.isArray(e)) {
|
|
2600
2634
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2601
2635
|
let [t, n, r, i] = e;
|
|
2602
|
-
return
|
|
2636
|
+
return Xr(t, n, r, i);
|
|
2603
2637
|
}
|
|
2604
|
-
return
|
|
2638
|
+
return Zr;
|
|
2605
2639
|
}
|
|
2606
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2607
|
-
},
|
|
2640
|
+
return typeof e == "string" ? e === "linear" ? Zr : Xr(...Qr[e] ?? Qr.ease) : Xr(...Qr.ease);
|
|
2641
|
+
}, ei = 1 / 255, ti = 400, ni = 24, ri = /* @__PURE__ */ new Set([
|
|
2608
2642
|
"x",
|
|
2609
2643
|
"y",
|
|
2610
2644
|
"opacity"
|
|
2611
|
-
]),
|
|
2645
|
+
]), ii = (e, t, n) => {
|
|
2612
2646
|
if (!e || typeof e != "object") return;
|
|
2613
2647
|
let r = e[t];
|
|
2614
2648
|
if (r === void 0) return;
|
|
@@ -2626,7 +2660,7 @@ var Br = (e, t, n, r) => {
|
|
|
2626
2660
|
return Number.isNaN(e) ? null : e;
|
|
2627
2661
|
}
|
|
2628
2662
|
return null;
|
|
2629
|
-
},
|
|
2663
|
+
}, ai = (e, t, n) => {
|
|
2630
2664
|
let r = /* @__PURE__ */ new Set();
|
|
2631
2665
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2632
2666
|
if (r.size === 0) return null;
|
|
@@ -2634,28 +2668,28 @@ var Br = (e, t, n, r) => {
|
|
|
2634
2668
|
for (let a of r) {
|
|
2635
2669
|
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
2670
|
if (r !== void 0 && r === o) continue;
|
|
2637
|
-
if (!
|
|
2638
|
-
let s =
|
|
2671
|
+
if (!ri.has(a)) return null;
|
|
2672
|
+
let s = ii(e.from, a, t), c = ii(e.to, a, t);
|
|
2639
2673
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2640
2674
|
let l = Math.abs(c - s);
|
|
2641
2675
|
if (l === 0) continue;
|
|
2642
|
-
let u = a === "opacity" ?
|
|
2676
|
+
let u = a === "opacity" ? ei : 1 / Math.max(1, n);
|
|
2643
2677
|
i = Math.min(i, u / l);
|
|
2644
2678
|
}
|
|
2645
2679
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2646
|
-
},
|
|
2680
|
+
}, oi = (e, t, n) => {
|
|
2647
2681
|
if (e.duration <= 0) return null;
|
|
2648
|
-
let r =
|
|
2682
|
+
let r = ai(e, t, n);
|
|
2649
2683
|
if (r === null) return null;
|
|
2650
|
-
let i =
|
|
2651
|
-
for (let e =
|
|
2684
|
+
let i = $r(e.ease), a = ti;
|
|
2685
|
+
for (let e = ti; e >= 0 && !(Math.abs(1 - i(e / ti)) > r); --e) a = e;
|
|
2652
2686
|
if (a === 0) return null;
|
|
2653
|
-
let o = (e.delay + e.duration * (a /
|
|
2654
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2655
|
-
},
|
|
2687
|
+
let o = (e.delay + e.duration * (a / ti)) * 1e3;
|
|
2688
|
+
return (e.delay + e.duration) * 1e3 - o < ni ? null : o;
|
|
2689
|
+
}, si = 1e3 / 120, ci = 4, X = 400, li = 4, Z = (e) => {
|
|
2656
2690
|
let t = +e.toFixed(5);
|
|
2657
2691
|
return Object.is(t, -0) ? 0 : t;
|
|
2658
|
-
},
|
|
2692
|
+
}, ui = (e, t, n) => {
|
|
2659
2693
|
if (e.duration <= 0) return null;
|
|
2660
2694
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2661
2695
|
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 +2698,37 @@ var Br = (e, t, n, r) => {
|
|
|
2664
2698
|
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
2699
|
if (i !== void 0 && i === o) continue;
|
|
2666
2700
|
if (n !== "x" && n !== "y") return null;
|
|
2667
|
-
let s =
|
|
2701
|
+
let s = ii(e.from, n, t), c = ii(e.to, n, t);
|
|
2668
2702
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2669
2703
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2670
2704
|
}
|
|
2671
|
-
if (a <
|
|
2672
|
-
let o =
|
|
2673
|
-
for (let e = 0; e <=
|
|
2674
|
-
let c = e.duration * 1e3 /
|
|
2705
|
+
if (a < ci) return null;
|
|
2706
|
+
let o = $r(e.ease), s = Array(401);
|
|
2707
|
+
for (let e = 0; e <= X; e += 1) s[e] = o(e / X);
|
|
2708
|
+
let c = e.duration * 1e3 / X, l = 40 / a * c / si, u = X, d = 0;
|
|
2675
2709
|
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 <
|
|
2710
|
+
for (let e = u; e < X; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2677
2711
|
let f = (1 - s[u]) * a;
|
|
2678
2712
|
if (f <= 1) return null;
|
|
2679
2713
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2680
2714
|
let t = 1 - e / a;
|
|
2681
|
-
for (; m <
|
|
2715
|
+
for (; m < X && s[m] < t;) m += 1;
|
|
2682
2716
|
if (m === 0) return 0;
|
|
2683
2717
|
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) /
|
|
2718
|
+
return (m - 1 + i) / X * 100;
|
|
2685
2719
|
}, g = h(p), _ = [];
|
|
2686
|
-
for (let e = 0; 100 /
|
|
2720
|
+
for (let e = 0; 100 / X * e < g; e += li) _.push(`${Z(s[e])} ${Z(e / X * 100)}%`);
|
|
2687
2721
|
let v = g;
|
|
2688
2722
|
for (let e = p; e >= 2; --e) {
|
|
2689
2723
|
let t = h(e - 1);
|
|
2690
2724
|
if (t > v) {
|
|
2691
|
-
let n =
|
|
2692
|
-
_.push(`${n} ${
|
|
2725
|
+
let n = Z(1 - e / a);
|
|
2726
|
+
_.push(`${n} ${Z(v)}%`, `${n} ${Z(t)}%`);
|
|
2693
2727
|
}
|
|
2694
2728
|
v = t;
|
|
2695
2729
|
}
|
|
2696
|
-
return _.push(`1 ${
|
|
2697
|
-
},
|
|
2730
|
+
return _.push(`1 ${Z(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2731
|
+
}, di = 12, fi = (e, t, n, r) => {
|
|
2698
2732
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2699
2733
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2700
2734
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2703,37 +2737,30 @@ var Br = (e, t, n, r) => {
|
|
|
2703
2737
|
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
2738
|
if (r !== void 0 && r === a) continue;
|
|
2705
2739
|
if (n !== "x" && n !== "y") return null;
|
|
2706
|
-
let s =
|
|
2740
|
+
let s = ii(e.from, n, t), c = ii(e.to, n, t);
|
|
2707
2741
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2708
2742
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2709
2743
|
}
|
|
2710
|
-
if (o <
|
|
2711
|
-
let s =
|
|
2712
|
-
for (let e = 0; e <=
|
|
2713
|
-
let l = e.duration * 1e3, u = l /
|
|
2744
|
+
if (o < di) return null;
|
|
2745
|
+
let s = $r(e.ease), c = Array(401);
|
|
2746
|
+
for (let e = 0; e <= X; e += 1) c[e] = s(e / X);
|
|
2747
|
+
let l = e.duration * 1e3, u = l / X, d = 1 / o * (u / r), f = X, p = 0;
|
|
2714
2748
|
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 <
|
|
2749
|
+
if (f === 0 || f >= X) return null;
|
|
2750
|
+
for (let e = f; e < X; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2717
2751
|
let m = (1 - c[f]) * o;
|
|
2718
|
-
if (m <= 1 || m >
|
|
2719
|
-
let h = f /
|
|
2752
|
+
if (m <= 1 || m > di) return null;
|
|
2753
|
+
let h = f / X * 100, g = m * r / l * 100;
|
|
2720
2754
|
if (h + g >= 100) return null;
|
|
2721
2755
|
let _ = [];
|
|
2722
|
-
for (let e = 0; e <= f; e +=
|
|
2723
|
-
return _.push(`${
|
|
2724
|
-
}
|
|
2725
|
-
(() => {
|
|
2726
|
-
try {
|
|
2727
|
-
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
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
|
-
} catch {}
|
|
2730
|
-
})();
|
|
2731
|
-
var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (e, t) => {
|
|
2756
|
+
for (let e = 0; e <= f; e += li) _.push(`${Z(c[e])} ${Z(e / X * 100)}%`);
|
|
2757
|
+
return _.push(`${Z(c[f])} ${Z(h)}%`), _.push(`1 ${Z(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2758
|
+
}, pi = /* @__PURE__ */ new WeakMap(), mi = Symbol("flemo-layer-owner"), hi = (e, t) => {
|
|
2732
2759
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2733
|
-
},
|
|
2760
|
+
}, gi = (e, t) => {
|
|
2734
2761
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2735
2762
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2736
|
-
},
|
|
2763
|
+
}, _i = (e, t) => {
|
|
2737
2764
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2738
2765
|
for (let e of t.willChange.split(",")) {
|
|
2739
2766
|
let t = e.trim();
|
|
@@ -2744,13 +2771,13 @@ var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (
|
|
|
2744
2771
|
e.containment && (r = !0);
|
|
2745
2772
|
}
|
|
2746
2773
|
e.style.willChange = [...n].join(", ");
|
|
2747
|
-
let i =
|
|
2774
|
+
let i = gi(t.contain, r);
|
|
2748
2775
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2749
|
-
},
|
|
2750
|
-
let i =
|
|
2776
|
+
}, vi = (e, t, n = !1, r = mi) => {
|
|
2777
|
+
let i = bn(t), a = pi.get(e);
|
|
2751
2778
|
if (i.length === 0) {
|
|
2752
2779
|
if (!a) return;
|
|
2753
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2780
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), hi(e, a), pi.delete(e)) : _i(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), hi(e, a), pi.delete(e));
|
|
2754
2781
|
return;
|
|
2755
2782
|
}
|
|
2756
2783
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2759,18 +2786,18 @@ var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (
|
|
|
2759
2786
|
willChange: e.style.willChange,
|
|
2760
2787
|
contain: e.style.contain,
|
|
2761
2788
|
pending: null
|
|
2762
|
-
},
|
|
2789
|
+
}, pi.set(e, a)), a.owners.set(r, {
|
|
2763
2790
|
properties: i,
|
|
2764
2791
|
containment: n
|
|
2765
|
-
}), a.settleOwner = null,
|
|
2766
|
-
},
|
|
2767
|
-
let n =
|
|
2792
|
+
}), a.settleOwner = null, _i(e, a);
|
|
2793
|
+
}, Q = (e, t = mi) => {
|
|
2794
|
+
let n = pi.get(e);
|
|
2768
2795
|
if (!(!n || !n.owners.has(t))) {
|
|
2769
2796
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2770
|
-
|
|
2797
|
+
_i(e, n);
|
|
2771
2798
|
return;
|
|
2772
2799
|
}
|
|
2773
|
-
if (
|
|
2800
|
+
if (At() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2774
2801
|
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
2802
|
return;
|
|
2776
2803
|
}
|
|
@@ -2778,33 +2805,33 @@ var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (
|
|
|
2778
2805
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2779
2806
|
the pre-hold behavior. */
|
|
2780
2807
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2781
|
-
|
|
2808
|
+
hi(e, n), pi.delete(e);
|
|
2782
2809
|
return;
|
|
2783
2810
|
}
|
|
2784
|
-
|
|
2811
|
+
yi(e, n);
|
|
2785
2812
|
}
|
|
2786
|
-
},
|
|
2813
|
+
}, yi = (e, t) => {
|
|
2787
2814
|
t.pending = setTimeout(() => {
|
|
2788
|
-
if (t.pending = null,
|
|
2789
|
-
|
|
2790
|
-
|
|
2815
|
+
if (t.pending = null, G()) {
|
|
2816
|
+
sr(() => {
|
|
2817
|
+
pi.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && yi(e, t);
|
|
2791
2818
|
});
|
|
2792
2819
|
return;
|
|
2793
2820
|
}
|
|
2794
|
-
|
|
2821
|
+
hi(e, t), pi.delete(e);
|
|
2795
2822
|
}, 300);
|
|
2796
|
-
},
|
|
2823
|
+
}, bi = (e, t, n) => {
|
|
2797
2824
|
let r = e.driver;
|
|
2798
2825
|
return r === "native" || r === "player" ? r : "player";
|
|
2799
|
-
},
|
|
2826
|
+
}, xi = 1e3 / 60 * 2, Si = "flemo-", Ci = /* @__PURE__ */ new WeakMap(), wi = (e, t, n) => {
|
|
2800
2827
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2801
2828
|
let e = r.animationName;
|
|
2802
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2829
|
+
if (typeof e != "string" || !e.startsWith(Si) || r.playState !== "running" || Ci.get(r) === n) continue;
|
|
2803
2830
|
let i = r.startTime;
|
|
2804
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2831
|
+
typeof i == "number" && (r.startTime = i + t, Ci.set(r, n));
|
|
2805
2832
|
}
|
|
2806
|
-
},
|
|
2807
|
-
function
|
|
2833
|
+
}, Ti = /* @__PURE__ */ new WeakSet(), Ei = 1e3, Di = 3e3;
|
|
2834
|
+
function Oi(e, t, n) {
|
|
2808
2835
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2809
2836
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2810
2837
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2818,7 +2845,7 @@ function vi(e, t, n) {
|
|
|
2818
2845
|
i = !0, m.disconnect();
|
|
2819
2846
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2820
2847
|
let e = t.animationName;
|
|
2821
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2848
|
+
if (typeof e != "string" || !e.startsWith(Si) || t.playState !== "running" || Ti.has(t)) continue;
|
|
2822
2849
|
let n = t.currentTime;
|
|
2823
2850
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2824
2851
|
try {
|
|
@@ -2826,18 +2853,18 @@ function vi(e, t, n) {
|
|
|
2826
2853
|
} catch {
|
|
2827
2854
|
continue;
|
|
2828
2855
|
}
|
|
2829
|
-
|
|
2856
|
+
Ti.add(t), c.push(t);
|
|
2830
2857
|
}
|
|
2831
2858
|
}
|
|
2832
2859
|
if (c.length === 0) return;
|
|
2833
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2834
|
-
let e =
|
|
2860
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, Ei));
|
|
2861
|
+
let e = Ni(t, () => {
|
|
2835
2862
|
a || n?.();
|
|
2836
2863
|
});
|
|
2837
2864
|
if (l = e, typeof setTimeout == "function") {
|
|
2838
2865
|
let t = setTimeout(() => {
|
|
2839
2866
|
l === e && (l = null), e();
|
|
2840
|
-
},
|
|
2867
|
+
}, Di), n = e;
|
|
2841
2868
|
l = () => {
|
|
2842
2869
|
clearTimeout(t), n();
|
|
2843
2870
|
};
|
|
@@ -2852,16 +2879,16 @@ function vi(e, t, n) {
|
|
|
2852
2879
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2853
2880
|
};
|
|
2854
2881
|
}
|
|
2855
|
-
var
|
|
2856
|
-
function
|
|
2882
|
+
var ki = 150, Ai = 4e3, ji = 400;
|
|
2883
|
+
function Mi(e, t, n = !0, r = !1) {
|
|
2857
2884
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2858
2885
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2859
2886
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2860
2887
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2861
2888
|
let t = e.animationName;
|
|
2862
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2889
|
+
if (typeof t != "string" || !t.startsWith(Si) || e.playState !== "running" || Ti.has(e)) continue;
|
|
2863
2890
|
let n = e.currentTime;
|
|
2864
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2891
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Ti.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2865
2892
|
}
|
|
2866
2893
|
if (i.length === 0) return () => {};
|
|
2867
2894
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2874,7 +2901,7 @@ function Si(e, t, n = !0, r = !1) {
|
|
|
2874
2901
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2875
2902
|
let o = (a.get(n) ?? 0) + e;
|
|
2876
2903
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2877
|
-
let s = r +
|
|
2904
|
+
let s = r + Ai;
|
|
2878
2905
|
t = Math.max(t, s - o);
|
|
2879
2906
|
}
|
|
2880
2907
|
return t;
|
|
@@ -2882,7 +2909,7 @@ function Si(e, t, n = !0, r = !1) {
|
|
|
2882
2909
|
if (c) return;
|
|
2883
2910
|
if (d === null && (d = e), f !== null) {
|
|
2884
2911
|
let t = e - f;
|
|
2885
|
-
p += Math.min(Math.max(0, t),
|
|
2912
|
+
p += Math.min(Math.max(0, t), xi);
|
|
2886
2913
|
}
|
|
2887
2914
|
if (f = e, !l) {
|
|
2888
2915
|
if (l = !0, r) {
|
|
@@ -2894,7 +2921,7 @@ function Si(e, t, n = !0, r = !1) {
|
|
|
2894
2921
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2895
2922
|
let i = a.get(t) ?? 0;
|
|
2896
2923
|
if (n <= i + 33.333333333333336) continue;
|
|
2897
|
-
let o = n - (i +
|
|
2924
|
+
let o = n - (i + xi);
|
|
2898
2925
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2899
2926
|
}
|
|
2900
2927
|
e > 0 && t?.(e);
|
|
@@ -2908,13 +2935,13 @@ function Si(e, t, n = !0, r = !1) {
|
|
|
2908
2935
|
if (e.playState !== "running") continue;
|
|
2909
2936
|
let t = e.startTime;
|
|
2910
2937
|
if (typeof t == "number") {
|
|
2911
|
-
e.startTime = t +
|
|
2938
|
+
e.startTime = t + Ai;
|
|
2912
2939
|
continue;
|
|
2913
2940
|
}
|
|
2914
2941
|
let n = e.timeline?.currentTime;
|
|
2915
|
-
typeof n == "number" && (e.startTime = n +
|
|
2942
|
+
typeof n == "number" && (e.startTime = n + Ai);
|
|
2916
2943
|
}
|
|
2917
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2944
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + xi), ji)), o = requestAnimationFrame(h);
|
|
2918
2945
|
return;
|
|
2919
2946
|
}
|
|
2920
2947
|
if (!u) {
|
|
@@ -2937,13 +2964,13 @@ function Si(e, t, n = !0, r = !1) {
|
|
|
2937
2964
|
t?.(g);
|
|
2938
2965
|
return;
|
|
2939
2966
|
}
|
|
2940
|
-
e - d <
|
|
2967
|
+
e - d < ki && (o = requestAnimationFrame(h));
|
|
2941
2968
|
};
|
|
2942
2969
|
return o = requestAnimationFrame(h), () => {
|
|
2943
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2970
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + xi);
|
|
2944
2971
|
};
|
|
2945
2972
|
}
|
|
2946
|
-
function
|
|
2973
|
+
function Ni(e, t) {
|
|
2947
2974
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2948
2975
|
exotic embedders. */
|
|
2949
2976
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2952,8 +2979,8 @@ function Ci(e, t) {
|
|
|
2952
2979
|
if (r !== null) {
|
|
2953
2980
|
let n = o - r;
|
|
2954
2981
|
if (n > 33.333333333333336) {
|
|
2955
|
-
let r = n -
|
|
2956
|
-
for (let t of e()) t &&
|
|
2982
|
+
let r = n - xi;
|
|
2983
|
+
for (let t of e()) t && wi(t, r, o);
|
|
2957
2984
|
t?.(r);
|
|
2958
2985
|
}
|
|
2959
2986
|
}
|
|
@@ -2964,29 +2991,29 @@ function Ci(e, t) {
|
|
|
2964
2991
|
i = !0, cancelAnimationFrame(n);
|
|
2965
2992
|
};
|
|
2966
2993
|
}
|
|
2967
|
-
var
|
|
2968
|
-
function
|
|
2994
|
+
var Pi = /* @__PURE__ */ new WeakMap();
|
|
2995
|
+
function Fi(e, t, n, r = !0, i = !1) {
|
|
2969
2996
|
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), () =>
|
|
2997
|
+
let a = Pi.get(e);
|
|
2998
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => Ii(e);
|
|
2972
2999
|
let o = null, s = !1, c = !1, l = () => {
|
|
2973
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
3000
|
+
s || c || (s = !0, u.disconnect(), o = Mi(t, n, r, i));
|
|
2974
3001
|
}, u = new MutationObserver(() => {
|
|
2975
3002
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2976
3003
|
});
|
|
2977
3004
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2978
3005
|
attributes: !0,
|
|
2979
3006
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
2980
|
-
}),
|
|
3007
|
+
}), Pi.set(e, {
|
|
2981
3008
|
refs: 1,
|
|
2982
3009
|
pendingDrop: null,
|
|
2983
3010
|
dispose: () => {
|
|
2984
|
-
c = !0, u.disconnect(), o?.(),
|
|
3011
|
+
c = !0, u.disconnect(), o?.(), Pi.delete(e);
|
|
2985
3012
|
}
|
|
2986
|
-
}), () =>
|
|
3013
|
+
}), () => Ii(e);
|
|
2987
3014
|
}
|
|
2988
|
-
var
|
|
2989
|
-
let t =
|
|
3015
|
+
var Ii = (e) => {
|
|
3016
|
+
let t = Pi.get(e);
|
|
2990
3017
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2991
3018
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2992
3019
|
if (typeof setTimeout != "function") {
|
|
@@ -2995,36 +3022,36 @@ var Ei = (e) => {
|
|
|
2995
3022
|
}
|
|
2996
3023
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2997
3024
|
}
|
|
2998
|
-
},
|
|
2999
|
-
let e =
|
|
3000
|
-
|
|
3025
|
+
}, Li = !1, Ri = 0, zi = [], Bi = () => {
|
|
3026
|
+
let e = zi;
|
|
3027
|
+
zi = [];
|
|
3001
3028
|
for (let t of e) t();
|
|
3002
|
-
},
|
|
3003
|
-
if (
|
|
3004
|
-
|
|
3029
|
+
}, Vi = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), Hi = () => {
|
|
3030
|
+
if (Li || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3031
|
+
Li = !0;
|
|
3005
3032
|
let e = window.fetch.bind(window);
|
|
3006
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
3007
|
-
|
|
3033
|
+
window.fetch = (...t) => e(...t).then((e) => Ri <= 0 || Vi(e) ? e : new Promise((t) => {
|
|
3034
|
+
zi.push(() => t(e));
|
|
3008
3035
|
}), (e) => {
|
|
3009
|
-
if (
|
|
3036
|
+
if (Ri <= 0) throw e;
|
|
3010
3037
|
return new Promise((t, n) => {
|
|
3011
|
-
|
|
3038
|
+
zi.push(() => n(e));
|
|
3012
3039
|
});
|
|
3013
3040
|
});
|
|
3014
|
-
},
|
|
3015
|
-
function
|
|
3041
|
+
}, Ui = 2e3;
|
|
3042
|
+
function Wi(e = Ui) {
|
|
3016
3043
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3017
|
-
if (
|
|
3018
|
-
|
|
3044
|
+
if (Hi(), !Li) return () => {};
|
|
3045
|
+
Ri += 1;
|
|
3019
3046
|
let t = !1, n = null, r = () => {
|
|
3020
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
3047
|
+
t || (t = !0, n !== null && clearTimeout(n), Ri = Math.max(0, Ri - 1), Ri === 0 && Bi());
|
|
3021
3048
|
};
|
|
3022
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
3049
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(Ui, e))), r;
|
|
3023
3050
|
}
|
|
3024
|
-
|
|
3051
|
+
Hi();
|
|
3025
3052
|
//#endregion
|
|
3026
3053
|
//#region src/core/engine/transitionPlayer.ts
|
|
3027
|
-
var
|
|
3054
|
+
var Gi = [
|
|
3028
3055
|
"x",
|
|
3029
3056
|
"y",
|
|
3030
3057
|
"z",
|
|
@@ -3035,7 +3062,7 @@ var Fi = [
|
|
|
3035
3062
|
"rotateX",
|
|
3036
3063
|
"rotateY",
|
|
3037
3064
|
"rotateZ"
|
|
3038
|
-
],
|
|
3065
|
+
], Ki = new Set(Gi), qi = {
|
|
3039
3066
|
x: 0,
|
|
3040
3067
|
y: 0,
|
|
3041
3068
|
z: 0,
|
|
@@ -3046,7 +3073,7 @@ var Fi = [
|
|
|
3046
3073
|
rotateX: 0,
|
|
3047
3074
|
rotateY: 0,
|
|
3048
3075
|
rotateZ: 0
|
|
3049
|
-
},
|
|
3076
|
+
}, Ji = (e, t) => {
|
|
3050
3077
|
if (typeof t == "number") return {
|
|
3051
3078
|
value: t,
|
|
3052
3079
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3065,18 +3092,18 @@ var Fi = [
|
|
|
3065
3092
|
value: i,
|
|
3066
3093
|
unit: a === "" && i === 0 ? "px" : a
|
|
3067
3094
|
};
|
|
3068
|
-
},
|
|
3069
|
-
let n = e.match(
|
|
3070
|
-
if (n.length !== r.length || e.replace(
|
|
3095
|
+
}, Yi = /-?\d*\.?\d+/g, Xi = (e, t) => {
|
|
3096
|
+
let n = e.match(Yi) ?? [], r = t.match(Yi) ?? [];
|
|
3097
|
+
if (n.length !== r.length || e.replace(Yi, " ") !== t.replace(Yi, " ")) return null;
|
|
3071
3098
|
let i = n.map(Number), a = r.map(Number);
|
|
3072
3099
|
return (t) => {
|
|
3073
3100
|
let n = 0;
|
|
3074
|
-
return e.replace(
|
|
3101
|
+
return e.replace(Yi, () => {
|
|
3075
3102
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3076
3103
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3077
3104
|
});
|
|
3078
3105
|
};
|
|
3079
|
-
},
|
|
3106
|
+
}, Zi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Qi = (e) => typeof e == "object" && !!e && !Array.isArray(e), $i = (e) => Qi(e) ? Object.keys(e) : [], ea = (e, t) => Qi(e) ? e[t] : void 0, ta = {
|
|
3080
3107
|
x: 0,
|
|
3081
3108
|
y: 0,
|
|
3082
3109
|
z: 0,
|
|
@@ -3087,41 +3114,41 @@ var Fi = [
|
|
|
3087
3114
|
rotateX: 2,
|
|
3088
3115
|
rotateY: 2,
|
|
3089
3116
|
rotateZ: 2
|
|
3090
|
-
},
|
|
3117
|
+
}, na = (e) => {
|
|
3091
3118
|
let t = 0, n = -1;
|
|
3092
3119
|
for (let r of e) {
|
|
3093
|
-
if (!
|
|
3094
|
-
let e =
|
|
3120
|
+
if (!Ki.has(r)) continue;
|
|
3121
|
+
let e = ta[r];
|
|
3095
3122
|
if (e < t) return !1;
|
|
3096
3123
|
if (t = e, e === 2) {
|
|
3097
|
-
let e =
|
|
3124
|
+
let e = Gi.indexOf(r);
|
|
3098
3125
|
if (e < n) return !1;
|
|
3099
3126
|
n = e;
|
|
3100
3127
|
}
|
|
3101
3128
|
}
|
|
3102
3129
|
return !0;
|
|
3103
|
-
},
|
|
3130
|
+
}, ra = (e) => {
|
|
3104
3131
|
let t = [];
|
|
3105
3132
|
for (let n of e) {
|
|
3106
|
-
if (!
|
|
3107
|
-
let e =
|
|
3133
|
+
if (!Ki.has(n)) continue;
|
|
3134
|
+
let e = ta[n] === 0 ? "T" : n;
|
|
3108
3135
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3109
3136
|
}
|
|
3110
3137
|
return t;
|
|
3111
|
-
},
|
|
3112
|
-
let n =
|
|
3138
|
+
}, ia = (e, t) => {
|
|
3139
|
+
let n = ra(e), r = ra(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3113
3140
|
return i.every((e, t) => a[t] === e);
|
|
3114
|
-
},
|
|
3115
|
-
let n =
|
|
3116
|
-
if (!
|
|
3141
|
+
}, aa = (e, t) => {
|
|
3142
|
+
let n = $i(e.from), r = $i(e.to);
|
|
3143
|
+
if (!na(n) || !na(r) || !ia(n, r)) return null;
|
|
3117
3144
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3118
3145
|
for (let n of i) {
|
|
3119
|
-
let r =
|
|
3120
|
-
if (
|
|
3146
|
+
let r = ea(e.from, n), i = ea(e.to, n);
|
|
3147
|
+
if (Ki.has(n)) {
|
|
3121
3148
|
let e = n, o = {
|
|
3122
|
-
value:
|
|
3149
|
+
value: qi[e],
|
|
3123
3150
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3124
|
-
}, s = r === void 0 ? o :
|
|
3151
|
+
}, s = r === void 0 ? o : Ji(e, r), c = i === void 0 ? o : Ji(e, i);
|
|
3125
3152
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3126
3153
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3127
3154
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3152,15 +3179,15 @@ var Fi = [
|
|
|
3152
3179
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3153
3180
|
if (l === u) {
|
|
3154
3181
|
c.push({
|
|
3155
|
-
property:
|
|
3182
|
+
property: Zi(n),
|
|
3156
3183
|
value: l
|
|
3157
3184
|
});
|
|
3158
3185
|
continue;
|
|
3159
3186
|
}
|
|
3160
|
-
let d =
|
|
3187
|
+
let d = Xi(l, u);
|
|
3161
3188
|
if (!d) return null;
|
|
3162
3189
|
s.push({
|
|
3163
|
-
property:
|
|
3190
|
+
property: Zi(n),
|
|
3164
3191
|
mix: d
|
|
3165
3192
|
});
|
|
3166
3193
|
}
|
|
@@ -3170,26 +3197,26 @@ var Fi = [
|
|
|
3170
3197
|
strings: s,
|
|
3171
3198
|
constants: c
|
|
3172
3199
|
};
|
|
3173
|
-
},
|
|
3174
|
-
if (!
|
|
3200
|
+
}, oa = 1, sa = 1e3 / 60, ca = (e) => !F() && e > 0 && e < 3, la = .6, ua = 600, da = (e, t) => {
|
|
3201
|
+
if (!at()) return !1;
|
|
3175
3202
|
for (let n of e.transforms) {
|
|
3176
3203
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3177
3204
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3178
3205
|
if (n.from.unit === "%") {
|
|
3179
|
-
if (e / 100 >=
|
|
3180
|
-
} else if (e * Math.max(1, t) >=
|
|
3206
|
+
if (e / 100 >= la) return !1;
|
|
3207
|
+
} else if (e * Math.max(1, t) >= ua) return !1;
|
|
3181
3208
|
}
|
|
3182
3209
|
return !0;
|
|
3183
|
-
},
|
|
3210
|
+
}, fa = 12, pa = (e, t, n, r, i = sa) => {
|
|
3184
3211
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3185
|
-
for (let u of
|
|
3212
|
+
for (let u of Gi) {
|
|
3186
3213
|
let d = e.find((e) => e.prop === u);
|
|
3187
3214
|
if (!d) continue;
|
|
3188
3215
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3189
3216
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3190
|
-
let e = u === "x" ? r.x : r.y, t =
|
|
3217
|
+
let e = u === "x" ? r.x : r.y, t = wt(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && ca(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= Et() : e === null || c * sa / Math.max(1, i) >= oa, h = d.to.value;
|
|
3191
3218
|
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 <=
|
|
3219
|
+
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 <= fa), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3193
3220
|
if (b) {
|
|
3194
3221
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3195
3222
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3197,42 +3224,42 @@ var Fi = [
|
|
|
3197
3224
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3198
3225
|
continue;
|
|
3199
3226
|
}
|
|
3200
|
-
let p =
|
|
3227
|
+
let p = qi[u];
|
|
3201
3228
|
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
3229
|
}
|
|
3203
3230
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3204
|
-
},
|
|
3231
|
+
}, ma = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ha = (e) => {
|
|
3205
3232
|
let t = {};
|
|
3206
|
-
for (let n of
|
|
3233
|
+
for (let n of xn(e)) t[ma(n.property)] = n.value;
|
|
3207
3234
|
return t;
|
|
3208
|
-
},
|
|
3235
|
+
}, ga = (e, t) => {
|
|
3209
3236
|
if (typeof e.animate != "function") return null;
|
|
3210
3237
|
try {
|
|
3211
|
-
let n = e.animate([
|
|
3238
|
+
let n = e.animate([ha(t.from), ha(t.to)], {
|
|
3212
3239
|
duration: Math.max(0, t.duration * 1e3),
|
|
3213
3240
|
delay: Math.max(0, t.delay * 1e3),
|
|
3214
|
-
easing:
|
|
3241
|
+
easing: Sn(t.ease),
|
|
3215
3242
|
fill: "both"
|
|
3216
3243
|
});
|
|
3217
3244
|
return n.pause(), n.currentTime = 0, n;
|
|
3218
3245
|
} catch {
|
|
3219
3246
|
return null;
|
|
3220
3247
|
}
|
|
3221
|
-
},
|
|
3222
|
-
Number.isFinite(e) && (e <
|
|
3223
|
-
},
|
|
3248
|
+
}, _a = 1.6, va = 1e3 / 600, ya = 28, ba = 42, xa = sa, Sa = () => xa, Ca = (e) => {
|
|
3249
|
+
Number.isFinite(e) && (e < va || e > ba || (xa = Math.min(sa, Math.max(va, e))));
|
|
3250
|
+
}, wa = () => ({
|
|
3224
3251
|
request: (e) => requestAnimationFrame(e),
|
|
3225
3252
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3226
3253
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3227
|
-
}),
|
|
3254
|
+
}), Ta = ((e = wa()) => {
|
|
3228
3255
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3229
3256
|
join: (n, r) => {
|
|
3230
|
-
let i =
|
|
3257
|
+
let i = bt() === "scrub", s = !i && !F() && St() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : aa(r.motion, r.element), l = !c || s ? ga(r.element, r.motion) : null, u = l ? null : c;
|
|
3231
3258
|
if (!u && !l) return null;
|
|
3232
3259
|
let d = t.get(n);
|
|
3233
3260
|
d || (d = {
|
|
3234
3261
|
tracks: [],
|
|
3235
|
-
frameIntervalMs:
|
|
3262
|
+
frameIntervalMs: xa,
|
|
3236
3263
|
recentGaps: [],
|
|
3237
3264
|
navCutMs: null,
|
|
3238
3265
|
navComplete: null,
|
|
@@ -3242,7 +3269,7 @@ var Fi = [
|
|
|
3242
3269
|
lastTime: null,
|
|
3243
3270
|
frameHandle: null
|
|
3244
3271
|
}, t.set(n, d));
|
|
3245
|
-
let f =
|
|
3272
|
+
let f = oi(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
3246
3273
|
...r,
|
|
3247
3274
|
onComplete: void 0,
|
|
3248
3275
|
parsed: u,
|
|
@@ -3256,19 +3283,19 @@ var Fi = [
|
|
|
3256
3283
|
snapMemory: {
|
|
3257
3284
|
x: null,
|
|
3258
3285
|
y: null,
|
|
3259
|
-
glide: u ?
|
|
3286
|
+
glide: u ? da(u, e.devicePixelRatio() || 1) : !1
|
|
3260
3287
|
}
|
|
3261
3288
|
};
|
|
3262
3289
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3263
3290
|
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)
|
|
3291
|
+
if (Yn.takeover(p.element), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3292
|
+
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3293
|
+
for (let e of u.strings) U(p.element, e.property, m);
|
|
3294
|
+
for (let e of u.constants) U(p.element, e.property, m);
|
|
3268
3295
|
a(p, 0);
|
|
3269
3296
|
}
|
|
3270
3297
|
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(),
|
|
3298
|
+
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
3272
3299
|
let r = t.get(n);
|
|
3273
3300
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3274
3301
|
};
|
|
@@ -3283,13 +3310,13 @@ var Fi = [
|
|
|
3283
3310
|
}
|
|
3284
3311
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
3285
3312
|
let t = r.get(e);
|
|
3286
|
-
return t || (t =
|
|
3313
|
+
return t || (t = $r(e.motion.ease), r.set(e, t)), t;
|
|
3287
3314
|
};
|
|
3288
3315
|
function a(t, n, r) {
|
|
3289
3316
|
let { element: i, parsed: a } = t;
|
|
3290
3317
|
if (!(!a || !i.isConnected)) {
|
|
3291
3318
|
if (a.transforms.length > 0) {
|
|
3292
|
-
let o =
|
|
3319
|
+
let o = pa(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3293
3320
|
o !== "" && (i.style.transform = o);
|
|
3294
3321
|
}
|
|
3295
3322
|
if (a.opacity) {
|
|
@@ -3310,10 +3337,10 @@ var Fi = [
|
|
|
3310
3337
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3311
3338
|
let d;
|
|
3312
3339
|
try {
|
|
3313
|
-
d = o.animate([
|
|
3340
|
+
d = o.animate([ha(r.motion.from), ha(r.motion.to)], {
|
|
3314
3341
|
duration: c,
|
|
3315
3342
|
delay: -u,
|
|
3316
|
-
easing:
|
|
3343
|
+
easing: Sn(r.motion.ease),
|
|
3317
3344
|
fill: "both"
|
|
3318
3345
|
});
|
|
3319
3346
|
} catch {
|
|
@@ -3327,12 +3354,12 @@ var Fi = [
|
|
|
3327
3354
|
let l = r.startTime ?? c;
|
|
3328
3355
|
if (r.lastTime !== null) {
|
|
3329
3356
|
let e = c - r.lastTime;
|
|
3330
|
-
if (n.onFrameGap?.(e), e >=
|
|
3357
|
+
if (n.onFrameGap?.(e), e >= va && e <= ba) {
|
|
3331
3358
|
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 ?
|
|
3359
|
+
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 >= ya);
|
|
3360
|
+
r.frameIntervalMs = Math.min(i ? ba : sa, Math.max(va, n)), xa = r.frameIntervalMs, n < 12 && rt(n, t[t.length - 1]);
|
|
3334
3361
|
}
|
|
3335
|
-
e >
|
|
3362
|
+
e > _a * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3336
3363
|
}
|
|
3337
3364
|
r.startTime = l, r.lastTime = c;
|
|
3338
3365
|
let u = !0, d = !1;
|
|
@@ -3353,7 +3380,7 @@ var Fi = [
|
|
|
3353
3380
|
continue;
|
|
3354
3381
|
}
|
|
3355
3382
|
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3356
|
-
if (t.handoff && f >=
|
|
3383
|
+
if (t.handoff && f >= Ot() && f < i && s(e, r, t, a)) {
|
|
3357
3384
|
u = !1;
|
|
3358
3385
|
continue;
|
|
3359
3386
|
}
|
|
@@ -3371,7 +3398,7 @@ var Fi = [
|
|
|
3371
3398
|
}
|
|
3372
3399
|
return n;
|
|
3373
3400
|
})();
|
|
3374
|
-
|
|
3401
|
+
Ta.onFrameGap = (e) => {
|
|
3375
3402
|
if (typeof window < "u") {
|
|
3376
3403
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3377
3404
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3379,102 +3406,102 @@ ha.onFrameGap = (e) => {
|
|
|
3379
3406
|
};
|
|
3380
3407
|
//#endregion
|
|
3381
3408
|
//#region src/core/engine/types.ts
|
|
3382
|
-
var
|
|
3409
|
+
var Ea = "data-flemo-skip-animation", $ = () => {}, Da = 400, Oa = 4, ka = 100, Aa = 1500, ja = "data-flemo-part-name", Ma = /* @__PURE__ */ new WeakMap(), Na = "data-flemo-anim-hold", Pa = (e) => {
|
|
3383
3410
|
let t = e.parentElement ?? e;
|
|
3384
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3411
|
+
return Array.from(t.querySelectorAll(`[${ja}]`)).filter((n) => {
|
|
3385
3412
|
let r = n.closest("[data-flemo-screen]");
|
|
3386
3413
|
return !r || r === e || !t.contains(r);
|
|
3387
3414
|
});
|
|
3388
|
-
},
|
|
3415
|
+
}, Fa = (e, t) => {
|
|
3389
3416
|
let [n, r] = t.split("-");
|
|
3390
|
-
return
|
|
3391
|
-
},
|
|
3417
|
+
return Pa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3418
|
+
}, Ia = (e, t) => {
|
|
3392
3419
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3393
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3420
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ja}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3394
3421
|
if (n === null) return !0;
|
|
3395
3422
|
let t = e.closest("[data-flemo-router]");
|
|
3396
3423
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3397
3424
|
});
|
|
3398
|
-
},
|
|
3425
|
+
}, La = (e, t) => Ia(e, t).filter((e) => e.parentElement?.closest(`[${Na}]`) == null), Ra = (e) => {
|
|
3399
3426
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3400
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3401
|
-
if (e.parentElement?.closest(`[${
|
|
3427
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ja}][${Na}]`)).filter((e) => {
|
|
3428
|
+
if (e.parentElement?.closest(`[${Na}]`) != null) return !1;
|
|
3402
3429
|
if (t === null) return !0;
|
|
3403
3430
|
let n = e.closest("[data-flemo-router]");
|
|
3404
3431
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3405
3432
|
});
|
|
3406
|
-
},
|
|
3433
|
+
}, za = (e, t, n) => {
|
|
3407
3434
|
let r = 0;
|
|
3408
3435
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3409
|
-
if (!
|
|
3410
|
-
let n =
|
|
3436
|
+
if (!H(t, e)) continue;
|
|
3437
|
+
let n = B(t, e);
|
|
3411
3438
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3412
3439
|
}
|
|
3413
|
-
for (let t of
|
|
3414
|
-
let e =
|
|
3415
|
-
if (!e || !
|
|
3416
|
-
let a =
|
|
3440
|
+
for (let t of Ia(e, n)) {
|
|
3441
|
+
let e = z.get(t.getAttribute(ja)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3442
|
+
if (!e || !H(e, i)) continue;
|
|
3443
|
+
let a = B(e, i);
|
|
3417
3444
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3418
3445
|
}
|
|
3419
|
-
let i = t.decoratorName ?
|
|
3446
|
+
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3420
3447
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3421
|
-
if (!
|
|
3422
|
-
let t =
|
|
3448
|
+
if (!H(i, e)) continue;
|
|
3449
|
+
let t = B(i, e);
|
|
3423
3450
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3424
3451
|
}
|
|
3425
3452
|
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 <
|
|
3453
|
+
}, Ba = (e) => e === "POPPING" && !ut() || e === "PUSHING" && lt() && !ut(), Va = 12, Ha = null, Ua = () => {
|
|
3454
|
+
Ha = typeof requestAnimationFrame == "function" ? requestAnimationFrame(Ua) : null;
|
|
3455
|
+
}, Wa = () => (Ha === null && typeof requestAnimationFrame == "function" && (Ha = requestAnimationFrame(Ua)), $), Ga = !1, Ka = 0, qa = () => {
|
|
3456
|
+
Ga &&= (Ka += 1, !1);
|
|
3457
|
+
}, Ja = 2, Ya = 8, Xa = () => {
|
|
3458
|
+
if (Ga || typeof requestAnimationFrame != "function") return;
|
|
3459
|
+
Ga = !0;
|
|
3460
|
+
let e = ++Ka, t = [], n = Ja, r = null, i = (a) => {
|
|
3461
|
+
if (e !== Ka) return;
|
|
3462
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Ya) {
|
|
3436
3463
|
requestAnimationFrame(i);
|
|
3437
3464
|
return;
|
|
3438
3465
|
}
|
|
3439
|
-
|
|
3466
|
+
Ga = !1;
|
|
3440
3467
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3441
|
-
|
|
3468
|
+
Ca(s), rt(s, o[o.length - 1]);
|
|
3442
3469
|
};
|
|
3443
3470
|
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" && (
|
|
3471
|
+
}, Za = (e, t, n, r) => {
|
|
3472
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = F() && ot(), u = !l && F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Sa() < Va, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? ui(e, t, d) : u ? fi(e, t, d, Sa()) : null : null;
|
|
3473
|
+
if (H(t, n)) {
|
|
3474
|
+
vi(i, t, c, r);
|
|
3475
|
+
let e = f(B(t, n) ?? null, i);
|
|
3476
|
+
e && (U(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3477
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (vi(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3451
3478
|
}
|
|
3452
3479
|
if (a && t.decoratorName) {
|
|
3453
|
-
let e =
|
|
3454
|
-
e &&
|
|
3480
|
+
let e = R.get(t.decoratorName);
|
|
3481
|
+
e && H(e, n) && vi(a, e, c, r);
|
|
3455
3482
|
}
|
|
3456
|
-
for (let e of
|
|
3457
|
-
let t =
|
|
3458
|
-
if (t &&
|
|
3459
|
-
|
|
3460
|
-
let i = f(
|
|
3461
|
-
i && (
|
|
3483
|
+
for (let e of Fa(i, n)) {
|
|
3484
|
+
let t = z.get(e.getAttribute(ja));
|
|
3485
|
+
if (t && H(t, n)) {
|
|
3486
|
+
vi(e, t, c, r);
|
|
3487
|
+
let i = f(B(t, n) ?? null, e);
|
|
3488
|
+
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3462
3489
|
}
|
|
3463
3490
|
}
|
|
3464
|
-
},
|
|
3491
|
+
}, Qa = (e, t) => {
|
|
3465
3492
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3466
3493
|
if (n) {
|
|
3467
|
-
|
|
3468
|
-
for (let e of
|
|
3494
|
+
Q(n, t);
|
|
3495
|
+
for (let e of Pa(n)) Q(e, t);
|
|
3469
3496
|
}
|
|
3470
|
-
r &&
|
|
3471
|
-
for (let e of i ?? []) e &&
|
|
3472
|
-
},
|
|
3497
|
+
r && Q(r, t);
|
|
3498
|
+
for (let e of i ?? []) e && Q(e, t);
|
|
3499
|
+
}, $a = 4, eo = (e) => `${Math.round(e * 1e3) / 1e3}s`, to = (e) => {
|
|
3473
3500
|
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" && (
|
|
3501
|
+
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 = eo(n.seconds), a = !0), i = !1;
|
|
3475
3502
|
}, s = (a) => {
|
|
3476
|
-
if (i || a.target !== t || a.animationName
|
|
3477
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3503
|
+
if (i || a.target !== t || !kn(a.animationName, n)) return;
|
|
3504
|
+
if (!e.isLive() || e.budgetUsed() >= $a) {
|
|
3478
3505
|
e.onTerminal();
|
|
3479
3506
|
return;
|
|
3480
3507
|
}
|
|
@@ -3497,14 +3524,14 @@ var ga = "data-flemo-skip-animation", $ = () => {}, _a = 400, va = 4, ya = 100,
|
|
|
3497
3524
|
t.addEventListener("animationcancel", s);
|
|
3498
3525
|
},
|
|
3499
3526
|
detach: () => {
|
|
3500
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3527
|
+
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
3501
3528
|
},
|
|
3502
3529
|
fullRestart: () => {
|
|
3503
3530
|
o({ mode: "clear" });
|
|
3504
3531
|
}
|
|
3505
3532
|
};
|
|
3506
3533
|
};
|
|
3507
|
-
function
|
|
3534
|
+
function no(e) {
|
|
3508
3535
|
Ge();
|
|
3509
3536
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3510
3537
|
if (!c) return;
|
|
@@ -3530,20 +3557,20 @@ function Ka(e) {
|
|
|
3530
3557
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3531
3558
|
if (h) {
|
|
3532
3559
|
let { scope: e } = d();
|
|
3533
|
-
if (e) if (_ && !g) for (let t of
|
|
3534
|
-
else for (let t of
|
|
3560
|
+
if (e) if (_ && !g) for (let t of La(e, m)) t.setAttribute(Na, "true");
|
|
3561
|
+
else for (let t of Ra(e)) t.removeAttribute(Na);
|
|
3535
3562
|
}
|
|
3536
3563
|
if (_) {
|
|
3537
3564
|
let { scope: e, bars: n } = d();
|
|
3538
3565
|
if (e) {
|
|
3539
|
-
|
|
3540
|
-
for (let n of
|
|
3541
|
-
for (let e of n ?? []) e &&
|
|
3566
|
+
tr(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3567
|
+
for (let n of Pa(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3568
|
+
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3542
3569
|
}
|
|
3543
3570
|
}
|
|
3544
|
-
_ && (
|
|
3571
|
+
_ && (zr(), o &&= (clearTimeout(o), null), a ||= Ir()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3545
3572
|
o = null, a?.(), a = null;
|
|
3546
|
-
},
|
|
3573
|
+
}, Da) : (a(), a = null));
|
|
3547
3574
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3548
3575
|
if (!y && i) {
|
|
3549
3576
|
let e = i;
|
|
@@ -3553,39 +3580,39 @@ function Ka(e) {
|
|
|
3553
3580
|
let e = r;
|
|
3554
3581
|
r = null, _ ? e() : u(e);
|
|
3555
3582
|
}
|
|
3556
|
-
if (v && !r &&
|
|
3583
|
+
if (v && !r && dt()) {
|
|
3557
3584
|
l();
|
|
3558
3585
|
let { scope: e } = d();
|
|
3559
3586
|
if (e) {
|
|
3560
|
-
|
|
3561
|
-
let t =
|
|
3587
|
+
Yn.takeover(e);
|
|
3588
|
+
let t = Tr(e), n = Yr(e), i = za(e, qt(f), m), a = Wi(i + Aa), o = st() === "on" ? Gr(e, i + Aa) : $, s = ar();
|
|
3562
3589
|
r = () => {
|
|
3563
|
-
a(),
|
|
3590
|
+
a(), o(), n(), t(), s();
|
|
3564
3591
|
};
|
|
3565
3592
|
}
|
|
3566
3593
|
}
|
|
3567
|
-
if (y && !i &&
|
|
3594
|
+
if (y && !i && dt()) {
|
|
3568
3595
|
l();
|
|
3569
|
-
let { scope: e } = d()
|
|
3570
|
-
e && (
|
|
3596
|
+
let { scope: e } = d();
|
|
3597
|
+
e && st() === "on" && (i = Gr(e, za(e, qt(f), m) + Aa, !0));
|
|
3571
3598
|
}
|
|
3572
3599
|
let b = (t, n, r) => {
|
|
3573
3600
|
let i = e.getTransitionTaskId();
|
|
3574
|
-
if (!i || (
|
|
3575
|
-
if (
|
|
3576
|
-
if (
|
|
3577
|
-
if (!
|
|
3578
|
-
if (!
|
|
3601
|
+
if (!i || (be.pinnedDriver(), F() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3602
|
+
if (F() && be.pinnedDriver() !== "raf") return Xa(), null;
|
|
3603
|
+
if (ve() || !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ba(t.split("-")[0])) return null;
|
|
3604
|
+
if (!F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ue() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return We(), null;
|
|
3605
|
+
if (!be.playerAllowed()) return null;
|
|
3579
3606
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3580
3607
|
if (!a) return null;
|
|
3581
|
-
let l =
|
|
3582
|
-
if (
|
|
3608
|
+
let l = qt(f);
|
|
3609
|
+
if (be.pinnedDriver() !== "raf") {
|
|
3583
3610
|
let e = t.split("-")[0];
|
|
3584
|
-
if (
|
|
3611
|
+
if (bi(l, e, a) === "native") return null;
|
|
3585
3612
|
}
|
|
3586
|
-
let u =
|
|
3613
|
+
let u = B(l, t);
|
|
3587
3614
|
if (!u) return null;
|
|
3588
|
-
let p = [], h =
|
|
3615
|
+
let p = [], h = Ta.join(i, {
|
|
3589
3616
|
element: a,
|
|
3590
3617
|
motion: u,
|
|
3591
3618
|
role: n,
|
|
@@ -3596,7 +3623,7 @@ function Ka(e) {
|
|
|
3596
3623
|
p.push(h);
|
|
3597
3624
|
for (let e of c ?? []) {
|
|
3598
3625
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3599
|
-
let n =
|
|
3626
|
+
let n = Ta.join(i, {
|
|
3600
3627
|
element: e,
|
|
3601
3628
|
motion: u,
|
|
3602
3629
|
role: "passive",
|
|
@@ -3605,9 +3632,9 @@ function Ka(e) {
|
|
|
3605
3632
|
n && p.push(n);
|
|
3606
3633
|
}
|
|
3607
3634
|
if (o && l.decoratorName) {
|
|
3608
|
-
let e =
|
|
3635
|
+
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3609
3636
|
if (n) {
|
|
3610
|
-
let e =
|
|
3637
|
+
let e = Ta.join(i, {
|
|
3611
3638
|
element: o,
|
|
3612
3639
|
motion: n,
|
|
3613
3640
|
role: "passive",
|
|
@@ -3616,10 +3643,10 @@ function Ka(e) {
|
|
|
3616
3643
|
e && p.push(e);
|
|
3617
3644
|
}
|
|
3618
3645
|
}
|
|
3619
|
-
for (let e of
|
|
3620
|
-
let n =
|
|
3646
|
+
for (let e of Fa(a, t)) {
|
|
3647
|
+
let n = z.get(e.getAttribute(ja)), r = n ? B(n, t) : null;
|
|
3621
3648
|
if (!r) continue;
|
|
3622
|
-
let a =
|
|
3649
|
+
let a = Ta.join(i, {
|
|
3623
3650
|
element: e,
|
|
3624
3651
|
motion: r,
|
|
3625
3652
|
role: "passive"
|
|
@@ -3628,8 +3655,8 @@ function Ka(e) {
|
|
|
3628
3655
|
}
|
|
3629
3656
|
return () => p.forEach((e) => e());
|
|
3630
3657
|
}, x = (e, n) => {
|
|
3631
|
-
let r = [], { decorator: i, bars: a } = d(), o =
|
|
3632
|
-
let a = 0, o =
|
|
3658
|
+
let r = [], { decorator: i, bars: a } = d(), o = qt(f), s = (e, n, i) => {
|
|
3659
|
+
let a = 0, o = to({
|
|
3633
3660
|
element: e,
|
|
3634
3661
|
expectedName: n,
|
|
3635
3662
|
motion: i,
|
|
@@ -3642,15 +3669,15 @@ function Ka(e) {
|
|
|
3642
3669
|
onTerminal: $
|
|
3643
3670
|
});
|
|
3644
3671
|
o.attach(), r.push(o.detach);
|
|
3645
|
-
}, c =
|
|
3672
|
+
}, c = Dn("screen", f, n), l = B(o, n);
|
|
3646
3673
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3647
3674
|
if (i && o.decoratorName) {
|
|
3648
|
-
let e =
|
|
3649
|
-
t && s(i,
|
|
3675
|
+
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3676
|
+
t && s(i, Dn("decorator", o.decoratorName, n), t);
|
|
3650
3677
|
}
|
|
3651
|
-
for (let t of
|
|
3652
|
-
let e = t.getAttribute(
|
|
3653
|
-
i && s(t,
|
|
3678
|
+
for (let t of Fa(e, n)) {
|
|
3679
|
+
let e = t.getAttribute(ja), r = z.get(e), i = r ? B(r, n) : null;
|
|
3680
|
+
i && s(t, Dn("part", e, n), i);
|
|
3654
3681
|
}
|
|
3655
3682
|
return r;
|
|
3656
3683
|
};
|
|
@@ -3658,12 +3685,12 @@ function Ka(e) {
|
|
|
3658
3685
|
if (m === "COMPLETED") {
|
|
3659
3686
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3660
3687
|
if (e) {
|
|
3661
|
-
|
|
3662
|
-
for (let t of
|
|
3688
|
+
W(e);
|
|
3689
|
+
for (let t of Pa(e)) W(t);
|
|
3663
3690
|
}
|
|
3664
|
-
n &&
|
|
3665
|
-
for (let e of r ?? []) e &&
|
|
3666
|
-
return
|
|
3691
|
+
n && W(n);
|
|
3692
|
+
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3693
|
+
return Qa({
|
|
3667
3694
|
scope: e,
|
|
3668
3695
|
decorator: n,
|
|
3669
3696
|
bars: r ?? []
|
|
@@ -3671,22 +3698,22 @@ function Ka(e) {
|
|
|
3671
3698
|
}
|
|
3672
3699
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3673
3700
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3674
|
-
e &&
|
|
3701
|
+
e && Za({
|
|
3675
3702
|
scope: e,
|
|
3676
3703
|
decorator: n,
|
|
3677
3704
|
bars: r ?? []
|
|
3678
|
-
},
|
|
3705
|
+
}, qt(f), `${m}-false`, t);
|
|
3679
3706
|
}
|
|
3680
3707
|
if (_ && g) {
|
|
3681
3708
|
let e = `${m}-false`, n = b(e, "passive");
|
|
3682
3709
|
if (n) return n;
|
|
3683
3710
|
let { scope: r } = d();
|
|
3684
3711
|
if (r) {
|
|
3685
|
-
let n =
|
|
3686
|
-
if (
|
|
3687
|
-
let a =
|
|
3712
|
+
let n = qt(f), i = [];
|
|
3713
|
+
if (H(n, e)) {
|
|
3714
|
+
let a = B(n, e), o = 0, s = to({
|
|
3688
3715
|
element: r,
|
|
3689
|
-
expectedName:
|
|
3716
|
+
expectedName: Dn("screen", f, e),
|
|
3690
3717
|
motion: a,
|
|
3691
3718
|
writer: t,
|
|
3692
3719
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3704,15 +3731,15 @@ function Ka(e) {
|
|
|
3704
3731
|
return $;
|
|
3705
3732
|
}
|
|
3706
3733
|
if (m === "COMPLETED") {
|
|
3707
|
-
|
|
3734
|
+
qa(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3708
3735
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3709
3736
|
if (n) {
|
|
3710
|
-
|
|
3711
|
-
for (let e of
|
|
3737
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute(Ea);
|
|
3738
|
+
for (let e of Pa(n)) W(e);
|
|
3712
3739
|
}
|
|
3713
|
-
r && (
|
|
3714
|
-
for (let e of i ?? []) e &&
|
|
3715
|
-
return
|
|
3740
|
+
r && (W(r), r.removeAttribute(Ea));
|
|
3741
|
+
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3742
|
+
return Qa({
|
|
3716
3743
|
scope: n,
|
|
3717
3744
|
decorator: r,
|
|
3718
3745
|
bars: i ?? []
|
|
@@ -3723,127 +3750,127 @@ function Ka(e) {
|
|
|
3723
3750
|
if (!S) return $;
|
|
3724
3751
|
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3725
3752
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3726
|
-
}, E =
|
|
3753
|
+
}, E = qt(f), D = `${m}-true`, O = S.getAttribute(Ea) === "true", k = !O && H(E, D);
|
|
3727
3754
|
if (!O) {
|
|
3728
3755
|
let { decorator: e, bars: n } = d();
|
|
3729
|
-
|
|
3756
|
+
Za({
|
|
3730
3757
|
scope: S,
|
|
3731
3758
|
decorator: e,
|
|
3732
3759
|
bars: n ?? []
|
|
3733
3760
|
}, E, D, t);
|
|
3734
3761
|
}
|
|
3735
|
-
k &&
|
|
3736
|
-
let
|
|
3737
|
-
for (let e of
|
|
3738
|
-
let t =
|
|
3739
|
-
r &&
|
|
3762
|
+
k && F() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || Sa() < Va) && (w = Wa());
|
|
3763
|
+
let A = `${m}-false`, j = H(E, A) ? B(E, A) : null, ee = [];
|
|
3764
|
+
for (let e of Ia(S, m)) {
|
|
3765
|
+
let t = z.get(e.getAttribute(ja)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3766
|
+
r && ee.push({
|
|
3740
3767
|
element: e,
|
|
3741
3768
|
motion: r
|
|
3742
3769
|
});
|
|
3743
3770
|
}
|
|
3744
|
-
let
|
|
3745
|
-
for (let { motion: e } of
|
|
3746
|
-
let
|
|
3771
|
+
let M = j ? (j.delay + j.duration) * 1e3 : 0;
|
|
3772
|
+
for (let { motion: e } of ee) M = Math.max(M, (e.delay + e.duration) * 1e3);
|
|
3773
|
+
let te = [];
|
|
3747
3774
|
{
|
|
3748
|
-
let e = E.decoratorName ?
|
|
3775
|
+
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3749
3776
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3750
|
-
if (!
|
|
3751
|
-
let n =
|
|
3752
|
-
n && (
|
|
3777
|
+
if (!H(e, t)) continue;
|
|
3778
|
+
let n = B(e, t);
|
|
3779
|
+
n && (te.push(n), M = Math.max(M, (n.delay + n.duration) * 1e3));
|
|
3753
3780
|
}
|
|
3754
3781
|
}
|
|
3755
3782
|
if (!k) {
|
|
3756
|
-
if (!O &&
|
|
3783
|
+
if (!O && M > 0) {
|
|
3757
3784
|
if (!g) return C && s.markGateHeld(C), $;
|
|
3758
|
-
let e =
|
|
3759
|
-
C && s.anchorGate(C, e +
|
|
3785
|
+
let e = M + 50;
|
|
3786
|
+
C && s.anchorGate(C, e + Aa);
|
|
3760
3787
|
let t = setTimeout(T, e);
|
|
3761
3788
|
return () => clearTimeout(t);
|
|
3762
3789
|
}
|
|
3763
3790
|
return queueMicrotask(T), $;
|
|
3764
3791
|
}
|
|
3765
|
-
let
|
|
3792
|
+
let N = B(E, D);
|
|
3766
3793
|
if (C) if (g) {
|
|
3767
|
-
let e = (
|
|
3768
|
-
s.anchorGate(C, Math.max(e,
|
|
3794
|
+
let e = (N.delay + N.duration) * 1e3;
|
|
3795
|
+
s.anchorGate(C, Math.max(e, M) + Aa);
|
|
3769
3796
|
} else s.markGateHeld(C);
|
|
3770
|
-
let
|
|
3771
|
-
|
|
3772
|
-
let ue = ce ?
|
|
3797
|
+
let ne = !O && !!N, re = E.driver === "native" && !F(), ie = !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ue(), ae = F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && _e(), oe = !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ba(m), se = ie || ae || oe, ce = ve() && ht(), le = null;
|
|
3798
|
+
ne && !F() && !re && !ie && !oe && !ce && (le = Fi(S, () => [S.ownerDocument.documentElement], () => Ma.get(S)?.(), !1));
|
|
3799
|
+
let ue = se ? Ln[m] ?? 0 : ce ? In[m] ?? 0 : 0, de = ie && (m === "PUSHING" || m === "POPPING");
|
|
3773
3800
|
{
|
|
3774
3801
|
let e = S.ownerDocument.documentElement;
|
|
3775
|
-
|
|
3802
|
+
se && pt() ? e.setAttribute("data-flemo-creep", "true") : e.removeAttribute("data-flemo-creep"), se ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm"), ce ? e.setAttribute("data-flemo-desk-head", "true") : e.removeAttribute("data-flemo-desk-head");
|
|
3776
3803
|
}
|
|
3777
3804
|
let fe = null;
|
|
3778
|
-
|
|
3779
|
-
let pe =
|
|
3805
|
+
ne && re && (fe = Oi(S, () => [S.ownerDocument.documentElement], () => Ma.get(S)?.()));
|
|
3806
|
+
let pe = Dn("screen", f, D), me, P = () => {
|
|
3780
3807
|
me !== void 0 && (clearTimeout(me), me = void 0);
|
|
3781
|
-
},
|
|
3782
|
-
|
|
3783
|
-
},
|
|
3808
|
+
}, he = 0, ge, ye = [], xe, Se = () => {
|
|
3809
|
+
ye.forEach((e) => cancelAnimationFrame(e)), ye = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3810
|
+
}, Ce = () => {
|
|
3784
3811
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3785
3812
|
shields exotic embedders. */
|
|
3786
3813
|
if (typeof requestAnimationFrame != "function") {
|
|
3787
3814
|
T();
|
|
3788
3815
|
return;
|
|
3789
3816
|
}
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
},
|
|
3817
|
+
xe = setTimeout(() => {
|
|
3818
|
+
Se(), T();
|
|
3819
|
+
}, ka);
|
|
3793
3820
|
let e = (t) => {
|
|
3794
3821
|
if (t <= 0) {
|
|
3795
|
-
|
|
3822
|
+
Se(), T();
|
|
3796
3823
|
return;
|
|
3797
3824
|
}
|
|
3798
|
-
|
|
3825
|
+
ye.push(requestAnimationFrame(() => e(t - 1)));
|
|
3799
3826
|
};
|
|
3800
|
-
e(
|
|
3801
|
-
},
|
|
3802
|
-
if (
|
|
3803
|
-
|
|
3827
|
+
e(Oa);
|
|
3828
|
+
}, we = () => {
|
|
3829
|
+
if (he <= 0) {
|
|
3830
|
+
Ce();
|
|
3804
3831
|
return;
|
|
3805
3832
|
}
|
|
3806
|
-
|
|
3807
|
-
},
|
|
3808
|
-
e.target === S && (e.animationName
|
|
3833
|
+
ge = setTimeout(Ce, he);
|
|
3834
|
+
}, Te = $, Ee = $, De = (e) => {
|
|
3835
|
+
e.target === S && kn(e.animationName, pe) && (S.removeEventListener("animationend", De), P(), Te(), we());
|
|
3809
3836
|
};
|
|
3810
|
-
S.addEventListener("animationend",
|
|
3811
|
-
let
|
|
3812
|
-
|
|
3813
|
-
let
|
|
3837
|
+
S.addEventListener("animationend", De);
|
|
3838
|
+
let Oe = ne && g ? b(D, "active", Ce) : null, ke = (N.delay + N.duration) * 1e3, Ae = Math.max(ke, M) + 1500, je = C ? setTimeout(() => void s.resolveTask(C), Ae) : void 0;
|
|
3839
|
+
he = Math.max(0, M - ke);
|
|
3840
|
+
let Me = ke * 1 + ue + 250, Ne = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Pe = to({
|
|
3814
3841
|
element: S,
|
|
3815
3842
|
expectedName: pe,
|
|
3816
|
-
motion:
|
|
3843
|
+
motion: N,
|
|
3817
3844
|
writer: t,
|
|
3818
|
-
isLive:
|
|
3845
|
+
isLive: Ne,
|
|
3819
3846
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3820
3847
|
spendBudget: () => {
|
|
3821
|
-
|
|
3848
|
+
Ee(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3822
3849
|
},
|
|
3823
3850
|
onTerminal: T
|
|
3824
3851
|
});
|
|
3825
|
-
|
|
3826
|
-
let
|
|
3827
|
-
|
|
3828
|
-
},
|
|
3829
|
-
if (
|
|
3830
|
-
|
|
3852
|
+
Te = Pe.detach;
|
|
3853
|
+
let Fe = !1, Ie = () => {
|
|
3854
|
+
P(), me = setTimeout(Le, Me);
|
|
3855
|
+
}, Le = () => {
|
|
3856
|
+
if (P(), Ne() && !Fe) {
|
|
3857
|
+
Fe = !0, Ee(), Pe.fullRestart(), Ie();
|
|
3831
3858
|
return;
|
|
3832
3859
|
}
|
|
3833
3860
|
T();
|
|
3834
|
-
},
|
|
3835
|
-
|
|
3836
|
-
|
|
3861
|
+
}, I = !Oe && g, Re = I ? x(S, D) : [];
|
|
3862
|
+
I && (Pe.attach(), C && Ie()), I && (re || ie) && Ma.set(S, () => {
|
|
3863
|
+
Ee(), C && me !== void 0 && Ie();
|
|
3837
3864
|
});
|
|
3838
|
-
let
|
|
3839
|
-
|
|
3840
|
-
}) : null,
|
|
3841
|
-
|
|
3865
|
+
let ze = I && re ? Ni(() => [S.ownerDocument.documentElement], () => {
|
|
3866
|
+
Ee(), C && me !== void 0 && Ie();
|
|
3867
|
+
}) : null, Be, Ve = () => {
|
|
3868
|
+
Be !== void 0 && (clearTimeout(Be), Be = void 0);
|
|
3842
3869
|
};
|
|
3843
|
-
if (
|
|
3844
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3845
|
-
for (let { element: t, motion: n } of
|
|
3846
|
-
let i =
|
|
3870
|
+
if (Ee = Ve, I && C && !de && !oe) {
|
|
3871
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = oi(N, S, e), n = j ? oi(j, S, e) : 0, r = 0;
|
|
3872
|
+
for (let { element: t, motion: n } of ee) {
|
|
3873
|
+
let i = oi(n, t, e);
|
|
3847
3874
|
if (i === null) {
|
|
3848
3875
|
r = null;
|
|
3849
3876
|
break;
|
|
@@ -3851,10 +3878,10 @@ function Ka(e) {
|
|
|
3851
3878
|
r = Math.max(r, i);
|
|
3852
3879
|
}
|
|
3853
3880
|
let i = 0;
|
|
3854
|
-
if (
|
|
3881
|
+
if (te.length > 0) {
|
|
3855
3882
|
let t = d().decorator;
|
|
3856
|
-
if (t) for (let n of
|
|
3857
|
-
let r =
|
|
3883
|
+
if (t) for (let n of te) {
|
|
3884
|
+
let r = oi(n, t, e);
|
|
3858
3885
|
if (r === null) {
|
|
3859
3886
|
i = null;
|
|
3860
3887
|
break;
|
|
@@ -3863,48 +3890,16 @@ function Ka(e) {
|
|
|
3863
3890
|
}
|
|
3864
3891
|
}
|
|
3865
3892
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3866
|
-
a !== null && a + 17 <
|
|
3867
|
-
|
|
3893
|
+
a !== null && a + 17 < ke + he && (Be = setTimeout(() => {
|
|
3894
|
+
Be = void 0, Ne() && (S.removeEventListener("animationend", De), P(), Te(), Ce());
|
|
3868
3895
|
}, a * 1 + 17 + ue));
|
|
3869
3896
|
}
|
|
3870
|
-
let Ge, Ke = () => {
|
|
3871
|
-
Ge !== void 0 && (clearTimeout(Ge), Ge = void 0);
|
|
3872
|
-
};
|
|
3873
|
-
if (Oe = Ke, F && r && !de && !se && !I()) {
|
|
3874
|
-
let e = X(M, S, 1), t = A ? X(A, S, 1) : 0, n = 0;
|
|
3875
|
-
for (let { element: e, motion: t } of te) {
|
|
3876
|
-
let r = X(t, e, 1);
|
|
3877
|
-
if (r === null) {
|
|
3878
|
-
n = null;
|
|
3879
|
-
break;
|
|
3880
|
-
}
|
|
3881
|
-
n = Math.max(n, r);
|
|
3882
|
-
}
|
|
3883
|
-
let i = 0;
|
|
3884
|
-
if (ne.length > 0) {
|
|
3885
|
-
let e = d().decorator;
|
|
3886
|
-
if (e) for (let t of ne) {
|
|
3887
|
-
let n = X(t, e, 1);
|
|
3888
|
-
if (n === null) {
|
|
3889
|
-
i = null;
|
|
3890
|
-
break;
|
|
3891
|
-
}
|
|
3892
|
-
i = Math.max(i, n);
|
|
3893
|
-
}
|
|
3894
|
-
}
|
|
3895
|
-
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3896
|
-
a !== null && (Ge = setTimeout(() => {
|
|
3897
|
-
Ge = void 0;
|
|
3898
|
-
let e = r;
|
|
3899
|
-
e && (r = null, e());
|
|
3900
|
-
}, a * 1 + ue));
|
|
3901
|
-
}
|
|
3902
3897
|
return () => {
|
|
3903
|
-
if (w(),
|
|
3904
|
-
|
|
3905
|
-
for (let e of
|
|
3898
|
+
if (w(), je !== void 0 && clearTimeout(je), ge !== void 0 && clearTimeout(ge), Se(), fe?.(), le?.(), ze?.(), Ve(), S.removeEventListener("animationend", De), I) {
|
|
3899
|
+
Pe.detach();
|
|
3900
|
+
for (let e of Re) e();
|
|
3906
3901
|
}
|
|
3907
|
-
|
|
3902
|
+
P(), Oe?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3908
3903
|
};
|
|
3909
3904
|
},
|
|
3910
3905
|
activeResumeEntryCount: () => n.size
|
|
@@ -3912,20 +3907,20 @@ function Ka(e) {
|
|
|
3912
3907
|
}
|
|
3913
3908
|
//#endregion
|
|
3914
3909
|
//#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 =
|
|
3910
|
+
function ro(e, t) {
|
|
3911
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = io(e);
|
|
3917
3912
|
if (!o) return {
|
|
3918
3913
|
element: null,
|
|
3919
3914
|
hasMarker: !1
|
|
3920
3915
|
};
|
|
3921
3916
|
let s = o.closest?.(r);
|
|
3922
|
-
if (s instanceof HTMLElement &&
|
|
3917
|
+
if (s instanceof HTMLElement && ao(s, n) && (!a || oo(s, n))) return {
|
|
3923
3918
|
element: s,
|
|
3924
3919
|
hasMarker: !0
|
|
3925
3920
|
};
|
|
3926
3921
|
let c = o, l = 0;
|
|
3927
3922
|
for (; c && l < i;) {
|
|
3928
|
-
if (
|
|
3923
|
+
if (ao(c, n) && (!a || oo(c, n))) return {
|
|
3929
3924
|
element: c,
|
|
3930
3925
|
hasMarker: !1
|
|
3931
3926
|
};
|
|
@@ -3936,7 +3931,7 @@ function qa(e, t) {
|
|
|
3936
3931
|
hasMarker: !1
|
|
3937
3932
|
};
|
|
3938
3933
|
}
|
|
3939
|
-
function
|
|
3934
|
+
function io(e) {
|
|
3940
3935
|
if (!e) return null;
|
|
3941
3936
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3942
3937
|
if (n && n.length) {
|
|
@@ -3944,34 +3939,34 @@ function Ja(e) {
|
|
|
3944
3939
|
}
|
|
3945
3940
|
return e instanceof HTMLElement ? e : null;
|
|
3946
3941
|
}
|
|
3947
|
-
function
|
|
3942
|
+
function ao(e, t) {
|
|
3948
3943
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3949
3944
|
}
|
|
3950
|
-
function
|
|
3951
|
-
if (!
|
|
3945
|
+
function oo(e, t) {
|
|
3946
|
+
if (!ao(e, t) || typeof window > "u") return !1;
|
|
3952
3947
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3953
3948
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3954
3949
|
}
|
|
3955
3950
|
//#endregion
|
|
3956
3951
|
//#region src/screen/computeBarRiding.ts
|
|
3957
|
-
function
|
|
3952
|
+
function so(e, t) {
|
|
3958
3953
|
return !!e && !!t && e.id === t.id;
|
|
3959
3954
|
}
|
|
3960
|
-
function
|
|
3955
|
+
function co(e) {
|
|
3961
3956
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3962
3957
|
app: !1,
|
|
3963
3958
|
nav: !1
|
|
3964
3959
|
};
|
|
3965
3960
|
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
3961
|
return {
|
|
3967
|
-
app: e.hasTopBar && !
|
|
3968
|
-
nav: e.hasNavBar && !
|
|
3962
|
+
app: e.hasTopBar && !so(t, r),
|
|
3963
|
+
nav: e.hasNavBar && !so(n, i)
|
|
3969
3964
|
};
|
|
3970
3965
|
}
|
|
3971
3966
|
//#endregion
|
|
3972
3967
|
//#region src/core/engine/createSwipeController.ts
|
|
3973
|
-
var
|
|
3974
|
-
function
|
|
3968
|
+
var lo = "data-flemo-skip-animation";
|
|
3969
|
+
function uo(e) {
|
|
3975
3970
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3976
3971
|
current: [],
|
|
3977
3972
|
prev: []
|
|
@@ -4020,9 +4015,9 @@ function eo(e) {
|
|
|
4020
4015
|
y: e.clientY
|
|
4021
4016
|
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4022
4017
|
}, 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)
|
|
4018
|
+
let s = er(r, a, o, t);
|
|
4019
|
+
if (r === e.getElements().scope) for (let e of i.current) er(e, a, o, t);
|
|
4020
|
+
else if (r === n) for (let e of i.prev) er(e, a, o, t);
|
|
4026
4021
|
return s;
|
|
4027
4022
|
}, T = (n) => {
|
|
4028
4023
|
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 +4025,17 @@ function eo(e) {
|
|
|
4030
4025
|
let t = e.getAttribute("data-flemo-bar-id");
|
|
4031
4026
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4032
4027
|
}, 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 && !
|
|
4028
|
+
m && l && !so(l, d) && p.push(m), h && u && !so(u, f) && p.push(h);
|
|
4034
4029
|
let g = [];
|
|
4035
|
-
n && (o && d && !
|
|
4030
|
+
n && (o && d && !so(d, l) && g.push(o), s && f && !so(f, u) && g.push(s)), i = {
|
|
4036
4031
|
current: p,
|
|
4037
4032
|
prev: g
|
|
4038
4033
|
};
|
|
4039
|
-
for (let n of p)
|
|
4040
|
-
for (let n of g)
|
|
4034
|
+
for (let n of p) vi(n, e.getTransition(), !1, t);
|
|
4035
|
+
for (let n of g) vi(n, e.getTransition(), !1, t);
|
|
4041
4036
|
}, E = () => {
|
|
4042
|
-
for (let e of i.current)
|
|
4043
|
-
for (let e of i.prev)
|
|
4037
|
+
for (let e of i.current) W(e, void 0, t), Q(e, t);
|
|
4038
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4044
4039
|
i = {
|
|
4045
4040
|
current: [],
|
|
4046
4041
|
prev: []
|
|
@@ -4053,10 +4048,10 @@ function eo(e) {
|
|
|
4053
4048
|
};
|
|
4054
4049
|
}, O = (e, n, r) => {
|
|
4055
4050
|
let i = (i, a) => {
|
|
4056
|
-
let o =
|
|
4051
|
+
let o = z.get(i.getAttribute("data-flemo-part-name"));
|
|
4057
4052
|
if (!o) return;
|
|
4058
4053
|
let s = {
|
|
4059
|
-
animate: (e, n, r) =>
|
|
4054
|
+
animate: (e, n, r) => er(e, n, r, t),
|
|
4060
4055
|
element: i,
|
|
4061
4056
|
active: a
|
|
4062
4057
|
};
|
|
@@ -4065,12 +4060,12 @@ function eo(e) {
|
|
|
4065
4060
|
for (let e of a.current) i(e, !0);
|
|
4066
4061
|
for (let e of a.prev) i(e, !1);
|
|
4067
4062
|
}, k = () => {
|
|
4068
|
-
for (let e of [...a.current, ...a.prev])
|
|
4063
|
+
for (let e of [...a.current, ...a.prev]) W(e, void 0, t);
|
|
4069
4064
|
a = {
|
|
4070
4065
|
current: [],
|
|
4071
4066
|
prev: []
|
|
4072
4067
|
};
|
|
4073
|
-
},
|
|
4068
|
+
}, A = async (t) => {
|
|
4074
4069
|
let i = e.getTransition();
|
|
4075
4070
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4076
4071
|
s = !1;
|
|
@@ -4102,19 +4097,19 @@ function eo(e) {
|
|
|
4102
4097
|
prevScreen: n,
|
|
4103
4098
|
onStart: (e) => {
|
|
4104
4099
|
g?.onSwipeStart?.(e, {
|
|
4105
|
-
animate:
|
|
4100
|
+
animate: er,
|
|
4106
4101
|
currentDecorator: l,
|
|
4107
4102
|
prevDecorator: r
|
|
4108
4103
|
}), O("start", e, 0);
|
|
4109
4104
|
}
|
|
4110
4105
|
});
|
|
4111
4106
|
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), E(), k());
|
|
4112
|
-
},
|
|
4113
|
-
let t =
|
|
4107
|
+
}, j = (e) => {
|
|
4108
|
+
let t = A(e);
|
|
4114
4109
|
u = t, t.finally(() => {
|
|
4115
4110
|
u = null;
|
|
4116
4111
|
});
|
|
4117
|
-
},
|
|
4112
|
+
}, ee = (t) => {
|
|
4118
4113
|
let i = e.getTransition();
|
|
4119
4114
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4120
4115
|
C(t);
|
|
@@ -4125,13 +4120,13 @@ function eo(e) {
|
|
|
4125
4120
|
prevScreen: n,
|
|
4126
4121
|
onProgress: (e, t) => {
|
|
4127
4122
|
s?.onSwipe?.(e, t, {
|
|
4128
|
-
animate:
|
|
4123
|
+
animate: er,
|
|
4129
4124
|
currentDecorator: o,
|
|
4130
4125
|
prevDecorator: r
|
|
4131
4126
|
}), O("swipe", e, t);
|
|
4132
4127
|
}
|
|
4133
4128
|
});
|
|
4134
|
-
},
|
|
4129
|
+
}, M = async (o, s = !1) => {
|
|
4135
4130
|
u && await u;
|
|
4136
4131
|
let l = e.getTransition();
|
|
4137
4132
|
if (!l.swipeDirection || !c) return;
|
|
@@ -4165,16 +4160,16 @@ function eo(e) {
|
|
|
4165
4160
|
onStart: (e) => {
|
|
4166
4161
|
let t = !s && e;
|
|
4167
4162
|
p?.onSwipeEnd?.(t, {
|
|
4168
|
-
animate:
|
|
4163
|
+
animate: er,
|
|
4169
4164
|
currentDecorator: f,
|
|
4170
4165
|
prevDecorator: r
|
|
4171
4166
|
}), O("end", t, 0);
|
|
4172
4167
|
}
|
|
4173
4168
|
});
|
|
4174
4169
|
if (!s && g) {
|
|
4175
|
-
d?.setAttribute(
|
|
4176
|
-
for (let e of i.current)
|
|
4177
|
-
for (let e of i.prev)
|
|
4170
|
+
d?.setAttribute(lo, "true"), f?.setAttribute(lo, "true");
|
|
4171
|
+
for (let e of i.current) Q(e, t);
|
|
4172
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4178
4173
|
i = {
|
|
4179
4174
|
current: [],
|
|
4180
4175
|
prev: []
|
|
@@ -4182,14 +4177,14 @@ function eo(e) {
|
|
|
4182
4177
|
current: [],
|
|
4183
4178
|
prev: []
|
|
4184
4179
|
}, e.back();
|
|
4185
|
-
} else d &&
|
|
4180
|
+
} 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
4181
|
};
|
|
4187
4182
|
return {
|
|
4188
4183
|
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 =
|
|
4184
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = ro(t.target, {
|
|
4190
4185
|
direction: "x",
|
|
4191
4186
|
verifyByScroll: !0
|
|
4192
|
-
}), _ =
|
|
4187
|
+
}), _ = ro(t.target, {
|
|
4193
4188
|
direction: "y",
|
|
4194
4189
|
verifyByScroll: !0
|
|
4195
4190
|
}), v = t.clientX, y = t.clientY);
|
|
@@ -4197,7 +4192,7 @@ function eo(e) {
|
|
|
4197
4192
|
pointerMove: (t) => {
|
|
4198
4193
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4199
4194
|
if (c) {
|
|
4200
|
-
|
|
4195
|
+
ee(t);
|
|
4201
4196
|
return;
|
|
4202
4197
|
}
|
|
4203
4198
|
if (!o) return;
|
|
@@ -4211,48 +4206,48 @@ function eo(e) {
|
|
|
4211
4206
|
return;
|
|
4212
4207
|
}
|
|
4213
4208
|
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4214
|
-
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0,
|
|
4209
|
+
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0, j(t);
|
|
4215
4210
|
else {
|
|
4216
4211
|
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4217
|
-
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0,
|
|
4212
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, j(t));
|
|
4218
4213
|
}
|
|
4219
4214
|
},
|
|
4220
4215
|
pointerUp: (e) => {
|
|
4221
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4216
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && M(e));
|
|
4222
4217
|
},
|
|
4223
4218
|
pointerCancel: (e) => {
|
|
4224
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4219
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && M(e, !0));
|
|
4225
4220
|
},
|
|
4226
4221
|
shouldPreventTouch: () => s
|
|
4227
4222
|
};
|
|
4228
4223
|
}
|
|
4229
4224
|
//#endregion
|
|
4230
4225
|
//#region src/screen/pendingNetwork.ts
|
|
4231
|
-
var
|
|
4232
|
-
|
|
4233
|
-
},
|
|
4234
|
-
if (!(
|
|
4235
|
-
if (
|
|
4226
|
+
var fo = 0, po = !1, mo = () => {
|
|
4227
|
+
fo = Math.max(0, fo - 1);
|
|
4228
|
+
}, ho = () => {
|
|
4229
|
+
if (!(po || typeof window > "u")) {
|
|
4230
|
+
if (po = !0, typeof window.fetch == "function") {
|
|
4236
4231
|
let e = window.fetch.bind(window);
|
|
4237
4232
|
window.fetch = (...t) => {
|
|
4238
|
-
|
|
4233
|
+
fo += 1;
|
|
4239
4234
|
let n;
|
|
4240
4235
|
try {
|
|
4241
4236
|
n = e(...t);
|
|
4242
4237
|
} catch (e) {
|
|
4243
|
-
throw
|
|
4238
|
+
throw mo(), e;
|
|
4244
4239
|
}
|
|
4245
|
-
return n.then((e) => (
|
|
4246
|
-
throw
|
|
4240
|
+
return n.then((e) => (mo(), e), (e) => {
|
|
4241
|
+
throw mo(), e;
|
|
4247
4242
|
});
|
|
4248
4243
|
};
|
|
4249
4244
|
}
|
|
4250
4245
|
if (typeof XMLHttpRequest == "function") {
|
|
4251
4246
|
let e = XMLHttpRequest.prototype.send;
|
|
4252
4247
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4253
|
-
|
|
4248
|
+
fo += 1;
|
|
4254
4249
|
let n = !1, r = () => {
|
|
4255
|
-
n || (n = !0,
|
|
4250
|
+
n || (n = !0, mo());
|
|
4256
4251
|
};
|
|
4257
4252
|
this.addEventListener("loadend", r);
|
|
4258
4253
|
try {
|
|
@@ -4263,28 +4258,28 @@ var to = 0, no = !1, ro = () => {
|
|
|
4263
4258
|
};
|
|
4264
4259
|
}
|
|
4265
4260
|
}
|
|
4266
|
-
},
|
|
4261
|
+
}, go = () => (ho(), fo > 0);
|
|
4267
4262
|
//#endregion
|
|
4268
4263
|
//#region src/screen/animStartAnchor.ts
|
|
4269
|
-
function
|
|
4264
|
+
function _o(e) {
|
|
4270
4265
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4271
4266
|
}
|
|
4272
|
-
var
|
|
4273
|
-
function
|
|
4274
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4267
|
+
var vo = 300, yo = 20;
|
|
4268
|
+
function bo(e) {
|
|
4269
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, yo);
|
|
4275
4270
|
}
|
|
4276
|
-
function
|
|
4277
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4271
|
+
function xo(e) {
|
|
4272
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of bo(e)) t.decode().catch(() => {});
|
|
4278
4273
|
}
|
|
4279
|
-
var
|
|
4274
|
+
var So = 3, Co = 40, wo = (e) => {
|
|
4280
4275
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4281
4276
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4282
4277
|
/* v8 ignore stop */
|
|
4283
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4284
|
-
},
|
|
4278
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * Co) / t < So;
|
|
4279
|
+
}, To = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4285
4280
|
let t = e.animationName;
|
|
4286
4281
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4287
|
-
}),
|
|
4282
|
+
}), Eo = (e) => {
|
|
4288
4283
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4289
4284
|
which already requires querySelectorAll. */
|
|
4290
4285
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4292,12 +4287,12 @@ var fo = 3, po = 40, mo = (e) => {
|
|
|
4292
4287
|
the guard shields exotic embedders. */
|
|
4293
4288
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4294
4289
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4295
|
-
if (r >=
|
|
4290
|
+
if (r >= yo) break;
|
|
4296
4291
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4297
4292
|
}
|
|
4298
4293
|
return !1;
|
|
4299
4294
|
};
|
|
4300
|
-
function
|
|
4295
|
+
function Do(e, t = {}) {
|
|
4301
4296
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4302
4297
|
if (n) return;
|
|
4303
4298
|
let r = t.scope;
|
|
@@ -4305,7 +4300,7 @@ function _o(e, t = {}) {
|
|
|
4305
4300
|
e();
|
|
4306
4301
|
return;
|
|
4307
4302
|
}
|
|
4308
|
-
let i =
|
|
4303
|
+
let i = bo(r);
|
|
4309
4304
|
if (i.length === 0) {
|
|
4310
4305
|
e();
|
|
4311
4306
|
return;
|
|
@@ -4323,15 +4318,15 @@ function _o(e, t = {}) {
|
|
|
4323
4318
|
return;
|
|
4324
4319
|
}
|
|
4325
4320
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4326
|
-
if (!n.renderSettleOnly && !
|
|
4321
|
+
if (!n.renderSettleOnly && !wo(r)) {
|
|
4327
4322
|
e();
|
|
4328
4323
|
return;
|
|
4329
4324
|
}
|
|
4330
4325
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4331
4326
|
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 = () =>
|
|
4327
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => wo(r) && To(r), f = () => go() || Eo(r), p = () => {
|
|
4333
4328
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4334
|
-
}, m = () => n.renderSettleOnly ? 6 : !
|
|
4329
|
+
}, m = () => n.renderSettleOnly ? 6 : !wo(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4335
4330
|
if (!n.renderSettleOnly) {
|
|
4336
4331
|
p();
|
|
4337
4332
|
return;
|
|
@@ -4410,14 +4405,14 @@ function _o(e, t = {}) {
|
|
|
4410
4405
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4411
4406
|
};
|
|
4412
4407
|
}
|
|
4413
|
-
function
|
|
4414
|
-
let n =
|
|
4408
|
+
function Oo(e, t = {}) {
|
|
4409
|
+
let n = Do(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4415
4410
|
return () => {
|
|
4416
4411
|
n(), clearTimeout(i);
|
|
4417
4412
|
};
|
|
4418
4413
|
}
|
|
4419
|
-
var
|
|
4420
|
-
function
|
|
4414
|
+
var ko = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4415
|
+
function Ao() {
|
|
4421
4416
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4422
4417
|
clearTimeout(n.backstop), e.delete(t);
|
|
4423
4418
|
let r = [...n.members];
|
|
@@ -4427,14 +4422,14 @@ function bo() {
|
|
|
4427
4422
|
return { join: (r, i, a) => {
|
|
4428
4423
|
let o = e.get(r);
|
|
4429
4424
|
if (o) {
|
|
4430
|
-
let e =
|
|
4425
|
+
let e = ko(a);
|
|
4431
4426
|
if (e > o.backstopMs) {
|
|
4432
4427
|
clearTimeout(o.backstop);
|
|
4433
4428
|
let n = o;
|
|
4434
4429
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4435
4430
|
}
|
|
4436
4431
|
} else {
|
|
4437
|
-
let n =
|
|
4432
|
+
let n = ko(a), i = {
|
|
4438
4433
|
members: /* @__PURE__ */ new Set(),
|
|
4439
4434
|
backstop: setTimeout(() => t(r, i), n),
|
|
4440
4435
|
backstopMs: n
|
|
@@ -4444,7 +4439,7 @@ function bo() {
|
|
|
4444
4439
|
let s = o, c = {
|
|
4445
4440
|
release: i,
|
|
4446
4441
|
ready: !1,
|
|
4447
|
-
cancelReadiness:
|
|
4442
|
+
cancelReadiness: Do(() => {
|
|
4448
4443
|
c.ready = !0, n(s) && t(r, s);
|
|
4449
4444
|
}, a)
|
|
4450
4445
|
};
|
|
@@ -4461,7 +4456,7 @@ function bo() {
|
|
|
4461
4456
|
}
|
|
4462
4457
|
//#endregion
|
|
4463
4458
|
//#region src/screen/observeBarHeight.ts
|
|
4464
|
-
function
|
|
4459
|
+
function jo(e, t) {
|
|
4465
4460
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4466
4461
|
let n = new ResizeObserver(([e]) => {
|
|
4467
4462
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4472,14 +4467,14 @@ function xo(e, t) {
|
|
|
4472
4467
|
}
|
|
4473
4468
|
//#endregion
|
|
4474
4469
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4475
|
-
var
|
|
4476
|
-
function
|
|
4470
|
+
var Mo = 0;
|
|
4471
|
+
function No(e) {
|
|
4477
4472
|
let t = 0, n = () => {
|
|
4478
4473
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
4479
4474
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4480
4475
|
t = t < 0 ? 0 : t;
|
|
4481
|
-
let n = t -
|
|
4482
|
-
n = n < 0 ? 0 : n,
|
|
4476
|
+
let n = t - Mo;
|
|
4477
|
+
n = n < 0 ? 0 : n, Mo ||= t, e(t, n);
|
|
4483
4478
|
});
|
|
4484
4479
|
};
|
|
4485
4480
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -4488,14 +4483,14 @@ function Co(e) {
|
|
|
4488
4483
|
}
|
|
4489
4484
|
//#endregion
|
|
4490
4485
|
//#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
|
-
|
|
4486
|
+
var Po = () => {}, Fo = "data-flemo-gpu-prewarm", Io = 2e3, Lo = 1200, Ro = 120, zo = 3, Bo = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Vo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Ho = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Uo = "cold", Wo = 0, Go = null;
|
|
4487
|
+
function Ko() {
|
|
4488
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !F()) return Po;
|
|
4489
|
+
if (Wo += 1, Uo === "cold") {
|
|
4490
|
+
Uo = "scheduled";
|
|
4496
4491
|
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
|
-
|
|
4492
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: Io }) : null, t = e === null ? setTimeout(n, Lo) : null;
|
|
4493
|
+
Go = () => {
|
|
4499
4494
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4500
4495
|
};
|
|
4501
4496
|
}, n = () => {
|
|
@@ -4503,13 +4498,13 @@ function Io() {
|
|
|
4503
4498
|
t();
|
|
4504
4499
|
return;
|
|
4505
4500
|
}
|
|
4506
|
-
|
|
4501
|
+
Go = null, Uo = "done";
|
|
4507
4502
|
let n = document.createElement("div");
|
|
4508
|
-
n.setAttribute(
|
|
4503
|
+
n.setAttribute(Fo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Bo);
|
|
4509
4504
|
let r = document.createElement("div");
|
|
4510
|
-
r.setAttribute("style",
|
|
4505
|
+
r.setAttribute("style", Vo), r.textContent = "flemo";
|
|
4511
4506
|
let i = document.createElement("div");
|
|
4512
|
-
i.setAttribute("style",
|
|
4507
|
+
i.setAttribute("style", Ho);
|
|
4513
4508
|
let a = document.createElement("div");
|
|
4514
4509
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4515
4510
|
let o = document.createElement("div");
|
|
@@ -4530,14 +4525,14 @@ function Io() {
|
|
|
4530
4525
|
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
4526
|
try {
|
|
4532
4527
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4533
|
-
duration:
|
|
4534
|
-
iterations:
|
|
4528
|
+
duration: Ro,
|
|
4529
|
+
iterations: zo
|
|
4535
4530
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4536
|
-
duration:
|
|
4537
|
-
iterations:
|
|
4531
|
+
duration: Ro,
|
|
4532
|
+
iterations: zo
|
|
4538
4533
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4539
|
-
duration:
|
|
4540
|
-
iterations:
|
|
4534
|
+
duration: Ro,
|
|
4535
|
+
iterations: zo
|
|
4541
4536
|
});
|
|
4542
4537
|
} catch {}
|
|
4543
4538
|
setTimeout(() => n.remove(), 450);
|
|
@@ -4546,12 +4541,12 @@ function Io() {
|
|
|
4546
4541
|
}
|
|
4547
4542
|
let e = !1;
|
|
4548
4543
|
return () => {
|
|
4549
|
-
e || (e = !0,
|
|
4544
|
+
e || (e = !0, Wo = Math.max(0, Wo - 1), Wo === 0 && Uo === "scheduled" && (Go?.(), Go = null, Uo = "cold"));
|
|
4550
4545
|
};
|
|
4551
4546
|
}
|
|
4552
4547
|
//#endregion
|
|
4553
4548
|
//#region src/utils/isOpaqueColor.ts
|
|
4554
|
-
function
|
|
4549
|
+
function qo(e) {
|
|
4555
4550
|
let t = e.trim().toLowerCase();
|
|
4556
4551
|
if (t === "transparent" || t === "") return !1;
|
|
4557
4552
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4562,7 +4557,7 @@ function Lo(e) {
|
|
|
4562
4557
|
}
|
|
4563
4558
|
//#endregion
|
|
4564
4559
|
//#region src/utils/buildRoutePath.ts
|
|
4565
|
-
function
|
|
4560
|
+
function Jo(e, n) {
|
|
4566
4561
|
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
4562
|
return {
|
|
4568
4563
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4570,4 +4565,4 @@ function Ro(e, n) {
|
|
|
4570
4565
|
};
|
|
4571
4566
|
}
|
|
4572
4567
|
//#endregion
|
|
4573
|
-
export {
|
|
4568
|
+
export { vo as ANIM_HOLD_RELEASE_BACKSTOP_MS, q as OFFLOADED_SRC_ATTR, cr as OVERSIZE_AREA_RATIO, Ea as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, _o as animHoldKey, er as animateInline, Dn as animationName, ie as appendParamsQuery, zn as applyTransitionStyles, Jo as buildRoutePath, oo as canProgrammaticallyScroll, W as clearInlineAnimation, bn as collectAnimatedProperties, Nn as compileTransitionStyles, co as computeBarRiding, Pt as computeScreenFreeze, Nt as computeScreenFreezeMode, b as consumeSelfInducedPop, Ao as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Jt as createDecorator, c as createHistoryStore, x as createHistorySync, xr as createImageDecodeOffloader, j as createMemoryHistoryDriver, ee as createNavigateStore, ne as createNavigationController, Qt as createPartTransition, Yt as createRawDecorator, $t as createRawPartTransition, It as createRawTransition, pe as createRouterScope, me as createScreenSelector, ue as createScreenStore, _ as createSelfPopGuard, ae as createStepController, uo as createSwipeController, Ft as createTransition, no as createTransitionEngine, se as createTransitionStore, Vt as cupertino, R as decoratorMap, F as detectBlinkEngine, xo as eagerlyDecodeImages, Sn as easingToCss, Ko as ensureGpuPipelinePrewarm, Cr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Kn as enteringInitialStyle, ro as findScrollable, l as getMatchedPathPattern, u as getParams, Ue as governedCompiledActive, Ir as holdCompositorWarm, ye as isDesktopBlink, _e as isLegacyAndroidBlink, qo as isOpaqueColor, f as isServer, Ut as layout, He as lowPowerCadenceActive, y as markSelfInducedPop, ce as matchesPathname, Wt as material, Gt as none, jo as observeBarHeight, No as observeViewportScrollHeight, ao as overflowsAxis, Zt as overlay, z as partTransitionMap, mt as readDeferReleaseCommitFlag, ft as readDesktopReleaseFlipFlag, vt as readImageOffloadOverride, _t as readLayerPromotionFlag, gt as readPrerasterFlag, lt as readSettleGateFlag, re as readStepParams, Gn as registerTransitionDefinitions, A as releaseScopeHistorySync, qt as resolveTransition, Oo as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, so as sharedBarsMatch, gr as shouldOffloadImage, at as steadySixtyPlayerEligible, oe as subscribeStepParamsRestore, xn as targetToDecls, Kt as transitionMap, H as variantHasAnimation };
|