@sensiblestats/widget-react 0.86.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +1369 -1216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1274 -1121
- package/dist/index.js.map +1 -1
- package/dist/styles.css +42 -2
- package/package.json +2 -2
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
|
|
2
|
+
import { useCallback as useCallback23, useEffect as useEffect34, useMemo as useMemo6, useRef as useRef31, useState as useState56 } from "react";
|
|
3
3
|
import { StatsWidgetClient } from "@sensiblestats/widget-sdk";
|
|
4
4
|
|
|
5
5
|
// src/kickoff.ts
|
|
@@ -111,6 +111,7 @@ var STRINGS = {
|
|
|
111
111
|
inSlipLabel: "In slip",
|
|
112
112
|
oddsUnavailable: "Odds unavailable right now",
|
|
113
113
|
momentumLabel: "Momentum",
|
|
114
|
+
formAndH2HLabel: "Form & Head-to-head",
|
|
114
115
|
liveFactLabel: "Live fact",
|
|
115
116
|
liveFactAsk: "Ask about this",
|
|
116
117
|
liveFactEarlier: (n) => `Earlier facts (${n})`,
|
|
@@ -578,6 +579,7 @@ var STRINGS = {
|
|
|
578
579
|
inSlipLabel: "Kuponda",
|
|
579
580
|
oddsUnavailable: "Oranlar \u015Fu anda kullan\u0131lam\u0131yor",
|
|
580
581
|
momentumLabel: "Momentum",
|
|
582
|
+
formAndH2HLabel: "Form ve Kar\u015F\u0131l\u0131kl\u0131 Ma\xE7lar",
|
|
581
583
|
liveFactLabel: "Canl\u0131 bilgi",
|
|
582
584
|
liveFactAsk: "Bunu sor",
|
|
583
585
|
liveFactEarlier: (n) => `\xD6nceki bilgiler (${n})`,
|
|
@@ -1168,6 +1170,7 @@ function normalizeUi(cfg) {
|
|
|
1168
1170
|
inSlipLabel: strings.inSlipLabel,
|
|
1169
1171
|
oddsUnavailable: strings.oddsUnavailable,
|
|
1170
1172
|
momentumLabel: strings.momentumLabel,
|
|
1173
|
+
formAndH2HLabel: strings.formAndH2HLabel,
|
|
1171
1174
|
liveFactLabel: strings.liveFactLabel,
|
|
1172
1175
|
liveFactAsk: strings.liveFactAsk,
|
|
1173
1176
|
liveFactEarlier: strings.liveFactEarlier,
|
|
@@ -3935,7 +3938,7 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
|
|
|
3935
3938
|
}
|
|
3936
3939
|
|
|
3937
3940
|
// src/components/ChatPanel.tsx
|
|
3938
|
-
import { useCallback as useCallback22, useEffect as useEffect33, useLayoutEffect, useMemo as useMemo5, useRef as useRef30, useState as
|
|
3941
|
+
import { useCallback as useCallback22, useEffect as useEffect33, useLayoutEffect, useMemo as useMemo5, useRef as useRef30, useState as useState55 } from "react";
|
|
3939
3942
|
|
|
3940
3943
|
// src/components/ChatHeader.tsx
|
|
3941
3944
|
import { useEffect as useEffect16, useRef as useRef17, useState as useState15 } from "react";
|
|
@@ -5613,7 +5616,7 @@ function useLiveClock(minute, clockRunning, receivedAtMs) {
|
|
|
5613
5616
|
}
|
|
5614
5617
|
|
|
5615
5618
|
// src/components/dashboard/LiveScoreCard.tsx
|
|
5616
|
-
import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5619
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5617
5620
|
function initials5(name) {
|
|
5618
5621
|
return name.trim().slice(0, 3).toUpperCase();
|
|
5619
5622
|
}
|
|
@@ -5625,11 +5628,14 @@ function LiveCrest({ url, name, side }) {
|
|
|
5625
5628
|
}
|
|
5626
5629
|
return /* @__PURE__ */ jsx41("span", { className: `${cls} ss-w-fandash-live-crest--fallback`, "aria-hidden": "true", children: initials5(name) });
|
|
5627
5630
|
}
|
|
5628
|
-
function
|
|
5629
|
-
if (!goalEvents || goalEvents.length === 0) return null;
|
|
5631
|
+
function scorersBySide(goalEvents) {
|
|
5632
|
+
if (!goalEvents || goalEvents.length === 0) return { home: null, away: null };
|
|
5630
5633
|
const named = goalEvents.filter((e) => e.type === "goal" && e.player);
|
|
5631
|
-
|
|
5632
|
-
|
|
5634
|
+
const line = (side) => {
|
|
5635
|
+
const scorers = named.filter((e) => e.side === side).slice().sort((a, b) => a.minute - b.minute).map((e) => `${e.player} ${e.minuteLabel}`);
|
|
5636
|
+
return scorers.length === 0 ? null : scorers.join(", ");
|
|
5637
|
+
};
|
|
5638
|
+
return { home: line("home"), away: line("away") };
|
|
5633
5639
|
}
|
|
5634
5640
|
function LiveScoreCard({
|
|
5635
5641
|
card,
|
|
@@ -5643,7 +5649,7 @@ function LiveScoreCard({
|
|
|
5643
5649
|
}
|
|
5644
5650
|
const displayMinute = useLiveClock(data.minute, data.clockRunning, seedRef.current.receivedAtMs);
|
|
5645
5651
|
const minuteSuffix = data.minuteLabel.replace(/^\d+/, "");
|
|
5646
|
-
const
|
|
5652
|
+
const { home: homeScorers, away: awayScorers } = scorersBySide(goalEvents);
|
|
5647
5653
|
return /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-card ss-w-fandash-live-score", children: [
|
|
5648
5654
|
card.title ? /* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
5649
5655
|
/* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-live-top", children: [
|
|
@@ -5669,9 +5675,15 @@ function LiveScoreCard({
|
|
|
5669
5675
|
/* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-team-name", children: data.awayName })
|
|
5670
5676
|
] })
|
|
5671
5677
|
] }),
|
|
5672
|
-
|
|
5673
|
-
/* @__PURE__ */ jsx41("
|
|
5674
|
-
|
|
5678
|
+
homeScorers || awayScorers ? /* @__PURE__ */ jsxs37("div", { className: "ss-w-fandash-live-scorers-row", children: [
|
|
5679
|
+
/* @__PURE__ */ jsx41("div", { className: "ss-w-fandash-live-scorers ss-w-fandash-live-scorers--home", children: homeScorers ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
5680
|
+
/* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-scorers-icon", "aria-hidden": "true", children: "\u26BD" }),
|
|
5681
|
+
homeScorers
|
|
5682
|
+
] }) : null }),
|
|
5683
|
+
/* @__PURE__ */ jsx41("div", { className: "ss-w-fandash-live-scorers ss-w-fandash-live-scorers--away", children: awayScorers ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
5684
|
+
awayScorers,
|
|
5685
|
+
/* @__PURE__ */ jsx41("span", { className: "ss-w-fandash-live-scorers-icon", "aria-hidden": "true", children: "\u26BD" })
|
|
5686
|
+
] }) : null })
|
|
5675
5687
|
] }) : null
|
|
5676
5688
|
] });
|
|
5677
5689
|
}
|
|
@@ -6258,8 +6270,100 @@ function LiveFactBlock({ facts, matchId, ui, slip, onAsk }) {
|
|
|
6258
6270
|
] });
|
|
6259
6271
|
}
|
|
6260
6272
|
|
|
6273
|
+
// src/components/MonitorFormH2H.tsx
|
|
6274
|
+
import { useState as useState32 } from "react";
|
|
6275
|
+
import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6276
|
+
function resultClass2(result) {
|
|
6277
|
+
if (result === "W") return "ss-w-h2h-result--win";
|
|
6278
|
+
if (result === "L") return "ss-w-h2h-result--loss";
|
|
6279
|
+
return "ss-w-h2h-result--draw";
|
|
6280
|
+
}
|
|
6281
|
+
function resultLabel(result, ui) {
|
|
6282
|
+
if (result === "W") return ui.standingsColWon;
|
|
6283
|
+
if (result === "L") return ui.standingsColLost;
|
|
6284
|
+
return ui.standingsColDrawn;
|
|
6285
|
+
}
|
|
6286
|
+
function FormDots({ form, ui }) {
|
|
6287
|
+
return /* @__PURE__ */ jsx53("div", { className: "ss-w-h2h-dots", children: form.map((m, i) => /* @__PURE__ */ jsx53("span", { className: `ss-w-h2h-result ${resultClass2(m.result)}`, children: resultLabel(m.result, ui) }, i)) });
|
|
6288
|
+
}
|
|
6289
|
+
function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
6290
|
+
const [expanded, setExpanded] = useState32(false);
|
|
6291
|
+
const { homeForm, awayForm, h2h } = formAndH2H;
|
|
6292
|
+
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
6293
|
+
return /* @__PURE__ */ jsx53(Fragment8, {});
|
|
6294
|
+
}
|
|
6295
|
+
const total = h2h ? h2h.wins + h2h.draws + h2h.losses : 0;
|
|
6296
|
+
const winsPct = total > 0 && h2h ? h2h.wins / total * 100 : 0;
|
|
6297
|
+
const drawsPct = total > 0 && h2h ? h2h.draws / total * 100 : 0;
|
|
6298
|
+
const lossesPct = total > 0 && h2h ? h2h.losses / total * 100 : 0;
|
|
6299
|
+
return /* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h", children: [
|
|
6300
|
+
/* @__PURE__ */ jsxs48("button", { type: "button", className: "ss-w-h2h-head", "aria-expanded": expanded, onClick: () => setExpanded((v) => !v), children: [
|
|
6301
|
+
/* @__PURE__ */ jsxs48("span", { className: "ss-w-h2h-head-l", children: [
|
|
6302
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-dot", "aria-hidden": "true" }),
|
|
6303
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-title", children: ui.formAndH2HLabel })
|
|
6304
|
+
] }),
|
|
6305
|
+
/* @__PURE__ */ jsx53(
|
|
6306
|
+
"svg",
|
|
6307
|
+
{
|
|
6308
|
+
className: expanded ? "ss-w-h2h-chevron ss-w-h2h-chevron--open" : "ss-w-h2h-chevron",
|
|
6309
|
+
width: "16",
|
|
6310
|
+
height: "16",
|
|
6311
|
+
viewBox: "0 0 24 24",
|
|
6312
|
+
fill: "none",
|
|
6313
|
+
stroke: "currentColor",
|
|
6314
|
+
strokeWidth: "2",
|
|
6315
|
+
strokeLinecap: "round",
|
|
6316
|
+
strokeLinejoin: "round",
|
|
6317
|
+
"aria-hidden": "true",
|
|
6318
|
+
children: /* @__PURE__ */ jsx53("path", { d: "M6 9l6 6 6-6" })
|
|
6319
|
+
}
|
|
6320
|
+
)
|
|
6321
|
+
] }),
|
|
6322
|
+
expanded && /* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-body", children: [
|
|
6323
|
+
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-forms", children: [
|
|
6324
|
+
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-form-col", children: [
|
|
6325
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children: homeTeamName }),
|
|
6326
|
+
/* @__PURE__ */ jsx53(FormDots, { form: homeForm, ui })
|
|
6327
|
+
] }),
|
|
6328
|
+
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-form-col ss-w-h2h-form-col--away", children: [
|
|
6329
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-form-team", children: awayTeamName }),
|
|
6330
|
+
/* @__PURE__ */ jsx53(FormDots, { form: awayForm, ui })
|
|
6331
|
+
] })
|
|
6332
|
+
] }),
|
|
6333
|
+
h2h && /* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-record", children: [
|
|
6334
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-meta", children: h2h.label }),
|
|
6335
|
+
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-bar", children: [
|
|
6336
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-bar-seg ss-w-h2h-bar-seg--win", style: { width: `${winsPct}%` } }),
|
|
6337
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-bar-seg ss-w-h2h-bar-seg--draw", style: { width: `${drawsPct}%` } }),
|
|
6338
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-bar-seg ss-w-h2h-bar-seg--loss", style: { width: `${lossesPct}%` } })
|
|
6339
|
+
] }),
|
|
6340
|
+
/* @__PURE__ */ jsxs48("div", { className: "ss-w-h2h-legend", children: [
|
|
6341
|
+
/* @__PURE__ */ jsxs48("span", { className: "ss-w-h2h-legend-item", children: [
|
|
6342
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-legend-dot ss-w-h2h-legend-dot--win", "aria-hidden": "true" }),
|
|
6343
|
+
h2h.wins,
|
|
6344
|
+
" ",
|
|
6345
|
+
h2h.homeWinsLabel
|
|
6346
|
+
] }),
|
|
6347
|
+
/* @__PURE__ */ jsxs48("span", { className: "ss-w-h2h-legend-item", children: [
|
|
6348
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-legend-dot ss-w-h2h-legend-dot--draw", "aria-hidden": "true" }),
|
|
6349
|
+
h2h.draws,
|
|
6350
|
+
" ",
|
|
6351
|
+
h2h.drawsLabel
|
|
6352
|
+
] }),
|
|
6353
|
+
/* @__PURE__ */ jsxs48("span", { className: "ss-w-h2h-legend-item", children: [
|
|
6354
|
+
/* @__PURE__ */ jsx53("span", { className: "ss-w-h2h-legend-dot ss-w-h2h-legend-dot--loss", "aria-hidden": "true" }),
|
|
6355
|
+
h2h.losses,
|
|
6356
|
+
" ",
|
|
6357
|
+
h2h.awayWinsLabel
|
|
6358
|
+
] })
|
|
6359
|
+
] })
|
|
6360
|
+
] })
|
|
6361
|
+
] })
|
|
6362
|
+
] });
|
|
6363
|
+
}
|
|
6364
|
+
|
|
6261
6365
|
// src/components/MonitorMatchCard.tsx
|
|
6262
|
-
import { jsx as
|
|
6366
|
+
import { jsx as jsx54, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6263
6367
|
function isPromoted(row, promotedPins) {
|
|
6264
6368
|
const chip = row.market;
|
|
6265
6369
|
if (!chip) return false;
|
|
@@ -6294,68 +6398,77 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip, onAsk }) {
|
|
|
6294
6398
|
const otherRows = match.statRows.filter((row) => !isPromoted(row, promotedPins));
|
|
6295
6399
|
const orderedRows = [...promotedRows, ...otherRows];
|
|
6296
6400
|
const kickoff = match.phase === "preMatch" && match.kickoffUtc ? ui.bettingKickoff(match.kickoffUtc) : void 0;
|
|
6297
|
-
return /* @__PURE__ */
|
|
6298
|
-
/* @__PURE__ */
|
|
6299
|
-
live && /* @__PURE__ */
|
|
6300
|
-
/* @__PURE__ */
|
|
6401
|
+
return /* @__PURE__ */ jsxs49("div", { className: "ss-w-mon", children: [
|
|
6402
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-top", children: [
|
|
6403
|
+
live && /* @__PURE__ */ jsxs49("span", { className: "ss-w-fandash-live-pill", children: [
|
|
6404
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
6301
6405
|
ui.liveLabel
|
|
6302
6406
|
] }),
|
|
6303
|
-
match.phase === "fullTime" && /* @__PURE__ */
|
|
6304
|
-
kickoff && /* @__PURE__ */
|
|
6407
|
+
match.phase === "fullTime" && /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-pill", children: ui.fullTimeLabel }),
|
|
6408
|
+
kickoff && /* @__PURE__ */ jsxs49("span", { className: "ss-w-mon-pill", children: [
|
|
6305
6409
|
kickoff.dayLabel,
|
|
6306
6410
|
" \xB7 ",
|
|
6307
6411
|
kickoff.time
|
|
6308
6412
|
] }),
|
|
6309
|
-
live && match.minuteLabel && /* @__PURE__ */
|
|
6310
|
-
match.competitionName && /* @__PURE__ */
|
|
6311
|
-
/* @__PURE__ */
|
|
6413
|
+
live && match.minuteLabel && /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-min", children: match.minuteLabel }),
|
|
6414
|
+
match.competitionName && /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-comp", children: match.competitionName }),
|
|
6415
|
+
/* @__PURE__ */ jsx54(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
6312
6416
|
] }),
|
|
6313
|
-
/* @__PURE__ */
|
|
6314
|
-
/* @__PURE__ */
|
|
6315
|
-
/* @__PURE__ */
|
|
6316
|
-
/* @__PURE__ */
|
|
6417
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-main", children: [
|
|
6418
|
+
/* @__PURE__ */ jsxs49("span", { className: "ss-w-mon-side", children: [
|
|
6419
|
+
/* @__PURE__ */ jsx54(Crest2, { kind: "team", url: match.homeCrestUrl ?? void 0, name: match.homeTeamName ?? void 0 }),
|
|
6420
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-name", children: match.homeTeamName })
|
|
6317
6421
|
] }),
|
|
6318
|
-
match.phase === "preMatch" ? /* @__PURE__ */
|
|
6422
|
+
match.phase === "preMatch" ? /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-vs", children: "vs" }) : /* @__PURE__ */ jsxs49("span", { className: "ss-w-mon-score", children: [
|
|
6319
6423
|
match.homeScore,
|
|
6320
|
-
/* @__PURE__ */
|
|
6424
|
+
/* @__PURE__ */ jsx54("i", { children: "\u2013" }),
|
|
6321
6425
|
match.awayScore
|
|
6322
6426
|
] }),
|
|
6323
|
-
/* @__PURE__ */
|
|
6324
|
-
/* @__PURE__ */
|
|
6325
|
-
/* @__PURE__ */
|
|
6427
|
+
/* @__PURE__ */ jsxs49("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: [
|
|
6428
|
+
/* @__PURE__ */ jsx54(Crest2, { kind: "team", url: match.awayCrestUrl ?? void 0, name: match.awayTeamName ?? void 0 }),
|
|
6429
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-name", children: match.awayTeamName })
|
|
6326
6430
|
] })
|
|
6327
6431
|
] }),
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6432
|
+
match.phase === "preMatch" && match.formAndH2H && /* @__PURE__ */ jsx54(
|
|
6433
|
+
MonitorFormH2H,
|
|
6434
|
+
{
|
|
6435
|
+
formAndH2H: match.formAndH2H,
|
|
6436
|
+
homeTeamName: match.homeTeamName,
|
|
6437
|
+
awayTeamName: match.awayTeamName,
|
|
6438
|
+
ui
|
|
6439
|
+
}
|
|
6440
|
+
),
|
|
6441
|
+
(homeScorers.length > 0 || awayScorers.length > 0) && /* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-scorers", children: [
|
|
6442
|
+
/* @__PURE__ */ jsx54("ul", { className: "ss-w-mon-scorers-col ss-w-mon-scorers-home", children: homeScorers.map((s, i) => /* @__PURE__ */ jsx54("li", { children: s.label }, `${s.player}-${i}`)) }),
|
|
6443
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-scorers-ball", "aria-hidden": "true", children: "\u26BD" }),
|
|
6444
|
+
/* @__PURE__ */ jsx54("ul", { className: "ss-w-mon-scorers-col ss-w-mon-scorers-away", children: awayScorers.map((s, i) => /* @__PURE__ */ jsx54("li", { children: s.label }, `${s.player}-${i}`)) })
|
|
6332
6445
|
] }),
|
|
6333
|
-
live && match.facts && match.facts.length > 0 && /* @__PURE__ */
|
|
6334
|
-
/* @__PURE__ */
|
|
6446
|
+
live && match.facts && match.facts.length > 0 && /* @__PURE__ */ jsx54(LiveFactBlock, { facts: match.facts, matchId: match.matchId, ui, slip, onAsk }),
|
|
6447
|
+
/* @__PURE__ */ jsx54("div", { className: "ss-w-mon-stats", children: orderedRows.map((row) => {
|
|
6335
6448
|
const total = row.homeNum + row.awayNum;
|
|
6336
6449
|
const homePct = total > 0 ? row.homeNum / total * 75 : 0;
|
|
6337
6450
|
const awayPct = total > 0 ? row.awayNum / total * 75 : 0;
|
|
6338
6451
|
const promoted = isPromoted(row, promotedPins);
|
|
6339
6452
|
const selection = chipSelection(row.market, match.matchId, slip.conversationId);
|
|
6340
|
-
return /* @__PURE__ */
|
|
6341
|
-
/* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6343
|
-
/* @__PURE__ */
|
|
6344
|
-
/* @__PURE__ */
|
|
6453
|
+
return /* @__PURE__ */ jsxs49("div", { className: promoted ? "ss-w-mon-stat ss-w-mon-pstrip" : "ss-w-mon-stat", children: [
|
|
6454
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-stat-row", children: [
|
|
6455
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-stat-v ss-w-mon-stat-v--home", children: row.homeValue }),
|
|
6456
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-stat-l", children: row.label }),
|
|
6457
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-stat-v ss-w-mon-stat-v--away", children: row.awayValue })
|
|
6345
6458
|
] }),
|
|
6346
|
-
/* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6348
|
-
/* @__PURE__ */
|
|
6459
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-bar", children: [
|
|
6460
|
+
/* @__PURE__ */ jsx54("b", { className: "ss-w-mon-bar-home", style: { width: `${homePct}%` } }),
|
|
6461
|
+
/* @__PURE__ */ jsx54("i", { className: "ss-w-mon-bar-away", style: { width: `${awayPct}%` } })
|
|
6349
6462
|
] }),
|
|
6350
|
-
row.market && !row.market.isSuspended && /* @__PURE__ */
|
|
6351
|
-
/* @__PURE__ */
|
|
6463
|
+
row.market && !row.market.isSuspended && /* @__PURE__ */ jsxs49("div", { className: promoted ? "ss-w-mon-stat-mkt ss-w-mon-mkt" : "ss-w-mon-stat-mkt", children: [
|
|
6464
|
+
/* @__PURE__ */ jsxs49("span", { children: [
|
|
6352
6465
|
row.market.marketLabel,
|
|
6353
6466
|
" \xB7 ",
|
|
6354
6467
|
row.market.selectionLabel
|
|
6355
6468
|
] }),
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
typeof row.market.price === "number" && /* @__PURE__ */
|
|
6358
|
-
/* @__PURE__ */
|
|
6469
|
+
/* @__PURE__ */ jsxs49("span", { className: "ss-w-mon-stat-mkt-right", children: [
|
|
6470
|
+
typeof row.market.price === "number" && /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-price", children: row.market.price.toFixed(2) }),
|
|
6471
|
+
/* @__PURE__ */ jsx54(
|
|
6359
6472
|
SlipButton,
|
|
6360
6473
|
{
|
|
6361
6474
|
selection,
|
|
@@ -6370,23 +6483,23 @@ function MonitorMatchCard({ match, promotedPins, monitor, ui, slip, onAsk }) {
|
|
|
6370
6483
|
] })
|
|
6371
6484
|
] }, row.label);
|
|
6372
6485
|
}) }),
|
|
6373
|
-
match.status === "stale" && /* @__PURE__ */
|
|
6374
|
-
match.momentum.length > 0 && /* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
6486
|
+
match.status === "stale" && /* @__PURE__ */ jsx54("span", { className: "ss-w-mon-asof", children: ui.asOf(formatTime(match.asOfUtc)) }),
|
|
6487
|
+
match.momentum.length > 0 && /* @__PURE__ */ jsxs49("div", { className: "ss-w-mon-mom", children: [
|
|
6488
|
+
/* @__PURE__ */ jsx54("span", { className: "ss-w-mon-stat-l", children: ui.momentumLabel }),
|
|
6489
|
+
/* @__PURE__ */ jsx54(MomentumWave, { points: match.momentum, clubIsHome: true })
|
|
6377
6490
|
] }),
|
|
6378
|
-
match.phase === "fullTime" && /* @__PURE__ */
|
|
6491
|
+
match.phase === "fullTime" && /* @__PURE__ */ jsx54("div", { className: "ss-w-mon-grace", children: ui.graceNote })
|
|
6379
6492
|
] });
|
|
6380
6493
|
}
|
|
6381
6494
|
|
|
6382
6495
|
// src/components/MonitorTabs.tsx
|
|
6383
|
-
import { jsx as
|
|
6496
|
+
import { jsx as jsx55, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6384
6497
|
function OddsLiveStrip({ m, ui }) {
|
|
6385
6498
|
const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
|
|
6386
6499
|
const stale = m.status === "stale";
|
|
6387
6500
|
if (!showScore && !m.minuteLabel && !(m.isSuspended && !m.isSettled) && !m.isSettled && !stale) return null;
|
|
6388
|
-
return /* @__PURE__ */
|
|
6389
|
-
showScore && /* @__PURE__ */
|
|
6501
|
+
return /* @__PURE__ */ jsxs50("div", { className: "ss-w-mk-live", children: [
|
|
6502
|
+
showScore && /* @__PURE__ */ jsxs50("b", { className: "ss-w-mk-live-score", children: [
|
|
6390
6503
|
m.homeTeamName,
|
|
6391
6504
|
" ",
|
|
6392
6505
|
m.homeScore,
|
|
@@ -6395,19 +6508,19 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
6395
6508
|
" ",
|
|
6396
6509
|
m.awayTeamName
|
|
6397
6510
|
] }),
|
|
6398
|
-
m.minuteLabel && /* @__PURE__ */
|
|
6399
|
-
m.isSuspended && !m.isSettled && /* @__PURE__ */
|
|
6400
|
-
m.isSettled && /* @__PURE__ */
|
|
6401
|
-
stale && /* @__PURE__ */
|
|
6511
|
+
m.minuteLabel && /* @__PURE__ */ jsx55("span", { className: "ss-w-mon-min", children: m.minuteLabel }),
|
|
6512
|
+
m.isSuspended && !m.isSettled && /* @__PURE__ */ jsx55("span", { className: "ss-w-mon-susp", children: ui.suspendedLabel }),
|
|
6513
|
+
m.isSettled && /* @__PURE__ */ jsx55("span", { className: "ss-w-mon-pill", children: ui.fullTimeLabel }),
|
|
6514
|
+
stale && /* @__PURE__ */ jsx55("span", { className: "ss-w-mon-asof", children: ui.asOf(new Date(m.asOfUtc).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })) })
|
|
6402
6515
|
] });
|
|
6403
6516
|
}
|
|
6404
6517
|
function MatchesPanel({ monitor, ui, slip, onAsk }) {
|
|
6405
6518
|
const matches = (monitor.snapshot?.matches ?? []).filter((m) => monitor.pins.some((p) => p.kind === "match" && p.matchId === m.matchId));
|
|
6406
6519
|
if (matches.length === 0) {
|
|
6407
|
-
return monitor.pins.some((p) => p.kind === "match") ? /* @__PURE__ */
|
|
6520
|
+
return monitor.pins.some((p) => p.kind === "match") ? /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-list" }) : /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
|
|
6408
6521
|
}
|
|
6409
|
-
return /* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6522
|
+
return /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-list", children: matches.map((m) => /* @__PURE__ */ jsxs50("div", { className: "ss-w-mon-item", children: [
|
|
6523
|
+
/* @__PURE__ */ jsx55(
|
|
6411
6524
|
MonitorMatchCard,
|
|
6412
6525
|
{
|
|
6413
6526
|
match: m,
|
|
@@ -6418,7 +6531,7 @@ function MatchesPanel({ monitor, ui, slip, onAsk }) {
|
|
|
6418
6531
|
onAsk
|
|
6419
6532
|
}
|
|
6420
6533
|
),
|
|
6421
|
-
/* @__PURE__ */
|
|
6534
|
+
/* @__PURE__ */ jsx55(MarketAccordion, { match: m, monitor, ui, slip })
|
|
6422
6535
|
] }, m.matchId)) });
|
|
6423
6536
|
}
|
|
6424
6537
|
function withSinceViewMovement(vm, prev) {
|
|
@@ -6434,12 +6547,12 @@ function withSinceViewMovement(vm, prev) {
|
|
|
6434
6547
|
function OddsPanel({ monitor, ui, slip }) {
|
|
6435
6548
|
const slipState = useSlipState();
|
|
6436
6549
|
const markets = (monitor.snapshot?.markets ?? []).filter((m) => monitor.pins.some((p) => p.key === m.key));
|
|
6437
|
-
if (markets.length === 0) return /* @__PURE__ */
|
|
6438
|
-
return /* @__PURE__ */
|
|
6550
|
+
if (markets.length === 0) return /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-empty", children: ui.emptyOddsTab });
|
|
6551
|
+
return /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-list", children: markets.map((m) => {
|
|
6439
6552
|
const pin = monitor.pins.find((p) => p.key === m.key);
|
|
6440
|
-
return /* @__PURE__ */
|
|
6441
|
-
/* @__PURE__ */
|
|
6442
|
-
m.card && /* @__PURE__ */
|
|
6553
|
+
return /* @__PURE__ */ jsxs50("div", { className: "ss-w-mon-oddspin", "data-settled": m.isSettled || void 0, children: [
|
|
6554
|
+
/* @__PURE__ */ jsx55(OddsLiveStrip, { m, ui }),
|
|
6555
|
+
m.card && /* @__PURE__ */ jsx55(
|
|
6443
6556
|
MarketOddsCardList,
|
|
6444
6557
|
{
|
|
6445
6558
|
cards: [withSinceViewMovement(toMarketOddsVM(m.card), monitor.lastViewedPrices[m.key])],
|
|
@@ -6450,14 +6563,14 @@ function OddsPanel({ monitor, ui, slip }) {
|
|
|
6450
6563
|
inSlipIds: slipState?.added
|
|
6451
6564
|
}
|
|
6452
6565
|
),
|
|
6453
|
-
m.history && /* @__PURE__ */
|
|
6454
|
-
!m.card && !m.history && /* @__PURE__ */
|
|
6566
|
+
m.history && /* @__PURE__ */ jsx55(OddsMovementCardList, { cards: [toOddsMovementVM(m.history)], ui }),
|
|
6567
|
+
!m.card && !m.history && /* @__PURE__ */ jsx55("div", { className: "ss-w-mon-empty-card", children: ui.oddsUnavailable })
|
|
6455
6568
|
] }, m.key);
|
|
6456
6569
|
}) });
|
|
6457
6570
|
}
|
|
6458
6571
|
|
|
6459
6572
|
// src/components/TodayPanel.tsx
|
|
6460
|
-
import { useEffect as useEffect26, useId as useId2, useMemo as useMemo4, useState as
|
|
6573
|
+
import { useEffect as useEffect26, useId as useId2, useMemo as useMemo4, useState as useState35 } from "react";
|
|
6461
6574
|
|
|
6462
6575
|
// src/placement.ts
|
|
6463
6576
|
function placeLeagues(visible, pinnedMatchIds) {
|
|
@@ -6520,9 +6633,9 @@ function matchingFixtures(group, query) {
|
|
|
6520
6633
|
}
|
|
6521
6634
|
|
|
6522
6635
|
// src/useStarTap.ts
|
|
6523
|
-
import { useCallback as useCallback18, useRef as useRef23, useState as
|
|
6636
|
+
import { useCallback as useCallback18, useRef as useRef23, useState as useState33 } from "react";
|
|
6524
6637
|
function useStarTap(starLeague) {
|
|
6525
|
-
const [pendingId, setPendingId] =
|
|
6638
|
+
const [pendingId, setPendingId] = useState33(null);
|
|
6526
6639
|
const pendingRef = useRef23(null);
|
|
6527
6640
|
const tap = useCallback18(async (competitionId, next) => {
|
|
6528
6641
|
if (pendingRef.current !== null) return false;
|
|
@@ -6539,25 +6652,25 @@ function useStarTap(starLeague) {
|
|
|
6539
6652
|
}
|
|
6540
6653
|
|
|
6541
6654
|
// src/components/LeagueTile.tsx
|
|
6542
|
-
import { jsx as
|
|
6655
|
+
import { jsx as jsx56, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
6543
6656
|
var STAR_PATH = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
6544
6657
|
function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen, starTap, ui }) {
|
|
6545
6658
|
const onStarClick = () => {
|
|
6546
6659
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
6547
6660
|
};
|
|
6548
|
-
return /* @__PURE__ */
|
|
6549
|
-
/* @__PURE__ */
|
|
6550
|
-
/* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */
|
|
6661
|
+
return /* @__PURE__ */ jsxs51("div", { className: "ss-w-today-tile", children: [
|
|
6662
|
+
/* @__PURE__ */ jsxs51("button", { type: "button", className: "ss-w-today-tile-body", onClick: onOpen, children: [
|
|
6663
|
+
/* @__PURE__ */ jsx56(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6664
|
+
/* @__PURE__ */ jsxs51("span", { className: "ss-w-today-tile-name", children: [
|
|
6552
6665
|
group.competitionName,
|
|
6553
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
6666
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs51("span", { className: "ss-w-today-tile-country", children: [
|
|
6554
6667
|
" (",
|
|
6555
6668
|
group.competitionCountry,
|
|
6556
6669
|
")"
|
|
6557
6670
|
] }) : null
|
|
6558
6671
|
] })
|
|
6559
6672
|
] }),
|
|
6560
|
-
/* @__PURE__ */
|
|
6673
|
+
/* @__PURE__ */ jsx56(
|
|
6561
6674
|
"button",
|
|
6562
6675
|
{
|
|
6563
6676
|
type: "button",
|
|
@@ -6566,7 +6679,7 @@ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen
|
|
|
6566
6679
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6567
6680
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
6568
6681
|
onClick: onStarClick,
|
|
6569
|
-
children: /* @__PURE__ */
|
|
6682
|
+
children: /* @__PURE__ */ jsx56("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx56(
|
|
6570
6683
|
"path",
|
|
6571
6684
|
{
|
|
6572
6685
|
d: STAR_PATH,
|
|
@@ -6583,18 +6696,18 @@ function LeagueTile({ group, starClickable: starClickable2, disambiguate, onOpen
|
|
|
6583
6696
|
}
|
|
6584
6697
|
|
|
6585
6698
|
// src/components/LeagueDetail.tsx
|
|
6586
|
-
import { useEffect as useEffect25, useState as
|
|
6699
|
+
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
6587
6700
|
|
|
6588
6701
|
// src/components/FixtureRow.tsx
|
|
6589
|
-
import { jsx as
|
|
6702
|
+
import { jsx as jsx57, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
6590
6703
|
function kickoffLabel(kickoffUnix) {
|
|
6591
6704
|
const d = new Date(kickoffUnix * 1e3);
|
|
6592
6705
|
return `${`${d.getHours()}`.padStart(2, "0")}:${`${d.getMinutes()}`.padStart(2, "0")}`;
|
|
6593
6706
|
}
|
|
6594
6707
|
function Side({ name, crest, away = false }) {
|
|
6595
|
-
return /* @__PURE__ */
|
|
6596
|
-
crest ? /* @__PURE__ */
|
|
6597
|
-
/* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ jsxs52("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
6709
|
+
crest ? /* @__PURE__ */ jsx57("img", { className: "ss-w-drow-crest", src: crest, alt: "" }) : null,
|
|
6710
|
+
/* @__PURE__ */ jsx57("span", { className: "ss-w-drow-nm", children: name })
|
|
6598
6711
|
] });
|
|
6599
6712
|
}
|
|
6600
6713
|
function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
@@ -6603,22 +6716,22 @@ function FixtureRow({ match, state, stale, ui, monitor }) {
|
|
|
6603
6716
|
const score = hasScore ? `${state.homeScore}\u2013${state.awayScore}` : void 0;
|
|
6604
6717
|
const ticked = state?.phase === "live" ? state.minuteLabel ?? null : null;
|
|
6605
6718
|
const when = state?.isHalfTime && !stale ? ui.halfTime : isLive ? ticked ?? "\u2014" : state?.phase === "live" ? "\u2014" : kickoffLabel(match.kickoffUnix);
|
|
6606
|
-
return /* @__PURE__ */
|
|
6607
|
-
/* @__PURE__ */
|
|
6608
|
-
/* @__PURE__ */
|
|
6609
|
-
/* @__PURE__ */
|
|
6610
|
-
/* @__PURE__ */
|
|
6611
|
-
/* @__PURE__ */
|
|
6719
|
+
return /* @__PURE__ */ jsxs52("div", { className: isLive || state?.isHalfTime ? "ss-w-drow ss-w-drow--live" : "ss-w-drow", children: [
|
|
6720
|
+
/* @__PURE__ */ jsx57("span", { className: isLive || state?.isHalfTime ? "ss-w-drow-when ss-w-drow-when--live" : "ss-w-drow-when", children: when }),
|
|
6721
|
+
/* @__PURE__ */ jsxs52("span", { className: "ss-w-drow-fx", children: [
|
|
6722
|
+
/* @__PURE__ */ jsx57(Side, { name: match.homeTeamName, crest: match.homeTeamImagePath }),
|
|
6723
|
+
/* @__PURE__ */ jsx57("span", { className: hasScore ? "ss-w-drow-sc" : "ss-w-drow-sc ss-w-drow-sc--idle", children: score ?? "\u2013" }),
|
|
6724
|
+
/* @__PURE__ */ jsx57(Side, { name: match.awayTeamName, crest: match.awayTeamImagePath, away: true })
|
|
6612
6725
|
] }),
|
|
6613
|
-
/* @__PURE__ */
|
|
6726
|
+
/* @__PURE__ */ jsx57(PinToggle, { ui, monitor, pin: { kind: "match", matchId: match.matchId } })
|
|
6614
6727
|
] });
|
|
6615
6728
|
}
|
|
6616
6729
|
|
|
6617
6730
|
// src/components/LeagueDetail.tsx
|
|
6618
|
-
import { jsx as
|
|
6731
|
+
import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
6619
6732
|
var STAR_PATH2 = "M12 2.5l2.9 5.9 6.5.95-4.7 4.58 1.1 6.47L12 17.35 6.1 20.4l1.1-6.47L2.5 9.35l6.5-.95z";
|
|
6620
6733
|
function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, onBack, onPrev, onNext }) {
|
|
6621
|
-
const [toast, setToast] =
|
|
6734
|
+
const [toast, setToast] = useState34(null);
|
|
6622
6735
|
useEffect25(() => {
|
|
6623
6736
|
setToast(null);
|
|
6624
6737
|
}, [group.competitionId]);
|
|
@@ -6634,12 +6747,12 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6634
6747
|
if (ok) setToast(next ? ui.starredToast : ui.unstarredToast);
|
|
6635
6748
|
});
|
|
6636
6749
|
};
|
|
6637
|
-
return /* @__PURE__ */
|
|
6638
|
-
/* @__PURE__ */
|
|
6639
|
-
/* @__PURE__ */
|
|
6640
|
-
/* @__PURE__ */
|
|
6641
|
-
/* @__PURE__ */
|
|
6642
|
-
/* @__PURE__ */
|
|
6750
|
+
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-today-detail", children: [
|
|
6751
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-today-detail-head", children: [
|
|
6752
|
+
/* @__PURE__ */ jsx58("button", { type: "button", className: "ss-w-today-detail-back", "aria-label": ui.back, onClick: onBack, children: /* @__PURE__ */ jsx58(ChevronIcon, {}) }),
|
|
6753
|
+
/* @__PURE__ */ jsx58(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6754
|
+
/* @__PURE__ */ jsx58("span", { className: "ss-w-today-detail-name", children: group.competitionName }),
|
|
6755
|
+
/* @__PURE__ */ jsx58(
|
|
6643
6756
|
"button",
|
|
6644
6757
|
{
|
|
6645
6758
|
type: "button",
|
|
@@ -6648,7 +6761,7 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6648
6761
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6649
6762
|
disabled: starTap.pendingId !== null,
|
|
6650
6763
|
onClick: onStarClick,
|
|
6651
|
-
children: /* @__PURE__ */
|
|
6764
|
+
children: /* @__PURE__ */ jsx58("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx58(
|
|
6652
6765
|
"path",
|
|
6653
6766
|
{
|
|
6654
6767
|
d: STAR_PATH2,
|
|
@@ -6662,8 +6775,8 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6662
6775
|
}
|
|
6663
6776
|
)
|
|
6664
6777
|
] }),
|
|
6665
|
-
/* @__PURE__ */
|
|
6666
|
-
/* @__PURE__ */
|
|
6778
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-today-detail-nav", children: [
|
|
6779
|
+
/* @__PURE__ */ jsx58(
|
|
6667
6780
|
"button",
|
|
6668
6781
|
{
|
|
6669
6782
|
type: "button",
|
|
@@ -6671,11 +6784,11 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6671
6784
|
"aria-label": ui.prevLeagueLabel,
|
|
6672
6785
|
disabled: position.index <= 1,
|
|
6673
6786
|
onClick: onPrev,
|
|
6674
|
-
children: /* @__PURE__ */
|
|
6787
|
+
children: /* @__PURE__ */ jsx58(ChevronIcon, {})
|
|
6675
6788
|
}
|
|
6676
6789
|
),
|
|
6677
|
-
/* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6790
|
+
/* @__PURE__ */ jsx58("span", { className: "ss-w-today-detail-pos", children: ui.leagueDetailPosition(position.index, position.total) }),
|
|
6791
|
+
/* @__PURE__ */ jsx58(
|
|
6679
6792
|
"button",
|
|
6680
6793
|
{
|
|
6681
6794
|
type: "button",
|
|
@@ -6683,20 +6796,20 @@ function LeagueDetail({ group, position, states, stale, ui, monitor, starTap, on
|
|
|
6683
6796
|
"aria-label": ui.nextLeagueLabel,
|
|
6684
6797
|
disabled: position.index >= position.total,
|
|
6685
6798
|
onClick: onNext,
|
|
6686
|
-
children: /* @__PURE__ */
|
|
6799
|
+
children: /* @__PURE__ */ jsx58(ChevronIcon, {})
|
|
6687
6800
|
}
|
|
6688
6801
|
)
|
|
6689
6802
|
] }),
|
|
6690
|
-
/* @__PURE__ */
|
|
6691
|
-
/* @__PURE__ */
|
|
6692
|
-
own.map((m) => /* @__PURE__ */
|
|
6803
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-today-detail-body", children: [
|
|
6804
|
+
/* @__PURE__ */ jsx58("span", { className: "ss-w-today-detail-count", children: own.length }),
|
|
6805
|
+
own.map((m) => /* @__PURE__ */ jsx58(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId))
|
|
6693
6806
|
] }),
|
|
6694
|
-
toast !== null && /* @__PURE__ */
|
|
6807
|
+
toast !== null && /* @__PURE__ */ jsx58("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast })
|
|
6695
6808
|
] });
|
|
6696
6809
|
}
|
|
6697
6810
|
|
|
6698
6811
|
// src/components/LeagueRowGroup.tsx
|
|
6699
|
-
import { jsx as
|
|
6812
|
+
import { jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6700
6813
|
var ROW_CAP_PER_LEAGUE = 3;
|
|
6701
6814
|
var SECTION_ROW_BUDGET = 12;
|
|
6702
6815
|
function rowsFor(group, states, stale) {
|
|
@@ -6712,20 +6825,20 @@ function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickabl
|
|
|
6712
6825
|
const onStarClick = () => {
|
|
6713
6826
|
void starTap.tap(group.competitionId, !group.isStarred);
|
|
6714
6827
|
};
|
|
6715
|
-
return /* @__PURE__ */
|
|
6716
|
-
/* @__PURE__ */
|
|
6717
|
-
/* @__PURE__ */
|
|
6718
|
-
/* @__PURE__ */
|
|
6719
|
-
/* @__PURE__ */
|
|
6828
|
+
return /* @__PURE__ */ jsxs54("div", { className: "ss-w-today-rowgroup", children: [
|
|
6829
|
+
/* @__PURE__ */ jsxs54("div", { className: "ss-w-today-rowgroup-head", children: [
|
|
6830
|
+
/* @__PURE__ */ jsxs54("button", { type: "button", className: "ss-w-today-rowgroup-head-body", onClick: onOpen, children: [
|
|
6831
|
+
/* @__PURE__ */ jsx59(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
6832
|
+
/* @__PURE__ */ jsxs54("span", { className: "ss-w-today-rowgroup-name", children: [
|
|
6720
6833
|
group.competitionName,
|
|
6721
|
-
disambiguate && group.competitionCountry ? /* @__PURE__ */
|
|
6834
|
+
disambiguate && group.competitionCountry ? /* @__PURE__ */ jsxs54("span", { className: "ss-w-today-tile-country", children: [
|
|
6722
6835
|
" (",
|
|
6723
6836
|
group.competitionCountry,
|
|
6724
6837
|
")"
|
|
6725
6838
|
] }) : null
|
|
6726
6839
|
] })
|
|
6727
6840
|
] }),
|
|
6728
|
-
/* @__PURE__ */
|
|
6841
|
+
/* @__PURE__ */ jsx59(
|
|
6729
6842
|
"button",
|
|
6730
6843
|
{
|
|
6731
6844
|
type: "button",
|
|
@@ -6734,7 +6847,7 @@ function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickabl
|
|
|
6734
6847
|
"aria-label": group.isStarred ? ui.starOffLabel : ui.starOnLabel,
|
|
6735
6848
|
disabled: !starClickable2 || starTap.pendingId !== null,
|
|
6736
6849
|
onClick: onStarClick,
|
|
6737
|
-
children: /* @__PURE__ */
|
|
6850
|
+
children: /* @__PURE__ */ jsx59("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx59(
|
|
6738
6851
|
"path",
|
|
6739
6852
|
{
|
|
6740
6853
|
d: STAR_PATH3,
|
|
@@ -6748,8 +6861,8 @@ function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickabl
|
|
|
6748
6861
|
}
|
|
6749
6862
|
)
|
|
6750
6863
|
] }),
|
|
6751
|
-
/* @__PURE__ */
|
|
6752
|
-
overflow > 0 && /* @__PURE__ */
|
|
6864
|
+
/* @__PURE__ */ jsx59("div", { className: "ss-w-today-rowgroup-rows", children: shown.map((m) => /* @__PURE__ */ jsx59(FixtureRow, { match: m, state: states[m.matchId], stale, ui, monitor }, m.matchId)) }),
|
|
6865
|
+
overflow > 0 && /* @__PURE__ */ jsx59("button", { type: "button", className: "ss-w-today-rowgroup-seeall", onClick: onOpen, children: ui.seeAllFixturesLabel(sorted.length) })
|
|
6753
6866
|
] });
|
|
6754
6867
|
}
|
|
6755
6868
|
|
|
@@ -6757,8 +6870,8 @@ function LeagueRowGroup({ group, states, stale, cap, starClickable: starClickabl
|
|
|
6757
6870
|
import { useCallback as useCallback19, useRef as useRef24 } from "react";
|
|
6758
6871
|
|
|
6759
6872
|
// src/components/games/ui/icons.tsx
|
|
6760
|
-
import { jsx as
|
|
6761
|
-
var svg = (size, children, fill = false) => /* @__PURE__ */
|
|
6873
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
6874
|
+
var svg = (size, children, fill = false) => /* @__PURE__ */ jsx60(
|
|
6762
6875
|
"svg",
|
|
6763
6876
|
{
|
|
6764
6877
|
width: size,
|
|
@@ -6773,25 +6886,25 @@ var svg = (size, children, fill = false) => /* @__PURE__ */ jsx59(
|
|
|
6773
6886
|
children
|
|
6774
6887
|
}
|
|
6775
6888
|
);
|
|
6776
|
-
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6777
|
-
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */
|
|
6778
|
-
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */
|
|
6779
|
-
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6780
|
-
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6781
|
-
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */
|
|
6782
|
-
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */
|
|
6783
|
-
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6784
|
-
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */
|
|
6785
|
-
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6786
|
-
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6787
|
-
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6788
|
-
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */
|
|
6789
|
-
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6790
|
-
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */
|
|
6791
|
-
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */
|
|
6889
|
+
var IconChevronLeft = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M15 18l-6-6 6-6" }));
|
|
6890
|
+
var IconLock = ({ size = 14 }) => svg(size, [/* @__PURE__ */ jsx60("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }, "a"), /* @__PURE__ */ jsx60("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" }, "b")]);
|
|
6891
|
+
var IconCheck = ({ size = 14 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M5 12l5 5 9-10" }));
|
|
6892
|
+
var IconClose = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
6893
|
+
var IconSearch = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx60("circle", { cx: "11", cy: "11", r: "7" }, "a"), /* @__PURE__ */ jsx60("path", { d: "M20 20l-3.5-3.5" }, "b")]);
|
|
6894
|
+
var IconPlus = ({ size = 20 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M12 5v14M5 12h14" }));
|
|
6895
|
+
var IconBulb = ({ size = 16 }) => svg(size, [/* @__PURE__ */ jsx60("path", { d: "M9 18h6M10 21h4" }, "a"), /* @__PURE__ */ jsx60("path", { d: "M12 3a6 6 0 0 0-3.5 10.9V16h7v-2.1A6 6 0 0 0 12 3z" }, "b")]);
|
|
6896
|
+
var IconArrowUp = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M12 19V5M5 12l7-7 7 7" }));
|
|
6897
|
+
var IconArrowDown = ({ size = 12 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M12 5v14M19 12l-7 7-7-7" }));
|
|
6898
|
+
var IconCalendar = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx60("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }, "a"), /* @__PURE__ */ jsx60("path", { d: "M4 10h16M9 3v4M15 3v4" }, "b")]);
|
|
6899
|
+
var IconShield = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M12 3l7 3v6c0 5-3 8-7 9-4-1-7-4-7-9V6z" }));
|
|
6900
|
+
var IconFlag = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M5 21V4M5 4h12l-2 4 2 4H5" }));
|
|
6901
|
+
var IconBall = ({ size = 18 }) => svg(size, [/* @__PURE__ */ jsx60("circle", { cx: "12", cy: "12", r: "9" }, "a"), /* @__PURE__ */ jsx60("path", { d: "M12 7l4 3-1.5 4.5h-5L8 10z" }, "b")]);
|
|
6902
|
+
var IconBoot = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M4 6h6l1 6 8 3v3H4z" }));
|
|
6903
|
+
var IconGloves = ({ size = 18 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M7 21v-8l-2-3V6a1.5 1.5 0 0 1 3 0v3V4a1.5 1.5 0 0 1 3 0v5V3.5a1.5 1.5 0 0 1 3 0V9V5a1.5 1.5 0 0 1 3 0v9l-2 3v4z" }));
|
|
6904
|
+
var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ jsx60("path", { d: "M12 3c1 4 5 5 5 10a5 5 0 0 1-10 0c0-3 2-4 2-7 1.5 1 2 2 2 3 1-2 1-4 1-6z" }), true);
|
|
6792
6905
|
|
|
6793
6906
|
// src/components/games/ui/SearchField.tsx
|
|
6794
|
-
import { jsx as
|
|
6907
|
+
import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6795
6908
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
6796
6909
|
const localRef = useRef24(null);
|
|
6797
6910
|
const setInputRef = useCallback19((node) => {
|
|
@@ -6799,11 +6912,11 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6799
6912
|
if (typeof inputRef === "function") inputRef(node);
|
|
6800
6913
|
else if (inputRef) inputRef.current = node;
|
|
6801
6914
|
}, [inputRef]);
|
|
6802
|
-
return /* @__PURE__ */
|
|
6803
|
-
/* @__PURE__ */
|
|
6804
|
-
/* @__PURE__ */
|
|
6805
|
-
/* @__PURE__ */
|
|
6806
|
-
/* @__PURE__ */
|
|
6915
|
+
return /* @__PURE__ */ jsxs55("div", { className: "ss-g-search", children: [
|
|
6916
|
+
/* @__PURE__ */ jsx61("label", { htmlFor: id, className: labelHidden ? "ss-g-sr" : "ss-g-search-label", children: label }),
|
|
6917
|
+
/* @__PURE__ */ jsxs55("div", { className: "ss-g-search-box", children: [
|
|
6918
|
+
/* @__PURE__ */ jsx61(IconSearch, {}),
|
|
6919
|
+
/* @__PURE__ */ jsx61(
|
|
6807
6920
|
"input",
|
|
6808
6921
|
{
|
|
6809
6922
|
id,
|
|
@@ -6817,7 +6930,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6817
6930
|
onChange: (e) => onChange(e.target.value)
|
|
6818
6931
|
}
|
|
6819
6932
|
),
|
|
6820
|
-
clearLabel && value.length > 0 ? /* @__PURE__ */
|
|
6933
|
+
clearLabel && value.length > 0 ? /* @__PURE__ */ jsx61(
|
|
6821
6934
|
"button",
|
|
6822
6935
|
{
|
|
6823
6936
|
type: "button",
|
|
@@ -6827,7 +6940,7 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6827
6940
|
onChange("");
|
|
6828
6941
|
localRef.current?.focus();
|
|
6829
6942
|
},
|
|
6830
|
-
children: /* @__PURE__ */
|
|
6943
|
+
children: /* @__PURE__ */ jsx61(IconClose, { size: 11 })
|
|
6831
6944
|
}
|
|
6832
6945
|
) : null
|
|
6833
6946
|
] })
|
|
@@ -6835,13 +6948,13 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6835
6948
|
}
|
|
6836
6949
|
|
|
6837
6950
|
// src/components/TodayPanel.tsx
|
|
6838
|
-
import { Fragment as
|
|
6951
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6839
6952
|
function TodayPanel({ discovery, ui, monitor }) {
|
|
6840
6953
|
const { groups, states, stale, starLeague } = discovery;
|
|
6841
6954
|
const searchId = useId2();
|
|
6842
|
-
const [query, setQuery] =
|
|
6843
|
-
const [selectedCompetitionId, setSelectedCompetitionId] =
|
|
6844
|
-
const [toast, setToast] =
|
|
6955
|
+
const [query, setQuery] = useState35("");
|
|
6956
|
+
const [selectedCompetitionId, setSelectedCompetitionId] = useState35(null);
|
|
6957
|
+
const [toast, setToast] = useState35(null);
|
|
6845
6958
|
useEffect26(() => {
|
|
6846
6959
|
if (toast === null) return;
|
|
6847
6960
|
const id = setTimeout(() => setToast(null), 4e3);
|
|
@@ -6892,12 +7005,12 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6892
7005
|
if (selectedCompetitionId !== null && openGroup === void 0) setSelectedCompetitionId(null);
|
|
6893
7006
|
}, [selectedCompetitionId, openGroup]);
|
|
6894
7007
|
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);
|
|
6895
|
-
const liveBand = liveRows.length > 0 && /* @__PURE__ */
|
|
6896
|
-
/* @__PURE__ */
|
|
6897
|
-
/* @__PURE__ */
|
|
7008
|
+
const liveBand = liveRows.length > 0 && /* @__PURE__ */ jsxs56(Fragment9, { children: [
|
|
7009
|
+
/* @__PURE__ */ jsxs56("div", { className: "ss-w-sec-head", children: [
|
|
7010
|
+
/* @__PURE__ */ jsx62("span", { className: "ss-w-sec-dot", "aria-hidden": "true" }),
|
|
6898
7011
|
ui.sectionLive
|
|
6899
7012
|
] }),
|
|
6900
|
-
/* @__PURE__ */
|
|
7013
|
+
/* @__PURE__ */ jsx62("div", { className: "ss-w-today-live", children: liveRows.map(({ match }) => /* @__PURE__ */ jsx62(
|
|
6901
7014
|
FixtureRow,
|
|
6902
7015
|
{
|
|
6903
7016
|
match,
|
|
@@ -6910,10 +7023,10 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6910
7023
|
)) })
|
|
6911
7024
|
] });
|
|
6912
7025
|
if (openGroup !== void 0) {
|
|
6913
|
-
return /* @__PURE__ */
|
|
6914
|
-
stale && /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ jsx62("div", { className: "ss-w-today-root", children: /* @__PURE__ */ jsxs56("div", { className: "ss-w-mon-list", children: [
|
|
7027
|
+
stale && /* @__PURE__ */ jsx62("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6915
7028
|
liveBand,
|
|
6916
|
-
/* @__PURE__ */
|
|
7029
|
+
/* @__PURE__ */ jsx62(
|
|
6917
7030
|
LeagueDetail,
|
|
6918
7031
|
{
|
|
6919
7032
|
group: openGroup,
|
|
@@ -6934,11 +7047,11 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6934
7047
|
}
|
|
6935
7048
|
const searching = query.trim().length > 0;
|
|
6936
7049
|
const searchResults = searching ? placement.order.filter((g) => matchesQuery(g, query)) : [];
|
|
6937
|
-
return /* @__PURE__ */
|
|
6938
|
-
/* @__PURE__ */
|
|
6939
|
-
stale && /* @__PURE__ */
|
|
7050
|
+
return /* @__PURE__ */ jsxs56("div", { className: "ss-w-today-root", children: [
|
|
7051
|
+
/* @__PURE__ */ jsxs56("div", { className: "ss-w-mon-list", children: [
|
|
7052
|
+
stale && /* @__PURE__ */ jsx62("div", { className: "ss-w-stale", children: ui.staleStates }),
|
|
6940
7053
|
!searching && liveBand,
|
|
6941
|
-
/* @__PURE__ */
|
|
7054
|
+
/* @__PURE__ */ jsx62(
|
|
6942
7055
|
SearchField,
|
|
6943
7056
|
{
|
|
6944
7057
|
id: searchId,
|
|
@@ -6950,19 +7063,19 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6950
7063
|
clearLabel: ui.clearSearchLabel
|
|
6951
7064
|
}
|
|
6952
7065
|
),
|
|
6953
|
-
searching ? searchResults.length === 0 ? /* @__PURE__ */
|
|
6954
|
-
/* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
7066
|
+
searching ? searchResults.length === 0 ? /* @__PURE__ */ jsx62("div", { className: "ss-w-today-empty", children: ui.noLeagueResults }) : /* @__PURE__ */ jsx62(Fragment9, { children: searchResults.map((group) => /* @__PURE__ */ jsxs56("div", { className: "ss-w-today-search-block", children: [
|
|
7067
|
+
/* @__PURE__ */ jsxs56("div", { className: "ss-w-today-search-group", children: [
|
|
7068
|
+
/* @__PURE__ */ jsx62(Crest2, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
7069
|
+
/* @__PURE__ */ jsxs56("span", { className: "ss-w-today-search-group-name", children: [
|
|
6957
7070
|
group.competitionName,
|
|
6958
|
-
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */
|
|
7071
|
+
(nameCounts[group.competitionName] ?? 0) > 1 && group.competitionCountry ? /* @__PURE__ */ jsxs56("span", { className: "ss-w-today-tile-country", children: [
|
|
6959
7072
|
" (",
|
|
6960
7073
|
group.competitionCountry,
|
|
6961
7074
|
")"
|
|
6962
7075
|
] }) : null
|
|
6963
7076
|
] })
|
|
6964
7077
|
] }),
|
|
6965
|
-
matchingFixtures(group, query).map((match) => /* @__PURE__ */
|
|
7078
|
+
matchingFixtures(group, query).map((match) => /* @__PURE__ */ jsx62(
|
|
6966
7079
|
"div",
|
|
6967
7080
|
{
|
|
6968
7081
|
role: "button",
|
|
@@ -6976,17 +7089,17 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
6976
7089
|
setSelectedCompetitionId(group.competitionId);
|
|
6977
7090
|
}
|
|
6978
7091
|
},
|
|
6979
|
-
children: /* @__PURE__ */
|
|
7092
|
+
children: /* @__PURE__ */ jsx62(FixtureRow, { match, state: states[match.matchId], stale, ui, monitor })
|
|
6980
7093
|
},
|
|
6981
7094
|
match.matchId
|
|
6982
7095
|
))
|
|
6983
|
-
] }, group.competitionId)) }) : /* @__PURE__ */
|
|
6984
|
-
/* @__PURE__ */
|
|
7096
|
+
] }, group.competitionId)) }) : /* @__PURE__ */ jsxs56(Fragment9, { children: [
|
|
7097
|
+
/* @__PURE__ */ jsxs56("div", { className: "ss-w-today-sec", children: [
|
|
6985
7098
|
placement.personal ? ui.yourLeagues : ui.topLeagues,
|
|
6986
|
-
!placement.personal && /* @__PURE__ */
|
|
7099
|
+
!placement.personal && /* @__PURE__ */ jsx62("span", { className: "ss-w-today-sec-sub", children: ui.topLeaguesSub })
|
|
6987
7100
|
] }),
|
|
6988
|
-
/* @__PURE__ */
|
|
6989
|
-
rowedCandidates.map((group) => /* @__PURE__ */
|
|
7101
|
+
/* @__PURE__ */ jsxs56("div", { className: "ss-w-today-rowsection", children: [
|
|
7102
|
+
rowedCandidates.map((group) => /* @__PURE__ */ jsx62(
|
|
6990
7103
|
LeagueRowGroup,
|
|
6991
7104
|
{
|
|
6992
7105
|
group,
|
|
@@ -7002,7 +7115,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
7002
7115
|
},
|
|
7003
7116
|
group.competitionId
|
|
7004
7117
|
)),
|
|
7005
|
-
tiledCandidates.length > 0 && /* @__PURE__ */
|
|
7118
|
+
tiledCandidates.length > 0 && /* @__PURE__ */ jsx62("div", { className: "ss-w-today-tiles", children: tiledCandidates.map((group) => /* @__PURE__ */ jsx62(
|
|
7006
7119
|
LeagueTile,
|
|
7007
7120
|
{
|
|
7008
7121
|
group,
|
|
@@ -7015,8 +7128,8 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
7015
7128
|
group.competitionId
|
|
7016
7129
|
)) })
|
|
7017
7130
|
] }),
|
|
7018
|
-
/* @__PURE__ */
|
|
7019
|
-
/* @__PURE__ */
|
|
7131
|
+
/* @__PURE__ */ jsx62("div", { className: "ss-w-today-sec", children: ui.allLeagues }),
|
|
7132
|
+
/* @__PURE__ */ jsx62("div", { className: "ss-w-today-tiles", children: placement.others.map((group) => /* @__PURE__ */ jsx62(
|
|
7020
7133
|
LeagueTile,
|
|
7021
7134
|
{
|
|
7022
7135
|
group,
|
|
@@ -7030,21 +7143,21 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
7030
7143
|
)) })
|
|
7031
7144
|
] })
|
|
7032
7145
|
] }),
|
|
7033
|
-
toast !== null && /* @__PURE__ */
|
|
7146
|
+
toast !== null && /* @__PURE__ */ jsx62("p", { className: "ss-w-today-toast", role: "status", "aria-live": "polite", children: toast === "starred" ? ui.starredToast : ui.unstarredToast })
|
|
7034
7147
|
] });
|
|
7035
7148
|
}
|
|
7036
7149
|
|
|
7037
7150
|
// src/components/GamesPanel.tsx
|
|
7038
|
-
import { useEffect as useEffect30, useState as
|
|
7151
|
+
import { useEffect as useEffect30, useState as useState50 } from "react";
|
|
7039
7152
|
|
|
7040
7153
|
// src/components/GamesLoginWall.tsx
|
|
7041
|
-
import { jsx as
|
|
7154
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
7042
7155
|
function GamesLoginWall({ ui }) {
|
|
7043
|
-
return /* @__PURE__ */
|
|
7156
|
+
return /* @__PURE__ */ jsx63("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx63("div", { className: "ss-w-games-wall", children: /* @__PURE__ */ jsx63("p", { children: ui.gamesLoginRequired }) }) });
|
|
7044
7157
|
}
|
|
7045
7158
|
|
|
7046
7159
|
// src/components/GamesHub.tsx
|
|
7047
|
-
import { useEffect as useEffect27, useState as
|
|
7160
|
+
import { useEffect as useEffect27, useState as useState36 } from "react";
|
|
7048
7161
|
|
|
7049
7162
|
// src/components/games/ui/gameMeta.ts
|
|
7050
7163
|
function prettifyGameId(gameId) {
|
|
@@ -7060,74 +7173,74 @@ function splitName(full) {
|
|
|
7060
7173
|
}
|
|
7061
7174
|
|
|
7062
7175
|
// src/components/GameTileArt.tsx
|
|
7063
|
-
import { Fragment as
|
|
7176
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7064
7177
|
function GameTileArt({ gameId }) {
|
|
7065
|
-
return /* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsx64("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
7066
7179
|
}
|
|
7067
|
-
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */
|
|
7068
|
-
/* @__PURE__ */
|
|
7069
|
-
/* @__PURE__ */
|
|
7180
|
+
var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs57("g", { className: cls, children: [
|
|
7181
|
+
/* @__PURE__ */ jsx64("circle", { cx, cy: cy - r * 0.3, r: r * 0.45 }),
|
|
7182
|
+
/* @__PURE__ */ jsx64("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` })
|
|
7070
7183
|
] });
|
|
7071
7184
|
var ART = {
|
|
7072
|
-
"mystery-tiger": /* @__PURE__ */
|
|
7185
|
+
"mystery-tiger": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7073
7186
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
7074
|
-
/* @__PURE__ */
|
|
7187
|
+
/* @__PURE__ */ jsx64("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
7075
7188
|
] }),
|
|
7076
|
-
"higher-or-lower": /* @__PURE__ */
|
|
7189
|
+
"higher-or-lower": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7077
7190
|
head(32, 38, 20),
|
|
7078
7191
|
head(88, 38, 20),
|
|
7079
|
-
/* @__PURE__ */
|
|
7080
|
-
/* @__PURE__ */
|
|
7192
|
+
/* @__PURE__ */ jsx64("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
7193
|
+
/* @__PURE__ */ jsx64("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
7081
7194
|
] }),
|
|
7082
|
-
"guess-the-xi": /* @__PURE__ */
|
|
7083
|
-
/* @__PURE__ */
|
|
7084
|
-
[[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__ */
|
|
7195
|
+
"guess-the-xi": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7196
|
+
/* @__PURE__ */ jsx64("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
7197
|
+
[[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__ */ jsx64("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
7085
7198
|
] }),
|
|
7086
|
-
"daily-quiz": /* @__PURE__ */
|
|
7087
|
-
"career-path": /* @__PURE__ */
|
|
7088
|
-
/* @__PURE__ */
|
|
7089
|
-
/* @__PURE__ */
|
|
7090
|
-
/* @__PURE__ */
|
|
7091
|
-
/* @__PURE__ */
|
|
7092
|
-
/* @__PURE__ */
|
|
7199
|
+
"daily-quiz": /* @__PURE__ */ jsx64(Fragment10, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx64("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
7200
|
+
"career-path": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7201
|
+
/* @__PURE__ */ jsx64("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
7202
|
+
/* @__PURE__ */ jsx64("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
7203
|
+
/* @__PURE__ */ jsx64("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
7204
|
+
/* @__PURE__ */ jsx64("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
7205
|
+
/* @__PURE__ */ jsx64("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
7093
7206
|
] }),
|
|
7094
|
-
"beat-the-grid": /* @__PURE__ */
|
|
7095
|
-
"matchday-predictor": /* @__PURE__ */
|
|
7096
|
-
/* @__PURE__ */
|
|
7097
|
-
/* @__PURE__ */
|
|
7098
|
-
/* @__PURE__ */
|
|
7099
|
-
/* @__PURE__ */
|
|
7207
|
+
"beat-the-grid": /* @__PURE__ */ jsx64(Fragment10, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx64("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}`))) }),
|
|
7208
|
+
"matchday-predictor": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7209
|
+
/* @__PURE__ */ jsx64("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
7210
|
+
/* @__PURE__ */ jsx64("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
7211
|
+
/* @__PURE__ */ jsx64("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
7212
|
+
/* @__PURE__ */ jsx64("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
7100
7213
|
] }),
|
|
7101
|
-
"starting-xi": /* @__PURE__ */
|
|
7102
|
-
/* @__PURE__ */
|
|
7103
|
-
[[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__ */
|
|
7214
|
+
"starting-xi": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7215
|
+
/* @__PURE__ */ jsx64("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
7216
|
+
[[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__ */ jsx64("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
7104
7217
|
] }),
|
|
7105
|
-
"stat-ladder": /* @__PURE__ */
|
|
7106
|
-
"fan-motm": /* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7218
|
+
"stat-ladder": /* @__PURE__ */ jsx64(Fragment10, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx64("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
7219
|
+
"fan-motm": /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
7220
|
+
/* @__PURE__ */ jsx64("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
7108
7221
|
head(60, 40, 18),
|
|
7109
|
-
/* @__PURE__ */
|
|
7222
|
+
/* @__PURE__ */ jsx64("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" })
|
|
7110
7223
|
] }),
|
|
7111
|
-
default: /* @__PURE__ */
|
|
7224
|
+
default: /* @__PURE__ */ jsx64("circle", { cx: "60", cy: "37", r: "22", className: "ss-g-art-fg" })
|
|
7112
7225
|
};
|
|
7113
7226
|
|
|
7114
7227
|
// src/components/games/ui/Chip.tsx
|
|
7115
|
-
import { jsx as
|
|
7228
|
+
import { jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7116
7229
|
function Chip({ variant = "neutral", icon, children, className }) {
|
|
7117
|
-
return /* @__PURE__ */
|
|
7230
|
+
return /* @__PURE__ */ jsxs58("span", { className: `ss-g-chip ss-g-chip--${variant}${className ? ` ${className}` : ""}`, children: [
|
|
7118
7231
|
icon,
|
|
7119
7232
|
children
|
|
7120
7233
|
] });
|
|
7121
7234
|
}
|
|
7122
7235
|
function StatStack({ value, label }) {
|
|
7123
|
-
return /* @__PURE__ */
|
|
7124
|
-
/* @__PURE__ */
|
|
7125
|
-
/* @__PURE__ */
|
|
7236
|
+
return /* @__PURE__ */ jsxs58("span", { className: "ss-g-statstack", children: [
|
|
7237
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-statstack-v", children: value }),
|
|
7238
|
+
/* @__PURE__ */ jsx65("span", { className: "ss-g-statstack-l", children: label })
|
|
7126
7239
|
] });
|
|
7127
7240
|
}
|
|
7128
7241
|
|
|
7129
7242
|
// src/components/GameTile.tsx
|
|
7130
|
-
import { Fragment as
|
|
7243
|
+
import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
7131
7244
|
function tileStatus(game, ui) {
|
|
7132
7245
|
switch (game.status) {
|
|
7133
7246
|
case "locked":
|
|
@@ -7151,38 +7264,38 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
7151
7264
|
const status = tileStatus(game, ui);
|
|
7152
7265
|
const disabled = DISABLED.has(game.status);
|
|
7153
7266
|
const title = gameTitle(game, ui.games.titles);
|
|
7154
|
-
const body = variant === "hero" ? /* @__PURE__ */
|
|
7155
|
-
/* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7157
|
-
status.tone === "new" && /* @__PURE__ */
|
|
7158
|
-
/* @__PURE__ */
|
|
7159
|
-
/* @__PURE__ */
|
|
7160
|
-
status.tone === "success" ? /* @__PURE__ */
|
|
7267
|
+
const body = variant === "hero" ? /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
7268
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-hero-text", children: [
|
|
7269
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
7270
|
+
status.tone === "new" && /* @__PURE__ */ jsx66(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
7271
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-hero-title", children: title }),
|
|
7272
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-hero-sub", children: ui.games.taglines[game.gameId] ?? "" }),
|
|
7273
|
+
status.tone === "success" ? /* @__PURE__ */ jsx66("span", { className: "ss-g-tile-status", "data-tone": "success", children: status.text }) : /* @__PURE__ */ jsxs59("span", { className: "ss-g-hero-cta", children: [
|
|
7161
7274
|
status.tone === "accent" ? ui.games.resume : ui.games.playNow,
|
|
7162
7275
|
" \u2192"
|
|
7163
7276
|
] })
|
|
7164
7277
|
] }),
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
] }) : variant === "wide" ? /* @__PURE__ */
|
|
7167
|
-
/* @__PURE__ */
|
|
7168
|
-
/* @__PURE__ */
|
|
7169
|
-
/* @__PURE__ */
|
|
7170
|
-
/* @__PURE__ */
|
|
7171
|
-
status.tone === "new" && /* @__PURE__ */
|
|
7278
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx66(GameTileArt, { gameId: game.gameId }) })
|
|
7279
|
+
] }) : variant === "wide" ? /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
7280
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx66(GameTileArt, { gameId: game.gameId }) }),
|
|
7281
|
+
/* @__PURE__ */ jsxs59("span", { className: "ss-g-wide-text", children: [
|
|
7282
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-tile-title", children: title }),
|
|
7283
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text }),
|
|
7284
|
+
status.tone === "new" && /* @__PURE__ */ jsx66(Chip, { variant: "badge", children: ui.games.newToday })
|
|
7172
7285
|
] }),
|
|
7173
|
-
/* @__PURE__ */
|
|
7174
|
-
] }) : /* @__PURE__ */
|
|
7175
|
-
/* @__PURE__ */
|
|
7176
|
-
/* @__PURE__ */
|
|
7177
|
-
/* @__PURE__ */
|
|
7286
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx66(IconChevronLeft, { size: 18 }) })
|
|
7287
|
+
] }) : /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
7288
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx66(GameTileArt, { gameId: game.gameId }) }),
|
|
7289
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-tile-title", children: title }),
|
|
7290
|
+
/* @__PURE__ */ jsx66("span", { className: "ss-g-tile-status", "data-tone": status.tone, children: status.text })
|
|
7178
7291
|
] });
|
|
7179
7292
|
const cls = `ss-g-tile ss-g-tile--${variant}`;
|
|
7180
|
-
if (disabled) return /* @__PURE__ */
|
|
7181
|
-
return /* @__PURE__ */
|
|
7293
|
+
if (disabled) return /* @__PURE__ */ jsx66("div", { className: cls, "data-disabled": true, "aria-disabled": "true", children: body });
|
|
7294
|
+
return /* @__PURE__ */ jsx66("button", { type: "button", className: cls, "aria-label": `${title} \u2014 ${status.text}`, onClick: () => onOpen(game), children: body });
|
|
7182
7295
|
}
|
|
7183
7296
|
|
|
7184
7297
|
// src/components/GamesHub.tsx
|
|
7185
|
-
import { Fragment as
|
|
7298
|
+
import { Fragment as Fragment12, jsx as jsx67, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
7186
7299
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
7187
7300
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
7188
7301
|
function pickHeroGame(games) {
|
|
@@ -7195,7 +7308,7 @@ function pickHeroGame(games) {
|
|
|
7195
7308
|
}
|
|
7196
7309
|
var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
|
|
7197
7310
|
function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
7198
|
-
const [, setTick] =
|
|
7311
|
+
const [, setTick] = useState36(0);
|
|
7199
7312
|
useEffect27(() => {
|
|
7200
7313
|
const id = setInterval(() => setTick((t) => t + 1), 6e4);
|
|
7201
7314
|
return () => clearInterval(id);
|
|
@@ -7208,58 +7321,58 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
7208
7321
|
const kickoffs = fixtures.map((g) => g.kickoffUtc).filter((k) => !!k).sort();
|
|
7209
7322
|
const todayPts = games.filter((g) => DONE.has(g.status)).reduce((s, g) => s + (g.score ?? 0), 0);
|
|
7210
7323
|
const dash = "\u2014";
|
|
7211
|
-
return /* @__PURE__ */
|
|
7212
|
-
/* @__PURE__ */
|
|
7213
|
-
/* @__PURE__ */
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
myWeeklyRow ? /* @__PURE__ */
|
|
7217
|
-
/* @__PURE__ */
|
|
7324
|
+
return /* @__PURE__ */ jsxs60("div", { className: "ss-g-hub", children: [
|
|
7325
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-stats", children: [
|
|
7326
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-stat", children: [
|
|
7327
|
+
/* @__PURE__ */ jsx67("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
7328
|
+
/* @__PURE__ */ jsxs60("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
7329
|
+
myWeeklyRow ? /* @__PURE__ */ jsxs60(Fragment12, { children: [
|
|
7330
|
+
/* @__PURE__ */ jsx67(IconFlame, {}),
|
|
7218
7331
|
myWeeklyRow.currentStreak
|
|
7219
7332
|
] }) : dash,
|
|
7220
|
-
myWeeklyRow && /* @__PURE__ */
|
|
7333
|
+
myWeeklyRow && /* @__PURE__ */ jsx67("small", { children: ui.games.unitDays })
|
|
7221
7334
|
] })
|
|
7222
7335
|
] }),
|
|
7223
|
-
/* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
/* @__PURE__ */
|
|
7336
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-stat", children: [
|
|
7337
|
+
/* @__PURE__ */ jsx67("span", { className: "ss-g-stat-l", children: ui.games.statToday }),
|
|
7338
|
+
/* @__PURE__ */ jsxs60("span", { className: "ss-g-stat-v ss-g-stat-v--accent", "data-testid": "stat-today", children: [
|
|
7226
7339
|
ui.games.formatPts(todayPts),
|
|
7227
|
-
/* @__PURE__ */
|
|
7340
|
+
/* @__PURE__ */ jsx67("small", { children: ui.games.unitPts })
|
|
7228
7341
|
] })
|
|
7229
7342
|
] }),
|
|
7230
|
-
/* @__PURE__ */
|
|
7231
|
-
/* @__PURE__ */
|
|
7232
|
-
/* @__PURE__ */
|
|
7343
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-stat", children: [
|
|
7344
|
+
/* @__PURE__ */ jsx67("span", { className: "ss-g-stat-l", children: ui.games.statRank }),
|
|
7345
|
+
/* @__PURE__ */ jsxs60("span", { className: "ss-g-stat-v", "data-testid": "stat-rank", children: [
|
|
7233
7346
|
myWeeklyRow ? `#${myWeeklyRow.rank}` : dash,
|
|
7234
|
-
myWeeklyRow && /* @__PURE__ */
|
|
7347
|
+
myWeeklyRow && /* @__PURE__ */ jsx67("small", { children: ui.games.thisWeek })
|
|
7235
7348
|
] })
|
|
7236
7349
|
] })
|
|
7237
7350
|
] }),
|
|
7238
|
-
weeklyPrize && /* @__PURE__ */
|
|
7239
|
-
hero && /* @__PURE__ */
|
|
7240
|
-
(grid.length > 0 || wide) && /* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7242
|
-
/* @__PURE__ */
|
|
7243
|
-
/* @__PURE__ */
|
|
7351
|
+
weeklyPrize && /* @__PURE__ */ jsx67(Chip, { variant: "accent", className: "ss-g-prize", children: weeklyPrize }),
|
|
7352
|
+
hero && /* @__PURE__ */ jsx67(GameTile, { game: hero, onOpen, ui, variant: "hero" }),
|
|
7353
|
+
(grid.length > 0 || wide) && /* @__PURE__ */ jsxs60("section", { className: "ss-g-sec", children: [
|
|
7354
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-sec-head", children: [
|
|
7355
|
+
/* @__PURE__ */ jsx67("h3", { children: ui.games.dailyGames }),
|
|
7356
|
+
/* @__PURE__ */ jsx67("span", { children: ui.games.newSetAtMidnight })
|
|
7244
7357
|
] }),
|
|
7245
|
-
grid.length > 0 && /* @__PURE__ */
|
|
7246
|
-
wide && /* @__PURE__ */
|
|
7358
|
+
grid.length > 0 && /* @__PURE__ */ jsx67("div", { className: "ss-g-grid", children: grid.map((g) => /* @__PURE__ */ jsx67(GameTile, { game: g, onOpen, ui }, tileKey(g))) }),
|
|
7359
|
+
wide && /* @__PURE__ */ jsx67(GameTile, { game: wide, onOpen, ui, variant: "wide" })
|
|
7247
7360
|
] }),
|
|
7248
|
-
fixtures.length > 0 && /* @__PURE__ */
|
|
7249
|
-
/* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7251
|
-
kickoffs[0] && /* @__PURE__ */
|
|
7361
|
+
fixtures.length > 0 && /* @__PURE__ */ jsxs60("section", { className: "ss-g-sec", children: [
|
|
7362
|
+
/* @__PURE__ */ jsxs60("div", { className: "ss-g-sec-head", children: [
|
|
7363
|
+
/* @__PURE__ */ jsx67("h3", { children: ui.games.matchdayGames }),
|
|
7364
|
+
kickoffs[0] && /* @__PURE__ */ jsx67("span", { children: ui.games.kickoffAt(ui.games.formatDayTime(kickoffs[0])) })
|
|
7252
7365
|
] }),
|
|
7253
|
-
/* @__PURE__ */
|
|
7366
|
+
/* @__PURE__ */ jsx67("div", { className: "ss-g-grid", children: fixtures.map((g) => /* @__PURE__ */ jsx67(GameTile, { game: g, onOpen, ui }, tileKey(g))) })
|
|
7254
7367
|
] })
|
|
7255
7368
|
] });
|
|
7256
7369
|
}
|
|
7257
7370
|
|
|
7258
7371
|
// src/components/GameScreenHost.tsx
|
|
7259
|
-
import { useEffect as useEffect29, useRef as useRef27, useState as
|
|
7372
|
+
import { useEffect as useEffect29, useRef as useRef27, useState as useState48 } from "react";
|
|
7260
7373
|
|
|
7261
7374
|
// src/useGamePlay.ts
|
|
7262
|
-
import { useCallback as useCallback20, useRef as useRef25, useState as
|
|
7375
|
+
import { useCallback as useCallback20, useRef as useRef25, useState as useState37 } from "react";
|
|
7263
7376
|
function toSubmitResult(payload) {
|
|
7264
7377
|
return {
|
|
7265
7378
|
// 'pending' means the play is recorded but awaiting resolution (fixture games)
|
|
@@ -7271,9 +7384,9 @@ function toSubmitResult(payload) {
|
|
|
7271
7384
|
};
|
|
7272
7385
|
}
|
|
7273
7386
|
function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
|
|
7274
|
-
const [result, setResult] =
|
|
7275
|
-
const [submitting, setSubmitting] =
|
|
7276
|
-
const [rawStatus, setRawStatus] =
|
|
7387
|
+
const [result, setResult] = useState37(null);
|
|
7388
|
+
const [submitting, setSubmitting] = useState37(false);
|
|
7389
|
+
const [rawStatus, setRawStatus] = useState37(null);
|
|
7277
7390
|
const inFlightRef = useRef25(false);
|
|
7278
7391
|
const convRef = useRef25(conversation);
|
|
7279
7392
|
convRef.current = conversation;
|
|
@@ -7331,7 +7444,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
7331
7444
|
}
|
|
7332
7445
|
|
|
7333
7446
|
// src/components/games/MysteryTigerGame.tsx
|
|
7334
|
-
import { useState as
|
|
7447
|
+
import { useState as useState39, useId as useId3 } from "react";
|
|
7335
7448
|
|
|
7336
7449
|
// src/components/games/nationFlags.ts
|
|
7337
7450
|
var FLAGS = {
|
|
@@ -7542,8 +7655,8 @@ function isNationCode(flag) {
|
|
|
7542
7655
|
}
|
|
7543
7656
|
|
|
7544
7657
|
// src/components/games/PlayerAvatar.tsx
|
|
7545
|
-
import { useState as
|
|
7546
|
-
import { jsx as
|
|
7658
|
+
import { useState as useState38 } from "react";
|
|
7659
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
7547
7660
|
function initialsOf(name) {
|
|
7548
7661
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
7549
7662
|
const first = parts[0];
|
|
@@ -7560,41 +7673,41 @@ function PlayerAvatar({
|
|
|
7560
7673
|
imagePath,
|
|
7561
7674
|
className
|
|
7562
7675
|
}) {
|
|
7563
|
-
const [failed, setFailed] =
|
|
7676
|
+
const [failed, setFailed] = useState38(false);
|
|
7564
7677
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
7565
|
-
return /* @__PURE__ */
|
|
7678
|
+
return /* @__PURE__ */ jsx68("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ jsx68("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx68("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
7566
7679
|
}
|
|
7567
7680
|
|
|
7568
7681
|
// src/components/games/ui/GameHeader.tsx
|
|
7569
|
-
import { jsx as
|
|
7682
|
+
import { jsx as jsx69, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
7570
7683
|
function GameHeader({ title, eyebrow, right, onBack, backLabel }) {
|
|
7571
|
-
return /* @__PURE__ */
|
|
7572
|
-
onBack && /* @__PURE__ */
|
|
7573
|
-
/* @__PURE__ */
|
|
7574
|
-
eyebrow && /* @__PURE__ */
|
|
7575
|
-
/* @__PURE__ */
|
|
7684
|
+
return /* @__PURE__ */ jsxs61("div", { className: "ss-g-head", children: [
|
|
7685
|
+
onBack && /* @__PURE__ */ jsx69("button", { type: "button", className: "ss-g-back", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx69(IconChevronLeft, {}) }),
|
|
7686
|
+
/* @__PURE__ */ jsxs61("div", { className: "ss-g-head-text", children: [
|
|
7687
|
+
eyebrow && /* @__PURE__ */ jsx69("span", { className: "ss-g-eyebrow", children: eyebrow }),
|
|
7688
|
+
/* @__PURE__ */ jsx69("h2", { className: "ss-g-title", children: title })
|
|
7576
7689
|
] }),
|
|
7577
|
-
right && /* @__PURE__ */
|
|
7690
|
+
right && /* @__PURE__ */ jsx69("div", { className: "ss-g-head-right", children: right })
|
|
7578
7691
|
] });
|
|
7579
7692
|
}
|
|
7580
7693
|
|
|
7581
7694
|
// src/components/games/ui/SegmentProgress.tsx
|
|
7582
|
-
import { jsx as
|
|
7695
|
+
import { jsx as jsx70, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
7583
7696
|
function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right }) {
|
|
7584
|
-
return /* @__PURE__ */
|
|
7585
|
-
/* @__PURE__ */
|
|
7586
|
-
(leftLabel || rightLabel) && /* @__PURE__ */
|
|
7587
|
-
/* @__PURE__ */
|
|
7588
|
-
/* @__PURE__ */
|
|
7697
|
+
return /* @__PURE__ */ jsxs62("div", { className: "ss-g-progress", children: [
|
|
7698
|
+
/* @__PURE__ */ jsxs62("div", { className: "ss-g-progress-main", children: [
|
|
7699
|
+
(leftLabel || rightLabel) && /* @__PURE__ */ jsxs62("div", { className: "ss-g-progress-labels", children: [
|
|
7700
|
+
/* @__PURE__ */ jsx70("span", { children: leftLabel }),
|
|
7701
|
+
/* @__PURE__ */ jsx70("span", { className: "ss-g-progress-rl", children: rightLabel })
|
|
7589
7702
|
] }),
|
|
7590
|
-
/* @__PURE__ */
|
|
7703
|
+
/* @__PURE__ */ jsx70(
|
|
7591
7704
|
"div",
|
|
7592
7705
|
{
|
|
7593
7706
|
className: "ss-g-segs",
|
|
7594
7707
|
role: "img",
|
|
7595
7708
|
"aria-label": ariaLabel,
|
|
7596
7709
|
style: { gridTemplateColumns: `repeat(${segments.length}, minmax(0, 1fr))` },
|
|
7597
|
-
children: segments.map((s, i) => /* @__PURE__ */
|
|
7710
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx70("span", { className: "ss-g-seg", "data-state": s }, i))
|
|
7598
7711
|
}
|
|
7599
7712
|
)
|
|
7600
7713
|
] }),
|
|
@@ -7603,12 +7716,12 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
7603
7716
|
}
|
|
7604
7717
|
|
|
7605
7718
|
// src/components/games/ui/AnswerTray.tsx
|
|
7606
|
-
import { Fragment as
|
|
7719
|
+
import { Fragment as Fragment13, jsx as jsx71, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
7607
7720
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
7608
7721
|
const needle = query.trim().toLowerCase();
|
|
7609
7722
|
const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
7610
|
-
return /* @__PURE__ */
|
|
7611
|
-
/* @__PURE__ */
|
|
7723
|
+
return /* @__PURE__ */ jsxs63(Fragment13, { children: [
|
|
7724
|
+
/* @__PURE__ */ jsx71(
|
|
7612
7725
|
SearchField,
|
|
7613
7726
|
{
|
|
7614
7727
|
id,
|
|
@@ -7620,9 +7733,9 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7620
7733
|
disabled
|
|
7621
7734
|
}
|
|
7622
7735
|
),
|
|
7623
|
-
shown.length > 0 && /* @__PURE__ */
|
|
7736
|
+
shown.length > 0 && /* @__PURE__ */ jsx71("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
|
|
7624
7737
|
const { first, last } = splitName(o.name);
|
|
7625
|
-
return /* @__PURE__ */
|
|
7738
|
+
return /* @__PURE__ */ jsxs63(
|
|
7626
7739
|
"button",
|
|
7627
7740
|
{
|
|
7628
7741
|
type: "button",
|
|
@@ -7633,10 +7746,10 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7633
7746
|
disabled,
|
|
7634
7747
|
onClick: () => onPick(o.id),
|
|
7635
7748
|
children: [
|
|
7636
|
-
/* @__PURE__ */
|
|
7637
|
-
/* @__PURE__ */
|
|
7638
|
-
first && /* @__PURE__ */
|
|
7639
|
-
/* @__PURE__ */
|
|
7749
|
+
/* @__PURE__ */ jsx71(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
7750
|
+
/* @__PURE__ */ jsxs63("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
7751
|
+
first && /* @__PURE__ */ jsx71("span", { className: "ss-g-tray-first", children: first }),
|
|
7752
|
+
/* @__PURE__ */ jsx71("span", { className: "ss-g-tray-last", children: last })
|
|
7640
7753
|
] })
|
|
7641
7754
|
]
|
|
7642
7755
|
},
|
|
@@ -7647,59 +7760,59 @@ function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQu
|
|
|
7647
7760
|
}
|
|
7648
7761
|
|
|
7649
7762
|
// src/components/games/ui/FooterBar.tsx
|
|
7650
|
-
import { jsx as
|
|
7763
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
7651
7764
|
function FooterBar({ children }) {
|
|
7652
|
-
return /* @__PURE__ */
|
|
7765
|
+
return /* @__PURE__ */ jsx72("div", { className: "ss-g-footer", children });
|
|
7653
7766
|
}
|
|
7654
7767
|
|
|
7655
7768
|
// src/components/games/ui/Silhouette.tsx
|
|
7656
|
-
import { jsx as
|
|
7769
|
+
import { jsx as jsx73, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
7657
7770
|
function Silhouette({ size, variant = "default" }) {
|
|
7658
|
-
return /* @__PURE__ */
|
|
7659
|
-
/* @__PURE__ */
|
|
7660
|
-
/* @__PURE__ */
|
|
7661
|
-
/* @__PURE__ */
|
|
7771
|
+
return /* @__PURE__ */ jsxs64("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
7772
|
+
/* @__PURE__ */ jsxs64("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
7773
|
+
/* @__PURE__ */ jsx73("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
7774
|
+
/* @__PURE__ */ jsx73("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
7662
7775
|
] }),
|
|
7663
|
-
variant === "mystery" && /* @__PURE__ */
|
|
7776
|
+
variant === "mystery" && /* @__PURE__ */ jsx73("span", { className: "ss-g-sil-q", children: "?" })
|
|
7664
7777
|
] });
|
|
7665
7778
|
}
|
|
7666
7779
|
|
|
7667
7780
|
// src/components/games/ui/GameButton.tsx
|
|
7668
|
-
import { jsx as
|
|
7781
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
7669
7782
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
7670
7783
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
7671
|
-
return /* @__PURE__ */
|
|
7784
|
+
return /* @__PURE__ */ jsx74("button", { type, className: cls, ...rest });
|
|
7672
7785
|
}
|
|
7673
7786
|
|
|
7674
7787
|
// src/components/games/ui/ResultCard.tsx
|
|
7675
|
-
import { jsx as
|
|
7788
|
+
import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
7676
7789
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
7677
|
-
return /* @__PURE__ */
|
|
7678
|
-
/* @__PURE__ */
|
|
7679
|
-
score !== void 0 && /* @__PURE__ */
|
|
7680
|
-
/* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ jsxs65("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
7791
|
+
/* @__PURE__ */ jsx75("span", { className: "ss-g-result-title", children: title }),
|
|
7792
|
+
score !== void 0 && /* @__PURE__ */ jsxs65("span", { className: "ss-g-result-score", children: [
|
|
7793
|
+
/* @__PURE__ */ jsx75("span", { className: "ss-g-result-num", children: score }),
|
|
7681
7794
|
ui.games.unitPts
|
|
7682
7795
|
] }),
|
|
7683
|
-
detail && /* @__PURE__ */
|
|
7684
|
-
onBack && /* @__PURE__ */
|
|
7796
|
+
detail && /* @__PURE__ */ jsx75("span", { className: "ss-g-result-detail", children: detail }),
|
|
7797
|
+
onBack && /* @__PURE__ */ jsx75(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
7685
7798
|
] });
|
|
7686
7799
|
}
|
|
7687
7800
|
|
|
7688
7801
|
// src/components/games/ui/PointsLadderRow.tsx
|
|
7689
|
-
import { jsx as
|
|
7802
|
+
import { jsx as jsx76, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
7690
7803
|
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
7691
7804
|
if (!ladder || ladder.length === 0) return null;
|
|
7692
7805
|
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
7693
7806
|
const next = ladder[guessesUsed + 1];
|
|
7694
7807
|
if (now === void 0) return null;
|
|
7695
|
-
return /* @__PURE__ */
|
|
7696
|
-
/* @__PURE__ */
|
|
7697
|
-
next !== void 0 && next !== now && /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsxs66("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
7809
|
+
/* @__PURE__ */ jsx76("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
7810
|
+
next !== void 0 && next !== now && /* @__PURE__ */ jsx76("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
7698
7811
|
] });
|
|
7699
7812
|
}
|
|
7700
7813
|
|
|
7701
7814
|
// src/components/games/MysteryTigerGame.tsx
|
|
7702
|
-
import { Fragment as
|
|
7815
|
+
import { Fragment as Fragment14, jsx as jsx77, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7703
7816
|
function parseClientState(json) {
|
|
7704
7817
|
if (!json) return null;
|
|
7705
7818
|
try {
|
|
@@ -7801,7 +7914,7 @@ function MysteryTigerGame({
|
|
|
7801
7914
|
onBack
|
|
7802
7915
|
}) {
|
|
7803
7916
|
const t = ui.games.mysteryTiger;
|
|
7804
|
-
const [query, setQuery] =
|
|
7917
|
+
const [query, setQuery] = useState39("");
|
|
7805
7918
|
const inputId = useId3();
|
|
7806
7919
|
const clientState = parseClientState(result?.clientStateJson);
|
|
7807
7920
|
const guessResults = clientState?.guessResults ?? [];
|
|
@@ -7821,22 +7934,22 @@ function MysteryTigerGame({
|
|
|
7821
7934
|
setQuery("");
|
|
7822
7935
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
7823
7936
|
}
|
|
7824
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */
|
|
7937
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ jsxs67(Chip, { variant: "accent", children: [
|
|
7825
7938
|
score,
|
|
7826
7939
|
" ",
|
|
7827
7940
|
ui.games.unitPts
|
|
7828
|
-
] }) : /* @__PURE__ */
|
|
7941
|
+
] }) : /* @__PURE__ */ jsx77("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ jsxs67(Chip, { children: [
|
|
7829
7942
|
ui.games.guess,
|
|
7830
7943
|
" ",
|
|
7831
|
-
/* @__PURE__ */
|
|
7944
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
7832
7945
|
" / ",
|
|
7833
7946
|
totalGuesses
|
|
7834
7947
|
] }) });
|
|
7835
7948
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
7836
7949
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
7837
7950
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
7838
|
-
return /* @__PURE__ */
|
|
7839
|
-
/* @__PURE__ */
|
|
7951
|
+
return /* @__PURE__ */ jsxs67("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
7952
|
+
/* @__PURE__ */ jsx77(
|
|
7840
7953
|
GameHeader,
|
|
7841
7954
|
{
|
|
7842
7955
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -7846,41 +7959,41 @@ function MysteryTigerGame({
|
|
|
7846
7959
|
backLabel: ui.back
|
|
7847
7960
|
}
|
|
7848
7961
|
),
|
|
7849
|
-
!config && /* @__PURE__ */
|
|
7850
|
-
config && /* @__PURE__ */
|
|
7851
|
-
/* @__PURE__ */
|
|
7852
|
-
!isOver && /* @__PURE__ */
|
|
7853
|
-
/* @__PURE__ */
|
|
7854
|
-
/* @__PURE__ */
|
|
7855
|
-
revealName ? /* @__PURE__ */
|
|
7856
|
-
revealName && /* @__PURE__ */
|
|
7962
|
+
!config && /* @__PURE__ */ jsx77("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7963
|
+
config && /* @__PURE__ */ jsxs67(Fragment14, { children: [
|
|
7964
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-body", children: [
|
|
7965
|
+
!isOver && /* @__PURE__ */ jsx77(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
7966
|
+
/* @__PURE__ */ jsxs67("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
7967
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-portrait", children: [
|
|
7968
|
+
revealName ? /* @__PURE__ */ jsx77(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ jsx77(Silhouette, { size: 150, variant: "mystery" }),
|
|
7969
|
+
revealName && /* @__PURE__ */ jsx77("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
7857
7970
|
] }),
|
|
7858
|
-
/* @__PURE__ */
|
|
7859
|
-
/* @__PURE__ */
|
|
7860
|
-
/* @__PURE__ */
|
|
7971
|
+
/* @__PURE__ */ jsx77("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-known-cell", children: [
|
|
7972
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
7973
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
7861
7974
|
] }, k.key)) })
|
|
7862
7975
|
] }),
|
|
7863
|
-
!isOver && /* @__PURE__ */
|
|
7864
|
-
guessResults.length > 0 && /* @__PURE__ */
|
|
7865
|
-
/* @__PURE__ */
|
|
7866
|
-
/* @__PURE__ */
|
|
7867
|
-
keys.map((k) => /* @__PURE__ */
|
|
7976
|
+
!isOver && /* @__PURE__ */ jsx77(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
7977
|
+
guessResults.length > 0 && /* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-table", children: [
|
|
7978
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
7979
|
+
/* @__PURE__ */ jsx77("span", { children: t.yourGuesses }),
|
|
7980
|
+
keys.map((k) => /* @__PURE__ */ jsx77("span", { children: t.labels[k] }, k))
|
|
7868
7981
|
] }),
|
|
7869
7982
|
guessResults.map((gr, i) => {
|
|
7870
7983
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
7871
7984
|
const { first, last } = splitName(name);
|
|
7872
|
-
return /* @__PURE__ */
|
|
7873
|
-
/* @__PURE__ */
|
|
7874
|
-
/* @__PURE__ */
|
|
7875
|
-
/* @__PURE__ */
|
|
7876
|
-
first && /* @__PURE__ */
|
|
7877
|
-
/* @__PURE__ */
|
|
7985
|
+
return /* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
7986
|
+
/* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-who", children: [
|
|
7987
|
+
/* @__PURE__ */ jsx77(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
7988
|
+
/* @__PURE__ */ jsxs67("span", { className: "ss-g-mt-names", children: [
|
|
7989
|
+
first && /* @__PURE__ */ jsx77("span", { className: "ss-g-mt-first", children: first }),
|
|
7990
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-mt-last", children: last })
|
|
7878
7991
|
] })
|
|
7879
7992
|
] }),
|
|
7880
7993
|
keys.map((key) => {
|
|
7881
7994
|
const v = gr[key];
|
|
7882
7995
|
const arrow = directionArrow(v);
|
|
7883
|
-
return /* @__PURE__ */
|
|
7996
|
+
return /* @__PURE__ */ jsxs67(
|
|
7884
7997
|
"div",
|
|
7885
7998
|
{
|
|
7886
7999
|
className: "ss-g-mt-cell",
|
|
@@ -7888,8 +8001,8 @@ function MysteryTigerGame({
|
|
|
7888
8001
|
"data-verdict": v.verdict,
|
|
7889
8002
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
7890
8003
|
children: [
|
|
7891
|
-
/* @__PURE__ */
|
|
7892
|
-
arrow && /* @__PURE__ */
|
|
8004
|
+
/* @__PURE__ */ jsx77("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
8005
|
+
arrow && /* @__PURE__ */ jsx77("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
7893
8006
|
]
|
|
7894
8007
|
},
|
|
7895
8008
|
key
|
|
@@ -7898,25 +8011,25 @@ function MysteryTigerGame({
|
|
|
7898
8011
|
] }, gr.playerId);
|
|
7899
8012
|
})
|
|
7900
8013
|
] }),
|
|
7901
|
-
!isOver && /* @__PURE__ */
|
|
7902
|
-
/* @__PURE__ */
|
|
7903
|
-
/* @__PURE__ */
|
|
8014
|
+
!isOver && /* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-legend", children: [
|
|
8015
|
+
/* @__PURE__ */ jsxs67("span", { children: [
|
|
8016
|
+
/* @__PURE__ */ jsx77("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
7904
8017
|
t.legendMatch
|
|
7905
8018
|
] }),
|
|
7906
|
-
/* @__PURE__ */
|
|
7907
|
-
/* @__PURE__ */
|
|
8019
|
+
/* @__PURE__ */ jsxs67("span", { children: [
|
|
8020
|
+
/* @__PURE__ */ jsx77("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
7908
8021
|
t.legendClose
|
|
7909
8022
|
] }),
|
|
7910
|
-
/* @__PURE__ */
|
|
8023
|
+
/* @__PURE__ */ jsxs67("span", { children: [
|
|
7911
8024
|
"\u25B2 ",
|
|
7912
8025
|
t.legendHigher
|
|
7913
8026
|
] })
|
|
7914
8027
|
] }),
|
|
7915
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */
|
|
7916
|
-
/* @__PURE__ */
|
|
7917
|
-
/* @__PURE__ */
|
|
8028
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs67("div", { className: "ss-g-mt-hint", children: [
|
|
8029
|
+
/* @__PURE__ */ jsx77(IconBulb, {}),
|
|
8030
|
+
/* @__PURE__ */ jsx77("span", { children: clientState.hintLine })
|
|
7918
8031
|
] }),
|
|
7919
|
-
isOver && /* @__PURE__ */
|
|
8032
|
+
isOver && /* @__PURE__ */ jsx77(
|
|
7920
8033
|
ResultCard,
|
|
7921
8034
|
{
|
|
7922
8035
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -7928,7 +8041,7 @@ function MysteryTigerGame({
|
|
|
7928
8041
|
}
|
|
7929
8042
|
)
|
|
7930
8043
|
] }),
|
|
7931
|
-
!isOver && /* @__PURE__ */
|
|
8044
|
+
!isOver && /* @__PURE__ */ jsx77(FooterBar, { children: /* @__PURE__ */ jsx77(
|
|
7932
8045
|
AnswerTray,
|
|
7933
8046
|
{
|
|
7934
8047
|
id: inputId,
|
|
@@ -7947,7 +8060,7 @@ function MysteryTigerGame({
|
|
|
7947
8060
|
}
|
|
7948
8061
|
|
|
7949
8062
|
// src/components/games/HigherOrLowerGame.tsx
|
|
7950
|
-
import { Fragment as
|
|
8063
|
+
import { Fragment as Fragment15, jsx as jsx78, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7951
8064
|
var POINTS_PER_CORRECT = 10;
|
|
7952
8065
|
function parseClientState2(json) {
|
|
7953
8066
|
if (!json) return null;
|
|
@@ -7959,11 +8072,11 @@ function parseClientState2(json) {
|
|
|
7959
8072
|
}
|
|
7960
8073
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
7961
8074
|
const { first, last } = splitName(name);
|
|
7962
|
-
return /* @__PURE__ */
|
|
7963
|
-
/* @__PURE__ */
|
|
7964
|
-
/* @__PURE__ */
|
|
7965
|
-
first && /* @__PURE__ */
|
|
7966
|
-
/* @__PURE__ */
|
|
8075
|
+
return /* @__PURE__ */ jsxs68("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
8076
|
+
/* @__PURE__ */ jsx78("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ jsx78(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ jsx78(Silhouette, { size: 150 }) }),
|
|
8077
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-hl-info", children: [
|
|
8078
|
+
first && /* @__PURE__ */ jsx78("span", { className: "ss-g-hl-first", children: first }),
|
|
8079
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-surname", children: last }),
|
|
7967
8080
|
children
|
|
7968
8081
|
] })
|
|
7969
8082
|
] });
|
|
@@ -7995,47 +8108,47 @@ function HigherOrLowerGame({
|
|
|
7995
8108
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
7996
8109
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
7997
8110
|
}
|
|
7998
|
-
return /* @__PURE__ */
|
|
7999
|
-
/* @__PURE__ */
|
|
8111
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
8112
|
+
/* @__PURE__ */ jsx78(
|
|
8000
8113
|
GameHeader,
|
|
8001
8114
|
{
|
|
8002
8115
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
8003
8116
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
8004
|
-
right: config ? /* @__PURE__ */
|
|
8117
|
+
right: config ? /* @__PURE__ */ jsx78(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
8005
8118
|
onBack,
|
|
8006
8119
|
backLabel: ui.back
|
|
8007
8120
|
}
|
|
8008
8121
|
),
|
|
8009
|
-
!config && /* @__PURE__ */
|
|
8010
|
-
config && /* @__PURE__ */
|
|
8011
|
-
/* @__PURE__ */
|
|
8012
|
-
/* @__PURE__ */
|
|
8013
|
-
/* @__PURE__ */
|
|
8014
|
-
/* @__PURE__ */
|
|
8015
|
-
/* @__PURE__ */
|
|
8122
|
+
!config && /* @__PURE__ */ jsx78("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
8123
|
+
config && /* @__PURE__ */ jsxs68(Fragment15, { children: [
|
|
8124
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-body", children: [
|
|
8125
|
+
/* @__PURE__ */ jsxs68("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
8126
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
8127
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
8128
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
8016
8129
|
] }),
|
|
8017
|
-
currentPair && /* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8019
|
-
/* @__PURE__ */
|
|
8020
|
-
/* @__PURE__ */
|
|
8130
|
+
currentPair && /* @__PURE__ */ jsxs68("div", { className: "ss-g-hl-pair", children: [
|
|
8131
|
+
/* @__PURE__ */ jsxs68(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
8132
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
8133
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
8021
8134
|
] }),
|
|
8022
|
-
/* @__PURE__ */
|
|
8023
|
-
/* @__PURE__ */
|
|
8024
|
-
/* @__PURE__ */
|
|
8025
|
-
/* @__PURE__ */
|
|
8135
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
8136
|
+
/* @__PURE__ */ jsx78(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ jsxs68("div", { className: "ss-g-hl-btns", children: [
|
|
8137
|
+
/* @__PURE__ */ jsxs68(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
8138
|
+
/* @__PURE__ */ jsx78(IconArrowUp, { size: 16 }),
|
|
8026
8139
|
t.higher
|
|
8027
8140
|
] }),
|
|
8028
|
-
/* @__PURE__ */
|
|
8029
|
-
/* @__PURE__ */
|
|
8141
|
+
/* @__PURE__ */ jsxs68(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
8142
|
+
/* @__PURE__ */ jsx78(IconArrowDown, { size: 16 }),
|
|
8030
8143
|
t.lower
|
|
8031
8144
|
] })
|
|
8032
8145
|
] }) })
|
|
8033
8146
|
] }),
|
|
8034
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */
|
|
8035
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */
|
|
8147
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ jsxs68("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
8148
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ jsx78(IconCheck, {}) : /* @__PURE__ */ jsx78(IconClose, {}),
|
|
8036
8149
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
8037
8150
|
] }),
|
|
8038
|
-
isOver && /* @__PURE__ */
|
|
8151
|
+
isOver && /* @__PURE__ */ jsx78(
|
|
8039
8152
|
ResultCard,
|
|
8040
8153
|
{
|
|
8041
8154
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -8047,15 +8160,15 @@ function HigherOrLowerGame({
|
|
|
8047
8160
|
}
|
|
8048
8161
|
)
|
|
8049
8162
|
] }),
|
|
8050
|
-
!isOver && /* @__PURE__ */
|
|
8051
|
-
/* @__PURE__ */
|
|
8163
|
+
!isOver && /* @__PURE__ */ jsx78(FooterBar, { children: /* @__PURE__ */ jsxs68("div", { className: "ss-g-hl-foot", children: [
|
|
8164
|
+
/* @__PURE__ */ jsx78("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
8052
8165
|
const a = answeredPairs[i];
|
|
8053
|
-
return /* @__PURE__ */
|
|
8166
|
+
return /* @__PURE__ */ jsx78("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
8054
8167
|
}) }),
|
|
8055
|
-
/* @__PURE__ */
|
|
8056
|
-
/* @__PURE__ */
|
|
8168
|
+
/* @__PURE__ */ jsxs68("span", { className: "ss-g-hl-pts", children: [
|
|
8169
|
+
/* @__PURE__ */ jsx78("span", { "data-testid": "hol-score", children: score }),
|
|
8057
8170
|
" ",
|
|
8058
|
-
/* @__PURE__ */
|
|
8171
|
+
/* @__PURE__ */ jsx78("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
8059
8172
|
] })
|
|
8060
8173
|
] }) })
|
|
8061
8174
|
] })
|
|
@@ -8063,21 +8176,21 @@ function HigherOrLowerGame({
|
|
|
8063
8176
|
}
|
|
8064
8177
|
|
|
8065
8178
|
// src/components/games/CareerPathGame.tsx
|
|
8066
|
-
import { useState as
|
|
8179
|
+
import { useState as useState41, useId as useId4 } from "react";
|
|
8067
8180
|
|
|
8068
8181
|
// src/components/games/ui/CrestShield.tsx
|
|
8069
|
-
import { useState as
|
|
8070
|
-
import { jsx as
|
|
8182
|
+
import { useState as useState40 } from "react";
|
|
8183
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
8071
8184
|
function CrestShield({ src, name, size = 28 }) {
|
|
8072
|
-
const [failed, setFailed] =
|
|
8185
|
+
const [failed, setFailed] = useState40(false);
|
|
8073
8186
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
8074
|
-
return /* @__PURE__ */
|
|
8187
|
+
return /* @__PURE__ */ jsx79("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
8075
8188
|
}
|
|
8076
|
-
return /* @__PURE__ */
|
|
8189
|
+
return /* @__PURE__ */ jsx79("svg", { className: "ss-g-crest ss-g-crest--ph", width: size, height: size * 32 / 28, viewBox: "0 0 28 32", role: "img", "aria-label": name, children: /* @__PURE__ */ jsx79("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
8077
8190
|
}
|
|
8078
8191
|
|
|
8079
8192
|
// src/components/games/CareerPathGame.tsx
|
|
8080
|
-
import { Fragment as
|
|
8193
|
+
import { Fragment as Fragment16, jsx as jsx80, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
8081
8194
|
function parseClientState3(json) {
|
|
8082
8195
|
if (!json) return null;
|
|
8083
8196
|
try {
|
|
@@ -8101,15 +8214,15 @@ function CareerPathGame({
|
|
|
8101
8214
|
}) {
|
|
8102
8215
|
const s = ui.games.careerPath;
|
|
8103
8216
|
const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
|
|
8104
|
-
const [query, setQuery] =
|
|
8217
|
+
const [query, setQuery] = useState41("");
|
|
8105
8218
|
const inputId = useId4();
|
|
8106
8219
|
const clientState = parseClientState3(result?.clientStateJson);
|
|
8107
8220
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
8108
8221
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
8109
8222
|
if (!config) {
|
|
8110
|
-
return /* @__PURE__ */
|
|
8111
|
-
/* @__PURE__ */
|
|
8112
|
-
/* @__PURE__ */
|
|
8223
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
8224
|
+
/* @__PURE__ */ jsx80(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
8225
|
+
/* @__PURE__ */ jsx80("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8113
8226
|
] });
|
|
8114
8227
|
}
|
|
8115
8228
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
@@ -8123,61 +8236,61 @@ function CareerPathGame({
|
|
|
8123
8236
|
setQuery("");
|
|
8124
8237
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
8125
8238
|
}
|
|
8126
|
-
const right = !isOver && clientState ? /* @__PURE__ */
|
|
8239
|
+
const right = !isOver && clientState ? /* @__PURE__ */ jsx80("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ jsxs69(Chip, { variant: "neutral", children: [
|
|
8127
8240
|
ui.games.guess,
|
|
8128
8241
|
" ",
|
|
8129
|
-
/* @__PURE__ */
|
|
8242
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
8130
8243
|
" / ",
|
|
8131
8244
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
8132
8245
|
] }) }) : void 0;
|
|
8133
8246
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
8134
|
-
return /* @__PURE__ */
|
|
8135
|
-
/* @__PURE__ */
|
|
8136
|
-
/* @__PURE__ */
|
|
8137
|
-
!isOver && /* @__PURE__ */
|
|
8138
|
-
/* @__PURE__ */
|
|
8139
|
-
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */
|
|
8140
|
-
/* @__PURE__ */
|
|
8141
|
-
/* @__PURE__ */
|
|
8142
|
-
clientState?.hintLine ? /* @__PURE__ */
|
|
8143
|
-
/* @__PURE__ */
|
|
8144
|
-
/* @__PURE__ */
|
|
8247
|
+
return /* @__PURE__ */ jsxs69("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
8248
|
+
/* @__PURE__ */ jsx80(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
8249
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-body", children: [
|
|
8250
|
+
!isOver && /* @__PURE__ */ jsx80(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
8251
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-cp-card", children: [
|
|
8252
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ jsx80(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ jsx80(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
8253
|
+
/* @__PURE__ */ jsxs69("div", { className: "ss-g-cp-card-text", children: [
|
|
8254
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
8255
|
+
clientState?.hintLine ? /* @__PURE__ */ jsx80("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ jsxs69("span", { className: "ss-g-cp-locks", children: [
|
|
8256
|
+
/* @__PURE__ */ jsx80(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx80(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
8257
|
+
/* @__PURE__ */ jsx80(Chip, { variant: "lock", icon: /* @__PURE__ */ jsx80(IconLock, { size: 11 }), children: s.lockNationality })
|
|
8145
8258
|
] }) : null
|
|
8146
8259
|
] })
|
|
8147
8260
|
] }),
|
|
8148
|
-
/* @__PURE__ */
|
|
8261
|
+
/* @__PURE__ */ jsxs69("ol", { className: "ss-g-cp-line", children: [
|
|
8149
8262
|
visiblePath.map((spell, i) => {
|
|
8150
8263
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
8151
|
-
return /* @__PURE__ */
|
|
8152
|
-
/* @__PURE__ */
|
|
8153
|
-
/* @__PURE__ */
|
|
8154
|
-
/* @__PURE__ */
|
|
8264
|
+
return /* @__PURE__ */ jsxs69("li", { className: "ss-g-cp-step", children: [
|
|
8265
|
+
/* @__PURE__ */ jsxs69("span", { className: "ss-g-cp-rail", children: [
|
|
8266
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ jsx80(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
8267
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
8155
8268
|
] }),
|
|
8156
|
-
/* @__PURE__ */
|
|
8157
|
-
/* @__PURE__ */
|
|
8158
|
-
/* @__PURE__ */
|
|
8159
|
-
/* @__PURE__ */
|
|
8160
|
-
spell.isLoan && /* @__PURE__ */
|
|
8269
|
+
/* @__PURE__ */ jsxs69("span", { className: "ss-g-cp-step-text", children: [
|
|
8270
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
8271
|
+
/* @__PURE__ */ jsxs69("span", { className: "ss-g-cp-sub", children: [
|
|
8272
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-years", children: years }),
|
|
8273
|
+
spell.isLoan && /* @__PURE__ */ jsxs69(Fragment16, { children: [
|
|
8161
8274
|
years ? " \xB7 " : "",
|
|
8162
|
-
/* @__PURE__ */
|
|
8275
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
8163
8276
|
] })
|
|
8164
8277
|
] })
|
|
8165
8278
|
] })
|
|
8166
8279
|
] }, `${spell.clubName}-${i}`);
|
|
8167
8280
|
}),
|
|
8168
|
-
hidden > 0 && /* @__PURE__ */
|
|
8169
|
-
/* @__PURE__ */
|
|
8170
|
-
/* @__PURE__ */
|
|
8171
|
-
hidden > 1 && /* @__PURE__ */
|
|
8281
|
+
hidden > 0 && /* @__PURE__ */ jsxs69("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
8282
|
+
/* @__PURE__ */ jsxs69("span", { className: "ss-g-cp-rail", children: [
|
|
8283
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ jsx80(IconLock, { size: 18 }) }),
|
|
8284
|
+
hidden > 1 && /* @__PURE__ */ jsx80("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
8172
8285
|
] }),
|
|
8173
|
-
/* @__PURE__ */
|
|
8286
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx80("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
8174
8287
|
] }),
|
|
8175
|
-
hidden > 1 && /* @__PURE__ */
|
|
8176
|
-
/* @__PURE__ */
|
|
8177
|
-
/* @__PURE__ */
|
|
8288
|
+
hidden > 1 && /* @__PURE__ */ jsxs69("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
8289
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ jsx80("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ jsx80(IconLock, { size: 18 }) }) }),
|
|
8290
|
+
/* @__PURE__ */ jsx80("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ jsx80("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
8178
8291
|
] })
|
|
8179
8292
|
] }),
|
|
8180
|
-
isOver && /* @__PURE__ */
|
|
8293
|
+
isOver && /* @__PURE__ */ jsx80(
|
|
8181
8294
|
ResultCard,
|
|
8182
8295
|
{
|
|
8183
8296
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -8189,7 +8302,7 @@ function CareerPathGame({
|
|
|
8189
8302
|
}
|
|
8190
8303
|
)
|
|
8191
8304
|
] }),
|
|
8192
|
-
!isOver && /* @__PURE__ */
|
|
8305
|
+
!isOver && /* @__PURE__ */ jsx80(FooterBar, { children: /* @__PURE__ */ jsx80(
|
|
8193
8306
|
AnswerTray,
|
|
8194
8307
|
{
|
|
8195
8308
|
id: inputId,
|
|
@@ -8208,16 +8321,16 @@ function CareerPathGame({
|
|
|
8208
8321
|
}
|
|
8209
8322
|
|
|
8210
8323
|
// src/components/games/BeatTheGridGame.tsx
|
|
8211
|
-
import React, { useEffect as useEffect28, useId as useId5, useRef as useRef26, useState as
|
|
8324
|
+
import React, { useEffect as useEffect28, useId as useId5, useRef as useRef26, useState as useState42 } from "react";
|
|
8212
8325
|
|
|
8213
8326
|
// src/components/games/ui/OptionList.tsx
|
|
8214
|
-
import { jsx as
|
|
8327
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
8215
8328
|
function OptionList({ label, options, onPick }) {
|
|
8216
|
-
return /* @__PURE__ */
|
|
8329
|
+
return /* @__PURE__ */ jsx81("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ jsx81("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
8217
8330
|
}
|
|
8218
8331
|
|
|
8219
8332
|
// src/components/games/BeatTheGridGame.tsx
|
|
8220
|
-
import { Fragment as
|
|
8333
|
+
import { Fragment as Fragment17, jsx as jsx82, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
8221
8334
|
function criterionIconKind(label, key) {
|
|
8222
8335
|
const l = (key ?? label).toLowerCase();
|
|
8223
8336
|
if (l.includes("app")) return "calendar";
|
|
@@ -8235,34 +8348,34 @@ function rowAbbrev(label, map, key) {
|
|
|
8235
8348
|
function CriterionIcon({ kind }) {
|
|
8236
8349
|
switch (kind) {
|
|
8237
8350
|
case "calendar":
|
|
8238
|
-
return /* @__PURE__ */
|
|
8351
|
+
return /* @__PURE__ */ jsx82(IconCalendar, {});
|
|
8239
8352
|
case "ball":
|
|
8240
|
-
return /* @__PURE__ */
|
|
8353
|
+
return /* @__PURE__ */ jsx82(IconBall, {});
|
|
8241
8354
|
case "boot":
|
|
8242
|
-
return /* @__PURE__ */
|
|
8355
|
+
return /* @__PURE__ */ jsx82(IconBoot, {});
|
|
8243
8356
|
case "gloves":
|
|
8244
|
-
return /* @__PURE__ */
|
|
8357
|
+
return /* @__PURE__ */ jsx82(IconGloves, {});
|
|
8245
8358
|
case "shield":
|
|
8246
|
-
return /* @__PURE__ */
|
|
8359
|
+
return /* @__PURE__ */ jsx82(IconShield, {});
|
|
8247
8360
|
default:
|
|
8248
|
-
return /* @__PURE__ */
|
|
8361
|
+
return /* @__PURE__ */ jsx82(IconFlag, {});
|
|
8249
8362
|
}
|
|
8250
8363
|
}
|
|
8251
8364
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
8252
8365
|
if (!meta) {
|
|
8253
|
-
return /* @__PURE__ */
|
|
8366
|
+
return /* @__PURE__ */ jsx82(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
8254
8367
|
}
|
|
8255
8368
|
switch (meta.kind) {
|
|
8256
8369
|
case "club":
|
|
8257
|
-
return /* @__PURE__ */
|
|
8370
|
+
return /* @__PURE__ */ jsx82(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
8258
8371
|
case "coach":
|
|
8259
|
-
return /* @__PURE__ */
|
|
8372
|
+
return /* @__PURE__ */ jsx82(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
8260
8373
|
case "country":
|
|
8261
|
-
return /* @__PURE__ */
|
|
8374
|
+
return /* @__PURE__ */ jsx82("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
8262
8375
|
case "position":
|
|
8263
|
-
return /* @__PURE__ */
|
|
8376
|
+
return /* @__PURE__ */ jsx82(Fragment17, {});
|
|
8264
8377
|
default:
|
|
8265
|
-
return /* @__PURE__ */
|
|
8378
|
+
return /* @__PURE__ */ jsx82(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
8266
8379
|
}
|
|
8267
8380
|
}
|
|
8268
8381
|
function parseClientState4(json) {
|
|
@@ -8297,7 +8410,7 @@ function SearchSheet({
|
|
|
8297
8410
|
ui
|
|
8298
8411
|
}) {
|
|
8299
8412
|
const s = ui.games.beatTheGrid;
|
|
8300
|
-
const [query, setQuery] =
|
|
8413
|
+
const [query, setQuery] = useState42("");
|
|
8301
8414
|
const inputId = useId5();
|
|
8302
8415
|
const inputRef = useRef26(null);
|
|
8303
8416
|
useEffect28(() => {
|
|
@@ -8306,12 +8419,12 @@ function SearchSheet({
|
|
|
8306
8419
|
const filtered = playerPool.filter(
|
|
8307
8420
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
8308
8421
|
);
|
|
8309
|
-
return /* @__PURE__ */
|
|
8310
|
-
/* @__PURE__ */
|
|
8311
|
-
/* @__PURE__ */
|
|
8312
|
-
/* @__PURE__ */
|
|
8313
|
-
/* @__PURE__ */
|
|
8314
|
-
/* @__PURE__ */
|
|
8422
|
+
return /* @__PURE__ */ jsxs70("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
8423
|
+
/* @__PURE__ */ jsxs70("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
8424
|
+
/* @__PURE__ */ jsx82(Chip, { variant: "neutral", children: rowLabel }),
|
|
8425
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ jsx82(IconClose, { size: 12 }) }),
|
|
8426
|
+
/* @__PURE__ */ jsx82(Chip, { variant: "accent", children: colLabel }),
|
|
8427
|
+
/* @__PURE__ */ jsx82(
|
|
8315
8428
|
"button",
|
|
8316
8429
|
{
|
|
8317
8430
|
type: "button",
|
|
@@ -8319,12 +8432,12 @@ function SearchSheet({
|
|
|
8319
8432
|
"data-testid": "btg-sheet-dismiss",
|
|
8320
8433
|
"aria-label": s.closeSearch,
|
|
8321
8434
|
onClick: onDismiss,
|
|
8322
|
-
children: /* @__PURE__ */
|
|
8435
|
+
children: /* @__PURE__ */ jsx82(IconClose, {})
|
|
8323
8436
|
}
|
|
8324
8437
|
)
|
|
8325
8438
|
] }),
|
|
8326
|
-
playerPool.length === 0 ? /* @__PURE__ */
|
|
8327
|
-
/* @__PURE__ */
|
|
8439
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx82("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
8440
|
+
/* @__PURE__ */ jsx82(
|
|
8328
8441
|
SearchField,
|
|
8329
8442
|
{
|
|
8330
8443
|
id: inputId,
|
|
@@ -8336,16 +8449,16 @@ function SearchSheet({
|
|
|
8336
8449
|
inputRef
|
|
8337
8450
|
}
|
|
8338
8451
|
),
|
|
8339
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
8452
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx82(
|
|
8340
8453
|
OptionList,
|
|
8341
8454
|
{
|
|
8342
8455
|
label: s.searchLabel(rowLabel, colLabel),
|
|
8343
8456
|
options: filtered.map((p) => ({
|
|
8344
8457
|
key: p.id,
|
|
8345
|
-
content: /* @__PURE__ */
|
|
8346
|
-
/* @__PURE__ */
|
|
8347
|
-
/* @__PURE__ */
|
|
8348
|
-
/* @__PURE__ */
|
|
8458
|
+
content: /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
8459
|
+
/* @__PURE__ */ jsx82(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
8460
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
8461
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx82(IconPlus, { size: 18 }) })
|
|
8349
8462
|
] })
|
|
8350
8463
|
})),
|
|
8351
8464
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -8365,7 +8478,7 @@ function BeatTheGridGame({
|
|
|
8365
8478
|
}) {
|
|
8366
8479
|
const s = ui.games.beatTheGrid;
|
|
8367
8480
|
const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
|
|
8368
|
-
const [activeCell, setActiveCell] =
|
|
8481
|
+
const [activeCell, setActiveCell] = useState42(null);
|
|
8369
8482
|
const clientState = parseClientState4(result?.clientStateJson);
|
|
8370
8483
|
const filledCells = clientState?.cells ?? [];
|
|
8371
8484
|
const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
|
|
@@ -8383,9 +8496,9 @@ function BeatTheGridGame({
|
|
|
8383
8496
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
8384
8497
|
}
|
|
8385
8498
|
if (!config) {
|
|
8386
|
-
return /* @__PURE__ */
|
|
8387
|
-
/* @__PURE__ */
|
|
8388
|
-
/* @__PURE__ */
|
|
8499
|
+
return /* @__PURE__ */ jsxs70("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
8500
|
+
/* @__PURE__ */ jsx82(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
8501
|
+
/* @__PURE__ */ jsx82("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8389
8502
|
] });
|
|
8390
8503
|
}
|
|
8391
8504
|
const rows = config.rows;
|
|
@@ -8398,20 +8511,20 @@ function BeatTheGridGame({
|
|
|
8398
8511
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
8399
8512
|
);
|
|
8400
8513
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
8401
|
-
return /* @__PURE__ */
|
|
8402
|
-
/* @__PURE__ */
|
|
8403
|
-
/* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ jsxs70("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
8515
|
+
/* @__PURE__ */ jsx82(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
8516
|
+
/* @__PURE__ */ jsx82(
|
|
8404
8517
|
SegmentProgress,
|
|
8405
8518
|
{
|
|
8406
8519
|
segments,
|
|
8407
8520
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
8408
8521
|
leftLabel: s.filled(filledCells.length, total),
|
|
8409
8522
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
8410
|
-
right: /* @__PURE__ */
|
|
8523
|
+
right: /* @__PURE__ */ jsx82(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
8411
8524
|
}
|
|
8412
8525
|
),
|
|
8413
|
-
/* @__PURE__ */
|
|
8414
|
-
/* @__PURE__ */
|
|
8526
|
+
/* @__PURE__ */ jsxs70("div", { className: "ss-g-body", children: [
|
|
8527
|
+
/* @__PURE__ */ jsxs70(
|
|
8415
8528
|
"div",
|
|
8416
8529
|
{
|
|
8417
8530
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -8421,31 +8534,31 @@ function BeatTheGridGame({
|
|
|
8421
8534
|
},
|
|
8422
8535
|
role: "grid",
|
|
8423
8536
|
children: [
|
|
8424
|
-
/* @__PURE__ */
|
|
8537
|
+
/* @__PURE__ */ jsx82("div", { className: "ss-g-btg-corner" }),
|
|
8425
8538
|
cols.map((col, colIdx) => {
|
|
8426
8539
|
const colMeta = config.colsMeta?.[colIdx];
|
|
8427
|
-
return /* @__PURE__ */
|
|
8428
|
-
/* @__PURE__ */
|
|
8429
|
-
/* @__PURE__ */
|
|
8540
|
+
return /* @__PURE__ */ jsxs70("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
8541
|
+
/* @__PURE__ */ jsx82(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
8542
|
+
/* @__PURE__ */ jsx82("span", { children: col })
|
|
8430
8543
|
] }, col);
|
|
8431
8544
|
}),
|
|
8432
8545
|
rows.map((rowLabel, rowIdx) => {
|
|
8433
8546
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
8434
8547
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
8435
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */
|
|
8436
|
-
/* @__PURE__ */
|
|
8437
|
-
/* @__PURE__ */
|
|
8438
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */
|
|
8439
|
-
/* @__PURE__ */
|
|
8440
|
-
/* @__PURE__ */
|
|
8548
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
8549
|
+
/* @__PURE__ */ jsx82(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
8550
|
+
/* @__PURE__ */ jsx82("span", { children: rowLabel })
|
|
8551
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx82("span", { children: rowLabel }) : /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
8552
|
+
/* @__PURE__ */ jsx82("span", { "aria-hidden": "true", children: abbr }),
|
|
8553
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-sr", children: rowLabel })
|
|
8441
8554
|
] });
|
|
8442
|
-
return /* @__PURE__ */
|
|
8443
|
-
/* @__PURE__ */
|
|
8555
|
+
return /* @__PURE__ */ jsxs70(React.Fragment, { children: [
|
|
8556
|
+
/* @__PURE__ */ jsx82("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
8444
8557
|
cols.map((colLabel, colIdx) => {
|
|
8445
8558
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
8446
8559
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
8447
8560
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
8448
|
-
return /* @__PURE__ */
|
|
8561
|
+
return /* @__PURE__ */ jsx82(
|
|
8449
8562
|
"button",
|
|
8450
8563
|
{
|
|
8451
8564
|
type: "button",
|
|
@@ -8456,20 +8569,20 @@ function BeatTheGridGame({
|
|
|
8456
8569
|
className: "ss-g-btg-cell",
|
|
8457
8570
|
disabled: isLocked2 || submitting,
|
|
8458
8571
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
8459
|
-
children: filled ? /* @__PURE__ */
|
|
8460
|
-
/* @__PURE__ */
|
|
8572
|
+
children: filled ? /* @__PURE__ */ jsxs70(Fragment17, { children: [
|
|
8573
|
+
/* @__PURE__ */ jsx82(
|
|
8461
8574
|
"span",
|
|
8462
8575
|
{
|
|
8463
8576
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
8464
8577
|
role: "img",
|
|
8465
8578
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
8466
|
-
children: filled.isCorrect ? /* @__PURE__ */
|
|
8579
|
+
children: filled.isCorrect ? /* @__PURE__ */ jsx82(IconCheck, { size: 11 }) : /* @__PURE__ */ jsx82(IconClose, { size: 11 })
|
|
8467
8580
|
}
|
|
8468
8581
|
),
|
|
8469
|
-
/* @__PURE__ */
|
|
8582
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
8470
8583
|
(() => {
|
|
8471
8584
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
8472
|
-
return /* @__PURE__ */
|
|
8585
|
+
return /* @__PURE__ */ jsx82(
|
|
8473
8586
|
PlayerAvatar,
|
|
8474
8587
|
{
|
|
8475
8588
|
name: entry?.name ?? "",
|
|
@@ -8478,8 +8591,8 @@ function BeatTheGridGame({
|
|
|
8478
8591
|
}
|
|
8479
8592
|
);
|
|
8480
8593
|
})(),
|
|
8481
|
-
/* @__PURE__ */
|
|
8482
|
-
] }) : /* @__PURE__ */
|
|
8594
|
+
/* @__PURE__ */ jsx82("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
8595
|
+
] }) : /* @__PURE__ */ jsx82("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx82(IconPlus, { size: 22 }) })
|
|
8483
8596
|
},
|
|
8484
8597
|
`cell-${rowIdx}-${colIdx}`
|
|
8485
8598
|
);
|
|
@@ -8489,7 +8602,7 @@ function BeatTheGridGame({
|
|
|
8489
8602
|
]
|
|
8490
8603
|
}
|
|
8491
8604
|
),
|
|
8492
|
-
isLocked2 && /* @__PURE__ */
|
|
8605
|
+
isLocked2 && /* @__PURE__ */ jsx82(
|
|
8493
8606
|
ResultCard,
|
|
8494
8607
|
{
|
|
8495
8608
|
tone: "neutral",
|
|
@@ -8501,7 +8614,7 @@ function BeatTheGridGame({
|
|
|
8501
8614
|
}
|
|
8502
8615
|
)
|
|
8503
8616
|
] }),
|
|
8504
|
-
activeCell !== null && /* @__PURE__ */
|
|
8617
|
+
activeCell !== null && /* @__PURE__ */ jsx82("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ jsx82(
|
|
8505
8618
|
SearchSheet,
|
|
8506
8619
|
{
|
|
8507
8620
|
row: activeCell.row,
|
|
@@ -8520,21 +8633,21 @@ function BeatTheGridGame({
|
|
|
8520
8633
|
}
|
|
8521
8634
|
|
|
8522
8635
|
// src/components/games/GuessTheXiGame.tsx
|
|
8523
|
-
import { useState as
|
|
8636
|
+
import { useState as useState43, useId as useId6 } from "react";
|
|
8524
8637
|
|
|
8525
8638
|
// src/components/games/ui/PitchSvg.tsx
|
|
8526
|
-
import { Fragment as
|
|
8639
|
+
import { Fragment as Fragment18, jsx as jsx83, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
8527
8640
|
function PitchSvg({ variant }) {
|
|
8528
|
-
return /* @__PURE__ */
|
|
8529
|
-
/* @__PURE__ */
|
|
8530
|
-
variant === "full" ? /* @__PURE__ */
|
|
8531
|
-
/* @__PURE__ */
|
|
8532
|
-
/* @__PURE__ */
|
|
8533
|
-
/* @__PURE__ */
|
|
8534
|
-
/* @__PURE__ */
|
|
8535
|
-
] }) : /* @__PURE__ */
|
|
8536
|
-
/* @__PURE__ */
|
|
8537
|
-
/* @__PURE__ */
|
|
8641
|
+
return /* @__PURE__ */ jsxs71("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
8642
|
+
/* @__PURE__ */ jsx83("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
8643
|
+
variant === "full" ? /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
8644
|
+
/* @__PURE__ */ jsx83("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
8645
|
+
/* @__PURE__ */ jsx83("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
8646
|
+
/* @__PURE__ */ jsx83("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
8647
|
+
/* @__PURE__ */ jsx83("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
8648
|
+
] }) : /* @__PURE__ */ jsxs71(Fragment18, { children: [
|
|
8649
|
+
/* @__PURE__ */ jsx83("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
8650
|
+
/* @__PURE__ */ jsx83("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
8538
8651
|
] })
|
|
8539
8652
|
] });
|
|
8540
8653
|
}
|
|
@@ -8590,7 +8703,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
8590
8703
|
}
|
|
8591
8704
|
|
|
8592
8705
|
// src/components/games/GuessTheXiGame.tsx
|
|
8593
|
-
import { Fragment as
|
|
8706
|
+
import { Fragment as Fragment19, jsx as jsx84, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8594
8707
|
var MAX_GUESSES2 = 3;
|
|
8595
8708
|
function parseClientState5(json) {
|
|
8596
8709
|
if (!json) return null;
|
|
@@ -8609,7 +8722,7 @@ function GuessTheXiGame({
|
|
|
8609
8722
|
onBack
|
|
8610
8723
|
}) {
|
|
8611
8724
|
const t = ui.games.guessTheXi;
|
|
8612
|
-
const [query, setQuery] =
|
|
8725
|
+
const [query, setQuery] = useState43("");
|
|
8613
8726
|
const inputId = useId6();
|
|
8614
8727
|
const clientState = parseClientState5(result?.clientStateJson);
|
|
8615
8728
|
const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
|
|
@@ -8640,31 +8753,31 @@ function GuessTheXiGame({
|
|
|
8640
8753
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
8641
8754
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
8642
8755
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
8643
|
-
return /* @__PURE__ */
|
|
8644
|
-
/* @__PURE__ */
|
|
8756
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
8757
|
+
/* @__PURE__ */ jsx84(
|
|
8645
8758
|
GameHeader,
|
|
8646
8759
|
{
|
|
8647
8760
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
8648
8761
|
eyebrow: config?.poolLabel,
|
|
8649
|
-
right: formation ? /* @__PURE__ */
|
|
8762
|
+
right: formation ? /* @__PURE__ */ jsx84(Chip, { variant: "accent", children: formation }) : void 0,
|
|
8650
8763
|
onBack,
|
|
8651
8764
|
backLabel: ui.back
|
|
8652
8765
|
}
|
|
8653
8766
|
),
|
|
8654
|
-
!config && /* @__PURE__ */
|
|
8655
|
-
config && /* @__PURE__ */
|
|
8656
|
-
/* @__PURE__ */
|
|
8657
|
-
!isOver && /* @__PURE__ */
|
|
8658
|
-
rows.length > 0 && /* @__PURE__ */
|
|
8659
|
-
/* @__PURE__ */
|
|
8660
|
-
/* @__PURE__ */
|
|
8767
|
+
!config && /* @__PURE__ */ jsx84("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
8768
|
+
config && /* @__PURE__ */ jsxs72(Fragment19, { children: [
|
|
8769
|
+
/* @__PURE__ */ jsxs72("div", { className: "ss-g-body", children: [
|
|
8770
|
+
!isOver && /* @__PURE__ */ jsx84(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
8771
|
+
rows.length > 0 && /* @__PURE__ */ jsxs72("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
8772
|
+
/* @__PURE__ */ jsx84(PitchSvg, { variant: "full" }),
|
|
8773
|
+
/* @__PURE__ */ jsx84("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ jsx84("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
8661
8774
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
8662
8775
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
8663
8776
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
8664
8777
|
const flag = nationalityFlag(pos.nationality);
|
|
8665
8778
|
if (lineupEntry) {
|
|
8666
|
-
return /* @__PURE__ */
|
|
8667
|
-
/* @__PURE__ */
|
|
8779
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
8780
|
+
/* @__PURE__ */ jsx84(
|
|
8668
8781
|
PlayerAvatar,
|
|
8669
8782
|
{
|
|
8670
8783
|
name: lineupEntry.name,
|
|
@@ -8672,11 +8785,11 @@ function GuessTheXiGame({
|
|
|
8672
8785
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
8673
8786
|
}
|
|
8674
8787
|
),
|
|
8675
|
-
/* @__PURE__ */
|
|
8788
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
8676
8789
|
] }, `${pos.slot}-${c}`);
|
|
8677
8790
|
}
|
|
8678
|
-
return /* @__PURE__ */
|
|
8679
|
-
/* @__PURE__ */
|
|
8791
|
+
return /* @__PURE__ */ jsxs72("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
8792
|
+
/* @__PURE__ */ jsx84(
|
|
8680
8793
|
"span",
|
|
8681
8794
|
{
|
|
8682
8795
|
className: "ss-g-gxi-disc",
|
|
@@ -8687,22 +8800,22 @@ function GuessTheXiGame({
|
|
|
8687
8800
|
children: flag
|
|
8688
8801
|
}
|
|
8689
8802
|
),
|
|
8690
|
-
name ? /* @__PURE__ */
|
|
8803
|
+
name ? /* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
8691
8804
|
] }, `${pos.slot}-${c}`);
|
|
8692
8805
|
}) }, r)) })
|
|
8693
8806
|
] }),
|
|
8694
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */
|
|
8695
|
-
/* @__PURE__ */
|
|
8807
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsxs72("div", { className: "ss-g-gxi-wrong", children: [
|
|
8808
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
8696
8809
|
wrongGuesses.map((g) => {
|
|
8697
8810
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
8698
|
-
return /* @__PURE__ */
|
|
8699
|
-
/* @__PURE__ */
|
|
8700
|
-
/* @__PURE__ */
|
|
8811
|
+
return /* @__PURE__ */ jsxs72("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
8812
|
+
/* @__PURE__ */ jsx84(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
8813
|
+
/* @__PURE__ */ jsx84("s", { children: teamName(g.teamId) })
|
|
8701
8814
|
] }, g.teamId);
|
|
8702
8815
|
})
|
|
8703
8816
|
] }),
|
|
8704
|
-
isOver && /* @__PURE__ */
|
|
8705
|
-
/* @__PURE__ */
|
|
8817
|
+
isOver && /* @__PURE__ */ jsxs72(Fragment19, { children: [
|
|
8818
|
+
/* @__PURE__ */ jsx84(
|
|
8706
8819
|
ResultCard,
|
|
8707
8820
|
{
|
|
8708
8821
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -8713,29 +8826,29 @@ function GuessTheXiGame({
|
|
|
8713
8826
|
ui
|
|
8714
8827
|
}
|
|
8715
8828
|
),
|
|
8716
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */
|
|
8717
|
-
/* @__PURE__ */
|
|
8718
|
-
/* @__PURE__ */
|
|
8719
|
-
/* @__PURE__ */
|
|
8829
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ jsxs72("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
8830
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
8831
|
+
/* @__PURE__ */ jsx84(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
8832
|
+
/* @__PURE__ */ jsx84("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
8720
8833
|
] })
|
|
8721
8834
|
] })
|
|
8722
8835
|
] }),
|
|
8723
|
-
!isOver && /* @__PURE__ */
|
|
8724
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */
|
|
8836
|
+
!isOver && /* @__PURE__ */ jsxs72(FooterBar, { children: [
|
|
8837
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx84(
|
|
8725
8838
|
OptionList,
|
|
8726
8839
|
{
|
|
8727
8840
|
label: t.optionsLabel,
|
|
8728
8841
|
options: filtered.map((tm) => ({
|
|
8729
8842
|
key: tm.teamId,
|
|
8730
|
-
content: /* @__PURE__ */
|
|
8731
|
-
/* @__PURE__ */
|
|
8732
|
-
/* @__PURE__ */
|
|
8843
|
+
content: /* @__PURE__ */ jsxs72(Fragment19, { children: [
|
|
8844
|
+
/* @__PURE__ */ jsx84(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
8845
|
+
/* @__PURE__ */ jsx84("span", { children: tm.teamName })
|
|
8733
8846
|
] })
|
|
8734
8847
|
})),
|
|
8735
8848
|
onPick: (k) => handlePick(Number(k))
|
|
8736
8849
|
}
|
|
8737
8850
|
),
|
|
8738
|
-
/* @__PURE__ */
|
|
8851
|
+
/* @__PURE__ */ jsx84(
|
|
8739
8852
|
SearchField,
|
|
8740
8853
|
{
|
|
8741
8854
|
id: inputId,
|
|
@@ -8752,8 +8865,8 @@ function GuessTheXiGame({
|
|
|
8752
8865
|
}
|
|
8753
8866
|
|
|
8754
8867
|
// src/components/games/DailyQuizGame.tsx
|
|
8755
|
-
import { useState as
|
|
8756
|
-
import { Fragment as
|
|
8868
|
+
import { useState as useState44 } from "react";
|
|
8869
|
+
import { Fragment as Fragment20, jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
8757
8870
|
function parseClientState6(json) {
|
|
8758
8871
|
if (!json) return null;
|
|
8759
8872
|
try {
|
|
@@ -8774,13 +8887,13 @@ function OptionName({ text }) {
|
|
|
8774
8887
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
8775
8888
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
8776
8889
|
if (!isPlainName || base === "") {
|
|
8777
|
-
return /* @__PURE__ */
|
|
8890
|
+
return /* @__PURE__ */ jsx85("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ jsx85("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
8778
8891
|
}
|
|
8779
8892
|
const { first, last } = splitName(base);
|
|
8780
|
-
return /* @__PURE__ */
|
|
8781
|
-
first && /* @__PURE__ */
|
|
8782
|
-
/* @__PURE__ */
|
|
8783
|
-
suffix && /* @__PURE__ */
|
|
8893
|
+
return /* @__PURE__ */ jsxs73("span", { className: "ss-g-dq-opt-name", children: [
|
|
8894
|
+
first && /* @__PURE__ */ jsx85("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
8895
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
8896
|
+
suffix && /* @__PURE__ */ jsx85("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
8784
8897
|
] });
|
|
8785
8898
|
}
|
|
8786
8899
|
function DailyQuizGame({
|
|
@@ -8793,15 +8906,15 @@ function DailyQuizGame({
|
|
|
8793
8906
|
}) {
|
|
8794
8907
|
const s = ui.games.dailyQuiz;
|
|
8795
8908
|
const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
|
|
8796
|
-
const [selections, setSelections] =
|
|
8797
|
-
const [page, setPage] =
|
|
8909
|
+
const [selections, setSelections] = useState44(/* @__PURE__ */ new Map());
|
|
8910
|
+
const [page, setPage] = useState44(0);
|
|
8798
8911
|
const clientState = parseClientState6(result?.clientStateJson);
|
|
8799
8912
|
const results = clientState?.results ?? [];
|
|
8800
8913
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
8801
8914
|
if (!config) {
|
|
8802
|
-
return /* @__PURE__ */
|
|
8803
|
-
/* @__PURE__ */
|
|
8804
|
-
/* @__PURE__ */
|
|
8915
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8916
|
+
/* @__PURE__ */ jsx85(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
8917
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8805
8918
|
] });
|
|
8806
8919
|
}
|
|
8807
8920
|
const questions = config.questions;
|
|
@@ -8836,11 +8949,11 @@ function DailyQuizGame({
|
|
|
8836
8949
|
return r.isCorrect ? "correct" : "wrong";
|
|
8837
8950
|
});
|
|
8838
8951
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
8839
|
-
return /* @__PURE__ */
|
|
8840
|
-
/* @__PURE__ */
|
|
8841
|
-
/* @__PURE__ */
|
|
8842
|
-
/* @__PURE__ */
|
|
8843
|
-
/* @__PURE__ */
|
|
8952
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8953
|
+
/* @__PURE__ */ jsx85(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
8954
|
+
/* @__PURE__ */ jsx85(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
8955
|
+
/* @__PURE__ */ jsxs73("div", { className: "ss-g-body", children: [
|
|
8956
|
+
/* @__PURE__ */ jsx85(
|
|
8844
8957
|
ResultCard,
|
|
8845
8958
|
{
|
|
8846
8959
|
tone: "neutral",
|
|
@@ -8853,15 +8966,15 @@ function DailyQuizGame({
|
|
|
8853
8966
|
questions.map((q) => {
|
|
8854
8967
|
const r = findResult(results, q.index);
|
|
8855
8968
|
const picked = selections.get(q.index);
|
|
8856
|
-
return /* @__PURE__ */
|
|
8857
|
-
/* @__PURE__ */
|
|
8858
|
-
r && /* @__PURE__ */
|
|
8969
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-dq-rq", children: [
|
|
8970
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
8971
|
+
r && /* @__PURE__ */ jsx85("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
8859
8972
|
let cls = "ss-g-dq-rq-opt";
|
|
8860
8973
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
8861
8974
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
8862
|
-
return /* @__PURE__ */
|
|
8975
|
+
return /* @__PURE__ */ jsx85("span", { className: cls, children: opt }, optIdx);
|
|
8863
8976
|
}) }),
|
|
8864
|
-
r?.revealText && /* @__PURE__ */
|
|
8977
|
+
r?.revealText && /* @__PURE__ */ jsx85("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
8865
8978
|
] }, q.index);
|
|
8866
8979
|
})
|
|
8867
8980
|
] })
|
|
@@ -8869,16 +8982,16 @@ function DailyQuizGame({
|
|
|
8869
8982
|
}
|
|
8870
8983
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
8871
8984
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
8872
|
-
return /* @__PURE__ */
|
|
8873
|
-
/* @__PURE__ */
|
|
8874
|
-
/* @__PURE__ */
|
|
8875
|
-
/* @__PURE__ */
|
|
8876
|
-
/* @__PURE__ */
|
|
8877
|
-
/* @__PURE__ */
|
|
8985
|
+
return /* @__PURE__ */ jsxs73("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
8986
|
+
/* @__PURE__ */ jsx85(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
8987
|
+
/* @__PURE__ */ jsx85(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
8988
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs73(Fragment20, { children: [
|
|
8989
|
+
/* @__PURE__ */ jsx85("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
8990
|
+
/* @__PURE__ */ jsx85("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
8878
8991
|
const selected = optIdx === selectedIdx;
|
|
8879
8992
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
8880
8993
|
const playerName = opt;
|
|
8881
|
-
return /* @__PURE__ */
|
|
8994
|
+
return /* @__PURE__ */ jsxs73(
|
|
8882
8995
|
"button",
|
|
8883
8996
|
{
|
|
8884
8997
|
type: "button",
|
|
@@ -8887,25 +9000,25 @@ function DailyQuizGame({
|
|
|
8887
9000
|
disabled: submitting,
|
|
8888
9001
|
onClick: () => handleSelect(current.index, optIdx),
|
|
8889
9002
|
children: [
|
|
8890
|
-
current.optionImagePaths && /* @__PURE__ */
|
|
8891
|
-
/* @__PURE__ */
|
|
8892
|
-
/* @__PURE__ */
|
|
9003
|
+
current.optionImagePaths && /* @__PURE__ */ jsx85(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
9004
|
+
/* @__PURE__ */ jsx85("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ jsx85(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
9005
|
+
/* @__PURE__ */ jsx85(OptionName, { text: opt })
|
|
8893
9006
|
]
|
|
8894
9007
|
},
|
|
8895
9008
|
optIdx
|
|
8896
9009
|
);
|
|
8897
9010
|
}) })
|
|
8898
9011
|
] }) }),
|
|
8899
|
-
/* @__PURE__ */
|
|
8900
|
-
page > 0 && /* @__PURE__ */
|
|
8901
|
-
isLast ? /* @__PURE__ */
|
|
9012
|
+
/* @__PURE__ */ jsx85(FooterBar, { children: /* @__PURE__ */ jsxs73("div", { className: "ss-g-dq-nav", children: [
|
|
9013
|
+
page > 0 && /* @__PURE__ */ jsx85(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
9014
|
+
isLast ? /* @__PURE__ */ jsx85(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ jsx85(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
8902
9015
|
] }) })
|
|
8903
9016
|
] });
|
|
8904
9017
|
}
|
|
8905
9018
|
|
|
8906
9019
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
8907
|
-
import { useId as useId7, useState as
|
|
8908
|
-
import { jsx as
|
|
9020
|
+
import { useId as useId7, useState as useState45 } from "react";
|
|
9021
|
+
import { jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
8909
9022
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
8910
9023
|
function parseClientState7(json) {
|
|
8911
9024
|
if (!json) return null;
|
|
@@ -8923,7 +9036,7 @@ function isLocked(kickoffUtc) {
|
|
|
8923
9036
|
}
|
|
8924
9037
|
}
|
|
8925
9038
|
function IconMinus() {
|
|
8926
|
-
return /* @__PURE__ */
|
|
9039
|
+
return /* @__PURE__ */ jsx86(
|
|
8927
9040
|
"svg",
|
|
8928
9041
|
{
|
|
8929
9042
|
width: 18,
|
|
@@ -8934,20 +9047,20 @@ function IconMinus() {
|
|
|
8934
9047
|
strokeWidth: 2.2,
|
|
8935
9048
|
strokeLinecap: "round",
|
|
8936
9049
|
"aria-hidden": "true",
|
|
8937
|
-
children: /* @__PURE__ */
|
|
9050
|
+
children: /* @__PURE__ */ jsx86("path", { d: "M5 12h14" })
|
|
8938
9051
|
}
|
|
8939
9052
|
);
|
|
8940
9053
|
}
|
|
8941
9054
|
function TeamBadge({ team, label }) {
|
|
8942
|
-
return /* @__PURE__ */
|
|
8943
|
-
/* @__PURE__ */
|
|
8944
|
-
/* @__PURE__ */
|
|
8945
|
-
/* @__PURE__ */
|
|
9055
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-mp-team", children: [
|
|
9056
|
+
/* @__PURE__ */ jsx86(CrestShield, { name: team.name, size: 44 }),
|
|
9057
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
9058
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-team-side", children: label })
|
|
8946
9059
|
] });
|
|
8947
9060
|
}
|
|
8948
9061
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
8949
|
-
const col = (side, team, value) => /* @__PURE__ */
|
|
8950
|
-
edit && /* @__PURE__ */
|
|
9062
|
+
const col = (side, team, value) => /* @__PURE__ */ jsxs74("div", { className: "ss-g-mp-col", children: [
|
|
9063
|
+
edit && /* @__PURE__ */ jsx86(
|
|
8951
9064
|
"button",
|
|
8952
9065
|
{
|
|
8953
9066
|
type: "button",
|
|
@@ -8955,11 +9068,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8955
9068
|
"aria-label": t.goalsUp(team.name),
|
|
8956
9069
|
disabled: edit.disabled,
|
|
8957
9070
|
onClick: () => edit.onStep(side, 1),
|
|
8958
|
-
children: /* @__PURE__ */
|
|
9071
|
+
children: /* @__PURE__ */ jsx86(IconPlus, { size: 18 })
|
|
8959
9072
|
}
|
|
8960
9073
|
),
|
|
8961
|
-
/* @__PURE__ */
|
|
8962
|
-
edit && /* @__PURE__ */
|
|
9074
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
9075
|
+
edit && /* @__PURE__ */ jsx86(
|
|
8963
9076
|
"button",
|
|
8964
9077
|
{
|
|
8965
9078
|
type: "button",
|
|
@@ -8967,27 +9080,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
8967
9080
|
"aria-label": t.goalsDown(team.name),
|
|
8968
9081
|
disabled: edit.disabled || value <= 0,
|
|
8969
9082
|
onClick: () => edit.onStep(side, -1),
|
|
8970
|
-
children: /* @__PURE__ */
|
|
9083
|
+
children: /* @__PURE__ */ jsx86(IconMinus, {})
|
|
8971
9084
|
}
|
|
8972
9085
|
)
|
|
8973
9086
|
] });
|
|
8974
|
-
return /* @__PURE__ */
|
|
8975
|
-
/* @__PURE__ */
|
|
8976
|
-
/* @__PURE__ */
|
|
9087
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-mp-card", children: [
|
|
9088
|
+
/* @__PURE__ */ jsx86(TeamBadge, { team: home, label: t.home }),
|
|
9089
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-mp-scores", children: [
|
|
8977
9090
|
col("home", home, h),
|
|
8978
|
-
/* @__PURE__ */
|
|
9091
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
8979
9092
|
col("away", away, a)
|
|
8980
9093
|
] }),
|
|
8981
|
-
/* @__PURE__ */
|
|
9094
|
+
/* @__PURE__ */ jsx86(TeamBadge, { team: away, label: t.away })
|
|
8982
9095
|
] });
|
|
8983
9096
|
}
|
|
8984
9097
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
8985
|
-
return /* @__PURE__ */
|
|
8986
|
-
/* @__PURE__ */
|
|
8987
|
-
/* @__PURE__ */
|
|
8988
|
-
ok ? /* @__PURE__ */
|
|
8989
|
-
/* @__PURE__ */
|
|
8990
|
-
detail ? /* @__PURE__ */
|
|
9098
|
+
return /* @__PURE__ */ jsxs74("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
9099
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-row-k", children: label }),
|
|
9100
|
+
/* @__PURE__ */ jsxs74("span", { className: "ss-g-mp-row-v", children: [
|
|
9101
|
+
ok ? /* @__PURE__ */ jsx86(IconCheck, {}) : /* @__PURE__ */ jsx86(IconClose, { size: 14 }),
|
|
9102
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
9103
|
+
detail ? /* @__PURE__ */ jsx86("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
8991
9104
|
] })
|
|
8992
9105
|
] });
|
|
8993
9106
|
}
|
|
@@ -9000,20 +9113,20 @@ function MatchdayPredictorGame({
|
|
|
9000
9113
|
onBack
|
|
9001
9114
|
}) {
|
|
9002
9115
|
const t = ui.games.predictor;
|
|
9003
|
-
const [homeScore, setHomeScore] =
|
|
9004
|
-
const [awayScore, setAwayScore] =
|
|
9005
|
-
const [firstScorerPlayerId, setFirstScorerPlayerId] =
|
|
9006
|
-
const [lastEdited, setLastEdited] =
|
|
9007
|
-
const [query, setQuery] =
|
|
9116
|
+
const [homeScore, setHomeScore] = useState45(0);
|
|
9117
|
+
const [awayScore, setAwayScore] = useState45(0);
|
|
9118
|
+
const [firstScorerPlayerId, setFirstScorerPlayerId] = useState45(null);
|
|
9119
|
+
const [lastEdited, setLastEdited] = useState45("home");
|
|
9120
|
+
const [query, setQuery] = useState45("");
|
|
9008
9121
|
const searchId = useId7();
|
|
9009
9122
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
9010
9123
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
9011
|
-
const header = /* @__PURE__ */
|
|
9124
|
+
const header = /* @__PURE__ */ jsx86(
|
|
9012
9125
|
GameHeader,
|
|
9013
9126
|
{
|
|
9014
9127
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
9015
9128
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
9016
|
-
right: config ? /* @__PURE__ */
|
|
9129
|
+
right: config ? /* @__PURE__ */ jsx86(Chip, { icon: /* @__PURE__ */ jsx86(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
9017
9130
|
onBack,
|
|
9018
9131
|
backLabel: ui.back
|
|
9019
9132
|
}
|
|
@@ -9021,10 +9134,10 @@ function MatchdayPredictorGame({
|
|
|
9021
9134
|
if (alreadyPlayed && clientState) {
|
|
9022
9135
|
if (!clientState.graded) {
|
|
9023
9136
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
9024
|
-
return /* @__PURE__ */
|
|
9137
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
9025
9138
|
header,
|
|
9026
|
-
/* @__PURE__ */
|
|
9027
|
-
config && /* @__PURE__ */
|
|
9139
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-body", children: [
|
|
9140
|
+
config && /* @__PURE__ */ jsx86(
|
|
9028
9141
|
ScoreCard,
|
|
9029
9142
|
{
|
|
9030
9143
|
home: config.homeTeam,
|
|
@@ -9034,7 +9147,7 @@ function MatchdayPredictorGame({
|
|
|
9034
9147
|
t
|
|
9035
9148
|
}
|
|
9036
9149
|
),
|
|
9037
|
-
/* @__PURE__ */
|
|
9150
|
+
/* @__PURE__ */ jsx86(
|
|
9038
9151
|
ResultCard,
|
|
9039
9152
|
{
|
|
9040
9153
|
tone: "neutral",
|
|
@@ -9051,28 +9164,28 @@ function MatchdayPredictorGame({
|
|
|
9051
9164
|
}
|
|
9052
9165
|
)
|
|
9053
9166
|
] }),
|
|
9054
|
-
/* @__PURE__ */
|
|
9167
|
+
/* @__PURE__ */ jsx86(FooterBar, { children: /* @__PURE__ */ jsx86("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
9055
9168
|
] });
|
|
9056
9169
|
}
|
|
9057
9170
|
const r = clientState.result;
|
|
9058
|
-
return /* @__PURE__ */
|
|
9171
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
9059
9172
|
header,
|
|
9060
|
-
/* @__PURE__ */
|
|
9061
|
-
config && /* @__PURE__ */
|
|
9062
|
-
/* @__PURE__ */
|
|
9063
|
-
/* @__PURE__ */
|
|
9064
|
-
/* @__PURE__ */
|
|
9065
|
-
/* @__PURE__ */
|
|
9066
|
-
!clientState.firstScorerVoid && /* @__PURE__ */
|
|
9173
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-body", children: [
|
|
9174
|
+
config && /* @__PURE__ */ jsx86(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
9175
|
+
/* @__PURE__ */ jsx86(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
9176
|
+
/* @__PURE__ */ jsxs74("ul", { className: "ss-g-mp-rows", children: [
|
|
9177
|
+
/* @__PURE__ */ jsx86(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
9178
|
+
/* @__PURE__ */ jsx86(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
9179
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ jsx86(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
9067
9180
|
] })
|
|
9068
9181
|
] }),
|
|
9069
|
-
/* @__PURE__ */
|
|
9182
|
+
/* @__PURE__ */ jsx86(FooterBar, { children: /* @__PURE__ */ jsx86("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
9070
9183
|
] });
|
|
9071
9184
|
}
|
|
9072
9185
|
if (!config) {
|
|
9073
|
-
return /* @__PURE__ */
|
|
9186
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
9074
9187
|
header,
|
|
9075
|
-
/* @__PURE__ */
|
|
9188
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
9076
9189
|
] });
|
|
9077
9190
|
}
|
|
9078
9191
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -9096,10 +9209,10 @@ function MatchdayPredictorGame({
|
|
|
9096
9209
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
9097
9210
|
const q = query.trim().toLowerCase();
|
|
9098
9211
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
9099
|
-
return /* @__PURE__ */
|
|
9212
|
+
return /* @__PURE__ */ jsxs74("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
9100
9213
|
header,
|
|
9101
|
-
/* @__PURE__ */
|
|
9102
|
-
/* @__PURE__ */
|
|
9214
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-body", children: [
|
|
9215
|
+
/* @__PURE__ */ jsx86(
|
|
9103
9216
|
ScoreCard,
|
|
9104
9217
|
{
|
|
9105
9218
|
home: config.homeTeam,
|
|
@@ -9110,12 +9223,12 @@ function MatchdayPredictorGame({
|
|
|
9110
9223
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
9111
9224
|
}
|
|
9112
9225
|
),
|
|
9113
|
-
pool.length > 0 && /* @__PURE__ */
|
|
9114
|
-
/* @__PURE__ */
|
|
9115
|
-
/* @__PURE__ */
|
|
9116
|
-
/* @__PURE__ */
|
|
9226
|
+
pool.length > 0 && /* @__PURE__ */ jsxs74("section", { className: "ss-g-mp-scorer", children: [
|
|
9227
|
+
/* @__PURE__ */ jsxs74("div", { className: "ss-g-mp-sec-head", children: [
|
|
9228
|
+
/* @__PURE__ */ jsx86("h3", { children: t.firstScorer }),
|
|
9229
|
+
/* @__PURE__ */ jsx86("span", { children: t.optional })
|
|
9117
9230
|
] }),
|
|
9118
|
-
showSearch && /* @__PURE__ */
|
|
9231
|
+
showSearch && /* @__PURE__ */ jsx86(
|
|
9119
9232
|
SearchField,
|
|
9120
9233
|
{
|
|
9121
9234
|
id: searchId,
|
|
@@ -9127,9 +9240,9 @@ function MatchdayPredictorGame({
|
|
|
9127
9240
|
disabled
|
|
9128
9241
|
}
|
|
9129
9242
|
),
|
|
9130
|
-
/* @__PURE__ */
|
|
9243
|
+
/* @__PURE__ */ jsx86("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
9131
9244
|
const selected = firstScorerPlayerId === p.playerId;
|
|
9132
|
-
return /* @__PURE__ */
|
|
9245
|
+
return /* @__PURE__ */ jsxs74(
|
|
9133
9246
|
"button",
|
|
9134
9247
|
{
|
|
9135
9248
|
type: "button",
|
|
@@ -9139,15 +9252,15 @@ function MatchdayPredictorGame({
|
|
|
9139
9252
|
disabled,
|
|
9140
9253
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
9141
9254
|
children: [
|
|
9142
|
-
selected && /* @__PURE__ */
|
|
9143
|
-
/* @__PURE__ */
|
|
9144
|
-
/* @__PURE__ */
|
|
9255
|
+
selected && /* @__PURE__ */ jsx86("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ jsx86(IconCheck, { size: 12 }) }),
|
|
9256
|
+
/* @__PURE__ */ jsx86(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
9257
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
9145
9258
|
]
|
|
9146
9259
|
},
|
|
9147
9260
|
p.playerId
|
|
9148
9261
|
);
|
|
9149
9262
|
}) }),
|
|
9150
|
-
/* @__PURE__ */
|
|
9263
|
+
/* @__PURE__ */ jsxs74(
|
|
9151
9264
|
"button",
|
|
9152
9265
|
{
|
|
9153
9266
|
type: "button",
|
|
@@ -9156,24 +9269,24 @@ function MatchdayPredictorGame({
|
|
|
9156
9269
|
disabled,
|
|
9157
9270
|
onClick: () => setFirstScorerPlayerId(null),
|
|
9158
9271
|
children: [
|
|
9159
|
-
/* @__PURE__ */
|
|
9272
|
+
/* @__PURE__ */ jsx86("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
9160
9273
|
t.noScorer
|
|
9161
9274
|
]
|
|
9162
9275
|
}
|
|
9163
9276
|
)
|
|
9164
9277
|
] }),
|
|
9165
|
-
locked && /* @__PURE__ */
|
|
9278
|
+
locked && /* @__PURE__ */ jsx86("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
9166
9279
|
] }),
|
|
9167
|
-
/* @__PURE__ */
|
|
9168
|
-
/* @__PURE__ */
|
|
9169
|
-
/* @__PURE__ */
|
|
9280
|
+
/* @__PURE__ */ jsxs74(FooterBar, { children: [
|
|
9281
|
+
/* @__PURE__ */ jsx86(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
9282
|
+
/* @__PURE__ */ jsx86("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
9170
9283
|
] })
|
|
9171
9284
|
] });
|
|
9172
9285
|
}
|
|
9173
9286
|
|
|
9174
9287
|
// src/components/games/StartingXiGame.tsx
|
|
9175
|
-
import { useId as useId8, useState as
|
|
9176
|
-
import { Fragment as
|
|
9288
|
+
import { useId as useId8, useState as useState46 } from "react";
|
|
9289
|
+
import { Fragment as Fragment21, jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
9177
9290
|
var POINTS_PER_STARTER = 8;
|
|
9178
9291
|
var XI_SIZE = 11;
|
|
9179
9292
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -9216,26 +9329,26 @@ function StartingXiGame({
|
|
|
9216
9329
|
lockAtUtc
|
|
9217
9330
|
}) {
|
|
9218
9331
|
const t = ui.games.startingXi;
|
|
9219
|
-
const [slotPlayers, setSlotPlayers] =
|
|
9220
|
-
const [active, setActive] =
|
|
9221
|
-
const [query, setQuery] =
|
|
9332
|
+
const [slotPlayers, setSlotPlayers] = useState46(() => Array(XI_SIZE).fill(null));
|
|
9333
|
+
const [active, setActive] = useState46(0);
|
|
9334
|
+
const [query, setQuery] = useState46("");
|
|
9222
9335
|
const searchId = useId8();
|
|
9223
9336
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
9224
9337
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
9225
|
-
const header = /* @__PURE__ */
|
|
9338
|
+
const header = /* @__PURE__ */ jsx87(
|
|
9226
9339
|
GameHeader,
|
|
9227
9340
|
{
|
|
9228
9341
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
9229
9342
|
eyebrow: t.eyebrow,
|
|
9230
|
-
right: /* @__PURE__ */
|
|
9343
|
+
right: /* @__PURE__ */ jsx87(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
9231
9344
|
onBack,
|
|
9232
9345
|
backLabel: ui.back
|
|
9233
9346
|
}
|
|
9234
9347
|
);
|
|
9235
9348
|
function statusScreen(title, score) {
|
|
9236
|
-
return /* @__PURE__ */
|
|
9349
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
9237
9350
|
header,
|
|
9238
|
-
/* @__PURE__ */
|
|
9351
|
+
/* @__PURE__ */ jsx87("div", { className: "ss-g-body", children: /* @__PURE__ */ jsx87(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
9239
9352
|
] });
|
|
9240
9353
|
}
|
|
9241
9354
|
if (alreadyPlayed) {
|
|
@@ -9244,9 +9357,9 @@ function StartingXiGame({
|
|
|
9244
9357
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
9245
9358
|
}
|
|
9246
9359
|
if (!config) {
|
|
9247
|
-
return /* @__PURE__ */
|
|
9360
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
9248
9361
|
header,
|
|
9249
|
-
/* @__PURE__ */
|
|
9362
|
+
/* @__PURE__ */ jsx87("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
9250
9363
|
] });
|
|
9251
9364
|
}
|
|
9252
9365
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -9281,27 +9394,27 @@ function StartingXiGame({
|
|
|
9281
9394
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
9282
9395
|
}
|
|
9283
9396
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
9284
|
-
return /* @__PURE__ */
|
|
9397
|
+
return /* @__PURE__ */ jsxs75("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
9285
9398
|
header,
|
|
9286
|
-
/* @__PURE__ */
|
|
9399
|
+
/* @__PURE__ */ jsx87(
|
|
9287
9400
|
SegmentProgress,
|
|
9288
9401
|
{
|
|
9289
9402
|
segments,
|
|
9290
9403
|
ariaLabel: t.picked(pickedCount),
|
|
9291
9404
|
leftLabel: t.picked(pickedCount),
|
|
9292
9405
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
9293
|
-
right: /* @__PURE__ */
|
|
9406
|
+
right: /* @__PURE__ */ jsx87(Chip, { children: formation })
|
|
9294
9407
|
}
|
|
9295
9408
|
),
|
|
9296
|
-
/* @__PURE__ */
|
|
9297
|
-
/* @__PURE__ */
|
|
9298
|
-
/* @__PURE__ */
|
|
9409
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-body", children: [
|
|
9410
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-xi-pitch", children: [
|
|
9411
|
+
/* @__PURE__ */ jsx87(PitchSvg, { variant: "half" }),
|
|
9299
9412
|
slots.map((s) => {
|
|
9300
9413
|
const playerId = slotPlayers[s.index] ?? null;
|
|
9301
9414
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
9302
9415
|
const name = player?.playerName ?? "";
|
|
9303
9416
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
9304
|
-
return /* @__PURE__ */
|
|
9417
|
+
return /* @__PURE__ */ jsxs75(
|
|
9305
9418
|
"button",
|
|
9306
9419
|
{
|
|
9307
9420
|
type: "button",
|
|
@@ -9313,21 +9426,21 @@ function StartingXiGame({
|
|
|
9313
9426
|
disabled: submitting,
|
|
9314
9427
|
onClick: () => tapSlot(s.index),
|
|
9315
9428
|
children: [
|
|
9316
|
-
/* @__PURE__ */
|
|
9317
|
-
/* @__PURE__ */
|
|
9429
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ jsx87(IconPlus, { size: 18 }) }),
|
|
9430
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
9318
9431
|
]
|
|
9319
9432
|
},
|
|
9320
9433
|
s.index
|
|
9321
9434
|
);
|
|
9322
9435
|
})
|
|
9323
9436
|
] }),
|
|
9324
|
-
/* @__PURE__ */
|
|
9325
|
-
/* @__PURE__ */
|
|
9326
|
-
/* @__PURE__ */
|
|
9327
|
-
/* @__PURE__ */
|
|
9328
|
-
] }) : /* @__PURE__ */
|
|
9329
|
-
activeSlot && /* @__PURE__ */
|
|
9330
|
-
/* @__PURE__ */
|
|
9437
|
+
/* @__PURE__ */ jsxs75("div", { className: "ss-g-xi-picker", children: [
|
|
9438
|
+
/* @__PURE__ */ jsx87("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs75(Fragment21, { children: [
|
|
9439
|
+
/* @__PURE__ */ jsx87(Chip, { variant: "badge", children: activeSlot.label }),
|
|
9440
|
+
/* @__PURE__ */ jsx87("strong", { children: t.pickFor(activeSlot.label) })
|
|
9441
|
+
] }) : /* @__PURE__ */ jsx87("strong", { children: t.allPicked }) }),
|
|
9442
|
+
activeSlot && /* @__PURE__ */ jsxs75(Fragment21, { children: [
|
|
9443
|
+
/* @__PURE__ */ jsx87(
|
|
9331
9444
|
SearchField,
|
|
9332
9445
|
{
|
|
9333
9446
|
id: searchId,
|
|
@@ -9339,18 +9452,18 @@ function StartingXiGame({
|
|
|
9339
9452
|
disabled: submitting
|
|
9340
9453
|
}
|
|
9341
9454
|
),
|
|
9342
|
-
/* @__PURE__ */
|
|
9343
|
-
/* @__PURE__ */
|
|
9344
|
-
/* @__PURE__ */
|
|
9345
|
-
/* @__PURE__ */
|
|
9455
|
+
/* @__PURE__ */ jsx87("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ jsx87("li", { children: /* @__PURE__ */ jsxs75("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
9456
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
9457
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
9458
|
+
/* @__PURE__ */ jsx87("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
9346
9459
|
] }) }, p.playerId)) })
|
|
9347
9460
|
] })
|
|
9348
9461
|
] })
|
|
9349
9462
|
] }),
|
|
9350
|
-
/* @__PURE__ */
|
|
9351
|
-
/* @__PURE__ */
|
|
9352
|
-
/* @__PURE__ */
|
|
9353
|
-
/* @__PURE__ */
|
|
9463
|
+
/* @__PURE__ */ jsxs75(FooterBar, { children: [
|
|
9464
|
+
/* @__PURE__ */ jsx87(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
9465
|
+
/* @__PURE__ */ jsxs75("p", { className: "ss-g-xi-lock", children: [
|
|
9466
|
+
/* @__PURE__ */ jsx87(IconLock, {}),
|
|
9354
9467
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
9355
9468
|
] })
|
|
9356
9469
|
] })
|
|
@@ -9358,8 +9471,8 @@ function StartingXiGame({
|
|
|
9358
9471
|
}
|
|
9359
9472
|
|
|
9360
9473
|
// src/components/games/StatLadderGame.tsx
|
|
9361
|
-
import { useId as useId9, useState as
|
|
9362
|
-
import { jsx as
|
|
9474
|
+
import { useId as useId9, useState as useState47 } from "react";
|
|
9475
|
+
import { jsx as jsx88, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
9363
9476
|
function ladderClue(ladder) {
|
|
9364
9477
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
9365
9478
|
if (!mystery) return null;
|
|
@@ -9381,9 +9494,9 @@ function parseClientState9(json) {
|
|
|
9381
9494
|
}
|
|
9382
9495
|
function NameStack({ name }) {
|
|
9383
9496
|
const { first, last } = splitName(name);
|
|
9384
|
-
return /* @__PURE__ */
|
|
9385
|
-
first && /* @__PURE__ */
|
|
9386
|
-
/* @__PURE__ */
|
|
9497
|
+
return /* @__PURE__ */ jsxs76("span", { className: "ss-g-sl-name", children: [
|
|
9498
|
+
first && /* @__PURE__ */ jsx88("small", { children: `${first[0]}.` }),
|
|
9499
|
+
/* @__PURE__ */ jsx88("b", { children: last })
|
|
9387
9500
|
] });
|
|
9388
9501
|
}
|
|
9389
9502
|
function StatLadderGame({
|
|
@@ -9395,16 +9508,16 @@ function StatLadderGame({
|
|
|
9395
9508
|
onBack
|
|
9396
9509
|
}) {
|
|
9397
9510
|
const t = ui.games.statLadder;
|
|
9398
|
-
const [query, setQuery] =
|
|
9399
|
-
const [selectedId, setSelectedId] =
|
|
9511
|
+
const [query, setQuery] = useState47("");
|
|
9512
|
+
const [selectedId, setSelectedId] = useState47(null);
|
|
9400
9513
|
const searchId = useId9();
|
|
9401
9514
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
9402
9515
|
const revealed = clientState != null;
|
|
9403
|
-
const header = /* @__PURE__ */
|
|
9516
|
+
const header = /* @__PURE__ */ jsx88(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
9404
9517
|
if (!config) {
|
|
9405
|
-
return /* @__PURE__ */
|
|
9518
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
9406
9519
|
header,
|
|
9407
|
-
/* @__PURE__ */
|
|
9520
|
+
/* @__PURE__ */ jsx88("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
9408
9521
|
] });
|
|
9409
9522
|
}
|
|
9410
9523
|
const question = t.question(config.statLabel);
|
|
@@ -9416,45 +9529,45 @@ function StatLadderGame({
|
|
|
9416
9529
|
if (selectedId === null || submitting || revealed) return;
|
|
9417
9530
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
9418
9531
|
}
|
|
9419
|
-
return /* @__PURE__ */
|
|
9532
|
+
return /* @__PURE__ */ jsxs76("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
9420
9533
|
header,
|
|
9421
|
-
/* @__PURE__ */
|
|
9422
|
-
!revealed && /* @__PURE__ */
|
|
9423
|
-
/* @__PURE__ */
|
|
9424
|
-
/* @__PURE__ */
|
|
9425
|
-
/* @__PURE__ */
|
|
9534
|
+
/* @__PURE__ */ jsxs76("div", { className: "ss-g-body", children: [
|
|
9535
|
+
!revealed && /* @__PURE__ */ jsx88(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
9536
|
+
/* @__PURE__ */ jsxs76("div", { className: "ss-g-sl-prompt", children: [
|
|
9537
|
+
/* @__PURE__ */ jsx88(Chip, { variant: "accent", icon: /* @__PURE__ */ jsx88(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
9538
|
+
/* @__PURE__ */ jsxs76("h3", { className: "ss-g-sl-q", children: [
|
|
9426
9539
|
question.pre,
|
|
9427
|
-
/* @__PURE__ */
|
|
9540
|
+
/* @__PURE__ */ jsx88("em", { children: question.emph }),
|
|
9428
9541
|
question.post
|
|
9429
9542
|
] })
|
|
9430
9543
|
] }),
|
|
9431
|
-
/* @__PURE__ */
|
|
9432
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */
|
|
9544
|
+
/* @__PURE__ */ jsx88("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
9545
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ jsxs76(
|
|
9433
9546
|
"li",
|
|
9434
9547
|
{
|
|
9435
9548
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
9436
9549
|
"data-testid": "sl-mystery-rung",
|
|
9437
9550
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
9438
9551
|
children: [
|
|
9439
|
-
/* @__PURE__ */
|
|
9440
|
-
revealed ? /* @__PURE__ */
|
|
9441
|
-
revealed ? /* @__PURE__ */
|
|
9442
|
-
/* @__PURE__ */
|
|
9552
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
9553
|
+
revealed ? /* @__PURE__ */ jsx88(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ jsx88(Silhouette, { size: 52, variant: "mystery" }),
|
|
9554
|
+
revealed ? /* @__PURE__ */ jsx88(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ jsx88("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
9555
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
9443
9556
|
]
|
|
9444
9557
|
},
|
|
9445
9558
|
rung.rank
|
|
9446
|
-
) : /* @__PURE__ */
|
|
9447
|
-
/* @__PURE__ */
|
|
9448
|
-
/* @__PURE__ */
|
|
9449
|
-
/* @__PURE__ */
|
|
9450
|
-
/* @__PURE__ */
|
|
9559
|
+
) : /* @__PURE__ */ jsxs76("li", { className: "ss-g-sl-rung", children: [
|
|
9560
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
9561
|
+
/* @__PURE__ */ jsx88(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
9562
|
+
/* @__PURE__ */ jsx88(NameStack, { name: rung.playerName ?? "?" }),
|
|
9563
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
9451
9564
|
] }, rung.rank)
|
|
9452
9565
|
) }),
|
|
9453
|
-
clue && /* @__PURE__ */
|
|
9454
|
-
/* @__PURE__ */
|
|
9455
|
-
/* @__PURE__ */
|
|
9566
|
+
clue && /* @__PURE__ */ jsxs76("p", { className: "ss-g-sl-clue", children: [
|
|
9567
|
+
/* @__PURE__ */ jsx88(IconBulb, {}),
|
|
9568
|
+
/* @__PURE__ */ jsx88("span", { children: t.clue(clue, config.statLabel) })
|
|
9456
9569
|
] }),
|
|
9457
|
-
!revealed && /* @__PURE__ */
|
|
9570
|
+
!revealed && /* @__PURE__ */ jsx88("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ jsx88("li", { children: /* @__PURE__ */ jsxs76(
|
|
9458
9571
|
"button",
|
|
9459
9572
|
{
|
|
9460
9573
|
type: "button",
|
|
@@ -9467,13 +9580,13 @@ function StatLadderGame({
|
|
|
9467
9580
|
setQuery(p.playerName);
|
|
9468
9581
|
},
|
|
9469
9582
|
children: [
|
|
9470
|
-
/* @__PURE__ */
|
|
9471
|
-
/* @__PURE__ */
|
|
9472
|
-
selectedId === p.playerId && /* @__PURE__ */
|
|
9583
|
+
/* @__PURE__ */ jsx88(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
9584
|
+
/* @__PURE__ */ jsx88("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
9585
|
+
selectedId === p.playerId && /* @__PURE__ */ jsx88(IconCheck, {})
|
|
9473
9586
|
]
|
|
9474
9587
|
}
|
|
9475
9588
|
) }, p.playerId)) }),
|
|
9476
|
-
revealed && /* @__PURE__ */
|
|
9589
|
+
revealed && /* @__PURE__ */ jsx88(
|
|
9477
9590
|
ResultCard,
|
|
9478
9591
|
{
|
|
9479
9592
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -9484,8 +9597,8 @@ function StatLadderGame({
|
|
|
9484
9597
|
}
|
|
9485
9598
|
)
|
|
9486
9599
|
] }),
|
|
9487
|
-
!revealed && /* @__PURE__ */
|
|
9488
|
-
/* @__PURE__ */
|
|
9600
|
+
!revealed && /* @__PURE__ */ jsx88(FooterBar, { children: /* @__PURE__ */ jsxs76("div", { className: "ss-g-sl-guess", children: [
|
|
9601
|
+
/* @__PURE__ */ jsx88(
|
|
9489
9602
|
SearchField,
|
|
9490
9603
|
{
|
|
9491
9604
|
id: searchId,
|
|
@@ -9500,13 +9613,13 @@ function StatLadderGame({
|
|
|
9500
9613
|
disabled: submitting
|
|
9501
9614
|
}
|
|
9502
9615
|
),
|
|
9503
|
-
/* @__PURE__ */
|
|
9616
|
+
/* @__PURE__ */ jsx88(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
9504
9617
|
] }) })
|
|
9505
9618
|
] });
|
|
9506
9619
|
}
|
|
9507
9620
|
|
|
9508
9621
|
// src/components/games/FanMotmGame.tsx
|
|
9509
|
-
import { jsx as
|
|
9622
|
+
import { jsx as jsx89, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
9510
9623
|
function parseClientState10(json) {
|
|
9511
9624
|
if (!json) return null;
|
|
9512
9625
|
try {
|
|
@@ -9527,20 +9640,20 @@ function FanMotmGame({
|
|
|
9527
9640
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
9528
9641
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
9529
9642
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
9530
|
-
const header = /* @__PURE__ */
|
|
9643
|
+
const header = /* @__PURE__ */ jsx89(
|
|
9531
9644
|
GameHeader,
|
|
9532
9645
|
{
|
|
9533
9646
|
title: t.title,
|
|
9534
9647
|
eyebrow: t.eyebrow,
|
|
9535
|
-
right: alreadyVoted ? /* @__PURE__ */
|
|
9648
|
+
right: alreadyVoted ? /* @__PURE__ */ jsx89(Chip, { variant: "success", icon: /* @__PURE__ */ jsx89(IconCheck, {}), children: t.voted }) : void 0,
|
|
9536
9649
|
onBack,
|
|
9537
9650
|
backLabel: ui.back
|
|
9538
9651
|
}
|
|
9539
9652
|
);
|
|
9540
9653
|
if (!config) {
|
|
9541
|
-
return /* @__PURE__ */
|
|
9654
|
+
return /* @__PURE__ */ jsxs77("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
9542
9655
|
header,
|
|
9543
|
-
/* @__PURE__ */
|
|
9656
|
+
/* @__PURE__ */ jsx89("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
9544
9657
|
] });
|
|
9545
9658
|
}
|
|
9546
9659
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -9548,12 +9661,12 @@ function FanMotmGame({
|
|
|
9548
9661
|
if (alreadyVoted || submitting) return;
|
|
9549
9662
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
9550
9663
|
}
|
|
9551
|
-
return /* @__PURE__ */
|
|
9664
|
+
return /* @__PURE__ */ jsxs77("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
9552
9665
|
header,
|
|
9553
|
-
/* @__PURE__ */
|
|
9554
|
-
/* @__PURE__ */
|
|
9666
|
+
/* @__PURE__ */ jsxs77("div", { className: "ss-g-body", children: [
|
|
9667
|
+
/* @__PURE__ */ jsx89("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
9555
9668
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
9556
|
-
return /* @__PURE__ */
|
|
9669
|
+
return /* @__PURE__ */ jsx89("li", { children: /* @__PURE__ */ jsxs77(
|
|
9557
9670
|
"button",
|
|
9558
9671
|
{
|
|
9559
9672
|
type: "button",
|
|
@@ -9562,24 +9675,24 @@ function FanMotmGame({
|
|
|
9562
9675
|
disabled: alreadyVoted || submitting,
|
|
9563
9676
|
onClick: () => handleVote(c.playerId),
|
|
9564
9677
|
children: [
|
|
9565
|
-
/* @__PURE__ */
|
|
9566
|
-
/* @__PURE__ */
|
|
9567
|
-
isVoted && /* @__PURE__ */
|
|
9678
|
+
/* @__PURE__ */ jsx89(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
9679
|
+
/* @__PURE__ */ jsx89("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
9680
|
+
isVoted && /* @__PURE__ */ jsx89(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
9568
9681
|
]
|
|
9569
9682
|
}
|
|
9570
9683
|
) }, c.playerId);
|
|
9571
9684
|
}) }),
|
|
9572
|
-
alreadyVoted && picked && /* @__PURE__ */
|
|
9685
|
+
alreadyVoted && picked && /* @__PURE__ */ jsx89(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
9573
9686
|
] }),
|
|
9574
|
-
/* @__PURE__ */
|
|
9575
|
-
!alreadyVoted && /* @__PURE__ */
|
|
9576
|
-
/* @__PURE__ */
|
|
9687
|
+
/* @__PURE__ */ jsxs77(FooterBar, { children: [
|
|
9688
|
+
!alreadyVoted && /* @__PURE__ */ jsx89("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
9689
|
+
/* @__PURE__ */ jsx89("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
9577
9690
|
] })
|
|
9578
9691
|
] });
|
|
9579
9692
|
}
|
|
9580
9693
|
|
|
9581
9694
|
// src/components/GameScreenHost.tsx
|
|
9582
|
-
import { jsx as
|
|
9695
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9583
9696
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
9584
9697
|
"matchday-predictor",
|
|
9585
9698
|
"starting-xi",
|
|
@@ -9603,7 +9716,7 @@ function GameScreenHost({
|
|
|
9603
9716
|
ui
|
|
9604
9717
|
}) {
|
|
9605
9718
|
const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
|
|
9606
|
-
const [configJson, setConfigJson] =
|
|
9719
|
+
const [configJson, setConfigJson] = useState48(null);
|
|
9607
9720
|
useEffect29(() => {
|
|
9608
9721
|
setConfigJson(null);
|
|
9609
9722
|
if (!conversation) return;
|
|
@@ -9655,7 +9768,7 @@ function GameScreenHost({
|
|
|
9655
9768
|
function renderScreen() {
|
|
9656
9769
|
switch (gameId) {
|
|
9657
9770
|
case "mystery-tiger":
|
|
9658
|
-
return /* @__PURE__ */
|
|
9771
|
+
return /* @__PURE__ */ jsx90(
|
|
9659
9772
|
MysteryTigerGame,
|
|
9660
9773
|
{
|
|
9661
9774
|
...sharedProps,
|
|
@@ -9663,7 +9776,7 @@ function GameScreenHost({
|
|
|
9663
9776
|
}
|
|
9664
9777
|
);
|
|
9665
9778
|
case "higher-or-lower":
|
|
9666
|
-
return /* @__PURE__ */
|
|
9779
|
+
return /* @__PURE__ */ jsx90(
|
|
9667
9780
|
HigherOrLowerGame,
|
|
9668
9781
|
{
|
|
9669
9782
|
...sharedProps,
|
|
@@ -9671,7 +9784,7 @@ function GameScreenHost({
|
|
|
9671
9784
|
}
|
|
9672
9785
|
);
|
|
9673
9786
|
case "career-path":
|
|
9674
|
-
return /* @__PURE__ */
|
|
9787
|
+
return /* @__PURE__ */ jsx90(
|
|
9675
9788
|
CareerPathGame,
|
|
9676
9789
|
{
|
|
9677
9790
|
...sharedProps,
|
|
@@ -9680,7 +9793,7 @@ function GameScreenHost({
|
|
|
9680
9793
|
);
|
|
9681
9794
|
case "beat-the-grid": {
|
|
9682
9795
|
const btgConfig = safeParseConfig(configJson);
|
|
9683
|
-
return /* @__PURE__ */
|
|
9796
|
+
return /* @__PURE__ */ jsx90(
|
|
9684
9797
|
BeatTheGridGame,
|
|
9685
9798
|
{
|
|
9686
9799
|
...sharedProps,
|
|
@@ -9690,7 +9803,7 @@ function GameScreenHost({
|
|
|
9690
9803
|
);
|
|
9691
9804
|
}
|
|
9692
9805
|
case "guess-the-xi":
|
|
9693
|
-
return /* @__PURE__ */
|
|
9806
|
+
return /* @__PURE__ */ jsx90(
|
|
9694
9807
|
GuessTheXiGame,
|
|
9695
9808
|
{
|
|
9696
9809
|
...sharedProps,
|
|
@@ -9698,7 +9811,7 @@ function GameScreenHost({
|
|
|
9698
9811
|
}
|
|
9699
9812
|
);
|
|
9700
9813
|
case "daily-quiz":
|
|
9701
|
-
return /* @__PURE__ */
|
|
9814
|
+
return /* @__PURE__ */ jsx90(
|
|
9702
9815
|
DailyQuizGame,
|
|
9703
9816
|
{
|
|
9704
9817
|
...sharedProps,
|
|
@@ -9706,7 +9819,7 @@ function GameScreenHost({
|
|
|
9706
9819
|
}
|
|
9707
9820
|
);
|
|
9708
9821
|
case "matchday-predictor":
|
|
9709
|
-
return /* @__PURE__ */
|
|
9822
|
+
return /* @__PURE__ */ jsx90(
|
|
9710
9823
|
MatchdayPredictorGame,
|
|
9711
9824
|
{
|
|
9712
9825
|
...sharedProps,
|
|
@@ -9714,7 +9827,7 @@ function GameScreenHost({
|
|
|
9714
9827
|
}
|
|
9715
9828
|
);
|
|
9716
9829
|
case "starting-xi":
|
|
9717
|
-
return /* @__PURE__ */
|
|
9830
|
+
return /* @__PURE__ */ jsx90(
|
|
9718
9831
|
StartingXiGame,
|
|
9719
9832
|
{
|
|
9720
9833
|
...sharedProps,
|
|
@@ -9722,7 +9835,7 @@ function GameScreenHost({
|
|
|
9722
9835
|
}
|
|
9723
9836
|
);
|
|
9724
9837
|
case "stat-ladder":
|
|
9725
|
-
return /* @__PURE__ */
|
|
9838
|
+
return /* @__PURE__ */ jsx90(
|
|
9726
9839
|
StatLadderGame,
|
|
9727
9840
|
{
|
|
9728
9841
|
...sharedProps,
|
|
@@ -9730,7 +9843,7 @@ function GameScreenHost({
|
|
|
9730
9843
|
}
|
|
9731
9844
|
);
|
|
9732
9845
|
case "fan-motm":
|
|
9733
|
-
return /* @__PURE__ */
|
|
9846
|
+
return /* @__PURE__ */ jsx90(
|
|
9734
9847
|
FanMotmGame,
|
|
9735
9848
|
{
|
|
9736
9849
|
...sharedProps,
|
|
@@ -9738,17 +9851,17 @@ function GameScreenHost({
|
|
|
9738
9851
|
}
|
|
9739
9852
|
);
|
|
9740
9853
|
default:
|
|
9741
|
-
return /* @__PURE__ */
|
|
9854
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ jsx90(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
9742
9855
|
}
|
|
9743
9856
|
}
|
|
9744
|
-
return /* @__PURE__ */
|
|
9857
|
+
return /* @__PURE__ */ jsx90("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
9745
9858
|
}
|
|
9746
9859
|
|
|
9747
9860
|
// src/components/Leaderboard.tsx
|
|
9748
|
-
import { useState as
|
|
9861
|
+
import { useState as useState49 } from "react";
|
|
9749
9862
|
|
|
9750
9863
|
// src/components/LeaderboardRow.tsx
|
|
9751
|
-
import { jsx as
|
|
9864
|
+
import { jsx as jsx91, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
9752
9865
|
function formatPoints(n) {
|
|
9753
9866
|
return n.toLocaleString("en");
|
|
9754
9867
|
}
|
|
@@ -9757,14 +9870,14 @@ function LeaderboardWeeklyRow({
|
|
|
9757
9870
|
isMe
|
|
9758
9871
|
}) {
|
|
9759
9872
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9760
|
-
return /* @__PURE__ */
|
|
9761
|
-
/* @__PURE__ */
|
|
9873
|
+
return /* @__PURE__ */ jsxs78("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9874
|
+
/* @__PURE__ */ jsxs78("span", { className: rankClass, children: [
|
|
9762
9875
|
"#",
|
|
9763
9876
|
row.rank
|
|
9764
9877
|
] }),
|
|
9765
|
-
/* @__PURE__ */
|
|
9766
|
-
/* @__PURE__ */
|
|
9767
|
-
row.currentStreak > 0 && /* @__PURE__ */
|
|
9878
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9879
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
9880
|
+
row.currentStreak > 0 && /* @__PURE__ */ jsxs78("span", { className: "ss-w-lb2-streak", children: [
|
|
9768
9881
|
"\u{1F525} ",
|
|
9769
9882
|
row.currentStreak
|
|
9770
9883
|
] })
|
|
@@ -9775,18 +9888,18 @@ function LeaderboardAllTimeRow({
|
|
|
9775
9888
|
isMe
|
|
9776
9889
|
}) {
|
|
9777
9890
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
9778
|
-
return /* @__PURE__ */
|
|
9779
|
-
/* @__PURE__ */
|
|
9891
|
+
return /* @__PURE__ */ jsxs78("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
9892
|
+
/* @__PURE__ */ jsxs78("span", { className: rankClass, children: [
|
|
9780
9893
|
"#",
|
|
9781
9894
|
row.rank
|
|
9782
9895
|
] }),
|
|
9783
|
-
/* @__PURE__ */
|
|
9784
|
-
/* @__PURE__ */
|
|
9896
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
9897
|
+
/* @__PURE__ */ jsx91("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
9785
9898
|
] });
|
|
9786
9899
|
}
|
|
9787
9900
|
|
|
9788
9901
|
// src/components/LeaderboardEmpty.tsx
|
|
9789
|
-
import { jsx as
|
|
9902
|
+
import { jsx as jsx92, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
9790
9903
|
function LeaderboardEmpty({
|
|
9791
9904
|
segment,
|
|
9792
9905
|
lastWeek,
|
|
@@ -9795,48 +9908,48 @@ function LeaderboardEmpty({
|
|
|
9795
9908
|
ui
|
|
9796
9909
|
}) {
|
|
9797
9910
|
if (segment === "alltime") {
|
|
9798
|
-
return /* @__PURE__ */
|
|
9799
|
-
/* @__PURE__ */
|
|
9800
|
-
/* @__PURE__ */
|
|
9911
|
+
return /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
9912
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
9913
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
9801
9914
|
] });
|
|
9802
9915
|
}
|
|
9803
9916
|
const fresh = lastWeek != null;
|
|
9804
9917
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
9805
9918
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
9806
|
-
return /* @__PURE__ */
|
|
9807
|
-
weeklyPrize && /* @__PURE__ */
|
|
9808
|
-
/* @__PURE__ */
|
|
9809
|
-
/* @__PURE__ */
|
|
9919
|
+
return /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb-empty", children: [
|
|
9920
|
+
weeklyPrize && /* @__PURE__ */ jsxs79("div", { className: "ss-w-prize", children: [
|
|
9921
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
9922
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ jsx92("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
9810
9923
|
] }),
|
|
9811
|
-
/* @__PURE__ */
|
|
9812
|
-
/* @__PURE__ */
|
|
9813
|
-
/* @__PURE__ */
|
|
9814
|
-
/* @__PURE__ */
|
|
9815
|
-
onPlay && /* @__PURE__ */
|
|
9924
|
+
/* @__PURE__ */ jsxs79("div", { className: "ss-w-lb-empty-hero", children: [
|
|
9925
|
+
/* @__PURE__ */ jsx92("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
9926
|
+
/* @__PURE__ */ jsx92("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
9927
|
+
/* @__PURE__ */ jsx92("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
9928
|
+
onPlay && /* @__PURE__ */ jsx92("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
9816
9929
|
] }),
|
|
9817
|
-
fresh && lastWeek && /* @__PURE__ */
|
|
9818
|
-
/* @__PURE__ */
|
|
9819
|
-
/* @__PURE__ */
|
|
9820
|
-
/* @__PURE__ */
|
|
9821
|
-
/* @__PURE__ */
|
|
9930
|
+
fresh && lastWeek && /* @__PURE__ */ jsxs79("div", { className: "ss-w-lb-last", children: [
|
|
9931
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
9932
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
9933
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
9934
|
+
/* @__PURE__ */ jsx92("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
9822
9935
|
] })
|
|
9823
9936
|
] });
|
|
9824
9937
|
}
|
|
9825
9938
|
|
|
9826
9939
|
// src/components/Leaderboard.tsx
|
|
9827
|
-
import { Fragment as
|
|
9940
|
+
import { Fragment as Fragment22, jsx as jsx93, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
9828
9941
|
function Leaderboard({
|
|
9829
9942
|
data,
|
|
9830
9943
|
ui,
|
|
9831
9944
|
onPlay
|
|
9832
9945
|
}) {
|
|
9833
|
-
const [segment, setSegment] =
|
|
9946
|
+
const [segment, setSegment] = useState49("weekly");
|
|
9834
9947
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
9835
9948
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
9836
9949
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
9837
|
-
return /* @__PURE__ */
|
|
9838
|
-
/* @__PURE__ */
|
|
9839
|
-
/* @__PURE__ */
|
|
9950
|
+
return /* @__PURE__ */ jsxs80("div", { className: "ss-w-lb2", children: [
|
|
9951
|
+
/* @__PURE__ */ jsxs80("div", { className: "ss-w-seg", children: [
|
|
9952
|
+
/* @__PURE__ */ jsx93(
|
|
9840
9953
|
"button",
|
|
9841
9954
|
{
|
|
9842
9955
|
type: "button",
|
|
@@ -9846,7 +9959,7 @@ function Leaderboard({
|
|
|
9846
9959
|
children: ui.leaderboardThisWeek
|
|
9847
9960
|
}
|
|
9848
9961
|
),
|
|
9849
|
-
/* @__PURE__ */
|
|
9962
|
+
/* @__PURE__ */ jsx93(
|
|
9850
9963
|
"button",
|
|
9851
9964
|
{
|
|
9852
9965
|
type: "button",
|
|
@@ -9857,7 +9970,7 @@ function Leaderboard({
|
|
|
9857
9970
|
}
|
|
9858
9971
|
)
|
|
9859
9972
|
] }),
|
|
9860
|
-
isEmpty ? /* @__PURE__ */
|
|
9973
|
+
isEmpty ? /* @__PURE__ */ jsx93(
|
|
9861
9974
|
LeaderboardEmpty,
|
|
9862
9975
|
{
|
|
9863
9976
|
segment,
|
|
@@ -9866,15 +9979,15 @@ function Leaderboard({
|
|
|
9866
9979
|
onPlay,
|
|
9867
9980
|
ui
|
|
9868
9981
|
}
|
|
9869
|
-
) : /* @__PURE__ */
|
|
9870
|
-
/* @__PURE__ */
|
|
9982
|
+
) : /* @__PURE__ */ jsxs80(Fragment22, { children: [
|
|
9983
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9871
9984
|
LeaderboardWeeklyRow,
|
|
9872
9985
|
{
|
|
9873
9986
|
row,
|
|
9874
9987
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
9875
9988
|
},
|
|
9876
9989
|
row.operatorUserId
|
|
9877
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */
|
|
9990
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ jsx93(
|
|
9878
9991
|
LeaderboardAllTimeRow,
|
|
9879
9992
|
{
|
|
9880
9993
|
row,
|
|
@@ -9882,18 +9995,18 @@ function Leaderboard({
|
|
|
9882
9995
|
},
|
|
9883
9996
|
row.operatorUserId
|
|
9884
9997
|
)) }),
|
|
9885
|
-
/* @__PURE__ */
|
|
9886
|
-
myRow != null && (offBoard ? /* @__PURE__ */
|
|
9887
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */
|
|
9888
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */
|
|
9998
|
+
/* @__PURE__ */ jsx93("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
9999
|
+
myRow != null && (offBoard ? /* @__PURE__ */ jsx93("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ jsxs80("div", { className: "ss-w-lb2-rows", children: [
|
|
10000
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ jsx93(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
10001
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ jsx93(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
9889
10002
|
] })),
|
|
9890
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */
|
|
10003
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ jsx93("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ jsx93("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
9891
10004
|
] })
|
|
9892
10005
|
] });
|
|
9893
10006
|
}
|
|
9894
10007
|
|
|
9895
10008
|
// src/components/LeaderboardPanel.tsx
|
|
9896
|
-
import { jsx as
|
|
10009
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
9897
10010
|
var EMPTY_PAYLOAD = {
|
|
9898
10011
|
week: "",
|
|
9899
10012
|
weeklyTop: [],
|
|
@@ -9904,9 +10017,9 @@ var EMPTY_PAYLOAD = {
|
|
|
9904
10017
|
lastWeek: null
|
|
9905
10018
|
};
|
|
9906
10019
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
9907
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
9908
|
-
if (data === null && loading) return /* @__PURE__ */
|
|
9909
|
-
return /* @__PURE__ */
|
|
10020
|
+
if (!loggedIn) return /* @__PURE__ */ jsx94(GamesLoginWall, { ui });
|
|
10021
|
+
if (data === null && loading) return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list" });
|
|
10022
|
+
return /* @__PURE__ */ jsx94("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsx94(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
9910
10023
|
}
|
|
9911
10024
|
|
|
9912
10025
|
// src/components/games/ui/fonts.ts
|
|
@@ -9923,7 +10036,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
9923
10036
|
}
|
|
9924
10037
|
|
|
9925
10038
|
// src/components/GamesPanel.tsx
|
|
9926
|
-
import { jsx as
|
|
10039
|
+
import { jsx as jsx95, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
9927
10040
|
function GamesPanel({
|
|
9928
10041
|
loggedIn,
|
|
9929
10042
|
games,
|
|
@@ -9933,14 +10046,14 @@ function GamesPanel({
|
|
|
9933
10046
|
leaderboardLoading,
|
|
9934
10047
|
refreshHub
|
|
9935
10048
|
}) {
|
|
9936
|
-
const [selected, setSelected] =
|
|
9937
|
-
const [segment, setSegment] =
|
|
10049
|
+
const [selected, setSelected] = useState50(null);
|
|
10050
|
+
const [segment, setSegment] = useState50("play");
|
|
9938
10051
|
useEffect30(() => {
|
|
9939
10052
|
ensureGamesFonts();
|
|
9940
10053
|
}, []);
|
|
9941
|
-
if (!loggedIn) return /* @__PURE__ */
|
|
10054
|
+
if (!loggedIn) return /* @__PURE__ */ jsx95(GamesLoginWall, { ui });
|
|
9942
10055
|
if (selected !== null) {
|
|
9943
|
-
return /* @__PURE__ */
|
|
10056
|
+
return /* @__PURE__ */ jsx95("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ jsx95(
|
|
9944
10057
|
GameScreenHost,
|
|
9945
10058
|
{
|
|
9946
10059
|
selected,
|
|
@@ -9954,9 +10067,9 @@ function GamesPanel({
|
|
|
9954
10067
|
}
|
|
9955
10068
|
) });
|
|
9956
10069
|
}
|
|
9957
|
-
return /* @__PURE__ */
|
|
9958
|
-
/* @__PURE__ */
|
|
9959
|
-
/* @__PURE__ */
|
|
10070
|
+
return /* @__PURE__ */ jsxs81("div", { className: "ss-g-hub-wrap", lang: ui.games.lang, children: [
|
|
10071
|
+
/* @__PURE__ */ jsxs81("div", { className: "ss-w-seg", children: [
|
|
10072
|
+
/* @__PURE__ */ jsx95(
|
|
9960
10073
|
"button",
|
|
9961
10074
|
{
|
|
9962
10075
|
type: "button",
|
|
@@ -9966,7 +10079,7 @@ function GamesPanel({
|
|
|
9966
10079
|
children: ui.gamesPlaySegment
|
|
9967
10080
|
}
|
|
9968
10081
|
),
|
|
9969
|
-
/* @__PURE__ */
|
|
10082
|
+
/* @__PURE__ */ jsx95(
|
|
9970
10083
|
"button",
|
|
9971
10084
|
{
|
|
9972
10085
|
type: "button",
|
|
@@ -9977,7 +10090,7 @@ function GamesPanel({
|
|
|
9977
10090
|
}
|
|
9978
10091
|
)
|
|
9979
10092
|
] }),
|
|
9980
|
-
segment === "play" ? /* @__PURE__ */
|
|
10093
|
+
segment === "play" ? /* @__PURE__ */ jsx95("div", { "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ jsx95(
|
|
9981
10094
|
GamesHub,
|
|
9982
10095
|
{
|
|
9983
10096
|
games,
|
|
@@ -9985,7 +10098,7 @@ function GamesPanel({
|
|
|
9985
10098
|
myWeeklyRow: leaderboard?.myWeeklyRow ?? null,
|
|
9986
10099
|
ui
|
|
9987
10100
|
}
|
|
9988
|
-
) }) : /* @__PURE__ */
|
|
10101
|
+
) }) : /* @__PURE__ */ jsx95(
|
|
9989
10102
|
LeaderboardPanel,
|
|
9990
10103
|
{
|
|
9991
10104
|
loggedIn,
|
|
@@ -9999,7 +10112,7 @@ function GamesPanel({
|
|
|
9999
10112
|
}
|
|
10000
10113
|
|
|
10001
10114
|
// src/components/Fixtures.tsx
|
|
10002
|
-
import { jsx as
|
|
10115
|
+
import { jsx as jsx96, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
10003
10116
|
function groupByRound(fixtures) {
|
|
10004
10117
|
const groups = [];
|
|
10005
10118
|
for (const fx of fixtures) {
|
|
@@ -10011,31 +10124,31 @@ function groupByRound(fixtures) {
|
|
|
10011
10124
|
}
|
|
10012
10125
|
function Fixtures({ fixtures, loading, ui }) {
|
|
10013
10126
|
if (fixtures.length === 0) {
|
|
10014
|
-
if (loading) return /* @__PURE__ */
|
|
10015
|
-
return /* @__PURE__ */
|
|
10127
|
+
if (loading) return /* @__PURE__ */ jsx96("div", { className: "ss-w-mon-list" });
|
|
10128
|
+
return /* @__PURE__ */ jsx96("div", { className: "ss-w-mon-empty", children: ui.clubFixturesEmpty });
|
|
10016
10129
|
}
|
|
10017
|
-
return /* @__PURE__ */
|
|
10018
|
-
group.round && /* @__PURE__ */
|
|
10130
|
+
return /* @__PURE__ */ jsx96("div", { className: "ss-w-mon-list", children: groupByRound(fixtures).map((group, gi) => /* @__PURE__ */ jsxs82("div", { children: [
|
|
10131
|
+
group.round && /* @__PURE__ */ jsx96("div", { className: "ss-w-club-eyebrow", children: group.round }),
|
|
10019
10132
|
group.items.map((fx) => {
|
|
10020
10133
|
const played = fx.homeScore !== null && fx.awayScore !== null;
|
|
10021
10134
|
const kickoff = fx.matchDateTime ? ui.bettingKickoff(fx.matchDateTime) : null;
|
|
10022
|
-
return /* @__PURE__ */
|
|
10023
|
-
/* @__PURE__ */
|
|
10024
|
-
fx.competitionName && /* @__PURE__ */
|
|
10025
|
-
!played && kickoff && /* @__PURE__ */
|
|
10135
|
+
return /* @__PURE__ */ jsxs82("div", { className: "ss-w-mon", children: [
|
|
10136
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-mon-top", children: [
|
|
10137
|
+
fx.competitionName && /* @__PURE__ */ jsx96("span", { className: "ss-w-mon-comp", children: fx.competitionName }),
|
|
10138
|
+
!played && kickoff && /* @__PURE__ */ jsxs82("span", { className: "ss-w-mon-pill", children: [
|
|
10026
10139
|
kickoff.dayLabel,
|
|
10027
10140
|
" \xB7 ",
|
|
10028
10141
|
kickoff.time
|
|
10029
10142
|
] })
|
|
10030
10143
|
] }),
|
|
10031
|
-
/* @__PURE__ */
|
|
10032
|
-
/* @__PURE__ */
|
|
10033
|
-
played ? /* @__PURE__ */
|
|
10144
|
+
/* @__PURE__ */ jsxs82("div", { className: "ss-w-mon-main", children: [
|
|
10145
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-mon-side", children: /* @__PURE__ */ jsx96("span", { className: "ss-w-mon-name", children: fx.homeTeamName }) }),
|
|
10146
|
+
played ? /* @__PURE__ */ jsxs82("span", { className: "ss-w-mon-score", children: [
|
|
10034
10147
|
fx.homeScore,
|
|
10035
|
-
/* @__PURE__ */
|
|
10148
|
+
/* @__PURE__ */ jsx96("i", { children: "-" }),
|
|
10036
10149
|
fx.awayScore
|
|
10037
|
-
] }) : /* @__PURE__ */
|
|
10038
|
-
/* @__PURE__ */
|
|
10150
|
+
] }) : /* @__PURE__ */ jsx96("span", { className: "ss-w-mon-vs", children: "vs" }),
|
|
10151
|
+
/* @__PURE__ */ jsx96("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: /* @__PURE__ */ jsx96("span", { className: "ss-w-mon-name", children: fx.awayTeamName }) })
|
|
10039
10152
|
] })
|
|
10040
10153
|
] }, fx.id);
|
|
10041
10154
|
})
|
|
@@ -10043,7 +10156,7 @@ function Fixtures({ fixtures, loading, ui }) {
|
|
|
10043
10156
|
}
|
|
10044
10157
|
|
|
10045
10158
|
// src/components/Standings.tsx
|
|
10046
|
-
import { jsx as
|
|
10159
|
+
import { jsx as jsx97, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
10047
10160
|
function groupByTable(rows) {
|
|
10048
10161
|
const groups = [];
|
|
10049
10162
|
for (const row of rows) {
|
|
@@ -10054,30 +10167,30 @@ function groupByTable(rows) {
|
|
|
10054
10167
|
return groups;
|
|
10055
10168
|
}
|
|
10056
10169
|
function Standings({ standings, loading, ui }) {
|
|
10057
|
-
if (standings === null && loading) return /* @__PURE__ */
|
|
10058
|
-
if (standings === null || standings.length === 0) return /* @__PURE__ */
|
|
10059
|
-
return /* @__PURE__ */
|
|
10060
|
-
group.table && /* @__PURE__ */
|
|
10061
|
-
/* @__PURE__ */
|
|
10062
|
-
/* @__PURE__ */
|
|
10063
|
-
/* @__PURE__ */
|
|
10064
|
-
/* @__PURE__ */
|
|
10065
|
-
/* @__PURE__ */
|
|
10066
|
-
/* @__PURE__ */
|
|
10067
|
-
/* @__PURE__ */
|
|
10068
|
-
/* @__PURE__ */
|
|
10069
|
-
/* @__PURE__ */
|
|
10070
|
-
/* @__PURE__ */
|
|
10170
|
+
if (standings === null && loading) return /* @__PURE__ */ jsx97("div", { className: "ss-w-mon-list" });
|
|
10171
|
+
if (standings === null || standings.length === 0) return /* @__PURE__ */ jsx97("div", { className: "ss-w-mon-empty", children: ui.clubStandingsEmpty });
|
|
10172
|
+
return /* @__PURE__ */ jsx97("div", { className: "ss-w-mon-list", children: groupByTable(standings).map((group, gi) => /* @__PURE__ */ jsxs83("div", { className: "ss-w-table-wrap", children: [
|
|
10173
|
+
group.table && /* @__PURE__ */ jsx97("div", { className: "ss-w-club-eyebrow", children: group.table }),
|
|
10174
|
+
/* @__PURE__ */ jsxs83("table", { className: "ss-w-md-table", children: [
|
|
10175
|
+
/* @__PURE__ */ jsx97("thead", { children: /* @__PURE__ */ jsxs83("tr", { children: [
|
|
10176
|
+
/* @__PURE__ */ jsx97("th", { children: "#" }),
|
|
10177
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColClub }),
|
|
10178
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColPlayed }),
|
|
10179
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColWon }),
|
|
10180
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColDrawn }),
|
|
10181
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColLost }),
|
|
10182
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColGoalDiff }),
|
|
10183
|
+
/* @__PURE__ */ jsx97("th", { children: ui.standingsColPoints })
|
|
10071
10184
|
] }) }),
|
|
10072
|
-
/* @__PURE__ */
|
|
10073
|
-
/* @__PURE__ */
|
|
10074
|
-
/* @__PURE__ */
|
|
10075
|
-
/* @__PURE__ */
|
|
10076
|
-
/* @__PURE__ */
|
|
10077
|
-
/* @__PURE__ */
|
|
10078
|
-
/* @__PURE__ */
|
|
10079
|
-
/* @__PURE__ */
|
|
10080
|
-
/* @__PURE__ */
|
|
10185
|
+
/* @__PURE__ */ jsx97("tbody", { children: group.items.map((row) => /* @__PURE__ */ jsxs83("tr", { children: [
|
|
10186
|
+
/* @__PURE__ */ jsx97("td", { children: row.position }),
|
|
10187
|
+
/* @__PURE__ */ jsx97("td", { children: row.teamName }),
|
|
10188
|
+
/* @__PURE__ */ jsx97("td", { children: row.playedGames }),
|
|
10189
|
+
/* @__PURE__ */ jsx97("td", { children: row.wins }),
|
|
10190
|
+
/* @__PURE__ */ jsx97("td", { children: row.draws }),
|
|
10191
|
+
/* @__PURE__ */ jsx97("td", { children: row.losses }),
|
|
10192
|
+
/* @__PURE__ */ jsx97("td", { children: row.goalDifference }),
|
|
10193
|
+
/* @__PURE__ */ jsx97("td", { children: row.points })
|
|
10081
10194
|
] }, row.teamId)) })
|
|
10082
10195
|
] })
|
|
10083
10196
|
] }, `${gi}-${group.table ?? "none"}`)) });
|
|
@@ -10135,7 +10248,7 @@ function statsEyebrow(ui, season, competition, matches) {
|
|
|
10135
10248
|
}
|
|
10136
10249
|
|
|
10137
10250
|
// src/components/SquadStats.tsx
|
|
10138
|
-
import { jsx as
|
|
10251
|
+
import { jsx as jsx98, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
10139
10252
|
function leader(stats, pick) {
|
|
10140
10253
|
let best = null;
|
|
10141
10254
|
for (const p of stats) {
|
|
@@ -10149,53 +10262,53 @@ function ratingClass(rating) {
|
|
|
10149
10262
|
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";
|
|
10150
10263
|
}
|
|
10151
10264
|
function SquadStats({ stats, loading, ui, onSelectPlayer }) {
|
|
10152
|
-
if (stats === null && loading) return /* @__PURE__ */
|
|
10153
|
-
if (stats === null || stats.length === 0) return /* @__PURE__ */
|
|
10265
|
+
if (stats === null && loading) return /* @__PURE__ */ jsx98("div", { className: "ss-w-mon-list" });
|
|
10266
|
+
if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx98("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
|
|
10154
10267
|
const scorer = leader(stats, (p) => p.goals);
|
|
10155
10268
|
const assister = leader(stats, (p) => p.assists);
|
|
10156
10269
|
const footer = [
|
|
10157
10270
|
scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
|
|
10158
10271
|
assister && ui.squadTopAssists(assister.playerName, assister.assists)
|
|
10159
10272
|
].filter((part) => !!part).join(" \xB7 ");
|
|
10160
|
-
return /* @__PURE__ */
|
|
10161
|
-
/* @__PURE__ */
|
|
10162
|
-
/* @__PURE__ */
|
|
10163
|
-
/* @__PURE__ */
|
|
10164
|
-
/* @__PURE__ */
|
|
10165
|
-
/* @__PURE__ */
|
|
10166
|
-
/* @__PURE__ */
|
|
10167
|
-
/* @__PURE__ */
|
|
10168
|
-
/* @__PURE__ */
|
|
10169
|
-
/* @__PURE__ */
|
|
10170
|
-
/* @__PURE__ */
|
|
10171
|
-
/* @__PURE__ */
|
|
10273
|
+
return /* @__PURE__ */ jsxs84("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
|
|
10274
|
+
/* @__PURE__ */ jsxs84("div", { className: "ss-w-sq-card", children: [
|
|
10275
|
+
/* @__PURE__ */ jsxs84("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
|
|
10276
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-name" }),
|
|
10277
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
|
|
10278
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
|
|
10279
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
|
|
10280
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
|
|
10281
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
|
|
10282
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
|
|
10283
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
|
|
10284
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
|
|
10172
10285
|
] }),
|
|
10173
|
-
stats.map((p) => /* @__PURE__ */
|
|
10174
|
-
/* @__PURE__ */
|
|
10175
|
-
p.jerseyNumber !== null && /* @__PURE__ */
|
|
10176
|
-
/* @__PURE__ */
|
|
10286
|
+
stats.map((p) => /* @__PURE__ */ jsxs84("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
10287
|
+
/* @__PURE__ */ jsxs84("span", { className: "ss-w-sq-player", children: [
|
|
10288
|
+
p.jerseyNumber !== null && /* @__PURE__ */ jsx98("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
|
|
10289
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
|
|
10177
10290
|
] }),
|
|
10178
|
-
/* @__PURE__ */
|
|
10179
|
-
/* @__PURE__ */
|
|
10180
|
-
/* @__PURE__ */
|
|
10181
|
-
/* @__PURE__ */
|
|
10182
|
-
/* @__PURE__ */
|
|
10183
|
-
/* @__PURE__ */
|
|
10184
|
-
/* @__PURE__ */
|
|
10185
|
-
/* @__PURE__ */
|
|
10291
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-pos", children: positionShort(p.positionCode, p.positionName) }),
|
|
10292
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c30", children: p.appearances }),
|
|
10293
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
|
|
10294
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20", children: p.goals }),
|
|
10295
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20", children: p.assists }),
|
|
10296
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
|
|
10297
|
+
/* @__PURE__ */ jsx98("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
|
|
10298
|
+
/* @__PURE__ */ jsx98("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : p.averageRating.toFixed(1) })
|
|
10186
10299
|
] }, p.playerId))
|
|
10187
10300
|
] }),
|
|
10188
|
-
footer !== "" && /* @__PURE__ */
|
|
10301
|
+
footer !== "" && /* @__PURE__ */ jsx98("div", { className: "ss-w-sq-foot", children: footer })
|
|
10189
10302
|
] });
|
|
10190
10303
|
}
|
|
10191
10304
|
|
|
10192
10305
|
// src/components/Squad.tsx
|
|
10193
|
-
import { Fragment as
|
|
10306
|
+
import { Fragment as Fragment23, jsx as jsx99, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
10194
10307
|
function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
|
|
10195
10308
|
const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
|
|
10196
|
-
const toggle = /* @__PURE__ */
|
|
10197
|
-
eyebrow !== null && /* @__PURE__ */
|
|
10198
|
-
/* @__PURE__ */
|
|
10309
|
+
const toggle = /* @__PURE__ */ jsxs85("div", { className: "ss-w-sq-bar", children: [
|
|
10310
|
+
eyebrow !== null && /* @__PURE__ */ jsx99("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
|
|
10311
|
+
/* @__PURE__ */ jsx99("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx99(
|
|
10199
10312
|
"button",
|
|
10200
10313
|
{
|
|
10201
10314
|
type: "button",
|
|
@@ -10210,45 +10323,45 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
10210
10323
|
)) })
|
|
10211
10324
|
] });
|
|
10212
10325
|
if (view === "stats") {
|
|
10213
|
-
return /* @__PURE__ */
|
|
10326
|
+
return /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
10214
10327
|
toggle,
|
|
10215
|
-
/* @__PURE__ */
|
|
10328
|
+
/* @__PURE__ */ jsx99(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
|
|
10216
10329
|
] });
|
|
10217
10330
|
}
|
|
10218
|
-
if (squad === null && loading) return /* @__PURE__ */
|
|
10331
|
+
if (squad === null && loading) return /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
10219
10332
|
toggle,
|
|
10220
|
-
/* @__PURE__ */
|
|
10333
|
+
/* @__PURE__ */ jsx99("div", { className: "ss-w-mon-list" })
|
|
10221
10334
|
] });
|
|
10222
|
-
if (squad === null || squad.length === 0) return /* @__PURE__ */
|
|
10335
|
+
if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
10223
10336
|
toggle,
|
|
10224
|
-
/* @__PURE__ */
|
|
10337
|
+
/* @__PURE__ */ jsx99("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
|
|
10225
10338
|
] });
|
|
10226
|
-
return /* @__PURE__ */
|
|
10339
|
+
return /* @__PURE__ */ jsxs85(Fragment23, { children: [
|
|
10227
10340
|
toggle,
|
|
10228
|
-
/* @__PURE__ */
|
|
10229
|
-
group.positionName && /* @__PURE__ */
|
|
10230
|
-
group.items.map((p) => /* @__PURE__ */
|
|
10231
|
-
/* @__PURE__ */
|
|
10232
|
-
/* @__PURE__ */
|
|
10341
|
+
/* @__PURE__ */ jsx99("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs85("div", { children: [
|
|
10342
|
+
group.positionName && /* @__PURE__ */ jsx99("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
|
|
10343
|
+
group.items.map((p) => /* @__PURE__ */ jsxs85("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
10344
|
+
/* @__PURE__ */ jsx99("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
|
|
10345
|
+
/* @__PURE__ */ jsx99("span", { className: "ss-w-sq-name", children: p.playerName })
|
|
10233
10346
|
] }, p.playerId))
|
|
10234
10347
|
] }, `${gi}-${group.positionName ?? "none"}`)) })
|
|
10235
10348
|
] });
|
|
10236
10349
|
}
|
|
10237
10350
|
|
|
10238
10351
|
// src/components/PlayerPhoto.tsx
|
|
10239
|
-
import { useState as
|
|
10240
|
-
import { jsx as
|
|
10352
|
+
import { useState as useState51 } from "react";
|
|
10353
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
10241
10354
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
10242
|
-
const [failed, setFailed] =
|
|
10355
|
+
const [failed, setFailed] = useState51(false);
|
|
10243
10356
|
const box = { width: size, height: size };
|
|
10244
10357
|
if (photoUrl && !failed) {
|
|
10245
|
-
return /* @__PURE__ */
|
|
10358
|
+
return /* @__PURE__ */ jsx100("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
10246
10359
|
}
|
|
10247
|
-
return /* @__PURE__ */
|
|
10360
|
+
return /* @__PURE__ */ jsx100("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
|
|
10248
10361
|
}
|
|
10249
10362
|
|
|
10250
10363
|
// src/components/MiniPitch.tsx
|
|
10251
|
-
import { jsx as
|
|
10364
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
10252
10365
|
var SPOT = {
|
|
10253
10366
|
GK: [50, 90],
|
|
10254
10367
|
CB: [50, 75],
|
|
@@ -10270,12 +10383,12 @@ var SPOT = {
|
|
|
10270
10383
|
function MiniPitch({ positionCode }) {
|
|
10271
10384
|
const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
|
|
10272
10385
|
if (spot === void 0) return null;
|
|
10273
|
-
return /* @__PURE__ */
|
|
10386
|
+
return /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx101("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
|
|
10274
10387
|
}
|
|
10275
10388
|
|
|
10276
10389
|
// src/components/PerformanceBars.tsx
|
|
10277
|
-
import { useState as
|
|
10278
|
-
import { jsx as
|
|
10390
|
+
import { useState as useState52 } from "react";
|
|
10391
|
+
import { jsx as jsx102, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
10279
10392
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
10280
10393
|
function finite3(v) {
|
|
10281
10394
|
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
@@ -10320,40 +10433,40 @@ function unrankedLine(ui, reason) {
|
|
|
10320
10433
|
}
|
|
10321
10434
|
}
|
|
10322
10435
|
function PerformanceBars({ performance, competitionName, strings }) {
|
|
10323
|
-
const [mode, setMode] =
|
|
10436
|
+
const [mode, setMode] = useState52("total");
|
|
10324
10437
|
const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
|
|
10325
10438
|
if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
|
|
10326
10439
|
const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
|
|
10327
10440
|
const cards = GROUPS.map((g) => {
|
|
10328
10441
|
const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
|
|
10329
10442
|
if (rows.length === 0) return null;
|
|
10330
|
-
return /* @__PURE__ */
|
|
10331
|
-
/* @__PURE__ */
|
|
10443
|
+
return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
|
|
10444
|
+
/* @__PURE__ */ jsx102("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
|
|
10332
10445
|
rows.map((m) => {
|
|
10333
10446
|
const v = valueOf(m, mode);
|
|
10334
10447
|
const rank = performance.ranked ? rankOf(m, mode) : null;
|
|
10335
|
-
return /* @__PURE__ */
|
|
10336
|
-
/* @__PURE__ */
|
|
10337
|
-
/* @__PURE__ */
|
|
10338
|
-
/* @__PURE__ */
|
|
10448
|
+
return /* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-bar-row", children: [
|
|
10449
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-bar-top", children: [
|
|
10450
|
+
/* @__PURE__ */ jsx102("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
|
|
10451
|
+
/* @__PURE__ */ jsx102("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode) })
|
|
10339
10452
|
] }),
|
|
10340
|
-
rank !== null && /* @__PURE__ */
|
|
10453
|
+
rank !== null && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx102("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank)}`, style: { width: `${rank}%` } }) })
|
|
10341
10454
|
] }, m.key);
|
|
10342
10455
|
})
|
|
10343
10456
|
] }, g);
|
|
10344
10457
|
});
|
|
10345
|
-
return /* @__PURE__ */
|
|
10346
|
-
/* @__PURE__ */
|
|
10347
|
-
/* @__PURE__ */
|
|
10348
|
-
/* @__PURE__ */
|
|
10458
|
+
return /* @__PURE__ */ jsxs86("div", { children: [
|
|
10459
|
+
/* @__PURE__ */ jsxs86("div", { className: "ss-w-pd-perf-head", children: [
|
|
10460
|
+
/* @__PURE__ */ jsx102("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
|
|
10461
|
+
/* @__PURE__ */ jsx102("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx102("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
|
|
10349
10462
|
] }),
|
|
10350
|
-
subtitle !== null && /* @__PURE__ */
|
|
10351
|
-
/* @__PURE__ */
|
|
10463
|
+
subtitle !== null && /* @__PURE__ */ jsx102("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
|
|
10464
|
+
/* @__PURE__ */ jsx102("div", { className: "ss-w-pd-perf-cards", children: cards })
|
|
10352
10465
|
] });
|
|
10353
10466
|
}
|
|
10354
10467
|
|
|
10355
10468
|
// src/components/PlayerDetail.tsx
|
|
10356
|
-
import { Fragment as
|
|
10469
|
+
import { Fragment as Fragment24, jsx as jsx103, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
10357
10470
|
var DASH = "\u2014";
|
|
10358
10471
|
function ageFrom(dobMs) {
|
|
10359
10472
|
if (dobMs === null) return DASH;
|
|
@@ -10373,16 +10486,16 @@ function ratingTone(rounded) {
|
|
|
10373
10486
|
return "neg";
|
|
10374
10487
|
}
|
|
10375
10488
|
function Bio({ label, value }) {
|
|
10376
|
-
return /* @__PURE__ */
|
|
10377
|
-
/* @__PURE__ */
|
|
10489
|
+
return /* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-bio-item", children: [
|
|
10490
|
+
/* @__PURE__ */ jsx103("span", { className: "ss-w-pd-faint", children: label }),
|
|
10378
10491
|
" ",
|
|
10379
|
-
/* @__PURE__ */
|
|
10492
|
+
/* @__PURE__ */ jsx103("span", { children: value })
|
|
10380
10493
|
] });
|
|
10381
10494
|
}
|
|
10382
10495
|
function Tile({ label, value, pos }) {
|
|
10383
|
-
return /* @__PURE__ */
|
|
10384
|
-
/* @__PURE__ */
|
|
10385
|
-
/* @__PURE__ */
|
|
10496
|
+
return /* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-tile", children: [
|
|
10497
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-tile-label", children: label }),
|
|
10498
|
+
/* @__PURE__ */ jsx103("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
|
|
10386
10499
|
] });
|
|
10387
10500
|
}
|
|
10388
10501
|
function AvailabilityCard({ ui, next, availability }) {
|
|
@@ -10398,12 +10511,12 @@ function AvailabilityCard({ ui, next, availability }) {
|
|
|
10398
10511
|
pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
|
|
10399
10512
|
}
|
|
10400
10513
|
}
|
|
10401
|
-
return /* @__PURE__ */
|
|
10402
|
-
/* @__PURE__ */
|
|
10403
|
-
next !== null && /* @__PURE__ */
|
|
10404
|
-
note !== null && /* @__PURE__ */
|
|
10514
|
+
return /* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
|
|
10515
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-avail-text", children: [
|
|
10516
|
+
next !== null && /* @__PURE__ */ jsx103("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
|
|
10517
|
+
note !== null && /* @__PURE__ */ jsx103("div", { className: "ss-w-pd-avail-note", children: note })
|
|
10405
10518
|
] }),
|
|
10406
|
-
pill !== null && /* @__PURE__ */
|
|
10519
|
+
pill !== null && /* @__PURE__ */ jsx103("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
|
|
10407
10520
|
] });
|
|
10408
10521
|
}
|
|
10409
10522
|
function MatchRow({ ui, row }) {
|
|
@@ -10417,28 +10530,28 @@ function MatchRow({ ui, row }) {
|
|
|
10417
10530
|
const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
|
|
10418
10531
|
const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
|
|
10419
10532
|
const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
|
|
10420
|
-
return /* @__PURE__ */
|
|
10421
|
-
/* @__PURE__ */
|
|
10422
|
-
/* @__PURE__ */
|
|
10423
|
-
/* @__PURE__ */
|
|
10424
|
-
/* @__PURE__ */
|
|
10533
|
+
return /* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-match", children: [
|
|
10534
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
|
|
10535
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-match-main", children: [
|
|
10536
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
|
|
10537
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-match-sub", children: sub })
|
|
10425
10538
|
] }),
|
|
10426
|
-
/* @__PURE__ */
|
|
10427
|
-
rating === null ? /* @__PURE__ */
|
|
10539
|
+
/* @__PURE__ */ jsx103("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
|
|
10540
|
+
rating === null ? /* @__PURE__ */ jsx103("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx103("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: rating.toFixed(1) })
|
|
10428
10541
|
] });
|
|
10429
10542
|
}
|
|
10430
10543
|
function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
10431
|
-
const back = /* @__PURE__ */
|
|
10432
|
-
/* @__PURE__ */
|
|
10544
|
+
const back = /* @__PURE__ */ jsxs87("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
|
|
10545
|
+
/* @__PURE__ */ jsx103("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__ */ jsx103("path", { d: "M15 18l-6-6 6-6" }) }),
|
|
10433
10546
|
ui.clubPlayerBack
|
|
10434
10547
|
] });
|
|
10435
10548
|
if (detail === null) {
|
|
10436
|
-
return loading ? /* @__PURE__ */
|
|
10437
|
-
/* @__PURE__ */
|
|
10438
|
-
/* @__PURE__ */
|
|
10439
|
-
] }) : /* @__PURE__ */
|
|
10440
|
-
/* @__PURE__ */
|
|
10441
|
-
/* @__PURE__ */
|
|
10549
|
+
return loading ? /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
10550
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-bar", children: back }),
|
|
10551
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-mon-list" })
|
|
10552
|
+
] }) : /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
10553
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-bar", children: back }),
|
|
10554
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
|
|
10442
10555
|
] });
|
|
10443
10556
|
}
|
|
10444
10557
|
const s = detail.seasonStats;
|
|
@@ -10451,41 +10564,41 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
10451
10564
|
const next = detail.nextFixture ?? null;
|
|
10452
10565
|
const availability = detail.availability ?? null;
|
|
10453
10566
|
const log = detail.matchLog ?? [];
|
|
10454
|
-
return /* @__PURE__ */
|
|
10455
|
-
/* @__PURE__ */
|
|
10456
|
-
/* @__PURE__ */
|
|
10457
|
-
/* @__PURE__ */
|
|
10458
|
-
/* @__PURE__ */
|
|
10459
|
-
/* @__PURE__ */
|
|
10460
|
-
/* @__PURE__ */
|
|
10461
|
-
subLine !== "" && /* @__PURE__ */
|
|
10462
|
-
/* @__PURE__ */
|
|
10463
|
-
/* @__PURE__ */
|
|
10464
|
-
/* @__PURE__ */
|
|
10465
|
-
foot !== null && /* @__PURE__ */
|
|
10466
|
-
/* @__PURE__ */
|
|
10567
|
+
return /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
10568
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-bar", children: back }),
|
|
10569
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
|
|
10570
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
|
|
10571
|
+
/* @__PURE__ */ jsx103(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
|
|
10572
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-profile-main", children: [
|
|
10573
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-name", children: detail.playerName }),
|
|
10574
|
+
subLine !== "" && /* @__PURE__ */ jsx103("div", { className: "ss-w-pd-sub", children: subLine }),
|
|
10575
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-bio", children: [
|
|
10576
|
+
/* @__PURE__ */ jsx103(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
|
|
10577
|
+
/* @__PURE__ */ jsx103(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
|
|
10578
|
+
foot !== null && /* @__PURE__ */ jsx103(Bio, { label: ui.detailFoot, value: foot }),
|
|
10579
|
+
/* @__PURE__ */ jsx103(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
|
|
10467
10580
|
] })
|
|
10468
10581
|
] }),
|
|
10469
|
-
/* @__PURE__ */
|
|
10582
|
+
/* @__PURE__ */ jsx103(MiniPitch, { positionCode: detail.positionCode })
|
|
10470
10583
|
] }),
|
|
10471
|
-
(next !== null || availability !== null) && /* @__PURE__ */
|
|
10472
|
-
/* @__PURE__ */
|
|
10473
|
-
eyebrow !== null && /* @__PURE__ */
|
|
10474
|
-
/* @__PURE__ */
|
|
10475
|
-
/* @__PURE__ */
|
|
10476
|
-
/* @__PURE__ */
|
|
10477
|
-
typeof s.starts === "number" && /* @__PURE__ */
|
|
10478
|
-
/* @__PURE__ */
|
|
10479
|
-
/* @__PURE__ */
|
|
10480
|
-
rating !== null && /* @__PURE__ */
|
|
10481
|
-
/* @__PURE__ */
|
|
10482
|
-
/* @__PURE__ */
|
|
10584
|
+
(next !== null || availability !== null) && /* @__PURE__ */ jsx103(AvailabilityCard, { ui, next, availability }),
|
|
10585
|
+
/* @__PURE__ */ jsxs87("div", { children: [
|
|
10586
|
+
eyebrow !== null && /* @__PURE__ */ jsx103("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
|
|
10587
|
+
/* @__PURE__ */ jsxs87("div", { className: "ss-w-pd-tiles", children: [
|
|
10588
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.statColGoals, value: String(s.goals) }),
|
|
10589
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.statColAssists, value: String(s.assists) }),
|
|
10590
|
+
typeof s.starts === "number" && /* @__PURE__ */ jsx103(Tile, { label: ui.detailStarted, value: String(s.starts) }),
|
|
10591
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
|
|
10592
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
|
|
10593
|
+
rating !== null && /* @__PURE__ */ jsx103(Tile, { label: ui.statColRating, value: rating.toFixed(2), pos: Math.round(rating * 100) / 100 >= 7 }),
|
|
10594
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
|
|
10595
|
+
/* @__PURE__ */ jsx103(Tile, { label: ui.detailReds, value: String(s.redCards) })
|
|
10483
10596
|
] })
|
|
10484
10597
|
] }),
|
|
10485
|
-
detail.performance != null && /* @__PURE__ */
|
|
10486
|
-
log.length > 0 && /* @__PURE__ */
|
|
10487
|
-
/* @__PURE__ */
|
|
10488
|
-
/* @__PURE__ */
|
|
10598
|
+
detail.performance != null && /* @__PURE__ */ jsx103(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
|
|
10599
|
+
log.length > 0 && /* @__PURE__ */ jsxs87("div", { children: [
|
|
10600
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
|
|
10601
|
+
/* @__PURE__ */ jsx103("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx103(MatchRow, { ui, row }, row.matchId)) })
|
|
10489
10602
|
] })
|
|
10490
10603
|
] })
|
|
10491
10604
|
] });
|
|
@@ -10493,12 +10606,12 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
10493
10606
|
|
|
10494
10607
|
// src/components/PresetSpeedDial.tsx
|
|
10495
10608
|
import { useId as useId10 } from "react";
|
|
10496
|
-
import { jsx as
|
|
10609
|
+
import { jsx as jsx104, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
10497
10610
|
function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
|
|
10498
10611
|
const pillsId = useId10();
|
|
10499
10612
|
const tabIndex = expanded ? 0 : -1;
|
|
10500
|
-
return /* @__PURE__ */
|
|
10501
|
-
/* @__PURE__ */
|
|
10613
|
+
return /* @__PURE__ */ jsxs88("div", { ref: rootRef, className: "ss-w-dial", children: [
|
|
10614
|
+
/* @__PURE__ */ jsxs88(
|
|
10502
10615
|
"button",
|
|
10503
10616
|
{
|
|
10504
10617
|
ref: buttonRef,
|
|
@@ -10509,28 +10622,28 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
10509
10622
|
"aria-label": strings.dialName,
|
|
10510
10623
|
onClick: onToggle,
|
|
10511
10624
|
children: [
|
|
10512
|
-
/* @__PURE__ */
|
|
10513
|
-
/* @__PURE__ */
|
|
10514
|
-
showDot && !expanded ? /* @__PURE__ */
|
|
10625
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ jsx104(SlidersIcon, {}) }),
|
|
10626
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ jsx104(CloseIcon, {}) }),
|
|
10627
|
+
showDot && !expanded ? /* @__PURE__ */ jsx104("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
|
|
10515
10628
|
]
|
|
10516
10629
|
}
|
|
10517
10630
|
),
|
|
10518
|
-
/* @__PURE__ */
|
|
10519
|
-
/* @__PURE__ */
|
|
10520
|
-
/* @__PURE__ */
|
|
10521
|
-
/* @__PURE__ */
|
|
10631
|
+
/* @__PURE__ */ jsxs88("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
|
|
10632
|
+
/* @__PURE__ */ jsxs88("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
|
|
10633
|
+
/* @__PURE__ */ jsx104(SlidersIcon, {}),
|
|
10634
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
|
|
10522
10635
|
] }),
|
|
10523
|
-
/* @__PURE__ */
|
|
10524
|
-
/* @__PURE__ */
|
|
10525
|
-
/* @__PURE__ */
|
|
10636
|
+
/* @__PURE__ */ jsxs88("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
|
|
10637
|
+
/* @__PURE__ */ jsx104(ComboIcon, {}),
|
|
10638
|
+
/* @__PURE__ */ jsx104("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
|
|
10526
10639
|
] })
|
|
10527
10640
|
] })
|
|
10528
10641
|
] });
|
|
10529
10642
|
}
|
|
10530
10643
|
|
|
10531
10644
|
// src/components/PresetTools.tsx
|
|
10532
|
-
import { Fragment as
|
|
10533
|
-
import { Fragment as
|
|
10645
|
+
import { Fragment as Fragment25, useEffect as useEffect31, useId as useId11, useRef as useRef28, useState as useState53 } from "react";
|
|
10646
|
+
import { Fragment as Fragment26, jsx as jsx105, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
10534
10647
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
10535
10648
|
function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
10536
10649
|
const dialogRef = useRef28(null);
|
|
@@ -10568,79 +10681,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
|
10568
10681
|
first.focus();
|
|
10569
10682
|
}
|
|
10570
10683
|
};
|
|
10571
|
-
return /* @__PURE__ */
|
|
10572
|
-
/* @__PURE__ */
|
|
10573
|
-
/* @__PURE__ */
|
|
10574
|
-
/* @__PURE__ */
|
|
10684
|
+
return /* @__PURE__ */ jsx105("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs89("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
10685
|
+
/* @__PURE__ */ jsxs89("div", { className: "ss-w-tool-head", children: [
|
|
10686
|
+
/* @__PURE__ */ jsx105("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
10687
|
+
/* @__PURE__ */ jsx105("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx105(CloseIcon, {}) })
|
|
10575
10688
|
] }),
|
|
10576
|
-
/* @__PURE__ */
|
|
10577
|
-
footer ? /* @__PURE__ */
|
|
10689
|
+
/* @__PURE__ */ jsx105("div", { className: "ss-w-tool-body", children }),
|
|
10690
|
+
footer ? /* @__PURE__ */ jsx105("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
10578
10691
|
] }) });
|
|
10579
10692
|
}
|
|
10580
10693
|
function fillTemplate(template, slots) {
|
|
10581
10694
|
return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
|
|
10582
10695
|
const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
|
|
10583
|
-
return /* @__PURE__ */
|
|
10696
|
+
return /* @__PURE__ */ jsx105(Fragment25, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
|
|
10584
10697
|
});
|
|
10585
10698
|
}
|
|
10586
10699
|
function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
|
|
10587
10700
|
const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
|
|
10588
|
-
return /* @__PURE__ */
|
|
10589
|
-
/* @__PURE__ */
|
|
10590
|
-
/* @__PURE__ */
|
|
10701
|
+
return /* @__PURE__ */ jsxs89("span", { className: "ss-w-tool-num", children: [
|
|
10702
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
|
|
10703
|
+
/* @__PURE__ */ jsx105("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
|
|
10591
10704
|
const c = choices2[Number(e.target.value)];
|
|
10592
10705
|
if (c) onChoose(c.value);
|
|
10593
|
-
}, children: choices2.map((c, i) => /* @__PURE__ */
|
|
10706
|
+
}, children: choices2.map((c, i) => /* @__PURE__ */ jsx105("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
|
|
10594
10707
|
] });
|
|
10595
10708
|
}
|
|
10596
10709
|
function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
|
|
10597
10710
|
const sizeText = sizeLabels[currentIdx] ?? "";
|
|
10598
|
-
return /* @__PURE__ */
|
|
10599
|
-
/* @__PURE__ */
|
|
10600
|
-
/* @__PURE__ */
|
|
10711
|
+
return /* @__PURE__ */ jsxs89("span", { className: "ss-w-tool-num", children: [
|
|
10712
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
|
|
10713
|
+
/* @__PURE__ */ jsx105("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__ */ jsx105("option", { value: String(i), children: opt }, i)) })
|
|
10601
10714
|
] });
|
|
10602
10715
|
}
|
|
10603
10716
|
function SendButton({ label, display, disabled, onClick }) {
|
|
10604
|
-
return /* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsx105("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
10605
10718
|
}
|
|
10606
10719
|
function PickList({ picks, formatKickoff }) {
|
|
10607
|
-
return /* @__PURE__ */
|
|
10608
|
-
/* @__PURE__ */
|
|
10720
|
+
return /* @__PURE__ */ jsx105("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs89("li", { className: "ss-w-tool-pick", children: [
|
|
10721
|
+
/* @__PURE__ */ jsxs89("span", { className: "ss-w-tool-pick-match", children: [
|
|
10609
10722
|
p.homeTeamName,
|
|
10610
10723
|
" \u2013 ",
|
|
10611
10724
|
p.awayTeamName
|
|
10612
10725
|
] }),
|
|
10613
|
-
/* @__PURE__ */
|
|
10726
|
+
/* @__PURE__ */ jsxs89("span", { className: "ss-w-tool-pick-sel", children: [
|
|
10614
10727
|
p.marketLabel,
|
|
10615
10728
|
": ",
|
|
10616
10729
|
p.selectionLabel,
|
|
10617
10730
|
p.line ? ` ${p.line}` : ""
|
|
10618
10731
|
] }),
|
|
10619
|
-
/* @__PURE__ */
|
|
10620
|
-
/* @__PURE__ */
|
|
10732
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
10733
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
|
|
10621
10734
|
] }, p.matchOddsId)) });
|
|
10622
10735
|
}
|
|
10623
10736
|
function ComboPreview({ cell, formatKickoff }) {
|
|
10624
|
-
return /* @__PURE__ */
|
|
10625
|
-
/* @__PURE__ */
|
|
10626
|
-
/* @__PURE__ */
|
|
10737
|
+
return /* @__PURE__ */ jsxs89(Fragment26, { children: [
|
|
10738
|
+
/* @__PURE__ */ jsx105(PickList, { picks: cell.combo.legs, formatKickoff }),
|
|
10739
|
+
/* @__PURE__ */ jsx105("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
|
|
10627
10740
|
] });
|
|
10628
10741
|
}
|
|
10629
10742
|
function Unavailable({ text }) {
|
|
10630
|
-
return /* @__PURE__ */
|
|
10743
|
+
return /* @__PURE__ */ jsx105("p", { className: "ss-w-tool-unavailable", children: text });
|
|
10631
10744
|
}
|
|
10632
10745
|
function AskRow({ icon, ask, ready, send }) {
|
|
10633
|
-
return /* @__PURE__ */
|
|
10634
|
-
/* @__PURE__ */
|
|
10635
|
-
/* @__PURE__ */
|
|
10636
|
-
/* @__PURE__ */
|
|
10637
|
-
ready ? /* @__PURE__ */
|
|
10746
|
+
return /* @__PURE__ */ jsxs89("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
|
|
10747
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
|
|
10748
|
+
/* @__PURE__ */ jsxs89("div", { className: "ss-w-tool-main", children: [
|
|
10749
|
+
/* @__PURE__ */ jsx105("p", { className: "ss-w-tool-ask", children: ask }),
|
|
10750
|
+
ready ? /* @__PURE__ */ jsx105("span", { className: "ss-w-tool-ready", children: ready }) : null
|
|
10638
10751
|
] }),
|
|
10639
10752
|
send
|
|
10640
10753
|
] });
|
|
10641
10754
|
}
|
|
10642
10755
|
function RoundSend({ label, display, disabled, onClick }) {
|
|
10643
|
-
return /* @__PURE__ */
|
|
10756
|
+
return /* @__PURE__ */ jsx105("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ jsx105(SendIcon, {}) });
|
|
10644
10757
|
}
|
|
10645
10758
|
var BIG_COMBO = { total: 50, legs: 6 };
|
|
10646
10759
|
function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
@@ -10649,15 +10762,15 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
10649
10762
|
const totals = comboTotals(grid);
|
|
10650
10763
|
const legChoices = comboLegChoices(grid);
|
|
10651
10764
|
const count = FIXED_SINGLES_COUNT;
|
|
10652
|
-
const [maxPrice, setMaxPrice] =
|
|
10653
|
-
const [minPrice, setMinPrice] =
|
|
10654
|
-
const [start] =
|
|
10655
|
-
const [total, setTotal] =
|
|
10656
|
-
const [legs, setLegs] =
|
|
10657
|
-
const [bigStart] =
|
|
10658
|
-
const [bigTotal, setBigTotal] =
|
|
10659
|
-
const [bigLegs, setBigLegs] =
|
|
10660
|
-
const [announcement, setAnnouncement] =
|
|
10765
|
+
const [maxPrice, setMaxPrice] = useState53(() => startSingles(grid.singles, limits, START.maxPrice, count));
|
|
10766
|
+
const [minPrice, setMinPrice] = useState53(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
|
|
10767
|
+
const [start] = useState53(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
|
|
10768
|
+
const [total, setTotal] = useState53(start.total);
|
|
10769
|
+
const [legs, setLegs] = useState53(start.legs);
|
|
10770
|
+
const [bigStart] = useState53(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
|
|
10771
|
+
const [bigTotal, setBigTotal] = useState53(bigStart.total);
|
|
10772
|
+
const [bigLegs, setBigLegs] = useState53(bigStart.legs);
|
|
10773
|
+
const [announcement, setAnnouncement] = useState53("");
|
|
10661
10774
|
const maxCell = findSingles(grid.singles, maxPrice, count);
|
|
10662
10775
|
const minCell = findSingles(grid.singlesFrom, minPrice, count);
|
|
10663
10776
|
const comboCell = findCombo(grid, total, legs);
|
|
@@ -10701,95 +10814,95 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
10701
10814
|
const totalChoices = totals.map((v) => ({ value: v, text: v.toFixed(1), available: legChoices.some((n) => !!findCombo(grid, v, n)) }));
|
|
10702
10815
|
const legChoicesFor = (t) => legChoices.map((n) => ({ value: n, text: String(n), available: !!findCombo(grid, t, n) }));
|
|
10703
10816
|
const markets = grid.markets ?? [];
|
|
10704
|
-
const [marketIdx, setMarketIdx] =
|
|
10817
|
+
const [marketIdx, setMarketIdx] = useState53(0);
|
|
10705
10818
|
const marketCell = markets[marketIdx] ?? null;
|
|
10706
10819
|
const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
|
|
10707
10820
|
const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
|
|
10708
10821
|
const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
|
|
10709
|
-
return /* @__PURE__ */
|
|
10710
|
-
/* @__PURE__ */
|
|
10822
|
+
return /* @__PURE__ */ jsxs89(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
|
|
10823
|
+
/* @__PURE__ */ jsx105(
|
|
10711
10824
|
AskRow,
|
|
10712
10825
|
{
|
|
10713
10826
|
icon: "\u{1F3AF}",
|
|
10714
10827
|
ask: fillTemplate(strings.maxPriceRow, {
|
|
10715
10828
|
count: String(count),
|
|
10716
|
-
price: /* @__PURE__ */
|
|
10829
|
+
price: /* @__PURE__ */ jsx105(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
|
|
10717
10830
|
}),
|
|
10718
10831
|
ready: singlesReady(maxCell),
|
|
10719
|
-
send: /* @__PURE__ */
|
|
10832
|
+
send: /* @__PURE__ */ jsx105(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
|
|
10720
10833
|
if (maxCell) onSend(maxPriceAsk(maxCell, strings));
|
|
10721
10834
|
} })
|
|
10722
10835
|
}
|
|
10723
10836
|
),
|
|
10724
|
-
/* @__PURE__ */
|
|
10837
|
+
/* @__PURE__ */ jsx105(
|
|
10725
10838
|
AskRow,
|
|
10726
10839
|
{
|
|
10727
10840
|
icon: "\u{1F4C8}",
|
|
10728
10841
|
ask: fillTemplate(strings.minPriceRow, {
|
|
10729
10842
|
count: String(count),
|
|
10730
|
-
price: /* @__PURE__ */
|
|
10843
|
+
price: /* @__PURE__ */ jsx105(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
|
|
10731
10844
|
}),
|
|
10732
10845
|
ready: singlesReady(minCell),
|
|
10733
|
-
send: /* @__PURE__ */
|
|
10846
|
+
send: /* @__PURE__ */ jsx105(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
|
|
10734
10847
|
if (minCell) onSend(minPriceAsk(minCell, strings));
|
|
10735
10848
|
} })
|
|
10736
10849
|
}
|
|
10737
10850
|
),
|
|
10738
|
-
/* @__PURE__ */
|
|
10851
|
+
/* @__PURE__ */ jsx105(
|
|
10739
10852
|
AskRow,
|
|
10740
10853
|
{
|
|
10741
10854
|
icon: "\u2728",
|
|
10742
10855
|
ask: fillTemplate(strings.comboRow, {
|
|
10743
|
-
legs: /* @__PURE__ */
|
|
10744
|
-
total: /* @__PURE__ */
|
|
10856
|
+
legs: /* @__PURE__ */ jsx105(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
|
|
10857
|
+
total: /* @__PURE__ */ jsx105(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
|
|
10745
10858
|
}),
|
|
10746
10859
|
ready: comboReady(comboCell),
|
|
10747
|
-
send: /* @__PURE__ */
|
|
10860
|
+
send: /* @__PURE__ */ jsx105(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
|
|
10748
10861
|
if (comboCell) onSend(comboAsk(comboCell, strings));
|
|
10749
10862
|
} })
|
|
10750
10863
|
}
|
|
10751
10864
|
),
|
|
10752
|
-
/* @__PURE__ */
|
|
10865
|
+
/* @__PURE__ */ jsx105(
|
|
10753
10866
|
AskRow,
|
|
10754
10867
|
{
|
|
10755
10868
|
icon: "\u{1F3C6}",
|
|
10756
10869
|
ask: fillTemplate(strings.bigComboRow, {
|
|
10757
|
-
legs: /* @__PURE__ */
|
|
10758
|
-
total: /* @__PURE__ */
|
|
10870
|
+
legs: /* @__PURE__ */ jsx105(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
|
|
10871
|
+
total: /* @__PURE__ */ jsx105(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
|
|
10759
10872
|
}),
|
|
10760
10873
|
ready: comboReady(bigCell),
|
|
10761
|
-
send: /* @__PURE__ */
|
|
10874
|
+
send: /* @__PURE__ */ jsx105(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
|
|
10762
10875
|
if (bigCell) onSend(comboAsk(bigCell, strings));
|
|
10763
10876
|
} })
|
|
10764
10877
|
}
|
|
10765
10878
|
),
|
|
10766
|
-
markets.length > 0 && /* @__PURE__ */
|
|
10879
|
+
markets.length > 0 && /* @__PURE__ */ jsx105(
|
|
10767
10880
|
AskRow,
|
|
10768
10881
|
{
|
|
10769
10882
|
icon: "\u26BD",
|
|
10770
10883
|
ask: fillTemplate(strings.marketRow, {
|
|
10771
|
-
market: /* @__PURE__ */
|
|
10884
|
+
market: /* @__PURE__ */ jsx105(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
|
|
10772
10885
|
}),
|
|
10773
10886
|
ready: marketCell ? strings.readyCount(marketCell.count) : null,
|
|
10774
|
-
send: /* @__PURE__ */
|
|
10887
|
+
send: /* @__PURE__ */ jsx105(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
|
|
10775
10888
|
if (marketCell) onSend(marketAsk(marketCell, strings));
|
|
10776
10889
|
} })
|
|
10777
10890
|
}
|
|
10778
10891
|
),
|
|
10779
|
-
/* @__PURE__ */
|
|
10892
|
+
/* @__PURE__ */ jsx105("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
10780
10893
|
] });
|
|
10781
10894
|
}
|
|
10782
10895
|
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
10783
10896
|
const totals = comboTotals(grid);
|
|
10784
10897
|
const legChoices = comboLegChoices(grid);
|
|
10785
|
-
const [start] =
|
|
10786
|
-
const [total, setTotal] =
|
|
10787
|
-
const [legs, setLegs] =
|
|
10898
|
+
const [start] = useState53(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
|
|
10899
|
+
const [total, setTotal] = useState53(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
|
|
10900
|
+
const [legs, setLegs] = useState53(() => {
|
|
10788
10901
|
if (initialTotal === void 0) return initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : start.legs;
|
|
10789
10902
|
const from = initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : startValue(legChoices, START.comboLegs);
|
|
10790
10903
|
return legsForTotal(grid, nearest(totals, initialTotal), from);
|
|
10791
10904
|
});
|
|
10792
|
-
const [announcement, setAnnouncement] =
|
|
10905
|
+
const [announcement, setAnnouncement] = useState53("");
|
|
10793
10906
|
const cell = findCombo(grid, total, legs);
|
|
10794
10907
|
const minLegs = legChoices[0] ?? legs;
|
|
10795
10908
|
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
@@ -10800,29 +10913,29 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
10800
10913
|
const d = strings.comboDisplay(nextLegs, nextTotal);
|
|
10801
10914
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
10802
10915
|
};
|
|
10803
|
-
const footer = /* @__PURE__ */
|
|
10916
|
+
const footer = /* @__PURE__ */ jsx105(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
|
|
10804
10917
|
if (cell) onSend(comboAsk(cell, strings));
|
|
10805
10918
|
} });
|
|
10806
|
-
return /* @__PURE__ */
|
|
10807
|
-
/* @__PURE__ */
|
|
10808
|
-
/* @__PURE__ */
|
|
10809
|
-
/* @__PURE__ */
|
|
10919
|
+
return /* @__PURE__ */ jsxs89(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
10920
|
+
/* @__PURE__ */ jsxs89("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
10921
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
10922
|
+
/* @__PURE__ */ jsx105("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ jsx105("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)) })
|
|
10810
10923
|
] }),
|
|
10811
|
-
/* @__PURE__ */
|
|
10812
|
-
/* @__PURE__ */
|
|
10813
|
-
/* @__PURE__ */
|
|
10814
|
-
/* @__PURE__ */
|
|
10815
|
-
/* @__PURE__ */
|
|
10816
|
-
/* @__PURE__ */
|
|
10924
|
+
/* @__PURE__ */ jsxs89("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
10925
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
10926
|
+
/* @__PURE__ */ jsxs89("div", { className: "ss-w-tool-stepper", children: [
|
|
10927
|
+
/* @__PURE__ */ jsx105("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
10928
|
+
/* @__PURE__ */ jsx105("span", { className: "ss-w-tool-count", children: legs }),
|
|
10929
|
+
/* @__PURE__ */ jsx105("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
10817
10930
|
] })
|
|
10818
10931
|
] }),
|
|
10819
|
-
cell ? /* @__PURE__ */
|
|
10820
|
-
/* @__PURE__ */
|
|
10932
|
+
cell ? /* @__PURE__ */ jsx105(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ jsx105(Unavailable, { text: strings.unavailable }),
|
|
10933
|
+
/* @__PURE__ */ jsx105("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
10821
10934
|
] });
|
|
10822
10935
|
}
|
|
10823
10936
|
|
|
10824
10937
|
// src/usePresetDial.ts
|
|
10825
|
-
import { useCallback as useCallback21, useEffect as useEffect32, useRef as useRef29, useState as
|
|
10938
|
+
import { useCallback as useCallback21, useEffect as useEffect32, useRef as useRef29, useState as useState54 } from "react";
|
|
10826
10939
|
function sendInFlight(messages, isStreaming) {
|
|
10827
10940
|
const last = messages[messages.length - 1];
|
|
10828
10941
|
return isStreaming && !!last && last.role === "assistant" && !last.done && !last.isGreeting;
|
|
@@ -10836,7 +10949,7 @@ function lastUserId(messages) {
|
|
|
10836
10949
|
}
|
|
10837
10950
|
var SCROLL_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]);
|
|
10838
10951
|
function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming, activeTab }) {
|
|
10839
|
-
const [expanded, setExpanded] =
|
|
10952
|
+
const [expanded, setExpanded] = useState54(() => !sendInFlight(messages, isStreaming));
|
|
10840
10953
|
const fold = useCallback21(() => setExpanded(false), []);
|
|
10841
10954
|
const toggle = useCallback21(() => setExpanded((e) => !e), []);
|
|
10842
10955
|
const currentUserId = lastUserId(messages);
|
|
@@ -10919,10 +11032,10 @@ function markToolSeen() {
|
|
|
10919
11032
|
}
|
|
10920
11033
|
|
|
10921
11034
|
// src/components/ChatPanel.tsx
|
|
10922
|
-
import { Fragment as
|
|
11035
|
+
import { Fragment as Fragment27, jsx as jsx106, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
10923
11036
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
10924
11037
|
function useIsModal() {
|
|
10925
|
-
const [modal, setModal] =
|
|
11038
|
+
const [modal, setModal] = useState55(false);
|
|
10926
11039
|
useEffect33(() => {
|
|
10927
11040
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
10928
11041
|
const mql = window.matchMedia(FULLSCREEN_QUERY);
|
|
@@ -10937,8 +11050,8 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
|
|
|
10937
11050
|
var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
|
|
10938
11051
|
function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, clubFixturesResult, clubStandingsResult, clubSquadResult, clubSquadStatsResult, clubPlayerDetailResult, loggedIn, conversation, presetGrid }) {
|
|
10939
11052
|
const { state, close, stop, send, reset } = controller;
|
|
10940
|
-
const [squadView, setSquadView] =
|
|
10941
|
-
const [selectedPlayerId, setSelectedPlayerId] =
|
|
11053
|
+
const [squadView, setSquadView] = useState55("roster");
|
|
11054
|
+
const [selectedPlayerId, setSelectedPlayerId] = useState55(null);
|
|
10942
11055
|
const clearPlayerDetail = clubPlayerDetailResult?.clear;
|
|
10943
11056
|
const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
|
|
10944
11057
|
const squadLayerRef = useRef30(null);
|
|
@@ -10992,8 +11105,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
10992
11105
|
const limitRef = useRef30(null);
|
|
10993
11106
|
const typedSendRef = useRef30(false);
|
|
10994
11107
|
const focusAfterCloseRef = useRef30(null);
|
|
10995
|
-
const [tool, setTool] =
|
|
10996
|
-
const [toolSeen, setToolSeen] =
|
|
11108
|
+
const [tool, setTool] = useState55(null);
|
|
11109
|
+
const [toolSeen, setToolSeen] = useState55(readToolSeen);
|
|
10997
11110
|
const dial = usePresetDial({
|
|
10998
11111
|
layerRef,
|
|
10999
11112
|
dialRef,
|
|
@@ -11050,8 +11163,8 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11050
11163
|
focusAfterCloseRef.current = "composer";
|
|
11051
11164
|
setTool(null);
|
|
11052
11165
|
}, [tool, onChatTab, presetGrid]);
|
|
11053
|
-
return /* @__PURE__ */
|
|
11054
|
-
/* @__PURE__ */
|
|
11166
|
+
return /* @__PURE__ */ jsxs90("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
11167
|
+
/* @__PURE__ */ jsx106(
|
|
11055
11168
|
ChatHeader,
|
|
11056
11169
|
{
|
|
11057
11170
|
onClose: close,
|
|
@@ -11064,7 +11177,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11064
11177
|
moreOptionsLabel: ui.moreOptions
|
|
11065
11178
|
}
|
|
11066
11179
|
),
|
|
11067
|
-
monitor && /* @__PURE__ */
|
|
11180
|
+
monitor && /* @__PURE__ */ jsx106(
|
|
11068
11181
|
TabBar,
|
|
11069
11182
|
{
|
|
11070
11183
|
monitor,
|
|
@@ -11077,9 +11190,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11077
11190
|
clubEnabled: clubFixturesResult?.enabled ?? false
|
|
11078
11191
|
}
|
|
11079
11192
|
),
|
|
11080
|
-
/* @__PURE__ */
|
|
11081
|
-
/* @__PURE__ */
|
|
11082
|
-
showDial ? /* @__PURE__ */
|
|
11193
|
+
/* @__PURE__ */ jsxs90("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
11194
|
+
/* @__PURE__ */ jsx106(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx106(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
11195
|
+
showDial ? /* @__PURE__ */ jsx106(
|
|
11083
11196
|
PresetSpeedDial,
|
|
11084
11197
|
{
|
|
11085
11198
|
expanded: dial.expanded,
|
|
@@ -11091,21 +11204,21 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11091
11204
|
buttonRef: dialButtonRef
|
|
11092
11205
|
}
|
|
11093
11206
|
) : null,
|
|
11094
|
-
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */
|
|
11207
|
+
tool && presetGrid && onChatTab && !paused ? tool.kind === "numbers" ? /* @__PURE__ */ jsx106(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ jsx106(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
11095
11208
|
] }),
|
|
11096
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */
|
|
11097
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
11098
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */
|
|
11099
|
-
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */
|
|
11100
|
-
monitor && monitor.activeTab === "standings" && /* @__PURE__ */
|
|
11101
|
-
monitor && monitor.activeTab === "squad" && /* @__PURE__ */
|
|
11102
|
-
/* @__PURE__ */
|
|
11209
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ jsx106(TodayPanel, { discovery, ui, monitor }),
|
|
11210
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx106(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk }),
|
|
11211
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ jsx106(OddsPanel, { monitor, ui, slip }),
|
|
11212
|
+
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx106(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
|
|
11213
|
+
monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx106(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
|
|
11214
|
+
monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs90(Fragment27, { children: [
|
|
11215
|
+
/* @__PURE__ */ jsx106(
|
|
11103
11216
|
"div",
|
|
11104
11217
|
{
|
|
11105
11218
|
ref: squadLayerRef,
|
|
11106
11219
|
style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
|
|
11107
11220
|
"aria-hidden": selectedPlayerId !== null ? true : void 0,
|
|
11108
|
-
children: /* @__PURE__ */
|
|
11221
|
+
children: /* @__PURE__ */ jsx106(
|
|
11109
11222
|
Squad,
|
|
11110
11223
|
{
|
|
11111
11224
|
squad: clubSquadResult?.data ?? null,
|
|
@@ -11123,9 +11236,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11123
11236
|
)
|
|
11124
11237
|
}
|
|
11125
11238
|
),
|
|
11126
|
-
selectedPlayerId !== null && /* @__PURE__ */
|
|
11239
|
+
selectedPlayerId !== null && /* @__PURE__ */ jsx106(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
|
|
11127
11240
|
] }),
|
|
11128
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
11241
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx106(
|
|
11129
11242
|
GamesPanel,
|
|
11130
11243
|
{
|
|
11131
11244
|
loggedIn: !!loggedIn,
|
|
@@ -11140,9 +11253,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11140
11253
|
}
|
|
11141
11254
|
}
|
|
11142
11255
|
),
|
|
11143
|
-
(!monitor || monitor.activeTab !== "games") && /* @__PURE__ */
|
|
11144
|
-
/* @__PURE__ */
|
|
11145
|
-
paused ? null : /* @__PURE__ */
|
|
11256
|
+
(!monitor || monitor.activeTab !== "games") && /* @__PURE__ */ jsxs90(Fragment27, { children: [
|
|
11257
|
+
/* @__PURE__ */ jsx106("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
11258
|
+
paused ? null : /* @__PURE__ */ jsx106(
|
|
11146
11259
|
ChatInput,
|
|
11147
11260
|
{
|
|
11148
11261
|
ref: inputRef,
|
|
@@ -11161,9 +11274,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
11161
11274
|
}
|
|
11162
11275
|
|
|
11163
11276
|
// src/components/HostEventsProvider.tsx
|
|
11164
|
-
import { jsx as
|
|
11277
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
11165
11278
|
function HostEventsProvider({ value, children }) {
|
|
11166
|
-
return /* @__PURE__ */
|
|
11279
|
+
return /* @__PURE__ */ jsx107(SlipStateContext.Provider, { value: value.slipState, children });
|
|
11167
11280
|
}
|
|
11168
11281
|
|
|
11169
11282
|
// src/styles/css.generated.ts
|
|
@@ -12172,8 +12285,13 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
12172
12285
|
.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); }
|
|
12173
12286
|
.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); }
|
|
12174
12287
|
.ss-w-fandash-live-score-sep { color: var(--ss-w-faint); font-weight: 500; margin: 0 5px; }
|
|
12175
|
-
.ss-w-fandash-live-scorers { margin-top: 12px; display: flex; justify-content:
|
|
12176
|
-
.ss-w-fandash-live-scorers
|
|
12288
|
+
.ss-w-fandash-live-scorers-row { margin-top: 12px; display: flex; justify-content: space-between; gap: 10px; }
|
|
12289
|
+
.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; }
|
|
12290
|
+
.ss-w-fandash-live-scorers--home { justify-content: flex-start; }
|
|
12291
|
+
.ss-w-fandash-live-scorers--away { justify-content: flex-end; }
|
|
12292
|
+
.ss-w-fandash-live-scorers--home .ss-w-fandash-live-scorers-icon { color: var(--ss-w-home); }
|
|
12293
|
+
.ss-w-fandash-live-scorers--away .ss-w-fandash-live-scorers-icon { color: var(--ss-w-away); }
|
|
12294
|
+
.ss-w-fandash-live-scorers-icon { flex: none; }
|
|
12177
12295
|
|
|
12178
12296
|
/* live timeline: a compact two-sided event list down a centre spine -- each club's events sit on
|
|
12179
12297
|
its own side (home left, away right), most-recent 3 shown with a "See more" toggle for the
|
|
@@ -12272,6 +12390,41 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
12272
12390
|
.ss-w-mon-scorers-home { text-align: right; }
|
|
12273
12391
|
.ss-w-mon-scorers-away { text-align: left; }
|
|
12274
12392
|
.ss-w-mon-scorers-ball { flex: none; align-self: start; line-height: 1.35; }
|
|
12393
|
+
|
|
12394
|
+
/* Pinned pre-match form + head-to-head (MonitorFormH2H): collapsed by default, a real <button>
|
|
12395
|
+
header toggles it. W/D/L dots and the H2H bar/legend keep fixed, theme-independent colors
|
|
12396
|
+
(same convention as the dashboard tile accents above) since they're self-contained badges
|
|
12397
|
+
carrying their own ink color, not page-background-dependent text. */
|
|
12398
|
+
.ss-w-h2h { border-left: 3px solid #16A34A; padding-left: 12px; }
|
|
12399
|
+
.ss-w-h2h-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0; }
|
|
12400
|
+
.ss-w-h2h-head-l { display: flex; align-items: center; gap: 6px; }
|
|
12401
|
+
.ss-w-h2h-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--ss-w-faint); flex: none; }
|
|
12402
|
+
.ss-w-h2h-title { font-size: 13px; font-weight: 700; color: var(--ss-w-ink); }
|
|
12403
|
+
.ss-w-h2h-chevron { flex: none; color: var(--ss-w-faint); transition: transform .15s ease; }
|
|
12404
|
+
.ss-w-h2h-chevron--open { transform: rotate(180deg); }
|
|
12405
|
+
.ss-w-h2h-body { padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
|
|
12406
|
+
.ss-w-h2h-forms { display: flex; align-items: flex-start; justify-content: space-between; }
|
|
12407
|
+
.ss-w-h2h-form-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
|
|
12408
|
+
.ss-w-h2h-form-col--away { align-items: flex-end; }
|
|
12409
|
+
.ss-w-h2h-form-team { font-size: 11px; color: var(--ss-w-faint); }
|
|
12410
|
+
.ss-w-h2h-dots { display: flex; gap: 4px; }
|
|
12411
|
+
.ss-w-h2h-result { width: 20px; height: 20px; border-radius: 999px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
|
|
12412
|
+
.ss-w-h2h-result--win { background: #16A34A; color: #FFFFFF; }
|
|
12413
|
+
.ss-w-h2h-result--draw { background: #E5E7EB; color: #4B5563; }
|
|
12414
|
+
.ss-w-h2h-result--loss { background: #F5A623; color: #1F2937; }
|
|
12415
|
+
.ss-w-h2h-record { display: flex; flex-direction: column; gap: 6px; }
|
|
12416
|
+
.ss-w-h2h-meta { font-size: 11px; color: var(--ss-w-faint); }
|
|
12417
|
+
.ss-w-h2h-bar { display: flex; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; }
|
|
12418
|
+
.ss-w-h2h-bar-seg--win { background: #16A34A; }
|
|
12419
|
+
.ss-w-h2h-bar-seg--draw { background: #D1D5DB; }
|
|
12420
|
+
.ss-w-h2h-bar-seg--loss { background: #2563EB; }
|
|
12421
|
+
.ss-w-h2h-legend { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
|
|
12422
|
+
.ss-w-h2h-legend-item { font-size: 11px; color: var(--ss-w-ink); display: flex; align-items: center; gap: 5px; }
|
|
12423
|
+
.ss-w-h2h-legend-dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; flex: none; }
|
|
12424
|
+
.ss-w-h2h-legend-dot--win { background: #16A34A; }
|
|
12425
|
+
.ss-w-h2h-legend-dot--draw { background: #D1D5DB; }
|
|
12426
|
+
.ss-w-h2h-legend-dot--loss { background: #2563EB; }
|
|
12427
|
+
|
|
12275
12428
|
.ss-w-fact { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ss-w-accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, transparent); }
|
|
12276
12429
|
.ss-w-fact-k { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ss-w-accent); }
|
|
12277
12430
|
.ss-w-fact-min { color: var(--ss-w-ink); letter-spacing: 0; }
|
|
@@ -13029,7 +13182,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
13029
13182
|
`;
|
|
13030
13183
|
|
|
13031
13184
|
// src/StatsWidget.tsx
|
|
13032
|
-
import { jsx as
|
|
13185
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
13033
13186
|
function buildClient(props) {
|
|
13034
13187
|
try {
|
|
13035
13188
|
if ("client" in props && props.client) {
|
|
@@ -13070,7 +13223,7 @@ function StatsWidget(props) {
|
|
|
13070
13223
|
}, []);
|
|
13071
13224
|
const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
|
|
13072
13225
|
const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
|
|
13073
|
-
const [hasToday, setHasToday] =
|
|
13226
|
+
const [hasToday, setHasToday] = useState56(false);
|
|
13074
13227
|
const liveCardWatches = useMemo6(() => {
|
|
13075
13228
|
const seen = /* @__PURE__ */ new Set();
|
|
13076
13229
|
const out = [];
|
|
@@ -13254,7 +13407,7 @@ function StatsWidget(props) {
|
|
|
13254
13407
|
}, [built, ui.injectStyles]);
|
|
13255
13408
|
if (!built) return null;
|
|
13256
13409
|
const attrs = themeAttrs(ui);
|
|
13257
|
-
return /* @__PURE__ */
|
|
13410
|
+
return /* @__PURE__ */ jsx108(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx108(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx108("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__ */ jsx108(
|
|
13258
13411
|
ChatPanel,
|
|
13259
13412
|
{
|
|
13260
13413
|
controller,
|
|
@@ -13274,7 +13427,7 @@ function StatsWidget(props) {
|
|
|
13274
13427
|
conversation: built?.conversation ?? null,
|
|
13275
13428
|
presetGrid
|
|
13276
13429
|
}
|
|
13277
|
-
) : /* @__PURE__ */
|
|
13430
|
+
) : /* @__PURE__ */ jsx108(
|
|
13278
13431
|
ChatFab,
|
|
13279
13432
|
{
|
|
13280
13433
|
label: ui.launcherLabel,
|