@sensiblestats/widget-react 0.85.0 → 0.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/StatsWidget.tsx
2
- import { useCallback as useCallback23, useEffect as useEffect34, useMemo as useMemo6, useRef as useRef31, useState as useState53 } from "react";
2
+ import { useCallback as useCallback23, useEffect as useEffect34, useMemo as useMemo6, useRef as useRef31, useState as useState55 } from "react";
3
3
  import { StatsWidgetClient } from "@sensiblestats/widget-sdk";
4
4
 
5
5
  // src/kickoff.ts
@@ -15,8 +15,13 @@ function formatBettingKickoff(kickoffUtc, ui, locale, now = /* @__PURE__ */ new
15
15
  }
16
16
 
17
17
  // src/i18n.ts
18
+ var GROUP_NOUN_EN = { G: "goalkeepers", D: "defenders", M: "midfielders", F: "forwards" };
19
+ var GROUP_NOUN_TR = { G: "kalecileri", D: "defans oyuncular\u0131", M: "orta saha oyuncular\u0131", F: "forvetleri" };
18
20
  var formatPtsEn = (n) => new Intl.NumberFormat("en-GB").format(n);
19
21
  var formatPtsTr = (n) => new Intl.NumberFormat("tr-TR").format(n);
22
+ var nbsp = (s) => s.replace(/\s/g, "\xA0");
23
+ var pdDateEn = (ms, opts) => nbsp(new Intl.DateTimeFormat("en-GB", opts).format(new Date(ms)).replace("Sept", "Sep"));
24
+ var pdDateTr = (ms, opts) => nbsp(new Intl.DateTimeFormat("tr-TR", opts).format(new Date(ms)));
20
25
  var STRINGS = {
21
26
  en: {
22
27
  launcherLabel: "Chat with SensibleStats",
@@ -152,6 +157,60 @@ var STRINGS = {
152
157
  recordsMostAssists: "Most assists",
153
158
  recordsSince: "Since {season}",
154
159
  standingsColClub: "Club",
160
+ statHeadPos: "Pos",
161
+ statHeadMins: "Mins",
162
+ statHeadGoals: "G",
163
+ statHeadAssists: "A",
164
+ statHeadYellow: "Y",
165
+ statHeadRed: "R",
166
+ statHeadRating: "Rtg",
167
+ squadStatsEyebrow: (season, competition, n) => `${season} ${competition} \xB7 after ${n} game${n === 1 ? "" : "s"}`,
168
+ squadTopScorer: (name, n) => `Top scorer: ${name} (${n})`,
169
+ squadTopAssists: (name, n) => `Most assists: ${name} (${n})`,
170
+ detailStarted: "Started",
171
+ detailMatches: "Matches",
172
+ detailNatShort: "Nat.",
173
+ detailYellows: "Yellows",
174
+ detailReds: "Reds",
175
+ availabilityNext: (opponent, isHome, kickoffMs) => `Next: ${isHome ? "vs" : "at"} ${opponent} (${isHome ? "H" : "A"})` + (kickoffMs !== null && kickoffMs > 0 ? ` \xB7 ${pdDateEn(kickoffMs, { weekday: "short", day: "numeric", month: "short" })}` : ""),
176
+ availabilityAvailable: "Available",
177
+ availabilityInjured: "Injured",
178
+ availabilitySuspended: "Suspended",
179
+ availabilityUnavailable: "Unavailable",
180
+ availabilityNoConcerns: "No fitness concerns reported",
181
+ availabilityBack: (ms) => `Expected back ${pdDateEn(ms, { day: "numeric", month: "short" })}`,
182
+ perfTitle: "Season performance",
183
+ perfTotal: "Total",
184
+ perfPer90: "Per 90",
185
+ perfRankedAgainst: (competition, group) => `Ranked against ${competition} ${GROUP_NOUN_EN[group] ?? group}`,
186
+ perfUnranked: "Not enough minutes to rank",
187
+ perfUnrankedCohort: "Not enough players in this position to rank",
188
+ perfUnrankedNoLeague: "Not ranked \u2014 no league data",
189
+ perfGroupShooting: "Shooting",
190
+ perfGroupPassing: "Passing",
191
+ perfGroupPossession: "Possession",
192
+ perfGroupDefending: "Defending",
193
+ perfMetric: {
194
+ goals: "Goals",
195
+ xg: "Expected goals (xG)",
196
+ shots: "Shots",
197
+ shotsOnTarget: "Shots on target",
198
+ assists: "Assists",
199
+ successfulPasses: "Successful passes",
200
+ passAccuracy: "Pass accuracy",
201
+ chancesCreated: "Chances created",
202
+ successfulDribbles: "Successful dribbles",
203
+ dribbleSuccess: "Dribble success",
204
+ touches: "Touches",
205
+ tacklesWon: "Tackles won",
206
+ interceptions: "Interceptions",
207
+ duelsWon: "Duels won"
208
+ },
209
+ perfGroupNoun: GROUP_NOUN_EN,
210
+ matchLogTitle: "Match log",
211
+ matchLogOpponent: (name, isHome) => isHome ? `vs ${name}` : `at ${name}`,
212
+ resultLetter: { W: "W", D: "D", L: "L" },
213
+ logShortDate: (ms) => pdDateEn(ms, { day: "numeric", month: "short" }),
155
214
  standingsColPlayed: "P",
156
215
  standingsColWon: "W",
157
216
  standingsColDrawn: "D",
@@ -565,6 +624,60 @@ var STRINGS = {
565
624
  recordsMostAssists: "En \xE7ok asist yapanlar",
566
625
  recordsSince: "{season} sezonundan beri",
567
626
  standingsColClub: "Tak\u0131m",
627
+ statHeadPos: "Mvk",
628
+ statHeadMins: "Dk",
629
+ statHeadGoals: "G",
630
+ statHeadAssists: "A",
631
+ statHeadYellow: "S",
632
+ statHeadRed: "K",
633
+ statHeadRating: "Puan",
634
+ squadStatsEyebrow: (season, competition, n) => `${season} ${competition} \xB7 ${n} ma\xE7 sonra`,
635
+ squadTopScorer: (name, n) => `Gol kral\u0131: ${name} (${n})`,
636
+ squadTopAssists: (name, n) => `Asist lideri: ${name} (${n})`,
637
+ detailStarted: "\u0130lk 11",
638
+ detailMatches: "Ma\xE7",
639
+ detailNatShort: "Uyruk",
640
+ detailYellows: "Sar\u0131",
641
+ detailReds: "K\u0131rm\u0131z\u0131",
642
+ availabilityNext: (opponent, isHome, kickoffMs) => `Sonraki: ${opponent} (${isHome ? "\u0130\xE7\xA0saha" : "Deplasman"})` + (kickoffMs !== null && kickoffMs > 0 ? ` \xB7 ${pdDateTr(kickoffMs, { day: "numeric", month: "short", weekday: "short" })}` : ""),
643
+ availabilityAvailable: "Haz\u0131r",
644
+ availabilityInjured: "Sakat",
645
+ availabilitySuspended: "Cezal\u0131",
646
+ availabilityUnavailable: "Haz\u0131r de\u011Fil",
647
+ availabilityNoConcerns: "Sakatl\u0131k bildirimi yok",
648
+ availabilityBack: (ms) => `D\xF6n\xFC\u015F: ${pdDateTr(ms, { day: "numeric", month: "short" })}`,
649
+ perfTitle: "Sezon performans\u0131",
650
+ perfTotal: "Toplam",
651
+ perfPer90: "90 dk",
652
+ perfRankedAgainst: (competition, group) => `${competition} ${GROUP_NOUN_TR[group] ?? group} aras\u0131nda`,
653
+ perfUnranked: "S\u0131ralama i\xE7in yeterli s\xFCre yok",
654
+ perfUnrankedCohort: "Bu mevkide s\u0131ralama i\xE7in yeterli oyuncu yok",
655
+ perfUnrankedNoLeague: "S\u0131ralanmad\u0131 \u2014 lig verisi yok",
656
+ perfGroupShooting: "\u015Eut",
657
+ perfGroupPassing: "Pas",
658
+ perfGroupPossession: "Top hakimiyeti",
659
+ perfGroupDefending: "Savunma",
660
+ perfMetric: {
661
+ goals: "Gol",
662
+ xg: "Gol beklentisi (xG)",
663
+ shots: "\u015Eut",
664
+ shotsOnTarget: "\u0130sabetli \u015Fut",
665
+ assists: "Asist",
666
+ successfulPasses: "Ba\u015Far\u0131l\u0131 pas",
667
+ passAccuracy: "Pas isabeti",
668
+ chancesCreated: "Yarat\u0131lan f\u0131rsat",
669
+ successfulDribbles: "Ba\u015Far\u0131l\u0131 \xE7al\u0131m",
670
+ dribbleSuccess: "\xC7al\u0131m ba\u015Far\u0131s\u0131",
671
+ touches: "Topla bulu\u015Fma",
672
+ tacklesWon: "Kazan\u0131lan m\xFCdahale",
673
+ interceptions: "Top kapma",
674
+ duelsWon: "Kazan\u0131lan ikili m\xFCcadele"
675
+ },
676
+ perfGroupNoun: GROUP_NOUN_TR,
677
+ matchLogTitle: "Ma\xE7 ge\xE7mi\u015Fi",
678
+ matchLogOpponent: (name, isHome) => isHome ? `${name} (\u0130)` : `${name} (D)`,
679
+ resultLetter: { W: "G", D: "B", L: "M" },
680
+ logShortDate: (ms) => pdDateTr(ms, { day: "numeric", month: "short" }),
568
681
  standingsColPlayed: "O",
569
682
  standingsColWon: "G",
570
683
  standingsColDrawn: "B",
@@ -975,6 +1088,45 @@ function normalizeUi(cfg) {
975
1088
  recordsMostAssists: strings.recordsMostAssists,
976
1089
  recordsSince: strings.recordsSince,
977
1090
  standingsColClub: strings.standingsColClub,
1091
+ statHeadPos: strings.statHeadPos,
1092
+ statHeadMins: strings.statHeadMins,
1093
+ statHeadGoals: strings.statHeadGoals,
1094
+ statHeadAssists: strings.statHeadAssists,
1095
+ statHeadYellow: strings.statHeadYellow,
1096
+ statHeadRed: strings.statHeadRed,
1097
+ statHeadRating: strings.statHeadRating,
1098
+ squadStatsEyebrow: strings.squadStatsEyebrow,
1099
+ squadTopScorer: strings.squadTopScorer,
1100
+ squadTopAssists: strings.squadTopAssists,
1101
+ detailStarted: strings.detailStarted,
1102
+ detailMatches: strings.detailMatches,
1103
+ detailNatShort: strings.detailNatShort,
1104
+ detailYellows: strings.detailYellows,
1105
+ detailReds: strings.detailReds,
1106
+ availabilityNext: strings.availabilityNext,
1107
+ availabilityAvailable: strings.availabilityAvailable,
1108
+ availabilityInjured: strings.availabilityInjured,
1109
+ availabilitySuspended: strings.availabilitySuspended,
1110
+ availabilityUnavailable: strings.availabilityUnavailable,
1111
+ availabilityNoConcerns: strings.availabilityNoConcerns,
1112
+ availabilityBack: strings.availabilityBack,
1113
+ perfTitle: strings.perfTitle,
1114
+ perfTotal: strings.perfTotal,
1115
+ perfPer90: strings.perfPer90,
1116
+ perfRankedAgainst: strings.perfRankedAgainst,
1117
+ perfUnranked: strings.perfUnranked,
1118
+ perfUnrankedCohort: strings.perfUnrankedCohort,
1119
+ perfUnrankedNoLeague: strings.perfUnrankedNoLeague,
1120
+ perfGroupShooting: strings.perfGroupShooting,
1121
+ perfGroupPassing: strings.perfGroupPassing,
1122
+ perfGroupPossession: strings.perfGroupPossession,
1123
+ perfGroupDefending: strings.perfGroupDefending,
1124
+ perfMetric: strings.perfMetric,
1125
+ perfGroupNoun: strings.perfGroupNoun,
1126
+ matchLogTitle: strings.matchLogTitle,
1127
+ matchLogOpponent: strings.matchLogOpponent,
1128
+ resultLetter: strings.resultLetter,
1129
+ logShortDate: strings.logShortDate,
978
1130
  standingsColPlayed: strings.standingsColPlayed,
979
1131
  standingsColWon: strings.standingsColWon,
980
1132
  standingsColDrawn: strings.standingsColDrawn,
@@ -3344,6 +3496,8 @@ import { useCallback as useCallback10, useEffect as useEffect11, useRef as useRe
3344
3496
  function useClubSquadStats(conversation, { activeTab, enabled }) {
3345
3497
  const [data, setData] = useState10(null);
3346
3498
  const [seasonName, setSeasonName] = useState10(null);
3499
+ const [competitionName, setCompetitionName] = useState10(null);
3500
+ const [matchesPlayed, setMatchesPlayed] = useState10(null);
3347
3501
  const [loading, setLoading] = useState10(false);
3348
3502
  const [refreshCount, setRefreshCount] = useState10(0);
3349
3503
  const inFlightRef = useRef11(false);
@@ -3362,6 +3516,8 @@ function useClubSquadStats(conversation, { activeTab, enabled }) {
3362
3516
  if (active) {
3363
3517
  setData(result?.players ?? null);
3364
3518
  setSeasonName(result?.seasonName ?? null);
3519
+ setCompetitionName(result?.competitionName ?? null);
3520
+ setMatchesPlayed(result?.clubMatchesPlayed ?? null);
3365
3521
  }
3366
3522
  } catch {
3367
3523
  } finally {
@@ -3379,7 +3535,7 @@ function useClubSquadStats(conversation, { activeTab, enabled }) {
3379
3535
  setRefreshCount((c) => c + 1);
3380
3536
  }, []);
3381
3537
  const effectiveLoading = loading || activeTab === "squad" && enabled && data === null;
3382
- return { data, seasonName, loading: effectiveLoading, refresh };
3538
+ return { data, seasonName, competitionName, matchesPlayed, loading: effectiveLoading, refresh };
3383
3539
  }
3384
3540
 
3385
3541
  // src/useClubPlayerDetail.ts
@@ -3779,7 +3935,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
3779
3935
  }
3780
3936
 
3781
3937
  // src/components/ChatPanel.tsx
3782
- import { useCallback as useCallback22, useEffect as useEffect33, useLayoutEffect, useMemo as useMemo5, useRef as useRef30, useState as useState52 } from "react";
3938
+ import { useCallback as useCallback22, useEffect as useEffect33, useLayoutEffect, useMemo as useMemo5, useRef as useRef30, useState as useState54 } from "react";
3783
3939
 
3784
3940
  // src/components/ChatHeader.tsx
3785
3941
  import { useEffect as useEffect16, useRef as useRef17, useState as useState15 } from "react";
@@ -5457,7 +5613,7 @@ function useLiveClock(minute, clockRunning, receivedAtMs) {
5457
5613
  }
5458
5614
 
5459
5615
  // src/components/dashboard/LiveScoreCard.tsx
5460
- import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
5616
+ import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
5461
5617
  function initials5(name) {
5462
5618
  return name.trim().slice(0, 3).toUpperCase();
5463
5619
  }
@@ -5469,11 +5625,14 @@ function LiveCrest({ url, name, side }) {
5469
5625
  }
5470
5626
  return /* @__PURE__ */ jsx41("span", { className: `${cls} ss-w-fandash-live-crest--fallback`, "aria-hidden": "true", children: initials5(name) });
5471
5627
  }
5472
- function scorersLine(goalEvents) {
5473
- if (!goalEvents || goalEvents.length === 0) return null;
5628
+ function scorersBySide(goalEvents) {
5629
+ if (!goalEvents || goalEvents.length === 0) return { home: null, away: null };
5474
5630
  const named = goalEvents.filter((e) => e.type === "goal" && e.player);
5475
- if (named.length === 0) return null;
5476
- return named.slice().sort((a, b) => a.minute - b.minute).map((e) => `${e.player} ${e.minuteLabel}`).join(", ");
5631
+ const line = (side) => {
5632
+ const scorers = named.filter((e) => e.side === side).slice().sort((a, b) => a.minute - b.minute).map((e) => `${e.player} ${e.minuteLabel}`);
5633
+ return scorers.length === 0 ? null : scorers.join(", ");
5634
+ };
5635
+ return { home: line("home"), away: line("away") };
5477
5636
  }
5478
5637
  function LiveScoreCard({
5479
5638
  card,
@@ -5487,7 +5646,7 @@ function LiveScoreCard({
5487
5646
  }
5488
5647
  const displayMinute = useLiveClock(data.minute, data.clockRunning, seedRef.current.receivedAtMs);
5489
5648
  const minuteSuffix = data.minuteLabel.replace(/^\d+/, "");
5490
- const scorers = scorersLine(goalEvents);
5649
+ const { home: homeScorers, away: awayScorers } = scorersBySide(goalEvents);
5491
5650
  return /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-card ss-w-fandash-live-score", children: [
5492
5651
  card.title ? /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
5493
5652
  /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-live-top", children: [
@@ -5513,9 +5672,15 @@ function LiveScoreCard({
5513
5672
  /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-team-name", children: data.awayName })
5514
5673
  ] })
5515
5674
  ] }),
5516
- scorers ? /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-live-scorers", children: [
5517
- /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-scorers-icon", "aria-hidden": "true", children: "\u26BD" }),
5518
- scorers
5675
+ homeScorers || awayScorers ? /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-live-scorers-row", children: [
5676
+ /* @__PURE__ */ jsx41("div", { className: "ss-w-fandash-live-scorers ss-w-fandash-live-scorers--home", children: homeScorers ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
5677
+ /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-scorers-icon", "aria-hidden": "true", children: "\u26BD" }),
5678
+ homeScorers
5679
+ ] }) : null }),
5680
+ /* @__PURE__ */ jsx41("div", { className: "ss-w-fandash-live-scorers ss-w-fandash-live-scorers--away", children: awayScorers ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
5681
+ awayScorers,
5682
+ /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-scorers-icon", "aria-hidden": "true", children: "\u26BD" })
5683
+ ] }) : null })
5519
5684
  ] }) : null
