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.
Files changed (62) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +496 -505
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +405 -1163
  5. package/CompetitionStatistics.js +2 -2
  6. package/CompetitorCard.js +445 -425
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +648 -593
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +142 -132
  12. package/List.js +675 -713
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +1 -1
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +925 -1824
  17. package/PlayerOfTheMatch.js +2106 -2223
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +4209 -18629
  20. package/Standings.js +497 -486
  21. package/TopX.js +3223 -16958
  22. package/chunks/{ChanceGameEmbedVariant-DM9eLG5s.js → ChanceGameEmbedVariant-z8XYzgDW.js} +1 -1
  23. package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
  24. package/chunks/index-BNl8scz6.js +4 -0
  25. package/chunks/index-CSa2JU4m.js +4 -0
  26. package/chunks/index-CVRI82Gb.js +4 -0
  27. package/chunks/index-Cd1dg0KI.js +4 -0
  28. package/chunks/index-Cei2fzi7.js +4 -0
  29. package/chunks/index-Cxb4wEJU.js +4 -0
  30. package/chunks/index-w1LGN5dz.js +4 -0
  31. package/chunks/main-07vzblS8.js +2091 -0
  32. package/chunks/main-C7X4dM_P.js +4827 -0
  33. package/chunks/main-D_QDfmAw.js +6417 -0
  34. package/chunks/{main-CzfWaEQP.js → main-DdL0UekL.js} +1931 -2025
  35. package/chunks/main-DmBfwyb4.js +2992 -0
  36. package/chunks/main-LEE8n2cG.js +3117 -0
  37. package/chunks/{main-DxvBjXsd.js → main-P2WNvBZE.js} +473 -444
  38. package/chunks/{main-DiBlJBNb.js → main-gV165E-A.js} +629 -657
  39. package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
  40. package/chunks/{withVersionStamp-BsLyhvNA.js → withVersionStamp-CPDfSE5H.js} +1 -1
  41. package/package.json +2 -6
  42. package/withVersionStamp.d.ts.map +1 -1
  43. package/chunks/CheckCircle-I1FktW5Y.js +0 -13
  44. package/chunks/Person-CXRqyF4E.js +0 -11
  45. package/chunks/PickOneOfX-DET4ZhjV.js +0 -3117
  46. package/chunks/Search-CIXthh0D.js +0 -17
  47. package/chunks/TimerOutlined-D-WA_vpE.js +0 -8
  48. package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +0 -136
  49. package/chunks/chevrons-right-HWKW2c4I.js +0 -45
  50. package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
  51. package/chunks/index-BENM3N_w.js +0 -4
  52. package/chunks/index-BRxAV693.js +0 -4
  53. package/chunks/index-BXYTsvIX.js +0 -4
  54. package/chunks/index-C0ilols1.js +0 -4
  55. package/chunks/index-D7VhczXH.js +0 -4
  56. package/chunks/index-DKwvdw9t.js +0 -4
  57. package/chunks/index-DZN-AITW.js +0 -4
  58. package/chunks/main-B2sDRFF4.js +0 -2184
  59. package/chunks/main-DFNl3g_U.js +0 -4910
  60. package/chunks/main-DLwnvntz.js +0 -4020
  61. package/chunks/main-S8_NDSiY.js +0 -3209
  62. package/chunks/main-lBgr8Liq.js +0 -6571
