fansunited-frontend-components 0.0.99 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Betslip.js +2 -2
- package/ChanceGame.js +496 -505
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +405 -1163
- package/CompetitionStatistics.js +2 -2
- package/CompetitorCard.js +445 -425
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +648 -593
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +142 -132
- package/List.js +675 -713
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +925 -1824
- package/PlayerOfTheMatch.js +2106 -2223
- package/PollVote.js +2 -2
- package/Predictor.js +4209 -18629
- package/Standings.js +497 -486
- package/TopX.js +3223 -16958
- package/chunks/{ChanceGameEmbedVariant-DM9eLG5s.js → ChanceGameEmbedVariant-z8XYzgDW.js} +1 -1
- package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
- package/chunks/index-BNl8scz6.js +4 -0
- package/chunks/index-CSa2JU4m.js +4 -0
- package/chunks/index-CVRI82Gb.js +4 -0
- package/chunks/index-Cd1dg0KI.js +4 -0
- package/chunks/index-Cei2fzi7.js +4 -0
- package/chunks/index-Cxb4wEJU.js +4 -0
- package/chunks/index-w1LGN5dz.js +4 -0
- package/chunks/main-07vzblS8.js +2091 -0
- package/chunks/main-C7X4dM_P.js +4827 -0
- package/chunks/main-D_QDfmAw.js +6417 -0
- package/chunks/{main-CzfWaEQP.js → main-DdL0UekL.js} +1931 -2025
- package/chunks/main-DmBfwyb4.js +2992 -0
- package/chunks/main-LEE8n2cG.js +3117 -0
- package/chunks/{main-DxvBjXsd.js → main-P2WNvBZE.js} +473 -444
- package/chunks/{main-DiBlJBNb.js → main-gV165E-A.js} +629 -657
- package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
- package/chunks/{withVersionStamp-BsLyhvNA.js → withVersionStamp-CPDfSE5H.js} +1 -1
- package/package.json +2 -6
- package/withVersionStamp.d.ts.map +1 -1
- package/chunks/CheckCircle-I1FktW5Y.js +0 -13
- package/chunks/Person-CXRqyF4E.js +0 -11
- package/chunks/PickOneOfX-DET4ZhjV.js +0 -3117
- package/chunks/Search-CIXthh0D.js +0 -17
- package/chunks/TimerOutlined-D-WA_vpE.js +0 -8
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +0 -136
- package/chunks/chevrons-right-HWKW2c4I.js +0 -45
- package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
- package/chunks/index-BENM3N_w.js +0 -4
- package/chunks/index-BRxAV693.js +0 -4
- package/chunks/index-BXYTsvIX.js +0 -4
- package/chunks/index-C0ilols1.js +0 -4
- package/chunks/index-D7VhczXH.js +0 -4
- package/chunks/index-DKwvdw9t.js +0 -4
- package/chunks/index-DZN-AITW.js +0 -4
- package/chunks/main-B2sDRFF4.js +0 -2184
- package/chunks/main-DFNl3g_U.js +0 -4910
- package/chunks/main-DLwnvntz.js +0 -4020
- package/chunks/main-S8_NDSiY.js +0 -3209
- package/chunks/main-lBgr8Liq.js +0 -6571
package/Standings.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InlineSpinner as
|
|
3
|
-
import Ie, { useState as K, useEffect as
|
|
4
|
-
import { css as
|
|
1
|
+
import { jsxs as x, jsx as s, Fragment as Z } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { InlineSpinner as ot, Spinner as rt, WidgetPortal as at } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
+
import Ie, { useState as K, useEffect as _e, useMemo as j, useRef as He, useId as st } from "react";
|
|
4
|
+
import { css as o } from "@emotion/react";
|
|
5
5
|
import { useTranslation as oe } from "react-i18next";
|
|
6
|
-
import { hexToRgb as
|
|
7
|
-
import { MatchFilters as
|
|
8
|
-
import { EmojiEventsIcon as
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import { w as
|
|
11
|
-
const
|
|
6
|
+
import { hexToRgb as Ge, useDisableCache as je, extractSdkErrorMessage as it, useColors as Ve, toIntlLocale as ue, bidiIsolate as te, useConstantContext as lt, ConstantsContext as ct, useIsRtl as Ze } from "fansunited-frontend-core";
|
|
7
|
+
import { MatchFilters as ke } from "fansunited-sdk-esm/models";
|
|
8
|
+
import { EmojiEventsIcon as dt } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
import { createPortal as ut } from "react-dom";
|
|
10
|
+
import { w as pt } from "./chunks/withVersionStamp-CPDfSE5H.js";
|
|
11
|
+
const ft = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().replace(
|
|
12
12
|
/\S+/g,
|
|
13
13
|
(n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()
|
|
14
14
|
), mt = [
|
|
@@ -29,10 +29,13 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
29
29
|
"championshipGroup",
|
|
30
30
|
"europaClGroup",
|
|
31
31
|
"relegationGroup"
|
|
32
|
-
],
|
|
33
|
-
(e, t) => (e[
|
|
32
|
+
], me = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), ge = mt.reduce(
|
|
33
|
+
(e, t) => (e[me(t)] = t, e),
|
|
34
34
|
{}
|
|
35
|
-
)
|
|
35
|
+
);
|
|
36
|
+
ge.conferenceleague = "uefaConferenceLeague";
|
|
37
|
+
ge.conferenceleaguequal = "uefaConferenceLeagueQual";
|
|
38
|
+
const Xe = (e) => ge[me(e)] ?? null, gt = {
|
|
36
39
|
championsLeague: "primary",
|
|
37
40
|
championshipGroup: "primary",
|
|
38
41
|
playOffs: "primary",
|
|
@@ -55,62 +58,62 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
55
58
|
success: 1,
|
|
56
59
|
warning: 2,
|
|
57
60
|
danger: 3
|
|
58
|
-
}, yt = (e, t) => t === 0 ? e : `rgba(${
|
|
59
|
-
const n =
|
|
61
|
+
}, yt = (e, t) => t === 0 ? e : `rgba(${Ge(e)}, ${Math.max(0.25, 1 - t * 0.25)})`, bt = (e, t) => {
|
|
62
|
+
const n = me(e);
|
|
60
63
|
return n.includes("relegation") ? n.includes("playoff") || n.includes("group") ? "warning" : "danger" : t ? "primary" : "success";
|
|
61
|
-
},
|
|
62
|
-
const
|
|
64
|
+
}, xt = (e, t, n) => {
|
|
65
|
+
const a = /* @__PURE__ */ new Map();
|
|
63
66
|
if (e.forEach((c, d) => {
|
|
64
67
|
if (!c) return;
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
}), !
|
|
68
|
-
const
|
|
69
|
-
const d =
|
|
70
|
-
return d.reduce((
|
|
71
|
-
}, p = Array.from(
|
|
72
|
-
(c, d) =>
|
|
73
|
-
),
|
|
74
|
-
const
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
const
|
|
78
|
-
return
|
|
68
|
+
const l = a.get(c);
|
|
69
|
+
l ? l.push(d) : a.set(c, [d]);
|
|
70
|
+
}), !a.size) return [];
|
|
71
|
+
const i = (c) => {
|
|
72
|
+
const d = a.get(c) ?? [];
|
|
73
|
+
return d.reduce((l, h) => l + h, 0) / d.length;
|
|
74
|
+
}, p = Array.from(a.keys()).sort(
|
|
75
|
+
(c, d) => i(c) - i(d)
|
|
76
|
+
), f = p.map((c) => Xe(c)), u = p.map((c, d) => {
|
|
77
|
+
const l = f[d];
|
|
78
|
+
return l ? gt[l] : bt(c, d === 0);
|
|
79
|
+
}), m = /* @__PURE__ */ new Map(), g = p.map((c, d) => {
|
|
80
|
+
const l = u[d], h = m.get(l) ?? 0;
|
|
81
|
+
return m.set(l, h + 1), yt(t[l], h);
|
|
79
82
|
});
|
|
80
83
|
return p.map((c, d) => {
|
|
81
|
-
const
|
|
84
|
+
const l = f[d], h = l ? n == null ? void 0 : n[l] : void 0;
|
|
82
85
|
return {
|
|
83
86
|
key: c,
|
|
84
87
|
color: h ?? g[d],
|
|
85
|
-
label:
|
|
88
|
+
label: ft(c),
|
|
86
89
|
tierRank: ht[u[d]]
|
|
87
90
|
};
|
|
88
|
-
}).sort((c, d) => c.tierRank - d.tierRank).map(({ key: c, color: d, label:
|
|
89
|
-
},
|
|
91
|
+
}).sort((c, d) => c.tierRank - d.tierRank).map(({ key: c, color: d, label: l }) => ({ key: c, color: d, label: l }));
|
|
92
|
+
}, St = (e, t) => {
|
|
90
93
|
var n;
|
|
91
94
|
if (!e) return [];
|
|
92
95
|
if (t) {
|
|
93
|
-
const
|
|
94
|
-
return
|
|
96
|
+
const a = (n = e.stages) == null ? void 0 : n.find((i) => i.id === t);
|
|
97
|
+
return a && a.type === "standing" ? [a] : [];
|
|
95
98
|
}
|
|
96
|
-
return (e.stages ?? []).filter((
|
|
97
|
-
},
|
|
99
|
+
return (e.stages ?? []).filter((a) => a.type === "standing");
|
|
100
|
+
}, Qe = (e) => {
|
|
98
101
|
var t;
|
|
99
102
|
return ((t = e == null ? void 0 : e.find((n) => n.key === "LOGO")) == null ? void 0 : t.value) ?? null;
|
|
100
103
|
}, z = (e, t) => {
|
|
101
|
-
const n = e.find((
|
|
102
|
-
var
|
|
103
|
-
return ((
|
|
104
|
+
const n = e.find((a) => {
|
|
105
|
+
var i;
|
|
106
|
+
return ((i = a.key) == null ? void 0 : i.toLowerCase()) === t;
|
|
104
107
|
});
|
|
105
108
|
return n && Number(n.value) || 0;
|
|
106
109
|
}, vt = (e, t) => e.some((n) => {
|
|
107
|
-
var
|
|
108
|
-
return ((
|
|
110
|
+
var a;
|
|
111
|
+
return ((a = n.key) == null ? void 0 : a.toLowerCase()) === t;
|
|
109
112
|
}), wt = (e) => {
|
|
110
|
-
const t = z(e, "goals_for"), n = z(e, "goals_against"),
|
|
113
|
+
const t = z(e, "goals_for"), n = z(e, "goals_against"), a = z(e, "played"), i = z(e, "won");
|
|
111
114
|
return {
|
|
112
|
-
played:
|
|
113
|
-
won:
|
|
115
|
+
played: a,
|
|
116
|
+
won: i,
|
|
114
117
|
drawn: z(e, "drawn"),
|
|
115
118
|
lost: z(e, "lost"),
|
|
116
119
|
goalsFor: t,
|
|
@@ -118,200 +121,200 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
118
121
|
// Derived rather than trusting the (possibly absent) goals_difference stat key.
|
|
119
122
|
goalsDifference: t - n,
|
|
120
123
|
points: z(e, "points"),
|
|
121
|
-
winPercentage:
|
|
124
|
+
winPercentage: a > 0 ? i / a : 0
|
|
122
125
|
};
|
|
123
126
|
}, kt = (e, t) => t == null ? null : e === t ? "same" : e < t ? "up" : "down", Ct = (e, t) => {
|
|
124
|
-
var
|
|
125
|
-
const n = e.competitorModel,
|
|
127
|
+
var i;
|
|
128
|
+
const n = e.competitorModel, a = e.rank ?? 0;
|
|
126
129
|
return {
|
|
127
130
|
competitorId: e.competitorId,
|
|
128
|
-
rank:
|
|
131
|
+
rank: a,
|
|
129
132
|
lastRank: e.lastRank,
|
|
130
|
-
rankChange: kt(
|
|
133
|
+
rankChange: kt(a, e.lastRank),
|
|
131
134
|
teamName: (n == null ? void 0 : n.name) ?? t,
|
|
132
135
|
teamShortName: (n == null ? void 0 : n.shortName) ?? null,
|
|
133
|
-
logoUrl:
|
|
136
|
+
logoUrl: Qe(n == null ? void 0 : n.assets),
|
|
134
137
|
stats: wt(e.stats ?? []),
|
|
135
|
-
zoneKey: ((
|
|
138
|
+
zoneKey: ((i = e.rules) == null ? void 0 : i[0]) ?? null
|
|
136
139
|
};
|
|
137
140
|
}, Lt = (e, t, n) => {
|
|
138
141
|
if (t == null && n == null) return e;
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
141
|
-
const
|
|
142
|
-
return e.filter((
|
|
143
|
-
const g =
|
|
144
|
-
return g >=
|
|
142
|
+
const a = e.map((m) => m.rank ?? 0);
|
|
143
|
+
if (!a.length) return e;
|
|
144
|
+
const i = Math.min(...a), p = Math.max(...a), f = Math.max(t ?? i, i), u = Math.min(n ?? p, p);
|
|
145
|
+
return e.filter((m) => {
|
|
146
|
+
const g = m.rank ?? 0;
|
|
147
|
+
return g >= f && g <= u;
|
|
145
148
|
});
|
|
146
|
-
},
|
|
147
|
-
const
|
|
149
|
+
}, Tt = (e, t, n, a, i, p) => {
|
|
150
|
+
const f = Lt(e.standings ?? [], i, p), u = f.map((c) => Ct(c, a)), m = xt(
|
|
148
151
|
u.map((c) => c.zoneKey),
|
|
149
152
|
t,
|
|
150
153
|
n
|
|
151
|
-
), g =
|
|
154
|
+
), g = f.some(
|
|
152
155
|
(c) => vt(c.stats ?? [], "points")
|
|
153
156
|
);
|
|
154
|
-
return { id: e.id, name: e.name, rows: u, zones:
|
|
155
|
-
},
|
|
157
|
+
return { id: e.id, name: e.name, rows: u, zones: m, hasPoints: g };
|
|
158
|
+
}, Dt = (e) => e ? {
|
|
156
159
|
name: e.name ?? null,
|
|
157
160
|
year: e.year ?? null,
|
|
158
161
|
startDate: e.startDate ?? null,
|
|
159
162
|
endDate: e.endDate ?? null
|
|
160
|
-
} : null, $t = (e, t, n,
|
|
163
|
+
} : null, $t = (e, t, n, a, i, p, f) => {
|
|
161
164
|
var g;
|
|
162
|
-
const u = e.groups ?? [],
|
|
163
|
-
(c) => c.id !== null &&
|
|
165
|
+
const u = e.groups ?? [], m = i && i.length ? u.filter(
|
|
166
|
+
(c) => c.id !== null && i.includes(c.id)
|
|
164
167
|
) : u;
|
|
165
168
|
return {
|
|
166
169
|
id: e.id,
|
|
167
170
|
name: ((g = e.stageNameModel) == null ? void 0 : g.name) ?? null,
|
|
168
171
|
startDate: e.startDate ?? null,
|
|
169
172
|
endDate: e.endDate ?? null,
|
|
170
|
-
groups:
|
|
171
|
-
(c) =>
|
|
173
|
+
groups: m.map(
|
|
174
|
+
(c) => Tt(
|
|
172
175
|
c,
|
|
173
176
|
t,
|
|
174
177
|
n,
|
|
175
|
-
|
|
178
|
+
a,
|
|
176
179
|
p,
|
|
177
|
-
|
|
180
|
+
f
|
|
178
181
|
)
|
|
179
182
|
)
|
|
180
183
|
};
|
|
181
|
-
}, Ft = (e, t, n,
|
|
182
|
-
const g =
|
|
184
|
+
}, Ft = (e, t, n, a, i, p, f, u) => {
|
|
185
|
+
const g = St(e.season, u).map(
|
|
183
186
|
(c) => $t(
|
|
184
187
|
c,
|
|
185
188
|
t,
|
|
186
189
|
n,
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
a,
|
|
191
|
+
i,
|
|
189
192
|
p,
|
|
190
|
-
|
|
193
|
+
f
|
|
191
194
|
)
|
|
192
195
|
);
|
|
193
196
|
return {
|
|
194
197
|
competitionId: e.id,
|
|
195
198
|
competitionName: e.name ?? e.shortName ?? e.id,
|
|
196
199
|
sport: e.sport ?? null,
|
|
197
|
-
logoUrl:
|
|
198
|
-
season:
|
|
200
|
+
logoUrl: Qe(e.assets),
|
|
201
|
+
season: Dt(e.season),
|
|
199
202
|
stageFound: g.length > 0,
|
|
200
203
|
stages: g
|
|
201
204
|
};
|
|
202
|
-
}, Pt = (e, t, n,
|
|
203
|
-
const [g, c] = K(null), [d,
|
|
204
|
-
return
|
|
205
|
+
}, Pt = (e, t, n, a, i, p, f, u, m) => {
|
|
206
|
+
const [g, c] = K(null), [d, l] = K(!0), [h, w] = K(null), S = je();
|
|
207
|
+
return _e(() => {
|
|
205
208
|
if (!e || !t) return;
|
|
206
209
|
let k = !1;
|
|
207
|
-
return
|
|
210
|
+
return l(!0), w(null), t.sports.getCompetitionById(
|
|
208
211
|
e,
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
f ? { seasonId: f } : void 0,
|
|
213
|
+
S
|
|
211
214
|
).then((b) => {
|
|
212
215
|
k || c(b);
|
|
213
216
|
}).catch((b) => {
|
|
214
|
-
k || w(
|
|
217
|
+
k || w(it(b, t));
|
|
215
218
|
}).finally(() => {
|
|
216
|
-
k ||
|
|
219
|
+
k || l(!1);
|
|
217
220
|
}), () => {
|
|
218
221
|
k = !0;
|
|
219
222
|
};
|
|
220
|
-
}, [e, t,
|
|
223
|
+
}, [e, t, f, S]), { data: j(() => g ? Ft(
|
|
221
224
|
g,
|
|
222
225
|
n,
|
|
223
|
-
|
|
224
|
-
|
|
226
|
+
i,
|
|
227
|
+
a,
|
|
225
228
|
p,
|
|
226
229
|
u == null ? void 0 : u.startRank,
|
|
227
230
|
u == null ? void 0 : u.endRank,
|
|
228
|
-
|
|
231
|
+
m
|
|
229
232
|
) : null, [
|
|
230
233
|
g,
|
|
231
234
|
n,
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
i,
|
|
236
|
+
a,
|
|
234
237
|
p,
|
|
235
238
|
u == null ? void 0 : u.startRank,
|
|
236
239
|
u == null ? void 0 : u.endRank,
|
|
237
|
-
|
|
240
|
+
m
|
|
238
241
|
]), loading: d, error: h };
|
|
239
242
|
}, At = 50, Rt = (e, t) => e > t ? "win" : e < t ? "loss" : "draw", Kt = (e, t) => {
|
|
240
|
-
var
|
|
241
|
-
const n = e.homeTeam.id === t,
|
|
243
|
+
var m, g;
|
|
244
|
+
const n = e.homeTeam.id === t, a = e.scores, i = Number(((m = a == null ? void 0 : a.ftScore) == null ? void 0 : m.homeGoals) ?? 0), p = Number(((g = a == null ? void 0 : a.ftScore) == null ? void 0 : g.awayGoals) ?? 0), f = n ? i : p, u = n ? p : i;
|
|
242
245
|
return {
|
|
243
|
-
result: Rt(
|
|
246
|
+
result: Rt(f, u),
|
|
244
247
|
isHome: n,
|
|
245
248
|
opponentId: n ? e.awayTeam.id : e.homeTeam.id,
|
|
246
|
-
teamScore:
|
|
249
|
+
teamScore: f,
|
|
247
250
|
opponentScore: u,
|
|
248
251
|
kickoffAt: e.kickoffAt
|
|
249
252
|
};
|
|
250
|
-
},
|
|
253
|
+
}, Ce = 12, zt = (e, t) => {
|
|
251
254
|
const n = new Date(e);
|
|
252
255
|
return n.setUTCHours(n.getUTCHours() + t), n.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
253
|
-
},
|
|
256
|
+
}, Le = (e, t) => {
|
|
254
257
|
if (!e) return null;
|
|
255
|
-
const
|
|
258
|
+
const i = `${e.slice(0, 10)}T${t === "start" ? "00:00:00" : "23:59:59"}Z`;
|
|
256
259
|
return zt(
|
|
257
|
-
|
|
258
|
-
t === "start" ? -
|
|
260
|
+
i,
|
|
261
|
+
t === "start" ? -Ce : Ce
|
|
259
262
|
);
|
|
260
263
|
}, Ot = (e) => e.map(
|
|
261
264
|
(t) => `${t.stageId}:${t.teamIds.join(",")}:${t.fromDate ?? ""}:${t.toDate ?? ""}`
|
|
262
|
-
).join("|"),
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
+
).join("|"), Nt = async (e, t, n, a) => {
|
|
266
|
+
var m, g;
|
|
267
|
+
const i = {
|
|
265
268
|
competitionIds: [n],
|
|
266
269
|
status: "finished",
|
|
267
270
|
sortField: "date",
|
|
268
271
|
sortOrder: "desc",
|
|
269
272
|
limit: At,
|
|
270
|
-
fromDate:
|
|
271
|
-
toDate:
|
|
273
|
+
fromDate: Le(t.fromDate, "start"),
|
|
274
|
+
toDate: Le(t.toDate, "end")
|
|
272
275
|
}, p = await e.football.getMatches(
|
|
273
|
-
new
|
|
274
|
-
|
|
275
|
-
),
|
|
276
|
+
new ke({ ...i, page: 1 }),
|
|
277
|
+
a
|
|
278
|
+
), f = [...p.data ?? []], u = ((g = (m = p.meta) == null ? void 0 : m.pagination) == null ? void 0 : g.numberOfPages) ?? 1;
|
|
276
279
|
return u > 1 && (await Promise.all(
|
|
277
280
|
Array.from(
|
|
278
281
|
{ length: u - 1 },
|
|
279
|
-
(d,
|
|
280
|
-
new
|
|
281
|
-
|
|
282
|
+
(d, l) => e.football.getMatches(
|
|
283
|
+
new ke({ ...i, page: l + 2 }),
|
|
284
|
+
a
|
|
282
285
|
).then((h) => h.data ?? []).catch(() => [])
|
|
283
286
|
)
|
|
284
|
-
)).forEach((d) =>
|
|
285
|
-
},
|
|
286
|
-
const [
|
|
287
|
-
return
|
|
288
|
-
if (!
|
|
287
|
+
)).forEach((d) => f.push(...d)), f;
|
|
288
|
+
}, Mt = (e, t, n, a) => {
|
|
289
|
+
const [i, p] = K({}), [f, u] = K(!1), m = je(), g = Ot(t);
|
|
290
|
+
return _e(() => {
|
|
291
|
+
if (!a || !t.length) {
|
|
289
292
|
p({}), u(!1);
|
|
290
293
|
return;
|
|
291
294
|
}
|
|
292
295
|
let c = !1;
|
|
293
296
|
return u(!0), Promise.all(
|
|
294
297
|
t.map(
|
|
295
|
-
(d) =>
|
|
298
|
+
(d) => Nt(e, d, n, m).then((l) => [d.stageId, d.teamIds, l]).catch(
|
|
296
299
|
() => [d.stageId, d.teamIds, []]
|
|
297
300
|
)
|
|
298
301
|
)
|
|
299
302
|
).then((d) => {
|
|
300
303
|
if (c) return;
|
|
301
|
-
const
|
|
302
|
-
d.forEach(([h, w,
|
|
304
|
+
const l = {};
|
|
305
|
+
d.forEach(([h, w, S]) => {
|
|
303
306
|
const v = {};
|
|
304
307
|
w.forEach((k) => {
|
|
305
|
-
v[k] =
|
|
308
|
+
v[k] = S.filter(
|
|
306
309
|
(b) => b.homeTeam.id === k || b.awayTeam.id === k
|
|
307
310
|
).slice(0, 5).map((b) => Kt(b, k));
|
|
308
|
-
}),
|
|
309
|
-
}), p(
|
|
311
|
+
}), l[h] = v;
|
|
312
|
+
}), p(l), u(!1);
|
|
310
313
|
}), () => {
|
|
311
314
|
c = !0;
|
|
312
315
|
};
|
|
313
|
-
}, [e, g, n,
|
|
314
|
-
},
|
|
316
|
+
}, [e, g, n, a, m]), { formByStageAndTeam: i, loading: f };
|
|
317
|
+
}, r = {
|
|
315
318
|
surface: "var(--fu-ucrc-surface)",
|
|
316
319
|
surfaceVariant: "var(--fu-ucrc-surface-variant)",
|
|
317
320
|
text: "var(--fu-ucrc-text-primary)",
|
|
@@ -338,21 +341,21 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
338
341
|
spaceMd: "var(--fu-ucrc-space-md)",
|
|
339
342
|
spaceLg: "var(--fu-ucrc-space-lg)"
|
|
340
343
|
}, Et = () => {
|
|
341
|
-
const e =
|
|
344
|
+
const e = Ve().palette.primary.plainColor;
|
|
342
345
|
return Ie.useMemo(
|
|
343
|
-
() => ({ "--fu-ucrc-st-primary-08": `rgba(${
|
|
346
|
+
() => ({ "--fu-ucrc-st-primary-08": `rgba(${Ge(e)}, 0.08)` }),
|
|
344
347
|
[e]
|
|
345
348
|
);
|
|
346
|
-
}, ne = { margin: 0, lineHeight: 1.5 }, F = { margin: 0 },
|
|
349
|
+
}, ne = { margin: 0, lineHeight: 1.5 }, F = { margin: 0 }, Ye = {
|
|
347
350
|
position: "relative",
|
|
348
351
|
fontSize: "1em",
|
|
349
352
|
fontWeight: 400,
|
|
350
353
|
lineHeight: 1.5,
|
|
351
|
-
color:
|
|
352
|
-
backgroundColor:
|
|
353
|
-
border: `1px solid ${
|
|
354
|
+
color: r.outlinedText,
|
|
355
|
+
backgroundColor: r.surface,
|
|
356
|
+
border: `1px solid ${r.border}`,
|
|
354
357
|
overflow: "hidden"
|
|
355
|
-
},
|
|
358
|
+
}, Te = (e, t) => {
|
|
356
359
|
if (!e) return null;
|
|
357
360
|
const n = new Date(e);
|
|
358
361
|
return Number.isNaN(n.getTime()) ? null : n.toLocaleDateString(ue(t), {
|
|
@@ -361,38 +364,39 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
361
364
|
year: "numeric"
|
|
362
365
|
});
|
|
363
366
|
}, P = {
|
|
364
|
-
root:
|
|
367
|
+
root: o({
|
|
365
368
|
display: "flex",
|
|
366
369
|
alignItems: "center",
|
|
367
|
-
gap:
|
|
370
|
+
gap: r.spaceSm,
|
|
368
371
|
// Matches the group/stage tabs' and ZoneLegend's own padding so the header,
|
|
369
372
|
// the tab pills, and the legend all read as the same consistent band.
|
|
370
|
-
padding: `${
|
|
371
|
-
borderBottom: `1px solid ${
|
|
372
|
-
backgroundColor:
|
|
373
|
+
padding: `${r.spaceSm} ${r.spaceMd}`,
|
|
374
|
+
borderBottom: `1px solid ${r.border}`,
|
|
375
|
+
backgroundColor: r.surface
|
|
373
376
|
}),
|
|
374
|
-
logo:
|
|
375
|
-
placeholder:
|
|
377
|
+
logo: o({ width: "36px", height: "36px", objectFit: "contain", flexShrink: 0 }),
|
|
378
|
+
placeholder: o({
|
|
376
379
|
width: "36px",
|
|
377
380
|
height: "36px",
|
|
378
381
|
borderRadius: "6px",
|
|
379
|
-
backgroundColor:
|
|
382
|
+
backgroundColor: r.surfaceVariant,
|
|
380
383
|
display: "flex",
|
|
381
384
|
alignItems: "center",
|
|
382
385
|
justifyContent: "center",
|
|
383
386
|
flexShrink: 0,
|
|
384
387
|
overflow: "hidden"
|
|
385
388
|
}),
|
|
386
|
-
body:
|
|
387
|
-
titleRow:
|
|
388
|
-
title:
|
|
389
|
-
fontFamily:
|
|
389
|
+
body: o({ minWidth: 0 }),
|
|
390
|
+
titleRow: o({ display: "flex", alignItems: "center", gap: r.spaceXs, flexWrap: "wrap" }),
|
|
391
|
+
title: o(ne, {
|
|
392
|
+
fontFamily: r.fontPrimary,
|
|
390
393
|
fontWeight: 700,
|
|
391
394
|
fontSize: "1.0625em",
|
|
392
|
-
color:
|
|
395
|
+
color: r.text,
|
|
396
|
+
unicodeBidi: "plaintext"
|
|
393
397
|
}),
|
|
394
398
|
// Joy's small Chip, in px as it computed (its sizes were rem).
|
|
395
|
-
badge:
|
|
399
|
+
badge: o({
|
|
396
400
|
position: "relative",
|
|
397
401
|
display: "inline-flex",
|
|
398
402
|
alignItems: "center",
|
|
@@ -404,40 +408,41 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
404
408
|
verticalAlign: "middle",
|
|
405
409
|
whiteSpace: "nowrap",
|
|
406
410
|
lineHeight: 1.5,
|
|
407
|
-
fontFamily:
|
|
411
|
+
fontFamily: r.fontPrimary,
|
|
408
412
|
fontSize: "0.625em",
|
|
409
413
|
fontWeight: 600,
|
|
410
|
-
color:
|
|
411
|
-
backgroundColor:
|
|
414
|
+
color: r.primary,
|
|
415
|
+
backgroundColor: r.primary08
|
|
412
416
|
}),
|
|
413
|
-
badgeLabel:
|
|
417
|
+
badgeLabel: o({
|
|
414
418
|
display: "inline-block",
|
|
415
419
|
minWidth: 0,
|
|
416
420
|
flexGrow: 1,
|
|
417
421
|
overflow: "hidden",
|
|
418
|
-
textOverflow: "ellipsis"
|
|
422
|
+
textOverflow: "ellipsis",
|
|
423
|
+
unicodeBidi: "plaintext"
|
|
419
424
|
}),
|
|
420
|
-
subtitle:
|
|
421
|
-
fontFamily:
|
|
425
|
+
subtitle: o(ne, {
|
|
426
|
+
fontFamily: r.fontSecondary,
|
|
422
427
|
fontSize: "0.6875em",
|
|
423
|
-
color:
|
|
428
|
+
color: r.textSecondary,
|
|
424
429
|
marginTop: "2px"
|
|
425
430
|
})
|
|
426
431
|
}, Wt = ({
|
|
427
432
|
title: e,
|
|
428
433
|
logoUrl: t,
|
|
429
434
|
season: n,
|
|
430
|
-
language:
|
|
435
|
+
language: a
|
|
431
436
|
}) => {
|
|
432
|
-
const
|
|
433
|
-
return /* @__PURE__ */
|
|
434
|
-
t ? /* @__PURE__ */ s("img", { src: t, alt: e, css: P.logo }) : /* @__PURE__ */ s("div", { css: P.placeholder, children: /* @__PURE__ */ s(
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
+
const i = Te((n == null ? void 0 : n.startDate) ?? null, a), p = Te((n == null ? void 0 : n.endDate) ?? null, a), f = i && p ? `${i} – ${p}` : null, u = (n == null ? void 0 : n.year) ?? (n == null ? void 0 : n.name) ?? null;
|
|
438
|
+
return /* @__PURE__ */ x("div", { css: P.root, children: [
|
|
439
|
+
t ? /* @__PURE__ */ s("img", { src: t, alt: e, css: P.logo }) : /* @__PURE__ */ s("div", { css: P.placeholder, children: /* @__PURE__ */ s(dt, { size: "1.25em", color: r.textSecondary }) }),
|
|
440
|
+
/* @__PURE__ */ x("div", { css: P.body, children: [
|
|
441
|
+
/* @__PURE__ */ x("div", { css: P.titleRow, children: [
|
|
437
442
|
/* @__PURE__ */ s("p", { css: P.title, children: e }),
|
|
438
443
|
u && /* @__PURE__ */ s("div", { css: P.badge, children: /* @__PURE__ */ s("span", { css: P.badgeLabel, children: u }) })
|
|
439
444
|
] }),
|
|
440
|
-
|
|
445
|
+
f && /* @__PURE__ */ s("p", { css: P.subtitle, children: f })
|
|
441
446
|
] })
|
|
442
447
|
] });
|
|
443
448
|
}, pe = [
|
|
@@ -481,7 +486,7 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
481
486
|
shortLabelKey: "standings.columns.form",
|
|
482
487
|
fullLabelKey: "standings.columns.form"
|
|
483
488
|
}
|
|
484
|
-
],
|
|
489
|
+
], Bt = [
|
|
485
490
|
{
|
|
486
491
|
key: "goalsFor",
|
|
487
492
|
shortLabelKey: "standings.columns.goalsForShort",
|
|
@@ -497,27 +502,27 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
497
502
|
shortLabelKey: "standings.columns.goalsDifferenceShort",
|
|
498
503
|
fullLabelKey: "standings.columns.goalsDifference"
|
|
499
504
|
}
|
|
500
|
-
],
|
|
505
|
+
], Ut = [
|
|
501
506
|
...pe.slice(0, 5),
|
|
502
|
-
...
|
|
507
|
+
...Bt,
|
|
503
508
|
...pe.slice(5)
|
|
504
|
-
],
|
|
509
|
+
], It = {
|
|
505
510
|
hockey: ["drawn", "form"],
|
|
506
511
|
// No ties, no goal-based scoring (points are the score itself, not a standings-only
|
|
507
512
|
// stat), and no match-event data yet — leaves just played/won/lost/points.
|
|
508
513
|
basketball: ["drawn", "form", "goals", "goalsFor", "goalsAgainst", "goalsDifference"]
|
|
509
514
|
}, _t = (e, t, n = !0) => {
|
|
510
|
-
const
|
|
511
|
-
t ?
|
|
515
|
+
const a = new Set(
|
|
516
|
+
t ? It[t.toLowerCase()] ?? [] : []
|
|
512
517
|
);
|
|
513
|
-
return
|
|
514
|
-
}, De =
|
|
515
|
-
up:
|
|
516
|
-
down:
|
|
517
|
-
}, Ht = ({ rankChange: e }) => e === null || e === "same" ? /* @__PURE__ */ s(Z, {}) : e === "up" ? /* @__PURE__ */ s("span", { css:
|
|
518
|
+
return a.add(n ? "winPercentage" : "points"), (!e || e.length === 0 ? pe : Ut.filter((p) => e.includes(p.key))).filter((p) => !a.has(p.key));
|
|
519
|
+
}, De = o({ fontSize: "0.5625em", fontWeight: 700, lineHeight: 1.4 }), $e = {
|
|
520
|
+
up: o(De, { color: r.success }),
|
|
521
|
+
down: o(De, { color: r.danger })
|
|
522
|
+
}, Ht = ({ rankChange: e }) => e === null || e === "same" ? /* @__PURE__ */ s(Z, {}) : e === "up" ? /* @__PURE__ */ s("span", { css: $e.up, children: "▲" }) : /* @__PURE__ */ s("span", { css: $e.down, children: "▼" }), Fe = o({
|
|
518
523
|
display: "flex",
|
|
519
524
|
alignItems: "center",
|
|
520
|
-
gap:
|
|
525
|
+
gap: r.spaceXs,
|
|
521
526
|
minWidth: 0,
|
|
522
527
|
// Caps the whole cell (avatar + name) so a long name actually has something to
|
|
523
528
|
// shrink against and ellipsis, instead of just growing the table's own column
|
|
@@ -527,93 +532,94 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
527
532
|
// compact overview card's fixed-width grid tile and push its stat columns out
|
|
528
533
|
// of view.
|
|
529
534
|
maxWidth: "160px"
|
|
530
|
-
}),
|
|
535
|
+
}), Pe = o({ width: "28px", height: "28px", objectFit: "contain", flexShrink: 0 }), Ae = o({
|
|
531
536
|
width: "28px",
|
|
532
537
|
height: "28px",
|
|
533
538
|
display: "flex",
|
|
534
539
|
alignItems: "center",
|
|
535
540
|
justifyContent: "center",
|
|
536
541
|
borderRadius: "4px",
|
|
537
|
-
backgroundColor:
|
|
538
|
-
color:
|
|
539
|
-
fontFamily:
|
|
542
|
+
backgroundColor: r.surfaceVariant,
|
|
543
|
+
color: r.textSecondary,
|
|
544
|
+
fontFamily: r.fontPrimary,
|
|
540
545
|
fontSize: "0.4375em",
|
|
541
546
|
fontWeight: 700,
|
|
542
547
|
lineHeight: 1,
|
|
543
548
|
flexShrink: 0
|
|
544
|
-
}), Y =
|
|
545
|
-
fontFamily:
|
|
549
|
+
}), Y = o(F, {
|
|
550
|
+
fontFamily: r.fontPrimary,
|
|
546
551
|
fontSize: "0.8125em",
|
|
547
552
|
fontWeight: 500,
|
|
548
|
-
color:
|
|
553
|
+
color: r.text,
|
|
549
554
|
overflow: "hidden",
|
|
550
555
|
textOverflow: "ellipsis",
|
|
551
556
|
whiteSpace: "nowrap",
|
|
552
|
-
minWidth: 0
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
+
minWidth: 0,
|
|
558
|
+
unicodeBidi: "plaintext"
|
|
559
|
+
}), Re = { width: "22px", height: "22px" }, q = {
|
|
560
|
+
root: { regular: Fe, compact: o(Fe, { maxWidth: "90px" }) },
|
|
561
|
+
logo: { regular: Pe, compact: o(Pe, Re) },
|
|
562
|
+
initials: { regular: Ae, compact: o(Ae, Re) },
|
|
557
563
|
name: {
|
|
558
564
|
regular: Y,
|
|
559
|
-
compact:
|
|
560
|
-
highlighted:
|
|
561
|
-
highlightedCompact:
|
|
565
|
+
compact: o(Y, { fontSize: "0.6875em" }),
|
|
566
|
+
highlighted: o(Y, { fontWeight: 700, color: r.primary }),
|
|
567
|
+
highlightedCompact: o(Y, { fontSize: "0.6875em", fontWeight: 700, color: r.primary })
|
|
562
568
|
}
|
|
563
569
|
}, Gt = ({ row: e, highlighted: t, compact: n }) => {
|
|
564
|
-
const
|
|
565
|
-
return /* @__PURE__ */
|
|
566
|
-
e.logoUrl ? /* @__PURE__ */ s("img", { src: e.logoUrl, alt: e.teamName, css: q.logo[
|
|
567
|
-
/* @__PURE__ */ s("p", { css: q.name[
|
|
570
|
+
const a = n ? "compact" : "regular", i = t ? n ? "highlightedCompact" : "highlighted" : a;
|
|
571
|
+
return /* @__PURE__ */ x("div", { css: q.root[a], children: [
|
|
572
|
+
e.logoUrl ? /* @__PURE__ */ s("img", { src: e.logoUrl, alt: e.teamName, css: q.logo[a] }) : /* @__PURE__ */ s("div", { css: q.initials[a], children: (e.teamShortName ?? e.teamName).slice(0, 2).toUpperCase() }),
|
|
573
|
+
/* @__PURE__ */ s("p", { css: q.name[i], children: e.teamName })
|
|
568
574
|
] });
|
|
569
|
-
},
|
|
570
|
-
root:
|
|
571
|
-
totals:
|
|
572
|
-
positive:
|
|
573
|
-
negative:
|
|
574
|
-
even:
|
|
575
|
+
}, ie = o(F, { fontFamily: r.fontPrimary, fontSize: "0.6875em", fontWeight: 700 }), I = {
|
|
576
|
+
root: o({ display: "flex", flexDirection: "column", alignItems: "center", gap: "1px", lineHeight: 1.2 }),
|
|
577
|
+
totals: o(F, { fontFamily: r.fontSecondary, fontSize: "0.6875em", color: r.textSecondary }),
|
|
578
|
+
positive: o(ie, { color: r.success }),
|
|
579
|
+
negative: o(ie, { color: r.danger }),
|
|
580
|
+
even: o(ie, { color: r.textSecondary })
|
|
575
581
|
}, jt = ({ stats: e }) => {
|
|
576
582
|
const t = e.goalsDifference;
|
|
577
|
-
return /* @__PURE__ */
|
|
578
|
-
/* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ x("div", { css: I.root, children: [
|
|
584
|
+
/* @__PURE__ */ x("p", { css: I.totals, children: [
|
|
579
585
|
e.goalsFor,
|
|
580
586
|
"·",
|
|
581
587
|
e.goalsAgainst
|
|
582
588
|
] }),
|
|
583
589
|
/* @__PURE__ */ s("p", { css: t > 0 ? I.positive : t < 0 ? I.negative : I.even, children: t > 0 ? te(`+${t}`) : te(t) })
|
|
584
590
|
] });
|
|
585
|
-
},
|
|
591
|
+
}, Ke = 200, Vt = (e, t) => {
|
|
586
592
|
const n = new Date(e);
|
|
587
593
|
if (Number.isNaN(n.getTime())) return "";
|
|
588
|
-
const
|
|
594
|
+
const a = n.toLocaleDateString(ue(t), {
|
|
589
595
|
day: "numeric",
|
|
590
596
|
month: "short",
|
|
591
597
|
year: "numeric"
|
|
592
|
-
}),
|
|
598
|
+
}), i = n.toLocaleTimeString(ue(t), {
|
|
593
599
|
hour: "2-digit",
|
|
594
600
|
minute: "2-digit"
|
|
595
601
|
});
|
|
596
|
-
return `${
|
|
597
|
-
},
|
|
598
|
-
fontFamily:
|
|
602
|
+
return `${a} · ${i}`;
|
|
603
|
+
}, le = o({ width: "9px", height: "9px", borderRadius: "50%" }), ze = o(F, {
|
|
604
|
+
fontFamily: r.fontPrimary,
|
|
599
605
|
fontWeight: 600,
|
|
600
606
|
fontSize: "0.8125em",
|
|
601
|
-
color:
|
|
607
|
+
color: r.text,
|
|
602
608
|
whiteSpace: "nowrap"
|
|
603
|
-
}),
|
|
604
|
-
center:
|
|
605
|
-
empty:
|
|
606
|
-
fontFamily:
|
|
609
|
+
}), D = {
|
|
610
|
+
center: o({ display: "flex", justifyContent: "center" }),
|
|
611
|
+
empty: o(F, {
|
|
612
|
+
fontFamily: r.fontSecondary,
|
|
607
613
|
fontSize: "0.75em",
|
|
608
|
-
color:
|
|
614
|
+
color: r.textSecondary,
|
|
609
615
|
textAlign: "center"
|
|
610
616
|
}),
|
|
611
|
-
dots:
|
|
612
|
-
anchor:
|
|
613
|
-
win:
|
|
614
|
-
loss:
|
|
615
|
-
draw:
|
|
616
|
-
tooltip:
|
|
617
|
+
dots: o({ display: "flex", gap: "3px", justifyContent: "center" }),
|
|
618
|
+
anchor: o({ display: "inline-flex", cursor: "pointer" }),
|
|
619
|
+
win: o(le, { backgroundColor: r.success }),
|
|
620
|
+
loss: o(le, { backgroundColor: r.danger }),
|
|
621
|
+
draw: o(le, { backgroundColor: r.neutral }),
|
|
622
|
+
tooltip: o({
|
|
617
623
|
position: "fixed",
|
|
618
624
|
// A variable, so the RTL plugin still flips it to `right`; `tipInset` is mirrored to match.
|
|
619
625
|
left: "var(--fu-st-tip-x)",
|
|
@@ -625,150 +631,150 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
625
631
|
gap: "4px",
|
|
626
632
|
padding: "8px 12px",
|
|
627
633
|
width: "max-content",
|
|
628
|
-
borderRadius:
|
|
629
|
-
backgroundColor:
|
|
630
|
-
border: `1px solid ${
|
|
634
|
+
borderRadius: r.radiusSm,
|
|
635
|
+
backgroundColor: r.surface,
|
|
636
|
+
border: `1px solid ${r.border}`,
|
|
631
637
|
boxShadow: "0 6px 20px rgba(0, 0, 0, 0.16)",
|
|
632
638
|
fontSize: "1em",
|
|
633
639
|
pointerEvents: "none"
|
|
634
640
|
}),
|
|
635
|
-
kickoff:
|
|
636
|
-
fontFamily:
|
|
641
|
+
kickoff: o(F, {
|
|
642
|
+
fontFamily: r.fontSecondary,
|
|
637
643
|
fontSize: "0.6875em",
|
|
638
|
-
color:
|
|
644
|
+
color: r.textSecondary,
|
|
639
645
|
whiteSpace: "nowrap"
|
|
640
646
|
}),
|
|
641
|
-
match:
|
|
642
|
-
teamName:
|
|
643
|
-
score:
|
|
644
|
-
logo:
|
|
647
|
+
match: o({ display: "flex", alignItems: "center", gap: "6px" }),
|
|
648
|
+
teamName: o(ze, { unicodeBidi: "plaintext" }),
|
|
649
|
+
score: o(ze, { fontWeight: 700 }),
|
|
650
|
+
logo: o({ width: "16px", height: "16px", objectFit: "contain", flexShrink: 0 })
|
|
645
651
|
}, Zt = ({
|
|
646
652
|
teamName: e,
|
|
647
653
|
teamLogoUrl: t,
|
|
648
654
|
matches: n,
|
|
649
|
-
loading:
|
|
655
|
+
loading: a
|
|
650
656
|
}) => {
|
|
651
|
-
const { t:
|
|
652
|
-
if (
|
|
653
|
-
return /* @__PURE__ */ s("div", { css:
|
|
657
|
+
const { t: i, i18n: p } = oe("common"), { shadowRootElement: f } = lt(ct), u = Ze(), [m, g] = K(null), c = He([]), d = [...n].reverse();
|
|
658
|
+
if (a)
|
|
659
|
+
return /* @__PURE__ */ s("div", { css: D.center, children: /* @__PURE__ */ s(ot, {}) });
|
|
654
660
|
if (!d.length)
|
|
655
|
-
return /* @__PURE__ */ s("p", { css:
|
|
656
|
-
const
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
}, h =
|
|
660
|
-
|
|
661
|
-
Math.min(w, window.innerWidth -
|
|
662
|
-
) : w, v = u && typeof window < "u" ? window.innerWidth -
|
|
663
|
-
return /* @__PURE__ */
|
|
664
|
-
d.map((b,
|
|
661
|
+
return /* @__PURE__ */ s("p", { css: D.empty, children: i("standings.formNotAvailable") });
|
|
662
|
+
const l = (b) => {
|
|
663
|
+
const T = c.current[b];
|
|
664
|
+
T && g({ index: b, rect: T.getBoundingClientRect() });
|
|
665
|
+
}, h = m ? d[m.index] : null, w = m ? m.rect.left + m.rect.width / 2 : 0, S = typeof window < "u" ? Math.max(
|
|
666
|
+
Ke / 2 + 8,
|
|
667
|
+
Math.min(w, window.innerWidth - Ke / 2 - 8)
|
|
668
|
+
) : w, v = u && typeof window < "u" ? window.innerWidth - S : S, k = m ? m.rect.top - 8 : 0;
|
|
669
|
+
return /* @__PURE__ */ x("div", { css: D.dots, onMouseLeave: () => g(null), children: [
|
|
670
|
+
d.map((b, T) => /* @__PURE__ */ s(
|
|
665
671
|
"span",
|
|
666
672
|
{
|
|
667
673
|
ref: (O) => {
|
|
668
|
-
c.current[
|
|
674
|
+
c.current[T] = O;
|
|
669
675
|
},
|
|
670
|
-
css:
|
|
671
|
-
onMouseEnter: () =>
|
|
672
|
-
children: /* @__PURE__ */ s("div", { css:
|
|
676
|
+
css: D.anchor,
|
|
677
|
+
onMouseEnter: () => l(T),
|
|
678
|
+
children: /* @__PURE__ */ s("div", { css: D[b.result] })
|
|
673
679
|
},
|
|
674
|
-
|
|
680
|
+
T
|
|
675
681
|
)),
|
|
676
|
-
|
|
682
|
+
m && h && ut(
|
|
677
683
|
/* @__PURE__ */ s(
|
|
678
684
|
"div",
|
|
679
685
|
{
|
|
680
|
-
css:
|
|
686
|
+
css: D.tooltip,
|
|
681
687
|
style: { "--fu-st-tip-x": `${v}px`, top: `${k}px` },
|
|
682
688
|
children: (() => {
|
|
683
|
-
const b = h.isHome,
|
|
684
|
-
return /* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */ s("p", { css:
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */ s("p", { css:
|
|
688
|
-
U && /* @__PURE__ */ s("img", { src: U, css:
|
|
689
|
-
/* @__PURE__ */
|
|
689
|
+
const b = h.isHome, T = b ? e : h.opponentName, O = b ? h.opponentName : e, U = b ? t : h.opponentLogoUrl, X = b ? h.opponentLogoUrl : t, y = b ? h.teamScore : h.opponentScore, N = b ? h.opponentScore : h.teamScore;
|
|
690
|
+
return /* @__PURE__ */ x(Z, { children: [
|
|
691
|
+
/* @__PURE__ */ s("p", { css: D.kickoff, children: Vt(h.kickoffAt, p.language) }),
|
|
692
|
+
/* @__PURE__ */ x("div", { css: D.match, children: [
|
|
693
|
+
/* @__PURE__ */ s("p", { css: D.teamName, children: T }),
|
|
694
|
+
U && /* @__PURE__ */ s("img", { src: U, css: D.logo }),
|
|
695
|
+
/* @__PURE__ */ x("p", { css: D.score, children: [
|
|
690
696
|
y,
|
|
691
697
|
" : ",
|
|
692
|
-
|
|
698
|
+
N
|
|
693
699
|
] }),
|
|
694
|
-
X && /* @__PURE__ */ s("img", { src: X, css:
|
|
695
|
-
/* @__PURE__ */ s("p", { css:
|
|
700
|
+
X && /* @__PURE__ */ s("img", { src: X, css: D.logo }),
|
|
701
|
+
/* @__PURE__ */ s("p", { css: D.teamName, children: O })
|
|
696
702
|
] })
|
|
697
703
|
] });
|
|
698
704
|
})()
|
|
699
705
|
}
|
|
700
706
|
),
|
|
701
|
-
|
|
707
|
+
f ?? document.body
|
|
702
708
|
)
|
|
703
709
|
] });
|
|
704
|
-
},
|
|
705
|
-
fontFamily:
|
|
710
|
+
}, _ = o({ height: "32px", padding: "10px 6px", borderBottom: `1px solid ${r.border}` }), Oe = o({ width: "4px", height: "100%", minHeight: "44px" }), Ne = o(F, {
|
|
711
|
+
fontFamily: r.fontPrimary,
|
|
706
712
|
fontWeight: 700,
|
|
707
713
|
fontSize: "0.8125em",
|
|
708
|
-
color:
|
|
714
|
+
color: r.text,
|
|
709
715
|
textAlign: "right"
|
|
710
|
-
}), Me =
|
|
711
|
-
fontFamily:
|
|
716
|
+
}), Me = o(F, {
|
|
717
|
+
fontFamily: r.fontSecondary,
|
|
712
718
|
fontSize: "0.75em",
|
|
713
|
-
color:
|
|
719
|
+
color: r.textBody,
|
|
714
720
|
textAlign: "center"
|
|
715
|
-
}),
|
|
716
|
-
fontFamily:
|
|
721
|
+
}), Ee = o(F, {
|
|
722
|
+
fontFamily: r.fontPrimary,
|
|
717
723
|
fontWeight: 700,
|
|
718
724
|
fontSize: "0.875em",
|
|
719
|
-
color:
|
|
725
|
+
color: r.primary,
|
|
720
726
|
textAlign: "center"
|
|
721
|
-
}), W =
|
|
722
|
-
fontFamily:
|
|
727
|
+
}), W = o(F, {
|
|
728
|
+
fontFamily: r.fontPrimary,
|
|
723
729
|
fontSize: "0.75em",
|
|
724
730
|
fontWeight: 700,
|
|
725
731
|
textAlign: "center"
|
|
726
|
-
}),
|
|
727
|
-
highlighted:
|
|
728
|
-
cell:
|
|
729
|
-
zoneCell:
|
|
730
|
-
rankCell:
|
|
731
|
-
teamCell:
|
|
732
|
-
goalsCell:
|
|
733
|
-
zoneBar: { regular:
|
|
732
|
+
}), H = { fontSize: "0.6875em" }, G = (e) => ({ row: e, last: o(e, { borderBottom: "none" }) }), L = {
|
|
733
|
+
highlighted: o({ backgroundColor: r.primary08 }),
|
|
734
|
+
cell: G(_),
|
|
735
|
+
zoneCell: G(o(_, { width: "4px", padding: 0 })),
|
|
736
|
+
rankCell: G(o(_, { padding: "10px 4px", textAlign: "center" })),
|
|
737
|
+
teamCell: G(o(_, { textAlign: "start" })),
|
|
738
|
+
goalsCell: G(o(_, { padding: "8px 6px" })),
|
|
739
|
+
zoneBar: { regular: Oe, compact: o(Oe, { minHeight: "30px" }) },
|
|
734
740
|
// Unconditional — every row, every group, whether showRankChange is on or off, uses
|
|
735
741
|
// this exact same fixed two-column layout. The badge slot's width is part of the grid
|
|
736
742
|
// template, not the badge's own rendered content, so the digit sits in the identical
|
|
737
743
|
// position in every single row, always.
|
|
738
|
-
rankGrid:
|
|
744
|
+
rankGrid: o({
|
|
739
745
|
display: "inline-grid",
|
|
740
746
|
gridTemplateColumns: "auto 10px",
|
|
741
747
|
alignItems: "center",
|
|
742
748
|
columnGap: "3px"
|
|
743
749
|
}),
|
|
744
|
-
rank: { regular:
|
|
745
|
-
stat: { regular: Me, compact:
|
|
746
|
-
headline: { regular:
|
|
750
|
+
rank: { regular: Ne, compact: o(Ne, H) },
|
|
751
|
+
stat: { regular: Me, compact: o(Me, H) },
|
|
752
|
+
headline: { regular: Ee, compact: o(Ee, { fontSize: "0.75em" }) },
|
|
747
753
|
difference: {
|
|
748
754
|
regular: {
|
|
749
|
-
positive:
|
|
750
|
-
negative:
|
|
751
|
-
even:
|
|
755
|
+
positive: o(W, { color: r.success }),
|
|
756
|
+
negative: o(W, { color: r.danger }),
|
|
757
|
+
even: o(W, { color: r.textSecondary })
|
|
752
758
|
},
|
|
753
759
|
compact: {
|
|
754
|
-
positive:
|
|
755
|
-
negative:
|
|
756
|
-
even:
|
|
760
|
+
positive: o(W, H, { color: r.success }),
|
|
761
|
+
negative: o(W, H, { color: r.danger }),
|
|
762
|
+
even: o(W, H, { color: r.textSecondary })
|
|
757
763
|
}
|
|
758
764
|
}
|
|
759
765
|
}, Xt = (e) => e.toFixed(3).replace(/^0(?=\.)/, ""), Qt = ({
|
|
760
766
|
row: e,
|
|
761
767
|
zone: t,
|
|
762
768
|
columns: n,
|
|
763
|
-
showRankChange:
|
|
764
|
-
highlighted:
|
|
769
|
+
showRankChange: a,
|
|
770
|
+
highlighted: i,
|
|
765
771
|
compact: p,
|
|
766
|
-
isLast:
|
|
772
|
+
isLast: f = !1,
|
|
767
773
|
form: u,
|
|
768
|
-
formLoading:
|
|
774
|
+
formLoading: m
|
|
769
775
|
}) => {
|
|
770
|
-
const g = p ? "compact" : "regular", c =
|
|
771
|
-
switch (
|
|
776
|
+
const g = p ? "compact" : "regular", c = f ? "last" : "row", d = (l) => {
|
|
777
|
+
switch (l) {
|
|
772
778
|
case "played":
|
|
773
779
|
return e.stats.played;
|
|
774
780
|
case "won":
|
|
@@ -790,60 +796,61 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
790
796
|
return e.stats.points;
|
|
791
797
|
}
|
|
792
798
|
};
|
|
793
|
-
return /* @__PURE__ */
|
|
799
|
+
return /* @__PURE__ */ x("tr", { css: i ? L.highlighted : void 0, children: [
|
|
794
800
|
/* @__PURE__ */ s("td", { css: L.zoneCell[c], children: /* @__PURE__ */ s("div", { css: L.zoneBar[g], style: { backgroundColor: (t == null ? void 0 : t.color) ?? "transparent" } }) }),
|
|
795
|
-
/* @__PURE__ */ s("td", { css: L.rankCell[c], children: /* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ s("td", { css: L.rankCell[c], children: /* @__PURE__ */ x("div", { css: L.rankGrid, children: [
|
|
796
802
|
/* @__PURE__ */ s("p", { css: L.rank[g], children: e.rank }),
|
|
797
|
-
|
|
803
|
+
a && /* @__PURE__ */ s(Ht, { rankChange: e.rankChange })
|
|
798
804
|
] }) }),
|
|
799
|
-
/* @__PURE__ */ s("td", { css: L.teamCell[c], children: /* @__PURE__ */ s(Gt, { row: e, highlighted:
|
|
800
|
-
n.map((
|
|
801
|
-
if (
|
|
802
|
-
return /* @__PURE__ */ s("td", { css: L.goalsCell[c], children: /* @__PURE__ */ s(jt, { stats: e.stats }) },
|
|
803
|
-
if (
|
|
804
|
-
const w = e.stats.goalsDifference,
|
|
805
|
-
return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: L.difference[g][
|
|
805
|
+
/* @__PURE__ */ s("td", { css: L.teamCell[c], children: /* @__PURE__ */ s(Gt, { row: e, highlighted: i, compact: p }) }),
|
|
806
|
+
n.map((l) => {
|
|
807
|
+
if (l.key === "goals")
|
|
808
|
+
return /* @__PURE__ */ s("td", { css: L.goalsCell[c], children: /* @__PURE__ */ s(jt, { stats: e.stats }) }, l.key);
|
|
809
|
+
if (l.key === "goalsDifference") {
|
|
810
|
+
const w = e.stats.goalsDifference, S = w > 0 ? "positive" : w < 0 ? "negative" : "even";
|
|
811
|
+
return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: L.difference[g][S], children: w > 0 ? te(`+${w}`) : te(w) }) }, l.key);
|
|
806
812
|
}
|
|
807
|
-
if (
|
|
813
|
+
if (l.key === "form")
|
|
808
814
|
return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s(
|
|
809
815
|
Zt,
|
|
810
816
|
{
|
|
811
817
|
teamName: e.teamName,
|
|
812
818
|
teamLogoUrl: e.logoUrl,
|
|
813
819
|
matches: u ?? [],
|
|
814
|
-
loading: !!
|
|
820
|
+
loading: !!m
|
|
815
821
|
}
|
|
816
|
-
) },
|
|
817
|
-
const h =
|
|
818
|
-
return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: h ? L.headline[g] : L.stat[g], children:
|
|
822
|
+
) }, l.key);
|
|
823
|
+
const h = l.key === "points" || l.key === "winPercentage";
|
|
824
|
+
return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: h ? L.headline[g] : L.stat[g], children: l.key === "winPercentage" ? Xt(d(l.key)) : d(l.key) }) }, l.key);
|
|
819
825
|
})
|
|
820
826
|
] });
|
|
821
|
-
}, Yt =
|
|
822
|
-
root:
|
|
827
|
+
}, Yt = o({ height: "1px", padding: 0, backgroundColor: r.border, border: "none" }), qt = ({ colSpan: e }) => /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: e, css: Yt }) }), J = {
|
|
828
|
+
root: o({
|
|
823
829
|
display: "flex",
|
|
824
830
|
flexWrap: "wrap",
|
|
825
|
-
gap: `${
|
|
826
|
-
padding: `${
|
|
827
|
-
borderTop: `1px solid ${
|
|
828
|
-
backgroundColor:
|
|
831
|
+
gap: `${r.spaceXs} ${r.spaceMd}`,
|
|
832
|
+
padding: `${r.spaceSm} ${r.spaceMd}`,
|
|
833
|
+
borderTop: `1px solid ${r.border}`,
|
|
834
|
+
backgroundColor: r.surface,
|
|
829
835
|
fontSize: "1em"
|
|
830
836
|
}),
|
|
831
|
-
item:
|
|
832
|
-
dot:
|
|
833
|
-
|
|
834
|
-
|
|
837
|
+
item: o({ display: "flex", alignItems: "center", gap: "6px" }),
|
|
838
|
+
dot: o({ width: "9px", height: "9px", borderRadius: "50%", flexShrink: 0 }),
|
|
839
|
+
// Client overrides and unrecognised zone keys are free text.
|
|
840
|
+
label: o(ne, { fontFamily: r.fontSecondary, fontSize: "0.6875em", color: r.textSecondary, unicodeBidi: "plaintext" })
|
|
841
|
+
}, qe = ({ zones: e, zoneLabels: t }) => {
|
|
835
842
|
const { t: n } = oe("common");
|
|
836
|
-
return e.length ? /* @__PURE__ */ s("div", { css: J.root, children: e.map((
|
|
837
|
-
const
|
|
838
|
-
return /* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */ s("div", { css: J.dot, style: { backgroundColor:
|
|
840
|
-
/* @__PURE__ */ s("p", { css: J.label, children:
|
|
841
|
-
] },
|
|
843
|
+
return e.length ? /* @__PURE__ */ s("div", { css: J.root, children: e.map((a) => {
|
|
844
|
+
const i = Xe(a.key), f = (i ? t == null ? void 0 : t[i] : void 0) ?? (i ? n(`standings.rules.${i}`, a.label) : a.label);
|
|
845
|
+
return /* @__PURE__ */ x("div", { css: J.item, children: [
|
|
846
|
+
/* @__PURE__ */ s("div", { css: J.dot, style: { backgroundColor: a.color } }),
|
|
847
|
+
/* @__PURE__ */ s("p", { css: J.label, children: f })
|
|
848
|
+
] }, a.key);
|
|
842
849
|
}) }) : null;
|
|
843
|
-
},
|
|
844
|
-
fontFamily:
|
|
845
|
-
borderRadius: `0 0 ${
|
|
846
|
-
}), ee =
|
|
850
|
+
}, We = o(Ye, {
|
|
851
|
+
fontFamily: r.fontBody,
|
|
852
|
+
borderRadius: `0 0 ${r.radiusMd} ${r.radiusMd}`
|
|
853
|
+
}), ee = o({
|
|
847
854
|
height: "32px",
|
|
848
855
|
padding: 0,
|
|
849
856
|
textAlign: "left",
|
|
@@ -851,101 +858,103 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
851
858
|
overflow: "hidden",
|
|
852
859
|
whiteSpace: "nowrap",
|
|
853
860
|
textOverflow: "ellipsis",
|
|
854
|
-
borderBottom: `1px solid ${
|
|
855
|
-
}), V =
|
|
861
|
+
borderBottom: `1px solid ${r.border}`
|
|
862
|
+
}), V = o({
|
|
856
863
|
display: "flex",
|
|
857
864
|
alignItems: "center",
|
|
858
865
|
justifyContent: "center",
|
|
859
866
|
padding: "0.625em 0.375em",
|
|
860
|
-
color:
|
|
861
|
-
fontFamily:
|
|
867
|
+
color: r.textSecondary,
|
|
868
|
+
fontFamily: r.fontPrimary,
|
|
862
869
|
fontWeight: 600,
|
|
863
870
|
fontSize: "0.625em",
|
|
864
871
|
textTransform: "uppercase",
|
|
865
872
|
letterSpacing: "0.5px",
|
|
866
873
|
whiteSpace: "nowrap"
|
|
867
|
-
}), ce = { padding: "0.375em" },
|
|
874
|
+
}), ce = { padding: "0.375em" }, fe = { justifyContent: "flex-start" }, Be = o(V, fe, {
|
|
868
875
|
textTransform: "none",
|
|
869
876
|
letterSpacing: "normal",
|
|
870
877
|
fontSize: "0.6875em",
|
|
871
878
|
fontWeight: 700,
|
|
872
|
-
color:
|
|
879
|
+
color: r.text
|
|
873
880
|
}), C = {
|
|
874
|
-
sheet: { tab:
|
|
875
|
-
scroll:
|
|
881
|
+
sheet: { tab: We, card: o(We, { borderRadius: r.radiusMd }) },
|
|
882
|
+
scroll: o({ overflowX: "auto" }),
|
|
876
883
|
// Joy's plain Table.
|
|
877
|
-
table:
|
|
884
|
+
table: o({
|
|
878
885
|
width: "100%",
|
|
879
886
|
borderSpacing: 0,
|
|
880
887
|
borderCollapse: "separate",
|
|
881
|
-
fontFamily:
|
|
888
|
+
fontFamily: r.fontBody,
|
|
882
889
|
fontSize: "1em",
|
|
883
890
|
fontWeight: 500,
|
|
884
891
|
lineHeight: 1.5,
|
|
885
|
-
color:
|
|
892
|
+
color: r.plainText,
|
|
886
893
|
tableLayout: "auto"
|
|
887
894
|
}),
|
|
888
895
|
th: ee,
|
|
889
|
-
zoneTh:
|
|
890
|
-
teamTh: { regular:
|
|
891
|
-
label: { regular: V, compact:
|
|
892
|
-
startLabel: { regular:
|
|
893
|
-
groupLabel: { regular:
|
|
896
|
+
zoneTh: o(ee, { width: "4px" }),
|
|
897
|
+
teamTh: { regular: o(ee, { minWidth: "160px" }), compact: o(ee, { minWidth: "90px" }) },
|
|
898
|
+
label: { regular: V, compact: o(V, ce) },
|
|
899
|
+
startLabel: { regular: o(V, fe), compact: o(V, fe, ce) },
|
|
900
|
+
groupLabel: { regular: Be, compact: o(Be, ce) },
|
|
901
|
+
// The label boxes are flex, so the name needs its own inline box to isolate.
|
|
902
|
+
cmsText: o({ unicodeBidi: "plaintext" }),
|
|
894
903
|
// Same fixed two-column grid as every rank cell below, always — so "#" lines up with
|
|
895
904
|
// the digits exactly, unconditionally.
|
|
896
|
-
rankGrid:
|
|
897
|
-
hash:
|
|
898
|
-
},
|
|
905
|
+
rankGrid: o({ display: "inline-grid", gridTemplateColumns: "auto 10px", columnGap: "3px" }),
|
|
906
|
+
hash: o({ textAlign: "end" })
|
|
907
|
+
}, he = ({
|
|
899
908
|
group: e,
|
|
900
909
|
columns: t,
|
|
901
910
|
showRankChange: n = !1,
|
|
902
|
-
showLegend:
|
|
903
|
-
highlightedCompetitorIds:
|
|
911
|
+
showLegend: a = !0,
|
|
912
|
+
highlightedCompetitorIds: i,
|
|
904
913
|
compact: p = !1,
|
|
905
|
-
groupLabel:
|
|
914
|
+
groupLabel: f,
|
|
906
915
|
zoneLabels: u,
|
|
907
|
-
formByTeamId:
|
|
916
|
+
formByTeamId: m,
|
|
908
917
|
formLoading: g,
|
|
909
918
|
sport: c
|
|
910
919
|
}) => {
|
|
911
|
-
const { t: d } = oe("common"),
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */ s("div", { css: C.scroll, children: /* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */
|
|
915
|
-
|
|
920
|
+
const { t: d } = oe("common"), l = _t(t, c, e.hasPoints), h = new Map(e.zones.map((v) => [v.key, v])), w = 3 + l.length, S = p ? "compact" : "regular";
|
|
921
|
+
return /* @__PURE__ */ x("div", { css: f ? C.sheet.card : C.sheet.tab, children: [
|
|
922
|
+
/* @__PURE__ */ s("div", { css: C.scroll, children: /* @__PURE__ */ x("table", { css: C.table, children: [
|
|
923
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ x("tr", { children: [
|
|
924
|
+
f ? /* @__PURE__ */ s("th", { colSpan: 3, css: C.teamTh[S], children: /* @__PURE__ */ s("div", { css: C.groupLabel[S], children: /* @__PURE__ */ s("span", { css: C.cmsText, children: f }) }) }) : /* @__PURE__ */ x(Z, { children: [
|
|
916
925
|
/* @__PURE__ */ s("th", { css: C.zoneTh }),
|
|
917
|
-
/* @__PURE__ */ s("th", { css: C.th, title: d("leaderboard.position"), children: /* @__PURE__ */ s("div", { css: C.label[
|
|
926
|
+
/* @__PURE__ */ s("th", { css: C.th, title: d("leaderboard.position"), children: /* @__PURE__ */ s("div", { css: C.label[S], children: /* @__PURE__ */ x("div", { css: C.rankGrid, children: [
|
|
918
927
|
/* @__PURE__ */ s("span", { css: C.hash, children: "#" }),
|
|
919
928
|
/* @__PURE__ */ s("span", {})
|
|
920
929
|
] }) }) }),
|
|
921
|
-
/* @__PURE__ */ s("th", { css: C.teamTh[
|
|
930
|
+
/* @__PURE__ */ s("th", { css: C.teamTh[S], children: /* @__PURE__ */ s("div", { css: C.startLabel[S], children: d("standings.columns.team") }) })
|
|
922
931
|
] }),
|
|
923
|
-
|
|
932
|
+
l.map((v) => /* @__PURE__ */ s("th", { css: C.th, title: d(v.fullLabelKey), children: /* @__PURE__ */ s("div", { css: C.label[S], children: d(v.shortLabelKey) }) }, v.key))
|
|
924
933
|
] }) }),
|
|
925
934
|
/* @__PURE__ */ s("tbody", { children: e.rows.map((v, k) => {
|
|
926
|
-
const b = k > 0 ? e.rows[k - 1].zoneKey : null,
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
|
|
935
|
+
const b = k > 0 ? e.rows[k - 1].zoneKey : null, T = k > 0 && b !== v.zoneKey;
|
|
936
|
+
return /* @__PURE__ */ x(Ie.Fragment, { children: [
|
|
937
|
+
T && /* @__PURE__ */ s(qt, { colSpan: w }),
|
|
929
938
|
/* @__PURE__ */ s(
|
|
930
939
|
Qt,
|
|
931
940
|
{
|
|
932
941
|
row: v,
|
|
933
942
|
zone: v.zoneKey ? h.get(v.zoneKey) : void 0,
|
|
934
|
-
columns:
|
|
943
|
+
columns: l,
|
|
935
944
|
showRankChange: n,
|
|
936
|
-
highlighted: !!(
|
|
945
|
+
highlighted: !!(i != null && i.includes(v.competitorId)),
|
|
937
946
|
compact: p,
|
|
938
947
|
isLast: k === e.rows.length - 1,
|
|
939
|
-
form:
|
|
948
|
+
form: m == null ? void 0 : m[v.competitorId],
|
|
940
949
|
formLoading: g
|
|
941
950
|
}
|
|
942
951
|
)
|
|
943
952
|
] }, v.competitorId);
|
|
944
953
|
}) })
|
|
945
954
|
] }) }),
|
|
946
|
-
|
|
955
|
+
a && /* @__PURE__ */ s(qe, { zones: e.zones, zoneLabels: u })
|
|
947
956
|
] });
|
|
948
|
-
}, Ue =
|
|
957
|
+
}, Ue = o({
|
|
949
958
|
position: "relative",
|
|
950
959
|
display: "flex",
|
|
951
960
|
alignItems: "center",
|
|
@@ -956,8 +965,8 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
956
965
|
margin: 0,
|
|
957
966
|
padding: "0.375em 0.75em",
|
|
958
967
|
border: "1px solid transparent",
|
|
959
|
-
borderRadius:
|
|
960
|
-
fontFamily:
|
|
968
|
+
borderRadius: r.radiusFull,
|
|
969
|
+
fontFamily: r.fontPrimary,
|
|
961
970
|
fontWeight: 700,
|
|
962
971
|
fontSize: "0.75em",
|
|
963
972
|
lineHeight: 1,
|
|
@@ -971,18 +980,18 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
971
980
|
outlineOffset: "2px",
|
|
972
981
|
zIndex: 1
|
|
973
982
|
}
|
|
974
|
-
}),
|
|
983
|
+
}), B = {
|
|
975
984
|
// Joy's Tabs and TabPanel.
|
|
976
|
-
root:
|
|
985
|
+
root: o({
|
|
977
986
|
position: "relative",
|
|
978
987
|
display: "flex",
|
|
979
988
|
flexDirection: "column",
|
|
980
|
-
fontFamily:
|
|
989
|
+
fontFamily: r.fontBody,
|
|
981
990
|
fontSize: "1em",
|
|
982
991
|
lineHeight: 1.5,
|
|
983
|
-
color:
|
|
992
|
+
color: r.plainText
|
|
984
993
|
}),
|
|
985
|
-
list:
|
|
994
|
+
list: o({
|
|
986
995
|
position: "relative",
|
|
987
996
|
zIndex: 1,
|
|
988
997
|
display: "flex",
|
|
@@ -990,70 +999,72 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
990
999
|
gap: "0.25em",
|
|
991
1000
|
// Matches SeasonHeader's and ZoneLegend's own padding so the header, the tab
|
|
992
1001
|
// bar, and the legend all read as the same consistent band.
|
|
993
|
-
padding: `${
|
|
1002
|
+
padding: `${r.spaceSm} ${r.spaceMd}`,
|
|
994
1003
|
overflowX: "auto",
|
|
995
1004
|
scrollbarWidth: "none",
|
|
996
1005
|
// Joy's divider: the neutral channel at 20% (16% in dark mode).
|
|
997
1006
|
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.2)",
|
|
998
1007
|
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
999
1008
|
}),
|
|
1000
|
-
panel:
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1009
|
+
panel: o({ flexGrow: 1 }),
|
|
1010
|
+
// Stage/group names; the button is flex, so they need their own inline box.
|
|
1011
|
+
label: o({ unicodeBidi: "plaintext" }),
|
|
1012
|
+
on: o(Ue, { color: r.onPrimary, backgroundColor: r.primary }),
|
|
1013
|
+
off: o(Ue, {
|
|
1014
|
+
color: r.textSecondary,
|
|
1004
1015
|
backgroundColor: "transparent",
|
|
1005
|
-
"&:hover": { color:
|
|
1016
|
+
"&:hover": { color: r.primary, backgroundColor: r.surfaceVariant }
|
|
1006
1017
|
})
|
|
1007
|
-
},
|
|
1008
|
-
const n =
|
|
1018
|
+
}, Je = ({ labels: e, children: t }) => {
|
|
1019
|
+
const n = Ze(), a = st(), [i, p] = K(0), [f, u] = K(0), m = He([]), g = (d) => {
|
|
1009
1020
|
var h;
|
|
1010
|
-
const
|
|
1011
|
-
u(
|
|
1021
|
+
const l = (d + e.length) % e.length;
|
|
1022
|
+
u(l), (h = m.current[l]) == null || h.focus();
|
|
1012
1023
|
}, c = (d) => {
|
|
1013
|
-
const
|
|
1014
|
-
[
|
|
1015
|
-
[h]:
|
|
1024
|
+
const l = n ? "ArrowLeft" : "ArrowRight", h = n ? "ArrowRight" : "ArrowLeft", w = {
|
|
1025
|
+
[l]: f + 1,
|
|
1026
|
+
[h]: f - 1,
|
|
1016
1027
|
Home: 0,
|
|
1017
1028
|
End: e.length - 1
|
|
1018
1029
|
}[d.key];
|
|
1019
1030
|
w !== void 0 && (d.preventDefault(), g(w));
|
|
1020
1031
|
};
|
|
1021
|
-
return /* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */ s("div", { role: "tablist", "aria-orientation": "horizontal", css:
|
|
1032
|
+
return /* @__PURE__ */ x("div", { css: B.root, children: [
|
|
1033
|
+
/* @__PURE__ */ s("div", { role: "tablist", "aria-orientation": "horizontal", css: B.list, onKeyDown: c, children: e.map((d, l) => /* @__PURE__ */ s(
|
|
1023
1034
|
"button",
|
|
1024
1035
|
{
|
|
1025
1036
|
ref: (h) => {
|
|
1026
|
-
|
|
1037
|
+
m.current[l] = h;
|
|
1027
1038
|
},
|
|
1028
1039
|
type: "button",
|
|
1029
1040
|
role: "tab",
|
|
1030
|
-
id: `${
|
|
1031
|
-
"aria-selected":
|
|
1032
|
-
"aria-controls": `${
|
|
1033
|
-
tabIndex:
|
|
1034
|
-
css:
|
|
1035
|
-
onFocus: () => u(
|
|
1041
|
+
id: `${a}-tab-${l}`,
|
|
1042
|
+
"aria-selected": l === i,
|
|
1043
|
+
"aria-controls": `${a}-panel-${l}`,
|
|
1044
|
+
tabIndex: l === f ? 0 : -1,
|
|
1045
|
+
css: l === i ? B.on : B.off,
|
|
1046
|
+
onFocus: () => u(l),
|
|
1036
1047
|
onClick: () => {
|
|
1037
|
-
p(
|
|
1048
|
+
p(l), g(l);
|
|
1038
1049
|
},
|
|
1039
|
-
children: d
|
|
1050
|
+
children: /* @__PURE__ */ s("span", { css: B.label, children: d })
|
|
1040
1051
|
},
|
|
1041
|
-
|
|
1052
|
+
l
|
|
1042
1053
|
)) }),
|
|
1043
|
-
e.map((d,
|
|
1054
|
+
e.map((d, l) => /* @__PURE__ */ s(
|
|
1044
1055
|
"div",
|
|
1045
1056
|
{
|
|
1046
1057
|
role: "tabpanel",
|
|
1047
|
-
id: `${
|
|
1048
|
-
"aria-labelledby": `${
|
|
1049
|
-
hidden:
|
|
1050
|
-
css:
|
|
1051
|
-
children:
|
|
1058
|
+
id: `${a}-panel-${l}`,
|
|
1059
|
+
"aria-labelledby": `${a}-tab-${l}`,
|
|
1060
|
+
hidden: l !== i,
|
|
1061
|
+
css: B.panel,
|
|
1062
|
+
children: l === i && t(l)
|
|
1052
1063
|
},
|
|
1053
|
-
|
|
1064
|
+
l
|
|
1054
1065
|
))
|
|
1055
1066
|
] });
|
|
1056
|
-
}, Jt = ({ groups: e, ...t }) => /* @__PURE__ */ s(
|
|
1067
|
+
}, Jt = ({ groups: e, ...t }) => /* @__PURE__ */ s(Je, { labels: e.map((n, a) => n.name ?? `#${a + 1}`), children: (n) => /* @__PURE__ */ s(he, { group: e[n], ...t }) }), en = [
|
|
1057
1068
|
"won",
|
|
1058
1069
|
"drawn",
|
|
1059
1070
|
"lost",
|
|
@@ -1062,56 +1073,56 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1062
1073
|
group: e,
|
|
1063
1074
|
columns: t,
|
|
1064
1075
|
highlightedCompetitorIds: n,
|
|
1065
|
-
formByTeamId:
|
|
1066
|
-
formLoading:
|
|
1076
|
+
formByTeamId: a,
|
|
1077
|
+
formLoading: i,
|
|
1067
1078
|
sport: p
|
|
1068
1079
|
}) => /* @__PURE__ */ s(
|
|
1069
|
-
|
|
1080
|
+
he,
|
|
1070
1081
|
{
|
|
1071
1082
|
group: e,
|
|
1072
1083
|
columns: t ?? en,
|
|
1073
1084
|
showLegend: !1,
|
|
1074
1085
|
highlightedCompetitorIds: n,
|
|
1075
1086
|
groupLabel: e.name ?? void 0,
|
|
1076
|
-
formByTeamId:
|
|
1077
|
-
formLoading:
|
|
1087
|
+
formByTeamId: a,
|
|
1088
|
+
formLoading: i,
|
|
1078
1089
|
sport: p,
|
|
1079
1090
|
compact: !0
|
|
1080
1091
|
}
|
|
1081
1092
|
), nn = (e) => {
|
|
1082
1093
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1083
|
-
return e.forEach((
|
|
1084
|
-
|
|
1085
|
-
t.has(
|
|
1094
|
+
return e.forEach((a) => {
|
|
1095
|
+
a.zones.forEach((i) => {
|
|
1096
|
+
t.has(i.key) || (t.add(i.key), n.push(i));
|
|
1086
1097
|
});
|
|
1087
1098
|
}), n;
|
|
1088
|
-
}, on =
|
|
1099
|
+
}, on = o({
|
|
1089
1100
|
display: "grid",
|
|
1090
1101
|
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
1091
|
-
gap:
|
|
1092
|
-
padding:
|
|
1093
|
-
}),
|
|
1102
|
+
gap: r.spaceSm,
|
|
1103
|
+
padding: r.spaceSm
|
|
1104
|
+
}), et = ({
|
|
1094
1105
|
groups: e,
|
|
1095
1106
|
groupsView: t,
|
|
1096
1107
|
columns: n,
|
|
1097
|
-
showRankChange:
|
|
1098
|
-
showLegend:
|
|
1108
|
+
showRankChange: a,
|
|
1109
|
+
showLegend: i,
|
|
1099
1110
|
highlightedCompetitorIds: p,
|
|
1100
|
-
zoneLabels:
|
|
1111
|
+
zoneLabels: f,
|
|
1101
1112
|
formByTeamId: u,
|
|
1102
|
-
formLoading:
|
|
1113
|
+
formLoading: m,
|
|
1103
1114
|
sport: g
|
|
1104
1115
|
}) => e.length <= 1 ? /* @__PURE__ */ s(
|
|
1105
|
-
|
|
1116
|
+
he,
|
|
1106
1117
|
{
|
|
1107
1118
|
group: e[0],
|
|
1108
1119
|
columns: n,
|
|
1109
|
-
showRankChange:
|
|
1110
|
-
showLegend:
|
|
1120
|
+
showRankChange: a,
|
|
1121
|
+
showLegend: i,
|
|
1111
1122
|
highlightedCompetitorIds: p,
|
|
1112
|
-
zoneLabels:
|
|
1123
|
+
zoneLabels: f,
|
|
1113
1124
|
formByTeamId: u,
|
|
1114
|
-
formLoading:
|
|
1125
|
+
formLoading: m,
|
|
1115
1126
|
sport: g
|
|
1116
1127
|
}
|
|
1117
1128
|
) : t === "detailed" ? /* @__PURE__ */ s(
|
|
@@ -1119,15 +1130,15 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1119
1130
|
{
|
|
1120
1131
|
groups: e,
|
|
1121
1132
|
columns: n,
|
|
1122
|
-
showRankChange:
|
|
1123
|
-
showLegend:
|
|
1133
|
+
showRankChange: a,
|
|
1134
|
+
showLegend: i,
|
|
1124
1135
|
highlightedCompetitorIds: p,
|
|
1125
|
-
zoneLabels:
|
|
1136
|
+
zoneLabels: f,
|
|
1126
1137
|
formByTeamId: u,
|
|
1127
|
-
formLoading:
|
|
1138
|
+
formLoading: m,
|
|
1128
1139
|
sport: g
|
|
1129
1140
|
}
|
|
1130
|
-
) : /* @__PURE__ */
|
|
1141
|
+
) : /* @__PURE__ */ x(Z, { children: [
|
|
1131
1142
|
/* @__PURE__ */ s("div", { css: on, children: e.map((c, d) => /* @__PURE__ */ s(
|
|
1132
1143
|
tn,
|
|
1133
1144
|
{
|
|
@@ -1135,71 +1146,71 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1135
1146
|
columns: n,
|
|
1136
1147
|
highlightedCompetitorIds: p,
|
|
1137
1148
|
formByTeamId: u,
|
|
1138
|
-
formLoading:
|
|
1149
|
+
formLoading: m,
|
|
1139
1150
|
sport: g
|
|
1140
1151
|
},
|
|
1141
1152
|
c.id ?? c.name ?? d
|
|
1142
1153
|
)) }),
|
|
1143
|
-
|
|
1144
|
-
] }), rn = ({ stages: e, formByStageId: t, ...n }) => /* @__PURE__ */ s(
|
|
1145
|
-
|
|
1154
|
+
i && /* @__PURE__ */ s(qe, { zones: nn(e), zoneLabels: f })
|
|
1155
|
+
] }), rn = ({ stages: e, formByStageId: t, ...n }) => /* @__PURE__ */ s(Je, { labels: e.map((a, i) => a.name ?? `#${i + 1}`), children: (a) => /* @__PURE__ */ s(
|
|
1156
|
+
et,
|
|
1146
1157
|
{
|
|
1147
|
-
groups: e[
|
|
1148
|
-
formByTeamId: (t == null ? void 0 : t[e[
|
|
1158
|
+
groups: e[a].groups,
|
|
1159
|
+
formByTeamId: (t == null ? void 0 : t[e[a].id]) ?? {},
|
|
1149
1160
|
...n
|
|
1150
1161
|
}
|
|
1151
1162
|
) }), de = {
|
|
1152
|
-
root:
|
|
1153
|
-
message:
|
|
1154
|
-
fontFamily:
|
|
1163
|
+
root: o(Ye, { fontFamily: r.fontPrimary, borderRadius: r.radiusMd }),
|
|
1164
|
+
message: o(ne, {
|
|
1165
|
+
fontFamily: r.fontSecondary,
|
|
1155
1166
|
fontSize: "1em",
|
|
1156
|
-
color:
|
|
1167
|
+
color: r.textSecondary,
|
|
1157
1168
|
textAlign: "center",
|
|
1158
|
-
padding:
|
|
1169
|
+
padding: r.spaceLg
|
|
1159
1170
|
})
|
|
1160
1171
|
}, an = ({
|
|
1161
1172
|
entityId: e,
|
|
1162
1173
|
sdk: t,
|
|
1163
1174
|
language: n,
|
|
1164
|
-
stageId:
|
|
1165
|
-
showHeader:
|
|
1175
|
+
stageId: a,
|
|
1176
|
+
showHeader: i = !0,
|
|
1166
1177
|
showRankChange: p = !0,
|
|
1167
|
-
showLegend:
|
|
1178
|
+
showLegend: f = !0,
|
|
1168
1179
|
highlightedCompetitorIds: u,
|
|
1169
|
-
zoneColors:
|
|
1180
|
+
zoneColors: m,
|
|
1170
1181
|
zoneLabels: g,
|
|
1171
1182
|
columns: c,
|
|
1172
1183
|
groupsView: d = "overview",
|
|
1173
|
-
groupIds:
|
|
1184
|
+
groupIds: l,
|
|
1174
1185
|
seasonId: h,
|
|
1175
1186
|
range: w
|
|
1176
1187
|
}) => {
|
|
1177
|
-
var
|
|
1178
|
-
const { t:
|
|
1188
|
+
var we;
|
|
1189
|
+
const { t: S } = oe("common"), v = Ve(), k = Et(), { success: b, primary: T, warning: O, danger: U } = v.palette, X = j(
|
|
1179
1190
|
() => ({
|
|
1180
1191
|
success: b.plainColor,
|
|
1181
|
-
primary:
|
|
1192
|
+
primary: T.plainColor,
|
|
1182
1193
|
warning: O.plainColor,
|
|
1183
1194
|
danger: U.plainColor
|
|
1184
1195
|
}),
|
|
1185
1196
|
[
|
|
1186
1197
|
b.plainColor,
|
|
1187
|
-
|
|
1198
|
+
T.plainColor,
|
|
1188
1199
|
O.plainColor,
|
|
1189
1200
|
U.plainColor
|
|
1190
1201
|
]
|
|
1191
|
-
), { data: y, loading:
|
|
1202
|
+
), { data: y, loading: N, error: re } = Pt(
|
|
1192
1203
|
e,
|
|
1193
1204
|
t,
|
|
1194
1205
|
X,
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1206
|
+
S("standings.unknownTeam"),
|
|
1207
|
+
m,
|
|
1208
|
+
l,
|
|
1198
1209
|
h,
|
|
1199
1210
|
w,
|
|
1200
|
-
|
|
1201
|
-
), ae = !c || c.includes("form"),
|
|
1202
|
-
var
|
|
1211
|
+
a
|
|
1212
|
+
), ae = !c || c.includes("form"), tt = ((we = y == null ? void 0 : y.sport) == null ? void 0 : we.toLowerCase()) === "football", nt = j(() => !y || !ae ? [] : y.stages.map(($) => {
|
|
1213
|
+
var M, R;
|
|
1203
1214
|
const A = /* @__PURE__ */ new Set();
|
|
1204
1215
|
return $.groups.forEach(
|
|
1205
1216
|
(se) => se.rows.forEach((Q) => A.add(Q.competitorId))
|
|
@@ -1212,14 +1223,14 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1212
1223
|
// missing, default the upper bound to today rather than sending no `toDate` at
|
|
1213
1224
|
// all, which would let "last 5 matches" spill into a later season. Date-only, so
|
|
1214
1225
|
// the value (and useTeamsForm's effect key) doesn't change on every render.
|
|
1215
|
-
fromDate: $.startDate || ((
|
|
1226
|
+
fromDate: $.startDate || ((M = y.season) == null ? void 0 : M.startDate) || null,
|
|
1216
1227
|
toDate: $.endDate || ((R = y.season) == null ? void 0 : R.endDate) || (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
1217
1228
|
};
|
|
1218
|
-
}), [y, ae]),
|
|
1229
|
+
}), [y, ae]), ye = j(() => {
|
|
1219
1230
|
const $ = /* @__PURE__ */ new Map();
|
|
1220
1231
|
return y == null || y.stages.forEach(
|
|
1221
1232
|
(A) => A.groups.forEach(
|
|
1222
|
-
(
|
|
1233
|
+
(M) => M.rows.forEach((R) => {
|
|
1223
1234
|
$.set(R.competitorId, {
|
|
1224
1235
|
name: R.teamName,
|
|
1225
1236
|
logoUrl: R.logoUrl
|
|
@@ -1227,16 +1238,16 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1227
1238
|
})
|
|
1228
1239
|
)
|
|
1229
1240
|
), $;
|
|
1230
|
-
}, [y]), { formByStageAndTeam:
|
|
1231
|
-
const $ =
|
|
1241
|
+
}, [y]), { formByStageAndTeam: be, loading: xe } = Mt(t, nt, e, ae && tt), Se = j(() => {
|
|
1242
|
+
const $ = S("standings.unknownTeam");
|
|
1232
1243
|
return Object.fromEntries(
|
|
1233
|
-
Object.entries(
|
|
1244
|
+
Object.entries(be).map(([A, M]) => [
|
|
1234
1245
|
A,
|
|
1235
1246
|
Object.fromEntries(
|
|
1236
|
-
Object.entries(
|
|
1247
|
+
Object.entries(M).map(([R, se]) => [
|
|
1237
1248
|
R,
|
|
1238
1249
|
se.map((Q) => {
|
|
1239
|
-
const E =
|
|
1250
|
+
const E = ye.get(Q.opponentId);
|
|
1240
1251
|
return {
|
|
1241
1252
|
...Q,
|
|
1242
1253
|
opponentName: (E == null ? void 0 : E.name) ?? $,
|
|
@@ -1247,15 +1258,15 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1247
1258
|
)
|
|
1248
1259
|
])
|
|
1249
1260
|
);
|
|
1250
|
-
}, [
|
|
1261
|
+
}, [be, ye, S]), ve = !y || y.stages.every(
|
|
1251
1262
|
($) => $.groups.every((A) => A.rows.length === 0)
|
|
1252
1263
|
);
|
|
1253
|
-
return /* @__PURE__ */
|
|
1254
|
-
|
|
1255
|
-
!
|
|
1256
|
-
!
|
|
1257
|
-
!
|
|
1258
|
-
|
|
1264
|
+
return /* @__PURE__ */ x("div", { css: de.root, style: k, children: [
|
|
1265
|
+
N && /* @__PURE__ */ s(rt, { marginBlock: "80px" }),
|
|
1266
|
+
!N && re && /* @__PURE__ */ s("p", { css: de.message, children: S("standings.loadFailed") }),
|
|
1267
|
+
!N && !re && ve && /* @__PURE__ */ s("p", { css: de.message, children: S("standings.noStandingsAvailable") }),
|
|
1268
|
+
!N && !re && y && !ve && /* @__PURE__ */ x(Z, { children: [
|
|
1269
|
+
i && /* @__PURE__ */ s(
|
|
1259
1270
|
Wt,
|
|
1260
1271
|
{
|
|
1261
1272
|
title: y.competitionName,
|
|
@@ -1271,32 +1282,32 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1271
1282
|
groupsView: d,
|
|
1272
1283
|
columns: c,
|
|
1273
1284
|
showRankChange: p,
|
|
1274
|
-
showLegend:
|
|
1285
|
+
showLegend: f,
|
|
1275
1286
|
highlightedCompetitorIds: u,
|
|
1276
1287
|
zoneLabels: g,
|
|
1277
1288
|
formByStageId: Se,
|
|
1278
|
-
formLoading:
|
|
1289
|
+
formLoading: xe,
|
|
1279
1290
|
sport: y.sport
|
|
1280
1291
|
}
|
|
1281
1292
|
) : /* @__PURE__ */ s(
|
|
1282
|
-
|
|
1293
|
+
et,
|
|
1283
1294
|
{
|
|
1284
1295
|
groups: y.stages[0].groups,
|
|
1285
1296
|
groupsView: d,
|
|
1286
1297
|
columns: c,
|
|
1287
1298
|
showRankChange: p,
|
|
1288
|
-
showLegend:
|
|
1299
|
+
showLegend: f,
|
|
1289
1300
|
highlightedCompetitorIds: u,
|
|
1290
1301
|
zoneLabels: g,
|
|
1291
1302
|
formByTeamId: Se[y.stages[0].id] ?? {},
|
|
1292
|
-
formLoading:
|
|
1303
|
+
formLoading: xe,
|
|
1293
1304
|
sport: y.sport
|
|
1294
1305
|
}
|
|
1295
1306
|
)
|
|
1296
1307
|
] })
|
|
1297
1308
|
] });
|
|
1298
1309
|
}, sn = (e) => /* @__PURE__ */ s(
|
|
1299
|
-
|
|
1310
|
+
at,
|
|
1300
1311
|
{
|
|
1301
1312
|
packageName: "standings",
|
|
1302
1313
|
language: e.language,
|
|
@@ -1305,7 +1316,7 @@ const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " "
|
|
|
1305
1316
|
fillHeight: !0,
|
|
1306
1317
|
children: /* @__PURE__ */ s(an, { ...e })
|
|
1307
1318
|
}
|
|
1308
|
-
), bn =
|
|
1319
|
+
), bn = pt(sn);
|
|
1309
1320
|
export {
|
|
1310
1321
|
bn as Standings
|
|
1311
1322
|
};
|