@flemo/core 1.28.1 → 1.29.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/governedCompiled.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +731 -778
- package/dist/transition/compileTransitionStyles.d.ts +2 -2
- package/dist/transition/swipeSettle.d.ts +3 -1
- package/package.json +3 -3
- package/dist/core/engine/__tests__/lowPowerCadence.test.d.ts +0 -1
- package/dist/core/engine/lowPowerCadence.d.ts +0 -6
package/dist/index.mjs
CHANGED
|
@@ -859,7 +859,7 @@ function ie(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function ae(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function I(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function oe(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 se = (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 ce() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function se() {
|
|
|
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: se(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: se(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 se() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var le = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, ue = /* @__PURE__ */ new Map();
|
|
949
|
+
function de(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 = ue.get(s);
|
|
953
953
|
if (e) {
|
|
954
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
955
955
|
let t = e.history.getState();
|
|
@@ -979,25 +979,25 @@ function ue(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? le : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
984
|
navigate: ee(),
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
985
|
+
transition: ae(i),
|
|
986
|
+
screen: ce(),
|
|
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) => oe(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && ue.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function fe(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,170 +1010,125 @@ function de(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var pe = "flemo:motion-driver-force", me = !1, he = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(pe);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(pe);
|
|
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 ? (!me && typeof console < "u" && (me = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${pe}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(pe), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
},
|
|
1026
|
+
}, I = () => {
|
|
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
|
+
}, ge = () => {
|
|
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
|
+
}, _e = () => typeof navigator > "u" ? !1 : !I() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), ve = () => I() && typeof navigator < "u" && navigator.maxTouchPoints === 0, ye = ((e = !1) => ({
|
|
1039
1039
|
playerAllowed: () => {
|
|
1040
|
-
let t =
|
|
1040
|
+
let t = he();
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
|
-
pinnedDriver:
|
|
1044
|
-
}))(!0),
|
|
1043
|
+
pinnedDriver: he
|
|
1044
|
+
}))(!0), be = () => !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0, xe = 14, Se = 22, Ce = 2, we = 1.5, Te = "flemo:sixty", Ee = () => {
|
|
1045
1045
|
try {
|
|
1046
|
-
return typeof sessionStorage < "u"
|
|
1047
|
-
} catch {
|
|
1048
|
-
return !1;
|
|
1049
|
-
}
|
|
1050
|
-
}, ke = (e) => {
|
|
1051
|
-
try {
|
|
1052
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(Ee, e ? "1" : "0");
|
|
1053
|
-
} catch {}
|
|
1054
|
-
}, Ae = !1, je = !1, Me = !1, Ne = 12, Pe = 8, Fe = [], Ie = null, Le = !1, Re = !1, ze = !1, Be = () => {
|
|
1055
|
-
if (Le || !De()) return;
|
|
1056
|
-
Le = !0;
|
|
1057
|
-
let e = (t) => {
|
|
1058
|
-
if (Ie !== null && (Fe.push(t - Ie), Fe.length > Ne && Fe.shift(), Fe.length >= Pe)) {
|
|
1059
|
-
let e = [...Fe].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
-
t[t.length - 1] - t[0] <= xe && (Re = n >= ye && n <= be, ze = !0);
|
|
1061
|
-
}
|
|
1062
|
-
Ie = t, requestAnimationFrame(e);
|
|
1063
|
-
};
|
|
1064
|
-
requestAnimationFrame(e);
|
|
1065
|
-
}, Ve = () => Ae || ze && Re, He = () => De(), Ue = (e = 0) => {
|
|
1066
|
-
if (je || !De()) return;
|
|
1067
|
-
je = !0;
|
|
1068
|
-
let t = [], n = null, r = (i) => {
|
|
1069
|
-
if (n !== null && t.push(i - n), n = i, t.length < Ce) {
|
|
1070
|
-
requestAnimationFrame(r);
|
|
1071
|
-
return;
|
|
1072
|
-
}
|
|
1073
|
-
je = !1;
|
|
1074
|
-
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= ye && o[o.length - 1] <= be && o[o.length - 1] - o[0] <= xe, c = o[o.length - 1] <= Se;
|
|
1075
|
-
if (s || c) {
|
|
1076
|
-
Ae = s, s && o[Math.floor(o.length / 2)], ke(Ae);
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
-
e + 1 < Te && typeof setTimeout == "function" && setTimeout(() => Ue(e + 1), we);
|
|
1081
|
-
};
|
|
1082
|
-
requestAnimationFrame(r);
|
|
1083
|
-
}, We = () => {
|
|
1084
|
-
Be(), Ue(), !(Me || typeof document > "u" || typeof document.addEventListener != "function") && (Me = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
|
-
document.visibilityState === "visible" && Ue();
|
|
1086
|
-
}));
|
|
1087
|
-
};
|
|
1088
|
-
De() && (Ae = Oe(), Be(), Ue());
|
|
1089
|
-
var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
1090
|
-
try {
|
|
1091
|
-
return typeof sessionStorage < "u" ? sessionStorage.getItem(Ye) : null;
|
|
1046
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(Te) : null;
|
|
1092
1047
|
} catch {
|
|
1093
1048
|
return null;
|
|
1094
1049
|
}
|
|
1095
|
-
},
|
|
1050
|
+
}, De = (e) => {
|
|
1096
1051
|
try {
|
|
1097
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Te, e);
|
|
1098
1053
|
} catch {}
|
|
1099
|
-
},
|
|
1100
|
-
if (!(!Number.isFinite(e) || e <= 0) &&
|
|
1054
|
+
}, Oe = Ee(), ke = Oe === "high", Ae = Oe !== null && Oe !== "high" ? Math.min(Ce, Math.max(0, parseInt(Oe, 10) || 0)) : 0, je = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, Me = (e, t) => {
|
|
1055
|
+
if (!(!Number.isFinite(e) || e <= 0) && je()) {
|
|
1101
1056
|
if (e < 12) {
|
|
1102
1057
|
if (t !== void 0 && t > 24) return;
|
|
1103
|
-
|
|
1058
|
+
ke = !0, Ae = 0, De("high");
|
|
1104
1059
|
return;
|
|
1105
1060
|
}
|
|
1106
|
-
if (e >=
|
|
1107
|
-
|
|
1061
|
+
if (e >= xe && e <= Se) {
|
|
1062
|
+
Ae = Math.min(Ce, Ae + 1), ke || De(String(Ae));
|
|
1108
1063
|
return;
|
|
1109
1064
|
}
|
|
1110
|
-
e <
|
|
1065
|
+
e < xe && (Ae = 0, ke || De("0"));
|
|
1111
1066
|
}
|
|
1112
|
-
},
|
|
1067
|
+
}, Ne = () => !ke && Ae >= Ce, Pe = () => Ne() && I() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= we, L = (e) => {
|
|
1113
1068
|
try {
|
|
1114
1069
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1070
|
} catch {
|
|
1116
1071
|
return null;
|
|
1117
1072
|
}
|
|
1118
|
-
},
|
|
1119
|
-
let e =
|
|
1073
|
+
}, Fe = () => L("flemo:landing-snap") === "on", Ie = () => {
|
|
1074
|
+
let e = L("flemo:imghold");
|
|
1120
1075
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
},
|
|
1076
|
+
}, Le = () => I() && (navigator.maxTouchPoints ?? 0) > 0, Re = () => {
|
|
1122
1077
|
try {
|
|
1123
1078
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 :
|
|
1079
|
+
return e === "on" ? !0 : e === "off" ? !1 : be() || Pe() || Le() || _e();
|
|
1125
1080
|
} catch {
|
|
1126
1081
|
return !1;
|
|
1127
1082
|
}
|
|
1128
|
-
},
|
|
1129
|
-
let e =
|
|
1130
|
-
return e === "on" || e !== "off" &&
|
|
1131
|
-
},
|
|
1132
|
-
let e =
|
|
1133
|
-
return e === "on" || e !== "off" &&
|
|
1134
|
-
},
|
|
1135
|
-
let e =
|
|
1136
|
-
return e === "defer" || e !== "sync" &&
|
|
1137
|
-
},
|
|
1138
|
-
let e =
|
|
1139
|
-
return e === "on" || e !== "off" &&
|
|
1140
|
-
},
|
|
1141
|
-
let e =
|
|
1083
|
+
}, ze = () => L("flemo:handoff") === "on", Be = () => L("flemo:arrivalhold") !== "off", Ve = () => {
|
|
1084
|
+
let e = L("flemo:deskflip");
|
|
1085
|
+
return e === "on" || e !== "off" && _e();
|
|
1086
|
+
}, He = () => {
|
|
1087
|
+
let e = L("flemo:creep");
|
|
1088
|
+
return e === "on" || e !== "off" && be();
|
|
1089
|
+
}, Ue = () => {
|
|
1090
|
+
let e = L("flemo:relcommit");
|
|
1091
|
+
return e === "defer" || e !== "sync" && be();
|
|
1092
|
+
}, We = () => {
|
|
1093
|
+
let e = L("flemo:deskhead");
|
|
1094
|
+
return e === "on" || e !== "off" && _e();
|
|
1095
|
+
}, Ge = () => L("flemo:preraster") === "on", Ke = () => Ge(), qe = () => {
|
|
1096
|
+
let e = L("flemo:imgoffload");
|
|
1142
1097
|
return e === "on" || e === "off" ? e : null;
|
|
1143
|
-
},
|
|
1144
|
-
if (
|
|
1145
|
-
let e =
|
|
1146
|
-
return
|
|
1147
|
-
},
|
|
1148
|
-
if (
|
|
1149
|
-
let e =
|
|
1150
|
-
return
|
|
1151
|
-
},
|
|
1152
|
-
if (
|
|
1153
|
-
let e =
|
|
1154
|
-
return
|
|
1155
|
-
},
|
|
1156
|
-
if (
|
|
1157
|
-
let e =
|
|
1158
|
-
return
|
|
1159
|
-
},
|
|
1160
|
-
if (
|
|
1161
|
-
let e =
|
|
1162
|
-
return
|
|
1163
|
-
},
|
|
1098
|
+
}, Je, Ye = () => {
|
|
1099
|
+
if (Je !== void 0) return Je;
|
|
1100
|
+
let e = L("flemo:apply");
|
|
1101
|
+
return Je = e === "scrub" ? e : null, Je;
|
|
1102
|
+
}, Xe, Ze = () => {
|
|
1103
|
+
if (Xe !== void 0) return Xe;
|
|
1104
|
+
let e = L("flemo:handoff");
|
|
1105
|
+
return Xe = e === "on" ? e : null, Xe;
|
|
1106
|
+
}, Qe, $e = () => {
|
|
1107
|
+
if (Qe !== void 0) return Qe;
|
|
1108
|
+
let e = L("flemo:snap");
|
|
1109
|
+
return Qe = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, Qe;
|
|
1110
|
+
}, et, tt = () => {
|
|
1111
|
+
if (et !== void 0) return et;
|
|
1112
|
+
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1113
|
+
return et = Number.isFinite(t) && t > 0 ? t : 4, et;
|
|
1114
|
+
}, nt, rt = () => {
|
|
1115
|
+
if (nt !== void 0) return nt;
|
|
1116
|
+
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1117
|
+
return nt = Number.isFinite(t) && t >= 0 ? t : 100, nt;
|
|
1118
|
+
}, it, at = () => (it === void 0 && (it = L("flemo:layers") === "resident"), it), ot, st = () => (ot === void 0 && (ot = L("flemo:freeze") === "shallow"), ot);
|
|
1164
1119
|
//#endregion
|
|
1165
1120
|
//#region src/screen/computeScreenFreeze.ts
|
|
1166
|
-
function
|
|
1121
|
+
function ct(e) {
|
|
1167
1122
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1168
1123
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1169
|
-
return !e.isActive && t ?
|
|
1124
|
+
return !e.isActive && t ? st() ? "live" : "deferred" : "live";
|
|
1170
1125
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1126
|
+
function lt(e) {
|
|
1127
|
+
return ct(e) !== "live";
|
|
1173
1128
|
}
|
|
1174
1129
|
//#endregion
|
|
1175
1130
|
//#region src/transition/createTransition.ts
|
|
1176
|
-
function
|
|
1131
|
+
function ut({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1177
1132
|
return {
|
|
1178
1133
|
name: e,
|
|
1179
1134
|
initial: t,
|
|
@@ -1194,7 +1149,7 @@ function Pt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1194
1149
|
}
|
|
1195
1150
|
//#endregion
|
|
1196
1151
|
//#region src/transition/createRawTransition.ts
|
|
1197
|
-
function
|
|
1152
|
+
function dt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1198
1153
|
return {
|
|
1199
1154
|
name: e,
|
|
1200
1155
|
initial: t,
|
|
@@ -1215,15 +1170,15 @@ function Ft({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1215
1170
|
}
|
|
1216
1171
|
//#endregion
|
|
1217
1172
|
//#region src/transition/cupertino.ts
|
|
1218
|
-
var
|
|
1173
|
+
var ft = (e, t, n) => {
|
|
1219
1174
|
let [r, i] = t, [a, o] = n;
|
|
1220
1175
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1221
|
-
},
|
|
1176
|
+
}, pt = 30, mt = .7, ht = [
|
|
1222
1177
|
.32,
|
|
1223
1178
|
.72,
|
|
1224
1179
|
0,
|
|
1225
1180
|
1
|
|
1226
|
-
],
|
|
1181
|
+
], gt = ut({
|
|
1227
1182
|
name: "cupertino",
|
|
1228
1183
|
initial: { x: "100%" },
|
|
1229
1184
|
idle: {
|
|
@@ -1233,29 +1188,29 @@ var It = (e, t, n) => {
|
|
|
1233
1188
|
enter: {
|
|
1234
1189
|
value: { x: 0 },
|
|
1235
1190
|
options: {
|
|
1236
|
-
duration:
|
|
1237
|
-
ease:
|
|
1191
|
+
duration: mt,
|
|
1192
|
+
ease: ht
|
|
1238
1193
|
}
|
|
1239
1194
|
},
|
|
1240
1195
|
enterBack: {
|
|
1241
1196
|
value: { x: "100%" },
|
|
1242
1197
|
options: {
|
|
1243
|
-
duration:
|
|
1244
|
-
ease:
|
|
1198
|
+
duration: mt,
|
|
1199
|
+
ease: ht
|
|
1245
1200
|
}
|
|
1246
1201
|
},
|
|
1247
1202
|
exit: {
|
|
1248
|
-
value: { x: `-${
|
|
1203
|
+
value: { x: `-${pt}%` },
|
|
1249
1204
|
options: {
|
|
1250
|
-
duration:
|
|
1251
|
-
ease:
|
|
1205
|
+
duration: mt,
|
|
1206
|
+
ease: ht
|
|
1252
1207
|
}
|
|
1253
1208
|
},
|
|
1254
1209
|
exitBack: {
|
|
1255
1210
|
value: { x: 0 },
|
|
1256
1211
|
options: {
|
|
1257
|
-
duration:
|
|
1258
|
-
ease:
|
|
1212
|
+
duration: mt,
|
|
1213
|
+
ease: ht
|
|
1259
1214
|
}
|
|
1260
1215
|
},
|
|
1261
1216
|
options: {
|
|
@@ -1263,24 +1218,24 @@ var It = (e, t, n) => {
|
|
|
1263
1218
|
swipeDirection: "x",
|
|
1264
1219
|
onSwipeStart: async () => !0,
|
|
1265
1220
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1266
|
-
let { offset: o } = t, s = o.x, c =
|
|
1267
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1221
|
+
let { offset: o } = t, s = o.x, c = ft(s, [0, window.innerWidth], [0, 100]);
|
|
1222
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + pt / 100 * c}%` }, { duration: 0 }), c;
|
|
1268
1223
|
},
|
|
1269
1224
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1270
1225
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1271
1226
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1272
|
-
duration:
|
|
1273
|
-
ease:
|
|
1274
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1275
|
-
duration:
|
|
1276
|
-
ease:
|
|
1227
|
+
duration: mt,
|
|
1228
|
+
ease: ht
|
|
1229
|
+
}), n(i, { x: c ? 0 : `-${pt}%` }, {
|
|
1230
|
+
duration: mt,
|
|
1231
|
+
ease: ht
|
|
1277
1232
|
})]), c;
|
|
1278
1233
|
}
|
|
1279
1234
|
}
|
|
1280
|
-
}),
|
|
1235
|
+
}), _t = (e, t, n) => {
|
|
1281
1236
|
let [r, i] = t, [a, o] = n;
|
|
1282
1237
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1283
|
-
},
|
|
1238
|
+
}, vt = ut({
|
|
1284
1239
|
name: "layout",
|
|
1285
1240
|
initial: { opacity: .97 },
|
|
1286
1241
|
idle: {
|
|
@@ -1308,7 +1263,7 @@ var It = (e, t, n) => {
|
|
|
1308
1263
|
swipeDirection: "y",
|
|
1309
1264
|
onSwipeStart: async () => !0,
|
|
1310
1265
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1311
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1266
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = _t(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);
|
|
1312
1267
|
return i?.(!0, 100), n(r, {
|
|
1313
1268
|
y: f,
|
|
1314
1269
|
opacity: c
|
|
@@ -1325,7 +1280,7 @@ var It = (e, t, n) => {
|
|
|
1325
1280
|
}, { duration: .3 })]), c;
|
|
1326
1281
|
}
|
|
1327
1282
|
}
|
|
1328
|
-
}),
|
|
1283
|
+
}), yt = ut({
|
|
1329
1284
|
name: "material",
|
|
1330
1285
|
initial: { y: "100%" },
|
|
1331
1286
|
idle: {
|
|
@@ -1433,7 +1388,7 @@ var It = (e, t, n) => {
|
|
|
1433
1388
|
})]), c;
|
|
1434
1389
|
}
|
|
1435
1390
|
}
|
|
1436
|
-
}),
|
|
1391
|
+
}), bt = ut({
|
|
1437
1392
|
name: "none",
|
|
1438
1393
|
initial: {},
|
|
1439
1394
|
idle: {
|
|
@@ -1456,20 +1411,20 @@ var It = (e, t, n) => {
|
|
|
1456
1411
|
value: {},
|
|
1457
1412
|
options: { duration: 0 }
|
|
1458
1413
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
["none",
|
|
1461
|
-
["cupertino",
|
|
1462
|
-
["material",
|
|
1463
|
-
["layout",
|
|
1414
|
+
}), xt = /* @__PURE__ */ new Map([
|
|
1415
|
+
["none", bt],
|
|
1416
|
+
["cupertino", gt],
|
|
1417
|
+
["material", yt],
|
|
1418
|
+
["layout", vt]
|
|
1464
1419
|
]);
|
|
1465
1420
|
//#endregion
|
|
1466
1421
|
//#region src/transition/resolveTransition.ts
|
|
1467
|
-
function
|
|
1468
|
-
return
|
|
1422
|
+
function St(e) {
|
|
1423
|
+
return xt.get(e) ?? xt.get("none");
|
|
1469
1424
|
}
|
|
1470
1425
|
//#endregion
|
|
1471
1426
|
//#region src/transition/decorator/createDecorator.ts
|
|
1472
|
-
function
|
|
1427
|
+
function Ct({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1473
1428
|
return {
|
|
1474
1429
|
name: e,
|
|
1475
1430
|
initial: t,
|
|
@@ -1490,7 +1445,7 @@ function qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1490
1445
|
}
|
|
1491
1446
|
//#endregion
|
|
1492
1447
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1493
|
-
function
|
|
1448
|
+
function wt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1494
1449
|
return {
|
|
1495
1450
|
name: e,
|
|
1496
1451
|
initial: t,
|
|
@@ -1511,30 +1466,30 @@ function Jt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1511
1466
|
}
|
|
1512
1467
|
//#endregion
|
|
1513
1468
|
//#region src/transition/decorator/overlay.ts
|
|
1514
|
-
var
|
|
1469
|
+
var Tt = "rgba(0, 0, 0, 0.1)", Et = Ct({
|
|
1515
1470
|
name: "overlay",
|
|
1516
1471
|
initial: {
|
|
1517
1472
|
opacity: 0,
|
|
1518
|
-
backgroundColor:
|
|
1473
|
+
backgroundColor: Tt
|
|
1519
1474
|
},
|
|
1520
1475
|
idle: {
|
|
1521
1476
|
value: {
|
|
1522
1477
|
opacity: 0,
|
|
1523
|
-
backgroundColor:
|
|
1478
|
+
backgroundColor: Tt
|
|
1524
1479
|
},
|
|
1525
1480
|
options: { duration: 0 }
|
|
1526
1481
|
},
|
|
1527
1482
|
enter: {
|
|
1528
1483
|
value: {
|
|
1529
1484
|
opacity: 1,
|
|
1530
|
-
backgroundColor:
|
|
1485
|
+
backgroundColor: Tt
|
|
1531
1486
|
},
|
|
1532
1487
|
options: { duration: .7 }
|
|
1533
1488
|
},
|
|
1534
1489
|
exit: {
|
|
1535
1490
|
value: {
|
|
1536
1491
|
opacity: 0,
|
|
1537
|
-
backgroundColor:
|
|
1492
|
+
backgroundColor: Tt
|
|
1538
1493
|
},
|
|
1539
1494
|
options: { duration: .7 }
|
|
1540
1495
|
},
|
|
@@ -1543,10 +1498,10 @@ var Yt = "rgba(0, 0, 0, 0.1)", Xt = qt({
|
|
|
1543
1498
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1544
1499
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1545
1500
|
}
|
|
1546
|
-
}),
|
|
1501
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Et]]);
|
|
1547
1502
|
//#endregion
|
|
1548
1503
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1549
|
-
function
|
|
1504
|
+
function Dt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1550
1505
|
return {
|
|
1551
1506
|
name: e,
|
|
1552
1507
|
initial: t,
|
|
@@ -1567,7 +1522,7 @@ function Qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1567
1522
|
}
|
|
1568
1523
|
//#endregion
|
|
1569
1524
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1570
|
-
function
|
|
1525
|
+
function Ot({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1571
1526
|
return {
|
|
1572
1527
|
name: e,
|
|
1573
1528
|
initial: t,
|
|
@@ -1588,7 +1543,7 @@ function $t({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1588
1543
|
}
|
|
1589
1544
|
//#endregion
|
|
1590
1545
|
//#region src/transition/partTransition/partTransition.ts
|
|
1591
|
-
var z = /* @__PURE__ */ new Map(),
|
|
1546
|
+
var z = /* @__PURE__ */ new Map(), kt = {
|
|
1592
1547
|
"IDLE-true": "self",
|
|
1593
1548
|
"IDLE-false": "self",
|
|
1594
1549
|
"PUSHING-true": "initial",
|
|
@@ -1599,17 +1554,17 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1599
1554
|
"POPPING-false": "PUSHING-false",
|
|
1600
1555
|
"COMPLETED-true": "self",
|
|
1601
1556
|
"COMPLETED-false": "self"
|
|
1602
|
-
},
|
|
1557
|
+
}, At = Object.keys(kt), jt = (e) => {
|
|
1603
1558
|
if (!e) return 0;
|
|
1604
1559
|
let t = e.duration;
|
|
1605
1560
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1606
|
-
},
|
|
1607
|
-
let n =
|
|
1561
|
+
}, Mt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Nt = (e, t) => {
|
|
1562
|
+
let n = kt[t];
|
|
1608
1563
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1609
1564
|
}, B = (e, t) => {
|
|
1610
|
-
let n =
|
|
1565
|
+
let n = Nt(e, t);
|
|
1611
1566
|
if (n === null) return null;
|
|
1612
|
-
let r = e.variants[t], i =
|
|
1567
|
+
let r = e.variants[t], i = jt(r.options), a = Mt(r.options);
|
|
1613
1568
|
return i <= 0 && a <= 0 ? null : {
|
|
1614
1569
|
from: n,
|
|
1615
1570
|
to: r.value,
|
|
@@ -1617,7 +1572,7 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1617
1572
|
delay: a,
|
|
1618
1573
|
ease: r.options?.ease
|
|
1619
1574
|
};
|
|
1620
|
-
},
|
|
1575
|
+
}, Pt = At, Ft = "translateZ(0.02px)", It = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Lt = (e) => typeof e == "object" && !!e && !Array.isArray(e), Rt = /* @__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(".")), zt = (e, t) => t.startsWith("--") || Rt.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, Bt = (e, t) => typeof t == "number" ? zt(t, e) : typeof t == "string" ? t : "", Vt = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ht = /* @__PURE__ */ new Set([
|
|
1621
1576
|
"x",
|
|
1622
1577
|
"y",
|
|
1623
1578
|
"z",
|
|
@@ -1628,7 +1583,7 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1628
1583
|
"rotateX",
|
|
1629
1584
|
"rotateY",
|
|
1630
1585
|
"rotateZ"
|
|
1631
|
-
]),
|
|
1586
|
+
]), Ut = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, Wt = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Gt = /^1(\.0+)?$/, Kt = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && Gt.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && Wt.test(t.trim()) : t === 0 || typeof t == "string" && Ut.test(t.trim()), qt = (e, t) => {
|
|
1632
1587
|
switch (e) {
|
|
1633
1588
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1634
1589
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1642,16 +1597,16 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1642
1597
|
case "rotateY": return `rotateY(${t})`;
|
|
1643
1598
|
default: return "";
|
|
1644
1599
|
}
|
|
1645
|
-
},
|
|
1600
|
+
}, Jt = (e) => {
|
|
1646
1601
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1647
|
-
if (!
|
|
1602
|
+
if (!Lt(e)) return;
|
|
1648
1603
|
let n = [];
|
|
1649
1604
|
for (let r of Object.keys(e)) {
|
|
1650
|
-
let i = e[r], a =
|
|
1651
|
-
if (a !== "") if (
|
|
1605
|
+
let i = e[r], a = Bt(r, i);
|
|
1606
|
+
if (a !== "") if (Ht.has(r)) n.push(`${r}:${a}`);
|
|
1652
1607
|
else {
|
|
1653
|
-
let e = t.get(
|
|
1654
|
-
e.add(a), t.set(
|
|
1608
|
+
let e = t.get(Vt(r)) ?? /* @__PURE__ */ new Set();
|
|
1609
|
+
e.add(a), t.set(Vt(r), e);
|
|
1655
1610
|
}
|
|
1656
1611
|
}
|
|
1657
1612
|
r.add(n.sort().join("|"));
|
|
@@ -1661,13 +1616,13 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1661
1616
|
n = r.size > 1;
|
|
1662
1617
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1663
1618
|
return n && a.push("transform"), a;
|
|
1664
|
-
},
|
|
1665
|
-
if (!
|
|
1619
|
+
}, Yt = (e) => {
|
|
1620
|
+
if (!Lt(e)) return [];
|
|
1666
1621
|
let t = [], n = !0, r = [];
|
|
1667
1622
|
for (let i of Object.keys(e)) {
|
|
1668
|
-
let a = e[i], o =
|
|
1669
|
-
o !== "" && (
|
|
1670
|
-
property:
|
|
1623
|
+
let a = e[i], o = Bt(i, a);
|
|
1624
|
+
o !== "" && (Ht.has(i) ? (t.push(qt(i, o)), Kt(i, a) || (n = !1)) : r.push({
|
|
1625
|
+
property: Vt(i),
|
|
1671
1626
|
value: o
|
|
1672
1627
|
}));
|
|
1673
1628
|
}
|
|
@@ -1675,7 +1630,7 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1675
1630
|
property: "transform",
|
|
1676
1631
|
value: n ? "none" : t.join(" ")
|
|
1677
1632
|
}), r;
|
|
1678
|
-
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"),
|
|
1633
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Xt = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1679
1634
|
linear: "linear",
|
|
1680
1635
|
easeIn: "ease-in",
|
|
1681
1636
|
easeOut: "ease-out",
|
|
@@ -1685,27 +1640,27 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1685
1640
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1686
1641
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1687
1642
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1688
|
-
}[e] ?? "ease" : "ease",
|
|
1643
|
+
}[e] ?? "ease" : "ease", Zt = (e, t) => {
|
|
1689
1644
|
let [n, r] = t.split("-");
|
|
1690
1645
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1691
|
-
},
|
|
1646
|
+
}, Qt = (e, t) => {
|
|
1692
1647
|
let [n, r] = t.split("-");
|
|
1693
1648
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1694
|
-
},
|
|
1649
|
+
}, $t = (e, t) => {
|
|
1695
1650
|
let [n, r] = t.split("-");
|
|
1696
1651
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1697
|
-
},
|
|
1652
|
+
}, en = (e, t) => {
|
|
1698
1653
|
let [n, r] = t.split("-");
|
|
1699
1654
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1700
|
-
},
|
|
1701
|
-
"-
|
|
1655
|
+
}, tn = (e, t, n) => `flemo-${e}-${It(t)}-${n}`, nn = [
|
|
1656
|
+
"-gov",
|
|
1702
1657
|
"-deskhead",
|
|
1703
|
-
"-
|
|
1704
|
-
],
|
|
1705
|
-
let o =
|
|
1658
|
+
"-govcreep"
|
|
1659
|
+
], rn = (e, t) => e === t || nn.some((n) => e === `${t}${n}`), an = (e, t, n, r, i, a) => {
|
|
1660
|
+
let o = Yt(r), s = Yt(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 = jt(i.options), p = Mt(i.options), m = Xt(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${$t(t, n)}` : h;
|
|
1706
1661
|
if (s.length === 0 && o.length === 0) return "";
|
|
1707
1662
|
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${V(s)}\n animation: none;\n}`;
|
|
1708
|
-
let _ =
|
|
1663
|
+
let _ = tn(e, t, n), v = [
|
|
1709
1664
|
`@keyframes ${_} {`,
|
|
1710
1665
|
" from {",
|
|
1711
1666
|
V(u).replace(/^/gm, " "),
|
|
@@ -1735,69 +1690,69 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1735
1690
|
let e = u.find((e) => e.property === "transform");
|
|
1736
1691
|
if (!e) return [...u, {
|
|
1737
1692
|
property: "transform",
|
|
1738
|
-
value:
|
|
1693
|
+
value: Ft
|
|
1739
1694
|
}];
|
|
1740
1695
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1741
1696
|
return u.map((e) => e.property === "transform" ? {
|
|
1742
1697
|
property: "transform",
|
|
1743
|
-
value: `${t}${
|
|
1698
|
+
value: `${t}${Ft}`
|
|
1744
1699
|
} : e);
|
|
1745
|
-
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-
|
|
1700
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root[data-flemo-governed][data-flemo-creep] ${e}`).join(",\n");
|
|
1746
1701
|
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}`;
|
|
1747
|
-
})(), T = S("data-flemo-
|
|
1748
|
-
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${V(l)}\n` : ""}${ee}${N}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") &&
|
|
1749
|
-
},
|
|
1702
|
+
})(), T = S("data-flemo-governed", "gov", b(n), !0), E = C("data-flemo-governed", 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], N = M === "PUSHING" || M === "REPLACING" ? " contain: layout;\n" : "";
|
|
1703
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${V(l)}\n` : ""}${ee}${N}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && on(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")) && on(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")) && on(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1704
|
+
}, on = (e) => {
|
|
1750
1705
|
if (!e) return !1;
|
|
1751
1706
|
if (e.opacity === 0) return !0;
|
|
1752
1707
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1753
1708
|
return t(e.x) || t(e.y);
|
|
1754
|
-
},
|
|
1755
|
-
let i =
|
|
1709
|
+
}, sn = (e, t, n, r) => {
|
|
1710
|
+
let i = Yt(r.value);
|
|
1756
1711
|
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1757
|
-
},
|
|
1712
|
+
}, cn = (e, t, n = []) => {
|
|
1758
1713
|
let r = [];
|
|
1759
1714
|
for (let t of e) {
|
|
1760
1715
|
let e = t.name;
|
|
1761
|
-
for (let n of
|
|
1762
|
-
let i = t.variants[n], a =
|
|
1716
|
+
for (let n of At) {
|
|
1717
|
+
let i = t.variants[n], a = kt[n];
|
|
1763
1718
|
if (a === "self") {
|
|
1764
|
-
r.push(
|
|
1719
|
+
r.push(sn(Zt, e, n, i));
|
|
1765
1720
|
continue;
|
|
1766
1721
|
}
|
|
1767
1722
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1768
|
-
r.push(
|
|
1723
|
+
r.push(an("screen", e, n, o, i, Zt));
|
|
1769
1724
|
}
|
|
1770
1725
|
}
|
|
1771
1726
|
for (let e of t) {
|
|
1772
1727
|
let t = e.name;
|
|
1773
|
-
for (let n of
|
|
1774
|
-
let i = e.variants[n], a =
|
|
1728
|
+
for (let n of Pt) {
|
|
1729
|
+
let i = e.variants[n], a = kt[n];
|
|
1775
1730
|
if (a === "self") {
|
|
1776
|
-
r.push(
|
|
1731
|
+
r.push(sn(Qt, t, n, i));
|
|
1777
1732
|
continue;
|
|
1778
1733
|
}
|
|
1779
1734
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1780
|
-
r.push(
|
|
1735
|
+
r.push(an("decorator", t, n, o, i, Qt));
|
|
1781
1736
|
}
|
|
1782
1737
|
}
|
|
1783
1738
|
for (let e of n) {
|
|
1784
1739
|
let t = e.name;
|
|
1785
|
-
for (let n of
|
|
1786
|
-
let i = e.variants[n], a =
|
|
1740
|
+
for (let n of Pt) {
|
|
1741
|
+
let i = e.variants[n], a = kt[n];
|
|
1787
1742
|
if (a === "self") {
|
|
1788
|
-
r.push(
|
|
1743
|
+
r.push(sn(en, t, n, i));
|
|
1789
1744
|
continue;
|
|
1790
1745
|
}
|
|
1791
1746
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1792
|
-
r.push(
|
|
1747
|
+
r.push(an("part", t, n, o, i, en));
|
|
1793
1748
|
}
|
|
1794
1749
|
}
|
|
1795
1750
|
return [
|
|
1796
1751
|
...r.filter((e) => e.length > 0),
|
|
1797
|
-
|
|
1798
|
-
|
|
1752
|
+
ln,
|
|
1753
|
+
un
|
|
1799
1754
|
].join("\n\n");
|
|
1800
|
-
},
|
|
1755
|
+
}, ln = [
|
|
1801
1756
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1802
1757
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1803
1758
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1808,53 +1763,53 @@ var z = /* @__PURE__ */ new Map(), en = {
|
|
|
1808
1763
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1809
1764
|
" animation-play-state: paused !important;",
|
|
1810
1765
|
"}"
|
|
1811
|
-
].join("\n"),
|
|
1766
|
+
].join("\n"), un = [
|
|
1812
1767
|
"[data-flemo-held-arrival] {",
|
|
1813
1768
|
" display: none !important;",
|
|
1814
1769
|
"}"
|
|
1815
1770
|
].join("\n"), H = (e, t) => {
|
|
1816
|
-
let n =
|
|
1771
|
+
let n = kt[t];
|
|
1817
1772
|
if (n === "self") return !1;
|
|
1818
|
-
let r = e.variants[t], i =
|
|
1773
|
+
let r = e.variants[t], i = jt(r.options), a = Mt(r.options);
|
|
1819
1774
|
if (i <= 0 && a <= 0) return !1;
|
|
1820
|
-
let o =
|
|
1775
|
+
let o = Yt(n === "initial" ? e.initial : e.variants[n].value), s = Yt(r.value);
|
|
1821
1776
|
return o.length > 0 || s.length > 0;
|
|
1822
|
-
},
|
|
1777
|
+
}, dn = {
|
|
1823
1778
|
REPLACING: 33,
|
|
1824
1779
|
PUSHING: 33,
|
|
1825
1780
|
POPPING: 17
|
|
1826
|
-
},
|
|
1781
|
+
}, fn = {
|
|
1827
1782
|
REPLACING: 180,
|
|
1828
1783
|
PUSHING: 100,
|
|
1829
1784
|
POPPING: 80
|
|
1830
|
-
},
|
|
1831
|
-
function
|
|
1785
|
+
}, pn = "data-flemo";
|
|
1786
|
+
function mn() {
|
|
1832
1787
|
if (f()) return;
|
|
1833
|
-
let e =
|
|
1834
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1788
|
+
let e = cn(xt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${pn}]`);
|
|
1789
|
+
t || (t = document.createElement("style"), t.setAttribute(pn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1835
1790
|
}
|
|
1836
1791
|
//#endregion
|
|
1837
1792
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1838
|
-
var
|
|
1793
|
+
var hn = /* @__PURE__ */ new Map(), gn = /* @__PURE__ */ new Map(), _n = /* @__PURE__ */ new Map(), vn = (e, t) => {
|
|
1839
1794
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1840
|
-
},
|
|
1795
|
+
}, yn = (e, t) => {
|
|
1841
1796
|
let n = (e.get(t) ?? 1) - 1;
|
|
1842
1797
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1843
1798
|
};
|
|
1844
|
-
function
|
|
1845
|
-
for (let t of e)
|
|
1846
|
-
for (let e of t)
|
|
1847
|
-
for (let e of n) z.set(e.name, e),
|
|
1848
|
-
return
|
|
1849
|
-
for (let t of e)
|
|
1850
|
-
for (let e of t)
|
|
1851
|
-
for (let e of n)
|
|
1852
|
-
|
|
1799
|
+
function bn(e, t, n = []) {
|
|
1800
|
+
for (let t of e) xt.set(t.name, t), vn(hn, t.name);
|
|
1801
|
+
for (let e of t) R.set(e.name, e), vn(gn, e.name);
|
|
1802
|
+
for (let e of n) z.set(e.name, e), vn(_n, e.name);
|
|
1803
|
+
return mn(), () => {
|
|
1804
|
+
for (let t of e) yn(hn, t.name) && xt.delete(t.name);
|
|
1805
|
+
for (let e of t) yn(gn, e.name) && R.delete(e.name);
|
|
1806
|
+
for (let e of n) yn(_n, e.name) && z.delete(e.name);
|
|
1807
|
+
mn();
|
|
1853
1808
|
};
|
|
1854
1809
|
}
|
|
1855
1810
|
//#endregion
|
|
1856
1811
|
//#region src/transition/enteringInitialStyle.ts
|
|
1857
|
-
function
|
|
1812
|
+
function xn(e) {
|
|
1858
1813
|
let { initial: t, isActive: n, status: r } = e;
|
|
1859
1814
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1860
1815
|
let i = {};
|
|
@@ -1862,19 +1817,19 @@ function Kn(e) {
|
|
|
1862
1817
|
}
|
|
1863
1818
|
//#endregion
|
|
1864
1819
|
//#region src/transition/animateInline.ts
|
|
1865
|
-
var
|
|
1866
|
-
let r =
|
|
1867
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
1820
|
+
var Sn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Cn = /* @__PURE__ */ new WeakMap(), wn = Symbol("flemo-inline-writer"), Tn = /* @__PURE__ */ new WeakMap(), U = (e, t, n = wn) => {
|
|
1821
|
+
let r = Cn.get(e);
|
|
1822
|
+
r || (r = /* @__PURE__ */ new Map(), Cn.set(e, r));
|
|
1868
1823
|
let i = r.get(t);
|
|
1869
1824
|
i || (i = {
|
|
1870
1825
|
original: e.style.getPropertyValue(t),
|
|
1871
1826
|
owners: /* @__PURE__ */ new Set()
|
|
1872
1827
|
}, r.set(t, i)), i.owners.add(n);
|
|
1873
|
-
},
|
|
1874
|
-
|
|
1828
|
+
}, En = (e, t) => {
|
|
1829
|
+
Sn(e) && (U(e, "transition", t), e.style.transition = "none", Tn.set(e, t));
|
|
1875
1830
|
}, W = (e, t, n) => {
|
|
1876
|
-
let r =
|
|
1877
|
-
(!n ||
|
|
1831
|
+
let r = Cn.get(e);
|
|
1832
|
+
(!n || Tn.get(e) === n) && (e.style.transition = "", Tn.delete(e));
|
|
1878
1833
|
let i = (t) => {
|
|
1879
1834
|
let i = r?.get(t);
|
|
1880
1835
|
if (!i) {
|
|
@@ -1893,17 +1848,17 @@ var qn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Jn = /* @_
|
|
|
1893
1848
|
}
|
|
1894
1849
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1895
1850
|
}, G = (e, t, n = {}, r) => {
|
|
1896
|
-
if (!
|
|
1897
|
-
let i = e, a =
|
|
1851
|
+
if (!Sn(e)) return Promise.resolve();
|
|
1852
|
+
let i = e, a = Yt(t);
|
|
1898
1853
|
if (a.length === 0) return Promise.resolve();
|
|
1899
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1854
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = Xt(n.ease);
|
|
1900
1855
|
if (o <= 0 && s <= 0) {
|
|
1901
|
-
i.style.transition = "none",
|
|
1856
|
+
i.style.transition = "none", Tn.set(i, r);
|
|
1902
1857
|
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1903
1858
|
return Promise.resolve();
|
|
1904
1859
|
}
|
|
1905
1860
|
let l = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1906
|
-
i.style.transition = l,
|
|
1861
|
+
i.style.transition = l, Tn.set(i, r), i.offsetWidth;
|
|
1907
1862
|
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1908
1863
|
return new Promise((e) => {
|
|
1909
1864
|
let t = !1, n = () => {
|
|
@@ -1913,65 +1868,65 @@ var qn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Jn = /* @_
|
|
|
1913
1868
|
};
|
|
1914
1869
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1915
1870
|
});
|
|
1916
|
-
},
|
|
1871
|
+
}, Dn = (e) => {
|
|
1917
1872
|
if (typeof e.querySelectorAll == "function") {
|
|
1918
1873
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1919
1874
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1920
1875
|
}
|
|
1921
|
-
},
|
|
1922
|
-
function
|
|
1923
|
-
let e =
|
|
1924
|
-
if (
|
|
1876
|
+
}, On = 0, kn = [], An = [];
|
|
1877
|
+
function jn() {
|
|
1878
|
+
let e = On === 0;
|
|
1879
|
+
if (On += 1, e) for (let e of An) e();
|
|
1925
1880
|
let t = !1;
|
|
1926
1881
|
return () => {
|
|
1927
|
-
if (t || (t = !0,
|
|
1928
|
-
let e =
|
|
1929
|
-
|
|
1882
|
+
if (t || (t = !0, --On, On > 0)) return;
|
|
1883
|
+
let e = kn;
|
|
1884
|
+
kn = [];
|
|
1930
1885
|
for (let t of e) t();
|
|
1931
1886
|
};
|
|
1932
1887
|
}
|
|
1933
|
-
var
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1936
|
-
|
|
1888
|
+
var Mn = () => On > 0;
|
|
1889
|
+
function Nn(e) {
|
|
1890
|
+
return An.push(e), () => {
|
|
1891
|
+
An = An.filter((t) => t !== e);
|
|
1937
1892
|
};
|
|
1938
1893
|
}
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1894
|
+
function Pn(e) {
|
|
1895
|
+
On === 0 ? e() : kn.push(e);
|
|
1941
1896
|
}
|
|
1942
1897
|
//#endregion
|
|
1943
1898
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1944
|
-
var
|
|
1899
|
+
var Fn = 8, In = 2, K = 96, Ln = 15e3, Rn = 3e3, zn = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = "data-flemo-image-src", Bn = "flemo-image-scale-v1", Vn = /* @__PURE__ */ new Set([
|
|
1945
1900
|
"PUSHING",
|
|
1946
1901
|
"POPPING",
|
|
1947
1902
|
"REPLACING"
|
|
1948
|
-
]),
|
|
1903
|
+
]), Hn = (e) => {
|
|
1949
1904
|
let t = e.closest("[data-flemo-screen]");
|
|
1950
|
-
return !!t &&
|
|
1951
|
-
},
|
|
1905
|
+
return !!t && Vn.has(t.getAttribute("data-flemo-status") ?? "");
|
|
1906
|
+
}, Un = (e) => {
|
|
1952
1907
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
1953
1908
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
1954
1909
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
1955
|
-
},
|
|
1910
|
+
}, Wn = "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};", Gn = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", Kn = async (e, t) => {
|
|
1956
1911
|
try {
|
|
1957
1912
|
if (typeof caches > "u") return;
|
|
1958
|
-
await (await caches.open(
|
|
1913
|
+
await (await caches.open(Bn)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
1959
1914
|
} catch {}
|
|
1960
|
-
},
|
|
1915
|
+
}, qn = async (e) => {
|
|
1961
1916
|
try {
|
|
1962
1917
|
if (typeof caches > "u") return null;
|
|
1963
|
-
let t = await (await caches.open(
|
|
1918
|
+
let t = await (await caches.open(Bn)).match(e);
|
|
1964
1919
|
return t ? await t.blob() : null;
|
|
1965
1920
|
} catch {
|
|
1966
1921
|
return null;
|
|
1967
1922
|
}
|
|
1968
1923
|
};
|
|
1969
|
-
function
|
|
1970
|
-
if (!
|
|
1924
|
+
function Jn(e) {
|
|
1925
|
+
if (!Gn()) return () => {};
|
|
1971
1926
|
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 = () => {
|
|
1972
1927
|
if (t) return t;
|
|
1973
1928
|
try {
|
|
1974
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
1929
|
+
t = new Worker(URL.createObjectURL(new Blob([Wn])));
|
|
1975
1930
|
} catch {
|
|
1976
1931
|
return null;
|
|
1977
1932
|
}
|
|
@@ -1986,7 +1941,7 @@ function yr(e) {
|
|
|
1986
1941
|
return;
|
|
1987
1942
|
}
|
|
1988
1943
|
let a = URL.createObjectURL(n);
|
|
1989
|
-
l.add(a),
|
|
1944
|
+
l.add(a), Kn(t, n), f(t, a);
|
|
1990
1945
|
}, t;
|
|
1991
1946
|
}, f = (e, t) => {
|
|
1992
1947
|
r.has(e) || r.set(e, t);
|
|
@@ -1995,21 +1950,21 @@ function yr(e) {
|
|
|
1995
1950
|
let n = () => {
|
|
1996
1951
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
1997
1952
|
};
|
|
1998
|
-
if (!
|
|
1953
|
+
if (!Mn()) {
|
|
1999
1954
|
n();
|
|
2000
1955
|
return;
|
|
2001
1956
|
}
|
|
2002
1957
|
let r = !1, i = () => {
|
|
2003
1958
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2004
|
-
}, o = setTimeout(i,
|
|
2005
|
-
a.add(i),
|
|
1959
|
+
}, o = setTimeout(i, Rn);
|
|
1960
|
+
a.add(i), Pn(i);
|
|
2006
1961
|
}, m = (e, t) => {
|
|
2007
1962
|
let n = () => {
|
|
2008
|
-
if (
|
|
2009
|
-
|
|
1963
|
+
if (Mn()) {
|
|
1964
|
+
Pn(t);
|
|
2010
1965
|
return;
|
|
2011
1966
|
}
|
|
2012
|
-
if (!
|
|
1967
|
+
if (!Hn(e) || typeof requestAnimationFrame != "function") {
|
|
2013
1968
|
t();
|
|
2014
1969
|
return;
|
|
2015
1970
|
}
|
|
@@ -2021,9 +1976,9 @@ function yr(e) {
|
|
|
2021
1976
|
e.style.visibility = "hidden";
|
|
2022
1977
|
let r = !1, i = () => {
|
|
2023
1978
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2024
|
-
}, o = setTimeout(i,
|
|
1979
|
+
}, o = setTimeout(i, Rn);
|
|
2025
1980
|
a.add(i), m(e, i);
|
|
2026
|
-
}, g = (e, t) => !
|
|
1981
|
+
}, g = (e, t) => !Mn() && !Hn(e) ? !1 : (e.setAttribute(q, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2027
1982
|
e.setAttribute(q, t), e.src = a, h(e, () => {
|
|
2028
1983
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2029
1984
|
if (n) return;
|
|
@@ -2040,7 +1995,7 @@ function yr(e) {
|
|
|
2040
1995
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2041
1996
|
e.src = t;
|
|
2042
1997
|
}
|
|
2043
|
-
} else e.getAttribute("src") ===
|
|
1998
|
+
} else e.getAttribute("src") === zn && (i(t) ? e.src = t : (e.removeAttribute(q), e.src = n.url));
|
|
2044
1999
|
p(e, n.previousVisibility);
|
|
2045
2000
|
}
|
|
2046
2001
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2049,14 +2004,14 @@ function yr(e) {
|
|
|
2049
2004
|
y.clear();
|
|
2050
2005
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2051
2006
|
}, S = () => {
|
|
2052
|
-
b || (b = !0,
|
|
2007
|
+
b || (b = !0, Pn(() => {
|
|
2053
2008
|
if (n) return;
|
|
2054
2009
|
let e = globalThis.requestIdleCallback;
|
|
2055
2010
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2056
2011
|
}));
|
|
2057
2012
|
}, C = (e, t, n) => {
|
|
2058
2013
|
if (r.has(e) || o.has(e)) return;
|
|
2059
|
-
if (
|
|
2014
|
+
if (Mn() && I()) {
|
|
2060
2015
|
y.has(e) || y.set(e, {
|
|
2061
2016
|
boxWidth: t,
|
|
2062
2017
|
boxHeight: n
|
|
@@ -2066,15 +2021,15 @@ function yr(e) {
|
|
|
2066
2021
|
let i = d();
|
|
2067
2022
|
if (!i) return;
|
|
2068
2023
|
o.add(e);
|
|
2069
|
-
let a = Math.round(Math.max(K, t * u()) *
|
|
2024
|
+
let a = Math.round(Math.max(K, t * u()) * In), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2070
2025
|
i.postMessage({
|
|
2071
2026
|
url: e,
|
|
2072
2027
|
targetWidth: a,
|
|
2073
2028
|
neededArea: s,
|
|
2074
2029
|
ratio: 8
|
|
2075
2030
|
});
|
|
2076
|
-
}, w =
|
|
2077
|
-
if (
|
|
2031
|
+
}, w = Nn(() => {
|
|
2032
|
+
if (I() && !(!t || o.size === 0)) {
|
|
2078
2033
|
t.terminate(), t = null;
|
|
2079
2034
|
for (let e of o) {
|
|
2080
2035
|
if (y.has(e)) continue;
|
|
@@ -2101,13 +2056,13 @@ function yr(e) {
|
|
|
2101
2056
|
let a = {
|
|
2102
2057
|
url: "",
|
|
2103
2058
|
previousVisibility: e.style.visibility,
|
|
2104
|
-
timeout: setTimeout(() => v(e, null),
|
|
2059
|
+
timeout: setTimeout(() => v(e, null), Ln),
|
|
2105
2060
|
responsive: !0
|
|
2106
2061
|
}, o = () => {
|
|
2107
2062
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2108
2063
|
here, so the final fallback arm is unreachable. */
|
|
2109
2064
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2110
|
-
if (!(/^https?:/.test(t) &&
|
|
2065
|
+
if (!(/^https?:/.test(t) && Un({
|
|
2111
2066
|
naturalWidth: e.naturalWidth,
|
|
2112
2067
|
naturalHeight: e.naturalHeight,
|
|
2113
2068
|
boxWidth: i.width || K,
|
|
@@ -2123,7 +2078,7 @@ function yr(e) {
|
|
|
2123
2078
|
v(e, o);
|
|
2124
2079
|
return;
|
|
2125
2080
|
}
|
|
2126
|
-
|
|
2081
|
+
qn(t).then((a) => {
|
|
2127
2082
|
if (!(n || !s.has(e))) {
|
|
2128
2083
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2129
2084
|
releases every held element of the url first, so a still-held
|
|
@@ -2166,7 +2121,7 @@ function yr(e) {
|
|
|
2166
2121
|
return;
|
|
2167
2122
|
}
|
|
2168
2123
|
let n = e.getBoundingClientRect();
|
|
2169
|
-
if (!
|
|
2124
|
+
if (!Un({
|
|
2170
2125
|
naturalWidth: e.naturalWidth,
|
|
2171
2126
|
naturalHeight: e.naturalHeight,
|
|
2172
2127
|
boxWidth: n.width || K,
|
|
@@ -2175,7 +2130,7 @@ function yr(e) {
|
|
|
2175
2130
|
})) return;
|
|
2176
2131
|
let o = r.get(a);
|
|
2177
2132
|
if (i(o)) {
|
|
2178
|
-
|
|
2133
|
+
Mn() || Hn(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2179
2134
|
return;
|
|
2180
2135
|
}
|
|
2181
2136
|
if (o === "opaque") {
|
|
@@ -2191,14 +2146,14 @@ function yr(e) {
|
|
|
2191
2146
|
return;
|
|
2192
2147
|
}
|
|
2193
2148
|
if (o) {
|
|
2194
|
-
|
|
2149
|
+
Mn() || Hn(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2195
2150
|
return;
|
|
2196
2151
|
}
|
|
2197
2152
|
s.set(e, {
|
|
2198
2153
|
url: a,
|
|
2199
2154
|
previousVisibility: e.style.visibility,
|
|
2200
|
-
timeout: setTimeout(() => v(e, null),
|
|
2201
|
-
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src =
|
|
2155
|
+
timeout: setTimeout(() => v(e, null), Ln)
|
|
2156
|
+
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src = zn, qn(a).then((t) => {
|
|
2202
2157
|
if (n || r.has(a)) return;
|
|
2203
2158
|
if (t) {
|
|
2204
2159
|
let e = URL.createObjectURL(t);
|
|
@@ -2225,19 +2180,19 @@ function yr(e) {
|
|
|
2225
2180
|
let k = (e) => {
|
|
2226
2181
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2227
2182
|
if (n && !n.responsive) {
|
|
2228
|
-
t === n.url && (e.src =
|
|
2183
|
+
t === n.url && (e.src = zn);
|
|
2229
2184
|
return;
|
|
2230
2185
|
}
|
|
2231
2186
|
let a = e.getAttribute(q);
|
|
2232
2187
|
if (a) if (t === a) {
|
|
2233
2188
|
let t = r.get(a);
|
|
2234
2189
|
i(t) && (e.src = t);
|
|
2235
|
-
} else t !==
|
|
2190
|
+
} else t !== zn && !t.startsWith("blob:") && e.removeAttribute(q);
|
|
2236
2191
|
}, A = !1, j = new MutationObserver((t) => {
|
|
2237
2192
|
if (!n) {
|
|
2238
|
-
if (
|
|
2193
|
+
if (Mn()) {
|
|
2239
2194
|
if (A) return;
|
|
2240
|
-
A = !0,
|
|
2195
|
+
A = !0, Pn(() => {
|
|
2241
2196
|
if (A = !1, !n) {
|
|
2242
2197
|
for (let t of Array.from(e.querySelectorAll(`img[${q}]`))) k(t);
|
|
2243
2198
|
for (let e of [...s.keys()]) k(e);
|
|
@@ -2261,23 +2216,23 @@ function yr(e) {
|
|
|
2261
2216
|
l.clear();
|
|
2262
2217
|
};
|
|
2263
2218
|
}
|
|
2264
|
-
var
|
|
2265
|
-
function
|
|
2266
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2267
|
-
dispose:
|
|
2219
|
+
var Yn = null;
|
|
2220
|
+
function Xn() {
|
|
2221
|
+
return typeof document > "u" || !document.body ? () => {} : (Yn ? Yn.count += 1 : Yn = {
|
|
2222
|
+
dispose: Jn(document.body),
|
|
2268
2223
|
count: 1
|
|
2269
2224
|
}, () => {
|
|
2270
|
-
|
|
2225
|
+
Yn && (--Yn.count, Yn.count <= 0 && (Yn.dispose(), Yn = null));
|
|
2271
2226
|
});
|
|
2272
2227
|
}
|
|
2273
2228
|
//#endregion
|
|
2274
2229
|
//#region src/core/engine/arrivalHold.ts
|
|
2275
|
-
var
|
|
2276
|
-
function
|
|
2230
|
+
var Zn = "data-flemo-held-arrival";
|
|
2231
|
+
function Qn(e) {
|
|
2277
2232
|
if (typeof MutationObserver > "u") return () => {};
|
|
2278
2233
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2279
2234
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2280
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2235
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${Zn}], [${q}]`) !== null;
|
|
2281
2236
|
}, 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), {
|
|
2282
2237
|
glass: t,
|
|
2283
2238
|
latest: n,
|
|
@@ -2307,12 +2262,12 @@ function Cr(e) {
|
|
|
2307
2262
|
if (i.type === "childList") {
|
|
2308
2263
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2309
2264
|
if (e instanceof Element && t.delete(e)) {
|
|
2310
|
-
e.removeAttribute(
|
|
2265
|
+
e.removeAttribute(Zn);
|
|
2311
2266
|
continue;
|
|
2312
2267
|
}
|
|
2313
2268
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2314
2269
|
}
|
|
2315
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2270
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Zn, ""), t.add(e), l(i.target).added.push(e));
|
|
2316
2271
|
}
|
|
2317
2272
|
}
|
|
2318
2273
|
for (let [e, t] of u) {
|
|
@@ -2347,7 +2302,7 @@ function Cr(e) {
|
|
|
2347
2302
|
c.disconnect();
|
|
2348
2303
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2349
2304
|
n.clear();
|
|
2350
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2305
|
+
for (let e of t) e instanceof HTMLElement && Dn(e), e.removeAttribute(Zn);
|
|
2351
2306
|
t.clear();
|
|
2352
2307
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2353
2308
|
i.clear();
|
|
@@ -2357,57 +2312,57 @@ function Cr(e) {
|
|
|
2357
2312
|
}
|
|
2358
2313
|
//#endregion
|
|
2359
2314
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2360
|
-
var
|
|
2315
|
+
var $n = "data-flemo-warm", er = 3e3, tr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], nr = {
|
|
2361
2316
|
duration: 500,
|
|
2362
2317
|
iterations: Infinity,
|
|
2363
2318
|
direction: "alternate",
|
|
2364
2319
|
easing: "linear"
|
|
2365
|
-
},
|
|
2366
|
-
|
|
2320
|
+
}, rr = "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;", ir = "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, ar = null, or = null, sr = null, cr = 0, lr = () => {
|
|
2321
|
+
cr = 0, sr?.cancel(), sr = null, or?.remove(), or = null;
|
|
2367
2322
|
};
|
|
2368
|
-
function
|
|
2323
|
+
function ur() {
|
|
2369
2324
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2325
|
+
if (cr += 1, !or) {
|
|
2326
|
+
or = document.createElement("div"), or.setAttribute($n, ""), or.setAttribute("aria-hidden", "true"), or.setAttribute("style", rr), document.body.appendChild(or);
|
|
2372
2327
|
try {
|
|
2373
|
-
|
|
2328
|
+
sr = or.animate(tr, nr);
|
|
2374
2329
|
} catch {
|
|
2375
|
-
|
|
2330
|
+
sr = null;
|
|
2376
2331
|
}
|
|
2377
|
-
if (!J &&
|
|
2378
|
-
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 =
|
|
2332
|
+
if (!J && Pe()) try {
|
|
2333
|
+
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 = ir, document.body.appendChild(J), J.play()?.catch?.(() => {});
|
|
2379
2334
|
let e = J;
|
|
2380
|
-
|
|
2335
|
+
ar = () => {
|
|
2381
2336
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2382
|
-
}, document.addEventListener("visibilitychange",
|
|
2337
|
+
}, document.addEventListener("visibilitychange", ar);
|
|
2383
2338
|
} catch {
|
|
2384
2339
|
J = null;
|
|
2385
2340
|
}
|
|
2386
2341
|
}
|
|
2387
2342
|
let e = !1, t = setTimeout(() => {
|
|
2388
|
-
e || (e = !0, --
|
|
2389
|
-
},
|
|
2343
|
+
e || (e = !0, --cr, cr <= 0 && lr());
|
|
2344
|
+
}, er);
|
|
2390
2345
|
return () => {
|
|
2391
|
-
e || (e = !0, clearTimeout(t), --
|
|
2346
|
+
e || (e = !0, clearTimeout(t), --cr, cr <= 0 && lr());
|
|
2392
2347
|
};
|
|
2393
2348
|
}
|
|
2394
2349
|
//#endregion
|
|
2395
2350
|
//#region src/core/engine/emulationNotice.ts
|
|
2396
|
-
var
|
|
2351
|
+
var dr = () => {
|
|
2397
2352
|
if (typeof navigator > "u") return !1;
|
|
2398
2353
|
let e = navigator.platform ?? "";
|
|
2399
2354
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2400
|
-
},
|
|
2401
|
-
|
|
2402
|
-
},
|
|
2355
|
+
}, fr = !1, pr = () => {
|
|
2356
|
+
fr || !I() || !dr() || (fr = !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."));
|
|
2357
|
+
}, mr = "data-flemo-img-hold", hr = (e) => !(e.complete && e.naturalWidth > 0), gr = 4, _r = (e) => {
|
|
2403
2358
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2404
2359
|
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);
|
|
2405
|
-
return e.naturalWidth * e.naturalHeight > r *
|
|
2406
|
-
},
|
|
2407
|
-
function
|
|
2360
|
+
return e.naturalWidth * e.naturalHeight > r * gr;
|
|
2361
|
+
}, vr = (e, t) => hr(e) || !t && _r(e);
|
|
2362
|
+
function yr(e, t, n = !1) {
|
|
2408
2363
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2409
2364
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2410
|
-
e.getAttribute(
|
|
2365
|
+
e.getAttribute(mr) === null && (r.has(e) || !vr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(mr, "")));
|
|
2411
2366
|
};
|
|
2412
2367
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2413
2368
|
let a = new MutationObserver((e) => {
|
|
@@ -2421,7 +2376,7 @@ function Wr(e, t, n = !1) {
|
|
|
2421
2376
|
let o = !1, s = () => {
|
|
2422
2377
|
if (!o) {
|
|
2423
2378
|
o = !0, a.disconnect();
|
|
2424
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
2379
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(mr);
|
|
2425
2380
|
r.clear();
|
|
2426
2381
|
}
|
|
2427
2382
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2431,25 +2386,25 @@ function Wr(e, t, n = !1) {
|
|
|
2431
2386
|
}
|
|
2432
2387
|
//#endregion
|
|
2433
2388
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2434
|
-
var
|
|
2389
|
+
var br = () => {}, xr = .004, Sr = (e, t) => {
|
|
2435
2390
|
let n = e.ownerDocument?.defaultView;
|
|
2436
2391
|
if (!n) return !1;
|
|
2437
2392
|
let r = e;
|
|
2438
2393
|
for (; r;) {
|
|
2439
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2394
|
+
if (Number(n.getComputedStyle(r).opacity) <= xr) return !0;
|
|
2440
2395
|
if (r === t) break;
|
|
2441
2396
|
r = r.parentElement;
|
|
2442
2397
|
}
|
|
2443
2398
|
return !1;
|
|
2444
2399
|
};
|
|
2445
|
-
function
|
|
2446
|
-
if (typeof e.getAnimations != "function") return
|
|
2400
|
+
function Cr(e) {
|
|
2401
|
+
if (typeof e.getAnimations != "function") return br;
|
|
2447
2402
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2448
2403
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2449
2404
|
if (t.size >= 128) return;
|
|
2450
2405
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2451
2406
|
let r = n.effect?.target;
|
|
2452
|
-
if (r instanceof Element &&
|
|
2407
|
+
if (r instanceof Element && Sr(r, e)) try {
|
|
2453
2408
|
n.pause(), t.add(n);
|
|
2454
2409
|
} catch {}
|
|
2455
2410
|
}
|
|
@@ -2478,7 +2433,7 @@ function Jr(e) {
|
|
|
2478
2433
|
}
|
|
2479
2434
|
//#endregion
|
|
2480
2435
|
//#region src/transition/cubicBezier.ts
|
|
2481
|
-
var
|
|
2436
|
+
var wr = (e, t, n, r) => {
|
|
2482
2437
|
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;
|
|
2483
2438
|
return (e) => {
|
|
2484
2439
|
if (e <= 0) return 0;
|
|
@@ -2490,7 +2445,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2490
2445
|
}
|
|
2491
2446
|
return a((t + n) / 2);
|
|
2492
2447
|
};
|
|
2493
|
-
},
|
|
2448
|
+
}, Tr = (e) => e, Er = {
|
|
2494
2449
|
ease: [
|
|
2495
2450
|
.25,
|
|
2496
2451
|
.1,
|
|
@@ -2545,20 +2500,20 @@ var Yr = (e, t, n, r) => {
|
|
|
2545
2500
|
.66,
|
|
2546
2501
|
-.56
|
|
2547
2502
|
]
|
|
2548
|
-
},
|
|
2503
|
+
}, Dr = (e) => {
|
|
2549
2504
|
if (Array.isArray(e)) {
|
|
2550
2505
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2551
2506
|
let [t, n, r, i] = e;
|
|
2552
|
-
return
|
|
2507
|
+
return wr(t, n, r, i);
|
|
2553
2508
|
}
|
|
2554
|
-
return
|
|
2509
|
+
return Tr;
|
|
2555
2510
|
}
|
|
2556
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2557
|
-
},
|
|
2511
|
+
return typeof e == "string" ? e === "linear" ? Tr : wr(...Er[e] ?? Er.ease) : wr(...Er.ease);
|
|
2512
|
+
}, Or = 1 / 255, kr = 400, Ar = 24, jr = /* @__PURE__ */ new Set([
|
|
2558
2513
|
"x",
|
|
2559
2514
|
"y",
|
|
2560
2515
|
"opacity"
|
|
2561
|
-
]),
|
|
2516
|
+
]), Mr = (e, t, n) => {
|
|
2562
2517
|
if (!e || typeof e != "object") return;
|
|
2563
2518
|
let r = e[t];
|
|
2564
2519
|
if (r === void 0) return;
|
|
@@ -2576,7 +2531,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2576
2531
|
return Number.isNaN(e) ? null : e;
|
|
2577
2532
|
}
|
|
2578
2533
|
return null;
|
|
2579
|
-
},
|
|
2534
|
+
}, Nr = (e, t, n) => {
|
|
2580
2535
|
let r = /* @__PURE__ */ new Set();
|
|
2581
2536
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2582
2537
|
if (r.size === 0) return null;
|
|
@@ -2584,28 +2539,28 @@ var Yr = (e, t, n, r) => {
|
|
|
2584
2539
|
for (let a of r) {
|
|
2585
2540
|
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;
|
|
2586
2541
|
if (r !== void 0 && r === o) continue;
|
|
2587
|
-
if (!
|
|
2588
|
-
let s =
|
|
2542
|
+
if (!jr.has(a)) return null;
|
|
2543
|
+
let s = Mr(e.from, a, t), c = Mr(e.to, a, t);
|
|
2589
2544
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2590
2545
|
let l = Math.abs(c - s);
|
|
2591
2546
|
if (l === 0) continue;
|
|
2592
|
-
let u = a === "opacity" ?
|
|
2547
|
+
let u = a === "opacity" ? Or : 1 / Math.max(1, n);
|
|
2593
2548
|
i = Math.min(i, u / l);
|
|
2594
2549
|
}
|
|
2595
2550
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2596
|
-
},
|
|
2551
|
+
}, Pr = (e, t, n) => {
|
|
2597
2552
|
if (e.duration <= 0) return null;
|
|
2598
|
-
let r =
|
|
2553
|
+
let r = Nr(e, t, n);
|
|
2599
2554
|
if (r === null) return null;
|
|
2600
|
-
let i =
|
|
2601
|
-
for (let e =
|
|
2555
|
+
let i = Dr(e.ease), a = kr;
|
|
2556
|
+
for (let e = kr; e >= 0 && !(Math.abs(1 - i(e / kr)) > r); --e) a = e;
|
|
2602
2557
|
if (a === 0) return null;
|
|
2603
|
-
let o = (e.delay + e.duration * (a /
|
|
2604
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2605
|
-
},
|
|
2558
|
+
let o = (e.delay + e.duration * (a / kr)) * 1e3;
|
|
2559
|
+
return (e.delay + e.duration) * 1e3 - o < Ar ? null : o;
|
|
2560
|
+
}, Fr = 1e3 / 120, Ir = 4, Y = 400, Lr = 4, X = (e) => {
|
|
2606
2561
|
let t = +e.toFixed(5);
|
|
2607
2562
|
return Object.is(t, -0) ? 0 : t;
|
|
2608
|
-
},
|
|
2563
|
+
}, Rr = (e, t, n) => {
|
|
2609
2564
|
if (e.duration <= 0) return null;
|
|
2610
2565
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2611
2566
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
@@ -2614,14 +2569,14 @@ var Yr = (e, t, n, r) => {
|
|
|
2614
2569
|
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;
|
|
2615
2570
|
if (i !== void 0 && i === o) continue;
|
|
2616
2571
|
if (n !== "x" && n !== "y") return null;
|
|
2617
|
-
let s =
|
|
2572
|
+
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2618
2573
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2619
2574
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2620
2575
|
}
|
|
2621
|
-
if (a <
|
|
2622
|
-
let o =
|
|
2576
|
+
if (a < Ir) return null;
|
|
2577
|
+
let o = Dr(e.ease), s = Array(401);
|
|
2623
2578
|
for (let e = 0; e <= Y; e += 1) s[e] = o(e / Y);
|
|
2624
|
-
let c = e.duration * 1e3 / Y, l = 40 / a * c /
|
|
2579
|
+
let c = e.duration * 1e3 / Y, l = 40 / a * c / Fr, u = Y, d = 0;
|
|
2625
2580
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2626
2581
|
for (let e = u; e < Y; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2627
2582
|
let f = (1 - s[u]) * a;
|
|
@@ -2633,7 +2588,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2633
2588
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2634
2589
|
return (m - 1 + i) / Y * 100;
|
|
2635
2590
|
}, g = h(p), _ = [];
|
|
2636
|
-
for (let e = 0; 100 / Y * e < g; e +=
|
|
2591
|
+
for (let e = 0; 100 / Y * e < g; e += Lr) _.push(`${X(s[e])} ${X(e / Y * 100)}%`);
|
|
2637
2592
|
let v = g;
|
|
2638
2593
|
for (let e = p; e >= 2; --e) {
|
|
2639
2594
|
let t = h(e - 1);
|
|
@@ -2644,7 +2599,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2644
2599
|
v = t;
|
|
2645
2600
|
}
|
|
2646
2601
|
return _.push(`1 ${X(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2647
|
-
},
|
|
2602
|
+
}, zr = 12, Br = (e, t, n, r) => {
|
|
2648
2603
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2649
2604
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2650
2605
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
@@ -2653,30 +2608,30 @@ var Yr = (e, t, n, r) => {
|
|
|
2653
2608
|
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;
|
|
2654
2609
|
if (r !== void 0 && r === a) continue;
|
|
2655
2610
|
if (n !== "x" && n !== "y") return null;
|
|
2656
|
-
let s =
|
|
2611
|
+
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2657
2612
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2658
2613
|
o = Math.max(o, Math.abs(c - s) * i);
|
|
2659
2614
|
}
|
|
2660
|
-
if (o <
|
|
2661
|
-
let s =
|
|
2615
|
+
if (o < zr) return null;
|
|
2616
|
+
let s = Dr(e.ease), c = Array(401);
|
|
2662
2617
|
for (let e = 0; e <= Y; e += 1) c[e] = s(e / Y);
|
|
2663
2618
|
let l = e.duration * 1e3, u = l / Y, d = 1 / o * (u / r), f = Y, p = 0;
|
|
2664
2619
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2665
2620
|
if (f === 0 || f >= Y) return null;
|
|
2666
2621
|
for (let e = f; e < Y; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2667
2622
|
let m = (1 - c[f]) * o;
|
|
2668
|
-
if (m <= 1 || m >
|
|
2623
|
+
if (m <= 1 || m > zr) return null;
|
|
2669
2624
|
let h = f / Y * 100, g = m * r / l * 100;
|
|
2670
2625
|
if (h + g >= 100) return null;
|
|
2671
2626
|
let _ = [];
|
|
2672
|
-
for (let e = 0; e <= f; e +=
|
|
2627
|
+
for (let e = 0; e <= f; e += Lr) _.push(`${X(c[e])} ${X(e / Y * 100)}%`);
|
|
2673
2628
|
return _.push(`${X(c[f])} ${X(h)}%`), _.push(`1 ${X(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2674
|
-
},
|
|
2629
|
+
}, Vr = /* @__PURE__ */ new WeakMap(), Hr = Symbol("flemo-layer-owner"), Ur = (e, t) => {
|
|
2675
2630
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2676
|
-
},
|
|
2631
|
+
}, Wr = (e, t) => {
|
|
2677
2632
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2678
2633
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2679
|
-
},
|
|
2634
|
+
}, Gr = (e, t) => {
|
|
2680
2635
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2681
2636
|
for (let e of t.willChange.split(",")) {
|
|
2682
2637
|
let t = e.trim();
|
|
@@ -2687,13 +2642,13 @@ var Yr = (e, t, n, r) => {
|
|
|
2687
2642
|
e.containment && (r = !0);
|
|
2688
2643
|
}
|
|
2689
2644
|
e.style.willChange = [...n].join(", ");
|
|
2690
|
-
let i =
|
|
2645
|
+
let i = Wr(t.contain, r);
|
|
2691
2646
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2692
|
-
}, Z = (e, t, n = !1, r =
|
|
2693
|
-
let i =
|
|
2647
|
+
}, Z = (e, t, n = !1, r = Hr) => {
|
|
2648
|
+
let i = Jt(t), a = Vr.get(e);
|
|
2694
2649
|
if (i.length === 0) {
|
|
2695
2650
|
if (!a) return;
|
|
2696
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2651
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e)) : Gr(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e));
|
|
2697
2652
|
return;
|
|
2698
2653
|
}
|
|
2699
2654
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2702,18 +2657,18 @@ var Yr = (e, t, n, r) => {
|
|
|
2702
2657
|
willChange: e.style.willChange,
|
|
2703
2658
|
contain: e.style.contain,
|
|
2704
2659
|
pending: null
|
|
2705
|
-
},
|
|
2660
|
+
}, Vr.set(e, a)), a.owners.set(r, {
|
|
2706
2661
|
properties: i,
|
|
2707
2662
|
containment: n
|
|
2708
|
-
}), a.settleOwner = null,
|
|
2709
|
-
}, Q = (e, t =
|
|
2710
|
-
let n =
|
|
2663
|
+
}), a.settleOwner = null, Gr(e, a);
|
|
2664
|
+
}, Q = (e, t = Hr) => {
|
|
2665
|
+
let n = Vr.get(e);
|
|
2711
2666
|
if (!(!n || !n.owners.has(t))) {
|
|
2712
2667
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2713
|
-
|
|
2668
|
+
Gr(e, n);
|
|
2714
2669
|
return;
|
|
2715
2670
|
}
|
|
2716
|
-
if (
|
|
2671
|
+
if (at() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2717
2672
|
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");
|
|
2718
2673
|
return;
|
|
2719
2674
|
}
|
|
@@ -2721,33 +2676,33 @@ var Yr = (e, t, n, r) => {
|
|
|
2721
2676
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2722
2677
|
the pre-hold behavior. */
|
|
2723
2678
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2724
|
-
|
|
2679
|
+
Ur(e, n), Vr.delete(e);
|
|
2725
2680
|
return;
|
|
2726
2681
|
}
|
|
2727
|
-
|
|
2682
|
+
Kr(e, n);
|
|
2728
2683
|
}
|
|
2729
|
-
},
|
|
2684
|
+
}, Kr = (e, t) => {
|
|
2730
2685
|
t.pending = setTimeout(() => {
|
|
2731
|
-
if (t.pending = null,
|
|
2732
|
-
|
|
2733
|
-
|
|
2686
|
+
if (t.pending = null, Mn()) {
|
|
2687
|
+
Pn(() => {
|
|
2688
|
+
Vr.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && Kr(e, t);
|
|
2734
2689
|
});
|
|
2735
2690
|
return;
|
|
2736
2691
|
}
|
|
2737
|
-
|
|
2692
|
+
Ur(e, t), Vr.delete(e);
|
|
2738
2693
|
}, 300);
|
|
2739
|
-
},
|
|
2694
|
+
}, qr = (e, t, n) => {
|
|
2740
2695
|
let r = e.driver;
|
|
2741
2696
|
return r === "native" || r === "player" ? r : "player";
|
|
2742
|
-
},
|
|
2697
|
+
}, Jr = 1e3 / 60 * 2, Yr = "flemo-", Xr = /* @__PURE__ */ new WeakMap(), Zr = (e, t, n) => {
|
|
2743
2698
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2744
2699
|
let e = r.animationName;
|
|
2745
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2700
|
+
if (typeof e != "string" || !e.startsWith(Yr) || r.playState !== "running" || Xr.get(r) === n) continue;
|
|
2746
2701
|
let i = r.startTime;
|
|
2747
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2702
|
+
typeof i == "number" && (r.startTime = i + t, Xr.set(r, n));
|
|
2748
2703
|
}
|
|
2749
|
-
},
|
|
2750
|
-
function
|
|
2704
|
+
}, Qr = /* @__PURE__ */ new WeakSet(), $r = 1e3, ei = 3e3;
|
|
2705
|
+
function ti(e, t, n) {
|
|
2751
2706
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2752
2707
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2753
2708
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2761,7 +2716,7 @@ function Ei(e, t, n) {
|
|
|
2761
2716
|
i = !0, m.disconnect();
|
|
2762
2717
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2763
2718
|
let e = t.animationName;
|
|
2764
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2719
|
+
if (typeof e != "string" || !e.startsWith(Yr) || t.playState !== "running" || Qr.has(t)) continue;
|
|
2765
2720
|
let n = t.currentTime;
|
|
2766
2721
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2767
2722
|
try {
|
|
@@ -2769,18 +2724,18 @@ function Ei(e, t, n) {
|
|
|
2769
2724
|
} catch {
|
|
2770
2725
|
continue;
|
|
2771
2726
|
}
|
|
2772
|
-
|
|
2727
|
+
Qr.add(t), c.push(t);
|
|
2773
2728
|
}
|
|
2774
2729
|
}
|
|
2775
2730
|
if (c.length === 0) return;
|
|
2776
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2777
|
-
let e =
|
|
2731
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, $r));
|
|
2732
|
+
let e = oi(t, () => {
|
|
2778
2733
|
a || n?.();
|
|
2779
2734
|
});
|
|
2780
2735
|
if (l = e, typeof setTimeout == "function") {
|
|
2781
2736
|
let t = setTimeout(() => {
|
|
2782
2737
|
l === e && (l = null), e();
|
|
2783
|
-
},
|
|
2738
|
+
}, ei), n = e;
|
|
2784
2739
|
l = () => {
|
|
2785
2740
|
clearTimeout(t), n();
|
|
2786
2741
|
};
|
|
@@ -2795,16 +2750,16 @@ function Ei(e, t, n) {
|
|
|
2795
2750
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2796
2751
|
};
|
|
2797
2752
|
}
|
|
2798
|
-
var
|
|
2799
|
-
function
|
|
2753
|
+
var ni = 150, ri = 4e3, ii = 400;
|
|
2754
|
+
function ai(e, t, n = !0, r = !1) {
|
|
2800
2755
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2801
2756
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2802
2757
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2803
2758
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2804
2759
|
let t = e.animationName;
|
|
2805
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2760
|
+
if (typeof t != "string" || !t.startsWith(Yr) || e.playState !== "running" || Qr.has(e)) continue;
|
|
2806
2761
|
let n = e.currentTime;
|
|
2807
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2762
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Qr.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2808
2763
|
}
|
|
2809
2764
|
if (i.length === 0) return () => {};
|
|
2810
2765
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2817,7 +2772,7 @@ function Ai(e, t, n = !0, r = !1) {
|
|
|
2817
2772
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2818
2773
|
let o = (a.get(n) ?? 0) + e;
|
|
2819
2774
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2820
|
-
let s = r +
|
|
2775
|
+
let s = r + ri;
|
|
2821
2776
|
t = Math.max(t, s - o);
|
|
2822
2777
|
}
|
|
2823
2778
|
return t;
|
|
@@ -2825,7 +2780,7 @@ function Ai(e, t, n = !0, r = !1) {
|
|
|
2825
2780
|
if (c) return;
|
|
2826
2781
|
if (d === null && (d = e), f !== null) {
|
|
2827
2782
|
let t = e - f;
|
|
2828
|
-
p += Math.min(Math.max(0, t),
|
|
2783
|
+
p += Math.min(Math.max(0, t), Jr);
|
|
2829
2784
|
}
|
|
2830
2785
|
if (f = e, !l) {
|
|
2831
2786
|
if (l = !0, r) {
|
|
@@ -2837,7 +2792,7 @@ function Ai(e, t, n = !0, r = !1) {
|
|
|
2837
2792
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2838
2793
|
let i = a.get(t) ?? 0;
|
|
2839
2794
|
if (n <= i + 33.333333333333336) continue;
|
|
2840
|
-
let o = n - (i +
|
|
2795
|
+
let o = n - (i + Jr);
|
|
2841
2796
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2842
2797
|
}
|
|
2843
2798
|
e > 0 && t?.(e);
|
|
@@ -2851,13 +2806,13 @@ function Ai(e, t, n = !0, r = !1) {
|
|
|
2851
2806
|
if (e.playState !== "running") continue;
|
|
2852
2807
|
let t = e.startTime;
|
|
2853
2808
|
if (typeof t == "number") {
|
|
2854
|
-
e.startTime = t +
|
|
2809
|
+
e.startTime = t + ri;
|
|
2855
2810
|
continue;
|
|
2856
2811
|
}
|
|
2857
2812
|
let n = e.timeline?.currentTime;
|
|
2858
|
-
typeof n == "number" && (e.startTime = n +
|
|
2813
|
+
typeof n == "number" && (e.startTime = n + ri);
|
|
2859
2814
|
}
|
|
2860
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2815
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + Jr), ii)), o = requestAnimationFrame(h);
|
|
2861
2816
|
return;
|
|
2862
2817
|
}
|
|
2863
2818
|
if (!u) {
|
|
@@ -2880,13 +2835,13 @@ function Ai(e, t, n = !0, r = !1) {
|
|
|
2880
2835
|
t?.(g);
|
|
2881
2836
|
return;
|
|
2882
2837
|
}
|
|
2883
|
-
e - d <
|
|
2838
|
+
e - d < ni && (o = requestAnimationFrame(h));
|
|
2884
2839
|
};
|
|
2885
2840
|
return o = requestAnimationFrame(h), () => {
|
|
2886
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2841
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + Jr);
|
|
2887
2842
|
};
|
|
2888
2843
|
}
|
|
2889
|
-
function
|
|
2844
|
+
function oi(e, t) {
|
|
2890
2845
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2891
2846
|
exotic embedders. */
|
|
2892
2847
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2895,8 +2850,8 @@ function ji(e, t) {
|
|
|
2895
2850
|
if (r !== null) {
|
|
2896
2851
|
let n = o - r;
|
|
2897
2852
|
if (n > 33.333333333333336) {
|
|
2898
|
-
let r = n -
|
|
2899
|
-
for (let t of e()) t &&
|
|
2853
|
+
let r = n - Jr;
|
|
2854
|
+
for (let t of e()) t && Zr(t, r, o);
|
|
2900
2855
|
t?.(r);
|
|
2901
2856
|
}
|
|
2902
2857
|
}
|
|
@@ -2907,29 +2862,29 @@ function ji(e, t) {
|
|
|
2907
2862
|
i = !0, cancelAnimationFrame(n);
|
|
2908
2863
|
};
|
|
2909
2864
|
}
|
|
2910
|
-
var
|
|
2911
|
-
function
|
|
2865
|
+
var si = /* @__PURE__ */ new WeakMap();
|
|
2866
|
+
function ci(e, t, n, r = !0, i = !1) {
|
|
2912
2867
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2913
|
-
let a =
|
|
2914
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2868
|
+
let a = si.get(e);
|
|
2869
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => li(e);
|
|
2915
2870
|
let o = null, s = !1, c = !1, l = () => {
|
|
2916
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
2871
|
+
s || c || (s = !0, u.disconnect(), o = ai(t, n, r, i));
|
|
2917
2872
|
}, u = new MutationObserver(() => {
|
|
2918
2873
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2919
2874
|
});
|
|
2920
2875
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2921
2876
|
attributes: !0,
|
|
2922
2877
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
2923
|
-
}),
|
|
2878
|
+
}), si.set(e, {
|
|
2924
2879
|
refs: 1,
|
|
2925
2880
|
pendingDrop: null,
|
|
2926
2881
|
dispose: () => {
|
|
2927
|
-
c = !0, u.disconnect(), o?.(),
|
|
2882
|
+
c = !0, u.disconnect(), o?.(), si.delete(e);
|
|
2928
2883
|
}
|
|
2929
|
-
}), () =>
|
|
2884
|
+
}), () => li(e);
|
|
2930
2885
|
}
|
|
2931
|
-
var
|
|
2932
|
-
let t =
|
|
2886
|
+
var li = (e) => {
|
|
2887
|
+
let t = si.get(e);
|
|
2933
2888
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2934
2889
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2935
2890
|
if (typeof setTimeout != "function") {
|
|
@@ -2938,36 +2893,36 @@ var Pi = (e) => {
|
|
|
2938
2893
|
}
|
|
2939
2894
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2940
2895
|
}
|
|
2941
|
-
},
|
|
2942
|
-
let e =
|
|
2943
|
-
|
|
2896
|
+
}, ui = !1, di = 0, fi = [], pi = () => {
|
|
2897
|
+
let e = fi;
|
|
2898
|
+
fi = [];
|
|
2944
2899
|
for (let t of e) t();
|
|
2945
|
-
},
|
|
2946
|
-
if (
|
|
2947
|
-
|
|
2900
|
+
}, mi = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), hi = () => {
|
|
2901
|
+
if (ui || typeof window > "u" || typeof window.fetch != "function") return;
|
|
2902
|
+
ui = !0;
|
|
2948
2903
|
let e = window.fetch.bind(window);
|
|
2949
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
2950
|
-
|
|
2904
|
+
window.fetch = (...t) => e(...t).then((e) => di <= 0 || mi(e) ? e : new Promise((t) => {
|
|
2905
|
+
fi.push(() => t(e));
|
|
2951
2906
|
}), (e) => {
|
|
2952
|
-
if (
|
|
2907
|
+
if (di <= 0) throw e;
|
|
2953
2908
|
return new Promise((t, n) => {
|
|
2954
|
-
|
|
2909
|
+
fi.push(() => n(e));
|
|
2955
2910
|
});
|
|
2956
2911
|
});
|
|
2957
|
-
},
|
|
2958
|
-
function
|
|
2912
|
+
}, gi = 2e3;
|
|
2913
|
+
function _i(e = gi) {
|
|
2959
2914
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2960
|
-
if (
|
|
2961
|
-
|
|
2915
|
+
if (hi(), !ui) return () => {};
|
|
2916
|
+
di += 1;
|
|
2962
2917
|
let t = !1, n = null, r = () => {
|
|
2963
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
2918
|
+
t || (t = !0, n !== null && clearTimeout(n), di = Math.max(0, di - 1), di === 0 && pi());
|
|
2964
2919
|
};
|
|
2965
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
2920
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(gi, e))), r;
|
|
2966
2921
|
}
|
|
2967
|
-
|
|
2922
|
+
hi();
|
|
2968
2923
|
//#endregion
|
|
2969
2924
|
//#region src/core/engine/transitionPlayer.ts
|
|
2970
|
-
var
|
|
2925
|
+
var vi = [
|
|
2971
2926
|
"x",
|
|
2972
2927
|
"y",
|
|
2973
2928
|
"z",
|
|
@@ -2978,7 +2933,7 @@ var Ui = [
|
|
|
2978
2933
|
"rotateX",
|
|
2979
2934
|
"rotateY",
|
|
2980
2935
|
"rotateZ"
|
|
2981
|
-
],
|
|
2936
|
+
], yi = new Set(vi), bi = {
|
|
2982
2937
|
x: 0,
|
|
2983
2938
|
y: 0,
|
|
2984
2939
|
z: 0,
|
|
@@ -2989,7 +2944,7 @@ var Ui = [
|
|
|
2989
2944
|
rotateX: 0,
|
|
2990
2945
|
rotateY: 0,
|
|
2991
2946
|
rotateZ: 0
|
|
2992
|
-
},
|
|
2947
|
+
}, xi = (e, t) => {
|
|
2993
2948
|
if (typeof t == "number") return {
|
|
2994
2949
|
value: t,
|
|
2995
2950
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3008,18 +2963,18 @@ var Ui = [
|
|
|
3008
2963
|
value: i,
|
|
3009
2964
|
unit: a === "" && i === 0 ? "px" : a
|
|
3010
2965
|
};
|
|
3011
|
-
},
|
|
3012
|
-
let n = e.match(
|
|
3013
|
-
if (n.length !== r.length || e.replace(
|
|
2966
|
+
}, Si = /-?\d*\.?\d+/g, Ci = (e, t) => {
|
|
2967
|
+
let n = e.match(Si) ?? [], r = t.match(Si) ?? [];
|
|
2968
|
+
if (n.length !== r.length || e.replace(Si, " ") !== t.replace(Si, " ")) return null;
|
|
3014
2969
|
let i = n.map(Number), a = r.map(Number);
|
|
3015
2970
|
return (t) => {
|
|
3016
2971
|
let n = 0;
|
|
3017
|
-
return e.replace(
|
|
2972
|
+
return e.replace(Si, () => {
|
|
3018
2973
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3019
2974
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3020
2975
|
});
|
|
3021
2976
|
};
|
|
3022
|
-
},
|
|
2977
|
+
}, wi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ti = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ei = (e) => Ti(e) ? Object.keys(e) : [], Di = (e, t) => Ti(e) ? e[t] : void 0, Oi = {
|
|
3023
2978
|
x: 0,
|
|
3024
2979
|
y: 0,
|
|
3025
2980
|
z: 0,
|
|
@@ -3030,41 +2985,41 @@ var Ui = [
|
|
|
3030
2985
|
rotateX: 2,
|
|
3031
2986
|
rotateY: 2,
|
|
3032
2987
|
rotateZ: 2
|
|
3033
|
-
},
|
|
2988
|
+
}, ki = (e) => {
|
|
3034
2989
|
let t = 0, n = -1;
|
|
3035
2990
|
for (let r of e) {
|
|
3036
|
-
if (!
|
|
3037
|
-
let e =
|
|
2991
|
+
if (!yi.has(r)) continue;
|
|
2992
|
+
let e = Oi[r];
|
|
3038
2993
|
if (e < t) return !1;
|
|
3039
2994
|
if (t = e, e === 2) {
|
|
3040
|
-
let e =
|
|
2995
|
+
let e = vi.indexOf(r);
|
|
3041
2996
|
if (e < n) return !1;
|
|
3042
2997
|
n = e;
|
|
3043
2998
|
}
|
|
3044
2999
|
}
|
|
3045
3000
|
return !0;
|
|
3046
|
-
},
|
|
3001
|
+
}, Ai = (e) => {
|
|
3047
3002
|
let t = [];
|
|
3048
3003
|
for (let n of e) {
|
|
3049
|
-
if (!
|
|
3050
|
-
let e =
|
|
3004
|
+
if (!yi.has(n)) continue;
|
|
3005
|
+
let e = Oi[n] === 0 ? "T" : n;
|
|
3051
3006
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3052
3007
|
}
|
|
3053
3008
|
return t;
|
|
3054
|
-
},
|
|
3055
|
-
let n =
|
|
3009
|
+
}, ji = (e, t) => {
|
|
3010
|
+
let n = Ai(e), r = Ai(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3056
3011
|
return i.every((e, t) => a[t] === e);
|
|
3057
|
-
},
|
|
3058
|
-
let n =
|
|
3059
|
-
if (!
|
|
3012
|
+
}, Mi = (e, t) => {
|
|
3013
|
+
let n = Ei(e.from), r = Ei(e.to);
|
|
3014
|
+
if (!ki(n) || !ki(r) || !ji(n, r)) return null;
|
|
3060
3015
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3061
3016
|
for (let n of i) {
|
|
3062
|
-
let r =
|
|
3063
|
-
if (
|
|
3017
|
+
let r = Di(e.from, n), i = Di(e.to, n);
|
|
3018
|
+
if (yi.has(n)) {
|
|
3064
3019
|
let e = n, o = {
|
|
3065
|
-
value:
|
|
3020
|
+
value: bi[e],
|
|
3066
3021
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3067
|
-
}, s = r === void 0 ? o :
|
|
3022
|
+
}, s = r === void 0 ? o : xi(e, r), c = i === void 0 ? o : xi(e, i);
|
|
3068
3023
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3069
3024
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3070
3025
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3095,15 +3050,15 @@ var Ui = [
|
|
|
3095
3050
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3096
3051
|
if (l === u) {
|
|
3097
3052
|
c.push({
|
|
3098
|
-
property:
|
|
3053
|
+
property: wi(n),
|
|
3099
3054
|
value: l
|
|
3100
3055
|
});
|
|
3101
3056
|
continue;
|
|
3102
3057
|
}
|
|
3103
|
-
let d =
|
|
3058
|
+
let d = Ci(l, u);
|
|
3104
3059
|
if (!d) return null;
|
|
3105
3060
|
s.push({
|
|
3106
|
-
property:
|
|
3061
|
+
property: wi(n),
|
|
3107
3062
|
mix: d
|
|
3108
3063
|
});
|
|
3109
3064
|
}
|
|
@@ -3113,26 +3068,26 @@ var Ui = [
|
|
|
3113
3068
|
strings: s,
|
|
3114
3069
|
constants: c
|
|
3115
3070
|
};
|
|
3116
|
-
},
|
|
3117
|
-
if (!
|
|
3071
|
+
}, Ni = 1, Pi = 1e3 / 60, Fi = (e) => !I() && e > 0 && e < 3, Ii = .6, Li = 600, Ri = (e, t) => {
|
|
3072
|
+
if (!Pe()) return !1;
|
|
3118
3073
|
for (let n of e.transforms) {
|
|
3119
3074
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3120
3075
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3121
3076
|
if (n.from.unit === "%") {
|
|
3122
|
-
if (e / 100 >=
|
|
3123
|
-
} else if (e * Math.max(1, t) >=
|
|
3077
|
+
if (e / 100 >= Ii) return !1;
|
|
3078
|
+
} else if (e * Math.max(1, t) >= Li) return !1;
|
|
3124
3079
|
}
|
|
3125
3080
|
return !0;
|
|
3126
|
-
},
|
|
3081
|
+
}, zi = 12, Bi = (e, t, n, r, i = Pi) => {
|
|
3127
3082
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3128
|
-
for (let u of
|
|
3083
|
+
for (let u of vi) {
|
|
3129
3084
|
let d = e.find((e) => e.prop === u);
|
|
3130
3085
|
if (!d) continue;
|
|
3131
3086
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3132
3087
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3133
|
-
let e = u === "x" ? r.x : r.y, t =
|
|
3088
|
+
let e = u === "x" ? r.x : r.y, t = $e(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && Fi(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= tt() : e === null || c * Pi / Math.max(1, i) >= Ni, h = d.to.value;
|
|
3134
3089
|
d.from.unit === "%" && (h *= d.percentBase);
|
|
3135
|
-
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 <=
|
|
3090
|
+
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 <= zi), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3136
3091
|
if (b) {
|
|
3137
3092
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3138
3093
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3140,42 +3095,42 @@ var Ui = [
|
|
|
3140
3095
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3141
3096
|
continue;
|
|
3142
3097
|
}
|
|
3143
|
-
let p =
|
|
3098
|
+
let p = bi[u];
|
|
3144
3099
|
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)`);
|
|
3145
3100
|
}
|
|
3146
3101
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3147
|
-
},
|
|
3102
|
+
}, Vi = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Hi = (e) => {
|
|
3148
3103
|
let t = {};
|
|
3149
|
-
for (let n of
|
|
3104
|
+
for (let n of Yt(e)) t[Vi(n.property)] = n.value;
|
|
3150
3105
|
return t;
|
|
3151
|
-
},
|
|
3106
|
+
}, Ui = (e, t) => {
|
|
3152
3107
|
if (typeof e.animate != "function") return null;
|
|
3153
3108
|
try {
|
|
3154
|
-
let n = e.animate([
|
|
3109
|
+
let n = e.animate([Hi(t.from), Hi(t.to)], {
|
|
3155
3110
|
duration: Math.max(0, t.duration * 1e3),
|
|
3156
3111
|
delay: Math.max(0, t.delay * 1e3),
|
|
3157
|
-
easing:
|
|
3112
|
+
easing: Xt(t.ease),
|
|
3158
3113
|
fill: "both"
|
|
3159
3114
|
});
|
|
3160
3115
|
return n.pause(), n.currentTime = 0, n;
|
|
3161
3116
|
} catch {
|
|
3162
3117
|
return null;
|
|
3163
3118
|
}
|
|
3164
|
-
},
|
|
3165
|
-
Number.isFinite(e) && (e <
|
|
3166
|
-
},
|
|
3119
|
+
}, Wi = 1.6, Gi = 1e3 / 600, Ki = 28, qi = 42, Ji = Pi, Yi = () => Ji, Xi = (e) => {
|
|
3120
|
+
Number.isFinite(e) && (e < Gi || e > qi || (Ji = Math.min(Pi, Math.max(Gi, e))));
|
|
3121
|
+
}, Zi = () => ({
|
|
3167
3122
|
request: (e) => requestAnimationFrame(e),
|
|
3168
3123
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3169
3124
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3170
|
-
}),
|
|
3125
|
+
}), Qi = ((e = Zi()) => {
|
|
3171
3126
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3172
3127
|
join: (n, r) => {
|
|
3173
|
-
let i =
|
|
3128
|
+
let i = Ye() === "scrub", s = !i && !I() && Ze() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : Mi(r.motion, r.element), l = !c || s ? Ui(r.element, r.motion) : null, u = l ? null : c;
|
|
3174
3129
|
if (!u && !l) return null;
|
|
3175
3130
|
let d = t.get(n);
|
|
3176
3131
|
d || (d = {
|
|
3177
3132
|
tracks: [],
|
|
3178
|
-
frameIntervalMs:
|
|
3133
|
+
frameIntervalMs: Ji,
|
|
3179
3134
|
recentGaps: [],
|
|
3180
3135
|
navCutMs: null,
|
|
3181
3136
|
navComplete: null,
|
|
@@ -3185,7 +3140,7 @@ var Ui = [
|
|
|
3185
3140
|
lastTime: null,
|
|
3186
3141
|
frameHandle: null
|
|
3187
3142
|
}, t.set(n, d));
|
|
3188
|
-
let f =
|
|
3143
|
+
let f = Pr(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
3189
3144
|
...r,
|
|
3190
3145
|
onComplete: void 0,
|
|
3191
3146
|
parsed: u,
|
|
@@ -3199,12 +3154,12 @@ var Ui = [
|
|
|
3199
3154
|
snapMemory: {
|
|
3200
3155
|
x: null,
|
|
3201
3156
|
y: null,
|
|
3202
|
-
glide: u ?
|
|
3157
|
+
glide: u ? Ri(u, e.devicePixelRatio() || 1) : !1
|
|
3203
3158
|
}
|
|
3204
3159
|
};
|
|
3205
3160
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3206
3161
|
let m = Symbol("flemo-player-track");
|
|
3207
|
-
if (
|
|
3162
|
+
if (En(p.element, m), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3208
3163
|
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3209
3164
|
for (let e of u.strings) U(p.element, e.property, m);
|
|
3210
3165
|
for (let e of u.constants) U(p.element, e.property, m);
|
|
@@ -3226,13 +3181,13 @@ var Ui = [
|
|
|
3226
3181
|
}
|
|
3227
3182
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
3228
3183
|
let t = r.get(e);
|
|
3229
|
-
return t || (t =
|
|
3184
|
+
return t || (t = Dr(e.motion.ease), r.set(e, t)), t;
|
|
3230
3185
|
};
|
|
3231
3186
|
function a(t, n, r) {
|
|
3232
3187
|
let { element: i, parsed: a } = t;
|
|
3233
3188
|
if (!(!a || !i.isConnected)) {
|
|
3234
3189
|
if (a.transforms.length > 0) {
|
|
3235
|
-
let o =
|
|
3190
|
+
let o = Bi(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3236
3191
|
o !== "" && (i.style.transform = o);
|
|
3237
3192
|
}
|
|
3238
3193
|
if (a.opacity) {
|
|
@@ -3253,10 +3208,10 @@ var Ui = [
|
|
|
3253
3208
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3254
3209
|
let d;
|
|
3255
3210
|
try {
|
|
3256
|
-
d = o.animate([
|
|
3211
|
+
d = o.animate([Hi(r.motion.from), Hi(r.motion.to)], {
|
|
3257
3212
|
duration: c,
|
|
3258
3213
|
delay: -u,
|
|
3259
|
-
easing:
|
|
3214
|
+
easing: Xt(r.motion.ease),
|
|
3260
3215
|
fill: "both"
|
|
3261
3216
|
});
|
|
3262
3217
|
} catch {
|
|
@@ -3270,12 +3225,12 @@ var Ui = [
|
|
|
3270
3225
|
let l = r.startTime ?? c;
|
|
3271
3226
|
if (r.lastTime !== null) {
|
|
3272
3227
|
let e = c - r.lastTime;
|
|
3273
|
-
if (n.onFrameGap?.(e), e >=
|
|
3228
|
+
if (n.onFrameGap?.(e), e >= Gi && e <= qi) {
|
|
3274
3229
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3275
|
-
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 >=
|
|
3276
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3230
|
+
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 >= Ki);
|
|
3231
|
+
r.frameIntervalMs = Math.min(i ? qi : Pi, Math.max(Gi, n)), Ji = r.frameIntervalMs, n < 12 && Me(n, t[t.length - 1]);
|
|
3277
3232
|
}
|
|
3278
|
-
e >
|
|
3233
|
+
e > Wi * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3279
3234
|
}
|
|
3280
3235
|
r.startTime = l, r.lastTime = c;
|
|
3281
3236
|
let u = !0, d = !1;
|
|
@@ -3296,7 +3251,7 @@ var Ui = [
|
|
|
3296
3251
|
continue;
|
|
3297
3252
|
}
|
|
3298
3253
|
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3299
|
-
if (t.handoff && f >=
|
|
3254
|
+
if (t.handoff && f >= rt() && f < i && s(e, r, t, a)) {
|
|
3300
3255
|
u = !1;
|
|
3301
3256
|
continue;
|
|
3302
3257
|
}
|
|
@@ -3314,7 +3269,7 @@ var Ui = [
|
|
|
3314
3269
|
}
|
|
3315
3270
|
return n;
|
|
3316
3271
|
})();
|
|
3317
|
-
|
|
3272
|
+
Qi.onFrameGap = (e) => {
|
|
3318
3273
|
if (typeof window < "u") {
|
|
3319
3274
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3320
3275
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3322,70 +3277,70 @@ Ca.onFrameGap = (e) => {
|
|
|
3322
3277
|
};
|
|
3323
3278
|
//#endregion
|
|
3324
3279
|
//#region src/core/engine/types.ts
|
|
3325
|
-
var
|
|
3280
|
+
var $i = "data-flemo-skip-animation", $ = () => {}, ea = 400, ta = 4, na = 100, ra = 1500, ia = "data-flemo-part-name", aa = /* @__PURE__ */ new WeakMap(), oa = "data-flemo-anim-hold", sa = (e) => {
|
|
3326
3281
|
let t = e.parentElement ?? e;
|
|
3327
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3282
|
+
return Array.from(t.querySelectorAll(`[${ia}]`)).filter((n) => {
|
|
3328
3283
|
let r = n.closest("[data-flemo-screen]");
|
|
3329
3284
|
return !r || r === e || !t.contains(r);
|
|
3330
3285
|
});
|
|
3331
|
-
},
|
|
3286
|
+
}, ca = (e, t) => {
|
|
3332
3287
|
let [n, r] = t.split("-");
|
|
3333
|
-
return
|
|
3334
|
-
},
|
|
3288
|
+
return sa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3289
|
+
}, la = (e, t) => {
|
|
3335
3290
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3336
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3291
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ia}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3337
3292
|
if (n === null) return !0;
|
|
3338
3293
|
let t = e.closest("[data-flemo-router]");
|
|
3339
3294
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3340
3295
|
});
|
|
3341
|
-
},
|
|
3296
|
+
}, ua = (e, t) => la(e, t).filter((e) => e.parentElement?.closest(`[${oa}]`) == null), da = (e) => {
|
|
3342
3297
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3343
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3344
|
-
if (e.parentElement?.closest(`[${
|
|
3298
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ia}][${oa}]`)).filter((e) => {
|
|
3299
|
+
if (e.parentElement?.closest(`[${oa}]`) != null) return !1;
|
|
3345
3300
|
if (t === null) return !0;
|
|
3346
3301
|
let n = e.closest("[data-flemo-router]");
|
|
3347
3302
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3348
3303
|
});
|
|
3349
|
-
},
|
|
3304
|
+
}, fa = (e, t, n) => {
|
|
3350
3305
|
let r = 0;
|
|
3351
3306
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3352
3307
|
if (!H(t, e)) continue;
|
|
3353
3308
|
let n = B(t, e);
|
|
3354
3309
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3355
3310
|
}
|
|
3356
|
-
for (let t of
|
|
3357
|
-
let e = z.get(t.getAttribute(
|
|
3311
|
+
for (let t of la(e, n)) {
|
|
3312
|
+
let e = z.get(t.getAttribute(ia)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3358
3313
|
if (!e || !H(e, i)) continue;
|
|
3359
3314
|
let a = B(e, i);
|
|
3360
3315
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3361
3316
|
}
|
|
3362
|
-
let i = t.decoratorName ?
|
|
3317
|
+
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3363
3318
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3364
3319
|
if (!H(i, e)) continue;
|
|
3365
3320
|
let t = B(i, e);
|
|
3366
3321
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3367
3322
|
}
|
|
3368
3323
|
return r;
|
|
3369
|
-
},
|
|
3370
|
-
|
|
3371
|
-
},
|
|
3372
|
-
|
|
3373
|
-
},
|
|
3374
|
-
if (
|
|
3375
|
-
|
|
3376
|
-
let e = ++
|
|
3377
|
-
if (e !==
|
|
3378
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length <
|
|
3324
|
+
}, pa = (e) => e === "POPPING" && !ze() || e === "PUSHING" && Re() && !ze(), ma = 12, ha = null, ga = () => {
|
|
3325
|
+
ha = typeof requestAnimationFrame == "function" ? requestAnimationFrame(ga) : null;
|
|
3326
|
+
}, _a = () => (ha === null && typeof requestAnimationFrame == "function" && (ha = requestAnimationFrame(ga)), $), va = !1, ya = 0, ba = () => {
|
|
3327
|
+
va &&= (ya += 1, !1);
|
|
3328
|
+
}, xa = 2, Sa = 8, Ca = () => {
|
|
3329
|
+
if (va || typeof requestAnimationFrame != "function") return;
|
|
3330
|
+
va = !0;
|
|
3331
|
+
let e = ++ya, t = [], n = xa, r = null, i = (a) => {
|
|
3332
|
+
if (e !== ya) return;
|
|
3333
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Sa) {
|
|
3379
3334
|
requestAnimationFrame(i);
|
|
3380
3335
|
return;
|
|
3381
3336
|
}
|
|
3382
|
-
|
|
3337
|
+
va = !1;
|
|
3383
3338
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3384
|
-
|
|
3339
|
+
Xi(s), Me(s, o[o.length - 1]);
|
|
3385
3340
|
};
|
|
3386
3341
|
requestAnimationFrame(i);
|
|
3387
|
-
},
|
|
3388
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l =
|
|
3342
|
+
}, wa = (e, t, n, r) => {
|
|
3343
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = I() && Fe(), u = !l && I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Yi() < ma, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? Rr(e, t, d) : u ? Br(e, t, d, Yi()) : null : null;
|
|
3389
3344
|
if (H(t, n)) {
|
|
3390
3345
|
Z(i, t, c, r);
|
|
3391
3346
|
let e = f(B(t, n) ?? null, i);
|
|
@@ -3393,31 +3348,31 @@ var wa = "data-flemo-skip-animation", $ = () => {}, Ta = 400, Ea = 4, Da = 100,
|
|
|
3393
3348
|
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (Z(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3394
3349
|
}
|
|
3395
3350
|
if (a && t.decoratorName) {
|
|
3396
|
-
let e =
|
|
3351
|
+
let e = R.get(t.decoratorName);
|
|
3397
3352
|
e && H(e, n) && Z(a, e, c, r);
|
|
3398
3353
|
}
|
|
3399
|
-
for (let e of
|
|
3400
|
-
let t = z.get(e.getAttribute(
|
|
3354
|
+
for (let e of ca(i, n)) {
|
|
3355
|
+
let t = z.get(e.getAttribute(ia));
|
|
3401
3356
|
if (t && H(t, n)) {
|
|
3402
3357
|
Z(e, t, c, r);
|
|
3403
3358
|
let i = f(B(t, n) ?? null, e);
|
|
3404
3359
|
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3405
3360
|
}
|
|
3406
3361
|
}
|
|
3407
|
-
},
|
|
3362
|
+
}, Ta = (e, t) => {
|
|
3408
3363
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3409
3364
|
if (n) {
|
|
3410
3365
|
Q(n, t);
|
|
3411
|
-
for (let e of
|
|
3366
|
+
for (let e of sa(n)) Q(e, t);
|
|
3412
3367
|
}
|
|
3413
3368
|
r && Q(r, t);
|
|
3414
3369
|
for (let e of i ?? []) e && Q(e, t);
|
|
3415
|
-
},
|
|
3370
|
+
}, Ea = 4, Da = (e) => `${Math.round(e * 1e3) / 1e3}s`, Oa = (e) => {
|
|
3416
3371
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3417
|
-
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 =
|
|
3372
|
+
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 = Da(n.seconds), a = !0), i = !1;
|
|
3418
3373
|
}, s = (a) => {
|
|
3419
|
-
if (i || a.target !== t || !
|
|
3420
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3374
|
+
if (i || a.target !== t || !rn(a.animationName, n)) return;
|
|
3375
|
+
if (!e.isLive() || e.budgetUsed() >= Ea) {
|
|
3421
3376
|
e.onTerminal();
|
|
3422
3377
|
return;
|
|
3423
3378
|
}
|
|
@@ -3447,8 +3402,7 @@ var wa = "data-flemo-skip-animation", $ = () => {}, Ta = 400, Ea = 4, Da = 100,
|
|
|
3447
3402
|
}
|
|
3448
3403
|
};
|
|
3449
3404
|
};
|
|
3450
|
-
function
|
|
3451
|
-
We();
|
|
3405
|
+
function ka(e) {
|
|
3452
3406
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3453
3407
|
if (!c) return;
|
|
3454
3408
|
let { land: e, cancel: t } = c;
|
|
@@ -3473,20 +3427,20 @@ function eo(e) {
|
|
|
3473
3427
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3474
3428
|
if (h) {
|
|
3475
3429
|
let { scope: e } = d();
|
|
3476
|
-
if (e) if (_ && !g) for (let t of
|
|
3477
|
-
else for (let t of
|
|
3430
|
+
if (e) if (_ && !g) for (let t of ua(e, m)) t.setAttribute(oa, "true");
|
|
3431
|
+
else for (let t of da(e)) t.removeAttribute(oa);
|
|
3478
3432
|
}
|
|
3479
3433
|
if (_) {
|
|
3480
3434
|
let { scope: e, bars: n } = d();
|
|
3481
3435
|
if (e) {
|
|
3482
|
-
|
|
3483
|
-
for (let n of
|
|
3436
|
+
Dn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3437
|
+
for (let n of sa(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3484
3438
|
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3485
3439
|
}
|
|
3486
3440
|
}
|
|
3487
|
-
_ && (
|
|
3441
|
+
_ && (pr(), o &&= (clearTimeout(o), null), a ||= ur()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3488
3442
|
o = null, a?.(), a = null;
|
|
3489
|
-
},
|
|
3443
|
+
}, ea) : (a(), a = null));
|
|
3490
3444
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3491
3445
|
if (!y && i) {
|
|
3492
3446
|
let e = i;
|
|
@@ -3496,39 +3450,37 @@ function eo(e) {
|
|
|
3496
3450
|
let e = r;
|
|
3497
3451
|
r = null, _ ? e() : u(e);
|
|
3498
3452
|
}
|
|
3499
|
-
if (v && !r &&
|
|
3453
|
+
if (v && !r && Be()) {
|
|
3500
3454
|
l();
|
|
3501
3455
|
let { scope: e } = d();
|
|
3502
3456
|
if (e) {
|
|
3503
|
-
|
|
3504
|
-
let t =
|
|
3457
|
+
En(e);
|
|
3458
|
+
let t = Qn(e), n = Cr(e), i = fa(e, St(f), m), a = _i(i + ra), o = Ie() === "on" ? yr(e, i + ra) : $, s = jn();
|
|
3505
3459
|
r = () => {
|
|
3506
3460
|
a(), o(), n(), t(), s();
|
|
3507
3461
|
};
|
|
3508
3462
|
}
|
|
3509
3463
|
}
|
|
3510
|
-
if (y && !i &&
|
|
3464
|
+
if (y && !i && Be()) {
|
|
3511
3465
|
l();
|
|
3512
3466
|
let { scope: e } = d();
|
|
3513
|
-
e &&
|
|
3467
|
+
e && Ie() === "on" && (i = yr(e, fa(e, St(f), m) + ra, !0));
|
|
3514
3468
|
}
|
|
3515
3469
|
let b = (t, n, r) => {
|
|
3516
3470
|
let i = e.getTransitionTaskId();
|
|
3517
|
-
if (!i || (
|
|
3518
|
-
if (
|
|
3519
|
-
if (
|
|
3520
|
-
if (!L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return Ue(), null;
|
|
3521
|
-
if (!ve.playerAllowed()) return null;
|
|
3471
|
+
if (!i || (ye.pinnedDriver(), I() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3472
|
+
if (I() && ye.pinnedDriver() !== "raf") return Ca(), null;
|
|
3473
|
+
if (_e() || !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && pa(t.split("-")[0]) || !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && be() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING") || !ye.playerAllowed()) return null;
|
|
3522
3474
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3523
3475
|
if (!a) return null;
|
|
3524
|
-
let l =
|
|
3525
|
-
if (
|
|
3476
|
+
let l = St(f);
|
|
3477
|
+
if (ye.pinnedDriver() !== "raf") {
|
|
3526
3478
|
let e = t.split("-")[0];
|
|
3527
|
-
if (
|
|
3479
|
+
if (qr(l, e, a) === "native") return null;
|
|
3528
3480
|
}
|
|
3529
3481
|
let u = B(l, t);
|
|
3530
3482
|
if (!u) return null;
|
|
3531
|
-
let p = [], h =
|
|
3483
|
+
let p = [], h = Qi.join(i, {
|
|
3532
3484
|
element: a,
|
|
3533
3485
|
motion: u,
|
|
3534
3486
|
role: n,
|
|
@@ -3539,7 +3491,7 @@ function eo(e) {
|
|
|
3539
3491
|
p.push(h);
|
|
3540
3492
|
for (let e of c ?? []) {
|
|
3541
3493
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3542
|
-
let n =
|
|
3494
|
+
let n = Qi.join(i, {
|
|
3543
3495
|
element: e,
|
|
3544
3496
|
motion: u,
|
|
3545
3497
|
role: "passive",
|
|
@@ -3548,9 +3500,9 @@ function eo(e) {
|
|
|
3548
3500
|
n && p.push(n);
|
|
3549
3501
|
}
|
|
3550
3502
|
if (o && l.decoratorName) {
|
|
3551
|
-
let e =
|
|
3503
|
+
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3552
3504
|
if (n) {
|
|
3553
|
-
let e =
|
|
3505
|
+
let e = Qi.join(i, {
|
|
3554
3506
|
element: o,
|
|
3555
3507
|
motion: n,
|
|
3556
3508
|
role: "passive",
|
|
@@ -3559,10 +3511,10 @@ function eo(e) {
|
|
|
3559
3511
|
e && p.push(e);
|
|
3560
3512
|
}
|
|
3561
3513
|
}
|
|
3562
|
-
for (let e of
|
|
3563
|
-
let n = z.get(e.getAttribute(
|
|
3514
|
+
for (let e of ca(a, t)) {
|
|
3515
|
+
let n = z.get(e.getAttribute(ia)), r = n ? B(n, t) : null;
|
|
3564
3516
|
if (!r) continue;
|
|
3565
|
-
let a =
|
|
3517
|
+
let a = Qi.join(i, {
|
|
3566
3518
|
element: e,
|
|
3567
3519
|
motion: r,
|
|
3568
3520
|
role: "passive"
|
|
@@ -3571,8 +3523,8 @@ function eo(e) {
|
|
|
3571
3523
|
}
|
|
3572
3524
|
return () => p.forEach((e) => e());
|
|
3573
3525
|
}, x = (e, n) => {
|
|
3574
|
-
let r = [], { decorator: i, bars: a } = d(), o =
|
|
3575
|
-
let a = 0, o =
|
|
3526
|
+
let r = [], { decorator: i, bars: a } = d(), o = St(f), s = (e, n, i) => {
|
|
3527
|
+
let a = 0, o = Oa({
|
|
3576
3528
|
element: e,
|
|
3577
3529
|
expectedName: n,
|
|
3578
3530
|
motion: i,
|
|
@@ -3585,15 +3537,15 @@ function eo(e) {
|
|
|
3585
3537
|
onTerminal: $
|
|
3586
3538
|
});
|
|
3587
3539
|
o.attach(), r.push(o.detach);
|
|
3588
|
-
}, c =
|
|
3540
|
+
}, c = tn("screen", f, n), l = B(o, n);
|
|
3589
3541
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3590
3542
|
if (i && o.decoratorName) {
|
|
3591
|
-
let e =
|
|
3592
|
-
t && s(i,
|
|
3543
|
+
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3544
|
+
t && s(i, tn("decorator", o.decoratorName, n), t);
|
|
3593
3545
|
}
|
|
3594
|
-
for (let t of
|
|
3595
|
-
let e = t.getAttribute(
|
|
3596
|
-
i && s(t,
|
|
3546
|
+
for (let t of ca(e, n)) {
|
|
3547
|
+
let e = t.getAttribute(ia), r = z.get(e), i = r ? B(r, n) : null;
|
|
3548
|
+
i && s(t, tn("part", e, n), i);
|
|
3597
3549
|
}
|
|
3598
3550
|
return r;
|
|
3599
3551
|
};
|
|
@@ -3602,11 +3554,11 @@ function eo(e) {
|
|
|
3602
3554
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3603
3555
|
if (e) {
|
|
3604
3556
|
W(e);
|
|
3605
|
-
for (let t of
|
|
3557
|
+
for (let t of sa(e)) W(t);
|
|
3606
3558
|
}
|
|
3607
3559
|
n && W(n);
|
|
3608
3560
|
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3609
|
-
return
|
|
3561
|
+
return Ta({
|
|
3610
3562
|
scope: e,
|
|
3611
3563
|
decorator: n,
|
|
3612
3564
|
bars: r ?? []
|
|
@@ -3614,22 +3566,22 @@ function eo(e) {
|
|
|
3614
3566
|
}
|
|
3615
3567
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3616
3568
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3617
|
-
e &&
|
|
3569
|
+
e && wa({
|
|
3618
3570
|
scope: e,
|
|
3619
3571
|
decorator: n,
|
|
3620
3572
|
bars: r ?? []
|
|
3621
|
-
},
|
|
3573
|
+
}, St(f), `${m}-false`, t);
|
|
3622
3574
|
}
|
|
3623
3575
|
if (_ && g) {
|
|
3624
3576
|
let e = `${m}-false`, n = b(e, "passive");
|
|
3625
3577
|
if (n) return n;
|
|
3626
3578
|
let { scope: r } = d();
|
|
3627
3579
|
if (r) {
|
|
3628
|
-
let n =
|
|
3580
|
+
let n = St(f), i = [];
|
|
3629
3581
|
if (H(n, e)) {
|
|
3630
|
-
let a = B(n, e), o = 0, s =
|
|
3582
|
+
let a = B(n, e), o = 0, s = Oa({
|
|
3631
3583
|
element: r,
|
|
3632
|
-
expectedName:
|
|
3584
|
+
expectedName: tn("screen", f, e),
|
|
3633
3585
|
motion: a,
|
|
3634
3586
|
writer: t,
|
|
3635
3587
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3647,15 +3599,15 @@ function eo(e) {
|
|
|
3647
3599
|
return $;
|
|
3648
3600
|
}
|
|
3649
3601
|
if (m === "COMPLETED") {
|
|
3650
|
-
|
|
3602
|
+
ba(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3651
3603
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3652
3604
|
if (n) {
|
|
3653
|
-
W(n), W(n, ["transform", "opacity"]), n.removeAttribute(
|
|
3654
|
-
for (let e of
|
|
3605
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute($i);
|
|
3606
|
+
for (let e of sa(n)) W(e);
|
|
3655
3607
|
}
|
|
3656
|
-
r && (W(r), r.removeAttribute(
|
|
3608
|
+
r && (W(r), r.removeAttribute($i));
|
|
3657
3609
|
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3658
|
-
return
|
|
3610
|
+
return Ta({
|
|
3659
3611
|
scope: n,
|
|
3660
3612
|
decorator: r,
|
|
3661
3613
|
bars: i ?? []
|
|
@@ -3666,19 +3618,19 @@ function eo(e) {
|
|
|
3666
3618
|
if (!S) return $;
|
|
3667
3619
|
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3668
3620
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3669
|
-
}, E =
|
|
3621
|
+
}, E = St(f), D = `${m}-true`, O = S.getAttribute($i) === "true", k = !O && H(E, D);
|
|
3670
3622
|
if (!O) {
|
|
3671
3623
|
let { decorator: e, bars: n } = d();
|
|
3672
|
-
|
|
3624
|
+
wa({
|
|
3673
3625
|
scope: S,
|
|
3674
3626
|
decorator: e,
|
|
3675
3627
|
bars: n ?? []
|
|
3676
3628
|
}, E, D, t);
|
|
3677
3629
|
}
|
|
3678
|
-
k &&
|
|
3630
|
+
k && I() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || Yi() < ma) && (w = _a());
|
|
3679
3631
|
let A = `${m}-false`, j = H(E, A) ? B(E, A) : null, ee = [];
|
|
3680
|
-
for (let e of
|
|
3681
|
-
let t = z.get(e.getAttribute(
|
|
3632
|
+
for (let e of la(S, m)) {
|
|
3633
|
+
let t = z.get(e.getAttribute(ia)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3682
3634
|
r && ee.push({
|
|
3683
3635
|
element: e,
|
|
3684
3636
|
motion: r
|
|
@@ -3688,7 +3640,7 @@ function eo(e) {
|
|
|
3688
3640
|
for (let { motion: e } of ee) M = Math.max(M, (e.delay + e.duration) * 1e3);
|
|
3689
3641
|
let N = [];
|
|
3690
3642
|
{
|
|
3691
|
-
let e = E.decoratorName ?
|
|
3643
|
+
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3692
3644
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3693
3645
|
if (!H(e, t)) continue;
|
|
3694
3646
|
let n = B(e, t);
|
|
@@ -3699,7 +3651,7 @@ function eo(e) {
|
|
|
3699
3651
|
if (!O && M > 0) {
|
|
3700
3652
|
if (!g) return C && s.markGateHeld(C), $;
|
|
3701
3653
|
let e = M + 50;
|
|
3702
|
-
C && s.anchorGate(C, e +
|
|
3654
|
+
C && s.anchorGate(C, e + ra);
|
|
3703
3655
|
let t = setTimeout(T, e);
|
|
3704
3656
|
return () => clearTimeout(t);
|
|
3705
3657
|
}
|
|
@@ -3708,85 +3660,85 @@ function eo(e) {
|
|
|
3708
3660
|
let P = B(E, D);
|
|
3709
3661
|
if (C) if (g) {
|
|
3710
3662
|
let e = (P.delay + P.duration) * 1e3;
|
|
3711
|
-
s.anchorGate(C, Math.max(e, M) +
|
|
3663
|
+
s.anchorGate(C, Math.max(e, M) + ra);
|
|
3712
3664
|
} else s.markGateHeld(C);
|
|
3713
|
-
let F = !O && !!P, te = E.driver === "native" && !
|
|
3714
|
-
F && !
|
|
3715
|
-
let
|
|
3665
|
+
let F = !O && !!P, te = E.driver === "native" && !I(), ne = !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && be(), re = I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ge(), ie = !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && pa(m), ae = ne || re || ie, oe = _e() && We(), se = null;
|
|
3666
|
+
F && !I() && !te && !ne && !ie && !oe && (se = ci(S, () => [S.ownerDocument.documentElement], () => aa.get(S)?.(), !1));
|
|
3667
|
+
let ce = ae ? fn[m] ?? 0 : oe ? dn[m] ?? 0 : 0, le = ne && (m === "PUSHING" || m === "POPPING");
|
|
3716
3668
|
{
|
|
3717
3669
|
let e = S.ownerDocument.documentElement;
|
|
3718
|
-
|
|
3670
|
+
ae && He() ? e.setAttribute("data-flemo-creep", "true") : e.removeAttribute("data-flemo-creep"), ae ? e.setAttribute("data-flemo-governed", "true") : e.removeAttribute("data-flemo-governed"), oe ? e.setAttribute("data-flemo-desk-head", "true") : e.removeAttribute("data-flemo-desk-head");
|
|
3719
3671
|
}
|
|
3720
|
-
let
|
|
3721
|
-
F && te && (
|
|
3722
|
-
let
|
|
3723
|
-
|
|
3724
|
-
},
|
|
3725
|
-
|
|
3726
|
-
},
|
|
3672
|
+
let ue = null;
|
|
3673
|
+
F && te && (ue = ti(S, () => [S.ownerDocument.documentElement], () => aa.get(S)?.()));
|
|
3674
|
+
let de = tn("screen", f, D), fe, pe = () => {
|
|
3675
|
+
fe !== void 0 && (clearTimeout(fe), fe = void 0);
|
|
3676
|
+
}, me = 0, he, ve = [], xe, Se = () => {
|
|
3677
|
+
ve.forEach((e) => cancelAnimationFrame(e)), ve = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3678
|
+
}, Ce = () => {
|
|
3727
3679
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3728
3680
|
shields exotic embedders. */
|
|
3729
3681
|
if (typeof requestAnimationFrame != "function") {
|
|
3730
3682
|
T();
|
|
3731
3683
|
return;
|
|
3732
3684
|
}
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
},
|
|
3685
|
+
xe = setTimeout(() => {
|
|
3686
|
+
Se(), T();
|
|
3687
|
+
}, na);
|
|
3736
3688
|
let e = (t) => {
|
|
3737
3689
|
if (t <= 0) {
|
|
3738
|
-
|
|
3690
|
+
Se(), T();
|
|
3739
3691
|
return;
|
|
3740
3692
|
}
|
|
3741
|
-
|
|
3693
|
+
ve.push(requestAnimationFrame(() => e(t - 1)));
|
|
3742
3694
|
};
|
|
3743
|
-
e(
|
|
3744
|
-
},
|
|
3745
|
-
if (
|
|
3746
|
-
|
|
3695
|
+
e(ta);
|
|
3696
|
+
}, we = () => {
|
|
3697
|
+
if (me <= 0) {
|
|
3698
|
+
Ce();
|
|
3747
3699
|
return;
|
|
3748
3700
|
}
|
|
3749
|
-
|
|
3750
|
-
},
|
|
3751
|
-
e.target === S &&
|
|
3701
|
+
he = setTimeout(Ce, me);
|
|
3702
|
+
}, Te = $, Ee = $, De = (e) => {
|
|
3703
|
+
e.target === S && rn(e.animationName, de) && (S.removeEventListener("animationend", De), pe(), Te(), we());
|
|
3752
3704
|
};
|
|
3753
|
-
S.addEventListener("animationend",
|
|
3754
|
-
let
|
|
3755
|
-
|
|
3756
|
-
let
|
|
3705
|
+
S.addEventListener("animationend", De);
|
|
3706
|
+
let Oe = F && g ? b(D, "active", Ce) : null, ke = (P.delay + P.duration) * 1e3, Ae = Math.max(ke, M) + 1500, je = C ? setTimeout(() => void s.resolveTask(C), Ae) : void 0;
|
|
3707
|
+
me = Math.max(0, M - ke);
|
|
3708
|
+
let Me = ke * 1 + ce + 250, Ne = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Pe = Oa({
|
|
3757
3709
|
element: S,
|
|
3758
|
-
expectedName:
|
|
3710
|
+
expectedName: de,
|
|
3759
3711
|
motion: P,
|
|
3760
3712
|
writer: t,
|
|
3761
|
-
isLive:
|
|
3713
|
+
isLive: Ne,
|
|
3762
3714
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3763
3715
|
spendBudget: () => {
|
|
3764
|
-
|
|
3716
|
+
Ee(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3765
3717
|
},
|
|
3766
3718
|
onTerminal: T
|
|
3767
3719
|
});
|
|
3768
|
-
|
|
3769
|
-
let
|
|
3770
|
-
|
|
3771
|
-
},
|
|
3772
|
-
if (
|
|
3773
|
-
|
|
3720
|
+
Te = Pe.detach;
|
|
3721
|
+
let L = !1, Fe = () => {
|
|
3722
|
+
pe(), fe = setTimeout(Le, Me);
|
|
3723
|
+
}, Le = () => {
|
|
3724
|
+
if (pe(), Ne() && !L) {
|
|
3725
|
+
L = !0, Ee(), Pe.fullRestart(), Fe();
|
|
3774
3726
|
return;
|
|
3775
3727
|
}
|
|
3776
3728
|
T();
|
|
3777
|
-
},
|
|
3778
|
-
|
|
3779
|
-
|
|
3729
|
+
}, Re = !Oe && g, ze = Re ? x(S, D) : [];
|
|
3730
|
+
Re && (Pe.attach(), C && Fe()), Re && (te || ne) && aa.set(S, () => {
|
|
3731
|
+
Ee(), C && fe !== void 0 && Fe();
|
|
3780
3732
|
});
|
|
3781
|
-
let
|
|
3782
|
-
|
|
3783
|
-
}) : null,
|
|
3784
|
-
|
|
3733
|
+
let Ve = Re && te ? oi(() => [S.ownerDocument.documentElement], () => {
|
|
3734
|
+
Ee(), C && fe !== void 0 && Fe();
|
|
3735
|
+
}) : null, Ue, Ge = () => {
|
|
3736
|
+
Ue !== void 0 && (clearTimeout(Ue), Ue = void 0);
|
|
3785
3737
|
};
|
|
3786
|
-
if (
|
|
3787
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3738
|
+
if (Ee = Ge, Re && C && !le && !ie) {
|
|
3739
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Pr(P, S, e), n = j ? Pr(j, S, e) : 0, r = 0;
|
|
3788
3740
|
for (let { element: t, motion: n } of ee) {
|
|
3789
|
-
let i =
|
|
3741
|
+
let i = Pr(n, t, e);
|
|
3790
3742
|
if (i === null) {
|
|
3791
3743
|
r = null;
|
|
3792
3744
|
break;
|
|
@@ -3797,7 +3749,7 @@ function eo(e) {
|
|
|
3797
3749
|
if (N.length > 0) {
|
|
3798
3750
|
let t = d().decorator;
|
|
3799
3751
|
if (t) for (let n of N) {
|
|
3800
|
-
let r =
|
|
3752
|
+
let r = Pr(n, t, e);
|
|
3801
3753
|
if (r === null) {
|
|
3802
3754
|
i = null;
|
|
3803
3755
|
break;
|
|
@@ -3806,16 +3758,16 @@ function eo(e) {
|
|
|
3806
3758
|
}
|
|
3807
3759
|
}
|
|
3808
3760
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3809
|
-
a !== null && a + 17 <
|
|
3810
|
-
|
|
3811
|
-
}, a * 1 + 17 +
|
|
3761
|
+
a !== null && a + 17 < ke + me && (Ue = setTimeout(() => {
|
|
3762
|
+
Ue = void 0, Ne() && (S.removeEventListener("animationend", De), pe(), Te(), Ce());
|
|
3763
|
+
}, a * 1 + 17 + ce));
|
|
3812
3764
|
}
|
|
3813
3765
|
return () => {
|
|
3814
|
-
if (w(),
|
|
3815
|
-
|
|
3816
|
-
for (let e of
|
|
3766
|
+
if (w(), je !== void 0 && clearTimeout(je), he !== void 0 && clearTimeout(he), Se(), ue?.(), se?.(), Ve?.(), Ge(), S.removeEventListener("animationend", De), Re) {
|
|
3767
|
+
Pe.detach();
|
|
3768
|
+
for (let e of ze) e();
|
|
3817
3769
|
}
|
|
3818
|
-
|
|
3770
|
+
pe(), Oe?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3819
3771
|
};
|
|
3820
3772
|
},
|
|
3821
3773
|
activeResumeEntryCount: () => n.size
|
|
@@ -3823,28 +3775,28 @@ function eo(e) {
|
|
|
3823
3775
|
}
|
|
3824
3776
|
//#endregion
|
|
3825
3777
|
//#region src/transition/swipeSettle.ts
|
|
3826
|
-
var
|
|
3827
|
-
let
|
|
3828
|
-
if (
|
|
3829
|
-
let
|
|
3830
|
-
return Math.min(r, Math.max(
|
|
3778
|
+
var Aa = .12, ja = .28, Ma = ({ remainingPx: e, spanPx: t, velocityPxPerSecond: n, authoredSeconds: r, reversing: i = !1, minSeconds: a = i ? ja : Aa }) => {
|
|
3779
|
+
let o = Math.abs(e);
|
|
3780
|
+
if (o <= .5) return 0;
|
|
3781
|
+
let s = Math.abs(t), c = s > 0 ? r * Math.min(1, o / s) : r, l = Math.abs(n), u = !i && l > 0 ? o / l : Infinity;
|
|
3782
|
+
return Math.min(r, Math.max(a, Math.min(c, u)));
|
|
3831
3783
|
};
|
|
3832
3784
|
//#endregion
|
|
3833
3785
|
//#region src/utils/findScrollable.ts
|
|
3834
|
-
function
|
|
3835
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3786
|
+
function Na(e, t) {
|
|
3787
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Pa(e);
|
|
3836
3788
|
if (!o) return {
|
|
3837
3789
|
element: null,
|
|
3838
3790
|
hasMarker: !1
|
|
3839
3791
|
};
|
|
3840
3792
|
let s = o.closest?.(r);
|
|
3841
|
-
if (s instanceof HTMLElement &&
|
|
3793
|
+
if (s instanceof HTMLElement && Fa(s, n) && (!a || Ia(s, n))) return {
|
|
3842
3794
|
element: s,
|
|
3843
3795
|
hasMarker: !0
|
|
3844
3796
|
};
|
|
3845
3797
|
let c = o, l = 0;
|
|
3846
3798
|
for (; c && l < i;) {
|
|
3847
|
-
if (
|
|
3799
|
+
if (Fa(c, n) && (!a || Ia(c, n))) return {
|
|
3848
3800
|
element: c,
|
|
3849
3801
|
hasMarker: !1
|
|
3850
3802
|
};
|
|
@@ -3855,7 +3807,7 @@ function ro(e, t) {
|
|
|
3855
3807
|
hasMarker: !1
|
|
3856
3808
|
};
|
|
3857
3809
|
}
|
|
3858
|
-
function
|
|
3810
|
+
function Pa(e) {
|
|
3859
3811
|
if (!e) return null;
|
|
3860
3812
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3861
3813
|
if (n && n.length) {
|
|
@@ -3863,34 +3815,34 @@ function io(e) {
|
|
|
3863
3815
|
}
|
|
3864
3816
|
return e instanceof HTMLElement ? e : null;
|
|
3865
3817
|
}
|
|
3866
|
-
function
|
|
3818
|
+
function Fa(e, t) {
|
|
3867
3819
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3868
3820
|
}
|
|
3869
|
-
function
|
|
3870
|
-
if (!
|
|
3821
|
+
function Ia(e, t) {
|
|
3822
|
+
if (!Fa(e, t) || typeof window > "u") return !1;
|
|
3871
3823
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3872
3824
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3873
3825
|
}
|
|
3874
3826
|
//#endregion
|
|
3875
3827
|
//#region src/screen/computeBarRiding.ts
|
|
3876
|
-
function
|
|
3828
|
+
function La(e, t) {
|
|
3877
3829
|
return !!e && !!t && e.id === t.id;
|
|
3878
3830
|
}
|
|
3879
|
-
function
|
|
3831
|
+
function Ra(e) {
|
|
3880
3832
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3881
3833
|
app: !1,
|
|
3882
3834
|
nav: !1
|
|
3883
3835
|
};
|
|
3884
3836
|
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);
|
|
3885
3837
|
return {
|
|
3886
|
-
app: e.hasTopBar && !
|
|
3887
|
-
nav: e.hasNavBar && !
|
|
3838
|
+
app: e.hasTopBar && !La(t, r),
|
|
3839
|
+
nav: e.hasNavBar && !La(n, i)
|
|
3888
3840
|
};
|
|
3889
3841
|
}
|
|
3890
3842
|
//#endregion
|
|
3891
3843
|
//#region src/core/engine/createSwipeController.ts
|
|
3892
|
-
var
|
|
3893
|
-
function
|
|
3844
|
+
var za = "data-flemo-skip-animation";
|
|
3845
|
+
function Ba(e) {
|
|
3894
3846
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3895
3847
|
current: [],
|
|
3896
3848
|
prev: []
|
|
@@ -3956,9 +3908,9 @@ function uo(e) {
|
|
|
3956
3908
|
let t = e.getAttribute("data-flemo-bar-id");
|
|
3957
3909
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
3958
3910
|
}, 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();
|
|
3959
|
-
m && l && !
|
|
3911
|
+
m && l && !La(l, d) && p.push(m), h && u && !La(u, f) && p.push(h);
|
|
3960
3912
|
let g = [];
|
|
3961
|
-
n && (o && d && !
|
|
3913
|
+
n && (o && d && !La(d, l) && g.push(o), s && f && !La(f, u) && g.push(s)), i = {
|
|
3962
3914
|
current: p,
|
|
3963
3915
|
prev: g
|
|
3964
3916
|
};
|
|
@@ -4026,7 +3978,7 @@ function uo(e) {
|
|
|
4026
3978
|
s = !1;
|
|
4027
3979
|
return;
|
|
4028
3980
|
}
|
|
4029
|
-
c = !0, re = ie(),
|
|
3981
|
+
c = !0, re = ie(), ae = 0, ne = (typeof performance > "u" ? Date.now() : performance.now()) + te, x = 0, f = {
|
|
4030
3982
|
x: t.clientX,
|
|
4031
3983
|
y: t.clientY
|
|
4032
3984
|
}, p = {
|
|
@@ -4057,26 +4009,26 @@ function uo(e) {
|
|
|
4057
4009
|
}, P = null, F = 0, te = 200, ne = 0, re = !0, ie = () => {
|
|
4058
4010
|
let e = n?.parentElement;
|
|
4059
4011
|
return !e || !e.isConnected || typeof getComputedStyle != "function" || getComputedStyle(e).display !== "none";
|
|
4060
|
-
},
|
|
4012
|
+
}, ae = 0, oe = (e) => re ? !0 : e >= ne ? (re = !0, !0) : ie() ? ae ? (re = !0, !0) : (ae = e, !1) : (ae = 0, !1), se = () => {
|
|
4061
4013
|
F && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(F), F = 0, re = !0;
|
|
4062
4014
|
let e = P;
|
|
4063
|
-
P = null, e &&
|
|
4064
|
-
},
|
|
4065
|
-
if (F = 0, !
|
|
4066
|
-
P && typeof requestAnimationFrame == "function" && (F = requestAnimationFrame(
|
|
4015
|
+
P = null, e && ue(e);
|
|
4016
|
+
}, ce = (e = typeof performance > "u" ? Date.now() : performance.now()) => {
|
|
4017
|
+
if (F = 0, !oe(e)) {
|
|
4018
|
+
P && typeof requestAnimationFrame == "function" && (F = requestAnimationFrame(ce));
|
|
4067
4019
|
return;
|
|
4068
4020
|
}
|
|
4069
4021
|
let t = P;
|
|
4070
|
-
P = null, t &&
|
|
4071
|
-
},
|
|
4022
|
+
P = null, t && ue(t);
|
|
4023
|
+
}, le = (e) => {
|
|
4072
4024
|
if (P = e, !F) {
|
|
4073
4025
|
if (typeof requestAnimationFrame != "function") {
|
|
4074
|
-
|
|
4026
|
+
ce();
|
|
4075
4027
|
return;
|
|
4076
4028
|
}
|
|
4077
|
-
F = requestAnimationFrame(
|
|
4029
|
+
F = requestAnimationFrame(ce);
|
|
4078
4030
|
}
|
|
4079
|
-
},
|
|
4031
|
+
}, ue = (t) => {
|
|
4080
4032
|
let i = e.getTransition();
|
|
4081
4033
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4082
4034
|
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
@@ -4092,11 +4044,11 @@ function uo(e) {
|
|
|
4092
4044
|
}), j("swipe", e, t);
|
|
4093
4045
|
}
|
|
4094
4046
|
});
|
|
4095
|
-
},
|
|
4047
|
+
}, de = async (o, s = !1) => {
|
|
4096
4048
|
u && await u;
|
|
4097
4049
|
let l = e.getTransition();
|
|
4098
4050
|
if (!l.swipeDirection || !c) return;
|
|
4099
|
-
|
|
4051
|
+
se(), c = !1;
|
|
4100
4052
|
let { scope: d, decorator: f } = e.getElements();
|
|
4101
4053
|
S(o);
|
|
4102
4054
|
let p = e.getDecorator(), m = s || x < 6, h = s ? {
|
|
@@ -4116,41 +4068,42 @@ function uo(e) {
|
|
|
4116
4068
|
x: 0,
|
|
4117
4069
|
y: 0
|
|
4118
4070
|
}
|
|
4119
|
-
} : b(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y =
|
|
4071
|
+
} : b(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = g === "y" ? h.offset.y : h.offset.x, C = g === "y" ? h.velocity.y : h.velocity.x, T = Math.abs(y), E = Math.abs(C), D = Math.sign(y), A = D !== 0 && Math.sign(C) === -D && E >= 300, M = !1, N = (e) => ((t, n, r) => {
|
|
4120
4072
|
let i = typeof r?.duration == "number" ? r.duration : 0;
|
|
4121
4073
|
return i <= 0 ? e(t, n, r) : e(t, n, {
|
|
4122
4074
|
...r,
|
|
4123
|
-
duration:
|
|
4124
|
-
remainingPx:
|
|
4075
|
+
duration: Ma({
|
|
4076
|
+
remainingPx: M ? v - T : T,
|
|
4125
4077
|
spanPx: v,
|
|
4126
|
-
velocityPxPerSecond:
|
|
4127
|
-
authoredSeconds: i
|
|
4078
|
+
velocityPxPerSecond: E,
|
|
4079
|
+
authoredSeconds: i,
|
|
4080
|
+
reversing: !M && !A
|
|
4128
4081
|
})
|
|
4129
4082
|
});
|
|
4130
|
-
}),
|
|
4083
|
+
}), P = m ? (e, t, n) => w(e, t, {
|
|
4131
4084
|
...n,
|
|
4132
4085
|
duration: 0
|
|
4133
|
-
}) :
|
|
4086
|
+
}) : N(w), F = m ? (e, t, n) => G(e, t, {
|
|
4134
4087
|
...n,
|
|
4135
4088
|
duration: 0
|
|
4136
|
-
}) :
|
|
4089
|
+
}) : N(G), te = m ? (e, n, r) => G(e, n, {
|
|
4137
4090
|
...r,
|
|
4138
4091
|
duration: 0
|
|
4139
|
-
}, t) :
|
|
4140
|
-
animate:
|
|
4092
|
+
}, t) : N((e, n, r) => G(e, n, r, t)), ne = await l.onSwipeEnd(o, h, {
|
|
4093
|
+
animate: P,
|
|
4141
4094
|
currentScreen: d,
|
|
4142
4095
|
prevScreen: n,
|
|
4143
4096
|
onStart: (e) => {
|
|
4144
4097
|
let t = !s && e;
|
|
4145
|
-
|
|
4146
|
-
animate:
|
|
4098
|
+
M = t, p?.onSwipeEnd?.(t, {
|
|
4099
|
+
animate: F,
|
|
4147
4100
|
currentDecorator: f,
|
|
4148
4101
|
prevDecorator: r
|
|
4149
|
-
}), j("end", t, 0,
|
|
4102
|
+
}), j("end", t, 0, te);
|
|
4150
4103
|
}
|
|
4151
4104
|
});
|
|
4152
|
-
if (!s &&
|
|
4153
|
-
d?.setAttribute(
|
|
4105
|
+
if (!s && ne) {
|
|
4106
|
+
d?.setAttribute(za, "true"), f?.setAttribute(za, "true");
|
|
4154
4107
|
for (let e of i.current) Q(e, t);
|
|
4155
4108
|
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4156
4109
|
i = {
|
|
@@ -4164,10 +4117,10 @@ function uo(e) {
|
|
|
4164
4117
|
};
|
|
4165
4118
|
return {
|
|
4166
4119
|
pointerDown: (t) => {
|
|
4167
|
-
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g =
|
|
4120
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = Na(t.target, {
|
|
4168
4121
|
direction: "x",
|
|
4169
4122
|
verifyByScroll: !0
|
|
4170
|
-
}), _ =
|
|
4123
|
+
}), _ = Na(t.target, {
|
|
4171
4124
|
direction: "y",
|
|
4172
4125
|
verifyByScroll: !0
|
|
4173
4126
|
}), v = t.clientX, y = t.clientY);
|
|
@@ -4175,7 +4128,7 @@ function uo(e) {
|
|
|
4175
4128
|
pointerMove: (t) => {
|
|
4176
4129
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4177
4130
|
if (c) {
|
|
4178
|
-
C(t),
|
|
4131
|
+
C(t), le(t);
|
|
4179
4132
|
return;
|
|
4180
4133
|
}
|
|
4181
4134
|
if (!o) return;
|
|
@@ -4196,41 +4149,41 @@ function uo(e) {
|
|
|
4196
4149
|
}
|
|
4197
4150
|
},
|
|
4198
4151
|
pointerUp: (e) => {
|
|
4199
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4152
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && de(e));
|
|
4200
4153
|
},
|
|
4201
4154
|
pointerCancel: (e) => {
|
|
4202
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4155
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && de(e, !0));
|
|
4203
4156
|
},
|
|
4204
4157
|
shouldPreventTouch: () => s
|
|
4205
4158
|
};
|
|
4206
4159
|
}
|
|
4207
4160
|
//#endregion
|
|
4208
4161
|
//#region src/screen/pendingNetwork.ts
|
|
4209
|
-
var
|
|
4210
|
-
|
|
4211
|
-
},
|
|
4212
|
-
if (!(
|
|
4213
|
-
if (
|
|
4162
|
+
var Va = 0, Ha = !1, Ua = () => {
|
|
4163
|
+
Va = Math.max(0, Va - 1);
|
|
4164
|
+
}, Wa = () => {
|
|
4165
|
+
if (!(Ha || typeof window > "u")) {
|
|
4166
|
+
if (Ha = !0, typeof window.fetch == "function") {
|
|
4214
4167
|
let e = window.fetch.bind(window);
|
|
4215
4168
|
window.fetch = (...t) => {
|
|
4216
|
-
|
|
4169
|
+
Va += 1;
|
|
4217
4170
|
let n;
|
|
4218
4171
|
try {
|
|
4219
4172
|
n = e(...t);
|
|
4220
4173
|
} catch (e) {
|
|
4221
|
-
throw
|
|
4174
|
+
throw Ua(), e;
|
|
4222
4175
|
}
|
|
4223
|
-
return n.then((e) => (
|
|
4224
|
-
throw
|
|
4176
|
+
return n.then((e) => (Ua(), e), (e) => {
|
|
4177
|
+
throw Ua(), e;
|
|
4225
4178
|
});
|
|
4226
4179
|
};
|
|
4227
4180
|
}
|
|
4228
4181
|
if (typeof XMLHttpRequest == "function") {
|
|
4229
4182
|
let e = XMLHttpRequest.prototype.send;
|
|
4230
4183
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4231
|
-
|
|
4184
|
+
Va += 1;
|
|
4232
4185
|
let n = !1, r = () => {
|
|
4233
|
-
n || (n = !0,
|
|
4186
|
+
n || (n = !0, Ua());
|
|
4234
4187
|
};
|
|
4235
4188
|
this.addEventListener("loadend", r);
|
|
4236
4189
|
try {
|
|
@@ -4241,28 +4194,28 @@ var fo = 0, po = !1, mo = () => {
|
|
|
4241
4194
|
};
|
|
4242
4195
|
}
|
|
4243
4196
|
}
|
|
4244
|
-
},
|
|
4197
|
+
}, Ga = () => (Wa(), Va > 0);
|
|
4245
4198
|
//#endregion
|
|
4246
4199
|
//#region src/screen/animStartAnchor.ts
|
|
4247
|
-
function
|
|
4200
|
+
function Ka(e) {
|
|
4248
4201
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4249
4202
|
}
|
|
4250
|
-
var
|
|
4251
|
-
function
|
|
4252
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4203
|
+
var qa = 300, Ja = 20;
|
|
4204
|
+
function Ya(e) {
|
|
4205
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, Ja);
|
|
4253
4206
|
}
|
|
4254
|
-
function
|
|
4255
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4207
|
+
function Xa(e) {
|
|
4208
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of Ya(e)) t.decode().catch(() => {});
|
|
4256
4209
|
}
|
|
4257
|
-
var
|
|
4210
|
+
var Za = 3, Qa = 40, $a = (e) => {
|
|
4258
4211
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4259
4212
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4260
4213
|
/* v8 ignore stop */
|
|
4261
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4262
|
-
},
|
|
4214
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * Qa) / t < Za;
|
|
4215
|
+
}, eo = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4263
4216
|
let t = e.animationName;
|
|
4264
4217
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4265
|
-
}),
|
|
4218
|
+
}), to = (e) => {
|
|
4266
4219
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4267
4220
|
which already requires querySelectorAll. */
|
|
4268
4221
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4270,12 +4223,12 @@ var So = 3, Co = 40, wo = (e) => {
|
|
|
4270
4223
|
the guard shields exotic embedders. */
|
|
4271
4224
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4272
4225
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4273
|
-
if (r >=
|
|
4226
|
+
if (r >= Ja) break;
|
|
4274
4227
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4275
4228
|
}
|
|
4276
4229
|
return !1;
|
|
4277
4230
|
};
|
|
4278
|
-
function
|
|
4231
|
+
function no(e, t = {}) {
|
|
4279
4232
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4280
4233
|
if (n) return;
|
|
4281
4234
|
let r = t.scope;
|
|
@@ -4283,7 +4236,7 @@ function Do(e, t = {}) {
|
|
|
4283
4236
|
e();
|
|
4284
4237
|
return;
|
|
4285
4238
|
}
|
|
4286
|
-
let i =
|
|
4239
|
+
let i = Ya(r);
|
|
4287
4240
|
if (i.length === 0) {
|
|
4288
4241
|
e();
|
|
4289
4242
|
return;
|
|
@@ -4301,15 +4254,15 @@ function Do(e, t = {}) {
|
|
|
4301
4254
|
return;
|
|
4302
4255
|
}
|
|
4303
4256
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4304
|
-
if (!n.renderSettleOnly &&
|
|
4257
|
+
if (!n.renderSettleOnly && !$a(r)) {
|
|
4305
4258
|
e();
|
|
4306
4259
|
return;
|
|
4307
4260
|
}
|
|
4308
4261
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4309
4262
|
the fallback only shields exotic embedders. */
|
|
4310
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
4263
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => $a(r) && eo(r), f = () => Ga() || to(r), p = () => {
|
|
4311
4264
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4312
|
-
}, m = () => n.renderSettleOnly ? 6 :
|
|
4265
|
+
}, m = () => n.renderSettleOnly ? 6 : !$a(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4313
4266
|
if (!n.renderSettleOnly) {
|
|
4314
4267
|
p();
|
|
4315
4268
|
return;
|
|
@@ -4388,14 +4341,14 @@ function Do(e, t = {}) {
|
|
|
4388
4341
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4389
4342
|
};
|
|
4390
4343
|
}
|
|
4391
|
-
function
|
|
4392
|
-
let n =
|
|
4344
|
+
function ro(e, t = {}) {
|
|
4345
|
+
let n = no(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4393
4346
|
return () => {
|
|
4394
4347
|
n(), clearTimeout(i);
|
|
4395
4348
|
};
|
|
4396
4349
|
}
|
|
4397
|
-
var
|
|
4398
|
-
function
|
|
4350
|
+
var io = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4351
|
+
function ao() {
|
|
4399
4352
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4400
4353
|
clearTimeout(n.backstop), e.delete(t);
|
|
4401
4354
|
let r = [...n.members];
|
|
@@ -4405,14 +4358,14 @@ function Ao() {
|
|
|
4405
4358
|
return { join: (r, i, a) => {
|
|
4406
4359
|
let o = e.get(r);
|
|
4407
4360
|
if (o) {
|
|
4408
|
-
let e =
|
|
4361
|
+
let e = io(a);
|
|
4409
4362
|
if (e > o.backstopMs) {
|
|
4410
4363
|
clearTimeout(o.backstop);
|
|
4411
4364
|
let n = o;
|
|
4412
4365
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4413
4366
|
}
|
|
4414
4367
|
} else {
|
|
4415
|
-
let n =
|
|
4368
|
+
let n = io(a), i = {
|
|
4416
4369
|
members: /* @__PURE__ */ new Set(),
|
|
4417
4370
|
backstop: setTimeout(() => t(r, i), n),
|
|
4418
4371
|
backstopMs: n
|
|
@@ -4422,7 +4375,7 @@ function Ao() {
|
|
|
4422
4375
|
let s = o, c = {
|
|
4423
4376
|
release: i,
|
|
4424
4377
|
ready: !1,
|
|
4425
|
-
cancelReadiness:
|
|
4378
|
+
cancelReadiness: no(() => {
|
|
4426
4379
|
c.ready = !0, n(s) && t(r, s);
|
|
4427
4380
|
}, a)
|
|
4428
4381
|
};
|
|
@@ -4439,7 +4392,7 @@ function Ao() {
|
|
|
4439
4392
|
}
|
|
4440
4393
|
//#endregion
|
|
4441
4394
|
//#region src/screen/observeBarHeight.ts
|
|
4442
|
-
function
|
|
4395
|
+
function oo(e, t) {
|
|
4443
4396
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4444
4397
|
let n = new ResizeObserver(([e]) => {
|
|
4445
4398
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4450,31 +4403,31 @@ function jo(e, t) {
|
|
|
4450
4403
|
}
|
|
4451
4404
|
//#endregion
|
|
4452
4405
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4453
|
-
var
|
|
4406
|
+
var so = 0, co = 0, lo = 0, uo = !1, fo = /* @__PURE__ */ new Set(), po = 0, mo = () => {
|
|
4454
4407
|
let e = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4455
4408
|
e = e < 0 ? 0 : e;
|
|
4456
|
-
let t = e -
|
|
4457
|
-
t = t < 0 ? 0 : t,
|
|
4458
|
-
for (let n of [...
|
|
4459
|
-
},
|
|
4460
|
-
cancelAnimationFrame(
|
|
4409
|
+
let t = e - so;
|
|
4410
|
+
t = t < 0 ? 0 : t, so ||= e, co = e, lo = t, uo = !0;
|
|
4411
|
+
for (let n of [...fo]) n(e, t);
|
|
4412
|
+
}, ho = () => {
|
|
4413
|
+
cancelAnimationFrame(po), po = requestAnimationFrame(mo);
|
|
4461
4414
|
};
|
|
4462
|
-
function
|
|
4463
|
-
let t =
|
|
4464
|
-
return
|
|
4465
|
-
|
|
4415
|
+
function go(e) {
|
|
4416
|
+
let t = fo.size === 0;
|
|
4417
|
+
return fo.add(e), t && (window.visualViewport?.addEventListener("resize", ho), window.visualViewport?.addEventListener("scroll", ho)), uo && (e(co, lo), t && ho()), () => {
|
|
4418
|
+
fo.delete(e), !(fo.size > 0) && (cancelAnimationFrame(po), window.visualViewport?.removeEventListener("resize", ho), window.visualViewport?.removeEventListener("scroll", ho));
|
|
4466
4419
|
};
|
|
4467
4420
|
}
|
|
4468
4421
|
//#endregion
|
|
4469
4422
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4470
|
-
var
|
|
4471
|
-
function
|
|
4472
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
4473
|
-
if (
|
|
4474
|
-
|
|
4423
|
+
var _o = () => {}, vo = "data-flemo-gpu-prewarm", yo = 2e3, bo = 1200, xo = 120, So = 3, Co = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", wo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", To = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Eo = "cold", Do = 0, Oo = null;
|
|
4424
|
+
function ko() {
|
|
4425
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !I()) return _o;
|
|
4426
|
+
if (Do += 1, Eo === "cold") {
|
|
4427
|
+
Eo = "scheduled";
|
|
4475
4428
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4476
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
4477
|
-
|
|
4429
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: yo }) : null, t = e === null ? setTimeout(n, bo) : null;
|
|
4430
|
+
Oo = () => {
|
|
4478
4431
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4479
4432
|
};
|
|
4480
4433
|
}, n = () => {
|
|
@@ -4482,13 +4435,13 @@ function $o() {
|
|
|
4482
4435
|
t();
|
|
4483
4436
|
return;
|
|
4484
4437
|
}
|
|
4485
|
-
|
|
4438
|
+
Oo = null, Eo = "done";
|
|
4486
4439
|
let n = document.createElement("div");
|
|
4487
|
-
n.setAttribute(
|
|
4440
|
+
n.setAttribute(vo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Co);
|
|
4488
4441
|
let r = document.createElement("div");
|
|
4489
|
-
r.setAttribute("style",
|
|
4442
|
+
r.setAttribute("style", wo), r.textContent = "flemo";
|
|
4490
4443
|
let i = document.createElement("div");
|
|
4491
|
-
i.setAttribute("style",
|
|
4444
|
+
i.setAttribute("style", To);
|
|
4492
4445
|
let a = document.createElement("div");
|
|
4493
4446
|
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4494
4447
|
let o = document.createElement("div");
|
|
@@ -4509,14 +4462,14 @@ function $o() {
|
|
|
4509
4462
|
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);
|
|
4510
4463
|
try {
|
|
4511
4464
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4512
|
-
duration:
|
|
4513
|
-
iterations:
|
|
4465
|
+
duration: xo,
|
|
4466
|
+
iterations: So
|
|
4514
4467
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4515
|
-
duration:
|
|
4516
|
-
iterations:
|
|
4468
|
+
duration: xo,
|
|
4469
|
+
iterations: So
|
|
4517
4470
|
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4518
|
-
duration:
|
|
4519
|
-
iterations:
|
|
4471
|
+
duration: xo,
|
|
4472
|
+
iterations: So
|
|
4520
4473
|
});
|
|
4521
4474
|
} catch {}
|
|
4522
4475
|
setTimeout(() => n.remove(), 450);
|
|
@@ -4525,12 +4478,12 @@ function $o() {
|
|
|
4525
4478
|
}
|
|
4526
4479
|
let e = !1;
|
|
4527
4480
|
return () => {
|
|
4528
|
-
e || (e = !0,
|
|
4481
|
+
e || (e = !0, Do = Math.max(0, Do - 1), Do === 0 && Eo === "scheduled" && (Oo?.(), Oo = null, Eo = "cold"));
|
|
4529
4482
|
};
|
|
4530
4483
|
}
|
|
4531
4484
|
//#endregion
|
|
4532
4485
|
//#region src/utils/isOpaqueColor.ts
|
|
4533
|
-
function
|
|
4486
|
+
function Ao(e) {
|
|
4534
4487
|
let t = e.trim().toLowerCase();
|
|
4535
4488
|
if (t === "transparent" || t === "") return !1;
|
|
4536
4489
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4541,7 +4494,7 @@ function es(e) {
|
|
|
4541
4494
|
}
|
|
4542
4495
|
//#endregion
|
|
4543
4496
|
//#region src/utils/buildRoutePath.ts
|
|
4544
|
-
function
|
|
4497
|
+
function jo(e, n) {
|
|
4545
4498
|
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();
|
|
4546
4499
|
return {
|
|
4547
4500
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4549,4 +4502,4 @@ function ts(e, n) {
|
|
|
4549
4502
|
};
|
|
4550
4503
|
}
|
|
4551
4504
|
//#endregion
|
|
4552
|
-
export {
|
|
4505
|
+
export { qa as ANIM_HOLD_RELEASE_BACKSTOP_MS, Aa as MIN_SETTLE_SECONDS, q as OFFLOADED_SRC_ATTR, Fn as OVERSIZE_AREA_RATIO, $i as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, Ka as animHoldKey, G as animateInline, tn as animationName, ne as appendParamsQuery, mn as applyTransitionStyles, jo as buildRoutePath, Ia as canProgrammaticallyScroll, W as clearInlineAnimation, Jt as collectAnimatedProperties, cn as compileTransitionStyles, Ra as computeBarRiding, lt as computeScreenFreeze, ct as computeScreenFreezeMode, b as consumeSelfInducedPop, ao as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Ct as createDecorator, c as createHistoryStore, x as createHistorySync, Jn as createImageDecodeOffloader, j as createMemoryHistoryDriver, ee as createNavigateStore, F as createNavigationController, Dt as createPartTransition, wt as createRawDecorator, Ot as createRawPartTransition, dt as createRawTransition, de as createRouterScope, fe as createScreenSelector, ce as createScreenStore, _ as createSelfPopGuard, re as createStepController, Ba as createSwipeController, ut as createTransition, ka as createTransitionEngine, ae as createTransitionStore, gt as cupertino, R as decoratorMap, I as detectBlinkEngine, Xa as eagerlyDecodeImages, Xt as easingToCss, ko as ensureGpuPipelinePrewarm, Xn as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, xn as enteringInitialStyle, Na as findScrollable, l as getMatchedPathPattern, u as getParams, be as governedCompiledActive, ur as holdCompositorWarm, ve as isDesktopBlink, ge as isLegacyAndroidBlink, Ao as isOpaqueColor, f as isServer, vt as layout, y as markSelfInducedPop, oe as matchesPathname, yt as material, bt as none, oo as observeBarHeight, go as observeViewportScrollHeight, Fa as overflowsAxis, Et as overlay, z as partTransitionMap, Ue as readDeferReleaseCommitFlag, Ve as readDesktopReleaseFlipFlag, qe as readImageOffloadOverride, Ge as readPrerasterFlag, Ke as readRestLayerPromotionFlag, Re as readSettleGateFlag, te as readStepParams, bn as registerTransitionDefinitions, A as releaseScopeHistorySync, St as resolveTransition, ro as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, La as sharedBarsMatch, Un as shouldOffloadImage, Pe as steadySixtyPlayerEligible, ie as subscribeStepParamsRestore, Ma as swipeSettleSeconds, Yt as targetToDecls, xt as transitionMap, H as variantHasAnimation };
|