package/Standings.js CHANGED
@@ -1,14 +1,14 @@
1
- import { jsxs as S, jsx as s, Fragment as Z } from "@emotion/react/jsx-runtime";
2
- import { InlineSpinner as nt, Spinner as ot, WidgetPortal as rt } from "fansunited-frontend-core/ui/emotion";
3
- import Ie, { useState as K, useEffect as Be, useMemo as j, useRef as _e, useId as at } from "react";
4
- import { css as a } from "@emotion/react";
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 He, useDisableCache as Ge, extractSdkErrorMessage as st, useColors as je, toIntlLocale as ue, bidiIsolate as te, useConstantContext as lt, ConstantsContext as it, useIsRtl as Ve } from "fansunited-frontend-core";
7
- import { MatchFilters as we } from "fansunited-sdk-esm/models";
8
- import { EmojiEventsIcon as ct } from "fansunited-frontend-core/ui/icons";
9
- import { createPortal as dt } from "react-dom";
10
- import { w as ut } from "./chunks/withVersionStamp-BsLyhvNA.js";
11
- const pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().replace(
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
- ], fe = (e) => e.toLowerCase().replace(/[^a-z0-9]/g, ""), ft = mt.reduce(
33
- (e, t) => (e[fe(t)] = 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
- ), Ze = (e) => ft[fe(e)] ?? null, gt = {
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(${He(e)}, ${Math.max(0.25, 1 - t * 0.25)})`, bt = (e, t) => {
59
- const n = fe(e);
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
- }, St = (e, t, n) => {
62
- const r = /* @__PURE__ */ new Map();
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 i = r.get(c);
66
- i ? i.push(d) : r.set(c, [d]);
67
- }), !r.size) return [];
68
- const l = (c) => {
69
- const d = r.get(c) ?? [];
70
- return d.reduce((i, h) => i + h, 0) / d.length;
71
- }, p = Array.from(r.keys()).sort(
72
- (c, d) => l(c) - l(d)
73
- ), m = p.map((c) => Ze(c)), u = p.map((c, d) => {
74
- const i = m[d];
75
- return i ? gt[i] : bt(c, d === 0);
76
- }), f = /* @__PURE__ */ new Map(), g = p.map((c, d) => {
77
- const i = u[d], h = f.get(i) ?? 0;
78
- return f.set(i, h + 1), yt(t[i], h);
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 i = m[d], h = i ? n == null ? void 0 : n[i] : void 0;
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: pt(c),
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: i }) => ({ key: c, color: d, label: i }));
89
- }, xt = (e, t) => {
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 r = (n = e.stages) == null ? void 0 : n.find((l) => l.id === t);
94
- return r && r.type === "standing" ? [r] : [];
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((r) => r.type === "standing");
97
- }, Xe = (e) => {
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((r) => {
102
- var l;
103
- return ((l = r.key) == null ? void 0 : l.toLowerCase()) === t;
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 r;
108
- return ((r = n.key) == null ? void 0 : r.toLowerCase()) === t;
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"), r = z(e, "played"), l = z(e, "won");
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: r,
113
- won: l,
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: r > 0 ? l / r : 0
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 l;
125
- const n = e.competitorModel, r = e.rank ?? 0;
127
+ var i;
128
+ const n = e.competitorModel, a = e.rank ?? 0;
126
129
  return {
127
130
  competitorId: e.competitorId,
128
- rank: r,
131
+ rank: a,
129
132
  lastRank: e.lastRank,
130
- rankChange: kt(r, e.lastRank),
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: Xe(n == null ? void 0 : n.assets),
136
+ logoUrl: Qe(n == null ? void 0 : n.assets),
134
137
  stats: wt(e.stats ?? []),
135
- zoneKey: ((l = e.rules) == null ? void 0 : l[0]) ?? null
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 r = e.map((f) => f.rank ?? 0);
140
- if (!r.length) return e;
141
- const l = Math.min(...r), p = Math.max(...r), m = Math.max(t ?? l, l), u = Math.min(n ?? p, p);
142
- return e.filter((f) => {
143
- const g = f.rank ?? 0;
144
- return g >= m && g <= u;
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
- }, Dt = (e, t, n, r, l, p) => {
147
- const m = Lt(e.standings ?? [], l, p), u = m.map((c) => Ct(c, r)), f = St(
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 = m.some(
154
+ ), g = f.some(
152
155
  (c) => vt(c.stats ?? [], "points")
153
156
  );
154
- return { id: e.id, name: e.name, rows: u, zones: f, hasPoints: g };
155
- }, Tt = (e) => e ? {
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, r, l, p, m) => {
163
+ } : null, $t = (e, t, n, a, i, p, f) => {
161
164
  var g;
162
- const u = e.groups ?? [], f = l && l.length ? u.filter(
163
- (c) => c.id !== null && l.includes(c.id)
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: f.map(
171
- (c) => Dt(
173
+ groups: m.map(
174
+ (c) => Tt(
172
175
  c,
173
176
  t,
174
177
  n,
175
- r,
178
+ a,
176
179
  p,
177
- m
180
+ f
178
181
  )
179
182
  )
180
183
  };
181
- }, Ft = (e, t, n, r, l, p, m, u) => {
182
- const g = xt(e.season, u).map(
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
- r,
188
- l,
190
+ a,
191
+ i,
189
192
  p,
190
- m
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: Xe(e.assets),
198
- season: Tt(e.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, r, l, p, m, u, f) => {
203
- const [g, c] = K(null), [d, i] = K(!0), [h, w] = K(null), x = Ge();
204
- return Be(() => {
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 i(!0), w(null), t.sports.getCompetitionById(
210
+ return l(!0), w(null), t.sports.getCompetitionById(
208
211
  e,
209
- m ? { seasonId: m } : void 0,
210
- x
212
+ f ? { seasonId: f } : void 0,
213
+ S
211
214
  ).then((b) => {
212
215
  k || c(b);
213
216
  }).catch((b) => {
214
- k || w(st(b, t));
217
+ k || w(it(b, t));
215
218
  }).finally(() => {
216
- k || i(!1);
219
+ k || l(!1);
217
220
  }), () => {
218
221
  k = !0;
219
222
  };
220
- }, [e, t, m, x]), { data: j(() => g ? Ft(
223
+ }, [e, t, f, S]), { data: j(() => g ? Ft(
221
224
  g,
222
225
  n,
223
- l,
224
- r,
226
+ i,
227
+ a,
225
228
  p,
226
229
  u == null ? void 0 : u.startRank,
227
230
  u == null ? void 0 : u.endRank,
228
- f
231
+ m
229
232
  ) : null, [
230
233
  g,
231
234
  n,
232
- l,
233
- r,
235
+ i,
236
+ a,
234
237
  p,
235
238
  u == null ? void 0 : u.startRank,
236
239
  u == null ? void 0 : u.endRank,
237
- f
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 f, g;
241
- const n = e.homeTeam.id === t, r = e.scores, l = Number(((f = r == null ? void 0 : r.ftScore) == null ? void 0 : f.homeGoals) ?? 0), p = Number(((g = r == null ? void 0 : r.ftScore) == null ? void 0 : g.awayGoals) ?? 0), m = n ? l : p, u = n ? p : l;
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(m, u),
246
+ result: Rt(f, u),
244
247
  isHome: n,
245
248
  opponentId: n ? e.awayTeam.id : e.homeTeam.id,
246
- teamScore: m,
249
+ teamScore: f,
247
250
  opponentScore: u,
248
251
  kickoffAt: e.kickoffAt
249
252
  };
250
- }, ke = 12, zt = (e, t) => {
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
- }, Ce = (e, t) => {
256
+ }, Le = (e, t) => {
254
257
  if (!e) return null;
255
- const l = `${e.slice(0, 10)}T${t === "start" ? "00:00:00" : "23:59:59"}Z`;
258
+ const i = `${e.slice(0, 10)}T${t === "start" ? "00:00:00" : "23:59:59"}Z`;
256
259
  return zt(
257
- l,
258
- t === "start" ? -ke : ke
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("|"), Mt = async (e, t, n, r) => {
263
- var f, g;
264
- const l = {
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: Ce(t.fromDate, "start"),
271
- toDate: Ce(t.toDate, "end")
273
+ fromDate: Le(t.fromDate, "start"),
274
+ toDate: Le(t.toDate, "end")
272
275
  }, p = await e.football.getMatches(
273
- new we({ ...l, page: 1 }),
274
- r
275
- ), m = [...p.data ?? []], u = ((g = (f = p.meta) == null ? void 0 : f.pagination) == null ? void 0 : g.numberOfPages) ?? 1;
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, i) => e.football.getMatches(
280
- new we({ ...l, page: i + 2 }),
281
- r
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) => m.push(...d)), m;
285
- }, Nt = (e, t, n, r) => {
286
- const [l, p] = K({}), [m, u] = K(!1), f = Ge(), g = Ot(t);
287
- return Be(() => {
288
- if (!r || !t.length) {
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) => Mt(e, d, n, f).then((i) => [d.stageId, d.teamIds, i]).catch(
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 i = {};
302
- d.forEach(([h, w, x]) => {
304
+ const l = {};
305
+ d.forEach(([h, w, S]) => {
303
306
  const v = {};
304
307
  w.forEach((k) => {
305
- v[k] = x.filter(
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
- }), i[h] = v;
309
- }), p(i), u(!1);
311
+ }), l[h] = v;
312
+ }), p(l), u(!1);
310
313
  }), () => {
311
314
  c = !0;
312
315
  };
313
- }, [e, g, n, r, f]), { formByStageAndTeam: l, loading: m };
314
- }, o = {
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 = je().palette.primary.plainColor;
344
+ const e = Ve().palette.primary.plainColor;
342
345
  return Ie.useMemo(
343
- () => ({ "--fu-ucrc-st-primary-08": `rgba(${He(e)}, 0.08)` }),
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 }, Qe = {
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: o.outlinedText,
352
- backgroundColor: o.surface,
353
- border: `1px solid ${o.border}`,
354
+ color: r.outlinedText,
355
+ backgroundColor: r.surface,
356
+ border: `1px solid ${r.border}`,
354
357
  overflow: "hidden"
355
- }, Le = (e, t) => {
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: a({
367
+ root: o({
365
368
  display: "flex",
366
369
  alignItems: "center",
367
- gap: o.spaceSm,
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: `${o.spaceSm} ${o.spaceMd}`,
371
- borderBottom: `1px solid ${o.border}`,
372
- backgroundColor: o.surface
373
+ padding: `${r.spaceSm} ${r.spaceMd}`,
374
+ borderBottom: `1px solid ${r.border}`,
375
+ backgroundColor: r.surface
373
376
  }),
374
- logo: a({ width: "36px", height: "36px", objectFit: "contain", flexShrink: 0 }),
375
- placeholder: a({
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: o.surfaceVariant,
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: a({ minWidth: 0 }),
387
- titleRow: a({ display: "flex", alignItems: "center", gap: o.spaceXs, flexWrap: "wrap" }),
388
- title: a(ne, {
389
- fontFamily: o.fontPrimary,
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: o.text
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: a({
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: o.fontPrimary,
411
+ fontFamily: r.fontPrimary,
408
412
  fontSize: "0.625em",
409
413
  fontWeight: 600,
410
- color: o.primary,
411
- backgroundColor: o.primary08
414
+ color: r.primary,
415
+ backgroundColor: r.primary08
412
416
  }),
413
- badgeLabel: a({
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: a(ne, {
421
- fontFamily: o.fontSecondary,
425
+ subtitle: o(ne, {
426
+ fontFamily: r.fontSecondary,
422
427
  fontSize: "0.6875em",
423
- color: o.textSecondary,
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: r
435
+ language: a
431
436
  }) => {
432
- const l = Le((n == null ? void 0 : n.startDate) ?? null, r), p = Le((n == null ? void 0 : n.endDate) ?? null, r), m = l && p ? `${l} – ${p}` : null, u = (n == null ? void 0 : n.year) ?? (n == null ? void 0 : n.name) ?? null;
433
- return /* @__PURE__ */ S("div", { css: P.root, children: [
434
- t ? /* @__PURE__ */ s("img", { src: t, alt: e, css: P.logo }) : /* @__PURE__ */ s("div", { css: P.placeholder, children: /* @__PURE__ */ s(ct, { size: "1.25em", color: o.textSecondary }) }),
435
- /* @__PURE__ */ S("div", { css: P.body, children: [
436
- /* @__PURE__ */ S("div", { css: P.titleRow, children: [
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
- m && /* @__PURE__ */ s("p", { css: P.subtitle, children: m })
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
- ], Ut = [
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
- ], It = [
505
+ ], Ut = [
501
506
  ...pe.slice(0, 5),
502
- ...Ut,
507
+ ...Bt,
503
508
  ...pe.slice(5)
504
- ], Bt = {
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 r = new Set(
511
- t ? Bt[t.toLowerCase()] ?? [] : []
515
+ const a = new Set(
516
+ t ? It[t.toLowerCase()] ?? [] : []
512
517
  );
513
- return r.add(n ? "winPercentage" : "points"), (!e || e.length === 0 ? pe : It.filter((p) => e.includes(p.key))).filter((p) => !r.has(p.key));
514
- }, De = a({ fontSize: "0.5625em", fontWeight: 700, lineHeight: 1.4 }), Te = {
515
- up: a(De, { color: o.success }),
516
- down: a(De, { color: o.danger })
517
- }, Ht = ({ rankChange: e }) => e === null || e === "same" ? /* @__PURE__ */ s(Z, {}) : e === "up" ? /* @__PURE__ */ s("span", { css: Te.up, children: "▲" }) : /* @__PURE__ */ s("span", { css: Te.down, children: "▼" }), $e = a({
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: o.spaceXs,
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
- }), Fe = a({ width: "28px", height: "28px", objectFit: "contain", flexShrink: 0 }), Pe = a({
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: o.surfaceVariant,
538
- color: o.textSecondary,
539
- fontFamily: o.fontPrimary,
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 = a(F, {
545
- fontFamily: o.fontPrimary,
549
+ }), Y = o(F, {
550
+ fontFamily: r.fontPrimary,
546
551
  fontSize: "0.8125em",
547
552
  fontWeight: 500,
548
- color: o.text,
553
+ color: r.text,
549
554
  overflow: "hidden",
550
555
  textOverflow: "ellipsis",
551
556
  whiteSpace: "nowrap",
552
- minWidth: 0
553
- }), Ae = { width: "22px", height: "22px" }, q = {
554
- root: { regular: $e, compact: a($e, { maxWidth: "90px" }) },
555
- logo: { regular: Fe, compact: a(Fe, Ae) },
556
- initials: { regular: Pe, compact: a(Pe, Ae) },
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: a(Y, { fontSize: "0.6875em" }),
560
- highlighted: a(Y, { fontWeight: 700, color: o.primary }),
561
- highlightedCompact: a(Y, { fontSize: "0.6875em", fontWeight: 700, color: o.primary })
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 r = n ? "compact" : "regular", l = t ? n ? "highlightedCompact" : "highlighted" : r;
565
- return /* @__PURE__ */ S("div", { css: q.root[r], children: [
566
- e.logoUrl ? /* @__PURE__ */ s("img", { src: e.logoUrl, alt: e.teamName, css: q.logo[r] }) : /* @__PURE__ */ s("div", { css: q.initials[r], children: (e.teamShortName ?? e.teamName).slice(0, 2).toUpperCase() }),
567
- /* @__PURE__ */ s("p", { css: q.name[l], children: e.teamName })
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
- }, le = a(F, { fontFamily: o.fontPrimary, fontSize: "0.6875em", fontWeight: 700 }), I = {
570
- root: a({ display: "flex", flexDirection: "column", alignItems: "center", gap: "1px", lineHeight: 1.2 }),
571
- totals: a(F, { fontFamily: o.fontSecondary, fontSize: "0.6875em", color: o.textSecondary }),
572
- positive: a(le, { color: o.success }),
573
- negative: a(le, { color: o.danger }),
574
- even: a(le, { color: o.textSecondary })
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__ */ S("div", { css: I.root, children: [
578
- /* @__PURE__ */ S("p", { css: I.totals, children: [
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
- }, Re = 200, Vt = (e, t) => {
591
+ }, Ke = 200, Vt = (e, t) => {
586
592
  const n = new Date(e);
587
593
  if (Number.isNaN(n.getTime())) return "";
588
- const r = n.toLocaleDateString(ue(t), {
594
+ const a = n.toLocaleDateString(ue(t), {
589
595
  day: "numeric",
590
596
  month: "short",
591
597
  year: "numeric"
592
- }), l = n.toLocaleTimeString(ue(t), {
598
+ }), i = n.toLocaleTimeString(ue(t), {
593
599
  hour: "2-digit",
594
600
  minute: "2-digit"
595
601
  });
596
- return `${r} · ${l}`;
597
- }, ie = a({ width: "9px", height: "9px", borderRadius: "50%" }), Ke = a(F, {
598
- fontFamily: o.fontPrimary,
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: o.text,
607
+ color: r.text,
602
608
  whiteSpace: "nowrap"
603
- }), T = {
604
- center: a({ display: "flex", justifyContent: "center" }),
605
- empty: a(F, {
606
- fontFamily: o.fontSecondary,
609
+ }), D = {
610
+ center: o({ display: "flex", justifyContent: "center" }),
611
+ empty: o(F, {
612
+ fontFamily: r.fontSecondary,
607
613
  fontSize: "0.75em",
608
- color: o.textSecondary,
614
+ color: r.textSecondary,
609
615
  textAlign: "center"
610
616
  }),
611
- dots: a({ display: "flex", gap: "3px", justifyContent: "center" }),
612
- anchor: a({ display: "inline-flex", cursor: "pointer" }),
613
- win: a(ie, { backgroundColor: o.success }),
614
- loss: a(ie, { backgroundColor: o.danger }),
615
- draw: a(ie, { backgroundColor: o.neutral }),
616
- tooltip: a({
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: o.radiusSm,
629
- backgroundColor: o.surface,
630
- border: `1px solid ${o.border}`,
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: a(F, {
636
- fontFamily: o.fontSecondary,
641
+ kickoff: o(F, {
642
+ fontFamily: r.fontSecondary,
637
643
  fontSize: "0.6875em",
638
- color: o.textSecondary,
644
+ color: r.textSecondary,
639
645
  whiteSpace: "nowrap"
640
646
  }),
641
- match: a({ display: "flex", alignItems: "center", gap: "6px" }),
642
- teamName: Ke,
643
- score: a(Ke, { fontWeight: 700 }),
644
- logo: a({ width: "16px", height: "16px", objectFit: "contain", flexShrink: 0 })
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: r
655
+ loading: a
650
656
  }) => {
651
- const { t: l, i18n: p } = oe("common"), { shadowRootElement: m } = lt(it), u = Ve(), [f, g] = K(null), c = _e([]), d = [...n].reverse();
652
- if (r)
653
- return /* @__PURE__ */ s("div", { css: T.center, children: /* @__PURE__ */ s(nt, {}) });
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: T.empty, children: l("standings.formNotAvailable") });
656
- const i = (b) => {
657
- const D = c.current[b];
658
- D && g({ index: b, rect: D.getBoundingClientRect() });
659
- }, h = f ? d[f.index] : null, w = f ? f.rect.left + f.rect.width / 2 : 0, x = typeof window < "u" ? Math.max(
660
- Re / 2 + 8,
661
- Math.min(w, window.innerWidth - Re / 2 - 8)
662
- ) : w, v = u && typeof window < "u" ? window.innerWidth - x : x, k = f ? f.rect.top - 8 : 0;
663
- return /* @__PURE__ */ S("div", { css: T.dots, onMouseLeave: () => g(null), children: [
664
- d.map((b, D) => /* @__PURE__ */ s(
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[D] = O;
674
+ c.current[T] = O;
669
675
  },
670
- css: T.anchor,
671
- onMouseEnter: () => i(D),
672
- children: /* @__PURE__ */ s("div", { css: T[b.result] })
676
+ css: D.anchor,
677
+ onMouseEnter: () => l(T),
678
+ children: /* @__PURE__ */ s("div", { css: D[b.result] })
673
679
  },
674
- D
680
+ T
675
681
  )),
676
- f && h && dt(
682
+ m && h && ut(
677
683
  /* @__PURE__ */ s(
678
684
  "div",
679
685
  {
680
- css: T.tooltip,
686
+ css: D.tooltip,
681
687
  style: { "--fu-st-tip-x": `${v}px`, top: `${k}px` },
682
688
  children: (() => {
683
- const b = h.isHome, D = 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, M = b ? h.opponentScore : h.teamScore;
684
- return /* @__PURE__ */ S(Z, { children: [
685
- /* @__PURE__ */ s("p", { css: T.kickoff, children: Vt(h.kickoffAt, p.language) }),
686
- /* @__PURE__ */ S("div", { css: T.match, children: [
687
- /* @__PURE__ */ s("p", { css: T.teamName, children: D }),
688
- U && /* @__PURE__ */ s("img", { src: U, css: T.logo }),
689
- /* @__PURE__ */ S("p", { css: T.score, children: [
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
- M
698
+ N
693
699
  ] }),
694
- X && /* @__PURE__ */ s("img", { src: X, css: T.logo }),
695
- /* @__PURE__ */ s("p", { css: T.teamName, children: O })
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
- m ?? document.body
707
+ f ?? document.body
702
708
  )
703
709
  ] });
704
- }, B = a({ height: "32px", padding: "10px 6px", borderBottom: `1px solid ${o.border}` }), ze = a({ width: "4px", height: "100%", minHeight: "44px" }), Oe = a(F, {
705
- fontFamily: o.fontPrimary,
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: o.text,
714
+ color: r.text,
709
715
  textAlign: "right"
710
- }), Me = a(F, {
711
- fontFamily: o.fontSecondary,
716
+ }), Me = o(F, {
717
+ fontFamily: r.fontSecondary,
712
718
  fontSize: "0.75em",
713
- color: o.textBody,
719
+ color: r.textBody,
714
720
  textAlign: "center"
715
- }), Ne = a(F, {
716
- fontFamily: o.fontPrimary,
721
+ }), Ee = o(F, {
722
+ fontFamily: r.fontPrimary,
717
723
  fontWeight: 700,
718
724
  fontSize: "0.875em",
719
- color: o.primary,
725
+ color: r.primary,
720
726
  textAlign: "center"
721
- }), W = a(F, {
722
- fontFamily: o.fontPrimary,
727
+ }), W = o(F, {
728
+ fontFamily: r.fontPrimary,
723
729
  fontSize: "0.75em",
724
730
  fontWeight: 700,
725
731
  textAlign: "center"
726
- }), _ = { fontSize: "0.6875em" }, H = (e) => ({ row: e, last: a(e, { borderBottom: "none" }) }), L = {
727
- highlighted: a({ backgroundColor: o.primary08 }),
728
- cell: H(B),
729
- zoneCell: H(a(B, { width: "4px", padding: 0 })),
730
- rankCell: H(a(B, { padding: "10px 4px", textAlign: "center" })),
731
- teamCell: H(a(B, { textAlign: "start" })),
732
- goalsCell: H(a(B, { padding: "8px 6px" })),
733
- zoneBar: { regular: ze, compact: a(ze, { minHeight: "30px" }) },
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: a({
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: Oe, compact: a(Oe, _) },
745
- stat: { regular: Me, compact: a(Me, _) },
746
- headline: { regular: Ne, compact: a(Ne, { fontSize: "0.75em" }) },
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: a(W, { color: o.success }),
750
- negative: a(W, { color: o.danger }),
751
- even: a(W, { color: o.textSecondary })
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: a(W, _, { color: o.success }),
755
- negative: a(W, _, { color: o.danger }),
756
- even: a(W, _, { color: o.textSecondary })
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: r,
764
- highlighted: l,
769
+ showRankChange: a,
770
+ highlighted: i,
765
771
  compact: p,
766
- isLast: m = !1,
772
+ isLast: f = !1,
767
773
  form: u,
768
- formLoading: f
774
+ formLoading: m
769
775
  }) => {
770
- const g = p ? "compact" : "regular", c = m ? "last" : "row", d = (i) => {
771
- switch (i) {
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__ */ S("tr", { css: l ? L.highlighted : void 0, children: [
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__ */ S("div", { css: L.rankGrid, children: [
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
- r && /* @__PURE__ */ s(Ht, { rankChange: e.rankChange })
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: l, compact: p }) }),
800
- n.map((i) => {
801
- if (i.key === "goals")
802
- return /* @__PURE__ */ s("td", { css: L.goalsCell[c], children: /* @__PURE__ */ s(jt, { stats: e.stats }) }, i.key);
803
- if (i.key === "goalsDifference") {
804
- const w = e.stats.goalsDifference, x = w > 0 ? "positive" : w < 0 ? "negative" : "even";
805
- return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: L.difference[g][x], children: w > 0 ? te(`+${w}`) : te(w) }) }, i.key);
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 (i.key === "form")
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: !!f
820
+ loading: !!m
815
821
  }
816
- ) }, i.key);
817
- const h = i.key === "points" || i.key === "winPercentage";
818
- return /* @__PURE__ */ s("td", { css: L.cell[c], children: /* @__PURE__ */ s("p", { css: h ? L.headline[g] : L.stat[g], children: i.key === "winPercentage" ? Xt(d(i.key)) : d(i.key) }) }, i.key);
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 = a({ height: "1px", padding: 0, backgroundColor: o.border, border: "none" }), qt = ({ colSpan: e }) => /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: e, css: Yt }) }), J = {
822
- root: a({
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: `${o.spaceXs} ${o.spaceMd}`,
826
- padding: `${o.spaceSm} ${o.spaceMd}`,
827
- borderTop: `1px solid ${o.border}`,
828
- backgroundColor: o.surface,
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: a({ display: "flex", alignItems: "center", gap: "6px" }),
832
- dot: a({ width: "9px", height: "9px", borderRadius: "50%", flexShrink: 0 }),
833
- label: a(ne, { fontFamily: o.fontSecondary, fontSize: "0.6875em", color: o.textSecondary })
834
- }, Ye = ({ zones: e, zoneLabels: t }) => {
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((r) => {
837
- const l = Ze(r.key), m = (l ? t == null ? void 0 : t[l] : void 0) ?? (l ? n(`standings.rules.${l}`, r.label) : r.label);
838
- return /* @__PURE__ */ S("div", { css: J.item, children: [
839
- /* @__PURE__ */ s("div", { css: J.dot, style: { backgroundColor: r.color } }),
840
- /* @__PURE__ */ s("p", { css: J.label, children: m })
841
- ] }, r.key);
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
- }, Ee = a(Qe, {
844
- fontFamily: o.fontBody,
845
- borderRadius: `0 0 ${o.radiusMd} ${o.radiusMd}`
846
- }), ee = a({
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 ${o.border}`
855
- }), V = a({
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: o.textSecondary,
861
- fontFamily: o.fontPrimary,
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" }, me = { justifyContent: "flex-start" }, We = a(V, me, {
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: o.text
879
+ color: r.text
873
880
  }), C = {
874
- sheet: { tab: Ee, card: a(Ee, { borderRadius: o.radiusMd }) },
875
- scroll: a({ overflowX: "auto" }),
881
+ sheet: { tab: We, card: o(We, { borderRadius: r.radiusMd }) },
882
+ scroll: o({ overflowX: "auto" }),
876
883
  // Joy's plain Table.
877
- table: a({
884
+ table: o({
878
885
  width: "100%",
879
886
  borderSpacing: 0,
880
887
  borderCollapse: "separate",
881
- fontFamily: o.fontBody,
888
+ fontFamily: r.fontBody,
882
889
  fontSize: "1em",
883
890
  fontWeight: 500,
884
891
  lineHeight: 1.5,
885
- color: o.plainText,
892
+ color: r.plainText,
886
893
  tableLayout: "auto"
887
894
  }),
888
895
  th: ee,
889
- zoneTh: a(ee, { width: "4px" }),
890
- teamTh: { regular: a(ee, { minWidth: "160px" }), compact: a(ee, { minWidth: "90px" }) },
891
- label: { regular: V, compact: a(V, ce) },
892
- startLabel: { regular: a(V, me), compact: a(V, me, ce) },
893
- groupLabel: { regular: We, compact: a(We, ce) },
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: a({ display: "inline-grid", gridTemplateColumns: "auto 10px", columnGap: "3px" }),
897
- hash: a({ textAlign: "end" })
898
- }, ge = ({
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: r = !0,
903
- highlightedCompetitorIds: l,
911
+ showLegend: a = !0,
912
+ highlightedCompetitorIds: i,
904
913
  compact: p = !1,
905
- groupLabel: m,
914
+ groupLabel: f,
906
915
  zoneLabels: u,
907
- formByTeamId: f,
916
+ formByTeamId: m,
908
917
  formLoading: g,
909
918
  sport: c
910
919
  }) => {
911
- const { t: d } = oe("common"), i = _t(t, c, e.hasPoints), h = new Map(e.zones.map((v) => [v.key, v])), w = 3 + i.length, x = p ? "compact" : "regular";
912
- return /* @__PURE__ */ S("div", { css: m ? C.sheet.card : C.sheet.tab, children: [
913
- /* @__PURE__ */ s("div", { css: C.scroll, children: /* @__PURE__ */ S("table", { css: C.table, children: [
914
- /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ S("tr", { children: [
915
- m ? /* @__PURE__ */ s("th", { colSpan: 3, css: C.teamTh[x], children: /* @__PURE__ */ s("div", { css: C.groupLabel[x], children: m }) }) : /* @__PURE__ */ S(Z, { children: [
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[x], children: /* @__PURE__ */ S("div", { css: C.rankGrid, children: [
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[x], children: /* @__PURE__ */ s("div", { css: C.startLabel[x], children: d("standings.columns.team") }) })
930
+ /* @__PURE__ */ s("th", { css: C.teamTh[S], children: /* @__PURE__ */ s("div", { css: C.startLabel[S], children: d("standings.columns.team") }) })
922
931
  ] }),
923
- i.map((v) => /* @__PURE__ */ s("th", { css: C.th, title: d(v.fullLabelKey), children: /* @__PURE__ */ s("div", { css: C.label[x], children: d(v.shortLabelKey) }) }, v.key))
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, D = k > 0 && b !== v.zoneKey;
927
- return /* @__PURE__ */ S(Ie.Fragment, { children: [
928
- D && /* @__PURE__ */ s(qt, { colSpan: w }),
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: i,
943
+ columns: l,
935
944
  showRankChange: n,
936
- highlighted: !!(l != null && l.includes(v.competitorId)),
945
+ highlighted: !!(i != null && i.includes(v.competitorId)),
937
946
  compact: p,
938
947
  isLast: k === e.rows.length - 1,
939
- form: f == null ? void 0 : f[v.competitorId],
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
- r && /* @__PURE__ */ s(Ye, { zones: e.zones, zoneLabels: u })
955
+ a && /* @__PURE__ */ s(qe, { zones: e.zones, zoneLabels: u })
947
956
  ] });
948
- }, Ue = a({
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: o.radiusFull,
960
- fontFamily: o.fontPrimary,
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
- }), G = {
983
+ }), B = {
975
984
  // Joy's Tabs and TabPanel.
976
- root: a({
985
+ root: o({
977
986
  position: "relative",
978
987
  display: "flex",
979
988
  flexDirection: "column",
980
- fontFamily: o.fontBody,
989
+ fontFamily: r.fontBody,
981
990
  fontSize: "1em",
982
991
  lineHeight: 1.5,
983
- color: o.plainText
992
+ color: r.plainText
984
993
  }),
985
- list: a({
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: `${o.spaceSm} ${o.spaceMd}`,
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: a({ flexGrow: 1 }),
1001
- on: a(Ue, { color: o.onPrimary, backgroundColor: o.primary }),
1002
- off: a(Ue, {
1003
- color: o.textSecondary,
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: o.primary, backgroundColor: o.surfaceVariant }
1016
+ "&:hover": { color: r.primary, backgroundColor: r.surfaceVariant }
1006
1017
  })
1007
- }, qe = ({ labels: e, children: t }) => {
1008
- const n = Ve(), r = at(), [l, p] = K(0), [m, u] = K(0), f = _e([]), g = (d) => {
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 i = (d + e.length) % e.length;
1011
- u(i), (h = f.current[i]) == null || h.focus();
1021
+ const l = (d + e.length) % e.length;
1022
+ u(l), (h = m.current[l]) == null || h.focus();
1012
1023
  }, c = (d) => {
1013
- const i = n ? "ArrowLeft" : "ArrowRight", h = n ? "ArrowRight" : "ArrowLeft", w = {
1014
- [i]: m + 1,
1015
- [h]: m - 1,
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__ */ S("div", { css: G.root, children: [
1022
- /* @__PURE__ */ s("div", { role: "tablist", "aria-orientation": "horizontal", css: G.list, onKeyDown: c, children: e.map((d, i) => /* @__PURE__ */ s(
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
- f.current[i] = h;
1037
+ m.current[l] = h;
1027
1038
  },
1028
1039
  type: "button",
1029
1040
  role: "tab",
1030
- id: `${r}-tab-${i}`,
1031
- "aria-selected": i === l,
1032
- "aria-controls": `${r}-panel-${i}`,
1033
- tabIndex: i === m ? 0 : -1,
1034
- css: i === l ? G.on : G.off,
1035
- onFocus: () => u(i),
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(i), g(i);
1048
+ p(l), g(l);
1038
1049
  },
1039
- children: d
1050
+ children: /* @__PURE__ */ s("span", { css: B.label, children: d })
1040
1051
  },
1041
- i
1052
+ l
1042
1053
  )) }),
1043
- e.map((d, i) => /* @__PURE__ */ s(
1054
+ e.map((d, l) => /* @__PURE__ */ s(
1044
1055
  "div",
1045
1056
  {
1046
1057
  role: "tabpanel",
1047
- id: `${r}-panel-${i}`,
1048
- "aria-labelledby": `${r}-tab-${i}`,
1049
- hidden: i !== l,
1050
- css: G.panel,
1051
- children: i === l && t(i)
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
- i
1064
+ l
1054
1065
  ))
1055
1066
  ] });
1056
- }, Jt = ({ groups: e, ...t }) => /* @__PURE__ */ s(qe, { labels: e.map((n, r) => n.name ?? `#${r + 1}`), children: (n) => /* @__PURE__ */ s(ge, { group: e[n], ...t }) }), en = [
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: r,
1066
- formLoading: l,
1076
+ formByTeamId: a,
1077
+ formLoading: i,
1067
1078
  sport: p
1068
1079
  }) => /* @__PURE__ */ s(
1069
- ge,
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: r,
1077
- formLoading: l,
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((r) => {
1084
- r.zones.forEach((l) => {
1085
- t.has(l.key) || (t.add(l.key), n.push(l));
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 = a({
1099
+ }, on = o({
1089
1100
  display: "grid",
1090
1101
  gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
1091
- gap: o.spaceSm,
1092
- padding: o.spaceSm
1093
- }), Je = ({
1102
+ gap: r.spaceSm,
1103
+ padding: r.spaceSm
1104
+ }), et = ({
1094
1105
  groups: e,
1095
1106
  groupsView: t,
1096
1107
  columns: n,
1097
- showRankChange: r,
1098
- showLegend: l,
1108
+ showRankChange: a,
1109
+ showLegend: i,
1099
1110
  highlightedCompetitorIds: p,
1100
- zoneLabels: m,
1111
+ zoneLabels: f,
1101
1112
  formByTeamId: u,
1102
- formLoading: f,
1113
+ formLoading: m,
1103
1114
  sport: g
1104
1115
  }) => e.length <= 1 ? /* @__PURE__ */ s(
1105
- ge,
1116
+ he,
1106
1117
  {
1107
1118
  group: e[0],
1108
1119
  columns: n,
1109
- showRankChange: r,
1110
- showLegend: l,
1120
+ showRankChange: a,
1121
+ showLegend: i,
1111
1122
  highlightedCompetitorIds: p,
1112
- zoneLabels: m,
1123
+ zoneLabels: f,
1113
1124
  formByTeamId: u,
1114
- formLoading: f,
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: r,
1123
- showLegend: l,
1133
+ showRankChange: a,
1134
+ showLegend: i,
1124
1135
  highlightedCompetitorIds: p,
1125
- zoneLabels: m,
1136
+ zoneLabels: f,
1126
1137
  formByTeamId: u,
1127
- formLoading: f,
1138
+ formLoading: m,
1128
1139
  sport: g
1129
1140
  }
1130
- ) : /* @__PURE__ */ S(Z, { children: [
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: f,
1149
+ formLoading: m,
1139
1150
  sport: g
1140
1151
  },
1141
1152
  c.id ?? c.name ?? d
1142
1153
  )) }),
1143
- l && /* @__PURE__ */ s(Ye, { zones: nn(e), zoneLabels: m })
1144
- ] }), rn = ({ stages: e, formByStageId: t, ...n }) => /* @__PURE__ */ s(qe, { labels: e.map((r, l) => r.name ?? `#${l + 1}`), children: (r) => /* @__PURE__ */ s(
1145
- Je,
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[r].groups,
1148
- formByTeamId: (t == null ? void 0 : t[e[r].id]) ?? {},
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: a(Qe, { fontFamily: o.fontPrimary, borderRadius: o.radiusMd }),
1153
- message: a(ne, {
1154
- fontFamily: o.fontSecondary,
1163
+ root: o(Ye, { fontFamily: r.fontPrimary, borderRadius: r.radiusMd }),
1164
+ message: o(ne, {
1165
+ fontFamily: r.fontSecondary,
1155
1166
  fontSize: "1em",
1156
- color: o.textSecondary,
1167
+ color: r.textSecondary,
1157
1168
  textAlign: "center",
1158
- padding: o.spaceLg
1169
+ padding: r.spaceLg
1159
1170
  })
1160
1171
  }, an = ({
1161
1172
  entityId: e,
1162
1173
  sdk: t,
1163
1174
  language: n,
1164
- stageId: r,
1165
- showHeader: l = !0,
1175
+ stageId: a,
1176
+ showHeader: i = !0,
1166
1177
  showRankChange: p = !0,
1167
- showLegend: m = !0,
1178
+ showLegend: f = !0,
1168
1179
  highlightedCompetitorIds: u,
1169
- zoneColors: f,
1180
+ zoneColors: m,
1170
1181
  zoneLabels: g,
1171
1182
  columns: c,
1172
1183
  groupsView: d = "overview",
1173
- groupIds: i,
1184
+ groupIds: l,
1174
1185
  seasonId: h,
1175
1186
  range: w
1176
1187
  }) => {
1177
- var ve;
1178
- const { t: x } = oe("common"), v = je(), k = Et(), { success: b, primary: D, warning: O, danger: U } = v.palette, X = j(
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: D.plainColor,
1192
+ primary: T.plainColor,
1182
1193
  warning: O.plainColor,
1183
1194
  danger: U.plainColor
1184
1195
  }),
1185
1196
  [
1186
1197
  b.plainColor,
1187
- D.plainColor,
1198
+ T.plainColor,
1188
1199
  O.plainColor,
1189
1200
  U.plainColor
1190
1201
  ]
1191
- ), { data: y, loading: M, error: re } = Pt(
1202
+ ), { data: y, loading: N, error: re } = Pt(
1192
1203
  e,
1193
1204
  t,
1194
1205
  X,
1195
- x("standings.unknownTeam"),
1196
- f,
1197
- i,
1206
+ S("standings.unknownTeam"),
1207
+ m,
1208
+ l,
1198
1209
  h,
1199
1210
  w,
1200
- r
1201
- ), ae = !c || c.includes("form"), et = ((ve = y == null ? void 0 : y.sport) == null ? void 0 : ve.toLowerCase()) === "football", tt = j(() => !y || !ae ? [] : y.stages.map(($) => {
1202
- var N, R;
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 || ((N = y.season) == null ? void 0 : N.startDate) || null,
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]), he = j(() => {
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
- (N) => N.rows.forEach((R) => {
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: ye, loading: be } = Nt(t, tt, e, ae && et), Se = j(() => {
1231
- const $ = x("standings.unknownTeam");
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(ye).map(([A, N]) => [
1244
+ Object.entries(be).map(([A, M]) => [
1234
1245
  A,
1235
1246
  Object.fromEntries(
1236
- Object.entries(N).map(([R, se]) => [
1247
+ Object.entries(M).map(([R, se]) => [
1237
1248
  R,
1238
1249
  se.map((Q) => {
1239
- const E = he.get(Q.opponentId);
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
- }, [ye, he, x]), xe = !y || y.stages.every(
1261
+ }, [be, ye, S]), ve = !y || y.stages.every(
1251
1262
  ($) => $.groups.every((A) => A.rows.length === 0)
1252
1263
  );
1253
- return /* @__PURE__ */ S("div", { css: de.root, style: k, children: [
1254
- M && /* @__PURE__ */ s(ot, { marginBlock: "80px" }),
1255
- !M && re && /* @__PURE__ */ s("p", { css: de.message, children: x("standings.loadFailed") }),
1256
- !M && !re && xe && /* @__PURE__ */ s("p", { css: de.message, children: x("standings.noStandingsAvailable") }),
1257
- !M && !re && y && !xe && /* @__PURE__ */ S(Z, { children: [
1258
- l && /* @__PURE__ */ s(
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: m,
1285
+ showLegend: f,
1275
1286
  highlightedCompetitorIds: u,
1276
1287
  zoneLabels: g,
1277
1288
  formByStageId: Se,
1278
- formLoading: be,
1289
+ formLoading: xe,
1279
1290
  sport: y.sport
1280
1291
  }
1281
1292
  ) : /* @__PURE__ */ s(
1282
- Je,
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: m,
1299
+ showLegend: f,
1289
1300
  highlightedCompetitorIds: u,
1290
1301
  zoneLabels: g,
1291
1302
  formByTeamId: Se[y.stages[0].id] ?? {},
1292
- formLoading: be,
1303
+ formLoading: xe,
1293
1304
  sport: y.sport
1294
1305
  }
1295
1306
  )
1296
1307
  ] })
1297
1308
  ] });
1298
1309
  }, sn = (e) => /* @__PURE__ */ s(
1299
- rt,
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 = ut(sn);
1319
+ ), bn = pt(sn);
1309
1320
  export {
1310
1321
  bn as Standings
1311
1322
  };