@flemo/core 1.23.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/engine/__tests__/createTransitionEngine.steadySixty.test.d.ts +1 -0
- package/dist/core/engine/__tests__/diagnosticFlags.test.d.ts +1 -0
- package/dist/core/engine/__tests__/documentedDefaults.test.d.ts +1 -0
- package/dist/core/engine/__tests__/flightWindow.test.d.ts +1 -0
- package/dist/core/engine/__tests__/imageRevealHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/lowPowerCadence.test.d.ts +1 -0
- package/dist/core/engine/__tests__/steadySixtyCadence.test.d.ts +1 -0
- package/dist/core/engine/compositorWarmUp.d.ts +1 -0
- package/dist/core/engine/createSwipeController.d.ts +7 -4
- package/dist/core/engine/createTransitionEngine.d.ts +1 -0
- package/dist/core/engine/diagnosticFlags.d.ts +20 -0
- package/dist/core/engine/driverPolicy.d.ts +2 -13
- package/dist/core/engine/flightWindow.d.ts +5 -0
- package/dist/core/engine/imageRevealHold.d.ts +2 -0
- package/dist/core/engine/landingPixelSnap.d.ts +5 -0
- package/dist/core/engine/layerSettleHold.d.ts +1 -1
- package/dist/core/engine/lowPowerCadence.d.ts +6 -0
- package/dist/core/engine/nativeStallAnchor.d.ts +2 -1
- package/dist/core/engine/responseHold.d.ts +1 -0
- package/dist/core/engine/steadySixtyCadence.d.ts +5 -0
- package/dist/core/engine/transitionPlayer.d.ts +10 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.mjs +1822 -1285
- package/dist/screen/animStartAnchor.d.ts +1 -0
- package/dist/screen/computeBarRiding.d.ts +9 -1
- package/dist/screen/computeScreenFreeze.d.ts +1 -1
- package/dist/screen/store.d.ts +12 -1
- package/dist/transition/__tests__/resolveTransition.test.d.ts +1 -0
- package/dist/transition/compileTransitionStyles.d.ts +2 -0
- package/package.json +3 -3
- package/dist/transition/__tests__/coverageBranches.test.d.ts +0 -6
- /package/dist/core/{__tests__/taskManagerBranches.test.d.ts → engine/__tests__/createTransitionEngine.flightImageHold.test.d.ts} +0 -0
- /package/dist/{history/__tests__/historyDriverBranches.test.d.ts → core/engine/__tests__/createTransitionEngine.governedHead.test.d.ts} +0 -0
- /package/dist/{transition/__tests__/swipe.test.d.ts → core/engine/__tests__/createTransitionEngine.outerPartHold.test.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -476,7 +476,7 @@ function x(e) {
|
|
|
476
476
|
}, _ = n.subscribe((e) => {
|
|
477
477
|
if (!i && (d = m(), h(), w(e.pathname), !r())) return c(e);
|
|
478
478
|
});
|
|
479
|
-
if (e.routerKey && e.zoneEntryId &&
|
|
479
|
+
if (e.routerKey && e.zoneEntryId && E(n, e.zoneEntryId)) {
|
|
480
480
|
let n = t.history.getState().histories[t.history.getState().index]?.pathname, r = T(n);
|
|
481
481
|
for (let t of r) c({
|
|
482
482
|
state: t.raw?.[e.routerKey] ?? null,
|
|
@@ -498,18 +498,18 @@ var S = [], C = !1, w = (e) => {
|
|
|
498
498
|
if (!e) return [];
|
|
499
499
|
for (let t = S.length - 1; t >= 0; --t) if (S[t].pathname === e) return S.slice(t + 1);
|
|
500
500
|
return [];
|
|
501
|
-
},
|
|
501
|
+
}, E = (e, t) => {
|
|
502
502
|
if (typeof window > "u") return !1;
|
|
503
503
|
let n = window.history.state;
|
|
504
504
|
return n ? Object.values(n).some((e) => !!e && typeof e == "object" && e.id === t) : !1;
|
|
505
505
|
};
|
|
506
|
-
function
|
|
506
|
+
function D(e, t) {
|
|
507
507
|
for (let n = S.length - 1; n >= 0; --n) if (S[n].pathname === t) return S[n].raw?.[e] ?? null;
|
|
508
508
|
return null;
|
|
509
509
|
}
|
|
510
|
-
var
|
|
511
|
-
function
|
|
512
|
-
|
|
510
|
+
var O = /* @__PURE__ */ new WeakMap();
|
|
511
|
+
function k(e) {
|
|
512
|
+
O.has(e) || O.set(e, x({
|
|
513
513
|
stores: e,
|
|
514
514
|
driver: e.driver,
|
|
515
515
|
consume: e.consume,
|
|
@@ -518,12 +518,12 @@ function ne(e) {
|
|
|
518
518
|
ownsPathname: e.ownsPathname
|
|
519
519
|
}));
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
e.persistent || (
|
|
521
|
+
function ee(e) {
|
|
522
|
+
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
526
|
-
function
|
|
526
|
+
function A(e) {
|
|
527
527
|
let t = [{
|
|
528
528
|
state: e?.state ?? null,
|
|
529
529
|
url: e?.url ?? "/"
|
|
@@ -565,7 +565,7 @@ function re(e) {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/navigate/store.ts
|
|
568
|
-
function
|
|
568
|
+
function te() {
|
|
569
569
|
return e((e) => ({
|
|
570
570
|
status: "IDLE",
|
|
571
571
|
transitionTaskId: null,
|
|
@@ -575,11 +575,11 @@ function O() {
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region src/navigate/createNavigationController.ts
|
|
578
|
-
var
|
|
578
|
+
var j = (e, t, n) => {
|
|
579
579
|
let { regexp: r } = i(e);
|
|
580
580
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
581
581
|
return -1;
|
|
582
|
-
},
|
|
582
|
+
}, ne = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, M = async (e, t, n, r) => {
|
|
583
583
|
let i, a = new Promise((t) => {
|
|
584
584
|
i = e.subscribe(() => t(!0));
|
|
585
585
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -587,7 +587,7 @@ var ie = (e, t, n) => {
|
|
|
587
587
|
let s = await Promise.race([a, o]);
|
|
588
588
|
i(), s && r();
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function re(e) {
|
|
591
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
592
592
|
let e = r.readState();
|
|
593
593
|
if (!e?.id) return null;
|
|
@@ -613,10 +613,10 @@ function se(e) {
|
|
|
613
613
|
}
|
|
614
614
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
615
615
|
if (u?.until != null) {
|
|
616
|
-
let e =
|
|
616
|
+
let e = j(u.until, d, f);
|
|
617
617
|
return e < 0 ? 0 : e;
|
|
618
618
|
}
|
|
619
|
-
return Math.min(
|
|
619
|
+
return Math.min(ne(u?.skip, 0), Math.max(0, d));
|
|
620
620
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
621
621
|
y("PUSHING"), b(h);
|
|
622
622
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -643,7 +643,7 @@ function se(e) {
|
|
|
643
643
|
return g({
|
|
644
644
|
...C,
|
|
645
645
|
frameIndex: T + 1
|
|
646
|
-
}), await
|
|
646
|
+
}), await M(r, i, v, () => {
|
|
647
647
|
o(), r.pushState({
|
|
648
648
|
id: h,
|
|
649
649
|
index: T + 1,
|
|
@@ -664,16 +664,7 @@ function se(e) {
|
|
|
664
664
|
})).result?.();
|
|
665
665
|
}, u = async (e, l, u) => {
|
|
666
666
|
let { status: d } = t.navigate.getState();
|
|
667
|
-
if (d !== "COMPLETED" && d !== "IDLE")
|
|
668
|
-
await s.resolveAllPending();
|
|
669
|
-
for (let e = 0; e < 5; e++) {
|
|
670
|
-
let { status: e } = t.navigate.getState();
|
|
671
|
-
if (e === "COMPLETED" || e === "IDLE") break;
|
|
672
|
-
await new Promise((e) => setTimeout(e, 0));
|
|
673
|
-
}
|
|
674
|
-
let { status: e } = t.navigate.getState();
|
|
675
|
-
if (e !== "COMPLETED" && e !== "IDLE") return;
|
|
676
|
-
}
|
|
667
|
+
if (d !== "COMPLETED" && d !== "IDLE") return;
|
|
677
668
|
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f, layoutId: m = null } = u ?? {}, h = s.generateTaskId();
|
|
678
669
|
(await s.addTask(async (a) => {
|
|
679
670
|
if (t.life && !t.life.alive) {
|
|
@@ -682,10 +673,10 @@ function se(e) {
|
|
|
682
673
|
}
|
|
683
674
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
684
675
|
if (u?.until != null) {
|
|
685
|
-
let e =
|
|
676
|
+
let e = j(u.until, d, f);
|
|
686
677
|
return e < 0 ? 0 : e + 1;
|
|
687
678
|
}
|
|
688
|
-
return Math.min(
|
|
679
|
+
return Math.min(ne(u?.skip, 0) + 1, d + 1);
|
|
689
680
|
})();
|
|
690
681
|
if (y <= 0) {
|
|
691
682
|
a.abort();
|
|
@@ -713,23 +704,23 @@ function se(e) {
|
|
|
713
704
|
}), async () => {
|
|
714
705
|
_(d), b("COMPLETED");
|
|
715
706
|
};
|
|
716
|
-
let
|
|
707
|
+
let E = y <= d ? (f[d - y]?.frameIndex ?? d - y) + 1 : f[0]?.frameIndex ?? 0;
|
|
717
708
|
return v(y - 1), g({
|
|
718
709
|
...w,
|
|
719
|
-
frameIndex:
|
|
720
|
-
}), y <= d ? await
|
|
710
|
+
frameIndex: E
|
|
711
|
+
}), y <= d ? await M(r, i, y, () => {
|
|
721
712
|
o(), r.pushState({
|
|
722
713
|
id: h,
|
|
723
|
-
index:
|
|
714
|
+
index: E,
|
|
724
715
|
status: "REPLACING",
|
|
725
716
|
params: l,
|
|
726
717
|
transitionName: p,
|
|
727
718
|
layoutId: m
|
|
728
719
|
}, S);
|
|
729
|
-
}) : await
|
|
720
|
+
}) : await M(r, i, d, () => {
|
|
730
721
|
o(), r.replaceState({
|
|
731
722
|
id: h,
|
|
732
|
-
index:
|
|
723
|
+
index: E,
|
|
733
724
|
status: "REPLACING",
|
|
734
725
|
params: l,
|
|
735
726
|
transitionName: p,
|
|
@@ -782,10 +773,10 @@ function se(e) {
|
|
|
782
773
|
pop: async (e) => {
|
|
783
774
|
await d((t, n) => {
|
|
784
775
|
if (e?.until != null) {
|
|
785
|
-
let r =
|
|
776
|
+
let r = j(e.until, t, n);
|
|
786
777
|
return r < 0 ? 0 : r;
|
|
787
778
|
}
|
|
788
|
-
let r =
|
|
779
|
+
let r = ne(e?.skip, 1);
|
|
789
780
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
790
781
|
}, e?.transitionName);
|
|
791
782
|
}
|
|
@@ -793,14 +784,14 @@ function se(e) {
|
|
|
793
784
|
}
|
|
794
785
|
//#endregion
|
|
795
786
|
//#region src/navigate/createStepController.ts
|
|
796
|
-
var
|
|
787
|
+
var ie = (e) => {
|
|
797
788
|
let t = e;
|
|
798
789
|
return t?.step ? t.params ?? {} : null;
|
|
799
|
-
},
|
|
790
|
+
}, ae = (e, t) => {
|
|
800
791
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
801
792
|
return n ? `${e}?${n}` : e;
|
|
802
793
|
};
|
|
803
|
-
function
|
|
794
|
+
function oe(e) {
|
|
804
795
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
805
796
|
return {
|
|
806
797
|
pushStep: async (e) => {
|
|
@@ -858,7 +849,7 @@ function le(e) {
|
|
|
858
849
|
}
|
|
859
850
|
};
|
|
860
851
|
}
|
|
861
|
-
function
|
|
852
|
+
function se(e, t) {
|
|
862
853
|
return e.subscribe((e) => {
|
|
863
854
|
let n = e.state;
|
|
864
855
|
n?.step && s.addTask(async () => {
|
|
@@ -868,7 +859,7 @@ function ue(e, t) {
|
|
|
868
859
|
}
|
|
869
860
|
//#endregion
|
|
870
861
|
//#region src/transition/store.ts
|
|
871
|
-
function
|
|
862
|
+
function ce(t = "cupertino") {
|
|
872
863
|
return e((e) => ({
|
|
873
864
|
defaultTransitionName: t,
|
|
874
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -876,26 +867,65 @@ function de(t = "cupertino") {
|
|
|
876
867
|
}
|
|
877
868
|
//#endregion
|
|
878
869
|
//#region src/utils/matchesPathname.ts
|
|
879
|
-
function
|
|
870
|
+
function le(e, t) {
|
|
880
871
|
return i(e).regexp.test(t);
|
|
881
872
|
}
|
|
882
873
|
//#endregion
|
|
883
874
|
//#region src/screen/store.ts
|
|
884
|
-
|
|
875
|
+
var ue = (e, t) => {
|
|
876
|
+
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
|
+
...e,
|
|
878
|
+
height: t?.height
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
function de() {
|
|
885
882
|
return e((e) => ({
|
|
886
883
|
dragStatus: "IDLE",
|
|
887
884
|
replaceTransitionStatus: "IDLE",
|
|
888
885
|
sharedBars: {},
|
|
886
|
+
sharedBarMetadata: {},
|
|
889
887
|
screenSurfaces: {},
|
|
890
888
|
setDragStatus: (t) => e({ dragStatus: t }),
|
|
891
889
|
setReplaceTransitionStatus: (t) => e({ replaceTransitionStatus: t }),
|
|
892
|
-
registerSharedBars: (t, n) => e((e) =>
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
890
|
+
registerSharedBars: (t, n, r) => e((e) => {
|
|
891
|
+
let i = r ?? {
|
|
892
|
+
topBar: n.topBar ? {} : void 0,
|
|
893
|
+
bottomBar: n.bottomBar ? {} : void 0
|
|
894
|
+
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
+
topBar: ue(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: ue(i.bottomBar, o?.bottomBar)
|
|
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
|
+
return c && l ? e : {
|
|
899
|
+
sharedBars: {
|
|
900
|
+
...e.sharedBars,
|
|
901
|
+
[t]: n
|
|
902
|
+
},
|
|
903
|
+
sharedBarMetadata: {
|
|
904
|
+
...e.sharedBarMetadata,
|
|
905
|
+
[t]: s
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
}),
|
|
909
|
+
updateSharedBarHeight: (t, n, r) => e((e) => {
|
|
910
|
+
if (r <= 0) return e;
|
|
911
|
+
let i = e.sharedBarMetadata[t], a = i?.[n];
|
|
912
|
+
return !i || !a || a.height === r ? e : { sharedBarMetadata: {
|
|
913
|
+
...e.sharedBarMetadata,
|
|
914
|
+
[t]: {
|
|
915
|
+
...i,
|
|
916
|
+
[n]: {
|
|
917
|
+
...a,
|
|
918
|
+
height: r
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
} };
|
|
922
|
+
}),
|
|
896
923
|
unregisterSharedBars: (t) => e((e) => {
|
|
897
|
-
let n = { ...e.sharedBars };
|
|
898
|
-
return delete n[t],
|
|
924
|
+
let n = { ...e.sharedBars }, r = { ...e.sharedBarMetadata };
|
|
925
|
+
return delete n[t], delete r[t], {
|
|
926
|
+
sharedBars: n,
|
|
927
|
+
sharedBarMetadata: r
|
|
928
|
+
};
|
|
899
929
|
}),
|
|
900
930
|
registerScreenSurface: (t, n) => e((e) => {
|
|
901
931
|
let r = e.screenSurfaces[t];
|
|
@@ -912,21 +942,21 @@ function pe() {
|
|
|
912
942
|
}
|
|
913
943
|
//#endregion
|
|
914
944
|
//#region src/core/createRouterScope.ts
|
|
915
|
-
var
|
|
945
|
+
var fe = {
|
|
916
946
|
mark: () => {},
|
|
917
947
|
consume: () => !1
|
|
918
|
-
},
|
|
919
|
-
function
|
|
948
|
+
}, pe = /* @__PURE__ */ new Map();
|
|
949
|
+
function me(e) {
|
|
920
950
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
921
951
|
if (s) {
|
|
922
|
-
let e =
|
|
952
|
+
let e = pe.get(s);
|
|
923
953
|
if (e) {
|
|
924
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
925
955
|
let t = e.history.getState();
|
|
926
956
|
return t.setPendingIndex(t.index), e;
|
|
927
957
|
}
|
|
928
958
|
}
|
|
929
|
-
let l = d(t, n, r, i), u = (e.routerKey && !f() ?
|
|
959
|
+
let l = d(t, n, r, i), u = (e.routerKey && !f() ? D(e.routerKey, n) : null) ?? (o && !f() ? o.readState() : null), p = u?.id ? {
|
|
930
960
|
...l,
|
|
931
961
|
id: u.id,
|
|
932
962
|
params: u.params ?? l.params,
|
|
@@ -939,7 +969,7 @@ function ge(e) {
|
|
|
939
969
|
index: 0,
|
|
940
970
|
histories: [p]
|
|
941
971
|
}), e.hostedScope;
|
|
942
|
-
let m = a ?
|
|
972
|
+
let m = a ? A({
|
|
943
973
|
state: {
|
|
944
974
|
id: p.id,
|
|
945
975
|
index: 0,
|
|
@@ -949,25 +979,25 @@ function ge(e) {
|
|
|
949
979
|
layoutId: p.layoutId
|
|
950
980
|
},
|
|
951
981
|
url: p.pathname
|
|
952
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? fe : _(), g = {
|
|
953
983
|
history: c([p], 0),
|
|
954
|
-
navigate:
|
|
955
|
-
transition:
|
|
956
|
-
screen:
|
|
984
|
+
navigate: te(),
|
|
985
|
+
transition: ce(i),
|
|
986
|
+
screen: de(),
|
|
957
987
|
driver: m,
|
|
958
988
|
markSelfInduced: h.mark,
|
|
959
989
|
consume: h.consume,
|
|
960
990
|
routerKey: e.routerKey,
|
|
961
991
|
zoneEntryId: e.zoneEntryId,
|
|
962
|
-
ownsPathname: (e) =>
|
|
992
|
+
ownsPathname: (e) => le(t, e),
|
|
963
993
|
persistent: !!s,
|
|
964
994
|
life: { alive: !0 }
|
|
965
995
|
};
|
|
966
|
-
return s &&
|
|
996
|
+
return s && pe.set(s, g), g;
|
|
967
997
|
}
|
|
968
998
|
//#endregion
|
|
969
999
|
//#region src/screen/createScreenSelector.ts
|
|
970
|
-
function
|
|
1000
|
+
function he(e, t) {
|
|
971
1001
|
return e.map((n, r) => ({
|
|
972
1002
|
...n,
|
|
973
1003
|
isActive: r === t,
|
|
@@ -978,32 +1008,164 @@ function A(e, t) {
|
|
|
978
1008
|
prevTransitionName: e[t - 1]?.transitionName
|
|
979
1009
|
}));
|
|
980
1010
|
}
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
+
var ge = "flemo:motion-driver-force", _e = !1, ve = () => {
|
|
1014
|
+
try {
|
|
1015
|
+
try {
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(ge);
|
|
1017
|
+
} catch {}
|
|
1018
|
+
if (typeof sessionStorage > "u") return null;
|
|
1019
|
+
let e = sessionStorage.getItem(ge);
|
|
1020
|
+
if (e === null) return null;
|
|
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 ? (!_e && typeof console < "u" && (_e = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${ge}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(ge), null);
|
|
1023
|
+
} catch {
|
|
1024
|
+
return null;
|
|
1025
|
+
}
|
|
1026
|
+
}, N = () => {
|
|
1027
|
+
if (typeof navigator > "u") return !1;
|
|
1028
|
+
let e = navigator.userAgentData?.brands;
|
|
1029
|
+
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
|
+
let t = navigator.userAgent ?? "";
|
|
1031
|
+
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
+
}, ye = () => {
|
|
1033
|
+
if (typeof navigator > "u") return !1;
|
|
1034
|
+
let e = navigator.userAgentData?.brands;
|
|
1035
|
+
if (Array.isArray(e)) return !1;
|
|
1036
|
+
let t = navigator.userAgent ?? "";
|
|
1037
|
+
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t) && (navigator.maxTouchPoints ?? 0) > 0;
|
|
1038
|
+
}, be = ((e = !1) => ({
|
|
1039
|
+
playerAllowed: () => {
|
|
1040
|
+
let t = ve();
|
|
1041
|
+
return t ? t === "raf" : e;
|
|
1042
|
+
},
|
|
1043
|
+
pinnedDriver: ve
|
|
1044
|
+
}))(!0), xe = 28, Se = 42, Ce = 8, we = 20, Te = 6, Ee = 400, De = 8, Oe = "flemo:lpm", ke = () => !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && typeof requestAnimationFrame == "function", Ae = () => {
|
|
1045
|
+
try {
|
|
1046
|
+
return typeof sessionStorage < "u" && sessionStorage.getItem(Oe) === "1";
|
|
1047
|
+
} catch {
|
|
1048
|
+
return !1;
|
|
1049
|
+
}
|
|
1050
|
+
}, je = (e) => {
|
|
1051
|
+
try {
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Oe, e ? "1" : "0");
|
|
1053
|
+
} catch {}
|
|
1054
|
+
}, Me = !1, Ne = !1, Pe = !1, Fe = 12, Ie = 8, P = [], Le = null, F = !1, Re = !1, ze = !1, Be = () => {
|
|
1055
|
+
if (F || !ke()) return;
|
|
1056
|
+
F = !0;
|
|
1057
|
+
let e = (t) => {
|
|
1058
|
+
if (Le !== null && (P.push(t - Le), P.length > Fe && P.shift(), P.length >= Ie)) {
|
|
1059
|
+
let e = [...P].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
+
t[t.length - 1] - t[0] <= Ce && (Re = n >= xe && n <= Se, ze = !0);
|
|
1061
|
+
}
|
|
1062
|
+
Le = t, requestAnimationFrame(e);
|
|
1063
|
+
};
|
|
1064
|
+
requestAnimationFrame(e);
|
|
1065
|
+
}, Ve = () => Me || ze && Re, He = () => ke(), Ue = (e = 0) => {
|
|
1066
|
+
if (Ne || !ke()) return;
|
|
1067
|
+
Ne = !0;
|
|
1068
|
+
let t = [], n = null, r = (i) => {
|
|
1069
|
+
if (n !== null && t.push(i - n), n = i, t.length < Te) {
|
|
1070
|
+
requestAnimationFrame(r);
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
Ne = !1;
|
|
1074
|
+
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= xe && o[o.length - 1] <= Se && o[o.length - 1] - o[0] <= Ce, c = o[o.length - 1] <= we;
|
|
1075
|
+
if (s || c) {
|
|
1076
|
+
Me = s, s && o[Math.floor(o.length / 2)], je(Me);
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
+
e + 1 < De && typeof setTimeout == "function" && setTimeout(() => Ue(e + 1), Ee);
|
|
1081
|
+
};
|
|
1082
|
+
requestAnimationFrame(r);
|
|
1083
|
+
}, We = () => {
|
|
1084
|
+
Be(), Ue(), !(Pe || typeof document > "u" || typeof document.addEventListener != "function") && (Pe = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
|
+
document.visibilityState === "visible" && Ue();
|
|
1086
|
+
}));
|
|
1087
|
+
};
|
|
1088
|
+
ke() && (Me = Ae(), 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;
|
|
1092
|
+
} catch {
|
|
1093
|
+
return null;
|
|
1094
|
+
}
|
|
1095
|
+
}, Ze = (e) => {
|
|
1096
|
+
try {
|
|
1097
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Ye, e);
|
|
1098
|
+
} catch {}
|
|
1099
|
+
}, Qe = Xe(), $e = Qe === "high", et = Qe !== null && Qe !== "high" ? Math.min(qe, Math.max(0, parseInt(Qe, 10) || 0)) : 0, tt = (e, t) => {
|
|
1100
|
+
if (!(!Number.isFinite(e) || e <= 0)) {
|
|
1101
|
+
if (e < 12) {
|
|
1102
|
+
if (t !== void 0 && t > 24) return;
|
|
1103
|
+
$e = !0, et = 0, Ze("high");
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
if (e >= Ge && e <= Ke) {
|
|
1107
|
+
et = Math.min(qe, et + 1), $e || Ze(String(et));
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
e < Ge && (et = 0, $e || Ze("0"));
|
|
1111
|
+
}
|
|
1112
|
+
}, nt = () => !$e && et >= qe, rt = () => nt() && N() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Je, I = (e) => {
|
|
1113
|
+
try {
|
|
1114
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
|
+
} catch {
|
|
1116
|
+
return null;
|
|
1117
|
+
}
|
|
1118
|
+
}, it = () => I("flemo:landing-snap") === "on", at = () => {
|
|
1119
|
+
let e = I("flemo:imghold");
|
|
1120
|
+
return e === "on" || e === "off" ? e : null;
|
|
1121
|
+
}, ot = () => N() && (navigator.maxTouchPoints ?? 0) > 0, st = () => {
|
|
1122
|
+
try {
|
|
1123
|
+
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : He() || rt() || ot();
|
|
1125
|
+
} catch {
|
|
1126
|
+
return !1;
|
|
1127
|
+
}
|
|
1128
|
+
}, ct = () => I("flemo:handoff") === "on", lt = () => I("flemo:arrivalhold") !== "off", ut = () => I("flemo:preraster") === "on", dt = () => ut() || rt(), ft = () => {
|
|
1129
|
+
let e = I("flemo:imgoffload");
|
|
1130
|
+
return e === "on" || e === "off" ? e : null;
|
|
1131
|
+
}, pt, mt = () => {
|
|
1132
|
+
if (pt !== void 0) return pt;
|
|
1133
|
+
let e = I("flemo:apply");
|
|
1134
|
+
return pt = e === "scrub" ? e : null, pt;
|
|
1135
|
+
}, ht, gt = () => {
|
|
1136
|
+
if (ht !== void 0) return ht;
|
|
1137
|
+
let e = I("flemo:handoff");
|
|
1138
|
+
return ht = e === "on" ? e : null, ht;
|
|
1139
|
+
}, _t, vt = () => {
|
|
1140
|
+
if (_t !== void 0) return _t;
|
|
1141
|
+
let e = I("flemo:snap");
|
|
1142
|
+
return _t = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, _t;
|
|
1143
|
+
}, yt, bt = () => {
|
|
1144
|
+
if (yt !== void 0) return yt;
|
|
1145
|
+
let e = I("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1146
|
+
return yt = Number.isFinite(t) && t > 0 ? t : 4, yt;
|
|
1147
|
+
}, xt, St = () => {
|
|
1148
|
+
if (xt !== void 0) return xt;
|
|
1149
|
+
let e = I("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1150
|
+
return xt = Number.isFinite(t) && t >= 0 ? t : 100, xt;
|
|
1151
|
+
}, Ct, wt = () => (Ct === void 0 && (Ct = I("flemo:layers") === "resident"), Ct), Tt, Et = () => (Tt === void 0 && (Tt = I("flemo:freeze") === "shallow"), Tt);
|
|
981
1152
|
(() => {
|
|
982
1153
|
try {
|
|
983
1154
|
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
984
1155
|
/[?&]flemo-freeze=shallow\b/.test(location.search) ? sessionStorage.setItem("flemo:freeze", "shallow") : /[?&]flemo-freeze=off\b/.test(location.search) && sessionStorage.removeItem("flemo:freeze");
|
|
985
1156
|
} catch {}
|
|
986
1157
|
})();
|
|
987
|
-
|
|
988
|
-
if (j !== void 0) return j;
|
|
989
|
-
try {
|
|
990
|
-
j = typeof sessionStorage < "u" && sessionStorage.getItem("flemo:freeze") === "shallow";
|
|
991
|
-
} catch {
|
|
992
|
-
j = !1;
|
|
993
|
-
}
|
|
994
|
-
return j;
|
|
995
|
-
};
|
|
996
|
-
function ve(e) {
|
|
1158
|
+
function Dt(e) {
|
|
997
1159
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
998
1160
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
999
|
-
return !e.isActive && t ?
|
|
1161
|
+
return !e.isActive && t ? Et() ? "live" : "deferred" : "live";
|
|
1000
1162
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1163
|
+
function Ot(e) {
|
|
1164
|
+
return Dt(e) !== "live";
|
|
1003
1165
|
}
|
|
1004
1166
|
//#endregion
|
|
1005
1167
|
//#region src/transition/createTransition.ts
|
|
1006
|
-
function
|
|
1168
|
+
function kt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1007
1169
|
return {
|
|
1008
1170
|
name: e,
|
|
1009
1171
|
initial: t,
|
|
@@ -1024,7 +1186,7 @@ function be({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1024
1186
|
}
|
|
1025
1187
|
//#endregion
|
|
1026
1188
|
//#region src/transition/createRawTransition.ts
|
|
1027
|
-
function
|
|
1189
|
+
function At({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1028
1190
|
return {
|
|
1029
1191
|
name: e,
|
|
1030
1192
|
initial: t,
|
|
@@ -1045,15 +1207,15 @@ function xe({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1045
1207
|
}
|
|
1046
1208
|
//#endregion
|
|
1047
1209
|
//#region src/transition/cupertino.ts
|
|
1048
|
-
var
|
|
1210
|
+
var jt = (e, t, n) => {
|
|
1049
1211
|
let [r, i] = t, [a, o] = n;
|
|
1050
1212
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1051
|
-
},
|
|
1213
|
+
}, Mt = 30, Nt = .7, Pt = [
|
|
1052
1214
|
.32,
|
|
1053
1215
|
.72,
|
|
1054
1216
|
0,
|
|
1055
1217
|
1
|
|
1056
|
-
],
|
|
1218
|
+
], Ft = kt({
|
|
1057
1219
|
name: "cupertino",
|
|
1058
1220
|
initial: { x: "100%" },
|
|
1059
1221
|
idle: {
|
|
@@ -1063,29 +1225,29 @@ var Se = (e, t, n) => {
|
|
|
1063
1225
|
enter: {
|
|
1064
1226
|
value: { x: 0 },
|
|
1065
1227
|
options: {
|
|
1066
|
-
duration:
|
|
1067
|
-
ease:
|
|
1228
|
+
duration: Nt,
|
|
1229
|
+
ease: Pt
|
|
1068
1230
|
}
|
|
1069
1231
|
},
|
|
1070
1232
|
enterBack: {
|
|
1071
1233
|
value: { x: "100%" },
|
|
1072
1234
|
options: {
|
|
1073
|
-
duration:
|
|
1074
|
-
ease:
|
|
1235
|
+
duration: Nt,
|
|
1236
|
+
ease: Pt
|
|
1075
1237
|
}
|
|
1076
1238
|
},
|
|
1077
1239
|
exit: {
|
|
1078
|
-
value: { x: `-${
|
|
1240
|
+
value: { x: `-${Mt}%` },
|
|
1079
1241
|
options: {
|
|
1080
|
-
duration:
|
|
1081
|
-
ease:
|
|
1242
|
+
duration: Nt,
|
|
1243
|
+
ease: Pt
|
|
1082
1244
|
}
|
|
1083
1245
|
},
|
|
1084
1246
|
exitBack: {
|
|
1085
1247
|
value: { x: 0 },
|
|
1086
1248
|
options: {
|
|
1087
|
-
duration:
|
|
1088
|
-
ease:
|
|
1249
|
+
duration: Nt,
|
|
1250
|
+
ease: Pt
|
|
1089
1251
|
}
|
|
1090
1252
|
},
|
|
1091
1253
|
options: {
|
|
@@ -1093,24 +1255,24 @@ var Se = (e, t, n) => {
|
|
|
1093
1255
|
swipeDirection: "x",
|
|
1094
1256
|
onSwipeStart: async () => !0,
|
|
1095
1257
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1096
|
-
let { offset: o } = t, s = o.x, c =
|
|
1097
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1258
|
+
let { offset: o } = t, s = o.x, c = jt(s, [0, window.innerWidth], [0, 100]);
|
|
1259
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + Mt / 100 * c}%` }, { duration: 0 }), c;
|
|
1098
1260
|
},
|
|
1099
1261
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1100
1262
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1101
1263
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1102
1264
|
duration: .3,
|
|
1103
|
-
ease:
|
|
1104
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1265
|
+
ease: Pt
|
|
1266
|
+
}), n(i, { x: c ? 0 : `-${Mt}%` }, {
|
|
1105
1267
|
duration: .3,
|
|
1106
|
-
ease:
|
|
1268
|
+
ease: Pt
|
|
1107
1269
|
})]), c;
|
|
1108
1270
|
}
|
|
1109
1271
|
}
|
|
1110
|
-
}),
|
|
1272
|
+
}), It = (e, t, n) => {
|
|
1111
1273
|
let [r, i] = t, [a, o] = n;
|
|
1112
1274
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1113
|
-
},
|
|
1275
|
+
}, Lt = kt({
|
|
1114
1276
|
name: "layout",
|
|
1115
1277
|
initial: { opacity: .97 },
|
|
1116
1278
|
idle: {
|
|
@@ -1138,7 +1300,7 @@ var Se = (e, t, n) => {
|
|
|
1138
1300
|
swipeDirection: "y",
|
|
1139
1301
|
onSwipeStart: async () => !0,
|
|
1140
1302
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1141
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1303
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = It(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
1142
1304
|
return i?.(!0, 100), n(r, {
|
|
1143
1305
|
y: f,
|
|
1144
1306
|
opacity: c
|
|
@@ -1155,7 +1317,7 @@ var Se = (e, t, n) => {
|
|
|
1155
1317
|
}, { duration: .3 })]), c;
|
|
1156
1318
|
}
|
|
1157
1319
|
}
|
|
1158
|
-
}),
|
|
1320
|
+
}), Rt = kt({
|
|
1159
1321
|
name: "material",
|
|
1160
1322
|
initial: { y: "100%" },
|
|
1161
1323
|
idle: {
|
|
@@ -1263,7 +1425,7 @@ var Se = (e, t, n) => {
|
|
|
1263
1425
|
})]), c;
|
|
1264
1426
|
}
|
|
1265
1427
|
}
|
|
1266
|
-
}),
|
|
1428
|
+
}), zt = kt({
|
|
1267
1429
|
name: "none",
|
|
1268
1430
|
initial: {},
|
|
1269
1431
|
idle: {
|
|
@@ -1286,20 +1448,20 @@ var Se = (e, t, n) => {
|
|
|
1286
1448
|
value: {},
|
|
1287
1449
|
options: { duration: 0 }
|
|
1288
1450
|
}
|
|
1289
|
-
}),
|
|
1290
|
-
["none",
|
|
1291
|
-
["cupertino",
|
|
1292
|
-
["material",
|
|
1293
|
-
["layout",
|
|
1451
|
+
}), Bt = /* @__PURE__ */ new Map([
|
|
1452
|
+
["none", zt],
|
|
1453
|
+
["cupertino", Ft],
|
|
1454
|
+
["material", Rt],
|
|
1455
|
+
["layout", Lt]
|
|
1294
1456
|
]);
|
|
1295
1457
|
//#endregion
|
|
1296
1458
|
//#region src/transition/resolveTransition.ts
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1459
|
+
function L(e) {
|
|
1460
|
+
return Bt.get(e) ?? Bt.get("none");
|
|
1299
1461
|
}
|
|
1300
1462
|
//#endregion
|
|
1301
1463
|
//#region src/transition/decorator/createDecorator.ts
|
|
1302
|
-
function
|
|
1464
|
+
function Vt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1303
1465
|
return {
|
|
1304
1466
|
name: e,
|
|
1305
1467
|
initial: t,
|
|
@@ -1320,7 +1482,7 @@ function Oe({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1320
1482
|
}
|
|
1321
1483
|
//#endregion
|
|
1322
1484
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1323
|
-
function
|
|
1485
|
+
function Ht({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1324
1486
|
return {
|
|
1325
1487
|
name: e,
|
|
1326
1488
|
initial: t,
|
|
@@ -1341,30 +1503,30 @@ function ke({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1341
1503
|
}
|
|
1342
1504
|
//#endregion
|
|
1343
1505
|
//#region src/transition/decorator/overlay.ts
|
|
1344
|
-
var
|
|
1506
|
+
var Ut = "rgba(0, 0, 0, 0.1)", Wt = Vt({
|
|
1345
1507
|
name: "overlay",
|
|
1346
1508
|
initial: {
|
|
1347
1509
|
opacity: 0,
|
|
1348
|
-
backgroundColor:
|
|
1510
|
+
backgroundColor: Ut
|
|
1349
1511
|
},
|
|
1350
1512
|
idle: {
|
|
1351
1513
|
value: {
|
|
1352
1514
|
opacity: 0,
|
|
1353
|
-
backgroundColor:
|
|
1515
|
+
backgroundColor: Ut
|
|
1354
1516
|
},
|
|
1355
1517
|
options: { duration: 0 }
|
|
1356
1518
|
},
|
|
1357
1519
|
enter: {
|
|
1358
1520
|
value: {
|
|
1359
1521
|
opacity: 1,
|
|
1360
|
-
backgroundColor:
|
|
1522
|
+
backgroundColor: Ut
|
|
1361
1523
|
},
|
|
1362
1524
|
options: { duration: .7 }
|
|
1363
1525
|
},
|
|
1364
1526
|
exit: {
|
|
1365
1527
|
value: {
|
|
1366
1528
|
opacity: 0,
|
|
1367
|
-
backgroundColor:
|
|
1529
|
+
backgroundColor: Ut
|
|
1368
1530
|
},
|
|
1369
1531
|
options: { duration: .7 }
|
|
1370
1532
|
},
|
|
@@ -1373,10 +1535,10 @@ var L = "rgba(0, 0, 0, 0.1)", Ae = Oe({
|
|
|
1373
1535
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1374
1536
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1375
1537
|
}
|
|
1376
|
-
}), R = /* @__PURE__ */ new Map([["overlay",
|
|
1538
|
+
}), R = /* @__PURE__ */ new Map([["overlay", Wt]]);
|
|
1377
1539
|
//#endregion
|
|
1378
1540
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1379
|
-
function
|
|
1541
|
+
function Gt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1380
1542
|
return {
|
|
1381
1543
|
name: e,
|
|
1382
1544
|
initial: t,
|
|
@@ -1397,7 +1559,7 @@ function je({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1397
1559
|
}
|
|
1398
1560
|
//#endregion
|
|
1399
1561
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1400
|
-
function
|
|
1562
|
+
function Kt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1401
1563
|
return {
|
|
1402
1564
|
name: e,
|
|
1403
1565
|
initial: t,
|
|
@@ -1418,7 +1580,7 @@ function Me({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1418
1580
|
}
|
|
1419
1581
|
//#endregion
|
|
1420
1582
|
//#region src/transition/partTransition/partTransition.ts
|
|
1421
|
-
var z = /* @__PURE__ */ new Map(),
|
|
1583
|
+
var z = /* @__PURE__ */ new Map(), qt = {
|
|
1422
1584
|
"IDLE-true": "self",
|
|
1423
1585
|
"IDLE-false": "self",
|
|
1424
1586
|
"PUSHING-true": "initial",
|
|
@@ -1429,17 +1591,17 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1429
1591
|
"POPPING-false": "PUSHING-false",
|
|
1430
1592
|
"COMPLETED-true": "self",
|
|
1431
1593
|
"COMPLETED-false": "self"
|
|
1432
|
-
},
|
|
1594
|
+
}, Jt = Object.keys(qt), Yt = (e) => {
|
|
1433
1595
|
if (!e) return 0;
|
|
1434
1596
|
let t = e.duration;
|
|
1435
1597
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1436
|
-
},
|
|
1437
|
-
let n =
|
|
1598
|
+
}, Xt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Zt = (e, t) => {
|
|
1599
|
+
let n = qt[t];
|
|
1438
1600
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1439
1601
|
}, B = (e, t) => {
|
|
1440
|
-
let n =
|
|
1602
|
+
let n = Zt(e, t);
|
|
1441
1603
|
if (n === null) return null;
|
|
1442
|
-
let r = e.variants[t], i =
|
|
1604
|
+
let r = e.variants[t], i = Yt(r.options), a = Xt(r.options);
|
|
1443
1605
|
return i <= 0 && a <= 0 ? null : {
|
|
1444
1606
|
from: n,
|
|
1445
1607
|
to: r.value,
|
|
@@ -1447,7 +1609,7 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1447
1609
|
delay: a,
|
|
1448
1610
|
ease: r.options?.ease
|
|
1449
1611
|
};
|
|
1450
|
-
},
|
|
1612
|
+
}, Qt = Jt, $t = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), en = (e) => typeof e == "object" && !!e && !Array.isArray(e), tn = /* @__PURE__ */ new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), nn = (e, t) => t.startsWith("--") || tn.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, rn = (e, t) => typeof t == "number" ? nn(t, e) : typeof t == "string" ? t : "", an = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), on = /* @__PURE__ */ new Set([
|
|
1451
1613
|
"x",
|
|
1452
1614
|
"y",
|
|
1453
1615
|
"z",
|
|
@@ -1458,7 +1620,7 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1458
1620
|
"rotateX",
|
|
1459
1621
|
"rotateY",
|
|
1460
1622
|
"rotateZ"
|
|
1461
|
-
]),
|
|
1623
|
+
]), sn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, cn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, ln = /^1(\.0+)?$/, un = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && ln.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && cn.test(t.trim()) : t === 0 || typeof t == "string" && sn.test(t.trim()), dn = (e, t) => {
|
|
1462
1624
|
switch (e) {
|
|
1463
1625
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1464
1626
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1472,16 +1634,16 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1472
1634
|
case "rotateY": return `rotateY(${t})`;
|
|
1473
1635
|
default: return "";
|
|
1474
1636
|
}
|
|
1475
|
-
},
|
|
1637
|
+
}, fn = (e) => {
|
|
1476
1638
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1477
|
-
if (!
|
|
1639
|
+
if (!en(e)) return;
|
|
1478
1640
|
let n = [];
|
|
1479
1641
|
for (let r of Object.keys(e)) {
|
|
1480
|
-
let i = e[r], a =
|
|
1481
|
-
if (a !== "") if (
|
|
1642
|
+
let i = e[r], a = rn(r, i);
|
|
1643
|
+
if (a !== "") if (on.has(r)) n.push(`${r}:${a}`);
|
|
1482
1644
|
else {
|
|
1483
|
-
let e = t.get(
|
|
1484
|
-
e.add(a), t.set(
|
|
1645
|
+
let e = t.get(an(r)) ?? /* @__PURE__ */ new Set();
|
|
1646
|
+
e.add(a), t.set(an(r), e);
|
|
1485
1647
|
}
|
|
1486
1648
|
}
|
|
1487
1649
|
r.add(n.sort().join("|"));
|
|
@@ -1491,13 +1653,13 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1491
1653
|
n = r.size > 1;
|
|
1492
1654
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1493
1655
|
return n && a.push("transform"), a;
|
|
1494
|
-
},
|
|
1495
|
-
if (!
|
|
1656
|
+
}, pn = (e) => {
|
|
1657
|
+
if (!en(e)) return [];
|
|
1496
1658
|
let t = [], n = !0, r = [];
|
|
1497
1659
|
for (let i of Object.keys(e)) {
|
|
1498
|
-
let a = e[i], o =
|
|
1499
|
-
o !== "" && (
|
|
1500
|
-
property:
|
|
1660
|
+
let a = e[i], o = rn(i, a);
|
|
1661
|
+
o !== "" && (on.has(i) ? (t.push(dn(i, o)), un(i, a) || (n = !1)) : r.push({
|
|
1662
|
+
property: an(i),
|
|
1501
1663
|
value: o
|
|
1502
1664
|
}));
|
|
1503
1665
|
}
|
|
@@ -1505,7 +1667,7 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1505
1667
|
property: "transform",
|
|
1506
1668
|
value: n ? "none" : t.join(" ")
|
|
1507
1669
|
}), r;
|
|
1508
|
-
},
|
|
1670
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), mn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1509
1671
|
linear: "linear",
|
|
1510
1672
|
easeIn: "ease-in",
|
|
1511
1673
|
easeOut: "ease-out",
|
|
@@ -1515,29 +1677,29 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1515
1677
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1516
1678
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1517
1679
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1518
|
-
}[e] ?? "ease" : "ease",
|
|
1680
|
+
}[e] ?? "ease" : "ease", hn = (e, t) => {
|
|
1519
1681
|
let [n, r] = t.split("-");
|
|
1520
1682
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1521
|
-
},
|
|
1683
|
+
}, gn = (e, t) => {
|
|
1522
1684
|
let [n, r] = t.split("-");
|
|
1523
1685
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1524
|
-
},
|
|
1686
|
+
}, _n = (e, t) => {
|
|
1525
1687
|
let [n, r] = t.split("-");
|
|
1526
1688
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1527
|
-
},
|
|
1689
|
+
}, vn = (e, t) => {
|
|
1528
1690
|
let [n, r] = t.split("-");
|
|
1529
1691
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1530
|
-
},
|
|
1531
|
-
let o =
|
|
1692
|
+
}, yn = (e, t, n) => `flemo-${e}-${$t(t)}-${n}`, bn = (e, t, n, r, i, a) => {
|
|
1693
|
+
let o = pn(r), s = pn(i.value), c = Yt(i.options), l = Xt(i.options), u = mn(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${_n(t, n)}` : d;
|
|
1532
1694
|
if (s.length === 0 && o.length === 0) return "";
|
|
1533
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1534
|
-
let p =
|
|
1695
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${V(s)}\n animation: none;\n}`;
|
|
1696
|
+
let p = yn(e, t, n), m = [
|
|
1535
1697
|
`@keyframes ${p} {`,
|
|
1536
1698
|
" from {",
|
|
1537
|
-
|
|
1699
|
+
V(o).replace(/^/gm, " "),
|
|
1538
1700
|
" }",
|
|
1539
1701
|
" to {",
|
|
1540
|
-
|
|
1702
|
+
V(s).replace(/^/gm, " "),
|
|
1541
1703
|
" }",
|
|
1542
1704
|
"}"
|
|
1543
1705
|
].join("\n"), h = [
|
|
@@ -1546,107 +1708,123 @@ var z = /* @__PURE__ */ new Map(), Ne = {
|
|
|
1546
1708
|
u,
|
|
1547
1709
|
l > 0 ? `${l}s` : null,
|
|
1548
1710
|
"both"
|
|
1549
|
-
].filter(Boolean).join(" "), g =
|
|
1550
|
-
|
|
1551
|
-
|
|
1711
|
+
].filter(Boolean).join(" "), g = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, _ = (() => {
|
|
1712
|
+
if (e === "part") return "";
|
|
1713
|
+
let t = g(n);
|
|
1714
|
+
if (t <= 0 || c <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1715
|
+
let r = c + t, i = (t / r * 100).toFixed(3), a = `${p}-lpm`, u = f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n");
|
|
1716
|
+
return `\n@keyframes ${a} {\n 0%, ${i}% {\n${V(o).replace(/^/gm, " ")}\n }\n 100% {\n${V(s).replace(/^/gm, " ")}\n }\n}\n${u} {\n animation-name: ${a};\n animation-duration: ${r.toFixed(3)}s;\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1717
|
+
})(), v = (() => {
|
|
1718
|
+
if (e !== "part") return "";
|
|
1719
|
+
let t = g(n);
|
|
1720
|
+
return t <= 0 || c <= 0 ? "" : `\n${f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n")} {\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1721
|
+
})(), y = new Map(o.map((e) => [e.property, e.value])), b = new Map(s.map((e) => [e.property, e.value])), x = Array.from(/* @__PURE__ */ new Set([...y.keys(), ...b.keys()])).filter((e) => y.get(e) !== b.get(e)), S = x.length > 0 ? ` will-change: ${x.join(", ")};\n` : "", C = n.split("-")[0];
|
|
1722
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${S}${C === "PUSHING" || C === "REPLACING" ? " contain: layout;\n" : ""}}`}${_}${v}${e === "screen" && n.endsWith("-false") && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && xn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1723
|
+
}, xn = (e) => {
|
|
1552
1724
|
if (!e) return !1;
|
|
1553
1725
|
if (e.opacity === 0) return !0;
|
|
1554
1726
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1555
1727
|
return t(e.x) || t(e.y);
|
|
1556
|
-
},
|
|
1557
|
-
let i =
|
|
1558
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1559
|
-
},
|
|
1728
|
+
}, Sn = (e, t, n, r) => {
|
|
1729
|
+
let i = pn(r.value);
|
|
1730
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1731
|
+
}, Cn = (e, t, n = []) => {
|
|
1560
1732
|
let r = [];
|
|
1561
1733
|
for (let t of e) {
|
|
1562
1734
|
let e = t.name;
|
|
1563
|
-
for (let n of
|
|
1564
|
-
let i = t.variants[n], a =
|
|
1735
|
+
for (let n of Jt) {
|
|
1736
|
+
let i = t.variants[n], a = qt[n];
|
|
1565
1737
|
if (a === "self") {
|
|
1566
|
-
r.push(
|
|
1738
|
+
r.push(Sn(hn, e, n, i));
|
|
1567
1739
|
continue;
|
|
1568
1740
|
}
|
|
1569
1741
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1570
|
-
r.push(
|
|
1742
|
+
r.push(bn("screen", e, n, o, i, hn));
|
|
1571
1743
|
}
|
|
1572
1744
|
}
|
|
1573
1745
|
for (let e of t) {
|
|
1574
1746
|
let t = e.name;
|
|
1575
|
-
for (let n of
|
|
1576
|
-
let i = e.variants[n], a =
|
|
1747
|
+
for (let n of Qt) {
|
|
1748
|
+
let i = e.variants[n], a = qt[n];
|
|
1577
1749
|
if (a === "self") {
|
|
1578
|
-
r.push(
|
|
1750
|
+
r.push(Sn(gn, t, n, i));
|
|
1579
1751
|
continue;
|
|
1580
1752
|
}
|
|
1581
1753
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1582
|
-
r.push(
|
|
1754
|
+
r.push(bn("decorator", t, n, o, i, gn));
|
|
1583
1755
|
}
|
|
1584
1756
|
}
|
|
1585
1757
|
for (let e of n) {
|
|
1586
1758
|
let t = e.name;
|
|
1587
|
-
for (let n of
|
|
1588
|
-
let i = e.variants[n], a =
|
|
1759
|
+
for (let n of Qt) {
|
|
1760
|
+
let i = e.variants[n], a = qt[n];
|
|
1589
1761
|
if (a === "self") {
|
|
1590
|
-
r.push(
|
|
1762
|
+
r.push(Sn(vn, t, n, i));
|
|
1591
1763
|
continue;
|
|
1592
1764
|
}
|
|
1593
1765
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1594
|
-
r.push(
|
|
1766
|
+
r.push(bn("part", t, n, o, i, vn));
|
|
1595
1767
|
}
|
|
1596
1768
|
}
|
|
1597
1769
|
return [
|
|
1598
1770
|
...r.filter((e) => e.length > 0),
|
|
1599
|
-
|
|
1600
|
-
|
|
1771
|
+
wn,
|
|
1772
|
+
Tn
|
|
1601
1773
|
].join("\n\n");
|
|
1602
|
-
},
|
|
1774
|
+
}, wn = [
|
|
1603
1775
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1604
1776
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1605
1777
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
1778
|
+
"[data-flemo-anim-hold=\"park-over\"],",
|
|
1606
1779
|
"[data-flemo-anim-hold=\"true\"] [data-flemo-part-name],",
|
|
1607
1780
|
"[data-flemo-anim-hold=\"park\"] [data-flemo-part-name],",
|
|
1608
|
-
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name]
|
|
1781
|
+
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name],",
|
|
1782
|
+
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1609
1783
|
" animation-play-state: paused !important;",
|
|
1610
1784
|
"}"
|
|
1611
|
-
].join("\n"),
|
|
1785
|
+
].join("\n"), Tn = [
|
|
1612
1786
|
"[data-flemo-held-arrival] {",
|
|
1613
1787
|
" display: none !important;",
|
|
1614
1788
|
"}"
|
|
1615
1789
|
].join("\n"), H = (e, t) => {
|
|
1616
|
-
let n =
|
|
1790
|
+
let n = qt[t];
|
|
1617
1791
|
if (n === "self") return !1;
|
|
1618
|
-
let r = e.variants[t], i =
|
|
1792
|
+
let r = e.variants[t], i = Yt(r.options), a = Xt(r.options);
|
|
1619
1793
|
if (i <= 0 && a <= 0) return !1;
|
|
1620
|
-
let o =
|
|
1794
|
+
let o = pn(n === "initial" ? e.initial : e.variants[n].value), s = pn(r.value);
|
|
1621
1795
|
return o.length > 0 || s.length > 0;
|
|
1622
|
-
},
|
|
1623
|
-
|
|
1796
|
+
}, En = {
|
|
1797
|
+
REPLACING: 180,
|
|
1798
|
+
PUSHING: 100,
|
|
1799
|
+
POPPING: 80
|
|
1800
|
+
}, Dn = "data-flemo";
|
|
1801
|
+
function On() {
|
|
1624
1802
|
if (f()) return;
|
|
1625
|
-
let e =
|
|
1626
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1803
|
+
let e = Cn(Bt.values(), R.values(), z.values()), t = document.head.querySelector(`style[${Dn}]`);
|
|
1804
|
+
t || (t = document.createElement("style"), t.setAttribute(Dn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1627
1805
|
}
|
|
1628
1806
|
//#endregion
|
|
1629
1807
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1630
|
-
var
|
|
1808
|
+
var kn = /* @__PURE__ */ new Map(), An = /* @__PURE__ */ new Map(), jn = /* @__PURE__ */ new Map(), Mn = (e, t) => {
|
|
1631
1809
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1632
|
-
},
|
|
1810
|
+
}, Nn = (e, t) => {
|
|
1633
1811
|
let n = (e.get(t) ?? 1) - 1;
|
|
1634
1812
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1635
1813
|
};
|
|
1636
|
-
function
|
|
1637
|
-
for (let t of e)
|
|
1638
|
-
for (let e of t) R.set(e.name, e),
|
|
1639
|
-
for (let e of n) z.set(e.name, e),
|
|
1640
|
-
return
|
|
1641
|
-
for (let t of e)
|
|
1642
|
-
for (let e of t)
|
|
1643
|
-
for (let e of n)
|
|
1644
|
-
|
|
1814
|
+
function Pn(e, t, n = []) {
|
|
1815
|
+
for (let t of e) Bt.set(t.name, t), Mn(kn, t.name);
|
|
1816
|
+
for (let e of t) R.set(e.name, e), Mn(An, e.name);
|
|
1817
|
+
for (let e of n) z.set(e.name, e), Mn(jn, e.name);
|
|
1818
|
+
return On(), () => {
|
|
1819
|
+
for (let t of e) Nn(kn, t.name) && Bt.delete(t.name);
|
|
1820
|
+
for (let e of t) Nn(An, e.name) && R.delete(e.name);
|
|
1821
|
+
for (let e of n) Nn(jn, e.name) && z.delete(e.name);
|
|
1822
|
+
On();
|
|
1645
1823
|
};
|
|
1646
1824
|
}
|
|
1647
1825
|
//#endregion
|
|
1648
1826
|
//#region src/transition/enteringInitialStyle.ts
|
|
1649
|
-
function
|
|
1827
|
+
function Fn(e) {
|
|
1650
1828
|
let { initial: t, isActive: n, status: r } = e;
|
|
1651
1829
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1652
1830
|
let i = {};
|
|
@@ -1654,10 +1832,10 @@ function yt(e) {
|
|
|
1654
1832
|
}
|
|
1655
1833
|
//#endregion
|
|
1656
1834
|
//#region src/transition/settleScrub.ts
|
|
1657
|
-
var
|
|
1835
|
+
var In = () => ({
|
|
1658
1836
|
request: (e) => requestAnimationFrame(e),
|
|
1659
1837
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1660
|
-
}),
|
|
1838
|
+
}), Ln = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), Rn = ((e = In()) => {
|
|
1661
1839
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1662
1840
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1663
1841
|
}, i = (e, n) => {
|
|
@@ -1690,7 +1868,7 @@ var bt = () => ({
|
|
|
1690
1868
|
if (typeof r.animate != "function") return null;
|
|
1691
1869
|
i(r, "current");
|
|
1692
1870
|
let u = {};
|
|
1693
|
-
for (let e of o) u[
|
|
1871
|
+
for (let e of o) u[Ln(e.property)] = e.value;
|
|
1694
1872
|
let d;
|
|
1695
1873
|
try {
|
|
1696
1874
|
d = r.animate([u], {
|
|
@@ -1727,82 +1905,18 @@ var bt = () => ({
|
|
|
1727
1905
|
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1728
1906
|
}
|
|
1729
1907
|
};
|
|
1730
|
-
})(),
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
typeof localStorage < "u" && localStorage.removeItem(wt);
|
|
1734
|
-
} catch {}
|
|
1735
|
-
if (typeof sessionStorage > "u") return null;
|
|
1736
|
-
let e = sessionStorage.getItem(wt);
|
|
1737
|
-
if (e === null) return null;
|
|
1738
|
-
let [t, n] = e.split("@"), r = Number(n);
|
|
1739
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!Tt && typeof console < "u" && (Tt = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${wt}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(wt), null);
|
|
1740
|
-
} catch {
|
|
1741
|
-
return null;
|
|
1742
|
-
}
|
|
1743
|
-
}, Dt = () => ({
|
|
1744
|
-
read: () => {
|
|
1745
|
-
try {
|
|
1746
|
-
return typeof localStorage < "u" ? localStorage.getItem(Ct) : null;
|
|
1747
|
-
} catch {
|
|
1748
|
-
return null;
|
|
1749
|
-
}
|
|
1750
|
-
},
|
|
1751
|
-
write: (e) => {
|
|
1752
|
-
try {
|
|
1753
|
-
typeof localStorage < "u" && localStorage.setItem(Ct, e);
|
|
1754
|
-
} catch {}
|
|
1755
|
-
}
|
|
1756
|
-
}), Ot = 30, kt = 2, At = 2, U = () => {
|
|
1757
|
-
if (typeof navigator > "u") return !1;
|
|
1758
|
-
let e = navigator.userAgentData?.brands;
|
|
1759
|
-
return Array.isArray(e) ? e.some((e) => /chromium/i.test(e?.brand ?? "")) : !1;
|
|
1760
|
-
}, jt = ((e = Dt(), t = !1, n = !0) => {
|
|
1761
|
-
let r = n && e.read() === "css", i = r;
|
|
1762
|
-
r &&= !1;
|
|
1763
|
-
let a = 0, o = 0, s = [];
|
|
1764
|
-
return {
|
|
1765
|
-
playerAllowed: () => {
|
|
1766
|
-
let e = Et();
|
|
1767
|
-
return e ? e === "raf" : t && !r;
|
|
1768
|
-
},
|
|
1769
|
-
pinnedDriver: Et,
|
|
1770
|
-
beginRun: () => {
|
|
1771
|
-
o = 0, s = [];
|
|
1772
|
-
},
|
|
1773
|
-
reportGap: (e) => {
|
|
1774
|
-
s.push(e);
|
|
1775
|
-
},
|
|
1776
|
-
endRun: (t) => {
|
|
1777
|
-
let c = Math.max(Ot, (t ?? 1e3 / 60) * 1.8);
|
|
1778
|
-
o = s.filter((e) => e >= c).length;
|
|
1779
|
-
let l = o >= kt;
|
|
1780
|
-
if (l && (a += 1), n) {
|
|
1781
|
-
if (i) {
|
|
1782
|
-
i = !1, l ? r = !0 : e.write("raf");
|
|
1783
|
-
return;
|
|
1784
|
-
}
|
|
1785
|
-
l && a >= At && !r && (r = !0, e.write("css"));
|
|
1786
|
-
}
|
|
1787
|
-
},
|
|
1788
|
-
stats: () => ({
|
|
1789
|
-
runGaps: [...s],
|
|
1790
|
-
strikes: a,
|
|
1791
|
-
demoted: r
|
|
1792
|
-
})
|
|
1793
|
-
};
|
|
1794
|
-
})(Dt(), !0, U()), Mt = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Nt = /* @__PURE__ */ new WeakMap(), Pt = Symbol("flemo-inline-writer"), Ft = /* @__PURE__ */ new WeakMap(), W = (e, t, n = Pt) => {
|
|
1795
|
-
let r = Nt.get(e);
|
|
1796
|
-
r || (r = /* @__PURE__ */ new Map(), Nt.set(e, r));
|
|
1908
|
+
})(), zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @__PURE__ */ new WeakMap(), Vn = Symbol("flemo-inline-writer"), Hn = /* @__PURE__ */ new WeakMap(), U = (e, t, n = Vn) => {
|
|
1909
|
+
let r = Bn.get(e);
|
|
1910
|
+
r || (r = /* @__PURE__ */ new Map(), Bn.set(e, r));
|
|
1797
1911
|
let i = r.get(t);
|
|
1798
1912
|
i || (i = {
|
|
1799
1913
|
original: e.style.getPropertyValue(t),
|
|
1800
1914
|
owners: /* @__PURE__ */ new Set()
|
|
1801
1915
|
}, r.set(t, i)), i.owners.add(n);
|
|
1802
|
-
},
|
|
1803
|
-
|
|
1804
|
-
let r =
|
|
1805
|
-
(!n ||
|
|
1916
|
+
}, W = (e, t, n) => {
|
|
1917
|
+
Rn.cancel(e, n);
|
|
1918
|
+
let r = Bn.get(e);
|
|
1919
|
+
(!n || Hn.get(e) === n) && (e.style.transition = "", Hn.delete(e));
|
|
1806
1920
|
let i = (t) => {
|
|
1807
1921
|
let i = r?.get(t);
|
|
1808
1922
|
if (!i) {
|
|
@@ -1820,27 +1934,27 @@ var bt = () => ({
|
|
|
1820
1934
|
return;
|
|
1821
1935
|
}
|
|
1822
1936
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1823
|
-
},
|
|
1824
|
-
if (!
|
|
1825
|
-
let i = e, a =
|
|
1937
|
+
}, Un = (e, t, n = {}, r) => {
|
|
1938
|
+
if (!zn(e)) return Promise.resolve();
|
|
1939
|
+
let i = e, a = pn(t);
|
|
1826
1940
|
if (a.length === 0) return Promise.resolve();
|
|
1827
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1941
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = mn(n.ease);
|
|
1828
1942
|
if (o <= 0 && s <= 0) {
|
|
1829
|
-
|
|
1830
|
-
for (let e of a)
|
|
1943
|
+
Rn.takeover(i, r), i.style.transition = "none", Hn.set(i, r);
|
|
1944
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1831
1945
|
return Promise.resolve();
|
|
1832
1946
|
}
|
|
1833
|
-
let l =
|
|
1947
|
+
let l = be.playerAllowed() ? Rn.settle(i, a, {
|
|
1834
1948
|
durationMs: o * 1e3,
|
|
1835
1949
|
delayMs: s * 1e3,
|
|
1836
1950
|
easing: c
|
|
1837
1951
|
}, (e) => {
|
|
1838
|
-
|
|
1952
|
+
U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1839
1953
|
}, r) : null;
|
|
1840
1954
|
if (l) return l;
|
|
1841
1955
|
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1842
|
-
i.style.transition = u,
|
|
1843
|
-
for (let e of a)
|
|
1956
|
+
i.style.transition = u, Hn.set(i, r), i.offsetWidth;
|
|
1957
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1844
1958
|
return new Promise((e) => {
|
|
1845
1959
|
let t = !1, n = () => {
|
|
1846
1960
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1849,17 +1963,371 @@ var bt = () => ({
|
|
|
1849
1963
|
};
|
|
1850
1964
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1851
1965
|
});
|
|
1852
|
-
},
|
|
1966
|
+
}, Wn = (e) => {
|
|
1853
1967
|
if (typeof e.querySelectorAll == "function") {
|
|
1854
1968
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1855
1969
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1856
1970
|
}
|
|
1857
|
-
},
|
|
1858
|
-
function
|
|
1971
|
+
}, Gn = 0, Kn = [], qn = [];
|
|
1972
|
+
function Jn() {
|
|
1973
|
+
let e = Gn === 0;
|
|
1974
|
+
if (Gn += 1, e) for (let e of qn) e();
|
|
1975
|
+
let t = !1;
|
|
1976
|
+
return () => {
|
|
1977
|
+
if (t || (t = !0, --Gn, Gn > 0)) return;
|
|
1978
|
+
let e = Kn;
|
|
1979
|
+
Kn = [];
|
|
1980
|
+
for (let t of e) t();
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
var Yn = () => Gn > 0;
|
|
1984
|
+
function Xn(e) {
|
|
1985
|
+
return qn.push(e), () => {
|
|
1986
|
+
qn = qn.filter((t) => t !== e);
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
function Zn(e) {
|
|
1990
|
+
Gn === 0 ? e() : Kn.push(e);
|
|
1991
|
+
}
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1994
|
+
var Qn = 8, $n = 2, G = 96, er = 15e3, tr = 3e3, nr = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", K = "data-flemo-image-src", rr = "flemo-image-scale-v1", ir = /* @__PURE__ */ new Set([
|
|
1995
|
+
"PUSHING",
|
|
1996
|
+
"POPPING",
|
|
1997
|
+
"REPLACING"
|
|
1998
|
+
]), ar = (e) => {
|
|
1999
|
+
let t = e.closest("[data-flemo-screen]");
|
|
2000
|
+
return !!t && ir.has(t.getAttribute("data-flemo-status") ?? "");
|
|
2001
|
+
}, or = (e) => {
|
|
2002
|
+
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2003
|
+
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2004
|
+
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2005
|
+
}, sr = "onmessage = async (e) => {\n const { url, targetWidth, neededArea, ratio } = e.data;\n try {\n const response = await fetch(url);\n if (!response.ok) throw new Error(\"http \" + response.status);\n const blob = await response.blob();\n const full = await createImageBitmap(blob);\n if (full.width * full.height <= neededArea * ratio) {\n full.close();\n postMessage({ url, skip: true });\n return;\n }\n const scale = targetWidth / full.width;\n const canvas = new OffscreenCanvas(targetWidth, Math.max(1, Math.round(full.height * scale)));\n const context = canvas.getContext(\"2d\");\n context.imageSmoothingQuality = \"high\";\n context.drawImage(full, 0, 0, canvas.width, canvas.height);\n full.close();\n const out = await canvas.convertToBlob({ type: \"image/jpeg\", quality: 0.85 });\n postMessage({ url, blob: out });\n } catch (error) {\n postMessage({ url, error: String(error) });\n }\n};", cr = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", lr = async (e, t) => {
|
|
2006
|
+
try {
|
|
2007
|
+
if (typeof caches > "u") return;
|
|
2008
|
+
await (await caches.open(rr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2009
|
+
} catch {}
|
|
2010
|
+
}, ur = async (e) => {
|
|
2011
|
+
try {
|
|
2012
|
+
if (typeof caches > "u") return null;
|
|
2013
|
+
let t = await (await caches.open(rr)).match(e);
|
|
2014
|
+
return t ? await t.blob() : null;
|
|
2015
|
+
} catch {
|
|
2016
|
+
return null;
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
function dr(e) {
|
|
2020
|
+
if (!cr()) return () => {};
|
|
2021
|
+
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = (e) => !!e && e !== "skip" && e !== "opaque", a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new Set(), u = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, d = () => {
|
|
2022
|
+
if (t) return t;
|
|
2023
|
+
try {
|
|
2024
|
+
t = new Worker(URL.createObjectURL(new Blob([sr])));
|
|
2025
|
+
} catch {
|
|
2026
|
+
return null;
|
|
2027
|
+
}
|
|
2028
|
+
return t.onmessage = (e) => {
|
|
2029
|
+
let { url: t, blob: n, error: r, skip: i } = e.data;
|
|
2030
|
+
if (o.delete(t), r) {
|
|
2031
|
+
f(t, "opaque");
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2034
|
+
if (i || !n) {
|
|
2035
|
+
f(t, "skip");
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
let a = URL.createObjectURL(n);
|
|
2039
|
+
l.add(a), lr(t, n), f(t, a);
|
|
2040
|
+
}, t;
|
|
2041
|
+
}, f = (e, t) => {
|
|
2042
|
+
r.has(e) || r.set(e, t);
|
|
2043
|
+
for (let [t, n] of [...s]) n.url === e && v(t, r.get(e));
|
|
2044
|
+
}, p = (e, t) => {
|
|
2045
|
+
let n = () => {
|
|
2046
|
+
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2047
|
+
};
|
|
2048
|
+
if (!Yn()) {
|
|
2049
|
+
n();
|
|
2050
|
+
return;
|
|
2051
|
+
}
|
|
2052
|
+
let r = !1, i = () => {
|
|
2053
|
+
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2054
|
+
}, o = setTimeout(i, tr);
|
|
2055
|
+
a.add(i), Zn(i);
|
|
2056
|
+
}, m = (e, t) => {
|
|
2057
|
+
let n = () => {
|
|
2058
|
+
if (Yn()) {
|
|
2059
|
+
Zn(t);
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
if (!ar(e) || typeof requestAnimationFrame != "function") {
|
|
2063
|
+
t();
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
requestAnimationFrame(n);
|
|
2067
|
+
};
|
|
2068
|
+
n();
|
|
2069
|
+
}, h = (e, t) => {
|
|
2070
|
+
let n = e.style.visibility;
|
|
2071
|
+
e.style.visibility = "hidden";
|
|
2072
|
+
let r = !1, i = () => {
|
|
2073
|
+
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2074
|
+
}, o = setTimeout(i, tr);
|
|
2075
|
+
a.add(i), m(e, i);
|
|
2076
|
+
}, g = (e, t) => !Yn() && !ar(e) ? !1 : (e.setAttribute(K, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2077
|
+
e.setAttribute(K, t), e.src = a, h(e, () => {
|
|
2078
|
+
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2079
|
+
if (n) return;
|
|
2080
|
+
let a = r.get(t);
|
|
2081
|
+
i(a) && e.getAttribute("data-flemo-image-src") === t && e.getAttribute("src") !== a && (e.src = a);
|
|
2082
|
+
});
|
|
2083
|
+
}, v = (e, t) => {
|
|
2084
|
+
let n = s.get(e);
|
|
2085
|
+
if (n) {
|
|
2086
|
+
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2087
|
+
if (i(t)) {
|
|
2088
|
+
e.setAttribute(K, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2089
|
+
let r = e.closest("picture");
|
|
2090
|
+
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2091
|
+
e.src = t;
|
|
2092
|
+
}
|
|
2093
|
+
} else e.getAttribute("src") === nr && (i(t) ? e.src = t : (e.removeAttribute(K), e.src = n.url));
|
|
2094
|
+
p(e, n.previousVisibility);
|
|
2095
|
+
}
|
|
2096
|
+
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
2097
|
+
if (b = !1, n) return;
|
|
2098
|
+
let e = [...y];
|
|
2099
|
+
y.clear();
|
|
2100
|
+
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2101
|
+
}, S = () => {
|
|
2102
|
+
b || (b = !0, Zn(() => {
|
|
2103
|
+
if (n) return;
|
|
2104
|
+
let e = globalThis.requestIdleCallback;
|
|
2105
|
+
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2106
|
+
}));
|
|
2107
|
+
}, C = (e, t, n) => {
|
|
2108
|
+
if (r.has(e) || o.has(e)) return;
|
|
2109
|
+
if (Yn() && N()) {
|
|
2110
|
+
y.has(e) || y.set(e, {
|
|
2111
|
+
boxWidth: t,
|
|
2112
|
+
boxHeight: n
|
|
2113
|
+
}), S();
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2116
|
+
let i = d();
|
|
2117
|
+
if (!i) return;
|
|
2118
|
+
o.add(e);
|
|
2119
|
+
let a = Math.round(Math.max(G, t * u()) * $n), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2120
|
+
i.postMessage({
|
|
2121
|
+
url: e,
|
|
2122
|
+
targetWidth: a,
|
|
2123
|
+
neededArea: s,
|
|
2124
|
+
ratio: 8
|
|
2125
|
+
});
|
|
2126
|
+
}, w = Xn(() => {
|
|
2127
|
+
if (N() && !(!t || o.size === 0)) {
|
|
2128
|
+
t.terminate(), t = null;
|
|
2129
|
+
for (let e of o) {
|
|
2130
|
+
if (y.has(e)) continue;
|
|
2131
|
+
let t = {
|
|
2132
|
+
boxWidth: G,
|
|
2133
|
+
boxHeight: G
|
|
2134
|
+
};
|
|
2135
|
+
for (let [n, r] of s) {
|
|
2136
|
+
if (r.url !== e) continue;
|
|
2137
|
+
let i = n.getBoundingClientRect();
|
|
2138
|
+
t = {
|
|
2139
|
+
boxWidth: i.width || G,
|
|
2140
|
+
boxHeight: i.height || G
|
|
2141
|
+
};
|
|
2142
|
+
break;
|
|
2143
|
+
}
|
|
2144
|
+
y.set(e, t);
|
|
2145
|
+
}
|
|
2146
|
+
o.clear(), y.size > 0 && S();
|
|
2147
|
+
}
|
|
2148
|
+
}), T = (e, t) => {
|
|
2149
|
+
let i = e.complete && e.naturalWidth > 0;
|
|
2150
|
+
if (i && !t) return;
|
|
2151
|
+
let a = {
|
|
2152
|
+
url: "",
|
|
2153
|
+
previousVisibility: e.style.visibility,
|
|
2154
|
+
timeout: setTimeout(() => v(e, null), er),
|
|
2155
|
+
responsive: !0
|
|
2156
|
+
}, o = () => {
|
|
2157
|
+
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2158
|
+
here, so the final fallback arm is unreachable. */
|
|
2159
|
+
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2160
|
+
if (!(/^https?:/.test(t) && or({
|
|
2161
|
+
naturalWidth: e.naturalWidth,
|
|
2162
|
+
naturalHeight: e.naturalHeight,
|
|
2163
|
+
boxWidth: i.width || G,
|
|
2164
|
+
boxHeight: i.height || G,
|
|
2165
|
+
devicePixelRatio: u()
|
|
2166
|
+
}))) {
|
|
2167
|
+
v(e, null);
|
|
2168
|
+
return;
|
|
2169
|
+
}
|
|
2170
|
+
a.url = t;
|
|
2171
|
+
let o = r.get(t);
|
|
2172
|
+
if (o) {
|
|
2173
|
+
v(e, o);
|
|
2174
|
+
return;
|
|
2175
|
+
}
|
|
2176
|
+
ur(t).then((a) => {
|
|
2177
|
+
if (!(n || !s.has(e))) {
|
|
2178
|
+
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2179
|
+
releases every held element of the url first, so a still-held
|
|
2180
|
+
element cannot observe an existing verdict here; kept as a guard
|
|
2181
|
+
against future settle() reorderings. */
|
|
2182
|
+
if (r.has(t)) {
|
|
2183
|
+
v(e, r.get(t));
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
/* v8 ignore stop */
|
|
2187
|
+
if (a) {
|
|
2188
|
+
let e = URL.createObjectURL(a);
|
|
2189
|
+
l.add(e), f(t, e);
|
|
2190
|
+
return;
|
|
2191
|
+
}
|
|
2192
|
+
C(t, i.width || G, i.height || G);
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
2195
|
+
};
|
|
2196
|
+
if (i) {
|
|
2197
|
+
s.set(e, a), e.style.visibility = "hidden", o();
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
let c = () => v(e, null);
|
|
2201
|
+
a.detachListeners = () => {
|
|
2202
|
+
e.removeEventListener("load", o), e.removeEventListener("error", c);
|
|
2203
|
+
}, e.addEventListener("load", o), e.addEventListener("error", c), s.set(e, a), e.style.visibility = "hidden";
|
|
2204
|
+
}, E = (e, t) => {
|
|
2205
|
+
if (n || c.has(e) || e.getAttribute("data-flemo-image-src") !== null) return;
|
|
2206
|
+
let a = e.getAttribute("src") ?? "";
|
|
2207
|
+
if (!/^https?:/.test(a)) return;
|
|
2208
|
+
if (e.getAttribute("srcset") !== null || e.closest("picture") !== null) {
|
|
2209
|
+
c.add(e), T(e, t);
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2213
|
+
if (!t) {
|
|
2214
|
+
let t = e.getBoundingClientRect();
|
|
2215
|
+
C(a, t.width || G, t.height || G);
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
let n = e.getBoundingClientRect();
|
|
2219
|
+
if (!or({
|
|
2220
|
+
naturalWidth: e.naturalWidth,
|
|
2221
|
+
naturalHeight: e.naturalHeight,
|
|
2222
|
+
boxWidth: n.width || G,
|
|
2223
|
+
boxHeight: n.height || G,
|
|
2224
|
+
devicePixelRatio: u()
|
|
2225
|
+
})) return;
|
|
2226
|
+
let o = r.get(a);
|
|
2227
|
+
if (i(o)) {
|
|
2228
|
+
Yn() || ar(e) ? _(e, a, o) : (e.setAttribute(K, a), e.src = o);
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
if (o === "opaque") {
|
|
2232
|
+
g(e, a);
|
|
2233
|
+
return;
|
|
2234
|
+
}
|
|
2235
|
+
if (o === "skip") return;
|
|
2236
|
+
}
|
|
2237
|
+
let o = r.get(a);
|
|
2238
|
+
if (o !== "skip") {
|
|
2239
|
+
if (o === "opaque") {
|
|
2240
|
+
g(e, a);
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
if (o) {
|
|
2244
|
+
Yn() || ar(e) ? _(e, a, o) : (e.setAttribute(K, a), e.src = o);
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2247
|
+
s.set(e, {
|
|
2248
|
+
url: a,
|
|
2249
|
+
previousVisibility: e.style.visibility,
|
|
2250
|
+
timeout: setTimeout(() => v(e, null), er)
|
|
2251
|
+
}), e.style.visibility = "hidden", e.setAttribute(K, a), e.src = nr, ur(a).then((t) => {
|
|
2252
|
+
if (n || r.has(a)) return;
|
|
2253
|
+
if (t) {
|
|
2254
|
+
let e = URL.createObjectURL(t);
|
|
2255
|
+
l.add(e), f(a, e);
|
|
2256
|
+
return;
|
|
2257
|
+
}
|
|
2258
|
+
let i = () => {
|
|
2259
|
+
if (n) return;
|
|
2260
|
+
let t = e.getBoundingClientRect();
|
|
2261
|
+
C(a, t.width || G, t.height || G);
|
|
2262
|
+
};
|
|
2263
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
}, D = (e, t) => {
|
|
2267
|
+
if (e instanceof HTMLImageElement && E(e, t), typeof e.querySelectorAll == "function") for (let n of Array.from(e.querySelectorAll("img"))) E(n, t);
|
|
2268
|
+
}, O = new MutationObserver((e) => {
|
|
2269
|
+
for (let t of e) for (let e of Array.from(t.addedNodes)) e instanceof Element && D(e, !0);
|
|
2270
|
+
});
|
|
2271
|
+
O.observe(e, {
|
|
2272
|
+
childList: !0,
|
|
2273
|
+
subtree: !0
|
|
2274
|
+
}), D(e, !1);
|
|
2275
|
+
let k = (e) => {
|
|
2276
|
+
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2277
|
+
if (n && !n.responsive) {
|
|
2278
|
+
t === n.url && (e.src = nr);
|
|
2279
|
+
return;
|
|
2280
|
+
}
|
|
2281
|
+
let a = e.getAttribute(K);
|
|
2282
|
+
if (a) if (t === a) {
|
|
2283
|
+
let t = r.get(a);
|
|
2284
|
+
i(t) && (e.src = t);
|
|
2285
|
+
} else t !== nr && !t.startsWith("blob:") && e.removeAttribute(K);
|
|
2286
|
+
}, ee = !1, A = new MutationObserver((t) => {
|
|
2287
|
+
if (!n) {
|
|
2288
|
+
if (Yn()) {
|
|
2289
|
+
if (ee) return;
|
|
2290
|
+
ee = !0, Zn(() => {
|
|
2291
|
+
if (ee = !1, !n) {
|
|
2292
|
+
for (let t of Array.from(e.querySelectorAll(`img[${K}]`))) k(t);
|
|
2293
|
+
for (let e of [...s.keys()]) k(e);
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2296
|
+
return;
|
|
2297
|
+
}
|
|
2298
|
+
for (let e of t) e.attributeName === "src" && k(e.target);
|
|
2299
|
+
}
|
|
2300
|
+
});
|
|
2301
|
+
return A.observe(e, {
|
|
2302
|
+
subtree: !0,
|
|
2303
|
+
attributes: !0,
|
|
2304
|
+
attributeFilter: ["src"]
|
|
2305
|
+
}), () => {
|
|
2306
|
+
n = !0, w(), O.disconnect(), A.disconnect(), t?.terminate(), t = null;
|
|
2307
|
+
for (let e of [...s.keys()]) v(e, null);
|
|
2308
|
+
for (let e of [...a]) e();
|
|
2309
|
+
o.clear(), r.clear();
|
|
2310
|
+
for (let e of l) URL.revokeObjectURL(e);
|
|
2311
|
+
l.clear();
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2314
|
+
var fr = null;
|
|
2315
|
+
function pr() {
|
|
2316
|
+
return typeof document > "u" || !document.body ? () => {} : (fr ? fr.count += 1 : fr = {
|
|
2317
|
+
dispose: dr(document.body),
|
|
2318
|
+
count: 1
|
|
2319
|
+
}, () => {
|
|
2320
|
+
fr && (--fr.count, fr.count <= 0 && (fr.dispose(), fr = null));
|
|
2321
|
+
});
|
|
2322
|
+
}
|
|
2323
|
+
//#endregion
|
|
2324
|
+
//#region src/core/engine/arrivalHold.ts
|
|
2325
|
+
var mr = "data-flemo-held-arrival";
|
|
2326
|
+
function hr(e) {
|
|
1859
2327
|
if (typeof MutationObserver > "u") return () => {};
|
|
1860
2328
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
1861
2329
|
let n = t instanceof Element ? t : t.parentElement;
|
|
1862
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2330
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${mr}], [${K}]`) !== null;
|
|
1863
2331
|
}, s = (e, t, n, r) => e ? n === e.glass ? (e.pendingEcho ? e.pendingEcho = !1 : e.latest = n, e) : (e.latest = n, r(e.glass), e.pendingEcho = !0, e) : n === t ? null : (r(t), {
|
|
1864
2332
|
glass: t,
|
|
1865
2333
|
latest: n,
|
|
@@ -1881,7 +2349,7 @@ function Rt(e) {
|
|
|
1881
2349
|
}
|
|
1882
2350
|
if (i.type === "attributes") {
|
|
1883
2351
|
let e = i.target, t = i.attributeName;
|
|
1884
|
-
if (t.startsWith("data-flemo") || !e.isConnected || o(e)) continue;
|
|
2352
|
+
if (t.startsWith("data-flemo") || t === "style" && e.hasAttribute("data-flemo-img-hold") || !e.isConnected || o(e)) continue;
|
|
1885
2353
|
let n = d.get(e);
|
|
1886
2354
|
n || d.set(e, n = /* @__PURE__ */ new Map()), n.has(t) || n.set(t, i.oldValue);
|
|
1887
2355
|
continue;
|
|
@@ -1889,12 +2357,12 @@ function Rt(e) {
|
|
|
1889
2357
|
if (i.type === "childList") {
|
|
1890
2358
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
1891
2359
|
if (e instanceof Element && t.delete(e)) {
|
|
1892
|
-
e.removeAttribute(
|
|
2360
|
+
e.removeAttribute(mr);
|
|
1893
2361
|
continue;
|
|
1894
2362
|
}
|
|
1895
2363
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
1896
2364
|
}
|
|
1897
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2365
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(mr, ""), t.add(e), l(i.target).added.push(e));
|
|
1898
2366
|
}
|
|
1899
2367
|
}
|
|
1900
2368
|
for (let [e, t] of u) {
|
|
@@ -1929,7 +2397,7 @@ function Rt(e) {
|
|
|
1929
2397
|
c.disconnect();
|
|
1930
2398
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
1931
2399
|
n.clear();
|
|
1932
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2400
|
+
for (let e of t) e instanceof HTMLElement && Wn(e), e.removeAttribute(mr);
|
|
1933
2401
|
t.clear();
|
|
1934
2402
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
1935
2403
|
i.clear();
|
|
@@ -1939,58 +2407,99 @@ function Rt(e) {
|
|
|
1939
2407
|
}
|
|
1940
2408
|
//#endregion
|
|
1941
2409
|
//#region src/core/engine/compositorWarmUp.ts
|
|
1942
|
-
var
|
|
2410
|
+
var gr = "data-flemo-warm", _r = 3e3, vr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], yr = {
|
|
1943
2411
|
duration: 500,
|
|
1944
2412
|
iterations: Infinity,
|
|
1945
2413
|
direction: "alternate",
|
|
1946
2414
|
easing: "linear"
|
|
1947
|
-
},
|
|
1948
|
-
|
|
2415
|
+
}, br = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", xr = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==", q = null, Sr = null, J = null, Cr = null, wr = 0, Tr = () => {
|
|
2416
|
+
wr = 0, Cr?.cancel(), Cr = null, J?.remove(), J = null;
|
|
1949
2417
|
};
|
|
1950
|
-
function
|
|
2418
|
+
function Er() {
|
|
1951
2419
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
1952
|
-
if (
|
|
1953
|
-
|
|
2420
|
+
if (wr += 1, !J) {
|
|
2421
|
+
J = document.createElement("div"), J.setAttribute(gr, ""), J.setAttribute("aria-hidden", "true"), J.setAttribute("style", br), document.body.appendChild(J);
|
|
1954
2422
|
try {
|
|
1955
|
-
|
|
2423
|
+
Cr = J.animate(vr, yr);
|
|
2424
|
+
} catch {
|
|
2425
|
+
Cr = null;
|
|
2426
|
+
}
|
|
2427
|
+
if (!q && rt()) try {
|
|
2428
|
+
q = document.createElement("video"), q.muted = !0, q.loop = !0, q.playsInline = !0, q.setAttribute("aria-hidden", "true"), q.setAttribute("data-flemo-warm-video", ""), q.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), q.src = xr, document.body.appendChild(q), q.play()?.catch?.(() => {});
|
|
2429
|
+
let e = q;
|
|
2430
|
+
Sr = () => {
|
|
2431
|
+
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2432
|
+
}, document.addEventListener("visibilitychange", Sr);
|
|
1956
2433
|
} catch {
|
|
1957
|
-
|
|
2434
|
+
q = null;
|
|
1958
2435
|
}
|
|
1959
2436
|
}
|
|
1960
2437
|
let e = !1, t = setTimeout(() => {
|
|
1961
|
-
e || (e = !0, --
|
|
1962
|
-
},
|
|
2438
|
+
e || (e = !0, --wr, wr <= 0 && Tr());
|
|
2439
|
+
}, _r);
|
|
1963
2440
|
return () => {
|
|
1964
|
-
e || (e = !0, clearTimeout(t), --
|
|
2441
|
+
e || (e = !0, clearTimeout(t), --wr, wr <= 0 && Tr());
|
|
1965
2442
|
};
|
|
1966
2443
|
}
|
|
1967
2444
|
//#endregion
|
|
1968
2445
|
//#region src/core/engine/emulationNotice.ts
|
|
1969
|
-
var
|
|
2446
|
+
var Dr = () => {
|
|
1970
2447
|
if (typeof navigator > "u") return !1;
|
|
1971
2448
|
let e = navigator.platform ?? "";
|
|
1972
2449
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
1973
|
-
},
|
|
1974
|
-
|
|
1975
|
-
},
|
|
2450
|
+
}, Or = !1, kr = () => {
|
|
2451
|
+
Or || !N() || !Dr() || (Or = !0, console.warn("[flemo] DevTools device emulation detected. The emulated view is composited through an extra scaling pass, so transitions can show text shimmer and settle flashes that do NOT exist in a plain window or on a real device. Judge motion quality outside device emulation."));
|
|
2452
|
+
}, Ar = "data-flemo-img-hold", jr = (e) => !(e.complete && e.naturalWidth > 0), Mr = 4, Nr = (e) => {
|
|
2453
|
+
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2454
|
+
let t = e.getBoundingClientRect(), n = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, r = Math.max(1, t.width * n) * Math.max(1, t.height * n);
|
|
2455
|
+
return e.naturalWidth * e.naturalHeight > r * Mr;
|
|
2456
|
+
}, Pr = (e, t) => jr(e) || !t && Nr(e);
|
|
2457
|
+
function Fr(e, t, n = !1) {
|
|
2458
|
+
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2459
|
+
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2460
|
+
e.getAttribute(Ar) === null && (r.has(e) || !Pr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(Ar, "")));
|
|
2461
|
+
};
|
|
2462
|
+
for (let t of e.querySelectorAll("img")) i(t);
|
|
2463
|
+
let a = new MutationObserver((e) => {
|
|
2464
|
+
for (let t of e) for (let e of t.addedNodes) if (e instanceof HTMLImageElement) i(e);
|
|
2465
|
+
else if (e instanceof Element) for (let t of e.querySelectorAll("img")) i(t);
|
|
2466
|
+
});
|
|
2467
|
+
a.observe(e, {
|
|
2468
|
+
childList: !0,
|
|
2469
|
+
subtree: !0
|
|
2470
|
+
});
|
|
2471
|
+
let o = !1, s = () => {
|
|
2472
|
+
if (!o) {
|
|
2473
|
+
o = !0, a.disconnect();
|
|
2474
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(Ar);
|
|
2475
|
+
r.clear();
|
|
2476
|
+
}
|
|
2477
|
+
}, c = setTimeout(s, Math.max(0, t));
|
|
2478
|
+
return () => {
|
|
2479
|
+
clearTimeout(c), s();
|
|
2480
|
+
};
|
|
2481
|
+
}
|
|
2482
|
+
//#endregion
|
|
2483
|
+
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2484
|
+
var Ir = () => {}, Lr = .004, Rr = (e, t) => {
|
|
1976
2485
|
let n = e.ownerDocument?.defaultView;
|
|
1977
2486
|
if (!n) return !1;
|
|
1978
2487
|
let r = e;
|
|
1979
2488
|
for (; r;) {
|
|
1980
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2489
|
+
if (Number(n.getComputedStyle(r).opacity) <= Lr) return !0;
|
|
1981
2490
|
if (r === t) break;
|
|
1982
2491
|
r = r.parentElement;
|
|
1983
2492
|
}
|
|
1984
2493
|
return !1;
|
|
1985
2494
|
};
|
|
1986
|
-
function
|
|
1987
|
-
if (typeof e.getAnimations != "function") return
|
|
2495
|
+
function zr(e) {
|
|
2496
|
+
if (typeof e.getAnimations != "function") return Ir;
|
|
1988
2497
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
1989
2498
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
1990
2499
|
if (t.size >= 128) return;
|
|
1991
2500
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
1992
2501
|
let r = n.effect?.target;
|
|
1993
|
-
if (r instanceof Element &&
|
|
2502
|
+
if (r instanceof Element && Rr(r, e)) try {
|
|
1994
2503
|
n.pause(), t.add(n);
|
|
1995
2504
|
} catch {}
|
|
1996
2505
|
}
|
|
@@ -2019,7 +2528,7 @@ function en(e) {
|
|
|
2019
2528
|
}
|
|
2020
2529
|
//#endregion
|
|
2021
2530
|
//#region src/transition/cubicBezier.ts
|
|
2022
|
-
var
|
|
2531
|
+
var Br = (e, t, n, r) => {
|
|
2023
2532
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
2024
2533
|
return (e) => {
|
|
2025
2534
|
if (e <= 0) return 0;
|
|
@@ -2031,7 +2540,7 @@ var tn = (e, t, n, r) => {
|
|
|
2031
2540
|
}
|
|
2032
2541
|
return a((t + n) / 2);
|
|
2033
2542
|
};
|
|
2034
|
-
},
|
|
2543
|
+
}, Vr = (e) => e, Hr = {
|
|
2035
2544
|
ease: [
|
|
2036
2545
|
.25,
|
|
2037
2546
|
.1,
|
|
@@ -2086,20 +2595,20 @@ var tn = (e, t, n, r) => {
|
|
|
2086
2595
|
.66,
|
|
2087
2596
|
-.56
|
|
2088
2597
|
]
|
|
2089
|
-
},
|
|
2598
|
+
}, Ur = (e) => {
|
|
2090
2599
|
if (Array.isArray(e)) {
|
|
2091
2600
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2092
2601
|
let [t, n, r, i] = e;
|
|
2093
|
-
return
|
|
2602
|
+
return Br(t, n, r, i);
|
|
2094
2603
|
}
|
|
2095
|
-
return
|
|
2604
|
+
return Vr;
|
|
2096
2605
|
}
|
|
2097
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2098
|
-
},
|
|
2606
|
+
return typeof e == "string" ? e === "linear" ? Vr : Br(...Hr[e] ?? Hr.ease) : Br(...Hr.ease);
|
|
2607
|
+
}, Wr = 1 / 255, Gr = 400, Kr = 24, qr = /* @__PURE__ */ new Set([
|
|
2099
2608
|
"x",
|
|
2100
2609
|
"y",
|
|
2101
2610
|
"opacity"
|
|
2102
|
-
]),
|
|
2611
|
+
]), Jr = (e, t, n) => {
|
|
2103
2612
|
if (!e || typeof e != "object") return;
|
|
2104
2613
|
let r = e[t];
|
|
2105
2614
|
if (r === void 0) return;
|
|
@@ -2117,7 +2626,7 @@ var tn = (e, t, n, r) => {
|
|
|
2117
2626
|
return Number.isNaN(e) ? null : e;
|
|
2118
2627
|
}
|
|
2119
2628
|
return null;
|
|
2120
|
-
},
|
|
2629
|
+
}, Yr = (e, t, n) => {
|
|
2121
2630
|
let r = /* @__PURE__ */ new Set();
|
|
2122
2631
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2123
2632
|
if (r.size === 0) return null;
|
|
@@ -2125,28 +2634,28 @@ var tn = (e, t, n, r) => {
|
|
|
2125
2634
|
for (let a of r) {
|
|
2126
2635
|
let r = e.from && typeof e.from == "object" ? e.from[a] : void 0, o = e.to && typeof e.to == "object" ? e.to[a] : void 0;
|
|
2127
2636
|
if (r !== void 0 && r === o) continue;
|
|
2128
|
-
if (!
|
|
2129
|
-
let s =
|
|
2637
|
+
if (!qr.has(a)) return null;
|
|
2638
|
+
let s = Jr(e.from, a, t), c = Jr(e.to, a, t);
|
|
2130
2639
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2131
2640
|
let l = Math.abs(c - s);
|
|
2132
2641
|
if (l === 0) continue;
|
|
2133
|
-
let u = a === "opacity" ?
|
|
2642
|
+
let u = a === "opacity" ? Wr : 1 / Math.max(1, n);
|
|
2134
2643
|
i = Math.min(i, u / l);
|
|
2135
2644
|
}
|
|
2136
2645
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2137
|
-
},
|
|
2646
|
+
}, Y = (e, t, n) => {
|
|
2138
2647
|
if (e.duration <= 0) return null;
|
|
2139
|
-
let r =
|
|
2648
|
+
let r = Yr(e, t, n);
|
|
2140
2649
|
if (r === null) return null;
|
|
2141
|
-
let i =
|
|
2142
|
-
for (let e =
|
|
2650
|
+
let i = Ur(e.ease), a = Gr;
|
|
2651
|
+
for (let e = Gr; e >= 0 && !(Math.abs(1 - i(e / Gr)) > r); --e) a = e;
|
|
2143
2652
|
if (a === 0) return null;
|
|
2144
|
-
let o = (e.delay + e.duration * (a /
|
|
2145
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2146
|
-
},
|
|
2653
|
+
let o = (e.delay + e.duration * (a / Gr)) * 1e3;
|
|
2654
|
+
return (e.delay + e.duration) * 1e3 - o < Kr ? null : o;
|
|
2655
|
+
}, Xr = 1e3 / 120, Zr = 4, X = 400, Qr = 4, Z = (e) => {
|
|
2147
2656
|
let t = +e.toFixed(5);
|
|
2148
2657
|
return Object.is(t, -0) ? 0 : t;
|
|
2149
|
-
},
|
|
2658
|
+
}, $r = (e, t, n) => {
|
|
2150
2659
|
if (e.duration <= 0) return null;
|
|
2151
2660
|
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2152
2661
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
@@ -2155,36 +2664,63 @@ var tn = (e, t, n, r) => {
|
|
|
2155
2664
|
let i = e.from && typeof e.from == "object" ? e.from[n] : void 0, o = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2156
2665
|
if (i !== void 0 && i === o) continue;
|
|
2157
2666
|
if (n !== "x" && n !== "y") return null;
|
|
2158
|
-
let s =
|
|
2667
|
+
let s = Jr(e.from, n, t), c = Jr(e.to, n, t);
|
|
2159
2668
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2160
2669
|
a = Math.max(a, Math.abs(c - s) * r);
|
|
2161
2670
|
}
|
|
2162
|
-
if (a <
|
|
2163
|
-
let o =
|
|
2164
|
-
for (let e = 0; e <=
|
|
2165
|
-
let c = e.duration * 1e3 /
|
|
2671
|
+
if (a < Zr) return null;
|
|
2672
|
+
let o = Ur(e.ease), s = Array(401);
|
|
2673
|
+
for (let e = 0; e <= X; e += 1) s[e] = o(e / X);
|
|
2674
|
+
let c = e.duration * 1e3 / X, l = 40 / a * c / Xr, u = X, d = 0;
|
|
2166
2675
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2167
|
-
for (let e = u; e <
|
|
2676
|
+
for (let e = u; e < X; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2168
2677
|
let f = (1 - s[u]) * a;
|
|
2169
2678
|
if (f <= 1) return null;
|
|
2170
2679
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2171
2680
|
let t = 1 - e / a;
|
|
2172
|
-
for (; m <
|
|
2681
|
+
for (; m < X && s[m] < t;) m += 1;
|
|
2173
2682
|
if (m === 0) return 0;
|
|
2174
2683
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2175
|
-
return (m - 1 + i) /
|
|
2684
|
+
return (m - 1 + i) / X * 100;
|
|
2176
2685
|
}, g = h(p), _ = [];
|
|
2177
|
-
for (let e = 0; 100 /
|
|
2686
|
+
for (let e = 0; 100 / X * e < g; e += Qr) _.push(`${Z(s[e])} ${Z(e / X * 100)}%`);
|
|
2178
2687
|
let v = g;
|
|
2179
2688
|
for (let e = p; e >= 2; --e) {
|
|
2180
2689
|
let t = h(e - 1);
|
|
2181
2690
|
if (t > v) {
|
|
2182
|
-
let n =
|
|
2183
|
-
_.push(`${n} ${
|
|
2691
|
+
let n = Z(1 - e / a);
|
|
2692
|
+
_.push(`${n} ${Z(v)}%`, `${n} ${Z(t)}%`);
|
|
2184
2693
|
}
|
|
2185
2694
|
v = t;
|
|
2186
2695
|
}
|
|
2187
|
-
return _.push(`1 ${
|
|
2696
|
+
return _.push(`1 ${Z(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2697
|
+
}, ei = 12, ti = (e, t, n, r) => {
|
|
2698
|
+
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2699
|
+
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2700
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
2701
|
+
let o = 0;
|
|
2702
|
+
for (let n of a) {
|
|
2703
|
+
let r = e.from && typeof e.from == "object" ? e.from[n] : void 0, a = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2704
|
+
if (r !== void 0 && r === a) continue;
|
|
2705
|
+
if (n !== "x" && n !== "y") return null;
|
|
2706
|
+
let s = Jr(e.from, n, t), c = Jr(e.to, n, t);
|
|
2707
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2708
|
+
o = Math.max(o, Math.abs(c - s) * i);
|
|
2709
|
+
}
|
|
2710
|
+
if (o < ei) return null;
|
|
2711
|
+
let s = Ur(e.ease), c = Array(401);
|
|
2712
|
+
for (let e = 0; e <= X; e += 1) c[e] = s(e / X);
|
|
2713
|
+
let l = e.duration * 1e3, u = l / X, d = 1 / o * (u / r), f = X, p = 0;
|
|
2714
|
+
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2715
|
+
if (f === 0 || f >= X) return null;
|
|
2716
|
+
for (let e = f; e < X; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2717
|
+
let m = (1 - c[f]) * o;
|
|
2718
|
+
if (m <= 1 || m > ei) return null;
|
|
2719
|
+
let h = f / X * 100, g = m * r / l * 100;
|
|
2720
|
+
if (h + g >= 100) return null;
|
|
2721
|
+
let _ = [];
|
|
2722
|
+
for (let e = 0; e <= f; e += Qr) _.push(`${Z(c[e])} ${Z(e / X * 100)}%`);
|
|
2723
|
+
return _.push(`${Z(c[f])} ${Z(h)}%`), _.push(`1 ${Z(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2188
2724
|
};
|
|
2189
2725
|
(() => {
|
|
2190
2726
|
try {
|
|
@@ -2192,20 +2728,12 @@ var tn = (e, t, n, r) => {
|
|
|
2192
2728
|
/[?&]flemo-layers=resident\b/.test(location.search) ? sessionStorage.setItem("flemo:layers", "resident") : /[?&]flemo-layers=off\b/.test(location.search) && sessionStorage.removeItem("flemo:layers");
|
|
2193
2729
|
} catch {}
|
|
2194
2730
|
})();
|
|
2195
|
-
var
|
|
2196
|
-
if (_n !== void 0) return _n;
|
|
2197
|
-
try {
|
|
2198
|
-
_n = typeof sessionStorage < "u" && sessionStorage.getItem("flemo:layers") === "resident";
|
|
2199
|
-
} catch {
|
|
2200
|
-
_n = !1;
|
|
2201
|
-
}
|
|
2202
|
-
return _n;
|
|
2203
|
-
}, yn = /* @__PURE__ */ new WeakMap(), bn = Symbol("flemo-layer-owner"), xn = (e, t) => {
|
|
2731
|
+
var ni = /* @__PURE__ */ new WeakMap(), ri = Symbol("flemo-layer-owner"), ii = (e, t) => {
|
|
2204
2732
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2205
|
-
},
|
|
2733
|
+
}, ai = (e, t) => {
|
|
2206
2734
|
let n = e.trim() === "none" ? "" : e.trim();
|
|
2207
2735
|
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2208
|
-
},
|
|
2736
|
+
}, oi = (e, t) => {
|
|
2209
2737
|
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2210
2738
|
for (let e of t.willChange.split(",")) {
|
|
2211
2739
|
let t = e.trim();
|
|
@@ -2216,13 +2744,13 @@ var _n, vn = () => {
|
|
|
2216
2744
|
e.containment && (r = !0);
|
|
2217
2745
|
}
|
|
2218
2746
|
e.style.willChange = [...n].join(", ");
|
|
2219
|
-
let i =
|
|
2747
|
+
let i = ai(t.contain, r);
|
|
2220
2748
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2221
|
-
},
|
|
2222
|
-
let i =
|
|
2749
|
+
}, si = (e, t, n = !1, r = ri) => {
|
|
2750
|
+
let i = fn(t), a = ni.get(e);
|
|
2223
2751
|
if (i.length === 0) {
|
|
2224
2752
|
if (!a) return;
|
|
2225
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending),
|
|
2753
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), ii(e, a), ni.delete(e)) : oi(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), ii(e, a), ni.delete(e));
|
|
2226
2754
|
return;
|
|
2227
2755
|
}
|
|
2228
2756
|
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
@@ -2231,18 +2759,18 @@ var _n, vn = () => {
|
|
|
2231
2759
|
willChange: e.style.willChange,
|
|
2232
2760
|
contain: e.style.contain,
|
|
2233
2761
|
pending: null
|
|
2234
|
-
},
|
|
2762
|
+
}, ni.set(e, a)), a.owners.set(r, {
|
|
2235
2763
|
properties: i,
|
|
2236
2764
|
containment: n
|
|
2237
|
-
}), a.settleOwner = null,
|
|
2238
|
-
},
|
|
2239
|
-
let n =
|
|
2765
|
+
}), a.settleOwner = null, oi(e, a);
|
|
2766
|
+
}, Q = (e, t = ri) => {
|
|
2767
|
+
let n = ni.get(e);
|
|
2240
2768
|
if (!(!n || !n.owners.has(t))) {
|
|
2241
2769
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2242
|
-
|
|
2770
|
+
oi(e, n);
|
|
2243
2771
|
return;
|
|
2244
2772
|
}
|
|
2245
|
-
if (
|
|
2773
|
+
if (wt() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2246
2774
|
n.pending != null && clearTimeout(n.pending), n.pending = null, n.settleOwner = null, e.style.willChange = "transform", n.contain ? e.style.contain = n.contain : e.style.removeProperty("contain");
|
|
2247
2775
|
return;
|
|
2248
2776
|
}
|
|
@@ -2250,42 +2778,253 @@ var _n, vn = () => {
|
|
|
2250
2778
|
guard shields exotic embedders, where an immediate demotion is simply
|
|
2251
2779
|
the pre-hold behavior. */
|
|
2252
2780
|
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2253
|
-
|
|
2781
|
+
ii(e, n), ni.delete(e);
|
|
2254
2782
|
return;
|
|
2255
2783
|
}
|
|
2256
|
-
n
|
|
2257
|
-
xn(e, n), yn.delete(e);
|
|
2258
|
-
}, 300);
|
|
2784
|
+
ci(e, n);
|
|
2259
2785
|
}
|
|
2260
|
-
},
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2786
|
+
}, ci = (e, t) => {
|
|
2787
|
+
t.pending = setTimeout(() => {
|
|
2788
|
+
if (t.pending = null, Yn()) {
|
|
2789
|
+
Zn(() => {
|
|
2790
|
+
ni.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && ci(e, t);
|
|
2791
|
+
});
|
|
2792
|
+
return;
|
|
2793
|
+
}
|
|
2794
|
+
ii(e, t), ni.delete(e);
|
|
2795
|
+
}, 300);
|
|
2796
|
+
}, li = (e, t, n) => {
|
|
2797
|
+
let r = e.driver;
|
|
2798
|
+
return r === "native" || r === "player" ? r : "player";
|
|
2799
|
+
}, ui = 1e3 / 60 * 2, di = "flemo-", fi = /* @__PURE__ */ new WeakMap(), pi = (e, t, n) => {
|
|
2800
|
+
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2801
|
+
let e = r.animationName;
|
|
2802
|
+
if (typeof e != "string" || !e.startsWith(di) || r.playState !== "running" || fi.get(r) === n) continue;
|
|
2803
|
+
let i = r.startTime;
|
|
2804
|
+
typeof i == "number" && (r.startTime = i + t, fi.set(r, n));
|
|
2805
|
+
}
|
|
2806
|
+
}, mi = /* @__PURE__ */ new WeakSet(), hi = 1e3, gi = 3e3;
|
|
2807
|
+
function _i(e, t, n) {
|
|
2808
|
+
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2809
|
+
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2810
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2811
|
+
}, d = () => {
|
|
2812
|
+
for (let e of c) try {
|
|
2813
|
+
e.playState === "paused" && e.play();
|
|
2814
|
+
} catch {}
|
|
2815
|
+
}, f = () => {
|
|
2816
|
+
a || o || (o = !0, u(), r &&= (cancelAnimationFrame(r), 0), d(), n?.());
|
|
2817
|
+
}, p = () => {
|
|
2818
|
+
i = !0, m.disconnect();
|
|
2819
|
+
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2820
|
+
let e = t.animationName;
|
|
2821
|
+
if (typeof e != "string" || !e.startsWith(di) || t.playState !== "running" || mi.has(t)) continue;
|
|
2822
|
+
let n = t.currentTime;
|
|
2823
|
+
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2824
|
+
try {
|
|
2825
|
+
t.pause();
|
|
2826
|
+
} catch {
|
|
2827
|
+
continue;
|
|
2828
|
+
}
|
|
2829
|
+
mi.add(t), c.push(t);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
if (c.length === 0) return;
|
|
2833
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, hi));
|
|
2834
|
+
let e = Si(t, () => {
|
|
2835
|
+
a || n?.();
|
|
2836
|
+
});
|
|
2837
|
+
if (l = e, typeof setTimeout == "function") {
|
|
2838
|
+
let t = setTimeout(() => {
|
|
2839
|
+
l === e && (l = null), e();
|
|
2840
|
+
}, gi), n = e;
|
|
2841
|
+
l = () => {
|
|
2842
|
+
clearTimeout(t), n();
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
}, m = new MutationObserver(() => {
|
|
2846
|
+
i || e.getAttribute("data-flemo-anim-hold") === "false" && p();
|
|
2847
|
+
});
|
|
2848
|
+
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2849
|
+
attributes: !0,
|
|
2850
|
+
attributeFilter: ["data-flemo-anim-hold"]
|
|
2851
|
+
}), () => {
|
|
2852
|
+
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
var vi = 150, yi = 4e3, bi = 400;
|
|
2856
|
+
function xi(e, t, n = !0, r = !1) {
|
|
2857
|
+
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2858
|
+
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2859
|
+
let i = [], a = /* @__PURE__ */ new Map();
|
|
2860
|
+
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2861
|
+
let t = e.animationName;
|
|
2862
|
+
if (typeof t != "string" || !t.startsWith(di) || e.playState !== "running" || mi.has(e)) continue;
|
|
2863
|
+
let n = e.currentTime;
|
|
2864
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (mi.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2865
|
+
}
|
|
2866
|
+
if (i.length === 0) return () => {};
|
|
2867
|
+
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
2868
|
+
if (u) return 0;
|
|
2869
|
+
u = !0;
|
|
2870
|
+
let t = 0;
|
|
2871
|
+
for (let n of i) {
|
|
2872
|
+
if (n.playState !== "running") continue;
|
|
2873
|
+
let r = n.currentTime, i = n.startTime;
|
|
2874
|
+
if (typeof r != "number" || typeof i != "number") continue;
|
|
2875
|
+
let o = (a.get(n) ?? 0) + e;
|
|
2876
|
+
n.startTime = i + (r - o), a.set(n, o);
|
|
2877
|
+
let s = r + yi;
|
|
2878
|
+
t = Math.max(t, s - o);
|
|
2879
|
+
}
|
|
2880
|
+
return t;
|
|
2881
|
+
}, h = (e) => {
|
|
2882
|
+
if (c) return;
|
|
2883
|
+
if (d === null && (d = e), f !== null) {
|
|
2884
|
+
let t = e - f;
|
|
2885
|
+
p += Math.min(Math.max(0, t), ui);
|
|
2886
|
+
}
|
|
2887
|
+
if (f = e, !l) {
|
|
2888
|
+
if (l = !0, r) {
|
|
2889
|
+
u = !0;
|
|
2890
|
+
let e = 0;
|
|
2891
|
+
for (let t of i) {
|
|
2892
|
+
if (t.playState !== "running") continue;
|
|
2893
|
+
let n = t.currentTime, r = t.startTime;
|
|
2894
|
+
if (typeof n != "number" || typeof r != "number") continue;
|
|
2895
|
+
let i = a.get(t) ?? 0;
|
|
2896
|
+
if (n <= i + 33.333333333333336) continue;
|
|
2897
|
+
let o = n - (i + ui);
|
|
2898
|
+
t.startTime = r + o, e = Math.max(e, o);
|
|
2899
|
+
}
|
|
2900
|
+
e > 0 && t?.(e);
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2903
|
+
if (!n) {
|
|
2904
|
+
u = !0, o = requestAnimationFrame(h);
|
|
2905
|
+
return;
|
|
2906
|
+
}
|
|
2907
|
+
for (let e of i) {
|
|
2908
|
+
if (e.playState !== "running") continue;
|
|
2909
|
+
let t = e.startTime;
|
|
2910
|
+
if (typeof t == "number") {
|
|
2911
|
+
e.startTime = t + yi;
|
|
2912
|
+
continue;
|
|
2913
|
+
}
|
|
2914
|
+
let n = e.timeline?.currentTime;
|
|
2915
|
+
typeof n == "number" && (e.startTime = n + yi);
|
|
2916
|
+
}
|
|
2917
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + ui), bi)), o = requestAnimationFrame(h);
|
|
2918
|
+
return;
|
|
2919
|
+
}
|
|
2920
|
+
if (!u) {
|
|
2921
|
+
s !== null && clearTimeout(s);
|
|
2922
|
+
let e = m(p);
|
|
2923
|
+
p = 0, e > 33.333333333333336 && t?.(e), o = requestAnimationFrame(h);
|
|
2924
|
+
return;
|
|
2925
|
+
}
|
|
2926
|
+
let g = 0;
|
|
2927
|
+
for (let e of i) {
|
|
2928
|
+
if (e.playState !== "running") continue;
|
|
2929
|
+
let t = e.currentTime, n = e.startTime;
|
|
2930
|
+
if (typeof t != "number" || typeof n != "number") continue;
|
|
2931
|
+
let r = a.get(e) ?? 0;
|
|
2932
|
+
if (t <= r + p + 33.333333333333336) continue;
|
|
2933
|
+
let i = t - (r + p);
|
|
2934
|
+
e.startTime = n + i, g = Math.max(g, i);
|
|
2935
|
+
}
|
|
2936
|
+
if (g > 0) {
|
|
2937
|
+
t?.(g);
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
e - d < vi && (o = requestAnimationFrame(h));
|
|
2941
|
+
};
|
|
2942
|
+
return o = requestAnimationFrame(h), () => {
|
|
2943
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + ui);
|
|
2944
|
+
};
|
|
2945
|
+
}
|
|
2946
|
+
function Si(e, t) {
|
|
2947
|
+
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2948
|
+
exotic embedders. */
|
|
2949
|
+
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2950
|
+
let n = 0, r = null, i = !1, a = (o) => {
|
|
2951
|
+
if (!i) {
|
|
2952
|
+
if (r !== null) {
|
|
2953
|
+
let n = o - r;
|
|
2954
|
+
if (n > 33.333333333333336) {
|
|
2955
|
+
let r = n - ui;
|
|
2956
|
+
for (let t of e()) t && pi(t, r, o);
|
|
2957
|
+
t?.(r);
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
r = o, n = requestAnimationFrame(a);
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2963
|
+
return n = requestAnimationFrame(a), () => {
|
|
2964
|
+
i = !0, cancelAnimationFrame(n);
|
|
2965
|
+
};
|
|
2966
|
+
}
|
|
2967
|
+
var Ci = /* @__PURE__ */ new WeakMap();
|
|
2968
|
+
function wi(e, t, n, r = !0, i = !1) {
|
|
2969
|
+
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2970
|
+
let a = Ci.get(e);
|
|
2971
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => Ti(e);
|
|
2972
|
+
let o = null, s = !1, c = !1, l = () => {
|
|
2973
|
+
s || c || (s = !0, u.disconnect(), o = xi(t, n, r, i));
|
|
2974
|
+
}, u = new MutationObserver(() => {
|
|
2975
|
+
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2976
|
+
});
|
|
2977
|
+
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2978
|
+
attributes: !0,
|
|
2979
|
+
attributeFilter: ["data-flemo-anim-hold"]
|
|
2980
|
+
}), Ci.set(e, {
|
|
2981
|
+
refs: 1,
|
|
2982
|
+
pendingDrop: null,
|
|
2983
|
+
dispose: () => {
|
|
2984
|
+
c = !0, u.disconnect(), o?.(), Ci.delete(e);
|
|
2985
|
+
}
|
|
2986
|
+
}), () => Ti(e);
|
|
2987
|
+
}
|
|
2988
|
+
var Ti = (e) => {
|
|
2989
|
+
let t = Ci.get(e);
|
|
2990
|
+
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2991
|
+
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2992
|
+
if (typeof setTimeout != "function") {
|
|
2993
|
+
t.dispose();
|
|
2994
|
+
return;
|
|
2995
|
+
}
|
|
2996
|
+
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2997
|
+
}
|
|
2998
|
+
}, Ei = !1, Di = 0, Oi = [], ki = () => {
|
|
2999
|
+
let e = Oi;
|
|
3000
|
+
Oi = [];
|
|
3001
|
+
for (let t of e) t();
|
|
3002
|
+
}, Ai = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), ji = () => {
|
|
3003
|
+
if (Ei || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3004
|
+
Ei = !0;
|
|
3005
|
+
let e = window.fetch.bind(window);
|
|
3006
|
+
window.fetch = (...t) => e(...t).then((e) => Di <= 0 || Ai(e) ? e : new Promise((t) => {
|
|
3007
|
+
Oi.push(() => t(e));
|
|
3008
|
+
}), (e) => {
|
|
3009
|
+
if (Di <= 0) throw e;
|
|
2272
3010
|
return new Promise((t, n) => {
|
|
2273
|
-
|
|
3011
|
+
Oi.push(() => n(e));
|
|
2274
3012
|
});
|
|
2275
3013
|
});
|
|
2276
|
-
},
|
|
2277
|
-
function
|
|
3014
|
+
}, Mi = 2e3;
|
|
3015
|
+
function Ni(e = Mi) {
|
|
2278
3016
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2279
|
-
if (
|
|
2280
|
-
|
|
3017
|
+
if (ji(), !Ei) return () => {};
|
|
3018
|
+
Di += 1;
|
|
2281
3019
|
let t = !1, n = null, r = () => {
|
|
2282
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
3020
|
+
t || (t = !0, n !== null && clearTimeout(n), Di = Math.max(0, Di - 1), Di === 0 && ki());
|
|
2283
3021
|
};
|
|
2284
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
3022
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(Mi, e))), r;
|
|
2285
3023
|
}
|
|
3024
|
+
ji();
|
|
2286
3025
|
//#endregion
|
|
2287
3026
|
//#region src/core/engine/transitionPlayer.ts
|
|
2288
|
-
var
|
|
3027
|
+
var Pi = [
|
|
2289
3028
|
"x",
|
|
2290
3029
|
"y",
|
|
2291
3030
|
"z",
|
|
@@ -2296,7 +3035,7 @@ var Nn = [
|
|
|
2296
3035
|
"rotateX",
|
|
2297
3036
|
"rotateY",
|
|
2298
3037
|
"rotateZ"
|
|
2299
|
-
],
|
|
3038
|
+
], Fi = new Set(Pi), Ii = {
|
|
2300
3039
|
x: 0,
|
|
2301
3040
|
y: 0,
|
|
2302
3041
|
z: 0,
|
|
@@ -2307,7 +3046,7 @@ var Nn = [
|
|
|
2307
3046
|
rotateX: 0,
|
|
2308
3047
|
rotateY: 0,
|
|
2309
3048
|
rotateZ: 0
|
|
2310
|
-
},
|
|
3049
|
+
}, Li = (e, t) => {
|
|
2311
3050
|
if (typeof t == "number") return {
|
|
2312
3051
|
value: t,
|
|
2313
3052
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -2326,18 +3065,18 @@ var Nn = [
|
|
|
2326
3065
|
value: i,
|
|
2327
3066
|
unit: a === "" && i === 0 ? "px" : a
|
|
2328
3067
|
};
|
|
2329
|
-
},
|
|
2330
|
-
let n = e.match(
|
|
2331
|
-
if (n.length !== r.length || e.replace(
|
|
3068
|
+
}, Ri = /-?\d*\.?\d+/g, zi = (e, t) => {
|
|
3069
|
+
let n = e.match(Ri) ?? [], r = t.match(Ri) ?? [];
|
|
3070
|
+
if (n.length !== r.length || e.replace(Ri, " ") !== t.replace(Ri, " ")) return null;
|
|
2332
3071
|
let i = n.map(Number), a = r.map(Number);
|
|
2333
3072
|
return (t) => {
|
|
2334
3073
|
let n = 0;
|
|
2335
|
-
return e.replace(
|
|
3074
|
+
return e.replace(Ri, () => {
|
|
2336
3075
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
2337
3076
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
2338
3077
|
});
|
|
2339
3078
|
};
|
|
2340
|
-
},
|
|
3079
|
+
}, Bi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Vi = (e) => typeof e == "object" && !!e && !Array.isArray(e), Hi = (e) => Vi(e) ? Object.keys(e) : [], Ui = (e, t) => Vi(e) ? e[t] : void 0, Wi = {
|
|
2341
3080
|
x: 0,
|
|
2342
3081
|
y: 0,
|
|
2343
3082
|
z: 0,
|
|
@@ -2348,41 +3087,41 @@ var Nn = [
|
|
|
2348
3087
|
rotateX: 2,
|
|
2349
3088
|
rotateY: 2,
|
|
2350
3089
|
rotateZ: 2
|
|
2351
|
-
},
|
|
3090
|
+
}, Gi = (e) => {
|
|
2352
3091
|
let t = 0, n = -1;
|
|
2353
3092
|
for (let r of e) {
|
|
2354
|
-
if (!
|
|
2355
|
-
let e =
|
|
3093
|
+
if (!Fi.has(r)) continue;
|
|
3094
|
+
let e = Wi[r];
|
|
2356
3095
|
if (e < t) return !1;
|
|
2357
3096
|
if (t = e, e === 2) {
|
|
2358
|
-
let e =
|
|
3097
|
+
let e = Pi.indexOf(r);
|
|
2359
3098
|
if (e < n) return !1;
|
|
2360
3099
|
n = e;
|
|
2361
3100
|
}
|
|
2362
3101
|
}
|
|
2363
3102
|
return !0;
|
|
2364
|
-
},
|
|
3103
|
+
}, Ki = (e) => {
|
|
2365
3104
|
let t = [];
|
|
2366
3105
|
for (let n of e) {
|
|
2367
|
-
if (!
|
|
2368
|
-
let e =
|
|
3106
|
+
if (!Fi.has(n)) continue;
|
|
3107
|
+
let e = Wi[n] === 0 ? "T" : n;
|
|
2369
3108
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
2370
3109
|
}
|
|
2371
3110
|
return t;
|
|
2372
|
-
},
|
|
2373
|
-
let n =
|
|
3111
|
+
}, qi = (e, t) => {
|
|
3112
|
+
let n = Ki(e), r = Ki(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
2374
3113
|
return i.every((e, t) => a[t] === e);
|
|
2375
|
-
},
|
|
2376
|
-
let n =
|
|
2377
|
-
if (!
|
|
3114
|
+
}, Ji = (e, t) => {
|
|
3115
|
+
let n = Hi(e.from), r = Hi(e.to);
|
|
3116
|
+
if (!Gi(n) || !Gi(r) || !qi(n, r)) return null;
|
|
2378
3117
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
2379
3118
|
for (let n of i) {
|
|
2380
|
-
let r =
|
|
2381
|
-
if (
|
|
3119
|
+
let r = Ui(e.from, n), i = Ui(e.to, n);
|
|
3120
|
+
if (Fi.has(n)) {
|
|
2382
3121
|
let e = n, o = {
|
|
2383
|
-
value:
|
|
3122
|
+
value: Ii[e],
|
|
2384
3123
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
2385
|
-
}, s = r === void 0 ? o :
|
|
3124
|
+
}, s = r === void 0 ? o : Li(e, r), c = i === void 0 ? o : Li(e, i);
|
|
2386
3125
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
2387
3126
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
2388
3127
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -2413,15 +3152,15 @@ var Nn = [
|
|
|
2413
3152
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
2414
3153
|
if (l === u) {
|
|
2415
3154
|
c.push({
|
|
2416
|
-
property:
|
|
3155
|
+
property: Bi(n),
|
|
2417
3156
|
value: l
|
|
2418
3157
|
});
|
|
2419
3158
|
continue;
|
|
2420
3159
|
}
|
|
2421
|
-
let d =
|
|
3160
|
+
let d = zi(l, u);
|
|
2422
3161
|
if (!d) return null;
|
|
2423
3162
|
s.push({
|
|
2424
|
-
property:
|
|
3163
|
+
property: Bi(n),
|
|
2425
3164
|
mix: d
|
|
2426
3165
|
});
|
|
2427
3166
|
}
|
|
@@ -2431,116 +3170,79 @@ var Nn = [
|
|
|
2431
3170
|
strings: s,
|
|
2432
3171
|
constants: c
|
|
2433
3172
|
};
|
|
2434
|
-
},
|
|
2435
|
-
if (
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
return Yn;
|
|
2443
|
-
}, Zn, Qn = () => {
|
|
2444
|
-
if (Zn !== void 0) return Zn;
|
|
2445
|
-
try {
|
|
2446
|
-
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:handoff") : null;
|
|
2447
|
-
Zn = e === "on" ? e : null;
|
|
2448
|
-
} catch {
|
|
2449
|
-
Zn = null;
|
|
3173
|
+
}, Yi = 1, Xi = 1e3 / 60, Zi = (e) => !N() && e > 0 && e < 3, Qi = .6, $i = 600, ea = (e, t) => {
|
|
3174
|
+
if (!rt()) return !1;
|
|
3175
|
+
for (let n of e.transforms) {
|
|
3176
|
+
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3177
|
+
let e = Math.abs(n.to.value - n.from.value);
|
|
3178
|
+
if (n.from.unit === "%") {
|
|
3179
|
+
if (e / 100 >= Qi) return !1;
|
|
3180
|
+
} else if (e * Math.max(1, t) >= $i) return !1;
|
|
2450
3181
|
}
|
|
2451
|
-
return
|
|
2452
|
-
},
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
let
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
2468
|
-
let e = l === "x" ? r.x : r.y, t = er(), s = (t === "always" || t === null && tr(n) || t !== "off" && (e === null || Math.abs(d - e) * n >= Jn)) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
2469
|
-
l === "x" ? (r.x = d, i = s) : (r.y = d, a = s), o = !0, s !== 0 && (c = !1);
|
|
3182
|
+
return !0;
|
|
3183
|
+
}, ta = 12, na = (e, t, n, r, i = Xi) => {
|
|
3184
|
+
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3185
|
+
for (let u of Pi) {
|
|
3186
|
+
let d = e.find((e) => e.prop === u);
|
|
3187
|
+
if (!d) continue;
|
|
3188
|
+
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3189
|
+
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3190
|
+
let e = u === "x" ? r.x : r.y, t = vt(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && Zi(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= bt() : e === null || c * Xi / Math.max(1, i) >= Yi, h = d.to.value;
|
|
3191
|
+
d.from.unit === "%" && (h *= d.percentBase);
|
|
3192
|
+
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <= ta), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3193
|
+
if (b) {
|
|
3194
|
+
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3195
|
+
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
3196
|
+
} else n > 0 && v < 1 ? (S = Math.round(h * 1e3) / 1e3, r[x] = null) : (S = m && n > 0 ? Math.round(f * n) / n : Math.round(f * 1e3) / 1e3, r[x] = S);
|
|
3197
|
+
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
2470
3198
|
continue;
|
|
2471
3199
|
}
|
|
2472
|
-
let
|
|
2473
|
-
|
|
3200
|
+
let p = Ii[u];
|
|
3201
|
+
f !== p && (l = !1), u === "z" ? c.push(`translateZ(${f}px)`) : u === "scale" ? c.push(`scale(${f})`) : u === "scaleX" ? c.push(`scaleX(${f})`) : u === "scaleY" ? c.push(`scaleY(${f})`) : u === "rotate" || u === "rotateZ" ? c.push(`rotate(${f}deg)`) : u === "rotateX" ? c.push(`rotateX(${f}deg)`) : u === "rotateY" && c.push(`rotateY(${f}deg)`);
|
|
2474
3202
|
}
|
|
2475
|
-
return !
|
|
2476
|
-
},
|
|
3203
|
+
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3204
|
+
}, ra = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ia = (e) => {
|
|
2477
3205
|
let t = {};
|
|
2478
|
-
for (let n of
|
|
3206
|
+
for (let n of pn(e)) t[ra(n.property)] = n.value;
|
|
2479
3207
|
return t;
|
|
2480
|
-
},
|
|
3208
|
+
}, aa = (e, t) => {
|
|
2481
3209
|
if (typeof e.animate != "function") return null;
|
|
2482
3210
|
try {
|
|
2483
|
-
let n = e.animate([
|
|
3211
|
+
let n = e.animate([ia(t.from), ia(t.to)], {
|
|
2484
3212
|
duration: Math.max(0, t.duration * 1e3),
|
|
2485
3213
|
delay: Math.max(0, t.delay * 1e3),
|
|
2486
|
-
easing:
|
|
3214
|
+
easing: mn(t.ease),
|
|
2487
3215
|
fill: "both"
|
|
2488
3216
|
});
|
|
2489
3217
|
return n.pause(), n.currentTime = 0, n;
|
|
2490
3218
|
} catch {
|
|
2491
3219
|
return null;
|
|
2492
3220
|
}
|
|
2493
|
-
},
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
let c = e.find((e) => e.prop === s);
|
|
2497
|
-
if (!c) continue;
|
|
2498
|
-
let l = c.from.value + (c.to.value - c.from.value) * t;
|
|
2499
|
-
if (c.from.unit === "%" && (l *= c.percentBase), l = mr(l), s === "x" || s === "y") {
|
|
2500
|
-
s === "x" ? n = l : r = l, i = !0, l !== 0 && (o = !1);
|
|
2501
|
-
continue;
|
|
2502
|
-
}
|
|
2503
|
-
l !== Fn[s] && (o = !1), s === "z" ? a.push(`translateZ(${l}px)`) : s === "scale" ? a.push(`scale(${l})`) : s === "scaleX" ? a.push(`scaleX(${l})`) : s === "scaleY" ? a.push(`scaleY(${l})`) : s === "rotate" || s === "rotateZ" ? a.push(`rotate(${l}deg)`) : s === "rotateX" ? a.push(`rotateX(${l}deg)`) : s === "rotateY" && a.push(`rotateY(${l}deg)`);
|
|
2504
|
-
}
|
|
2505
|
-
return !i && a.length === 0 ? "" : o ? "none" : [...i ? [`translate3d(${n}px, ${r}px, 0)`] : [], ...a].join(" ");
|
|
2506
|
-
}, gr = (e, t, n) => {
|
|
2507
|
-
let r = [];
|
|
2508
|
-
for (let i = 0; i < pr; i += 1) {
|
|
2509
|
-
let a = t(n + i / 40 * (1 - n)), o = {};
|
|
2510
|
-
if (e.transforms.length > 0) {
|
|
2511
|
-
let t = hr(e.transforms, a);
|
|
2512
|
-
t !== "" && (o.transform = t);
|
|
2513
|
-
}
|
|
2514
|
-
e.opacity && (o.opacity = `${mr(e.opacity.from + (e.opacity.to - e.opacity.from) * a)}`);
|
|
2515
|
-
for (let t of e.strings) o[rr(t.property)] = t.mix(a);
|
|
2516
|
-
if (i === 0 || i === 40) for (let t of e.constants) o[rr(t.property)] = t.value;
|
|
2517
|
-
r.push(o);
|
|
2518
|
-
}
|
|
2519
|
-
return r;
|
|
2520
|
-
}, _r = () => ({
|
|
3221
|
+
}, oa = 1.6, sa = 1e3 / 600, ca = 28, la = 42, ua = Xi, da = () => ua, fa = (e) => {
|
|
3222
|
+
Number.isFinite(e) && (e < sa || e > la || (ua = Math.min(Xi, Math.max(sa, e))));
|
|
3223
|
+
}, pa = () => ({
|
|
2521
3224
|
request: (e) => requestAnimationFrame(e),
|
|
2522
3225
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2523
3226
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2524
|
-
}),
|
|
3227
|
+
}), ma = ((e = pa()) => {
|
|
2525
3228
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2526
3229
|
join: (n, r) => {
|
|
2527
|
-
let i =
|
|
3230
|
+
let i = mt() === "scrub", s = !i && !N() && gt() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : Ji(r.motion, r.element), l = !c || s ? aa(r.element, r.motion) : null, u = l ? null : c;
|
|
2528
3231
|
if (!u && !l) return null;
|
|
2529
3232
|
let d = t.get(n);
|
|
2530
3233
|
d || (d = {
|
|
2531
3234
|
tracks: [],
|
|
2532
|
-
frameIntervalMs:
|
|
3235
|
+
frameIntervalMs: ua,
|
|
2533
3236
|
recentGaps: [],
|
|
2534
3237
|
navCutMs: null,
|
|
2535
3238
|
navComplete: null,
|
|
2536
3239
|
navCompleted: !1,
|
|
2537
3240
|
started: !1,
|
|
2538
|
-
ended: !1,
|
|
2539
3241
|
startTime: null,
|
|
2540
3242
|
lastTime: null,
|
|
2541
3243
|
frameHandle: null
|
|
2542
3244
|
}, t.set(n, d));
|
|
2543
|
-
let f =
|
|
3245
|
+
let f = Y(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
2544
3246
|
...r,
|
|
2545
3247
|
onComplete: void 0,
|
|
2546
3248
|
parsed: u,
|
|
@@ -2553,19 +3255,20 @@ var Nn = [
|
|
|
2553
3255
|
detached: !1,
|
|
2554
3256
|
snapMemory: {
|
|
2555
3257
|
x: null,
|
|
2556
|
-
y: null
|
|
3258
|
+
y: null,
|
|
3259
|
+
glide: u ? ea(u, e.devicePixelRatio() || 1) : !1
|
|
2557
3260
|
}
|
|
2558
3261
|
};
|
|
2559
3262
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
2560
3263
|
let m = Symbol("flemo-player-track");
|
|
2561
|
-
if (
|
|
2562
|
-
u.transforms.length > 0 &&
|
|
2563
|
-
for (let e of u.strings)
|
|
2564
|
-
for (let e of u.constants)
|
|
3264
|
+
if (Rn.takeover(p.element), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3265
|
+
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3266
|
+
for (let e of u.strings) U(p.element, e.property, m);
|
|
3267
|
+
for (let e of u.constants) U(p.element, e.property, m);
|
|
2565
3268
|
a(p, 0);
|
|
2566
3269
|
}
|
|
2567
|
-
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0,
|
|
2568
|
-
p.detached = !0, p.scrub?.cancel(),
|
|
3270
|
+
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3271
|
+
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
2569
3272
|
let r = t.get(n);
|
|
2570
3273
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2571
3274
|
};
|
|
@@ -2580,106 +3283,95 @@ var Nn = [
|
|
|
2580
3283
|
}
|
|
2581
3284
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2582
3285
|
let t = r.get(e);
|
|
2583
|
-
return t || (t =
|
|
3286
|
+
return t || (t = Ur(e.motion.ease), r.set(e, t)), t;
|
|
2584
3287
|
};
|
|
2585
|
-
function a(t, n) {
|
|
2586
|
-
let { element:
|
|
2587
|
-
if (!(!
|
|
2588
|
-
if (
|
|
2589
|
-
let
|
|
2590
|
-
|
|
3288
|
+
function a(t, n, r) {
|
|
3289
|
+
let { element: i, parsed: a } = t;
|
|
3290
|
+
if (!(!a || !i.isConnected)) {
|
|
3291
|
+
if (a.transforms.length > 0) {
|
|
3292
|
+
let o = na(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3293
|
+
o !== "" && (i.style.transform = o);
|
|
2591
3294
|
}
|
|
2592
|
-
if (
|
|
2593
|
-
let { from: e, to: t } =
|
|
2594
|
-
|
|
3295
|
+
if (a.opacity) {
|
|
3296
|
+
let { from: e, to: t } = a.opacity, r = e + (t - e) * n;
|
|
3297
|
+
i.style.opacity = `${Math.round(r * 255) / 255}`;
|
|
2595
3298
|
}
|
|
2596
|
-
for (let e of
|
|
2597
|
-
if (n === 0) for (let e of
|
|
3299
|
+
for (let e of a.strings) i.style.setProperty(e.property, e.mix(n));
|
|
3300
|
+
if (n === 0) for (let e of a.constants) i.style.setProperty(e.property, e.value);
|
|
2598
3301
|
}
|
|
2599
3302
|
}
|
|
2600
3303
|
function o(t, n) {
|
|
2601
3304
|
n.frameHandle = e.request((e) => {
|
|
2602
|
-
n.frameHandle = null,
|
|
3305
|
+
n.frameHandle = null, c(t, n, e);
|
|
2603
3306
|
});
|
|
2604
3307
|
}
|
|
2605
|
-
function s(e) {
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
let o = r.element, c = Math.max(0, r.motion.delay * 1e3), l = Math.max(0, r.motion.duration * 1e3), u = Math.max(0, c - a), d = Math.max(0, a - c), f = l - d;
|
|
2610
|
-
if (f <= 0) return r.handoff = !1, !1;
|
|
2611
|
-
let p = r.remainderPlan;
|
|
2612
|
-
if (!p) return r.handoff = !1, !1;
|
|
2613
|
-
let m = i(r), h = l > 0 ? d / l : 0;
|
|
2614
|
-
if (!(1 - m(h) > .001)) return r.handoff = !1, !1;
|
|
2615
|
-
let g;
|
|
3308
|
+
function s(e, n, r, a) {
|
|
3309
|
+
let o = r.element, s = Math.max(0, r.motion.delay * 1e3), c = Math.max(0, r.motion.duration * 1e3), l = typeof r.scrub?.currentTime == "number" ? r.scrub.currentTime : a, u = Math.max(0, l - s);
|
|
3310
|
+
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3311
|
+
let d;
|
|
2616
3312
|
try {
|
|
2617
|
-
|
|
2618
|
-
duration:
|
|
2619
|
-
delay: u,
|
|
2620
|
-
easing:
|
|
3313
|
+
d = o.animate([ia(r.motion.from), ia(r.motion.to)], {
|
|
3314
|
+
duration: c,
|
|
3315
|
+
delay: -u,
|
|
3316
|
+
easing: mn(r.motion.ease),
|
|
2621
3317
|
fill: "both"
|
|
2622
3318
|
});
|
|
2623
3319
|
} catch {
|
|
2624
3320
|
return r.handoff = !1, !1;
|
|
2625
3321
|
}
|
|
2626
|
-
|
|
2627
|
-
r.completed || r.detached || (r.completed = !0, r.onComplete?.(), t.get(e) === n && n.tracks.every((e) => e.completed || e.detached) && (n.navCompleted || (n.navCompleted = !0, n.navComplete?.()),
|
|
2628
|
-
},
|
|
2629
|
-
let e = window.__flemoHandoffs ??= [];
|
|
2630
|
-
e.push(Math.round(a)), e.length > 100 && e.splice(0, e.length - 100);
|
|
2631
|
-
}
|
|
2632
|
-
return !0;
|
|
3322
|
+
return r.scrub.cancel(), r.scrub = d, r.handedOff = !0, d.onfinish = () => {
|
|
3323
|
+
r.completed || r.detached || (r.completed = !0, r.onComplete?.(), t.get(e) === n && n.tracks.every((e) => e.completed || e.detached) && (n.navCompleted || (n.navCompleted = !0, n.navComplete?.()), t.delete(e)));
|
|
3324
|
+
}, !0;
|
|
2633
3325
|
}
|
|
2634
|
-
function
|
|
2635
|
-
let
|
|
3326
|
+
function c(e, r, c) {
|
|
3327
|
+
let l = r.startTime ?? c;
|
|
2636
3328
|
if (r.lastTime !== null) {
|
|
2637
|
-
let e =
|
|
2638
|
-
if (
|
|
3329
|
+
let e = c - r.lastTime;
|
|
3330
|
+
if (n.onFrameGap?.(e), e >= sa && e <= la) {
|
|
2639
3331
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
2640
|
-
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 >=
|
|
2641
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3332
|
+
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >= ca);
|
|
3333
|
+
r.frameIntervalMs = Math.min(i ? la : Xi, Math.max(sa, n)), ua = r.frameIntervalMs, n < 12 && tt(n, t[t.length - 1]);
|
|
2642
3334
|
}
|
|
2643
|
-
e >
|
|
3335
|
+
e > oa * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
2644
3336
|
}
|
|
2645
|
-
r.startTime =
|
|
2646
|
-
let
|
|
3337
|
+
r.startTime = l, r.lastTime = c;
|
|
3338
|
+
let u = !0, d = !1;
|
|
2647
3339
|
for (let t of r.tracks) {
|
|
2648
3340
|
if (t.completed || t.detached) continue;
|
|
2649
|
-
let n = t.motion.duration * 1e3, o = t.motion.delay * 1e3,
|
|
2650
|
-
if (r.navCutMs !== null &&
|
|
3341
|
+
let n = t.motion.duration * 1e3, o = t.motion.delay * 1e3, f = c - l;
|
|
3342
|
+
if (r.navCutMs !== null && f >= r.navCutMs) {
|
|
3343
|
+
if (!t.scrub && (t.snapMemory.pendingLanding = !1, a(t, 1, r.frameIntervalMs), t.snapMemory.pendingLanding)) {
|
|
3344
|
+
u = !1, d = !0;
|
|
3345
|
+
continue;
|
|
3346
|
+
}
|
|
2651
3347
|
t.completed = !0, t.onComplete?.();
|
|
2652
3348
|
continue;
|
|
2653
3349
|
}
|
|
2654
3350
|
if (t.scrub) {
|
|
2655
3351
|
if (t.handedOff) {
|
|
2656
|
-
|
|
3352
|
+
u = !1;
|
|
2657
3353
|
continue;
|
|
2658
3354
|
}
|
|
2659
|
-
let i = o + n, a = Math.min(Math.max(0,
|
|
2660
|
-
if (t.handoff &&
|
|
2661
|
-
|
|
3355
|
+
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3356
|
+
if (t.handoff && f >= St() && f < i && s(e, r, t, a)) {
|
|
3357
|
+
u = !1;
|
|
2662
3358
|
continue;
|
|
2663
3359
|
}
|
|
2664
|
-
t.scrub.currentTime = a,
|
|
3360
|
+
t.scrub.currentTime = a, f >= i ? (t.completed = !0, t.onComplete?.()) : (u = !1, d = !0);
|
|
2665
3361
|
continue;
|
|
2666
3362
|
}
|
|
2667
|
-
let p = n <= 0 ? 1 : Math.min(1, Math.max(0, (
|
|
2668
|
-
a(t, i(t)(p)), p >= 1 ? (t.completed = !0, t.onComplete?.()) : (
|
|
3363
|
+
let p = n <= 0 ? 1 : Math.min(1, Math.max(0, (f - o) / n));
|
|
3364
|
+
p >= 1 && (t.snapMemory.pendingLanding = !1), a(t, i(t)(p), r.frameIntervalMs), p >= 1 && !t.snapMemory.pendingLanding ? (t.completed = !0, t.onComplete?.()) : (u = !1, d = !0);
|
|
2669
3365
|
}
|
|
2670
|
-
if (
|
|
2671
|
-
r.navCompleted || (r.navCompleted = !0, r.navComplete?.()),
|
|
3366
|
+
if (u) {
|
|
3367
|
+
r.navCompleted || (r.navCompleted = !0, r.navComplete?.()), t.delete(e);
|
|
2672
3368
|
return;
|
|
2673
3369
|
}
|
|
2674
|
-
|
|
2675
|
-
s(r);
|
|
2676
|
-
return;
|
|
2677
|
-
}
|
|
2678
|
-
o(e, r);
|
|
3370
|
+
d && o(e, r);
|
|
2679
3371
|
}
|
|
2680
3372
|
return n;
|
|
2681
3373
|
})();
|
|
2682
|
-
|
|
3374
|
+
ma.onFrameGap = (e) => {
|
|
2683
3375
|
if (typeof window < "u") {
|
|
2684
3376
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2685
3377
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2687,152 +3379,39 @@ vr.onFrameGap = (e) => {
|
|
|
2687
3379
|
};
|
|
2688
3380
|
//#endregion
|
|
2689
3381
|
//#region src/core/engine/types.ts
|
|
2690
|
-
var
|
|
2691
|
-
let r = e.driver;
|
|
2692
|
-
return r === "native" || r === "player" ? r : "player";
|
|
2693
|
-
}, xr = 1e3 / 60 * 2, Sr = "flemo-", Cr = /* @__PURE__ */ new WeakMap(), wr = (e, t, n) => {
|
|
2694
|
-
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2695
|
-
let e = r.animationName;
|
|
2696
|
-
if (typeof e != "string" || !e.startsWith(Sr) || r.playState !== "running" || Cr.get(r) === n) continue;
|
|
2697
|
-
let i = r.startTime;
|
|
2698
|
-
typeof i == "number" && (r.startTime = i + t, Cr.set(r, n));
|
|
2699
|
-
}
|
|
2700
|
-
}, Tr = /* @__PURE__ */ new WeakSet(), Er = 1e3, Dr = 3e3;
|
|
2701
|
-
function Or(e, t, n) {
|
|
2702
|
-
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2703
|
-
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2704
|
-
s !== null && (clearTimeout(s), s = null);
|
|
2705
|
-
}, d = () => {
|
|
2706
|
-
for (let e of c) try {
|
|
2707
|
-
e.playState === "paused" && e.play();
|
|
2708
|
-
} catch {}
|
|
2709
|
-
}, f = () => {
|
|
2710
|
-
a || o || (o = !0, u(), r &&= (cancelAnimationFrame(r), 0), d(), n?.());
|
|
2711
|
-
}, p = () => {
|
|
2712
|
-
i = !0, m.disconnect();
|
|
2713
|
-
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2714
|
-
let e = t.animationName;
|
|
2715
|
-
if (typeof e != "string" || !e.startsWith(Sr) || t.playState !== "running" || Tr.has(t)) continue;
|
|
2716
|
-
let n = t.currentTime;
|
|
2717
|
-
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2718
|
-
try {
|
|
2719
|
-
t.pause();
|
|
2720
|
-
} catch {
|
|
2721
|
-
continue;
|
|
2722
|
-
}
|
|
2723
|
-
Tr.add(t), c.push(t);
|
|
2724
|
-
}
|
|
2725
|
-
}
|
|
2726
|
-
if (c.length === 0) return;
|
|
2727
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, Er));
|
|
2728
|
-
let e = jr(t, () => {
|
|
2729
|
-
a || n?.();
|
|
2730
|
-
});
|
|
2731
|
-
if (l = e, typeof setTimeout == "function") {
|
|
2732
|
-
let t = setTimeout(() => {
|
|
2733
|
-
l === e && (l = null), e();
|
|
2734
|
-
}, Dr), n = e;
|
|
2735
|
-
l = () => {
|
|
2736
|
-
clearTimeout(t), n();
|
|
2737
|
-
};
|
|
2738
|
-
}
|
|
2739
|
-
}, m = new MutationObserver(() => {
|
|
2740
|
-
i || e.getAttribute("data-flemo-anim-hold") === "false" && p();
|
|
2741
|
-
});
|
|
2742
|
-
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2743
|
-
attributes: !0,
|
|
2744
|
-
attributeFilter: ["data-flemo-anim-hold"]
|
|
2745
|
-
}), () => {
|
|
2746
|
-
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2747
|
-
};
|
|
2748
|
-
}
|
|
2749
|
-
var kr = 150;
|
|
2750
|
-
function Ar(e, t) {
|
|
2751
|
-
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2752
|
-
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2753
|
-
let n = [], r = /* @__PURE__ */ new Map();
|
|
2754
|
-
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2755
|
-
let t = e.animationName;
|
|
2756
|
-
if (typeof t != "string" || !t.startsWith(Sr) || e.playState !== "running" || Tr.has(e)) continue;
|
|
2757
|
-
let i = e.currentTime;
|
|
2758
|
-
typeof i != "number" || i > 33.333333333333336 || (Tr.add(e), n.push(e), r.set(e, i));
|
|
2759
|
-
}
|
|
2760
|
-
if (n.length === 0) return () => {};
|
|
2761
|
-
let i = 0, a = !1, o = null, s = null, c = 0, l = (e) => {
|
|
2762
|
-
if (a) return;
|
|
2763
|
-
if (o === null && (o = e), s !== null) {
|
|
2764
|
-
let t = e - s;
|
|
2765
|
-
c += Math.min(Math.max(0, t), xr);
|
|
2766
|
-
}
|
|
2767
|
-
s = e;
|
|
2768
|
-
let u = 0;
|
|
2769
|
-
for (let e of n) {
|
|
2770
|
-
if (e.playState !== "running") continue;
|
|
2771
|
-
let t = e.currentTime, n = e.startTime;
|
|
2772
|
-
if (typeof t != "number" || typeof n != "number") continue;
|
|
2773
|
-
let i = r.get(e) ?? 0;
|
|
2774
|
-
if (t <= i + c + 33.333333333333336) continue;
|
|
2775
|
-
let a = t - (i + c);
|
|
2776
|
-
e.startTime = n + a, u = Math.max(u, a);
|
|
2777
|
-
}
|
|
2778
|
-
if (u > 0) {
|
|
2779
|
-
t?.(u);
|
|
2780
|
-
return;
|
|
2781
|
-
}
|
|
2782
|
-
e - o < kr && (i = requestAnimationFrame(l));
|
|
2783
|
-
};
|
|
2784
|
-
return i = requestAnimationFrame(l), () => {
|
|
2785
|
-
a = !0, cancelAnimationFrame(i);
|
|
2786
|
-
};
|
|
2787
|
-
}
|
|
2788
|
-
function jr(e, t) {
|
|
2789
|
-
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2790
|
-
exotic embedders. */
|
|
2791
|
-
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2792
|
-
let n = 0, r = null, i = !1, a = (o) => {
|
|
2793
|
-
if (!i) {
|
|
2794
|
-
if (r !== null) {
|
|
2795
|
-
let n = o - r;
|
|
2796
|
-
if (n > 33.333333333333336) {
|
|
2797
|
-
let r = n - xr;
|
|
2798
|
-
for (let t of e()) t && wr(t, r, o);
|
|
2799
|
-
t?.(r);
|
|
2800
|
-
}
|
|
2801
|
-
}
|
|
2802
|
-
r = o, n = requestAnimationFrame(a);
|
|
2803
|
-
}
|
|
2804
|
-
};
|
|
2805
|
-
return n = requestAnimationFrame(a), () => {
|
|
2806
|
-
i = !0, cancelAnimationFrame(n);
|
|
2807
|
-
};
|
|
2808
|
-
}
|
|
2809
|
-
//#endregion
|
|
2810
|
-
//#region src/core/engine/createTransitionEngine.ts
|
|
2811
|
-
var Z = () => {}, Mr = 400, Nr = 4, Pr = 100, Fr = 1500, Ir = "data-flemo-part-name", Lr = /* @__PURE__ */ new WeakMap(), Rr = (e) => {
|
|
3382
|
+
var ha = "data-flemo-skip-animation", $ = () => {}, ga = 400, _a = 4, va = 100, ya = 1500, ba = "data-flemo-part-name", xa = /* @__PURE__ */ new WeakMap(), Sa = "data-flemo-anim-hold", Ca = (e) => {
|
|
2812
3383
|
let t = e.parentElement ?? e;
|
|
2813
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3384
|
+
return Array.from(t.querySelectorAll(`[${ba}]`)).filter((n) => {
|
|
2814
3385
|
let r = n.closest("[data-flemo-screen]");
|
|
2815
3386
|
return !r || r === e || !t.contains(r);
|
|
2816
3387
|
});
|
|
2817
|
-
},
|
|
3388
|
+
}, wa = (e, t) => {
|
|
2818
3389
|
let [n, r] = t.split("-");
|
|
2819
|
-
return
|
|
2820
|
-
},
|
|
3390
|
+
return Ca(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3391
|
+
}, Ta = (e, t) => {
|
|
2821
3392
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
2822
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3393
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ba}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
2823
3394
|
if (n === null) return !0;
|
|
2824
3395
|
let t = e.closest("[data-flemo-router]");
|
|
2825
3396
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
2826
3397
|
});
|
|
2827
|
-
},
|
|
3398
|
+
}, Ea = (e, t) => Ta(e, t).filter((e) => e.parentElement?.closest(`[${Sa}]`) == null), Da = (e) => {
|
|
3399
|
+
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3400
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ba}][${Sa}]`)).filter((e) => {
|
|
3401
|
+
if (e.parentElement?.closest(`[${Sa}]`) != null) return !1;
|
|
3402
|
+
if (t === null) return !0;
|
|
3403
|
+
let n = e.closest("[data-flemo-router]");
|
|
3404
|
+
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3405
|
+
});
|
|
3406
|
+
}, Oa = (e, t, n) => {
|
|
2828
3407
|
let r = 0;
|
|
2829
3408
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2830
3409
|
if (!H(t, e)) continue;
|
|
2831
3410
|
let n = B(t, e);
|
|
2832
3411
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
2833
3412
|
}
|
|
2834
|
-
for (let t of
|
|
2835
|
-
let e = z.get(t.getAttribute(
|
|
3413
|
+
for (let t of Ta(e, n)) {
|
|
3414
|
+
let e = z.get(t.getAttribute(ba)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
2836
3415
|
if (!e || !H(e, i)) continue;
|
|
2837
3416
|
let a = B(e, i);
|
|
2838
3417
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
@@ -2844,46 +3423,58 @@ var Z = () => {}, Mr = 400, Nr = 4, Pr = 100, Fr = 1500, Ir = "data-flemo-part-n
|
|
|
2844
3423
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
2845
3424
|
}
|
|
2846
3425
|
return r;
|
|
2847
|
-
},
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
let
|
|
3426
|
+
}, ka = (e) => e === "POPPING" && !ct() || e === "PUSHING" && st() && !ct(), Aa = 12, ja = null, Ma = () => {
|
|
3427
|
+
ja = typeof requestAnimationFrame == "function" ? requestAnimationFrame(Ma) : null;
|
|
3428
|
+
}, Na = () => (ja === null && typeof requestAnimationFrame == "function" && (ja = requestAnimationFrame(Ma)), $), Pa = !1, Fa = 0, Ia = () => {
|
|
3429
|
+
Pa &&= (Fa += 1, !1);
|
|
3430
|
+
}, La = 2, Ra = 8, za = () => {
|
|
3431
|
+
if (Pa || typeof requestAnimationFrame != "function") return;
|
|
3432
|
+
Pa = !0;
|
|
3433
|
+
let e = ++Fa, t = [], n = La, r = null, i = (a) => {
|
|
3434
|
+
if (e !== Fa) return;
|
|
3435
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Ra) {
|
|
3436
|
+
requestAnimationFrame(i);
|
|
3437
|
+
return;
|
|
3438
|
+
}
|
|
3439
|
+
Pa = !1;
|
|
3440
|
+
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3441
|
+
fa(s), tt(s, o[o.length - 1]);
|
|
3442
|
+
};
|
|
3443
|
+
requestAnimationFrame(i);
|
|
3444
|
+
}, Ba = (e, t, n, r) => {
|
|
3445
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = N() && it(), u = !l && N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && da() < Aa, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? $r(e, t, d) : u ? ti(e, t, d, da()) : null : null;
|
|
2855
3446
|
if (H(t, n)) {
|
|
2856
|
-
|
|
2857
|
-
let e =
|
|
2858
|
-
e && (
|
|
2859
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (
|
|
3447
|
+
si(i, t, c, r);
|
|
3448
|
+
let e = f(B(t, n) ?? null, i);
|
|
3449
|
+
e && (U(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3450
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (si(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
2860
3451
|
}
|
|
2861
3452
|
if (a && t.decoratorName) {
|
|
2862
3453
|
let e = R.get(t.decoratorName);
|
|
2863
|
-
e && H(e, n) &&
|
|
3454
|
+
e && H(e, n) && si(a, e, c, r);
|
|
2864
3455
|
}
|
|
2865
|
-
for (let e of
|
|
2866
|
-
let t = z.get(e.getAttribute(
|
|
3456
|
+
for (let e of wa(i, n)) {
|
|
3457
|
+
let t = z.get(e.getAttribute(ba));
|
|
2867
3458
|
if (t && H(t, n)) {
|
|
2868
|
-
|
|
2869
|
-
let i =
|
|
2870
|
-
i && (
|
|
3459
|
+
si(e, t, c, r);
|
|
3460
|
+
let i = f(B(t, n) ?? null, e);
|
|
3461
|
+
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
2871
3462
|
}
|
|
2872
3463
|
}
|
|
2873
|
-
},
|
|
3464
|
+
}, Va = (e, t) => {
|
|
2874
3465
|
let { scope: n, decorator: r, bars: i } = e;
|
|
2875
3466
|
if (n) {
|
|
2876
|
-
|
|
2877
|
-
for (let e of
|
|
3467
|
+
Q(n, t);
|
|
3468
|
+
for (let e of Ca(n)) Q(e, t);
|
|
2878
3469
|
}
|
|
2879
|
-
r &&
|
|
2880
|
-
for (let e of i ?? []) e &&
|
|
2881
|
-
},
|
|
3470
|
+
r && Q(r, t);
|
|
3471
|
+
for (let e of i ?? []) e && Q(e, t);
|
|
3472
|
+
}, Ha = 4, Ua = (e) => `${Math.round(e * 1e3) / 1e3}s`, Wa = (e) => {
|
|
2882
3473
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
2883
|
-
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (
|
|
3474
|
+
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (U(t, "animation-delay", e.writer), t.style.animationDelay = Ua(n.seconds), a = !0), i = !1;
|
|
2884
3475
|
}, s = (a) => {
|
|
2885
|
-
if (i || a.target !== t || a.animationName !== n) return;
|
|
2886
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3476
|
+
if (i || a.target !== t || a.animationName !== n && a.animationName !== `${n}-lpm`) return;
|
|
3477
|
+
if (!e.isLive() || e.budgetUsed() >= Ha) {
|
|
2887
3478
|
e.onTerminal();
|
|
2888
3479
|
return;
|
|
2889
3480
|
}
|
|
@@ -2906,19 +3497,20 @@ var Z = () => {}, Mr = 400, Nr = 4, Pr = 100, Fr = 1500, Ir = "data-flemo-part-n
|
|
|
2906
3497
|
t.addEventListener("animationcancel", s);
|
|
2907
3498
|
},
|
|
2908
3499
|
detach: () => {
|
|
2909
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3500
|
+
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
2910
3501
|
},
|
|
2911
3502
|
fullRestart: () => {
|
|
2912
3503
|
o({ mode: "clear" });
|
|
2913
3504
|
}
|
|
2914
3505
|
};
|
|
2915
3506
|
};
|
|
2916
|
-
function
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
3507
|
+
function Ga(e) {
|
|
3508
|
+
We();
|
|
3509
|
+
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3510
|
+
if (!c) return;
|
|
3511
|
+
let { land: e, cancel: t } = c;
|
|
3512
|
+
c = null, t(), e();
|
|
3513
|
+
}, u = (e) => {
|
|
2922
3514
|
if (typeof requestAnimationFrame != "function") {
|
|
2923
3515
|
e();
|
|
2924
3516
|
return;
|
|
@@ -2926,86 +3518,108 @@ function Jr(e) {
|
|
|
2926
3518
|
let t = 0;
|
|
2927
3519
|
t = requestAnimationFrame(() => {
|
|
2928
3520
|
t = requestAnimationFrame(() => {
|
|
2929
|
-
|
|
3521
|
+
c = null, e();
|
|
2930
3522
|
});
|
|
2931
|
-
}),
|
|
3523
|
+
}), c = {
|
|
2932
3524
|
land: e,
|
|
2933
3525
|
cancel: () => cancelAnimationFrame(t)
|
|
2934
3526
|
};
|
|
2935
3527
|
};
|
|
2936
3528
|
return {
|
|
2937
|
-
driveScreenLifecycle: (
|
|
2938
|
-
let { getElements:
|
|
2939
|
-
if (
|
|
2940
|
-
let { scope: e
|
|
3529
|
+
driveScreenLifecycle: (c) => {
|
|
3530
|
+
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3531
|
+
if (h) {
|
|
3532
|
+
let { scope: e } = d();
|
|
3533
|
+
if (e) if (_ && !g) for (let t of Ea(e, m)) t.setAttribute(Sa, "true");
|
|
3534
|
+
else for (let t of Da(e)) t.removeAttribute(Sa);
|
|
3535
|
+
}
|
|
3536
|
+
if (_) {
|
|
3537
|
+
let { scope: e, bars: n } = d();
|
|
2941
3538
|
if (e) {
|
|
2942
|
-
|
|
2943
|
-
for (let n of
|
|
2944
|
-
for (let e of n ?? []) e &&
|
|
3539
|
+
Wn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3540
|
+
for (let n of Ca(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3541
|
+
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
2945
3542
|
}
|
|
2946
3543
|
}
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
},
|
|
2950
|
-
let
|
|
2951
|
-
if (!
|
|
3544
|
+
_ && (kr(), o &&= (clearTimeout(o), null), a ||= Er()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3545
|
+
o = null, a?.(), a = null;
|
|
3546
|
+
}, ga) : (a(), a = null));
|
|
3547
|
+
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3548
|
+
if (!y && i) {
|
|
3549
|
+
let e = i;
|
|
3550
|
+
i = null, _ ? e() : u(e);
|
|
3551
|
+
}
|
|
3552
|
+
if (!v && r) {
|
|
2952
3553
|
let e = r;
|
|
2953
|
-
r = null,
|
|
3554
|
+
r = null, _ ? e() : u(e);
|
|
2954
3555
|
}
|
|
2955
|
-
if (
|
|
2956
|
-
|
|
2957
|
-
let { scope: e } =
|
|
3556
|
+
if (v && !r && lt()) {
|
|
3557
|
+
l();
|
|
3558
|
+
let { scope: e } = d();
|
|
2958
3559
|
if (e) {
|
|
2959
|
-
|
|
3560
|
+
Rn.takeover(e);
|
|
3561
|
+
let t = hr(e), n = zr(e), i = Oa(e, L(f), m), a = Ni(i + ya), o = at(), s = o === "on" ? Fr(e, i + ya) : o === null && rt() ? Fr(e, i + ya, !0) : $, c = Jn();
|
|
2960
3562
|
r = () => {
|
|
2961
|
-
|
|
3563
|
+
a(), s(), n(), t(), c();
|
|
2962
3564
|
};
|
|
2963
3565
|
}
|
|
2964
3566
|
}
|
|
2965
|
-
|
|
3567
|
+
if (y && !i && lt()) {
|
|
3568
|
+
l();
|
|
3569
|
+
let { scope: e } = d(), t = at();
|
|
3570
|
+
e && (t === "on" || t === null && rt()) && (i = Fr(e, Oa(e, L(f), m) + ya, !0));
|
|
3571
|
+
}
|
|
3572
|
+
let b = (t, n, r) => {
|
|
2966
3573
|
let i = e.getTransitionTaskId();
|
|
2967
|
-
if (!i ||
|
|
2968
|
-
|
|
3574
|
+
if (!i || (be.pinnedDriver(), N() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3575
|
+
if (N() && be.pinnedDriver() !== "raf") return za(), null;
|
|
3576
|
+
if (!N() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform ?? "") || !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ka(t.split("-")[0])) return null;
|
|
3577
|
+
if (!N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return Ue(), null;
|
|
3578
|
+
if (!be.playerAllowed()) return null;
|
|
3579
|
+
let { scope: a, decorator: o, bars: c } = d();
|
|
2969
3580
|
if (!a) return null;
|
|
2970
|
-
let l =
|
|
2971
|
-
if (
|
|
3581
|
+
let l = L(f);
|
|
3582
|
+
if (be.pinnedDriver() !== "raf") {
|
|
2972
3583
|
let e = t.split("-")[0];
|
|
2973
|
-
if (
|
|
3584
|
+
if (li(l, e, a) === "native") return null;
|
|
2974
3585
|
}
|
|
2975
|
-
let
|
|
2976
|
-
if (!
|
|
2977
|
-
let p = [],
|
|
3586
|
+
let u = B(l, t);
|
|
3587
|
+
if (!u) return null;
|
|
3588
|
+
let p = [], h = ma.join(i, {
|
|
2978
3589
|
element: a,
|
|
2979
|
-
motion:
|
|
3590
|
+
motion: u,
|
|
2980
3591
|
role: n,
|
|
2981
|
-
onComplete: r
|
|
3592
|
+
onComplete: r,
|
|
3593
|
+
status: t.split("-")[0]
|
|
2982
3594
|
});
|
|
2983
|
-
if (!
|
|
2984
|
-
p.push(
|
|
3595
|
+
if (!h) return null;
|
|
3596
|
+
p.push(h);
|
|
2985
3597
|
for (let e of c ?? []) {
|
|
2986
3598
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2987
|
-
let
|
|
3599
|
+
let n = ma.join(i, {
|
|
2988
3600
|
element: e,
|
|
2989
|
-
motion:
|
|
2990
|
-
role: "passive"
|
|
3601
|
+
motion: u,
|
|
3602
|
+
role: "passive",
|
|
3603
|
+
status: t.split("-")[0]
|
|
2991
3604
|
});
|
|
2992
|
-
|
|
3605
|
+
n && p.push(n);
|
|
2993
3606
|
}
|
|
2994
3607
|
if (o && l.decoratorName) {
|
|
2995
3608
|
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
2996
3609
|
if (n) {
|
|
2997
|
-
let e =
|
|
3610
|
+
let e = ma.join(i, {
|
|
2998
3611
|
element: o,
|
|
2999
3612
|
motion: n,
|
|
3000
|
-
role: "passive"
|
|
3613
|
+
role: "passive",
|
|
3614
|
+
status: t.split("-")[0]
|
|
3001
3615
|
});
|
|
3002
3616
|
e && p.push(e);
|
|
3003
3617
|
}
|
|
3004
3618
|
}
|
|
3005
|
-
for (let e of
|
|
3006
|
-
let n = z.get(e.getAttribute(
|
|
3619
|
+
for (let e of wa(a, t)) {
|
|
3620
|
+
let n = z.get(e.getAttribute(ba)), r = n ? B(n, t) : null;
|
|
3007
3621
|
if (!r) continue;
|
|
3008
|
-
let a =
|
|
3622
|
+
let a = ma.join(i, {
|
|
3009
3623
|
element: e,
|
|
3010
3624
|
motion: r,
|
|
3011
3625
|
role: "passive"
|
|
@@ -3013,9 +3627,9 @@ function Jr(e) {
|
|
|
3013
3627
|
a && p.push(a);
|
|
3014
3628
|
}
|
|
3015
3629
|
return () => p.forEach((e) => e());
|
|
3016
|
-
},
|
|
3017
|
-
let r = [], { decorator: i, bars: a } =
|
|
3018
|
-
let a = 0, o =
|
|
3630
|
+
}, x = (e, n) => {
|
|
3631
|
+
let r = [], { decorator: i, bars: a } = d(), o = L(f), s = (e, n, i) => {
|
|
3632
|
+
let a = 0, o = Wa({
|
|
3019
3633
|
element: e,
|
|
3020
3634
|
expectedName: n,
|
|
3021
3635
|
motion: i,
|
|
@@ -3025,54 +3639,54 @@ function Jr(e) {
|
|
|
3025
3639
|
spendBudget: () => {
|
|
3026
3640
|
a += 1;
|
|
3027
3641
|
},
|
|
3028
|
-
onTerminal:
|
|
3642
|
+
onTerminal: $
|
|
3029
3643
|
});
|
|
3030
3644
|
o.attach(), r.push(o.detach);
|
|
3031
|
-
}, c =
|
|
3645
|
+
}, c = yn("screen", f, n), l = B(o, n);
|
|
3032
3646
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3033
3647
|
if (i && o.decoratorName) {
|
|
3034
3648
|
let e = R.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3035
|
-
t && s(i,
|
|
3649
|
+
t && s(i, yn("decorator", o.decoratorName, n), t);
|
|
3036
3650
|
}
|
|
3037
|
-
for (let t of
|
|
3038
|
-
let e = t.getAttribute(
|
|
3039
|
-
i && s(t,
|
|
3651
|
+
for (let t of wa(e, n)) {
|
|
3652
|
+
let e = t.getAttribute(ba), r = z.get(e), i = r ? B(r, n) : null;
|
|
3653
|
+
i && s(t, yn("part", e, n), i);
|
|
3040
3654
|
}
|
|
3041
3655
|
return r;
|
|
3042
3656
|
};
|
|
3043
|
-
if (!
|
|
3044
|
-
if (
|
|
3045
|
-
let { scope: e, decorator: n, bars: r } =
|
|
3657
|
+
if (!h) {
|
|
3658
|
+
if (m === "COMPLETED") {
|
|
3659
|
+
let { scope: e, decorator: n, bars: r } = d();
|
|
3046
3660
|
if (e) {
|
|
3047
|
-
|
|
3048
|
-
for (let t of
|
|
3661
|
+
W(e);
|
|
3662
|
+
for (let t of Ca(e)) W(t);
|
|
3049
3663
|
}
|
|
3050
|
-
n &&
|
|
3051
|
-
for (let e of r ?? []) e &&
|
|
3052
|
-
return
|
|
3664
|
+
n && W(n);
|
|
3665
|
+
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3666
|
+
return Va({
|
|
3053
3667
|
scope: e,
|
|
3054
3668
|
decorator: n,
|
|
3055
3669
|
bars: r ?? []
|
|
3056
|
-
}, t),
|
|
3670
|
+
}, t), $;
|
|
3057
3671
|
}
|
|
3058
|
-
if (
|
|
3059
|
-
let { scope: e, decorator: n, bars: r } =
|
|
3060
|
-
e &&
|
|
3672
|
+
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3673
|
+
let { scope: e, decorator: n, bars: r } = d();
|
|
3674
|
+
e && Ba({
|
|
3061
3675
|
scope: e,
|
|
3062
3676
|
decorator: n,
|
|
3063
3677
|
bars: r ?? []
|
|
3064
|
-
},
|
|
3678
|
+
}, L(f), `${m}-false`, t);
|
|
3065
3679
|
}
|
|
3066
|
-
if (
|
|
3067
|
-
let e = `${
|
|
3680
|
+
if (_ && g) {
|
|
3681
|
+
let e = `${m}-false`, n = b(e, "passive");
|
|
3068
3682
|
if (n) return n;
|
|
3069
|
-
let { scope: r } =
|
|
3683
|
+
let { scope: r } = d();
|
|
3070
3684
|
if (r) {
|
|
3071
|
-
let n =
|
|
3685
|
+
let n = L(f), i = [];
|
|
3072
3686
|
if (H(n, e)) {
|
|
3073
|
-
let a = B(n, e), o = 0, s =
|
|
3687
|
+
let a = B(n, e), o = 0, s = Wa({
|
|
3074
3688
|
element: r,
|
|
3075
|
-
expectedName:
|
|
3689
|
+
expectedName: yn("screen", f, e),
|
|
3076
3690
|
motion: a,
|
|
3077
3691
|
writer: t,
|
|
3078
3692
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3080,151 +3694,156 @@ function Jr(e) {
|
|
|
3080
3694
|
spendBudget: () => {
|
|
3081
3695
|
o += 1;
|
|
3082
3696
|
},
|
|
3083
|
-
onTerminal:
|
|
3697
|
+
onTerminal: $
|
|
3084
3698
|
});
|
|
3085
3699
|
s.attach(), i.push(s.detach);
|
|
3086
3700
|
}
|
|
3087
|
-
if (i.push(...
|
|
3701
|
+
if (i.push(...x(r, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
3088
3702
|
}
|
|
3089
3703
|
}
|
|
3090
|
-
return
|
|
3704
|
+
return $;
|
|
3091
3705
|
}
|
|
3092
|
-
if (
|
|
3093
|
-
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3094
|
-
let { scope: n, decorator: r, bars: i } =
|
|
3706
|
+
if (m === "COMPLETED") {
|
|
3707
|
+
Ia(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3708
|
+
let { scope: n, decorator: r, bars: i } = d();
|
|
3095
3709
|
if (n) {
|
|
3096
|
-
|
|
3097
|
-
for (let e of
|
|
3710
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute(ha);
|
|
3711
|
+
for (let e of Ca(n)) W(e);
|
|
3098
3712
|
}
|
|
3099
|
-
r && (
|
|
3100
|
-
for (let e of i ?? []) e &&
|
|
3101
|
-
return
|
|
3713
|
+
r && (W(r), r.removeAttribute(ha));
|
|
3714
|
+
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3715
|
+
return Va({
|
|
3102
3716
|
scope: n,
|
|
3103
3717
|
decorator: r,
|
|
3104
3718
|
bars: i ?? []
|
|
3105
|
-
}, t),
|
|
3106
|
-
}
|
|
3107
|
-
if (
|
|
3108
|
-
let { scope:
|
|
3109
|
-
if (!
|
|
3110
|
-
let
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
scope: b,
|
|
3719
|
+
}, t), $;
|
|
3720
|
+
}
|
|
3721
|
+
if (m === "IDLE") return $;
|
|
3722
|
+
let { scope: S } = d();
|
|
3723
|
+
if (!S) return $;
|
|
3724
|
+
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3725
|
+
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3726
|
+
}, E = L(f), D = `${m}-true`, O = S.getAttribute(ha) === "true", k = !O && H(E, D);
|
|
3727
|
+
if (!O) {
|
|
3728
|
+
let { decorator: e, bars: n } = d();
|
|
3729
|
+
Ba({
|
|
3730
|
+
scope: S,
|
|
3118
3731
|
decorator: e,
|
|
3119
3732
|
bars: n ?? []
|
|
3120
|
-
},
|
|
3733
|
+
}, E, D, t);
|
|
3121
3734
|
}
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
r &&
|
|
3735
|
+
k && N() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || da() < Aa) && (w = Na());
|
|
3736
|
+
let ee = `${m}-false`, A = H(E, ee) ? B(E, ee) : null, te = [];
|
|
3737
|
+
for (let e of Ta(S, m)) {
|
|
3738
|
+
let t = z.get(e.getAttribute(ba)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3739
|
+
r && te.push({
|
|
3126
3740
|
element: e,
|
|
3127
3741
|
motion: r
|
|
3128
3742
|
});
|
|
3129
3743
|
}
|
|
3130
|
-
let
|
|
3131
|
-
for (let { motion: e } of
|
|
3132
|
-
let
|
|
3744
|
+
let j = A ? (A.delay + A.duration) * 1e3 : 0;
|
|
3745
|
+
for (let { motion: e } of te) j = Math.max(j, (e.delay + e.duration) * 1e3);
|
|
3746
|
+
let ne = [];
|
|
3133
3747
|
{
|
|
3134
|
-
let e =
|
|
3135
|
-
if (e) for (let t of [`${
|
|
3748
|
+
let e = E.decoratorName ? R.get(E.decoratorName) : void 0;
|
|
3749
|
+
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3136
3750
|
if (!H(e, t)) continue;
|
|
3137
3751
|
let n = B(e, t);
|
|
3138
|
-
n && (
|
|
3752
|
+
n && (ne.push(n), j = Math.max(j, (n.delay + n.duration) * 1e3));
|
|
3139
3753
|
}
|
|
3140
3754
|
}
|
|
3141
|
-
if (!
|
|
3142
|
-
if (!
|
|
3143
|
-
if (!
|
|
3144
|
-
let e =
|
|
3145
|
-
|
|
3146
|
-
let t = setTimeout(
|
|
3755
|
+
if (!k) {
|
|
3756
|
+
if (!O && j > 0) {
|
|
3757
|
+
if (!g) return C && s.markGateHeld(C), $;
|
|
3758
|
+
let e = j + 50;
|
|
3759
|
+
C && s.anchorGate(C, e + ya);
|
|
3760
|
+
let t = setTimeout(T, e);
|
|
3147
3761
|
return () => clearTimeout(t);
|
|
3148
3762
|
}
|
|
3149
|
-
return queueMicrotask(
|
|
3150
|
-
}
|
|
3151
|
-
let
|
|
3152
|
-
if (
|
|
3153
|
-
let e = (
|
|
3154
|
-
s.anchorGate(
|
|
3155
|
-
} else s.markGateHeld(
|
|
3156
|
-
let
|
|
3157
|
-
ie && ae && (
|
|
3158
|
-
let
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
}
|
|
3763
|
+
return queueMicrotask(T), $;
|
|
3764
|
+
}
|
|
3765
|
+
let M = B(E, D);
|
|
3766
|
+
if (C) if (g) {
|
|
3767
|
+
let e = (M.delay + M.duration) * 1e3;
|
|
3768
|
+
s.anchorGate(C, Math.max(e, j) + ya);
|
|
3769
|
+
} else s.markGateHeld(C);
|
|
3770
|
+
let re = !O && !!M, ie = E.driver === "native" && !N(), ae = !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He(), oe = N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ye(), se = !N() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ka(m), ce = ae || oe || se, le = null;
|
|
3771
|
+
re && !N() && !ie && !ae && !se && (le = wi(S, () => [S.ownerDocument.documentElement], () => xa.get(S)?.(), !1));
|
|
3772
|
+
let ue = ce ? En[m] ?? 0 : 0, de = ae && (m === "PUSHING" || m === "POPPING");
|
|
3773
|
+
{
|
|
3774
|
+
let e = S.ownerDocument.documentElement;
|
|
3775
|
+
ce ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm");
|
|
3776
|
+
}
|
|
3777
|
+
let fe = null;
|
|
3778
|
+
re && ie && (fe = _i(S, () => [S.ownerDocument.documentElement], () => xa.get(S)?.()));
|
|
3779
|
+
let pe = yn("screen", f, D), me, he = () => {
|
|
3780
|
+
me !== void 0 && (clearTimeout(me), me = void 0);
|
|
3781
|
+
}, ge = 0, _e, ve = [], xe, Se = () => {
|
|
3782
|
+
ve.forEach((e) => cancelAnimationFrame(e)), ve = [], xe !== void 0 && clearTimeout(xe), xe = void 0;
|
|
3783
|
+
}, Ce = () => {
|
|
3163
3784
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3164
3785
|
shields exotic embedders. */
|
|
3165
3786
|
if (typeof requestAnimationFrame != "function") {
|
|
3166
|
-
|
|
3787
|
+
T();
|
|
3167
3788
|
return;
|
|
3168
3789
|
}
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
},
|
|
3790
|
+
xe = setTimeout(() => {
|
|
3791
|
+
Se(), T();
|
|
3792
|
+
}, va);
|
|
3172
3793
|
let e = (t) => {
|
|
3173
3794
|
if (t <= 0) {
|
|
3174
|
-
|
|
3795
|
+
Se(), T();
|
|
3175
3796
|
return;
|
|
3176
3797
|
}
|
|
3177
|
-
|
|
3798
|
+
ve.push(requestAnimationFrame(() => e(t - 1)));
|
|
3178
3799
|
};
|
|
3179
|
-
e(
|
|
3180
|
-
},
|
|
3181
|
-
if (
|
|
3182
|
-
|
|
3800
|
+
e(_a);
|
|
3801
|
+
}, we = () => {
|
|
3802
|
+
if (ge <= 0) {
|
|
3803
|
+
Ce();
|
|
3183
3804
|
return;
|
|
3184
3805
|
}
|
|
3185
|
-
|
|
3186
|
-
},
|
|
3187
|
-
e.target ===
|
|
3806
|
+
_e = setTimeout(Ce, ge);
|
|
3807
|
+
}, Te = $, Ee = $, De = $, Oe = (e) => {
|
|
3808
|
+
e.target === S && (e.animationName === pe || e.animationName === `${pe}-lpm`) && (S.removeEventListener("animationend", Oe), he(), Te(), we());
|
|
3188
3809
|
};
|
|
3189
|
-
|
|
3190
|
-
let
|
|
3191
|
-
|
|
3192
|
-
let
|
|
3193
|
-
element:
|
|
3194
|
-
expectedName:
|
|
3195
|
-
motion:
|
|
3810
|
+
S.addEventListener("animationend", Oe);
|
|
3811
|
+
let ke = re && g ? b(D, "active", Ce) : null, Ae = (M.delay + M.duration) * 1e3, je = Math.max(Ae, j) + 1500, Me = C ? setTimeout(() => void s.resolveTask(C), je) : void 0;
|
|
3812
|
+
ge = Math.max(0, j - Ae);
|
|
3813
|
+
let Ne = Ae * 1 + ue + 250, Pe = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Fe = Wa({
|
|
3814
|
+
element: S,
|
|
3815
|
+
expectedName: pe,
|
|
3816
|
+
motion: M,
|
|
3196
3817
|
writer: t,
|
|
3197
|
-
isLive:
|
|
3198
|
-
budgetUsed: () => n.get(
|
|
3818
|
+
isLive: Pe,
|
|
3819
|
+
budgetUsed: () => n.get(C) ?? 0,
|
|
3199
3820
|
spendBudget: () => {
|
|
3200
|
-
|
|
3821
|
+
Ee(), De(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3201
3822
|
},
|
|
3202
|
-
onTerminal:
|
|
3823
|
+
onTerminal: T
|
|
3203
3824
|
});
|
|
3204
|
-
|
|
3205
|
-
let
|
|
3206
|
-
|
|
3207
|
-
},
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3825
|
+
Te = Fe.detach;
|
|
3826
|
+
let Ie = !1, P = () => {
|
|
3827
|
+
he(), me = setTimeout(Le, Ne);
|
|
3828
|
+
}, Le = () => {
|
|
3829
|
+
if (he(), Pe() && !Ie) {
|
|
3830
|
+
Ie = !0, Ee(), De(), Fe.fullRestart(), P();
|
|
3210
3831
|
return;
|
|
3211
3832
|
}
|
|
3212
|
-
|
|
3213
|
-
}, F = !
|
|
3214
|
-
F && (
|
|
3215
|
-
|
|
3833
|
+
T();
|
|
3834
|
+
}, F = !ke && g, Re = F ? x(S, D) : [];
|
|
3835
|
+
F && (Fe.attach(), C && P()), F && (ie || ae) && xa.set(S, () => {
|
|
3836
|
+
Ee(), De(), C && me !== void 0 && P();
|
|
3216
3837
|
});
|
|
3217
|
-
let
|
|
3218
|
-
|
|
3219
|
-
}) : null,
|
|
3220
|
-
|
|
3221
|
-
}) : null, Oe, ke = () => {
|
|
3222
|
-
Oe !== void 0 && (clearTimeout(Oe), Oe = void 0);
|
|
3838
|
+
let ze = F && ie ? Si(() => [S.ownerDocument.documentElement], () => {
|
|
3839
|
+
Ee(), De(), C && me !== void 0 && P();
|
|
3840
|
+
}) : null, Be, Ve = () => {
|
|
3841
|
+
Be !== void 0 && (clearTimeout(Be), Be = void 0);
|
|
3223
3842
|
};
|
|
3224
|
-
if (
|
|
3225
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3226
|
-
for (let { element: t, motion: n } of
|
|
3227
|
-
let i =
|
|
3843
|
+
if (Ee = Ve, F && C && !de && !se) {
|
|
3844
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Y(M, S, e), n = A ? Y(A, S, e) : 0, r = 0;
|
|
3845
|
+
for (let { element: t, motion: n } of te) {
|
|
3846
|
+
let i = Y(n, t, e);
|
|
3228
3847
|
if (i === null) {
|
|
3229
3848
|
r = null;
|
|
3230
3849
|
break;
|
|
@@ -3232,10 +3851,10 @@ function Jr(e) {
|
|
|
3232
3851
|
r = Math.max(r, i);
|
|
3233
3852
|
}
|
|
3234
3853
|
let i = 0;
|
|
3235
|
-
if (
|
|
3236
|
-
let t =
|
|
3237
|
-
if (t) for (let n of
|
|
3238
|
-
let r =
|
|
3854
|
+
if (ne.length > 0) {
|
|
3855
|
+
let t = d().decorator;
|
|
3856
|
+
if (t) for (let n of ne) {
|
|
3857
|
+
let r = Y(n, t, e);
|
|
3239
3858
|
if (r === null) {
|
|
3240
3859
|
i = null;
|
|
3241
3860
|
break;
|
|
@@ -3244,17 +3863,17 @@ function Jr(e) {
|
|
|
3244
3863
|
}
|
|
3245
3864
|
}
|
|
3246
3865
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3247
|
-
a !== null && a + 17 <
|
|
3248
|
-
|
|
3249
|
-
}, a + 17));
|
|
3866
|
+
a !== null && a + 17 < Ae + ge && (Be = setTimeout(() => {
|
|
3867
|
+
Be = void 0, Pe() && (S.removeEventListener("animationend", Oe), he(), Te(), Ce());
|
|
3868
|
+
}, a * 1 + 17 + ue));
|
|
3250
3869
|
}
|
|
3251
|
-
let
|
|
3252
|
-
|
|
3870
|
+
let We, Ge = () => {
|
|
3871
|
+
We !== void 0 && (clearTimeout(We), We = void 0);
|
|
3253
3872
|
};
|
|
3254
|
-
if (
|
|
3255
|
-
let e =
|
|
3256
|
-
for (let { element: e, motion: t } of
|
|
3257
|
-
let r =
|
|
3873
|
+
if (De = Ge, F && r && !de && !se && !rt()) {
|
|
3874
|
+
let e = Y(M, S, 1), t = A ? Y(A, S, 1) : 0, n = 0;
|
|
3875
|
+
for (let { element: e, motion: t } of te) {
|
|
3876
|
+
let r = Y(t, e, 1);
|
|
3258
3877
|
if (r === null) {
|
|
3259
3878
|
n = null;
|
|
3260
3879
|
break;
|
|
@@ -3262,10 +3881,10 @@ function Jr(e) {
|
|
|
3262
3881
|
n = Math.max(n, r);
|
|
3263
3882
|
}
|
|
3264
3883
|
let i = 0;
|
|
3265
|
-
if (
|
|
3266
|
-
let e =
|
|
3267
|
-
if (e) for (let t of
|
|
3268
|
-
let n =
|
|
3884
|
+
if (ne.length > 0) {
|
|
3885
|
+
let e = d().decorator;
|
|
3886
|
+
if (e) for (let t of ne) {
|
|
3887
|
+
let n = Y(t, e, 1);
|
|
3269
3888
|
if (n === null) {
|
|
3270
3889
|
i = null;
|
|
3271
3890
|
break;
|
|
@@ -3274,18 +3893,18 @@ function Jr(e) {
|
|
|
3274
3893
|
}
|
|
3275
3894
|
}
|
|
3276
3895
|
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3277
|
-
a !== null && (
|
|
3278
|
-
|
|
3896
|
+
a !== null && (We = setTimeout(() => {
|
|
3897
|
+
We = void 0;
|
|
3279
3898
|
let e = r;
|
|
3280
3899
|
e && (r = null, e());
|
|
3281
|
-
}, a));
|
|
3900
|
+
}, a * 1 + ue));
|
|
3282
3901
|
}
|
|
3283
3902
|
return () => {
|
|
3284
|
-
if (
|
|
3285
|
-
|
|
3286
|
-
for (let e of
|
|
3903
|
+
if (w(), Me !== void 0 && clearTimeout(Me), _e !== void 0 && clearTimeout(_e), Se(), fe?.(), le?.(), ze?.(), Ve(), Ge(), S.removeEventListener("animationend", Oe), F) {
|
|
3904
|
+
Fe.detach();
|
|
3905
|
+
for (let e of Re) e();
|
|
3287
3906
|
}
|
|
3288
|
-
|
|
3907
|
+
he(), ke?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3289
3908
|
};
|
|
3290
3909
|
},
|
|
3291
3910
|
activeResumeEntryCount: () => n.size
|
|
@@ -3293,20 +3912,20 @@ function Jr(e) {
|
|
|
3293
3912
|
}
|
|
3294
3913
|
//#endregion
|
|
3295
3914
|
//#region src/utils/findScrollable.ts
|
|
3296
|
-
function
|
|
3297
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3915
|
+
function Ka(e, t) {
|
|
3916
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = qa(e);
|
|
3298
3917
|
if (!o) return {
|
|
3299
3918
|
element: null,
|
|
3300
3919
|
hasMarker: !1
|
|
3301
3920
|
};
|
|
3302
3921
|
let s = o.closest?.(r);
|
|
3303
|
-
if (s instanceof HTMLElement &&
|
|
3922
|
+
if (s instanceof HTMLElement && Ja(s, n) && (!a || Ya(s, n))) return {
|
|
3304
3923
|
element: s,
|
|
3305
3924
|
hasMarker: !0
|
|
3306
3925
|
};
|
|
3307
3926
|
let c = o, l = 0;
|
|
3308
3927
|
for (; c && l < i;) {
|
|
3309
|
-
if (
|
|
3928
|
+
if (Ja(c, n) && (!a || Ya(c, n))) return {
|
|
3310
3929
|
element: c,
|
|
3311
3930
|
hasMarker: !1
|
|
3312
3931
|
};
|
|
@@ -3317,7 +3936,7 @@ function Yr(e, t) {
|
|
|
3317
3936
|
hasMarker: !1
|
|
3318
3937
|
};
|
|
3319
3938
|
}
|
|
3320
|
-
function
|
|
3939
|
+
function qa(e) {
|
|
3321
3940
|
if (!e) return null;
|
|
3322
3941
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3323
3942
|
if (n && n.length) {
|
|
@@ -3325,100 +3944,119 @@ function Xr(e) {
|
|
|
3325
3944
|
}
|
|
3326
3945
|
return e instanceof HTMLElement ? e : null;
|
|
3327
3946
|
}
|
|
3328
|
-
function
|
|
3947
|
+
function Ja(e, t) {
|
|
3329
3948
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3330
3949
|
}
|
|
3331
|
-
function
|
|
3332
|
-
if (!
|
|
3950
|
+
function Ya(e, t) {
|
|
3951
|
+
if (!Ja(e, t) || typeof window > "u") return !1;
|
|
3333
3952
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3334
3953
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3335
3954
|
}
|
|
3336
3955
|
//#endregion
|
|
3956
|
+
//#region src/screen/computeBarRiding.ts
|
|
3957
|
+
function Xa(e, t) {
|
|
3958
|
+
return !!e && !!t && e.id === t.id;
|
|
3959
|
+
}
|
|
3960
|
+
function Za(e) {
|
|
3961
|
+
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3962
|
+
app: !1,
|
|
3963
|
+
nav: !1
|
|
3964
|
+
};
|
|
3965
|
+
let t = e.hasTopBar ? { id: e.topBarId } : void 0, n = e.hasNavBar ? { id: e.bottomBarId } : void 0, r = e.partnerMetadata?.topBar ?? (e.partnerBars?.topBar ? {} : void 0), i = e.partnerMetadata?.bottomBar ?? (e.partnerBars?.bottomBar ? {} : void 0);
|
|
3966
|
+
return {
|
|
3967
|
+
app: e.hasTopBar && !Xa(t, r),
|
|
3968
|
+
nav: e.hasNavBar && !Xa(n, i)
|
|
3969
|
+
};
|
|
3970
|
+
}
|
|
3971
|
+
//#endregion
|
|
3337
3972
|
//#region src/core/engine/createSwipeController.ts
|
|
3338
|
-
var
|
|
3339
|
-
function
|
|
3973
|
+
var Qa = "data-flemo-skip-animation";
|
|
3974
|
+
function $a(e) {
|
|
3340
3975
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3341
3976
|
current: [],
|
|
3342
3977
|
prev: []
|
|
3343
3978
|
}, a = {
|
|
3344
3979
|
current: [],
|
|
3345
3980
|
prev: []
|
|
3346
|
-
}, o = !1, s = !1, c = !1, l = {
|
|
3981
|
+
}, o = !1, s = !1, c = !1, l = null, u = null, d = !1, f = {
|
|
3347
3982
|
x: 0,
|
|
3348
3983
|
y: 0
|
|
3349
|
-
},
|
|
3984
|
+
}, p = {
|
|
3350
3985
|
x: 0,
|
|
3351
3986
|
y: 0
|
|
3352
|
-
},
|
|
3987
|
+
}, m = 0, h = {
|
|
3353
3988
|
x: 0,
|
|
3354
3989
|
y: 0
|
|
3355
|
-
},
|
|
3990
|
+
}, g = {
|
|
3356
3991
|
element: null,
|
|
3357
3992
|
hasMarker: !1
|
|
3358
|
-
},
|
|
3993
|
+
}, _ = {
|
|
3359
3994
|
element: null,
|
|
3360
3995
|
hasMarker: !1
|
|
3361
|
-
},
|
|
3996
|
+
}, v = 0, y = 0, b = (e) => ({
|
|
3362
3997
|
point: {
|
|
3363
3998
|
x: e.clientX,
|
|
3364
3999
|
y: e.clientY
|
|
3365
4000
|
},
|
|
3366
4001
|
offset: {
|
|
3367
|
-
x: e.clientX -
|
|
3368
|
-
y: e.clientY -
|
|
4002
|
+
x: e.clientX - f.x,
|
|
4003
|
+
y: e.clientY - f.y
|
|
3369
4004
|
},
|
|
3370
4005
|
delta: {
|
|
3371
|
-
x: e.clientX -
|
|
3372
|
-
y: e.clientY -
|
|
4006
|
+
x: e.clientX - p.x,
|
|
4007
|
+
y: e.clientY - p.y
|
|
3373
4008
|
},
|
|
3374
|
-
velocity:
|
|
3375
|
-
}),
|
|
3376
|
-
let
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
4009
|
+
velocity: h
|
|
4010
|
+
}), x = 0, S = (t) => {
|
|
4011
|
+
let { scope: n } = e.getElements();
|
|
4012
|
+
n?.hasPointerCapture(t.pointerId) && n.releasePointerCapture(t.pointerId);
|
|
4013
|
+
}, C = (e) => {
|
|
4014
|
+
let t = e.timeStamp, n = Math.max(1, t - m);
|
|
4015
|
+
h = {
|
|
4016
|
+
x: (e.clientX - p.x) / n * 1e3,
|
|
4017
|
+
y: (e.clientY - p.y) / n * 1e3
|
|
4018
|
+
}, p = {
|
|
3381
4019
|
x: e.clientX,
|
|
3382
4020
|
y: e.clientY
|
|
3383
|
-
},
|
|
3384
|
-
},
|
|
3385
|
-
let s =
|
|
3386
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
3387
|
-
else if (r === n) for (let e of i.prev)
|
|
4021
|
+
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4022
|
+
}, w = (r, a, o) => {
|
|
4023
|
+
let s = Un(r, a, o, t);
|
|
4024
|
+
if (r === e.getElements().scope) for (let e of i.current) Un(e, a, o, t);
|
|
4025
|
+
else if (r === n) for (let e of i.prev) Un(e, a, o, t);
|
|
3388
4026
|
return s;
|
|
3389
|
-
},
|
|
3390
|
-
let r = e.getPartnerBars(), a = [],
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
i = {
|
|
3398
|
-
current:
|
|
3399
|
-
prev:
|
|
4027
|
+
}, T = (n) => {
|
|
4028
|
+
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = n?.querySelector("[data-flemo-bar=\"app\"]"), s = n?.querySelector("[data-flemo-bar=\"nav\"]"), c = (e) => {
|
|
4029
|
+
if (!e) return;
|
|
4030
|
+
let t = e.getAttribute("data-flemo-bar-id");
|
|
4031
|
+
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4032
|
+
}, l = e.hasSharedTopBar() ? { id: e.getSharedTopBarId?.() } : void 0, u = e.hasSharedBottomBar() ? { id: e.getSharedBottomBarId?.() } : void 0, d = a?.topBar ?? (r?.topBar ? {} : c(o)), f = a?.bottomBar ?? (r?.bottomBar ? {} : c(s)), p = [], { sharedTopBar: m, sharedBottomBar: h } = e.getElements();
|
|
4033
|
+
m && l && !Xa(l, d) && p.push(m), h && u && !Xa(u, f) && p.push(h);
|
|
4034
|
+
let g = [];
|
|
4035
|
+
n && (o && d && !Xa(d, l) && g.push(o), s && f && !Xa(f, u) && g.push(s)), i = {
|
|
4036
|
+
current: p,
|
|
4037
|
+
prev: g
|
|
3400
4038
|
};
|
|
3401
|
-
for (let n of
|
|
3402
|
-
for (let n of
|
|
3403
|
-
},
|
|
3404
|
-
for (let e of i.current)
|
|
3405
|
-
for (let e of i.prev)
|
|
4039
|
+
for (let n of p) si(n, e.getTransition(), !1, t);
|
|
4040
|
+
for (let n of g) si(n, e.getTransition(), !1, t);
|
|
4041
|
+
}, E = () => {
|
|
4042
|
+
for (let e of i.current) W(e, void 0, t), Q(e, t);
|
|
4043
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
3406
4044
|
i = {
|
|
3407
4045
|
current: [],
|
|
3408
4046
|
prev: []
|
|
3409
4047
|
};
|
|
3410
|
-
},
|
|
4048
|
+
}, D = (t) => {
|
|
3411
4049
|
let { screenContainer: n } = e.getElements(), r = (e) => Array.from(e.querySelectorAll("[data-flemo-part-name]"));
|
|
3412
4050
|
a = {
|
|
3413
4051
|
current: r(n),
|
|
3414
4052
|
prev: r(t)
|
|
3415
4053
|
};
|
|
3416
|
-
},
|
|
4054
|
+
}, O = (e, n, r) => {
|
|
3417
4055
|
let i = (i, a) => {
|
|
3418
4056
|
let o = z.get(i.getAttribute("data-flemo-part-name"));
|
|
3419
4057
|
if (!o) return;
|
|
3420
4058
|
let s = {
|
|
3421
|
-
animate: (e, n, r) =>
|
|
4059
|
+
animate: (e, n, r) => Un(e, n, r, t),
|
|
3422
4060
|
element: i,
|
|
3423
4061
|
active: a
|
|
3424
4062
|
};
|
|
@@ -3426,81 +4064,117 @@ function ei(e) {
|
|
|
3426
4064
|
};
|
|
3427
4065
|
for (let e of a.current) i(e, !0);
|
|
3428
4066
|
for (let e of a.prev) i(e, !1);
|
|
3429
|
-
},
|
|
3430
|
-
for (let e of [...a.current, ...a.prev])
|
|
4067
|
+
}, k = () => {
|
|
4068
|
+
for (let e of [...a.current, ...a.prev]) W(e, void 0, t);
|
|
3431
4069
|
a = {
|
|
3432
4070
|
current: [],
|
|
3433
4071
|
prev: []
|
|
3434
4072
|
};
|
|
3435
|
-
},
|
|
4073
|
+
}, ee = async (t) => {
|
|
3436
4074
|
let i = e.getTransition();
|
|
3437
|
-
if (!i.swipeDirection || e.getViewportScrollHeight() > 10)
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
4075
|
+
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4076
|
+
s = !1;
|
|
4077
|
+
return;
|
|
4078
|
+
}
|
|
4079
|
+
let { scope: a, screenContainer: o, decorator: l } = e.getElements();
|
|
4080
|
+
if (!a) {
|
|
4081
|
+
s = !1;
|
|
4082
|
+
return;
|
|
4083
|
+
}
|
|
4084
|
+
let u = o?.previousElementSibling ?? null;
|
|
4085
|
+
if (n = u?.querySelector("[data-flemo-screen]") ?? null, r = u?.querySelector("[data-flemo-decorator]") ?? null, !n) {
|
|
4086
|
+
s = !1;
|
|
4087
|
+
return;
|
|
4088
|
+
}
|
|
4089
|
+
c = !0, x = 0, f = {
|
|
3443
4090
|
x: t.clientX,
|
|
3444
4091
|
y: t.clientY
|
|
3445
|
-
},
|
|
4092
|
+
}, p = {
|
|
3446
4093
|
x: t.clientX,
|
|
3447
4094
|
y: t.clientY
|
|
3448
|
-
},
|
|
4095
|
+
}, m = t.timeStamp, h = {
|
|
3449
4096
|
x: 0,
|
|
3450
4097
|
y: 0
|
|
3451
|
-
}, a.setPointerCapture(t.pointerId),
|
|
3452
|
-
let
|
|
3453
|
-
|
|
3454
|
-
animate: y,
|
|
4098
|
+
}, a.setPointerCapture(t.pointerId), T(u), D(u);
|
|
4099
|
+
let g = e.getDecorator(), _ = await i.onSwipeStart(t, b(t), {
|
|
4100
|
+
animate: w,
|
|
3455
4101
|
currentScreen: a,
|
|
3456
4102
|
prevScreen: n,
|
|
3457
4103
|
onStart: (e) => {
|
|
3458
|
-
|
|
3459
|
-
animate:
|
|
3460
|
-
currentDecorator:
|
|
4104
|
+
g?.onSwipeStart?.(e, {
|
|
4105
|
+
animate: Un,
|
|
4106
|
+
currentDecorator: l,
|
|
3461
4107
|
prevDecorator: r
|
|
3462
|
-
}),
|
|
4108
|
+
}), O("start", e, 0);
|
|
3463
4109
|
}
|
|
3464
|
-
})
|
|
3465
|
-
|
|
4110
|
+
});
|
|
4111
|
+
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), E(), k());
|
|
4112
|
+
}, A = (e) => {
|
|
4113
|
+
let t = ee(e);
|
|
4114
|
+
u = t, t.finally(() => {
|
|
4115
|
+
u = null;
|
|
4116
|
+
});
|
|
4117
|
+
}, te = (t) => {
|
|
3466
4118
|
let i = e.getTransition();
|
|
3467
|
-
if (!i.swipeDirection || !c || e.getViewportScrollHeight() > 10) return;
|
|
3468
|
-
|
|
4119
|
+
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4120
|
+
C(t);
|
|
3469
4121
|
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
3470
|
-
i.onSwipe(t,
|
|
3471
|
-
animate:
|
|
4122
|
+
i.onSwipe(t, b(t), {
|
|
4123
|
+
animate: w,
|
|
3472
4124
|
currentScreen: a,
|
|
3473
4125
|
prevScreen: n,
|
|
3474
4126
|
onProgress: (e, t) => {
|
|
3475
4127
|
s?.onSwipe?.(e, t, {
|
|
3476
|
-
animate:
|
|
4128
|
+
animate: Un,
|
|
3477
4129
|
currentDecorator: o,
|
|
3478
4130
|
prevDecorator: r
|
|
3479
|
-
}),
|
|
4131
|
+
}), O("swipe", e, t);
|
|
3480
4132
|
}
|
|
3481
4133
|
});
|
|
3482
|
-
},
|
|
3483
|
-
|
|
3484
|
-
|
|
4134
|
+
}, j = async (o, s = !1) => {
|
|
4135
|
+
u && await u;
|
|
4136
|
+
let l = e.getTransition();
|
|
4137
|
+
if (!l.swipeDirection || !c) return;
|
|
3485
4138
|
c = !1;
|
|
3486
|
-
let { scope:
|
|
3487
|
-
|
|
3488
|
-
let
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
4139
|
+
let { scope: d, decorator: f } = e.getElements();
|
|
4140
|
+
S(o);
|
|
4141
|
+
let p = e.getDecorator(), m = s || x < 6 ? (e, t, n) => w(e, t, {
|
|
4142
|
+
...n,
|
|
4143
|
+
duration: 0
|
|
4144
|
+
}) : w, h = s ? {
|
|
4145
|
+
point: {
|
|
4146
|
+
x: o.clientX,
|
|
4147
|
+
y: o.clientY
|
|
4148
|
+
},
|
|
4149
|
+
offset: {
|
|
4150
|
+
x: 0,
|
|
4151
|
+
y: 0
|
|
4152
|
+
},
|
|
4153
|
+
delta: {
|
|
4154
|
+
x: 0,
|
|
4155
|
+
y: 0
|
|
4156
|
+
},
|
|
4157
|
+
velocity: {
|
|
4158
|
+
x: 0,
|
|
4159
|
+
y: 0
|
|
4160
|
+
}
|
|
4161
|
+
} : b(o), g = await l.onSwipeEnd(o, h, {
|
|
4162
|
+
animate: m,
|
|
4163
|
+
currentScreen: d,
|
|
3492
4164
|
prevScreen: n,
|
|
3493
4165
|
onStart: (e) => {
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
4166
|
+
let t = !s && e;
|
|
4167
|
+
p?.onSwipeEnd?.(t, {
|
|
4168
|
+
animate: Un,
|
|
4169
|
+
currentDecorator: f,
|
|
3497
4170
|
prevDecorator: r
|
|
3498
|
-
}),
|
|
4171
|
+
}), O("end", t, 0);
|
|
3499
4172
|
}
|
|
3500
|
-
})
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
for (let e of i.
|
|
4173
|
+
});
|
|
4174
|
+
if (!s && g) {
|
|
4175
|
+
d?.setAttribute(Qa, "true"), f?.setAttribute(Qa, "true");
|
|
4176
|
+
for (let e of i.current) Q(e, t);
|
|
4177
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
3504
4178
|
i = {
|
|
3505
4179
|
current: [],
|
|
3506
4180
|
prev: []
|
|
@@ -3508,78 +4182,77 @@ function ei(e) {
|
|
|
3508
4182
|
current: [],
|
|
3509
4183
|
prev: []
|
|
3510
4184
|
}, e.back();
|
|
3511
|
-
} else
|
|
4185
|
+
} else d && W(d, void 0, t), n && W(n, void 0, t), f && W(f), r && W(r), E(), k(), e.setDragStatus("IDLE");
|
|
3512
4186
|
};
|
|
3513
4187
|
return {
|
|
3514
4188
|
pointerDown: (t) => {
|
|
3515
|
-
e.isReadyForDrag() && (
|
|
4189
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = Ka(t.target, {
|
|
3516
4190
|
direction: "x",
|
|
3517
4191
|
verifyByScroll: !0
|
|
3518
|
-
}),
|
|
4192
|
+
}), _ = Ka(t.target, {
|
|
3519
4193
|
direction: "y",
|
|
3520
4194
|
verifyByScroll: !0
|
|
3521
|
-
}),
|
|
4195
|
+
}), v = t.clientX, y = t.clientY);
|
|
3522
4196
|
},
|
|
3523
4197
|
pointerMove: (t) => {
|
|
3524
|
-
if (e.getViewportScrollHeight() > 10) return;
|
|
4198
|
+
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
3525
4199
|
if (c) {
|
|
3526
|
-
|
|
4200
|
+
te(t);
|
|
4201
|
+
return;
|
|
4202
|
+
}
|
|
4203
|
+
if (!o) return;
|
|
4204
|
+
if (!e.isReadyForDrag()) {
|
|
4205
|
+
o = !1;
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
let n = e.getTransition().swipeDirection;
|
|
4209
|
+
if (!n) {
|
|
4210
|
+
o = !1;
|
|
3527
4211
|
return;
|
|
3528
4212
|
}
|
|
3529
|
-
let
|
|
3530
|
-
if (
|
|
3531
|
-
|
|
3532
|
-
let e =
|
|
3533
|
-
(n === "y" && e
|
|
3534
|
-
} else if (o && !r) {
|
|
3535
|
-
let e = t.clientX - h, r = t.clientY - g, i = m.element && m.element.scrollTop <= 0, a = p.element && p.element.scrollLeft <= 0 && p.hasMarker;
|
|
3536
|
-
(n === "y" && (i || p.element) && r > 0 && Math.abs(e) < 2 || n === "x" && (a || m.element) && e > 0 && Math.abs(r) < 2) && (o = !1, s = !0, T(t));
|
|
4213
|
+
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4214
|
+
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0, A(t);
|
|
4215
|
+
else {
|
|
4216
|
+
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4217
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, A(t));
|
|
3537
4218
|
}
|
|
3538
4219
|
},
|
|
3539
4220
|
pointerUp: (e) => {
|
|
3540
|
-
o = !1, s = !1, c &&
|
|
4221
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && j(e));
|
|
4222
|
+
},
|
|
4223
|
+
pointerCancel: (e) => {
|
|
4224
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && j(e, !0));
|
|
3541
4225
|
},
|
|
3542
4226
|
shouldPreventTouch: () => s
|
|
3543
4227
|
};
|
|
3544
4228
|
}
|
|
3545
4229
|
//#endregion
|
|
3546
|
-
//#region src/screen/computeBarRiding.ts
|
|
3547
|
-
function ti(e) {
|
|
3548
|
-
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? {
|
|
3549
|
-
app: !1,
|
|
3550
|
-
nav: !1
|
|
3551
|
-
} : {
|
|
3552
|
-
app: e.hasTopBar && !e.partnerBars?.topBar,
|
|
3553
|
-
nav: e.hasNavBar && !e.partnerBars?.bottomBar
|
|
3554
|
-
};
|
|
3555
|
-
}
|
|
3556
|
-
//#endregion
|
|
3557
4230
|
//#region src/screen/pendingNetwork.ts
|
|
3558
|
-
var
|
|
3559
|
-
|
|
3560
|
-
},
|
|
3561
|
-
if (!(
|
|
3562
|
-
if (
|
|
4231
|
+
var eo = 0, to = !1, no = () => {
|
|
4232
|
+
eo = Math.max(0, eo - 1);
|
|
4233
|
+
}, ro = () => {
|
|
4234
|
+
if (!(to || typeof window > "u")) {
|
|
4235
|
+
if (to = !0, typeof window.fetch == "function") {
|
|
3563
4236
|
let e = window.fetch.bind(window);
|
|
3564
4237
|
window.fetch = (...t) => {
|
|
3565
|
-
|
|
4238
|
+
eo += 1;
|
|
3566
4239
|
let n;
|
|
3567
4240
|
try {
|
|
3568
4241
|
n = e(...t);
|
|
3569
4242
|
} catch (e) {
|
|
3570
|
-
throw
|
|
4243
|
+
throw no(), e;
|
|
3571
4244
|
}
|
|
3572
|
-
return n.then((e) => (
|
|
3573
|
-
throw
|
|
4245
|
+
return n.then((e) => (no(), e), (e) => {
|
|
4246
|
+
throw no(), e;
|
|
3574
4247
|
});
|
|
3575
4248
|
};
|
|
3576
4249
|
}
|
|
3577
4250
|
if (typeof XMLHttpRequest == "function") {
|
|
3578
4251
|
let e = XMLHttpRequest.prototype.send;
|
|
3579
4252
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
3580
|
-
|
|
4253
|
+
eo += 1;
|
|
3581
4254
|
let n = !1, r = () => {
|
|
3582
|
-
n || (n = !0,
|
|
4255
|
+
n || (n = !0, no());
|
|
3583
4256
|
};
|
|
3584
4257
|
this.addEventListener("loadend", r);
|
|
3585
4258
|
try {
|
|
@@ -3590,28 +4263,28 @@ var ni = 0, ri = !1, ii = () => {
|
|
|
3590
4263
|
};
|
|
3591
4264
|
}
|
|
3592
4265
|
}
|
|
3593
|
-
},
|
|
4266
|
+
}, io = () => (ro(), eo > 0);
|
|
3594
4267
|
//#endregion
|
|
3595
4268
|
//#region src/screen/animStartAnchor.ts
|
|
3596
|
-
function
|
|
4269
|
+
function ao(e) {
|
|
3597
4270
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
3598
4271
|
}
|
|
3599
|
-
var
|
|
3600
|
-
function
|
|
3601
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4272
|
+
var oo = 300, so = 20;
|
|
4273
|
+
function co(e) {
|
|
4274
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, so);
|
|
3602
4275
|
}
|
|
3603
|
-
function
|
|
3604
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4276
|
+
function lo(e) {
|
|
4277
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of co(e)) t.decode().catch(() => {});
|
|
3605
4278
|
}
|
|
3606
|
-
var
|
|
4279
|
+
var uo = 3, fo = 40, po = (e) => {
|
|
3607
4280
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
3608
4281
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
3609
4282
|
/* v8 ignore stop */
|
|
3610
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
3611
|
-
},
|
|
4283
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * fo) / t < uo;
|
|
4284
|
+
}, mo = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
3612
4285
|
let t = e.animationName;
|
|
3613
4286
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
3614
|
-
}),
|
|
4287
|
+
}), ho = (e) => {
|
|
3615
4288
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
3616
4289
|
which already requires querySelectorAll. */
|
|
3617
4290
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -3619,12 +4292,12 @@ var fi = 3, pi = 40, mi = (e) => {
|
|
|
3619
4292
|
the guard shields exotic embedders. */
|
|
3620
4293
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
3621
4294
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
3622
|
-
if (r >=
|
|
4295
|
+
if (r >= so) break;
|
|
3623
4296
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
3624
4297
|
}
|
|
3625
4298
|
return !1;
|
|
3626
4299
|
};
|
|
3627
|
-
function
|
|
4300
|
+
function go(e, t = {}) {
|
|
3628
4301
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
3629
4302
|
if (n) return;
|
|
3630
4303
|
let r = t.scope;
|
|
@@ -3632,7 +4305,7 @@ function _i(e, t = {}) {
|
|
|
3632
4305
|
e();
|
|
3633
4306
|
return;
|
|
3634
4307
|
}
|
|
3635
|
-
let i =
|
|
4308
|
+
let i = co(r);
|
|
3636
4309
|
if (i.length === 0) {
|
|
3637
4310
|
e();
|
|
3638
4311
|
return;
|
|
@@ -3649,59 +4322,81 @@ function _i(e, t = {}) {
|
|
|
3649
4322
|
e();
|
|
3650
4323
|
return;
|
|
3651
4324
|
}
|
|
3652
|
-
|
|
4325
|
+
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4326
|
+
if (!n.renderSettleOnly && !po(r)) {
|
|
3653
4327
|
e();
|
|
3654
4328
|
return;
|
|
3655
4329
|
}
|
|
3656
4330
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
3657
4331
|
the fallback only shields exotic embedders. */
|
|
3658
|
-
let
|
|
3659
|
-
|
|
3660
|
-
},
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
4332
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => po(r) && mo(r), f = () => io() || ho(r), p = () => {
|
|
4333
|
+
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4334
|
+
}, m = () => n.renderSettleOnly ? 6 : !po(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4335
|
+
if (!n.renderSettleOnly) {
|
|
4336
|
+
p();
|
|
4337
|
+
return;
|
|
4338
|
+
}
|
|
4339
|
+
if (h || u) return;
|
|
4340
|
+
h = !0;
|
|
4341
|
+
let e = typeof performance < "u" ? performance.now() : null, t = (r) => {
|
|
4342
|
+
if (r <= 0 || s() >= n.capMs) {
|
|
4343
|
+
p();
|
|
4344
|
+
return;
|
|
4345
|
+
}
|
|
4346
|
+
c.push(requestAnimationFrame((n) => {
|
|
4347
|
+
let i = e !== null && n - e > 48;
|
|
4348
|
+
e = n, t(i ? 2 : r - 1);
|
|
4349
|
+
}));
|
|
4350
|
+
};
|
|
4351
|
+
t(2);
|
|
4352
|
+
}, _ = () => {
|
|
4353
|
+
c.forEach((e) => cancelAnimationFrame(e)), c = [];
|
|
4354
|
+
let e = null, t = (r) => {
|
|
4355
|
+
if (r <= 0) {
|
|
4356
|
+
if (i() && s() < n.capMs) {
|
|
4357
|
+
c.push(requestAnimationFrame(() => t(m())));
|
|
3666
4358
|
return;
|
|
3667
4359
|
}
|
|
3668
|
-
|
|
4360
|
+
p();
|
|
3669
4361
|
return;
|
|
3670
4362
|
}
|
|
3671
|
-
|
|
4363
|
+
c.push(requestAnimationFrame((i) => {
|
|
4364
|
+
let a = n.renderSettleOnly && e !== null && i - e > 48 && s() < n.capMs;
|
|
4365
|
+
e = i, t(a ? m() : r - 1);
|
|
4366
|
+
}));
|
|
3672
4367
|
};
|
|
3673
|
-
|
|
3674
|
-
},
|
|
4368
|
+
t(m());
|
|
4369
|
+
}, v = new MutationObserver((e) => {
|
|
3675
4370
|
let t = 0;
|
|
3676
4371
|
for (let n of e) if (n.type === "childList") for (let e of Array.from(n.addedNodes)) t += e instanceof Element ? 1 + e.querySelectorAll("*").length : 1;
|
|
3677
4372
|
if (!(t < n.minNodes)) {
|
|
3678
4373
|
/* v8 ignore start -- the cap timer fires the moment elapsed reaches
|
|
3679
4374
|
capMs, so a delivery can never observe elapsed past the cap first;
|
|
3680
4375
|
kept so a delivery racing the timer can only ever finish early. */
|
|
3681
|
-
if (
|
|
3682
|
-
|
|
4376
|
+
if (l = !0, s() >= n.capMs) {
|
|
4377
|
+
p();
|
|
3683
4378
|
return;
|
|
3684
4379
|
}
|
|
3685
4380
|
/* v8 ignore stop */
|
|
3686
|
-
|
|
4381
|
+
_();
|
|
3687
4382
|
}
|
|
3688
4383
|
});
|
|
3689
|
-
|
|
4384
|
+
v.observe(r, {
|
|
3690
4385
|
childList: !0,
|
|
3691
4386
|
subtree: !0
|
|
3692
4387
|
});
|
|
3693
|
-
let
|
|
3694
|
-
!
|
|
3695
|
-
}, n.graceMs),
|
|
3696
|
-
if (!
|
|
3697
|
-
if ((
|
|
4388
|
+
let y = setTimeout(() => {
|
|
4389
|
+
!l && !i() && g();
|
|
4390
|
+
}, n.graceMs), b = setTimeout(function e() {
|
|
4391
|
+
if (!l) {
|
|
4392
|
+
if (i() && s() < n.capMs) {
|
|
3698
4393
|
setTimeout(e, 100);
|
|
3699
4394
|
return;
|
|
3700
4395
|
}
|
|
3701
|
-
|
|
4396
|
+
g();
|
|
3702
4397
|
}
|
|
3703
|
-
}, n.firstWaitMs),
|
|
3704
|
-
a.push(
|
|
4398
|
+
}, n.firstWaitMs), x = setTimeout(p, n.capMs);
|
|
4399
|
+
a.push(p);
|
|
3705
4400
|
}, c = (e) => {
|
|
3706
4401
|
if (e <= 0) {
|
|
3707
4402
|
s(o);
|
|
@@ -3715,14 +4410,14 @@ function _i(e, t = {}) {
|
|
|
3715
4410
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
3716
4411
|
};
|
|
3717
4412
|
}
|
|
3718
|
-
function
|
|
3719
|
-
let n =
|
|
4413
|
+
function _o(e, t = {}) {
|
|
4414
|
+
let n = go(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
3720
4415
|
return () => {
|
|
3721
4416
|
n(), clearTimeout(i);
|
|
3722
4417
|
};
|
|
3723
4418
|
}
|
|
3724
|
-
var
|
|
3725
|
-
function
|
|
4419
|
+
var vo = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4420
|
+
function yo() {
|
|
3726
4421
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
3727
4422
|
clearTimeout(n.backstop), e.delete(t);
|
|
3728
4423
|
let r = [...n.members];
|
|
@@ -3732,14 +4427,14 @@ function bi() {
|
|
|
3732
4427
|
return { join: (r, i, a) => {
|
|
3733
4428
|
let o = e.get(r);
|
|
3734
4429
|
if (o) {
|
|
3735
|
-
let e =
|
|
4430
|
+
let e = vo(a);
|
|
3736
4431
|
if (e > o.backstopMs) {
|
|
3737
4432
|
clearTimeout(o.backstop);
|
|
3738
4433
|
let n = o;
|
|
3739
4434
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
3740
4435
|
}
|
|
3741
4436
|
} else {
|
|
3742
|
-
let n =
|
|
4437
|
+
let n = vo(a), i = {
|
|
3743
4438
|
members: /* @__PURE__ */ new Set(),
|
|
3744
4439
|
backstop: setTimeout(() => t(r, i), n),
|
|
3745
4440
|
backstopMs: n
|
|
@@ -3749,7 +4444,7 @@ function bi() {
|
|
|
3749
4444
|
let s = o, c = {
|
|
3750
4445
|
release: i,
|
|
3751
4446
|
ready: !1,
|
|
3752
|
-
cancelReadiness:
|
|
4447
|
+
cancelReadiness: go(() => {
|
|
3753
4448
|
c.ready = !0, n(s) && t(r, s);
|
|
3754
4449
|
}, a)
|
|
3755
4450
|
};
|
|
@@ -3766,7 +4461,7 @@ function bi() {
|
|
|
3766
4461
|
}
|
|
3767
4462
|
//#endregion
|
|
3768
4463
|
//#region src/screen/observeBarHeight.ts
|
|
3769
|
-
function
|
|
4464
|
+
function bo(e, t) {
|
|
3770
4465
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
3771
4466
|
let n = new ResizeObserver(([e]) => {
|
|
3772
4467
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -3777,14 +4472,14 @@ function xi(e, t) {
|
|
|
3777
4472
|
}
|
|
3778
4473
|
//#endregion
|
|
3779
4474
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
3780
|
-
var
|
|
3781
|
-
function
|
|
4475
|
+
var xo = 0;
|
|
4476
|
+
function So(e) {
|
|
3782
4477
|
let t = 0, n = () => {
|
|
3783
4478
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
3784
4479
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
3785
4480
|
t = t < 0 ? 0 : t;
|
|
3786
|
-
let n = t -
|
|
3787
|
-
n = n < 0 ? 0 : n,
|
|
4481
|
+
let n = t - xo;
|
|
4482
|
+
n = n < 0 ? 0 : n, xo ||= t, e(t, n);
|
|
3788
4483
|
});
|
|
3789
4484
|
};
|
|
3790
4485
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -3793,14 +4488,14 @@ function Ci(e) {
|
|
|
3793
4488
|
}
|
|
3794
4489
|
//#endregion
|
|
3795
4490
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
3796
|
-
var
|
|
3797
|
-
function
|
|
3798
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
3799
|
-
if (
|
|
3800
|
-
|
|
4491
|
+
var Co = () => {}, wo = "data-flemo-gpu-prewarm", To = 2e3, Eo = 1200, Do = 120, Oo = 3, ko = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Ao = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", jo = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Mo = "cold", No = 0, Po = null;
|
|
4492
|
+
function Fo() {
|
|
4493
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !N()) return Co;
|
|
4494
|
+
if (No += 1, Mo === "cold") {
|
|
4495
|
+
Mo = "scheduled";
|
|
3801
4496
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
3802
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout:
|
|
3803
|
-
|
|
4497
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: To }) : null, t = e === null ? setTimeout(n, Eo) : null;
|
|
4498
|
+
Po = () => {
|
|
3804
4499
|
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
3805
4500
|
};
|
|
3806
4501
|
}, n = () => {
|
|
@@ -3808,20 +4503,41 @@ function Ii() {
|
|
|
3808
4503
|
t();
|
|
3809
4504
|
return;
|
|
3810
4505
|
}
|
|
3811
|
-
|
|
4506
|
+
Po = null, Mo = "done";
|
|
3812
4507
|
let n = document.createElement("div");
|
|
3813
|
-
n.setAttribute(
|
|
4508
|
+
n.setAttribute(wo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", ko);
|
|
3814
4509
|
let r = document.createElement("div");
|
|
3815
|
-
r.setAttribute("style",
|
|
4510
|
+
r.setAttribute("style", Ao), r.textContent = "flemo";
|
|
3816
4511
|
let i = document.createElement("div");
|
|
3817
|
-
i.setAttribute("style",
|
|
4512
|
+
i.setAttribute("style", jo);
|
|
4513
|
+
let a = document.createElement("div");
|
|
4514
|
+
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4515
|
+
let o = document.createElement("div");
|
|
4516
|
+
o.setAttribute("style", "width:24px;height:24px;border-radius:50%;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.3);");
|
|
4517
|
+
try {
|
|
4518
|
+
let e = document.createElement("canvas");
|
|
4519
|
+
e.width = 24, e.height = 24;
|
|
4520
|
+
let t = e.getContext("2d");
|
|
4521
|
+
if (t) {
|
|
4522
|
+
t.fillStyle = "#7a8", t.fillRect(0, 0, 24, 24), t.fillStyle = "#345", t.beginPath(), t.arc(12, 10, 6, 0, Math.PI * 2), t.fill();
|
|
4523
|
+
let n = document.createElement("img");
|
|
4524
|
+
n.src = e.toDataURL(), n.setAttribute("style", "width:24px;height:24px;object-fit:cover;"), o.appendChild(n);
|
|
4525
|
+
}
|
|
4526
|
+
} catch {}
|
|
4527
|
+
let s = document.createElement("div");
|
|
4528
|
+
s.setAttribute("style", "width:96px;height:10px;background:linear-gradient(90deg,#eee,#bbb,#eee);");
|
|
4529
|
+
let c = document.createElement("div");
|
|
4530
|
+
c.setAttribute("style", "border-top:1px solid #ccd;padding:2px 0;"), c.textContent = "의원 기록 표결 발의 가나다라", a.append(o, s, c), n.append(r, i, a), document.body.appendChild(n);
|
|
3818
4531
|
try {
|
|
3819
4532
|
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3820
|
-
duration:
|
|
3821
|
-
iterations:
|
|
4533
|
+
duration: Do,
|
|
4534
|
+
iterations: Oo
|
|
3822
4535
|
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
3823
|
-
duration:
|
|
3824
|
-
iterations:
|
|
4536
|
+
duration: Do,
|
|
4537
|
+
iterations: Oo
|
|
4538
|
+
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4539
|
+
duration: Do,
|
|
4540
|
+
iterations: Oo
|
|
3825
4541
|
});
|
|
3826
4542
|
} catch {}
|
|
3827
4543
|
setTimeout(() => n.remove(), 450);
|
|
@@ -3830,191 +4546,12 @@ function Ii() {
|
|
|
3830
4546
|
}
|
|
3831
4547
|
let e = !1;
|
|
3832
4548
|
return () => {
|
|
3833
|
-
e || (e = !0,
|
|
4549
|
+
e || (e = !0, No = Math.max(0, No - 1), No === 0 && Mo === "scheduled" && (Po?.(), Po = null, Mo = "cold"));
|
|
3834
4550
|
};
|
|
3835
4551
|
}
|
|
3836
4552
|
//#endregion
|
|
3837
|
-
//#region src/core/engine/imageDecodeOffloader.ts
|
|
3838
|
-
var Li = 8, Ri = 2, Q = 96, zi = 15e3, Bi = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Vi = "data-flemo-image-src", Hi = "flemo-image-scale-v1", Ui = (e) => {
|
|
3839
|
-
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
3840
|
-
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
3841
|
-
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
3842
|
-
}, Wi = "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};", Gi = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", Ki = async (e, t) => {
|
|
3843
|
-
try {
|
|
3844
|
-
if (typeof caches > "u") return;
|
|
3845
|
-
await (await caches.open(Hi)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
3846
|
-
} catch {}
|
|
3847
|
-
}, qi = async (e) => {
|
|
3848
|
-
try {
|
|
3849
|
-
if (typeof caches > "u") return null;
|
|
3850
|
-
let t = await (await caches.open(Hi)).match(e);
|
|
3851
|
-
return t ? await t.blob() : null;
|
|
3852
|
-
} catch {
|
|
3853
|
-
return null;
|
|
3854
|
-
}
|
|
3855
|
-
};
|
|
3856
|
-
function Ji(e) {
|
|
3857
|
-
if (!Gi()) return () => {};
|
|
3858
|
-
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new Set(), c = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, l = () => {
|
|
3859
|
-
if (t) return t;
|
|
3860
|
-
try {
|
|
3861
|
-
t = new Worker(URL.createObjectURL(new Blob([Wi])));
|
|
3862
|
-
} catch {
|
|
3863
|
-
return null;
|
|
3864
|
-
}
|
|
3865
|
-
return t.onmessage = (e) => {
|
|
3866
|
-
let { url: t, blob: n, error: r, skip: a } = e.data;
|
|
3867
|
-
if (i.delete(t), r || a || !n) {
|
|
3868
|
-
u(t, "skip");
|
|
3869
|
-
return;
|
|
3870
|
-
}
|
|
3871
|
-
let o = URL.createObjectURL(n);
|
|
3872
|
-
s.add(o), Ki(t, n), u(t, o);
|
|
3873
|
-
}, t;
|
|
3874
|
-
}, u = (e, t) => {
|
|
3875
|
-
r.has(e) || r.set(e, t);
|
|
3876
|
-
for (let [t, n] of [...a]) n.url === e && d(t, r.get(e));
|
|
3877
|
-
}, d = (e, t) => {
|
|
3878
|
-
let n = a.get(e);
|
|
3879
|
-
if (n) {
|
|
3880
|
-
if (a.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
3881
|
-
if (t && t !== "skip") {
|
|
3882
|
-
e.setAttribute(Vi, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
3883
|
-
let r = e.closest("picture");
|
|
3884
|
-
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
3885
|
-
e.src = t;
|
|
3886
|
-
}
|
|
3887
|
-
} else e.getAttribute("src") === Bi && (t && t !== "skip" ? e.src = t : (e.removeAttribute(Vi), e.src = n.url));
|
|
3888
|
-
n.previousVisibility ? e.style.visibility = n.previousVisibility : e.style.removeProperty("visibility");
|
|
3889
|
-
}
|
|
3890
|
-
}, f = (e, t, n) => {
|
|
3891
|
-
if (r.has(e) || i.has(e)) return;
|
|
3892
|
-
let a = l();
|
|
3893
|
-
if (!a) return;
|
|
3894
|
-
i.add(e);
|
|
3895
|
-
let o = Math.round(Math.max(Q, t * c()) * Ri), s = Math.max(t * n, 9216) * c() ** 2;
|
|
3896
|
-
a.postMessage({
|
|
3897
|
-
url: e,
|
|
3898
|
-
targetWidth: o,
|
|
3899
|
-
neededArea: s,
|
|
3900
|
-
ratio: 8
|
|
3901
|
-
});
|
|
3902
|
-
}, p = (e) => {
|
|
3903
|
-
if (e.complete && e.naturalWidth > 0) return;
|
|
3904
|
-
let t = {
|
|
3905
|
-
url: "",
|
|
3906
|
-
previousVisibility: e.style.visibility,
|
|
3907
|
-
timeout: setTimeout(() => d(e, null), zi),
|
|
3908
|
-
responsive: !0
|
|
3909
|
-
}, i = () => {
|
|
3910
|
-
/* v8 ignore next -- consider() only routes elements with an https src
|
|
3911
|
-
here, so the final fallback arm is unreachable. */
|
|
3912
|
-
let i = e.currentSrc || e.getAttribute("src") || "", o = e.getBoundingClientRect();
|
|
3913
|
-
if (!(/^https?:/.test(i) && Ui({
|
|
3914
|
-
naturalWidth: e.naturalWidth,
|
|
3915
|
-
naturalHeight: e.naturalHeight,
|
|
3916
|
-
boxWidth: o.width || Q,
|
|
3917
|
-
boxHeight: o.height || Q,
|
|
3918
|
-
devicePixelRatio: c()
|
|
3919
|
-
}))) {
|
|
3920
|
-
d(e, null);
|
|
3921
|
-
return;
|
|
3922
|
-
}
|
|
3923
|
-
t.url = i;
|
|
3924
|
-
let l = r.get(i);
|
|
3925
|
-
if (l) {
|
|
3926
|
-
d(e, l);
|
|
3927
|
-
return;
|
|
3928
|
-
}
|
|
3929
|
-
qi(i).then((t) => {
|
|
3930
|
-
if (!(n || !a.has(e))) {
|
|
3931
|
-
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
3932
|
-
releases every held element of the url first, so a still-held
|
|
3933
|
-
element cannot observe an existing verdict here; kept as a guard
|
|
3934
|
-
against future settle() reorderings. */
|
|
3935
|
-
if (r.has(i)) {
|
|
3936
|
-
d(e, r.get(i));
|
|
3937
|
-
return;
|
|
3938
|
-
}
|
|
3939
|
-
/* v8 ignore stop */
|
|
3940
|
-
if (t) {
|
|
3941
|
-
let e = URL.createObjectURL(t);
|
|
3942
|
-
s.add(e), u(i, e);
|
|
3943
|
-
return;
|
|
3944
|
-
}
|
|
3945
|
-
f(i, o.width || Q, o.height || Q);
|
|
3946
|
-
}
|
|
3947
|
-
});
|
|
3948
|
-
}, o = () => d(e, null);
|
|
3949
|
-
t.detachListeners = () => {
|
|
3950
|
-
e.removeEventListener("load", i), e.removeEventListener("error", o);
|
|
3951
|
-
}, e.addEventListener("load", i), e.addEventListener("error", o), a.set(e, t), e.style.visibility = "hidden";
|
|
3952
|
-
}, m = (e) => {
|
|
3953
|
-
if (n || o.has(e) || e.getAttribute("data-flemo-image-src") !== null) return;
|
|
3954
|
-
let t = e.getAttribute("src") ?? "";
|
|
3955
|
-
if (!/^https?:/.test(t)) return;
|
|
3956
|
-
if (e.getAttribute("srcset") !== null || e.closest("picture") !== null) {
|
|
3957
|
-
o.add(e), p(e);
|
|
3958
|
-
return;
|
|
3959
|
-
}
|
|
3960
|
-
if (o.add(e), e.complete && e.naturalWidth > 0) {
|
|
3961
|
-
let n = e.getBoundingClientRect();
|
|
3962
|
-
f(t, n.width || Q, n.height || Q);
|
|
3963
|
-
return;
|
|
3964
|
-
}
|
|
3965
|
-
let i = r.get(t);
|
|
3966
|
-
if (i !== "skip") {
|
|
3967
|
-
if (i) {
|
|
3968
|
-
e.setAttribute(Vi, t), e.src = i;
|
|
3969
|
-
return;
|
|
3970
|
-
}
|
|
3971
|
-
a.set(e, {
|
|
3972
|
-
url: t,
|
|
3973
|
-
previousVisibility: e.style.visibility,
|
|
3974
|
-
timeout: setTimeout(() => d(e, null), zi)
|
|
3975
|
-
}), e.style.visibility = "hidden", e.setAttribute(Vi, t), e.src = Bi, qi(t).then((i) => {
|
|
3976
|
-
if (n || r.has(t)) return;
|
|
3977
|
-
if (i) {
|
|
3978
|
-
let e = URL.createObjectURL(i);
|
|
3979
|
-
s.add(e), u(t, e);
|
|
3980
|
-
return;
|
|
3981
|
-
}
|
|
3982
|
-
let a = () => {
|
|
3983
|
-
if (n) return;
|
|
3984
|
-
let r = e.getBoundingClientRect();
|
|
3985
|
-
f(t, r.width || Q, r.height || Q);
|
|
3986
|
-
};
|
|
3987
|
-
typeof requestAnimationFrame == "function" ? requestAnimationFrame(a) : a();
|
|
3988
|
-
});
|
|
3989
|
-
}
|
|
3990
|
-
}, h = (e) => {
|
|
3991
|
-
if (e instanceof HTMLImageElement && m(e), typeof e.querySelectorAll == "function") for (let t of Array.from(e.querySelectorAll("img"))) m(t);
|
|
3992
|
-
}, g = new MutationObserver((e) => {
|
|
3993
|
-
for (let t of e) for (let e of Array.from(t.addedNodes)) e instanceof Element && h(e);
|
|
3994
|
-
});
|
|
3995
|
-
return g.observe(e, {
|
|
3996
|
-
childList: !0,
|
|
3997
|
-
subtree: !0
|
|
3998
|
-
}), h(e), () => {
|
|
3999
|
-
n = !0, g.disconnect(), t?.terminate(), t = null;
|
|
4000
|
-
for (let e of [...a.keys()]) d(e, null);
|
|
4001
|
-
i.clear(), r.clear();
|
|
4002
|
-
for (let e of s) URL.revokeObjectURL(e);
|
|
4003
|
-
s.clear();
|
|
4004
|
-
};
|
|
4005
|
-
}
|
|
4006
|
-
var $ = null;
|
|
4007
|
-
function Yi() {
|
|
4008
|
-
return typeof document > "u" || !document.body ? () => {} : ($ ? $.count += 1 : $ = {
|
|
4009
|
-
dispose: Ji(document.body),
|
|
4010
|
-
count: 1
|
|
4011
|
-
}, () => {
|
|
4012
|
-
$ && (--$.count, $.count <= 0 && ($.dispose(), $ = null));
|
|
4013
|
-
});
|
|
4014
|
-
}
|
|
4015
|
-
//#endregion
|
|
4016
4553
|
//#region src/utils/isOpaqueColor.ts
|
|
4017
|
-
function
|
|
4554
|
+
function Io(e) {
|
|
4018
4555
|
let t = e.trim().toLowerCase();
|
|
4019
4556
|
if (t === "transparent" || t === "") return !1;
|
|
4020
4557
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4025,7 +4562,7 @@ function Xi(e) {
|
|
|
4025
4562
|
}
|
|
4026
4563
|
//#endregion
|
|
4027
4564
|
//#region src/utils/buildRoutePath.ts
|
|
4028
|
-
function
|
|
4565
|
+
function Lo(e, n) {
|
|
4029
4566
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
4030
4567
|
return {
|
|
4031
4568
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4033,4 +4570,4 @@ function Zi(e, n) {
|
|
|
4033
4570
|
};
|
|
4034
4571
|
}
|
|
4035
4572
|
//#endregion
|
|
4036
|
-
export {
|
|
4573
|
+
export { oo as ANIM_HOLD_RELEASE_BACKSTOP_MS, K as OFFLOADED_SRC_ATTR, Qn as OVERSIZE_AREA_RATIO, ha as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, ao as animHoldKey, Un as animateInline, yn as animationName, ae as appendParamsQuery, On as applyTransitionStyles, Lo as buildRoutePath, Ya as canProgrammaticallyScroll, W as clearInlineAnimation, fn as collectAnimatedProperties, Cn as compileTransitionStyles, Za as computeBarRiding, Ot as computeScreenFreeze, Dt as computeScreenFreezeMode, b as consumeSelfInducedPop, yo as createAnimHoldCoordinator, g as createBrowserHistoryDriver, Vt as createDecorator, c as createHistoryStore, x as createHistorySync, dr as createImageDecodeOffloader, A as createMemoryHistoryDriver, te as createNavigateStore, re as createNavigationController, Gt as createPartTransition, Ht as createRawDecorator, Kt as createRawPartTransition, At as createRawTransition, me as createRouterScope, he as createScreenSelector, de as createScreenStore, _ as createSelfPopGuard, oe as createStepController, $a as createSwipeController, kt as createTransition, Ga as createTransitionEngine, ce as createTransitionStore, Ft as cupertino, R as decoratorMap, N as detectBlinkEngine, lo as eagerlyDecodeImages, mn as easingToCss, Fo as ensureGpuPipelinePrewarm, pr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Fn as enteringInitialStyle, Ka as findScrollable, l as getMatchedPathPattern, u as getParams, He as governedCompiledActive, Er as holdCompositorWarm, ye as isLegacyAndroidBlink, Io as isOpaqueColor, f as isServer, Lt as layout, Ve as lowPowerCadenceActive, y as markSelfInducedPop, le as matchesPathname, Rt as material, zt as none, bo as observeBarHeight, So as observeViewportScrollHeight, Ja as overflowsAxis, Wt as overlay, z as partTransitionMap, ft as readImageOffloadOverride, dt as readLayerPromotionFlag, ut as readPrerasterFlag, st as readSettleGateFlag, ie as readStepParams, Pn as registerTransitionDefinitions, ee as releaseScopeHistorySync, L as resolveTransition, _o as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Xa as sharedBarsMatch, or as shouldOffloadImage, rt as steadySixtyPlayerEligible, se as subscribeStepParamsRestore, pn as targetToDecls, Bt as transitionMap, H as variantHasAnimation };
|