5520
5685
  ] });
5521
5686
  }
@@ -6679,7 +6844,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
6679
6844
  }
6680
6845
 
6681
6846
  // src/components/TodayPanel.tsx
6682
- import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
6847
+ import { Fragment as Fragment8, jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
6683
6848
  function TodayPanel({ discovery, ui, monitor }) {
6684
6849
  const { groups, states, stale, starLeague } = discovery;
6685
6850
  const searchId = useId2();
@@ -6736,7 +6901,7 @@ function TodayPanel({ discovery, ui, monitor }) {
6736
6901
  if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
6737
6902
  }, [selectedCompetitionId, openGroup]);
6738
6903
  const liveRows = stale ? [] : visibleGroups.flatMap((group) => group.matches.filter((m) => isTreatedLive(states[m.matchId], stale)).map((match) => ({ match, rank: group.rank }))).sort((a, b) => a.rank - b.rank);
6739
- const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs55(Fragment7, { children: [
6904
+ const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs55(Fragment8, { children: [
6740
6905
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-sec-head", children: [
6741
6906
  /* @__PURE__ */ jsx61("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
6742
6907
  ui.sectionLive
@@ -6794,7 +6959,7 @@ function TodayPanel({ discovery, ui, monitor }) {
6794
6959
  clearLabel: ui.clearSearchLabel
6795
6960
  }
6796
6961
  ),
6797
- searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx61("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx61(Fragment7, { children: searchResults.map((group) => /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-block", children: [
6962
+ searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx61("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx61(Fragment8, { children: searchResults.map((group) => /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-block", children: [
6798
6963
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-search-group", children: [
6799
6964
  /* @__PURE__ */ jsx61(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
6800
6965
  /* @__PURE__ */ jsxs55("span", { className: "ss-w-today-search-group-name", children: [
@@ -6824,7 +6989,7 @@ function TodayPanel({ discovery, ui, monitor }) {
6824
6989
  },
6825
6990
  match.matchId
6826
6991
  ))
6827
- ] }, group.competitionId)) }) : /* @__PURE__ */ jsxs55(Fragment7, { children: [
6992
+ ] }, group.competitionId)) }) : /* @__PURE__ */ jsxs55(Fragment8, { children: [
6828
6993
  /* @__PURE__ */ jsxs55("div", { className: "ss-w-today-sec", children: [
6829
6994
  placement.personal ? ui.yourLeagues : ui.topLeagues,
6830
6995
  !placement.personal && /* @__PURE__ */ jsx61("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
@@ -6904,7 +7069,7 @@ function splitName(full) {
6904
7069
  }
6905
7070
 
6906
7071
  // src/components/GameTileArt.tsx
6907
- import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs56 } from "react/jsx-runtime";
7072
+ import { Fragment as Fragment9, jsx as jsx63, jsxs as jsxs56 } from "react/jsx-runtime";
6908
7073
  function GameTileArt({ gameId }) {
6909
7074
  return /* @__PURE__ */ jsx63("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
6910
7075
  }
@@ -6913,41 +7078,41 @@ var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs56("g", { cla
6913
7078
  /* @__PURE__ */ jsx63("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
6914
7079
  ] });
6915
7080
  var ART = {
6916
- "mystery-tiger": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7081
+ "mystery-tiger": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6917
7082
  head(60, 38, 26, "ss-g-art-fg"),
6918
7083
  /* @__PURE__ */ jsx63("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6919
7084
  ] }),
6920
- "higher-or-lower": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7085
+ "higher-or-lower": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6921
7086
  head(32, 38, 20),
6922
7087
  head(88, 38, 20),
6923
7088
  /* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
6924
7089
  /* @__PURE__ */ jsx63("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
6925
7090
  ] }),
6926
- "guess-the-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7091
+ "guess-the-xi": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6927
7092
  /* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6928
7093
  [[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ jsx63("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
6929
7094
  ] }),
6930
- "daily-quiz": /* @__PURE__ */ jsx63(Fragment8, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx63("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
6931
- "career-path": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7095
+ "daily-quiz": /* @__PURE__ */ jsx63(Fragment9, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx63("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
7096
+ "career-path": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6932
7097
  /* @__PURE__ */ jsx63("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6933
7098
  /* @__PURE__ */ jsx63("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
6934
7099
  /* @__PURE__ */ jsx63("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
6935
7100
  /* @__PURE__ */ jsx63("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
6936
7101
  /* @__PURE__ */ jsx63("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
6937
7102
  ] }),
6938
- "beat-the-grid": /* @__PURE__ */ jsx63(Fragment8, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx63("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
6939
- "matchday-predictor": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7103
+ "beat-the-grid": /* @__PURE__ */ jsx63(Fragment9, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx63("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
7104
+ "matchday-predictor": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6940
7105
  /* @__PURE__ */ jsx63("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
6941
7106
  /* @__PURE__ */ jsx63("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
6942
7107
  /* @__PURE__ */ jsx63("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
6943
7108
  /* @__PURE__ */ jsx63("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
6944
7109
  ] }),
6945
- "starting-xi": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7110
+ "starting-xi": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6946
7111
  /* @__PURE__ */ jsx63("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
6947
7112
  [[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ jsx63("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
6948
7113
  ] }),
6949
- "stat-ladder": /* @__PURE__ */ jsx63(Fragment8, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx63("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
6950
- "fan-motm": /* @__PURE__ */ jsxs56(Fragment8, { children: [
7114
+ "stat-ladder": /* @__PURE__ */ jsx63(Fragment9, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx63("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
7115
+ "fan-motm": /* @__PURE__ */ jsxs56(Fragment9, { children: [
6951
7116
  /* @__PURE__ */ jsx63("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
6952
7117
  head(60, 40, 18),
6953
7118
  /* @__PURE__ */ jsx63("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
@@ -6971,7 +7136,7 @@ function StatStack({ value, label }) {
6971
7136
  }
6972
7137
 
6973
7138
  // src/components/GameTile.tsx
6974
- import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
7139
+ import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
6975
7140
  function tileStatus(game, ui) {
6976
7141
  switch (game.status) {
6977
7142
  case "locked":
@@ -6995,7 +7160,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
6995
7160
  const status = tileStatus(game, ui);
6996
7161
  const disabled = DISABLED.has(game.status);
6997
7162
  const title = gameTitle(game, ui.games.titles);
6998
- const body = variant === "hero" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
7163
+ const body = variant === "hero" ? /* @__PURE__ */ jsxs58(Fragment10, { children: [
6999
7164
  /* @__PURE__ */ jsxs58("span", { className: "ss-g-hero-text", children: [
7000
7165
  /* @__PURE__ */ jsx65("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
7001
7166
  status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday }),
@@ -7007,7 +7172,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
7007
7172
  ] })
7008
7173
  ] }),
7009
7174
  /* @__PURE__ */ jsx65("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) })
7010
- ] }) : variant === "wide" ? /* @__PURE__ */ jsxs58(Fragment9, { children: [
7175
+ ] }) : variant === "wide" ? /* @__PURE__ */ jsxs58(Fragment10, { children: [
7011
7176
  /* @__PURE__ */ jsx65("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
7012
7177
  /* @__PURE__ */ jsxs58("span", { className: "ss-g-wide-text", children: [
7013
7178
  /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
@@ -7015,7 +7180,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
7015
7180
  status.tone === "new" && /* @__PURE__ */ jsx65(Chip, { variant: "badge", children: ui.games.newToday })
7016
7181
  ] }),
7017
7182
  /* @__PURE__ */ jsx65("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx65(IconChevronLeft, { size: 18 }) })
7018
- ] }) : /* @__PURE__ */ jsxs58(Fragment9, { children: [
7183
+ ] }) : /* @__PURE__ */ jsxs58(Fragment10, { children: [
7019
7184
  /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx65(GameTileArt, { gameId: game.gameId }) }),
7020
7185
  /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-title", children: title }),
7021
7186
  /* @__PURE__ */ jsx65("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
@@ -7026,7 +7191,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
7026
7191
  }
7027
7192
 
7028
7193
  // src/components/GamesHub.tsx
7029
- import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
7194
+ import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
7030
7195
  var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
7031
7196
  var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
7032
7197
  function pickHeroGame(games) {
@@ -7057,7 +7222,7 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
7057
7222
  /* @__PURE__ */ jsxs59("div", { className: "ss-g-stat", children: [
7058
7223
  /* @__PURE__ */ jsx66("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
7059
7224
  /* @__PURE__ */ jsxs59("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
7060
- myWeeklyRow ? /* @__PURE__ */ jsxs59(Fragment10, { children: [
7225
+ myWeeklyRow ? /* @__PURE__ */ jsxs59(Fragment11, { children: [
7061
7226
  /* @__PURE__ */ jsx66(IconFlame, {}),
7062
7227
  myWeeklyRow.currentStreak
7063
7228
  ] }) : dash,
@@ -7447,11 +7612,11 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
7447
7612
  }
7448
7613
 
7449
7614
  // src/components/games/ui/AnswerTray.tsx
7450
- import { Fragment as Fragment11, jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
7615
+ import { Fragment as Fragment12, jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
7451
7616
  function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
7452
7617
  const needle = query.trim().toLowerCase();
7453
7618
  const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
7454
- return /* @__PURE__ */ jsxs62(Fragment11, { children: [
7619
+ return /* @__PURE__ */ jsxs62(Fragment12, { children: [
7455
7620
  /* @__PURE__ */ jsx70(
7456
7621
  SearchField,
7457
7622
  {
@@ -7543,7 +7708,7 @@ function PointsLadderRow({ ladder, guessesUsed, ui }) {
7543
7708
  }
7544
7709
 
7545
7710
  // src/components/games/MysteryTigerGame.tsx
7546
- import { Fragment as Fragment12, jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
7711
+ import { Fragment as Fragment13, jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
7547
7712
  function parseClientState(json) {
7548
7713
  if (!json) return null;
7549
7714
  try {
@@ -7691,7 +7856,7 @@ function MysteryTigerGame({
7691
7856
  }
7692
7857
  ),
7693
7858
  !config && /* @__PURE__ */ jsx76("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7694
- config && /* @__PURE__ */ jsxs66(Fragment12, { children: [
7859
+ config && /* @__PURE__ */ jsxs66(Fragment13, { children: [
7695
7860
  /* @__PURE__ */ jsxs66("div", { className: "ss-g-body", children: [
7696
7861
  !isOver && /* @__PURE__ */ jsx76(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
7697
7862
  /* @__PURE__ */ jsxs66("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
@@ -7791,7 +7956,7 @@ function MysteryTigerGame({
7791
7956
  }
7792
7957
 
7793
7958
  // src/components/games/HigherOrLowerGame.tsx
7794
- import { Fragment as Fragment13, jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
7959
+ import { Fragment as Fragment14, jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
7795
7960
  var POINTS_PER_CORRECT = 10;
7796
7961
  function parseClientState2(json) {
7797
7962
  if (!json) return null;
@@ -7851,7 +8016,7 @@ function HigherOrLowerGame({
7851
8016
  }
7852
8017
  ),
7853
8018
  !config && /* @__PURE__ */ jsx77("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
7854
- config && /* @__PURE__ */ jsxs67(Fragment13, { children: [
8019
+ config && /* @__PURE__ */ jsxs67(Fragment14, { children: [
7855
8020
  /* @__PURE__ */ jsxs67("div", { className: "ss-g-body", children: [
7856
8021
  /* @__PURE__ */ jsxs67("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
7857
8022
  /* @__PURE__ */ jsx77("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
@@ -7921,7 +8086,7 @@ function CrestShield({ src, name, size = 28 }) {
7921
8086
  }
7922
8087
 
7923
8088
  // src/components/games/CareerPathGame.tsx
7924
- import { Fragment as Fragment14, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
8089
+ import { Fragment as Fragment15, jsx as jsx79, jsxs as jsxs68 } from "react/jsx-runtime";
7925
8090
  function parseClientState3(json) {
7926
8091
  if (!json) return null;
7927
8092
  try {
@@ -8001,7 +8166,7 @@ function CareerPathGame({
8001
8166
  /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-club", children: spell.clubName }),
8002
8167
  /* @__PURE__ */ jsxs68("span", { className: "ss-g-cp-sub", children: [
8003
8168
  /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-years", children: years }),
8004
- spell.isLoan && /* @__PURE__ */ jsxs68(Fragment14, { children: [
8169
+ spell.isLoan && /* @__PURE__ */ jsxs68(Fragment15, { children: [
8005
8170
  years ? " \xB7 " : "",
8006
8171
  /* @__PURE__ */ jsx79("span", { className: "ss-g-cp-loan", children: s.loan })
8007
8172
  ] })
@@ -8061,7 +8226,7 @@ function OptionList({ label, options, onPick }) {
8061
8226
  }
8062
8227
 
8063
8228
  // src/components/games/BeatTheGridGame.tsx
8064
- import { Fragment as Fragment15, jsx as jsx81, jsxs as jsxs69 } from "react/jsx-runtime";
8229
+ import { Fragment as Fragment16, jsx as jsx81, jsxs as jsxs69 } from "react/jsx-runtime";
8065
8230
  function criterionIconKind(label, key) {
8066
8231
  const l = (key ?? label).toLowerCase();
8067
8232
  if (l.includes("app")) return "calendar";
@@ -8104,7 +8269,7 @@ function HeaderVisual({ label, textKey: iKey, meta }) {
8104
8269
  case "country":
8105
8270
  return /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
8106
8271
  case "position":
8107
- return /* @__PURE__ */ jsx81(Fragment15, {});
8272
+ return /* @__PURE__ */ jsx81(Fragment16, {});
8108
8273
  default:
8109
8274
  return /* @__PURE__ */ jsx81(CriterionIcon, { kind: criterionIconKind(label, iKey) });
8110
8275
  }
@@ -8167,7 +8332,7 @@ function SearchSheet({
8167
8332
  }
8168
8333
  )
8169
8334
  ] }),
8170
- playerPool.length === 0 ? /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
8335
+ playerPool.length === 0 ? /* @__PURE__ */ jsx81("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs69(Fragment16, { children: [
8171
8336
  /* @__PURE__ */ jsx81(
8172
8337
  SearchField,
8173
8338
  {
@@ -8186,7 +8351,7 @@ function SearchSheet({
8186
8351
  label: s.searchLabel(rowLabel, colLabel),
8187
8352
  options: filtered.map((p) => ({
8188
8353
  key: p.id,
8189
- content: /* @__PURE__ */ jsxs69(Fragment15, { children: [
8354
+ content: /* @__PURE__ */ jsxs69(Fragment16, { children: [
8190
8355
  /* @__PURE__ */ jsx81(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
8191
8356
  /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-name", children: p.name }),
8192
8357
  /* @__PURE__ */ jsx81("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx81(IconPlus, { size: 18 }) })
@@ -8276,10 +8441,10 @@ function BeatTheGridGame({
8276
8441
  rows.map((rowLabel, rowIdx) => {
8277
8442
  const rowMeta = config.rowsMeta?.[rowIdx];
8278
8443
  const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
8279
- const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
8444
+ const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs69(Fragment16, { children: [
8280
8445
  /* @__PURE__ */ jsx81(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
8281
8446
  /* @__PURE__ */ jsx81("span", { children: rowLabel })
8282
- ] }) : abbr === rowLabel ? /* @__PURE__ */ jsx81("span", { children: rowLabel }) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
8447
+ ] }) : abbr === rowLabel ? /* @__PURE__ */ jsx81("span", { children: rowLabel }) : /* @__PURE__ */ jsxs69(Fragment16, { children: [
8283
8448
  /* @__PURE__ */ jsx81("span", { "aria-hidden": "true", children: abbr }),
8284
8449
  /* @__PURE__ */ jsx81("span", { className: "ss-g-sr", children: rowLabel })
8285
8450
  ] });
@@ -8300,7 +8465,7 @@ function BeatTheGridGame({
8300
8465
  className: "ss-g-btg-cell",
8301
8466
  disabled: isLocked2 || submitting,
8302
8467
  onClick: () => handleCellClick(rowIdx, colIdx),
8303
- children: filled ? /* @__PURE__ */ jsxs69(Fragment15, { children: [
8468
+ children: filled ? /* @__PURE__ */ jsxs69(Fragment16, { children: [
8304
8469
  /* @__PURE__ */ jsx81(
8305
8470
  "span",
8306
8471
  {
@@ -8367,16 +8532,16 @@ function BeatTheGridGame({
8367
8532
  import { useState as useState42, useId as useId6 } from "react";
8368
8533
 
8369
8534
  // src/components/games/ui/PitchSvg.tsx
8370
- import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
8535
+ import { Fragment as Fragment17, jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
8371
8536
  function PitchSvg({ variant }) {
8372
8537
  return /* @__PURE__ */ jsxs70("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
8373
8538
  /* @__PURE__ */ jsx82("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
8374
- variant === "full" ? /* @__PURE__ */ jsxs70(Fragment16, { children: [
8539
+ variant === "full" ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
8375
8540
  /* @__PURE__ */ jsx82("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
8376
8541
  /* @__PURE__ */ jsx82("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
8377
8542
  /* @__PURE__ */ jsx82("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
8378
8543
  /* @__PURE__ */ jsx82("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
8379
- ] }) : /* @__PURE__ */ jsxs70(Fragment16, { children: [
8544
+ ] }) : /* @__PURE__ */ jsxs70(Fragment17, { children: [
8380
8545
  /* @__PURE__ */ jsx82("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
8381
8546
  /* @__PURE__ */ jsx82("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
8382
8547
  ] })
@@ -8434,7 +8599,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
8434
8599
  }
8435
8600
 
8436
8601
  // src/components/games/GuessTheXiGame.tsx
8437
- import { Fragment as Fragment17, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
8602
+ import { Fragment as Fragment18, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
8438
8603
  var MAX_GUESSES2 = 3;
8439
8604
  function parseClientState5(json) {
8440
8605
  if (!json) return null;
@@ -8496,7 +8661,7 @@ function GuessTheXiGame({
8496
8661
  }
8497
8662
  ),
8498
8663
  !config && /* @__PURE__ */ jsx83("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
8499
- config && /* @__PURE__ */ jsxs71(Fragment17, { children: [
8664
+ config && /* @__PURE__ */ jsxs71(Fragment18, { children: [
8500
8665
  /* @__PURE__ */ jsxs71("div", { className: "ss-g-body", children: [
8501
8666
  !isOver && /* @__PURE__ */ jsx83(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
8502
8667
  rows.length > 0 && /* @__PURE__ */ jsxs71("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
@@ -8545,7 +8710,7 @@ function GuessTheXiGame({
8545
8710
  ] }, g.teamId);
8546
8711
  })
8547
8712
  ] }),
8548
- isOver && /* @__PURE__ */ jsxs71(Fragment17, { children: [
8713
+ isOver && /* @__PURE__ */ jsxs71(Fragment18, { children: [
8549
8714
  /* @__PURE__ */ jsx83(
8550
8715
  ResultCard,
8551
8716
  {
@@ -8571,7 +8736,7 @@ function GuessTheXiGame({
8571
8736
  label: t.optionsLabel,
8572
8737
  options: filtered.map((tm) => ({
8573
8738
  key: tm.teamId,
8574
- content: /* @__PURE__ */ jsxs71(Fragment17, { children: [
8739
+ content: /* @__PURE__ */ jsxs71(Fragment18, { children: [
8575
8740
  /* @__PURE__ */ jsx83(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
8576
8741
  /* @__PURE__ */ jsx83("span", { children: tm.teamName })
8577
8742
  ] })
@@ -8597,7 +8762,7 @@ function GuessTheXiGame({
8597
8762
 
8598
8763
  // src/components/games/DailyQuizGame.tsx
8599
8764
  import { useState as useState43 } from "react";
8600
- import { Fragment as Fragment18, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
8765
+ import { Fragment as Fragment19, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
8601
8766
  function parseClientState6(json) {
8602
8767
  if (!json) return null;
8603
8768
  try {
@@ -8716,7 +8881,7 @@ function DailyQuizGame({
8716
8881
  return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
8717
8882
  /* @__PURE__ */ jsx84(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
8718
8883
  /* @__PURE__ */ jsx84(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
8719
- /* @__PURE__ */ jsx84("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs72(Fragment18, { children: [
8884
+ /* @__PURE__ */ jsx84("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs72(Fragment19, { children: [
8720
8885
  /* @__PURE__ */ jsx84("h3", { className: "ss-g-dq-stem", children: current.stem }),
8721
8886
  /* @__PURE__ */ jsx84("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
8722
8887
  const selected = optIdx === selectedIdx;
@@ -9017,7 +9182,7 @@ function MatchdayPredictorGame({
9017
9182
 
9018
9183
  // src/components/games/StartingXiGame.tsx
9019
9184
  import { useId as useId8, useState as useState45 } from "react";
9020
- import { Fragment as Fragment19, jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
9185
+ import { Fragment as Fragment20, jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
9021
9186
  var POINTS_PER_STARTER = 8;
9022
9187
  var XI_SIZE = 11;
9023
9188
  var DEFAULT_FORMATION = "4-3-3";
@@ -9166,11 +9331,11 @@ function StartingXiGame({
9166
9331
  })
9167
9332
  ] }),
9168
9333
  /* @__PURE__ */ jsxs74("div", { className: "ss-g-xi-picker", children: [
9169
- /* @__PURE__ */ jsx86("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs74(Fragment19, { children: [
9334
+ /* @__PURE__ */ jsx86("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs74(Fragment20, { children: [
9170
9335
  /* @__PURE__ */ jsx86(Chip, { variant: "badge", children: activeSlot.label }),
9171
9336
  /* @__PURE__ */ jsx86("strong", { children: t.pickFor(activeSlot.label) })
9172
9337
  ] }) : /* @__PURE__ */ jsx86("strong", { children: t.allPicked }) }),
9173
- activeSlot && /* @__PURE__ */ jsxs74(Fragment19, { children: [
9338
+ activeSlot && /* @__PURE__ */ jsxs74(Fragment20, { children: [
9174
9339
  /* @__PURE__ */ jsx86(
9175
9340
  SearchField,
9176
9341
  {
@@ -9668,7 +9833,7 @@ function LeaderboardEmpty({
9668
9833
  }
9669
9834
 
9670
9835
  // src/components/Leaderboard.tsx
9671
- import { Fragment as Fragment20, jsx as jsx92, jsxs as jsxs79 } from "react/jsx-runtime";
9836
+ import { Fragment as Fragment21, jsx as jsx92, jsxs as jsxs79 } from "react/jsx-runtime";
9672
9837
  function Leaderboard({
9673
9838
  data,
9674
9839
  ui,
@@ -9710,7 +9875,7 @@ function Leaderboard({
9710
9875
  onPlay,
9711
9876
  ui
9712
9877
  }
9713
- ) : /* @__PURE__ */ jsxs79(Fragment20, { children: [
9878
+ ) : /* @__PURE__ */ jsxs79(Fragment21, { children: [
9714
9879
  /* @__PURE__ */ jsx92("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx92(
9715
9880
  LeaderboardWeeklyRow,
9716
9881
  {
@@ -9967,66 +10132,107 @@ function footLabel(ui, foot) {
9967
10132
  return v;
9968
10133
  }
9969
10134
  }
10135
+ var GROUP_CODE = { Goalkeeper: "GK", Defender: "DF", Midfielder: "MF", Attacker: "FW" };
10136
+ function positionShort(code, positionName) {
10137
+ const c = code?.trim().toUpperCase() ?? "";
10138
+ if (c !== "") return c === "CF" || c === "SS" ? "ST" : c;
10139
+ return positionName !== null && GROUP_CODE[positionName] || "\u2013";
10140
+ }
10141
+ function statsEyebrow(ui, season, competition, matches) {
10142
+ if (season === null || competition === null || matches === null || matches <= 0) return null;
10143
+ return ui.squadStatsEyebrow(season, competition, matches);
10144
+ }
9970
10145
 
9971
10146
  // src/components/SquadStats.tsx
9972
10147
  import { jsx as jsx97, jsxs as jsxs83 } from "react/jsx-runtime";
10148
+ function leader(stats, pick) {
10149
+ let best = null;
10150
+ for (const p of stats) {
10151
+ if (pick(p) <= 0) continue;
10152
+ if (best === null || pick(p) > pick(best) || pick(p) === pick(best) && p.minutesPlayed < best.minutesPlayed) best = p;
10153
+ }
10154
+ return best;
10155
+ }
10156
+ function ratingClass(rating) {
10157
+ if (rating === null) return "ss-w-sq-c36 ss-w-sq-rtg-none";
10158
+ return Number(rating.toFixed(1)) >= 7 ? "ss-w-sq-c36 ss-w-sq-rtg ss-w-pos-ink" : "ss-w-sq-c36 ss-w-sq-rtg";
10159
+ }
9973
10160
  function SquadStats({ stats, loading, ui, onSelectPlayer }) {
9974
10161
  if (stats === null && loading) return /* @__PURE__ */ jsx97("div", { className: "ss-w-mon-list" });
9975
10162
  if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx97("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
9976
- return /* @__PURE__ */ jsxs83("div", { className: "ss-w-mon-list", children: [
9977
- /* @__PURE__ */ jsxs83("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
9978
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-num" }),
9979
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-name" }),
9980
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: ui.statColApps }),
9981
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: ui.statColGoals }),
9982
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: ui.statColAssists }),
9983
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: ui.statColRating })
9984
- ] }),
9985
- groupByPosition(stats).map((group, gi) => /* @__PURE__ */ jsxs83("div", { children: [
9986
- group.positionName && /* @__PURE__ */ jsx97("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
9987
- group.items.map((p) => /* @__PURE__ */ jsxs83("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
9988
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
9989
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName }),
9990
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: p.appearances }),
9991
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: p.goals }),
9992
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: p.assists }),
9993
- /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-col", children: p.averageRating === null ? "\u2014" : p.averageRating.toFixed(1) })
10163
+ const scorer = leader(stats, (p) => p.goals);
10164
+ const assister = leader(stats, (p) => p.assists);
10165
+ const footer = [
10166
+ scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
10167
+ assister && ui.squadTopAssists(assister.playerName, assister.assists)
10168
+ ].filter((part) => !!part).join(" \xB7 ");
10169
+ return /* @__PURE__ */ jsxs83("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
10170
+ /* @__PURE__ */ jsxs83("div", { className: "ss-w-sq-card", children: [
10171
+ /* @__PURE__ */ jsxs83("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
10172
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-name" }),
10173
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
10174
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
10175
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
10176
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
10177
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
10178
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
10179
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
10180
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
10181
+ ] }),
10182
+ stats.map((p) => /* @__PURE__ */ jsxs83("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
10183
+ /* @__PURE__ */ jsxs83("span", { className: "ss-w-sq-player", children: [
10184
+ p.jerseyNumber !== null && /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
10185
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
10186
+ ] }),
10187
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-pos", children: positionShort(p.positionCode, p.positionName) }),
10188
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c30", children: p.appearances }),
10189
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
10190
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20", children: p.goals }),
10191
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20", children: p.assists }),
10192
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
10193
+ /* @__PURE__ */ jsx97("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
10194
+ /* @__PURE__ */ jsx97("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : p.averageRating.toFixed(1) })
9994
10195
  ] }, p.playerId))
9995
- ] }, `${gi}-${group.positionName ?? "none"}`))
10196
+ ] }),
10197
+ footer !== "" && /* @__PURE__ */ jsx97("div", { className: "ss-w-sq-foot", children: footer })
9996
10198
  ] });
9997
10199
  }
9998
10200
 
9999
10201
  // src/components/Squad.tsx
10000
- import { Fragment as Fragment21, jsx as jsx98, jsxs as jsxs84 } from "react/jsx-runtime";
10001
- function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, onSelectPlayer }) {
10002
- const toggle = /* @__PURE__ */ jsx98("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx98(
10003
- "button",
10004
- {
10005
- type: "button",
10006
- className: "ss-w-sq-seg-btn",
10007
- "aria-pressed": view === v,
10008
- onClick: () => {
10009
- if (view !== v) onToggleView();
10202
+ import { Fragment as Fragment22, jsx as jsx98, jsxs as jsxs84 } from "react/jsx-runtime";
10203
+ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
10204
+ const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
10205
+ const toggle = /* @__PURE__ */ jsxs84("div", { className: "ss-w-sq-bar", children: [
10206
+ eyebrow !== null && /* @__PURE__ */ jsx98("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
10207
+ /* @__PURE__ */ jsx98("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx98(
10208
+ "button",
10209
+ {
10210
+ type: "button",
10211
+ className: "ss-w-sq-seg-btn",
10212
+ "aria-pressed": view === v,
10213
+ onClick: () => {
10214
+ if (view !== v) onToggleView();
10215
+ },
10216
+ children: v === "roster" ? ui.squadViewRoster : ui.squadViewStats
10010
10217
  },
10011
- children: v === "roster" ? ui.squadViewRoster : ui.squadViewStats
10012
- },
10013
- v
10014
- )) });
10218
+ v
10219
+ )) })
10220
+ ] });
10015
10221
  if (view === "stats") {
10016
- return /* @__PURE__ */ jsxs84(Fragment21, { children: [
10222
+ return /* @__PURE__ */ jsxs84(Fragment22, { children: [
10017
10223
  toggle,
10018
10224
  /* @__PURE__ */ jsx98(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
10019
10225
  ] });
10020
10226
  }
10021
- if (squad === null && loading) return /* @__PURE__ */ jsxs84(Fragment21, { children: [
10227
+ if (squad === null && loading) return /* @__PURE__ */ jsxs84(Fragment22, { children: [
10022
10228
  toggle,
10023
10229
  /* @__PURE__ */ jsx98("div", { className: "ss-w-mon-list" })
10024
10230
  ] });
10025
- if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs84(Fragment21, { children: [
10231
+ if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs84(Fragment22, { children: [
10026
10232
  toggle,
10027
10233
  /* @__PURE__ */ jsx98("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
10028
10234
  ] });
10029
- return /* @__PURE__ */ jsxs84(Fragment21, { children: [
10235
+ return /* @__PURE__ */ jsxs84(Fragment22, { children: [
10030
10236
  toggle,
10031
10237
  /* @__PURE__ */ jsx98("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs84("div", { children: [
10032
10238
  group.positionName && /* @__PURE__ */ jsx98("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
@@ -10038,8 +10244,125 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, on
10038
10244
  ] });
10039
10245
  }
10040
10246
 
10247
+ // src/components/PlayerPhoto.tsx
10248
+ import { useState as useState50 } from "react";
10249
+ import { jsx as jsx99 } from "react/jsx-runtime";
10250
+ function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
10251
+ const [failed, setFailed] = useState50(false);
10252
+ const box = { width: size, height: size };
10253
+ if (photoUrl && !failed) {
10254
+ return /* @__PURE__ */ jsx99("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
10255
+ }
10256
+ return /* @__PURE__ */ jsx99("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
10257
+ }
10258
+
10259
+ // src/components/MiniPitch.tsx
10260
+ import { jsx as jsx100 } from "react/jsx-runtime";
10261
+ var SPOT = {
10262
+ GK: [50, 90],
10263
+ CB: [50, 75],
10264
+ LB: [18, 70],
10265
+ RB: [82, 70],
10266
+ LWB: [15, 58],
10267
+ RWB: [85, 58],
10268
+ DM: [50, 60],
10269
+ CM: [50, 48],
10270
+ LM: [18, 45],
10271
+ RM: [82, 45],
10272
+ AM: [50, 32],
10273
+ LW: [20, 25],
10274
+ RW: [80, 25],
10275
+ CF: [50, 14],
10276
+ SS: [50, 14],
10277
+ ST: [50, 14]
10278
+ };
10279
+ function MiniPitch({ positionCode }) {
10280
+ const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
10281
+ if (spot === void 0) return null;
10282
+ return /* @__PURE__ */ jsx100("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx100("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
10283
+ }
10284
+
10285
+ // src/components/PerformanceBars.tsx
10286
+ import { useState as useState51 } from "react";
10287
+ import { jsx as jsx101, jsxs as jsxs85 } from "react/jsx-runtime";
10288
+ var GROUPS = ["shooting", "passing", "possession", "defending"];
10289
+ function finite3(v) {
10290
+ return typeof v === "number" && Number.isFinite(v) ? v : null;
10291
+ }
10292
+ function valueOf(m, mode) {
10293
+ return finite3(mode === "total" ? m.total : m.per90);
10294
+ }
10295
+ function rankOf(m, mode) {
10296
+ const r = finite3(mode === "total" ? m.totalRank : m.per90Rank);
10297
+ return r === null ? null : Math.min(100, Math.max(0, Math.round(r)));
10298
+ }
10299
+ function format(m, v, mode) {
10300
+ if (m.isPercent) return `${v.toFixed(1)}%`;
10301
+ if (mode === "per90" || m.key === "xg") return v.toFixed(2);
10302
+ return String(Math.round(v));
10303
+ }
10304
+ function band(rank) {
10305
+ if (rank >= 67) return "pos";
10306
+ if (rank >= 34) return "warn";
10307
+ return "neg";
10308
+ }
10309
+ function groupTitle(ui, g) {
10310
+ switch (g) {
10311
+ case "shooting":
10312
+ return ui.perfGroupShooting;
10313
+ case "passing":
10314
+ return ui.perfGroupPassing;
10315
+ case "possession":
10316
+ return ui.perfGroupPossession;
10317
+ case "defending":
10318
+ return ui.perfGroupDefending;
10319
+ }
10320
+ }
10321
+ function unrankedLine(ui, reason) {
10322
+ switch (reason) {
10323
+ case "cohort":
10324
+ return ui.perfUnrankedCohort;
10325
+ case "noLeague":
10326
+ return ui.perfUnrankedNoLeague;
10327
+ default:
10328
+ return ui.perfUnranked;
10329
+ }
10330
+ }
10331
+ function PerformanceBars({ performance, competitionName, strings }) {
10332
+ const [mode, setMode] = useState51("total");
10333
+ const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
10334
+ if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
10335
+ const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
10336
+ const cards = GROUPS.map((g) => {
10337
+ const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
10338
+ if (rows.length === 0) return null;
10339
+ return /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
10340
+ /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
10341
+ rows.map((m) => {
10342
+ const v = valueOf(m, mode);
10343
+ const rank = performance.ranked ? rankOf(m, mode) : null;
10344
+ return /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-bar-row", children: [
10345
+ /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-bar-top", children: [
10346
+ /* @__PURE__ */ jsx101("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
10347
+ /* @__PURE__ */ jsx101("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode) })
10348
+ ] }),
10349
+ rank !== null && /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx101("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank)}`, style: { width: `${rank}%` } }) })
10350
+ ] }, m.key);
10351
+ })
10352
+ ] }, g);
10353
+ });
10354
+ return /* @__PURE__ */ jsxs85("div", { children: [
10355
+ /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-perf-head", children: [
10356
+ /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
10357
+ /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
10358
+ ] }),
10359
+ subtitle !== null && /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
10360
+ /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-perf-cards", children: cards })
10361
+ ] });
10362
+ }
10363
+
10041
10364
  // src/components/PlayerDetail.tsx
10042
- import { Fragment as Fragment22, jsx as jsx99, jsxs as jsxs85 } from "react/jsx-runtime";
10365
+ import { Fragment as Fragment23, jsx as jsx102, jsxs as jsxs86 } from "react/jsx-runtime";
10043
10366
  var DASH = "\u2014";
10044
10367
  function ageFrom(dobMs) {
10045
10368
  if (dobMs === null) return DASH;
@@ -10050,55 +10373,128 @@ function ageFrom(dobMs) {
10050
10373
  if (beforeBirthday) age--;
10051
10374
  return String(age);
10052
10375
  }
10053
- function Field({ label, value }) {
10054
- return /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-field", children: [
10055
- /* @__PURE__ */ jsx99("span", { className: "ss-w-pd-label", children: label }),
10056
- /* @__PURE__ */ jsx99("span", { className: "ss-w-pd-value", children: value })
10376
+ function validMs(ms) {
10377
+ return typeof ms === "number" && Number.isFinite(ms) && ms > 0 ? ms : null;
10378
+ }
10379
+ function ratingTone(rounded) {
10380
+ if (rounded >= 7) return "pos";
10381
+ if (rounded >= 6) return "warn";
10382
+ return "neg";
10383
+ }
10384
+ function Bio({ label, value }) {
10385
+ return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-bio-item", children: [
10386
+ /* @__PURE__ */ jsx102("span", { className: "ss-w-pd-faint", children: label }),
10387
+ " ",
10388
+ /* @__PURE__ */ jsx102("span", { children: value })
10389
+ ] });
10390
+ }
10391
+ function Tile({ label, value, pos }) {
10392
+ return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-tile", children: [
10393
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-tile-label", children: label }),
10394
+ /* @__PURE__ */ jsx102("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
10395
+ ] });
10396
+ }
10397
+ function AvailabilityCard({ ui, next, availability }) {
10398
+ let note = null;
10399
+ let pill = null;
10400
+ if (availability !== null) {
10401
+ if (availability.status === "available") {
10402
+ note = ui.availabilityNoConcerns;
10403
+ pill = { text: ui.availabilityAvailable, tone: "pos" };
10404
+ } else {
10405
+ const back = validMs(availability.expectedReturnUnixMs);
10406
+ note = [availability.detail?.trim() || null, back === null ? null : ui.availabilityBack(back)].filter(Boolean).join(" \xB7 ") || null;
10407
+ pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
10408
+ }
10409
+ }
10410
+ return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
10411
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-avail-text", children: [
10412
+ next !== null && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
10413
+ note !== null && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-avail-note", children: note })
10414
+ ] }),
10415
+ pill !== null && /* @__PURE__ */ jsx102("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
10416
+ ] });
10417
+ }
10418
+ function MatchRow({ ui, row }) {
10419
+ const date = validMs(row.kickoffUnixMs);
10420
+ const extras = [
10421
+ row.goals > 0 ? `${row.goals}${ui.statHeadGoals}` : null,
10422
+ row.assists > 0 ? `${row.assists}${ui.statHeadAssists}` : null,
10423
+ row.yellowCards > 0 ? `${row.yellowCards}${ui.statHeadYellow}` : null,
10424
+ row.sentOff ? ui.statHeadRed : null
10425
+ ].filter((x) => x !== null);
10426
+ const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
10427
+ const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
10428
+ const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
10429
+ return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-match", children: [
10430
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
10431
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-match-main", children: [
10432
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
10433
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-match-sub", children: sub })
10434
+ ] }),
10435
+ /* @__PURE__ */ jsx102("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
10436
+ rating === null ? /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx102("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: rating.toFixed(1) })
10057
10437
  ] });
10058
10438
  }
10059
10439
  function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
10060
- const back = /* @__PURE__ */ jsxs85("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
10061
- /* @__PURE__ */ jsx99("span", { "aria-hidden": "true", children: "\u2039" }),
10062
- " ",
10440
+ const back = /* @__PURE__ */ jsxs86("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
10441
+ /* @__PURE__ */ jsx102("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx102("path", { d: "M15 18l-6-6 6-6" }) }),
10063
10442
  ui.clubPlayerBack
10064
10443
  ] });
10065
10444
  if (detail === null) {
10066
- return loading ? /* @__PURE__ */ jsxs85(Fragment22, { children: [
10067
- /* @__PURE__ */ jsx99("div", { className: "ss-w-pd-bar", children: back }),
10068
- /* @__PURE__ */ jsx99("div", { className: "ss-w-mon-list" })
10069
- ] }) : /* @__PURE__ */ jsxs85(Fragment22, { children: [
10070
- /* @__PURE__ */ jsx99("div", { className: "ss-w-pd-bar", children: back }),
10071
- /* @__PURE__ */ jsx99("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
10445
+ return loading ? /* @__PURE__ */ jsxs86(Fragment23, { children: [
10446
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-bar", children: back }),
10447
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-mon-list" })
10448
+ ] }) : /* @__PURE__ */ jsxs86(Fragment23, { children: [
10449
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-bar", children: back }),
10450
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
10072
10451
  ] });
10073
10452
  }
10074
10453
  const s = detail.seasonStats;
10075
- const opt = (v, digits) => v === null ? DASH : digits === void 0 ? String(v) : v.toFixed(digits);
10076
- return /* @__PURE__ */ jsxs85(Fragment22, { children: [
10077
- /* @__PURE__ */ jsx99("div", { className: "ss-w-pd-bar", children: back }),
10078
- /* @__PURE__ */ jsxs85("div", { className: "ss-w-mon-list", children: [
10079
- /* @__PURE__ */ jsxs85("div", { children: [
10080
- /* @__PURE__ */ jsx99("div", { className: "ss-w-pd-name", children: detail.playerName }),
10081
- /* @__PURE__ */ jsx99("div", { className: "ss-w-pd-sub", children: [detail.jerseyNumber === null ? null : `#${detail.jerseyNumber}`, positionLabel(ui, detail.positionName)].filter(Boolean).join(" \xB7 ") })
10082
- ] }),
10083
- /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-grid ss-w-pd-bio", children: [
10084
- /* @__PURE__ */ jsx99(Field, { label: ui.detailNationality, value: detail.nationality ?? DASH }),
10085
- /* @__PURE__ */ jsx99(Field, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
10086
- /* @__PURE__ */ jsx99(Field, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
10087
- /* @__PURE__ */ jsx99(Field, { label: ui.detailFoot, value: footLabel(ui, detail.foot) ?? DASH })
10454
+ const foot = footLabel(ui, detail.foot);
10455
+ const position = positionLabel(ui, detail.positionName);
10456
+ const subLine = [detail.teamName?.trim() || null, position].filter(Boolean).join(" \xB7 ");
10457
+ const competition = detail.competitionName?.trim() || null;
10458
+ const eyebrow = seasonName === null ? null : competition === null ? ui.detailSeason.replace("{season}", seasonName) : `${seasonName} ${competition}`;
10459
+ const rating = typeof s.averageRating === "number" && Number.isFinite(s.averageRating) ? s.averageRating : null;
10460
+ const next = detail.nextFixture ?? null;
10461
+ const availability = detail.availability ?? null;
10462
+ const log = detail.matchLog ?? [];
10463
+ return /* @__PURE__ */ jsxs86(Fragment23, { children: [
10464
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-bar", children: back }),
10465
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
10466
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
10467
+ /* @__PURE__ */ jsx102(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
10468
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-profile-main", children: [
10469
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-name", children: detail.playerName }),
10470
+ subLine !== "" && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-sub", children: subLine }),
10471
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-bio", children: [
10472
+ /* @__PURE__ */ jsx102(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
10473
+ /* @__PURE__ */ jsx102(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
10474
+ foot !== null && /* @__PURE__ */ jsx102(Bio, { label: ui.detailFoot, value: foot }),
10475
+ /* @__PURE__ */ jsx102(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
10476
+ ] })
10477
+ ] }),
10478
+ /* @__PURE__ */ jsx102(MiniPitch, { positionCode: detail.positionCode })
10088
10479
  ] }),
10089
- /* @__PURE__ */ jsxs85("div", { children: [
10090
- seasonName !== null && /* @__PURE__ */ jsx99("div", { className: "ss-w-club-eyebrow", children: ui.detailSeason.replace("{season}", seasonName) }),
10091
- /* @__PURE__ */ jsxs85("div", { className: "ss-w-pd-grid", children: [
10092
- /* @__PURE__ */ jsx99(Field, { label: ui.statColApps, value: String(s.appearances) }),
10093
- /* @__PURE__ */ jsx99(Field, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
10094
- /* @__PURE__ */ jsx99(Field, { label: ui.statColGoals, value: String(s.goals) }),
10095
- /* @__PURE__ */ jsx99(Field, { label: ui.statColAssists, value: String(s.assists) }),
10096
- /* @__PURE__ */ jsx99(Field, { label: ui.statColYellow, value: String(s.yellowCards) }),
10097
- /* @__PURE__ */ jsx99(Field, { label: ui.statColRed, value: String(s.redCards) }),
10098
- /* @__PURE__ */ jsx99(Field, { label: ui.statColRating, value: opt(s.averageRating, 1) }),
10099
- /* @__PURE__ */ jsx99(Field, { label: ui.statColXg, value: opt(s.expectedGoals, 2) }),
10100
- /* @__PURE__ */ jsx99(Field, { label: ui.statColShots, value: opt(s.totalShots) })
10480
+ (next !== null || availability !== null) && /* @__PURE__ */ jsx102(AvailabilityCard, { ui, next, availability }),
10481
+ /* @__PURE__ */ jsxs86("div", { children: [
10482
+ eyebrow !== null && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
10483
+ /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-tiles", children: [
10484
+ /* @__PURE__ */ jsx102(Tile, { label: ui.statColGoals, value: String(s.goals) }),
10485
+ /* @__PURE__ */ jsx102(Tile, { label: ui.statColAssists, value: String(s.assists) }),
10486
+ typeof s.starts === "number" && /* @__PURE__ */ jsx102(Tile, { label: ui.detailStarted, value: String(s.starts) }),
10487
+ /* @__PURE__ */ jsx102(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
10488
+ /* @__PURE__ */ jsx102(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
10489
+ rating !== null && /* @__PURE__ */ jsx102(Tile, { label: ui.statColRating, value: rating.toFixed(2), pos: Math.round(rating * 100) / 100 >= 7 }),
10490
+ /* @__PURE__ */ jsx102(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
10491
+ /* @__PURE__ */ jsx102(Tile, { label: ui.detailReds, value: String(s.redCards) })
10101
10492
  ] })
10493
+ ] }),
10494
+ detail.performance != null && /* @__PURE__ */ jsx102(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
10495
+ log.length > 0 && /* @__PURE__ */ jsxs86("div", { children: [
10496
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
10497
+ /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx102(MatchRow, { ui, row }, row.matchId)) })
10102
10498
  ] })
10103
10499
  ] })
10104
10500
  ] });
@@ -10106,12 +10502,12 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
10106
10502
 
10107
10503
  // src/components/PresetSpeedDial.tsx
10108
10504
  import { useId as useId10 } from "react";
10109
- import { jsx as jsx100, jsxs as jsxs86 } from "react/jsx-runtime";
10505
+ import { jsx as jsx103, jsxs as jsxs87 } from "react/jsx-runtime";
10110
10506
  function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
10111
10507
  const pillsId = useId10();
10112
10508
  const tabIndex = expanded ? 0 : -1;
10113
- return /* @__PURE__ */ jsxs86("div", { ref: rootRef, className: "ss-w-dial", children: [
10114
- /* @__PURE__ */ jsxs86(
10509
+ return /* @__PURE__ */ jsxs87("div", { ref: rootRef, className: "ss-w-dial", children: [
10510
+ /* @__PURE__ */ jsxs87(
10115
10511
  "button",
10116
10512
  {
10117
10513
  ref: buttonRef,
@@ -10122,28 +10518,28 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
10122
10518
  "aria-label": strings.dialName,
10123
10519
  onClick: onToggle,
10124
10520
  children: [
10125
- /* @__PURE__ */ jsx100("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ jsx100(SlidersIcon, {}) }),
10126
- /* @__PURE__ */ jsx100("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ jsx100(CloseIcon, {}) }),
10127
- showDot && !expanded ? /* @__PURE__ */ jsx100("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
10521
+ /* @__PURE__ */ jsx103("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ jsx103(SlidersIcon, {}) }),
10522
+ /* @__PURE__ */ jsx103("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ jsx103(CloseIcon, {}) }),
10523
+ showDot && !expanded ? /* @__PURE__ */ jsx103("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
10128
10524
  ]
10129
10525
  }
10130
10526
  ),
10131
- /* @__PURE__ */ jsxs86("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
10132
- /* @__PURE__ */ jsxs86("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
10133
- /* @__PURE__ */ jsx100(SlidersIcon, {}),
10134
- /* @__PURE__ */ jsx100("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
10527
+ /* @__PURE__ */ jsxs87("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
10528
+ /* @__PURE__ */ jsxs87("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
10529
+ /* @__PURE__ */ jsx103(SlidersIcon, {}),
10530
+ /* @__PURE__ */ jsx103("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
10135
10531
  ] }),
10136
- /* @__PURE__ */ jsxs86("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
10137
- /* @__PURE__ */ jsx100(ComboIcon, {}),
10138
- /* @__PURE__ */ jsx100("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
10532
+ /* @__PURE__ */ jsxs87("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
10533
+ /* @__PURE__ */ jsx103(ComboIcon, {}),
10534
+ /* @__PURE__ */ jsx103("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
10139
10535
  ] })
10140
10536
  ] })
10141
10537
  ] });
10142
10538
  }
10143
10539
 
10144
10540
  // src/components/PresetTools.tsx
10145
- import { Fragment as Fragment23, useEffect as useEffect31, useId as useId11, useRef as useRef28, useState as useState50 } from "react";
10146
- import { Fragment as Fragment24, jsx as jsx101, jsxs as jsxs87 } from "react/jsx-runtime";
10541
+ import { Fragment as Fragment24, useEffect as useEffect31, useId as useId11, useRef as useRef28, useState as useState52 } from "react";
10542
+ import { Fragment as Fragment25, jsx as jsx104, jsxs as jsxs88 } from "react/jsx-runtime";
10147
10543
  var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
10148
10544
  function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
10149
10545
  const dialogRef = useRef28(null);
@@ -10181,79 +10577,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
10181
10577
  first.focus();
10182
10578
  }
10183
10579
  };
10184
- return /* @__PURE__ */ jsx101("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs87("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
10185
- /* @__PURE__ */ jsxs87("div", { className: "ss-w-tool-head", children: [
10186
- /* @__PURE__ */ jsx101("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
10187
- /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx101(CloseIcon, {}) })
10580
+ return /* @__PURE__ */ jsx104("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs88("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
10581
+ /* @__PURE__ */ jsxs88("div", { className: "ss-w-tool-head", children: [
10582
+ /* @__PURE__ */ jsx104("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
10583
+ /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx104(CloseIcon, {}) })
10188
10584
  ] }),
10189
- /* @__PURE__ */ jsx101("div", { className: "ss-w-tool-body", children }),
10190
- footer ? /* @__PURE__ */ jsx101("div", { className: "ss-w-tool-foot", children: footer }) : null
10585
+ /* @__PURE__ */ jsx104("div", { className: "ss-w-tool-body", children }),
10586
+ footer ? /* @__PURE__ */ jsx104("div", { className: "ss-w-tool-foot", children: footer }) : null
10191
10587
  ] }) });
10192
10588
  }
10193
10589
  function fillTemplate(template, slots) {
10194
10590
  return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
10195
10591
  const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
10196
- return /* @__PURE__ */ jsx101(Fragment23, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
10592
+ return /* @__PURE__ */ jsx104(Fragment24, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
10197
10593
  });
10198
10594
  }
10199
10595
  function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
10200
10596
  const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
10201
- return /* @__PURE__ */ jsxs87("span", { className: "ss-w-tool-num", children: [
10202
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
10203
- /* @__PURE__ */ jsx101("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
10597
+ return /* @__PURE__ */ jsxs88("span", { className: "ss-w-tool-num", children: [
10598
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
10599
+ /* @__PURE__ */ jsx104("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
10204
10600
  const c = choices2[Number(e.target.value)];
10205
10601
  if (c) onChoose(c.value);
10206
- }, children: choices2.map((c, i) => /* @__PURE__ */ jsx101("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
10602
+ }, children: choices2.map((c, i) => /* @__PURE__ */ jsx104("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
10207
10603
  ] });
10208
10604
  }
10209
10605
  function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
10210
10606
  const sizeText = sizeLabels[currentIdx] ?? "";
10211
- return /* @__PURE__ */ jsxs87("span", { className: "ss-w-tool-num", children: [
10212
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
10213
- /* @__PURE__ */ jsx101("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ jsx101("option", { value: String(i), children: opt }, i)) })
10607
+ return /* @__PURE__ */ jsxs88("span", { className: "ss-w-tool-num", children: [
10608
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
10609
+ /* @__PURE__ */ jsx104("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(currentIdx), onChange: (e) => onChoose(Number(e.target.value)), children: optionLabels.map((opt, i) => /* @__PURE__ */ jsx104("option", { value: String(i), children: opt }, i)) })
10214
10610
  ] });
10215
10611
  }
10216
10612
  function SendButton({ label, display, disabled, onClick }) {
10217
- return /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
10613
+ return /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
10218
10614
  }
10219
10615
  function PickList({ picks, formatKickoff }) {
10220
- return /* @__PURE__ */ jsx101("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs87("li", { className: "ss-w-tool-pick", children: [
10221
- /* @__PURE__ */ jsxs87("span", { className: "ss-w-tool-pick-match", children: [
10616
+ return /* @__PURE__ */ jsx104("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs88("li", { className: "ss-w-tool-pick", children: [
10617
+ /* @__PURE__ */ jsxs88("span", { className: "ss-w-tool-pick-match", children: [
10222
10618
  p.homeTeamName,
10223
10619
  " \u2013 ",
10224
10620
  p.awayTeamName
10225
10621
  ] }),
10226
- /* @__PURE__ */ jsxs87("span", { className: "ss-w-tool-pick-sel", children: [
10622
+ /* @__PURE__ */ jsxs88("span", { className: "ss-w-tool-pick-sel", children: [
10227
10623
  p.marketLabel,
10228
10624
  ": ",
10229
10625
  p.selectionLabel,
10230
10626
  p.line ? ` ${p.line}` : ""
10231
10627
  ] }),
10232
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
10233
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
10628
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
10629
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
10234
10630
  ] }, p.matchOddsId)) });
10235
10631
  }
10236
10632
  function ComboPreview({ cell, formatKickoff }) {
10237
- return /* @__PURE__ */ jsxs87(Fragment24, { children: [
10238
- /* @__PURE__ */ jsx101(PickList, { picks: cell.combo.legs, formatKickoff }),
10239
- /* @__PURE__ */ jsx101("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
10633
+ return /* @__PURE__ */ jsxs88(Fragment25, { children: [
10634
+ /* @__PURE__ */ jsx104(PickList, { picks: cell.combo.legs, formatKickoff }),
10635
+ /* @__PURE__ */ jsx104("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
10240
10636
  ] });
10241
10637
  }
10242
10638
  function Unavailable({ text }) {
10243
- return /* @__PURE__ */ jsx101("p", { className: "ss-w-tool-unavailable", children: text });
10639
+ return /* @__PURE__ */ jsx104("p", { className: "ss-w-tool-unavailable", children: text });
10244
10640
  }
10245
10641
  function AskRow({ icon, ask, ready, send }) {
10246
- return /* @__PURE__ */ jsxs87("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
10247
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
10248
- /* @__PURE__ */ jsxs87("div", { className: "ss-w-tool-main", children: [
10249
- /* @__PURE__ */ jsx101("p", { className: "ss-w-tool-ask", children: ask }),
10250
- ready ? /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-ready", children: ready }) : null
10642
+ return /* @__PURE__ */ jsxs88("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
10643
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
10644
+ /* @__PURE__ */ jsxs88("div", { className: "ss-w-tool-main", children: [
10645
+ /* @__PURE__ */ jsx104("p", { className: "ss-w-tool-ask", children: ask }),
10646
+ ready ? /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-ready", children: ready }) : null
10251
10647
  ] }),
10252
10648
  send
10253
10649
  ] });
10254
10650
  }
10255
10651
  function RoundSend({ label, display, disabled, onClick }) {
10256
- return /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ jsx101(SendIcon, {}) });
10652
+ return /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ jsx104(SendIcon, {}) });
10257
10653
  }
10258
10654
  var BIG_COMBO = { total: 50, legs: 6 };
10259
10655
  function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
@@ -10262,15 +10658,15 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
10262
10658
  const totals = comboTotals(grid);
10263
10659
  const legChoices = comboLegChoices(grid);
10264
10660
  const count = FIXED_SINGLES_COUNT;
10265
- const [maxPrice, setMaxPrice] = useState50(() => startSingles(grid.singles, limits, START.maxPrice, count));
10266
- const [minPrice, setMinPrice] = useState50(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
10267
- const [start] = useState50(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
10268
- const [total, setTotal] = useState50(start.total);
10269
- const [legs, setLegs] = useState50(start.legs);
10270
- const [bigStart] = useState50(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
10271
- const [bigTotal, setBigTotal] = useState50(bigStart.total);
10272
- const [bigLegs, setBigLegs] = useState50(bigStart.legs);
10273
- const [announcement, setAnnouncement] = useState50("");
10661
+ const [maxPrice, setMaxPrice] = useState52(() => startSingles(grid.singles, limits, START.maxPrice, count));
10662
+ const [minPrice, setMinPrice] = useState52(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
10663
+ const [start] = useState52(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
10664
+ const [total, setTotal] = useState52(start.total);
10665
+ const [legs, setLegs] = useState52(start.legs);
10666
+ const [bigStart] = useState52(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
10667
+ const [bigTotal, setBigTotal] = useState52(bigStart.total);
10668
+ const [bigLegs, setBigLegs] = useState52(bigStart.legs);
10669
+ const [announcement, setAnnouncement] = useState52("");
10274
10670
  const maxCell = findSingles(grid.singles, maxPrice, count);
10275
10671
  const minCell = findSingles(grid.singlesFrom, minPrice, count);
10276
10672
  const comboCell = findCombo(grid, total, legs);
@@ -10314,95 +10710,95 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
10314
10710
  const totalChoices = totals.map((v) => ({ value: v, text: v.toFixed(1), available: legChoices.some((n) => !!findCombo(grid, v, n)) }));
10315
10711
  const legChoicesFor = (t) => legChoices.map((n) => ({ value: n, text: String(n), available: !!findCombo(grid, t, n) }));
10316
10712
  const markets = grid.markets ?? [];
10317
- const [marketIdx, setMarketIdx] = useState50(0);
10713
+ const [marketIdx, setMarketIdx] = useState52(0);
10318
10714
  const marketCell = markets[marketIdx] ?? null;
10319
10715
  const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
10320
10716
  const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
10321
10717
  const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
10322
- return /* @__PURE__ */ jsxs87(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
10323
- /* @__PURE__ */ jsx101(
10718
+ return /* @__PURE__ */ jsxs88(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
10719
+ /* @__PURE__ */ jsx104(
10324
10720
  AskRow,
10325
10721
  {
10326
10722
  icon: "\u{1F3AF}",
10327
10723
  ask: fillTemplate(strings.maxPriceRow, {
10328
10724
  count: String(count),
10329
- price: /* @__PURE__ */ jsx101(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
10725
+ price: /* @__PURE__ */ jsx104(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
10330
10726
  }),
10331
10727
  ready: singlesReady(maxCell),
10332
- send: /* @__PURE__ */ jsx101(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
10728
+ send: /* @__PURE__ */ jsx104(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
10333
10729
  if (maxCell) onSend(maxPriceAsk(maxCell, strings));
10334
10730
  } })
10335
10731
  }
10336
10732
  ),
10337
- /* @__PURE__ */ jsx101(
10733
+ /* @__PURE__ */ jsx104(
10338
10734
  AskRow,
10339
10735
  {
10340
10736
  icon: "\u{1F4C8}",
10341
10737
  ask: fillTemplate(strings.minPriceRow, {
10342
10738
  count: String(count),
10343
- price: /* @__PURE__ */ jsx101(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
10739
+ price: /* @__PURE__ */ jsx104(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
10344
10740
  }),
10345
10741
  ready: singlesReady(minCell),
10346
- send: /* @__PURE__ */ jsx101(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
10742
+ send: /* @__PURE__ */ jsx104(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
10347
10743
  if (minCell) onSend(minPriceAsk(minCell, strings));
10348
10744
  } })
10349
10745
  }
10350
10746
  ),
10351
- /* @__PURE__ */ jsx101(
10747
+ /* @__PURE__ */ jsx104(
10352
10748
  AskRow,
10353
10749
  {
10354
10750
  icon: "\u2728",
10355
10751
  ask: fillTemplate(strings.comboRow, {
10356
- legs: /* @__PURE__ */ jsx101(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
10357
- total: /* @__PURE__ */ jsx101(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
10752
+ legs: /* @__PURE__ */ jsx104(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
10753
+ total: /* @__PURE__ */ jsx104(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
10358
10754
  }),
10359
10755
  ready: comboReady(comboCell),
10360
- send: /* @__PURE__ */ jsx101(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
10756
+ send: /* @__PURE__ */ jsx104(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
10361
10757
  if (comboCell) onSend(comboAsk(comboCell, strings));
10362
10758
  } })
10363
10759
  }
10364
10760
  ),
10365
- /* @__PURE__ */ jsx101(
10761
+ /* @__PURE__ */ jsx104(
10366
10762
  AskRow,
10367
10763
  {
10368
10764
  icon: "\u{1F3C6}",
10369
10765
  ask: fillTemplate(strings.bigComboRow, {
10370
- legs: /* @__PURE__ */ jsx101(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
10371
- total: /* @__PURE__ */ jsx101(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
10766
+ legs: /* @__PURE__ */ jsx104(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
10767
+ total: /* @__PURE__ */ jsx104(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
10372
10768
  }),
10373
10769
  ready: comboReady(bigCell),
10374
- send: /* @__PURE__ */ jsx101(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
10770
+ send: /* @__PURE__ */ jsx104(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
10375
10771
  if (bigCell) onSend(comboAsk(bigCell, strings));
10376
10772
  } })
10377
10773
  }
10378
10774
  ),
10379
- markets.length > 0 && /* @__PURE__ */ jsx101(
10775
+ markets.length > 0 && /* @__PURE__ */ jsx104(
10380
10776
  AskRow,
10381
10777
  {
10382
10778
  icon: "\u26BD",
10383
10779
  ask: fillTemplate(strings.marketRow, {
10384
- market: /* @__PURE__ */ jsx101(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
10780
+ market: /* @__PURE__ */ jsx104(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
10385
10781
  }),
10386
10782
  ready: marketCell ? strings.readyCount(marketCell.count) : null,
10387
- send: /* @__PURE__ */ jsx101(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
10783
+ send: /* @__PURE__ */ jsx104(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
10388
10784
  if (marketCell) onSend(marketAsk(marketCell, strings));
10389
10785
  } })
10390
10786
  }
10391
10787
  ),
10392
- /* @__PURE__ */ jsx101("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
10788
+ /* @__PURE__ */ jsx104("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
10393
10789
  ] });
10394
10790
  }
10395
10791
  function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
10396
10792
  const totals = comboTotals(grid);
10397
10793
  const legChoices = comboLegChoices(grid);
10398
- const [start] = useState50(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
10399
- const [total, setTotal] = useState50(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
10400
- const [legs, setLegs] = useState50(() => {
10794
+ const [start] = useState52(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
10795
+ const [total, setTotal] = useState52(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
10796
+ const [legs, setLegs] = useState52(() => {
10401
10797
  if (initialTotal === void 0) return initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : start.legs;
10402
10798
  const from = initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : startValue(legChoices, START.comboLegs);
10403
10799
  return legsForTotal(grid, nearest(totals, initialTotal), from);
10404
10800
  });
10405
- const [announcement, setAnnouncement] = useState50("");
10801
+ const [announcement, setAnnouncement] = useState52("");
10406
10802
  const cell = findCombo(grid, total, legs);
10407
10803
  const minLegs = legChoices[0] ?? legs;
10408
10804
  const maxLegs = legChoices[legChoices.length - 1] ?? legs;
@@ -10413,29 +10809,29 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
10413
10809
  const d = strings.comboDisplay(nextLegs, nextTotal);
10414
10810
  setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
10415
10811
  };
10416
- const footer = /* @__PURE__ */ jsx101(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
10812
+ const footer = /* @__PURE__ */ jsx104(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
10417
10813
  if (cell) onSend(comboAsk(cell, strings));
10418
10814
  } });
10419
- return /* @__PURE__ */ jsxs87(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
10420
- /* @__PURE__ */ jsxs87("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
10421
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
10422
- /* @__PURE__ */ jsx101("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
10815
+ return /* @__PURE__ */ jsxs88(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
10816
+ /* @__PURE__ */ jsxs88("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
10817
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
10818
+ /* @__PURE__ */ jsx104("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(t, total), onClick: () => choose(t, samePrice(t, total) ? legs : legsForTotal(grid, t, legs)), children: t.toFixed(1) }, t)) })
10423
10819
  ] }),
10424
- /* @__PURE__ */ jsxs87("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
10425
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
10426
- /* @__PURE__ */ jsxs87("div", { className: "ss-w-tool-stepper", children: [
10427
- /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
10428
- /* @__PURE__ */ jsx101("span", { className: "ss-w-tool-count", children: legs }),
10429
- /* @__PURE__ */ jsx101("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
10820
+ /* @__PURE__ */ jsxs88("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
10821
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
10822
+ /* @__PURE__ */ jsxs88("div", { className: "ss-w-tool-stepper", children: [
10823
+ /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
10824
+ /* @__PURE__ */ jsx104("span", { className: "ss-w-tool-count", children: legs }),
10825
+ /* @__PURE__ */ jsx104("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
10430
10826
  ] })
10431
10827
  ] }),
10432
- cell ? /* @__PURE__ */ jsx101(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ jsx101(Unavailable, { text: strings.unavailable }),
10433
- /* @__PURE__ */ jsx101("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
10828
+ cell ? /* @__PURE__ */ jsx104(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ jsx104(Unavailable, { text: strings.unavailable }),
10829
+ /* @__PURE__ */ jsx104("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
10434
10830
  ] });
10435
10831
  }
10436
10832
 
10437
10833
  // src/usePresetDial.ts
10438
- import { useCallback as useCallback21, useEffect as useEffect32, useRef as useRef29, useState as useState51 } from "react";
10834
+ import { useCallback as useCallback21, useEffect as useEffect32, useRef as useRef29, useState as useState53 } from "react";
10439
10835
  function sendInFlight(messages, isStreaming) {
10440
10836
  const last = messages[messages.length - 1];
10441
10837
  return isStreaming && !!last && last.role === "assistant" && !last.done && !last.isGreeting;
@@ -10449,7 +10845,7 @@ function lastUserId(messages) {
10449
10845
  }
10450
10846
  var SCROLL_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]);
10451
10847
  function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming, activeTab }) {
10452
- const [expanded, setExpanded] = useState51(() => !sendInFlight(messages, isStreaming));
10848
+ const [expanded, setExpanded] = useState53(() => !sendInFlight(messages, isStreaming));
10453
10849
  const fold = useCallback21(() => setExpanded(false), []);
10454
10850
  const toggle = useCallback21(() => setExpanded((e) => !e), []);
10455
10851
  const currentUserId = lastUserId(messages);
@@ -10532,10 +10928,10 @@ function markToolSeen() {
10532
10928
  }
10533
10929
 
10534
10930
  // src/components/ChatPanel.tsx
10535
- import { Fragment as Fragment25, jsx as jsx102, jsxs as jsxs88 } from "react/jsx-runtime";
10931
+ import { Fragment as Fragment26, jsx as jsx105, jsxs as jsxs89 } from "react/jsx-runtime";
10536
10932
  var FULLSCREEN_QUERY = "(max-width: 639px)";
10537
10933
  function useIsModal() {
10538
- const [modal, setModal] = useState52(false);
10934
+ const [modal, setModal] = useState54(false);
10539
10935
  useEffect33(() => {
10540
10936
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
10541
10937
  const mql = window.matchMedia(FULLSCREEN_QUERY);
@@ -10550,8 +10946,8 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
10550
10946
  var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
10551
10947
  function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, clubFixturesResult, clubStandingsResult, clubSquadResult, clubSquadStatsResult, clubPlayerDetailResult, loggedIn, conversation, presetGrid }) {
10552
10948
  const { state, close, stop, send, reset } = controller;
10553
- const [squadView, setSquadView] = useState52("roster");
10554
- const [selectedPlayerId, setSelectedPlayerId] = useState52(null);
10949
+ const [squadView, setSquadView] = useState54("roster");
10950
+ const [selectedPlayerId, setSelectedPlayerId] = useState54(null);
10555
10951
  const clearPlayerDetail = clubPlayerDetailResult?.clear;
10556
10952
  const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
10557
10953
  const squadLayerRef = useRef30(null);
@@ -10605,8 +11001,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10605
11001
  const limitRef = useRef30(null);
10606
11002
  const typedSendRef = useRef30(false);
10607
11003
  const focusAfterCloseRef = useRef30(null);
10608
- const [tool, setTool] = useState52(null);
10609
- const [toolSeen, setToolSeen] = useState52(readToolSeen);
11004
+ const [tool, setTool] = useState54(null);
11005
+ const [toolSeen, setToolSeen] = useState54(readToolSeen);
10610
11006
  const dial = usePresetDial({
10611
11007
  layerRef,
10612
11008
  dialRef,
@@ -10663,8 +11059,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10663
11059
  focusAfterCloseRef.current = "composer";
10664
11060
  setTool(null);
10665
11061
  }, [tool, onChatTab, presetGrid]);
10666
- return /* @__PURE__ */ jsxs88("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
10667
- /* @__PURE__ */ jsx102(
11062
+ return /* @__PURE__ */ jsxs89("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
11063
+ /* @__PURE__ */ jsx105(
10668
11064
  ChatHeader,
10669
11065
  {
10670
11066
  onClose: close,
@@ -10677,7 +11073,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10677
11073
  moreOptionsLabel: ui.moreOptions
10678
11074
  }
10679
11075
  ),
10680
- monitor && /* @__PURE__ */ jsx102(
11076
+ monitor && /* @__PURE__ */ jsx105(
10681
11077
  TabBar,
10682
11078
  {
10683
11079
  monitor,
@@ -10690,9 +11086,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10690
11086
  clubEnabled: clubFixturesResult?.enabled ?? false
10691
11087
  }
10692
11088
  ),
10693
- /* @__PURE__ */ jsxs88("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
10694
- /* @__PURE__ */ jsx102(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx102(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
10695
- showDial ? /* @__PURE__ */ jsx102(
11089
+ /* @__PURE__ */ jsxs89("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
11090
+ /* @__PURE__ */ jsx105(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx105(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
11091
+ showDial ? /* @__PURE__ */ jsx105(
10696
11092
  PresetSpeedDial,
10697
11093
  {
10698
11094
  expanded: dial.expanded,
@@ -10704,21 +11100,21 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10704
11100
  buttonRef: dialButtonRef
10705
11101
  }
10706
11102
  ) : null,
10707
- tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ jsx102(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ jsx102(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
11103
+ tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ jsx105(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ jsx105(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
10708
11104
  ] }),
10709
- monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx102(TodayPanel, { discovery, ui, monitor }),
10710
- monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx102(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
10711
- monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx102(OddsPanel, { monitor, ui, slip }),
10712
- monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx102(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
10713
- monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx102(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
10714
- monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs88(Fragment25, { children: [
10715
- /* @__PURE__ */ jsx102(
11105
+ monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx105(TodayPanel, { discovery, ui, monitor }),
11106
+ monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx105(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
11107
+ monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx105(OddsPanel, { monitor, ui, slip }),
11108
+ monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx105(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
11109
+ monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx105(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
11110
+ monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs89(Fragment26, { children: [
11111
+ /* @__PURE__ */ jsx105(
10716
11112
  "div",
10717
11113
  {
10718
11114
  ref: squadLayerRef,
10719
11115
  style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
10720
11116
  "aria-hidden": selectedPlayerId !== null ? true : void 0,
10721
- children: /* @__PURE__ */ jsx102(
11117
+ children: /* @__PURE__ */ jsx105(
10722
11118
  Squad,
10723
11119
  {
10724
11120
  squad: clubSquadResult?.data ?? null,
@@ -10728,14 +11124,17 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10728
11124
  onToggleView: () => setSquadView((v) => v === "roster" ? "stats" : "roster"),
10729
11125
  stats: clubSquadStatsResult?.data ?? null,
10730
11126
  statsLoading: clubSquadStatsResult?.loading ?? false,
11127
+ seasonName: clubSquadStatsResult?.seasonName ?? null,
11128
+ competitionName: clubSquadStatsResult?.competitionName ?? null,
11129
+ matchesPlayed: clubSquadStatsResult?.matchesPlayed ?? null,
10731
11130
  onSelectPlayer: selectPlayer
10732
11131
  }
10733
11132
  )
10734
11133
  }
10735
11134
  ),
10736
- selectedPlayerId !== null && /* @__PURE__ */ jsx102(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
11135
+ selectedPlayerId !== null && /* @__PURE__ */ jsx105(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
10737
11136
  ] }),
10738
- monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx102(
11137
+ monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx105(
10739
11138
  GamesPanel,
10740
11139
  {
10741
11140
  loggedIn: !!loggedIn,
@@ -10750,9 +11149,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10750
11149
  }
10751
11150
  }
10752
11151
  ),
10753
- (!monitor || monitor.activeTab !== "games") && /* @__PURE__ */ jsxs88(Fragment25, { children: [
10754
- /* @__PURE__ */ jsx102("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
10755
- paused ? null : /* @__PURE__ */ jsx102(
11152
+ (!monitor || monitor.activeTab !== "games") && /* @__PURE__ */ jsxs89(Fragment26, { children: [
11153
+ /* @__PURE__ */ jsx105("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
11154
+ paused ? null : /* @__PURE__ */ jsx105(
10756
11155
  ChatInput,
10757
11156
  {
10758
11157
  ref: inputRef,
@@ -10771,9 +11170,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
10771
11170
  }
10772
11171
 
10773
11172
  // src/components/HostEventsProvider.tsx
10774
- import { jsx as jsx103 } from "react/jsx-runtime";
11173
+ import { jsx as jsx106 } from "react/jsx-runtime";
10775
11174
  function HostEventsProvider({ value, children }) {
10776
- return /* @__PURE__ */ jsx103(SlipStateContext.Provider, { value: value.slipState, children });
11175
+ return /* @__PURE__ */ jsx106(SlipStateContext.Provider, { value: value.slipState, children });
10777
11176
  }
10778
11177
 
10779
11178
  // src/styles/css.generated.ts
@@ -10784,7 +11183,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
10784
11183
  --ss-w-cta: #f5a623; --ss-w-cta-ink: #1b1300;
10785
11184
  --ss-w-ink: #14181d; --ss-w-faint: #6b7580; --ss-w-line: #e4e8ec;
10786
11185
  --ss-w-panel: #ffffff; --ss-w-bubble: #f3f5f7; --ss-w-nav: #0e1622;
10787
- --ss-w-pos: #1aa563; --ss-w-neg: #e0524b;
11186
+ --ss-w-pos: #1aa563; --ss-w-neg: #e0524b; --ss-w-warn: #c07a00;
10788
11187
  --ss-w-home: #3a63a8; --ss-w-away: #c8102e; --ss-w-track: #e9edf1;
10789
11188
  --ss-w-correct: #1f9d55; --ss-w-wrong: #b9bbc2;
10790
11189
  --ss-w-radius: 16px; --ss-w-offset-x: 20px; --ss-w-offset-y: 20px;
@@ -10796,7 +11195,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
10796
11195
  --ss-w-accent: #37c891; --ss-w-cta: #ffb638; --ss-w-cta-ink: #1b1300;
10797
11196
  --ss-w-ink: #e8edf2; --ss-w-faint: #8b95a1;
10798
11197
  --ss-w-line: #2a3441; --ss-w-panel: #141b24; --ss-w-bubble: #1e2732; --ss-w-nav: #0a0f16;
10799
- --ss-w-pos: #37c891; --ss-w-neg: #f0655d;
11198
+ --ss-w-pos: #37c891; --ss-w-neg: #f0655d; --ss-w-warn: #e0a030;
10800
11199
  --ss-w-home: #5b83c8; --ss-w-away: #e8384f; --ss-w-track: #232d3a;
10801
11200
  --ss-w-correct: #37c86b; --ss-w-wrong: #3a3a41;
10802
11201
  }
@@ -10805,7 +11204,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
10805
11204
  --ss-w-accent: #37c891; --ss-w-cta: #ffb638; --ss-w-cta-ink: #1b1300;
10806
11205
  --ss-w-ink: #e8edf2; --ss-w-faint: #8b95a1;
10807
11206
  --ss-w-line: #2a3441; --ss-w-panel: #141b24; --ss-w-bubble: #1e2732; --ss-w-nav: #0a0f16;
10808
- --ss-w-pos: #37c891; --ss-w-neg: #f0655d;
11207
+ --ss-w-pos: #37c891; --ss-w-neg: #f0655d; --ss-w-warn: #e0a030;
10809
11208
  --ss-w-home: #5b83c8; --ss-w-away: #e8384f; --ss-w-track: #232d3a;
10810
11209
  --ss-w-correct: #37c86b; --ss-w-wrong: #3a3a41;
10811
11210
  }
@@ -11782,8 +12181,13 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
11782
12181
  .ss-w-fandash-live-team-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; line-height: 1.15; color: var(--ss-w-ink); }
11783
12182
  .ss-w-fandash-live-score-main { display: flex; align-items: baseline; justify-content: center; font-size: 36px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; color: var(--ss-w-ink); }
11784
12183
  .ss-w-fandash-live-score-sep { color: var(--ss-w-faint); font-weight: 500; margin: 0 5px; }
11785
- .ss-w-fandash-live-scorers { margin-top: 12px; display: flex; justify-content: flex-end; gap: 7px; align-items: center; font-size: 12.5px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
11786
- .ss-w-fandash-live-scorers-icon { flex: none; color: var(--ss-w-away); }
12184
+ .ss-w-fandash-live-scorers-row { margin-top: 12px; display: flex; justify-content: space-between; gap: 10px; }
12185
+ .ss-w-fandash-live-scorers { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
12186
+ .ss-w-fandash-live-scorers--home { justify-content: flex-start; }
12187
+ .ss-w-fandash-live-scorers--away { justify-content: flex-end; }
12188
+ .ss-w-fandash-live-scorers--home .ss-w-fandash-live-scorers-icon { color: var(--ss-w-home); }
12189
+ .ss-w-fandash-live-scorers--away .ss-w-fandash-live-scorers-icon { color: var(--ss-w-away); }
12190
+ .ss-w-fandash-live-scorers-icon { flex: none; }
11787
12191
 
11788
12192
  /* live timeline: a compact two-sided event list down a centre spine -- each club's events sit on
11789
12193
  its own side (home left, away right), most-recent 3 shown with a "See more" toggle for the
@@ -11936,7 +12340,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
11936
12340
  .ss-w-sq-name { font-size: 13px; font-weight: 600; color: var(--ss-w-ink); }
11937
12341
  .ss-w-sq-name { flex: 1; min-width: 0; }
11938
12342
  .ss-w-sq-name-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
11939
- .ss-w-sq-seg { display: flex; flex: none; gap: 2px; margin: 10px 14px 0; padding: 2px; border-radius: var(--ss-w-radius); background: var(--ss-w-track); }
12343
+ .ss-w-sq-seg { display: flex; gap: 2px; padding: 2px; border-radius: var(--ss-w-radius); background: var(--ss-w-track); }
11940
12344
  .ss-w-sq-seg-btn { flex: 1; padding: 5px 8px; border: 0; border-radius: calc(var(--ss-w-radius) - 2px); background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: var(--ss-w-faint); cursor: pointer; }
11941
12345
  .ss-w-sq-seg-btn[aria-pressed="true"] { background: var(--ss-w-panel); color: var(--ss-w-ink); }
11942
12346
  .ss-w-sq-seg-btn:focus-visible, .ss-w-sq-tap:focus-visible, .ss-w-pd-back:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 1px; }
@@ -11944,15 +12348,95 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
11944
12348
  .ss-w-sq-col { flex: none; width: 40px; text-align: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
11945
12349
  .ss-w-sq-head { border-bottom: 0; padding-bottom: 0; }
11946
12350
  .ss-w-sq-head .ss-w-sq-col { font-size: 10px; font-weight: 700; color: var(--ss-w-faint); }
11947
- .ss-w-pd-bar { flex: none; padding: 8px 14px 0; }
11948
- .ss-w-pd-back { padding: 4px 0; border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: var(--ss-w-accent); cursor: pointer; }
11949
- .ss-w-pd-name { font-size: 16px; font-weight: 700; color: var(--ss-w-ink); }
11950
- .ss-w-pd-sub { margin-top: 2px; font-size: 12px; color: var(--ss-w-faint); }
11951
- .ss-w-pd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
11952
- .ss-w-pd-bio { grid-template-columns: repeat(2, 1fr); }
11953
- .ss-w-pd-field { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--ss-w-line); border-radius: var(--ss-w-radius); }
11954
- .ss-w-pd-label { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--ss-w-faint); }
11955
- .ss-w-pd-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
12351
+ .ss-w-sq-stats { padding-top: 10px; gap: 10px; }
12352
+ .ss-w-sq-card { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; }
12353
+ .ss-w-sq-stats .ss-w-sq-row { display: grid; grid-template-columns: 1fr 26px 30px 36px 20px 20px 20px 20px 36px; gap: 0; padding: 7px 10px; font-size: 11px; }
12354
+ .ss-w-sq-card > :last-child { border-bottom: 0; }
12355
+ .ss-w-sq-pos, .ss-w-sq-c20, .ss-w-sq-c30, .ss-w-sq-c36 { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
12356
+ .ss-w-sq-stats .ss-w-sq-head { padding-bottom: 7px; border-bottom: 1px solid var(--ss-w-line); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--ss-w-faint); }
12357
+ .ss-w-sq-stats .ss-w-sq-head > span { font-size: 9px; font-weight: 700; color: var(--ss-w-faint); }
12358
+ .ss-w-sq-player { display: flex; align-items: center; gap: 6px; min-width: 0; }
12359
+ .ss-w-sq-badge { flex: none; width: 18px; height: 18px; border-radius: 6px; background: var(--ss-w-track); color: var(--ss-w-faint); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
12360
+ .ss-w-sq-stats .ss-w-sq-name { font-size: 11px; }
12361
+ .ss-w-sq-rtg { font-weight: 700; }
12362
+ .ss-w-sq-rtg-none { color: var(--ss-w-faint); font-weight: 400; }
12363
+ .ss-w-sq-stats .ss-w-pos-ink { color: var(--ss-w-pos); font-weight: 700; }
12364
+ .ss-w-sq-foot { padding: 0 2px; font-size: 10.5px; color: var(--ss-w-faint); }
12365
+ .ss-w-sq-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 14px 0; }
12366
+ .ss-w-sq-bar .ss-w-sq-seg { margin: 0; }
12367
+ .ss-w-sq-bar .ss-w-sq-seg:only-child { flex: 1; }
12368
+ .ss-w-sq-bar .ss-w-sq-seg:not(:only-child) { flex: none; }
12369
+ .ss-w-sq-eyebrow { flex: 1; min-width: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ss-w-faint); }
12370
+ @media (max-width: 429px) { .ss-w-sq-badge { display: none; } }
12371
+ @media (max-width: 359px) {
12372
+ .ss-w-sq-yr { display: none; }
12373
+ .ss-w-sq-stats .ss-w-sq-row { grid-template-columns: 1fr 26px 30px 36px 20px 20px 36px; }
12374
+ }
12375
+ .ss-w-pd-bar { flex: none; display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ss-w-line); line-height: normal; }
12376
+ .ss-w-pd-back { display: flex; align-items: center; gap: 2px; min-height: 32px; padding: 8px 8px 8px 0; margin: -8px 0; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ss-w-faint); cursor: pointer; }
12377
+ .ss-w-pd-back:hover { color: var(--ss-w-ink); }
12378
+ .ss-w-mon-list.ss-w-pd-list { padding: 16px; gap: 14px; line-height: normal; }
12379
+ .ss-w-pd-card { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; }
12380
+ .ss-w-pd-faint { color: var(--ss-w-faint); }
12381
+ .ss-w-pd-profile { display: flex; gap: 12px; padding: 14px; }
12382
+ .ss-w-pd-photo { flex: none; border-radius: 50%; border: 1px solid var(--ss-w-line); background: var(--ss-w-bubble); object-fit: cover; }
12383
+ .ss-w-pd-avatar { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ss-w-ink); }
12384
+ .ss-w-pd-profile-main { flex: 1; min-width: 0; }
12385
+ .ss-w-pd-name { font-size: 16px; font-weight: 800; color: var(--ss-w-ink); overflow-wrap: break-word; }
12386
+ .ss-w-pd-sub { margin-top: 1px; font-size: 12px; color: var(--ss-w-faint); }
12387
+ /* Two columns as on the board, collapsing to one when a column would drop under 80px (narrow phones). */
12388
+ .ss-w-pd-bio { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(80px, calc((100% - 10px) / 2)), 1fr)); gap: 4px 10px; margin-top: 10px; font-size: 11.5px; }
12389
+ .ss-w-pd-bio-item { min-width: 0; overflow-wrap: break-word; }
12390
+ .ss-w-pd-pitch { position: relative; flex: none; width: 56px; height: 76px; border: 1px solid var(--ss-w-line); border-radius: 6px; background: var(--ss-w-track); }
12391
+ .ss-w-pd-pitch-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--ss-w-accent); border: 2px solid var(--ss-w-nav); transform: translate(-50%, -50%); }
12392
+ .ss-w-pd-avail { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
12393
+ .ss-w-pd-avail-text { min-width: 0; }
12394
+ .ss-w-pd-avail-next { font-size: 12.5px; font-weight: 700; }
12395
+ .ss-w-pd-avail-note { margin-top: 1px; font-size: 11px; color: var(--ss-w-faint); }
12396
+ .ss-w-pd-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
12397
+ .ss-w-pd-pill--pos, .ss-w-pd-chip--pos { background: color-mix(in srgb, var(--ss-w-pos) 14%, transparent); color: var(--ss-w-pos); }
12398
+ .ss-w-pd-pill--warn, .ss-w-pd-chip--warn { background: color-mix(in srgb, var(--ss-w-warn) 14%, transparent); color: var(--ss-w-warn); }
12399
+ .ss-w-pd-pill--neg, .ss-w-pd-chip--neg { background: color-mix(in srgb, var(--ss-w-neg) 14%, transparent); color: var(--ss-w-neg); }
12400
+ .ss-w-pd-pill--draw { background: var(--ss-w-track); color: var(--ss-w-faint); }
12401
+ .ss-w-pd-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ss-w-faint); padding: 0 2px; }
12402
+ .ss-w-pd-eyebrow--block { margin-bottom: 8px; }
12403
+ .ss-w-pd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
12404
+ .ss-w-pd-tile { min-width: 0; padding: 10px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; }
12405
+ .ss-w-pd-tile-label { font-size: 10.5px; color: var(--ss-w-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
12406
+ .ss-w-pd-tile-value { margin-top: 2px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
12407
+ .ss-w-pd-pos-ink { color: var(--ss-w-pos); }
12408
+ /* Below 360px the board's 10px tile padding clips "Matches"/"Minutes" (43px) in a ~34px label box. */
12409
+ @media (max-width: 359px) {
12410
+ .ss-w-pd-tiles { gap: 6px; }
12411
+ .ss-w-pd-tile { padding: 10px 6px; }
12412
+ }
12413
+ .ss-w-pd-perf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
12414
+ .ss-w-pd-perf-head .ss-w-pd-eyebrow { flex: 1; min-width: 0; }
12415
+ .ss-w-pd-seg { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ss-w-track); }
12416
+ .ss-w-pd-seg-btn { padding: 5px 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 11.5px; font-weight: 700; line-height: normal; white-space: nowrap; color: var(--ss-w-faint); cursor: pointer; }
12417
+ .ss-w-pd-seg-btn[aria-pressed="true"] { background: var(--ss-w-nav); color: #fff; }
12418
+ .ss-w-pd-seg-btn:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 1px; }
12419
+ .ss-w-pd-perf-sub { margin-bottom: 10px; font-size: 11px; color: var(--ss-w-faint); }
12420
+ .ss-w-pd-perf-head + .ss-w-pd-perf-cards { margin-top: 10px; }
12421
+ .ss-w-pd-perf-cards { display: flex; flex-direction: column; gap: 8px; }
12422
+ .ss-w-pd-perf-card { padding: 14px; }
12423
+ .ss-w-pd-perf-group { margin-bottom: 10px; font-size: 12.5px; font-weight: 700; }
12424
+ .ss-w-pd-bar-row + .ss-w-pd-bar-row { margin-top: 12px; }
12425
+ .ss-w-pd-bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 12.5px; }
12426
+ .ss-w-pd-bar-label { min-width: 0; overflow-wrap: break-word; }
12427
+ .ss-w-pd-bar-value { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
12428
+ .ss-w-pd-track { height: 6px; border-radius: 999px; background: var(--ss-w-track); overflow: hidden; }
12429
+ .ss-w-pd-fill { height: 100%; border-radius: 999px; }
12430
+ .ss-w-pd-fill--pos { background: var(--ss-w-pos); }
12431
+ .ss-w-pd-fill--warn { background: var(--ss-w-warn); }
12432
+ .ss-w-pd-fill--neg { background: var(--ss-w-neg); }
12433
+ .ss-w-pd-match { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--ss-w-line); }
12434
+ .ss-w-pd-match:last-child { border-bottom: none; }
12435
+ .ss-w-pd-match-date { font-size: 10.5px; color: var(--ss-w-faint); }
12436
+ .ss-w-pd-match-opp { font-size: 12.5px; font-weight: 600; overflow-wrap: break-word; }
12437
+ .ss-w-pd-match-sub { margin-top: 1px; font-size: 10.5px; color: var(--ss-w-faint); }
12438
+ .ss-w-pd-chip-empty { min-width: 30px; }
12439
+ .ss-w-pd-chip { min-width: 30px; padding: 3px 0; border-radius: 6px; text-align: center; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
11956
12440
  .ss-w-rec-list { margin: 0; padding: 0; list-style: none; }
11957
12441
  .ss-w-rec-value { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
11958
12442
  .ss-w-rec-since { font-size: 12px; color: var(--ss-w-faint); }
@@ -12559,7 +13043,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
12559
13043
  `;
12560
13044
 
12561
13045
  // src/StatsWidget.tsx
12562
- import { jsx as jsx104 } from "react/jsx-runtime";
13046
+ import { jsx as jsx107 } from "react/jsx-runtime";
12563
13047
  function buildClient(props) {
12564
13048
  try {
12565
13049
  if ("client" in props && props.client) {
@@ -12600,7 +13084,7 @@ function StatsWidget(props) {
12600
13084
  }, []);
12601
13085
  const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
12602
13086
  const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
12603
- const [hasToday, setHasToday] = useState53(false);
13087
+ const [hasToday, setHasToday] = useState55(false);
12604
13088
  const liveCardWatches = useMemo6(() => {
12605
13089
  const seen = /* @__PURE__ */ new Set();
12606
13090
  const out = [];
@@ -12784,7 +13268,7 @@ function StatsWidget(props) {
12784
13268
  }, [built, ui.injectStyles]);
12785
13269
  if (!built) return null;
12786
13270
  const attrs = themeAttrs(ui);
12787
- return /* @__PURE__ */ jsx104(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx104(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx104("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ jsx104(
13271
+ return /* @__PURE__ */ jsx107(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx107(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx107("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ jsx107(
12788
13272
  ChatPanel,
12789
13273
  {
12790
13274
  controller,
@@ -12804,7 +13288,7 @@ function StatsWidget(props) {
12804
13288
  conversation: built?.conversation ?? null,
12805
13289
  presetGrid
12806
13290
  }
12807
- ) : /* @__PURE__ */ jsx104(
13291
+ ) : /* @__PURE__ */ jsx107(
12808
13292
  ChatFab,
12809
13293
  {
12810
13294
  label: ui.launcherLabel,