fansunited-frontend-components 0.0.98 → 0.0.99
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/Betslip.js +2 -2
- package/ChanceGame.js +958 -1464
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4225 -5079
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6010 -7547
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +546 -849
- package/List.js +227 -218
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +2 -2
- package/PlayerOfTheMatch.js +285 -269
- package/PollVote.js +2 -2
- package/Predictor.js +80 -127
- package/README.md +1 -1
- package/Standings.js +991 -1324
- package/TopX.js +1120 -1167
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
- package/chunks/CheckCircle-I1FktW5Y.js +13 -0
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/Person-CXRqyF4E.js +11 -0
- package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
- package/chunks/Search-CIXthh0D.js +17 -0
- package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
- package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
- package/chunks/index-BENM3N_w.js +4 -0
- package/chunks/index-BRxAV693.js +4 -0
- package/chunks/index-BXYTsvIX.js +4 -0
- package/chunks/index-C0ilols1.js +4 -0
- package/chunks/index-D7VhczXH.js +4 -0
- package/chunks/index-DKwvdw9t.js +4 -0
- package/chunks/index-DZN-AITW.js +4 -0
- package/chunks/main-B2sDRFF4.js +2184 -0
- package/chunks/main-CzfWaEQP.js +4869 -0
- package/chunks/main-DFNl3g_U.js +4910 -0
- package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
- package/chunks/main-DiBlJBNb.js +1956 -0
- package/chunks/main-DxvBjXsd.js +1775 -0
- package/chunks/main-S8_NDSiY.js +3209 -0
- package/chunks/main-lBgr8Liq.js +6571 -0
- package/chunks/{withVersionStamp-T8seRk9h.js → withVersionStamp-BsLyhvNA.js} +1 -1
- package/package.json +2 -2
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
package/CompetitionStatistics.js
CHANGED
|
@@ -1,2583 +1,2410 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as fe } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Spinner as Et, WidgetPortal as Mt } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
+
import P, { useState as de, useEffect as Ee, useMemo as Ie } from "react";
|
|
4
|
+
import { css as d, keyframes as zt } from "@emotion/react";
|
|
5
|
+
import { fetchSearchEntitiesByIds as Lt, useDisableCache as Dt, useColors as At, useCurrentThemeMode as Pt, hexToRgb as Ft, toIntlLocale as Wt, useIsRtl as Ot, DirectionalIcon as Xe, isMobile as _e, isDesktop as Bt, isExtraSmall as Nt } from "fansunited-frontend-core";
|
|
6
|
+
import { useTranslation as Gt } from "react-i18next";
|
|
7
|
+
import { ChevronLeft as Ht, ChevronRight as jt, Tv as Ut } from "fansunited-frontend-core/ui/icons/lucide";
|
|
8
|
+
import { O as Vt, u as Kt } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
|
|
7
9
|
import "fansunited-sdk-esm/enums";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { createPortal as $t } from "react-dom";
|
|
11
|
-
import { w as Tt } from "./chunks/withVersionStamp-T8seRk9h.js";
|
|
12
|
-
/**
|
|
13
|
-
* @license lucide-react v0.454.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const kt = vt("Tv", [
|
|
19
|
-
["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2", ry: "2", key: "10ag99" }],
|
|
20
|
-
["polyline", { points: "17 2 12 7 7 2", key: "11pgbg" }]
|
|
21
|
-
]), Oe = "https://sports.fansunitedapi.com/v1", Fe = (e) => {
|
|
10
|
+
import { w as Xt } from "./chunks/withVersionStamp-BsLyhvNA.js";
|
|
11
|
+
const wt = "https://sports.fansunitedapi.com/v1", vt = (e) => {
|
|
22
12
|
try {
|
|
23
13
|
const t = e.helpers.getSDKConfiguration();
|
|
24
14
|
return !(t != null && t.apiKey) || !(t != null && t.clientId) ? null : { apiKey: t.apiKey, clientId: t.clientId };
|
|
25
15
|
} catch {
|
|
26
16
|
return null;
|
|
27
17
|
}
|
|
28
|
-
},
|
|
29
|
-
const t =
|
|
18
|
+
}, Ct = (e) => {
|
|
19
|
+
const t = vt(e);
|
|
30
20
|
return t ? new URLSearchParams({ key: t.apiKey, client_id: t.clientId }) : null;
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
`${
|
|
37
|
-
{ signal:
|
|
21
|
+
}, Yt = async (e, t, r, l, c = !1) => {
|
|
22
|
+
const s = Ct(e);
|
|
23
|
+
if (!s || !t) return null;
|
|
24
|
+
r && s.set("season_id", r), c && s.set("disable_cache", String(Date.now()));
|
|
25
|
+
const m = await fetch(
|
|
26
|
+
`${wt}/competitions/${encodeURIComponent(t)}?${s.toString()}`,
|
|
27
|
+
{ signal: l }
|
|
38
28
|
);
|
|
39
|
-
if (!
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
},
|
|
43
|
-
var
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
46
|
-
|
|
29
|
+
if (!m.ok) throw new Error(`Sports API responded ${m.status}`);
|
|
30
|
+
const u = await m.json(), a = (u == null ? void 0 : u.data) ?? u;
|
|
31
|
+
return a != null && a.id ? a : null;
|
|
32
|
+
}, qt = async (e, t, r, l = !1) => {
|
|
33
|
+
var s;
|
|
34
|
+
const c = Ct(e);
|
|
35
|
+
if (!c) return null;
|
|
36
|
+
l && c.set("disable_cache", String(Date.now()));
|
|
47
37
|
try {
|
|
48
|
-
const
|
|
49
|
-
`${
|
|
50
|
-
{ signal:
|
|
38
|
+
const m = await fetch(
|
|
39
|
+
`${wt}/events/${encodeURIComponent(t)}?${c.toString()}`,
|
|
40
|
+
{ signal: r }
|
|
51
41
|
);
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
54
|
-
return
|
|
42
|
+
if (!m.ok) return null;
|
|
43
|
+
const u = await m.json(), a = (s = (u == null ? void 0 : u.data) ?? u) == null ? void 0 : s.event;
|
|
44
|
+
return a != null && a.id ? a : null;
|
|
55
45
|
} catch {
|
|
56
46
|
return null;
|
|
57
47
|
}
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
return !
|
|
61
|
-
signal:
|
|
48
|
+
}, Jt = async (e, t, r, l = !1) => {
|
|
49
|
+
const c = /* @__PURE__ */ new Map(), s = vt(e);
|
|
50
|
+
return !s || t.length === 0 || (await Lt(s, t, {
|
|
51
|
+
signal: r,
|
|
62
52
|
partial: !0,
|
|
63
|
-
disableCache:
|
|
64
|
-
})).forEach((
|
|
65
|
-
},
|
|
53
|
+
disableCache: l
|
|
54
|
+
})).forEach((u) => c.set(u.id, u)), c;
|
|
55
|
+
}, Qt = ["1_15", "16_30", "31_45", "46_60", "61_75", "76_90"], Fe = (e) => {
|
|
66
56
|
const t = /* @__PURE__ */ new Map();
|
|
67
|
-
return (e ?? []).forEach((
|
|
68
|
-
|
|
57
|
+
return (e ?? []).forEach((r) => {
|
|
58
|
+
r.key && r.value != null && t.set(r.key.toLowerCase(), r.value);
|
|
69
59
|
}), t;
|
|
70
|
-
},
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
return Number.isFinite(
|
|
75
|
-
},
|
|
60
|
+
}, ae = (e, t) => {
|
|
61
|
+
const r = e.get(t);
|
|
62
|
+
if (r == null || r === "") return null;
|
|
63
|
+
const l = Number(r);
|
|
64
|
+
return Number.isFinite(l) ? l : null;
|
|
65
|
+
}, j = (e, t) => ae(e, t) ?? 0, Zt = [
|
|
76
66
|
[/POSTPON/, "postponed"],
|
|
77
67
|
[/CANCEL/, "cancelled"],
|
|
78
68
|
[/INTERRUPT|SUSPEND/, "interrupted"],
|
|
79
69
|
[/ABANDON/, "abandoned"]
|
|
80
|
-
],
|
|
81
|
-
var
|
|
70
|
+
], xt = (e) => {
|
|
71
|
+
var r;
|
|
82
72
|
const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""} ${(e == null ? void 0 : e.sub_type) ?? ""}`.toUpperCase();
|
|
83
|
-
return ((
|
|
84
|
-
},
|
|
85
|
-
if (
|
|
73
|
+
return ((r = Zt.find(([l]) => l.test(t))) == null ? void 0 : r[1]) ?? null;
|
|
74
|
+
}, St = (e) => {
|
|
75
|
+
if (xt(e)) return "CANCELLED";
|
|
86
76
|
const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""}`.toUpperCase();
|
|
87
77
|
return /(FINISH|ENDED|CLOSED|AFTER_)/.test(t) ? "FINISHED" : /(LIVE|PROGRESS|INPLAY|IN_PLAY|HALF|PERIOD)/.test(t) ? "LIVE" : "UPCOMING";
|
|
88
|
-
},
|
|
78
|
+
}, eo = {
|
|
89
79
|
"1st_half": 0,
|
|
90
80
|
"2nd_half": 45,
|
|
91
81
|
extra_time: 90,
|
|
92
82
|
extra_time_1: 90,
|
|
93
83
|
extra_time_2: 105
|
|
94
|
-
},
|
|
95
|
-
var
|
|
96
|
-
const t = (((
|
|
97
|
-
return
|
|
98
|
-
},
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
84
|
+
}, to = (e) => {
|
|
85
|
+
var c, s;
|
|
86
|
+
const t = (((c = e.status) == null ? void 0 : c.sub_type) ?? "").toLowerCase(), r = eo[t], l = ((s = e.timing) == null ? void 0 : s.current_minute) ?? 0;
|
|
87
|
+
return r === void 0 || l <= 0 ? null : r + l;
|
|
88
|
+
}, Me = (e, t) => {
|
|
89
|
+
const r = (e.score ?? []).find((s) => s.key === t);
|
|
90
|
+
if (!r || r.competitor_one == null || r.competitor_two == null)
|
|
101
91
|
return null;
|
|
102
|
-
const
|
|
103
|
-
return Number.isFinite(
|
|
104
|
-
},
|
|
105
|
-
const t =
|
|
92
|
+
const l = Number(r.competitor_one), c = Number(r.competitor_two);
|
|
93
|
+
return Number.isFinite(l) && Number.isFinite(c) ? [l, c] : null;
|
|
94
|
+
}, Ye = (e) => {
|
|
95
|
+
const t = Fe(e == null ? void 0 : e.stats);
|
|
106
96
|
return {
|
|
107
97
|
id: (e == null ? void 0 : e.id) ?? "",
|
|
108
|
-
yellowCards:
|
|
109
|
-
redCards:
|
|
110
|
-
shotsOnTarget:
|
|
111
|
-
possession:
|
|
112
|
-
corners:
|
|
113
|
-
goalsByPeriod:
|
|
98
|
+
yellowCards: ae(t, "yellow_cards"),
|
|
99
|
+
redCards: ae(t, "red_cards"),
|
|
100
|
+
shotsOnTarget: ae(t, "shots_on_target"),
|
|
101
|
+
possession: ae(t, "ball_possession_percentage"),
|
|
102
|
+
corners: ae(t, "corners"),
|
|
103
|
+
goalsByPeriod: Qt.map((r) => j(t, `goals_${r}`))
|
|
114
104
|
};
|
|
115
|
-
},
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
(
|
|
119
|
-
(
|
|
105
|
+
}, oo = 3 * 24 * 60 * 60 * 1e3, ro = (e, t) => {
|
|
106
|
+
const r = t.filter((s) => !!s.id).map((s) => {
|
|
107
|
+
const m = /* @__PURE__ */ new Set();
|
|
108
|
+
(s.groups ?? []).forEach(
|
|
109
|
+
(h) => (h.standings ?? []).forEach((b) => b.competitor_id && m.add(b.competitor_id))
|
|
120
110
|
);
|
|
121
|
-
const
|
|
122
|
-
return { id:
|
|
123
|
-
}),
|
|
124
|
-
return e.forEach((
|
|
125
|
-
var
|
|
126
|
-
if ((
|
|
127
|
-
|
|
111
|
+
const u = Date.parse(s.start_date ?? ""), a = Date.parse(s.end_date ?? "") + 24 * 60 * 60 * 1e3;
|
|
112
|
+
return { id: s.id, teams: m, from: u, to: a };
|
|
113
|
+
}), l = (s, m) => !Number.isFinite(s.from) || !Number.isFinite(s.to) ? 1 / 0 : m < s.from ? s.from - m : m > s.to ? m - s.to : 0, c = /* @__PURE__ */ new Map();
|
|
114
|
+
return e.forEach((s) => {
|
|
115
|
+
var w, y, _, D, E;
|
|
116
|
+
if ((w = s.round) != null && w.stage_id) {
|
|
117
|
+
c.set(s, s.round.stage_id);
|
|
128
118
|
return;
|
|
129
119
|
}
|
|
130
|
-
if (
|
|
131
|
-
|
|
120
|
+
if (r.length <= 1) {
|
|
121
|
+
c.set(s, ((y = r[0]) == null ? void 0 : y.id) ?? null);
|
|
132
122
|
return;
|
|
133
123
|
}
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
|
|
124
|
+
const m = Date.parse(((_ = s.timing) == null ? void 0 : _.start_time) ?? ""), u = ((D = s.competitor_one) == null ? void 0 : D.id) ?? "", a = ((E = s.competitor_two) == null ? void 0 : E.id) ?? "", h = (x) => l(x, m) <= oo, b = r.filter((x) => x.teams.has(u) && x.teams.has(a) && h(x)).sort((x, R) => x.teams.size - R.teams.size)[0];
|
|
125
|
+
if (b) {
|
|
126
|
+
c.set(s, b.id);
|
|
137
127
|
return;
|
|
138
128
|
}
|
|
139
|
-
const f = (
|
|
140
|
-
|
|
141
|
-
}),
|
|
142
|
-
},
|
|
143
|
-
var
|
|
144
|
-
const
|
|
129
|
+
const f = (x) => [...x].sort((R, $) => l(R, m) - l($, m))[0], S = f(r.filter((x) => x.teams.size === 0 || h(x))) ?? f(r);
|
|
130
|
+
c.set(s, (S == null ? void 0 : S.id) ?? null);
|
|
131
|
+
}), c;
|
|
132
|
+
}, so = (e, t, r) => {
|
|
133
|
+
var s, m;
|
|
134
|
+
const l = St(e.status), c = l === "FINISHED" || l === "LIVE";
|
|
145
135
|
return {
|
|
146
136
|
id: e.id ?? "",
|
|
147
|
-
status:
|
|
148
|
-
start: ((
|
|
149
|
-
stageId:
|
|
137
|
+
status: l,
|
|
138
|
+
start: ((s = e.timing) == null ? void 0 : s.start_time) ?? "",
|
|
139
|
+
stageId: r,
|
|
150
140
|
round: t,
|
|
151
|
-
home:
|
|
152
|
-
away:
|
|
153
|
-
fullTime:
|
|
154
|
-
halfTime:
|
|
155
|
-
liveMinute:
|
|
156
|
-
notPlayedReason:
|
|
157
|
-
isHalfTime:
|
|
141
|
+
home: Ye(e.competitor_one),
|
|
142
|
+
away: Ye(e.competitor_two),
|
|
143
|
+
fullTime: c ? Me(e, "result") ?? Me(e, "full_time") ?? [0, 0] : null,
|
|
144
|
+
halfTime: c ? Me(e, "half_time") : null,
|
|
145
|
+
liveMinute: l === "LIVE" ? to(e) : null,
|
|
146
|
+
notPlayedReason: xt(e.status),
|
|
147
|
+
isHalfTime: l === "LIVE" && (((m = e.status) == null ? void 0 : m.sub_type) ?? "").toLowerCase() === "halftime"
|
|
158
148
|
};
|
|
159
|
-
},
|
|
149
|
+
}, no = (e) => {
|
|
160
150
|
const t = /* @__PURE__ */ new Map();
|
|
161
|
-
e.forEach((
|
|
162
|
-
var
|
|
163
|
-
const
|
|
164
|
-
(
|
|
151
|
+
e.forEach((l) => {
|
|
152
|
+
var u, a;
|
|
153
|
+
const c = ((u = l.round) == null ? void 0 : u.id) ?? "", s = ((a = l.timing) == null ? void 0 : a.start_time) ?? "", m = t.get(c);
|
|
154
|
+
(m === void 0 || s < m) && t.set(c, s);
|
|
165
155
|
});
|
|
166
|
-
const
|
|
167
|
-
Array.from(t.entries()).sort((
|
|
156
|
+
const r = new Map(
|
|
157
|
+
Array.from(t.entries()).sort((l, c) => l[1].localeCompare(c[1])).map(([l], c) => [l, c + 1])
|
|
168
158
|
);
|
|
169
159
|
return new Map(
|
|
170
|
-
e.map((
|
|
171
|
-
var
|
|
160
|
+
e.map((l) => {
|
|
161
|
+
var c, s;
|
|
172
162
|
return [
|
|
173
|
-
|
|
174
|
-
((
|
|
163
|
+
l,
|
|
164
|
+
((c = l.round) == null ? void 0 : c.matchday) ?? r.get(((s = l.round) == null ? void 0 : s.id) ?? "") ?? 1
|
|
175
165
|
];
|
|
176
166
|
})
|
|
177
167
|
);
|
|
178
|
-
},
|
|
179
|
-
const t =
|
|
168
|
+
}, qe = (e) => {
|
|
169
|
+
const t = Fe(e.statistics);
|
|
180
170
|
return {
|
|
181
171
|
teamId: e.team_id ?? "",
|
|
182
|
-
matchesPlayed:
|
|
183
|
-
won:
|
|
184
|
-
draw:
|
|
185
|
-
lost:
|
|
186
|
-
homeWon:
|
|
187
|
-
awayWon:
|
|
188
|
-
goalsScored:
|
|
189
|
-
goalsAllowed:
|
|
190
|
-
avgTotalGoals:
|
|
172
|
+
matchesPlayed: j(t, "matches_played"),
|
|
173
|
+
won: j(t, "won"),
|
|
174
|
+
draw: j(t, "draw"),
|
|
175
|
+
lost: j(t, "lost"),
|
|
176
|
+
homeWon: j(t, "home_won"),
|
|
177
|
+
awayWon: j(t, "away_won"),
|
|
178
|
+
goalsScored: j(t, "goals_scored"),
|
|
179
|
+
goalsAllowed: j(t, "goals_allowed"),
|
|
180
|
+
avgTotalGoals: ae(t, "avg_total_goals")
|
|
191
181
|
};
|
|
192
|
-
},
|
|
193
|
-
const t =
|
|
182
|
+
}, io = (e) => {
|
|
183
|
+
const t = Fe(e.statistics);
|
|
194
184
|
return {
|
|
195
185
|
athleteId: e.athlete_id ?? "",
|
|
196
186
|
teamId: e.team_id ?? "",
|
|
197
|
-
goals:
|
|
198
|
-
assists:
|
|
199
|
-
minutes:
|
|
200
|
-
appearances:
|
|
201
|
-
yellowCards:
|
|
202
|
-
redCards:
|
|
203
|
-
cleanSheets:
|
|
187
|
+
goals: j(t, "goals"),
|
|
188
|
+
assists: j(t, "assists"),
|
|
189
|
+
minutes: j(t, "minutes"),
|
|
190
|
+
appearances: j(t, "appearances"),
|
|
191
|
+
yellowCards: j(t, "yellow_cards"),
|
|
192
|
+
redCards: j(t, "red_cards"),
|
|
193
|
+
cleanSheets: j(t, "clean_sheets")
|
|
204
194
|
};
|
|
205
|
-
},
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
195
|
+
}, ao = (e, t, r) => {
|
|
196
|
+
const l = e.season, c = ((l == null ? void 0 : l.events) ?? []).filter((y) => !!y.id).map((y) => {
|
|
197
|
+
const _ = r.get(y.id);
|
|
198
|
+
if (!_) return y;
|
|
199
|
+
const D = (E, x) => E && typeof E == "object" ? E : x;
|
|
210
200
|
return {
|
|
211
|
-
...
|
|
212
|
-
|
|
213
|
-
round:
|
|
214
|
-
competitor_one:
|
|
215
|
-
competitor_two:
|
|
201
|
+
...y,
|
|
202
|
+
..._,
|
|
203
|
+
round: y.round ?? _.round,
|
|
204
|
+
competitor_one: D(_.competitor_one, y.competitor_one),
|
|
205
|
+
competitor_two: D(_.competitor_two, y.competitor_two)
|
|
216
206
|
};
|
|
217
|
-
}),
|
|
218
|
-
id:
|
|
219
|
-
nameId:
|
|
220
|
-
order:
|
|
221
|
-
})).sort((
|
|
222
|
-
return
|
|
207
|
+
}), s = (l == null ? void 0 : l.stages) ?? [], m = ro(c, s), u = t ? c.filter((y) => m.get(y) === t) : c, a = no(u), h = new Set(u.map((y) => m.get(y))), b = s.filter((y) => !!y.id && h.has(y.id)).map((y) => ({
|
|
208
|
+
id: y.id,
|
|
209
|
+
nameId: y.stage_name_id || null,
|
|
210
|
+
order: y.order ?? 0
|
|
211
|
+
})).sort((y, _) => y.order - _.order), f = /* @__PURE__ */ new Map(), S = (l == null ? void 0 : l.team_stats) ?? [], w = t || null;
|
|
212
|
+
return S.filter((y) => (y.stage_id ?? null) === w).forEach((y) => y.team_id && f.set(y.team_id, qe(y))), t && f.size === 0 && S.filter((y) => y.stage_id == null).forEach((y) => y.team_id && f.set(y.team_id, qe(y))), {
|
|
223
213
|
id: e.id ?? "",
|
|
224
214
|
sport: e.sport ?? null,
|
|
225
215
|
season: {
|
|
226
|
-
id: (
|
|
227
|
-
name: (
|
|
228
|
-
startDate: (
|
|
229
|
-
endDate: (
|
|
216
|
+
id: (l == null ? void 0 : l.id) ?? null,
|
|
217
|
+
name: (l == null ? void 0 : l.name) ?? null,
|
|
218
|
+
startDate: (l == null ? void 0 : l.start_date) ?? null,
|
|
219
|
+
endDate: (l == null ? void 0 : l.end_date) ?? null
|
|
230
220
|
},
|
|
231
|
-
matches:
|
|
232
|
-
stages:
|
|
221
|
+
matches: u.map((y) => so(y, a.get(y) ?? 1, m.get(y) ?? null)),
|
|
222
|
+
stages: b,
|
|
233
223
|
teamStats: f,
|
|
234
|
-
athletes: ((
|
|
224
|
+
athletes: ((l == null ? void 0 : l.athlete_stats) ?? []).filter((y) => !!y.athlete_id && (y.statistics ?? []).length > 0).map(io)
|
|
235
225
|
};
|
|
236
|
-
},
|
|
237
|
-
const
|
|
238
|
-
var
|
|
239
|
-
return ((
|
|
226
|
+
}, lo = (e) => (e ?? "").split("-")[0].toUpperCase(), co = (e, t, r) => {
|
|
227
|
+
const l = lo(t), c = (s, m) => {
|
|
228
|
+
var u, a, h;
|
|
229
|
+
return ((h = (a = (u = e.get(s)) == null ? void 0 : u.assets) == null ? void 0 : a.find((b) => b.key === m)) == null ? void 0 : h.value) ?? null;
|
|
240
230
|
};
|
|
241
231
|
return {
|
|
242
|
-
has: (
|
|
243
|
-
name: (
|
|
244
|
-
var
|
|
245
|
-
const
|
|
246
|
-
return
|
|
247
|
-
(
|
|
232
|
+
has: (s) => e.has(s),
|
|
233
|
+
name: (s) => {
|
|
234
|
+
var a, h;
|
|
235
|
+
const m = e.get(s);
|
|
236
|
+
return m && (((h = (a = m.translations) == null ? void 0 : a.find(
|
|
237
|
+
(b) => {
|
|
248
238
|
var f;
|
|
249
|
-
return ((f =
|
|
239
|
+
return ((f = b.language) == null ? void 0 : f.toUpperCase()) === l;
|
|
250
240
|
}
|
|
251
|
-
)) == null ? void 0 :
|
|
241
|
+
)) == null ? void 0 : h.name) || m.name) || r;
|
|
252
242
|
},
|
|
253
|
-
logo: (
|
|
254
|
-
photo: (
|
|
255
|
-
position: (
|
|
256
|
-
var
|
|
257
|
-
return ((
|
|
243
|
+
logo: (s) => c(s, "LOGO"),
|
|
244
|
+
photo: (s) => c(s, "HEADSHOT"),
|
|
245
|
+
position: (s) => {
|
|
246
|
+
var m;
|
|
247
|
+
return ((m = e.get(s)) == null ? void 0 : m.position) ?? null;
|
|
258
248
|
}
|
|
259
249
|
};
|
|
260
|
-
},
|
|
261
|
-
var
|
|
262
|
-
const t = new Set(((
|
|
263
|
-
return e.id && t.add(e.id), (
|
|
264
|
-
var
|
|
265
|
-
(
|
|
266
|
-
}), (
|
|
250
|
+
}, uo = 4 * 60 * 60 * 1e3, po = (e) => {
|
|
251
|
+
var r, l, c, s, m, u, a, h, b;
|
|
252
|
+
const t = new Set(((r = e.meta) == null ? void 0 : r.entity_ids) ?? []);
|
|
253
|
+
return e.id && t.add(e.id), (c = (l = e.season) == null ? void 0 : l.stages) == null || c.forEach((f) => f.stage_name_id && t.add(f.stage_name_id)), (m = (s = e.season) == null ? void 0 : s.events) == null || m.forEach((f) => {
|
|
254
|
+
var S, w;
|
|
255
|
+
(S = f.competitor_one) != null && S.id && t.add(f.competitor_one.id), (w = f.competitor_two) != null && w.id && t.add(f.competitor_two.id);
|
|
256
|
+
}), (a = (u = e.season) == null ? void 0 : u.team_stats) == null || a.forEach((f) => f.team_id && t.add(f.team_id)), (b = (h = e.season) == null ? void 0 : h.athlete_stats) == null || b.forEach((f) => {
|
|
267
257
|
f.athlete_id && t.add(f.athlete_id), f.team_id && t.add(f.team_id);
|
|
268
258
|
}), Array.from(t);
|
|
269
|
-
},
|
|
270
|
-
var
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
273
|
-
if (
|
|
274
|
-
const
|
|
275
|
-
return Number.isFinite(
|
|
276
|
-
},
|
|
277
|
-
const { seasonId:
|
|
259
|
+
}, mo = (e, t) => {
|
|
260
|
+
var c;
|
|
261
|
+
const r = St(e.status);
|
|
262
|
+
if (r === "LIVE") return !0;
|
|
263
|
+
if (r !== "UPCOMING") return !1;
|
|
264
|
+
const l = Date.parse(((c = e.timing) == null ? void 0 : c.start_time) ?? "");
|
|
265
|
+
return Number.isFinite(l) && l <= t && t - l < uo;
|
|
266
|
+
}, ho = (e, t, r, l, c) => {
|
|
267
|
+
const { seasonId: s, stageId: m, liveRefresh: u, refreshInterval: a } = c, [h, b] = de(null), [f, S] = de(
|
|
278
268
|
() => /* @__PURE__ */ new Map()
|
|
279
|
-
), [
|
|
269
|
+
), [w, y] = de(
|
|
280
270
|
() => /* @__PURE__ */ new Map()
|
|
281
|
-
), [
|
|
282
|
-
|
|
271
|
+
), [_, D] = de(!0), [E, x] = de(!1), R = Dt();
|
|
272
|
+
Ee(() => {
|
|
283
273
|
if (!e || !t) {
|
|
284
|
-
|
|
274
|
+
D(!1);
|
|
285
275
|
return;
|
|
286
276
|
}
|
|
287
|
-
const
|
|
288
|
-
return
|
|
277
|
+
const A = new AbortController();
|
|
278
|
+
return D(!0), x(!1), y(/* @__PURE__ */ new Map()), (async () => {
|
|
289
279
|
try {
|
|
290
|
-
const
|
|
280
|
+
const M = await Yt(
|
|
291
281
|
e,
|
|
292
282
|
t,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
283
|
+
s,
|
|
284
|
+
A.signal,
|
|
285
|
+
R
|
|
296
286
|
);
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
287
|
+
if (A.signal.aborted) return;
|
|
288
|
+
const p = M ? await Jt(
|
|
299
289
|
e,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
290
|
+
po(M),
|
|
291
|
+
A.signal,
|
|
292
|
+
R
|
|
303
293
|
) : /* @__PURE__ */ new Map();
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
} catch (
|
|
307
|
-
if (
|
|
294
|
+
if (A.signal.aborted) return;
|
|
295
|
+
b(M), S(p);
|
|
296
|
+
} catch (M) {
|
|
297
|
+
if (A.signal.aborted || (M == null ? void 0 : M.name) === "AbortError")
|
|
308
298
|
return;
|
|
309
|
-
|
|
299
|
+
b(null), x(!0);
|
|
310
300
|
} finally {
|
|
311
|
-
|
|
301
|
+
A.signal.aborted || D(!1);
|
|
312
302
|
}
|
|
313
|
-
})(), () =>
|
|
314
|
-
}, [e, t,
|
|
315
|
-
const [
|
|
316
|
-
|
|
317
|
-
if (!
|
|
318
|
-
const
|
|
319
|
-
return () => clearInterval(
|
|
320
|
-
}, [
|
|
321
|
-
const
|
|
322
|
-
var
|
|
323
|
-
return !
|
|
324
|
-
}, [
|
|
325
|
-
|
|
326
|
-
if (!
|
|
327
|
-
const
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
(
|
|
303
|
+
})(), () => A.abort();
|
|
304
|
+
}, [e, t, s, R]);
|
|
305
|
+
const [$, W] = de(() => Date.now());
|
|
306
|
+
Ee(() => {
|
|
307
|
+
if (!h || !u) return;
|
|
308
|
+
const A = setInterval(() => W(Date.now()), 6e4);
|
|
309
|
+
return () => clearInterval(A);
|
|
310
|
+
}, [h, u]);
|
|
311
|
+
const L = Ie(() => {
|
|
312
|
+
var A;
|
|
313
|
+
return !h || !u || a <= 0 ? "" : (((A = h.season) == null ? void 0 : A.events) ?? []).map((M) => M.id ? w.get(M.id) ?? M : M).filter((M) => M.id && mo(M, $)).map((M) => M.id).join(",");
|
|
314
|
+
}, [h, w, u, a, $]);
|
|
315
|
+
Ee(() => {
|
|
316
|
+
if (!L) return;
|
|
317
|
+
const A = L.split(","), M = new AbortController(), k = setInterval(async () => {
|
|
318
|
+
const I = await Promise.all(
|
|
319
|
+
A.map(
|
|
320
|
+
(G) => qt(e, G, M.signal, R)
|
|
331
321
|
)
|
|
332
322
|
);
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
return
|
|
323
|
+
M.signal.aborted || y((G) => {
|
|
324
|
+
const J = new Map(G);
|
|
325
|
+
return I.forEach((H) => (H == null ? void 0 : H.id) && J.set(H.id, H)), J;
|
|
336
326
|
});
|
|
337
|
-
},
|
|
327
|
+
}, a);
|
|
338
328
|
return () => {
|
|
339
|
-
|
|
329
|
+
M.abort(), clearInterval(k);
|
|
340
330
|
};
|
|
341
|
-
}, [e,
|
|
342
|
-
const
|
|
343
|
-
() =>
|
|
344
|
-
[
|
|
345
|
-
),
|
|
346
|
-
() =>
|
|
347
|
-
[f,
|
|
331
|
+
}, [e, L, a, R]);
|
|
332
|
+
const z = Ie(
|
|
333
|
+
() => h ? ao(h, m, w) : null,
|
|
334
|
+
[h, m, w]
|
|
335
|
+
), U = Ie(
|
|
336
|
+
() => co(f, r, l),
|
|
337
|
+
[f, r, l]
|
|
348
338
|
);
|
|
349
|
-
return { data:
|
|
350
|
-
},
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
339
|
+
return { data: z, competitionId: (h == null ? void 0 : h.id) ?? t, entities: U, loading: _, error: E };
|
|
340
|
+
}, o = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`, i = {
|
|
341
|
+
surface: "var(--fu-ucrc-surface)",
|
|
342
|
+
onSurface: "var(--fu-ucrc-on-surface)",
|
|
343
|
+
variant: "var(--fu-ucrc-surface-variant)",
|
|
344
|
+
border: "var(--fu-ucrc-outline-enabled-border)",
|
|
345
|
+
text: "var(--fu-ucrc-text-primary)",
|
|
346
|
+
body: "var(--fu-ucrc-text-body)",
|
|
347
|
+
dim: "var(--fu-ucrc-cs-dim)",
|
|
348
|
+
primary: "var(--fu-ucrc-primary-plain-color)",
|
|
349
|
+
primaryContainer: "var(--fu-ucrc-primary-primary-container)",
|
|
350
|
+
onPrimary: "var(--fu-ucrc-primary-on-primary)",
|
|
351
|
+
success: "var(--fu-ucrc-success-plain-color)",
|
|
352
|
+
danger: "var(--fu-ucrc-danger-plain-color)",
|
|
353
|
+
tint: "var(--fu-ucrc-cs-tint)",
|
|
354
|
+
tint2: "var(--fu-ucrc-cs-tint2)",
|
|
355
|
+
// Card colours are the real-world card colour, not a theme accent.
|
|
356
|
+
yellowCard: "#F5C400",
|
|
357
|
+
fontPrimary: "var(--fu-ucrc-font-primary)",
|
|
358
|
+
fontSecondary: "var(--fu-ucrc-font-secondary)",
|
|
359
|
+
radiusXs: "var(--fu-ucrc-radius-xs)",
|
|
360
|
+
radiusSm: "var(--fu-ucrc-radius-sm)",
|
|
361
|
+
radiusMd: "var(--fu-ucrc-radius-md)",
|
|
362
|
+
radiusFull: "var(--fu-ucrc-radius-full)"
|
|
363
|
+
}, go = () => {
|
|
364
|
+
const e = At(), t = Pt() === "dark", r = e.palette.primary.plainColor, l = e.textSecondary;
|
|
365
|
+
return P.useMemo(() => {
|
|
366
|
+
const c = (s, m) => `rgba(${Ft(s)}, ${m})`;
|
|
367
|
+
return {
|
|
368
|
+
"--fu-ucrc-cs-dim": c(l, 0.62),
|
|
369
|
+
"--fu-ucrc-cs-tint": c(r, t ? 0.14 : 0.08),
|
|
370
|
+
"--fu-ucrc-cs-tint2": c(r, t ? 0.26 : 0.16)
|
|
371
|
+
};
|
|
372
|
+
}, [r, l, t]);
|
|
373
|
+
}, We = (e) => e.status === "FINISHED" && !!e.fullTime, $e = (e) => e.fullTime ? e.fullTime[0] + e.fullTime[1] : 0, Je = (e, t, r) => e.filter(
|
|
374
|
+
(l) => (l.home.id === t || l.away.id === t) && l.start < r
|
|
375
|
+
).sort((l, c) => c.start.localeCompare(l.start)).slice(0, 5).reverse().map((l) => {
|
|
376
|
+
const c = l.home.id === t, [s, m] = l.fullTime, u = c ? s : m, a = c ? m : s;
|
|
377
|
+
return { match: l, isHome: c, result: u > a ? "W" : u < a ? "L" : "D" };
|
|
378
|
+
}), fo = (e) => {
|
|
381
379
|
const t = /* @__PURE__ */ new Map();
|
|
382
|
-
return e.forEach((
|
|
383
|
-
const [
|
|
380
|
+
return e.forEach((r) => {
|
|
381
|
+
const [l, c] = r.fullTime;
|
|
384
382
|
[
|
|
385
|
-
{ side:
|
|
386
|
-
{ side:
|
|
387
|
-
].forEach(({ side:
|
|
388
|
-
const
|
|
389
|
-
|
|
383
|
+
{ side: r.home, conceded: c },
|
|
384
|
+
{ side: r.away, conceded: l }
|
|
385
|
+
].forEach(({ side: s, conceded: m }) => {
|
|
386
|
+
const u = t.get(s.id) ?? { cleanSheets: 0, yellowCards: 0, redCards: 0 };
|
|
387
|
+
m === 0 && (u.cleanSheets += 1), u.yellowCards += s.yellowCards ?? 0, u.redCards += s.redCards ?? 0, t.set(s.id, u);
|
|
390
388
|
});
|
|
391
389
|
}), t;
|
|
392
|
-
},
|
|
393
|
-
(
|
|
394
|
-
) ?? null,
|
|
395
|
-
const t = e.filter(
|
|
396
|
-
(
|
|
390
|
+
}, yo = (e, t) => e.find(
|
|
391
|
+
(r) => r.id !== t.id && (r.home.id === t.home.id && r.away.id === t.away.id || r.home.id === t.away.id && r.away.id === t.home.id)
|
|
392
|
+
) ?? null, Y = (e, t) => t ? Math.round(e / t * 100) : 0, bo = (e) => {
|
|
393
|
+
const t = e.filter(We), r = (a) => t.reduce((h, b) => h + a(b), 0), l = r($e), c = t.filter((a) => a.fullTime[0] > a.fullTime[1]).length, s = t.filter((a) => a.fullTime[1] > a.fullTime[0]).length, m = r((a) => a.halfTime ? a.halfTime[0] + a.halfTime[1] : 0), u = [0, 1, 2, 3, 4, 5].map(
|
|
394
|
+
(a) => r((h) => (h.home.goalsByPeriod[a] ?? 0) + (h.away.goalsByPeriod[a] ?? 0))
|
|
397
395
|
);
|
|
398
396
|
return {
|
|
399
397
|
total: e.length,
|
|
400
398
|
played: t.length,
|
|
401
|
-
goals:
|
|
402
|
-
homeWins:
|
|
403
|
-
awayWins:
|
|
404
|
-
draws: t.length -
|
|
405
|
-
firstHalfGoals:
|
|
406
|
-
secondHalfGoals:
|
|
407
|
-
goalsByPeriod:
|
|
408
|
-
yellowCards:
|
|
409
|
-
redCards:
|
|
410
|
-
shotsOnTarget:
|
|
411
|
-
corners:
|
|
412
|
-
bothScored: t.filter((
|
|
413
|
-
goalless: t.filter((
|
|
414
|
-
over: (
|
|
399
|
+
goals: l,
|
|
400
|
+
homeWins: c,
|
|
401
|
+
awayWins: s,
|
|
402
|
+
draws: t.length - c - s,
|
|
403
|
+
firstHalfGoals: m,
|
|
404
|
+
secondHalfGoals: l - m,
|
|
405
|
+
goalsByPeriod: u,
|
|
406
|
+
yellowCards: r((a) => (a.home.yellowCards ?? 0) + (a.away.yellowCards ?? 0)),
|
|
407
|
+
redCards: r((a) => (a.home.redCards ?? 0) + (a.away.redCards ?? 0)),
|
|
408
|
+
shotsOnTarget: r((a) => (a.home.shotsOnTarget ?? 0) + (a.away.shotsOnTarget ?? 0)),
|
|
409
|
+
corners: r((a) => (a.home.corners ?? 0) + (a.away.corners ?? 0)),
|
|
410
|
+
bothScored: t.filter((a) => a.fullTime[0] > 0 && a.fullTime[1] > 0).length,
|
|
411
|
+
goalless: t.filter((a) => $e(a) === 0).length,
|
|
412
|
+
over: (a) => t.filter((h) => $e(h) > a).length
|
|
415
413
|
};
|
|
416
|
-
},
|
|
414
|
+
}, wo = 10, kt = {
|
|
417
415
|
scorers: (e) => e.goals,
|
|
418
416
|
assists: (e) => e.assists,
|
|
419
417
|
contributions: (e) => e.goals + e.assists,
|
|
420
418
|
cleanSheets: (e) => e.cleanSheets,
|
|
421
419
|
minutes: (e) => e.minutes,
|
|
422
420
|
cards: (e) => e.yellowCards + e.redCards
|
|
423
|
-
},
|
|
424
|
-
const
|
|
425
|
-
return e.map((
|
|
426
|
-
(
|
|
427
|
-
).slice(0,
|
|
428
|
-
let
|
|
429
|
-
for (;
|
|
430
|
-
const
|
|
431
|
-
return { ...
|
|
421
|
+
}, ze = Object.keys(kt), vo = (e, t) => {
|
|
422
|
+
const r = kt[t];
|
|
423
|
+
return e.map((c) => ({ athlete: c, value: r(c) })).filter((c) => c.value > 0).sort(
|
|
424
|
+
(c, s) => s.value - c.value || (t === "cards" ? s.athlete.redCards - c.athlete.redCards : t === "minutes" ? 0 : c.athlete.minutes - s.athlete.minutes)
|
|
425
|
+
).slice(0, wo).map((c, s, m) => {
|
|
426
|
+
let u = s + 1;
|
|
427
|
+
for (; u > 1 && m[u - 2].value === c.value; ) u -= 1;
|
|
428
|
+
const a = s > 0 && m[s - 1].value === c.value || s < m.length - 1 && m[s + 1].value === c.value;
|
|
429
|
+
return { ...c, rank: a ? `${u}=` : `${u}` };
|
|
432
430
|
});
|
|
433
|
-
},
|
|
434
|
-
const t =
|
|
431
|
+
}, Z = (e, t, r = 1) => [...e].sort((l, c) => r * (t(c) - t(l)))[0], Co = (e) => Array.from(e.values()), xo = (e) => {
|
|
432
|
+
const t = Wt(e), r = /* @__PURE__ */ new Map();
|
|
435
433
|
return {
|
|
436
|
-
date: (
|
|
437
|
-
const
|
|
438
|
-
return Number.isNaN(
|
|
434
|
+
date: (l, c) => {
|
|
435
|
+
const s = new Date(l);
|
|
436
|
+
return Number.isNaN(s.getTime()) ? "" : s.toLocaleDateString(t, c);
|
|
439
437
|
},
|
|
440
|
-
time: (
|
|
441
|
-
const
|
|
442
|
-
return Number.isNaN(
|
|
438
|
+
time: (l) => {
|
|
439
|
+
const c = new Date(l);
|
|
440
|
+
return Number.isNaN(c.getTime()) ? "" : c.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
443
441
|
},
|
|
444
|
-
decimal: (
|
|
445
|
-
let
|
|
446
|
-
return
|
|
447
|
-
minimumFractionDigits:
|
|
448
|
-
maximumFractionDigits:
|
|
449
|
-
}),
|
|
442
|
+
decimal: (l, c) => {
|
|
443
|
+
let s = r.get(c);
|
|
444
|
+
return s || (s = new Intl.NumberFormat(t, {
|
|
445
|
+
minimumFractionDigits: c,
|
|
446
|
+
maximumFractionDigits: c
|
|
447
|
+
}), r.set(c, s)), s.format(Number.isFinite(l) ? l : 0);
|
|
450
448
|
}
|
|
451
449
|
};
|
|
452
|
-
},
|
|
450
|
+
}, So = (e, t) => t ? e.replace(
|
|
453
451
|
/\{\{\s*(\w+)\s*\}\}/g,
|
|
454
|
-
(
|
|
455
|
-
) : e,
|
|
456
|
-
const { t } =
|
|
457
|
-
return
|
|
458
|
-
() => (
|
|
459
|
-
const
|
|
460
|
-
return typeof
|
|
452
|
+
(r, l) => l in t ? String(t[l]) : r
|
|
453
|
+
) : e, ko = (e) => {
|
|
454
|
+
const { t } = Gt("common");
|
|
455
|
+
return Ie(
|
|
456
|
+
() => (r, l) => {
|
|
457
|
+
const c = e == null ? void 0 : e[r];
|
|
458
|
+
return typeof c == "string" && c.trim() ? So(c, l) : t(`competitionStatistics.${r}`, l ?? {});
|
|
461
459
|
},
|
|
462
460
|
[e, t]
|
|
463
461
|
);
|
|
464
|
-
},
|
|
462
|
+
}, C = ({
|
|
465
463
|
size: e,
|
|
466
464
|
font: t = "primary",
|
|
467
|
-
weight:
|
|
468
|
-
color:
|
|
469
|
-
upper:
|
|
470
|
-
cms:
|
|
471
|
-
ellipsis:
|
|
472
|
-
parentSize:
|
|
473
|
-
component:
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
children: h
|
|
495
|
-
}
|
|
496
|
-
);
|
|
497
|
-
}, H = ({
|
|
465
|
+
weight: r,
|
|
466
|
+
color: l,
|
|
467
|
+
upper: c,
|
|
468
|
+
cms: s,
|
|
469
|
+
ellipsis: m,
|
|
470
|
+
parentSize: u = 16,
|
|
471
|
+
component: a = "span",
|
|
472
|
+
className: h,
|
|
473
|
+
style: b,
|
|
474
|
+
children: f
|
|
475
|
+
}) => /* @__PURE__ */ n(
|
|
476
|
+
a,
|
|
477
|
+
{
|
|
478
|
+
className: h,
|
|
479
|
+
style: {
|
|
480
|
+
fontSize: o(e, u),
|
|
481
|
+
fontFamily: t === "primary" ? i.fontPrimary : i.fontSecondary,
|
|
482
|
+
fontWeight: r,
|
|
483
|
+
color: l,
|
|
484
|
+
...c ? { textTransform: "uppercase", letterSpacing: o(0.5, e) } : {},
|
|
485
|
+
...s ? { unicodeBidi: "plaintext" } : {},
|
|
486
|
+
...m ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : {},
|
|
487
|
+
...b
|
|
488
|
+
},
|
|
489
|
+
children: f
|
|
490
|
+
}
|
|
491
|
+
), V = ({
|
|
498
492
|
url: e,
|
|
499
493
|
size: t,
|
|
500
|
-
|
|
501
|
-
}) => e ? /* @__PURE__ */
|
|
502
|
-
|
|
494
|
+
className: r
|
|
495
|
+
}) => e ? /* @__PURE__ */ n(
|
|
496
|
+
"div",
|
|
503
497
|
{
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
},
|
|
514
|
-
...Array.isArray(o) ? o : [o]
|
|
515
|
-
]
|
|
516
|
-
}
|
|
517
|
-
) : null, Z = ({ sx: e, ...t }) => {
|
|
518
|
-
const { colors: o, radius: s } = F();
|
|
519
|
-
return /* @__PURE__ */ r(
|
|
520
|
-
m,
|
|
521
|
-
{
|
|
522
|
-
...t,
|
|
523
|
-
sx: [
|
|
524
|
-
{
|
|
525
|
-
backgroundColor: o.surface,
|
|
526
|
-
border: `1px solid ${o.border}`,
|
|
527
|
-
borderRadius: s.md
|
|
528
|
-
},
|
|
529
|
-
...Array.isArray(e) ? e : [e]
|
|
530
|
-
]
|
|
498
|
+
className: r,
|
|
499
|
+
style: {
|
|
500
|
+
width: o(t),
|
|
501
|
+
height: o(t),
|
|
502
|
+
flexShrink: 0,
|
|
503
|
+
backgroundImage: `url("${e}")`,
|
|
504
|
+
backgroundSize: "contain",
|
|
505
|
+
backgroundRepeat: "no-repeat",
|
|
506
|
+
backgroundPosition: "center"
|
|
531
507
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
508
|
+
}
|
|
509
|
+
) : null, me = d({
|
|
510
|
+
backgroundColor: i.surface,
|
|
511
|
+
border: `1px solid ${i.border}`,
|
|
512
|
+
borderRadius: i.radiusMd
|
|
513
|
+
}), Oe = { textDecoration: "none", color: "inherit" }, It = ({ children: e }) => /* @__PURE__ */ n(C, { size: 13, weight: 700, upper: !0, color: i.text, style: { padding: `0 ${o(2, 13)}` }, children: e }), se = ({ size: e = 11, className: t, style: r, children: l }) => /* @__PURE__ */ n(
|
|
514
|
+
C,
|
|
515
|
+
{
|
|
516
|
+
size: e,
|
|
517
|
+
font: "secondary",
|
|
518
|
+
weight: 700,
|
|
519
|
+
upper: !0,
|
|
520
|
+
color: i.dim,
|
|
521
|
+
className: t,
|
|
522
|
+
style: r,
|
|
523
|
+
children: l
|
|
524
|
+
}
|
|
525
|
+
), $t = P.createContext(null), Io = $t.Provider, oe = () => {
|
|
526
|
+
const e = P.useContext($t);
|
|
545
527
|
if (!e) throw new Error("useWidget must be used inside WidgetProvider");
|
|
546
528
|
return e;
|
|
547
|
-
},
|
|
548
|
-
|
|
549
|
-
|
|
529
|
+
}, ee = {
|
|
530
|
+
root: d(me, {
|
|
531
|
+
padding: `${o(12)} ${o(16)}`,
|
|
532
|
+
display: "flex",
|
|
533
|
+
alignItems: "center",
|
|
534
|
+
gap: o(12),
|
|
535
|
+
flexWrap: "wrap"
|
|
536
|
+
}),
|
|
537
|
+
titleBlock: d({ minWidth: 0, flex: `1 1 ${o(200)}` }),
|
|
538
|
+
titleRow: d({ display: "flex", alignItems: "center", gap: o(8), flexWrap: "wrap" }),
|
|
539
|
+
season: d({
|
|
540
|
+
backgroundColor: i.tint,
|
|
541
|
+
borderRadius: i.radiusFull,
|
|
542
|
+
padding: `${o(3, 10)} ${o(8, 10)}`
|
|
543
|
+
}),
|
|
544
|
+
progressBlock: d({ flex: `1 1 ${o(220)}`, minWidth: 0 }),
|
|
545
|
+
progressCaption: d({
|
|
546
|
+
display: "flex",
|
|
547
|
+
justifyContent: "space-between",
|
|
548
|
+
marginBottom: o(5, 11)
|
|
549
|
+
}),
|
|
550
|
+
played: d({ color: i.text }),
|
|
551
|
+
track: d({
|
|
552
|
+
height: o(6),
|
|
553
|
+
borderRadius: i.radiusFull,
|
|
554
|
+
backgroundColor: i.variant,
|
|
555
|
+
overflow: "hidden"
|
|
556
|
+
}),
|
|
557
|
+
fill: d({ height: "100%", backgroundColor: i.primary, borderRadius: i.radiusFull })
|
|
558
|
+
}, $o = () => {
|
|
559
|
+
var S;
|
|
560
|
+
const { data: e, competitionId: t, entities: r, finished: l, label: c, fmt: s } = oe(), m = l.length, u = e.matches.length, a = Y(m, u), h = (S = e.matches.filter((w) => w.status === "UPCOMING" || w.status === "LIVE").sort((w, y) => w.round - y.round)[0]) == null ? void 0 : S.round, b = {
|
|
550
561
|
day: "numeric",
|
|
551
562
|
month: "short",
|
|
552
563
|
year: "numeric"
|
|
553
|
-
},
|
|
554
|
-
return /* @__PURE__ */
|
|
555
|
-
|
|
556
|
-
{
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
{
|
|
600
|
-
component: "div",
|
|
601
|
-
size: 11,
|
|
602
|
-
font: "secondary",
|
|
603
|
-
color: e.dim,
|
|
604
|
-
sx: {
|
|
605
|
-
display: "flex",
|
|
606
|
-
justifyContent: "space-between",
|
|
607
|
-
marginBottom: n(5, 11)
|
|
608
|
-
},
|
|
609
|
-
children: [
|
|
610
|
-
/* @__PURE__ */ r("span", { children: f !== void 0 ? c("upcomingRound", { round: f }) : c("seasonFinished") }),
|
|
611
|
-
/* @__PURE__ */ y("span", { children: [
|
|
612
|
-
/* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: d }),
|
|
613
|
-
" ",
|
|
614
|
-
c("seasonProgress", {
|
|
615
|
-
matches: c("matchesCount", { count: u }),
|
|
616
|
-
pct: h
|
|
617
|
-
})
|
|
618
|
-
] })
|
|
619
|
-
]
|
|
620
|
-
}
|
|
621
|
-
),
|
|
622
|
-
/* @__PURE__ */ r(
|
|
623
|
-
m,
|
|
624
|
-
{
|
|
625
|
-
sx: {
|
|
626
|
-
height: n(6),
|
|
627
|
-
borderRadius: t.full,
|
|
628
|
-
backgroundColor: e.variant,
|
|
629
|
-
overflow: "hidden"
|
|
630
|
-
},
|
|
631
|
-
children: /* @__PURE__ */ r(
|
|
632
|
-
m,
|
|
633
|
-
{
|
|
634
|
-
sx: {
|
|
635
|
-
height: "100%",
|
|
636
|
-
width: `${h}%`,
|
|
637
|
-
backgroundColor: e.primary,
|
|
638
|
-
borderRadius: t.full
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
)
|
|
642
|
-
}
|
|
643
|
-
)
|
|
644
|
-
] })
|
|
645
|
-
]
|
|
646
|
-
}
|
|
647
|
-
);
|
|
648
|
-
}, ro = {
|
|
564
|
+
}, f = e.season.startDate && e.season.endDate ? `${s.date(e.season.startDate, b)} – ${s.date(e.season.endDate, b)}` : "";
|
|
565
|
+
return /* @__PURE__ */ g("div", { css: ee.root, children: [
|
|
566
|
+
/* @__PURE__ */ n(V, { url: r.logo(t), size: 40 }),
|
|
567
|
+
/* @__PURE__ */ g("div", { css: ee.titleBlock, children: [
|
|
568
|
+
/* @__PURE__ */ g("div", { css: ee.titleRow, children: [
|
|
569
|
+
/* @__PURE__ */ n(C, { size: 17, weight: 700, color: i.text, cms: !0, children: r.name(t) }),
|
|
570
|
+
e.season.name ? /* @__PURE__ */ n(C, { size: 10, weight: 600, color: i.primary, css: ee.season, children: e.season.name }) : null
|
|
571
|
+
] }),
|
|
572
|
+
f ? /* @__PURE__ */ n(
|
|
573
|
+
C,
|
|
574
|
+
{
|
|
575
|
+
component: "div",
|
|
576
|
+
size: 11,
|
|
577
|
+
font: "secondary",
|
|
578
|
+
color: i.dim,
|
|
579
|
+
style: { marginTop: o(2, 11) },
|
|
580
|
+
children: f
|
|
581
|
+
}
|
|
582
|
+
) : null
|
|
583
|
+
] }),
|
|
584
|
+
/* @__PURE__ */ g("div", { css: ee.progressBlock, children: [
|
|
585
|
+
/* @__PURE__ */ g(
|
|
586
|
+
C,
|
|
587
|
+
{
|
|
588
|
+
component: "div",
|
|
589
|
+
size: 11,
|
|
590
|
+
font: "secondary",
|
|
591
|
+
color: i.dim,
|
|
592
|
+
css: ee.progressCaption,
|
|
593
|
+
children: [
|
|
594
|
+
/* @__PURE__ */ n("span", { children: h !== void 0 ? c("upcomingRound", { round: h }) : c("seasonFinished") }),
|
|
595
|
+
/* @__PURE__ */ g("span", { children: [
|
|
596
|
+
/* @__PURE__ */ n("b", { css: ee.played, children: m }),
|
|
597
|
+
" ",
|
|
598
|
+
c("seasonProgress", {
|
|
599
|
+
matches: c("matchesCount", { count: u }),
|
|
600
|
+
pct: a
|
|
601
|
+
})
|
|
602
|
+
] })
|
|
603
|
+
]
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
/* @__PURE__ */ n("div", { css: ee.track, children: /* @__PURE__ */ n("div", { css: ee.fill, style: { width: `${a}%` } }) })
|
|
607
|
+
] })
|
|
608
|
+
] });
|
|
609
|
+
}, To = {
|
|
649
610
|
match: "matchId",
|
|
650
611
|
team: "competitorId",
|
|
651
612
|
player: "athleteId"
|
|
652
|
-
},
|
|
613
|
+
}, Te = (e) => {
|
|
653
614
|
var t;
|
|
654
615
|
return !!(e != null && e.onClick || (t = e == null ? void 0 : e.url) != null && t.trim());
|
|
655
|
-
},
|
|
656
|
-
var
|
|
657
|
-
if (!
|
|
658
|
-
const
|
|
616
|
+
}, De = (e, t, r) => {
|
|
617
|
+
var m;
|
|
618
|
+
if (!Te(e)) return null;
|
|
619
|
+
const l = ((m = e == null ? void 0 : e.url) == null ? void 0 : m.trim()) ?? "", c = encodeURIComponent(r);
|
|
659
620
|
return {
|
|
660
|
-
href:
|
|
621
|
+
href: l ? l.replace(
|
|
661
622
|
/\{(\w+)\}/g,
|
|
662
|
-
(
|
|
623
|
+
(u, a) => a === "id" || a === To[t] ? c : u
|
|
663
624
|
) : null,
|
|
664
625
|
target: (e == null ? void 0 : e.target) ?? void 0,
|
|
665
|
-
onClick: e != null && e.onClick ? (
|
|
666
|
-
var
|
|
667
|
-
|
|
668
|
-
} : (
|
|
626
|
+
onClick: e != null && e.onClick ? (u) => {
|
|
627
|
+
var a;
|
|
628
|
+
u.stopPropagation(), u.preventDefault(), (a = e.onClick) == null || a.call(e, r);
|
|
629
|
+
} : (u) => u.stopPropagation()
|
|
669
630
|
};
|
|
670
|
-
},
|
|
631
|
+
}, Qe = (e) => d({
|
|
632
|
+
position: "absolute",
|
|
633
|
+
top: 0,
|
|
634
|
+
bottom: 0,
|
|
635
|
+
...e ? { left: 0 } : { right: 0 },
|
|
636
|
+
width: o(56),
|
|
637
|
+
display: "flex",
|
|
638
|
+
alignItems: "center",
|
|
639
|
+
justifyContent: e ? "flex-start" : "flex-end",
|
|
640
|
+
padding: `0 ${o(6)}`,
|
|
641
|
+
border: "none",
|
|
642
|
+
cursor: "pointer",
|
|
643
|
+
color: i.text,
|
|
644
|
+
fontSize: o(16),
|
|
645
|
+
background: `linear-gradient(to ${e ? "right" : "left"}, ${i.surface} 55%, transparent)`
|
|
646
|
+
}), Ze = d({
|
|
647
|
+
display: "flex",
|
|
648
|
+
overflowX: "auto",
|
|
649
|
+
scrollbarWidth: "none",
|
|
650
|
+
"&::-webkit-scrollbar": { display: "none" }
|
|
651
|
+
}), ve = {
|
|
652
|
+
frame: {
|
|
653
|
+
pill: d({
|
|
654
|
+
position: "relative",
|
|
655
|
+
overflow: "hidden",
|
|
656
|
+
backgroundColor: i.surface,
|
|
657
|
+
border: `1px solid ${i.border}`,
|
|
658
|
+
borderRadius: i.radiusFull
|
|
659
|
+
}),
|
|
660
|
+
row: d({ position: "relative", borderBottom: `1px solid ${i.border}` })
|
|
661
|
+
},
|
|
662
|
+
scroller: {
|
|
663
|
+
pill: d(Ze, { padding: o(3) }),
|
|
664
|
+
row: d(Ze, { padding: `${o(10)} ${o(16)}` })
|
|
665
|
+
},
|
|
666
|
+
start: Qe(!0),
|
|
667
|
+
end: Qe(!1)
|
|
668
|
+
}, Ae = ({ variant: e, gap: t, role: r, children: l }) => {
|
|
669
|
+
const c = P.useRef(null), s = Ot(), [m, u] = P.useState({ start: !1, end: !1 }), a = P.useCallback(() => {
|
|
670
|
+
const b = c.current;
|
|
671
|
+
if (!b) return;
|
|
672
|
+
const f = Math.abs(b.scrollLeft), S = b.scrollWidth - b.clientWidth, w = f > 1, y = f < S - 1;
|
|
673
|
+
u((_) => _.start === w && _.end === y ? _ : { start: w, end: y });
|
|
674
|
+
}, []);
|
|
675
|
+
P.useLayoutEffect(a), P.useEffect(() => {
|
|
676
|
+
if (!c.current) return;
|
|
677
|
+
const b = new ResizeObserver(a);
|
|
678
|
+
return b.observe(c.current), () => b.disconnect();
|
|
679
|
+
}, [a]);
|
|
680
|
+
const h = (b) => {
|
|
681
|
+
const f = c.current;
|
|
682
|
+
if (!f) return;
|
|
683
|
+
const S = f.clientWidth * 0.75 * (b ? 1 : -1);
|
|
684
|
+
f.scrollBy({ left: s ? -S : S, behavior: "smooth" });
|
|
685
|
+
};
|
|
686
|
+
return /* @__PURE__ */ g("div", { css: ve.frame[e], children: [
|
|
687
|
+
/* @__PURE__ */ n(
|
|
688
|
+
"div",
|
|
689
|
+
{
|
|
690
|
+
ref: c,
|
|
691
|
+
role: r,
|
|
692
|
+
onScroll: a,
|
|
693
|
+
css: ve.scroller[e],
|
|
694
|
+
style: { gap: o(t) },
|
|
695
|
+
children: l
|
|
696
|
+
}
|
|
697
|
+
),
|
|
698
|
+
m.start ? /* @__PURE__ */ n("button", { type: "button", tabIndex: -1, "aria-hidden": !0, onClick: () => h(!1), css: ve.start, children: /* @__PURE__ */ n(Xe, { children: /* @__PURE__ */ n(Ht, { size: "1em" }) }) }) : null,
|
|
699
|
+
m.end ? /* @__PURE__ */ n("button", { type: "button", tabIndex: -1, "aria-hidden": !0, onClick: () => h(!0), css: ve.end, children: /* @__PURE__ */ n(Xe, { children: /* @__PURE__ */ n(jt, { size: "1em" }) }) }) : null
|
|
700
|
+
] });
|
|
701
|
+
}, ue = (e, t) => Math.round(e.minutes / t), ne = (e, t) => t("matchesCount", { count: e.appearances }), pe = (e, t) => t("minutesCount", { count: e.minutes }), Tt = {
|
|
671
702
|
scorers: {
|
|
672
703
|
title: "scorers",
|
|
673
704
|
unit: "unitGoals",
|
|
674
|
-
secondary: (e, t,
|
|
675
|
-
chips: (e, t,
|
|
705
|
+
secondary: (e, t, r) => [ne(e, r), pe(e, r), r("goalEvery", { count: ue(e, t) })],
|
|
706
|
+
chips: (e, t, r) => [ne(e, r), pe(e, r), r("goalRate", { count: ue(e, t) })]
|
|
676
707
|
},
|
|
677
708
|
assists: {
|
|
678
709
|
title: "assists",
|
|
679
710
|
unit: "unitAssists",
|
|
680
|
-
secondary: (e, t,
|
|
681
|
-
chips: (e, t,
|
|
711
|
+
secondary: (e, t, r) => [ne(e, r), pe(e, r), r("assistEvery", { count: ue(e, t) })],
|
|
712
|
+
chips: (e, t, r) => [ne(e, r), pe(e, r), r("assistRate", { count: ue(e, t) })]
|
|
682
713
|
},
|
|
683
714
|
contributions: {
|
|
684
715
|
title: "contributions",
|
|
685
716
|
unit: "unitContributions",
|
|
686
|
-
secondary: (e, t,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
717
|
+
secondary: (e, t, r) => [
|
|
718
|
+
r("goalsCount", { count: e.goals }),
|
|
719
|
+
r("assistsCount", { count: e.assists }),
|
|
720
|
+
r("contributionEvery", { count: ue(e, t) })
|
|
690
721
|
],
|
|
691
|
-
chips: (e, t,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
722
|
+
chips: (e, t, r) => [
|
|
723
|
+
r("goalsShort", { count: e.goals }),
|
|
724
|
+
r("assistsShort", { count: e.assists }),
|
|
725
|
+
r("contributionRate", { count: ue(e, t) })
|
|
695
726
|
]
|
|
696
727
|
},
|
|
697
728
|
cleanSheets: {
|
|
698
729
|
title: "cleanSheets",
|
|
699
730
|
unit: "unitMatches",
|
|
700
|
-
secondary: (e, t,
|
|
701
|
-
chips: (e, t,
|
|
731
|
+
secondary: (e, t, r) => [ne(e, r), pe(e, r)],
|
|
732
|
+
chips: (e, t, r) => [ne(e, r), pe(e, r)]
|
|
702
733
|
},
|
|
703
734
|
minutes: {
|
|
704
735
|
title: "mostMinutes",
|
|
705
736
|
unit: "unitMinutes",
|
|
706
|
-
secondary: (e, t,
|
|
707
|
-
|
|
708
|
-
|
|
737
|
+
secondary: (e, t, r) => [
|
|
738
|
+
ne(e, r),
|
|
739
|
+
r("minutesPerMatch", { count: e.appearances ? Math.round(t / e.appearances) : 0 })
|
|
709
740
|
],
|
|
710
|
-
chips: (e, t,
|
|
711
|
-
|
|
712
|
-
|
|
741
|
+
chips: (e, t, r) => [
|
|
742
|
+
ne(e, r),
|
|
743
|
+
r("minutesPerMatch", { count: e.appearances ? Math.round(t / e.appearances) : 0 })
|
|
713
744
|
]
|
|
714
745
|
},
|
|
715
746
|
cards: {
|
|
716
747
|
title: "mostCards",
|
|
717
748
|
unit: "unitCards",
|
|
718
|
-
secondary: (e, t,
|
|
719
|
-
|
|
720
|
-
|
|
749
|
+
secondary: (e, t, r) => [
|
|
750
|
+
r("yellowCount", { count: e.yellowCards }),
|
|
751
|
+
r("redCount", { count: e.redCards })
|
|
721
752
|
],
|
|
722
|
-
chips: (e, t,
|
|
723
|
-
|
|
724
|
-
|
|
753
|
+
chips: (e, t, r) => [
|
|
754
|
+
r("yellowCount", { count: e.yellowCards }),
|
|
755
|
+
r("redCount", { count: e.redCards })
|
|
725
756
|
]
|
|
726
757
|
}
|
|
727
|
-
},
|
|
758
|
+
}, _o = {
|
|
728
759
|
goalkeeper: "goalkeeper",
|
|
729
760
|
defender: "defender",
|
|
730
761
|
midfielder: "midfielder",
|
|
731
762
|
forward: "forward"
|
|
732
|
-
},
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
font: "secondary",
|
|
824
|
-
weight: 700,
|
|
825
|
-
upper: !0,
|
|
826
|
-
color: t.dim,
|
|
827
|
-
sx: { padding: `${n(10, 11)} ${n(14, 11)} 0` },
|
|
828
|
-
children: c(h.title)
|
|
829
|
-
}
|
|
830
|
-
),
|
|
831
|
-
S && b[0] ? /* @__PURE__ */ y(
|
|
832
|
-
m,
|
|
833
|
-
{
|
|
834
|
-
component: (W = S.cta) != null && W.href ? "a" : "div",
|
|
835
|
-
href: ((k = S.cta) == null ? void 0 : k.href) ?? void 0,
|
|
836
|
-
target: (M = S.cta) == null ? void 0 : M.target,
|
|
837
|
-
onClick: (O = S.cta) == null ? void 0 : O.onClick,
|
|
838
|
-
sx: {
|
|
839
|
-
margin: n(10),
|
|
840
|
-
padding: n(12),
|
|
841
|
-
borderRadius: `calc(${o.md} - 2px)`,
|
|
842
|
-
background: `linear-gradient(135deg, ${t.tint2}, ${t.tint})`,
|
|
843
|
-
display: "flex",
|
|
844
|
-
alignItems: "center",
|
|
845
|
-
gap: n(12),
|
|
846
|
-
cursor: g ? "pointer" : "default",
|
|
847
|
-
textDecoration: "none",
|
|
848
|
-
color: "inherit"
|
|
849
|
-
},
|
|
850
|
-
children: [
|
|
851
|
-
/* @__PURE__ */ r(
|
|
852
|
-
Ae,
|
|
853
|
-
{
|
|
854
|
-
photo: S.photo,
|
|
855
|
-
initial: S.initial,
|
|
856
|
-
size: 60,
|
|
857
|
-
badge: 24,
|
|
858
|
-
teamLogo: S.teamLogo,
|
|
859
|
-
hero: !0
|
|
860
|
-
}
|
|
861
|
-
),
|
|
862
|
-
/* @__PURE__ */ y(m, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
863
|
-
/* @__PURE__ */ r(w, { component: "div", size: 15, weight: 700, color: t.text, ellipsis: !0, cms: !0, children: S.name }),
|
|
864
|
-
/* @__PURE__ */ r(
|
|
865
|
-
w,
|
|
866
|
-
{
|
|
867
|
-
component: "div",
|
|
868
|
-
size: 11,
|
|
869
|
-
font: "secondary",
|
|
870
|
-
color: t.dim,
|
|
871
|
-
ellipsis: !0,
|
|
872
|
-
cms: !0,
|
|
873
|
-
sx: { marginTop: n(2, 11) },
|
|
874
|
-
children: [S.team, S.position].filter(Boolean).join(" · ")
|
|
875
|
-
}
|
|
876
|
-
),
|
|
877
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4), flexWrap: "wrap", marginTop: n(6) }, children: h.chips(b[0].athlete, b[0].value, c).map((_) => /* @__PURE__ */ r(
|
|
878
|
-
w,
|
|
879
|
-
{
|
|
880
|
-
size: 10,
|
|
881
|
-
font: "secondary",
|
|
882
|
-
weight: 600,
|
|
883
|
-
color: t.body,
|
|
884
|
-
sx: {
|
|
885
|
-
backgroundColor: t.surface,
|
|
886
|
-
borderRadius: o.full,
|
|
887
|
-
padding: `${n(2, 10)} ${n(7, 10)}`
|
|
888
|
-
},
|
|
889
|
-
children: _
|
|
890
|
-
},
|
|
891
|
-
_
|
|
892
|
-
)) })
|
|
893
|
-
] }),
|
|
894
|
-
/* @__PURE__ */ y(m, { sx: { textAlign: "right", flexShrink: 0 }, children: [
|
|
895
|
-
/* @__PURE__ */ r(w, { component: "div", size: 32, weight: 700, color: t.primary, sx: { lineHeight: 1 }, children: b[0].value }),
|
|
896
|
-
/* @__PURE__ */ r(
|
|
897
|
-
w,
|
|
898
|
-
{
|
|
899
|
-
component: "div",
|
|
900
|
-
size: 10,
|
|
901
|
-
font: "secondary",
|
|
902
|
-
upper: !0,
|
|
903
|
-
color: t.dim,
|
|
904
|
-
sx: { marginTop: n(3, 10) },
|
|
905
|
-
children: c(h.unit)
|
|
906
|
-
}
|
|
907
|
-
)
|
|
908
|
-
] })
|
|
909
|
-
]
|
|
910
|
-
}
|
|
911
|
-
) : null,
|
|
912
|
-
b.slice(1).map((_) => {
|
|
913
|
-
var E, A, z, T;
|
|
914
|
-
const R = $(_);
|
|
915
|
-
return /* @__PURE__ */ y(
|
|
916
|
-
m,
|
|
917
|
-
{
|
|
918
|
-
component: (E = R.cta) != null && E.href ? "a" : "div",
|
|
919
|
-
href: ((A = R.cta) == null ? void 0 : A.href) ?? void 0,
|
|
920
|
-
target: (z = R.cta) == null ? void 0 : z.target,
|
|
921
|
-
onClick: (T = R.cta) == null ? void 0 : T.onClick,
|
|
922
|
-
sx: {
|
|
923
|
-
display: "grid",
|
|
924
|
-
gridTemplateColumns: `${n(28)} ${n(32)} minmax(0,1fr) auto`,
|
|
925
|
-
alignItems: "center",
|
|
926
|
-
gap: n(10),
|
|
927
|
-
padding: `${n(8)} ${n(14)}`,
|
|
928
|
-
borderTop: `1px solid ${t.border}`,
|
|
929
|
-
cursor: g ? "pointer" : "default",
|
|
930
|
-
textDecoration: "none",
|
|
931
|
-
color: "inherit",
|
|
932
|
-
"&:hover": { backgroundColor: g ? t.onSurface : "transparent" }
|
|
933
|
-
},
|
|
934
|
-
children: [
|
|
935
|
-
/* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: t.dim, children: _.rank }),
|
|
936
|
-
/* @__PURE__ */ r(Ae, { photo: R.photo, initial: R.initial, size: 32, badge: 16, teamLogo: R.teamLogo }),
|
|
937
|
-
/* @__PURE__ */ y(m, { sx: { minWidth: 0 }, children: [
|
|
938
|
-
/* @__PURE__ */ r(w, { component: "div", size: 13, weight: 600, color: t.text, ellipsis: !0, cms: !0, children: R.name }),
|
|
939
|
-
/* @__PURE__ */ r(w, { component: "div", size: 11, font: "secondary", color: t.dim, ellipsis: !0, children: h.secondary(_.athlete, _.value, c).join(" · ") })
|
|
940
|
-
] }),
|
|
941
|
-
/* @__PURE__ */ r(w, { size: 16, weight: 700, color: t.primary, children: _.value })
|
|
942
|
-
]
|
|
943
|
-
},
|
|
944
|
-
R.id
|
|
945
|
-
);
|
|
946
|
-
}),
|
|
947
|
-
f.length > C ? /* @__PURE__ */ r(
|
|
948
|
-
m,
|
|
949
|
-
{
|
|
950
|
-
component: "button",
|
|
951
|
-
type: "button",
|
|
952
|
-
onClick: () => u(!d),
|
|
953
|
-
sx: {
|
|
954
|
-
border: "none",
|
|
955
|
-
borderTop: `1px solid ${t.border}`,
|
|
956
|
-
background: "transparent",
|
|
957
|
-
cursor: "pointer",
|
|
958
|
-
padding: n(9, 12),
|
|
959
|
-
fontFamily: s.secondary,
|
|
960
|
-
fontSize: n(12),
|
|
961
|
-
fontWeight: 700,
|
|
962
|
-
color: t.primary
|
|
963
|
-
},
|
|
964
|
-
children: d ? c("showLess") : c("showAll", { count: f.length })
|
|
965
|
-
}
|
|
966
|
-
) : null
|
|
967
|
-
]
|
|
968
|
-
}
|
|
969
|
-
);
|
|
970
|
-
}, ao = () => {
|
|
971
|
-
const { colors: e, radius: t, fonts: o } = F(), { label: s, props: i } = Y(), a = xe(), [c, l] = L.useState(0), d = i.playerRankingsLayout ?? "auto", u = d === "tabs" || d === "auto" && a, h = u ? [he[c]] : he;
|
|
972
|
-
return /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(10) }, children: [
|
|
973
|
-
/* @__PURE__ */ r(He, { children: s("leadersTitle") }),
|
|
974
|
-
u ? /* @__PURE__ */ r(
|
|
975
|
-
m,
|
|
763
|
+
}, et = (e) => d({
|
|
764
|
+
borderRadius: "50%",
|
|
765
|
+
backgroundColor: e ? i.surface : i.variant,
|
|
766
|
+
...e ? { border: `2px solid ${i.primary}` } : {},
|
|
767
|
+
display: "flex",
|
|
768
|
+
alignItems: "center",
|
|
769
|
+
justifyContent: "center",
|
|
770
|
+
overflow: "hidden"
|
|
771
|
+
}), tt = (e) => d({
|
|
772
|
+
...Oe,
|
|
773
|
+
margin: o(10),
|
|
774
|
+
padding: o(12),
|
|
775
|
+
borderRadius: `calc(${i.radiusMd} - 2px)`,
|
|
776
|
+
background: `linear-gradient(135deg, ${i.tint2}, ${i.tint})`,
|
|
777
|
+
display: "flex",
|
|
778
|
+
alignItems: "center",
|
|
779
|
+
gap: o(12),
|
|
780
|
+
cursor: e ? "pointer" : "default"
|
|
781
|
+
}), ot = (e) => d({
|
|
782
|
+
...Oe,
|
|
783
|
+
display: "grid",
|
|
784
|
+
gridTemplateColumns: `${o(28)} ${o(32)} minmax(0,1fr) auto`,
|
|
785
|
+
alignItems: "center",
|
|
786
|
+
gap: o(10),
|
|
787
|
+
padding: `${o(8)} ${o(14)}`,
|
|
788
|
+
borderTop: `1px solid ${i.border}`,
|
|
789
|
+
cursor: e ? "pointer" : "default",
|
|
790
|
+
"&:hover": { backgroundColor: e ? i.onSurface : "transparent" }
|
|
791
|
+
}), rt = (e) => d({
|
|
792
|
+
flex: "1 0 auto",
|
|
793
|
+
whiteSpace: "nowrap",
|
|
794
|
+
border: "none",
|
|
795
|
+
cursor: "pointer",
|
|
796
|
+
borderRadius: i.radiusFull,
|
|
797
|
+
padding: `${o(6, 12)} ${o(12, 12)}`,
|
|
798
|
+
fontFamily: i.fontPrimary,
|
|
799
|
+
fontSize: o(12),
|
|
800
|
+
fontWeight: 700,
|
|
801
|
+
backgroundColor: e ? i.primary : "transparent",
|
|
802
|
+
color: e ? i.onPrimary : i.dim
|
|
803
|
+
}), B = {
|
|
804
|
+
avatar: d({ position: "relative", flexShrink: 0 }),
|
|
805
|
+
portrait: { hero: et(!0), plain: et(!1) },
|
|
806
|
+
teamBadge: d({
|
|
807
|
+
position: "absolute",
|
|
808
|
+
right: o(-4),
|
|
809
|
+
borderRadius: "50%",
|
|
810
|
+
backgroundColor: i.surface,
|
|
811
|
+
border: `1px solid ${i.border}`,
|
|
812
|
+
backgroundSize: "70%",
|
|
813
|
+
backgroundRepeat: "no-repeat",
|
|
814
|
+
backgroundPosition: "center"
|
|
815
|
+
}),
|
|
816
|
+
card: d({
|
|
817
|
+
backgroundColor: i.surface,
|
|
818
|
+
border: `1px solid ${i.border}`,
|
|
819
|
+
borderRadius: i.radiusMd,
|
|
820
|
+
overflow: "hidden",
|
|
821
|
+
display: "flex",
|
|
822
|
+
flexDirection: "column"
|
|
823
|
+
}),
|
|
824
|
+
hero: { interactive: tt(!0), plain: tt(!1) },
|
|
825
|
+
heroText: d({ flex: 1, minWidth: 0 }),
|
|
826
|
+
chips: d({ display: "flex", gap: o(4), flexWrap: "wrap", marginTop: o(6) }),
|
|
827
|
+
chip: d({
|
|
828
|
+
backgroundColor: i.surface,
|
|
829
|
+
borderRadius: i.radiusFull,
|
|
830
|
+
padding: `${o(2, 10)} ${o(7, 10)}`
|
|
831
|
+
}),
|
|
832
|
+
heroValue: d({ textAlign: "right", flexShrink: 0 }),
|
|
833
|
+
row: { interactive: ot(!0), plain: ot(!1) },
|
|
834
|
+
rowText: d({ minWidth: 0 }),
|
|
835
|
+
showAll: d({
|
|
836
|
+
border: "none",
|
|
837
|
+
borderTop: `1px solid ${i.border}`,
|
|
838
|
+
background: "transparent",
|
|
839
|
+
cursor: "pointer",
|
|
840
|
+
padding: o(9, 12),
|
|
841
|
+
fontFamily: i.fontSecondary,
|
|
842
|
+
fontSize: o(12),
|
|
843
|
+
fontWeight: 700,
|
|
844
|
+
color: i.primary
|
|
845
|
+
}),
|
|
846
|
+
section: d({ display: "flex", flexDirection: "column", gap: o(10) }),
|
|
847
|
+
tab: { on: rt(!0), off: rt(!1) },
|
|
848
|
+
grid: d({ display: "grid", gap: o(12) })
|
|
849
|
+
}, st = ({ photo: e, initial: t, size: r, badge: l, teamLogo: c, hero: s }) => {
|
|
850
|
+
const m = s ? 22 : 12;
|
|
851
|
+
return /* @__PURE__ */ g("div", { css: B.avatar, style: s ? void 0 : { width: o(r), height: o(r) }, children: [
|
|
852
|
+
/* @__PURE__ */ n(
|
|
853
|
+
C,
|
|
976
854
|
{
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
855
|
+
component: "div",
|
|
856
|
+
size: m,
|
|
857
|
+
weight: 700,
|
|
858
|
+
color: i.dim,
|
|
859
|
+
css: s ? B.portrait.hero : B.portrait.plain,
|
|
860
|
+
style: {
|
|
861
|
+
width: o(r, m),
|
|
862
|
+
height: o(r, m),
|
|
863
|
+
...e ? {
|
|
864
|
+
backgroundImage: `url("${e}")`,
|
|
865
|
+
backgroundSize: "cover",
|
|
866
|
+
backgroundPosition: "top center"
|
|
867
|
+
} : {}
|
|
985
868
|
},
|
|
986
|
-
children:
|
|
987
|
-
const b = C === c;
|
|
988
|
-
return /* @__PURE__ */ r(
|
|
989
|
-
m,
|
|
990
|
-
{
|
|
991
|
-
component: "button",
|
|
992
|
-
type: "button",
|
|
993
|
-
onClick: () => l(C),
|
|
994
|
-
sx: {
|
|
995
|
-
flex: "1 0 auto",
|
|
996
|
-
whiteSpace: "nowrap",
|
|
997
|
-
border: "none",
|
|
998
|
-
cursor: "pointer",
|
|
999
|
-
borderRadius: t.full,
|
|
1000
|
-
padding: `${n(6, 12)} ${n(12, 12)}`,
|
|
1001
|
-
fontFamily: o.primary,
|
|
1002
|
-
fontSize: n(12),
|
|
1003
|
-
fontWeight: 700,
|
|
1004
|
-
backgroundColor: b ? e.primary : "transparent",
|
|
1005
|
-
color: b ? e.onPrimary : e.dim
|
|
1006
|
-
},
|
|
1007
|
-
children: s(Ke[f].title)
|
|
1008
|
-
},
|
|
1009
|
-
f
|
|
1010
|
-
);
|
|
1011
|
-
})
|
|
869
|
+
children: e ? null : t
|
|
1012
870
|
}
|
|
1013
|
-
)
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
|
|
871
|
+
),
|
|
872
|
+
c ? /* @__PURE__ */ n(
|
|
873
|
+
"div",
|
|
1016
874
|
{
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
875
|
+
css: B.teamBadge,
|
|
876
|
+
style: {
|
|
877
|
+
bottom: o(s ? -2 : -3),
|
|
878
|
+
width: o(l),
|
|
879
|
+
height: o(l),
|
|
880
|
+
backgroundImage: `url("${c}")`
|
|
881
|
+
}
|
|
1023
882
|
}
|
|
1024
|
-
)
|
|
883
|
+
) : null
|
|
1025
884
|
] });
|
|
1026
|
-
},
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
{
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
885
|
+
}, Ro = ({ category: e }) => {
|
|
886
|
+
var _, D, E, x;
|
|
887
|
+
const { data: t, entities: r, label: l, props: c } = oe(), [s, m] = P.useState(!1), u = Tt[e], a = P.useMemo(() => vo(t.athletes, e), [t.athletes, e]), h = Math.min(10, Math.max(1, Math.round(c.playerRankingsRows ?? 5))), b = a.slice(0, s ? 10 : h), f = Te(c.playerCTA), S = (R) => {
|
|
888
|
+
const $ = R.athlete.athleteId, W = r.name($), L = _o[r.position($) ?? ""];
|
|
889
|
+
return {
|
|
890
|
+
id: $,
|
|
891
|
+
name: W,
|
|
892
|
+
photo: r.photo($),
|
|
893
|
+
initial: W.trim().charAt(0),
|
|
894
|
+
team: r.name(R.athlete.teamId),
|
|
895
|
+
teamLogo: r.logo(R.athlete.teamId),
|
|
896
|
+
position: L ? l(L) : "",
|
|
897
|
+
cta: De(c.playerCTA, "player", $)
|
|
898
|
+
};
|
|
899
|
+
}, w = b[0] ? S(b[0]) : null, y = (_ = w == null ? void 0 : w.cta) != null && _.href ? "a" : "div";
|
|
900
|
+
return /* @__PURE__ */ g("div", { css: B.card, children: [
|
|
901
|
+
/* @__PURE__ */ n(
|
|
902
|
+
C,
|
|
903
|
+
{
|
|
904
|
+
component: "div",
|
|
905
|
+
size: 11,
|
|
906
|
+
font: "secondary",
|
|
907
|
+
weight: 700,
|
|
908
|
+
upper: !0,
|
|
909
|
+
color: i.dim,
|
|
910
|
+
style: { padding: `${o(10, 11)} ${o(14, 11)} 0` },
|
|
911
|
+
children: l(u.title)
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
w && b[0] ? /* @__PURE__ */ g(
|
|
915
|
+
y,
|
|
916
|
+
{
|
|
917
|
+
href: ((D = w.cta) == null ? void 0 : D.href) ?? void 0,
|
|
918
|
+
target: (E = w.cta) == null ? void 0 : E.target,
|
|
919
|
+
onClick: (x = w.cta) == null ? void 0 : x.onClick,
|
|
920
|
+
css: f ? B.hero.interactive : B.hero.plain,
|
|
921
|
+
children: [
|
|
922
|
+
/* @__PURE__ */ n(
|
|
923
|
+
st,
|
|
924
|
+
{
|
|
925
|
+
photo: w.photo,
|
|
926
|
+
initial: w.initial,
|
|
927
|
+
size: 60,
|
|
928
|
+
badge: 24,
|
|
929
|
+
teamLogo: w.teamLogo,
|
|
930
|
+
hero: !0
|
|
931
|
+
}
|
|
932
|
+
),
|
|
933
|
+
/* @__PURE__ */ g("div", { css: B.heroText, children: [
|
|
934
|
+
/* @__PURE__ */ n(C, { component: "div", size: 15, weight: 700, color: i.text, ellipsis: !0, cms: !0, children: w.name }),
|
|
935
|
+
/* @__PURE__ */ n(
|
|
936
|
+
C,
|
|
1054
937
|
{
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
children: /* @__PURE__ */ r(m, { sx: { width: `${G(l, u)}%`, backgroundColor: a.primary } })
|
|
938
|
+
component: "div",
|
|
939
|
+
size: 11,
|
|
940
|
+
font: "secondary",
|
|
941
|
+
color: i.dim,
|
|
942
|
+
ellipsis: !0,
|
|
943
|
+
cms: !0,
|
|
944
|
+
style: { marginTop: o(2, 11) },
|
|
945
|
+
children: [w.team, w.position].filter(Boolean).join(" · ")
|
|
1064
946
|
}
|
|
1065
947
|
),
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
|
|
948
|
+
/* @__PURE__ */ n("div", { css: B.chips, children: u.chips(b[0].athlete, b[0].value, l).map((R) => /* @__PURE__ */ n(
|
|
949
|
+
C,
|
|
950
|
+
{
|
|
951
|
+
size: 10,
|
|
952
|
+
font: "secondary",
|
|
953
|
+
weight: 600,
|
|
954
|
+
color: i.body,
|
|
955
|
+
css: B.chip,
|
|
956
|
+
children: R
|
|
957
|
+
},
|
|
958
|
+
R
|
|
959
|
+
)) })
|
|
960
|
+
] }),
|
|
961
|
+
/* @__PURE__ */ g("div", { css: B.heroValue, children: [
|
|
962
|
+
/* @__PURE__ */ n(C, { component: "div", size: 32, weight: 700, color: i.primary, style: { lineHeight: 1 }, children: b[0].value }),
|
|
963
|
+
/* @__PURE__ */ n(
|
|
964
|
+
C,
|
|
1068
965
|
{
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
},
|
|
1075
|
-
children:
|
|
1076
|
-
m,
|
|
1077
|
-
{
|
|
1078
|
-
sx: {
|
|
1079
|
-
width: `${G(d, u)}%`,
|
|
1080
|
-
height: "100%",
|
|
1081
|
-
backgroundColor: a.primaryContainer
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
)
|
|
966
|
+
component: "div",
|
|
967
|
+
size: 10,
|
|
968
|
+
font: "secondary",
|
|
969
|
+
upper: !0,
|
|
970
|
+
color: i.dim,
|
|
971
|
+
style: { marginTop: o(3, 10) },
|
|
972
|
+
children: l(u.unit)
|
|
1085
973
|
}
|
|
1086
974
|
)
|
|
1087
975
|
] })
|
|
1088
|
-
]
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
logo: o,
|
|
1097
|
-
color: s
|
|
1098
|
-
}) => {
|
|
1099
|
-
const { colors: i } = F();
|
|
1100
|
-
return /* @__PURE__ */ r(
|
|
1101
|
-
m,
|
|
1102
|
-
{
|
|
1103
|
-
sx: {
|
|
1104
|
-
position: "absolute",
|
|
1105
|
-
left: `${e}%`,
|
|
1106
|
-
top: t ? "22%" : "78%",
|
|
1107
|
-
transform: "translate(-50%,-50%)",
|
|
1108
|
-
display: "flex"
|
|
1109
|
-
},
|
|
1110
|
-
children: /* @__PURE__ */ y(
|
|
1111
|
-
m,
|
|
976
|
+
]
|
|
977
|
+
}
|
|
978
|
+
) : null,
|
|
979
|
+
b.slice(1).map((R) => {
|
|
980
|
+
var L, z, U, A;
|
|
981
|
+
const $ = S(R), W = (L = $.cta) != null && L.href ? "a" : "div";
|
|
982
|
+
return /* @__PURE__ */ g(
|
|
983
|
+
W,
|
|
1112
984
|
{
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
borderRadius: "50%",
|
|
1118
|
-
backgroundColor: i.surface,
|
|
1119
|
-
border: `2px solid ${s}`,
|
|
1120
|
-
boxShadow: "0 1px 3px rgba(0,0,0,.18)",
|
|
1121
|
-
display: "flex",
|
|
1122
|
-
alignItems: "center",
|
|
1123
|
-
justifyContent: "center"
|
|
1124
|
-
},
|
|
985
|
+
href: ((z = $.cta) == null ? void 0 : z.href) ?? void 0,
|
|
986
|
+
target: (U = $.cta) == null ? void 0 : U.target,
|
|
987
|
+
onClick: (A = $.cta) == null ? void 0 : A.onClick,
|
|
988
|
+
css: f ? B.row.interactive : B.row.plain,
|
|
1125
989
|
children: [
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1134
|
-
) : null,
|
|
1135
|
-
/* @__PURE__ */ r(
|
|
1136
|
-
m,
|
|
1137
|
-
{
|
|
1138
|
-
sx: {
|
|
1139
|
-
position: "absolute",
|
|
1140
|
-
right: n(-6),
|
|
1141
|
-
bottom: n(-6),
|
|
1142
|
-
width: n(14),
|
|
1143
|
-
height: n(14),
|
|
1144
|
-
borderRadius: "50%",
|
|
1145
|
-
backgroundColor: i.surface,
|
|
1146
|
-
border: `1px solid ${i.border}`,
|
|
1147
|
-
display: "flex",
|
|
1148
|
-
alignItems: "center",
|
|
1149
|
-
justifyContent: "center",
|
|
1150
|
-
color: i.text
|
|
1151
|
-
},
|
|
1152
|
-
children: /* @__PURE__ */ y(
|
|
1153
|
-
"svg",
|
|
1154
|
-
{
|
|
1155
|
-
width: "0.5625em",
|
|
1156
|
-
height: "0.5625em",
|
|
1157
|
-
viewBox: "0 0 24 24",
|
|
1158
|
-
fill: "none",
|
|
1159
|
-
stroke: "currentColor",
|
|
1160
|
-
strokeWidth: "2.4",
|
|
1161
|
-
strokeLinecap: "round",
|
|
1162
|
-
strokeLinejoin: "round",
|
|
1163
|
-
children: [
|
|
1164
|
-
/* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1165
|
-
/* @__PURE__ */ r("path", { d: "m12 7 4.5 3.3-1.7 5.4H9.2L7.5 10.3z" })
|
|
1166
|
-
]
|
|
1167
|
-
}
|
|
1168
|
-
)
|
|
1169
|
-
}
|
|
1170
|
-
)
|
|
990
|
+
/* @__PURE__ */ n(C, { size: 12, font: "secondary", weight: 700, color: i.dim, children: R.rank }),
|
|
991
|
+
/* @__PURE__ */ n(st, { photo: $.photo, initial: $.initial, size: 32, badge: 16, teamLogo: $.teamLogo }),
|
|
992
|
+
/* @__PURE__ */ g("div", { css: B.rowText, children: [
|
|
993
|
+
/* @__PURE__ */ n(C, { component: "div", size: 13, weight: 600, color: i.text, ellipsis: !0, cms: !0, children: $.name }),
|
|
994
|
+
/* @__PURE__ */ n(C, { component: "div", size: 11, font: "secondary", color: i.dim, ellipsis: !0, children: u.secondary(R.athlete, R.value, l).join(" · ") })
|
|
995
|
+
] }),
|
|
996
|
+
/* @__PURE__ */ n(C, { size: 16, weight: 700, color: i.primary, children: R.value })
|
|
1171
997
|
]
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
998
|
+
},
|
|
999
|
+
$.id
|
|
1000
|
+
);
|
|
1001
|
+
}),
|
|
1002
|
+
a.length > h ? /* @__PURE__ */ n("button", { type: "button", onClick: () => m(!s), css: B.showAll, children: s ? l("showLess") : l("showAll", { count: a.length }) }) : null
|
|
1003
|
+
] });
|
|
1004
|
+
}, Eo = () => {
|
|
1005
|
+
const { label: e, props: t } = oe(), r = _e(), [l, c] = P.useState(0), s = t.playerRankingsLayout ?? "auto", m = s === "tabs" || s === "auto" && r, u = m ? [ze[l]] : ze;
|
|
1006
|
+
return /* @__PURE__ */ g("div", { css: B.section, children: [
|
|
1007
|
+
/* @__PURE__ */ n(It, { children: e("leadersTitle") }),
|
|
1008
|
+
m ? /* @__PURE__ */ n(Ae, { variant: "pill", gap: 4, children: ze.map((a, h) => /* @__PURE__ */ n(
|
|
1009
|
+
"button",
|
|
1010
|
+
{
|
|
1011
|
+
type: "button",
|
|
1012
|
+
onClick: () => c(h),
|
|
1013
|
+
css: h === l ? B.tab.on : B.tab.off,
|
|
1014
|
+
children: e(Tt[a].title)
|
|
1015
|
+
},
|
|
1016
|
+
a
|
|
1017
|
+
)) }) : null,
|
|
1018
|
+
/* @__PURE__ */ n(
|
|
1019
|
+
"div",
|
|
1190
1020
|
{
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
gridTemplateColumns:
|
|
1194
|
-
alignItems: "center",
|
|
1195
|
-
gap: n(12),
|
|
1196
|
-
marginTop: n(4)
|
|
1021
|
+
css: B.grid,
|
|
1022
|
+
style: {
|
|
1023
|
+
gridTemplateColumns: m ? "1fr" : `repeat(auto-fit,minmax(${o(300)},1fr))`
|
|
1197
1024
|
},
|
|
1198
|
-
children:
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1025
|
+
children: u.map((a) => /* @__PURE__ */ n(Ro, { category: a }, a))
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
] });
|
|
1029
|
+
}, ie = {
|
|
1030
|
+
root: d({
|
|
1031
|
+
display: "grid",
|
|
1032
|
+
gridTemplateColumns: `${o(44)} 1fr ${o(44)}`,
|
|
1033
|
+
alignItems: "center",
|
|
1034
|
+
gap: o(12)
|
|
1035
|
+
}),
|
|
1036
|
+
homeValue: d({ textAlign: "right" }),
|
|
1037
|
+
middle: d({ display: "flex", flexDirection: "column", gap: o(4) }),
|
|
1038
|
+
bars: d({ display: "flex", gap: o(2), height: o(6) }),
|
|
1039
|
+
homeTrack: d({
|
|
1040
|
+
flex: 1,
|
|
1041
|
+
display: "flex",
|
|
1042
|
+
justifyContent: "flex-end",
|
|
1043
|
+
backgroundColor: i.variant,
|
|
1044
|
+
borderRadius: `${i.radiusFull} 0 0 ${i.radiusFull}`,
|
|
1045
|
+
overflow: "hidden"
|
|
1046
|
+
}),
|
|
1047
|
+
homeFill: d({ backgroundColor: i.primary }),
|
|
1048
|
+
awayTrack: d({
|
|
1049
|
+
flex: 1,
|
|
1050
|
+
backgroundColor: i.variant,
|
|
1051
|
+
borderRadius: `0 ${i.radiusFull} ${i.radiusFull} 0`,
|
|
1052
|
+
overflow: "hidden"
|
|
1053
|
+
}),
|
|
1054
|
+
awayFill: d({ height: "100%", backgroundColor: i.primaryContainer })
|
|
1055
|
+
}, K = ({ label: e, home: t, away: r, percent: l, format: c }) => {
|
|
1056
|
+
const s = t ?? 0, m = r ?? 0, u = s + m || 1, a = l ? Math.round(s) : s, h = l ? Math.round(m) : m, b = (f) => f == null ? "–" : l ? `${Math.round(f)}%` : c ? c(f) : String(f);
|
|
1057
|
+
return /* @__PURE__ */ g("div", { css: ie.root, children: [
|
|
1058
|
+
/* @__PURE__ */ n(
|
|
1059
|
+
C,
|
|
1060
|
+
{
|
|
1061
|
+
size: 14,
|
|
1062
|
+
weight: 700,
|
|
1063
|
+
font: "secondary",
|
|
1064
|
+
color: a > h ? i.text : i.dim,
|
|
1065
|
+
css: ie.homeValue,
|
|
1066
|
+
children: b(t)
|
|
1067
|
+
}
|
|
1068
|
+
),
|
|
1069
|
+
/* @__PURE__ */ g("div", { css: ie.middle, children: [
|
|
1070
|
+
/* @__PURE__ */ n(C, { size: 10, font: "secondary", upper: !0, color: i.dim, style: { textAlign: "center" }, children: e }),
|
|
1071
|
+
/* @__PURE__ */ g("div", { css: ie.bars, children: [
|
|
1072
|
+
/* @__PURE__ */ n("div", { css: ie.homeTrack, children: /* @__PURE__ */ n("div", { css: ie.homeFill, style: { width: `${Y(s, u)}%` } }) }),
|
|
1073
|
+
/* @__PURE__ */ n("div", { css: ie.awayTrack, children: /* @__PURE__ */ n("div", { css: ie.awayFill, style: { width: `${Y(m, u)}%` } }) })
|
|
1074
|
+
] })
|
|
1075
|
+
] }),
|
|
1076
|
+
/* @__PURE__ */ n(C, { size: 14, weight: 700, font: "secondary", color: h > a ? i.text : i.dim, children: b(r) })
|
|
1077
|
+
] });
|
|
1078
|
+
}, Mo = [0, 15, 30, 45, 60, 75, 90], zo = 5.5, Pe = (e) => ({ "--fu-ucrc-cs-x": `${e}%` }), q = {
|
|
1079
|
+
mark: d({
|
|
1080
|
+
position: "absolute",
|
|
1081
|
+
left: "var(--fu-ucrc-cs-x)",
|
|
1082
|
+
transform: "translate(-50%,-50%)",
|
|
1083
|
+
display: "flex"
|
|
1084
|
+
}),
|
|
1085
|
+
ring: d({
|
|
1086
|
+
position: "relative",
|
|
1087
|
+
width: o(26),
|
|
1088
|
+
height: o(26),
|
|
1089
|
+
borderRadius: "50%",
|
|
1090
|
+
backgroundColor: i.surface,
|
|
1091
|
+
borderWidth: "2px",
|
|
1092
|
+
borderStyle: "solid",
|
|
1093
|
+
boxShadow: "0 1px 3px rgba(0,0,0,.18)",
|
|
1094
|
+
display: "flex",
|
|
1095
|
+
alignItems: "center",
|
|
1096
|
+
justifyContent: "center"
|
|
1097
|
+
}),
|
|
1098
|
+
logo: d({ width: o(18), height: o(18), objectFit: "contain", display: "block" }),
|
|
1099
|
+
ball: d({
|
|
1100
|
+
position: "absolute",
|
|
1101
|
+
right: o(-6),
|
|
1102
|
+
bottom: o(-6),
|
|
1103
|
+
width: o(14),
|
|
1104
|
+
height: o(14),
|
|
1105
|
+
borderRadius: "50%",
|
|
1106
|
+
backgroundColor: i.surface,
|
|
1107
|
+
border: `1px solid ${i.border}`,
|
|
1108
|
+
display: "flex",
|
|
1109
|
+
alignItems: "center",
|
|
1110
|
+
justifyContent: "center",
|
|
1111
|
+
color: i.text
|
|
1112
|
+
}),
|
|
1113
|
+
timeline: d({
|
|
1114
|
+
display: "grid",
|
|
1115
|
+
gridTemplateColumns: `${o(44)} 1fr ${o(44)}`,
|
|
1116
|
+
alignItems: "center",
|
|
1117
|
+
gap: o(12),
|
|
1118
|
+
marginTop: o(4)
|
|
1119
|
+
}),
|
|
1120
|
+
homeCrest: d({ justifySelf: "end" }),
|
|
1121
|
+
awayCrest: d({ justifySelf: "start", gridColumn: 3 }),
|
|
1122
|
+
track: d({ position: "relative", height: o(84), gridColumn: 2 }),
|
|
1123
|
+
axis: d({
|
|
1124
|
+
position: "absolute",
|
|
1125
|
+
left: 0,
|
|
1126
|
+
right: 0,
|
|
1127
|
+
top: "50%",
|
|
1128
|
+
height: "2px",
|
|
1129
|
+
backgroundColor: i.border,
|
|
1130
|
+
transform: "translateY(-50%)"
|
|
1131
|
+
}),
|
|
1132
|
+
tick: d({
|
|
1133
|
+
position: "absolute",
|
|
1134
|
+
left: "var(--fu-ucrc-cs-x)",
|
|
1135
|
+
top: "50%",
|
|
1136
|
+
transform: "translate(-50%,-50%)",
|
|
1137
|
+
borderRadius: "1px"
|
|
1138
|
+
}),
|
|
1139
|
+
tickLabel: d({
|
|
1140
|
+
position: "absolute",
|
|
1141
|
+
left: "var(--fu-ucrc-cs-x)",
|
|
1142
|
+
bottom: 0,
|
|
1143
|
+
transform: "translateX(-50%)",
|
|
1144
|
+
whiteSpace: "nowrap"
|
|
1145
|
+
}),
|
|
1146
|
+
noGoals: d({
|
|
1147
|
+
position: "absolute",
|
|
1148
|
+
left: "50%",
|
|
1149
|
+
top: o(14, 11),
|
|
1150
|
+
transform: "translateX(-50%)"
|
|
1151
|
+
})
|
|
1152
|
+
}, Lo = ({
|
|
1153
|
+
x: e,
|
|
1154
|
+
top: t,
|
|
1155
|
+
logo: r,
|
|
1156
|
+
color: l
|
|
1157
|
+
}) => /* @__PURE__ */ n("div", { css: q.mark, style: { ...Pe(e), top: t ? "22%" : "78%" }, children: /* @__PURE__ */ g("div", { css: q.ring, style: { borderColor: l }, children: [
|
|
1158
|
+
r ? /* @__PURE__ */ n("img", { src: r, alt: "", css: q.logo }) : null,
|
|
1159
|
+
/* @__PURE__ */ n("div", { css: q.ball, children: /* @__PURE__ */ g(
|
|
1160
|
+
"svg",
|
|
1161
|
+
{
|
|
1162
|
+
width: "0.5625em",
|
|
1163
|
+
height: "0.5625em",
|
|
1164
|
+
viewBox: "0 0 24 24",
|
|
1165
|
+
fill: "none",
|
|
1166
|
+
stroke: "currentColor",
|
|
1167
|
+
strokeWidth: "2.4",
|
|
1168
|
+
strokeLinecap: "round",
|
|
1169
|
+
strokeLinejoin: "round",
|
|
1170
|
+
children: [
|
|
1171
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1172
|
+
/* @__PURE__ */ n("path", { d: "m12 7 4.5 3.3-1.7 5.4H9.2L7.5 10.3z" })
|
|
1173
|
+
]
|
|
1174
|
+
}
|
|
1175
|
+
) })
|
|
1176
|
+
] }) }), Do = ({ match: e }) => {
|
|
1177
|
+
const { entities: t, label: r } = oe(), l = t.logo(e.home.id), c = t.logo(e.away.id), [s, m] = e.fullTime ?? [0, 0], u = [];
|
|
1178
|
+
return e.home.goalsByPeriod.forEach((a, h) => {
|
|
1179
|
+
const b = (w, y) => (h * 15 + 7.5 + (y - (w - 1) / 2) * zo) / 90 * 100, f = e.home.goalsByPeriod[h] ?? 0, S = e.away.goalsByPeriod[h] ?? 0;
|
|
1180
|
+
for (let w = 0; w < f; w += 1) u.push({ x: b(f, w), top: !0, key: `h${h}-${w}` });
|
|
1181
|
+
for (let w = 0; w < S; w += 1) u.push({ x: b(S, w), top: !1, key: `a${h}-${w}` });
|
|
1182
|
+
}), /* @__PURE__ */ g(fe, { children: [
|
|
1183
|
+
/* @__PURE__ */ n(K, { label: r("possession"), home: e.home.possession, away: e.away.possession, percent: !0 }),
|
|
1184
|
+
/* @__PURE__ */ n(K, { label: r("shotsOnTarget"), home: e.home.shotsOnTarget, away: e.away.shotsOnTarget }),
|
|
1185
|
+
/* @__PURE__ */ n(K, { label: r("corners"), home: e.home.corners, away: e.away.corners }),
|
|
1186
|
+
/* @__PURE__ */ n(K, { label: r("yellowCards"), home: e.home.yellowCards, away: e.away.yellowCards }),
|
|
1187
|
+
/* @__PURE__ */ n(K, { label: r("redCards"), home: e.home.redCards, away: e.away.redCards }),
|
|
1188
|
+
/* @__PURE__ */ g("div", { css: q.timeline, children: [
|
|
1189
|
+
/* @__PURE__ */ n(V, { url: l, size: 30, css: q.homeCrest }),
|
|
1190
|
+
/* @__PURE__ */ g("div", { css: q.track, children: [
|
|
1191
|
+
/* @__PURE__ */ n("div", { css: q.axis }),
|
|
1192
|
+
Mo.map((a) => {
|
|
1193
|
+
const h = a === 45, b = h ? i.text : i.dim;
|
|
1194
|
+
return /* @__PURE__ */ g(P.Fragment, { children: [
|
|
1195
|
+
/* @__PURE__ */ n(
|
|
1196
|
+
"div",
|
|
1203
1197
|
{
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
backgroundColor: t.border,
|
|
1211
|
-
transform: "translateY(-50%)"
|
|
1198
|
+
css: q.tick,
|
|
1199
|
+
style: {
|
|
1200
|
+
...Pe(a / 90 * 100),
|
|
1201
|
+
width: h ? "2px" : "1px",
|
|
1202
|
+
height: o(h ? 14 : 8),
|
|
1203
|
+
backgroundColor: b
|
|
1212
1204
|
}
|
|
1213
1205
|
}
|
|
1214
1206
|
),
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
return /* @__PURE__ */ y(L.Fragment, { children: [
|
|
1218
|
-
/* @__PURE__ */ r(
|
|
1219
|
-
m,
|
|
1220
|
-
{
|
|
1221
|
-
sx: {
|
|
1222
|
-
position: "absolute",
|
|
1223
|
-
left: `${u / 90 * 100}%`,
|
|
1224
|
-
top: "50%",
|
|
1225
|
-
transform: "translate(-50%,-50%)",
|
|
1226
|
-
width: h ? "2px" : "1px",
|
|
1227
|
-
height: n(h ? 14 : 8),
|
|
1228
|
-
backgroundColor: f,
|
|
1229
|
-
borderRadius: "1px"
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
),
|
|
1233
|
-
/* @__PURE__ */ r(
|
|
1234
|
-
w,
|
|
1235
|
-
{
|
|
1236
|
-
size: 10,
|
|
1237
|
-
font: "secondary",
|
|
1238
|
-
weight: h ? 700 : 400,
|
|
1239
|
-
color: f,
|
|
1240
|
-
sx: {
|
|
1241
|
-
position: "absolute",
|
|
1242
|
-
left: `${u / 90 * 100}%`,
|
|
1243
|
-
bottom: 0,
|
|
1244
|
-
transform: "translateX(-50%)",
|
|
1245
|
-
whiteSpace: "nowrap"
|
|
1246
|
-
},
|
|
1247
|
-
children: h ? s("halfTimeShort") : s("minuteTick", { minute: u })
|
|
1248
|
-
}
|
|
1249
|
-
)
|
|
1250
|
-
] }, u);
|
|
1251
|
-
}),
|
|
1252
|
-
d.map((u) => /* @__PURE__ */ r(
|
|
1253
|
-
uo,
|
|
1254
|
-
{
|
|
1255
|
-
x: u.x,
|
|
1256
|
-
top: u.top,
|
|
1257
|
-
logo: u.top ? i : a,
|
|
1258
|
-
color: u.top ? t.primary : t.primaryContainer
|
|
1259
|
-
},
|
|
1260
|
-
u.key
|
|
1261
|
-
)),
|
|
1262
|
-
c + l === 0 ? /* @__PURE__ */ r(
|
|
1263
|
-
w,
|
|
1207
|
+
/* @__PURE__ */ n(
|
|
1208
|
+
C,
|
|
1264
1209
|
{
|
|
1265
|
-
size:
|
|
1210
|
+
size: 10,
|
|
1266
1211
|
font: "secondary",
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
transform: "translateX(-50%)"
|
|
1273
|
-
},
|
|
1274
|
-
children: s("noGoals")
|
|
1212
|
+
weight: h ? 700 : 400,
|
|
1213
|
+
color: b,
|
|
1214
|
+
css: q.tickLabel,
|
|
1215
|
+
style: Pe(a / 90 * 100),
|
|
1216
|
+
children: h ? r("halfTimeShort") : r("minuteTick", { minute: a })
|
|
1275
1217
|
}
|
|
1276
|
-
)
|
|
1277
|
-
] })
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1218
|
+
)
|
|
1219
|
+
] }, a);
|
|
1220
|
+
}),
|
|
1221
|
+
u.map((a) => /* @__PURE__ */ n(
|
|
1222
|
+
Lo,
|
|
1223
|
+
{
|
|
1224
|
+
x: a.x,
|
|
1225
|
+
top: a.top,
|
|
1226
|
+
logo: a.top ? l : c,
|
|
1227
|
+
color: a.top ? i.primary : i.primaryContainer
|
|
1228
|
+
},
|
|
1229
|
+
a.key
|
|
1230
|
+
)),
|
|
1231
|
+
s + m === 0 ? /* @__PURE__ */ n(
|
|
1232
|
+
C,
|
|
1233
|
+
{
|
|
1234
|
+
size: 11,
|
|
1235
|
+
font: "secondary",
|
|
1236
|
+
color: i.dim,
|
|
1237
|
+
css: q.noGoals,
|
|
1238
|
+
children: r("noGoals")
|
|
1239
|
+
}
|
|
1240
|
+
) : null
|
|
1241
|
+
] }),
|
|
1242
|
+
/* @__PURE__ */ n(V, { url: c, size: 30, css: q.awayCrest })
|
|
1243
|
+
] })
|
|
1282
1244
|
] });
|
|
1283
|
-
},
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1245
|
+
}, Ao = { W: "formWin", D: "formDraw", L: "formLoss" }, Po = { W: i.success, D: i.variant, L: i.danger }, nt = (e) => d({
|
|
1246
|
+
position: "absolute",
|
|
1247
|
+
bottom: `calc(100% + ${o(10)})`,
|
|
1248
|
+
...e === "away" ? { right: o(-4) } : { left: o(-4) },
|
|
1249
|
+
zIndex: 50,
|
|
1250
|
+
width: o(240),
|
|
1251
|
+
backgroundColor: i.surface,
|
|
1252
|
+
color: i.text,
|
|
1253
|
+
borderRadius: i.radiusSm,
|
|
1254
|
+
padding: `${o(8)} ${o(10)}`,
|
|
1255
|
+
boxShadow: "0 6px 20px rgba(33,33,33,.18)",
|
|
1256
|
+
display: "flex",
|
|
1257
|
+
flexDirection: "column",
|
|
1258
|
+
gap: o(6),
|
|
1259
|
+
pointerEvents: "none"
|
|
1260
|
+
}), it = (e) => d({
|
|
1261
|
+
position: "absolute",
|
|
1262
|
+
top: "100%",
|
|
1263
|
+
...e === "away" ? { right: o(10) } : { left: o(10) },
|
|
1264
|
+
border: `${o(6)} solid transparent`,
|
|
1265
|
+
borderTopColor: i.surface
|
|
1266
|
+
}), at = (e) => d({
|
|
1267
|
+
display: "flex",
|
|
1268
|
+
alignItems: "center",
|
|
1269
|
+
gap: o(6),
|
|
1270
|
+
minWidth: 0,
|
|
1271
|
+
...e ? { flexDirection: "row-reverse" } : {}
|
|
1272
|
+
}), lt = (e) => d({
|
|
1273
|
+
width: o(e, 11),
|
|
1274
|
+
height: o(e, 11),
|
|
1275
|
+
borderRadius: `calc(${i.radiusSm} - 2px)`,
|
|
1276
|
+
display: "inline-flex",
|
|
1277
|
+
alignItems: "center",
|
|
1278
|
+
justifyContent: "center",
|
|
1279
|
+
cursor: "help",
|
|
1280
|
+
outlineOffset: "1px"
|
|
1281
|
+
}), te = {
|
|
1282
|
+
root: d({ position: "relative", display: "flex" }),
|
|
1283
|
+
badge: { regular: lt(24), compact: lt(20) },
|
|
1284
|
+
tooltip: { home: nt("home"), away: nt("away") },
|
|
1285
|
+
arrow: { home: it("home"), away: it("away") },
|
|
1286
|
+
teams: d({
|
|
1287
|
+
display: "grid",
|
|
1288
|
+
gridTemplateColumns: "minmax(0,1fr) auto minmax(0,1fr)",
|
|
1289
|
+
alignItems: "center",
|
|
1290
|
+
gap: o(8)
|
|
1291
|
+
}),
|
|
1292
|
+
teamCell: { home: at(!1), away: at(!0) },
|
|
1293
|
+
alignEnd: d({ textAlign: "end" })
|
|
1294
|
+
}, Fo = ({ entry: e, side: t, compact: r }) => {
|
|
1295
|
+
const { entities: l, label: c, fmt: s } = oe(), [m, u] = P.useState(!1), { match: a, result: h } = e, [b, f] = a.fullTime ?? [0, 0], S = (w, y) => /* @__PURE__ */ g("div", { css: y ? te.teamCell.away : te.teamCell.home, children: [
|
|
1296
|
+
/* @__PURE__ */ n(V, { url: l.logo(w), size: 22 }),
|
|
1297
|
+
/* @__PURE__ */ n(C, { size: 12, weight: 600, ellipsis: !0, cms: !0, css: y ? te.alignEnd : void 0, children: l.name(w) })
|
|
1298
|
+
] });
|
|
1299
|
+
return /* @__PURE__ */ g(
|
|
1300
|
+
"div",
|
|
1302
1301
|
{
|
|
1303
|
-
onMouseEnter: () =>
|
|
1304
|
-
onMouseLeave: () =>
|
|
1305
|
-
|
|
1302
|
+
onMouseEnter: () => u(!0),
|
|
1303
|
+
onMouseLeave: () => u(!1),
|
|
1304
|
+
css: te.root,
|
|
1306
1305
|
children: [
|
|
1307
|
-
/* @__PURE__ */
|
|
1308
|
-
|
|
1306
|
+
/* @__PURE__ */ n(
|
|
1307
|
+
C,
|
|
1309
1308
|
{
|
|
1310
1309
|
size: 11,
|
|
1311
1310
|
font: "secondary",
|
|
1312
1311
|
weight: 700,
|
|
1313
|
-
color: h === "D" ?
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
display: "inline-flex",
|
|
1319
|
-
alignItems: "center",
|
|
1320
|
-
justifyContent: "center",
|
|
1321
|
-
backgroundColor: f,
|
|
1322
|
-
cursor: "help",
|
|
1323
|
-
outline: `2px solid ${l ? o.primary : "transparent"}`,
|
|
1324
|
-
outlineOffset: "1px"
|
|
1312
|
+
color: h === "D" ? i.body : i.onPrimary,
|
|
1313
|
+
css: r ? te.badge.compact : te.badge.regular,
|
|
1314
|
+
style: {
|
|
1315
|
+
backgroundColor: Po[h],
|
|
1316
|
+
outline: `2px solid ${m ? i.primary : "transparent"}`
|
|
1325
1317
|
},
|
|
1326
|
-
children:
|
|
1318
|
+
children: c(Ao[h])
|
|
1327
1319
|
}
|
|
1328
1320
|
),
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
sx: {
|
|
1333
|
-
position: "absolute",
|
|
1334
|
-
bottom: `calc(100% + ${n(10)})`,
|
|
1335
|
-
...C,
|
|
1336
|
-
zIndex: 50,
|
|
1337
|
-
width: n(240),
|
|
1338
|
-
backgroundColor: o.surface,
|
|
1339
|
-
color: o.text,
|
|
1340
|
-
borderRadius: s.sm,
|
|
1341
|
-
padding: `${n(8)} ${n(10)}`,
|
|
1342
|
-
boxShadow: "0 6px 20px rgba(33,33,33,.18)",
|
|
1343
|
-
display: "flex",
|
|
1344
|
-
flexDirection: "column",
|
|
1345
|
-
gap: n(6),
|
|
1346
|
-
pointerEvents: "none"
|
|
1347
|
-
},
|
|
1348
|
-
children: [
|
|
1349
|
-
/* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 500, color: o.dim, sx: { textAlign: "center" }, children: a("formMeta", {
|
|
1350
|
-
round: u.round,
|
|
1351
|
-
date: c.date(u.start, { day: "numeric", month: "long", year: "numeric" })
|
|
1352
|
-
}) }),
|
|
1353
|
-
/* @__PURE__ */ y(
|
|
1354
|
-
m,
|
|
1355
|
-
{
|
|
1356
|
-
sx: {
|
|
1357
|
-
display: "grid",
|
|
1358
|
-
gridTemplateColumns: "minmax(0,1fr) auto minmax(0,1fr)",
|
|
1359
|
-
alignItems: "center",
|
|
1360
|
-
gap: n(8)
|
|
1361
|
-
},
|
|
1362
|
-
children: [
|
|
1363
|
-
S(u.home.id, !1),
|
|
1364
|
-
/* @__PURE__ */ r(w, { size: 15, weight: 700, sx: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" }, children: `${g} – ${$}` }),
|
|
1365
|
-
S(u.away.id, !0)
|
|
1366
|
-
]
|
|
1367
|
-
}
|
|
1368
|
-
),
|
|
1369
|
-
/* @__PURE__ */ r(
|
|
1370
|
-
m,
|
|
1371
|
-
{
|
|
1372
|
-
component: "span",
|
|
1373
|
-
sx: {
|
|
1374
|
-
position: "absolute",
|
|
1375
|
-
top: "100%",
|
|
1376
|
-
...b,
|
|
1377
|
-
border: `${n(6)} solid transparent`,
|
|
1378
|
-
borderTopColor: o.surface
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
)
|
|
1382
|
-
]
|
|
1383
|
-
}
|
|
1384
|
-
) : null
|
|
1385
|
-
]
|
|
1386
|
-
}
|
|
1387
|
-
);
|
|
1388
|
-
}, ho = ({ match: e }) => {
|
|
1389
|
-
var g, $;
|
|
1390
|
-
const { colors: t } = F(), { data: o, entities: s, finished: i, tally: a, label: c, fmt: l } = Y(), d = o.teamStats.get(e.home.id), u = o.teamStats.get(e.away.id), h = Yt(i, e), f = ze(i, e.home.id, e.start), C = ze(i, e.away.id, e.start), b = (S) => l.decimal(S, 1);
|
|
1391
|
-
return /* @__PURE__ */ y(ye, { children: [
|
|
1392
|
-
/* @__PURE__ */ y(
|
|
1393
|
-
m,
|
|
1394
|
-
{
|
|
1395
|
-
sx: {
|
|
1396
|
-
display: "grid",
|
|
1397
|
-
gridTemplateColumns: `${n(44)} 1fr ${n(44)}`,
|
|
1398
|
-
alignItems: "center",
|
|
1399
|
-
gap: n(12)
|
|
1400
|
-
},
|
|
1401
|
-
children: [
|
|
1402
|
-
/* @__PURE__ */ r(H, { url: s.logo(e.home.id), size: 30, sx: { justifySelf: "end" } }),
|
|
1403
|
-
/* @__PURE__ */ y(
|
|
1404
|
-
m,
|
|
1321
|
+
m ? /* @__PURE__ */ g("div", { css: te.tooltip[t], children: [
|
|
1322
|
+
/* @__PURE__ */ n(
|
|
1323
|
+
C,
|
|
1405
1324
|
{
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
/* @__PURE__ */ r(w, { size: 10, font: "secondary", upper: !0, color: t.dim, sx: { textAlign: "center" }, children: c("formLast5") }),
|
|
1416
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: C.map((S) => /* @__PURE__ */ r(Le, { entry: S, side: "away" }, S.match.id)) })
|
|
1417
|
-
]
|
|
1325
|
+
size: 11,
|
|
1326
|
+
font: "secondary",
|
|
1327
|
+
weight: 500,
|
|
1328
|
+
color: i.dim,
|
|
1329
|
+
style: { textAlign: "center" },
|
|
1330
|
+
children: c("formMeta", {
|
|
1331
|
+
round: a.round,
|
|
1332
|
+
date: s.date(a.start, { day: "numeric", month: "long", year: "numeric" })
|
|
1333
|
+
})
|
|
1418
1334
|
}
|
|
1419
1335
|
),
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1336
|
+
/* @__PURE__ */ g("div", { css: te.teams, children: [
|
|
1337
|
+
S(a.home.id, !1),
|
|
1338
|
+
/* @__PURE__ */ n(
|
|
1339
|
+
C,
|
|
1340
|
+
{
|
|
1341
|
+
size: 15,
|
|
1342
|
+
weight: 700,
|
|
1343
|
+
style: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" },
|
|
1344
|
+
children: `${b} – ${f}`
|
|
1345
|
+
}
|
|
1346
|
+
),
|
|
1347
|
+
S(a.away.id, !0)
|
|
1348
|
+
] }),
|
|
1349
|
+
/* @__PURE__ */ n("span", { css: te.arrow[t] })
|
|
1350
|
+
] }) : null
|
|
1351
|
+
]
|
|
1352
|
+
}
|
|
1353
|
+
);
|
|
1354
|
+
}, X = {
|
|
1355
|
+
form: d({
|
|
1356
|
+
display: "grid",
|
|
1357
|
+
gridTemplateColumns: `${o(44)} 1fr ${o(44)}`,
|
|
1358
|
+
alignItems: "center",
|
|
1359
|
+
gap: o(12)
|
|
1360
|
+
}),
|
|
1361
|
+
homeCrest: d({ justifySelf: "end" }),
|
|
1362
|
+
awayCrest: d({ justifySelf: "start", gridColumn: 3 }),
|
|
1363
|
+
formRow: d({
|
|
1364
|
+
gridColumn: 2,
|
|
1365
|
+
display: "flex",
|
|
1366
|
+
justifyContent: "space-between",
|
|
1367
|
+
alignItems: "center",
|
|
1368
|
+
gap: o(12)
|
|
1369
|
+
}),
|
|
1370
|
+
badges: d({ display: "flex", gap: o(4) }),
|
|
1371
|
+
// Narrow: the label on its own line, each team's crest beside its badges.
|
|
1372
|
+
formStacked: d({ display: "flex", flexDirection: "column", alignItems: "center", gap: o(8) }),
|
|
1373
|
+
formLine: d({
|
|
1374
|
+
alignSelf: "stretch",
|
|
1375
|
+
display: "flex",
|
|
1376
|
+
justifyContent: "space-between",
|
|
1377
|
+
alignItems: "center",
|
|
1378
|
+
gap: o(8)
|
|
1379
|
+
}),
|
|
1380
|
+
side: d({ display: "flex", alignItems: "center", gap: o(6) }),
|
|
1381
|
+
strong: d({ color: i.text }),
|
|
1382
|
+
cms: d({ unicodeBidi: "plaintext" })
|
|
1383
|
+
}, Wo = ({ match: e }) => {
|
|
1384
|
+
var D, E;
|
|
1385
|
+
const { data: t, entities: r, finished: l, tally: c, label: s, fmt: m } = oe(), u = t.teamStats.get(e.home.id), a = t.teamStats.get(e.away.id), h = yo(l, e), b = Je(l, e.home.id, e.start), f = Je(l, e.away.id, e.start), S = (x) => m.decimal(x, 1), w = _e(), y = /* @__PURE__ */ n(C, { size: 10, font: "secondary", upper: !0, color: i.dim, style: { textAlign: "center" }, children: s("formLast5") }), _ = (x, R) => /* @__PURE__ */ n("div", { css: X.badges, children: x.map(($) => /* @__PURE__ */ n(Fo, { entry: $, side: R, compact: w }, $.match.id)) });
|
|
1386
|
+
return /* @__PURE__ */ g(fe, { children: [
|
|
1387
|
+
w ? /* @__PURE__ */ g("div", { css: X.formStacked, children: [
|
|
1388
|
+
y,
|
|
1389
|
+
/* @__PURE__ */ g("div", { css: X.formLine, children: [
|
|
1390
|
+
/* @__PURE__ */ g("div", { css: X.side, children: [
|
|
1391
|
+
/* @__PURE__ */ n(V, { url: r.logo(e.home.id), size: 20 }),
|
|
1392
|
+
_(b, "home")
|
|
1393
|
+
] }),
|
|
1394
|
+
/* @__PURE__ */ g("div", { css: X.side, children: [
|
|
1395
|
+
_(f, "away"),
|
|
1396
|
+
/* @__PURE__ */ n(V, { url: r.logo(e.away.id), size: 20 })
|
|
1397
|
+
] })
|
|
1398
|
+
] })
|
|
1399
|
+
] }) : /* @__PURE__ */ g("div", { css: X.form, children: [
|
|
1400
|
+
/* @__PURE__ */ n(V, { url: r.logo(e.home.id), size: 30, css: X.homeCrest }),
|
|
1401
|
+
/* @__PURE__ */ g("div", { css: X.formRow, children: [
|
|
1402
|
+
_(b, "home"),
|
|
1403
|
+
y,
|
|
1404
|
+
_(f, "away")
|
|
1405
|
+
] }),
|
|
1406
|
+
/* @__PURE__ */ n(V, { url: r.logo(e.away.id), size: 30, css: X.awayCrest })
|
|
1407
|
+
] }),
|
|
1408
|
+
/* @__PURE__ */ n(K, { label: s("wins"), home: (u == null ? void 0 : u.won) ?? null, away: (a == null ? void 0 : a.won) ?? null }),
|
|
1409
|
+
/* @__PURE__ */ n(K, { label: s("draws"), home: (u == null ? void 0 : u.draw) ?? null, away: (a == null ? void 0 : a.draw) ?? null }),
|
|
1410
|
+
/* @__PURE__ */ n(K, { label: s("losses"), home: (u == null ? void 0 : u.lost) ?? null, away: (a == null ? void 0 : a.lost) ?? null }),
|
|
1411
|
+
/* @__PURE__ */ n(K, { label: s("goalsScored"), home: (u == null ? void 0 : u.goalsScored) ?? null, away: (a == null ? void 0 : a.goalsScored) ?? null }),
|
|
1412
|
+
/* @__PURE__ */ n(K, { label: s("goalsConceded"), home: (u == null ? void 0 : u.goalsAllowed) ?? null, away: (a == null ? void 0 : a.goalsAllowed) ?? null }),
|
|
1413
|
+
/* @__PURE__ */ n(
|
|
1414
|
+
K,
|
|
1438
1415
|
{
|
|
1439
|
-
label:
|
|
1440
|
-
home: (
|
|
1441
|
-
away: (
|
|
1442
|
-
format:
|
|
1416
|
+
label: s("goalsPerMatch"),
|
|
1417
|
+
home: (u == null ? void 0 : u.avgTotalGoals) != null ? Number(u.avgTotalGoals.toFixed(1)) : null,
|
|
1418
|
+
away: (a == null ? void 0 : a.avgTotalGoals) != null ? Number(a.avgTotalGoals.toFixed(1)) : null,
|
|
1419
|
+
format: S
|
|
1443
1420
|
}
|
|
1444
1421
|
),
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
|
|
1422
|
+
/* @__PURE__ */ n(K, { label: s("homeAwayWins"), home: (u == null ? void 0 : u.homeWon) ?? null, away: (a == null ? void 0 : a.awayWon) ?? null }),
|
|
1423
|
+
/* @__PURE__ */ n(
|
|
1424
|
+
K,
|
|
1448
1425
|
{
|
|
1449
|
-
label:
|
|
1450
|
-
home: ((
|
|
1451
|
-
away: ((
|
|
1426
|
+
label: s("cleanSheets"),
|
|
1427
|
+
home: ((D = c.get(e.home.id)) == null ? void 0 : D.cleanSheets) ?? 0,
|
|
1428
|
+
away: ((E = c.get(e.away.id)) == null ? void 0 : E.cleanSheets) ?? 0
|
|
1452
1429
|
}
|
|
1453
1430
|
),
|
|
1454
|
-
h != null && h.fullTime ? /* @__PURE__ */
|
|
1455
|
-
|
|
1431
|
+
h != null && h.fullTime ? /* @__PURE__ */ g(C, { component: "div", size: 11, font: "secondary", color: i.dim, children: [
|
|
1432
|
+
s("previousMeeting"),
|
|
1456
1433
|
" ",
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ g("b", { css: X.strong, children: [
|
|
1435
|
+
/* @__PURE__ */ n("span", { css: X.cms, children: r.name(h.home.id) }),
|
|
1459
1436
|
" ",
|
|
1460
1437
|
`${h.fullTime[0]}:${h.fullTime[1]}`,
|
|
1461
1438
|
" ",
|
|
1462
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ n("span", { css: X.cms, children: r.name(h.away.id) }),
|
|
1463
1440
|
" ",
|
|
1464
|
-
|
|
1441
|
+
s("previousMeetingRound", { round: h.round })
|
|
1465
1442
|
] })
|
|
1466
1443
|
] }) : null
|
|
1467
1444
|
] });
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1445
|
+
}, Oo = zt({
|
|
1446
|
+
"0%, 100%": { opacity: 1, transform: "scale(1)" },
|
|
1447
|
+
"50%": { opacity: 0.4, transform: "scale(.7)" }
|
|
1448
|
+
}), Bo = (e, t) => d({
|
|
1449
|
+
display: "grid",
|
|
1450
|
+
alignItems: "center",
|
|
1451
|
+
columnGap: o(8),
|
|
1452
|
+
rowGap: o(6),
|
|
1453
|
+
// Minus the 3px accent border, so the rail lines up with the day header's text.
|
|
1454
|
+
padding: `${o(6)} ${o(16)} ${o(6)} calc(${o(16)} - 3px)`,
|
|
1455
|
+
cursor: e ? "pointer" : "default",
|
|
1456
|
+
borderLeft: `3px solid ${t ? i.danger : "transparent"}`,
|
|
1457
|
+
// Not onSurface: that is the day-header and detail fill, so a hovered row would merge into it.
|
|
1458
|
+
...e ? { "&:hover": { backgroundColor: i.tint } } : {}
|
|
1459
|
+
}), _t = {};
|
|
1460
|
+
for (const e of [0, 1]) for (const t of [0, 1]) _t[`${e}${t}`] = Bo(!!e, !!t);
|
|
1461
|
+
const ct = (e) => d({
|
|
1462
|
+
letterSpacing: o(1, 15),
|
|
1463
|
+
backgroundColor: e ? i.onSurface : "transparent",
|
|
1464
|
+
borderRadius: i.radiusSm,
|
|
1465
|
+
padding: `${o(3, 15)} ${o(8, 15)}`,
|
|
1466
|
+
whiteSpace: "nowrap"
|
|
1467
|
+
}), F = {
|
|
1468
|
+
item: d({ borderBottom: `1px solid ${i.border}` }),
|
|
1469
|
+
rail: d({ display: "flex", alignItems: "center", gap: o(6), whiteSpace: "nowrap" }),
|
|
1470
|
+
liveDot: d({
|
|
1471
|
+
width: o(7),
|
|
1472
|
+
height: o(7),
|
|
1473
|
+
borderRadius: "50%",
|
|
1474
|
+
backgroundColor: i.danger,
|
|
1475
|
+
animation: `${Oo} 1s ease-in-out infinite`
|
|
1476
|
+
}),
|
|
1477
|
+
broadcast: d({
|
|
1478
|
+
display: "inline-flex",
|
|
1479
|
+
alignItems: "center",
|
|
1480
|
+
justifyContent: "center",
|
|
1481
|
+
padding: 0,
|
|
1482
|
+
border: "none",
|
|
1483
|
+
background: "transparent",
|
|
1484
|
+
cursor: "pointer",
|
|
1485
|
+
fontSize: o(16),
|
|
1486
|
+
color: i.dim,
|
|
1487
|
+
"&:hover": { color: i.primary }
|
|
1488
|
+
}),
|
|
1489
|
+
home: d({
|
|
1490
|
+
display: "flex",
|
|
1491
|
+
alignItems: "center",
|
|
1492
|
+
justifyContent: "flex-end",
|
|
1493
|
+
gap: o(8),
|
|
1494
|
+
minWidth: 0
|
|
1495
|
+
}),
|
|
1496
|
+
away: d({ display: "flex", alignItems: "center", gap: o(8), minWidth: 0 }),
|
|
1497
|
+
alignRight: d({ textAlign: "right" }),
|
|
1498
|
+
scoreColumn: d({
|
|
1499
|
+
display: "flex",
|
|
1500
|
+
flexDirection: "column",
|
|
1501
|
+
alignItems: "center",
|
|
1502
|
+
minWidth: o(56)
|
|
1503
|
+
}),
|
|
1504
|
+
notPlayed: d({
|
|
1505
|
+
backgroundColor: i.onSurface,
|
|
1506
|
+
borderRadius: i.radiusSm,
|
|
1507
|
+
padding: `${o(5, 11)} ${o(8, 11)}`,
|
|
1508
|
+
whiteSpace: "nowrap"
|
|
1509
|
+
}),
|
|
1510
|
+
score: { filled: ct(!0), empty: ct(!1) },
|
|
1511
|
+
oddsInline: d({ minWidth: 0, cursor: "default" }),
|
|
1512
|
+
chevron: d({
|
|
1513
|
+
width: o(16),
|
|
1514
|
+
height: o(16),
|
|
1515
|
+
color: i.dim,
|
|
1516
|
+
transition: "transform .2s"
|
|
1517
|
+
}),
|
|
1518
|
+
oddsBelow: d({
|
|
1519
|
+
display: "flex",
|
|
1520
|
+
justifyContent: "center",
|
|
1521
|
+
marginTop: o(4),
|
|
1522
|
+
cursor: "default"
|
|
1523
|
+
}),
|
|
1524
|
+
oddsBelowInner: d({ width: "100%", maxWidth: o(300) }),
|
|
1525
|
+
// Narrow rows: the teams stack, each with its own score at the line's end.
|
|
1526
|
+
railStack: d({ display: "flex", flexDirection: "column", alignItems: "flex-start", gap: o(4) }),
|
|
1527
|
+
railTime: d({ display: "flex", alignItems: "center", gap: o(6), whiteSpace: "nowrap" }),
|
|
1528
|
+
stack: d({ display: "flex", flexDirection: "column", gap: o(4), minWidth: 0 }),
|
|
1529
|
+
line: d({ display: "flex", alignItems: "center", gap: o(8), height: o(24), minWidth: 0 }),
|
|
1530
|
+
scoreStack: d({
|
|
1531
|
+
display: "flex",
|
|
1532
|
+
flexDirection: "column",
|
|
1533
|
+
alignItems: "center",
|
|
1534
|
+
gap: o(4),
|
|
1535
|
+
minWidth: o(28),
|
|
1536
|
+
backgroundColor: i.onSurface,
|
|
1537
|
+
borderRadius: i.radiusSm,
|
|
1538
|
+
padding: `0 ${o(8)}`
|
|
1539
|
+
}),
|
|
1540
|
+
scoreLine: d({ display: "flex", alignItems: "center", height: o(24) }),
|
|
1541
|
+
oddsStacked: d({ display: "flex", marginTop: o(4), cursor: "default" }),
|
|
1542
|
+
detail: d({
|
|
1543
|
+
padding: `${o(6)} ${o(16)} ${o(16)}`,
|
|
1544
|
+
display: "flex",
|
|
1545
|
+
flexDirection: "column",
|
|
1546
|
+
gap: o(14),
|
|
1547
|
+
backgroundColor: i.onSurface,
|
|
1548
|
+
borderTop: `1px solid ${i.border}`
|
|
1549
|
+
})
|
|
1550
|
+
}, No = ({ match: e, odds: t, open: r, onToggle: l }) => {
|
|
1551
|
+
var ye, be, he, we, ce;
|
|
1552
|
+
const { entities: c, label: s, fmt: m, props: u } = oe(), a = (ye = u.callbacks) == null ? void 0 : ye.onBroadcastClick, h = e.status === "FINISHED", b = e.status === "LIVE", [f, S] = e.fullTime ?? [0, 0], w = h && f > S, y = h && S > f, _ = h && f === S, D = e.status === "CANCELLED", E = !D, x = !h && !D, R = b ? e.liveMinute !== null ? s("liveMinute", { minute: e.liveMinute }) : e.isHalfTime ? s("halfTimeShort") : s("live") : m.time(e.start), $ = _e(), W = Bt(), L = (u.showOdds ?? !1) && W && (e.status === "UPCOMING" || b), z = t ? /* @__PURE__ */ n(
|
|
1553
|
+
Vt,
|
|
1472
1554
|
{
|
|
1473
1555
|
odds: t,
|
|
1474
|
-
market: ((
|
|
1556
|
+
market: ((be = u.odds) == null ? void 0 : be.market) ?? "FT_1X2",
|
|
1475
1557
|
size: "compact",
|
|
1476
1558
|
bare: !0,
|
|
1477
|
-
mode: ((
|
|
1478
|
-
flashInterval: (
|
|
1479
|
-
onSelect: (
|
|
1559
|
+
mode: ((he = u.odds) == null ? void 0 : he.mode) ?? "default",
|
|
1560
|
+
flashInterval: (we = u.odds) == null ? void 0 : we.flashInterval,
|
|
1561
|
+
onSelect: (ce = u.callbacks) == null ? void 0 : ce.onAddToBetslip
|
|
1480
1562
|
}
|
|
1481
|
-
) : null,
|
|
1563
|
+
) : null, U = {
|
|
1482
1564
|
// A price click must not toggle the row.
|
|
1483
|
-
onClick: (
|
|
1484
|
-
onKeyDown: (
|
|
1485
|
-
},
|
|
1486
|
-
|
|
1565
|
+
onClick: (O) => O.stopPropagation(),
|
|
1566
|
+
onKeyDown: (O) => O.stopPropagation()
|
|
1567
|
+
}, A = (O, re, ge, Re) => /* @__PURE__ */ n(
|
|
1568
|
+
C,
|
|
1487
1569
|
{
|
|
1488
1570
|
size: 14,
|
|
1489
|
-
weight:
|
|
1490
|
-
color:
|
|
1571
|
+
weight: re ? 700 : 500,
|
|
1572
|
+
color: ge && !_ ? i.dim : i.text,
|
|
1491
1573
|
ellipsis: !0,
|
|
1492
1574
|
cms: !0,
|
|
1493
|
-
|
|
1494
|
-
children: c.name(
|
|
1575
|
+
css: Re ? F.alignRight : void 0,
|
|
1576
|
+
children: c.name(O)
|
|
1495
1577
|
}
|
|
1496
|
-
)
|
|
1497
|
-
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
|
|
1578
|
+
), M = h || b, p = /* @__PURE__ */ g(fe, { children: [
|
|
1579
|
+
b ? /* @__PURE__ */ n("span", { css: F.liveDot }) : null,
|
|
1580
|
+
/* @__PURE__ */ n(C, { size: 13, font: "secondary", weight: 700, color: b ? i.danger : i.text, children: R })
|
|
1581
|
+
] }), k = a && e.status === "UPCOMING" ? /* @__PURE__ */ n(
|
|
1582
|
+
"button",
|
|
1583
|
+
{
|
|
1584
|
+
type: "button",
|
|
1585
|
+
"aria-label": s("watchOnTv"),
|
|
1586
|
+
title: s("watchOnTv"),
|
|
1587
|
+
onClick: (O) => {
|
|
1588
|
+
O.stopPropagation(), a(e.id);
|
|
1589
|
+
},
|
|
1590
|
+
onKeyDown: (O) => O.stopPropagation(),
|
|
1591
|
+
css: F.broadcast,
|
|
1592
|
+
children: /* @__PURE__ */ n(Ut, { size: "1em", "aria-hidden": !0 })
|
|
1593
|
+
}
|
|
1594
|
+
) : null, I = D && e.notPlayedReason ? /* @__PURE__ */ n(C, { size: 11, font: "secondary", weight: 700, upper: !0, color: i.dim, css: F.notPlayed, children: s(e.notPlayedReason) }) : null, G = /* @__PURE__ */ n(
|
|
1595
|
+
"svg",
|
|
1596
|
+
{
|
|
1597
|
+
viewBox: "0 0 24 24",
|
|
1598
|
+
fill: "none",
|
|
1599
|
+
stroke: "currentColor",
|
|
1600
|
+
strokeWidth: "2",
|
|
1601
|
+
strokeLinecap: "round",
|
|
1602
|
+
strokeLinejoin: "round",
|
|
1603
|
+
css: F.chevron,
|
|
1604
|
+
style: {
|
|
1605
|
+
// Hidden, not removed, so the teams stay aligned with the expandable rows.
|
|
1606
|
+
visibility: E ? "visible" : "hidden",
|
|
1607
|
+
transform: r ? "rotate(180deg)" : "rotate(0)"
|
|
1608
|
+
},
|
|
1609
|
+
children: /* @__PURE__ */ n("path", { d: "m6 9 6 6 6-6" })
|
|
1610
|
+
}
|
|
1611
|
+
), J = $ ? [x ? o(64) : null, "minmax(0,1fr)", M || I ? "auto" : null, o(20)] : [
|
|
1612
|
+
x ? o(a ? 80 : 60) : null,
|
|
1613
|
+
"minmax(0,1fr) auto minmax(0,1fr)",
|
|
1614
|
+
L ? o(300) : null,
|
|
1615
|
+
o(20)
|
|
1616
|
+
], H = /* @__PURE__ */ g(fe, { children: [
|
|
1617
|
+
x ? /* @__PURE__ */ g("div", { css: F.railStack, children: [
|
|
1618
|
+
/* @__PURE__ */ n("div", { css: F.railTime, children: p }),
|
|
1619
|
+
k
|
|
1620
|
+
] }) : null,
|
|
1621
|
+
/* @__PURE__ */ n("div", { css: F.stack, children: [e.home.id, e.away.id].map((O, re) => /* @__PURE__ */ g("div", { css: F.line, children: [
|
|
1622
|
+
/* @__PURE__ */ n(V, { url: c.logo(O), size: 20 }),
|
|
1623
|
+
A(O, re === 0 ? w : y, re === 0 ? y : w, !1)
|
|
1624
|
+
] }, O)) }),
|
|
1625
|
+
I ?? (M ? /* @__PURE__ */ n("div", { css: F.scoreStack, children: [
|
|
1626
|
+
[f, w],
|
|
1627
|
+
[S, y]
|
|
1628
|
+
].map(([O, re], ge) => /* @__PURE__ */ n("div", { css: F.scoreLine, children: /* @__PURE__ */ n(C, { size: 15, weight: 700, color: h && !_ && !re ? i.dim : i.text, children: O }) }, ge)) }) : null),
|
|
1629
|
+
G,
|
|
1630
|
+
z ? /* @__PURE__ */ n(
|
|
1631
|
+
"div",
|
|
1632
|
+
{
|
|
1633
|
+
...U,
|
|
1634
|
+
css: F.oddsStacked,
|
|
1635
|
+
style: { gridColumn: `${x ? 2 : 1} / -1` },
|
|
1636
|
+
children: /* @__PURE__ */ n("div", { css: F.oddsBelowInner, children: z })
|
|
1637
|
+
}
|
|
1638
|
+
) : null
|
|
1639
|
+
] }), le = /* @__PURE__ */ g(fe, { children: [
|
|
1640
|
+
x ? /* @__PURE__ */ g("div", { css: F.rail, children: [
|
|
1641
|
+
p,
|
|
1642
|
+
k
|
|
1643
|
+
] }) : null,
|
|
1644
|
+
/* @__PURE__ */ g("div", { css: F.home, children: [
|
|
1645
|
+
A(e.home.id, w, y, !0),
|
|
1646
|
+
/* @__PURE__ */ n(V, { url: c.logo(e.home.id), size: 24 })
|
|
1647
|
+
] }),
|
|
1648
|
+
/* @__PURE__ */ g("div", { css: F.scoreColumn, children: [
|
|
1649
|
+
I ?? /* @__PURE__ */ n(
|
|
1650
|
+
C,
|
|
1651
|
+
{
|
|
1652
|
+
size: 15,
|
|
1653
|
+
weight: 700,
|
|
1654
|
+
color: i.text,
|
|
1655
|
+
css: M ? F.score.filled : F.score.empty,
|
|
1656
|
+
children: M ? `${f} : ${S}` : "–"
|
|
1657
|
+
}
|
|
1658
|
+
),
|
|
1659
|
+
M && e.halfTime ? /* @__PURE__ */ n(C, { size: 10, font: "secondary", color: i.dim, style: { marginTop: o(2, 10) }, children: `(${e.halfTime[0]}:${e.halfTime[1]})` }) : null
|
|
1660
|
+
] }),
|
|
1661
|
+
/* @__PURE__ */ g("div", { css: F.away, children: [
|
|
1662
|
+
/* @__PURE__ */ n(V, { url: c.logo(e.away.id), size: 24 }),
|
|
1663
|
+
A(e.away.id, y, w, !1)
|
|
1664
|
+
] }),
|
|
1665
|
+
L ? /* @__PURE__ */ n("div", { ...U, css: F.oddsInline, children: z }) : null,
|
|
1666
|
+
G,
|
|
1667
|
+
z && !L ? /* @__PURE__ */ n(
|
|
1668
|
+
"div",
|
|
1500
1669
|
{
|
|
1501
|
-
...
|
|
1670
|
+
...U,
|
|
1671
|
+
css: F.oddsBelow,
|
|
1672
|
+
style: { gridColumn: x ? "2 / 5" : "1 / 4" },
|
|
1673
|
+
children: /* @__PURE__ */ n("div", { css: F.oddsBelowInner, children: z })
|
|
1674
|
+
}
|
|
1675
|
+
) : null
|
|
1676
|
+
] });
|
|
1677
|
+
return /* @__PURE__ */ g("div", { css: F.item, children: [
|
|
1678
|
+
/* @__PURE__ */ n(
|
|
1679
|
+
"div",
|
|
1680
|
+
{
|
|
1681
|
+
...E ? {
|
|
1502
1682
|
role: "button",
|
|
1503
|
-
"aria-expanded":
|
|
1683
|
+
"aria-expanded": r,
|
|
1504
1684
|
tabIndex: 0,
|
|
1505
|
-
onClick:
|
|
1506
|
-
onKeyDown: (
|
|
1507
|
-
(
|
|
1685
|
+
onClick: l,
|
|
1686
|
+
onKeyDown: (O) => {
|
|
1687
|
+
(O.key === "Enter" || O.key === " ") && (O.preventDefault(), l());
|
|
1508
1688
|
}
|
|
1509
1689
|
} : {},
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
O ? n(h ? 80 : 60) : null,
|
|
1514
|
-
"minmax(0,1fr) auto minmax(0,1fr)",
|
|
1515
|
-
E ? n(300) : null,
|
|
1516
|
-
n(20)
|
|
1517
|
-
].filter(Boolean).join(" "),
|
|
1518
|
-
alignItems: "center",
|
|
1519
|
-
columnGap: n(8),
|
|
1520
|
-
rowGap: n(6),
|
|
1521
|
-
// Minus the 3px accent border, so the rail lines up with the day header's text.
|
|
1522
|
-
padding: `${n(6)} ${n(16)} ${n(6)} calc(${n(16)} - 3px)`,
|
|
1523
|
-
cursor: M ? "pointer" : "default",
|
|
1524
|
-
backgroundColor: o ? i.onSurface : "transparent",
|
|
1525
|
-
borderLeft: `3px solid ${C ? i.danger : "transparent"}`,
|
|
1526
|
-
// Not onSurface: that is the day-header fill, so a hovered row would merge into it.
|
|
1527
|
-
...M ? {
|
|
1528
|
-
"&:hover": {
|
|
1529
|
-
backgroundColor: o ? i.onSurface : i.tint
|
|
1530
|
-
}
|
|
1531
|
-
} : {}
|
|
1532
|
-
},
|
|
1533
|
-
children: [
|
|
1534
|
-
O ? /* @__PURE__ */ y(
|
|
1535
|
-
m,
|
|
1536
|
-
{
|
|
1537
|
-
sx: {
|
|
1538
|
-
display: "flex",
|
|
1539
|
-
alignItems: "center",
|
|
1540
|
-
gap: n(6),
|
|
1541
|
-
whiteSpace: "nowrap"
|
|
1542
|
-
},
|
|
1543
|
-
children: [
|
|
1544
|
-
C ? /* @__PURE__ */ r(
|
|
1545
|
-
m,
|
|
1546
|
-
{
|
|
1547
|
-
component: "span",
|
|
1548
|
-
sx: {
|
|
1549
|
-
width: n(7),
|
|
1550
|
-
height: n(7),
|
|
1551
|
-
borderRadius: "50%",
|
|
1552
|
-
backgroundColor: i.danger,
|
|
1553
|
-
animation: "cs-pulse 1s ease-in-out infinite"
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
) : null,
|
|
1557
|
-
/* @__PURE__ */ r(
|
|
1558
|
-
w,
|
|
1559
|
-
{
|
|
1560
|
-
size: 13,
|
|
1561
|
-
font: "secondary",
|
|
1562
|
-
weight: 700,
|
|
1563
|
-
color: C ? i.danger : i.text,
|
|
1564
|
-
children: _
|
|
1565
|
-
}
|
|
1566
|
-
),
|
|
1567
|
-
h && e.status === "UPCOMING" ? /* @__PURE__ */ r(
|
|
1568
|
-
m,
|
|
1569
|
-
{
|
|
1570
|
-
component: "button",
|
|
1571
|
-
type: "button",
|
|
1572
|
-
"aria-label": l("watchOnTv"),
|
|
1573
|
-
title: l("watchOnTv"),
|
|
1574
|
-
onClick: (P) => {
|
|
1575
|
-
P.stopPropagation(), h(e.id);
|
|
1576
|
-
},
|
|
1577
|
-
onKeyDown: (P) => P.stopPropagation(),
|
|
1578
|
-
sx: {
|
|
1579
|
-
display: "inline-flex",
|
|
1580
|
-
alignItems: "center",
|
|
1581
|
-
justifyContent: "center",
|
|
1582
|
-
padding: 0,
|
|
1583
|
-
border: "none",
|
|
1584
|
-
background: "transparent",
|
|
1585
|
-
cursor: "pointer",
|
|
1586
|
-
fontSize: n(16),
|
|
1587
|
-
color: i.dim,
|
|
1588
|
-
"&:hover": { color: i.primary }
|
|
1589
|
-
},
|
|
1590
|
-
children: /* @__PURE__ */ r(kt, { size: "1em", "aria-hidden": !0 })
|
|
1591
|
-
}
|
|
1592
|
-
) : null
|
|
1593
|
-
]
|
|
1594
|
-
}
|
|
1595
|
-
) : null,
|
|
1596
|
-
/* @__PURE__ */ y(
|
|
1597
|
-
m,
|
|
1598
|
-
{
|
|
1599
|
-
sx: {
|
|
1600
|
-
display: "flex",
|
|
1601
|
-
alignItems: "center",
|
|
1602
|
-
justifyContent: "flex-end",
|
|
1603
|
-
gap: n(8),
|
|
1604
|
-
minWidth: 0
|
|
1605
|
-
},
|
|
1606
|
-
children: [
|
|
1607
|
-
T(e.home.id, $, S, !0),
|
|
1608
|
-
/* @__PURE__ */ r(H, { url: c.logo(e.home.id), size: 24 })
|
|
1609
|
-
]
|
|
1610
|
-
}
|
|
1611
|
-
),
|
|
1612
|
-
/* @__PURE__ */ y(
|
|
1613
|
-
m,
|
|
1614
|
-
{
|
|
1615
|
-
sx: {
|
|
1616
|
-
display: "flex",
|
|
1617
|
-
flexDirection: "column",
|
|
1618
|
-
alignItems: "center",
|
|
1619
|
-
minWidth: n(56)
|
|
1620
|
-
},
|
|
1621
|
-
children: [
|
|
1622
|
-
k && e.notPlayedReason ? /* @__PURE__ */ r(
|
|
1623
|
-
w,
|
|
1624
|
-
{
|
|
1625
|
-
size: 11,
|
|
1626
|
-
font: "secondary",
|
|
1627
|
-
weight: 700,
|
|
1628
|
-
upper: !0,
|
|
1629
|
-
color: i.dim,
|
|
1630
|
-
sx: {
|
|
1631
|
-
backgroundColor: i.onSurface,
|
|
1632
|
-
borderRadius: a.sm,
|
|
1633
|
-
padding: `${n(5, 11)} ${n(8, 11)}`,
|
|
1634
|
-
whiteSpace: "nowrap"
|
|
1635
|
-
},
|
|
1636
|
-
children: l(e.notPlayedReason)
|
|
1637
|
-
}
|
|
1638
|
-
) : /* @__PURE__ */ r(
|
|
1639
|
-
w,
|
|
1640
|
-
{
|
|
1641
|
-
size: 15,
|
|
1642
|
-
weight: 700,
|
|
1643
|
-
color: i.text,
|
|
1644
|
-
sx: {
|
|
1645
|
-
letterSpacing: n(1, 15),
|
|
1646
|
-
backgroundColor: f || C ? i.onSurface : "transparent",
|
|
1647
|
-
borderRadius: a.sm,
|
|
1648
|
-
padding: `${n(3, 15)} ${n(8, 15)}`,
|
|
1649
|
-
whiteSpace: "nowrap"
|
|
1650
|
-
},
|
|
1651
|
-
children: f || C ? `${b} : ${g}` : "–"
|
|
1652
|
-
}
|
|
1653
|
-
),
|
|
1654
|
-
(f || C) && e.halfTime ? /* @__PURE__ */ r(
|
|
1655
|
-
w,
|
|
1656
|
-
{
|
|
1657
|
-
size: 10,
|
|
1658
|
-
font: "secondary",
|
|
1659
|
-
color: i.dim,
|
|
1660
|
-
sx: { marginTop: n(2, 10) },
|
|
1661
|
-
children: `(${e.halfTime[0]}:${e.halfTime[1]})`
|
|
1662
|
-
}
|
|
1663
|
-
) : null
|
|
1664
|
-
]
|
|
1665
|
-
}
|
|
1666
|
-
),
|
|
1667
|
-
/* @__PURE__ */ y(
|
|
1668
|
-
m,
|
|
1669
|
-
{
|
|
1670
|
-
sx: {
|
|
1671
|
-
display: "flex",
|
|
1672
|
-
alignItems: "center",
|
|
1673
|
-
gap: n(8),
|
|
1674
|
-
minWidth: 0
|
|
1675
|
-
},
|
|
1676
|
-
children: [
|
|
1677
|
-
/* @__PURE__ */ r(H, { url: c.logo(e.away.id), size: 24 }),
|
|
1678
|
-
T(e.away.id, S, $, !1)
|
|
1679
|
-
]
|
|
1680
|
-
}
|
|
1681
|
-
),
|
|
1682
|
-
E ? /* @__PURE__ */ r(m, { ...z, sx: { minWidth: 0, cursor: "default" }, children: A }) : null,
|
|
1683
|
-
/* @__PURE__ */ r(
|
|
1684
|
-
m,
|
|
1685
|
-
{
|
|
1686
|
-
component: "svg",
|
|
1687
|
-
viewBox: "0 0 24 24",
|
|
1688
|
-
fill: "none",
|
|
1689
|
-
stroke: "currentColor",
|
|
1690
|
-
strokeWidth: "2",
|
|
1691
|
-
strokeLinecap: "round",
|
|
1692
|
-
strokeLinejoin: "round",
|
|
1693
|
-
sx: {
|
|
1694
|
-
width: n(16),
|
|
1695
|
-
height: n(16),
|
|
1696
|
-
color: i.dim,
|
|
1697
|
-
// Hidden, not removed, so the teams stay aligned with the expandable rows.
|
|
1698
|
-
visibility: M ? "visible" : "hidden",
|
|
1699
|
-
transform: o ? "rotate(180deg)" : "rotate(0)",
|
|
1700
|
-
transition: "transform .2s"
|
|
1701
|
-
},
|
|
1702
|
-
children: /* @__PURE__ */ r("path", { d: "m6 9 6 6 6-6" })
|
|
1703
|
-
}
|
|
1704
|
-
),
|
|
1705
|
-
A && !E ? /* @__PURE__ */ r(
|
|
1706
|
-
m,
|
|
1707
|
-
{
|
|
1708
|
-
...z,
|
|
1709
|
-
sx: {
|
|
1710
|
-
gridColumn: O ? "2 / 5" : "1 / 4",
|
|
1711
|
-
display: "flex",
|
|
1712
|
-
justifyContent: "center",
|
|
1713
|
-
cursor: "default"
|
|
1714
|
-
},
|
|
1715
|
-
children: /* @__PURE__ */ r(m, { sx: { width: "100%", maxWidth: n(300) }, children: A })
|
|
1716
|
-
}
|
|
1717
|
-
) : null
|
|
1718
|
-
]
|
|
1690
|
+
css: _t[`${+E}${+b}`],
|
|
1691
|
+
style: { gridTemplateColumns: J.filter(Boolean).join(" ") },
|
|
1692
|
+
children: $ ? H : le
|
|
1719
1693
|
}
|
|
1720
1694
|
),
|
|
1721
|
-
|
|
1722
|
-
m,
|
|
1723
|
-
{
|
|
1724
|
-
sx: {
|
|
1725
|
-
padding: `${n(6)} ${n(16)} ${n(16)}`,
|
|
1726
|
-
display: "flex",
|
|
1727
|
-
flexDirection: "column",
|
|
1728
|
-
gap: n(14),
|
|
1729
|
-
backgroundColor: i.onSurface,
|
|
1730
|
-
borderTop: `1px solid ${i.border}`
|
|
1731
|
-
},
|
|
1732
|
-
children: f || C ? /* @__PURE__ */ r(po, { match: e }) : /* @__PURE__ */ r(ho, { match: e })
|
|
1733
|
-
}
|
|
1734
|
-
) : null
|
|
1695
|
+
r && E ? /* @__PURE__ */ n("div", { css: F.detail, children: h || b ? /* @__PURE__ */ n(Do, { match: e }) : /* @__PURE__ */ n(Wo, { match: e }) }) : null
|
|
1735
1696
|
] });
|
|
1736
|
-
},
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1697
|
+
}, dt = (e, t) => e.start.localeCompare(t.start), Go = (e) => e.status === "UPCOMING" || e.status === "LIVE", ut = (e) => d({
|
|
1698
|
+
border: "none",
|
|
1699
|
+
cursor: "pointer",
|
|
1700
|
+
borderRadius: i.radiusFull,
|
|
1701
|
+
padding: `${o(7, 13)} ${o(14, 13)}`,
|
|
1702
|
+
fontFamily: i.fontPrimary,
|
|
1703
|
+
fontSize: o(13),
|
|
1704
|
+
fontWeight: 700,
|
|
1705
|
+
backgroundColor: e ? i.surface : "transparent",
|
|
1706
|
+
color: e ? i.text : i.dim,
|
|
1707
|
+
boxShadow: e ? "0 1px 2px rgba(0,0,0,.12)" : "none"
|
|
1708
|
+
}), pt = (e) => d({
|
|
1709
|
+
flexShrink: 0,
|
|
1710
|
+
border: "none",
|
|
1711
|
+
cursor: "pointer",
|
|
1712
|
+
borderRadius: i.radiusFull,
|
|
1713
|
+
padding: `${o(6, 12)} ${o(12, 12)}`,
|
|
1714
|
+
fontFamily: i.fontPrimary,
|
|
1715
|
+
fontSize: o(12),
|
|
1716
|
+
fontWeight: 700,
|
|
1717
|
+
lineHeight: 1,
|
|
1718
|
+
textTransform: "uppercase",
|
|
1719
|
+
letterSpacing: "0.025em",
|
|
1720
|
+
whiteSpace: "nowrap",
|
|
1721
|
+
unicodeBidi: "plaintext",
|
|
1722
|
+
backgroundColor: e ? i.primary : "transparent",
|
|
1723
|
+
color: e ? i.onPrimary : i.dim,
|
|
1724
|
+
"&:hover": e ? {} : { backgroundColor: i.variant, color: i.primary }
|
|
1725
|
+
}), mt = (e) => d({
|
|
1726
|
+
flexShrink: 0,
|
|
1727
|
+
border: `1px solid ${e ? i.primary : i.border}`,
|
|
1728
|
+
cursor: "pointer",
|
|
1729
|
+
borderRadius: i.radiusFull,
|
|
1730
|
+
padding: `${o(5, 12)} ${o(12, 12)}`,
|
|
1731
|
+
fontFamily: i.fontSecondary,
|
|
1732
|
+
fontSize: o(12),
|
|
1733
|
+
fontWeight: 700,
|
|
1734
|
+
backgroundColor: e ? i.primary : i.surface,
|
|
1735
|
+
color: e ? i.onPrimary : i.body,
|
|
1736
|
+
whiteSpace: "nowrap"
|
|
1737
|
+
}), Q = {
|
|
1738
|
+
root: d(me, { overflow: "hidden" }),
|
|
1739
|
+
toolbar: d({
|
|
1740
|
+
display: "flex",
|
|
1741
|
+
alignItems: "center",
|
|
1742
|
+
justifyContent: "space-between",
|
|
1743
|
+
gap: o(12),
|
|
1744
|
+
padding: `${o(12)} ${o(16)}`,
|
|
1745
|
+
borderBottom: `1px solid ${i.border}`,
|
|
1746
|
+
flexWrap: "wrap"
|
|
1747
|
+
}),
|
|
1748
|
+
tabs: d({
|
|
1749
|
+
display: "flex",
|
|
1750
|
+
gap: o(4),
|
|
1751
|
+
padding: o(3),
|
|
1752
|
+
backgroundColor: i.onSurface,
|
|
1753
|
+
borderRadius: i.radiusFull
|
|
1754
|
+
}),
|
|
1755
|
+
tab: { on: ut(!0), off: ut(!1) },
|
|
1756
|
+
stage: { on: pt(!0), off: pt(!1) },
|
|
1757
|
+
round: { on: mt(!0), off: mt(!1) },
|
|
1758
|
+
day: d({
|
|
1759
|
+
padding: `${o(8, 11)} ${o(16, 11)} ${o(4, 11)}`,
|
|
1760
|
+
backgroundColor: i.onSurface
|
|
1761
|
+
}),
|
|
1762
|
+
empty: d({ padding: o(24, 14), textAlign: "center" })
|
|
1763
|
+
}, Ho = () => {
|
|
1764
|
+
var Ne, Ge, He, je, Ue, Ve;
|
|
1765
|
+
const { sdk: e, data: t, entities: r, label: l, fmt: c, props: s } = oe(), [m, u] = P.useState("upcoming"), [a, h] = P.useState(null), [b, f] = P.useState(null), [S, w] = P.useState(null), [y, _] = P.useState(null), [D, E] = P.useState(null), x = m === "upcoming", R = (v) => Go(v) === x, $ = t.matches.filter(R).sort(dt), W = t.stages.filter(
|
|
1766
|
+
(v) => $.some((N) => N.stageId === v.id)
|
|
1767
|
+
), L = x ? W : [...W].reverse(), z = L.length > 1, U = x ? a : b, A = (Ne = x ? $[0] : $[$.length - 1]) == null ? void 0 : Ne.stageId, M = z ? L.some((v) => v.id === U) ? U : A ?? L[0].id : null, p = (v) => !z || v.stageId === M, k = Array.from(
|
|
1768
|
+
new Set($.filter(p).map((v) => v.round))
|
|
1769
|
+
).sort((v, N) => v - N), I = x ? k : [...k].reverse(), G = x ? S : y, J = G !== null && k.includes(G) ? G : x ? k[0] : k[k.length - 1], H = t.matches.filter((v) => v.round === J && p(v)).sort(dt), le = H.filter(R), ye = P.useMemo(
|
|
1770
|
+
() => le.filter((v) => v.status === "UPCOMING" || v.status === "LIVE").map((v) => v.id),
|
|
1771
|
+
[le]
|
|
1772
|
+
), { odds: be } = Kt(e, ye, {
|
|
1773
|
+
enabled: s.showOdds ?? !1,
|
|
1774
|
+
markets: [((Ge = s.odds) == null ? void 0 : Ge.market) ?? "FT_1X2"],
|
|
1775
|
+
sport: t.sport,
|
|
1776
|
+
pollingIntervalMs: (He = s.odds) == null ? void 0 : He.pollingInterval,
|
|
1777
|
+
operators: (je = s.odds) == null ? void 0 : je.operators,
|
|
1778
|
+
affiliateId: (Ue = s.odds) == null ? void 0 : Ue.affiliateId,
|
|
1779
|
+
affiliateIds: (Ve = s.odds) == null ? void 0 : Ve.affiliateIds
|
|
1780
|
+
}), he = (v) => c.date(v, { day: "numeric", month: "short" }), we = H.length ? l("roundSummary", {
|
|
1781
|
+
from: he(H[0].start),
|
|
1782
|
+
to: he(H[H.length - 1].start),
|
|
1783
|
+
matches: l("matchesCount", { count: H.length })
|
|
1784
|
+
}) : "", ce = [];
|
|
1785
|
+
le.forEach((v) => {
|
|
1786
|
+
const N = c.date(v.start, {
|
|
1760
1787
|
weekday: "long",
|
|
1761
1788
|
day: "numeric",
|
|
1762
1789
|
month: "long"
|
|
1763
|
-
}),
|
|
1764
|
-
|
|
1790
|
+
}), Ke = ce.find((Rt) => Rt.label === N);
|
|
1791
|
+
Ke ? Ke.rows.push(v) : ce.push({ label: N, rows: [v] });
|
|
1765
1792
|
});
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1768
|
-
},
|
|
1769
|
-
|
|
1770
|
-
},
|
|
1771
|
-
|
|
1772
|
-
},
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
boxShadow: D ? "0 1px 2px rgba(0,0,0,.12)" : "none"
|
|
1791
|
-
},
|
|
1792
|
-
children: c(x)
|
|
1793
|
-
}
|
|
1794
|
-
);
|
|
1795
|
-
};
|
|
1796
|
-
return /* @__PURE__ */ y(Z, { sx: { overflow: "hidden" }, children: [
|
|
1797
|
-
/* @__PURE__ */ y(
|
|
1798
|
-
m,
|
|
1799
|
-
{
|
|
1800
|
-
sx: {
|
|
1801
|
-
display: "flex",
|
|
1802
|
-
alignItems: "center",
|
|
1803
|
-
justifyContent: "space-between",
|
|
1804
|
-
gap: n(12),
|
|
1805
|
-
padding: `${n(12)} ${n(16)}`,
|
|
1806
|
-
borderBottom: `1px solid ${e.border}`,
|
|
1807
|
-
flexWrap: "wrap"
|
|
1808
|
-
},
|
|
1809
|
-
children: [
|
|
1810
|
-
/* @__PURE__ */ y(
|
|
1811
|
-
m,
|
|
1812
|
-
{
|
|
1813
|
-
sx: {
|
|
1814
|
-
display: "flex",
|
|
1815
|
-
gap: n(4),
|
|
1816
|
-
padding: n(3),
|
|
1817
|
-
backgroundColor: e.onSurface,
|
|
1818
|
-
borderRadius: t.full
|
|
1819
|
-
},
|
|
1820
|
-
children: [
|
|
1821
|
-
Se("upcoming"),
|
|
1822
|
-
Se("results")
|
|
1823
|
-
]
|
|
1824
|
-
}
|
|
1825
|
-
),
|
|
1826
|
-
/* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, children: Xe })
|
|
1827
|
-
]
|
|
1828
|
-
}
|
|
1829
|
-
),
|
|
1830
|
-
T ? (
|
|
1793
|
+
const O = (v) => {
|
|
1794
|
+
u(v), E(null);
|
|
1795
|
+
}, re = (v) => {
|
|
1796
|
+
x ? w(v) : _(v), E(null);
|
|
1797
|
+
}, ge = (v) => {
|
|
1798
|
+
x ? (h(v), w(null)) : (f(v), _(null)), E(null);
|
|
1799
|
+
}, Re = (v) => v.nameId && r.has(v.nameId) ? r.name(v.nameId) : l("stage", { number: t.stages.indexOf(v) + 1 }), Be = (v) => /* @__PURE__ */ n(
|
|
1800
|
+
"button",
|
|
1801
|
+
{
|
|
1802
|
+
type: "button",
|
|
1803
|
+
onClick: () => O(v),
|
|
1804
|
+
css: m === v ? Q.tab.on : Q.tab.off,
|
|
1805
|
+
children: l(v)
|
|
1806
|
+
}
|
|
1807
|
+
);
|
|
1808
|
+
return /* @__PURE__ */ g("div", { css: Q.root, children: [
|
|
1809
|
+
/* @__PURE__ */ g("div", { css: Q.toolbar, children: [
|
|
1810
|
+
/* @__PURE__ */ g("div", { css: Q.tabs, children: [
|
|
1811
|
+
Be("upcoming"),
|
|
1812
|
+
Be("results")
|
|
1813
|
+
] }),
|
|
1814
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", color: i.dim, children: we })
|
|
1815
|
+
] }),
|
|
1816
|
+
z ? (
|
|
1831
1817
|
// Pills styled like the Standings stage tabs.
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
"&::-webkit-scrollbar": { display: "none" }
|
|
1818
|
+
/* @__PURE__ */ n(Ae, { variant: "row", gap: 4, role: "tablist", children: L.map((v) => {
|
|
1819
|
+
const N = v.id === M;
|
|
1820
|
+
return /* @__PURE__ */ n(
|
|
1821
|
+
"button",
|
|
1822
|
+
{
|
|
1823
|
+
type: "button",
|
|
1824
|
+
role: "tab",
|
|
1825
|
+
"aria-selected": N,
|
|
1826
|
+
onClick: () => ge(v.id),
|
|
1827
|
+
css: N ? Q.stage.on : Q.stage.off,
|
|
1828
|
+
children: Re(v)
|
|
1844
1829
|
},
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
m,
|
|
1849
|
-
{
|
|
1850
|
-
component: "button",
|
|
1851
|
-
type: "button",
|
|
1852
|
-
role: "tab",
|
|
1853
|
-
"aria-selected": D,
|
|
1854
|
-
onClick: () => Qe(x.id),
|
|
1855
|
-
sx: {
|
|
1856
|
-
flexShrink: 0,
|
|
1857
|
-
border: "none",
|
|
1858
|
-
cursor: "pointer",
|
|
1859
|
-
borderRadius: t.full,
|
|
1860
|
-
padding: `${n(6, 12)} ${n(12, 12)}`,
|
|
1861
|
-
fontFamily: o.primary,
|
|
1862
|
-
fontSize: n(12),
|
|
1863
|
-
fontWeight: 700,
|
|
1864
|
-
lineHeight: 1,
|
|
1865
|
-
textTransform: "uppercase",
|
|
1866
|
-
letterSpacing: "0.025em",
|
|
1867
|
-
whiteSpace: "nowrap",
|
|
1868
|
-
unicodeBidi: "plaintext",
|
|
1869
|
-
backgroundColor: D ? e.primary : "transparent",
|
|
1870
|
-
color: D ? e.onPrimary : e.dim,
|
|
1871
|
-
"&:hover": D ? {} : { backgroundColor: e.variant, color: e.primary }
|
|
1872
|
-
},
|
|
1873
|
-
children: Ze(x)
|
|
1874
|
-
},
|
|
1875
|
-
x.id
|
|
1876
|
-
);
|
|
1877
|
-
})
|
|
1878
|
-
}
|
|
1879
|
-
)
|
|
1830
|
+
v.id
|
|
1831
|
+
);
|
|
1832
|
+
}) })
|
|
1880
1833
|
) : null,
|
|
1881
|
-
|
|
1882
|
-
|
|
1834
|
+
I.length > (z ? 1 : 0) ? /* @__PURE__ */ n(Ae, { variant: "row", gap: 6, children: I.map((v) => /* @__PURE__ */ n(
|
|
1835
|
+
"button",
|
|
1883
1836
|
{
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
const D = x === ne;
|
|
1895
|
-
return /* @__PURE__ */ r(
|
|
1896
|
-
m,
|
|
1897
|
-
{
|
|
1898
|
-
component: "button",
|
|
1899
|
-
type: "button",
|
|
1900
|
-
onClick: () => Je(x),
|
|
1901
|
-
sx: {
|
|
1902
|
-
flexShrink: 0,
|
|
1903
|
-
border: `1px solid ${D ? e.primary : e.border}`,
|
|
1904
|
-
cursor: "pointer",
|
|
1905
|
-
borderRadius: t.full,
|
|
1906
|
-
padding: `${n(5, 12)} ${n(12, 12)}`,
|
|
1907
|
-
fontFamily: o.secondary,
|
|
1908
|
-
fontSize: n(12),
|
|
1909
|
-
fontWeight: 700,
|
|
1910
|
-
backgroundColor: D ? e.primary : e.surface,
|
|
1911
|
-
color: D ? e.onPrimary : e.body,
|
|
1912
|
-
whiteSpace: "nowrap"
|
|
1913
|
-
},
|
|
1914
|
-
children: c("round", { round: x })
|
|
1915
|
-
},
|
|
1916
|
-
x
|
|
1917
|
-
);
|
|
1918
|
-
})
|
|
1919
|
-
}
|
|
1920
|
-
) : null,
|
|
1921
|
-
ue.map((x) => /* @__PURE__ */ y(L.Fragment, { children: [
|
|
1922
|
-
/* @__PURE__ */ r(
|
|
1923
|
-
w,
|
|
1837
|
+
type: "button",
|
|
1838
|
+
onClick: () => re(v),
|
|
1839
|
+
css: v === J ? Q.round.on : Q.round.off,
|
|
1840
|
+
children: l("round", { round: v })
|
|
1841
|
+
},
|
|
1842
|
+
v
|
|
1843
|
+
)) }) : null,
|
|
1844
|
+
ce.map((v) => /* @__PURE__ */ g(P.Fragment, { children: [
|
|
1845
|
+
/* @__PURE__ */ n(
|
|
1846
|
+
C,
|
|
1924
1847
|
{
|
|
1925
1848
|
component: "div",
|
|
1926
1849
|
size: 11,
|
|
1927
1850
|
font: "secondary",
|
|
1928
1851
|
weight: 700,
|
|
1929
1852
|
upper: !0,
|
|
1930
|
-
color:
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
backgroundColor: e.onSurface
|
|
1934
|
-
},
|
|
1935
|
-
children: x.label
|
|
1853
|
+
color: i.dim,
|
|
1854
|
+
css: Q.day,
|
|
1855
|
+
children: v.label
|
|
1936
1856
|
}
|
|
1937
1857
|
),
|
|
1938
|
-
|
|
1939
|
-
|
|
1858
|
+
v.rows.map((N) => /* @__PURE__ */ n(
|
|
1859
|
+
No,
|
|
1940
1860
|
{
|
|
1941
|
-
match:
|
|
1942
|
-
odds:
|
|
1943
|
-
open:
|
|
1944
|
-
onToggle: () =>
|
|
1861
|
+
match: N,
|
|
1862
|
+
odds: be.get(N.id) ?? null,
|
|
1863
|
+
open: D === N.id,
|
|
1864
|
+
onToggle: () => E(D === N.id ? null : N.id)
|
|
1945
1865
|
},
|
|
1946
|
-
|
|
1866
|
+
N.id
|
|
1947
1867
|
))
|
|
1948
|
-
] },
|
|
1949
|
-
|
|
1950
|
-
|
|
1868
|
+
] }, v.label)),
|
|
1869
|
+
le.length === 0 ? /* @__PURE__ */ n(
|
|
1870
|
+
C,
|
|
1951
1871
|
{
|
|
1952
1872
|
component: "div",
|
|
1953
1873
|
size: 14,
|
|
1954
1874
|
font: "secondary",
|
|
1955
|
-
color:
|
|
1956
|
-
|
|
1957
|
-
children:
|
|
1875
|
+
color: i.dim,
|
|
1876
|
+
css: Q.empty,
|
|
1877
|
+
children: $.length > 0 ? l("noMatches") : l(x ? "noUpcomingMatches" : "noResultsYet")
|
|
1958
1878
|
}
|
|
1959
1879
|
) : null
|
|
1960
1880
|
] });
|
|
1961
|
-
},
|
|
1962
|
-
|
|
1963
|
-
{
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1881
|
+
}, ht = ["1-15'", "16-30'", "31-45'", "46-60'", "61-75'", "76-90'"], Le = d({
|
|
1882
|
+
display: "grid",
|
|
1883
|
+
gridTemplateColumns: `repeat(auto-fit,minmax(${o(280)},1fr))`,
|
|
1884
|
+
gap: o(12)
|
|
1885
|
+
}), Ce = (e, t, r) => d(me, Oe, {
|
|
1886
|
+
padding: e,
|
|
1887
|
+
display: "flex",
|
|
1888
|
+
...t ? { flexDirection: "column", gap: o(8) } : { alignItems: "center", gap: o(10) },
|
|
1889
|
+
cursor: r ? "pointer" : "default",
|
|
1890
|
+
"&:hover": { backgroundColor: r ? i.onSurface : i.surface }
|
|
1891
|
+
}), gt = `${o(12)} ${o(14)}`, ft = `${o(12)} ${o(16)}`, T = {
|
|
1892
|
+
section: d({ display: "flex", flexDirection: "column", gap: o(12) }),
|
|
1893
|
+
panel: d(me, {
|
|
1894
|
+
padding: `${o(14)} ${o(16)}`,
|
|
1895
|
+
display: "flex",
|
|
1896
|
+
flexDirection: "column",
|
|
1897
|
+
gap: o(10)
|
|
1898
|
+
}),
|
|
1899
|
+
bar: d({ display: "flex", borderRadius: i.radiusFull, overflow: "hidden", gap: "2px" }),
|
|
1900
|
+
tile: d({
|
|
1901
|
+
backgroundColor: i.onSurface,
|
|
1902
|
+
borderRadius: `calc(${i.radiusMd} - 2px)`,
|
|
1903
|
+
padding: o(12),
|
|
1904
|
+
display: "flex",
|
|
1905
|
+
alignItems: "center",
|
|
1906
|
+
gap: o(10)
|
|
1907
|
+
}),
|
|
1908
|
+
tileIcon: d({
|
|
1909
|
+
width: o(34),
|
|
1910
|
+
height: o(34),
|
|
1911
|
+
borderRadius: "50%",
|
|
1912
|
+
backgroundColor: i.tint,
|
|
1913
|
+
color: i.primary,
|
|
1914
|
+
display: "flex",
|
|
1915
|
+
alignItems: "center",
|
|
1916
|
+
justifyContent: "center",
|
|
1917
|
+
flexShrink: 0,
|
|
1918
|
+
"& svg": { width: o(18), height: o(18) }
|
|
1919
|
+
}),
|
|
1920
|
+
kpis: d({
|
|
1921
|
+
display: "grid",
|
|
1922
|
+
gridTemplateColumns: `repeat(auto-fit,minmax(${o(150)},1fr))`,
|
|
1923
|
+
gap: o(12)
|
|
1924
|
+
}),
|
|
1925
|
+
kpi: d(me, {
|
|
1926
|
+
padding: `${o(14)} ${o(16)}`,
|
|
1927
|
+
display: "flex",
|
|
1928
|
+
flexDirection: "column",
|
|
1929
|
+
gap: o(4)
|
|
1930
|
+
}),
|
|
1931
|
+
outcomes: d({ display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: o(8) }),
|
|
1932
|
+
outcome: d({
|
|
1933
|
+
display: "flex",
|
|
1934
|
+
flexDirection: "column",
|
|
1935
|
+
gap: o(2),
|
|
1936
|
+
textAlign: "left",
|
|
1937
|
+
borderLeft: "3px solid var(--fu-ucrc-cs-accent)",
|
|
1938
|
+
paddingLeft: o(8)
|
|
1939
|
+
}),
|
|
1940
|
+
timingHeader: d({
|
|
1941
|
+
display: "flex",
|
|
1942
|
+
justifyContent: "space-between",
|
|
1943
|
+
alignItems: "baseline",
|
|
1944
|
+
gap: o(8)
|
|
1945
|
+
}),
|
|
1946
|
+
strong: d({ color: i.text }),
|
|
1947
|
+
periods: d({
|
|
1948
|
+
display: "grid",
|
|
1949
|
+
gridTemplateColumns: "repeat(6,1fr)",
|
|
1950
|
+
gap: o(6),
|
|
1951
|
+
alignItems: "end",
|
|
1952
|
+
height: o(72)
|
|
1953
|
+
}),
|
|
1954
|
+
period: d({
|
|
1955
|
+
display: "flex",
|
|
1956
|
+
flexDirection: "column",
|
|
1957
|
+
alignItems: "center",
|
|
1958
|
+
gap: o(3),
|
|
1959
|
+
height: "100%",
|
|
1960
|
+
justifyContent: "flex-end"
|
|
1961
|
+
}),
|
|
1962
|
+
periodBar: d({ width: "100%", borderRadius: `${i.radiusXs} ${i.radiusXs} 0 0` }),
|
|
1963
|
+
periodLabels: d({ display: "grid", gridTemplateColumns: "repeat(6,1fr)", gap: o(6) }),
|
|
1964
|
+
over: d({
|
|
1965
|
+
display: "grid",
|
|
1966
|
+
gridTemplateColumns: `${o(150)} 1fr ${o(44)}`,
|
|
1967
|
+
alignItems: "center",
|
|
1968
|
+
gap: o(10)
|
|
1969
|
+
}),
|
|
1970
|
+
overTrack: d({
|
|
1971
|
+
height: o(8),
|
|
1972
|
+
borderRadius: i.radiusFull,
|
|
1973
|
+
backgroundColor: i.variant,
|
|
1974
|
+
overflow: "hidden"
|
|
1975
|
+
}),
|
|
1976
|
+
overFill: d({ height: "100%", backgroundColor: i.primary, borderRadius: i.radiusFull }),
|
|
1977
|
+
alignRight: d({ textAlign: "right" }),
|
|
1978
|
+
averages: d({ display: "grid", gridTemplateColumns: "repeat(2,1fr)", gap: o(8) }),
|
|
1979
|
+
halves: d({ display: "flex", alignItems: "baseline", gap: o(4) }),
|
|
1980
|
+
totalCards: d({
|
|
1981
|
+
display: "flex",
|
|
1982
|
+
alignItems: "center",
|
|
1983
|
+
justifyContent: "space-between",
|
|
1984
|
+
gap: o(12),
|
|
1985
|
+
borderTop: `1px solid ${i.border}`,
|
|
1986
|
+
paddingTop: o(12),
|
|
1987
|
+
flexWrap: "wrap"
|
|
1988
|
+
}),
|
|
1989
|
+
cardCounts: d({ display: "flex", gap: o(20) }),
|
|
1990
|
+
cardCount: d({ display: "flex", alignItems: "center", gap: o(10) }),
|
|
1991
|
+
cardIcon: d({ position: "relative", width: o(22), height: o(26), flexShrink: 0 }),
|
|
1992
|
+
cardBack: d({
|
|
1993
|
+
position: "absolute",
|
|
1994
|
+
left: 0,
|
|
1995
|
+
top: o(4),
|
|
1996
|
+
width: o(14),
|
|
1997
|
+
height: o(20),
|
|
1998
|
+
borderRadius: "3px",
|
|
1999
|
+
opacity: 0.45,
|
|
2000
|
+
transform: "rotate(-12deg)"
|
|
2001
|
+
}),
|
|
2002
|
+
cardFront: d({
|
|
2003
|
+
position: "absolute",
|
|
2004
|
+
left: o(6),
|
|
2005
|
+
top: 0,
|
|
2006
|
+
width: o(14),
|
|
2007
|
+
height: o(20),
|
|
2008
|
+
borderRadius: "3px",
|
|
2009
|
+
boxShadow: "0 1px 3px rgba(0,0,0,.2)"
|
|
2010
|
+
}),
|
|
2011
|
+
callouts: d({
|
|
2012
|
+
display: "grid",
|
|
2013
|
+
gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
|
|
2014
|
+
gap: o(12)
|
|
2015
|
+
}),
|
|
2016
|
+
callout: {
|
|
2017
|
+
interactive: Ce(gt, !1, !0),
|
|
2018
|
+
plain: Ce(gt, !1, !1)
|
|
2019
|
+
},
|
|
2020
|
+
calloutText: d({ minWidth: 0, flex: 1 }),
|
|
2021
|
+
calloutValue: d({ textAlign: "right", flexShrink: 0 }),
|
|
2022
|
+
record: {
|
|
2023
|
+
interactive: Ce(ft, !0, !0),
|
|
2024
|
+
plain: Ce(ft, !0, !1)
|
|
2025
|
+
},
|
|
2026
|
+
recordTeams: d({
|
|
2027
|
+
display: "grid",
|
|
2028
|
+
gridTemplateColumns: "minmax(0,1fr) auto minmax(0,1fr)",
|
|
2029
|
+
alignItems: "center",
|
|
2030
|
+
gap: o(8)
|
|
2031
|
+
}),
|
|
2032
|
+
recordHome: d({
|
|
2033
|
+
display: "flex",
|
|
2034
|
+
alignItems: "center",
|
|
2035
|
+
justifyContent: "flex-end",
|
|
2036
|
+
gap: o(8),
|
|
2037
|
+
minWidth: 0
|
|
2038
|
+
}),
|
|
2039
|
+
recordAway: d({ display: "flex", alignItems: "center", gap: o(8), minWidth: 0 }),
|
|
2040
|
+
recordScore: d({
|
|
2041
|
+
letterSpacing: o(1, 18),
|
|
2042
|
+
backgroundColor: i.onSurface,
|
|
2043
|
+
borderRadius: i.radiusSm,
|
|
2044
|
+
padding: `${o(4, 18)} ${o(10, 18)}`
|
|
2045
|
+
})
|
|
2046
|
+
}, xe = ({ children: e }) => /* @__PURE__ */ n("div", { css: T.panel, children: e }), yt = ({
|
|
1973
2047
|
widths: e,
|
|
1974
2048
|
height: t
|
|
1975
|
-
}) => {
|
|
1976
|
-
const { radius: o } = F();
|
|
1977
|
-
return /* @__PURE__ */ r(
|
|
1978
|
-
m,
|
|
1979
|
-
{
|
|
1980
|
-
sx: {
|
|
1981
|
-
display: "flex",
|
|
1982
|
-
height: n(t),
|
|
1983
|
-
borderRadius: o.full,
|
|
1984
|
-
overflow: "hidden",
|
|
1985
|
-
gap: "2px"
|
|
1986
|
-
},
|
|
1987
|
-
children: e.map((s, i) => /* @__PURE__ */ r(m, { sx: { width: `${s.w}%`, backgroundColor: s.color } }, i))
|
|
1988
|
-
}
|
|
1989
|
-
);
|
|
1990
|
-
}, ie = ({
|
|
2049
|
+
}) => /* @__PURE__ */ n("div", { css: T.bar, style: { height: o(t) }, children: e.map((r, l) => /* @__PURE__ */ n("div", { style: { width: `${r.w}%`, backgroundColor: r.color } }, l)) }), Se = ({
|
|
1991
2050
|
icon: e,
|
|
1992
2051
|
caption: t,
|
|
1993
|
-
children:
|
|
1994
|
-
}) => {
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
{
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
borderRadius: `calc(${i.md} - 2px)`,
|
|
2002
|
-
padding: n(12),
|
|
2003
|
-
display: "flex",
|
|
2004
|
-
alignItems: "center",
|
|
2005
|
-
gap: n(10)
|
|
2006
|
-
},
|
|
2007
|
-
children: [
|
|
2008
|
-
/* @__PURE__ */ r(
|
|
2009
|
-
m,
|
|
2010
|
-
{
|
|
2011
|
-
component: "span",
|
|
2012
|
-
sx: {
|
|
2013
|
-
width: n(34),
|
|
2014
|
-
height: n(34),
|
|
2015
|
-
borderRadius: "50%",
|
|
2016
|
-
backgroundColor: s.tint,
|
|
2017
|
-
color: s.primary,
|
|
2018
|
-
display: "flex",
|
|
2019
|
-
alignItems: "center",
|
|
2020
|
-
justifyContent: "center",
|
|
2021
|
-
flexShrink: 0,
|
|
2022
|
-
"& svg": { width: n(18), height: n(18) }
|
|
2023
|
-
},
|
|
2024
|
-
children: e
|
|
2025
|
-
}
|
|
2026
|
-
),
|
|
2027
|
-
/* @__PURE__ */ y(m, { children: [
|
|
2028
|
-
o,
|
|
2029
|
-
/* @__PURE__ */ r(w, { component: "div", size: 10, font: "secondary", color: s.dim, sx: { marginTop: n(3, 10) }, children: t })
|
|
2030
|
-
] })
|
|
2031
|
-
]
|
|
2032
|
-
}
|
|
2033
|
-
);
|
|
2034
|
-
}, ae = {
|
|
2052
|
+
children: r
|
|
2053
|
+
}) => /* @__PURE__ */ g("div", { css: T.tile, children: [
|
|
2054
|
+
/* @__PURE__ */ n("span", { css: T.tileIcon, children: e }),
|
|
2055
|
+
/* @__PURE__ */ g("div", { children: [
|
|
2056
|
+
r,
|
|
2057
|
+
/* @__PURE__ */ n(C, { component: "div", size: 10, font: "secondary", color: i.dim, style: { marginTop: o(3, 10) }, children: t })
|
|
2058
|
+
] })
|
|
2059
|
+
] }), ke = {
|
|
2035
2060
|
viewBox: "0 0 24 24",
|
|
2036
2061
|
fill: "none",
|
|
2037
2062
|
stroke: "currentColor",
|
|
2038
2063
|
strokeWidth: 2,
|
|
2039
2064
|
strokeLinecap: "round",
|
|
2040
2065
|
strokeLinejoin: "round"
|
|
2041
|
-
},
|
|
2042
|
-
if (
|
|
2043
|
-
if (
|
|
2044
|
-
const
|
|
2045
|
-
return Math.floor(12 /
|
|
2046
|
-
},
|
|
2047
|
-
const
|
|
2066
|
+
}, jo = 4, Uo = (e, t, r, l) => {
|
|
2067
|
+
if (l) return 12;
|
|
2068
|
+
if (r) return e === t - 1 && t % 2 === 1 ? 12 : 6;
|
|
2069
|
+
const c = Math.min(t, jo), s = e < c ? c : t - c;
|
|
2070
|
+
return Math.floor(12 / s);
|
|
2071
|
+
}, Vo = () => {
|
|
2072
|
+
const e = _e(), t = Nt(), { data: r, entities: l, tally: c, label: s, fmt: m, props: u } = oe(), a = P.useMemo(() => bo(r.matches), [r.matches]), h = a.played, b = (p) => s("ofMatches", { value: p, matches: s("matchesCount", { count: h }) }), f = (p) => m.decimal(h ? p / h : 0, 1), S = (p, k = 22) => /* @__PURE__ */ n(C, { size: k, weight: 700, color: i.text, style: { lineHeight: 1 }, children: p }), w = [
|
|
2048
2073
|
{
|
|
2049
|
-
label:
|
|
2050
|
-
value:
|
|
2051
|
-
sub:
|
|
2074
|
+
label: s("matchesPlayed"),
|
|
2075
|
+
value: h,
|
|
2076
|
+
sub: s("remaining", { count: a.total - h })
|
|
2052
2077
|
},
|
|
2053
2078
|
{
|
|
2054
|
-
label:
|
|
2055
|
-
value:
|
|
2056
|
-
sub:
|
|
2079
|
+
label: s("totalGoals"),
|
|
2080
|
+
value: a.goals,
|
|
2081
|
+
sub: s("goalsPerMatchValue", { value: m.decimal(h ? a.goals / h : 0, 2) })
|
|
2057
2082
|
},
|
|
2058
|
-
{ label:
|
|
2083
|
+
{ label: s("homeWins"), value: `${Y(a.homeWins, h)}%`, sub: b(a.homeWins) },
|
|
2059
2084
|
{
|
|
2060
|
-
label:
|
|
2061
|
-
value: `${
|
|
2062
|
-
sub:
|
|
2063
|
-
matches:
|
|
2064
|
-
goalless:
|
|
2085
|
+
label: s("bothTeamsScored"),
|
|
2086
|
+
value: `${Y(a.bothScored, h)}%`,
|
|
2087
|
+
sub: s("bttsSummary", {
|
|
2088
|
+
matches: s("matchesCount", { count: a.bothScored }),
|
|
2089
|
+
goalless: a.goalless
|
|
2065
2090
|
})
|
|
2066
2091
|
}
|
|
2067
|
-
],
|
|
2068
|
-
{ label:
|
|
2069
|
-
{ label:
|
|
2070
|
-
{ label:
|
|
2071
|
-
],
|
|
2092
|
+
], y = [
|
|
2093
|
+
{ label: s("homeWin"), n: a.homeWins, color: i.primary },
|
|
2094
|
+
{ label: s("draw"), n: a.draws, color: i.border },
|
|
2095
|
+
{ label: s("awayWin"), n: a.awayWins, color: i.primaryContainer }
|
|
2096
|
+
], _ = Math.max(...a.goalsByPeriod, 1), D = [
|
|
2072
2097
|
...[1.5, 2.5, 3.5].map((p) => ({
|
|
2073
2098
|
// "Over 1.5" reads better as the whole number it means: 2+.
|
|
2074
|
-
label:
|
|
2075
|
-
pct:
|
|
2099
|
+
label: s("goalsOrMore", { count: Math.ceil(p) }),
|
|
2100
|
+
pct: Y(a.over(p), h)
|
|
2076
2101
|
})),
|
|
2077
|
-
{ label:
|
|
2078
|
-
{ label:
|
|
2079
|
-
],
|
|
2080
|
-
|
|
2102
|
+
{ label: s("bothTeamsScored"), pct: Y(a.bothScored, h) },
|
|
2103
|
+
{ label: s("goallessDraw"), pct: Y(a.goalless, h) }
|
|
2104
|
+
], E = Co(r.teamStats), x = Array.from(c.keys()), R = Te(u.teamCTA), $ = [], W = (p, k, I, G, J) => {
|
|
2105
|
+
k !== void 0 && $.push({ label: s(p), teamId: I(k), value: G(k), unit: J(k) });
|
|
2081
2106
|
};
|
|
2082
|
-
|
|
2107
|
+
W("mostWins", Z(E, (p) => p.won), (p) => p.teamId, (p) => p.won, (p) => s("unitWins", { count: p.won })), W("bestAttack", Z(E, (p) => p.goalsScored), (p) => p.teamId, (p) => p.goalsScored, () => s("unitGoals")), W("bestDefence", Z(E, (p) => p.goalsAllowed, -1), (p) => p.teamId, (p) => p.goalsAllowed, (p) => s("unitConceded", { count: p.goalsAllowed })), W(
|
|
2083
2108
|
"cleanSheets",
|
|
2084
|
-
|
|
2085
|
-
var
|
|
2086
|
-
return ((
|
|
2109
|
+
Z(x, (p) => {
|
|
2110
|
+
var k;
|
|
2111
|
+
return ((k = c.get(p)) == null ? void 0 : k.cleanSheets) ?? 0;
|
|
2087
2112
|
}),
|
|
2088
2113
|
(p) => p,
|
|
2089
2114
|
(p) => {
|
|
2090
|
-
var
|
|
2091
|
-
return ((
|
|
2115
|
+
var k;
|
|
2116
|
+
return ((k = c.get(p)) == null ? void 0 : k.cleanSheets) ?? 0;
|
|
2092
2117
|
},
|
|
2093
|
-
() =>
|
|
2094
|
-
),
|
|
2118
|
+
() => s("unitMatches")
|
|
2119
|
+
), W("bestHome", Z(E, (p) => p.homeWon), (p) => p.teamId, (p) => p.homeWon, (p) => s("unitWins", { count: p.homeWon })), W("bestAway", Z(E, (p) => p.awayWon), (p) => p.teamId, (p) => p.awayWon, (p) => s("unitWins", { count: p.awayWon })), W(
|
|
2095
2120
|
"mostCards",
|
|
2096
|
-
|
|
2097
|
-
var
|
|
2098
|
-
return (((
|
|
2121
|
+
Z(x, (p) => {
|
|
2122
|
+
var k, I;
|
|
2123
|
+
return (((k = c.get(p)) == null ? void 0 : k.yellowCards) ?? 0) + (((I = c.get(p)) == null ? void 0 : I.redCards) ?? 0);
|
|
2099
2124
|
}),
|
|
2100
2125
|
(p) => p,
|
|
2101
2126
|
(p) => {
|
|
2102
|
-
var
|
|
2103
|
-
return (((
|
|
2127
|
+
var k, I;
|
|
2128
|
+
return (((k = c.get(p)) == null ? void 0 : k.yellowCards) ?? 0) + (((I = c.get(p)) == null ? void 0 : I.redCards) ?? 0);
|
|
2104
2129
|
},
|
|
2105
2130
|
(p) => {
|
|
2106
|
-
var
|
|
2107
|
-
return `${
|
|
2108
|
-
count: ((
|
|
2131
|
+
var k, I;
|
|
2132
|
+
return `${s("yellowCount", { count: ((k = c.get(p)) == null ? void 0 : k.yellowCards) ?? 0 })} · ${s("redCount", {
|
|
2133
|
+
count: ((I = c.get(p)) == null ? void 0 : I.redCards) ?? 0
|
|
2109
2134
|
})}`;
|
|
2110
2135
|
}
|
|
2111
2136
|
);
|
|
2112
|
-
const
|
|
2113
|
-
|
|
2114
|
-
const
|
|
2115
|
-
return /* @__PURE__ */
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
|
|
2119
|
-
{
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
)) }),
|
|
2129
|
-
/* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
|
|
2130
|
-
/* @__PURE__ */ y(se, { children: [
|
|
2131
|
-
/* @__PURE__ */ r(q, { children: l("outcomeTitle") }),
|
|
2132
|
-
/* @__PURE__ */ r(We, { height: 14, widths: S.map((p) => ({ w: G(p.n, f), color: p.color })) }),
|
|
2133
|
-
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: n(8) }, children: S.map((p) => /* @__PURE__ */ y(
|
|
2134
|
-
m,
|
|
2137
|
+
const L = r.matches.filter(We), z = [], U = Z(L, $e), A = Z(L, (p) => Math.abs(p.fullTime[0] - p.fullTime[1]));
|
|
2138
|
+
U && z.push({ label: s("highestScoring"), match: U }), A && z.push({ label: s("biggestWin"), match: A });
|
|
2139
|
+
const M = Te(u.matchCTA);
|
|
2140
|
+
return /* @__PURE__ */ g("div", { css: T.section, children: [
|
|
2141
|
+
/* @__PURE__ */ n(It, { children: s("seasonTitle") }),
|
|
2142
|
+
/* @__PURE__ */ n("div", { css: T.kpis, children: w.map((p) => /* @__PURE__ */ g("div", { css: T.kpi, children: [
|
|
2143
|
+
/* @__PURE__ */ n(se, { size: 10, children: p.label }),
|
|
2144
|
+
/* @__PURE__ */ n(C, { size: 28, weight: 700, color: i.primary, style: { lineHeight: 1 }, children: p.value }),
|
|
2145
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", color: i.dim, children: p.sub })
|
|
2146
|
+
] }, p.label)) }),
|
|
2147
|
+
/* @__PURE__ */ g("div", { css: Le, children: [
|
|
2148
|
+
/* @__PURE__ */ g(xe, { children: [
|
|
2149
|
+
/* @__PURE__ */ n(se, { children: s("outcomeTitle") }),
|
|
2150
|
+
/* @__PURE__ */ n(yt, { height: 14, widths: y.map((p) => ({ w: Y(p.n, h), color: p.color })) }),
|
|
2151
|
+
/* @__PURE__ */ n("div", { css: T.outcomes, children: y.map((p) => /* @__PURE__ */ g(
|
|
2152
|
+
"div",
|
|
2135
2153
|
{
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
flexDirection: "column",
|
|
2139
|
-
gap: n(2),
|
|
2140
|
-
textAlign: "left",
|
|
2141
|
-
borderLeft: `3px solid ${p.color}`,
|
|
2142
|
-
paddingLeft: n(8)
|
|
2143
|
-
},
|
|
2154
|
+
css: T.outcome,
|
|
2155
|
+
style: { "--fu-ucrc-cs-accent": p.color },
|
|
2144
2156
|
children: [
|
|
2145
|
-
|
|
2146
|
-
/* @__PURE__ */
|
|
2147
|
-
/* @__PURE__ */
|
|
2157
|
+
S(`${Y(p.n, h)}%`),
|
|
2158
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", color: i.dim, style: { marginTop: o(3, 11) }, children: p.label }),
|
|
2159
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", color: i.body, children: b(p.n) })
|
|
2148
2160
|
]
|
|
2149
2161
|
},
|
|
2150
2162
|
p.label
|
|
2151
2163
|
)) })
|
|
2152
2164
|
] }),
|
|
2153
|
-
/* @__PURE__ */
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
|
|
2165
|
+
/* @__PURE__ */ g(xe, { children: [
|
|
2166
|
+
/* @__PURE__ */ g("div", { css: T.timingHeader, children: [
|
|
2167
|
+
/* @__PURE__ */ n(se, { children: s("goalTimingTitle") }),
|
|
2168
|
+
/* @__PURE__ */ g(C, { size: 11, font: "secondary", color: i.dim, children: [
|
|
2169
|
+
s("firstHalf"),
|
|
2158
2170
|
" ",
|
|
2159
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ n("b", { css: T.strong, children: a.firstHalfGoals }),
|
|
2172
|
+
" ·",
|
|
2160
2173
|
" ",
|
|
2161
|
-
"
|
|
2162
|
-
l("secondHalf"),
|
|
2174
|
+
s("secondHalf"),
|
|
2163
2175
|
" ",
|
|
2164
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ n("b", { css: T.strong, children: a.secondHalfGoals })
|
|
2165
2177
|
] })
|
|
2166
2178
|
] }),
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
|
|
2179
|
+
/* @__PURE__ */ n(
|
|
2180
|
+
yt,
|
|
2169
2181
|
{
|
|
2170
2182
|
height: 8,
|
|
2171
2183
|
widths: [
|
|
2172
|
-
{ w:
|
|
2173
|
-
{ w:
|
|
2184
|
+
{ w: Y(a.firstHalfGoals, a.goals), color: i.primaryContainer },
|
|
2185
|
+
{ w: Y(a.secondHalfGoals, a.goals), color: i.primary }
|
|
2174
2186
|
]
|
|
2175
2187
|
}
|
|
2176
2188
|
),
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
|
|
2189
|
+
/* @__PURE__ */ n("div", { css: T.periods, children: a.goalsByPeriod.map((p, k) => /* @__PURE__ */ g("div", { css: T.period, children: [
|
|
2190
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", weight: 700, color: i.text, children: p }),
|
|
2191
|
+
/* @__PURE__ */ n(
|
|
2192
|
+
"div",
|
|
2193
|
+
{
|
|
2194
|
+
css: T.periodBar,
|
|
2195
|
+
style: {
|
|
2196
|
+
height: o(Math.max(6, Math.round(p / _ * 56))),
|
|
2197
|
+
backgroundColor: p === _ ? i.primary : i.tint2
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
)
|
|
2201
|
+
] }, ht[k])) }),
|
|
2202
|
+
/* @__PURE__ */ n("div", { css: T.periodLabels, children: ht.map((p) => /* @__PURE__ */ n(
|
|
2203
|
+
C,
|
|
2179
2204
|
{
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
m,
|
|
2189
|
-
{
|
|
2190
|
-
sx: {
|
|
2191
|
-
display: "flex",
|
|
2192
|
-
flexDirection: "column",
|
|
2193
|
-
alignItems: "center",
|
|
2194
|
-
gap: n(3),
|
|
2195
|
-
height: "100%",
|
|
2196
|
-
justifyContent: "flex-end"
|
|
2197
|
-
},
|
|
2198
|
-
children: [
|
|
2199
|
-
/* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 700, color: e.text, children: p }),
|
|
2200
|
-
/* @__PURE__ */ r(
|
|
2201
|
-
m,
|
|
2202
|
-
{
|
|
2203
|
-
sx: {
|
|
2204
|
-
width: "100%",
|
|
2205
|
-
height: n(Math.max(6, Math.round(p / W * 56))),
|
|
2206
|
-
borderRadius: `${t.xs} ${t.xs} 0 0`,
|
|
2207
|
-
backgroundColor: p === W ? e.primary : e.tint2
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
)
|
|
2211
|
-
]
|
|
2212
|
-
},
|
|
2213
|
-
De[I]
|
|
2214
|
-
))
|
|
2215
|
-
}
|
|
2216
|
-
),
|
|
2217
|
-
/* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(6,1fr)", gap: n(6) }, children: De.map((p) => /* @__PURE__ */ r(w, { size: 10, font: "secondary", color: e.dim, sx: { textAlign: "center", unicodeBidi: "isolate" }, children: p }, p)) })
|
|
2205
|
+
size: 10,
|
|
2206
|
+
font: "secondary",
|
|
2207
|
+
color: i.dim,
|
|
2208
|
+
style: { textAlign: "center", unicodeBidi: "isolate" },
|
|
2209
|
+
children: p
|
|
2210
|
+
},
|
|
2211
|
+
p
|
|
2212
|
+
)) })
|
|
2218
2213
|
] })
|
|
2219
2214
|
] }),
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
{
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
gridTemplateColumns: `${n(150)} 1fr ${n(44)}`,
|
|
2229
|
-
alignItems: "center",
|
|
2230
|
-
gap: n(10)
|
|
2231
|
-
},
|
|
2232
|
-
children: [
|
|
2233
|
-
/* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 500, color: e.body, ellipsis: !0, children: p.label }),
|
|
2234
|
-
/* @__PURE__ */ r(m, { sx: { height: n(8), borderRadius: t.full, backgroundColor: e.variant, overflow: "hidden" }, children: /* @__PURE__ */ r(m, { sx: { height: "100%", width: `${p.pct}%`, backgroundColor: e.primary, borderRadius: t.full } }) }),
|
|
2235
|
-
/* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: e.text, sx: { textAlign: "right" }, children: `${p.pct}%` })
|
|
2236
|
-
]
|
|
2237
|
-
},
|
|
2238
|
-
p.label
|
|
2239
|
-
))
|
|
2215
|
+
/* @__PURE__ */ g("div", { css: Le, children: [
|
|
2216
|
+
/* @__PURE__ */ g(xe, { children: [
|
|
2217
|
+
/* @__PURE__ */ n(se, { children: s("scoringTitle") }),
|
|
2218
|
+
D.map((p) => /* @__PURE__ */ g("div", { css: T.over, children: [
|
|
2219
|
+
/* @__PURE__ */ n(C, { size: 12, font: "secondary", weight: 500, color: i.body, ellipsis: !0, children: p.label }),
|
|
2220
|
+
/* @__PURE__ */ n("div", { css: T.overTrack, children: /* @__PURE__ */ n("div", { css: T.overFill, style: { width: `${p.pct}%` } }) }),
|
|
2221
|
+
/* @__PURE__ */ n(C, { size: 12, font: "secondary", weight: 700, color: i.text, css: T.alignRight, children: `${p.pct}%` })
|
|
2222
|
+
] }, p.label))
|
|
2240
2223
|
] }),
|
|
2241
|
-
/* @__PURE__ */
|
|
2242
|
-
/* @__PURE__ */
|
|
2243
|
-
/* @__PURE__ */
|
|
2244
|
-
/* @__PURE__ */
|
|
2245
|
-
|
|
2224
|
+
/* @__PURE__ */ g(xe, { children: [
|
|
2225
|
+
/* @__PURE__ */ n(se, { children: s("averagesTitle") }),
|
|
2226
|
+
/* @__PURE__ */ g("div", { css: T.averages, children: [
|
|
2227
|
+
/* @__PURE__ */ n(
|
|
2228
|
+
Se,
|
|
2246
2229
|
{
|
|
2247
|
-
caption:
|
|
2248
|
-
icon: /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2230
|
+
caption: s("avgShotsOnTarget"),
|
|
2231
|
+
icon: /* @__PURE__ */ g("svg", { ...ke, children: [
|
|
2232
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2233
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "6" }),
|
|
2234
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "2" })
|
|
2252
2235
|
] }),
|
|
2253
|
-
children:
|
|
2236
|
+
children: S(f(a.shotsOnTarget))
|
|
2254
2237
|
}
|
|
2255
2238
|
),
|
|
2256
|
-
/* @__PURE__ */
|
|
2257
|
-
|
|
2239
|
+
/* @__PURE__ */ n(
|
|
2240
|
+
Se,
|
|
2258
2241
|
{
|
|
2259
|
-
caption:
|
|
2260
|
-
icon: /* @__PURE__ */
|
|
2261
|
-
/* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2242
|
+
caption: s("avgCorners"),
|
|
2243
|
+
icon: /* @__PURE__ */ g("svg", { ...ke, children: [
|
|
2244
|
+
/* @__PURE__ */ n("path", { d: "M4 22V4" }),
|
|
2245
|
+
/* @__PURE__ */ n("path", { d: "M4 4h12l-3 4 3 4H4" }),
|
|
2246
|
+
/* @__PURE__ */ n("path", { d: "M2 22h6" })
|
|
2264
2247
|
] }),
|
|
2265
|
-
children:
|
|
2248
|
+
children: S(f(a.corners))
|
|
2266
2249
|
}
|
|
2267
2250
|
),
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
|
|
2251
|
+
/* @__PURE__ */ n(
|
|
2252
|
+
Se,
|
|
2270
2253
|
{
|
|
2271
|
-
caption:
|
|
2272
|
-
icon: /* @__PURE__ */
|
|
2273
|
-
children:
|
|
2254
|
+
caption: s("avgCards"),
|
|
2255
|
+
icon: /* @__PURE__ */ n("svg", { ...ke, children: /* @__PURE__ */ n("rect", { x: "6", y: "3", width: "12", height: "18", rx: "2" }) }),
|
|
2256
|
+
children: S(f(a.yellowCards + a.redCards))
|
|
2274
2257
|
}
|
|
2275
2258
|
),
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
|
|
2259
|
+
/* @__PURE__ */ n(
|
|
2260
|
+
Se,
|
|
2278
2261
|
{
|
|
2279
|
-
caption:
|
|
2280
|
-
icon: /* @__PURE__ */
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
/* @__PURE__ */
|
|
2262
|
+
caption: s("avgGoalsByHalf"),
|
|
2263
|
+
icon: /* @__PURE__ */ g("svg", { ...ke, children: [
|
|
2264
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2265
|
+
/* @__PURE__ */ n("path", { d: "M12 2a10 10 0 0 1 0 20z", fill: "currentColor", stroke: "none", opacity: ".35" }),
|
|
2266
|
+
/* @__PURE__ */ n("path", { d: "M12 2v20" })
|
|
2284
2267
|
] }),
|
|
2285
|
-
children: /* @__PURE__ */
|
|
2286
|
-
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
|
|
2268
|
+
children: /* @__PURE__ */ g("div", { css: T.halves, children: [
|
|
2269
|
+
S(f(a.firstHalfGoals)),
|
|
2270
|
+
/* @__PURE__ */ n(C, { size: 11, font: "secondary", color: i.dim, children: "/" }),
|
|
2271
|
+
S(f(a.secondHalfGoals))
|
|
2289
2272
|
] })
|
|
2290
2273
|
}
|
|
2291
2274
|
)
|
|
2292
2275
|
] }),
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
|
|
2295
|
-
{
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
/* @__PURE__ */ r(q, { children: l("totalCards") }),
|
|
2307
|
-
/* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(20) }, children: [
|
|
2308
|
-
{ n: h.yellowCards, color: e.yellowCard, key: "yellow" },
|
|
2309
|
-
{ n: h.redCards, color: e.danger, key: "red" }
|
|
2310
|
-
].map((p) => /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(10) }, children: [
|
|
2311
|
-
/* @__PURE__ */ y(m, { component: "span", sx: { position: "relative", width: n(22), height: n(26), flexShrink: 0 }, children: [
|
|
2312
|
-
/* @__PURE__ */ r(
|
|
2313
|
-
m,
|
|
2314
|
-
{
|
|
2315
|
-
component: "span",
|
|
2316
|
-
sx: {
|
|
2317
|
-
position: "absolute",
|
|
2318
|
-
left: 0,
|
|
2319
|
-
top: n(4),
|
|
2320
|
-
width: n(14),
|
|
2321
|
-
height: n(20),
|
|
2322
|
-
borderRadius: "3px",
|
|
2323
|
-
backgroundColor: p.color,
|
|
2324
|
-
opacity: 0.45,
|
|
2325
|
-
transform: "rotate(-12deg)"
|
|
2326
|
-
}
|
|
2327
|
-
}
|
|
2328
|
-
),
|
|
2329
|
-
/* @__PURE__ */ r(
|
|
2330
|
-
m,
|
|
2331
|
-
{
|
|
2332
|
-
component: "span",
|
|
2333
|
-
sx: {
|
|
2334
|
-
position: "absolute",
|
|
2335
|
-
left: n(6),
|
|
2336
|
-
top: 0,
|
|
2337
|
-
width: n(14),
|
|
2338
|
-
height: n(20),
|
|
2339
|
-
borderRadius: "3px",
|
|
2340
|
-
backgroundColor: p.color,
|
|
2341
|
-
boxShadow: "0 1px 3px rgba(0,0,0,.2)"
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
)
|
|
2345
|
-
] }),
|
|
2346
|
-
g(p.n, 20)
|
|
2347
|
-
] }, p.key)) })
|
|
2348
|
-
]
|
|
2349
|
-
}
|
|
2350
|
-
)
|
|
2276
|
+
/* @__PURE__ */ g("div", { css: T.totalCards, children: [
|
|
2277
|
+
/* @__PURE__ */ n(se, { children: s("totalCards") }),
|
|
2278
|
+
/* @__PURE__ */ n("div", { css: T.cardCounts, children: [
|
|
2279
|
+
{ n: a.yellowCards, color: i.yellowCard, key: "yellow" },
|
|
2280
|
+
{ n: a.redCards, color: i.danger, key: "red" }
|
|
2281
|
+
].map((p) => /* @__PURE__ */ g("div", { css: T.cardCount, children: [
|
|
2282
|
+
/* @__PURE__ */ g("span", { css: T.cardIcon, children: [
|
|
2283
|
+
/* @__PURE__ */ n("span", { css: T.cardBack, style: { backgroundColor: p.color } }),
|
|
2284
|
+
/* @__PURE__ */ n("span", { css: T.cardFront, style: { backgroundColor: p.color } })
|
|
2285
|
+
] }),
|
|
2286
|
+
S(p.n, 20)
|
|
2287
|
+
] }, p.key)) })
|
|
2288
|
+
] })
|
|
2351
2289
|
] })
|
|
2352
2290
|
] }),
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2291
|
+
$.length ? /* @__PURE__ */ n("div", { css: T.callouts, children: $.map((p, k) => {
|
|
2292
|
+
const I = De(u.teamCTA, "team", p.teamId), G = I != null && I.href ? "a" : "div";
|
|
2293
|
+
return /* @__PURE__ */ g(
|
|
2294
|
+
G,
|
|
2295
|
+
{
|
|
2296
|
+
href: (I == null ? void 0 : I.href) ?? void 0,
|
|
2297
|
+
target: I == null ? void 0 : I.target,
|
|
2298
|
+
onClick: I == null ? void 0 : I.onClick,
|
|
2299
|
+
css: R ? T.callout.interactive : T.callout.plain,
|
|
2300
|
+
style: { gridColumn: `span ${Uo(k, $.length, e, t)}` },
|
|
2301
|
+
children: [
|
|
2302
|
+
/* @__PURE__ */ n(V, { url: l.logo(p.teamId), size: 36 }),
|
|
2303
|
+
/* @__PURE__ */ g("div", { css: T.calloutText, children: [
|
|
2304
|
+
/* @__PURE__ */ n(se, { size: 10, style: { display: "block" }, children: p.label }),
|
|
2305
|
+
/* @__PURE__ */ n(C, { component: "div", size: 13, weight: 700, color: i.text, ellipsis: !0, cms: !0, children: l.name(p.teamId) })
|
|
2306
|
+
] }),
|
|
2307
|
+
/* @__PURE__ */ g("div", { css: T.calloutValue, children: [
|
|
2308
|
+
/* @__PURE__ */ n(C, { component: "div", size: 22, weight: 700, color: i.primary, style: { lineHeight: 1 }, children: p.value }),
|
|
2309
|
+
/* @__PURE__ */ n(
|
|
2310
|
+
C,
|
|
2311
|
+
{
|
|
2312
|
+
component: "div",
|
|
2313
|
+
size: 10,
|
|
2314
|
+
font: "secondary",
|
|
2315
|
+
color: i.dim,
|
|
2316
|
+
style: { marginTop: o(2, 10) },
|
|
2317
|
+
children: p.unit
|
|
2318
|
+
}
|
|
2319
|
+
)
|
|
2320
|
+
] })
|
|
2321
|
+
]
|
|
2360
2322
|
},
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
target: v == null ? void 0 : v.target,
|
|
2369
|
-
onClick: v == null ? void 0 : v.onClick,
|
|
2370
|
-
sx: {
|
|
2371
|
-
padding: `${n(12)} ${n(14)}`,
|
|
2372
|
-
display: "flex",
|
|
2373
|
-
alignItems: "center",
|
|
2374
|
-
gap: n(10),
|
|
2375
|
-
cursor: _ ? "pointer" : "default",
|
|
2376
|
-
gridColumn: `span ${bo(I, R.length, o, s)}`,
|
|
2377
|
-
textDecoration: "none",
|
|
2378
|
-
color: "inherit",
|
|
2379
|
-
"&:hover": { backgroundColor: _ ? e.onSurface : e.surface }
|
|
2380
|
-
},
|
|
2381
|
-
children: [
|
|
2382
|
-
/* @__PURE__ */ r(H, { url: a.logo(p.teamId), size: 36 }),
|
|
2383
|
-
/* @__PURE__ */ y(m, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
2384
|
-
/* @__PURE__ */ r(q, { size: 10, sx: { display: "block" }, children: p.label }),
|
|
2385
|
-
/* @__PURE__ */ r(w, { component: "div", size: 13, weight: 700, color: e.text, ellipsis: !0, cms: !0, children: a.name(p.teamId) })
|
|
2386
|
-
] }),
|
|
2387
|
-
/* @__PURE__ */ y(m, { sx: { textAlign: "right", flexShrink: 0 }, children: [
|
|
2388
|
-
/* @__PURE__ */ r(w, { component: "div", size: 22, weight: 700, color: e.primary, sx: { lineHeight: 1 }, children: p.value }),
|
|
2389
|
-
/* @__PURE__ */ r(w, { component: "div", size: 10, font: "secondary", color: e.dim, sx: { marginTop: n(2, 10) }, children: p.unit })
|
|
2390
|
-
] })
|
|
2391
|
-
]
|
|
2392
|
-
},
|
|
2393
|
-
p.label
|
|
2394
|
-
);
|
|
2395
|
-
})
|
|
2396
|
-
}
|
|
2397
|
-
) : null,
|
|
2398
|
-
z.length ? /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: z.map(({ label: p, match: I }) => {
|
|
2399
|
-
const v = fe(u.matchCTA, "match", I.id), [P, K] = I.fullTime ?? [0, 0];
|
|
2400
|
-
return /* @__PURE__ */ y(
|
|
2401
|
-
Z,
|
|
2323
|
+
p.label
|
|
2324
|
+
);
|
|
2325
|
+
}) }) : null,
|
|
2326
|
+
z.length ? /* @__PURE__ */ n("div", { css: Le, children: z.map(({ label: p, match: k }) => {
|
|
2327
|
+
const I = De(u.matchCTA, "match", k.id), [G, J] = k.fullTime ?? [0, 0], H = I != null && I.href ? "a" : "div";
|
|
2328
|
+
return /* @__PURE__ */ g(
|
|
2329
|
+
H,
|
|
2402
2330
|
{
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
sx: {
|
|
2408
|
-
padding: `${n(12)} ${n(16)}`,
|
|
2409
|
-
display: "flex",
|
|
2410
|
-
flexDirection: "column",
|
|
2411
|
-
gap: n(8),
|
|
2412
|
-
cursor: U ? "pointer" : "default",
|
|
2413
|
-
textDecoration: "none",
|
|
2414
|
-
color: "inherit",
|
|
2415
|
-
"&:hover": { backgroundColor: U ? e.onSurface : e.surface }
|
|
2416
|
-
},
|
|
2331
|
+
href: (I == null ? void 0 : I.href) ?? void 0,
|
|
2332
|
+
target: I == null ? void 0 : I.target,
|
|
2333
|
+
onClick: I == null ? void 0 : I.onClick,
|
|
2334
|
+
css: M ? T.record.interactive : T.record.plain,
|
|
2417
2335
|
children: [
|
|
2418
|
-
/* @__PURE__ */
|
|
2419
|
-
/* @__PURE__ */
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
round:
|
|
2422
|
-
date:
|
|
2336
|
+
/* @__PURE__ */ g(se, { size: 10, style: { display: "flex", justifyContent: "space-between" }, children: [
|
|
2337
|
+
/* @__PURE__ */ n("span", { children: p }),
|
|
2338
|
+
/* @__PURE__ */ n("span", { children: s("recordRound", {
|
|
2339
|
+
round: k.round,
|
|
2340
|
+
date: m.date(k.start, { day: "2-digit", month: "2-digit" })
|
|
2423
2341
|
}) })
|
|
2424
2342
|
] }),
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
/* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.home.id) }),
|
|
2437
|
-
/* @__PURE__ */ r(H, { url: a.logo(I.home.id), size: 28 })
|
|
2438
|
-
] }),
|
|
2439
|
-
/* @__PURE__ */ r(
|
|
2440
|
-
w,
|
|
2441
|
-
{
|
|
2442
|
-
size: 18,
|
|
2443
|
-
weight: 700,
|
|
2444
|
-
color: e.text,
|
|
2445
|
-
sx: {
|
|
2446
|
-
letterSpacing: n(1, 18),
|
|
2447
|
-
backgroundColor: e.onSurface,
|
|
2448
|
-
borderRadius: t.sm,
|
|
2449
|
-
padding: `${n(4, 18)} ${n(10, 18)}`
|
|
2450
|
-
},
|
|
2451
|
-
children: `${P} : ${K}`
|
|
2452
|
-
}
|
|
2453
|
-
),
|
|
2454
|
-
/* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(8), minWidth: 0 }, children: [
|
|
2455
|
-
/* @__PURE__ */ r(H, { url: a.logo(I.away.id), size: 28 }),
|
|
2456
|
-
/* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.away.id) })
|
|
2457
|
-
] })
|
|
2458
|
-
]
|
|
2459
|
-
}
|
|
2460
|
-
)
|
|
2343
|
+
/* @__PURE__ */ g("div", { css: T.recordTeams, children: [
|
|
2344
|
+
/* @__PURE__ */ g("div", { css: T.recordHome, children: [
|
|
2345
|
+
/* @__PURE__ */ n(C, { size: 13, weight: 600, color: i.text, ellipsis: !0, cms: !0, children: l.name(k.home.id) }),
|
|
2346
|
+
/* @__PURE__ */ n(V, { url: l.logo(k.home.id), size: 28 })
|
|
2347
|
+
] }),
|
|
2348
|
+
/* @__PURE__ */ n(C, { size: 18, weight: 700, color: i.text, css: T.recordScore, children: `${G} : ${J}` }),
|
|
2349
|
+
/* @__PURE__ */ g("div", { css: T.recordAway, children: [
|
|
2350
|
+
/* @__PURE__ */ n(V, { url: l.logo(k.away.id), size: 28 }),
|
|
2351
|
+
/* @__PURE__ */ n(C, { size: 13, weight: 600, color: i.text, ellipsis: !0, cms: !0, children: l.name(k.away.id) })
|
|
2352
|
+
] })
|
|
2353
|
+
] })
|
|
2461
2354
|
]
|
|
2462
2355
|
},
|
|
2463
2356
|
p
|
|
2464
2357
|
);
|
|
2465
2358
|
}) }) : null
|
|
2466
2359
|
] });
|
|
2467
|
-
},
|
|
2360
|
+
}, Ko = ["header", "matches", "players", "season"], Xo = 3e4, bt = {
|
|
2361
|
+
root: d({
|
|
2362
|
+
fontSize: "1em",
|
|
2363
|
+
fontFamily: i.fontPrimary,
|
|
2364
|
+
color: i.text,
|
|
2365
|
+
lineHeight: "normal",
|
|
2366
|
+
display: "flex",
|
|
2367
|
+
flexDirection: "column",
|
|
2368
|
+
gap: o(16)
|
|
2369
|
+
}),
|
|
2370
|
+
message: d(me, { padding: o(24) })
|
|
2371
|
+
}, Yo = (e) => {
|
|
2468
2372
|
const {
|
|
2469
2373
|
entityId: t,
|
|
2470
|
-
sdk:
|
|
2471
|
-
language:
|
|
2472
|
-
seasonId:
|
|
2473
|
-
stageId:
|
|
2474
|
-
sections:
|
|
2475
|
-
liveRefresh:
|
|
2476
|
-
refreshInterval:
|
|
2477
|
-
labels:
|
|
2478
|
-
} = e,
|
|
2479
|
-
|
|
2374
|
+
sdk: r,
|
|
2375
|
+
language: l,
|
|
2376
|
+
seasonId: c,
|
|
2377
|
+
stageId: s,
|
|
2378
|
+
sections: m = Ko,
|
|
2379
|
+
liveRefresh: u = !0,
|
|
2380
|
+
refreshInterval: a = Xo,
|
|
2381
|
+
labels: h
|
|
2382
|
+
} = e, b = go(), f = ko(h), S = P.useMemo(() => xo(l), [l]), { data: w, competitionId: y, entities: _, loading: D, error: E } = ho(
|
|
2383
|
+
r,
|
|
2480
2384
|
t,
|
|
2481
|
-
|
|
2385
|
+
l,
|
|
2482
2386
|
"–",
|
|
2483
|
-
{ seasonId:
|
|
2484
|
-
),
|
|
2485
|
-
let
|
|
2486
|
-
return
|
|
2487
|
-
|
|
2488
|
-
{
|
|
2489
|
-
value: { sdk: o, data: g, competitionId: $, entities: S, finished: M, tally: O, label: C, fmt: b, props: e },
|
|
2490
|
-
children: _.map((A) => A === "header" ? /* @__PURE__ */ r(no, {}, A) : A === "matches" ? /* @__PURE__ */ r(yo, {}, A) : A === "players" ? g.athletes.length ? /* @__PURE__ */ r(ao, {}, A) : null : A === "season" ? /* @__PURE__ */ r(wo, {}, A) : null)
|
|
2491
|
-
}
|
|
2492
|
-
), /* @__PURE__ */ r(
|
|
2493
|
-
m,
|
|
2494
|
-
{
|
|
2495
|
-
sx: {
|
|
2496
|
-
fontSize: "1em",
|
|
2497
|
-
fontFamily: f.primary,
|
|
2498
|
-
color: h.text,
|
|
2499
|
-
lineHeight: "normal",
|
|
2500
|
-
display: "flex",
|
|
2501
|
-
flexDirection: "column",
|
|
2502
|
-
gap: n(16)
|
|
2503
|
-
},
|
|
2504
|
-
children: E
|
|
2505
|
-
}
|
|
2506
|
-
);
|
|
2507
|
-
}, Io = (e) => {
|
|
2508
|
-
const [t, o] = L.useState(!1), [s, i] = L.useState(!1), a = pt(e.language), c = L.useRef(
|
|
2509
|
-
`competition-statistics-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
2510
|
-
), l = L.useRef(null), d = L.useRef(null), u = L.useRef(null), [h, f] = L.useState(null);
|
|
2511
|
-
L.useEffect(() => {
|
|
2512
|
-
mt(e.language || "en").finally(() => i(!0));
|
|
2513
|
-
}, [e.language]), L.useEffect(() => {
|
|
2514
|
-
if (!l.current) return;
|
|
2515
|
-
l.current.shadowRoot ? (d.current = l.current.shadowRoot, u.current = d.current.getElementById(
|
|
2516
|
-
c.current
|
|
2517
|
-
), u.current || (u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", d.current.appendChild(u.current))) : (d.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", d.current.appendChild(u.current)), ht(u.current, a);
|
|
2518
|
-
const $ = gt("competition-statistics", a);
|
|
2519
|
-
return f(
|
|
2520
|
-
(S) => (S == null ? void 0 : S.key) === $ ? S : ft(
|
|
2521
|
-
"competition-statistics",
|
|
2522
|
-
d.current,
|
|
2523
|
-
a
|
|
2524
|
-
)
|
|
2525
|
-
), o(!0), () => {
|
|
2526
|
-
o(!1);
|
|
2527
|
-
};
|
|
2528
|
-
}, [a]);
|
|
2529
|
-
const C = e.themeOptions, b = /* @__PURE__ */ r(
|
|
2530
|
-
m,
|
|
2387
|
+
{ seasonId: c, stageId: s, liveRefresh: u, refreshInterval: a }
|
|
2388
|
+
), x = P.useMemo(() => w ? w.matches.filter(We) : [], [w]), R = P.useMemo(() => fo(x), [x]), $ = Array.from(new Set(m)), W = (z) => /* @__PURE__ */ n("div", { css: bt.message, children: /* @__PURE__ */ n(C, { component: "div", size: 14, font: "secondary", color: i.dim, style: { textAlign: "center" }, children: z }) });
|
|
2389
|
+
let L;
|
|
2390
|
+
return D ? L = /* @__PURE__ */ n(Et, { marginBlock: "5em" }) : E ? L = W(f("loadFailed")) : !w || w.matches.length === 0 ? L = W(f("noData")) : L = /* @__PURE__ */ n(
|
|
2391
|
+
Io,
|
|
2531
2392
|
{
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
sx: { height: "100%", display: "block" }
|
|
2393
|
+
value: { sdk: r, data: w, competitionId: y, entities: _, finished: x, tally: R, label: f, fmt: S, props: e },
|
|
2394
|
+
children: $.map((z) => z === "header" ? /* @__PURE__ */ n($o, {}, z) : z === "matches" ? /* @__PURE__ */ n(Ho, {}, z) : z === "players" ? w.athletes.length ? /* @__PURE__ */ n(Eo, {}, z) : null : z === "season" ? /* @__PURE__ */ n(Vo, {}, z) : null)
|
|
2535
2395
|
}
|
|
2536
|
-
),
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
bt,
|
|
2549
|
-
{
|
|
2550
|
-
shadowRootElement: u.current,
|
|
2551
|
-
leadPhoneCountryCode: null,
|
|
2552
|
-
language: e.language,
|
|
2553
|
-
optionsLayout: null,
|
|
2554
|
-
direction: a,
|
|
2555
|
-
disableCache: e.disableCache ?? !1,
|
|
2556
|
-
children: [
|
|
2557
|
-
/* @__PURE__ */ r(
|
|
2558
|
-
tt,
|
|
2559
|
-
{
|
|
2560
|
-
styles: {
|
|
2561
|
-
"@keyframes cs-pulse": {
|
|
2562
|
-
"0%, 100%": { opacity: 1, transform: "scale(1)" },
|
|
2563
|
-
"50%": { opacity: 0.4, transform: "scale(.7)" }
|
|
2564
|
-
}
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
),
|
|
2568
|
-
e.children
|
|
2569
|
-
]
|
|
2570
|
-
}
|
|
2571
|
-
)
|
|
2572
|
-
}
|
|
2573
|
-
) }) }, h.key),
|
|
2574
|
-
u.current
|
|
2575
|
-
) : null;
|
|
2576
|
-
return /* @__PURE__ */ y(ye, { children: [
|
|
2577
|
-
b,
|
|
2578
|
-
g
|
|
2579
|
-
] });
|
|
2580
|
-
}, $o = (e) => /* @__PURE__ */ r(Io, { ...e, children: /* @__PURE__ */ r(vo, { ...e }) }), Wo = Tt($o);
|
|
2396
|
+
), /* @__PURE__ */ n("div", { css: bt.root, style: b, children: L });
|
|
2397
|
+
}, qo = (e) => /* @__PURE__ */ n(
|
|
2398
|
+
Mt,
|
|
2399
|
+
{
|
|
2400
|
+
packageName: "competition-statistics",
|
|
2401
|
+
language: e.language,
|
|
2402
|
+
themeOptions: e.themeOptions,
|
|
2403
|
+
disableCache: e.disableCache,
|
|
2404
|
+
fillHeight: !0,
|
|
2405
|
+
children: /* @__PURE__ */ n(Yo, { ...e })
|
|
2406
|
+
}
|
|
2407
|
+
), ar = Xt(qo);
|
|
2581
2408
|
export {
|
|
2582
|
-
|
|
2409
|
+
ar as CompetitionStatistics
|
|
2583
2410
|
};
|