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
@@ -1,1280 +1,1270 @@
1
- import { jsx as t, jsxs as v, Fragment as pe } from "react/jsx-runtime";
2
- import { hexToRgb as J, useColors as Qe, useFontFamily as Je, useCornerRadius as Ze, useSpacingScale as qe, useBorderSize as eo, DirectionalIcon as De, cdnAssets as W, onImageError as Ne, FallbackAvatar as G, Notification as oo, extractSdkError as ge, useDisableCache as to, Spinner as ro, Portal as no } from "fansunited-frontend-core";
3
- import { Link as io, Box as x, IconButton as ve, Typography as h, Card as Ce, CardContent as so, CardActions as ao, Button as q, Input as lo, Chip as he, Stack as Y, Sheet as co } from "@mui/joy";
4
- import { useTranslation as B } from "react-i18next";
5
- import { useRef as fe, useEffect as H, useState as T, useMemo as se } from "react";
6
- import { C as mo, a as uo, S as go, b as po } from "./chunks/Search-CIXthh0D.js";
7
- import { c as ho } from "./chunks/createLucideIcon-YBRjY5Kl.js";
8
- import { createSvgIcon as Pe } from "@mui/material";
9
- import { A as He, C as fo } from "./chunks/CheckCircle-I1FktW5Y.js";
10
- import { w as xo } from "./chunks/withVersionStamp-BsLyhvNA.js";
11
- const Me = Pe(/* @__PURE__ */ t("path", {
12
- d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"
13
- }), "FilterAlt"), bo = Pe(/* @__PURE__ */ t("path", {
14
- d: "M18 13h-.68l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2H6l-3 3v4c0 1.1.89 2 1.99 2H19c1.1 0 2-.89 2-2v-4zm-1-5.05-4.95 4.95-3.54-3.54 4.95-4.95zm-4.24-5.66L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01"
15
- }), "HowToVote"), ae = Pe(/* @__PURE__ */ t("path", {
16
- d: "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
17
- }), "Star");
18
- /**
19
- * @license lucide-react v0.454.0 - ISC
20
- *
21
- * This source code is licensed under the ISC license.
22
- * See the LICENSE file in the root directory of this source tree.
23
- */
24
- const So = ho("X", [
25
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
26
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
27
- ]), wo = ({ backgroundImage: e, link: o, height: r = "150px", minHeight: n = "150px" }) => {
28
- const s = /* @__PURE__ */ v(
29
- x,
30
- {
31
- sx: {
32
- position: "relative",
33
- width: "100%",
34
- height: r,
35
- minHeight: n,
36
- backgroundImage: e ? `url(${e})` : "none",
37
- // Background image should be 860px wide, centered horizontally
38
- // On smaller screens, sides get cut off but center 300px remains visible
39
- backgroundSize: {
40
- xs: "auto 100%",
41
- // On mobile: maintain aspect ratio, fill height
42
- sm: "860px 150px"
43
- // On desktop: exact dimensions as specified
44
- },
45
- backgroundPosition: "center center",
46
- // Always center the image
47
- backgroundRepeat: "no-repeat",
48
- borderRadius: "md",
49
- overflow: "hidden",
50
- display: "flex",
51
- alignItems: "center",
52
- justifyContent: "center"
53
- },
54
- children: [
55
- /* @__PURE__ */ t(
56
- x,
57
- {
58
- sx: {
59
- position: "absolute",
60
- top: 0,
61
- left: 0,
62
- right: 0,
63
- bottom: 0,
64
- background: e && "transparent",
65
- zIndex: 1
66
- }
67
- }
68
- ),
69
- /* @__PURE__ */ t(
70
- x,
71
- {
72
- sx: {
73
- position: "relative",
74
- zIndex: 2,
75
- width: { xs: "100%", sm: "300px" },
76
- // Safe area: 300px on desktop, full width on mobile
77
- height: "100%"
78
- }
79
- }
80
- )
81
- ]
82
- }
83
- );
84
- return o ? /* @__PURE__ */ t(
85
- io,
86
- {
87
- href: o,
88
- target: "_blank",
89
- rel: "noopener noreferrer",
90
- sx: {
91
- textDecoration: "none",
92
- display: "block",
93
- "&:hover": {
94
- opacity: 0.95
95
- }
96
- },
97
- children: s
98
- }
99
- ) : s;
100
- }, yo = (e) => ({
101
- width: "100%",
102
- // Take full width of parent container
103
- maxWidth: "100%",
104
- // Ensure it doesn't exceed parent width
105
- mx: "auto",
106
- p: { xs: e.spacing.xs, sm: e.spacing.md, md: e.spacing.lg },
107
- bgcolor: e.colors.surface,
108
- borderRadius: e.radius.sm,
109
- border: `${e.border.size} solid`,
110
- borderColor: e.colors.border,
111
- overflow: "hidden",
112
- // Prevent content overflow
1
+ import { jsx as n, jsxs as v, Fragment as ke } from "@emotion/react/jsx-runtime";
2
+ import { DirectionalIcon as st, onImageError as Fe, cdnAssets as Q, useIsRtl as zo, bidiIsolateAuto as Qt, extractSdkError as We, useDisableCache as To, hexToRgb as Io, useColors as Do } from "fansunited-frontend-core";
3
+ import { BODY_FONT as Ro, space as ce, radius as we, useBreakpointUp as Z, Avatar as Po, Notification as _o, baseBody as Ao, baseHeading as Mo, Spinner as Bo, WidgetPortal as Eo } from "fansunited-frontend-core/ui/emotion";
4
+ import { useTranslation as G } from "react-i18next";
5
+ import { useRef as $e, useEffect as U, useState as I, useMemo as Ce } from "react";
6
+ import { css as r } from "@emotion/react";
7
+ import { ChevronLeftIcon as Lo, ChevronRightIcon as Wo, StarIcon as Qe, SearchIcon as Fo, CloseIcon as Ho, FilterAltIcon as lt, AccessTimeIcon as qt, HowToVoteIcon as Oo, CheckCircleIcon as No } from "fansunited-frontend-core/ui/icons";
8
+ import { X as Xo } from "fansunited-frontend-core/ui/icons/lucide";
9
+ import { w as Vo } from "./chunks/withVersionStamp-CPDfSE5H.js";
10
+ const e = {
11
+ fontPrimary: "var(--fu-ucrc-font-primary)",
12
+ fontSecondary: "var(--fu-ucrc-font-secondary)",
13
+ /** Joy's body stack, for text that set no font family. */
14
+ fontBody: Ro,
15
+ space3xs: ce("3xs"),
16
+ space2xs: ce("2xs"),
17
+ spaceXs: ce("xs"),
18
+ spaceSm: ce("sm"),
19
+ spaceMd: ce("md"),
20
+ spaceLg: ce("lg"),
21
+ spaceXl: ce("xl"),
22
+ radiusXs: we("xs"),
23
+ radiusSm: we("sm"),
24
+ radiusMd: we("md"),
25
+ radiusLg: we("lg"),
26
+ radiusFull: we("full"),
27
+ borderSize: "var(--fu-ucrc-border-size)",
28
+ surface: "var(--fu-ucrc-surface)",
29
+ surfaceVariant: "var(--fu-ucrc-surface-variant)",
30
+ text: "var(--fu-ucrc-text-primary)",
31
+ dim: "var(--fu-ucrc-text-secondary)",
32
+ tertiary: "var(--fu-ucrc-text-disabled)",
33
+ border: "var(--fu-ucrc-outline-enabled-border)",
34
+ primary: "var(--fu-ucrc-primary-plain-color)",
35
+ onPrimary: "var(--fu-ucrc-primary-on-primary)",
36
+ warning: "var(--fu-ucrc-warning-plain-color)",
37
+ warningSoft: "var(--fu-ucrc-warning-soft-bg)",
38
+ danger: "var(--fu-ucrc-danger-plain-color)",
39
+ /** The primary colour at 12%. */
40
+ primarySoft: "var(--fu-ucrc-potm-primary-soft)",
41
+ /** `r, g, b` of the primary colour, for `rgba(${V.primaryRgb}, alpha)`. */
42
+ primaryRgb: "var(--fu-ucrc-potm-primary-rgb)"
43
+ }, jo = {
44
+ "primary-soft-hover-bg": ["#C7DFF7", "#12467B"],
45
+ "primary-soft-active-color": ["#0A2744", "#E3EFFB"],
46
+ "primary-soft-active-bg": ["#97C3F0", "#185EA5"],
47
+ "primary-solid-hover-bg": ["#185EA5", "#185EA5"],
48
+ "primary-solid-disabled-color": ["#9FA6AD", "#636B74"],
49
+ "primary-solid-disabled-bg": ["#F0F4F8", "#171A1C"],
50
+ "neutral-outlined-active-bg": ["#DDE7EE", "#32383E"],
51
+ "neutral-soft-active-color": ["#171A1C", "#F0F4F8"],
52
+ "neutral-soft-active-bg": ["#CDD7E1", "#555E68"],
53
+ "warning-outlined-color": ["#9A5B13", "#FCE1C2"],
54
+ "warning-outlined-border": ["#F3C896", "#492B08"],
55
+ "warning-outlined-hover-bg": ["#FDF0E1", "#2E1B05"],
56
+ "warning-outlined-active-bg": ["#FCE1C2", "#492B08"]
57
+ }, ct = (t) => Object.fromEntries(
58
+ Object.entries(jo).map(([o, i]) => [
59
+ `--fu-ucrc-potm-${o}`,
60
+ `var(--fu-ucrc-${o}, ${i[t]})`
61
+ ])
62
+ ), Uo = r({ ...ct(0), ".dark &": ct(1) }), L = (t) => `var(--fu-ucrc-${t})`, K = (t) => `var(--fu-ucrc-potm-${t})`, y = {
63
+ focus: L("focus-visible"),
64
+ textSecondary: L("palette-text-secondary"),
65
+ textIcon: L("palette-text-icon"),
66
+ bgSurface: L("bg-surface"),
67
+ primarySoftColor: L("primary-soft-color"),
68
+ primarySoftBg: L("primary-soft-bg"),
69
+ primarySoftHoverBg: K("primary-soft-hover-bg"),
70
+ primarySoftActiveColor: K("primary-soft-active-color"),
71
+ primarySoftActiveBg: K("primary-soft-active-bg"),
72
+ primarySolidColor: L("primary-solid-color"),
73
+ primarySolidBg: L("primary-solid-bg"),
74
+ primarySolidHoverBg: K("primary-solid-hover-bg"),
75
+ primarySolidActiveBg: L("primary-solid-active-bg"),
76
+ primarySolidDisabledColor: K("primary-solid-disabled-color"),
77
+ primarySolidDisabledBg: K("primary-solid-disabled-bg"),
78
+ primaryOutlinedBorder: L("primary-outlined-border"),
79
+ neutralOutlinedColor: L("neutral-outlined-color"),
80
+ neutralOutlinedBorder: L("neutral-outlined-border"),
81
+ neutralOutlinedHoverBg: L("neutral-outlined-hover-bg"),
82
+ neutralOutlinedActiveBg: K("neutral-outlined-active-bg"),
83
+ neutralSoftColor: L("neutral-soft-color"),
84
+ neutralSoftBg: L("neutral-soft-bg"),
85
+ neutralSoftHoverBg: L("neutral-soft-hover-bg"),
86
+ neutralSoftActiveColor: K("neutral-soft-active-color"),
87
+ neutralSoftActiveBg: K("neutral-soft-active-bg"),
88
+ neutralPlainColor: L("neutral-plain-color"),
89
+ neutralPlainHoverColor: L("neutral-plain-hover-color"),
90
+ neutralPlainHoverBg: L("neutral-plain-hover-bg"),
91
+ neutralPlainActiveBg: L("neutral-plain-active-bg"),
92
+ neutralPlainDisabledColor: L("neutral-plain-disabled-color"),
93
+ warningOutlinedColor: K("warning-outlined-color"),
94
+ warningOutlinedBorder: K("warning-outlined-border"),
95
+ warningOutlinedHoverBg: K("warning-outlined-hover-bg"),
96
+ warningOutlinedActiveBg: K("warning-outlined-active-bg")
97
+ }, ve = { xs: "2px", sm: "6px", md: "8px", cardChild: "3.5px" }, P = {
98
+ margin: 0,
99
+ display: "block",
100
+ fontFamily: e.fontBody,
101
+ lineHeight: 1.5
102
+ }, Jt = {
113
103
  boxSizing: "border-box",
114
- // Include padding and border in width calculation
115
- fontSize: "1em"
116
- // Anchor the em cascade for all descendants (Shadow DOM rem safety)
117
- }), Be = { xs: "24.5em", sm: "24.5em" }, vo = {
118
- position: "relative",
119
- height: Be,
120
- overflow: "visible",
121
- // Cards scale/translate outside the box
122
- width: "100%",
123
- mx: "auto",
124
- touchAction: "pan-y",
125
- // Allow vertical scrolling but prevent horizontal browser scrolling
126
- overscrollBehavior: "contain",
127
- // Prevent pull-to-refresh and overscroll effects
128
- cursor: "grab",
129
- "&:active": {
130
- cursor: "grabbing"
131
- }
132
- }, zo = {
104
+ margin: 0,
105
+ font: "inherit",
106
+ cursor: "pointer",
107
+ userSelect: "none",
108
+ textDecoration: "none",
109
+ WebkitTapHighlightColor: "transparent",
110
+ "&:focus-visible": { outline: `2px solid ${y.focus}`, outlineOffset: "2px" }
111
+ }, nt = (t) => ({
112
+ ...Jt,
133
113
  position: "relative",
134
- height: "100%",
135
- // Full height: nothing is positioned inside this box any more
136
- display: "flex",
137
- alignItems: "center",
138
- justifyContent: "center"
139
- }, Co = (e) => ({
140
- color: e.colors.tertiary,
141
- mb: e.spacing.xl,
142
- fontSize: "0.875em"
143
- // body-sm
144
- }), Po = (e, o) => {
145
- const r = e - o, n = 1 - Math.min(0.25, Math.abs(r) * 0.15), s = r * 55, l = 20 - Math.abs(r);
146
- return {
147
- transform: `translateX(${s}%) scale(${n})`,
148
- zIndex: l,
149
- opacity: 1
150
- // Full opacity for all cards
151
- };
152
- }, To = (e, o) => ({
153
- position: "absolute",
154
- top: 0,
155
- left: 0,
156
- right: 0,
157
- mx: "auto",
158
- width: { xs: "13em", sm: "15em" },
159
- // Responsive width - smaller on mobile
160
- height: Be,
161
- // Shared with the container — see the constant's note
162
- maxWidth: "90%",
163
- // Ensure cards don't exceed container width
164
- display: "flex",
165
- flexDirection: "column",
114
+ display: "inline-flex",
166
115
  alignItems: "center",
167
- p: o.spacing.md,
168
- fontSize: "1em",
169
- // Anchor the em cascade for card content
170
- // Optimized transitions for better mobile performance
171
- transition: "transform 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out",
172
- willChange: "transform",
173
- // Hint to browser for GPU acceleration
174
- "@media (prefers-reduced-motion: reduce)": {
175
- transition: "border-color 300ms ease-out, box-shadow 300ms ease-out"
116
+ justifyContent: "center",
117
+ minHeight: t === "sm" ? "32px" : "36px",
118
+ padding: t === "sm" ? "4px 12px" : "6px 16px",
119
+ border: "none",
120
+ borderRadius: ve.sm,
121
+ fontWeight: 600,
122
+ lineHeight: 1.5,
123
+ "&:disabled": { pointerEvents: "none", cursor: "default" }
124
+ }), be = {
125
+ softPrimary: {
126
+ "--Icon-color": "currentColor",
127
+ color: y.primarySoftColor,
128
+ backgroundColor: y.primarySoftBg,
129
+ "@media (hover: hover)": { "&:hover": { backgroundColor: y.primarySoftHoverBg } },
130
+ "&:active": { color: y.primarySoftActiveColor, backgroundColor: y.primarySoftActiveBg }
176
131
  },
177
- border: `${o.border.size} solid`,
178
- boxSizing: "border-box",
179
- // Include padding and border in dimensions
180
- ...e && {
181
- borderColor: o.colors.primary,
182
- boxShadow: `0 0 0 ${o.border.size} ${o.colors.primary}`
132
+ softNeutral: {
133
+ "--Icon-color": "currentColor",
134
+ color: y.neutralSoftColor,
135
+ backgroundColor: y.neutralSoftBg,
136
+ "@media (hover: hover)": { "&:hover": { backgroundColor: y.neutralSoftHoverBg } },
137
+ "&:active": { color: y.neutralSoftActiveColor, backgroundColor: y.neutralSoftActiveBg }
183
138
  },
184
- bgcolor: o.colors.surface
185
- }), _o = (e) => ({
186
- position: "absolute",
187
- top: "0.625em",
188
- left: "0.625em",
189
- display: "flex",
190
- flexDirection: "column",
139
+ outlinedNeutral: {
140
+ "--Icon-color": y.textIcon,
141
+ color: y.neutralOutlinedColor,
142
+ border: `1px solid ${y.neutralOutlinedBorder}`,
143
+ "@media (hover: hover)": { "&:hover": { backgroundColor: y.neutralOutlinedHoverBg } },
144
+ "&:active": { backgroundColor: y.neutralOutlinedActiveBg }
145
+ }
146
+ }, Zt = {
147
+ ...Jt,
148
+ lineHeight: "normal",
149
+ // IconButton never set one, so the UA button's applied
150
+ display: "inline-flex",
191
151
  alignItems: "center",
192
- gap: e.spacing["2xs"],
193
- zIndex: 2
194
- }), Do = (e) => ({
195
- bgcolor: e.colors.primary,
196
- color: e.colors.onPrimary,
197
- width: "1.875em",
198
- height: "1.875em",
199
- flexShrink: 0,
200
- borderRadius: "50%",
201
152
  justifyContent: "center",
202
- alignItems: "center",
203
- display: "flex"
204
- }), Mo = {
205
- width: "1.5em",
206
- height: "1.25em",
207
- position: "absolute",
208
- top: "0.625em",
209
- right: "0.625em"
210
- }, ko = {
153
+ border: "none",
154
+ borderRadius: ve.sm,
155
+ fontWeight: 500,
156
+ backgroundColor: "transparent",
157
+ color: y.neutralPlainColor,
158
+ "--Icon-color": y.textIcon,
159
+ "@media (hover: hover)": {
160
+ "&:hover": { "--Icon-color": "currentColor", backgroundColor: y.neutralPlainHoverBg, color: y.neutralPlainHoverColor }
161
+ },
162
+ "&:active": { "--Icon-color": "currentColor", backgroundColor: y.neutralPlainActiveBg },
163
+ "&:disabled": { pointerEvents: "none", cursor: "default", color: y.neutralPlainDisabledColor }
164
+ }, eo = (t) => r({ display: "flex", marginRight: t }), ze = {
165
+ teamButton: { margin: "0 0 0 -3px" },
166
+ cta: { margin: "0 0 0 -4px" },
167
+ chip: { margin: "0 0 0 -1.5px" },
168
+ input: { margin: "0 0 0 calc(0.875em / -4)" }
169
+ }, Go = {
211
170
  display: "flex",
212
- flexDirection: "column",
213
171
  alignItems: "center",
214
- // Spreads leftover flex space between rows instead of dumping it all in one gap before the CTA.
215
- justifyContent: "space-between",
216
- flex: 1,
217
- width: "100%",
218
- // Ensure full width
219
- minWidth: 0,
220
- // Let the text children actually shrink so ellipsis can kick in
221
- overflow: "hidden"
222
- // Clip instead of forcing the fixed-height card to grow
223
- }, ke = (e, o) => ({
224
- fontSize: "0.875em",
225
- // body-sm
226
- color: e,
227
- maxWidth: "100%",
228
- textAlign: "center",
229
- whiteSpace: "nowrap",
230
- // overflowY visible: plain overflow:hidden let flex-shrink crop glyphs top/bottom under pressure.
231
- overflowX: "hidden",
232
- overflowY: "visible",
233
- textOverflow: "ellipsis",
234
- mb: o.spacing.xs,
235
- minHeight: "1.25em",
236
- flexShrink: 0
237
- }), Ro = (e) => ({
238
- width: "6em",
239
- height: "6em",
172
+ justifyContent: "center",
240
173
  flexShrink: 0,
241
- mb: e.spacing.md,
242
- border: `${e.border.size} solid`,
243
- borderColor: e.colors.primary,
244
- bgcolor: e.colors.surface
245
- }), $o = {
174
+ overflow: "hidden",
175
+ borderRadius: 0,
176
+ lineHeight: 1
177
+ }, dt = {
178
+ position: "relative",
179
+ width: "100%",
180
+ backgroundPosition: "center center",
181
+ // Always center the image
182
+ backgroundRepeat: "no-repeat",
183
+ overflow: "hidden",
246
184
  display: "flex",
247
- flexDirection: "row",
248
- justifyContent: "center",
249
185
  alignItems: "center",
250
- width: "100%",
251
- maxWidth: "100%",
252
- gap: { xs: "0.25em", sm: "0.5em" }
253
- }, Io = (e, o) => {
254
- const r = J(e.colors.primary);
255
- return {
256
- display: "flex",
186
+ justifyContent: "center"
187
+ }, ut = { position: "relative", zIndex: 2, height: "100%" }, fe = {
188
+ // The image is 860px wide: on mobile it keeps its aspect ratio and fills the height, so the
189
+ // sides get cut off but the centre 300px stays visible.
190
+ area: r({ ...dt, backgroundSize: "auto 100%" }),
191
+ areaSm: r({ ...dt, backgroundSize: "860px 150px" }),
192
+ overlay: r({ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, background: "transparent", zIndex: 1 }),
193
+ safeArea: r({ ...ut, width: "100%" }),
194
+ safeAreaSm: r({ ...ut, width: "300px" }),
195
+ link: r({
196
+ display: "block",
257
197
  alignItems: "center",
258
- justifyContent: "space-between",
259
- width: "100%",
260
- p: { xs: e.spacing.sm, sm: e.spacing.md },
261
- // Reduced padding on mobile
262
- borderRadius: e.radius.sm,
263
198
  position: "relative",
264
- overflow: "hidden",
199
+ margin: 0,
200
+ padding: 0,
201
+ border: 0,
202
+ borderRadius: ve.xs,
203
+ outline: 0,
204
+ backgroundColor: "transparent",
205
+ fontFamily: e.fontBody,
265
206
  fontSize: "1em",
266
- // Anchor the em cascade for the banner content
267
- background: (o == null ? void 0 : o.background) ?? `linear-gradient(135deg, rgba(${r}, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(${r}, 0.08) 100%)`,
268
- zIndex: 1,
269
- border: `${e.border.size} solid`,
270
- borderColor: (o == null ? void 0 : o.borderColor) ?? e.colors.primary,
271
- "&::before": {
272
- content: '""',
273
- position: "absolute",
274
- top: 0,
275
- left: 0,
276
- right: 0,
277
- bottom: 0,
278
- opacity: 0.02,
279
- backgroundImage: `
280
- linear-gradient(rgba(${r}, 0.5) 0.0625em, transparent 0.0625em),
281
- linear-gradient(to right, rgba(${r}, 0.5) 0.0625em, transparent 0.0625em)
282
- `,
283
- backgroundSize: "1.875em 1.875em",
284
- zIndex: 2
285
- },
286
- "&::after": {
287
- content: '""',
288
- position: "absolute",
289
- top: 0,
290
- left: 0,
291
- right: 0,
292
- bottom: 0,
293
- opacity: 0.07,
294
- backgroundImage: `
295
- linear-gradient(45deg, rgba(${r}, 0.6) 0.0625em, transparent 0.0625em),
296
- linear-gradient(135deg, rgba(${r}, 0.6) 0.0625em, transparent 0.0625em)
297
- `,
298
- backgroundSize: "3.75em 3.75em",
299
- zIndex: 3
207
+ lineHeight: 1.5,
208
+ color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)",
209
+ textDecoration: "none",
210
+ textUnderlineOffset: "0.15em",
211
+ cursor: "pointer",
212
+ WebkitTapHighlightColor: "transparent",
213
+ "&:hover": { opacity: 0.95 },
214
+ "&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
215
+ })
216
+ }, Yo = ({ backgroundImage: t, link: o, height: i = "150px", minHeight: l = "150px" }) => {
217
+ const p = Z("sm"), u = /* @__PURE__ */ v(
218
+ "div",
219
+ {
220
+ css: p ? fe.areaSm : fe.area,
221
+ style: { height: i, minHeight: l, backgroundImage: t ? `url(${t})` : "none" },
222
+ children: [
223
+ /* @__PURE__ */ n("div", { css: fe.overlay }),
224
+ /* @__PURE__ */ n("div", { css: p ? fe.safeAreaSm : fe.safeArea })
225
+ ]
300
226
  }
301
- };
302
- }, Vo = (e) => ({
227
+ );
228
+ return o ? /* @__PURE__ */ n("a", { href: o, target: "_blank", rel: "noopener noreferrer", css: fe.link, children: u }) : u;
229
+ }, to = "24.5em", oo = "@media (prefers-reduced-motion: reduce)", ie = {
230
+ // Joy Stack spacing: a top margin on every child after the first, not a gap.
231
+ root: r(Uo, {
232
+ display: "flex",
233
+ flexDirection: "column",
234
+ "& > :not(style):not(style)": { margin: 0 },
235
+ "& > :not(style) ~ :not(style)": { marginTop: e.spaceMd }
236
+ }),
237
+ // Search, position and sort read as one group of secondary filters below the team tabs.
238
+ filterGroup: r({
239
+ display: "flex",
240
+ flexDirection: "column",
241
+ alignItems: "center",
242
+ gap: e.spaceXs,
243
+ width: "100%",
244
+ fontSize: "1em"
245
+ }),
246
+ noResults: r({
247
+ display: "flex",
248
+ flexDirection: "column",
249
+ alignItems: "center",
250
+ justifyContent: "center",
251
+ gap: e.spaceSm,
252
+ textAlign: "center",
253
+ minHeight: "12em",
254
+ paddingLeft: e.spaceMd,
255
+ paddingRight: e.spaceMd,
256
+ fontSize: "1em",
257
+ color: e.dim
258
+ }),
259
+ noResultsText: r(P, { color: "inherit", fontSize: "1em" }),
260
+ clearFilters: r(nt("sm"), be.outlinedNeutral, {
261
+ backgroundColor: "transparent",
262
+ fontSize: "0.875em"
263
+ }),
264
+ container: r({
265
+ position: "relative",
266
+ height: to,
267
+ overflow: "visible",
268
+ // Cards scale/translate outside the box
269
+ width: "100%",
270
+ marginLeft: "auto",
271
+ marginRight: "auto",
272
+ touchAction: "pan-y",
273
+ // Allow vertical scrolling but prevent horizontal browser scrolling
274
+ overscrollBehavior: "contain",
275
+ // Prevent pull-to-refresh and overscroll effects
276
+ cursor: "grab",
277
+ "&:active": { cursor: "grabbing" }
278
+ }),
279
+ content: r({
280
+ position: "relative",
281
+ height: "100%",
282
+ display: "flex",
283
+ alignItems: "center",
284
+ justifyContent: "center"
285
+ }),
286
+ hint: r(P, { color: e.tertiary, fontSize: "0.875em", textAlign: "center" })
287
+ }, Ko = (t, o, i) => r(Zt, {
303
288
  position: "absolute",
304
289
  top: "50%",
305
290
  transform: "translateY(-50%)",
306
291
  zIndex: 30,
307
- bgcolor: e.colors.primary,
292
+ padding: "0 4px",
293
+ backgroundColor: e.primary,
308
294
  boxShadow: "0 0.125em 0.75em rgba(0,0,0,0.15)",
309
- border: `${e.border.size} solid`,
310
- borderColor: e.colors.primarySoft,
295
+ border: `${e.borderSize} solid ${e.primarySoft}`,
311
296
  fontSize: "1em",
312
- // IconButton is a primitive that must set explicit em fontSize
313
- // Responsive sizing - smaller on mobile, larger on desktop
314
- width: { xs: "2.25em", sm: "3em" },
315
- height: { xs: "2.25em", sm: "3em" },
297
+ width: i ? "3em" : "2.25em",
298
+ height: i ? "3em" : "2.25em",
299
+ minWidth: i ? "3em" : "2.75em",
300
+ minHeight: i ? "3em" : "2.75em",
316
301
  transition: "all 0.2s ease",
302
+ display: "flex",
303
+ [t]: "-1.5em",
304
+ opacity: o ? 0.4 : 1,
317
305
  "&:hover": {
318
- bgcolor: e.colors.primary,
306
+ backgroundColor: e.primary,
319
307
  boxShadow: "0 0.25em 1.25em rgba(0,0,0,0.2)",
320
308
  transform: "translateY(-50%) scale(1.05)"
321
309
  },
322
310
  "&:active": {
323
- bgcolor: e.colors.primarySoft,
311
+ backgroundColor: e.primarySoft,
324
312
  transform: "translateY(-50%) scale(0.98)"
325
313
  },
326
- // Show arrows on all screen sizes now
327
- display: "flex",
328
- // Ensure good touch target size on mobile
329
- minWidth: { xs: "2.75em", sm: "3em" },
330
- minHeight: { xs: "2.75em", sm: "3em" }
331
- }), Eo = (e) => {
332
- const o = J(e.colors.primary);
333
- return {
334
- textAlign: "center",
335
- py: e.spacing.xl,
336
- px: e.spacing.md,
314
+ // The carousel handles ←/→ itself, so after a click the focused arrow would light up on
315
+ // every key press. Joy never showed a ring here either (its focus var didn't resolve).
316
+ "&:focus-visible": { outline: "none" }
317
+ }), qe = {};
318
+ for (const t of ["left", "right"])
319
+ for (const o of [!1, !0])
320
+ for (const i of [!1, !0]) qe[`${t}|${o}|${i}`] = Ko(t, o, i);
321
+ const Pe = {
322
+ // Static on purpose: a normal Stack sibling, so a tall card can't push over it.
323
+ wrapper: r({
337
324
  display: "flex",
338
- flexDirection: "column",
339
325
  alignItems: "center",
340
326
  justifyContent: "center",
341
- minHeight: "15.625em",
342
- borderRadius: e.radius.sm,
327
+ gap: e.spaceXs,
328
+ width: "100%",
329
+ fontSize: "1em",
330
+ // Cards carry z-index up to 20 and their shadows bleed past the card box.
343
331
  position: "relative",
344
- overflow: "hidden",
345
- background: `linear-gradient(135deg, rgba(${o}, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(${o}, 0.08) 100%)`,
346
- zIndex: 1
347
- };
348
- }, Wo = (e) => {
349
- const o = J(e.colors.primary);
350
- return {
351
- position: "absolute",
352
- top: 0,
353
- left: 0,
354
- right: 0,
355
- bottom: 0,
356
- opacity: 0.02,
357
- backgroundImage: `
358
- linear-gradient(rgba(${o}, 0.5) 0.0625em, transparent 0.0625em),
359
- linear-gradient(to right, rgba(${o}, 0.5) 0.0625em, transparent 0.0625em)
360
- `,
361
- backgroundSize: "1.875em 1.875em",
362
- zIndex: 2
363
- };
364
- }, Lo = (e) => {
365
- const o = J(e.colors.primary);
366
- return {
332
+ zIndex: 31
333
+ }),
334
+ counter: r(P, {
335
+ color: e.dim,
336
+ fontSize: "0.75em",
337
+ fontVariantNumeric: "tabular-nums",
338
+ fontWeight: 600,
339
+ letterSpacing: "0.02em",
340
+ whiteSpace: "nowrap"
341
+ }),
342
+ track: r({
343
+ position: "relative",
344
+ flex: 1,
345
+ maxWidth: "14em",
346
+ height: "0.25em",
347
+ borderRadius: "0.125em",
348
+ backgroundColor: e.border,
349
+ overflow: "hidden"
350
+ }),
351
+ // Width is set inline; `left` stays here so it mirrors under RTL.
352
+ fill: r({
367
353
  position: "absolute",
368
354
  top: 0,
369
355
  left: 0,
370
- right: 0,
371
- bottom: 0,
372
- opacity: 0.02,
373
- backgroundImage: `
374
- linear-gradient(45deg, rgba(${o}, 0.6) 0.0625em, transparent 0.0625em),
375
- linear-gradient(135deg, rgba(${o}, 0.6) 0.0625em, transparent 0.0625em)
376
- `,
377
- backgroundSize: "3.75em 3.75em",
378
- zIndex: 3
379
- };
380
- }, No = (e) => ({
381
- mb: e.spacing.sm,
382
- fontWeight: 300,
383
- letterSpacing: "0.02em",
384
- color: e.colors.primary,
385
- fontSize: "1.5em"
386
- // h3
387
- }), Ho = (e) => ({
388
- mb: e.spacing.xl,
389
- maxWidth: "31.25em",
390
- color: e.colors.dim,
391
- fontSize: "1em"
392
- // body-md
393
- }), Bo = (e) => ({
394
- maxWidth: "28.75em",
395
- width: "90%",
396
- borderRadius: e.radius.lg,
397
- borderColor: "neutral",
398
- boxShadow: "0 0.25em 0.75em rgba(0, 0, 0, 0.05)",
399
- overflow: "hidden",
400
- py: e.spacing.lg,
401
- px: e.spacing.md,
402
- opacity: 1,
403
- zIndex: 4,
404
- fontSize: "1em",
405
- // Anchor the em cascade for the countdown content
406
- background: e.colors.surface
407
- }), jo = {
408
- position: "absolute",
409
- left: { xs: 0, sm: "0.5em" },
410
- color: "neutral.400",
411
- fontSize: "1.25em"
412
- }, Fo = {
413
- justifyContent: "center",
414
- width: "100%"
415
- }, Uo = (e) => ({
416
- color: e.colors.text,
417
- fontVariantNumeric: "tabular-nums",
418
- fontWeight: 600,
419
- fontSize: "1.25em"
420
- // h4
421
- }), Ao = (e) => ({
422
- color: e.colors.dim,
423
- fontSize: "0.7em",
424
- textTransform: "uppercase",
425
- letterSpacing: "0.05em",
426
- mt: "0.25em"
427
- }), Oo = {
428
- alignSelf: "flex-start",
429
- mt: "0.25em",
430
- color: "neutral.300",
431
- fontWeight: 300,
432
- fontSize: "1.25em"
433
- // h4
434
- }, Xo = (e, o, r, n, s, l) => {
435
- const m = () => e ? "linear-gradient(135deg,rgb(213, 169, 133),rgb(255, 167, 3))" : o ? "linear-gradient(135deg, #C0C0C0, #A9A9A9)" : r ? "linear-gradient(135deg, #CD7F32, #8B4513)" : "none", w = () => e ? { xs: 1, sm: 1.01 } : o ? { xs: 1, sm: 0.95 } : { xs: 1, sm: 0.95 };
436
- return {
437
- width: { xs: "auto", sm: "30%" },
438
- display: "flex",
439
- flexDirection: "column",
440
- alignItems: "center",
441
- justifyContent: "flex-start",
442
- py: l.spacing.lg,
443
- px: l.spacing.md,
444
- fontSize: "1em",
445
- // Anchor the em cascade for the result card content
446
- // Remove mx override to allow Stack spacing to work properly
447
- position: "relative",
448
- transform: { xs: "scale(1)", sm: `scale(${w().sm})` },
449
- transformOrigin: "center top",
450
- border: `${l.border.size} solid`,
451
- borderColor: e ? l.colors.warning : "neutral.200",
452
- boxShadow: e ? `0 0.625em 1.5625em rgba(${J(l.colors.warning)}, 0.2)` : "0 0.3125em 0.9375em rgba(0,0,0,0.06)",
453
- transition: "all 0.3s ease",
454
- overflow: "visible",
455
- "&::before": e ? {
456
- content: '""',
457
- position: "absolute",
458
- top: 0,
459
- left: 0,
460
- right: 0,
461
- bottom: 0,
462
- zIndex: -1,
463
- borderRadius: "inherit",
464
- background: m(),
465
- opacity: 0.4
466
- } : {},
467
- "&:hover": {
468
- borderColor: e ? l.colors.warning : "neutral.200"
469
- },
470
- zIndex: e ? 2 : o ? 1 : 0,
471
- order: {
472
- xs: n,
473
- sm: e ? s !== void 0 ? s : 0 : o ? -1 : 1
474
- }
475
- };
476
- }, Go = (e, o) => ({
477
- position: "absolute",
478
- top: "-0.9375em",
479
- left: "50%",
480
- transform: "translateX(-50%)",
481
- width: "2.5em",
482
- height: "2.5em",
483
- borderRadius: "50%",
484
- bgcolor: e ? o.colors.warning : "neutral.300",
485
- display: "flex",
486
- justifyContent: "center",
487
- alignItems: "center",
488
- boxShadow: "0 0.125em 0.5em rgba(0,0,0,0.2)",
489
- zIndex: 10,
490
- fontSize: e ? "1.2em" : "1em"
491
- }), Yo = {
492
- width: "1.875em",
493
- height: "1.875em",
494
- position: "absolute",
495
- top: "0.625em",
496
- right: "0.625em"
497
- }, Ko = (e, o) => ({
498
- width: e ? "6.875em" : "6.25em",
499
- height: e ? "6.875em" : "6.25em",
500
- my: o.spacing.md,
501
- border: `${o.border.size} solid`,
502
- borderColor: e ? o.colors.warning : "neutral.300"
503
- }), Qo = (e, o) => ({
504
- width: "80%",
505
- mx: "auto",
506
- height: "0.5em",
507
- bgcolor: e ? o.colors.warningSoft : "neutral.200",
508
- borderRadius: "0.25em",
509
- overflow: "hidden",
510
- position: "relative"
511
- }), Jo = (e, o, r) => ({
512
- position: "absolute",
513
- top: 0,
514
- left: 0,
515
- height: "100%",
516
- width: `${o}%`,
517
- bgcolor: e ? r.colors.warning : "neutral.400",
518
- borderRadius: "0.25em",
519
- transition: "width 1s ease-in-out"
520
- }), Zo = (e) => ({
521
- display: "flex",
522
- flexDirection: "column",
523
- alignItems: "center",
524
- gap: e.spacing.xs,
525
- width: "100%",
526
- fontSize: "1em"
527
- // Anchor the em cascade for the controls
528
- }), qo = () => ({
529
- width: "100%",
530
- maxWidth: "24em",
531
- mx: "auto",
532
- minWidth: 0
533
- }), et = (e) => ({
534
- fontFamily: e.fonts.primary,
535
- fontSize: "0.875em",
536
- // body-sm
537
- width: "100%",
538
- "--Input-radius": e.radius.full,
539
- "--Input-paddingInline": "0.875em",
540
- "--Input-minHeight": "2.5em",
541
- "--Input-focusedHighlight": e.colors.primary,
542
- "--Input-focusedThickness": e.border.size,
543
- bgcolor: e.colors.surface,
544
- color: e.colors.text,
545
- borderColor: e.colors.border
546
- }), ot = (e) => ({
547
- color: e.colors.dim,
548
- fontSize: "0.75em",
549
- // body-xs
550
- fontVariantNumeric: "tabular-nums",
551
- mt: e.spacing["2xs"],
552
- textAlign: "center"
553
- }), tt = (e) => ({
554
- display: "flex",
555
- flexWrap: "wrap",
556
- justifyContent: "center",
557
- alignItems: "center",
558
- gap: e.spacing["2xs"],
559
- width: "100%",
560
- fontSize: "1em"
561
- }), Re = (e, o) => ({
562
- cursor: "pointer",
563
- fontSize: { xs: "0.75em", sm: "0.8125em" },
564
- fontFamily: o.fonts.primary,
565
- minHeight: "2em",
566
- gap: "0.5em",
567
- // Roomier than before: the labels are full position names now, not three-letter codes, so the
568
- // text needs to sit clear of the pill's rounded ends.
569
- px: o.spacing.sm,
570
- borderRadius: o.radius.full,
571
- // Tabular figures keep the trailing counts from jittering as the widths change.
572
- fontVariantNumeric: "tabular-nums",
573
- letterSpacing: "0.01em",
574
- color: e ? o.colors.primary : o.colors.dim,
575
- borderColor: e ? o.colors.primary : o.colors.border,
576
- bgcolor: e ? o.colors.primarySoft : "transparent",
577
- transition: "background-color 150ms ease, color 150ms ease, border-color 150ms ease",
578
- "&:hover": {
579
- bgcolor: e ? o.colors.primarySoft : o.colors.surfaceVariant
580
- }
581
- }), rt = (e, o) => ({
582
- display: "inline-flex",
583
- alignItems: "center",
584
- justifyContent: "center",
585
- minWidth: "1.375em",
586
- px: "0.3125em",
587
- borderRadius: o.radius.full,
588
- fontSize: "0.75em",
589
- fontWeight: 600,
590
- fontVariantNumeric: "tabular-nums",
591
- lineHeight: 1.7,
592
- bgcolor: e ? o.colors.primary : o.colors.surfaceVariant,
593
- color: e ? o.colors.onPrimary : o.colors.dim
594
- }), nt = (e) => {
595
- const o = J(e.colors.primary);
596
- return {
356
+ height: "100%",
357
+ minWidth: "0.75em",
358
+ borderRadius: "0.125em",
359
+ backgroundColor: e.primary,
360
+ transition: "width 250ms ease-out",
361
+ [oo]: { transition: "none" }
362
+ })
363
+ }, ne = {
364
+ bar: r({
597
365
  display: "flex",
598
366
  flexWrap: "wrap",
599
367
  alignItems: "center",
600
368
  justifyContent: "center",
601
- // Hugs its content rather than stretching edge to edge. A full-width pill around one short
602
- // line of text reads as an empty container; sized to its content it reads as a status chip.
369
+ // Hugs its content: sized to the text it reads as a status chip, not an empty container.
603
370
  alignSelf: "center",
604
371
  width: "auto",
605
372
  maxWidth: "100%",
606
- columnGap: e.spacing.xs,
607
- rowGap: e.spacing["3xs"],
608
- // Pill proportions: horizontal padding roughly double the vertical, so the rounded ends have
609
- // room to sit away from the text instead of clipping it.
610
- py: e.spacing.xs,
611
- px: e.spacing.lg,
612
- borderRadius: e.radius.full,
613
- bgcolor: `rgba(${o}, 0.06)`,
614
- border: `${e.border.size} solid`,
615
- borderColor: `rgba(${o}, 0.15)`,
373
+ columnGap: e.spaceXs,
374
+ rowGap: e.space3xs,
375
+ padding: `${e.spaceXs} ${e.spaceLg}`,
376
+ borderRadius: e.radiusFull,
377
+ backgroundColor: `rgba(${e.primaryRgb}, 0.06)`,
378
+ border: `${e.borderSize} solid rgba(${e.primaryRgb}, 0.15)`,
616
379
  fontSize: "1em"
617
- // Anchor the em cascade for the strip
618
- };
619
- }, $e = (e) => ({
620
- display: "flex",
621
- alignItems: "center",
622
- gap: e.spacing["2xs"],
623
- color: e.colors.dim,
624
- fontSize: "0.8125em",
625
- whiteSpace: "nowrap"
626
- }), it = (e, o) => ({
627
- fontVariantNumeric: "tabular-nums",
628
- fontWeight: 600,
629
- fontSize: "inherit",
630
- letterSpacing: "0.01em",
631
- color: e ? o.colors.danger : o.colors.primary
632
- }), st = (e) => ({
633
- display: { xs: "none", sm: "block" },
634
- color: e.colors.tertiary,
635
- fontSize: "0.8125em",
636
- opacity: 0.6
637
- }), at = (e) => {
638
- const o = J(e.colors.primary);
639
- return {
640
- display: "inline-flex",
380
+ }),
381
+ item: r({
382
+ display: "flex",
641
383
  alignItems: "center",
642
- gap: e.spacing["2xs"],
643
- alignSelf: "center",
644
- maxWidth: "100%",
645
- py: e.spacing["2xs"],
646
- px: e.spacing.sm,
647
- borderRadius: e.radius.full,
648
- cursor: "pointer",
649
- bgcolor: `rgba(${o}, 0.1)`,
650
- border: `${e.border.size} solid`,
651
- borderColor: e.colors.primary,
652
- color: e.colors.primary,
384
+ gap: e.space2xs,
385
+ color: e.dim,
653
386
  fontSize: "0.8125em",
654
- fontFamily: e.fonts.primary,
655
- transition: "background-color 150ms ease",
656
- "&:hover": {
657
- bgcolor: `rgba(${o}, 0.18)`
658
- }
659
- };
660
- }, lt = (e) => ({
661
- // Deliberately static. This used to be `position: absolute; bottom: -0.625em` inside the carousel
662
- // box, which pinned it to a fixed offset regardless of how tall the active card actually was — a
663
- // two-line player name pushed the card straight over it. As a normal sibling it just gets the
664
- // parent Stack's spacing, like everything else in the widget.
665
- display: "flex",
387
+ whiteSpace: "nowrap"
388
+ }),
389
+ label: r(P, { fontSize: "inherit", color: "inherit" }),
390
+ // Tabular figures stop the row from twitching every second as digits change width.
391
+ value: r(P, {
392
+ fontVariantNumeric: "tabular-nums",
393
+ fontWeight: 600,
394
+ fontSize: "inherit",
395
+ letterSpacing: "0.01em",
396
+ color: e.primary
397
+ }),
398
+ valueUrgent: r(P, {
399
+ fontVariantNumeric: "tabular-nums",
400
+ fontWeight: 600,
401
+ fontSize: "inherit",
402
+ letterSpacing: "0.01em",
403
+ color: e.danger
404
+ }),
405
+ separator: r(P, { display: "none", color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 }),
406
+ separatorShown: r(P, { color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 })
407
+ }, mt = {
408
+ display: "inline-flex",
666
409
  alignItems: "center",
667
- justifyContent: "center",
668
- gap: e.spacing.xs,
669
- width: "100%",
670
- fontSize: "1em",
671
- // Cards carry z-index up to 20 and their shadows bleed past the card box, so claim a stacking
672
- // context above them. Belt and braces — with a matched height there should be no overlap at all.
673
- position: "relative",
674
- zIndex: 31
675
- }), ct = (e) => ({
676
- color: e.colors.dim,
677
- fontSize: "0.75em",
678
- fontVariantNumeric: "tabular-nums",
679
- fontWeight: 600,
680
- letterSpacing: "0.02em",
681
- whiteSpace: "nowrap"
682
- }), dt = (e) => ({
683
- position: "relative",
684
- flex: 1,
685
- maxWidth: "14em",
686
- height: "0.25em",
687
- borderRadius: "0.125em",
688
- bgcolor: e.colors.border,
689
- overflow: "hidden"
690
- }), mt = (e, o) => ({
691
- position: "absolute",
692
- top: 0,
693
- left: 0,
694
- height: "100%",
695
- width: `${e}%`,
696
- minWidth: "0.75em",
697
- borderRadius: "0.125em",
698
- bgcolor: o.colors.primary,
699
- transition: "width 250ms ease-out",
700
- "@media (prefers-reduced-motion: reduce)": {
701
- transition: "none"
702
- }
703
- }), ut = (e) => ({
704
- display: "flex",
705
- alignItems: "flex-start",
706
- gap: e.spacing.xs,
707
- width: "100%",
708
- overflowX: "auto",
709
- overflowY: "hidden",
710
- scrollSnapType: "x proximity",
711
- // Room for the shirt-number badge, which sits slightly outside the avatar box.
712
- py: e.spacing["2xs"],
713
- px: e.spacing["3xs"],
714
- fontSize: "1em",
715
- // The rail is navigated by tapping, not by dragging a visible scrollbar — hiding it keeps the
716
- // strip from looking like a second, competing control.
717
- scrollbarWidth: "none",
718
- msOverflowStyle: "none",
719
- "&::-webkit-scrollbar": { display: "none" },
720
- // Horizontal swipes belong to the rail; vertical ones must still scroll the host page.
721
- touchAction: "pan-x",
722
- overscrollBehaviorX: "contain"
723
- }), gt = (e, o, r, n) => ({
410
+ gap: e.space2xs,
411
+ alignSelf: "center",
412
+ maxWidth: "100%",
413
+ padding: `${e.space2xs} ${e.spaceSm}`,
414
+ borderRadius: e.radiusFull,
415
+ cursor: "pointer",
416
+ backgroundColor: `rgba(${e.primaryRgb}, 0.1)`,
417
+ border: `${e.borderSize} solid ${e.primary}`,
418
+ color: e.primary,
419
+ fontSize: "0.8125em",
420
+ fontFamily: e.fontPrimary,
421
+ transition: "background-color 150ms ease",
422
+ "&:hover": { backgroundColor: `rgba(${e.primaryRgb}, 0.18)` }
423
+ }, _e = {
424
+ pill: r(mt),
425
+ pillStatic: r(mt, { cursor: "default", "&:hover": { backgroundColor: "inherit" } }),
426
+ text: r(P, {
427
+ fontSize: "inherit",
428
+ color: "inherit",
429
+ overflow: "hidden",
430
+ textOverflow: "ellipsis",
431
+ whiteSpace: "nowrap"
432
+ }),
433
+ jump: r(P, {
434
+ fontSize: "inherit",
435
+ color: "inherit",
436
+ fontWeight: 700,
437
+ textDecoration: "underline",
438
+ flexShrink: 0
439
+ })
440
+ }, je = {
441
+ root: r({ position: "relative", width: "100%", fontSize: "1em" }),
442
+ scroller: r({
443
+ display: "flex",
444
+ alignItems: "flex-start",
445
+ gap: e.spaceXs,
446
+ width: "100%",
447
+ overflowX: "auto",
448
+ overflowY: "hidden",
449
+ scrollSnapType: "x proximity",
450
+ // Room for the shirt-number badge, which sits slightly outside the avatar box.
451
+ padding: `${e.space2xs} ${e.space3xs}`,
452
+ fontSize: "1em",
453
+ // Navigated by tapping, so a visible scrollbar would read as a second, competing control.
454
+ scrollbarWidth: "none",
455
+ msOverflowStyle: "none",
456
+ "&::-webkit-scrollbar": { display: "none" },
457
+ // Horizontal swipes belong to the rail; vertical ones must still scroll the host page.
458
+ touchAction: "pan-x",
459
+ overscrollBehaviorX: "contain"
460
+ }),
461
+ votedBadge: r({
462
+ position: "absolute",
463
+ top: "-0.125em",
464
+ right: "0.125em",
465
+ width: "1.125em",
466
+ height: "1.125em",
467
+ borderRadius: "50%",
468
+ display: "flex",
469
+ alignItems: "center",
470
+ justifyContent: "center",
471
+ backgroundColor: e.primary,
472
+ border: `${e.borderSize} solid ${e.surface}`,
473
+ fontSize: "1em",
474
+ zIndex: 2
475
+ })
476
+ }, pt = (t) => r({
724
477
  position: "relative",
725
478
  flex: "0 0 auto",
726
479
  display: "flex",
727
480
  flexDirection: "column",
728
481
  alignItems: "center",
729
- gap: n.spacing["3xs"],
482
+ gap: e.space3xs,
730
483
  width: "3.25em",
731
- p: 0,
484
+ padding: 0,
732
485
  border: "none",
733
- bgcolor: "transparent",
486
+ backgroundColor: "transparent",
734
487
  cursor: "pointer",
735
488
  scrollSnapAlign: "center",
736
489
  fontSize: "1em",
737
- opacity: e || o ? 1 : 0.72,
490
+ opacity: t ? 1 : 0.72,
738
491
  transition: "opacity 150ms ease, transform 150ms ease",
739
- "&:hover": {
740
- opacity: 1,
741
- transform: "translateY(-0.125em)"
742
- },
492
+ "&:hover": { opacity: 1, transform: "translateY(-0.125em)" },
743
493
  "&:focus-visible": {
744
- outline: `${n.border.size} solid ${n.colors.primary}`,
494
+ outline: `${e.borderSize} solid ${e.primary}`,
745
495
  outlineOffset: "0.125em",
746
- borderRadius: n.radius.xs
496
+ borderRadius: e.radiusXs
747
497
  },
748
- "@media (prefers-reduced-motion: reduce)": {
498
+ [oo]: {
749
499
  transition: "opacity 150ms ease",
750
500
  "&:hover": { opacity: 1, transform: "none" }
751
- },
752
- // Substitutes read as provisional via a dashed ring; starters get a solid one.
753
- "& .potm-rail-avatar": {
754
- borderStyle: r ? "dashed" : "solid"
755
501
  }
756
- }), pt = (e, o, r) => ({
502
+ }), ft = { lit: pt(!0), dim: pt(!1) }, Qo = (t, o, i) => r({
503
+ position: "relative",
757
504
  width: "2.5em",
758
505
  height: "2.5em",
759
- bgcolor: r.colors.surface,
760
- border: `${r.border.size} solid`,
761
- borderColor: e || o ? r.colors.primary : r.colors.border,
762
- boxShadow: e ? `0 0 0 ${r.border.size} ${r.colors.primary}` : "none",
763
- filter: e ? "none" : "saturate(0.75)",
506
+ backgroundColor: e.surface,
507
+ border: `${e.borderSize} solid`,
508
+ // Substitutes read as provisional via a dashed ring; starters get a solid one.
509
+ borderStyle: i ? "dashed" : "solid",
510
+ borderColor: t || o ? e.primary : e.border,
511
+ boxShadow: t ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
512
+ filter: t ? "none" : "saturate(0.75)",
764
513
  transition: "border-color 150ms ease, box-shadow 150ms ease"
765
- }), ht = (e, o) => ({
514
+ }), no = {};
515
+ for (const t of [!1, !0])
516
+ for (const o of [!1, !0])
517
+ for (const i of [!1, !0])
518
+ no[`${t}|${o}|${i}`] = Qo(t, o, i);
519
+ const gt = (t) => r(P, {
766
520
  fontSize: "0.6875em",
767
521
  fontVariantNumeric: "tabular-nums",
768
522
  fontWeight: 600,
769
523
  lineHeight: 1.2,
770
- color: e ? o.colors.primary : o.colors.tertiary
771
- }), ft = (e) => ({
524
+ color: t ? e.primary : e.tertiary
525
+ }), ht = { active: gt(!0), idle: gt(!1) }, qo = ({ activeIndex: t, totalItems: o, onPrev: i, onNext: l }) => {
526
+ const p = Z("sm");
527
+ if (o <= 1) return null;
528
+ const u = t === 0, f = t === o - 1;
529
+ return /* @__PURE__ */ v(ke, { children: [
530
+ /* @__PURE__ */ n(
531
+ "button",
532
+ {
533
+ type: "button",
534
+ onClick: i,
535
+ disabled: u,
536
+ css: qe[`left|${u}|${p}`],
537
+ "aria-label": "Previous player",
538
+ children: /* @__PURE__ */ n(st, { children: /* @__PURE__ */ n(Lo, { size: "1.5em", color: e.onPrimary }) })
539
+ }
540
+ ),
541
+ /* @__PURE__ */ n(
542
+ "button",
543
+ {
544
+ type: "button",
545
+ onClick: l,
546
+ disabled: f,
547
+ css: qe[`right|${f}|${p}`],
548
+ "aria-label": "Next player",
549
+ children: /* @__PURE__ */ n(st, { children: /* @__PURE__ */ n(Wo, { size: "1.5em", color: e.onPrimary }) })
550
+ }
551
+ )
552
+ ] });
553
+ }, Jo = ({
554
+ activeIndex: t,
555
+ totalItems: o
556
+ }) => {
557
+ const { t: i } = G();
558
+ if (o <= 1) return null;
559
+ const l = (t + 1) / o * 100;
560
+ return /* @__PURE__ */ v("div", { css: Pe.wrapper, children: [
561
+ /* @__PURE__ */ n("p", { "aria-live": "polite", css: Pe.counter, children: i("potm.player_position", {
562
+ current: t + 1,
563
+ total: o
564
+ }) }),
565
+ /* @__PURE__ */ n(
566
+ "div",
567
+ {
568
+ role: "progressbar",
569
+ "aria-valuemin": 1,
570
+ "aria-valuemax": o,
571
+ "aria-valuenow": t + 1,
572
+ css: Pe.track,
573
+ children: /* @__PURE__ */ n("div", { css: Pe.fill, style: { width: `${l}%` } })
574
+ }
575
+ )
576
+ ] });
577
+ }, Zo = { width: "100%", height: "100%", objectFit: "cover" }, rt = ({ src: t, placeholder: o, alt: i, className: l, style: p }) => (
578
+ // `style` replaces the Avatar's own inline root style, so it is only passed when given.
579
+ /* @__PURE__ */ n(Po, { src: t, alt: i, className: l, ...p && { style: p }, children: /* @__PURE__ */ n("img", { src: o, alt: i ?? "", onError: Fe(), style: Zo }) })
580
+ ), en = (t, o, i) => r({
772
581
  position: "absolute",
773
- top: "-0.125em",
774
- right: "0.125em",
775
- width: "1.125em",
776
- height: "1.125em",
777
- borderRadius: "50%",
582
+ top: 0,
583
+ left: 0,
584
+ right: 0,
585
+ marginLeft: "auto",
586
+ marginRight: "auto",
587
+ width: i ? "15em" : "13em",
588
+ height: to,
589
+ maxWidth: "90%",
590
+ boxSizing: "border-box",
778
591
  display: "flex",
592
+ flexDirection: "column",
779
593
  alignItems: "center",
780
- justifyContent: "center",
781
- bgcolor: e.colors.primary,
782
- border: `${e.border.size} solid ${e.colors.surface}`,
594
+ gap: "12px 16px",
595
+ padding: e.spaceMd,
596
+ fontFamily: e.fontBody,
783
597
  fontSize: "1em",
784
- zIndex: 2
785
- }), xt = (e) => ({
786
- display: "flex",
787
- alignItems: "center",
788
- justifyContent: "center",
789
- px: e.spacing["2xs"],
790
- minHeight: "1.125em",
791
- borderRadius: "full",
792
- bgcolor: e.colors.surfaceVariant,
793
- color: e.colors.dim,
794
- border: `${e.border.size} solid`,
795
- borderColor: e.colors.border,
796
- fontSize: "0.625em",
797
- fontWeight: 700,
798
- letterSpacing: "0.06em",
799
- lineHeight: 1.6,
800
- whiteSpace: "nowrap"
801
- }), bt = (e) => ({
598
+ lineHeight: 1.5,
599
+ color: y.neutralOutlinedColor,
600
+ backgroundColor: e.surface,
601
+ backgroundRepeat: "no-repeat",
602
+ backgroundSize: "cover",
603
+ backgroundPosition: "center",
604
+ border: `${e.borderSize} solid`,
605
+ borderRadius: ve.md,
606
+ borderColor: t ? e.primary : e.primarySoft,
607
+ boxShadow: t ? "0 0.5em 1.5em rgba(0,0,0,0.12)" : o ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
608
+ overflow: "visible",
609
+ // Shadows spill past the card
610
+ transition: "transform 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out",
611
+ willChange: "transform",
612
+ "@media (prefers-reduced-motion: reduce)": {
613
+ transition: "border-color 300ms ease-out, box-shadow 300ms ease-out"
614
+ },
615
+ "&:hover": { borderColor: e.primary, cursor: "default" }
616
+ }), ro = {};
617
+ for (const t of [!1, !0])
618
+ for (const o of [!1, !0])
619
+ for (const i of [!1, !0]) ro[`${t}|${o}|${i}`] = en(t, o, i);
620
+ const Ae = {
621
+ cluster: r({
622
+ position: "absolute",
623
+ top: "0.625em",
624
+ left: "0.625em",
625
+ display: "flex",
626
+ flexDirection: "column",
627
+ alignItems: "center",
628
+ gap: e.space2xs,
629
+ zIndex: 2
630
+ }),
631
+ number: r({
632
+ backgroundColor: e.primary,
633
+ color: e.onPrimary,
634
+ width: "1.875em",
635
+ height: "1.875em",
636
+ flexShrink: 0,
637
+ borderRadius: "50%",
638
+ justifyContent: "center",
639
+ alignItems: "center",
640
+ display: "flex"
641
+ }),
642
+ numberText: r(P, { fontSize: "0.75em", color: "inherit" }),
643
+ // No radius: Joy dropped its `borderRadius: "full"` as an unknown token.
644
+ substitute: r(P, {
645
+ display: "flex",
646
+ alignItems: "center",
647
+ justifyContent: "center",
648
+ paddingLeft: e.space2xs,
649
+ paddingRight: e.space2xs,
650
+ minHeight: "1.125em",
651
+ backgroundColor: e.surfaceVariant,
652
+ color: e.dim,
653
+ border: `${e.borderSize} solid ${e.border}`,
654
+ fontSize: "0.625em",
655
+ fontWeight: 700,
656
+ letterSpacing: "0.06em",
657
+ lineHeight: 1.6,
658
+ whiteSpace: "nowrap"
659
+ })
660
+ }, tn = r({
661
+ width: "1.75em",
662
+ height: "1.75em",
663
+ objectFit: "contain",
664
+ // Crests aren't all one aspect ratio; a fixed box squashed them
665
+ position: "absolute",
666
+ top: "0.625em",
667
+ right: "0.625em"
668
+ }), on = r({
669
+ zIndex: 1,
802
670
  display: "flex",
803
671
  flexDirection: "column",
804
672
  alignItems: "center",
805
- justifyContent: "center",
806
- gap: e.spacing.sm,
807
- textAlign: "center",
808
- minHeight: "12em",
809
- px: e.spacing.md,
810
- fontSize: "1em",
811
- color: e.colors.dim
812
- }), St = (e, o) => ({
813
- mb: o.spacing["2xs"],
673
+ // Spreads leftover space between rows instead of dumping it all before the CTA.
674
+ justifyContent: "space-between",
675
+ columnGap: "16px",
676
+ rowGap: "3px",
677
+ flex: 1,
678
+ width: "100%",
679
+ minWidth: 0,
680
+ // Lets the text children shrink so ellipsis can kick in
681
+ overflow: "hidden"
682
+ // Clip instead of forcing the fixed-height card to grow
683
+ }), bt = {
684
+ position: "relative",
685
+ width: "6em",
686
+ height: "6em",
687
+ marginBottom: e.spaceMd,
688
+ border: `${e.borderSize} solid ${e.primary}`,
689
+ backgroundColor: e.surface
690
+ }, vt = {
691
+ active: r(bt),
692
+ idle: r(bt, { filter: "saturate(0.5) brightness(0.9)" })
693
+ }, yt = (t) => r(P, {
694
+ display: "-webkit-box",
695
+ marginBottom: e.space2xs,
814
696
  fontSize: "1.25em",
815
697
  // title-lg
698
+ fontWeight: 600,
699
+ lineHeight: 1.33334,
816
700
  textAlign: "center",
817
- color: e ? o.colors.text : o.colors.dim,
818
- // 2 lines at this font size; em is relative to the element's own 1.25em.
701
+ unicodeBidi: "plaintext",
702
+ color: t ? e.text : e.dim,
819
703
  minHeight: "2.4em",
820
704
  flexShrink: 0,
821
- display: "-webkit-box",
822
705
  WebkitLineClamp: 2,
823
706
  WebkitBoxOrient: "vertical",
824
707
  overflow: "hidden"
825
- }), wt = (e) => ({
826
- color: e.colors.dim,
708
+ }), xt = { active: yt(!0), idle: yt(!1) }, Me = (t) => r(P, {
827
709
  fontSize: "0.875em",
828
710
  // body-sm
829
- minHeight: "1.5em",
830
- flexShrink: 0,
831
- textAlign: "center"
832
- }), yt = (e) => ({
833
- color: e.colors.tertiary,
711
+ color: t,
712
+ maxWidth: "100%",
713
+ textAlign: "center",
714
+ whiteSpace: "nowrap",
715
+ // overflowY visible: plain overflow:hidden let flex-shrink crop glyphs under pressure.
716
+ overflowX: "hidden",
717
+ overflowY: "visible",
718
+ textOverflow: "ellipsis",
719
+ marginBottom: e.spaceXs,
720
+ minHeight: "1.25em",
721
+ flexShrink: 0
722
+ }), Be = {
723
+ positionActive: Me(e.text),
724
+ positionIdle: Me(e.dim),
725
+ minutesActive: r(Me(e.primary), { fontWeight: 500 }),
726
+ minutesIdle: r(Me(e.tertiary), { fontWeight: 500 })
727
+ }, nn = r(P, {
728
+ color: e.dim,
834
729
  fontSize: "0.875em",
835
730
  // body-sm
731
+ minHeight: "1.5em",
732
+ flexShrink: 0,
836
733
  textAlign: "center"
837
- }), j = () => {
838
- const e = Qe(), o = Je(), r = Ze(), n = qe(), s = eo();
734
+ }), rn = r({
735
+ zIndex: 1,
736
+ display: "flex",
737
+ flexDirection: "row",
738
+ alignItems: "center",
739
+ gap: "10px",
740
+ width: "100%",
741
+ padding: `12px 0 ${e.spaceMd}`
742
+ }), Ue = {
743
+ ...nt("md"),
744
+ borderRadius: ve.cardChild,
745
+ // Joy's --Card-childRadius
746
+ flex: "1 1 auto",
747
+ width: "100%",
748
+ zIndex: 30
749
+ // Above the carousel's drag surface
750
+ }, St = {
751
+ "--Icon-color": "currentColor",
752
+ color: y.primarySolidColor,
753
+ backgroundColor: y.primarySolidBg,
754
+ "@media (hover: hover)": { "&:hover": { backgroundColor: y.primarySolidHoverBg } },
755
+ "&:active": { backgroundColor: y.primarySolidActiveBg }
756
+ }, ue = {};
757
+ for (const t of [!1, !0]) {
758
+ const o = t ? "1em" : "0.8em";
759
+ ue[`signIn|${t}`] = r(Ue, St, {
760
+ fontSize: o,
761
+ "&:disabled": { color: y.primarySolidDisabledColor, backgroundColor: y.primarySolidDisabledBg }
762
+ }), ue[`vote|${t}`] = r(Ue, St, {
763
+ fontSize: o,
764
+ "&:disabled": { color: e.tertiary, backgroundColor: y.primaryOutlinedBorder }
765
+ }), ue[`remove|${t}`] = r(Ue, {
766
+ "--Icon-color": "currentColor",
767
+ color: y.warningOutlinedColor,
768
+ backgroundColor: "transparent",
769
+ border: `1px solid ${y.warningOutlinedBorder}`,
770
+ fontSize: o,
771
+ "@media (hover: hover)": { "&:hover": { backgroundColor: y.warningOutlinedHoverBg } },
772
+ "&:active": { backgroundColor: y.warningOutlinedActiveBg },
773
+ "&:disabled": { backgroundColor: "transparent", color: e.warning, borderColor: e.warning }
774
+ });
775
+ }
776
+ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
777
+ const l = t - o, p = 1 - Math.min(0.25, Math.abs(l) * 0.15);
839
778
  return {
840
- fonts: o,
841
- spacing: n,
842
- radius: r,
843
- border: s,
844
- colors: {
845
- surface: e.surface,
846
- surfaceVariant: e.surfaceVariant,
847
- text: e.textPrimary,
848
- dim: e.textSecondary,
849
- tertiary: e.textDisabled,
850
- border: e.outlineEnabledBorder,
851
- primary: e.palette.primary.plainColor,
852
- primarySoft: `rgba(${J(e.palette.primary.plainColor)}, 0.12)`,
853
- onPrimary: e.palette.primary.onPrimary,
854
- warning: e.palette.warning.plainColor,
855
- warningSoft: e.palette.warning.softBg,
856
- danger: e.palette.danger.plainColor
857
- }
779
+ transform: `translateX(${l * 55 * (i ? -1 : 1)}%) scale(${p})`,
780
+ zIndex: 20 - Math.abs(l),
781
+ opacity: 1
858
782
  };
859
- }, vt = ({ activeIndex: e, totalItems: o, onPrev: r, onNext: n }) => {
860
- const s = j(), l = Vo(s);
861
- return o <= 1 ? null : /* @__PURE__ */ v(pe, { children: [
862
- /* @__PURE__ */ t(
863
- ve,
864
- {
865
- onClick: r,
866
- disabled: e === 0,
867
- sx: {
868
- ...l,
869
- // Consistent positioning for left arrow across all screen sizes - outside the player card area
870
- left: "-1.5em",
871
- opacity: e === 0 ? 0.4 : 1
872
- },
873
- "aria-label": "Previous player",
874
- children: /* @__PURE__ */ t(De, { children: /* @__PURE__ */ t(mo, { sx: { fontSize: "1.5em", color: s.colors.onPrimary } }) })
875
- }
876
- ),
877
- /* @__PURE__ */ t(
878
- ve,
879
- {
880
- onClick: n,
881
- disabled: e === o - 1,
882
- sx: {
883
- ...l,
884
- // Consistent positioning for right arrow across all screen sizes - outside the player card area
885
- right: "-1.5em",
886
- opacity: e === o - 1 ? 0.4 : 1
887
- },
888
- "aria-label": "Next player",
889
- children: /* @__PURE__ */ t(De, { children: /* @__PURE__ */ t(uo, { sx: { fontSize: "1.5em", color: s.colors.onPrimary } }) })
890
- }
891
- )
892
- ] });
893
- }, zt = ({
894
- activeIndex: e,
895
- totalItems: o
896
- }) => {
897
- const { t: r } = B(), n = j();
898
- if (o <= 1) return null;
899
- const s = (e + 1) / o * 100;
900
- return /* @__PURE__ */ v(x, { sx: lt(n), children: [
901
- /* @__PURE__ */ t(h, { "aria-live": "polite", sx: ct(n), children: r("potm.player_position", {
902
- current: e + 1,
903
- total: o
904
- }) }),
905
- /* @__PURE__ */ t(
906
- x,
907
- {
908
- role: "progressbar",
909
- "aria-valuemin": 1,
910
- "aria-valuemax": o,
911
- "aria-valuenow": e + 1,
912
- sx: dt(n),
913
- children: /* @__PURE__ */ t(x, { sx: mt(s, n) })
914
- }
915
- )
916
- ] });
917
- }, Ct = W.playerPlaceholder, Pt = ({
918
- player: e,
783
+ }, ln = ({
784
+ player: t,
919
785
  isSelected: o,
920
- index: r,
921
- activeIndex: n,
922
- teamLogo: s,
923
- handleVote: l,
924
- isVoting: m,
925
- isVotingClosed: w,
926
- defaultImagePlaceholderUrl: b,
786
+ index: i,
787
+ activeIndex: l,
788
+ teamLogo: p,
789
+ handleVote: u,
790
+ isVoting: f,
791
+ isVotingClosed: b,
792
+ defaultImagePlaceholderUrl: x,
927
793
  showSignInCTA: z,
928
- signInCTA: p,
929
- voteCount: u
794
+ signInCTA: s,
795
+ voteCount: h
930
796
  }) => {
931
- const { t: d } = B(), i = j(), g = Po(r, n), y = (P) => (P.stopPropagation(), P.preventDefault(), l(e.id), !1), M = {
932
- borderRadius: "full",
933
- position: "relative",
934
- zIndex: 30,
935
- // Ensure button is above other elements
936
- fontSize: { xs: "0.8em", sm: "1em" }
937
- }, S = () => p != null && p.component ? p.component : p != null && p.onClick ? /* @__PURE__ */ t(
938
- q,
797
+ const { t: d } = G(), c = zo(), g = Z("sm"), k = g ? "1.25em" : "1.5625em", S = i === l, E = {
798
+ ...sn(i, l, c),
799
+ backgroundImage: x ? `url(${x})` : void 0
800
+ }, _ = (w) => (w.stopPropagation(), w.preventDefault(), u(t.id), !1), m = /* @__PURE__ */ v(ke, { children: [
801
+ /* @__PURE__ */ n("span", { css: wt, children: /* @__PURE__ */ n(Qe, { size: k, style: ze.cta }) }),
802
+ (s == null ? void 0 : s.defaultLabel) ?? d("common.signIn")
803
+ ] }), a = () => s != null && s.component ? s.component : s != null && s.onClick ? /* @__PURE__ */ n(
804
+ "button",
939
805
  {
940
- fullWidth: !0,
941
- onClick: p.onClick,
942
- onMouseDown: (P) => P.stopPropagation(),
943
- onTouchStart: (P) => P.stopPropagation(),
944
- disabled: r !== n,
945
- color: "primary",
946
- variant: "solid",
947
- startDecorator: /* @__PURE__ */ t(ae, {}),
948
- sx: M,
949
- children: p.defaultLabel ?? d("common.signIn")
806
+ type: "button",
807
+ onClick: s.onClick,
808
+ onMouseDown: (w) => w.stopPropagation(),
809
+ onTouchStart: (w) => w.stopPropagation(),
810
+ disabled: !S,
811
+ css: ue[`signIn|${g}`],
812
+ children: m
950
813
  }
951
- ) : p != null && p.url ? /* @__PURE__ */ t(
952
- q,
814
+ ) : s != null && s.url ? /* @__PURE__ */ n(
815
+ "button",
953
816
  {
954
- fullWidth: !0,
955
- onClick: (P) => {
956
- P.stopPropagation(), p.target === "_blank" ? window.open(p.url, "_blank") : window.location.href = p.url;
817
+ type: "button",
818
+ onClick: (w) => {
819
+ w.stopPropagation(), s.target === "_blank" ? window.open(s.url, "_blank") : window.location.href = s.url;
957
820
  },
958
- onMouseDown: (P) => P.stopPropagation(),
959
- onTouchStart: (P) => P.stopPropagation(),
960
- disabled: r !== n,
961
- color: "primary",
962
- variant: "solid",
963
- startDecorator: /* @__PURE__ */ t(ae, {}),
964
- sx: M,
965
- children: p.defaultLabel ?? d("common.signIn")
966
- }
967
- ) : /* @__PURE__ */ t(
968
- q,
969
- {
970
- fullWidth: !0,
971
- disabled: !0,
972
- color: "primary",
973
- variant: "solid",
974
- startDecorator: /* @__PURE__ */ t(ae, {}),
975
- sx: M,
976
- children: (p == null ? void 0 : p.defaultLabel) ?? d("common.signIn")
821
+ onMouseDown: (w) => w.stopPropagation(),
822
+ onTouchStart: (w) => w.stopPropagation(),
823
+ disabled: !S,
824
+ css: ue[`signIn|${g}`],
825
+ children: m
977
826
  }
978
- );
979
- return /* @__PURE__ */ v(
980
- Ce,
981
- {
982
- sx: {
983
- backgroundImage: b ? `url(${b})` : "none",
984
- backgroundRepeat: "no-repeat",
985
- backgroundSize: "cover",
986
- backgroundPosition: "center",
987
- ...To(o, i),
988
- // Add light gray background for inactive cards
989
- ...r !== n && {
990
- bgcolor: i.colors.surface,
991
- // Disable hover effects for inactive cards
992
- "&:hover": {
993
- borderColor: i.colors.primary,
994
- cursor: "default"
995
- }
996
- },
997
- ...g,
998
- // Add primary border and shadow for the active card
999
- ...r === n && {
1000
- boxShadow: "0 0.5em 1.5em rgba(0,0,0,0.12)",
1001
- borderColor: i.colors.primary,
1002
- "&:hover": {
1003
- borderColor: i.colors.primary,
1004
- cursor: "default"
1005
- }
827
+ ) : /* @__PURE__ */ n("button", { type: "button", disabled: !0, css: ue[`signIn|${g}`], children: m });
828
+ return /* @__PURE__ */ v("div", { css: ro[`${S}|${o}|${g}`], style: E, children: [
829
+ /* @__PURE__ */ v("div", { css: Ae.cluster, children: [
830
+ /* @__PURE__ */ n("div", { css: Ae.number, children: /* @__PURE__ */ n("p", { css: Ae.numberText, children: t.number }) }),
831
+ t.type !== "start" && /* @__PURE__ */ n("p", { css: Ae.substitute, children: d("potm.substitute_short") })
832
+ ] }),
833
+ /* @__PURE__ */ n("img", { src: p, css: tn, alt: "Team logo", onError: Fe(Q.teamPlaceholder) }),
834
+ /* @__PURE__ */ v("div", { css: on, children: [
835
+ /* @__PURE__ */ n(
836
+ rt,
837
+ {
838
+ src: t.image || an,
839
+ placeholder: Q.playerPlaceholder,
840
+ alt: t.name,
841
+ css: S ? vt.active : vt.idle
842
+ }
843
+ ),
844
+ /* @__PURE__ */ n("p", { css: S ? xt.active : xt.idle, children: t.name }),
845
+ /* @__PURE__ */ n("p", { css: S ? Be.positionActive : Be.positionIdle, children: d(`potm.${t.position}`) }),
846
+ /* @__PURE__ */ n("p", { css: S ? Be.minutesActive : Be.minutesIdle, children: t.minutesPlayed && t.minutesPlayed > 0 ? d("potm.minutes_played", { minutes: t.minutesPlayed }) : "" }),
847
+ /* @__PURE__ */ n("p", { css: nn, children: h ? `${h} ${d("potm.votes", { count: h })}` : "" })
848
+ ] }),
849
+ /* @__PURE__ */ n("div", { css: rn, children: z ? a() : /* @__PURE__ */ v(
850
+ "button",
851
+ {
852
+ type: "button",
853
+ onClick: _,
854
+ onMouseDown: (w) => w.stopPropagation(),
855
+ onTouchStart: (w) => w.stopPropagation(),
856
+ disabled: !S || f || b,
857
+ css: ue[`${o ? "remove" : "vote"}|${g}`],
858
+ children: [
859
+ /* @__PURE__ */ n("span", { css: wt, children: o ? /* @__PURE__ */ n(Xo, {}) : /* @__PURE__ */ n(Qe, { size: k, style: ze.cta }) }),
860
+ d(b ? "potm.voting_closed" : f ? "potm.voting" : o ? "potm.remove_vote" : "potm.vote")
861
+ ]
862
+ }
863
+ ) })
864
+ ] });
865
+ }, io = r({ display: "none" }), ao = {
866
+ position: "relative",
867
+ display: "inline-flex",
868
+ alignItems: "center",
869
+ justifyContent: "center",
870
+ maxWidth: "max-content",
871
+ boxSizing: "border-box",
872
+ whiteSpace: "nowrap",
873
+ textDecoration: "none",
874
+ verticalAlign: "middle",
875
+ fontFamily: e.fontBody,
876
+ fontWeight: 500,
877
+ lineHeight: 1.5,
878
+ cursor: "pointer",
879
+ minHeight: "2em",
880
+ "--Icon-color": "currentColor"
881
+ }, Ge = {
882
+ position: "absolute",
883
+ zIndex: 0,
884
+ inset: 0,
885
+ width: "100%",
886
+ boxSizing: "border-box",
887
+ padding: 0,
888
+ margin: 0,
889
+ border: "none",
890
+ borderRadius: "inherit",
891
+ cursor: "pointer",
892
+ textDecoration: "none",
893
+ "&:focus-visible": { outline: `2px solid ${y.focus}`, outlineOffset: "2px" }
894
+ }, J = {
895
+ actionSoftPrimary: r(Ge, be.softPrimary),
896
+ actionSoftNeutral: r(Ge, be.softNeutral),
897
+ actionOutlinedNeutral: r(Ge, be.outlinedNeutral, { backgroundColor: y.bgSurface }),
898
+ label: r({
899
+ display: "inline-block",
900
+ overflow: "hidden",
901
+ textOverflow: "ellipsis",
902
+ order: 1,
903
+ minInlineSize: 0,
904
+ flexGrow: 1,
905
+ zIndex: 1,
906
+ pointerEvents: "none"
907
+ }),
908
+ startDecorator: r({
909
+ display: "flex",
910
+ order: 0,
911
+ zIndex: 1,
912
+ pointerEvents: "none"
913
+ }),
914
+ endDecorator: r({
915
+ display: "flex",
916
+ order: 2,
917
+ zIndex: 1,
918
+ pointerEvents: "none"
919
+ })
920
+ }, Ct = {
921
+ color: y.textSecondary,
922
+ fontSize: "inherit",
923
+ overflow: "hidden",
924
+ textOverflow: "ellipsis",
925
+ whiteSpace: "nowrap"
926
+ }, V = {
927
+ // Joy Stack spacing (a start margin after the first child) on top of the gap.
928
+ row: r({
929
+ display: "flex",
930
+ flexDirection: "row",
931
+ justifyContent: "center",
932
+ alignItems: "center",
933
+ width: "100%",
934
+ maxWidth: "100%",
935
+ gap: "0.25em",
936
+ "& > :not(style):not(style)": { margin: 0 },
937
+ "& > :not(style) ~ :not(style)": { marginLeft: e.spaceXs }
938
+ }),
939
+ rowWide: r({
940
+ display: "flex",
941
+ flexDirection: "row",
942
+ justifyContent: "center",
943
+ alignItems: "center",
944
+ width: "100%",
945
+ maxWidth: "100%",
946
+ gap: "0.5em",
947
+ "& > :not(style):not(style)": { margin: 0 },
948
+ "& > :not(style) ~ :not(style)": { marginLeft: e.spaceXs }
949
+ }),
950
+ hidden: io,
951
+ decorator: eo("6px"),
952
+ // Joy's Avatar took its size from a 16px font of its own.
953
+ buttonAvatar: r({ position: "relative", width: "20px", height: "20px", backgroundColor: "transparent" }),
954
+ label: r(P, Ct),
955
+ teamLabel: r(P, Ct, { unicodeBidi: "plaintext" }),
956
+ chipLabel: r(P, { color: y.textSecondary, fontSize: "inherit" }),
957
+ teamChipLabel: r(P, { color: y.textSecondary, fontSize: "inherit", unicodeBidi: "plaintext" })
958
+ }, kt = (t) => r(nt("sm"), t ? be.softPrimary : be.outlinedNeutral, {
959
+ ...t ? {} : { backgroundColor: "transparent" },
960
+ display: "flex",
961
+ flex: 1,
962
+ minWidth: "9em",
963
+ justifyContent: "center",
964
+ fontSize: "0.875em"
965
+ }), $t = { active: kt(!0), idle: kt(!1) }, cn = (t, o, i) => r(ao, {
966
+ gap: "3px",
967
+ display: "flex",
968
+ fontSize: i ? "0.875em" : "0.75em",
969
+ padding: `${e.space2xs} ${e.spaceSm}`,
970
+ borderRadius: "24px",
971
+ color: t ? y.primarySoftColor : y.neutralOutlinedColor,
972
+ ...o ? { maxWidth: i ? "7.5em" : "5em" } : {}
973
+ }), Je = {};
974
+ for (const t of [!1, !0])
975
+ for (const o of [!1, !0])
976
+ for (const i of [!1, !0]) Je[`${t}|${o}|${i}`] = cn(t, o, i);
977
+ const zt = {
978
+ narrow: r({ position: "relative", width: "8px", height: "8px", marginInlineStart: "-6px", backgroundColor: "transparent" }),
979
+ wide: r({ position: "relative", width: "10px", height: "10px", marginInlineStart: "-6px", backgroundColor: "transparent" })
980
+ }, ge = {
981
+ row: r({
982
+ display: "flex",
983
+ flexWrap: "wrap",
984
+ justifyContent: "center",
985
+ alignItems: "center",
986
+ gap: e.space2xs,
987
+ width: "100%",
988
+ fontSize: "1em"
989
+ }),
990
+ text: r(P, { fontSize: "inherit", color: "inherit" }),
991
+ textInline: r(P, { display: "inline", fontSize: "inherit", color: "inherit" }),
992
+ hidden: io
993
+ }, dn = (t, o) => r(ao, {
994
+ fontFamily: e.fontPrimary,
995
+ fontSize: o ? "0.8125em" : "0.75em",
996
+ gap: "0.5em",
997
+ paddingLeft: e.spaceSm,
998
+ paddingRight: e.spaceSm,
999
+ borderRadius: e.radiusFull,
1000
+ // Tabular figures keep the trailing counts from jittering as the widths change.
1001
+ fontVariantNumeric: "tabular-nums",
1002
+ letterSpacing: "0.01em",
1003
+ color: t ? e.primary : e.dim,
1004
+ borderColor: t ? e.primary : e.border,
1005
+ backgroundColor: t ? e.primarySoft : "transparent",
1006
+ transition: "background-color 150ms ease, color 150ms ease, border-color 150ms ease",
1007
+ "&:hover": { backgroundColor: t ? e.primarySoft : e.surfaceVariant }
1008
+ }), so = {};
1009
+ for (const t of [!1, !0])
1010
+ for (const o of [!1, !0]) so[`${t}|${o}`] = dn(t, o);
1011
+ const Tt = (t) => r({
1012
+ display: "inline-flex",
1013
+ alignItems: "center",
1014
+ justifyContent: "center",
1015
+ minWidth: "1.375em",
1016
+ paddingLeft: "0.3125em",
1017
+ paddingRight: "0.3125em",
1018
+ borderRadius: e.radiusFull,
1019
+ fontSize: "0.75em",
1020
+ fontWeight: 600,
1021
+ fontVariantNumeric: "tabular-nums",
1022
+ lineHeight: 1.7,
1023
+ backgroundColor: t ? e.primary : e.surfaceVariant,
1024
+ color: t ? e.onPrimary : e.dim
1025
+ }), It = { active: Tt(!0), idle: Tt(!1) }, Ze = "0.875em", He = "2.5em", lo = `min(24px, ${He})`, Dt = `max((${He} - 2px - ${lo}) / 2, 0px)`, de = {
1026
+ // Caps the field so it reads as a control rather than a full-bleed bar.
1027
+ wrapper: r({
1028
+ width: "100%",
1029
+ maxWidth: "24em",
1030
+ marginLeft: "auto",
1031
+ marginRight: "auto",
1032
+ minWidth: 0
1033
+ }),
1034
+ root: r({
1035
+ position: "relative",
1036
+ display: "flex",
1037
+ boxSizing: "border-box",
1038
+ minWidth: 0,
1039
+ minHeight: He,
1040
+ width: "100%",
1041
+ paddingInline: Ze,
1042
+ borderRadius: e.radiusFull,
1043
+ border: `1px solid ${e.border}`,
1044
+ boxShadow: "var(--fu-ucrc-shadow-ring), 0px 1px 2px 0px rgba(var(--fu-ucrc-shadow-channel) / var(--fu-ucrc-shadow-opacity))",
1045
+ backgroundColor: e.surface,
1046
+ color: e.text,
1047
+ fontFamily: e.fontPrimary,
1048
+ fontSize: "0.875em",
1049
+ // body-sm
1050
+ lineHeight: 1.5,
1051
+ cursor: "text",
1052
+ // Focus ring, drawn inside the border.
1053
+ "&::before": {
1054
+ content: '""',
1055
+ boxSizing: "border-box",
1056
+ display: "block",
1057
+ position: "absolute",
1058
+ pointerEvents: "none",
1059
+ inset: 0,
1060
+ zIndex: 1,
1061
+ borderRadius: "inherit",
1062
+ margin: "-1px"
1063
+ },
1064
+ "&:focus-within::before": { boxShadow: `inset 0 0 0 ${e.borderSize} ${y.focus}` }
1065
+ }),
1066
+ startDecorator: r({
1067
+ display: "flex",
1068
+ alignItems: "center",
1069
+ flexWrap: "wrap",
1070
+ marginInlineEnd: "8px",
1071
+ color: y.textIcon,
1072
+ cursor: "initial"
1073
+ }),
1074
+ endDecorator: r({
1075
+ display: "flex",
1076
+ alignItems: "center",
1077
+ marginInlineStart: "8px",
1078
+ color: y.textIcon,
1079
+ cursor: "initial"
1080
+ }),
1081
+ input: r({
1082
+ flex: 1,
1083
+ minWidth: 0,
1084
+ padding: 0,
1085
+ border: "none",
1086
+ outline: 0,
1087
+ color: "inherit",
1088
+ backgroundColor: "transparent",
1089
+ fontFamily: "inherit",
1090
+ fontSize: "inherit",
1091
+ fontStyle: "inherit",
1092
+ fontWeight: "inherit",
1093
+ lineHeight: "inherit",
1094
+ textOverflow: "ellipsis",
1095
+ "&::placeholder": { color: "inherit", opacity: 0.64 }
1096
+ }),
1097
+ clear: r(Zt, {
1098
+ position: "relative",
1099
+ padding: "0 2px",
1100
+ borderRadius: `max(calc(${e.radiusFull} - 1px - ${Dt}), min(calc(${Dt} + 1px), calc(${e.radiusFull} / 2)))`,
1101
+ fontSize: "1em",
1102
+ minWidth: "1.5em",
1103
+ minHeight: "1.5em"
1104
+ }),
1105
+ feedback: r(P, {
1106
+ color: e.dim,
1107
+ fontSize: "0.75em",
1108
+ // body-xs
1109
+ fontWeight: 500,
1110
+ fontVariantNumeric: "tabular-nums",
1111
+ marginTop: e.space2xs,
1112
+ textAlign: "center"
1113
+ })
1114
+ }, un = {
1115
+ margin: `0 calc(min(calc(${Ze} - (${He} - 2px - ${lo}) / 2), ${Ze}) * -1) 0 0`
1116
+ }, mn = ({
1117
+ query: t,
1118
+ setQuery: o,
1119
+ resultCount: i,
1120
+ totalCount: l
1121
+ }) => {
1122
+ const { t: p } = G(), u = $e(null);
1123
+ return /* @__PURE__ */ v("div", { css: de.wrapper, children: [
1124
+ /* @__PURE__ */ v(
1125
+ "div",
1126
+ {
1127
+ css: de.root,
1128
+ onClick: (f) => {
1129
+ var b;
1130
+ return f.target === f.currentTarget && ((b = u.current) == null ? void 0 : b.focus());
1006
1131
  },
1007
- // Ensure border is always visible on all sides
1008
- border: `${i.border.size} solid`,
1009
- borderColor: r === n ? i.colors.primary : i.colors.primarySoft,
1010
- overflow: "visible"
1011
- // Allow content to overflow (for shadow effects)
1012
- },
1013
- children: [
1014
- /* @__PURE__ */ v(x, { sx: _o(i), children: [
1015
- /* @__PURE__ */ t(x, { sx: Do(i), children: /* @__PURE__ */ t(h, { sx: { fontSize: "0.75em", color: "inherit" }, children: e.number }) }),
1016
- e.type !== "start" && /* @__PURE__ */ t(h, { sx: xt(i), children: d("potm.substitute_short") })
1017
- ] }),
1018
- /* @__PURE__ */ t("img", { src: s, style: Mo, alt: "Team logo", onError: Ne(W.teamPlaceholder) }),
1019
- /* @__PURE__ */ v(so, { sx: ko, children: [
1020
- /* @__PURE__ */ t(
1021
- G,
1022
- {
1023
- src: e.image || Ct,
1024
- placeholder: W.playerPlaceholder,
1025
- alt: e.name,
1026
- sx: {
1027
- ...Ro(i),
1028
- // Increase desaturation and add brightness reduction for inactive cards
1029
- ...r !== n && {
1030
- filter: "saturate(0.5) brightness(0.9)"
1031
- }
1032
- }
1033
- }
1034
- ),
1035
- /* @__PURE__ */ t(
1036
- h,
1037
- {
1038
- level: "title-lg",
1039
- sx: St(r === n, i),
1040
- children: e.name
1041
- }
1042
- ),
1043
- /* @__PURE__ */ t(
1044
- h,
1132
+ children: [
1133
+ /* @__PURE__ */ n("div", { css: de.startDecorator, children: /* @__PURE__ */ n(Fo, { size: "1.125em", color: e.dim, style: ze.input }) }),
1134
+ /* @__PURE__ */ n(
1135
+ "input",
1045
1136
  {
1046
- level: "body-sm",
1047
- sx: ke(
1048
- r === n ? i.colors.text : i.colors.dim,
1049
- i
1050
- ),
1051
- children: d(`potm.${e.position}`)
1137
+ ref: u,
1138
+ css: de.input,
1139
+ value: t,
1140
+ onChange: (f) => o(f.target.value),
1141
+ placeholder: p("potm.search_placeholder"),
1142
+ "aria-label": p("potm.search_label")
1052
1143
  }
1053
1144
  ),
1054
- /* @__PURE__ */ t(
1055
- h,
1145
+ t ? /* @__PURE__ */ n("div", { css: de.endDecorator, children: /* @__PURE__ */ n(
1146
+ "button",
1056
1147
  {
1057
- level: "body-sm",
1058
- sx: {
1059
- ...ke(
1060
- r === n ? i.colors.primary : i.colors.tertiary,
1061
- i
1062
- ),
1063
- fontWeight: "md",
1064
- // Row is kept even at zero minutes so cards without stats stay the same height
1065
- // as the rest of the deck.
1066
- minHeight: "1.25em"
1067
- },
1068
- children: e.minutesPlayed && e.minutesPlayed > 0 ? d("potm.minutes_played", { minutes: e.minutesPlayed }) : ""
1148
+ type: "button",
1149
+ css: de.clear,
1150
+ style: un,
1151
+ onClick: () => o(""),
1152
+ "aria-label": p("potm.search_clear"),
1153
+ children: /* @__PURE__ */ n(Ho, { size: "1em", color: "var(--Icon-color)" })
1069
1154
  }
1070
- ),
1071
- /* @__PURE__ */ t(h, { level: "body-sm", sx: wt(i), children: u ? `${u} ${d("potm.votes", { count: u })}` : "" })
1072
- ] }),
1073
- /* @__PURE__ */ t(ao, { sx: { width: "100%", pb: i.spacing.md }, children: z ? S() : /* @__PURE__ */ t(
1074
- q,
1075
- {
1076
- fullWidth: !0,
1077
- onClick: y,
1078
- onMouseDown: (P) => P.stopPropagation(),
1079
- onTouchStart: (P) => P.stopPropagation(),
1080
- disabled: r !== n || m || w,
1081
- color: o ? "warning" : "primary",
1082
- variant: o ? "outlined" : "solid",
1083
- startDecorator: o ? /* @__PURE__ */ t(So, {}) : /* @__PURE__ */ t(ae, {}),
1084
- sx: {
1085
- borderRadius: "full",
1086
- position: "relative",
1087
- zIndex: 30,
1088
- // Ensure button is above other elements
1089
- fontSize: { xs: "0.8em", sm: "1em" },
1090
- // Keep the voted card's warning styling even while disabled (navigated away from
1091
- // as the active card) — otherwise the disabled override below always painted it
1092
- // with the primary palette, hiding which player you'd actually voted for.
1093
- "&:disabled": o ? {
1094
- bgcolor: "transparent",
1095
- color: i.colors.warning,
1096
- borderColor: i.colors.warning
1097
- } : {
1098
- bgcolor: "primary.outlinedBorder",
1099
- color: i.colors.tertiary
1100
- }
1101
- },
1102
- children: d(w ? "potm.voting_closed" : m ? "potm.voting" : o ? "potm.remove_vote" : "potm.vote")
1103
- }
1104
- ) })
1105
- ]
1106
- },
1107
- e.id
1108
- );
1109
- }, Tt = ({
1110
- query: e,
1111
- setQuery: o,
1112
- resultCount: r,
1113
- totalCount: n
1114
- }) => {
1115
- const { t: s } = B(), l = j();
1116
- return /* @__PURE__ */ v(x, { sx: qo(), children: [
1117
- /* @__PURE__ */ t(
1118
- lo,
1119
- {
1120
- size: "sm",
1121
- value: e,
1122
- onChange: (m) => o(m.target.value),
1123
- placeholder: s("potm.search_placeholder"),
1124
- "aria-label": s("potm.search_label"),
1125
- startDecorator: /* @__PURE__ */ t(go, { sx: { fontSize: "1.125em", color: l.colors.dim } }),
1126
- endDecorator: e ? /* @__PURE__ */ t(
1127
- ve,
1128
- {
1129
- size: "sm",
1130
- variant: "plain",
1131
- color: "neutral",
1132
- onClick: () => o(""),
1133
- "aria-label": s("potm.search_clear"),
1134
- sx: { fontSize: "1em", minWidth: "1.5em", minHeight: "1.5em" },
1135
- children: /* @__PURE__ */ t(po, { sx: { fontSize: "1em" } })
1136
- }
1137
- ) : null,
1138
- sx: et(l)
1155
+ ) }) : null
1156
+ ]
1139
1157
  }
1140
1158
  ),
1141
- e ? /* @__PURE__ */ t(
1142
- h,
1143
- {
1144
- "aria-live": "polite",
1145
- level: "body-xs",
1146
- sx: ot(l),
1147
- children: s("potm.search_results_count", {
1148
- count: r,
1149
- total: n
1150
- })
1151
- }
1152
- ) : null
1159
+ t ? /* @__PURE__ */ n("span", { "aria-live": "polite", css: de.feedback, children: p("potm.search_results_count", {
1160
+ count: i,
1161
+ total: l
1162
+ }) }) : null
1153
1163
  ] });
1154
- }, _t = ({
1155
- positionCounts: e,
1164
+ }, Rt = ({ isActive: t, wide: o, count: i, label: l, onClick: p, children: u }) => /* @__PURE__ */ v("div", { css: so[`${t}|${o}`], children: [
1165
+ /* @__PURE__ */ n(
1166
+ "button",
1167
+ {
1168
+ type: "button",
1169
+ onClick: p,
1170
+ "aria-pressed": t,
1171
+ "aria-label": l,
1172
+ css: t ? J.actionSoftNeutral : J.actionOutlinedNeutral
1173
+ }
1174
+ ),
1175
+ /* @__PURE__ */ n("span", { css: J.label, children: u }),
1176
+ /* @__PURE__ */ n("span", { css: J.endDecorator, children: /* @__PURE__ */ n("div", { css: t ? It.active : It.idle, children: i }) })
1177
+ ] }), pn = ({
1178
+ positionCounts: t,
1156
1179
  positionFilter: o,
1157
- setPositionFilter: r,
1158
- totalCount: n
1180
+ setPositionFilter: i,
1181
+ totalCount: l
1159
1182
  }) => {
1160
- const { t: s } = B(), l = j();
1161
- if (e.length <= 1) return null;
1162
- const m = (w, b) => /* @__PURE__ */ t(x, { sx: rt(w, l), children: b });
1163
- return /* @__PURE__ */ v(x, { sx: tt(l), children: [
1164
- /* @__PURE__ */ t(
1165
- he,
1183
+ const { t: p } = G(), u = Z("sm");
1184
+ return t.length <= 1 ? null : /* @__PURE__ */ v("div", { css: ge.row, children: [
1185
+ /* @__PURE__ */ n(
1186
+ Rt,
1166
1187
  {
1167
- onClick: () => r("all"),
1168
- variant: o === "all" ? "soft" : "outlined",
1169
- size: "sm",
1170
- "aria-pressed": o === "all",
1171
- endDecorator: m(o === "all", n),
1172
- sx: Re(o === "all", l),
1173
- children: /* @__PURE__ */ t(h, { sx: { fontSize: "inherit", color: "inherit" }, children: s("potm.all") })
1188
+ isActive: o === "all",
1189
+ wide: u,
1190
+ count: l,
1191
+ onClick: () => i("all"),
1192
+ children: /* @__PURE__ */ n("p", { css: ge.text, children: p("potm.all") })
1174
1193
  }
1175
1194
  ),
1176
- e.map(({ bucket: w, count: b }) => {
1177
- const z = o === w;
1195
+ t.map(({ bucket: f, count: b }) => {
1196
+ const x = o === f;
1178
1197
  return /* @__PURE__ */ v(
1179
- he,
1198
+ Rt,
1180
1199
  {
1181
- onClick: () => r(z ? "all" : w),
1182
- variant: z ? "soft" : "outlined",
1183
- size: "sm",
1184
- "aria-pressed": z,
1185
- "aria-label": s(`potm.${w}`),
1186
- endDecorator: m(z, b),
1187
- sx: Re(z, l),
1200
+ isActive: x,
1201
+ wide: u,
1202
+ count: b,
1203
+ label: p(`potm.${f}`),
1204
+ onClick: () => i(x ? "all" : f),
1188
1205
  children: [
1189
- /* @__PURE__ */ t(
1190
- h,
1191
- {
1192
- sx: {
1193
- display: { xs: "none", sm: "inline" },
1194
- fontSize: "inherit",
1195
- color: "inherit"
1196
- },
1197
- children: s(`potm.${w}`)
1198
- }
1199
- ),
1200
- /* @__PURE__ */ t(
1201
- h,
1202
- {
1203
- sx: {
1204
- display: { xs: "inline", sm: "none" },
1205
- fontSize: "inherit",
1206
- color: "inherit"
1207
- },
1208
- children: s(`potm.position_short_${w}`)
1209
- }
1210
- )
1206
+ /* @__PURE__ */ n("p", { css: u ? ge.textInline : ge.hidden, children: p(`potm.${f}`) }),
1207
+ /* @__PURE__ */ n("p", { css: u ? ge.hidden : ge.textInline, children: p(`potm.position_short_${f}`) })
1211
1208
  ]
1212
1209
  },
1213
- w
1210
+ f
1214
1211
  );
1215
1212
  })
1216
1213
  ] });
1217
- }, Dt = W.playerPlaceholder, Mt = ({
1218
- players: e,
1214
+ }, fn = Q.playerPlaceholder, gn = ({
1215
+ players: t,
1219
1216
  activeIndex: o,
1220
- votedPlayerId: r,
1221
- onSelect: n
1217
+ votedPlayerId: i,
1218
+ onSelect: l
1222
1219
  }) => {
1223
- const { t: s } = B(), l = j(), m = fe(null), w = fe([]);
1224
- return H(() => {
1225
- var g;
1226
- const b = w.current[o], z = m.current;
1227
- if (!b || !z) return;
1228
- const p = typeof window < "u" && ((g = window.matchMedia) == null ? void 0 : g.call(window, "(prefers-reduced-motion: reduce)").matches), u = b.getBoundingClientRect(), d = z.getBoundingClientRect(), i = u.left - d.left - (z.clientWidth - b.offsetWidth) / 2;
1229
- z.scrollBy({
1230
- left: i,
1231
- behavior: p ? "auto" : "smooth"
1220
+ const { t: p } = G(), u = $e(null), f = $e([]);
1221
+ return U(() => {
1222
+ var c;
1223
+ const b = f.current[o], x = u.current;
1224
+ if (!b || !x) return;
1225
+ const z = typeof window < "u" && ((c = window.matchMedia) == null ? void 0 : c.call(window, "(prefers-reduced-motion: reduce)").matches), s = b.getBoundingClientRect(), h = x.getBoundingClientRect(), d = s.left - h.left - (x.clientWidth - b.offsetWidth) / 2;
1226
+ x.scrollBy({
1227
+ left: d,
1228
+ behavior: z ? "auto" : "smooth"
1232
1229
  });
1233
- }, [o, e.length]), e.length <= 1 ? null : /* @__PURE__ */ t(x, { sx: { position: "relative", width: "100%", fontSize: "1em" }, children: /* @__PURE__ */ t(
1234
- x,
1230
+ }, [o, t.length]), t.length <= 1 ? null : /* @__PURE__ */ n("div", { css: je.root, children: /* @__PURE__ */ n(
1231
+ "div",
1235
1232
  {
1236
- ref: m,
1233
+ ref: u,
1237
1234
  role: "tablist",
1238
- "aria-label": s("potm.roster_label"),
1239
- sx: ut(l),
1240
- children: e.map((b, z) => {
1241
- const p = z === o, u = r === b.id, d = b.type !== "start";
1235
+ "aria-label": p("potm.roster_label"),
1236
+ css: je.scroller,
1237
+ children: t.map((b, x) => {
1238
+ const z = x === o, s = i === b.id, h = b.type !== "start";
1242
1239
  return /* @__PURE__ */ v(
1243
- x,
1240
+ "button",
1244
1241
  {
1245
- component: "button",
1246
1242
  type: "button",
1247
- ref: (i) => {
1248
- w.current[z] = i;
1243
+ ref: (d) => {
1244
+ f.current[x] = d;
1249
1245
  },
1250
- onClick: () => n(z),
1251
- onMouseDown: (i) => i.stopPropagation(),
1252
- onTouchStart: (i) => i.stopPropagation(),
1246
+ onClick: () => l(x),
1247
+ onMouseDown: (d) => d.stopPropagation(),
1248
+ onTouchStart: (d) => d.stopPropagation(),
1253
1249
  role: "tab",
1254
- "aria-selected": p,
1255
- "aria-label": s("potm.roster_thumb_label", {
1250
+ "aria-selected": z,
1251
+ "aria-label": p("potm.roster_thumb_label", {
1256
1252
  number: b.number,
1257
1253
  name: b.name
1258
1254
  }),
1259
- sx: gt(p, u, d, l),
1255
+ css: z || s ? ft.lit : ft.dim,
1260
1256
  children: [
1261
- u && /* @__PURE__ */ t(x, { sx: ft(l), children: /* @__PURE__ */ t(
1262
- ae,
1263
- {
1264
- sx: { fontSize: "0.75em", color: l.colors.warning }
1265
- }
1266
- ) }),
1267
- /* @__PURE__ */ t(
1268
- G,
1257
+ s && /* @__PURE__ */ n("div", { css: je.votedBadge, children: /* @__PURE__ */ n(Qe, { size: "0.75em", color: e.warning }) }),
1258
+ /* @__PURE__ */ n(
1259
+ rt,
1269
1260
  {
1270
- className: "potm-rail-avatar",
1271
- src: b.image || Dt,
1272
- placeholder: W.playerPlaceholder,
1261
+ src: b.image || fn,
1262
+ placeholder: Q.playerPlaceholder,
1273
1263
  alt: "",
1274
- sx: pt(p, u, l)
1264
+ css: no[`${z}|${s}|${h}`]
1275
1265
  }
1276
1266
  ),
1277
- /* @__PURE__ */ t(h, { sx: ht(p, l), children: b.number || "-" })
1267
+ /* @__PURE__ */ n("p", { css: z ? ht.active : ht.idle, children: b.number || "-" })
1278
1268
  ]
1279
1269
  },
1280
1270
  b.id
@@ -1282,136 +1272,68 @@ const So = ho("X", [
1282
1272
  })
1283
1273
  }
1284
1274
  ) });
1285
- }, kt = ({ teams: e, activeFilter: o, setActiveFilter: r, setActiveIndex: n }) => {
1286
- const { t: s } = B(), l = j();
1287
- return /* @__PURE__ */ v(Y, { direction: "row", spacing: l.spacing.xs, justifyContent: "center", sx: $o, children: [
1288
- /* @__PURE__ */ t(
1289
- q,
1290
- {
1291
- onClick: () => {
1292
- r("all"), n(0);
1293
- },
1294
- variant: o === "all" ? "soft" : "outlined",
1295
- color: o === "all" ? "primary" : "neutral",
1296
- startDecorator: /* @__PURE__ */ t(Me, { sx: { fontSize: "1.5em" } }),
1297
- size: "sm",
1298
- sx: {
1299
- display: { xs: "none", md: "flex" },
1300
- flex: 1,
1301
- minWidth: "9em",
1302
- justifyContent: "center",
1303
- fontSize: "0.875em"
1304
- },
1305
- children: /* @__PURE__ */ t(h, { noWrap: !0, sx: { fontSize: "inherit" }, children: s("potm.all_players") })
1306
- }
1307
- ),
1308
- e.map((m) => /* @__PURE__ */ v(
1309
- q,
1275
+ }, hn = {
1276
+ width: "100%",
1277
+ height: "100%",
1278
+ objectFit: "contain"
1279
+ }, co = ({ src: t, alt: o = "", className: i }) => /* @__PURE__ */ n("div", { className: i, style: Go, children: /* @__PURE__ */ n(
1280
+ "img",
1281
+ {
1282
+ src: t || Q.teamPlaceholder,
1283
+ alt: o,
1284
+ onError: Fe(Q.teamPlaceholder),
1285
+ style: hn
1286
+ }
1287
+ ) }), Pt = ({ team: t, className: o }) => /* @__PURE__ */ n(co, { src: t.logo, alt: t.name, className: o }), _t = (t) => t.code || t.name.substring(0, 3).toUpperCase(), bn = ({ teams: t, activeFilter: o, setActiveFilter: i, setActiveIndex: l }) => {
1288
+ const { t: p } = G(), u = Z("sm"), f = Z("md"), b = Z("lg"), x = (s) => {
1289
+ i(s), l(0);
1290
+ }, z = o === "all";
1291
+ return /* @__PURE__ */ v("div", { css: u ? V.rowWide : V.row, children: [
1292
+ /* @__PURE__ */ v("button", { type: "button", onClick: () => x("all"), css: f ? $t[z ? "active" : "idle"] : V.hidden, children: [
1293
+ /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(lt, { size: "1.5em", color: "var(--Icon-color)", style: ze.teamButton }) }),
1294
+ /* @__PURE__ */ n("p", { css: V.label, children: p("potm.all_players") })
1295
+ ] }),
1296
+ t.map((s) => /* @__PURE__ */ v(
1297
+ "button",
1310
1298
  {
1311
- onClick: () => {
1312
- r(m.id), n(0);
1313
- },
1314
- variant: o === m.id ? "soft" : "outlined",
1315
- color: o === m.id ? "primary" : "neutral",
1316
- startDecorator: /* @__PURE__ */ t(
1317
- G,
1318
- {
1319
- src: m.logo,
1320
- placeholder: W.teamPlaceholder,
1321
- alt: m.name,
1322
- sx: { width: "1.25em", height: "1.25em", bgcolor: "transparent", borderRadius: 0 }
1323
- }
1324
- ),
1325
- size: "sm",
1326
- sx: {
1327
- display: { xs: "none", md: "flex" },
1328
- flex: 1,
1329
- minWidth: "9em",
1330
- justifyContent: "center",
1331
- fontSize: "0.875em"
1332
- },
1299
+ type: "button",
1300
+ onClick: () => x(s.id),
1301
+ css: f ? $t[o === s.id ? "active" : "idle"] : V.hidden,
1333
1302
  children: [
1334
- /* @__PURE__ */ t(
1335
- h,
1336
- {
1337
- noWrap: !0,
1338
- sx: { display: { xs: "none", md: "none", lg: "block" }, fontSize: "inherit" },
1339
- children: m.name
1340
- }
1341
- ),
1342
- /* @__PURE__ */ t(
1343
- h,
1344
- {
1345
- noWrap: !0,
1346
- sx: { display: { xs: "none", md: "block", lg: "none" }, fontSize: "inherit" },
1347
- children: m.code || m.name.substring(0, 3).toUpperCase()
1348
- }
1349
- )
1303
+ /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(Pt, { team: s, css: V.buttonAvatar }) }),
1304
+ /* @__PURE__ */ n("p", { css: b ? V.teamLabel : V.hidden, children: s.name }),
1305
+ /* @__PURE__ */ n("p", { css: f && !b ? V.teamLabel : V.hidden, children: _t(s) })
1350
1306
  ]
1351
1307
  },
1352
- m.id
1308
+ s.id
1353
1309
  )),
1354
- /* @__PURE__ */ t(
1355
- he,
1356
- {
1357
- onClick: () => {
1358
- r("all"), n(0);
1359
- },
1360
- variant: o === "all" ? "soft" : "outlined",
1361
- color: o === "all" ? "primary" : "neutral",
1362
- startDecorator: /* @__PURE__ */ t(Me, { sx: { fontSize: "1em" } }),
1363
- size: "sm",
1364
- sx: {
1365
- display: { xs: "flex", md: "none" },
1366
- cursor: "pointer",
1367
- fontSize: { xs: "0.75em", sm: "0.875em" },
1368
- minHeight: "2em",
1369
- px: l.spacing.sm,
1370
- py: l.spacing["2xs"]
1371
- },
1372
- children: /* @__PURE__ */ t(h, { sx: { fontSize: "inherit" }, children: s("potm.all") })
1373
- }
1374
- ),
1375
- e.map((m) => /* @__PURE__ */ t(
1376
- he,
1377
- {
1378
- onClick: () => {
1379
- r(m.id), n(0);
1380
- },
1381
- variant: o === m.id ? "soft" : "outlined",
1382
- color: o === m.id ? "primary" : "neutral",
1383
- startDecorator: /* @__PURE__ */ t(
1384
- G,
1385
- {
1386
- src: m.logo,
1387
- placeholder: W.teamPlaceholder,
1388
- alt: m.name,
1389
- sx: {
1390
- width: { xs: "1em", sm: "1.25em" },
1391
- height: { xs: "1em", sm: "1.25em" },
1392
- p: 0,
1393
- bgcolor: "transparent",
1394
- borderRadius: 0
1395
- }
1396
- }
1397
- ),
1398
- size: "sm",
1399
- sx: {
1400
- display: { xs: "flex", md: "none" },
1401
- cursor: "pointer",
1402
- fontSize: { xs: "0.75em", sm: "0.875em" },
1403
- minHeight: "2em",
1404
- maxWidth: { xs: "5em", sm: "7.5em" },
1405
- px: l.spacing.sm,
1406
- py: l.spacing["2xs"]
1407
- },
1408
- children: /* @__PURE__ */ t(h, { sx: { fontSize: "inherit" }, children: m.code || m.name.substring(0, 3).toUpperCase() })
1409
- },
1410
- `mobile-${m.id}`
1411
- ))
1310
+ /* @__PURE__ */ v("div", { css: f ? V.hidden : Je[`${z}|false|${u}`], children: [
1311
+ /* @__PURE__ */ n(
1312
+ "button",
1313
+ {
1314
+ type: "button",
1315
+ onClick: () => x("all"),
1316
+ css: z ? J.actionSoftPrimary : J.actionOutlinedNeutral
1317
+ }
1318
+ ),
1319
+ /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.chipLabel, children: p("potm.all") }) }),
1320
+ /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(lt, { size: "1em", color: "var(--Icon-color)", style: ze.chip }) })
1321
+ ] }),
1322
+ t.map((s) => /* @__PURE__ */ v("div", { css: f ? V.hidden : Je[`${o === s.id}|true|${u}`], children: [
1323
+ /* @__PURE__ */ n(
1324
+ "button",
1325
+ {
1326
+ type: "button",
1327
+ onClick: () => x(s.id),
1328
+ css: o === s.id ? J.actionSoftPrimary : J.actionOutlinedNeutral
1329
+ }
1330
+ ),
1331
+ /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.teamChipLabel, children: _t(s) }) }),
1332
+ /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(Pt, { team: s, css: u ? zt.wide : zt.narrow }) })
1333
+ ] }, `mobile-${s.id}`))
1412
1334
  ] });
1413
- }, Ie = (e) => {
1414
- const o = +new Date(e) - +/* @__PURE__ */ new Date();
1335
+ }, At = (t) => {
1336
+ const o = +new Date(t) - +/* @__PURE__ */ new Date();
1415
1337
  return o <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 } : {
1416
1338
  days: Math.floor(o / (1e3 * 60 * 60 * 24)),
1417
1339
  hours: Math.floor(o / (1e3 * 60 * 60) % 24),
@@ -1419,280 +1341,237 @@ const So = ho("X", [
1419
1341
  seconds: Math.floor(o / 1e3 % 60),
1420
1342
  isExpired: !1
1421
1343
  };
1422
- }, je = (e) => {
1423
- const [o, r] = T(
1424
- Ie(e)
1344
+ }, uo = (t) => {
1345
+ const [o, i] = I(
1346
+ At(t)
1425
1347
  );
1426
- return H(() => {
1348
+ return U(() => {
1427
1349
  if (o.isExpired) return;
1428
- const n = setInterval(() => {
1429
- r(Ie(e));
1350
+ const l = setInterval(() => {
1351
+ i(At(t));
1430
1352
  }, 1e3);
1431
- return () => clearInterval(n);
1432
- }, [e, o.isExpired]), o;
1433
- }, Rt = 30, $t = ({
1434
- votingDeadline: e,
1353
+ return () => clearInterval(l);
1354
+ }, [t, o.isExpired]), o;
1355
+ }, vn = 30, yn = ({
1356
+ votingDeadline: t,
1435
1357
  totalVotes: o
1436
1358
  }) => {
1437
- const { t: r } = B(), n = j(), { days: s, hours: l, minutes: m, seconds: w, isExpired: b } = je(
1438
- e ?? /* @__PURE__ */ new Date(0)
1439
- ), z = !!e && !b, p = o > 0;
1440
- if (!z && !p) return null;
1441
- const u = s === 0 && l === 0 && m < Rt, d = () => s > 0 ? r("potm.remaining_days_hours", { days: s, hours: l }) : l > 0 ? r("potm.remaining_hours_minutes", { hours: l, minutes: m }) : r("potm.remaining_minutes_seconds", { minutes: m, seconds: w });
1442
- return /* @__PURE__ */ v(x, { sx: nt(n), children: [
1443
- z && /* @__PURE__ */ v(x, { sx: $e(n), children: [
1444
- /* @__PURE__ */ t(
1445
- He,
1446
- {
1447
- sx: {
1448
- fontSize: "1em",
1449
- color: u ? n.colors.danger : n.colors.primary
1450
- }
1451
- }
1452
- ),
1453
- /* @__PURE__ */ t(h, { sx: { fontSize: "inherit", color: "inherit" }, children: r("potm.time_left_prefix") }),
1454
- /* @__PURE__ */ t(
1455
- h,
1456
- {
1457
- "aria-live": "off",
1458
- sx: it(u, n),
1459
- children: d()
1460
- }
1461
- )
1359
+ const { t: i } = G(), l = Z("sm"), { days: p, hours: u, minutes: f, seconds: b, isExpired: x } = uo(
1360
+ t ?? /* @__PURE__ */ new Date(0)
1361
+ ), z = !!t && !x, s = o > 0;
1362
+ if (!z && !s) return null;
1363
+ const h = p === 0 && u === 0 && f < vn, d = () => p > 0 ? i("potm.remaining_days_hours", { days: p, hours: u }) : u > 0 ? i("potm.remaining_hours_minutes", { hours: u, minutes: f }) : i("potm.remaining_minutes_seconds", { minutes: f, seconds: b });
1364
+ return /* @__PURE__ */ v("div", { css: ne.bar, children: [
1365
+ z && /* @__PURE__ */ v("div", { css: ne.item, children: [
1366
+ /* @__PURE__ */ n(qt, { size: "1em", color: h ? e.danger : e.primary }),
1367
+ /* @__PURE__ */ n("p", { css: ne.label, children: i("potm.time_left_prefix") }),
1368
+ /* @__PURE__ */ n("p", { "aria-live": "off", css: h ? ne.valueUrgent : ne.value, children: d() })
1462
1369
  ] }),
1463
- z && p && /* @__PURE__ */ t(h, { sx: st(n), children: "·" }),
1464
- p && /* @__PURE__ */ v(x, { sx: $e(n), children: [
1465
- /* @__PURE__ */ t(bo, { sx: { fontSize: "1em", color: n.colors.tertiary } }),
1466
- /* @__PURE__ */ t(h, { sx: { fontSize: "inherit", color: "inherit" }, children: r("potm.total_votes_cast", { count: o }) })
1370
+ z && s && /* @__PURE__ */ n("p", { css: l ? ne.separatorShown : ne.separator, children: "·" }),
1371
+ s && /* @__PURE__ */ v("div", { css: ne.item, children: [
1372
+ /* @__PURE__ */ n(Oo, { size: "1em", color: e.tertiary }),
1373
+ /* @__PURE__ */ n("p", { css: ne.label, children: i("potm.total_votes_cast", { count: o }) })
1467
1374
  ] })
1468
1375
  ] });
1469
- }, It = ({ playerName: e, onJumpToVote: o }) => {
1470
- const { t: r } = B(), n = j(), s = !!o;
1376
+ }, xn = ({ playerName: t, onJumpToVote: o }) => {
1377
+ const { t: i } = G(), l = !!o;
1471
1378
  return /* @__PURE__ */ v(
1472
- x,
1379
+ l ? "button" : "div",
1473
1380
  {
1474
- component: s ? "button" : "div",
1475
- type: s ? "button" : void 0,
1381
+ type: l ? "button" : void 0,
1476
1382
  onClick: o,
1477
- onMouseDown: (l) => l.stopPropagation(),
1478
- sx: {
1479
- ...at(n),
1480
- ...s ? {} : { cursor: "default", "&:hover": { bgcolor: "inherit" } }
1481
- },
1383
+ onMouseDown: (u) => u.stopPropagation(),
1384
+ css: l ? _e.pill : _e.pillStatic,
1482
1385
  children: [
1483
- /* @__PURE__ */ t(fo, { sx: { fontSize: "1em" } }),
1484
- /* @__PURE__ */ t(
1485
- h,
1486
- {
1487
- sx: {
1488
- fontSize: "inherit",
1489
- color: "inherit",
1490
- overflow: "hidden",
1491
- textOverflow: "ellipsis",
1492
- whiteSpace: "nowrap"
1493
- },
1494
- children: r("potm.your_vote_is", { name: e })
1495
- }
1496
- ),
1497
- s && /* @__PURE__ */ t(
1498
- h,
1499
- {
1500
- sx: {
1501
- fontSize: "inherit",
1502
- color: "inherit",
1503
- fontWeight: 700,
1504
- textDecoration: "underline",
1505
- flexShrink: 0
1506
- },
1507
- children: r("potm.jump_to_vote")
1508
- }
1509
- )
1386
+ /* @__PURE__ */ n(No, { size: "1em", color: y.textIcon }),
1387
+ /* @__PURE__ */ n("p", { css: _e.text, children: i("potm.your_vote_is", { name: Qt(t) }) }),
1388
+ l && /* @__PURE__ */ n("p", { css: _e.jump, children: i("potm.jump_to_vote") })
1510
1389
  ]
1511
1390
  }
1512
1391
  );
1513
- }, Vt = 450, Et = 25, Wt = 70, Lt = 12, Nt = (e) => {
1514
- const [o, r] = T(0), [n, s] = T(0), [l, m] = T(0), [w, b] = T(!1), [z, p] = T(0), u = fe(null), d = fe(null), i = Math.abs(z) > 10, g = () => {
1392
+ }, Sn = 450, wn = 25, Cn = 70, kn = 12, $n = (t) => {
1393
+ const [o, i] = I(0), [l, p] = I(0), [u, f] = I(0), [b, x] = I(!1), [z, s] = I(0), h = $e(null), d = $e(null), c = Math.abs(z) > 10, g = () => {
1515
1394
  d.current !== null && (clearInterval(d.current), d.current = null);
1516
1395
  };
1517
- H(() => g, []);
1518
- const y = (f) => {
1519
- g(), r(Math.max(0, Math.min(Math.max(e - 1, 0), f)));
1520
- }, M = (f) => {
1521
- var U;
1396
+ U(() => g, []);
1397
+ const k = (C) => {
1398
+ g(), i(Math.max(0, Math.min(Math.max(t - 1, 0), C)));
1399
+ }, S = (C) => {
1400
+ var oe;
1522
1401
  g();
1523
- const _ = Math.max(0, Math.min(Math.max(e - 1, 0), f)), R = Math.abs(_ - o), $ = typeof window < "u" && ((U = window.matchMedia) == null ? void 0 : U.call(window, "(prefers-reduced-motion: reduce)").matches);
1524
- if (R <= 1 || R > Lt || $) {
1525
- r(_);
1402
+ const T = Math.max(0, Math.min(Math.max(t - 1, 0), C)), R = Math.abs(T - o), A = typeof window < "u" && ((oe = window.matchMedia) == null ? void 0 : oe.call(window, "(prefers-reduced-motion: reduce)").matches);
1403
+ if (R <= 1 || R > kn || A) {
1404
+ i(T);
1526
1405
  return;
1527
1406
  }
1528
- const L = _ > o ? 1 : -1, K = Math.min(
1529
- Wt,
1530
- Math.max(Et, Math.round(Vt / R))
1407
+ const F = T > o ? 1 : -1, se = Math.min(
1408
+ Cn,
1409
+ Math.max(wn, Math.round(Sn / R))
1531
1410
  );
1532
- let X = o;
1411
+ let q = o;
1533
1412
  d.current = window.setInterval(() => {
1534
- X += L, r(X), X === _ && g();
1535
- }, K);
1536
- }, S = () => {
1537
- g(), o > 0 && r(o - 1);
1538
- }, P = () => {
1539
- g(), o < e - 1 && r(o + 1);
1540
- }, c = (f) => {
1541
- g(), p(0), b(!0);
1542
- const _ = "touches" in f ? f.touches[0] ? f.touches[0].clientX : 0 : "clientX" in f ? f.clientX : 0;
1543
- s(_), m(_);
1544
- }, a = (f) => {
1545
- if (!w) return;
1546
- const _ = "touches" in f ? f.touches[0] ? f.touches[0].clientX : 0 : "clientX" in f ? f.clientX : 0;
1547
- m(_);
1548
- const R = _ - n;
1549
- p(R);
1550
- }, k = () => {
1551
- if (w) {
1552
- if (i) {
1553
- const f = n - l, _ = 50;
1554
- f > _ && o < e - 1 ? r(o + 1) : f < -_ && o > 0 && r(o - 1);
1413
+ q += F, i(q), q === T && g();
1414
+ }, se);
1415
+ }, E = () => {
1416
+ g(), o > 0 && i(o - 1);
1417
+ }, _ = () => {
1418
+ g(), o < t - 1 && i(o + 1);
1419
+ }, m = (C) => {
1420
+ g(), s(0), x(!0);
1421
+ const T = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1422
+ p(T), f(T);
1423
+ }, a = (C) => {
1424
+ if (!b) return;
1425
+ const T = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1426
+ f(T);
1427
+ const R = T - l;
1428
+ s(R);
1429
+ }, w = () => {
1430
+ if (b) {
1431
+ if (c) {
1432
+ const C = l - u, T = 50;
1433
+ C > T && o < t - 1 ? i(o + 1) : C < -T && o > 0 && i(o - 1);
1555
1434
  }
1556
- b(!1), p(0);
1435
+ x(!1), s(0);
1557
1436
  }
1558
1437
  };
1559
- return H(() => {
1560
- const f = u.current;
1561
- if (!f) return;
1562
- const _ = (L) => c(L), R = (L) => a(L), $ = () => k();
1563
- return f.addEventListener("touchstart", _), f.addEventListener("touchmove", R), f.addEventListener("touchend", $), () => {
1564
- f.removeEventListener("touchstart", _), f.removeEventListener("touchmove", R), f.removeEventListener("touchend", $);
1438
+ return U(() => {
1439
+ const C = h.current;
1440
+ if (!C) return;
1441
+ const T = (F) => m(F), R = (F) => a(F), A = () => w();
1442
+ return C.addEventListener("touchstart", T), C.addEventListener("touchmove", R), C.addEventListener("touchend", A), () => {
1443
+ C.removeEventListener("touchstart", T), C.removeEventListener("touchmove", R), C.removeEventListener("touchend", A);
1565
1444
  };
1566
- }, [w, n, l, o, e]), H(() => {
1567
- const f = u.current;
1568
- if (!f) return;
1569
- const _ = (R) => {
1570
- const $ = R.target;
1571
- ($ == null ? void 0 : $.tagName) === "INPUT" || ($ == null ? void 0 : $.tagName) === "TEXTAREA" || $ != null && $.isContentEditable || (R.key === "ArrowLeft" ? (R.preventDefault(), S()) : R.key === "ArrowRight" && (R.preventDefault(), P()));
1445
+ }, [b, l, u, o, t]), U(() => {
1446
+ const C = h.current;
1447
+ if (!C) return;
1448
+ const T = (R) => {
1449
+ const A = R.target;
1450
+ (A == null ? void 0 : A.tagName) === "INPUT" || (A == null ? void 0 : A.tagName) === "TEXTAREA" || A != null && A.isContentEditable || (R.key === "ArrowLeft" ? (R.preventDefault(), E()) : R.key === "ArrowRight" && (R.preventDefault(), _()));
1572
1451
  };
1573
- return f.addEventListener("keydown", _), () => {
1574
- f.removeEventListener("keydown", _);
1452
+ return C.addEventListener("keydown", T), () => {
1453
+ C.removeEventListener("keydown", T);
1575
1454
  };
1576
- }, [o, e]), {
1455
+ }, [o, t]), {
1577
1456
  activeIndex: o,
1578
- jumpToIndex: y,
1579
- animateToIndex: M,
1580
- handleDragStart: c,
1457
+ jumpToIndex: k,
1458
+ animateToIndex: S,
1459
+ handleDragStart: m,
1581
1460
  handleDragMove: a,
1582
- handleDragEnd: k,
1583
- goToPrevious: S,
1584
- goToNext: P,
1585
- carouselRef: u,
1586
- isDragging: w,
1587
- isSignificantDrag: i
1461
+ handleDragEnd: w,
1462
+ goToPrevious: E,
1463
+ goToNext: _,
1464
+ carouselRef: h,
1465
+ isDragging: b,
1466
+ isSignificantDrag: c
1588
1467
  };
1589
- }, Ve = W.teamPlaceholder, Ht = (e, o, r) => {
1590
- var S, P;
1591
- const [n, s] = T([]), [l, m] = T([]), [w, b] = T([]), z = [
1468
+ }, Mt = Q.teamPlaceholder, zn = (t, o, i) => {
1469
+ var E, _;
1470
+ const [l, p] = I([]), [u, f] = I([]), [b, x] = I([]), z = [
1592
1471
  {
1593
- id: e.homeTeam.id,
1594
- name: e.homeTeam.name,
1595
- code: e.homeTeam.code,
1596
- logo: ((S = e.homeTeam.assets) == null ? void 0 : S.logo) || Ve
1472
+ id: t.homeTeam.id,
1473
+ name: t.homeTeam.name,
1474
+ code: t.homeTeam.code,
1475
+ logo: ((E = t.homeTeam.assets) == null ? void 0 : E.logo) || Mt
1597
1476
  },
1598
1477
  {
1599
- id: e.awayTeam.id,
1600
- name: e.awayTeam.name,
1601
- code: e.awayTeam.code,
1602
- logo: ((P = e.awayTeam.assets) == null ? void 0 : P.logo) || Ve
1478
+ id: t.awayTeam.id,
1479
+ name: t.awayTeam.name,
1480
+ code: t.awayTeam.code,
1481
+ logo: ((_ = t.awayTeam.assets) == null ? void 0 : _.logo) || Mt
1603
1482
  }
1604
- ], p = (c) => {
1605
- const a = e.playerStats.find(
1606
- (k) => k.playerId === c
1483
+ ], s = (m) => {
1484
+ const a = t.playerStats.find(
1485
+ (w) => w.playerId === m
1607
1486
  );
1608
1487
  return (a == null ? void 0 : a.minutesPlayed) || 0;
1609
- }, u = (c) => {
1488
+ }, h = (m) => {
1610
1489
  if (!o || !o.data) return 0;
1611
1490
  const a = o.data.find(
1612
- (k) => k.playerId === c
1491
+ (w) => w.playerId === m
1613
1492
  );
1614
1493
  return a ? a.votes : 0;
1615
- }, d = e.lineups.homeTeam.players.filter((c) => c.type === "start").map((c) => {
1494
+ }, d = t.lineups.homeTeam.players.filter((m) => m.type === "start").map((m) => {
1616
1495
  var a;
1617
1496
  return {
1618
- id: c.id,
1619
- name: c.name,
1620
- number: c.shirtNumber || 0,
1621
- team: e.homeTeam.id,
1622
- position: c.position || "Unknown",
1623
- image: (a = c.assets) == null ? void 0 : a.headshot,
1624
- type: c.type,
1625
- minutesPlayed: p(c.id),
1626
- votes: u(c.id)
1497
+ id: m.id,
1498
+ name: m.name,
1499
+ number: m.shirtNumber || 0,
1500
+ team: t.homeTeam.id,
1501
+ position: m.position || "Unknown",
1502
+ image: (a = m.assets) == null ? void 0 : a.headshot,
1503
+ type: m.type,
1504
+ minutesPlayed: s(m.id),
1505
+ votes: h(m.id)
1627
1506
  };
1628
- }) || [], i = e.lineups.awayTeam.players.filter((c) => c.type === "start").map((c) => {
1507
+ }) || [], c = t.lineups.awayTeam.players.filter((m) => m.type === "start").map((m) => {
1629
1508
  var a;
1630
1509
  return {
1631
- id: c.id,
1632
- name: c.name,
1633
- number: c.shirtNumber || 0,
1634
- team: e.awayTeam.id,
1635
- position: c.position || "Unknown",
1636
- image: (a = c.assets) == null ? void 0 : a.headshot,
1637
- type: c.type,
1638
- minutesPlayed: p(c.id),
1639
- votes: u(c.id)
1510
+ id: m.id,
1511
+ name: m.name,
1512
+ number: m.shirtNumber || 0,
1513
+ team: t.awayTeam.id,
1514
+ position: m.position || "Unknown",
1515
+ image: (a = m.assets) == null ? void 0 : a.headshot,
1516
+ type: m.type,
1517
+ minutesPlayed: s(m.id),
1518
+ votes: h(m.id)
1640
1519
  };
1641
- }) || [], g = e.timeline.filter((c) => {
1642
- if (c.type === "substitution" && c.teamId === e.homeTeam.id)
1643
- return c;
1644
- }).map((c) => {
1645
- var k;
1646
- const a = e.lineups.homeTeam.players.find(
1647
- (f) => f.id === c.relatedPlayer.id
1520
+ }) || [], g = t.timeline.filter((m) => {
1521
+ if (m.type === "substitution" && m.teamId === t.homeTeam.id)
1522
+ return m;
1523
+ }).map((m) => {
1524
+ var w;
1525
+ const a = t.lineups.homeTeam.players.find(
1526
+ (C) => C.id === m.relatedPlayer.id
1648
1527
  );
1649
1528
  return {
1650
1529
  id: (a == null ? void 0 : a.id) ?? "",
1651
1530
  name: (a == null ? void 0 : a.name) ?? "",
1652
1531
  number: (a == null ? void 0 : a.shirtNumber) || 0,
1653
- team: e.homeTeam.id,
1532
+ team: t.homeTeam.id,
1654
1533
  position: (a == null ? void 0 : a.position) || "Unknown",
1655
- image: ((k = a == null ? void 0 : a.assets) == null ? void 0 : k.headshot) ?? "",
1534
+ image: ((w = a == null ? void 0 : a.assets) == null ? void 0 : w.headshot) ?? "",
1656
1535
  type: (a == null ? void 0 : a.type) ?? "",
1657
- minutesPlayed: p((a == null ? void 0 : a.id) ?? "") || 0,
1658
- votes: u((a == null ? void 0 : a.id) ?? "")
1536
+ minutesPlayed: s((a == null ? void 0 : a.id) ?? "") || 0,
1537
+ votes: h((a == null ? void 0 : a.id) ?? "")
1659
1538
  };
1660
- }) || [], y = e.timeline.filter((c) => {
1661
- if (c.type === "substitution" && c.teamId === e.awayTeam.id)
1662
- return c;
1663
- }).map((c) => {
1664
- var k;
1665
- const a = e.lineups.awayTeam.players.find(
1666
- (f) => f.id === c.relatedPlayer.id
1539
+ }) || [], k = t.timeline.filter((m) => {
1540
+ if (m.type === "substitution" && m.teamId === t.awayTeam.id)
1541
+ return m;
1542
+ }).map((m) => {
1543
+ var w;
1544
+ const a = t.lineups.awayTeam.players.find(
1545
+ (C) => C.id === m.relatedPlayer.id
1667
1546
  );
1668
1547
  return {
1669
1548
  id: (a == null ? void 0 : a.id) || "",
1670
1549
  name: (a == null ? void 0 : a.name) || "",
1671
1550
  number: (a == null ? void 0 : a.shirtNumber) || 0,
1672
- team: e.awayTeam.id,
1551
+ team: t.awayTeam.id,
1673
1552
  position: (a == null ? void 0 : a.position) || "Unknown",
1674
- image: ((k = a == null ? void 0 : a.assets) == null ? void 0 : k.headshot) || "",
1553
+ image: ((w = a == null ? void 0 : a.assets) == null ? void 0 : w.headshot) || "",
1675
1554
  type: (a == null ? void 0 : a.type) || "",
1676
- minutesPlayed: p((a == null ? void 0 : a.id) || "") || 0,
1677
- votes: u((a == null ? void 0 : a.id) || "")
1555
+ minutesPlayed: s((a == null ? void 0 : a.id) || "") || 0,
1556
+ votes: h((a == null ? void 0 : a.id) || "")
1678
1557
  };
1679
1558
  }) || [];
1680
- return H(() => {
1681
- s([...d, ...g]), m([...i, ...y]);
1682
- }, [e, o]), H(() => {
1683
- let c = [...n, ...l];
1684
- r && r.length > 0 && (c = c.filter(
1685
- (a) => r.includes(a.id)
1686
- )), b(c);
1687
- }, [n, l, r]), {
1688
- players: w,
1559
+ return U(() => {
1560
+ p([...d, ...g]), f([...c, ...k]);
1561
+ }, [t, o]), U(() => {
1562
+ let m = [...l, ...u];
1563
+ i && i.length > 0 && (m = m.filter(
1564
+ (a) => i.includes(a.id)
1565
+ )), x(m);
1566
+ }, [l, u, i]), {
1567
+ players: b,
1689
1568
  teams: z,
1690
- getTeamLogo: (c) => {
1691
- const a = z.find((k) => k.id === c);
1569
+ getTeamLogo: (m) => {
1570
+ const a = z.find((w) => w.id === m);
1692
1571
  return a ? a.logo : "";
1693
1572
  }
1694
1573
  };
1695
- }, Fe = {
1574
+ }, mo = {
1696
1575
  ł: "l",
1697
1576
  // l with stroke - pl
1698
1577
  đ: "d",
@@ -1713,934 +1592,938 @@ const So = ho("X", [
1713
1592
  œ: "oe",
1714
1593
  þ: "th"
1715
1594
  // thorn
1716
- }, Bt = new RegExp(
1717
- `[${Object.keys(Fe).join("")}]`,
1595
+ }, Tn = new RegExp(
1596
+ `[${Object.keys(mo).join("")}]`,
1718
1597
  "g"
1719
- ), ze = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(Bt, (o) => Fe[o] || o).trim(), Ue = [
1598
+ ), et = (t) => t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(Tn, (o) => mo[o] || o).trim(), po = [
1720
1599
  "keeper",
1721
1600
  "defender",
1722
1601
  "midfielder",
1723
1602
  "forward"
1724
- ], Ee = (e) => {
1725
- const o = ze(e);
1726
- return Ue.includes(o) ? o : "unknown";
1727
- }, jt = ({
1728
- players: e,
1603
+ ], Bt = (t) => {
1604
+ const o = et(t);
1605
+ return po.includes(o) ? o : "unknown";
1606
+ }, In = ({
1607
+ players: t,
1729
1608
  teamFilter: o
1730
1609
  }) => {
1731
- const { i18n: r } = B(), [n, s] = T(""), [l, m] = T(
1610
+ const { i18n: i } = G(), [l, p] = I(""), [u, f] = I(
1732
1611
  "all"
1733
- ), w = se(
1734
- () => new Intl.Collator(r.language, { numeric: !0 }),
1735
- [r.language]
1736
- ), b = se(
1737
- () => o === "all" ? e : e.filter((i) => i.team === o),
1738
- [e, o]
1739
- ), z = se(() => {
1740
- const i = /* @__PURE__ */ new Map();
1741
- return b.forEach((g) => {
1742
- const y = Ee(g.position);
1743
- i.set(y, (i.get(y) || 0) + 1);
1744
- }), Ue.filter((g) => i.has(g)).map(
1745
- (g) => ({ bucket: g, count: i.get(g) || 0 })
1612
+ ), b = Ce(
1613
+ () => new Intl.Collator(i.language, { numeric: !0 }),
1614
+ [i.language]
1615
+ ), x = Ce(
1616
+ () => o === "all" ? t : t.filter((c) => c.team === o),
1617
+ [t, o]
1618
+ ), z = Ce(() => {
1619
+ const c = /* @__PURE__ */ new Map();
1620
+ return x.forEach((g) => {
1621
+ const k = Bt(g.position);
1622
+ c.set(k, (c.get(k) || 0) + 1);
1623
+ }), po.filter((g) => c.has(g)).map(
1624
+ (g) => ({ bucket: g, count: c.get(g) || 0 })
1746
1625
  );
1747
- }, [b]), p = se(() => {
1748
- const i = ze(n);
1749
- return [...b.filter((y) => l !== "all" && Ee(y.position) !== l ? !1 : i ? ze(y.name).includes(i) || String(y.number).startsWith(i) : !0)].sort(
1750
- (y, M) => (M.votes || 0) - (y.votes || 0) || w.compare(y.name, M.name)
1626
+ }, [x]), s = Ce(() => {
1627
+ const c = et(l);
1628
+ return [...x.filter((k) => u !== "all" && Bt(k.position) !== u ? !1 : c ? et(k.name).includes(c) || String(k.number).startsWith(c) : !0)].sort(
1629
+ (k, S) => (S.votes || 0) - (k.votes || 0) || b.compare(k.name, S.name)
1751
1630
  );
1752
- }, [b, n, l, w]), u = !!n || l !== "all", d = () => {
1753
- s(""), m("all");
1631
+ }, [x, l, u, b]), h = !!l || u !== "all", d = () => {
1632
+ p(""), f("all");
1754
1633
  };
1755
1634
  return {
1756
- query: n,
1757
- setQuery: s,
1758
- positionFilter: l,
1759
- setPositionFilter: m,
1635
+ query: l,
1636
+ setQuery: p,
1637
+ positionFilter: u,
1638
+ setPositionFilter: f,
1760
1639
  positionCounts: z,
1761
- filteredPlayers: p,
1762
- teamScopedCount: b.length,
1763
- isFiltered: u,
1640
+ filteredPlayers: s,
1641
+ teamScopedCount: x.length,
1642
+ isFiltered: h,
1764
1643
  resetFilters: d
1765
1644
  };
1766
- }, Ft = (e, o) => {
1767
- H(() => {
1645
+ }, Dn = (t, o) => {
1646
+ U(() => {
1768
1647
  o(0);
1769
- }, [e]);
1770
- }, Ut = 4, At = (e) => {
1648
+ }, [t]);
1649
+ }, Rn = 4, Pn = (t) => {
1771
1650
  const o = /* @__PURE__ */ new Map();
1772
- return e != null && e.data && e.data.forEach((r) => {
1773
- o.set(r.playerId, r.votes);
1651
+ return t != null && t.data && t.data.forEach((i) => {
1652
+ o.set(i.playerId, i.votes);
1774
1653
  }), o;
1775
- }, Ot = ({
1776
- match: e,
1654
+ }, _n = ({
1655
+ match: t,
1777
1656
  sdk: o,
1778
- userVote: r,
1779
- votingResults: n,
1780
- handleVote: s,
1781
- isVotingClosed: l,
1782
- show: m = "all",
1783
- showPlayers: w,
1784
- defaultImagePlaceholderUrl: b,
1657
+ userVote: i,
1658
+ votingResults: l,
1659
+ handleVote: p,
1660
+ isVotingClosed: u,
1661
+ show: f = "all",
1662
+ showPlayers: b,
1663
+ defaultImagePlaceholderUrl: x,
1785
1664
  showSignInCTA: z,
1786
- signInCTA: p,
1787
- votingDeadline: u = null
1665
+ signInCTA: s,
1666
+ votingDeadline: h = null
1788
1667
  }) => {
1789
- const { t: d } = B(), i = j(), { players: g, teams: y, getTeamLogo: M } = Ht(
1790
- e,
1791
- n,
1792
- w
1793
- ), [S, P] = T(m ?? "all"), [c, a] = T(r), [k, f] = T(!1), [_, R] = T({
1668
+ const { t: d } = G(), { players: c, teams: g, getTeamLogo: k } = zn(
1669
+ t,
1670
+ l,
1671
+ b
1672
+ ), [S, E] = I(f ?? "all"), [_, m] = I(i), [a, w] = I(!1), [C, T] = I({
1794
1673
  open: !1,
1795
1674
  variant: "success",
1796
1675
  title: "",
1797
1676
  message: ""
1798
- }), [$, L] = T(
1799
- At(n)
1800
- ), [K, X] = T(null), U = (C, D) => {
1801
- R({ open: !0, variant: C, title: "", message: D });
1802
- }, ee = () => {
1803
- R((C) => ({ ...C, open: !1 }));
1677
+ }), [R, A] = I(
1678
+ Pn(l)
1679
+ ), [F, se] = I(null), q = ($, D) => {
1680
+ T({ open: !0, variant: $, title: "", message: D });
1681
+ }, oe = () => {
1682
+ T(($) => ({ ...$, open: !1 }));
1804
1683
  }, {
1805
- query: oe,
1806
- setQuery: le,
1807
- positionFilter: re,
1808
- setPositionFilter: ce,
1809
- positionCounts: xe,
1810
- filteredPlayers: F,
1811
- teamScopedCount: de,
1812
- resetFilters: be
1813
- } = jt({ players: g, teamFilter: S }), {
1814
- activeIndex: Q,
1815
- jumpToIndex: te,
1816
- animateToIndex: ne,
1817
- handleDragStart: V,
1818
- handleDragMove: I,
1819
- handleDragEnd: A,
1820
- goToPrevious: Se,
1821
- goToNext: me,
1822
- carouselRef: E
1823
- } = Nt(F.length);
1824
- Ft(
1825
- `${oe}|${re}|${S}`,
1826
- te
1827
- ), H(() => {
1828
- a(r);
1829
- }, [r]), H(() => {
1830
- P(m);
1831
- }, [m]);
1832
- const O = (C, D) => {
1833
- const N = new Map($);
1834
- if (C) {
1835
- const Z = N.get(D) || 0;
1836
- N.set(D, Math.max(0, Z - 1));
1684
+ query: me,
1685
+ setQuery: Te,
1686
+ positionFilter: ye,
1687
+ setPositionFilter: Ie,
1688
+ positionCounts: Oe,
1689
+ filteredPlayers: Y,
1690
+ teamScopedCount: De,
1691
+ resetFilters: Ne
1692
+ } = In({ players: c, teamFilter: S }), {
1693
+ activeIndex: re,
1694
+ jumpToIndex: pe,
1695
+ animateToIndex: xe,
1696
+ handleDragStart: H,
1697
+ handleDragMove: W,
1698
+ handleDragEnd: ee,
1699
+ goToPrevious: Xe,
1700
+ goToNext: Re,
1701
+ carouselRef: O
1702
+ } = $n(Y.length);
1703
+ Dn(
1704
+ `${me}|${ye}|${S}`,
1705
+ pe
1706
+ ), U(() => {
1707
+ m(i);
1708
+ }, [i]), U(() => {
1709
+ E(f);
1710
+ }, [f]);
1711
+ const te = ($, D) => {
1712
+ const X = new Map(R);
1713
+ if ($) {
1714
+ const le = X.get(D) || 0;
1715
+ X.set(D, Math.max(0, le - 1));
1837
1716
  } else {
1838
- const Z = N.get(D) || 0;
1839
- if (N.set(D, Z + 1), c && c !== D) {
1840
- const Ke = N.get(c) || 0;
1841
- N.set(c, Math.max(0, Ke - 1));
1717
+ const le = X.get(D) || 0;
1718
+ if (X.set(D, le + 1), _ && _ !== D) {
1719
+ const $o = X.get(_) || 0;
1720
+ X.set(_, Math.max(0, $o - 1));
1842
1721
  }
1843
1722
  }
1844
- L(N);
1845
- }, we = async (C) => {
1846
- f(!0);
1723
+ A(X);
1724
+ }, Ve = async ($) => {
1725
+ w(!0);
1847
1726
  try {
1848
- const D = c === C;
1849
- await s(C) ? (O(D, C), a(D ? null : C), U(
1727
+ const D = _ === $;
1728
+ await p($) ? (te(D, $), m(D ? null : $), q(
1850
1729
  "success",
1851
1730
  d(D ? "potm.vote_removed" : "potm.vote_success")
1852
- )) : U("error", d("potm.vote_error"));
1731
+ )) : q("error", d("potm.vote_error"));
1853
1732
  } catch (D) {
1854
1733
  console.error("Error handling vote", D);
1855
- const { status: N } = ge(D, o);
1856
- N === "voting_potm_finished" || N === "voting_potm_not_started" ? U("error", d("potm.voting_closed")) : U("error", d("potm.vote_error"));
1734
+ const { status: X } = We(D, o);
1735
+ X === "voting_potm_finished" || X === "voting_potm_not_started" ? q("error", d("potm.voting_closed")) : q("error", d("potm.vote_error"));
1857
1736
  } finally {
1858
- f(!1);
1737
+ w(!1);
1859
1738
  }
1860
- }, Ae = (C) => {
1861
- k || V(C);
1862
- }, Oe = (C) => {
1863
- k || I(C);
1864
- }, Te = () => {
1865
- k || A();
1866
- }, _e = (C) => {
1867
- if ($.has(C))
1868
- return $.get(C) || 0;
1869
- if (!n || !n.data) return 0;
1870
- const D = n.data.find(
1871
- (N) => N.playerId === C
1739
+ }, xo = ($) => {
1740
+ a || H($);
1741
+ }, So = ($) => {
1742
+ a || W($);
1743
+ }, it = () => {
1744
+ a || ee();
1745
+ }, at = ($) => {
1746
+ if (R.has($))
1747
+ return R.get($) || 0;
1748
+ if (!l || !l.data) return 0;
1749
+ const D = l.data.find(
1750
+ (X) => X.playerId === $
1872
1751
  );
1873
1752
  return D ? D.votes : 0;
1874
- }, Xe = (C) => {
1875
- const D = F.findIndex(
1876
- (Z) => Z.id === C
1753
+ }, wo = ($) => {
1754
+ const D = Y.findIndex(
1755
+ (le) => le.id === $
1877
1756
  );
1878
1757
  if (D !== -1) {
1879
- ne(D);
1758
+ xe(D);
1880
1759
  return;
1881
1760
  }
1882
- const N = g.find((Z) => Z.id === C);
1883
- N && (le(""), ce("all"), m.toLowerCase() === "all" && P(N.team), X(C));
1761
+ const X = c.find((le) => le.id === $);
1762
+ X && (Te(""), Ie("all"), f.toLowerCase() === "all" && E(X.team), se($));
1884
1763
  };
1885
- H(() => {
1886
- if (!K) return;
1887
- const C = F.findIndex(
1888
- (D) => D.id === K
1764
+ U(() => {
1765
+ if (!F) return;
1766
+ const $ = Y.findIndex(
1767
+ (D) => D.id === F
1889
1768
  );
1890
- C !== -1 && (te(C), X(null));
1891
- }, [K, F]);
1892
- const ie = c ? g.find((C) => C.id === c) : void 0, Ge = !!(ie && (m.toLowerCase() === "all" || ie.team === S)), Ye = g.reduce(
1893
- (C, D) => C + _e(D.id),
1769
+ $ !== -1 && (pe($), se(null));
1770
+ }, [F, Y]);
1771
+ const Se = _ ? c.find(($) => $.id === _) : void 0, Co = !!(Se && (f.toLowerCase() === "all" || Se.team === S)), ko = c.reduce(
1772
+ ($, D) => $ + at(D.id),
1894
1773
  0
1895
1774
  );
1896
- return /* @__PURE__ */ v(Y, { spacing: i.spacing.md, children: [
1897
- /* @__PURE__ */ t(
1898
- $t,
1775
+ return /* @__PURE__ */ v("div", { css: ie.root, children: [
1776
+ /* @__PURE__ */ n(
1777
+ yn,
1899
1778
  {
1900
- votingDeadline: u,
1901
- totalVotes: Ye
1779
+ votingDeadline: h,
1780
+ totalVotes: ko
1902
1781
  }
1903
1782
  ),
1904
- ie && /* @__PURE__ */ t(
1905
- It,
1783
+ Se && /* @__PURE__ */ n(
1784
+ xn,
1906
1785
  {
1907
- playerName: ie.name,
1908
- onJumpToVote: Ge ? () => Xe(ie.id) : void 0
1786
+ playerName: Se.name,
1787
+ onJumpToVote: Co ? () => wo(Se.id) : void 0
1909
1788
  }
1910
1789
  ),
1911
- m.toLowerCase() === "all" && /* @__PURE__ */ t(
1912
- kt,
1790
+ f.toLowerCase() === "all" && /* @__PURE__ */ n(
1791
+ bn,
1913
1792
  {
1914
- teams: y,
1793
+ teams: g,
1915
1794
  activeFilter: S,
1916
- setActiveFilter: P,
1917
- setActiveIndex: te
1795
+ setActiveFilter: E,
1796
+ setActiveIndex: pe
1918
1797
  }
1919
1798
  ),
1920
- /* @__PURE__ */ v(x, { sx: Zo(i), children: [
1921
- /* @__PURE__ */ t(
1922
- Tt,
1799
+ /* @__PURE__ */ v("div", { css: ie.filterGroup, children: [
1800
+ /* @__PURE__ */ n(
1801
+ mn,
1923
1802
  {
1924
- query: oe,
1925
- setQuery: le,
1926
- resultCount: F.length,
1927
- totalCount: de
1803
+ query: me,
1804
+ setQuery: Te,
1805
+ resultCount: Y.length,
1806
+ totalCount: De
1928
1807
  }
1929
1808
  ),
1930
- /* @__PURE__ */ t(
1931
- _t,
1809
+ /* @__PURE__ */ n(
1810
+ pn,
1932
1811
  {
1933
- positionCounts: xe,
1934
- positionFilter: re,
1935
- setPositionFilter: ce,
1936
- totalCount: de
1812
+ positionCounts: Oe,
1813
+ positionFilter: ye,
1814
+ setPositionFilter: Ie,
1815
+ totalCount: De
1937
1816
  }
1938
1817
  )
1939
1818
  ] }),
1940
- F.length === 0 ? /* @__PURE__ */ v(x, { sx: bt(i), children: [
1941
- /* @__PURE__ */ t(
1942
- h,
1943
- {
1944
- level: "body-md",
1945
- sx: { fontSize: "1em", color: "inherit" },
1946
- children: oe ? d("potm.no_search_results", { query: oe }) : d("potm.no_players_for_filter")
1947
- }
1948
- ),
1949
- /* @__PURE__ */ t(
1950
- q,
1951
- {
1952
- size: "sm",
1953
- variant: "outlined",
1954
- color: "neutral",
1955
- onClick: be,
1956
- sx: { fontSize: "0.875em" },
1957
- children: d("potm.clear_filters")
1958
- }
1959
- )
1960
- ] }) : /* @__PURE__ */ v(pe, { children: [
1819
+ Y.length === 0 ? /* @__PURE__ */ v("div", { css: ie.noResults, children: [
1820
+ /* @__PURE__ */ n("p", { css: ie.noResultsText, children: me ? d("potm.no_search_results", { query: Qt(me) }) : d("potm.no_players_for_filter") }),
1821
+ /* @__PURE__ */ n("button", { type: "button", css: ie.clearFilters, onClick: Ne, children: d("potm.clear_filters") })
1822
+ ] }) : /* @__PURE__ */ v(ke, { children: [
1961
1823
  /* @__PURE__ */ v(
1962
- x,
1824
+ "div",
1963
1825
  {
1964
- ref: E,
1826
+ ref: O,
1965
1827
  tabIndex: 0,
1966
1828
  role: "region",
1967
1829
  "aria-label": d("potm.carousel_label"),
1968
- sx: vo,
1969
- onMouseDown: Ae,
1970
- onMouseMove: Oe,
1971
- onMouseUp: Te,
1972
- onMouseLeave: Te,
1830
+ css: ie.container,
1831
+ onMouseDown: xo,
1832
+ onMouseMove: So,
1833
+ onMouseUp: it,
1834
+ onMouseLeave: it,
1973
1835
  children: [
1974
- /* @__PURE__ */ t(
1975
- vt,
1836
+ /* @__PURE__ */ n(
1837
+ qo,
1976
1838
  {
1977
- activeIndex: Q,
1978
- totalItems: F.length,
1979
- onPrev: Se,
1980
- onNext: me
1839
+ activeIndex: re,
1840
+ totalItems: Y.length,
1841
+ onPrev: Xe,
1842
+ onNext: Re
1981
1843
  }
1982
1844
  ),
1983
- /* @__PURE__ */ t(x, { sx: zo, children: F.map(
1984
- (C, D) => Math.abs(D - Q) > Ut ? null : /* @__PURE__ */ t(
1985
- Pt,
1845
+ /* @__PURE__ */ n("div", { css: ie.content, children: Y.map(
1846
+ ($, D) => Math.abs(D - re) > Rn ? null : /* @__PURE__ */ n(
1847
+ ln,
1986
1848
  {
1987
- player: C,
1988
- isSelected: c === C.id,
1989
- voteCount: _e(C.id),
1849
+ player: $,
1850
+ isSelected: _ === $.id,
1851
+ voteCount: at($.id),
1990
1852
  index: D,
1991
- activeIndex: Q,
1992
- teamLogo: M(C.team),
1993
- handleVote: we,
1994
- isVoting: k,
1995
- isVotingClosed: l,
1996
- defaultImagePlaceholderUrl: b,
1853
+ activeIndex: re,
1854
+ teamLogo: k($.team),
1855
+ handleVote: Ve,
1856
+ isVoting: a,
1857
+ isVotingClosed: u,
1858
+ defaultImagePlaceholderUrl: x,
1997
1859
  showSignInCTA: z,
1998
- signInCTA: p
1860
+ signInCTA: s
1999
1861
  },
2000
- C.id
1862
+ $.id
2001
1863
  )
2002
1864
  ) })
2003
1865
  ]
2004
1866
  }
2005
1867
  ),
2006
- /* @__PURE__ */ t(
2007
- zt,
1868
+ /* @__PURE__ */ n(
1869
+ Jo,
2008
1870
  {
2009
- activeIndex: Q,
2010
- totalItems: F.length
1871
+ activeIndex: re,
1872
+ totalItems: Y.length
2011
1873
  }
2012
1874
  ),
2013
- /* @__PURE__ */ t(
2014
- Mt,
1875
+ /* @__PURE__ */ n(
1876
+ gn,
2015
1877
  {
2016
- players: F,
2017
- activeIndex: Q,
2018
- votedPlayerId: c,
2019
- onSelect: ne
1878
+ players: Y,
1879
+ activeIndex: re,
1880
+ votedPlayerId: _,
1881
+ onSelect: xe
2020
1882
  }
2021
1883
  ),
2022
- F.length > 1 && !l && /* @__PURE__ */ t(h, { sx: yt(i), children: d("potm.helper_text") })
1884
+ Y.length > 1 && !u && /* @__PURE__ */ n("p", { css: ie.hint, children: d("potm.helper_text") })
2023
1885
  ] }),
2024
- /* @__PURE__ */ t(oo, { notification: _, onClose: ee })
1886
+ /* @__PURE__ */ n(_o, { notification: C, onClose: oe })
2025
1887
  ] });
2026
- }, Xt = ({ teams: e, headerBannerStyles: o }) => {
2027
- var l, m, w, b, z, p, u, d, i, g, y, M, S, P;
2028
- const { t: r } = B(), n = j(), s = (o == null ? void 0 : o.textColor) ?? n.colors.dim;
2029
- return /* @__PURE__ */ v(x, { sx: { textAlign: "center", position: "relative" }, children: [
2030
- /* @__PURE__ */ v(Y, { spacing: n.spacing.md, sx: { mb: n.spacing.md }, children: [
2031
- /* @__PURE__ */ t(h, { level: "h4", sx: { fontSize: "1.25em" }, children: r("potm.title") }),
2032
- /* @__PURE__ */ t(
2033
- h,
2034
- {
2035
- level: "body-md",
2036
- sx: { color: n.colors.dim, fontSize: "1em" },
2037
- children: r("potm.description")
2038
- }
2039
- )
1888
+ }, Ye = "var(--fu-ucrc-palette-text-primary)", An = "var(--fu-ucrc-palette-text-secondary)", tt = "#DDE7EE", ot = "#CDD7E1", fo = "#9FA6AD", he = { ...Ao, display: "block", fontFamily: e.fontBody }, N = {
1889
+ h3: { ...he, ...Mo, fontWeight: 600, color: Ye },
1890
+ h4: { ...he, letterSpacing: "-0.025em", fontWeight: 600, color: Ye },
1891
+ titleLg: { ...he, lineHeight: 1.33334, fontWeight: 600, color: Ye },
1892
+ titleMd: { ...he, fontWeight: 500 },
1893
+ body: he,
1894
+ bodyXs: { ...he, fontWeight: 500 }
1895
+ }, go = (t) => ({
1896
+ "& > :not(style):not(style)": { margin: 0 },
1897
+ "& > :not(style) ~ :not(style)": { marginTop: t }
1898
+ }), ho = (t) => ({
1899
+ "& > :not(style):not(style)": { margin: 0 },
1900
+ "& > :not(style) ~ :not(style)": { marginLeft: t }
1901
+ }), bo = {
1902
+ position: "relative",
1903
+ fontFamily: e.fontBody,
1904
+ fontWeight: 500,
1905
+ fontSize: "1em",
1906
+ color: "var(--fu-ucrc-neutral-soft-color)",
1907
+ userSelect: "none",
1908
+ // Joy's Avatar image: hides the alt text while it loads.
1909
+ "& > img": { textAlign: "center", color: "transparent", textIndent: "10000px" }
1910
+ }, Mn = `var(--fu-ucrc-potm-banner-text, ${e.dim})`, Et = {
1911
+ fontFamily: e.fontBody,
1912
+ lineHeight: 1.5,
1913
+ color: "var(--fu-ucrc-neutral-outlined-color)",
1914
+ display: "flex",
1915
+ alignItems: "center",
1916
+ justifyContent: "space-between",
1917
+ width: "100%",
1918
+ borderRadius: e.radiusSm,
1919
+ position: "relative",
1920
+ overflow: "hidden",
1921
+ fontSize: "1em",
1922
+ // Anchors the em cascade for the banner content
1923
+ background: `linear-gradient(135deg, rgba(${e.primaryRgb}, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(${e.primaryRgb}, 0.08) 100%)`,
1924
+ zIndex: 1,
1925
+ border: `${e.borderSize} solid ${e.primary}`,
1926
+ "&::before": {
1927
+ content: '""',
1928
+ position: "absolute",
1929
+ top: 0,
1930
+ left: 0,
1931
+ right: 0,
1932
+ bottom: 0,
1933
+ opacity: 0.02,
1934
+ backgroundImage: `linear-gradient(rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em), linear-gradient(to right, rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em)`,
1935
+ backgroundSize: "1.875em 1.875em",
1936
+ zIndex: 2
1937
+ },
1938
+ "&::after": {
1939
+ content: '""',
1940
+ position: "absolute",
1941
+ top: 0,
1942
+ left: 0,
1943
+ right: 0,
1944
+ bottom: 0,
1945
+ opacity: 0.07,
1946
+ backgroundImage: `linear-gradient(45deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em), linear-gradient(135deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em)`,
1947
+ backgroundSize: "3.75em 3.75em",
1948
+ zIndex: 3
1949
+ }
1950
+ }, vo = { alignItems: "center", width: "100%" }, Lt = { ...vo, justifyContent: "space-between" }, Wt = { ...vo, justifyContent: "center", gap: e.space2xs }, Ft = { display: "flex", alignItems: "center", gap: e.spaceXs, width: "45%", position: "relative", zIndex: 1 }, Ht = { ...bo, backgroundColor: "transparent" }, Ee = { ...N.body, color: Mn }, M = {
1951
+ root: r({ textAlign: "center", position: "relative" }),
1952
+ intro: r({ display: "flex", flexDirection: "column", marginBottom: e.spaceMd, ...go(e.spaceMd) }),
1953
+ title: r({ ...N.h4, fontSize: "1.25em" }),
1954
+ description: r({ ...N.body, color: e.dim, fontSize: "1em" }),
1955
+ bannerWrap: r({ display: "flex", justifyContent: "center", marginBottom: e.spaceMd }),
1956
+ banner: r({ ...Et, padding: e.spaceSm }),
1957
+ bannerSm: r({ ...Et, padding: e.spaceMd }),
1958
+ // Large screens get the full names side by side; smaller ones a single line of team codes.
1959
+ desktop: r({ ...Lt, display: "flex" }),
1960
+ desktopHidden: r({ ...Lt, display: "none" }),
1961
+ mobile: r({ ...Wt, display: "flex" }),
1962
+ mobileHidden: r({ ...Wt, display: "none" }),
1963
+ homeTeam: r(Ft),
1964
+ awayTeam: r({ ...Ft, justifyContent: "flex-end" }),
1965
+ avatarLarge: r({ ...Ht, padding: e.spaceXs, width: "4.6875em", height: "4.6875em" }),
1966
+ avatarSmall: r({ ...Ht, padding: e.space2xs, width: "1.75em", height: "1.75em" }),
1967
+ name: r({ ...Ee, fontSize: "1em", fontWeight: 500, unicodeBidi: "plaintext" }),
1968
+ code: r({ ...Ee, fontSize: "0.875em", fontWeight: 500, unicodeBidi: "plaintext" }),
1969
+ vsBox: r({ textAlign: "center", width: "20%", position: "relative", zIndex: 1 }),
1970
+ vs: r({ ...Ee, fontSize: "0.75em" }),
1971
+ vsInline: r({ ...Ee, marginLeft: e.space2xs, marginRight: e.space2xs, fontSize: "0.75em" })
1972
+ }, Bn = ({ teams: t, headerBannerStyles: o }) => {
1973
+ var b, x, z, s, h, d;
1974
+ const { t: i } = G(), l = Z("sm"), p = Z("lg"), u = {
1975
+ background: o == null ? void 0 : o.background,
1976
+ borderColor: o == null ? void 0 : o.borderColor,
1977
+ "--fu-ucrc-potm-banner-text": o == null ? void 0 : o.textColor
1978
+ }, f = (c, g) => /* @__PURE__ */ n(co, { src: c == null ? void 0 : c.logo, alt: c == null ? void 0 : c.name, css: g ? M.avatarLarge : M.avatarSmall });
1979
+ return /* @__PURE__ */ v("div", { css: M.root, children: [
1980
+ /* @__PURE__ */ v("div", { css: M.intro, children: [
1981
+ /* @__PURE__ */ n("h4", { css: M.title, children: i("potm.title") }),
1982
+ /* @__PURE__ */ n("p", { css: M.description, children: i("potm.description") })
2040
1983
  ] }),
2041
- /* @__PURE__ */ t(
2042
- x,
2043
- {
2044
- sx: {
2045
- display: "flex",
2046
- justifyContent: "center",
2047
- mb: n.spacing.md
2048
- },
2049
- children: /* @__PURE__ */ v(
2050
- co,
2051
- {
2052
- variant: "outlined",
2053
- sx: Io(n, o),
2054
- children: [
2055
- /* @__PURE__ */ v(
2056
- x,
2057
- {
2058
- sx: {
2059
- display: { xs: "none", lg: "flex" },
2060
- alignItems: "center",
2061
- justifyContent: "space-between",
2062
- width: "100%"
2063
- },
2064
- children: [
2065
- e.length > 0 && /* @__PURE__ */ v(
2066
- x,
2067
- {
2068
- sx: {
2069
- display: "flex",
2070
- alignItems: "center",
2071
- gap: n.spacing.xs,
2072
- width: "45%",
2073
- position: "relative",
2074
- zIndex: 1
2075
- },
2076
- children: [
2077
- /* @__PURE__ */ t(
2078
- G,
2079
- {
2080
- src: (l = e[0]) == null ? void 0 : l.logo,
2081
- placeholder: W.teamPlaceholder,
2082
- alt: (m = e[0]) == null ? void 0 : m.name,
2083
- sx: {
2084
- p: n.spacing.xs,
2085
- bgcolor: "transparent",
2086
- width: "4.6875em",
2087
- height: "4.6875em"
2088
- }
2089
- }
2090
- ),
2091
- /* @__PURE__ */ t(
2092
- h,
2093
- {
2094
- fontWeight: "md",
2095
- sx: { color: s, fontSize: "1em" },
2096
- children: (w = e[0]) == null ? void 0 : w.name
2097
- }
2098
- )
2099
- ]
2100
- }
2101
- ),
2102
- /* @__PURE__ */ t(
2103
- x,
2104
- {
2105
- textAlign: "center",
2106
- sx: { width: "20%", position: "relative", zIndex: 1 },
2107
- children: /* @__PURE__ */ t(h, { sx: { color: s, fontSize: "0.75em" }, children: r("potm.vs") })
2108
- }
2109
- ),
2110
- e.length > 1 && /* @__PURE__ */ v(
2111
- x,
2112
- {
2113
- sx: {
2114
- display: "flex",
2115
- alignItems: "center",
2116
- gap: n.spacing.xs,
2117
- width: "45%",
2118
- justifyContent: "flex-end",
2119
- position: "relative",
2120
- zIndex: 1
2121
- },
2122
- children: [
2123
- /* @__PURE__ */ t(
2124
- h,
2125
- {
2126
- fontWeight: "md",
2127
- sx: { color: s, fontSize: "1em" },
2128
- children: (b = e[1]) == null ? void 0 : b.name
2129
- }
2130
- ),
2131
- /* @__PURE__ */ t(
2132
- G,
2133
- {
2134
- src: (z = e[1]) == null ? void 0 : z.logo,
2135
- placeholder: W.teamPlaceholder,
2136
- alt: (p = e[1]) == null ? void 0 : p.name,
2137
- sx: {
2138
- p: n.spacing.xs,
2139
- bgcolor: "transparent",
2140
- width: "4.6875em",
2141
- height: "4.6875em"
2142
- }
2143
- }
2144
- )
2145
- ]
2146
- }
2147
- )
2148
- ]
2149
- }
2150
- ),
2151
- /* @__PURE__ */ v(
2152
- x,
2153
- {
2154
- sx: {
2155
- display: { xs: "flex", lg: "none" },
2156
- alignItems: "center",
2157
- justifyContent: "center",
2158
- gap: n.spacing["2xs"],
2159
- width: "100%"
2160
- },
2161
- children: [
2162
- e.length > 0 && /* @__PURE__ */ v(pe, { children: [
2163
- /* @__PURE__ */ t(
2164
- h,
2165
- {
2166
- fontWeight: "md",
2167
- sx: { color: s, fontSize: "0.875em" },
2168
- children: ((u = e[0]) == null ? void 0 : u.code) || ((d = e[0]) == null ? void 0 : d.name.substring(0, 3))
2169
- }
2170
- ),
2171
- /* @__PURE__ */ t(
2172
- G,
2173
- {
2174
- src: (i = e[0]) == null ? void 0 : i.logo,
2175
- placeholder: W.teamPlaceholder,
2176
- alt: (g = e[0]) == null ? void 0 : g.name,
2177
- sx: {
2178
- p: n.spacing["2xs"],
2179
- bgcolor: "transparent",
2180
- width: "1.75em",
2181
- height: "1.75em"
2182
- }
2183
- }
2184
- )
2185
- ] }),
2186
- /* @__PURE__ */ t(
2187
- h,
2188
- {
2189
- sx: {
2190
- color: s,
2191
- mx: n.spacing["2xs"],
2192
- fontSize: "0.75em"
2193
- },
2194
- children: r("potm.vs")
2195
- }
2196
- ),
2197
- e.length > 1 && /* @__PURE__ */ v(pe, { children: [
2198
- /* @__PURE__ */ t(
2199
- G,
2200
- {
2201
- src: (y = e[1]) == null ? void 0 : y.logo,
2202
- placeholder: W.teamPlaceholder,
2203
- alt: (M = e[1]) == null ? void 0 : M.name,
2204
- sx: {
2205
- p: n.spacing["2xs"],
2206
- bgcolor: "transparent",
2207
- width: "1.75em",
2208
- height: "1.75em"
2209
- }
2210
- }
2211
- ),
2212
- /* @__PURE__ */ t(
2213
- h,
2214
- {
2215
- fontWeight: "md",
2216
- sx: { color: s, fontSize: "0.875em" },
2217
- children: ((S = e[1]) == null ? void 0 : S.code) || ((P = e[1]) == null ? void 0 : P.name.substring(0, 3))
2218
- }
2219
- )
2220
- ] })
2221
- ]
2222
- }
2223
- )
2224
- ]
2225
- }
2226
- )
2227
- }
2228
- )
1984
+ /* @__PURE__ */ n("div", { css: M.bannerWrap, children: /* @__PURE__ */ v("div", { css: l ? M.bannerSm : M.banner, style: u, children: [
1985
+ /* @__PURE__ */ v("div", { css: p ? M.desktop : M.desktopHidden, children: [
1986
+ t.length > 0 && /* @__PURE__ */ v("div", { css: M.homeTeam, children: [
1987
+ f(t[0], !0),
1988
+ /* @__PURE__ */ n("p", { css: M.name, children: (b = t[0]) == null ? void 0 : b.name })
1989
+ ] }),
1990
+ /* @__PURE__ */ n("div", { css: M.vsBox, children: /* @__PURE__ */ n("p", { css: M.vs, children: i("potm.vs") }) }),
1991
+ t.length > 1 && /* @__PURE__ */ v("div", { css: M.awayTeam, children: [
1992
+ /* @__PURE__ */ n("p", { css: M.name, children: (x = t[1]) == null ? void 0 : x.name }),
1993
+ f(t[1], !0)
1994
+ ] })
1995
+ ] }),
1996
+ /* @__PURE__ */ v("div", { css: p ? M.mobileHidden : M.mobile, children: [
1997
+ t.length > 0 && /* @__PURE__ */ v(ke, { children: [
1998
+ /* @__PURE__ */ n("p", { css: M.code, children: ((z = t[0]) == null ? void 0 : z.code) || ((s = t[0]) == null ? void 0 : s.name.substring(0, 3)) }),
1999
+ f(t[0], !1)
2000
+ ] }),
2001
+ /* @__PURE__ */ n("p", { css: M.vsInline, children: i("potm.vs") }),
2002
+ t.length > 1 && /* @__PURE__ */ v(ke, { children: [
2003
+ f(t[1], !1),
2004
+ /* @__PURE__ */ n("p", { css: M.code, children: ((h = t[1]) == null ? void 0 : h.code) || ((d = t[1]) == null ? void 0 : d.name.substring(0, 3)) })
2005
+ ] })
2006
+ ] })
2007
+ ] }) })
2229
2008
  ] });
2230
- }, We = W.teamPlaceholder, Gt = W.playerPlaceholder, Yt = (e, o) => o === 0 ? "0%" : `${(e / o * 100).toFixed(1)}%`, Kt = ({
2231
- results: e,
2009
+ }, En = {
2010
+ display: "flex",
2011
+ flexDirection: "column",
2012
+ alignItems: "center",
2013
+ justifyContent: "flex-start",
2014
+ gap: "0.75em 1em",
2015
+ padding: `${e.spaceLg} ${e.spaceMd}`,
2016
+ borderRadius: ve.md,
2017
+ backgroundColor: "var(--fu-ucrc-bg-surface)",
2018
+ fontFamily: e.fontBody,
2019
+ lineHeight: 1.5,
2020
+ color: "var(--fu-ucrc-neutral-outlined-color)",
2021
+ fontSize: "1em",
2022
+ // Anchors the em cascade for the result card content
2023
+ position: "relative",
2024
+ transformOrigin: "center top",
2025
+ transition: "all 0.3s ease",
2026
+ overflow: "visible"
2027
+ }, Ln = {
2028
+ winner: {
2029
+ border: `${e.borderSize} solid ${e.warning}`,
2030
+ boxShadow: `0 0.625em 1.5625em color-mix(in srgb, ${e.warning} 20%, transparent)`,
2031
+ zIndex: 2,
2032
+ "&::before": {
2033
+ content: '""',
2034
+ position: "absolute",
2035
+ top: 0,
2036
+ left: 0,
2037
+ right: 0,
2038
+ bottom: 0,
2039
+ zIndex: -1,
2040
+ borderRadius: "inherit",
2041
+ background: "linear-gradient(135deg,rgb(213, 169, 133),rgb(255, 167, 3))",
2042
+ opacity: 0.4
2043
+ }
2044
+ },
2045
+ second: { border: `${e.borderSize} solid ${tt}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 1 },
2046
+ other: { border: `${e.borderSize} solid ${tt}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 0 }
2047
+ }, Wn = ["winner", "second", "other"], yo = {};
2048
+ for (const t of Wn)
2049
+ for (const o of [!1, !0])
2050
+ yo[`${t}|${o}`] = r(En, Ln[t], {
2051
+ width: o ? "30%" : "auto",
2052
+ transform: `scale(${o ? t === "winner" ? 1.01 : 0.95 : 1})`
2053
+ });
2054
+ const Ot = {
2055
+ position: "absolute",
2056
+ top: "-0.9375em",
2057
+ left: "50%",
2058
+ transform: "translateX(-50%)",
2059
+ width: "2.5em",
2060
+ height: "2.5em",
2061
+ borderRadius: "50%",
2062
+ display: "flex",
2063
+ justifyContent: "center",
2064
+ alignItems: "center",
2065
+ boxShadow: "0 0.125em 0.5em rgba(0,0,0,0.2)",
2066
+ zIndex: 10
2067
+ }, Nt = {
2068
+ ...bo,
2069
+ backgroundColor: "var(--fu-ucrc-neutral-soft-bg)",
2070
+ marginTop: e.spaceMd,
2071
+ marginBottom: e.spaceMd
2072
+ }, Xt = { width: "80%", marginLeft: "auto", marginRight: "auto", height: "0.5em", borderRadius: "0.25em", overflow: "hidden", position: "relative" }, Vt = { position: "absolute", top: 0, left: 0, height: "100%", borderRadius: "0.25em", transition: "width 1s ease-in-out" }, jt = { ...N.titleMd, fontSize: "1em" }, Fn = { color: "rgb(154, 91, 19)", ".dark &": { color: "rgb(234, 154, 62)" } }, B = {
2073
+ root: r({ paddingBottom: e.spaceXl }),
2074
+ titleBox: r({ marginBottom: e.spaceXl }),
2075
+ title: r({ ...N.h3, textAlign: "center", fontSize: "1.5em" }),
2076
+ list: r({ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
2077
+ listSm: r({ display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
2078
+ badgeWinner: r({ ...Ot, backgroundColor: e.warning, fontSize: "1.2em" }),
2079
+ badge: r({ ...Ot, backgroundColor: ot, fontSize: "1em" }),
2080
+ medal: r({ fontSize: "1.375em", lineHeight: 1 }),
2081
+ avatarWinner: r({ ...Nt, width: "6.875em", height: "6.875em", border: `${e.borderSize} solid ${e.warning}` }),
2082
+ avatar: r({ ...Nt, width: "6.25em", height: "6.25em", border: `${e.borderSize} solid ${ot}` }),
2083
+ barWrap: r({ width: "100%", marginBottom: e.spaceMd, marginTop: e.spaceXs, paddingLeft: e.spaceXs, paddingRight: e.spaceXs }),
2084
+ barWinner: r({ ...Xt, backgroundColor: e.warningSoft }),
2085
+ bar: r({ ...Xt, backgroundColor: tt }),
2086
+ fillWinner: r({ ...Vt, backgroundColor: e.warning }),
2087
+ fill: r({ ...Vt, backgroundColor: fo }),
2088
+ name: r({ ...N.titleLg, marginBottom: e.space2xs, textAlign: "center", fontSize: "1.25em", unicodeBidi: "plaintext" }),
2089
+ tied: r({
2090
+ ...N.bodyXs,
2091
+ marginBottom: e.space2xs,
2092
+ textAlign: "center",
2093
+ color: e.warning,
2094
+ fontWeight: "bold",
2095
+ textTransform: "uppercase",
2096
+ letterSpacing: "0.03em",
2097
+ fontSize: "0.75em"
2098
+ }),
2099
+ position: r({ ...N.body, marginBottom: e.spaceXs, color: e.dim, fontSize: "0.875em" }),
2100
+ stats: r({ display: "flex", flexDirection: "row", alignItems: "center", marginTop: e.spaceXs, ...ho(e.spaceXs) }),
2101
+ percentageWinner: r({ ...jt, ...Fn }),
2102
+ percentage: r({ ...jt, color: "rgba(var(--fu-ucrc-neutral-main-channel) / 1)" }),
2103
+ votes: r({ ...N.body, color: e.dim, fontSize: "0.875em" })
2104
+ }, Hn = r({
2105
+ width: "1.875em",
2106
+ height: "1.875em",
2107
+ objectFit: "contain",
2108
+ position: "absolute",
2109
+ top: "0.625em",
2110
+ right: "0.625em"
2111
+ }), ae = {
2112
+ container: r({
2113
+ display: "flex",
2114
+ flexDirection: "column",
2115
+ width: "100%",
2116
+ maxWidth: "100%",
2117
+ marginLeft: "auto",
2118
+ marginRight: "auto",
2119
+ padding: e.spaceLg,
2120
+ backgroundColor: e.surface,
2121
+ borderRadius: e.radiusSm,
2122
+ border: `${e.borderSize} solid ${e.border}`,
2123
+ overflow: "hidden",
2124
+ boxSizing: "border-box",
2125
+ fontSize: "1em",
2126
+ // Anchors the em cascade (Shadow DOM rem safety)
2127
+ backgroundImage: "none",
2128
+ backgroundRepeat: "no-repeat",
2129
+ backgroundSize: "cover",
2130
+ backgroundPosition: "center",
2131
+ ...go(e.spaceMd)
2132
+ }),
2133
+ notFound: r({ textAlign: "center", padding: e.spaceMd, fontSize: "1em" }),
2134
+ content: r({ padding: e.spaceLg }),
2135
+ // Also the results view's "no votes yet".
2136
+ emptyState: r({ textAlign: "center", paddingTop: e.spaceXl, paddingBottom: e.spaceXl }),
2137
+ emptyText: r({ ...N.body, color: An, fontSize: "1.125em" }),
2138
+ status: r({ ...N.body, textAlign: "center", color: e.tertiary, fontSize: "0.875em" })
2139
+ }, Ut = Q.teamPlaceholder, On = Q.playerPlaceholder, Nn = (t, o) => o === 0 ? "0%" : `${(t / o * 100).toFixed(1)}%`, Xn = ({
2140
+ results: t,
2232
2141
  match: o,
2233
- showPlayers: r
2142
+ showPlayers: i
2234
2143
  }) => {
2235
- const { t: n } = B(), s = j(), [l, m] = T([]), [w, b] = T(0);
2236
- H(() => {
2237
- if (!(e != null && e.length)) return;
2238
- let u = e;
2239
- r && r.length > 0 && (u = e.filter(
2240
- (g) => r.includes(g.playerId)
2144
+ const { t: l } = G(), p = Z("sm"), [u, f] = I([]), [b, x] = I(0);
2145
+ U(() => {
2146
+ if (!(t != null && t.length)) return;
2147
+ let h = t;
2148
+ i && i.length > 0 && (h = t.filter(
2149
+ (g) => i.includes(g.playerId)
2241
2150
  ));
2242
- const d = u.reduce(
2243
- (g, y) => g + y.votes,
2151
+ const d = h.reduce(
2152
+ (g, k) => g + k.votes,
2244
2153
  0
2245
2154
  );
2246
- b(d);
2247
- const i = [...u].sort((g, y) => g.winner && !y.winner ? -1 : !g.winner && y.winner ? 1 : y.votes - g.votes).slice(0, 3).map((g) => ({
2155
+ x(d);
2156
+ const c = [...h].sort((g, k) => g.winner && !k.winner ? -1 : !g.winner && k.winner ? 1 : k.votes - g.votes).slice(0, 3).map((g) => ({
2248
2157
  ...g,
2249
2158
  percent: d > 0 ? g.votes / d * 100 : 0,
2250
2159
  playerDetails: z(g.playerId, o)
2251
2160
  }));
2252
- m(i);
2253
- }, [e, o, r]);
2254
- const z = (u, d) => {
2255
- var M;
2256
- let i = d.lineups.homeTeam.players.find((S) => S.id === u);
2257
- if (i || (i = d.lineups.awayTeam.players.find((S) => S.id === u)), !i) return;
2161
+ f(c);
2162
+ }, [t, o, i]);
2163
+ const z = (h, d) => {
2164
+ var S;
2165
+ let c = d.lineups.homeTeam.players.find((E) => E.id === h);
2166
+ if (c || (c = d.lineups.awayTeam.players.find((E) => E.id === h)), !c) return;
2258
2167
  const g = d.playerStats.find(
2259
- (S) => S.playerId === u
2260
- ), y = (g == null ? void 0 : g.minutesPlayed) || 0;
2168
+ (E) => E.playerId === h
2169
+ ), k = (g == null ? void 0 : g.minutesPlayed) || 0;
2261
2170
  return {
2262
- id: i.id,
2263
- name: i.name,
2264
- number: i.shirtNumber || 0,
2265
- team: i.id.includes(d.homeTeam.id) ? d.homeTeam.id : d.awayTeam.id,
2266
- position: i.position || "Unknown",
2267
- image: (M = i.assets) == null ? void 0 : M.headshot,
2268
- type: i.type,
2269
- minutesPlayed: y
2171
+ id: c.id,
2172
+ name: c.name,
2173
+ number: c.shirtNumber || 0,
2174
+ team: c.id.includes(d.homeTeam.id) ? d.homeTeam.id : d.awayTeam.id,
2175
+ position: c.position || "Unknown",
2176
+ image: (S = c.assets) == null ? void 0 : S.headshot,
2177
+ type: c.type,
2178
+ minutesPlayed: k
2270
2179
  };
2271
- }, p = (u) => {
2272
- var i, g;
2180
+ }, s = (h) => {
2181
+ var c, g;
2273
2182
  return o.lineups.homeTeam.players.some(
2274
- (y) => y.id === u
2275
- ) ? ((i = o.homeTeam.assets) == null ? void 0 : i.logo) || We : ((g = o.awayTeam.assets) == null ? void 0 : g.logo) || We;
2183
+ (k) => k.id === h
2184
+ ) ? ((c = o.homeTeam.assets) == null ? void 0 : c.logo) || Ut : ((g = o.awayTeam.assets) == null ? void 0 : g.logo) || Ut;
2276
2185
  };
2277
- return l.length ? /* @__PURE__ */ v(x, { sx: { pb: s.spacing.xl }, children: [
2278
- /* @__PURE__ */ t(x, { sx: { mb: s.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "h3", textAlign: "center", sx: { fontSize: "1.5em" }, children: n("potm.results_title") }) }),
2279
- /* @__PURE__ */ t(
2280
- Y,
2281
- {
2282
- direction: { xs: "column", sm: "row" },
2283
- spacing: s.spacing.xl,
2284
- justifyContent: "center",
2285
- alignItems: "stretch",
2286
- useFlexGap: !0,
2287
- children: l.map((u, d) => {
2288
- var f, _, R, $;
2289
- const i = u.winner === !0, g = l.filter((L) => !L.winner).indexOf(u), y = !i && g === 0, M = !i && g === 1, S = () => i ? "warning" : "neutral", P = () => i ? "🏆" : y ? "🥈" : M ? "🥉" : "", c = l.filter(
2290
- (L) => L.winner === !0
2291
- ).length, a = i && c > 1, k = i ? l.filter((L) => L.winner === !0).indexOf(u) : void 0;
2292
- return u.playerDetails ? /* @__PURE__ */ v(
2293
- Ce,
2294
- {
2295
- variant: "outlined",
2296
- sx: Xo(
2297
- i,
2298
- y,
2299
- M,
2300
- d,
2301
- k,
2302
- s
2303
- ),
2304
- children: [
2305
- /* @__PURE__ */ t(x, { sx: Go(i, s), children: P() }),
2306
- /* @__PURE__ */ t(
2307
- "img",
2308
- {
2309
- src: p(u.playerId),
2310
- onError: Ne(W.teamPlaceholder),
2311
- style: Yo,
2312
- alt: "Team logo"
2313
- }
2314
- ),
2315
- /* @__PURE__ */ t(
2316
- G,
2317
- {
2318
- src: ((f = u.playerDetails) == null ? void 0 : f.image) || Gt,
2319
- placeholder: W.playerPlaceholder,
2320
- alt: ((_ = u.playerDetails) == null ? void 0 : _.name) || "Player",
2321
- sx: Ko(i, s)
2322
- }
2323
- ),
2324
- /* @__PURE__ */ t(
2325
- x,
2326
- {
2327
- sx: {
2328
- width: "100%",
2329
- mb: s.spacing.md,
2330
- mt: s.spacing.xs,
2331
- px: s.spacing.xs
2332
- },
2333
- children: /* @__PURE__ */ t(
2334
- x,
2335
- {
2336
- sx: Qo(i, s),
2337
- children: /* @__PURE__ */ t(
2338
- x,
2339
- {
2340
- sx: Jo(
2341
- i,
2342
- u.percent,
2343
- s
2344
- )
2345
- }
2346
- )
2347
- }
2348
- )
2349
- }
2350
- ),
2351
- /* @__PURE__ */ t(
2352
- h,
2353
- {
2354
- level: "title-lg",
2355
- sx: {
2356
- mb: s.spacing["2xs"],
2357
- textAlign: "center",
2358
- fontSize: "1.25em"
2359
- },
2360
- children: ((R = u.playerDetails) == null ? void 0 : R.name) || (($ = u.playerDetails) == null ? void 0 : $.name) || "Unknown Player"
2361
- }
2362
- ),
2363
- a && /* @__PURE__ */ t(
2364
- h,
2365
- {
2366
- level: "body-xs",
2367
- sx: {
2368
- mb: s.spacing["2xs"],
2369
- textAlign: "center",
2370
- color: s.colors.warning,
2371
- fontWeight: "bold",
2372
- textTransform: "uppercase",
2373
- letterSpacing: "0.03em",
2374
- fontSize: "0.75em"
2375
- },
2376
- children: n("potm.tied_winner", "Tied Winner")
2377
- }
2378
- ),
2379
- /* @__PURE__ */ t(
2380
- h,
2381
- {
2382
- level: "body-sm",
2383
- sx: {
2384
- mb: s.spacing.xs,
2385
- color: s.colors.dim,
2386
- fontSize: "0.875em"
2387
- },
2388
- children: u.playerDetails ? n(`potm.${u.playerDetails.position}`) : ""
2389
- }
2390
- ),
2391
- /* @__PURE__ */ v(
2392
- Y,
2393
- {
2394
- direction: "row",
2395
- spacing: s.spacing.xs,
2396
- alignItems: "center",
2397
- sx: { mt: s.spacing.xs },
2398
- children: [
2399
- /* @__PURE__ */ t(
2400
- h,
2401
- {
2402
- level: "title-md",
2403
- color: S(),
2404
- sx: { fontSize: "1em" },
2405
- children: Yt(u.votes, w)
2406
- }
2407
- ),
2408
- /* @__PURE__ */ v(
2409
- h,
2410
- {
2411
- level: "body-sm",
2412
- sx: { color: s.colors.dim, fontSize: "0.875em" },
2413
- children: [
2414
- "(",
2415
- u.votes,
2416
- " ",
2417
- n("potm.votes", { count: u.votes }),
2418
- ")"
2419
- ]
2420
- }
2421
- )
2422
- ]
2423
- }
2424
- )
2425
- ]
2426
- },
2427
- u.playerId
2428
- ) : null;
2429
- })
2430
- }
2431
- )
2432
- ] }) : /* @__PURE__ */ t(x, { sx: { textAlign: "center", py: s.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "body-lg", sx: { fontSize: "1.125em" }, children: n("potm.no_votes_yet") }) });
2433
- }, Qt = ({ match: e }) => {
2434
- const { t: o } = B(), r = j(), { days: n, hours: s, minutes: l, seconds: m, isExpired: w } = je(e.kickoffAt);
2435
- return /* @__PURE__ */ v(x, { sx: Eo(r), children: [
2436
- /* @__PURE__ */ t(x, { sx: Wo(r) }),
2437
- /* @__PURE__ */ t(x, { sx: Lo(r) }),
2438
- /* @__PURE__ */ t(h, { level: "h3", sx: No(r), children: o("potm.voting_opens_soon") }),
2439
- /* @__PURE__ */ t(h, { level: "body-md", sx: Ho(r), children: o("potm.voting_upcoming_message") }),
2440
- /* @__PURE__ */ t(Ce, { variant: "outlined", sx: Bo(r), children: /* @__PURE__ */ v(Y, { direction: "row", alignItems: "center", justifyContent: "center", sx: { position: "relative" }, children: [
2441
- /* @__PURE__ */ t(He, { sx: jo }),
2442
- w ? /* @__PURE__ */ t(h, { level: "title-lg", color: "primary", sx: { fontSize: "1.25em" }, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ v(Y, { direction: "row", spacing: 2, sx: Fo, children: [
2443
- /* @__PURE__ */ t(ue, { value: n, label: o("potm.days"), styles: r }),
2444
- /* @__PURE__ */ t(ye, {}),
2445
- /* @__PURE__ */ t(ue, { value: s, label: o("potm.hours"), styles: r }),
2446
- /* @__PURE__ */ t(ye, {}),
2447
- /* @__PURE__ */ t(ue, { value: l, label: o("potm.min"), styles: r }),
2448
- /* @__PURE__ */ t(ye, {}),
2449
- /* @__PURE__ */ t(ue, { value: m, label: o("potm.sec"), styles: r })
2186
+ return u.length ? /* @__PURE__ */ v("div", { css: B.root, children: [
2187
+ /* @__PURE__ */ n("div", { css: B.titleBox, children: /* @__PURE__ */ n("h3", { css: B.title, children: l("potm.results_title") }) }),
2188
+ /* @__PURE__ */ n("div", { css: p ? B.listSm : B.list, children: u.map((h, d) => {
2189
+ var T, R, A;
2190
+ const c = h.winner === !0, g = u.filter((F) => !F.winner).indexOf(h), k = !c && g === 0, S = !c && g === 1, E = () => c ? "🏆" : k ? "🥈" : S ? "🥉" : "", _ = u.filter(
2191
+ (F) => F.winner === !0
2192
+ ).length, m = c && _ > 1, a = c ? u.filter((F) => F.winner === !0).indexOf(h) : void 0;
2193
+ if (!h.playerDetails) return null;
2194
+ const w = c ? "winner" : k ? "second" : "other", C = p ? c ? a ?? 0 : k ? -1 : 1 : d;
2195
+ return /* @__PURE__ */ v("div", { css: yo[`${w}|${p}`], style: { order: C }, children: [
2196
+ /* @__PURE__ */ n("div", { css: c ? B.badgeWinner : B.badge, children: /* @__PURE__ */ n("span", { css: B.medal, children: E() }) }),
2197
+ /* @__PURE__ */ n(
2198
+ "img",
2199
+ {
2200
+ src: s(h.playerId),
2201
+ onError: Fe(Q.teamPlaceholder),
2202
+ css: Hn,
2203
+ alt: "Team logo"
2204
+ }
2205
+ ),
2206
+ /* @__PURE__ */ n(
2207
+ rt,
2208
+ {
2209
+ src: ((T = h.playerDetails) == null ? void 0 : T.image) || On,
2210
+ placeholder: Q.playerPlaceholder,
2211
+ alt: ((R = h.playerDetails) == null ? void 0 : R.name) || "Player",
2212
+ css: c ? B.avatarWinner : B.avatar
2213
+ }
2214
+ ),
2215
+ /* @__PURE__ */ n("div", { css: B.barWrap, children: /* @__PURE__ */ n("div", { css: c ? B.barWinner : B.bar, children: /* @__PURE__ */ n(
2216
+ "div",
2217
+ {
2218
+ css: c ? B.fillWinner : B.fill,
2219
+ style: { width: `${h.percent}%` }
2220
+ }
2221
+ ) }) }),
2222
+ /* @__PURE__ */ n("p", { css: B.name, children: ((A = h.playerDetails) == null ? void 0 : A.name) || "Unknown Player" }),
2223
+ m && /* @__PURE__ */ n("span", { css: B.tied, children: l("potm.tied_winner", "Tied Winner") }),
2224
+ /* @__PURE__ */ n("p", { css: B.position, children: h.playerDetails ? l(`potm.${h.playerDetails.position}`) : "" }),
2225
+ /* @__PURE__ */ v("div", { css: B.stats, children: [
2226
+ /* @__PURE__ */ n("p", { css: c ? B.percentageWinner : B.percentage, children: Nn(h.votes, b) }),
2227
+ /* @__PURE__ */ v("p", { css: B.votes, children: [
2228
+ "(",
2229
+ h.votes,
2230
+ " ",
2231
+ l("potm.votes", { count: h.votes }),
2232
+ ")"
2233
+ ] })
2234
+ ] })
2235
+ ] }, h.playerId);
2236
+ }) })
2237
+ ] }) : /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: l("potm.no_votes_cast") }) });
2238
+ }, Gt = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, opacity: 0.02 }, Yt = { position: "absolute", color: fo }, j = {
2239
+ root: r({
2240
+ textAlign: "center",
2241
+ padding: `${e.spaceXl} ${e.spaceMd}`,
2242
+ display: "flex",
2243
+ flexDirection: "column",
2244
+ alignItems: "center",
2245
+ justifyContent: "center",
2246
+ minHeight: "15.625em",
2247
+ borderRadius: e.radiusSm,
2248
+ position: "relative",
2249
+ overflow: "hidden",
2250
+ background: `linear-gradient(135deg, rgba(${e.primaryRgb}, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(${e.primaryRgb}, 0.08) 100%)`,
2251
+ zIndex: 1
2252
+ }),
2253
+ grid: r({
2254
+ ...Gt,
2255
+ backgroundImage: `linear-gradient(rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em), linear-gradient(to right, rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em)`,
2256
+ backgroundSize: "1.875em 1.875em",
2257
+ zIndex: 2
2258
+ }),
2259
+ diagonal: r({
2260
+ ...Gt,
2261
+ backgroundImage: `linear-gradient(45deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em), linear-gradient(135deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em)`,
2262
+ backgroundSize: "3.75em 3.75em",
2263
+ zIndex: 3
2264
+ }),
2265
+ title: r({
2266
+ ...N.h3,
2267
+ marginBottom: e.spaceSm,
2268
+ fontWeight: 300,
2269
+ letterSpacing: "0.02em",
2270
+ color: e.primary,
2271
+ fontSize: "1.5em"
2272
+ }),
2273
+ description: r({ ...N.body, marginBottom: e.spaceXl, maxWidth: "31.25em", color: e.dim, fontSize: "1em" }),
2274
+ // Joy Card (outlined); its rem gap is ported as em.
2275
+ card: r({
2276
+ position: "relative",
2277
+ display: "flex",
2278
+ flexDirection: "column",
2279
+ gap: "0.75em 1em",
2280
+ fontFamily: e.fontBody,
2281
+ lineHeight: 1.5,
2282
+ color: "var(--fu-ucrc-neutral-outlined-color)",
2283
+ border: "1px solid var(--fu-ucrc-neutral-outlined-border)",
2284
+ maxWidth: "28.75em",
2285
+ width: "90%",
2286
+ borderRadius: e.radiusLg,
2287
+ boxShadow: "0 0.25em 0.75em rgba(0, 0, 0, 0.05)",
2288
+ overflow: "hidden",
2289
+ padding: `${e.spaceLg} ${e.spaceMd}`,
2290
+ opacity: 1,
2291
+ zIndex: 4,
2292
+ fontSize: "1em",
2293
+ // Anchors the em cascade for the countdown content
2294
+ background: e.surface
2295
+ }),
2296
+ cardRow: r({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", position: "relative" }),
2297
+ clock: r({ ...Yt, left: 0 }),
2298
+ clockSm: r({ ...Yt, left: "0.5em" }),
2299
+ startingSoon: r({ ...N.titleLg, color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)", fontSize: "1.25em" }),
2300
+ countdown: r({ display: "flex", flexDirection: "row", justifyContent: "center", width: "100%", ...ho("16px") }),
2301
+ unit: r({ display: "flex", flexDirection: "column", alignItems: "center" }),
2302
+ value: r({ ...N.h4, color: e.text, fontVariantNumeric: "tabular-nums", fontWeight: 600, fontSize: "1.25em" }),
2303
+ label: r({
2304
+ ...N.bodyXs,
2305
+ color: e.dim,
2306
+ fontSize: "0.7em",
2307
+ textTransform: "uppercase",
2308
+ letterSpacing: "0.05em",
2309
+ marginTop: "0.25em"
2310
+ }),
2311
+ separator: r({
2312
+ ...N.h4,
2313
+ alignSelf: "flex-start",
2314
+ color: ot,
2315
+ fontWeight: 300,
2316
+ fontSize: "1.25em"
2317
+ })
2318
+ }, Vn = ({ match: t }) => {
2319
+ const { t: o } = G(), i = Z("sm"), { days: l, hours: p, minutes: u, seconds: f, isExpired: b } = uo(t.kickoffAt);
2320
+ return /* @__PURE__ */ v("div", { css: j.root, children: [
2321
+ /* @__PURE__ */ n("div", { css: j.grid }),
2322
+ /* @__PURE__ */ n("div", { css: j.diagonal }),
2323
+ /* @__PURE__ */ n("h3", { css: j.title, children: o("potm.voting_opens_soon") }),
2324
+ /* @__PURE__ */ n("p", { css: j.description, children: o("potm.voting_upcoming_message") }),
2325
+ /* @__PURE__ */ n("div", { css: j.card, children: /* @__PURE__ */ v("div", { css: j.cardRow, children: [
2326
+ /* @__PURE__ */ n(qt, { size: "1.25em", css: i ? j.clockSm : j.clock }),
2327
+ b ? /* @__PURE__ */ n("p", { css: j.startingSoon, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ v("div", { css: j.countdown, children: [
2328
+ /* @__PURE__ */ n(Le, { value: l, label: o("potm.days") }),
2329
+ /* @__PURE__ */ n(Ke, {}),
2330
+ /* @__PURE__ */ n(Le, { value: p, label: o("potm.hours") }),
2331
+ /* @__PURE__ */ n(Ke, {}),
2332
+ /* @__PURE__ */ n(Le, { value: u, label: o("potm.min") }),
2333
+ /* @__PURE__ */ n(Ke, {}),
2334
+ /* @__PURE__ */ n(Le, { value: f, label: o("potm.sec") })
2450
2335
  ] })
2451
2336
  ] }) })
2452
2337
  ] });
2453
- }, ue = ({
2454
- value: e,
2455
- label: o,
2456
- styles: r
2457
- }) => /* @__PURE__ */ v(Y, { alignItems: "center", children: [
2458
- /* @__PURE__ */ t(h, { level: "h4", sx: Uo(r), children: e.toString().padStart(2, "0") }),
2459
- /* @__PURE__ */ t(h, { level: "body-xs", sx: Ao(r), children: o })
2460
- ] }), ye = () => /* @__PURE__ */ t(h, { level: "h4", sx: Oo, children: ":" }), Le = W.teamPlaceholder, Jt = ({
2461
- entityId: e,
2338
+ }, Le = ({ value: t, label: o }) => /* @__PURE__ */ v("div", { css: j.unit, children: [
2339
+ /* @__PURE__ */ n("h4", { css: j.value, children: t.toString().padStart(2, "0") }),
2340
+ /* @__PURE__ */ n("span", { css: j.label, children: o })
2341
+ ] }), Ke = () => /* @__PURE__ */ n("h4", { css: j.separator, children: ":" }), Kt = Q.teamPlaceholder, jn = ({
2342
+ entityId: t,
2462
2343
  sdk: o,
2463
- votingWindow: r = 1,
2464
- showTeam: n = "all",
2465
- showPlayers: s,
2466
- brandedAreaImage: l,
2467
- brandedAreaLink: m,
2468
- authRequirement: w,
2469
- userIsLoggedIn: b,
2344
+ votingWindow: i = 1,
2345
+ showTeam: l = "all",
2346
+ showPlayers: p,
2347
+ brandedAreaImage: u,
2348
+ brandedAreaLink: f,
2349
+ authRequirement: b,
2350
+ userIsLoggedIn: x,
2470
2351
  signInCTA: z,
2471
- defaultImagePlaceholderUrl: p,
2472
- headerBannerStyles: u
2352
+ defaultImagePlaceholderUrl: s,
2353
+ headerBannerStyles: h
2473
2354
  }) => {
2474
- var te, ne;
2475
- const { t: d } = B(), i = j(), [g, y] = T(!0), M = to(), [S, P] = T(null), [c, a] = T(null), [k, f] = T(null), [_, R] = T(!1), [$, L] = T(!1), [K, X] = T(!1), [U, ee] = T(!1), [oe, le] = T(!1), re = (V) => {
2476
- const I = V.finishedAt ? new Date(V.finishedAt) : (() => {
2477
- const A = new Date(V.kickoffAt);
2478
- return A.setHours(A.getHours() + 2), A < /* @__PURE__ */ new Date() ? A : null;
2355
+ var pe, xe;
2356
+ const { t: d } = G(), [c, g] = I(!0), k = To(), [S, E] = I(null), [_, m] = I(null), [a, w] = I(null), [C, T] = I(!1), [R, A] = I(!1), [F, se] = I(!1), [q, oe] = I(!1), [me, Te] = I(!1), ye = (H) => {
2357
+ const W = H.finishedAt ? new Date(H.finishedAt) : (() => {
2358
+ const ee = new Date(H.kickoffAt);
2359
+ return ee.setHours(ee.getHours() + 2), ee < /* @__PURE__ */ new Date() ? ee : null;
2479
2360
  })();
2480
- return I ? new Date(I.getTime() + r * 60 * 60 * 1e3) : null;
2481
- }, ce = (V) => {
2482
- const I = re(V);
2483
- return I ? /* @__PURE__ */ new Date() > I : !1;
2484
- }, xe = async (V) => {
2485
- y(!0), L(!1), X(!1), R(!1), ee(!1), a(null), f(null);
2361
+ return W ? new Date(W.getTime() + i * 60 * 60 * 1e3) : null;
2362
+ }, Ie = (H) => {
2363
+ const W = ye(H);
2364
+ return W ? /* @__PURE__ */ new Date() > W : !1;
2365
+ }, Oe = async (H) => {
2366
+ g(!0), A(!1), se(!1), T(!1), oe(!1), m(null), w(null);
2486
2367
  try {
2487
- const I = await o.football.getMatchById(V, M);
2488
- P(I);
2489
- const A = /* @__PURE__ */ new Date(), Se = new Date(I.kickoffAt);
2490
- if (A < Se) {
2491
- L(!0), y(!1);
2368
+ const W = await o.football.getMatchById(H, k);
2369
+ E(W);
2370
+ const ee = /* @__PURE__ */ new Date(), Xe = new Date(W.kickoffAt);
2371
+ if (ee < Xe) {
2372
+ A(!0), g(!1);
2492
2373
  return;
2493
2374
  }
2494
- const me = ce(I);
2495
- if (X(me), me)
2375
+ const Re = Ie(W);
2376
+ if (se(Re), Re)
2496
2377
  try {
2497
- const E = await o.voting.getResultsForPlayerOfTheMatch(V, M);
2498
- f(E), y(!1);
2378
+ const O = await o.voting.getResultsForPlayerOfTheMatch(H, k);
2379
+ w(O), g(!1);
2499
2380
  return;
2500
- } catch (E) {
2501
- console.error("Failed to fetch voting results", E);
2502
- const { status: O } = ge(E, o);
2503
- O === "match_id_not_full_coverage" ? ee(!0) : R(!0);
2381
+ } catch (O) {
2382
+ console.error("Failed to fetch voting results", O);
2383
+ const { status: te } = We(O, o);
2384
+ te === "match_id_not_full_coverage" ? oe(!0) : T(!0);
2504
2385
  }
2505
2386
  try {
2506
- const E = await o.voting.getOwnVotesForPlayerOfTheMatch({
2507
- matchIds: [V],
2387
+ const O = await o.voting.getOwnVotesForPlayerOfTheMatch({
2388
+ matchIds: [H],
2508
2389
  limit: 1
2509
2390
  });
2510
- if (E.data && E.data.length > 0) {
2511
- const O = E.data.find(
2512
- (we) => we.matchId === V
2391
+ if (O.data && O.data.length > 0) {
2392
+ const te = O.data.find(
2393
+ (Ve) => Ve.matchId === H
2513
2394
  );
2514
- O && a(O.playerId);
2395
+ te && m(te.playerId);
2515
2396
  }
2516
- } catch (E) {
2517
- console.warn("User not logged in or no votes found", E);
2397
+ } catch (O) {
2398
+ console.warn("User not logged in or no votes found", O);
2518
2399
  }
2519
2400
  try {
2520
- const E = await o.voting.getResultsForPlayerOfTheMatch(V, M);
2521
- f(E);
2522
- } catch (E) {
2523
- console.error("Failed to fetch voting results", E);
2524
- const { status: O } = ge(E, o);
2525
- O === "match_id_not_full_coverage" ? ee(!0) : (O === "voting_potm_finished" || O === "voting_potm_not_started") && R(!0);
2401
+ const O = await o.voting.getResultsForPlayerOfTheMatch(H, k);
2402
+ w(O);
2403
+ } catch (O) {
2404
+ console.error("Failed to fetch voting results", O);
2405
+ const { status: te } = We(O, o);
2406
+ te === "match_id_not_full_coverage" ? oe(!0) : (te === "voting_potm_finished" || te === "voting_potm_not_started") && T(!0);
2526
2407
  }
2527
- } catch (I) {
2528
- console.error("Failed to fetch match data", I);
2529
- const { status: A } = ge(I, o);
2530
- A === "match_id_not_full_coverage" && ee(!0);
2408
+ } catch (W) {
2409
+ console.error("Failed to fetch match data", W);
2410
+ const { status: ee } = We(W, o);
2411
+ ee === "match_id_not_full_coverage" && oe(!0);
2531
2412
  } finally {
2532
- y(!1);
2413
+ g(!1);
2533
2414
  }
2534
2415
  };
2535
- H(() => {
2536
- xe(e);
2537
- }, [e, r, o, M]), H(() => {
2538
- le(w === "REGISTERED" && !b);
2539
- }, [w, b]);
2540
- const F = se(
2541
- () => S ? re(S) : null,
2542
- [S, r]
2543
- ), de = async (V) => {
2416
+ U(() => {
2417
+ Oe(t);
2418
+ }, [t, i, o, k]), U(() => {
2419
+ Te(b === "REGISTERED" && !x);
2420
+ }, [b, x]);
2421
+ const Y = Ce(
2422
+ () => S ? ye(S) : null,
2423
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- getVotingDeadline only reads votingWindow, which is listed
2424
+ [S, i]
2425
+ ), De = async (H) => {
2544
2426
  try {
2545
- c === V ? (await o.voting.deleteVoteForPlayerOfTheMatch(e), a(null)) : (await o.voting.voteForPlayerOfTheMatch(e, V), a(V));
2546
- const I = await o.voting.getResultsForPlayerOfTheMatch(e, !0);
2547
- return f(I), !0;
2548
- } catch (I) {
2549
- throw console.error("Error voting", I), I;
2427
+ _ === H ? (await o.voting.deleteVoteForPlayerOfTheMatch(t), m(null)) : (await o.voting.voteForPlayerOfTheMatch(t, H), m(H));
2428
+ const W = await o.voting.getResultsForPlayerOfTheMatch(t, !0);
2429
+ return w(W), !0;
2430
+ } catch (W) {
2431
+ throw console.error("Error voting", W), W;
2550
2432
  }
2551
2433
  };
2552
- if (g)
2553
- return /* @__PURE__ */ t(ro, { my: 20 });
2434
+ if (c)
2435
+ return /* @__PURE__ */ n(Bo, { marginBlock: "160px" });
2554
2436
  if (!S)
2555
- return /* @__PURE__ */ t(x, { sx: { textAlign: "center", p: i.spacing.md, fontSize: "1em" }, children: d(U ? "potm.match_not_full_coverage" : "potm.match_not_found") });
2556
- const be = [
2437
+ return /* @__PURE__ */ n("div", { css: ae.notFound, children: d(q ? "potm.match_not_full_coverage" : "potm.match_not_found") });
2438
+ const Ne = [
2557
2439
  {
2558
2440
  id: S.homeTeam.id,
2559
2441
  name: S.homeTeam.name,
2560
2442
  code: S.homeTeam.code || S.homeTeam.name.substring(0, 3),
2561
- logo: ((te = S.homeTeam.assets) == null ? void 0 : te.logo) || Le
2443
+ logo: ((pe = S.homeTeam.assets) == null ? void 0 : pe.logo) || Kt
2562
2444
  },
2563
2445
  {
2564
2446
  id: S.awayTeam.id,
2565
2447
  name: S.awayTeam.name,
2566
2448
  code: S.awayTeam.code || S.awayTeam.name.substring(0, 3),
2567
- logo: ((ne = S.awayTeam.assets) == null ? void 0 : ne.logo) || Le
2449
+ logo: ((xe = S.awayTeam.assets) == null ? void 0 : xe.logo) || Kt
2568
2450
  }
2569
- ], Q = $ || U ? null : K ? d("potm.voting_ended_message", {
2451
+ ], re = R || q ? null : F ? d("potm.voting_ended_message", {
2570
2452
  defaultValue: "Voting has ended. These are the final results."
2571
- }) : _ ? d("potm.voting_closed_message") : null;
2453
+ }) : C ? d("potm.voting_closed_message") : null;
2572
2454
  return /* @__PURE__ */ v(
2573
- Y,
2455
+ "div",
2574
2456
  {
2575
- spacing: i.spacing.md,
2576
- sx: {
2577
- ...yo(i),
2578
- backgroundImage: p ? `url(${p})` : "none",
2579
- backgroundRepeat: "no-repeat",
2580
- backgroundSize: "cover",
2581
- backgroundPosition: "center",
2582
- p: i.spacing.lg
2583
- },
2457
+ css: ae.container,
2458
+ style: s ? { backgroundImage: `url(${s})` } : void 0,
2584
2459
  children: [
2585
- l && /* @__PURE__ */ t(
2586
- wo,
2460
+ u && /* @__PURE__ */ n(
2461
+ Yo,
2587
2462
  {
2588
- backgroundImage: l,
2589
- link: m,
2463
+ backgroundImage: u,
2464
+ link: f,
2590
2465
  height: "150px",
2591
2466
  minHeight: "120px"
2592
2467
  }
2593
2468
  ),
2594
- /* @__PURE__ */ t(Xt, { teams: be, headerBannerStyles: u }),
2595
- /* @__PURE__ */ t(x, { sx: { p: i.spacing.lg }, children: $ ? (
2469
+ /* @__PURE__ */ n(Bn, { teams: Ne, headerBannerStyles: h }),
2470
+ /* @__PURE__ */ n("div", { css: ae.content, children: R ? (
2596
2471
  // For upcoming matches - show countdown
2597
- /* @__PURE__ */ t(Qt, { match: S })
2598
- ) : U ? (
2472
+ /* @__PURE__ */ n(Vn, { match: S })
2473
+ ) : q ? (
2599
2474
  // No player data for this match — nothing to vote on, so skip the carousel entirely
2600
- /* @__PURE__ */ t(x, { sx: { textAlign: "center", py: i.spacing.xl }, children: /* @__PURE__ */ t(h, { level: "body-lg", sx: { fontSize: "1.125em" }, children: d("potm.match_not_full_coverage") }) })
2601
- ) : K && k ? (
2475
+ /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: d("potm.match_not_full_coverage") }) })
2476
+ ) : F && a ? (
2602
2477
  // For matches where voting period has ended - show results
2603
- /* @__PURE__ */ t(
2604
- Kt,
2478
+ /* @__PURE__ */ n(
2479
+ Xn,
2605
2480
  {
2606
- results: k.data,
2481
+ results: a.data,
2607
2482
  match: S,
2608
- showPlayers: s
2483
+ showPlayers: p
2609
2484
  }
2610
2485
  )
2611
2486
  ) : (
2612
2487
  // For ongoing/completed matches within voting window - show voting interface
2613
- /* @__PURE__ */ t(
2614
- Ot,
2488
+ /* @__PURE__ */ n(
2489
+ _n,
2615
2490
  {
2616
2491
  match: S,
2617
2492
  sdk: o,
2618
- userVote: c,
2619
- votingResults: k,
2620
- handleVote: de,
2621
- isVotingClosed: _,
2622
- show: n ?? "all",
2623
- showPlayers: s,
2624
- defaultImagePlaceholderUrl: p,
2625
- showSignInCTA: oe,
2493
+ userVote: _,
2494
+ votingResults: a,
2495
+ handleVote: De,
2496
+ isVotingClosed: C,
2497
+ show: l ?? "all",
2498
+ showPlayers: p,
2499
+ defaultImagePlaceholderUrl: s,
2500
+ showSignInCTA: me,
2626
2501
  signInCTA: z,
2627
- votingDeadline: F
2502
+ votingDeadline: Y
2628
2503
  }
2629
2504
  )
2630
2505
  ) }),
2631
- Q && /* @__PURE__ */ t(
2632
- h,
2633
- {
2634
- level: "body-sm",
2635
- textAlign: "center",
2636
- sx: Co(i),
2637
- children: Q
2638
- }
2639
- )
2506
+ re && /* @__PURE__ */ n("p", { css: ae.status, children: re })
2640
2507
  ]
2641
2508
  }
2642
2509
  );
2643
- }, Zt = (e) => /* @__PURE__ */ t(no, { packageName: "player-of-the-match", ...e, children: /* @__PURE__ */ t(Jt, { ...e }) }), cr = xo(Zt);
2510
+ }, Un = ({ children: t }) => {
2511
+ const o = Io(Do().palette.primary.plainColor), i = {
2512
+ display: "contents",
2513
+ "--fu-ucrc-potm-primary-rgb": o,
2514
+ "--fu-ucrc-potm-primary-soft": `rgba(${o}, 0.12)`
2515
+ };
2516
+ return /* @__PURE__ */ n("div", { style: i, children: t });
2517
+ }, Gn = (t) => /* @__PURE__ */ n(
2518
+ Eo,
2519
+ {
2520
+ packageName: "player-of-the-match",
2521
+ language: t.language,
2522
+ themeOptions: t.themeOptions,
2523
+ disableCache: t.disableCache,
2524
+ children: /* @__PURE__ */ n(Un, { children: /* @__PURE__ */ n(jn, { ...t }) })
2525
+ }
2526
+ ), nr = Vo(Gn);
2644
2527
  export {
2645
- cr as PlayerOfTheMatch
2528
+ nr as PlayerOfTheMatch
2646
2529
  };