fansunited-frontend-components 0.0.63 → 0.0.64
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/ClassicQuizPlay.js +6 -6
- package/CollectLead.js +1 -1
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +4 -4
- package/EventGamePlay.js +9 -9
- package/Leaderboard.js +4 -4
- package/MatchQuizPlay.js +10 -10
- package/PersonalityQuizPlay.js +6 -6
- package/PickThePair.js +1 -1
- package/PollVote.js +6 -6
- package/Predictor.js +8 -8
- package/Standings.js +263 -248
- package/TopX.js +7 -7
- package/chunks/{AlertMessage-AyMEW3JL.js → AlertMessage-D11oEBM7.js} +1 -1
- package/chunks/{Avatar-CBP4sabd.js → Avatar-DovSR8Yq.js} +1 -1
- package/chunks/{ChanceGameEmbedVariant-kBcjiKzu.js → ChanceGameEmbedVariant-B5vuzENl.js} +2 -2
- package/chunks/{createSvgIcon-C-cmTwJ_.js → CheckCircle-CL08EagS.js} +49 -42
- package/chunks/{Close-CS-wfAnO.js → Close-DEpdBZ1j.js} +1 -1
- package/chunks/{CollectLeadForm-DevgGzsO.js → CollectLeadForm-Bk9FHufQ.js} +21 -22
- package/chunks/{Divider-D6QU-XQ5.js → Divider-Chf8z_B5.js} +1 -1
- package/chunks/{Edit-B2N_Ry9g.js → Edit-BgKFqtbe.js} +1 -1
- package/chunks/{FormControl-D32DP14w.js → FormControl-bP5fF1j7.js} +2 -3
- package/chunks/{FormLabel-BYtvETHS.js → FormLabel-DpEd-_f0.js} +1 -1
- package/chunks/{Input-D81KBU9B.js → Input-ChSZLHkV.js} +1 -1
- package/chunks/{Notification-wXJmjBSg.js → Notification-6XYzwwD_.js} +1 -1
- package/chunks/{OverlayApiErrorSkeleton-DwV9wIov.js → OverlayApiErrorSkeleton-Dzn-4QeZ.js} +1 -1
- package/chunks/{Select-B_VR6iKu.js → Select-B3KaBu0K.js} +1 -2
- package/chunks/{SplitLeadAfterCollection-CowadlL1.js → SplitLeadAfterCollection-B37WSS2g.js} +1 -1
- package/chunks/{Textarea-DDJ2mdR3.js → Textarea-G02jGLI9.js} +1 -1
- package/chunks/index-6_qOtrSn.js +4 -0
- package/chunks/{main-C8ApxGVj.js → main-F7VbtZQQ.js} +7 -7
- package/chunks/{useForwardedInput-D2NH4BlT.js → useForwardedInput-Umu4U7f1.js} +1 -1
- package/index.js +88 -87
- package/package.json +2 -2
- package/chunks/CheckCircle-ByRrHC2p.js +0 -12
- package/chunks/index-8rxXfewU.js +0 -4
package/Standings.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as r, jsxs as b, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import P, { useState as O, useEffect as de, useMemo as
|
|
3
|
-
import { a as T, B as x, b as F, e as
|
|
2
|
+
import P, { useState as O, useEffect as de, useMemo as j, useRef as Ce } from "react";
|
|
3
|
+
import { a as T, B as x, b as F, e as $, u as G, c as U, m as we, n as ke, i as Le, f as Re, C as Te, g as De, E as ve, h as Ee } from "./chunks/PrizeCard-CjZXXFx3.js";
|
|
4
4
|
import { S as Pe } from "./chunks/Spinner-htM_pA9-.js";
|
|
5
5
|
import { createPortal as ue } from "react-dom";
|
|
6
6
|
import { h as Q, n as Fe } from "./chunks/helpers-B7-TtMzO.js";
|
|
7
7
|
import { a as ae } from "./chunks/index-BBrO1Htm.js";
|
|
8
|
-
import { E as
|
|
9
|
-
import { C as
|
|
8
|
+
import { E as Ke } from "./chunks/EmojiEvents-E7Oqv7rk.js";
|
|
9
|
+
import { C as Ae, T as L } from "./chunks/Typography-DjxaMiey.js";
|
|
10
10
|
import { a as ze } from "./chunks/Chip-DeEjQ2-F.js";
|
|
11
|
-
import {
|
|
12
|
-
import { S as me, T as $e } from "./chunks/Table-OBls_6ml.js";
|
|
11
|
+
import { S as me, T as Oe } from "./chunks/Table-OBls_6ml.js";
|
|
13
12
|
import { T as pe, a as fe, b as ge, c as he } from "./chunks/Tabs-DW1eIofJ.js";
|
|
14
13
|
const Ne = ({ size: e = 14 }) => {
|
|
15
14
|
const t = T(), n = t.palette.neutral.softBg, o = t.palette.neutral.solidBg;
|
|
16
15
|
return /* @__PURE__ */ r(x, { sx: { display: "inline-flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ r(
|
|
17
|
-
|
|
16
|
+
Ae,
|
|
18
17
|
{
|
|
19
18
|
size: "sm",
|
|
20
19
|
sx: { "--CircularProgress-size": `${e}px` },
|
|
@@ -32,7 +31,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
) });
|
|
35
|
-
},
|
|
34
|
+
}, $e = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().replace(
|
|
36
35
|
/\S+/g,
|
|
37
36
|
(n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()
|
|
38
37
|
), Me = [
|
|
@@ -53,10 +52,10 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
53
52
|
"championshipGroup",
|
|
54
53
|
"europaClGroup",
|
|
55
54
|
"relegationGroup"
|
|
56
|
-
], X = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""),
|
|
55
|
+
], X = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), Be = Me.reduce(
|
|
57
56
|
(e, t) => (e[X(t)] = t, e),
|
|
58
57
|
{}
|
|
59
|
-
), ye = (e) =>
|
|
58
|
+
), ye = (e) => Be[X(e)] ?? null, Ie = {
|
|
60
59
|
championsLeague: "primary",
|
|
61
60
|
championshipGroup: "primary",
|
|
62
61
|
playOffs: "primary",
|
|
@@ -74,15 +73,15 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
74
73
|
relegationPlayOffs: "warning",
|
|
75
74
|
relegationGroup: "warning",
|
|
76
75
|
relegation: "danger"
|
|
77
|
-
},
|
|
76
|
+
}, Ue = {
|
|
78
77
|
primary: 0,
|
|
79
78
|
success: 1,
|
|
80
79
|
warning: 2,
|
|
81
80
|
danger: 3
|
|
82
|
-
},
|
|
81
|
+
}, We = (e, t) => t === 0 ? e : `rgba(${Q(e)}, ${Math.max(0.25, 1 - t * 0.25)})`, _e = (e, t) => {
|
|
83
82
|
const n = X(e);
|
|
84
83
|
return n.includes("relegation") ? n.includes("playoff") || n.includes("group") ? "warning" : "danger" : t ? "primary" : "success";
|
|
85
|
-
},
|
|
84
|
+
}, He = (e, t, n) => {
|
|
86
85
|
const o = /* @__PURE__ */ new Map();
|
|
87
86
|
if (e.forEach((a, m) => {
|
|
88
87
|
if (!a) return;
|
|
@@ -94,20 +93,20 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
94
93
|
return m.reduce((g, h) => g + h, 0) / m.length;
|
|
95
94
|
}, c = Array.from(o.keys()).sort(
|
|
96
95
|
(a, m) => s(a) - s(m)
|
|
97
|
-
),
|
|
98
|
-
const g =
|
|
99
|
-
return g ?
|
|
96
|
+
), l = c.map((a) => ye(a)), i = c.map((a, m) => {
|
|
97
|
+
const g = l[m];
|
|
98
|
+
return g ? Ie[g] : _e(a, m === 0);
|
|
100
99
|
}), u = /* @__PURE__ */ new Map(), d = c.map((a, m) => {
|
|
101
|
-
const g =
|
|
102
|
-
return u.set(g, h + 1),
|
|
100
|
+
const g = i[m], h = u.get(g) ?? 0;
|
|
101
|
+
return u.set(g, h + 1), We(t[g], h);
|
|
103
102
|
});
|
|
104
103
|
return c.map((a, m) => {
|
|
105
|
-
const g =
|
|
104
|
+
const g = l[m], h = g ? n == null ? void 0 : n[g] : void 0;
|
|
106
105
|
return {
|
|
107
106
|
key: a,
|
|
108
107
|
color: h ?? d[m],
|
|
109
|
-
label:
|
|
110
|
-
tierRank:
|
|
108
|
+
label: $e(a),
|
|
109
|
+
tierRank: Ue[i[m]]
|
|
111
110
|
};
|
|
112
111
|
}).sort((a, m) => a.tierRank - m.tierRank).map(({ key: a, color: m, label: g }) => ({ key: a, color: m, label: g }));
|
|
113
112
|
}, je = (e, t) => {
|
|
@@ -121,97 +120,97 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
121
120
|
}, xe = (e) => {
|
|
122
121
|
var t;
|
|
123
122
|
return ((t = e == null ? void 0 : e.find((n) => n.key === "LOGO")) == null ? void 0 : t.value) ?? null;
|
|
124
|
-
},
|
|
123
|
+
}, N = (e, t) => {
|
|
125
124
|
const n = e.find((o) => {
|
|
126
125
|
var s;
|
|
127
126
|
return ((s = o.key) == null ? void 0 : s.toLowerCase()) === t;
|
|
128
127
|
});
|
|
129
128
|
return n && Number(n.value) || 0;
|
|
130
|
-
},
|
|
129
|
+
}, Ge = (e, t) => e.some((n) => {
|
|
131
130
|
var o;
|
|
132
131
|
return ((o = n.key) == null ? void 0 : o.toLowerCase()) === t;
|
|
133
|
-
}),
|
|
134
|
-
const t =
|
|
132
|
+
}), Ze = (e) => {
|
|
133
|
+
const t = N(e, "goals_for"), n = N(e, "goals_against"), o = N(e, "played"), s = N(e, "won");
|
|
135
134
|
return {
|
|
136
135
|
played: o,
|
|
137
136
|
won: s,
|
|
138
|
-
drawn:
|
|
139
|
-
lost:
|
|
137
|
+
drawn: N(e, "drawn"),
|
|
138
|
+
lost: N(e, "lost"),
|
|
140
139
|
goalsFor: t,
|
|
141
140
|
goalsAgainst: n,
|
|
142
141
|
// Derived rather than trusting the (possibly absent) goals_difference stat key.
|
|
143
142
|
goalsDifference: t - n,
|
|
144
|
-
points:
|
|
143
|
+
points: N(e, "points"),
|
|
145
144
|
winPercentage: o > 0 ? s / o : 0
|
|
146
145
|
};
|
|
147
|
-
},
|
|
146
|
+
}, Ve = (e, t) => t == null ? null : e === t ? "same" : e < t ? "up" : "down", Ye = (e, t) => {
|
|
148
147
|
var s;
|
|
149
148
|
const n = e.competitorModel, o = e.rank ?? 0;
|
|
150
149
|
return {
|
|
151
150
|
competitorId: e.competitorId,
|
|
152
151
|
rank: o,
|
|
153
152
|
lastRank: e.lastRank,
|
|
154
|
-
rankChange:
|
|
153
|
+
rankChange: Ve(o, e.lastRank),
|
|
155
154
|
teamName: (n == null ? void 0 : n.name) ?? t,
|
|
156
155
|
teamShortName: (n == null ? void 0 : n.shortName) ?? null,
|
|
157
156
|
logoUrl: xe(n == null ? void 0 : n.assets),
|
|
158
|
-
stats:
|
|
157
|
+
stats: Ze(e.stats ?? []),
|
|
159
158
|
zoneKey: ((s = e.rules) == null ? void 0 : s[0]) ?? null
|
|
160
159
|
};
|
|
161
|
-
},
|
|
160
|
+
}, Qe = (e, t, n) => {
|
|
162
161
|
if (t == null && n == null) return e;
|
|
163
162
|
const o = e.map((u) => u.rank ?? 0);
|
|
164
163
|
if (!o.length) return e;
|
|
165
|
-
const s = Math.min(...o), c = Math.max(...o),
|
|
164
|
+
const s = Math.min(...o), c = Math.max(...o), l = Math.max(t ?? s, s), i = Math.min(n ?? c, c);
|
|
166
165
|
return e.filter((u) => {
|
|
167
166
|
const d = u.rank ?? 0;
|
|
168
|
-
return d >=
|
|
167
|
+
return d >= l && d <= i;
|
|
169
168
|
});
|
|
170
|
-
},
|
|
171
|
-
const
|
|
172
|
-
|
|
169
|
+
}, Xe = (e, t, n, o, s, c) => {
|
|
170
|
+
const l = Qe(e.standings ?? [], s, c), i = l.map((a) => Ye(a, o)), u = He(
|
|
171
|
+
i.map((a) => a.zoneKey),
|
|
173
172
|
t,
|
|
174
173
|
n
|
|
175
|
-
), d =
|
|
176
|
-
(a) =>
|
|
174
|
+
), d = l.some(
|
|
175
|
+
(a) => Ge(a.stats ?? [], "points")
|
|
177
176
|
);
|
|
178
|
-
return { id: e.id, name: e.name, rows:
|
|
179
|
-
},
|
|
177
|
+
return { id: e.id, name: e.name, rows: i, zones: u, hasPoints: d };
|
|
178
|
+
}, qe = (e) => e ? {
|
|
180
179
|
name: e.name ?? null,
|
|
181
180
|
year: e.year ?? null,
|
|
182
181
|
startDate: e.startDate ?? null,
|
|
183
182
|
endDate: e.endDate ?? null
|
|
184
|
-
} : null,
|
|
183
|
+
} : null, Je = (e, t, n, o, s, c, l) => {
|
|
185
184
|
var d;
|
|
186
|
-
const
|
|
185
|
+
const i = e.groups ?? [], u = s && s.length ? i.filter(
|
|
187
186
|
(a) => a.id !== null && s.includes(a.id)
|
|
188
|
-
) :
|
|
187
|
+
) : i;
|
|
189
188
|
return {
|
|
190
189
|
id: e.id,
|
|
191
190
|
name: ((d = e.stageNameModel) == null ? void 0 : d.name) ?? null,
|
|
192
191
|
startDate: e.startDate ?? null,
|
|
193
192
|
endDate: e.endDate ?? null,
|
|
194
193
|
groups: u.map(
|
|
195
|
-
(a) =>
|
|
194
|
+
(a) => Xe(
|
|
196
195
|
a,
|
|
197
196
|
t,
|
|
198
197
|
n,
|
|
199
198
|
o,
|
|
200
199
|
c,
|
|
201
|
-
|
|
200
|
+
l
|
|
202
201
|
)
|
|
203
202
|
)
|
|
204
203
|
};
|
|
205
|
-
},
|
|
206
|
-
const d = je(e.season,
|
|
207
|
-
(a) =>
|
|
204
|
+
}, et = (e, t, n, o, s, c, l, i) => {
|
|
205
|
+
const d = je(e.season, i).map(
|
|
206
|
+
(a) => Je(
|
|
208
207
|
a,
|
|
209
208
|
t,
|
|
210
209
|
n,
|
|
211
210
|
o,
|
|
212
211
|
s,
|
|
213
212
|
c,
|
|
214
|
-
|
|
213
|
+
l
|
|
215
214
|
)
|
|
216
215
|
);
|
|
217
216
|
return {
|
|
@@ -219,16 +218,16 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
219
218
|
competitionName: e.name ?? e.shortName ?? e.id,
|
|
220
219
|
sport: e.sport ?? null,
|
|
221
220
|
logoUrl: xe(e.assets),
|
|
222
|
-
season:
|
|
221
|
+
season: qe(e.season),
|
|
223
222
|
stageFound: d.length > 0,
|
|
224
223
|
stages: d
|
|
225
224
|
};
|
|
226
|
-
},
|
|
225
|
+
}, tt = (e, t, n, o, s, c, l, i, u) => {
|
|
227
226
|
const [d, a] = O(null), [m, g] = O(!0), [h, C] = O(null);
|
|
228
227
|
return de(() => {
|
|
229
228
|
if (!e || !t) return;
|
|
230
229
|
let p = !1;
|
|
231
|
-
return g(!0), C(null), t.sports.getCompetitionById(e,
|
|
230
|
+
return g(!0), C(null), t.sports.getCompetitionById(e, l ? { seasonId: l } : void 0).then((f) => {
|
|
232
231
|
p || a(f);
|
|
233
232
|
}).catch((f) => {
|
|
234
233
|
p || C(Fe(f, t));
|
|
@@ -237,14 +236,14 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
237
236
|
}), () => {
|
|
238
237
|
p = !0;
|
|
239
238
|
};
|
|
240
|
-
}, [e, t,
|
|
239
|
+
}, [e, t, l]), { data: j(() => d ? et(
|
|
241
240
|
d,
|
|
242
241
|
n,
|
|
243
242
|
s,
|
|
244
243
|
o,
|
|
245
244
|
c,
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
i == null ? void 0 : i.startRank,
|
|
246
|
+
i == null ? void 0 : i.endRank,
|
|
248
247
|
u
|
|
249
248
|
) : null, [
|
|
250
249
|
d,
|
|
@@ -252,63 +251,63 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
252
251
|
s,
|
|
253
252
|
o,
|
|
254
253
|
c,
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
i == null ? void 0 : i.startRank,
|
|
255
|
+
i == null ? void 0 : i.endRank,
|
|
257
256
|
u
|
|
258
257
|
]), loading: m, error: h };
|
|
259
|
-
},
|
|
258
|
+
}, nt = 50, ot = (e, t) => e > t ? "win" : e < t ? "loss" : "draw", rt = (e, t) => {
|
|
260
259
|
var u, d;
|
|
261
|
-
const n = e.homeTeam.id === t, o = e.scores, s = Number(((u = o == null ? void 0 : o.ftScore) == null ? void 0 : u.homeGoals) ?? 0), c = Number(((d = o == null ? void 0 : o.ftScore) == null ? void 0 : d.awayGoals) ?? 0),
|
|
260
|
+
const n = e.homeTeam.id === t, o = e.scores, s = Number(((u = o == null ? void 0 : o.ftScore) == null ? void 0 : u.homeGoals) ?? 0), c = Number(((d = o == null ? void 0 : o.ftScore) == null ? void 0 : d.awayGoals) ?? 0), l = n ? s : c, i = n ? c : s;
|
|
262
261
|
return {
|
|
263
|
-
result:
|
|
262
|
+
result: ot(l, i),
|
|
264
263
|
isHome: n,
|
|
265
264
|
opponentId: n ? e.awayTeam.id : e.homeTeam.id,
|
|
266
|
-
teamScore:
|
|
267
|
-
opponentScore:
|
|
265
|
+
teamScore: l,
|
|
266
|
+
opponentScore: i,
|
|
268
267
|
kickoffAt: e.kickoffAt
|
|
269
268
|
};
|
|
270
|
-
}, se = 12,
|
|
269
|
+
}, se = 12, at = (e, t) => {
|
|
271
270
|
const n = new Date(e);
|
|
272
271
|
return n.setUTCHours(n.getUTCHours() + t), n.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
273
272
|
}, le = (e, t) => {
|
|
274
273
|
if (!e) return null;
|
|
275
274
|
const s = `${e.slice(0, 10)}T${t === "start" ? "00:00:00" : "23:59:59"}Z`;
|
|
276
|
-
return
|
|
275
|
+
return at(
|
|
277
276
|
s,
|
|
278
277
|
t === "start" ? -se : se
|
|
279
278
|
);
|
|
280
|
-
},
|
|
279
|
+
}, st = (e) => e.map(
|
|
281
280
|
(t) => `${t.stageId}:${t.teamIds.join(",")}:${t.fromDate ?? ""}:${t.toDate ?? ""}`
|
|
282
|
-
).join("|"),
|
|
283
|
-
var
|
|
281
|
+
).join("|"), lt = async (e, t, n) => {
|
|
282
|
+
var i, u;
|
|
284
283
|
const o = {
|
|
285
284
|
competitionIds: [n],
|
|
286
285
|
status: "finished",
|
|
287
286
|
sortField: "date",
|
|
288
287
|
sortOrder: "desc",
|
|
289
|
-
limit:
|
|
288
|
+
limit: nt,
|
|
290
289
|
fromDate: le(t.fromDate, "start"),
|
|
291
290
|
toDate: le(t.toDate, "end")
|
|
292
291
|
}, s = await e.football.getMatches(
|
|
293
292
|
new ae({ ...o, page: 1 })
|
|
294
|
-
), c = [...s.data ?? []],
|
|
295
|
-
return
|
|
293
|
+
), c = [...s.data ?? []], l = ((u = (i = s.meta) == null ? void 0 : i.pagination) == null ? void 0 : u.numberOfPages) ?? 1;
|
|
294
|
+
return l > 1 && (await Promise.all(
|
|
296
295
|
Array.from(
|
|
297
|
-
{ length:
|
|
296
|
+
{ length: l - 1 },
|
|
298
297
|
(a, m) => e.football.getMatches(new ae({ ...o, page: m + 2 })).then((g) => g.data ?? []).catch(() => [])
|
|
299
298
|
)
|
|
300
299
|
)).forEach((a) => c.push(...a)), c;
|
|
301
|
-
},
|
|
302
|
-
const [s, c] = O({}), [
|
|
300
|
+
}, it = (e, t, n, o) => {
|
|
301
|
+
const [s, c] = O({}), [l, i] = O(!1), u = st(t);
|
|
303
302
|
return de(() => {
|
|
304
303
|
if (!o || !t.length) {
|
|
305
|
-
c({}),
|
|
304
|
+
c({}), i(!1);
|
|
306
305
|
return;
|
|
307
306
|
}
|
|
308
307
|
let d = !1;
|
|
309
|
-
return
|
|
308
|
+
return i(!0), Promise.all(
|
|
310
309
|
t.map(
|
|
311
|
-
(a) =>
|
|
310
|
+
(a) => lt(e, a, n).then((m) => [a.stageId, a.teamIds, m]).catch(
|
|
312
311
|
() => [a.stageId, a.teamIds, []]
|
|
313
312
|
)
|
|
314
313
|
)
|
|
@@ -321,13 +320,13 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
321
320
|
h.forEach((p) => {
|
|
322
321
|
S[p] = C.filter(
|
|
323
322
|
(f) => f.homeTeam.id === p || f.awayTeam.id === p
|
|
324
|
-
).slice(0, 5).map((f) =>
|
|
323
|
+
).slice(0, 5).map((f) => rt(f, p));
|
|
325
324
|
}), m[g] = S;
|
|
326
|
-
}), c(m),
|
|
325
|
+
}), c(m), i(!1);
|
|
327
326
|
}), () => {
|
|
328
327
|
d = !0;
|
|
329
328
|
};
|
|
330
|
-
}, [e, u, n, o]), { formByStageAndTeam: s, loading:
|
|
329
|
+
}, [e, u, n, o]), { formByStageAndTeam: s, loading: l };
|
|
331
330
|
}, ie = (e, t) => {
|
|
332
331
|
if (!e) return null;
|
|
333
332
|
const n = new Date(e);
|
|
@@ -336,31 +335,39 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
336
335
|
month: "short",
|
|
337
336
|
year: "numeric"
|
|
338
337
|
});
|
|
339
|
-
},
|
|
338
|
+
}, ct = ({
|
|
340
339
|
title: e,
|
|
341
340
|
logoUrl: t,
|
|
342
341
|
season: n,
|
|
343
342
|
language: o
|
|
344
343
|
}) => {
|
|
345
|
-
const s = T(), c = F(),
|
|
344
|
+
const s = T(), c = F(), l = $(), i = ie((n == null ? void 0 : n.startDate) ?? null, o), u = ie((n == null ? void 0 : n.endDate) ?? null, o), d = i && u ? `${i} – ${u}` : null, a = (n == null ? void 0 : n.year) ?? (n == null ? void 0 : n.name) ?? null;
|
|
346
345
|
return /* @__PURE__ */ b(
|
|
347
346
|
x,
|
|
348
347
|
{
|
|
349
348
|
sx: {
|
|
350
349
|
display: "flex",
|
|
351
350
|
alignItems: "center",
|
|
352
|
-
gap:
|
|
351
|
+
gap: l.sm,
|
|
353
352
|
// Matches the group/stage tabs' and ZoneLegend's own padding so the header,
|
|
354
353
|
// the tab pills, and the legend all read as the same consistent band.
|
|
355
|
-
paddingLeft:
|
|
356
|
-
paddingRight:
|
|
357
|
-
paddingTop:
|
|
358
|
-
paddingBottom:
|
|
354
|
+
paddingLeft: l.md,
|
|
355
|
+
paddingRight: l.md,
|
|
356
|
+
paddingTop: l.sm,
|
|
357
|
+
paddingBottom: l.sm,
|
|
359
358
|
borderBottom: `1px solid ${s.outlineEnabledBorder}`,
|
|
360
359
|
backgroundColor: s.surface
|
|
361
360
|
},
|
|
362
361
|
children: [
|
|
363
|
-
/* @__PURE__ */ r(
|
|
362
|
+
t ? /* @__PURE__ */ r(
|
|
363
|
+
x,
|
|
364
|
+
{
|
|
365
|
+
component: "img",
|
|
366
|
+
src: t,
|
|
367
|
+
alt: e,
|
|
368
|
+
sx: { width: 36, height: 36, objectFit: "contain", flexShrink: 0 }
|
|
369
|
+
}
|
|
370
|
+
) : /* @__PURE__ */ r(
|
|
364
371
|
x,
|
|
365
372
|
{
|
|
366
373
|
sx: {
|
|
@@ -368,23 +375,14 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
368
375
|
height: 36,
|
|
369
376
|
borderRadius: "6px",
|
|
370
377
|
backgroundColor: s.surfaceVariant,
|
|
371
|
-
border: `1px solid ${s.outlineEnabledBorder}`,
|
|
372
378
|
display: "flex",
|
|
373
379
|
alignItems: "center",
|
|
374
380
|
justifyContent: "center",
|
|
375
381
|
flexShrink: 0,
|
|
376
382
|
overflow: "hidden"
|
|
377
383
|
},
|
|
378
|
-
children:
|
|
379
|
-
|
|
380
|
-
{
|
|
381
|
-
component: "img",
|
|
382
|
-
src: t,
|
|
383
|
-
alt: e,
|
|
384
|
-
sx: { width: "100%", height: "100%", objectFit: "contain" }
|
|
385
|
-
}
|
|
386
|
-
) : /* @__PURE__ */ r(
|
|
387
|
-
Ae,
|
|
384
|
+
children: /* @__PURE__ */ r(
|
|
385
|
+
Ke,
|
|
388
386
|
{
|
|
389
387
|
sx: { fontSize: "1.25em", color: s.textSecondary }
|
|
390
388
|
}
|
|
@@ -398,7 +396,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
398
396
|
sx: {
|
|
399
397
|
display: "flex",
|
|
400
398
|
alignItems: "center",
|
|
401
|
-
gap:
|
|
399
|
+
gap: l.xs,
|
|
402
400
|
flexWrap: "wrap"
|
|
403
401
|
},
|
|
404
402
|
children: [
|
|
@@ -488,7 +486,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
488
486
|
shortLabelKey: "standings.columns.form",
|
|
489
487
|
fullLabelKey: "standings.columns.form"
|
|
490
488
|
}
|
|
491
|
-
],
|
|
489
|
+
], dt = [
|
|
492
490
|
{
|
|
493
491
|
key: "goalsFor",
|
|
494
492
|
shortLabelKey: "standings.columns.goalsForShort",
|
|
@@ -504,21 +502,21 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
504
502
|
shortLabelKey: "standings.columns.goalsDifferenceShort",
|
|
505
503
|
fullLabelKey: "standings.columns.goalsDifference"
|
|
506
504
|
}
|
|
507
|
-
],
|
|
505
|
+
], ut = [
|
|
508
506
|
...Y.slice(0, 5),
|
|
509
|
-
...
|
|
507
|
+
...dt,
|
|
510
508
|
...Y.slice(5)
|
|
511
|
-
],
|
|
509
|
+
], mt = {
|
|
512
510
|
hockey: ["drawn", "form"],
|
|
513
511
|
// No ties, no goal-based scoring (points are the score itself, not a standings-only
|
|
514
512
|
// stat), and no match-event data yet — leaves just played/won/lost/points.
|
|
515
513
|
basketball: ["drawn", "form", "goals", "goalsFor", "goalsAgainst", "goalsDifference"]
|
|
516
|
-
},
|
|
514
|
+
}, pt = (e, t, n = !0) => {
|
|
517
515
|
const o = new Set(
|
|
518
|
-
t ?
|
|
516
|
+
t ? mt[t.toLowerCase()] ?? [] : []
|
|
519
517
|
);
|
|
520
|
-
return o.add(n ? "winPercentage" : "points"), (!e || e.length === 0 ? Y :
|
|
521
|
-
},
|
|
518
|
+
return o.add(n ? "winPercentage" : "points"), (!e || e.length === 0 ? Y : ut.filter((c) => e.includes(c.key))).filter((c) => !o.has(c.key));
|
|
519
|
+
}, ft = ({ rankChange: e }) => {
|
|
522
520
|
const t = T();
|
|
523
521
|
if (e === null || e === "same")
|
|
524
522
|
return /* @__PURE__ */ r(I, {});
|
|
@@ -536,8 +534,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
536
534
|
children: n
|
|
537
535
|
}
|
|
538
536
|
);
|
|
539
|
-
},
|
|
540
|
-
const o = T(), s = F(), c =
|
|
537
|
+
}, gt = ({ row: e, highlighted: t, compact: n }) => {
|
|
538
|
+
const o = T(), s = F(), c = $(), l = n ? 22 : 28, i = (e.teamShortName ?? e.teamName).slice(0, 2).toUpperCase();
|
|
541
539
|
return /* @__PURE__ */ b(
|
|
542
540
|
x,
|
|
543
541
|
{
|
|
@@ -556,21 +554,38 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
556
554
|
maxWidth: n ? "90px" : "160px"
|
|
557
555
|
},
|
|
558
556
|
children: [
|
|
559
|
-
/* @__PURE__ */ r(
|
|
560
|
-
|
|
557
|
+
e.logoUrl ? /* @__PURE__ */ r(
|
|
558
|
+
x,
|
|
561
559
|
{
|
|
562
|
-
|
|
560
|
+
component: "img",
|
|
561
|
+
src: e.logoUrl,
|
|
562
|
+
alt: e.teamName,
|
|
563
563
|
sx: {
|
|
564
|
-
width:
|
|
565
|
-
height:
|
|
566
|
-
|
|
567
|
-
|
|
564
|
+
width: l,
|
|
565
|
+
height: l,
|
|
566
|
+
objectFit: "contain",
|
|
567
|
+
flexShrink: 0
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
) : /* @__PURE__ */ r(
|
|
571
|
+
x,
|
|
572
|
+
{
|
|
573
|
+
sx: {
|
|
574
|
+
width: l,
|
|
575
|
+
height: l,
|
|
576
|
+
display: "flex",
|
|
577
|
+
alignItems: "center",
|
|
578
|
+
justifyContent: "center",
|
|
579
|
+
borderRadius: "4px",
|
|
568
580
|
backgroundColor: o.surfaceVariant,
|
|
569
581
|
color: o.textSecondary,
|
|
570
|
-
|
|
582
|
+
fontFamily: s.primary,
|
|
583
|
+
fontSize: "0.4375em",
|
|
584
|
+
fontWeight: 700,
|
|
585
|
+
lineHeight: 1,
|
|
571
586
|
flexShrink: 0
|
|
572
587
|
},
|
|
573
|
-
children:
|
|
588
|
+
children: i
|
|
574
589
|
}
|
|
575
590
|
),
|
|
576
591
|
/* @__PURE__ */ r(
|
|
@@ -592,7 +607,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
592
607
|
]
|
|
593
608
|
}
|
|
594
609
|
);
|
|
595
|
-
},
|
|
610
|
+
}, ht = ({ stats: e }) => {
|
|
596
611
|
const t = T(), n = F(), o = e.goalsDifference > 0 ? t.palette.success.plainColor : e.goalsDifference < 0 ? t.palette.danger.plainColor : t.textSecondary, s = e.goalsDifference > 0 ? `+${e.goalsDifference}` : `${e.goalsDifference}`;
|
|
597
612
|
return /* @__PURE__ */ b(
|
|
598
613
|
x,
|
|
@@ -635,7 +650,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
635
650
|
]
|
|
636
651
|
}
|
|
637
652
|
);
|
|
638
|
-
}, ce = 200,
|
|
653
|
+
}, ce = 200, yt = (e, t) => {
|
|
639
654
|
const n = new Date(e);
|
|
640
655
|
if (Number.isNaN(n.getTime())) return "";
|
|
641
656
|
const o = n.toLocaleDateString(t, {
|
|
@@ -647,13 +662,13 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
647
662
|
minute: "2-digit"
|
|
648
663
|
});
|
|
649
664
|
return `${o} · ${s}`;
|
|
650
|
-
},
|
|
665
|
+
}, xt = ({
|
|
651
666
|
teamName: e,
|
|
652
667
|
teamLogoUrl: t,
|
|
653
668
|
matches: n,
|
|
654
669
|
loading: o
|
|
655
670
|
}) => {
|
|
656
|
-
const { t: s, i18n: c } =
|
|
671
|
+
const { t: s, i18n: c } = G("common"), l = T(), i = F(), u = U(), { shadowRootElement: d } = we(ke), [a, m] = O(null), g = Ce([]), h = [...n].reverse();
|
|
657
672
|
if (o)
|
|
658
673
|
return /* @__PURE__ */ r(x, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(Ne, {}) });
|
|
659
674
|
if (!h.length)
|
|
@@ -661,25 +676,25 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
661
676
|
L,
|
|
662
677
|
{
|
|
663
678
|
sx: {
|
|
664
|
-
fontFamily:
|
|
679
|
+
fontFamily: i.secondary,
|
|
665
680
|
fontSize: "0.75em",
|
|
666
|
-
color:
|
|
681
|
+
color: l.textSecondary,
|
|
667
682
|
textAlign: "center"
|
|
668
683
|
},
|
|
669
684
|
children: s("standings.formNotAvailable")
|
|
670
685
|
}
|
|
671
686
|
);
|
|
672
|
-
const C = (k) => k === "win" ?
|
|
687
|
+
const C = (k) => k === "win" ? l.palette.success.plainColor : k === "loss" ? l.palette.danger.plainColor : l.palette.neutral.plainColor, S = (k) => {
|
|
673
688
|
const R = g.current[k];
|
|
674
689
|
R && m({ index: k, rect: R.getBoundingClientRect() });
|
|
675
|
-
}, p = a ? h[a.index] : null, f = a ? a.rect.left + a.rect.width / 2 : 0,
|
|
690
|
+
}, p = a ? h[a.index] : null, f = a ? a.rect.left + a.rect.width / 2 : 0, D = typeof window < "u" ? Math.max(
|
|
676
691
|
ce / 2 + 8,
|
|
677
692
|
Math.min(f, window.innerWidth - ce / 2 - 8)
|
|
678
|
-
) : f,
|
|
679
|
-
fontFamily:
|
|
693
|
+
) : f, v = a ? a.rect.top - 8 : 0, w = {
|
|
694
|
+
fontFamily: i.primary,
|
|
680
695
|
fontWeight: 600,
|
|
681
696
|
fontSize: "0.8125em",
|
|
682
|
-
color:
|
|
697
|
+
color: l.textPrimary,
|
|
683
698
|
whiteSpace: "nowrap"
|
|
684
699
|
}, y = {
|
|
685
700
|
width: 16,
|
|
@@ -697,8 +712,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
697
712
|
x,
|
|
698
713
|
{
|
|
699
714
|
component: "span",
|
|
700
|
-
ref: (
|
|
701
|
-
g.current[R] =
|
|
715
|
+
ref: (K) => {
|
|
716
|
+
g.current[R] = K;
|
|
702
717
|
},
|
|
703
718
|
sx: { display: "inline-flex", cursor: "pointer" },
|
|
704
719
|
onMouseEnter: () => S(R),
|
|
@@ -722,8 +737,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
722
737
|
{
|
|
723
738
|
sx: {
|
|
724
739
|
position: "fixed",
|
|
725
|
-
left: `${
|
|
726
|
-
top: `${
|
|
740
|
+
left: `${D}px`,
|
|
741
|
+
top: `${v}px`,
|
|
727
742
|
transform: "translate(-50%, -100%)",
|
|
728
743
|
zIndex: 9999,
|
|
729
744
|
display: "flex",
|
|
@@ -733,38 +748,38 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
733
748
|
padding: "8px 12px",
|
|
734
749
|
width: "max-content",
|
|
735
750
|
borderRadius: u.sm,
|
|
736
|
-
backgroundColor:
|
|
737
|
-
border: `1px solid ${
|
|
751
|
+
backgroundColor: l.surface,
|
|
752
|
+
border: `1px solid ${l.outlineEnabledBorder}`,
|
|
738
753
|
boxShadow: "0 6px 20px rgba(0, 0, 0, 0.16)",
|
|
739
754
|
fontSize: "1em",
|
|
740
755
|
pointerEvents: "none"
|
|
741
756
|
},
|
|
742
757
|
children: (() => {
|
|
743
|
-
const k = p.isHome ? e : p.opponentName, R = p.isHome ? p.opponentName : e,
|
|
758
|
+
const k = p.isHome ? e : p.opponentName, R = p.isHome ? p.opponentName : e, K = p.isHome ? t : p.opponentLogoUrl, W = p.isHome ? p.opponentLogoUrl : t, Z = p.isHome ? p.teamScore : p.opponentScore, _ = p.isHome ? p.opponentScore : p.teamScore;
|
|
744
759
|
return /* @__PURE__ */ b(I, { children: [
|
|
745
760
|
/* @__PURE__ */ r(
|
|
746
761
|
L,
|
|
747
762
|
{
|
|
748
763
|
sx: {
|
|
749
|
-
fontFamily:
|
|
764
|
+
fontFamily: i.secondary,
|
|
750
765
|
fontSize: "0.6875em",
|
|
751
|
-
color:
|
|
766
|
+
color: l.textSecondary,
|
|
752
767
|
whiteSpace: "nowrap"
|
|
753
768
|
},
|
|
754
|
-
children:
|
|
769
|
+
children: yt(p.kickoffAt, c.language)
|
|
755
770
|
}
|
|
756
771
|
),
|
|
757
772
|
/* @__PURE__ */ b(x, { sx: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
758
773
|
/* @__PURE__ */ r(L, { sx: w, children: k }),
|
|
759
|
-
|
|
774
|
+
K && /* @__PURE__ */ r(x, { component: "img", src: K, sx: y }),
|
|
760
775
|
/* @__PURE__ */ b(
|
|
761
776
|
L,
|
|
762
777
|
{
|
|
763
778
|
sx: {
|
|
764
|
-
fontFamily:
|
|
779
|
+
fontFamily: i.primary,
|
|
765
780
|
fontWeight: 700,
|
|
766
781
|
fontSize: "0.8125em",
|
|
767
|
-
color:
|
|
782
|
+
color: l.textPrimary,
|
|
768
783
|
whiteSpace: "nowrap"
|
|
769
784
|
},
|
|
770
785
|
children: [
|
|
@@ -786,18 +801,18 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
786
801
|
]
|
|
787
802
|
}
|
|
788
803
|
);
|
|
789
|
-
},
|
|
804
|
+
}, St = ({
|
|
790
805
|
row: e,
|
|
791
806
|
zone: t,
|
|
792
807
|
columns: n,
|
|
793
808
|
showRankChange: o,
|
|
794
809
|
highlighted: s,
|
|
795
810
|
compact: c,
|
|
796
|
-
isLast:
|
|
797
|
-
form:
|
|
811
|
+
isLast: l = !1,
|
|
812
|
+
form: i,
|
|
798
813
|
formLoading: u
|
|
799
814
|
}) => {
|
|
800
|
-
const d = T(), a = F(), m =
|
|
815
|
+
const d = T(), a = F(), m = l ? "none" : `1px solid ${d.outlineEnabledBorder}`, g = {
|
|
801
816
|
fontFamily: a.secondary,
|
|
802
817
|
fontSize: c ? "0.6875em" : "0.75em",
|
|
803
818
|
color: d.textBody,
|
|
@@ -866,16 +881,16 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
866
881
|
children: e.rank
|
|
867
882
|
}
|
|
868
883
|
),
|
|
869
|
-
o && /* @__PURE__ */ r(
|
|
884
|
+
o && /* @__PURE__ */ r(ft, { rankChange: e.rankChange })
|
|
870
885
|
]
|
|
871
886
|
}
|
|
872
887
|
) }),
|
|
873
|
-
/* @__PURE__ */ r("td", { style: { padding: "10px 6px", textAlign: "left", borderBottom: m }, children: /* @__PURE__ */ r(
|
|
888
|
+
/* @__PURE__ */ r("td", { style: { padding: "10px 6px", textAlign: "left", borderBottom: m }, children: /* @__PURE__ */ r(gt, { row: e, highlighted: s, compact: c }) }),
|
|
874
889
|
n.map((f) => {
|
|
875
890
|
if (f.key === "goals")
|
|
876
|
-
return /* @__PURE__ */ r("td", { style: { padding: "8px 6px", borderBottom: m }, children: /* @__PURE__ */ r(
|
|
891
|
+
return /* @__PURE__ */ r("td", { style: { padding: "8px 6px", borderBottom: m }, children: /* @__PURE__ */ r(ht, { stats: e.stats }) }, f.key);
|
|
877
892
|
if (f.key === "goalsDifference") {
|
|
878
|
-
const
|
|
893
|
+
const v = e.stats.goalsDifference;
|
|
879
894
|
return /* @__PURE__ */ r("td", { style: { padding: "10px 6px", borderBottom: m }, children: /* @__PURE__ */ r(
|
|
880
895
|
L,
|
|
881
896
|
{
|
|
@@ -883,28 +898,28 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
883
898
|
fontFamily: a.primary,
|
|
884
899
|
fontSize: c ? "0.6875em" : "0.75em",
|
|
885
900
|
fontWeight: 700,
|
|
886
|
-
color: S(
|
|
901
|
+
color: S(v),
|
|
887
902
|
textAlign: "center"
|
|
888
903
|
},
|
|
889
|
-
children: p(
|
|
904
|
+
children: p(v)
|
|
890
905
|
}
|
|
891
906
|
) }, f.key);
|
|
892
907
|
}
|
|
893
908
|
if (f.key === "form")
|
|
894
909
|
return /* @__PURE__ */ r("td", { style: { padding: "10px 6px", borderBottom: m }, children: /* @__PURE__ */ r(
|
|
895
|
-
|
|
910
|
+
xt,
|
|
896
911
|
{
|
|
897
912
|
teamName: e.teamName,
|
|
898
913
|
teamLogoUrl: e.logoUrl,
|
|
899
|
-
matches:
|
|
914
|
+
matches: i ?? [],
|
|
900
915
|
loading: !!u
|
|
901
916
|
}
|
|
902
917
|
) }, f.key);
|
|
903
|
-
const
|
|
918
|
+
const D = f.key === "points" || f.key === "winPercentage";
|
|
904
919
|
return /* @__PURE__ */ r("td", { style: { padding: "10px 6px", borderBottom: m }, children: /* @__PURE__ */ r(
|
|
905
920
|
L,
|
|
906
921
|
{
|
|
907
|
-
sx:
|
|
922
|
+
sx: D ? {
|
|
908
923
|
fontFamily: a.primary,
|
|
909
924
|
fontWeight: 700,
|
|
910
925
|
fontSize: c ? "0.75em" : "0.875em",
|
|
@@ -918,7 +933,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
918
933
|
]
|
|
919
934
|
}
|
|
920
935
|
);
|
|
921
|
-
},
|
|
936
|
+
}, bt = ({ colSpan: e }) => {
|
|
922
937
|
const t = T();
|
|
923
938
|
return /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r(
|
|
924
939
|
"td",
|
|
@@ -933,7 +948,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
933
948
|
}
|
|
934
949
|
) });
|
|
935
950
|
}, Se = ({ zones: e, zoneLabels: t }) => {
|
|
936
|
-
const { t: n } =
|
|
951
|
+
const { t: n } = G("common"), o = T(), s = F(), c = $();
|
|
937
952
|
return e.length ? /* @__PURE__ */ r(
|
|
938
953
|
x,
|
|
939
954
|
{
|
|
@@ -946,8 +961,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
946
961
|
backgroundColor: o.surface,
|
|
947
962
|
fontSize: "1em"
|
|
948
963
|
},
|
|
949
|
-
children: e.map((
|
|
950
|
-
const
|
|
964
|
+
children: e.map((l) => {
|
|
965
|
+
const i = ye(l.key), d = (i ? t == null ? void 0 : t[i] : void 0) ?? (i ? n(`standings.rules.${i}`, l.label) : l.label);
|
|
951
966
|
return /* @__PURE__ */ b(
|
|
952
967
|
x,
|
|
953
968
|
{
|
|
@@ -961,7 +976,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
961
976
|
height: 9,
|
|
962
977
|
borderRadius: "50%",
|
|
963
978
|
flexShrink: 0,
|
|
964
|
-
backgroundColor:
|
|
979
|
+
backgroundColor: l.color
|
|
965
980
|
}
|
|
966
981
|
}
|
|
967
982
|
),
|
|
@@ -978,7 +993,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
978
993
|
)
|
|
979
994
|
]
|
|
980
995
|
},
|
|
981
|
-
|
|
996
|
+
l.key
|
|
982
997
|
);
|
|
983
998
|
})
|
|
984
999
|
}
|
|
@@ -990,17 +1005,17 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
990
1005
|
showLegend: o = !0,
|
|
991
1006
|
highlightedCompetitorIds: s,
|
|
992
1007
|
compact: c = !1,
|
|
993
|
-
groupLabel:
|
|
994
|
-
zoneLabels:
|
|
1008
|
+
groupLabel: l,
|
|
1009
|
+
zoneLabels: i,
|
|
995
1010
|
formByTeamId: u,
|
|
996
1011
|
formLoading: d,
|
|
997
1012
|
sport: a
|
|
998
1013
|
}) => {
|
|
999
|
-
const { t: m } =
|
|
1014
|
+
const { t: m } = G("common"), g = T(), h = F(), C = U(), S = pt(t, a, e.hasPoints), p = new Map(e.zones.map((w) => [w.key, w])), f = 3 + S.length, D = {
|
|
1000
1015
|
backgroundColor: "transparent",
|
|
1001
1016
|
borderBottom: `1px solid ${g.outlineEnabledBorder}`,
|
|
1002
1017
|
padding: 0
|
|
1003
|
-
},
|
|
1018
|
+
}, v = (w = "center") => ({
|
|
1004
1019
|
display: "flex",
|
|
1005
1020
|
alignItems: "center",
|
|
1006
1021
|
justifyContent: w === "left" ? "flex-start" : "center",
|
|
@@ -1019,14 +1034,14 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1019
1034
|
variant: "outlined",
|
|
1020
1035
|
sx: {
|
|
1021
1036
|
fontSize: "1em",
|
|
1022
|
-
borderRadius:
|
|
1037
|
+
borderRadius: l ? C.md : `0 0 ${C.md} ${C.md}`,
|
|
1023
1038
|
overflow: "hidden",
|
|
1024
1039
|
backgroundColor: g.surface,
|
|
1025
1040
|
borderColor: g.outlineEnabledBorder
|
|
1026
1041
|
},
|
|
1027
1042
|
children: [
|
|
1028
1043
|
/* @__PURE__ */ r(x, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ b(
|
|
1029
|
-
|
|
1044
|
+
Oe,
|
|
1030
1045
|
{
|
|
1031
1046
|
variant: "plain",
|
|
1032
1047
|
borderAxis: "none",
|
|
@@ -1046,29 +1061,29 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1046
1061
|
},
|
|
1047
1062
|
children: [
|
|
1048
1063
|
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ b("tr", { children: [
|
|
1049
|
-
|
|
1064
|
+
l ? /* @__PURE__ */ r(
|
|
1050
1065
|
"th",
|
|
1051
1066
|
{
|
|
1052
1067
|
colSpan: 3,
|
|
1053
|
-
style: { ...
|
|
1068
|
+
style: { ...D, minWidth: c ? 90 : 160 },
|
|
1054
1069
|
children: /* @__PURE__ */ r(
|
|
1055
1070
|
x,
|
|
1056
1071
|
{
|
|
1057
1072
|
sx: {
|
|
1058
|
-
...
|
|
1073
|
+
...v("left"),
|
|
1059
1074
|
textTransform: "none",
|
|
1060
1075
|
letterSpacing: "normal",
|
|
1061
1076
|
fontSize: "0.6875em",
|
|
1062
1077
|
fontWeight: 700,
|
|
1063
1078
|
color: g.textPrimary
|
|
1064
1079
|
},
|
|
1065
|
-
children:
|
|
1080
|
+
children: l
|
|
1066
1081
|
}
|
|
1067
1082
|
)
|
|
1068
1083
|
}
|
|
1069
1084
|
) : /* @__PURE__ */ b(I, { children: [
|
|
1070
|
-
/* @__PURE__ */ r("th", { style: { ...
|
|
1071
|
-
/* @__PURE__ */ r("th", { style:
|
|
1085
|
+
/* @__PURE__ */ r("th", { style: { ...D, width: 4, padding: 0 } }),
|
|
1086
|
+
/* @__PURE__ */ r("th", { style: D, title: m("leaderboard.position"), children: /* @__PURE__ */ r(x, { sx: v(), children: /* @__PURE__ */ b(
|
|
1072
1087
|
x,
|
|
1073
1088
|
{
|
|
1074
1089
|
sx: {
|
|
@@ -1082,14 +1097,14 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1082
1097
|
]
|
|
1083
1098
|
}
|
|
1084
1099
|
) }) }),
|
|
1085
|
-
/* @__PURE__ */ r("th", { style: { ...
|
|
1100
|
+
/* @__PURE__ */ r("th", { style: { ...D, minWidth: c ? 90 : 160 }, children: /* @__PURE__ */ r(x, { sx: v("left"), children: m("standings.columns.team") }) })
|
|
1086
1101
|
] }),
|
|
1087
1102
|
S.map((w) => /* @__PURE__ */ r(
|
|
1088
1103
|
"th",
|
|
1089
1104
|
{
|
|
1090
|
-
style:
|
|
1105
|
+
style: D,
|
|
1091
1106
|
title: m(w.fullLabelKey),
|
|
1092
|
-
children: /* @__PURE__ */ r(x, { sx:
|
|
1107
|
+
children: /* @__PURE__ */ r(x, { sx: v(), children: m(w.shortLabelKey) })
|
|
1093
1108
|
},
|
|
1094
1109
|
w.key
|
|
1095
1110
|
))
|
|
@@ -1097,9 +1112,9 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1097
1112
|
/* @__PURE__ */ r("tbody", { children: e.rows.map((w, y) => {
|
|
1098
1113
|
const k = y > 0 ? e.rows[y - 1].zoneKey : null, R = y > 0 && k !== w.zoneKey;
|
|
1099
1114
|
return /* @__PURE__ */ b(P.Fragment, { children: [
|
|
1100
|
-
R && /* @__PURE__ */ r(
|
|
1115
|
+
R && /* @__PURE__ */ r(bt, { colSpan: f }),
|
|
1101
1116
|
/* @__PURE__ */ r(
|
|
1102
|
-
|
|
1117
|
+
St,
|
|
1103
1118
|
{
|
|
1104
1119
|
row: w,
|
|
1105
1120
|
zone: w.zoneKey ? p.get(w.zoneKey) : void 0,
|
|
@@ -1117,22 +1132,22 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1117
1132
|
]
|
|
1118
1133
|
}
|
|
1119
1134
|
) }),
|
|
1120
|
-
o && /* @__PURE__ */ r(Se, { zones: e.zones, zoneLabels:
|
|
1135
|
+
o && /* @__PURE__ */ r(Se, { zones: e.zones, zoneLabels: i })
|
|
1121
1136
|
]
|
|
1122
1137
|
}
|
|
1123
1138
|
);
|
|
1124
|
-
},
|
|
1139
|
+
}, Ct = ({
|
|
1125
1140
|
groups: e,
|
|
1126
1141
|
columns: t,
|
|
1127
1142
|
showRankChange: n,
|
|
1128
1143
|
showLegend: o,
|
|
1129
1144
|
highlightedCompetitorIds: s,
|
|
1130
1145
|
zoneLabels: c,
|
|
1131
|
-
formByTeamId:
|
|
1132
|
-
formLoading:
|
|
1146
|
+
formByTeamId: l,
|
|
1147
|
+
formLoading: i,
|
|
1133
1148
|
sport: u
|
|
1134
1149
|
}) => {
|
|
1135
|
-
const d = T(), a = F(), m = U(), g =
|
|
1150
|
+
const d = T(), a = F(), m = U(), g = $(), [h, C] = O(0);
|
|
1136
1151
|
return /* @__PURE__ */ b(
|
|
1137
1152
|
pe,
|
|
1138
1153
|
{
|
|
@@ -1214,8 +1229,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1214
1229
|
showLegend: o,
|
|
1215
1230
|
highlightedCompetitorIds: s,
|
|
1216
1231
|
zoneLabels: c,
|
|
1217
|
-
formByTeamId:
|
|
1218
|
-
formLoading:
|
|
1232
|
+
formByTeamId: l,
|
|
1233
|
+
formLoading: i,
|
|
1219
1234
|
sport: u
|
|
1220
1235
|
}
|
|
1221
1236
|
)
|
|
@@ -1225,12 +1240,12 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1225
1240
|
]
|
|
1226
1241
|
}
|
|
1227
1242
|
);
|
|
1228
|
-
},
|
|
1243
|
+
}, wt = [
|
|
1229
1244
|
"won",
|
|
1230
1245
|
"drawn",
|
|
1231
1246
|
"lost",
|
|
1232
1247
|
"points"
|
|
1233
|
-
],
|
|
1248
|
+
], kt = ({
|
|
1234
1249
|
group: e,
|
|
1235
1250
|
columns: t,
|
|
1236
1251
|
highlightedCompetitorIds: n,
|
|
@@ -1241,7 +1256,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1241
1256
|
q,
|
|
1242
1257
|
{
|
|
1243
1258
|
group: e,
|
|
1244
|
-
columns: t ??
|
|
1259
|
+
columns: t ?? wt,
|
|
1245
1260
|
showLegend: !1,
|
|
1246
1261
|
highlightedCompetitorIds: n,
|
|
1247
1262
|
groupLabel: e.name ?? void 0,
|
|
@@ -1250,7 +1265,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1250
1265
|
sport: c,
|
|
1251
1266
|
compact: !0
|
|
1252
1267
|
}
|
|
1253
|
-
),
|
|
1268
|
+
), Lt = (e) => {
|
|
1254
1269
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1255
1270
|
return e.forEach((o) => {
|
|
1256
1271
|
o.zones.forEach((s) => {
|
|
@@ -1264,12 +1279,12 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1264
1279
|
showRankChange: o,
|
|
1265
1280
|
showLegend: s,
|
|
1266
1281
|
highlightedCompetitorIds: c,
|
|
1267
|
-
zoneLabels:
|
|
1268
|
-
formByTeamId:
|
|
1282
|
+
zoneLabels: l,
|
|
1283
|
+
formByTeamId: i,
|
|
1269
1284
|
formLoading: u,
|
|
1270
1285
|
sport: d
|
|
1271
1286
|
}) => {
|
|
1272
|
-
const a =
|
|
1287
|
+
const a = $();
|
|
1273
1288
|
return e.length <= 1 ? /* @__PURE__ */ r(
|
|
1274
1289
|
q,
|
|
1275
1290
|
{
|
|
@@ -1278,21 +1293,21 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1278
1293
|
showRankChange: o,
|
|
1279
1294
|
showLegend: s,
|
|
1280
1295
|
highlightedCompetitorIds: c,
|
|
1281
|
-
zoneLabels:
|
|
1282
|
-
formByTeamId:
|
|
1296
|
+
zoneLabels: l,
|
|
1297
|
+
formByTeamId: i,
|
|
1283
1298
|
formLoading: u,
|
|
1284
1299
|
sport: d
|
|
1285
1300
|
}
|
|
1286
1301
|
) : t === "detailed" ? /* @__PURE__ */ r(
|
|
1287
|
-
|
|
1302
|
+
Ct,
|
|
1288
1303
|
{
|
|
1289
1304
|
groups: e,
|
|
1290
1305
|
columns: n,
|
|
1291
1306
|
showRankChange: o,
|
|
1292
1307
|
showLegend: s,
|
|
1293
1308
|
highlightedCompetitorIds: c,
|
|
1294
|
-
zoneLabels:
|
|
1295
|
-
formByTeamId:
|
|
1309
|
+
zoneLabels: l,
|
|
1310
|
+
formByTeamId: i,
|
|
1296
1311
|
formLoading: u,
|
|
1297
1312
|
sport: d
|
|
1298
1313
|
}
|
|
@@ -1307,12 +1322,12 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1307
1322
|
padding: a.sm
|
|
1308
1323
|
},
|
|
1309
1324
|
children: e.map((m, g) => /* @__PURE__ */ r(
|
|
1310
|
-
|
|
1325
|
+
kt,
|
|
1311
1326
|
{
|
|
1312
1327
|
group: m,
|
|
1313
1328
|
columns: n,
|
|
1314
1329
|
highlightedCompetitorIds: c,
|
|
1315
|
-
formByTeamId:
|
|
1330
|
+
formByTeamId: i,
|
|
1316
1331
|
formLoading: u,
|
|
1317
1332
|
sport: d
|
|
1318
1333
|
},
|
|
@@ -1320,21 +1335,21 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1320
1335
|
))
|
|
1321
1336
|
}
|
|
1322
1337
|
),
|
|
1323
|
-
s && /* @__PURE__ */ r(Se, { zones:
|
|
1338
|
+
s && /* @__PURE__ */ r(Se, { zones: Lt(e), zoneLabels: l })
|
|
1324
1339
|
] });
|
|
1325
|
-
},
|
|
1340
|
+
}, Rt = ({
|
|
1326
1341
|
stages: e,
|
|
1327
1342
|
groupsView: t,
|
|
1328
1343
|
columns: n,
|
|
1329
1344
|
showRankChange: o,
|
|
1330
1345
|
showLegend: s,
|
|
1331
1346
|
highlightedCompetitorIds: c,
|
|
1332
|
-
zoneLabels:
|
|
1333
|
-
formByStageId:
|
|
1347
|
+
zoneLabels: l,
|
|
1348
|
+
formByStageId: i,
|
|
1334
1349
|
formLoading: u,
|
|
1335
1350
|
sport: d
|
|
1336
1351
|
}) => {
|
|
1337
|
-
const a = T(), m = F(), g = U(), h =
|
|
1352
|
+
const a = T(), m = F(), g = U(), h = $(), [C, S] = O(0);
|
|
1338
1353
|
return /* @__PURE__ */ b(
|
|
1339
1354
|
pe,
|
|
1340
1355
|
{
|
|
@@ -1416,8 +1431,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1416
1431
|
showRankChange: o,
|
|
1417
1432
|
showLegend: s,
|
|
1418
1433
|
highlightedCompetitorIds: c,
|
|
1419
|
-
zoneLabels:
|
|
1420
|
-
formByTeamId: (
|
|
1434
|
+
zoneLabels: l,
|
|
1435
|
+
formByTeamId: (i == null ? void 0 : i[p.id]) ?? {},
|
|
1421
1436
|
formLoading: u,
|
|
1422
1437
|
sport: d
|
|
1423
1438
|
}
|
|
@@ -1428,15 +1443,15 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1428
1443
|
]
|
|
1429
1444
|
}
|
|
1430
1445
|
);
|
|
1431
|
-
},
|
|
1446
|
+
}, Tt = ({
|
|
1432
1447
|
entityId: e,
|
|
1433
1448
|
sdk: t,
|
|
1434
1449
|
language: n,
|
|
1435
1450
|
stageId: o,
|
|
1436
1451
|
showHeader: s = !0,
|
|
1437
1452
|
showRankChange: c = !0,
|
|
1438
|
-
showLegend:
|
|
1439
|
-
highlightedCompetitorIds:
|
|
1453
|
+
showLegend: l = !0,
|
|
1454
|
+
highlightedCompetitorIds: i,
|
|
1440
1455
|
zoneColors: u,
|
|
1441
1456
|
zoneLabels: d,
|
|
1442
1457
|
columns: a,
|
|
@@ -1446,12 +1461,12 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1446
1461
|
range: C
|
|
1447
1462
|
}) => {
|
|
1448
1463
|
var re;
|
|
1449
|
-
const { t: S } =
|
|
1464
|
+
const { t: S } = G("common"), p = T(), f = F(), D = U(), v = $(), w = {
|
|
1450
1465
|
success: p.palette.success.plainColor,
|
|
1451
1466
|
primary: p.palette.primary.plainColor,
|
|
1452
1467
|
warning: p.palette.warning.plainColor,
|
|
1453
1468
|
danger: p.palette.danger.plainColor
|
|
1454
|
-
}, { data: y, loading: k, error: R } =
|
|
1469
|
+
}, { data: y, loading: k, error: R } = tt(
|
|
1455
1470
|
e,
|
|
1456
1471
|
t,
|
|
1457
1472
|
w,
|
|
@@ -1461,27 +1476,27 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1461
1476
|
h,
|
|
1462
1477
|
C,
|
|
1463
1478
|
o
|
|
1464
|
-
),
|
|
1465
|
-
var
|
|
1466
|
-
const
|
|
1479
|
+
), K = !a || a.includes("form"), W = ((re = y == null ? void 0 : y.sport) == null ? void 0 : re.toLowerCase()) === "football", Z = j(() => !y || !K ? [] : y.stages.map((E) => {
|
|
1480
|
+
var M, z;
|
|
1481
|
+
const A = /* @__PURE__ */ new Set();
|
|
1467
1482
|
return E.groups.forEach(
|
|
1468
|
-
(V) => V.rows.forEach((H) =>
|
|
1483
|
+
(V) => V.rows.forEach((H) => A.add(H.competitorId))
|
|
1469
1484
|
), {
|
|
1470
1485
|
stageId: E.id,
|
|
1471
|
-
teamIds: Array.from(
|
|
1486
|
+
teamIds: Array.from(A),
|
|
1472
1487
|
// Some stages don't carry their own startDate/endDate (empty string, not
|
|
1473
1488
|
// null/undefined — hence `||` rather than `??`) — fall back to the season's,
|
|
1474
1489
|
// since a stage's window is always within its season's anyway. If even that's
|
|
1475
1490
|
// missing, default the upper bound to today rather than sending no `toDate` at
|
|
1476
1491
|
// all, which would let "last 5 matches" spill into a later season.
|
|
1477
|
-
fromDate: E.startDate || ((
|
|
1492
|
+
fromDate: E.startDate || ((M = y.season) == null ? void 0 : M.startDate) || null,
|
|
1478
1493
|
toDate: E.endDate || ((z = y.season) == null ? void 0 : z.endDate) || (/* @__PURE__ */ new Date()).toISOString()
|
|
1479
1494
|
};
|
|
1480
|
-
}), [y,
|
|
1495
|
+
}), [y, K]), _ = j(() => {
|
|
1481
1496
|
const E = /* @__PURE__ */ new Map();
|
|
1482
1497
|
return y == null || y.stages.forEach(
|
|
1483
|
-
(
|
|
1484
|
-
(
|
|
1498
|
+
(A) => A.groups.forEach(
|
|
1499
|
+
(M) => M.rows.forEach((z) => {
|
|
1485
1500
|
E.set(z.competitorId, {
|
|
1486
1501
|
name: z.teamName,
|
|
1487
1502
|
logoUrl: z.logoUrl
|
|
@@ -1489,20 +1504,20 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1489
1504
|
})
|
|
1490
1505
|
)
|
|
1491
1506
|
), E;
|
|
1492
|
-
}, [y]), { formByStageAndTeam: J, loading: ee } =
|
|
1507
|
+
}, [y]), { formByStageAndTeam: J, loading: ee } = it(t, Z, e, K && W), te = j(() => {
|
|
1493
1508
|
const E = S("standings.unknownTeam");
|
|
1494
1509
|
return Object.fromEntries(
|
|
1495
|
-
Object.entries(J).map(([
|
|
1496
|
-
|
|
1510
|
+
Object.entries(J).map(([A, M]) => [
|
|
1511
|
+
A,
|
|
1497
1512
|
Object.fromEntries(
|
|
1498
|
-
Object.entries(
|
|
1513
|
+
Object.entries(M).map(([z, V]) => [
|
|
1499
1514
|
z,
|
|
1500
1515
|
V.map((H) => {
|
|
1501
|
-
const
|
|
1516
|
+
const B = _.get(H.opponentId);
|
|
1502
1517
|
return {
|
|
1503
1518
|
...H,
|
|
1504
|
-
opponentName: (
|
|
1505
|
-
opponentLogoUrl: (
|
|
1519
|
+
opponentName: (B == null ? void 0 : B.name) ?? E,
|
|
1520
|
+
opponentLogoUrl: (B == null ? void 0 : B.logoUrl) ?? null
|
|
1506
1521
|
};
|
|
1507
1522
|
})
|
|
1508
1523
|
])
|
|
@@ -1510,13 +1525,13 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1510
1525
|
])
|
|
1511
1526
|
);
|
|
1512
1527
|
}, [J, _, S]), ne = !y || y.stages.every(
|
|
1513
|
-
(E) => E.groups.every((
|
|
1528
|
+
(E) => E.groups.every((A) => A.rows.length === 0)
|
|
1514
1529
|
), oe = {
|
|
1515
1530
|
fontFamily: f.secondary,
|
|
1516
1531
|
fontSize: "1em",
|
|
1517
1532
|
color: p.textSecondary,
|
|
1518
1533
|
textAlign: "center",
|
|
1519
|
-
padding:
|
|
1534
|
+
padding: v.lg
|
|
1520
1535
|
};
|
|
1521
1536
|
return /* @__PURE__ */ b(
|
|
1522
1537
|
me,
|
|
@@ -1525,7 +1540,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1525
1540
|
sx: {
|
|
1526
1541
|
fontSize: "1em",
|
|
1527
1542
|
fontFamily: f.primary,
|
|
1528
|
-
borderRadius:
|
|
1543
|
+
borderRadius: D.md,
|
|
1529
1544
|
overflow: "hidden",
|
|
1530
1545
|
backgroundColor: p.surface,
|
|
1531
1546
|
borderColor: p.outlineEnabledBorder
|
|
@@ -1536,7 +1551,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1536
1551
|
!k && !R && ne && /* @__PURE__ */ r(L, { sx: oe, children: S("standings.noStandingsAvailable") }),
|
|
1537
1552
|
!k && !R && y && !ne && /* @__PURE__ */ b(I, { children: [
|
|
1538
1553
|
s && /* @__PURE__ */ r(
|
|
1539
|
-
|
|
1554
|
+
ct,
|
|
1540
1555
|
{
|
|
1541
1556
|
title: y.competitionName,
|
|
1542
1557
|
logoUrl: y.logoUrl,
|
|
@@ -1545,14 +1560,14 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1545
1560
|
}
|
|
1546
1561
|
),
|
|
1547
1562
|
y.stages.length > 1 ? /* @__PURE__ */ r(
|
|
1548
|
-
|
|
1563
|
+
Rt,
|
|
1549
1564
|
{
|
|
1550
1565
|
stages: y.stages,
|
|
1551
1566
|
groupsView: m,
|
|
1552
1567
|
columns: a,
|
|
1553
1568
|
showRankChange: c,
|
|
1554
|
-
showLegend:
|
|
1555
|
-
highlightedCompetitorIds:
|
|
1569
|
+
showLegend: l,
|
|
1570
|
+
highlightedCompetitorIds: i,
|
|
1556
1571
|
zoneLabels: d,
|
|
1557
1572
|
formByStageId: te,
|
|
1558
1573
|
formLoading: ee,
|
|
@@ -1565,8 +1580,8 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1565
1580
|
groupsView: m,
|
|
1566
1581
|
columns: a,
|
|
1567
1582
|
showRankChange: c,
|
|
1568
|
-
showLegend:
|
|
1569
|
-
highlightedCompetitorIds:
|
|
1583
|
+
showLegend: l,
|
|
1584
|
+
highlightedCompetitorIds: i,
|
|
1570
1585
|
zoneLabels: d,
|
|
1571
1586
|
formByTeamId: te[y.stages[0].id] ?? {},
|
|
1572
1587
|
formLoading: ee,
|
|
@@ -1580,24 +1595,24 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1580
1595
|
}, Dt = (e) => {
|
|
1581
1596
|
const [t, n] = P.useState(!1), [o, s] = P.useState(!1), c = P.useRef(
|
|
1582
1597
|
`$standings-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
1583
|
-
),
|
|
1598
|
+
), l = P.useRef(null), i = P.useRef(null), u = P.useRef(null), d = P.useRef(null);
|
|
1584
1599
|
P.useEffect(() => {
|
|
1585
1600
|
Le(e.language || "en").finally(() => s(!0));
|
|
1586
1601
|
}, [e.language]), P.useEffect(() => {
|
|
1587
|
-
if (
|
|
1588
|
-
return
|
|
1602
|
+
if (l.current)
|
|
1603
|
+
return l.current.shadowRoot ? (i.current = l.current.shadowRoot, u.current = i.current.getElementById(
|
|
1589
1604
|
c.current
|
|
1590
|
-
), u.current || (u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%",
|
|
1605
|
+
), u.current || (u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", i.current.appendChild(u.current))) : (i.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = c.current, u.current.style.height = "100%", i.current.appendChild(u.current)), d.current || (d.current = Re({
|
|
1591
1606
|
key: "standings-css",
|
|
1592
1607
|
prepend: !0,
|
|
1593
|
-
container:
|
|
1608
|
+
container: i.current
|
|
1594
1609
|
})), n(!0), () => {
|
|
1595
1610
|
n(!1);
|
|
1596
1611
|
};
|
|
1597
1612
|
}, []);
|
|
1598
|
-
const a = e.themeOptions, m = /* @__PURE__ */ r(x, { ref:
|
|
1599
|
-
/* @__PURE__ */ r(Te, { value: d.current, children: /* @__PURE__ */ r(
|
|
1600
|
-
|
|
1613
|
+
const a = e.themeOptions, m = /* @__PURE__ */ r(x, { ref: l, sx: { height: "100%", display: "block" } }), g = t && o && u.current && d.current ? ue(
|
|
1614
|
+
/* @__PURE__ */ r(Te, { value: d.current, children: /* @__PURE__ */ r(De, { containerRef: l, children: /* @__PURE__ */ r(
|
|
1615
|
+
ve,
|
|
1601
1616
|
{
|
|
1602
1617
|
customTheme: a,
|
|
1603
1618
|
mode: a == null ? void 0 : a.mode,
|
|
@@ -1620,7 +1635,7 @@ const Ne = ({ size: e = 14 }) => {
|
|
|
1620
1635
|
m,
|
|
1621
1636
|
g
|
|
1622
1637
|
] });
|
|
1623
|
-
},
|
|
1638
|
+
}, vt = (e) => /* @__PURE__ */ r(Dt, { ...e, children: /* @__PURE__ */ r(Tt, { ...e }) }), Ut = vt;
|
|
1624
1639
|
export {
|
|
1625
|
-
|
|
1640
|
+
Ut as Standings
|
|
1626
1641
|
};
|