@sensiblestats/widget-react 0.76.0 → 0.78.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 +934 -849
- 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 +799 -714
- package/dist/index.js.map +1 -1
- package/dist/styles.css +31 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -37,7 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
|
|
39
39
|
// src/StatsWidget.tsx
|
|
40
|
-
var
|
|
40
|
+
var import_react55 = require("react");
|
|
41
41
|
var import_widget_sdk5 = require("@sensiblestats/widget-sdk");
|
|
42
42
|
|
|
43
43
|
// src/kickoff.ts
|
|
@@ -208,6 +208,8 @@ var STRINGS = {
|
|
|
208
208
|
statRank: "Rank",
|
|
209
209
|
unitDays: "days",
|
|
210
210
|
unitPts: "pts",
|
|
211
|
+
worthNow: (pts) => `Worth ${pts} pts now`,
|
|
212
|
+
worthAfterMiss: (pts) => `${pts} after a miss`,
|
|
211
213
|
thisWeek: "this week",
|
|
212
214
|
newToday: "New today",
|
|
213
215
|
resume: "Resume",
|
|
@@ -548,6 +550,8 @@ var STRINGS = {
|
|
|
548
550
|
statRank: "S\u0131ra",
|
|
549
551
|
unitDays: "g\xFCn",
|
|
550
552
|
unitPts: "puan",
|
|
553
|
+
worthNow: (pts) => `\u015Eimdi ${pts} puan`,
|
|
554
|
+
worthAfterMiss: (pts) => `yanl\u0131\u015Fta ${pts}`,
|
|
551
555
|
thisWeek: "bu hafta",
|
|
552
556
|
newToday: "Bug\xFCn yeni",
|
|
553
557
|
resume: "Devam et",
|
|
@@ -3140,11 +3144,26 @@ function usePopupTelemetry(log, isOpen, popupText, dismissPopup) {
|
|
|
3140
3144
|
}, [log, dismissPopup]);
|
|
3141
3145
|
}
|
|
3142
3146
|
|
|
3147
|
+
// src/openTelemetry.ts
|
|
3148
|
+
var import_react12 = require("react");
|
|
3149
|
+
function useOpenTelemetry(log, isOpen) {
|
|
3150
|
+
const openLoggedRef = (0, import_react12.useRef)(false);
|
|
3151
|
+
(0, import_react12.useEffect)(() => {
|
|
3152
|
+
if (!isOpen) {
|
|
3153
|
+
openLoggedRef.current = false;
|
|
3154
|
+
return;
|
|
3155
|
+
}
|
|
3156
|
+
if (openLoggedRef.current || !log) return;
|
|
3157
|
+
openLoggedRef.current = true;
|
|
3158
|
+
log.log({ name: "widget_open" });
|
|
3159
|
+
}, [log, isOpen]);
|
|
3160
|
+
}
|
|
3161
|
+
|
|
3143
3162
|
// src/components/ChatFab.tsx
|
|
3144
|
-
var
|
|
3163
|
+
var import_react14 = require("react");
|
|
3145
3164
|
|
|
3146
3165
|
// src/components/BrandMark.tsx
|
|
3147
|
-
var
|
|
3166
|
+
var import_react13 = require("react");
|
|
3148
3167
|
|
|
3149
3168
|
// src/assets/logo.ts
|
|
3150
3169
|
var SS_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjoAAAI6CAYAAAAuSOLAAAAAAXNSR0IArs4c6QAAAJplWElmTU0AKgAAAAgAAwESAAMAAAABAAEAAAExAAIAAAA9AAAAModpAAQAAAABAAAAcAAAAABBZG9iZSBQaG90b3Nob3AgMjYuMTAgKDIwMjUwNzMwLm0uMzE2NiAwN2IxMjM0KSAgKE1hY2ludG9zaCkAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAI6oAMABAAAAAEAAAI6AAAAACwGtVwAAAQwaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1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JTHFssQgAAEiiXQXgl9NxllJfRiyWItYQIInYQrl9AgAIEECSxSf51h24OV0BOsW0IqhQBCpxSsGIUABCBQIoHM7pDYWbsS+q0lloRpCERPAKETfRUSAAQg0FgC7ZXQH67WnfMay4DAITAHAYTOHIA4DQEIQMA1gbAS+pDtLR//RzsrobuuLJyrgwBCpw7qlAkBCECgSALtldDDOllP1s5K6EWyxVb0BBA60VchAUAAAhBYQ2CktQL6LvrESuhcFBBYQwChw6UAAQhAICUCI2rRGbawEvpbtbMSekp1Syw9EUDo9ISNTBCAAAQcE2ivhH6MDdi/ycurHXuKaxAonQBCp3TEFAABCECgJgJDdr5WQn+4uiifVJMHFAuB2gkgdGqvAhyAAAQgUCKB9kroB0nsHKFSWAm9RNSY9kkAoeOzXvAKAhCAQLEERu0zMhhWQr+sWMNYg4BvAggd3/WDdxCAAASKI9BeCf0RMnhccUaxBAHfBBA6vusH7yAAAQgUS6C9EvpLZPTF2ieKNY41CPgjgNDxVyd4BAEIQKB8AiP2dZs0VkIvnzQl1EwAoVNzBVA8BCAAgdoI3L0S+qdr84GCIVAyAYROyYAxDwEIQMA1gfZK6EdqYdBnyU9WQnddWTjXCwGETi/UyAMBCEAgNQLD9n0b1Jw7mZ2bWmjE02wCCJ1m1z/RQwACELibQHsl9H005877dZCV0O8mwzsIQAACEIAABJIiMG772bgdk1RMBAMBCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIBAqgT+PwQUc6J1VOHQAAAAAElFTkSuQmCC";
|
|
@@ -3207,7 +3226,7 @@ function DashboardIcon({ name }) {
|
|
|
3207
3226
|
// src/components/BrandMark.tsx
|
|
3208
3227
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
3209
3228
|
function BrandMark({ logoUrl, className }) {
|
|
3210
|
-
const [failed, setFailed] = (0,
|
|
3229
|
+
const [failed, setFailed] = (0, import_react13.useState)(false);
|
|
3211
3230
|
if (!logoUrl || failed) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SsMark, { className });
|
|
3212
3231
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { className, src: logoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
3213
3232
|
}
|
|
@@ -3243,9 +3262,9 @@ function GreetingBubble({ text, onOpen, onDismiss, dismissLabel = "Dismiss", ask
|
|
|
3243
3262
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
3244
3263
|
function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel = "Dismiss", introAllowed = false, onIntroStart, asks }) {
|
|
3245
3264
|
const bubble = popupText ?? greeting;
|
|
3246
|
-
const [intro, setIntro] = (0,
|
|
3247
|
-
const armedRef = (0,
|
|
3248
|
-
(0,
|
|
3265
|
+
const [intro, setIntro] = (0, import_react14.useState)(false);
|
|
3266
|
+
const armedRef = (0, import_react14.useRef)(introAllowed);
|
|
3267
|
+
(0, import_react14.useEffect)(() => {
|
|
3249
3268
|
if (armedRef.current && bubble) {
|
|
3250
3269
|
armedRef.current = false;
|
|
3251
3270
|
setIntro(true);
|
|
@@ -3259,10 +3278,10 @@ function ChatFab({ label, greeting, popupText, logoUrl, onOpen, onDismissPopup,
|
|
|
3259
3278
|
}
|
|
3260
3279
|
|
|
3261
3280
|
// src/components/ChatPanel.tsx
|
|
3262
|
-
var
|
|
3281
|
+
var import_react54 = require("react");
|
|
3263
3282
|
|
|
3264
3283
|
// src/components/ChatHeader.tsx
|
|
3265
|
-
var
|
|
3284
|
+
var import_react15 = require("react");
|
|
3266
3285
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3267
3286
|
function ChatHeader({
|
|
3268
3287
|
onClose,
|
|
@@ -3274,15 +3293,15 @@ function ChatHeader({
|
|
|
3274
3293
|
newConversationLabel = "New conversation",
|
|
3275
3294
|
moreOptionsLabel = "More options"
|
|
3276
3295
|
}) {
|
|
3277
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
3278
|
-
const wrapRef = (0,
|
|
3279
|
-
const kebabRef = (0,
|
|
3280
|
-
const firstItemRef = (0,
|
|
3296
|
+
const [menuOpen, setMenuOpen] = (0, import_react15.useState)(false);
|
|
3297
|
+
const wrapRef = (0, import_react15.useRef)(null);
|
|
3298
|
+
const kebabRef = (0, import_react15.useRef)(null);
|
|
3299
|
+
const firstItemRef = (0, import_react15.useRef)(null);
|
|
3281
3300
|
const hasMenu = !!(canReset && onNewConversation);
|
|
3282
|
-
(0,
|
|
3301
|
+
(0, import_react15.useEffect)(() => {
|
|
3283
3302
|
if (menuOpen) firstItemRef.current?.focus();
|
|
3284
3303
|
}, [menuOpen]);
|
|
3285
|
-
(0,
|
|
3304
|
+
(0, import_react15.useEffect)(() => {
|
|
3286
3305
|
if (!menuOpen) return;
|
|
3287
3306
|
const onPointer = (e) => {
|
|
3288
3307
|
if (!wrapRef.current?.contains(e.target)) setMenuOpen(false);
|
|
@@ -3338,7 +3357,7 @@ function ChatHeader({
|
|
|
3338
3357
|
}
|
|
3339
3358
|
|
|
3340
3359
|
// src/components/MessageList.tsx
|
|
3341
|
-
var
|
|
3360
|
+
var import_react33 = require("react");
|
|
3342
3361
|
|
|
3343
3362
|
// src/components/Markdown.tsx
|
|
3344
3363
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
@@ -3356,7 +3375,7 @@ function Markdown({ text }) {
|
|
|
3356
3375
|
}
|
|
3357
3376
|
|
|
3358
3377
|
// src/components/EntityCardList.tsx
|
|
3359
|
-
var
|
|
3378
|
+
var import_react16 = require("react");
|
|
3360
3379
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3361
3380
|
var MAX_VISIBLE = 3;
|
|
3362
3381
|
var RECORD_RE = /^(\d+)-(\d+)-(\d+)$/;
|
|
@@ -3440,7 +3459,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
|
|
|
3440
3459
|
)) });
|
|
3441
3460
|
}
|
|
3442
3461
|
function EntityCardItem({ c }) {
|
|
3443
|
-
const [active, setActive] = (0,
|
|
3462
|
+
const [active, setActive] = (0, import_react16.useState)(0);
|
|
3444
3463
|
const hasBody = c.scopes.length > 0;
|
|
3445
3464
|
if (!hasBody) {
|
|
3446
3465
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardHeader, { c, showScopeCrest: false }) });
|
|
@@ -3454,7 +3473,7 @@ function EntityCardItem({ c }) {
|
|
|
3454
3473
|
] });
|
|
3455
3474
|
}
|
|
3456
3475
|
function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMoreLabel = (n) => `Show ${n} more` }) {
|
|
3457
|
-
const [expanded, setExpanded] = (0,
|
|
3476
|
+
const [expanded, setExpanded] = (0, import_react16.useState)(false);
|
|
3458
3477
|
if (cards.length === 0) return null;
|
|
3459
3478
|
const visible = expanded ? cards : cards.slice(0, MAX_VISIBLE);
|
|
3460
3479
|
const overflow = cards.length - MAX_VISIBLE;
|
|
@@ -3465,22 +3484,22 @@ function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMore
|
|
|
3465
3484
|
}
|
|
3466
3485
|
|
|
3467
3486
|
// src/components/AddToSlipButton.tsx
|
|
3468
|
-
var
|
|
3487
|
+
var import_react19 = require("react");
|
|
3469
3488
|
var import_widget_sdk4 = require("@sensiblestats/widget-sdk");
|
|
3470
3489
|
|
|
3471
3490
|
// src/slipStateContext.ts
|
|
3472
|
-
var
|
|
3473
|
-
var SlipStateContext = (0,
|
|
3491
|
+
var import_react17 = require("react");
|
|
3492
|
+
var SlipStateContext = (0, import_react17.createContext)(null);
|
|
3474
3493
|
function useSlipState() {
|
|
3475
|
-
return (0,
|
|
3494
|
+
return (0, import_react17.useContext)(SlipStateContext);
|
|
3476
3495
|
}
|
|
3477
3496
|
|
|
3478
3497
|
// src/components/Toast.tsx
|
|
3479
|
-
var
|
|
3498
|
+
var import_react18 = require("react");
|
|
3480
3499
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3481
3500
|
var DISMISS_MS = 4e3;
|
|
3482
3501
|
function Toast({ toast, onDismiss }) {
|
|
3483
|
-
(0,
|
|
3502
|
+
(0, import_react18.useEffect)(() => {
|
|
3484
3503
|
if (!toast) return;
|
|
3485
3504
|
const timer = setTimeout(onDismiss, DISMISS_MS);
|
|
3486
3505
|
return () => clearTimeout(timer);
|
|
@@ -3498,10 +3517,10 @@ function withTimeout(value) {
|
|
|
3498
3517
|
]);
|
|
3499
3518
|
}
|
|
3500
3519
|
function SlipButton({ selection, shownOdds, marketDeveloperName, selectionLabel, line, slip, ui, price, ariaLabel }) {
|
|
3501
|
-
const [pending, setPending] = (0,
|
|
3502
|
-
const [settledLocal, setSettledLocal] = (0,
|
|
3503
|
-
const [toast, setToast] = (0,
|
|
3504
|
-
const dismiss = (0,
|
|
3520
|
+
const [pending, setPending] = (0, import_react19.useState)(false);
|
|
3521
|
+
const [settledLocal, setSettledLocal] = (0, import_react19.useState)(false);
|
|
3522
|
+
const [toast, setToast] = (0, import_react19.useState)(null);
|
|
3523
|
+
const dismiss = (0, import_react19.useCallback)(() => setToast(null), []);
|
|
3505
3524
|
const log = useEventLog();
|
|
3506
3525
|
const slipState = useSlipState();
|
|
3507
3526
|
const handler = slip.onAddToSlip;
|
|
@@ -3613,14 +3632,14 @@ function OddsMovementBadge({
|
|
|
3613
3632
|
}
|
|
3614
3633
|
|
|
3615
3634
|
// src/components/Crest.tsx
|
|
3616
|
-
var
|
|
3635
|
+
var import_react20 = require("react");
|
|
3617
3636
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3618
3637
|
function initials2(name) {
|
|
3619
3638
|
return (name ?? "").trim().slice(0, 1).toUpperCase() || "?";
|
|
3620
3639
|
}
|
|
3621
3640
|
function Crest2({ url, name, kind }) {
|
|
3622
3641
|
const cls = kind === "comp" ? "ss-w-bi-comp-logo" : "ss-w-bi-crest";
|
|
3623
|
-
const [failed, setFailed] = (0,
|
|
3642
|
+
const [failed, setFailed] = (0, import_react20.useState)(false);
|
|
3624
3643
|
if (url && !failed) {
|
|
3625
3644
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
3626
3645
|
}
|
|
@@ -3628,7 +3647,7 @@ function Crest2({ url, name, kind }) {
|
|
|
3628
3647
|
}
|
|
3629
3648
|
|
|
3630
3649
|
// src/components/PinToggle.tsx
|
|
3631
|
-
var
|
|
3650
|
+
var import_react21 = require("react");
|
|
3632
3651
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3633
3652
|
var PIN_GLYPHS = {
|
|
3634
3653
|
pin: { viewBox: "0 0 24 24", strokeWidth: 1.4, transform: "scale(1.5)", d: "M9.5 1.5 14.5 6.5 13 8l-.5-.5-3 3 .3 2.2-1.4 1.4L5.6 11.3l-3.3 3.3-1-1 3.3-3.3L1.9 7.5l1.4-1.4 2.2.3 3-3L8 2.9z" },
|
|
@@ -3636,8 +3655,8 @@ var PIN_GLYPHS = {
|
|
|
3636
3655
|
bookmark: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z" }
|
|
3637
3656
|
};
|
|
3638
3657
|
function PinToggle({ pin, monitor, ui, market }) {
|
|
3639
|
-
const [toast, setToast] = (0,
|
|
3640
|
-
const dismiss = (0,
|
|
3658
|
+
const [toast, setToast] = (0, import_react21.useState)(null);
|
|
3659
|
+
const dismiss = (0, import_react21.useCallback)(() => setToast(null), []);
|
|
3641
3660
|
const log = useEventLog();
|
|
3642
3661
|
if (!monitor || !monitor.enabled) return null;
|
|
3643
3662
|
const key = pinKey(pin);
|
|
@@ -3693,11 +3712,11 @@ function PinToggle({ pin, monitor, ui, market }) {
|
|
|
3693
3712
|
}
|
|
3694
3713
|
|
|
3695
3714
|
// src/components/PriceHistoryButton.tsx
|
|
3696
|
-
var
|
|
3715
|
+
var import_react22 = require("react");
|
|
3697
3716
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3698
3717
|
function PriceHistoryButton({ selection, monitor, ui }) {
|
|
3699
|
-
const [toast, setToast] = (0,
|
|
3700
|
-
const dismiss = (0,
|
|
3718
|
+
const [toast, setToast] = (0, import_react22.useState)(null);
|
|
3719
|
+
const dismiss = (0, import_react22.useCallback)(() => setToast(null), []);
|
|
3701
3720
|
const log = useEventLog();
|
|
3702
3721
|
if (!monitor || !monitor.enabled) return null;
|
|
3703
3722
|
const name = joinSelection(selection.selectionLabel ?? void 0, selection.line ?? void 0);
|
|
@@ -3812,10 +3831,10 @@ function BettingInsightList({ insights, ui, slip, monitor }) {
|
|
|
3812
3831
|
}
|
|
3813
3832
|
|
|
3814
3833
|
// src/presetToolsContext.ts
|
|
3815
|
-
var
|
|
3816
|
-
var PresetToolsContext = (0,
|
|
3834
|
+
var import_react23 = require("react");
|
|
3835
|
+
var PresetToolsContext = (0, import_react23.createContext)(null);
|
|
3817
3836
|
function usePresetTools() {
|
|
3818
|
-
return (0,
|
|
3837
|
+
return (0, import_react23.useContext)(PresetToolsContext);
|
|
3819
3838
|
}
|
|
3820
3839
|
|
|
3821
3840
|
// src/components/ComboCardList.tsx
|
|
@@ -3879,7 +3898,7 @@ function ComboCardList({ cards, ui, slip, monitor }) {
|
|
|
3879
3898
|
}
|
|
3880
3899
|
|
|
3881
3900
|
// src/components/MarketOddsCardList.tsx
|
|
3882
|
-
var
|
|
3901
|
+
var import_react24 = require("react");
|
|
3883
3902
|
|
|
3884
3903
|
// src/components/AllMarketsButton.tsx
|
|
3885
3904
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
@@ -3942,7 +3961,7 @@ function fmtHhMm(iso, locale) {
|
|
|
3942
3961
|
return new Date(iso).toLocaleTimeString(locale, { hour: "2-digit", minute: "2-digit", hour12: false });
|
|
3943
3962
|
}
|
|
3944
3963
|
function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
|
|
3945
|
-
const [open, setOpen] = (0,
|
|
3964
|
+
const [open, setOpen] = (0, import_react24.useState)(false);
|
|
3946
3965
|
const kickoffFallback = vm.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
|
|
3947
3966
|
const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
3948
3967
|
const hasNamedTeams = !!vm.homeTeamName && !!vm.awayTeamName;
|
|
@@ -3952,9 +3971,9 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
|
|
|
3952
3971
|
const asOfMs = live ? new Date(live.asOfUtc).getTime() : NaN;
|
|
3953
3972
|
const isStale = live != null && !isClosed && (vm.awaitingLiveUpdate === true || Date.now() - asOfMs > STALE_AFTER_MS);
|
|
3954
3973
|
const staleTime = isStale && live ? fmtHhMm(live.asOfUtc, ui?.locale ?? "en") : null;
|
|
3955
|
-
const [, setStaleTick] = (0,
|
|
3974
|
+
const [, setStaleTick] = (0, import_react24.useState)(0);
|
|
3956
3975
|
const watchStale = live != null && !isClosed && !isStale;
|
|
3957
|
-
(0,
|
|
3976
|
+
(0, import_react24.useEffect)(() => {
|
|
3958
3977
|
if (!watchStale) return;
|
|
3959
3978
|
const id = window.setTimeout(() => setStaleTick((n) => n + 1), Math.max(0, asOfMs + STALE_AFTER_MS - Date.now()) + 1);
|
|
3960
3979
|
return () => window.clearTimeout(id);
|
|
@@ -4033,7 +4052,7 @@ function MarketOddsCardList({ cards, ui, slip, monitor, inSlipIds, hideHeader, p
|
|
|
4033
4052
|
}
|
|
4034
4053
|
|
|
4035
4054
|
// src/components/CompactOddsList.tsx
|
|
4036
|
-
var
|
|
4055
|
+
var import_react25 = require("react");
|
|
4037
4056
|
|
|
4038
4057
|
// src/compactList.ts
|
|
4039
4058
|
var COMPACT_MIN_CARDS = 3;
|
|
@@ -4147,11 +4166,11 @@ function Row({ row, columns, ui, slip, monitor, rowRef }) {
|
|
|
4147
4166
|
] });
|
|
4148
4167
|
}
|
|
4149
4168
|
function CompactOddsList({ list, ui, slip, monitor }) {
|
|
4150
|
-
const [shown, setShown] = (0,
|
|
4169
|
+
const [shown, setShown] = (0, import_react25.useState)(COMPACT_PAGE);
|
|
4151
4170
|
const hidden = list.rowCount - shown;
|
|
4152
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
4153
|
-
const focusRef = (0,
|
|
4154
|
-
(0,
|
|
4171
|
+
const [focusIndex, setFocusIndex] = (0, import_react25.useState)(null);
|
|
4172
|
+
const focusRef = (0, import_react25.useRef)(null);
|
|
4173
|
+
(0, import_react25.useEffect)(() => {
|
|
4155
4174
|
if (focusIndex !== null) focusRef.current?.focus();
|
|
4156
4175
|
}, [focusIndex]);
|
|
4157
4176
|
let left = shown;
|
|
@@ -4456,7 +4475,7 @@ function FixtureCard({ card }) {
|
|
|
4456
4475
|
}
|
|
4457
4476
|
|
|
4458
4477
|
// src/components/dashboard/CountdownCard.tsx
|
|
4459
|
-
var
|
|
4478
|
+
var import_react26 = require("react");
|
|
4460
4479
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4461
4480
|
var DAY_MS = 864e5;
|
|
4462
4481
|
function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
@@ -4475,12 +4494,12 @@ function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
|
4475
4494
|
function CountdownCard({ card }) {
|
|
4476
4495
|
const { data } = card;
|
|
4477
4496
|
const unitLabel = { d: data.daysUnit, h: data.hoursUnit, m: data.minutesUnit, s: data.secondsUnit };
|
|
4478
|
-
const [nowMs, setNowMs] = (0,
|
|
4479
|
-
const [reduced] = (0,
|
|
4497
|
+
const [nowMs, setNowMs] = (0, import_react26.useState)(() => Date.now());
|
|
4498
|
+
const [reduced] = (0, import_react26.useState)(
|
|
4480
4499
|
() => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
4481
4500
|
);
|
|
4482
4501
|
const withinDay = data.kickoffUnix * 1e3 - nowMs < DAY_MS;
|
|
4483
|
-
(0,
|
|
4502
|
+
(0, import_react26.useEffect)(() => {
|
|
4484
4503
|
if (reduced) return;
|
|
4485
4504
|
const id = window.setInterval(() => setNowMs(Date.now()), withinDay ? 1e3 : 6e4);
|
|
4486
4505
|
return () => window.clearInterval(id);
|
|
@@ -4488,7 +4507,7 @@ function CountdownCard({ card }) {
|
|
|
4488
4507
|
const segments = remainingSegments(data.kickoffUnix, nowMs, withinDay && !reduced);
|
|
4489
4508
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "ss-w-fandash-card ss-w-fandash-countdown", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ss-w-fandash-countdown-top", children: [
|
|
4490
4509
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title ?? "Kick-off in" }),
|
|
4491
|
-
segments ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4510
|
+
segments ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react26.Fragment, { children: [
|
|
4492
4511
|
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ss-w-fandash-countdown-colon", children: ":" }) : null,
|
|
4493
4512
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "ss-w-fandash-countdown-seg", children: [
|
|
4494
4513
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ss-w-fandash-countdown-value", children: s.value }),
|
|
@@ -4499,7 +4518,7 @@ function CountdownCard({ card }) {
|
|
|
4499
4518
|
}
|
|
4500
4519
|
|
|
4501
4520
|
// src/components/dashboard/InjuriesCard.tsx
|
|
4502
|
-
var
|
|
4521
|
+
var import_react27 = require("react");
|
|
4503
4522
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4504
4523
|
var SHOWN = 3;
|
|
4505
4524
|
function ColHead({ name, crestUrl }) {
|
|
@@ -4522,7 +4541,7 @@ function InjuryList({ rows, emptyLabel, limit }) {
|
|
|
4522
4541
|
}
|
|
4523
4542
|
function InjuriesCard({ card, ui }) {
|
|
4524
4543
|
const { data } = card;
|
|
4525
|
-
const [expanded, setExpanded] = (0,
|
|
4544
|
+
const [expanded, setExpanded] = (0, import_react27.useState)(false);
|
|
4526
4545
|
const hidden = Math.max(0, data.ours.length - SHOWN) + Math.max(0, data.theirs.length - SHOWN);
|
|
4527
4546
|
const limit = expanded ? void 0 : SHOWN;
|
|
4528
4547
|
const showMore = ui?.showMore ?? ((n) => `Show ${n} more`);
|
|
@@ -4628,7 +4647,7 @@ function LinksCard({ card }) {
|
|
|
4628
4647
|
}
|
|
4629
4648
|
|
|
4630
4649
|
// src/components/dashboard/PostMatchResultCard.tsx
|
|
4631
|
-
var
|
|
4650
|
+
var import_react28 = require("react");
|
|
4632
4651
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4633
4652
|
function initials3(name) {
|
|
4634
4653
|
return name.trim().slice(0, 3).toUpperCase();
|
|
@@ -4638,7 +4657,7 @@ function PostMatchCrest({
|
|
|
4638
4657
|
name,
|
|
4639
4658
|
side
|
|
4640
4659
|
}) {
|
|
4641
|
-
const [failed, setFailed] = (0,
|
|
4660
|
+
const [failed, setFailed] = (0, import_react28.useState)(false);
|
|
4642
4661
|
const cls = `ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${side}`;
|
|
4643
4662
|
if (url && !failed) {
|
|
4644
4663
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -4837,10 +4856,10 @@ function RestingFormCard({ card }) {
|
|
|
4837
4856
|
}
|
|
4838
4857
|
|
|
4839
4858
|
// src/components/dashboard/LiveScoreCard.tsx
|
|
4840
|
-
var
|
|
4859
|
+
var import_react30 = require("react");
|
|
4841
4860
|
|
|
4842
4861
|
// src/useLiveClock.ts
|
|
4843
|
-
var
|
|
4862
|
+
var import_react29 = require("react");
|
|
4844
4863
|
var TICK_MS = 6e4;
|
|
4845
4864
|
var MAX_LIVE_TICK_MINUTES = 15;
|
|
4846
4865
|
function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
@@ -4849,10 +4868,10 @@ function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
|
4849
4868
|
return minute + Math.min(Math.max(0, elapsedMinutes), MAX_LIVE_TICK_MINUTES);
|
|
4850
4869
|
}
|
|
4851
4870
|
function useLiveClock(minute, clockRunning, receivedAtMs) {
|
|
4852
|
-
const [displayMinute, setDisplayMinute] = (0,
|
|
4871
|
+
const [displayMinute, setDisplayMinute] = (0, import_react29.useState)(
|
|
4853
4872
|
() => computeDisplayMinute(minute, clockRunning, receivedAtMs)
|
|
4854
4873
|
);
|
|
4855
|
-
(0,
|
|
4874
|
+
(0, import_react29.useEffect)(() => {
|
|
4856
4875
|
setDisplayMinute(computeDisplayMinute(minute, clockRunning, receivedAtMs));
|
|
4857
4876
|
if (!clockRunning) return;
|
|
4858
4877
|
const id = window.setInterval(() => {
|
|
@@ -4869,7 +4888,7 @@ function initials5(name) {
|
|
|
4869
4888
|
return name.trim().slice(0, 3).toUpperCase();
|
|
4870
4889
|
}
|
|
4871
4890
|
function LiveCrest({ url, name, side }) {
|
|
4872
|
-
const [failed, setFailed] = (0,
|
|
4891
|
+
const [failed, setFailed] = (0, import_react30.useState)(false);
|
|
4873
4892
|
const cls = `ss-w-fandash-live-crest ss-w-fandash-live-crest--${side}`;
|
|
4874
4893
|
if (url && !failed) {
|
|
4875
4894
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -4888,7 +4907,7 @@ function LiveScoreCard({
|
|
|
4888
4907
|
}) {
|
|
4889
4908
|
const { data } = card;
|
|
4890
4909
|
const seedKey = `${data.minute}:${data.homeScore}:${data.awayScore}`;
|
|
4891
|
-
const seedRef = (0,
|
|
4910
|
+
const seedRef = (0, import_react30.useRef)(null);
|
|
4892
4911
|
if (!seedRef.current || seedRef.current.key !== seedKey) {
|
|
4893
4912
|
seedRef.current = { key: seedKey, receivedAtMs: Date.now() };
|
|
4894
4913
|
}
|
|
@@ -4928,7 +4947,7 @@ function LiveScoreCard({
|
|
|
4928
4947
|
}
|
|
4929
4948
|
|
|
4930
4949
|
// src/components/dashboard/LiveTimelineCard.tsx
|
|
4931
|
-
var
|
|
4950
|
+
var import_react31 = require("react");
|
|
4932
4951
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4933
4952
|
var SHOWN2 = 3;
|
|
4934
4953
|
function EventIcon({ type }) {
|
|
@@ -4970,7 +4989,7 @@ function EventRow({ e }) {
|
|
|
4970
4989
|
] });
|
|
4971
4990
|
}
|
|
4972
4991
|
function LiveTimelineCard({ card, ui }) {
|
|
4973
|
-
const [expanded, setExpanded] = (0,
|
|
4992
|
+
const [expanded, setExpanded] = (0, import_react31.useState)(false);
|
|
4974
4993
|
const events = card.data.events;
|
|
4975
4994
|
if (!events || events.length === 0) return null;
|
|
4976
4995
|
const sorted = [...events].sort((a, b) => b.minute - a.minute);
|
|
@@ -4995,7 +5014,7 @@ function LiveTimelineCard({ card, ui }) {
|
|
|
4995
5014
|
}
|
|
4996
5015
|
|
|
4997
5016
|
// src/components/dashboard/MomentumWave.tsx
|
|
4998
|
-
var
|
|
5017
|
+
var import_react32 = require("react");
|
|
4999
5018
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5000
5019
|
var WIDTH = 270;
|
|
5001
5020
|
var HEIGHT = 56;
|
|
@@ -5019,7 +5038,7 @@ function MomentumWave({
|
|
|
5019
5038
|
}) {
|
|
5020
5039
|
if (points.length === 0) return null;
|
|
5021
5040
|
const { area, line, lastLeftPct, lastTopPx } = buildPaths(points);
|
|
5022
|
-
const clipId = (0,
|
|
5041
|
+
const clipId = (0, import_react32.useId)();
|
|
5023
5042
|
const topClipId = `${clipId}-top`;
|
|
5024
5043
|
const bottomClipId = `${clipId}-bottom`;
|
|
5025
5044
|
const topClass = clubIsHome ? "ss-w-fandash-live-mom-home" : "ss-w-fandash-live-mom-away";
|
|
@@ -5212,11 +5231,11 @@ function turnAnchor(messages) {
|
|
|
5212
5231
|
}
|
|
5213
5232
|
function MessageList({ controller, ui, slip, onDashboardTap, monitor }) {
|
|
5214
5233
|
const { state, send } = controller;
|
|
5215
|
-
const listRef = (0,
|
|
5216
|
-
const endRef = (0,
|
|
5217
|
-
const pinnedRef = (0,
|
|
5218
|
-
const anchoredTurnRef = (0,
|
|
5219
|
-
(0,
|
|
5234
|
+
const listRef = (0, import_react33.useRef)(null);
|
|
5235
|
+
const endRef = (0, import_react33.useRef)(null);
|
|
5236
|
+
const pinnedRef = (0, import_react33.useRef)(true);
|
|
5237
|
+
const anchoredTurnRef = (0, import_react33.useRef)(null);
|
|
5238
|
+
(0, import_react33.useEffect)(() => {
|
|
5220
5239
|
const anchor = turnAnchor(state.messages);
|
|
5221
5240
|
const list = listRef.current;
|
|
5222
5241
|
if (anchor && anchor.turnId !== anchoredTurnRef.current) {
|
|
@@ -5273,13 +5292,13 @@ function MessageList({ controller, ui, slip, onDashboardTap, monitor }) {
|
|
|
5273
5292
|
}
|
|
5274
5293
|
|
|
5275
5294
|
// src/components/ChatInput.tsx
|
|
5276
|
-
var
|
|
5295
|
+
var import_react34 = require("react");
|
|
5277
5296
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5278
|
-
var ChatInput = (0,
|
|
5279
|
-
const [value, setValue] = (0,
|
|
5280
|
-
const textareaRef = (0,
|
|
5281
|
-
const stopRef = (0,
|
|
5282
|
-
const textBoxWantsFocusRef = (0,
|
|
5297
|
+
var ChatInput = (0, import_react34.forwardRef)(function ChatInput2({ placeholder, streaming, onSend, onStop, stopLabel = "Stop response", sendLabel = "Send message", disabled = false, onType }, ref) {
|
|
5298
|
+
const [value, setValue] = (0, import_react34.useState)("");
|
|
5299
|
+
const textareaRef = (0, import_react34.useRef)(null);
|
|
5300
|
+
const stopRef = (0, import_react34.useRef)(null);
|
|
5301
|
+
const textBoxWantsFocusRef = (0, import_react34.useRef)(false);
|
|
5283
5302
|
const submit = () => {
|
|
5284
5303
|
if (disabled) return;
|
|
5285
5304
|
const t = value.trim();
|
|
@@ -5293,7 +5312,7 @@ var ChatInput = (0, import_react33.forwardRef)(function ChatInput2({ placeholder
|
|
|
5293
5312
|
submit();
|
|
5294
5313
|
}
|
|
5295
5314
|
};
|
|
5296
|
-
(0,
|
|
5315
|
+
(0, import_react34.useImperativeHandle)(ref, () => ({
|
|
5297
5316
|
focus() {
|
|
5298
5317
|
const box = textareaRef.current;
|
|
5299
5318
|
if (box && !box.disabled) {
|
|
@@ -5305,7 +5324,7 @@ var ChatInput = (0, import_react33.forwardRef)(function ChatInput2({ placeholder
|
|
|
5305
5324
|
stopRef.current?.focus();
|
|
5306
5325
|
}
|
|
5307
5326
|
}), []);
|
|
5308
|
-
(0,
|
|
5327
|
+
(0, import_react34.useEffect)(() => {
|
|
5309
5328
|
if (streaming || disabled || !textBoxWantsFocusRef.current) return;
|
|
5310
5329
|
textBoxWantsFocusRef.current = false;
|
|
5311
5330
|
const box = textareaRef.current;
|
|
@@ -5427,10 +5446,10 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
5427
5446
|
}
|
|
5428
5447
|
|
|
5429
5448
|
// src/components/LiveFactBlock.tsx
|
|
5430
|
-
var
|
|
5449
|
+
var import_react35 = require("react");
|
|
5431
5450
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5432
5451
|
function LiveFactBlock({ facts, matchId, ui, slip, onAsk }) {
|
|
5433
|
-
const [expanded, setExpanded] = (0,
|
|
5452
|
+
const [expanded, setExpanded] = (0, import_react35.useState)(false);
|
|
5434
5453
|
const [current, ...earlier] = facts;
|
|
5435
5454
|
if (!current) return null;
|
|
5436
5455
|
const m = current.market;
|
|
@@ -5797,7 +5816,7 @@ function TodayPanel({ discovery, ui, monitor }) {
|
|
|
5797
5816
|
}
|
|
5798
5817
|
|
|
5799
5818
|
// src/components/GamesPanel.tsx
|
|
5800
|
-
var
|
|
5819
|
+
var import_react49 = require("react");
|
|
5801
5820
|
|
|
5802
5821
|
// src/components/GamesLoginWall.tsx
|
|
5803
5822
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
@@ -5806,7 +5825,7 @@ function GamesLoginWall({ ui }) {
|
|
|
5806
5825
|
}
|
|
5807
5826
|
|
|
5808
5827
|
// src/components/GamesHub.tsx
|
|
5809
|
-
var
|
|
5828
|
+
var import_react36 = require("react");
|
|
5810
5829
|
|
|
5811
5830
|
// src/components/games/ui/gameMeta.ts
|
|
5812
5831
|
function prettifyGameId(gameId) {
|
|
@@ -5991,8 +6010,8 @@ function pickHeroGame(games) {
|
|
|
5991
6010
|
}
|
|
5992
6011
|
var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
|
|
5993
6012
|
function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
5994
|
-
const [, setTick] = (0,
|
|
5995
|
-
(0,
|
|
6013
|
+
const [, setTick] = (0, import_react36.useState)(0);
|
|
6014
|
+
(0, import_react36.useEffect)(() => {
|
|
5996
6015
|
const id = setInterval(() => setTick((t) => t + 1), 6e4);
|
|
5997
6016
|
return () => clearInterval(id);
|
|
5998
6017
|
}, []);
|
|
@@ -6052,10 +6071,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
6052
6071
|
}
|
|
6053
6072
|
|
|
6054
6073
|
// src/components/GameScreenHost.tsx
|
|
6055
|
-
var
|
|
6074
|
+
var import_react48 = require("react");
|
|
6056
6075
|
|
|
6057
6076
|
// src/useGamePlay.ts
|
|
6058
|
-
var
|
|
6077
|
+
var import_react37 = require("react");
|
|
6059
6078
|
function toSubmitResult(payload) {
|
|
6060
6079
|
return {
|
|
6061
6080
|
// 'pending' means the play is recorded but awaiting resolution (fixture games)
|
|
@@ -6067,17 +6086,17 @@ function toSubmitResult(payload) {
|
|
|
6067
6086
|
};
|
|
6068
6087
|
}
|
|
6069
6088
|
function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
|
|
6070
|
-
const [result, setResult] = (0,
|
|
6071
|
-
const [submitting, setSubmitting] = (0,
|
|
6072
|
-
const [rawStatus, setRawStatus] = (0,
|
|
6073
|
-
const inFlightRef = (0,
|
|
6074
|
-
const convRef = (0,
|
|
6089
|
+
const [result, setResult] = (0, import_react37.useState)(null);
|
|
6090
|
+
const [submitting, setSubmitting] = (0, import_react37.useState)(false);
|
|
6091
|
+
const [rawStatus, setRawStatus] = (0, import_react37.useState)(null);
|
|
6092
|
+
const inFlightRef = (0, import_react37.useRef)(false);
|
|
6093
|
+
const convRef = (0, import_react37.useRef)(conversation);
|
|
6075
6094
|
convRef.current = conversation;
|
|
6076
|
-
const optsRef = (0,
|
|
6095
|
+
const optsRef = (0, import_react37.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
|
|
6077
6096
|
optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
|
|
6078
|
-
const resultRef = (0,
|
|
6097
|
+
const resultRef = (0, import_react37.useRef)(null);
|
|
6079
6098
|
resultRef.current = result;
|
|
6080
|
-
const refetch = (0,
|
|
6099
|
+
const refetch = (0, import_react37.useCallback)(async () => {
|
|
6081
6100
|
const conv = convRef.current;
|
|
6082
6101
|
if (!conv) return;
|
|
6083
6102
|
const opts = optsRef.current;
|
|
@@ -6093,7 +6112,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
6093
6112
|
} catch {
|
|
6094
6113
|
}
|
|
6095
6114
|
}, []);
|
|
6096
|
-
const submit = (0,
|
|
6115
|
+
const submit = (0, import_react37.useCallback)(async (answerJson) => {
|
|
6097
6116
|
const conv = convRef.current;
|
|
6098
6117
|
if (!conv || inFlightRef.current) return;
|
|
6099
6118
|
inFlightRef.current = true;
|
|
@@ -6120,14 +6139,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
6120
6139
|
setSubmitting(false);
|
|
6121
6140
|
}
|
|
6122
6141
|
}, [refetch]);
|
|
6123
|
-
const hydrate = (0,
|
|
6142
|
+
const hydrate = (0, import_react37.useCallback)(() => {
|
|
6124
6143
|
void refetch();
|
|
6125
6144
|
}, [refetch]);
|
|
6126
6145
|
return { result, submitting, submit, hydrate, rawStatus };
|
|
6127
6146
|
}
|
|
6128
6147
|
|
|
6129
6148
|
// src/components/games/MysteryTigerGame.tsx
|
|
6130
|
-
var
|
|
6149
|
+
var import_react39 = require("react");
|
|
6131
6150
|
|
|
6132
6151
|
// src/components/games/nationFlags.ts
|
|
6133
6152
|
var FLAGS = {
|
|
@@ -6338,7 +6357,7 @@ function isNationCode(flag) {
|
|
|
6338
6357
|
}
|
|
6339
6358
|
|
|
6340
6359
|
// src/components/games/PlayerAvatar.tsx
|
|
6341
|
-
var
|
|
6360
|
+
var import_react38 = require("react");
|
|
6342
6361
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
6343
6362
|
function initialsOf(name) {
|
|
6344
6363
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
@@ -6356,7 +6375,7 @@ function PlayerAvatar({
|
|
|
6356
6375
|
imagePath,
|
|
6357
6376
|
className
|
|
6358
6377
|
}) {
|
|
6359
|
-
const [failed, setFailed] = (0,
|
|
6378
|
+
const [failed, setFailed] = (0, import_react38.useState)(false);
|
|
6360
6379
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
6361
6380
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
6362
6381
|
}
|
|
@@ -6423,53 +6442,104 @@ function SearchField({ id, label, labelHidden = false, placeholder, value, onCha
|
|
|
6423
6442
|
] });
|
|
6424
6443
|
}
|
|
6425
6444
|
|
|
6426
|
-
// src/components/games/ui/
|
|
6445
|
+
// src/components/games/ui/AnswerTray.tsx
|
|
6427
6446
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6447
|
+
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
6448
|
+
const needle = query.trim().toLowerCase();
|
|
6449
|
+
const shown = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
6450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6451
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6452
|
+
SearchField,
|
|
6453
|
+
{
|
|
6454
|
+
id,
|
|
6455
|
+
label,
|
|
6456
|
+
labelHidden: true,
|
|
6457
|
+
placeholder,
|
|
6458
|
+
value: query,
|
|
6459
|
+
onChange: onQuery,
|
|
6460
|
+
disabled
|
|
6461
|
+
}
|
|
6462
|
+
),
|
|
6463
|
+
shown.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ss-g-tray", role: "listbox", "aria-label": optionsLabel, children: shown.map((o) => {
|
|
6464
|
+
const { first, last } = splitName(o.name);
|
|
6465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
6466
|
+
"button",
|
|
6467
|
+
{
|
|
6468
|
+
type: "button",
|
|
6469
|
+
role: "option",
|
|
6470
|
+
"aria-selected": false,
|
|
6471
|
+
"aria-label": o.name,
|
|
6472
|
+
className: "ss-g-tray-chip",
|
|
6473
|
+
disabled,
|
|
6474
|
+
onClick: () => onPick(o.id),
|
|
6475
|
+
children: [
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(PlayerAvatar, { className: "ss-g-tray-av", name: o.name, imagePath: o.imagePath }),
|
|
6477
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "ss-g-tray-name", "aria-hidden": "true", children: [
|
|
6478
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "ss-g-tray-first", children: first }),
|
|
6479
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "ss-g-tray-last", children: last })
|
|
6480
|
+
] })
|
|
6481
|
+
]
|
|
6482
|
+
},
|
|
6483
|
+
o.id
|
|
6484
|
+
);
|
|
6485
|
+
}) })
|
|
6486
|
+
] });
|
|
6487
|
+
}
|
|
6488
|
+
|
|
6489
|
+
// src/components/games/ui/FooterBar.tsx
|
|
6490
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
6428
6491
|
function FooterBar({ children }) {
|
|
6429
|
-
return /* @__PURE__ */ (0,
|
|
6492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ss-g-footer", children });
|
|
6430
6493
|
}
|
|
6431
6494
|
|
|
6432
6495
|
// src/components/games/ui/Silhouette.tsx
|
|
6433
|
-
var
|
|
6496
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6434
6497
|
function Silhouette({ size, variant = "default" }) {
|
|
6435
|
-
return /* @__PURE__ */ (0,
|
|
6436
|
-
/* @__PURE__ */ (0,
|
|
6437
|
-
/* @__PURE__ */ (0,
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: `ss-g-sil ss-g-sil--${variant}`, style: { width: size, height: size }, "aria-hidden": "true", children: [
|
|
6499
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("svg", { width: size * 0.86, height: size * 0.86, viewBox: "0 0 100 100", children: [
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("circle", { cx: "50", cy: "40", r: "19", fill: "currentColor" }),
|
|
6501
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M12 100c0-23 17-38 38-38s38 15 38 38z", fill: "currentColor" })
|
|
6439
6502
|
] }),
|
|
6440
|
-
variant === "mystery" && /* @__PURE__ */ (0,
|
|
6503
|
+
variant === "mystery" && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ss-g-sil-q", children: "?" })
|
|
6441
6504
|
] });
|
|
6442
6505
|
}
|
|
6443
6506
|
|
|
6444
6507
|
// src/components/games/ui/GameButton.tsx
|
|
6445
|
-
var
|
|
6508
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6446
6509
|
function GameButton({ variant = "primary", block = false, className, type = "button", ...rest }) {
|
|
6447
6510
|
const cls = `ss-g-btn ss-g-btn--${variant}${block ? " ss-g-btn--block" : ""}${className ? ` ${className}` : ""}`;
|
|
6448
|
-
return /* @__PURE__ */ (0,
|
|
6511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type, className: cls, ...rest });
|
|
6449
6512
|
}
|
|
6450
6513
|
|
|
6451
6514
|
// src/components/games/ui/ResultCard.tsx
|
|
6452
|
-
var
|
|
6515
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6453
6516
|
function ResultCard({ tone, title, score, detail, onBack, ui }) {
|
|
6454
|
-
return /* @__PURE__ */ (0,
|
|
6455
|
-
/* @__PURE__ */ (0,
|
|
6456
|
-
score !== void 0 && /* @__PURE__ */ (0,
|
|
6457
|
-
/* @__PURE__ */ (0,
|
|
6517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-result", "data-tone": tone, role: "status", children: [
|
|
6518
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-result-title", children: title }),
|
|
6519
|
+
score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "ss-g-result-score", children: [
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-result-num", children: score }),
|
|
6458
6521
|
ui.games.unitPts
|
|
6459
6522
|
] }),
|
|
6460
|
-
detail && /* @__PURE__ */ (0,
|
|
6461
|
-
onBack && /* @__PURE__ */ (0,
|
|
6523
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-result-detail", children: detail }),
|
|
6524
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(GameButton, { variant: "outline", onClick: onBack, children: ui.games.backToGames })
|
|
6462
6525
|
] });
|
|
6463
6526
|
}
|
|
6464
6527
|
|
|
6465
|
-
// src/components/games/ui/
|
|
6466
|
-
var
|
|
6467
|
-
function
|
|
6468
|
-
|
|
6528
|
+
// src/components/games/ui/PointsLadderRow.tsx
|
|
6529
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6530
|
+
function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
6531
|
+
if (!ladder || ladder.length === 0) return null;
|
|
6532
|
+
const now = ladder[Math.min(guessesUsed, ladder.length - 1)];
|
|
6533
|
+
const next = ladder[guessesUsed + 1];
|
|
6534
|
+
if (now === void 0) return null;
|
|
6535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ss-g-worth", "data-testid": "points-ladder", children: [
|
|
6536
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-worth-now", children: ui.games.worthNow(now) }),
|
|
6537
|
+
next !== void 0 && next !== now && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ss-g-worth-next", children: ui.games.worthAfterMiss(next) })
|
|
6538
|
+
] });
|
|
6469
6539
|
}
|
|
6470
6540
|
|
|
6471
6541
|
// src/components/games/MysteryTigerGame.tsx
|
|
6472
|
-
var
|
|
6542
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6473
6543
|
function parseClientState(json) {
|
|
6474
6544
|
if (!json) return null;
|
|
6475
6545
|
try {
|
|
@@ -6571,8 +6641,8 @@ function MysteryTigerGame({
|
|
|
6571
6641
|
onBack
|
|
6572
6642
|
}) {
|
|
6573
6643
|
const t = ui.games.mysteryTiger;
|
|
6574
|
-
const [query, setQuery] = (0,
|
|
6575
|
-
const inputId = (0,
|
|
6644
|
+
const [query, setQuery] = (0, import_react39.useState)("");
|
|
6645
|
+
const inputId = (0, import_react39.useId)();
|
|
6576
6646
|
const clientState = parseClientState(result?.clientStateJson);
|
|
6577
6647
|
const guessResults = clientState?.guessResults ?? [];
|
|
6578
6648
|
const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
|
|
@@ -6583,9 +6653,7 @@ function MysteryTigerGame({
|
|
|
6583
6653
|
const totalGuesses = clientState ? clientState.guessesUsed + clientState.guessesRemaining : MAX_GUESSES;
|
|
6584
6654
|
const score = result?.score ?? 0;
|
|
6585
6655
|
const revealName = isOver ? clientState?.revealedPlayerName : void 0;
|
|
6586
|
-
const
|
|
6587
|
-
(p) => !alreadyGuessedIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
6588
|
-
) : [];
|
|
6656
|
+
const pool = config && !isOver ? config.squadPlayers.filter((p) => !alreadyGuessedIds.has(p.id)) : [];
|
|
6589
6657
|
function handleSelect(playerId) {
|
|
6590
6658
|
if (!config || isOver || submitting) return;
|
|
6591
6659
|
const prevGuesses = guessResults.map((g) => g.playerId);
|
|
@@ -6593,22 +6661,22 @@ function MysteryTigerGame({
|
|
|
6593
6661
|
setQuery("");
|
|
6594
6662
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
6595
6663
|
}
|
|
6596
|
-
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0,
|
|
6664
|
+
const headerRight = !config ? void 0 : isOver ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Chip, { variant: "accent", children: [
|
|
6597
6665
|
score,
|
|
6598
6666
|
" ",
|
|
6599
6667
|
ui.games.unitPts
|
|
6600
|
-
] }) : /* @__PURE__ */ (0,
|
|
6668
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { "data-testid": "mt-chip", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Chip, { children: [
|
|
6601
6669
|
ui.games.guess,
|
|
6602
6670
|
" ",
|
|
6603
|
-
/* @__PURE__ */ (0,
|
|
6671
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-num", children: guessesUsed + 1 }),
|
|
6604
6672
|
" / ",
|
|
6605
6673
|
totalGuesses
|
|
6606
6674
|
] }) });
|
|
6607
6675
|
const segments = Array.from({ length: totalGuesses }, (_, i) => i < guessesUsed ? "done" : i === guessesUsed ? "current" : "todo");
|
|
6608
6676
|
const cols = { gridTemplateColumns: `minmax(0, 1fr) repeat(${keys.length}, 42px)` };
|
|
6609
6677
|
const known = deriveKnownAttributes(guessResults, keys);
|
|
6610
|
-
return /* @__PURE__ */ (0,
|
|
6611
|
-
/* @__PURE__ */ (0,
|
|
6678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-screen ss-g-mt", "data-game": "mystery-tiger", "data-testid": "game-screen-mystery-tiger", children: [
|
|
6679
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6612
6680
|
GameHeader,
|
|
6613
6681
|
{
|
|
6614
6682
|
title: gameTitle({ gameId: "mystery-tiger" }, ui.games.titles),
|
|
@@ -6618,40 +6686,41 @@ function MysteryTigerGame({
|
|
|
6618
6686
|
backLabel: ui.back
|
|
6619
6687
|
}
|
|
6620
6688
|
),
|
|
6621
|
-
!config && /* @__PURE__ */ (0,
|
|
6622
|
-
config && /* @__PURE__ */ (0,
|
|
6623
|
-
/* @__PURE__ */ (0,
|
|
6624
|
-
/* @__PURE__ */ (0,
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
revealName
|
|
6689
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
6690
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6691
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-body", children: [
|
|
6692
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
6693
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
6694
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-portrait", children: [
|
|
6695
|
+
revealName ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PlayerAvatar, { className: "ss-g-mt-photo", name: revealName, imagePath: clientState?.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Silhouette, { size: 150, variant: "mystery" }),
|
|
6696
|
+
revealName && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-reveal-name", children: revealName })
|
|
6628
6697
|
] }),
|
|
6629
|
-
/* @__PURE__ */ (0,
|
|
6630
|
-
/* @__PURE__ */ (0,
|
|
6631
|
-
/* @__PURE__ */ (0,
|
|
6698
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-g-mt-known", style: { gridTemplateColumns: `repeat(${keys.length}, minmax(0, 1fr))` }, children: known.map((k) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-known-cell", children: [
|
|
6699
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-lab", children: t.labels[k.key] }),
|
|
6700
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-known-v", "data-state": k.state, "data-testid": `known-${k.key}`, children: k.text })
|
|
6632
6701
|
] }, k.key)) })
|
|
6633
6702
|
] }),
|
|
6634
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6635
|
-
guessResults.length > 0 && /* @__PURE__ */ (0,
|
|
6636
|
-
/* @__PURE__ */ (0,
|
|
6637
|
-
/* @__PURE__ */ (0,
|
|
6638
|
-
keys.map((k) => /* @__PURE__ */ (0,
|
|
6703
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SegmentProgress, { segments, ariaLabel: t.progress(guessesUsed, totalGuesses) }),
|
|
6704
|
+
guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-table", children: [
|
|
6705
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-thead", style: cols, children: [
|
|
6706
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: t.yourGuesses }),
|
|
6707
|
+
keys.map((k) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: t.labels[k] }, k))
|
|
6639
6708
|
] }),
|
|
6640
6709
|
guessResults.map((gr, i) => {
|
|
6641
6710
|
const name = config.squadPlayers.find((p) => p.id === gr.playerId)?.name ?? `#${gr.playerId}`;
|
|
6642
6711
|
const { first, last } = splitName(name);
|
|
6643
|
-
return /* @__PURE__ */ (0,
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
6646
|
-
/* @__PURE__ */ (0,
|
|
6647
|
-
first && /* @__PURE__ */ (0,
|
|
6648
|
-
/* @__PURE__ */ (0,
|
|
6712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-row", style: cols, children: [
|
|
6713
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-who", children: [
|
|
6714
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PlayerAvatar, { className: "ss-g-mt-av", name }),
|
|
6715
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "ss-g-mt-names", children: [
|
|
6716
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-first", children: first }),
|
|
6717
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-last", children: last })
|
|
6649
6718
|
] })
|
|
6650
6719
|
] }),
|
|
6651
6720
|
keys.map((key) => {
|
|
6652
6721
|
const v = gr[key];
|
|
6653
6722
|
const arrow = directionArrow(v);
|
|
6654
|
-
return /* @__PURE__ */ (0,
|
|
6723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
6655
6724
|
"div",
|
|
6656
6725
|
{
|
|
6657
6726
|
className: "ss-g-mt-cell",
|
|
@@ -6659,8 +6728,8 @@ function MysteryTigerGame({
|
|
|
6659
6728
|
"data-verdict": v.verdict,
|
|
6660
6729
|
"aria-label": `${t.labels[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
6661
6730
|
children: [
|
|
6662
|
-
/* @__PURE__ */ (0,
|
|
6663
|
-
arrow && /* @__PURE__ */ (0,
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-cell-v", "aria-hidden": "true", children: tileFace(key, v) }),
|
|
6732
|
+
arrow && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-mt-cell-dir", "aria-hidden": "true", children: arrow })
|
|
6664
6733
|
]
|
|
6665
6734
|
},
|
|
6666
6735
|
key
|
|
@@ -6669,25 +6738,25 @@ function MysteryTigerGame({
|
|
|
6669
6738
|
] }, gr.playerId);
|
|
6670
6739
|
})
|
|
6671
6740
|
] }),
|
|
6672
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6673
|
-
/* @__PURE__ */ (0,
|
|
6674
|
-
/* @__PURE__ */ (0,
|
|
6741
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-legend", children: [
|
|
6742
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { children: [
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "exact" }),
|
|
6675
6744
|
t.legendMatch
|
|
6676
6745
|
] }),
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6678
|
-
/* @__PURE__ */ (0,
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { children: [
|
|
6747
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("i", { className: "ss-g-mt-sw", "data-verdict": "near" }),
|
|
6679
6748
|
t.legendClose
|
|
6680
6749
|
] }),
|
|
6681
|
-
/* @__PURE__ */ (0,
|
|
6750
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { children: [
|
|
6682
6751
|
"\u25B2 ",
|
|
6683
6752
|
t.legendHigher
|
|
6684
6753
|
] })
|
|
6685
6754
|
] }),
|
|
6686
|
-
clientState?.hintLine && !isOver && /* @__PURE__ */ (0,
|
|
6687
|
-
/* @__PURE__ */ (0,
|
|
6688
|
-
/* @__PURE__ */ (0,
|
|
6755
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-mt-hint", children: [
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IconBulb, {}),
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: clientState.hintLine })
|
|
6689
6758
|
] }),
|
|
6690
|
-
isOver && /* @__PURE__ */ (0,
|
|
6759
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6691
6760
|
ResultCard,
|
|
6692
6761
|
{
|
|
6693
6762
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -6699,39 +6768,26 @@ function MysteryTigerGame({
|
|
|
6699
6768
|
}
|
|
6700
6769
|
)
|
|
6701
6770
|
] }),
|
|
6702
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
),
|
|
6717
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6718
|
-
SearchField,
|
|
6719
|
-
{
|
|
6720
|
-
id: inputId,
|
|
6721
|
-
label: t.searchLabel,
|
|
6722
|
-
placeholder: t.searchPlaceholder,
|
|
6723
|
-
value: query,
|
|
6724
|
-
onChange: setQuery,
|
|
6725
|
-
disabled: submitting
|
|
6726
|
-
}
|
|
6727
|
-
)
|
|
6728
|
-
] })
|
|
6771
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6772
|
+
AnswerTray,
|
|
6773
|
+
{
|
|
6774
|
+
id: inputId,
|
|
6775
|
+
label: t.searchLabel,
|
|
6776
|
+
placeholder: t.searchPlaceholder,
|
|
6777
|
+
optionsLabel: t.optionsLabel,
|
|
6778
|
+
options: pool,
|
|
6779
|
+
query,
|
|
6780
|
+
onQuery: setQuery,
|
|
6781
|
+
onPick: handleSelect,
|
|
6782
|
+
disabled: submitting
|
|
6783
|
+
}
|
|
6784
|
+
) })
|
|
6729
6785
|
] })
|
|
6730
6786
|
] });
|
|
6731
6787
|
}
|
|
6732
6788
|
|
|
6733
6789
|
// src/components/games/HigherOrLowerGame.tsx
|
|
6734
|
-
var
|
|
6790
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6735
6791
|
var POINTS_PER_CORRECT = 10;
|
|
6736
6792
|
function parseClientState2(json) {
|
|
6737
6793
|
if (!json) return null;
|
|
@@ -6743,11 +6799,11 @@ function parseClientState2(json) {
|
|
|
6743
6799
|
}
|
|
6744
6800
|
function PlayerCard({ name, imagePath, highlight, children }) {
|
|
6745
6801
|
const { first, last } = splitName(name);
|
|
6746
|
-
return /* @__PURE__ */ (0,
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
6748
|
-
/* @__PURE__ */ (0,
|
|
6749
|
-
first && /* @__PURE__ */ (0,
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `ss-g-hl-card${highlight ? " ss-g-hl-card--b" : ""}`, children: [
|
|
6803
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-hl-photo-wrap", children: imagePath ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlayerAvatar, { className: "ss-g-hl-photo", name, imagePath }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Silhouette, { size: 150 }) }),
|
|
6804
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-hl-info", children: [
|
|
6805
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-first", children: first }),
|
|
6806
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-surname", children: last }),
|
|
6751
6807
|
children
|
|
6752
6808
|
] })
|
|
6753
6809
|
] });
|
|
@@ -6779,47 +6835,47 @@ function HigherOrLowerGame({
|
|
|
6779
6835
|
const newAnswers = [...prevAnswers, { pairIndex: currentPair.pairIndex, pick }];
|
|
6780
6836
|
onSubmit(JSON.stringify({ answers: newAnswers }));
|
|
6781
6837
|
}
|
|
6782
|
-
return /* @__PURE__ */ (0,
|
|
6783
|
-
/* @__PURE__ */ (0,
|
|
6838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-screen ss-g-hl", "data-game": "higher-or-lower", "data-testid": "game-screen-higher-or-lower", children: [
|
|
6839
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6784
6840
|
GameHeader,
|
|
6785
6841
|
{
|
|
6786
6842
|
title: gameTitle({ gameId: "higher-or-lower" }, ui.games.titles),
|
|
6787
6843
|
eyebrow: t.eyebrow(POINTS_PER_CORRECT),
|
|
6788
|
-
right: config ? /* @__PURE__ */ (0,
|
|
6844
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(StatStack, { value: runLength, label: t.streak }) : void 0,
|
|
6789
6845
|
onBack,
|
|
6790
6846
|
backLabel: ui.back
|
|
6791
6847
|
}
|
|
6792
6848
|
),
|
|
6793
|
-
!config && /* @__PURE__ */ (0,
|
|
6794
|
-
config && /* @__PURE__ */ (0,
|
|
6795
|
-
/* @__PURE__ */ (0,
|
|
6796
|
-
/* @__PURE__ */ (0,
|
|
6797
|
-
/* @__PURE__ */ (0,
|
|
6798
|
-
/* @__PURE__ */ (0,
|
|
6799
|
-
/* @__PURE__ */ (0,
|
|
6849
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
6850
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-body", children: [
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
6853
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
6854
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-prompt-stat", children: config.statLabel }),
|
|
6855
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-prompt-season", children: t.season(config.seasonLabel) })
|
|
6800
6856
|
] }),
|
|
6801
|
-
currentPair && /* @__PURE__ */ (0,
|
|
6802
|
-
/* @__PURE__ */ (0,
|
|
6803
|
-
/* @__PURE__ */ (0,
|
|
6804
|
-
/* @__PURE__ */ (0,
|
|
6857
|
+
currentPair && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-hl-pair", children: [
|
|
6858
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(PlayerCard, { name: currentPair.playerAName, imagePath: currentPair.playerAImagePath, children: [
|
|
6859
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-value", children: currentPair.playerAValue }),
|
|
6860
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-stat", children: config.statLabel })
|
|
6805
6861
|
] }),
|
|
6806
|
-
/* @__PURE__ */ (0,
|
|
6807
|
-
/* @__PURE__ */ (0,
|
|
6808
|
-
/* @__PURE__ */ (0,
|
|
6809
|
-
/* @__PURE__ */ (0,
|
|
6862
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-vs", "aria-hidden": "true", children: t.vs }),
|
|
6863
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlayerCard, { name: currentPair.playerBName, imagePath: currentPair.playerBImagePath, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-hl-btns", children: [
|
|
6864
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(GameButton, { variant: "primary", disabled: submitting, onClick: () => handlePick("higher"), children: [
|
|
6865
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconArrowUp, { size: 16 }),
|
|
6810
6866
|
t.higher
|
|
6811
6867
|
] }),
|
|
6812
|
-
/* @__PURE__ */ (0,
|
|
6813
|
-
/* @__PURE__ */ (0,
|
|
6868
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(GameButton, { variant: "outline", disabled: submitting, onClick: () => handlePick("lower"), children: [
|
|
6869
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconArrowDown, { size: 16 }),
|
|
6814
6870
|
t.lower
|
|
6815
6871
|
] })
|
|
6816
6872
|
] }) })
|
|
6817
6873
|
] }),
|
|
6818
|
-
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0,
|
|
6819
|
-
lastAnswer.wasCorrect ? /* @__PURE__ */ (0,
|
|
6874
|
+
lastAnswer && lastAnswerPair && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("p", { className: "ss-g-hl-feedback", "data-testid": "hol-last", "data-correct": lastAnswer.wasCorrect ? "true" : "false", children: [
|
|
6875
|
+
lastAnswer.wasCorrect ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconClose, {}),
|
|
6820
6876
|
t.lastAnswer(splitName(lastAnswerPair.playerBName).last, lastAnswer.playerBValue)
|
|
6821
6877
|
] }),
|
|
6822
|
-
isOver && /* @__PURE__ */ (0,
|
|
6878
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6823
6879
|
ResultCard,
|
|
6824
6880
|
{
|
|
6825
6881
|
tone: runEndedWrong ? "lose" : allPairsAnswered ? "win" : "neutral",
|
|
@@ -6831,15 +6887,15 @@ function HigherOrLowerGame({
|
|
|
6831
6887
|
}
|
|
6832
6888
|
)
|
|
6833
6889
|
] }),
|
|
6834
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6835
|
-
/* @__PURE__ */ (0,
|
|
6890
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "ss-g-hl-foot", children: [
|
|
6891
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-hl-dots", role: "img", "aria-label": t.answersSoFar(answeredCount, config.pairs.length), children: config.pairs.map((p, i) => {
|
|
6836
6892
|
const a = answeredPairs[i];
|
|
6837
|
-
return /* @__PURE__ */ (0,
|
|
6893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-dot", "data-state": a ? a.wasCorrect ? "correct" : "wrong" : "todo" }, p.pairIndex);
|
|
6838
6894
|
}) }),
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
6840
|
-
/* @__PURE__ */ (0,
|
|
6895
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "ss-g-hl-pts", children: [
|
|
6896
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { "data-testid": "hol-score", children: score }),
|
|
6841
6897
|
" ",
|
|
6842
|
-
/* @__PURE__ */ (0,
|
|
6898
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-hl-pts-unit", children: ui.games.unitPts })
|
|
6843
6899
|
] })
|
|
6844
6900
|
] }) })
|
|
6845
6901
|
] })
|
|
@@ -6847,21 +6903,21 @@ function HigherOrLowerGame({
|
|
|
6847
6903
|
}
|
|
6848
6904
|
|
|
6849
6905
|
// src/components/games/CareerPathGame.tsx
|
|
6850
|
-
var
|
|
6906
|
+
var import_react41 = require("react");
|
|
6851
6907
|
|
|
6852
6908
|
// src/components/games/ui/CrestShield.tsx
|
|
6853
|
-
var
|
|
6854
|
-
var
|
|
6909
|
+
var import_react40 = require("react");
|
|
6910
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6855
6911
|
function CrestShield({ src, name, size = 28 }) {
|
|
6856
|
-
const [failed, setFailed] = (0,
|
|
6912
|
+
const [failed, setFailed] = (0, import_react40.useState)(false);
|
|
6857
6913
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
6858
|
-
return /* @__PURE__ */ (0,
|
|
6914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
6859
6915
|
}
|
|
6860
|
-
return /* @__PURE__ */ (0,
|
|
6916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("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__ */ (0, import_jsx_runtime75.jsx)("path", { d: "M2 3h24v12c0 9-6 14-12 17C8 29 2 24 2 15z", fill: "currentColor" }) });
|
|
6861
6917
|
}
|
|
6862
6918
|
|
|
6863
6919
|
// src/components/games/CareerPathGame.tsx
|
|
6864
|
-
var
|
|
6920
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6865
6921
|
function parseClientState3(json) {
|
|
6866
6922
|
if (!json) return null;
|
|
6867
6923
|
try {
|
|
@@ -6885,23 +6941,21 @@ function CareerPathGame({
|
|
|
6885
6941
|
}) {
|
|
6886
6942
|
const s = ui.games.careerPath;
|
|
6887
6943
|
const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
|
|
6888
|
-
const [query, setQuery] = (0,
|
|
6889
|
-
const inputId = (0,
|
|
6944
|
+
const [query, setQuery] = (0, import_react41.useState)("");
|
|
6945
|
+
const inputId = (0, import_react41.useId)();
|
|
6890
6946
|
const clientState = parseClientState3(result?.clientStateJson);
|
|
6891
6947
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
6892
6948
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
6893
6949
|
if (!config) {
|
|
6894
|
-
return /* @__PURE__ */ (0,
|
|
6895
|
-
/* @__PURE__ */ (0,
|
|
6896
|
-
/* @__PURE__ */ (0,
|
|
6950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
6951
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
6952
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
6897
6953
|
] });
|
|
6898
6954
|
}
|
|
6899
6955
|
const visiblePath = clientState?.visiblePath ?? config.initialPath;
|
|
6900
6956
|
const totalClubs = clientState?.totalClubs ?? config.totalClubs;
|
|
6901
6957
|
const hidden = isOver ? 0 : Math.max(0, totalClubs - visiblePath.length);
|
|
6902
|
-
const
|
|
6903
|
-
(p) => !alreadyGuessedIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
6904
|
-
) : [];
|
|
6958
|
+
const pool = !isOver ? config.typeaheadPool.filter((p) => !alreadyGuessedIds.has(p.id)) : [];
|
|
6905
6959
|
function handleSelect(playerId) {
|
|
6906
6960
|
if (!config || isOver || submitting) return;
|
|
6907
6961
|
const prevGuesses = clientState?.guessResults.map((g) => g.playerId) ?? [];
|
|
@@ -6909,60 +6963,61 @@ function CareerPathGame({
|
|
|
6909
6963
|
setQuery("");
|
|
6910
6964
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
6911
6965
|
}
|
|
6912
|
-
const right = !isOver && clientState ? /* @__PURE__ */ (0,
|
|
6966
|
+
const right = !isOver && clientState ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { "data-testid": "cp-guess-chip", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Chip, { variant: "neutral", children: [
|
|
6913
6967
|
ui.games.guess,
|
|
6914
6968
|
" ",
|
|
6915
|
-
/* @__PURE__ */ (0,
|
|
6969
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-num", children: clientState.guessesUsed + 1 }),
|
|
6916
6970
|
" / ",
|
|
6917
6971
|
clientState.guessesUsed + clientState.guessesRemaining
|
|
6918
6972
|
] }) }) : void 0;
|
|
6919
6973
|
const outcome = clientState?.solved ? s.solved : clientState?.failed ? s.failed : ui.games.done;
|
|
6920
|
-
return /* @__PURE__ */ (0,
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
6924
|
-
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
6974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-screen", "data-game": "career-path", "data-testid": "game-screen-career-path", children: [
|
|
6975
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
|
|
6976
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-body", children: [
|
|
6977
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessesUsed ?? 0, ui }),
|
|
6978
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-cp-card", children: [
|
|
6979
|
+
isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
|
|
6980
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ss-g-cp-card-text", children: [
|
|
6981
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
|
|
6982
|
+
clientState?.hintLine ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-cp-locks", children: [
|
|
6983
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconLock, { size: 11 }), children: s.lockPosition }),
|
|
6984
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Chip, { variant: "lock", icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconLock, { size: 11 }), children: s.lockNationality })
|
|
6930
6985
|
] }) : null
|
|
6931
6986
|
] })
|
|
6932
6987
|
] }),
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
6988
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("ol", { className: "ss-g-cp-line", children: [
|
|
6934
6989
|
visiblePath.map((spell, i) => {
|
|
6935
6990
|
const years = i === 0 ? s.firstClub : spellYears(spell);
|
|
6936
|
-
return /* @__PURE__ */ (0,
|
|
6937
|
-
/* @__PURE__ */ (0,
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
6991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("li", { className: "ss-g-cp-step", children: [
|
|
6992
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
6993
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-tile", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(CrestShield, { src: spell.crestUrl, name: spell.clubName, size: 30 }) }),
|
|
6994
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-conn", "aria-hidden": "true" })
|
|
6940
6995
|
] }),
|
|
6941
|
-
/* @__PURE__ */ (0,
|
|
6942
|
-
/* @__PURE__ */ (0,
|
|
6943
|
-
/* @__PURE__ */ (0,
|
|
6944
|
-
/* @__PURE__ */ (0,
|
|
6945
|
-
spell.isLoan && /* @__PURE__ */ (0,
|
|
6996
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-cp-step-text", children: [
|
|
6997
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
6998
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-cp-sub", children: [
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-years", children: years }),
|
|
7000
|
+
spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
6946
7001
|
years ? " \xB7 " : "",
|
|
6947
|
-
/* @__PURE__ */ (0,
|
|
7002
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
6948
7003
|
] })
|
|
6949
7004
|
] })
|
|
6950
7005
|
] })
|
|
6951
7006
|
] }, `${spell.clubName}-${i}`);
|
|
6952
7007
|
}),
|
|
6953
|
-
hidden > 0 && /* @__PURE__ */ (0,
|
|
6954
|
-
/* @__PURE__ */ (0,
|
|
6955
|
-
/* @__PURE__ */ (0,
|
|
6956
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
7008
|
+
hidden > 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--hidden", children: [
|
|
7009
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "ss-g-cp-rail", children: [
|
|
7010
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--locked", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconLock, { size: 18 }) }),
|
|
7011
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-conn ss-g-cp-conn--faint", "aria-hidden": "true" })
|
|
6957
7012
|
] }),
|
|
6958
|
-
/* @__PURE__ */ (0,
|
|
7013
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-sub", children: s.nextClubHidden }) })
|
|
6959
7014
|
] }),
|
|
6960
|
-
hidden > 1 && /* @__PURE__ */ (0,
|
|
6961
|
-
/* @__PURE__ */ (0,
|
|
6962
|
-
/* @__PURE__ */ (0,
|
|
7015
|
+
hidden > 1 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("li", { className: "ss-g-cp-step ss-g-cp-step--more", children: [
|
|
7016
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-rail", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-tile ss-g-cp-tile--faint", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(IconLock, { size: 18 }) }) }),
|
|
7017
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-step-text", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ss-g-cp-sub", children: s.moreClubs(hidden - 1) }) })
|
|
6963
7018
|
] })
|
|
6964
7019
|
] }),
|
|
6965
|
-
isOver && /* @__PURE__ */ (0,
|
|
7020
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6966
7021
|
ResultCard,
|
|
6967
7022
|
{
|
|
6968
7023
|
tone: clientState?.solved ? "win" : clientState?.failed ? "lose" : "neutral",
|
|
@@ -6974,39 +7029,35 @@ function CareerPathGame({
|
|
|
6974
7029
|
}
|
|
6975
7030
|
)
|
|
6976
7031
|
] }),
|
|
6977
|
-
!isOver && /* @__PURE__ */ (0,
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6993
|
-
SearchField,
|
|
6994
|
-
{
|
|
6995
|
-
id: inputId,
|
|
6996
|
-
label: s.searchLabel,
|
|
6997
|
-
placeholder: s.searchPlaceholder,
|
|
6998
|
-
value: query,
|
|
6999
|
-
onChange: setQuery,
|
|
7000
|
-
disabled: submitting
|
|
7001
|
-
}
|
|
7002
|
-
)
|
|
7003
|
-
] })
|
|
7032
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7033
|
+
AnswerTray,
|
|
7034
|
+
{
|
|
7035
|
+
id: inputId,
|
|
7036
|
+
label: s.searchLabel,
|
|
7037
|
+
placeholder: s.searchPlaceholder,
|
|
7038
|
+
optionsLabel: s.searchLabel,
|
|
7039
|
+
options: pool,
|
|
7040
|
+
query,
|
|
7041
|
+
onQuery: setQuery,
|
|
7042
|
+
onPick: handleSelect,
|
|
7043
|
+
disabled: submitting,
|
|
7044
|
+
minQuery: 1
|
|
7045
|
+
}
|
|
7046
|
+
) })
|
|
7004
7047
|
] });
|
|
7005
7048
|
}
|
|
7006
7049
|
|
|
7007
7050
|
// src/components/games/BeatTheGridGame.tsx
|
|
7008
|
-
var
|
|
7009
|
-
|
|
7051
|
+
var import_react42 = __toESM(require("react"), 1);
|
|
7052
|
+
|
|
7053
|
+
// src/components/games/ui/OptionList.tsx
|
|
7054
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7055
|
+
function OptionList({ label, options, onPick }) {
|
|
7056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-g-opts", role: "listbox", "aria-label": label, children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("button", { type: "button", role: "option", "aria-selected": false, className: "ss-g-opt", onClick: () => onPick(o.key), children: o.content }, o.key)) });
|
|
7057
|
+
}
|
|
7058
|
+
|
|
7059
|
+
// src/components/games/BeatTheGridGame.tsx
|
|
7060
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7010
7061
|
function criterionIconKind(label, key) {
|
|
7011
7062
|
const l = (key ?? label).toLowerCase();
|
|
7012
7063
|
if (l.includes("app")) return "calendar";
|
|
@@ -7024,34 +7075,34 @@ function rowAbbrev(label, map, key) {
|
|
|
7024
7075
|
function CriterionIcon({ kind }) {
|
|
7025
7076
|
switch (kind) {
|
|
7026
7077
|
case "calendar":
|
|
7027
|
-
return /* @__PURE__ */ (0,
|
|
7078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconCalendar, {});
|
|
7028
7079
|
case "ball":
|
|
7029
|
-
return /* @__PURE__ */ (0,
|
|
7080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconBall, {});
|
|
7030
7081
|
case "boot":
|
|
7031
|
-
return /* @__PURE__ */ (0,
|
|
7082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconBoot, {});
|
|
7032
7083
|
case "gloves":
|
|
7033
|
-
return /* @__PURE__ */ (0,
|
|
7084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconGloves, {});
|
|
7034
7085
|
case "shield":
|
|
7035
|
-
return /* @__PURE__ */ (0,
|
|
7086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconShield, {});
|
|
7036
7087
|
default:
|
|
7037
|
-
return /* @__PURE__ */ (0,
|
|
7088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconFlag, {});
|
|
7038
7089
|
}
|
|
7039
7090
|
}
|
|
7040
7091
|
function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
7041
7092
|
if (!meta) {
|
|
7042
|
-
return /* @__PURE__ */ (0,
|
|
7093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7043
7094
|
}
|
|
7044
7095
|
switch (meta.kind) {
|
|
7045
7096
|
case "club":
|
|
7046
|
-
return /* @__PURE__ */ (0,
|
|
7097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
7047
7098
|
case "coach":
|
|
7048
|
-
return /* @__PURE__ */ (0,
|
|
7099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
7049
7100
|
case "country":
|
|
7050
|
-
return /* @__PURE__ */ (0,
|
|
7101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
7051
7102
|
case "position":
|
|
7052
|
-
return /* @__PURE__ */ (0,
|
|
7103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, {});
|
|
7053
7104
|
default:
|
|
7054
|
-
return /* @__PURE__ */ (0,
|
|
7105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
7055
7106
|
}
|
|
7056
7107
|
}
|
|
7057
7108
|
function parseClientState4(json) {
|
|
@@ -7086,21 +7137,21 @@ function SearchSheet({
|
|
|
7086
7137
|
ui
|
|
7087
7138
|
}) {
|
|
7088
7139
|
const s = ui.games.beatTheGrid;
|
|
7089
|
-
const [query, setQuery] = (0,
|
|
7090
|
-
const inputId = (0,
|
|
7091
|
-
const inputRef = (0,
|
|
7092
|
-
(0,
|
|
7140
|
+
const [query, setQuery] = (0, import_react42.useState)("");
|
|
7141
|
+
const inputId = (0, import_react42.useId)();
|
|
7142
|
+
const inputRef = (0, import_react42.useRef)(null);
|
|
7143
|
+
(0, import_react42.useEffect)(() => {
|
|
7093
7144
|
inputRef.current?.focus();
|
|
7094
7145
|
}, [row, col]);
|
|
7095
7146
|
const filtered = playerPool.filter(
|
|
7096
7147
|
(p) => !alreadyFilledIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
|
|
7097
7148
|
);
|
|
7098
|
-
return /* @__PURE__ */ (0,
|
|
7099
|
-
/* @__PURE__ */ (0,
|
|
7100
|
-
/* @__PURE__ */ (0,
|
|
7101
|
-
/* @__PURE__ */ (0,
|
|
7102
|
-
/* @__PURE__ */ (0,
|
|
7103
|
-
/* @__PURE__ */ (0,
|
|
7149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-btg-sheet", "data-testid": "btg-search-sheet", children: [
|
|
7150
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-btg-sheet-hdr", children: [
|
|
7151
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "neutral", children: rowLabel }),
|
|
7152
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-sheet-x", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconClose, { size: 12 }) }),
|
|
7153
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "accent", children: colLabel }),
|
|
7154
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7104
7155
|
"button",
|
|
7105
7156
|
{
|
|
7106
7157
|
type: "button",
|
|
@@ -7108,12 +7159,12 @@ function SearchSheet({
|
|
|
7108
7159
|
"data-testid": "btg-sheet-dismiss",
|
|
7109
7160
|
"aria-label": s.closeSearch,
|
|
7110
7161
|
onClick: onDismiss,
|
|
7111
|
-
children: /* @__PURE__ */ (0,
|
|
7162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconClose, {})
|
|
7112
7163
|
}
|
|
7113
7164
|
)
|
|
7114
7165
|
] }),
|
|
7115
|
-
playerPool.length === 0 ? /* @__PURE__ */ (0,
|
|
7116
|
-
/* @__PURE__ */ (0,
|
|
7166
|
+
playerPool.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7167
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7117
7168
|
SearchField,
|
|
7118
7169
|
{
|
|
7119
7170
|
id: inputId,
|
|
@@ -7125,16 +7176,16 @@ function SearchSheet({
|
|
|
7125
7176
|
inputRef
|
|
7126
7177
|
}
|
|
7127
7178
|
),
|
|
7128
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
7179
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7129
7180
|
OptionList,
|
|
7130
7181
|
{
|
|
7131
7182
|
label: s.searchLabel(rowLabel, colLabel),
|
|
7132
7183
|
options: filtered.map((p) => ({
|
|
7133
7184
|
key: p.id,
|
|
7134
|
-
content: /* @__PURE__ */ (0,
|
|
7135
|
-
/* @__PURE__ */ (0,
|
|
7136
|
-
/* @__PURE__ */ (0,
|
|
7137
|
-
/* @__PURE__ */ (0,
|
|
7185
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7186
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
7187
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
7188
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconPlus, { size: 18 }) })
|
|
7138
7189
|
] })
|
|
7139
7190
|
})),
|
|
7140
7191
|
onPick: (k) => onPick(row, col, Number(k))
|
|
@@ -7154,7 +7205,7 @@ function BeatTheGridGame({
|
|
|
7154
7205
|
}) {
|
|
7155
7206
|
const s = ui.games.beatTheGrid;
|
|
7156
7207
|
const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
|
|
7157
|
-
const [activeCell, setActiveCell] = (0,
|
|
7208
|
+
const [activeCell, setActiveCell] = (0, import_react42.useState)(null);
|
|
7158
7209
|
const clientState = parseClientState4(result?.clientStateJson);
|
|
7159
7210
|
const filledCells = clientState?.cells ?? [];
|
|
7160
7211
|
const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
|
|
@@ -7172,9 +7223,9 @@ function BeatTheGridGame({
|
|
|
7172
7223
|
onSubmit(JSON.stringify({ cells: newCells }));
|
|
7173
7224
|
}
|
|
7174
7225
|
if (!config) {
|
|
7175
|
-
return /* @__PURE__ */ (0,
|
|
7176
|
-
/* @__PURE__ */ (0,
|
|
7177
|
-
/* @__PURE__ */ (0,
|
|
7226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7227
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7228
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7178
7229
|
] });
|
|
7179
7230
|
}
|
|
7180
7231
|
const rows = config.rows;
|
|
@@ -7187,20 +7238,20 @@ function BeatTheGridGame({
|
|
|
7187
7238
|
(_, i) => i < correctCount ? "correct" : i < correctCount + wrongCount ? "wrong" : "todo"
|
|
7188
7239
|
);
|
|
7189
7240
|
const totalScore = clientState?.totalScore ?? result?.score ?? 0;
|
|
7190
|
-
return /* @__PURE__ */ (0,
|
|
7191
|
-
/* @__PURE__ */ (0,
|
|
7192
|
-
/* @__PURE__ */ (0,
|
|
7241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-screen", "data-game": "beat-the-grid", "data-testid": "game-screen-beat-the-grid", children: [
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(GameHeader, { title, eyebrow: s.eyebrow, onBack, backLabel: ui.back }),
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7193
7244
|
SegmentProgress,
|
|
7194
7245
|
{
|
|
7195
7246
|
segments,
|
|
7196
7247
|
ariaLabel: s.progressAria(filledCells.length, total),
|
|
7197
7248
|
leftLabel: s.filled(filledCells.length, total),
|
|
7198
7249
|
rightLabel: s.toGo(Math.max(0, total - filledCells.length)),
|
|
7199
|
-
right: /* @__PURE__ */ (0,
|
|
7250
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Chip, { variant: "accent", children: `${totalScore} ${ui.games.unitPts}` })
|
|
7200
7251
|
}
|
|
7201
7252
|
),
|
|
7202
|
-
/* @__PURE__ */ (0,
|
|
7203
|
-
/* @__PURE__ */ (0,
|
|
7253
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-body", children: [
|
|
7254
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7204
7255
|
"div",
|
|
7205
7256
|
{
|
|
7206
7257
|
className: activeCell !== null ? "ss-g-btg-grid ss-g-btg-grid--fit" : "ss-g-btg-grid",
|
|
@@ -7210,31 +7261,31 @@ function BeatTheGridGame({
|
|
|
7210
7261
|
},
|
|
7211
7262
|
role: "grid",
|
|
7212
7263
|
children: [
|
|
7213
|
-
/* @__PURE__ */ (0,
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-btg-corner" }),
|
|
7214
7265
|
cols.map((col, colIdx) => {
|
|
7215
7266
|
const colMeta = config.colsMeta?.[colIdx];
|
|
7216
|
-
return /* @__PURE__ */ (0,
|
|
7217
|
-
/* @__PURE__ */ (0,
|
|
7218
|
-
/* @__PURE__ */ (0,
|
|
7267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
7268
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(HeaderVisual, { label: col, textKey: config.colsI18n?.[colIdx]?.key, meta: colMeta }),
|
|
7269
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: col })
|
|
7219
7270
|
] }, col);
|
|
7220
7271
|
}),
|
|
7221
7272
|
rows.map((rowLabel, rowIdx) => {
|
|
7222
7273
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
7223
7274
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
7224
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0,
|
|
7225
|
-
/* @__PURE__ */ (0,
|
|
7226
|
-
/* @__PURE__ */ (0,
|
|
7227
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */ (0,
|
|
7228
|
-
/* @__PURE__ */ (0,
|
|
7229
|
-
/* @__PURE__ */ (0,
|
|
7275
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7276
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
7277
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: rowLabel })
|
|
7278
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7279
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
7280
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
7230
7281
|
] });
|
|
7231
|
-
return /* @__PURE__ */ (0,
|
|
7232
|
-
/* @__PURE__ */ (0,
|
|
7282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react42.default.Fragment, { children: [
|
|
7283
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
7233
7284
|
cols.map((colLabel, colIdx) => {
|
|
7234
7285
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
7235
7286
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
7236
7287
|
const state = filled ? filled.isCorrect ? "correct" : "wrong" : isActive ? "active" : "empty";
|
|
7237
|
-
return /* @__PURE__ */ (0,
|
|
7288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7238
7289
|
"button",
|
|
7239
7290
|
{
|
|
7240
7291
|
type: "button",
|
|
@@ -7245,20 +7296,20 @@ function BeatTheGridGame({
|
|
|
7245
7296
|
className: "ss-g-btg-cell",
|
|
7246
7297
|
disabled: isLocked2 || submitting,
|
|
7247
7298
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
7248
|
-
children: filled ? /* @__PURE__ */ (0,
|
|
7249
|
-
/* @__PURE__ */ (0,
|
|
7299
|
+
children: filled ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7300
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7250
7301
|
"span",
|
|
7251
7302
|
{
|
|
7252
7303
|
className: `ss-g-btg-badge ss-g-btg-badge--${filled.isCorrect ? "correct" : "wrong"}`,
|
|
7253
7304
|
role: "img",
|
|
7254
7305
|
"aria-label": filled.isCorrect ? s.correct : s.wrong,
|
|
7255
|
-
children: filled.isCorrect ? /* @__PURE__ */ (0,
|
|
7306
|
+
children: filled.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconCheck, { size: 11 }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconClose, { size: 11 })
|
|
7256
7307
|
}
|
|
7257
7308
|
),
|
|
7258
|
-
/* @__PURE__ */ (0,
|
|
7309
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
7259
7310
|
(() => {
|
|
7260
7311
|
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
7261
|
-
return /* @__PURE__ */ (0,
|
|
7312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7262
7313
|
PlayerAvatar,
|
|
7263
7314
|
{
|
|
7264
7315
|
name: entry?.name ?? "",
|
|
@@ -7267,8 +7318,8 @@ function BeatTheGridGame({
|
|
|
7267
7318
|
}
|
|
7268
7319
|
);
|
|
7269
7320
|
})(),
|
|
7270
|
-
/* @__PURE__ */ (0,
|
|
7271
|
-
] }) : /* @__PURE__ */ (0,
|
|
7321
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
7322
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IconPlus, { size: 22 }) })
|
|
7272
7323
|
},
|
|
7273
7324
|
`cell-${rowIdx}-${colIdx}`
|
|
7274
7325
|
);
|
|
@@ -7278,7 +7329,7 @@ function BeatTheGridGame({
|
|
|
7278
7329
|
]
|
|
7279
7330
|
}
|
|
7280
7331
|
),
|
|
7281
|
-
isLocked2 && /* @__PURE__ */ (0,
|
|
7332
|
+
isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7282
7333
|
ResultCard,
|
|
7283
7334
|
{
|
|
7284
7335
|
tone: "neutral",
|
|
@@ -7290,7 +7341,7 @@ function BeatTheGridGame({
|
|
|
7290
7341
|
}
|
|
7291
7342
|
)
|
|
7292
7343
|
] }),
|
|
7293
|
-
activeCell !== null && /* @__PURE__ */ (0,
|
|
7344
|
+
activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "ss-g-btg-pin", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7294
7345
|
SearchSheet,
|
|
7295
7346
|
{
|
|
7296
7347
|
row: activeCell.row,
|
|
@@ -7309,21 +7360,21 @@ function BeatTheGridGame({
|
|
|
7309
7360
|
}
|
|
7310
7361
|
|
|
7311
7362
|
// src/components/games/GuessTheXiGame.tsx
|
|
7312
|
-
var
|
|
7363
|
+
var import_react43 = require("react");
|
|
7313
7364
|
|
|
7314
7365
|
// src/components/games/ui/PitchSvg.tsx
|
|
7315
|
-
var
|
|
7366
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7316
7367
|
function PitchSvg({ variant }) {
|
|
7317
|
-
return /* @__PURE__ */ (0,
|
|
7318
|
-
/* @__PURE__ */ (0,
|
|
7319
|
-
variant === "full" ? /* @__PURE__ */ (0,
|
|
7320
|
-
/* @__PURE__ */ (0,
|
|
7321
|
-
/* @__PURE__ */ (0,
|
|
7322
|
-
/* @__PURE__ */ (0,
|
|
7323
|
-
/* @__PURE__ */ (0,
|
|
7324
|
-
] }) : /* @__PURE__ */ (0,
|
|
7325
|
-
/* @__PURE__ */ (0,
|
|
7326
|
-
/* @__PURE__ */ (0,
|
|
7368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
7369
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
7370
|
+
variant === "full" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7371
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
7372
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
7374
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
7375
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7376
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
7377
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
7327
7378
|
] })
|
|
7328
7379
|
] });
|
|
7329
7380
|
}
|
|
@@ -7379,7 +7430,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
7379
7430
|
}
|
|
7380
7431
|
|
|
7381
7432
|
// src/components/games/GuessTheXiGame.tsx
|
|
7382
|
-
var
|
|
7433
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7383
7434
|
var MAX_GUESSES2 = 3;
|
|
7384
7435
|
function parseClientState5(json) {
|
|
7385
7436
|
if (!json) return null;
|
|
@@ -7398,8 +7449,8 @@ function GuessTheXiGame({
|
|
|
7398
7449
|
onBack
|
|
7399
7450
|
}) {
|
|
7400
7451
|
const t = ui.games.guessTheXi;
|
|
7401
|
-
const [query, setQuery] = (0,
|
|
7402
|
-
const inputId = (0,
|
|
7452
|
+
const [query, setQuery] = (0, import_react43.useState)("");
|
|
7453
|
+
const inputId = (0, import_react43.useId)();
|
|
7403
7454
|
const clientState = parseClientState5(result?.clientStateJson);
|
|
7404
7455
|
const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
|
|
7405
7456
|
const solved = clientState?.status === "solved";
|
|
@@ -7429,30 +7480,31 @@ function GuessTheXiGame({
|
|
|
7429
7480
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
7430
7481
|
const guessesLeft = Math.max(0, MAX_GUESSES2 - (clientState?.guessesUsed ?? 0));
|
|
7431
7482
|
const teamName = (id) => config?.teamPool.find((tm) => tm.teamId === id)?.teamName ?? `#${id}`;
|
|
7432
|
-
return /* @__PURE__ */ (0,
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-screen ss-g-gxi", "data-game": "guess-the-xi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
7484
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7434
7485
|
GameHeader,
|
|
7435
7486
|
{
|
|
7436
7487
|
title: gameTitle({ gameId: "guess-the-xi" }, ui.games.titles),
|
|
7437
7488
|
eyebrow: config?.poolLabel,
|
|
7438
|
-
right: formation ? /* @__PURE__ */ (0,
|
|
7489
|
+
right: formation ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Chip, { variant: "accent", children: formation }) : void 0,
|
|
7439
7490
|
onBack,
|
|
7440
7491
|
backLabel: ui.back
|
|
7441
7492
|
}
|
|
7442
7493
|
),
|
|
7443
|
-
!config && /* @__PURE__ */ (0,
|
|
7444
|
-
config && /* @__PURE__ */ (0,
|
|
7445
|
-
/* @__PURE__ */ (0,
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
/* @__PURE__ */ (0,
|
|
7494
|
+
!config && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
7495
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
7496
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-body", children: [
|
|
7497
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
7498
|
+
rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
7499
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(PitchSvg, { variant: "full" }),
|
|
7500
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
7449
7501
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
7450
7502
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
7451
7503
|
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
7452
7504
|
const flag = nationalityFlag(pos.nationality);
|
|
7453
7505
|
if (lineupEntry) {
|
|
7454
|
-
return /* @__PURE__ */ (0,
|
|
7455
|
-
/* @__PURE__ */ (0,
|
|
7506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7456
7508
|
PlayerAvatar,
|
|
7457
7509
|
{
|
|
7458
7510
|
name: lineupEntry.name,
|
|
@@ -7460,11 +7512,11 @@ function GuessTheXiGame({
|
|
|
7460
7512
|
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
7461
7513
|
}
|
|
7462
7514
|
),
|
|
7463
|
-
/* @__PURE__ */ (0,
|
|
7515
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
7464
7516
|
] }, `${pos.slot}-${c}`);
|
|
7465
7517
|
}
|
|
7466
|
-
return /* @__PURE__ */ (0,
|
|
7467
|
-
/* @__PURE__ */ (0,
|
|
7518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
7519
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7468
7520
|
"span",
|
|
7469
7521
|
{
|
|
7470
7522
|
className: "ss-g-gxi-disc",
|
|
@@ -7475,22 +7527,22 @@ function GuessTheXiGame({
|
|
|
7475
7527
|
children: flag
|
|
7476
7528
|
}
|
|
7477
7529
|
),
|
|
7478
|
-
name ? /* @__PURE__ */ (0,
|
|
7530
|
+
name ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(name).last }) : posLabel && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-pos", children: posLabel })
|
|
7479
7531
|
] }, `${pos.slot}-${c}`);
|
|
7480
7532
|
}) }, r)) })
|
|
7481
7533
|
] }),
|
|
7482
|
-
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0,
|
|
7483
|
-
/* @__PURE__ */ (0,
|
|
7534
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
|
|
7535
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
7484
7536
|
wrongGuesses.map((g) => {
|
|
7485
7537
|
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
7486
|
-
return /* @__PURE__ */ (0,
|
|
7487
|
-
/* @__PURE__ */ (0,
|
|
7488
|
-
/* @__PURE__ */ (0,
|
|
7538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
7539
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
7540
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("s", { children: teamName(g.teamId) })
|
|
7489
7541
|
] }, g.teamId);
|
|
7490
7542
|
})
|
|
7491
7543
|
] }),
|
|
7492
|
-
isOver && /* @__PURE__ */ (0,
|
|
7493
|
-
/* @__PURE__ */ (0,
|
|
7544
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
7545
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7494
7546
|
ResultCard,
|
|
7495
7547
|
{
|
|
7496
7548
|
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
@@ -7501,29 +7553,29 @@ function GuessTheXiGame({
|
|
|
7501
7553
|
ui
|
|
7502
7554
|
}
|
|
7503
7555
|
),
|
|
7504
|
-
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0,
|
|
7505
|
-
/* @__PURE__ */ (0,
|
|
7506
|
-
/* @__PURE__ */ (0,
|
|
7507
|
-
/* @__PURE__ */ (0,
|
|
7556
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
7557
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
7558
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
7559
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
7508
7560
|
] })
|
|
7509
7561
|
] })
|
|
7510
7562
|
] }),
|
|
7511
|
-
!isOver && /* @__PURE__ */ (0,
|
|
7512
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
7563
|
+
!isOver && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(FooterBar, { children: [
|
|
7564
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7513
7565
|
OptionList,
|
|
7514
7566
|
{
|
|
7515
7567
|
label: t.optionsLabel,
|
|
7516
7568
|
options: filtered.map((tm) => ({
|
|
7517
7569
|
key: tm.teamId,
|
|
7518
|
-
content: /* @__PURE__ */ (0,
|
|
7519
|
-
/* @__PURE__ */ (0,
|
|
7520
|
-
/* @__PURE__ */ (0,
|
|
7570
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
7571
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
7572
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: tm.teamName })
|
|
7521
7573
|
] })
|
|
7522
7574
|
})),
|
|
7523
7575
|
onPick: (k) => handlePick(Number(k))
|
|
7524
7576
|
}
|
|
7525
7577
|
),
|
|
7526
|
-
/* @__PURE__ */ (0,
|
|
7578
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7527
7579
|
SearchField,
|
|
7528
7580
|
{
|
|
7529
7581
|
id: inputId,
|
|
@@ -7540,8 +7592,8 @@ function GuessTheXiGame({
|
|
|
7540
7592
|
}
|
|
7541
7593
|
|
|
7542
7594
|
// src/components/games/DailyQuizGame.tsx
|
|
7543
|
-
var
|
|
7544
|
-
var
|
|
7595
|
+
var import_react44 = require("react");
|
|
7596
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7545
7597
|
function parseClientState6(json) {
|
|
7546
7598
|
if (!json) return null;
|
|
7547
7599
|
try {
|
|
@@ -7562,13 +7614,13 @@ function OptionName({ text }) {
|
|
|
7562
7614
|
const tokens = base.split(/\s+/).filter(Boolean);
|
|
7563
7615
|
const isPlainName = tokens.length >= 1 && tokens.length <= 4 && tokens.every((t) => NAME_TOKEN.test(t));
|
|
7564
7616
|
if (!isPlainName || base === "") {
|
|
7565
|
-
return /* @__PURE__ */ (0,
|
|
7617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-opt-name", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-opt-full", children: text }) });
|
|
7566
7618
|
}
|
|
7567
7619
|
const { first, last } = splitName(base);
|
|
7568
|
-
return /* @__PURE__ */ (0,
|
|
7569
|
-
first && /* @__PURE__ */ (0,
|
|
7570
|
-
/* @__PURE__ */ (0,
|
|
7571
|
-
suffix && /* @__PURE__ */ (0,
|
|
7620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "ss-g-dq-opt-name", children: [
|
|
7621
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-opt-first", children: first }),
|
|
7622
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-opt-last", children: last }),
|
|
7623
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-opt-suffix", children: suffix })
|
|
7572
7624
|
] });
|
|
7573
7625
|
}
|
|
7574
7626
|
function DailyQuizGame({
|
|
@@ -7581,15 +7633,15 @@ function DailyQuizGame({
|
|
|
7581
7633
|
}) {
|
|
7582
7634
|
const s = ui.games.dailyQuiz;
|
|
7583
7635
|
const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
|
|
7584
|
-
const [selections, setSelections] = (0,
|
|
7585
|
-
const [page, setPage] = (0,
|
|
7636
|
+
const [selections, setSelections] = (0, import_react44.useState)(/* @__PURE__ */ new Map());
|
|
7637
|
+
const [page, setPage] = (0, import_react44.useState)(0);
|
|
7586
7638
|
const clientState = parseClientState6(result?.clientStateJson);
|
|
7587
7639
|
const results = clientState?.results ?? [];
|
|
7588
7640
|
const isRevealed = results.length > 0 || result?.alreadyPlayed === true;
|
|
7589
7641
|
if (!config) {
|
|
7590
|
-
return /* @__PURE__ */ (0,
|
|
7591
|
-
/* @__PURE__ */ (0,
|
|
7592
|
-
/* @__PURE__ */ (0,
|
|
7642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
7643
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameHeader, { title, onBack, backLabel: ui.back }),
|
|
7644
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7593
7645
|
] });
|
|
7594
7646
|
}
|
|
7595
7647
|
const questions = config.questions;
|
|
@@ -7624,11 +7676,11 @@ function DailyQuizGame({
|
|
|
7624
7676
|
return r.isCorrect ? "correct" : "wrong";
|
|
7625
7677
|
});
|
|
7626
7678
|
const correctCount = results.filter((r) => r.isCorrect).length;
|
|
7627
|
-
return /* @__PURE__ */ (0,
|
|
7628
|
-
/* @__PURE__ */ (0,
|
|
7629
|
-
/* @__PURE__ */ (0,
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7631
|
-
/* @__PURE__ */ (0,
|
|
7679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
7680
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameHeader, { title, eyebrow: s.results, onBack, backLabel: ui.back }),
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SegmentProgress, { segments: segments2, ariaLabel: s.results }),
|
|
7682
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-body", children: [
|
|
7683
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7632
7684
|
ResultCard,
|
|
7633
7685
|
{
|
|
7634
7686
|
tone: "neutral",
|
|
@@ -7641,15 +7693,15 @@ function DailyQuizGame({
|
|
|
7641
7693
|
questions.map((q) => {
|
|
7642
7694
|
const r = findResult(results, q.index);
|
|
7643
7695
|
const picked = selections.get(q.index);
|
|
7644
|
-
return /* @__PURE__ */ (0,
|
|
7645
|
-
/* @__PURE__ */ (0,
|
|
7646
|
-
r && /* @__PURE__ */ (0,
|
|
7696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-dq-rq", children: [
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-dq-rq-stem", children: q.stem }),
|
|
7698
|
+
r && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-dq-rq-opts", children: q.options.map((opt, optIdx) => {
|
|
7647
7699
|
let cls = "ss-g-dq-rq-opt";
|
|
7648
7700
|
if (optIdx === r.correctOptionIndex) cls += " ss-g-dq-rq-opt--correct";
|
|
7649
7701
|
else if (optIdx === picked && !r.isCorrect) cls += " ss-g-dq-rq-opt--wrong";
|
|
7650
|
-
return /* @__PURE__ */ (0,
|
|
7702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: cls, children: opt }, optIdx);
|
|
7651
7703
|
}) }),
|
|
7652
|
-
r?.revealText && /* @__PURE__ */ (0,
|
|
7704
|
+
r?.revealText && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-dq-why", children: r.revealText })
|
|
7653
7705
|
] }, q.index);
|
|
7654
7706
|
})
|
|
7655
7707
|
] })
|
|
@@ -7657,16 +7709,16 @@ function DailyQuizGame({
|
|
|
7657
7709
|
}
|
|
7658
7710
|
const segments = questions.map((_, i) => i < page ? "done" : i === page ? "current" : "todo");
|
|
7659
7711
|
const selectedIdx = current ? selections.get(current.index) : void 0;
|
|
7660
|
-
return /* @__PURE__ */ (0,
|
|
7661
|
-
/* @__PURE__ */ (0,
|
|
7662
|
-
/* @__PURE__ */ (0,
|
|
7663
|
-
/* @__PURE__ */ (0,
|
|
7664
|
-
/* @__PURE__ */ (0,
|
|
7665
|
-
/* @__PURE__ */ (0,
|
|
7712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
7713
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
7714
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
7715
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-body", children: current && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7716
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
7666
7718
|
const selected = optIdx === selectedIdx;
|
|
7667
7719
|
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
7668
7720
|
const playerName = opt;
|
|
7669
|
-
return /* @__PURE__ */ (0,
|
|
7721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7670
7722
|
"button",
|
|
7671
7723
|
{
|
|
7672
7724
|
type: "button",
|
|
@@ -7675,25 +7727,25 @@ function DailyQuizGame({
|
|
|
7675
7727
|
disabled: submitting,
|
|
7676
7728
|
onClick: () => handleSelect(current.index, optIdx),
|
|
7677
7729
|
children: [
|
|
7678
|
-
current.optionImagePaths && /* @__PURE__ */ (0,
|
|
7679
|
-
/* @__PURE__ */ (0,
|
|
7680
|
-
/* @__PURE__ */ (0,
|
|
7730
|
+
current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
7731
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
7732
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(OptionName, { text: opt })
|
|
7681
7733
|
]
|
|
7682
7734
|
},
|
|
7683
7735
|
optIdx
|
|
7684
7736
|
);
|
|
7685
7737
|
}) })
|
|
7686
7738
|
] }) }),
|
|
7687
|
-
/* @__PURE__ */ (0,
|
|
7688
|
-
page > 0 && /* @__PURE__ */ (0,
|
|
7689
|
-
isLast ? /* @__PURE__ */ (0,
|
|
7739
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-g-dq-nav", children: [
|
|
7740
|
+
page > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameButton, { variant: "outline", onClick: goPrev, disabled: submitting, children: s.previous }),
|
|
7741
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameButton, { variant: "primary", block: true, onClick: handleSubmit, disabled: !currentAnswered || !allAnswered || submitting, children: submitting ? s.submitting : s.submit }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GameButton, { variant: "primary", block: true, onClick: goNext, disabled: !currentAnswered || submitting, children: s.next })
|
|
7690
7742
|
] }) })
|
|
7691
7743
|
] });
|
|
7692
7744
|
}
|
|
7693
7745
|
|
|
7694
7746
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
7695
|
-
var
|
|
7696
|
-
var
|
|
7747
|
+
var import_react45 = require("react");
|
|
7748
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7697
7749
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
7698
7750
|
function parseClientState7(json) {
|
|
7699
7751
|
if (!json) return null;
|
|
@@ -7711,7 +7763,7 @@ function isLocked(kickoffUtc) {
|
|
|
7711
7763
|
}
|
|
7712
7764
|
}
|
|
7713
7765
|
function IconMinus() {
|
|
7714
|
-
return /* @__PURE__ */ (0,
|
|
7766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7715
7767
|
"svg",
|
|
7716
7768
|
{
|
|
7717
7769
|
width: 18,
|
|
@@ -7722,20 +7774,20 @@ function IconMinus() {
|
|
|
7722
7774
|
strokeWidth: 2.2,
|
|
7723
7775
|
strokeLinecap: "round",
|
|
7724
7776
|
"aria-hidden": "true",
|
|
7725
|
-
children: /* @__PURE__ */ (0,
|
|
7777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { d: "M5 12h14" })
|
|
7726
7778
|
}
|
|
7727
7779
|
);
|
|
7728
7780
|
}
|
|
7729
7781
|
function TeamBadge({ team, label }) {
|
|
7730
|
-
return /* @__PURE__ */ (0,
|
|
7731
|
-
/* @__PURE__ */ (0,
|
|
7732
|
-
/* @__PURE__ */ (0,
|
|
7733
|
-
/* @__PURE__ */ (0,
|
|
7782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-mp-team", children: [
|
|
7783
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CrestShield, { name: team.name, size: 44 }),
|
|
7784
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-team-name", children: team.name }),
|
|
7785
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-team-side", children: label })
|
|
7734
7786
|
] });
|
|
7735
7787
|
}
|
|
7736
7788
|
function ScoreCard({ home, away, h, a, t, edit }) {
|
|
7737
|
-
const col = (side, team, value) => /* @__PURE__ */ (0,
|
|
7738
|
-
edit && /* @__PURE__ */ (0,
|
|
7789
|
+
const col = (side, team, value) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-mp-col", children: [
|
|
7790
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7739
7791
|
"button",
|
|
7740
7792
|
{
|
|
7741
7793
|
type: "button",
|
|
@@ -7743,11 +7795,11 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
7743
7795
|
"aria-label": t.goalsUp(team.name),
|
|
7744
7796
|
disabled: edit.disabled,
|
|
7745
7797
|
onClick: () => edit.onStep(side, 1),
|
|
7746
|
-
children: /* @__PURE__ */ (0,
|
|
7798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconPlus, { size: 18 })
|
|
7747
7799
|
}
|
|
7748
7800
|
),
|
|
7749
|
-
/* @__PURE__ */ (0,
|
|
7750
|
-
edit && /* @__PURE__ */ (0,
|
|
7801
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-digit", "data-testid": "mp-digit", "data-active": edit ? String(edit.active === side) : "false", children: value }),
|
|
7802
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7751
7803
|
"button",
|
|
7752
7804
|
{
|
|
7753
7805
|
type: "button",
|
|
@@ -7755,27 +7807,27 @@ function ScoreCard({ home, away, h, a, t, edit }) {
|
|
|
7755
7807
|
"aria-label": t.goalsDown(team.name),
|
|
7756
7808
|
disabled: edit.disabled || value <= 0,
|
|
7757
7809
|
onClick: () => edit.onStep(side, -1),
|
|
7758
|
-
children: /* @__PURE__ */ (0,
|
|
7810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconMinus, {})
|
|
7759
7811
|
}
|
|
7760
7812
|
)
|
|
7761
7813
|
] });
|
|
7762
|
-
return /* @__PURE__ */ (0,
|
|
7763
|
-
/* @__PURE__ */ (0,
|
|
7764
|
-
/* @__PURE__ */ (0,
|
|
7814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-mp-card", children: [
|
|
7815
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TeamBadge, { team: home, label: t.home }),
|
|
7816
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-mp-scores", children: [
|
|
7765
7817
|
col("home", home, h),
|
|
7766
|
-
/* @__PURE__ */ (0,
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-dash", "aria-hidden": "true", children: "\u2013" }),
|
|
7767
7819
|
col("away", away, a)
|
|
7768
7820
|
] }),
|
|
7769
|
-
/* @__PURE__ */ (0,
|
|
7821
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TeamBadge, { team: away, label: t.away })
|
|
7770
7822
|
] });
|
|
7771
7823
|
}
|
|
7772
7824
|
function OutcomeRow({ label, ok, detail, t }) {
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
7774
|
-
/* @__PURE__ */ (0,
|
|
7775
|
-
/* @__PURE__ */ (0,
|
|
7776
|
-
ok ? /* @__PURE__ */ (0,
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
7778
|
-
detail ? /* @__PURE__ */ (0,
|
|
7825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { className: "ss-g-mp-row", "data-testid": "mp-row", "data-ok": String(ok), children: [
|
|
7826
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-row-k", children: label }),
|
|
7827
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "ss-g-mp-row-v", children: [
|
|
7828
|
+
ok ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconClose, { size: 14 }),
|
|
7829
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-sr", children: ok ? t.correct : t.incorrect }),
|
|
7830
|
+
detail ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-row-d", children: detail }) : null
|
|
7779
7831
|
] })
|
|
7780
7832
|
] });
|
|
7781
7833
|
}
|
|
@@ -7788,20 +7840,20 @@ function MatchdayPredictorGame({
|
|
|
7788
7840
|
onBack
|
|
7789
7841
|
}) {
|
|
7790
7842
|
const t = ui.games.predictor;
|
|
7791
|
-
const [homeScore, setHomeScore] = (0,
|
|
7792
|
-
const [awayScore, setAwayScore] = (0,
|
|
7793
|
-
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0,
|
|
7794
|
-
const [lastEdited, setLastEdited] = (0,
|
|
7795
|
-
const [query, setQuery] = (0,
|
|
7796
|
-
const searchId = (0,
|
|
7843
|
+
const [homeScore, setHomeScore] = (0, import_react45.useState)(0);
|
|
7844
|
+
const [awayScore, setAwayScore] = (0, import_react45.useState)(0);
|
|
7845
|
+
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react45.useState)(null);
|
|
7846
|
+
const [lastEdited, setLastEdited] = (0, import_react45.useState)("home");
|
|
7847
|
+
const [query, setQuery] = (0, import_react45.useState)("");
|
|
7848
|
+
const searchId = (0, import_react45.useId)();
|
|
7797
7849
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
7798
7850
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
7799
|
-
const header = /* @__PURE__ */ (0,
|
|
7851
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7800
7852
|
GameHeader,
|
|
7801
7853
|
{
|
|
7802
7854
|
title: gameTitle({ gameId: "matchday-predictor" }, ui.games.titles),
|
|
7803
7855
|
eyebrow: config ? t.eyebrow(config.homeTeam.name, config.awayTeam.name) : void 0,
|
|
7804
|
-
right: config ? /* @__PURE__ */ (0,
|
|
7856
|
+
right: config ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Chip, { icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconLock, {}), children: ui.games.formatDayTime(config.kickoffUtc) }) : void 0,
|
|
7805
7857
|
onBack,
|
|
7806
7858
|
backLabel: ui.back
|
|
7807
7859
|
}
|
|
@@ -7809,10 +7861,10 @@ function MatchdayPredictorGame({
|
|
|
7809
7861
|
if (alreadyPlayed && clientState) {
|
|
7810
7862
|
if (!clientState.graded) {
|
|
7811
7863
|
const scorer = config?.scorerPool.find((p) => p.playerId === clientState.predictedFirstScorerPlayerId) ?? null;
|
|
7812
|
-
return /* @__PURE__ */ (0,
|
|
7864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
7813
7865
|
header,
|
|
7814
|
-
/* @__PURE__ */ (0,
|
|
7815
|
-
config && /* @__PURE__ */ (0,
|
|
7866
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
|
|
7867
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7816
7868
|
ScoreCard,
|
|
7817
7869
|
{
|
|
7818
7870
|
home: config.homeTeam,
|
|
@@ -7822,7 +7874,7 @@ function MatchdayPredictorGame({
|
|
|
7822
7874
|
t
|
|
7823
7875
|
}
|
|
7824
7876
|
),
|
|
7825
|
-
/* @__PURE__ */ (0,
|
|
7877
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7826
7878
|
ResultCard,
|
|
7827
7879
|
{
|
|
7828
7880
|
tone: "neutral",
|
|
@@ -7839,28 +7891,28 @@ function MatchdayPredictorGame({
|
|
|
7839
7891
|
}
|
|
7840
7892
|
)
|
|
7841
7893
|
] }),
|
|
7842
|
-
/* @__PURE__ */ (0,
|
|
7894
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
7843
7895
|
] });
|
|
7844
7896
|
}
|
|
7845
7897
|
const r = clientState.result;
|
|
7846
|
-
return /* @__PURE__ */ (0,
|
|
7898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
7847
7899
|
header,
|
|
7848
|
-
/* @__PURE__ */ (0,
|
|
7849
|
-
config && /* @__PURE__ */ (0,
|
|
7850
|
-
/* @__PURE__ */ (0,
|
|
7851
|
-
/* @__PURE__ */ (0,
|
|
7852
|
-
/* @__PURE__ */ (0,
|
|
7853
|
-
/* @__PURE__ */ (0,
|
|
7854
|
-
!clientState.firstScorerVoid && /* @__PURE__ */ (0,
|
|
7900
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
|
|
7901
|
+
config && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
|
|
7902
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
|
|
7903
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("ul", { className: "ss-g-mp-rows", children: [
|
|
7904
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
7905
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
7906
|
+
!clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
7855
7907
|
] })
|
|
7856
7908
|
] }),
|
|
7857
|
-
/* @__PURE__ */ (0,
|
|
7909
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun }) })
|
|
7858
7910
|
] });
|
|
7859
7911
|
}
|
|
7860
7912
|
if (!config) {
|
|
7861
|
-
return /* @__PURE__ */ (0,
|
|
7913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
7862
7914
|
header,
|
|
7863
|
-
/* @__PURE__ */ (0,
|
|
7915
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
7864
7916
|
] });
|
|
7865
7917
|
}
|
|
7866
7918
|
const locked = isLocked(config.kickoffUtc);
|
|
@@ -7884,10 +7936,10 @@ function MatchdayPredictorGame({
|
|
|
7884
7936
|
const showSearch = pool.length > SCORER_SEARCH_THRESHOLD;
|
|
7885
7937
|
const q = query.trim().toLowerCase();
|
|
7886
7938
|
const visible = showSearch && q ? pool.filter((p) => p.playerName.toLowerCase().includes(q)) : pool;
|
|
7887
|
-
return /* @__PURE__ */ (0,
|
|
7939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
7888
7940
|
header,
|
|
7889
|
-
/* @__PURE__ */ (0,
|
|
7890
|
-
/* @__PURE__ */ (0,
|
|
7941
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-body", children: [
|
|
7942
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7891
7943
|
ScoreCard,
|
|
7892
7944
|
{
|
|
7893
7945
|
home: config.homeTeam,
|
|
@@ -7898,12 +7950,12 @@ function MatchdayPredictorGame({
|
|
|
7898
7950
|
edit: { disabled, active: lastEdited, onStep: step }
|
|
7899
7951
|
}
|
|
7900
7952
|
),
|
|
7901
|
-
pool.length > 0 && /* @__PURE__ */ (0,
|
|
7902
|
-
/* @__PURE__ */ (0,
|
|
7903
|
-
/* @__PURE__ */ (0,
|
|
7904
|
-
/* @__PURE__ */ (0,
|
|
7953
|
+
pool.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("section", { className: "ss-g-mp-scorer", children: [
|
|
7954
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ss-g-mp-sec-head", children: [
|
|
7955
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h3", { children: t.firstScorer }),
|
|
7956
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: t.optional })
|
|
7905
7957
|
] }),
|
|
7906
|
-
showSearch && /* @__PURE__ */ (0,
|
|
7958
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7907
7959
|
SearchField,
|
|
7908
7960
|
{
|
|
7909
7961
|
id: searchId,
|
|
@@ -7915,9 +7967,9 @@ function MatchdayPredictorGame({
|
|
|
7915
7967
|
disabled
|
|
7916
7968
|
}
|
|
7917
7969
|
),
|
|
7918
|
-
/* @__PURE__ */ (0,
|
|
7970
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ss-g-mp-grid", children: visible.map((p) => {
|
|
7919
7971
|
const selected = firstScorerPlayerId === p.playerId;
|
|
7920
|
-
return /* @__PURE__ */ (0,
|
|
7972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
7921
7973
|
"button",
|
|
7922
7974
|
{
|
|
7923
7975
|
type: "button",
|
|
@@ -7927,15 +7979,15 @@ function MatchdayPredictorGame({
|
|
|
7927
7979
|
disabled,
|
|
7928
7980
|
onClick: () => setFirstScorerPlayerId((id) => id === p.playerId ? null : p.playerId),
|
|
7929
7981
|
children: [
|
|
7930
|
-
selected && /* @__PURE__ */ (0,
|
|
7931
|
-
/* @__PURE__ */ (0,
|
|
7932
|
-
/* @__PURE__ */ (0,
|
|
7982
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-pcheck", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconCheck, { size: 12 }) }),
|
|
7983
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Silhouette, { size: 52, variant: selected ? "selected" : "default" }),
|
|
7984
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-pname", children: splitName(p.playerName).last })
|
|
7933
7985
|
]
|
|
7934
7986
|
},
|
|
7935
7987
|
p.playerId
|
|
7936
7988
|
);
|
|
7937
7989
|
}) }),
|
|
7938
|
-
/* @__PURE__ */ (0,
|
|
7990
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
7939
7991
|
"button",
|
|
7940
7992
|
{
|
|
7941
7993
|
type: "button",
|
|
@@ -7944,24 +7996,24 @@ function MatchdayPredictorGame({
|
|
|
7944
7996
|
disabled,
|
|
7945
7997
|
onClick: () => setFirstScorerPlayerId(null),
|
|
7946
7998
|
children: [
|
|
7947
|
-
/* @__PURE__ */ (0,
|
|
7999
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ss-g-mp-radio", "aria-hidden": "true" }),
|
|
7948
8000
|
t.noScorer
|
|
7949
8001
|
]
|
|
7950
8002
|
}
|
|
7951
8003
|
)
|
|
7952
8004
|
] }),
|
|
7953
|
-
locked && /* @__PURE__ */ (0,
|
|
8005
|
+
locked && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "ss-g-mp-closed", children: t.closed })
|
|
7954
8006
|
] }),
|
|
7955
|
-
/* @__PURE__ */ (0,
|
|
7956
|
-
/* @__PURE__ */ (0,
|
|
7957
|
-
/* @__PURE__ */ (0,
|
|
8007
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(FooterBar, { children: [
|
|
8008
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GameButton, { variant: "primary", block: true, disabled, onClick: handleSubmit, children: submitting ? t.saving : t.save }),
|
|
8009
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "ss-g-mp-fun", children: t.forFun })
|
|
7958
8010
|
] })
|
|
7959
8011
|
] });
|
|
7960
8012
|
}
|
|
7961
8013
|
|
|
7962
8014
|
// src/components/games/StartingXiGame.tsx
|
|
7963
|
-
var
|
|
7964
|
-
var
|
|
8015
|
+
var import_react46 = require("react");
|
|
8016
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7965
8017
|
var POINTS_PER_STARTER = 8;
|
|
7966
8018
|
var XI_SIZE = 11;
|
|
7967
8019
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -8004,26 +8056,26 @@ function StartingXiGame({
|
|
|
8004
8056
|
lockAtUtc
|
|
8005
8057
|
}) {
|
|
8006
8058
|
const t = ui.games.startingXi;
|
|
8007
|
-
const [slotPlayers, setSlotPlayers] = (0,
|
|
8008
|
-
const [active, setActive] = (0,
|
|
8009
|
-
const [query, setQuery] = (0,
|
|
8010
|
-
const searchId = (0,
|
|
8059
|
+
const [slotPlayers, setSlotPlayers] = (0, import_react46.useState)(() => Array(XI_SIZE).fill(null));
|
|
8060
|
+
const [active, setActive] = (0, import_react46.useState)(0);
|
|
8061
|
+
const [query, setQuery] = (0, import_react46.useState)("");
|
|
8062
|
+
const searchId = (0, import_react46.useId)();
|
|
8011
8063
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
8012
8064
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
8013
|
-
const header = /* @__PURE__ */ (0,
|
|
8065
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8014
8066
|
GameHeader,
|
|
8015
8067
|
{
|
|
8016
8068
|
title: gameTitle({ gameId: "starting-xi" }, ui.games.titles),
|
|
8017
8069
|
eyebrow: t.eyebrow,
|
|
8018
|
-
right: /* @__PURE__ */ (0,
|
|
8070
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Chip, { variant: "accent", children: t.perStarter(POINTS_PER_STARTER) }),
|
|
8019
8071
|
onBack,
|
|
8020
8072
|
backLabel: ui.back
|
|
8021
8073
|
}
|
|
8022
8074
|
);
|
|
8023
8075
|
function statusScreen(title, score) {
|
|
8024
|
-
return /* @__PURE__ */ (0,
|
|
8076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8025
8077
|
header,
|
|
8026
|
-
/* @__PURE__ */ (0,
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ResultCard, { tone: "neutral", title, score, onBack, ui }) })
|
|
8027
8079
|
] });
|
|
8028
8080
|
}
|
|
8029
8081
|
if (alreadyPlayed) {
|
|
@@ -8032,9 +8084,9 @@ function StartingXiGame({
|
|
|
8032
8084
|
if (clientState.status === "graded") return statusScreen(t.gradedLine(clientState.correctCount), clientState.score);
|
|
8033
8085
|
}
|
|
8034
8086
|
if (!config) {
|
|
8035
|
-
return /* @__PURE__ */ (0,
|
|
8087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8036
8088
|
header,
|
|
8037
|
-
/* @__PURE__ */ (0,
|
|
8089
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8038
8090
|
] });
|
|
8039
8091
|
}
|
|
8040
8092
|
const { formation, slots } = formationSlots(config.formation);
|
|
@@ -8069,27 +8121,27 @@ function StartingXiGame({
|
|
|
8069
8121
|
onSubmit(JSON.stringify({ predictedPlayerIds: slotPlayers }));
|
|
8070
8122
|
}
|
|
8071
8123
|
const segments = slotPlayers.map((p) => p !== null ? "current" : "todo");
|
|
8072
|
-
return /* @__PURE__ */ (0,
|
|
8124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-screen", "data-game": "starting-xi", "data-testid": "game-screen-starting-xi", children: [
|
|
8073
8125
|
header,
|
|
8074
|
-
/* @__PURE__ */ (0,
|
|
8126
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8075
8127
|
SegmentProgress,
|
|
8076
8128
|
{
|
|
8077
8129
|
segments,
|
|
8078
8130
|
ariaLabel: t.picked(pickedCount),
|
|
8079
8131
|
leftLabel: t.picked(pickedCount),
|
|
8080
8132
|
rightLabel: t.toGo(XI_SIZE - pickedCount),
|
|
8081
|
-
right: /* @__PURE__ */ (0,
|
|
8133
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Chip, { children: formation })
|
|
8082
8134
|
}
|
|
8083
8135
|
),
|
|
8084
|
-
/* @__PURE__ */ (0,
|
|
8085
|
-
/* @__PURE__ */ (0,
|
|
8086
|
-
/* @__PURE__ */ (0,
|
|
8136
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-body", children: [
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-xi-pitch", children: [
|
|
8138
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PitchSvg, { variant: "half" }),
|
|
8087
8139
|
slots.map((s) => {
|
|
8088
8140
|
const playerId = slotPlayers[s.index] ?? null;
|
|
8089
8141
|
const player = playerId !== null ? byId.get(playerId) ?? null : null;
|
|
8090
8142
|
const name = player?.playerName ?? "";
|
|
8091
8143
|
const state = player ? "filled" : active === s.index ? "active" : "empty";
|
|
8092
|
-
return /* @__PURE__ */ (0,
|
|
8144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8093
8145
|
"button",
|
|
8094
8146
|
{
|
|
8095
8147
|
type: "button",
|
|
@@ -8101,21 +8153,21 @@ function StartingXiGame({
|
|
|
8101
8153
|
disabled: submitting,
|
|
8102
8154
|
onClick: () => tapSlot(s.index),
|
|
8103
8155
|
children: [
|
|
8104
|
-
/* @__PURE__ */ (0,
|
|
8105
|
-
/* @__PURE__ */ (0,
|
|
8156
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-xi-ring", "aria-hidden": "true", children: player ? player.jerseyNumber ?? "" : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconPlus, { size: 18 }) }),
|
|
8157
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-xi-tag", "aria-hidden": "true", children: player ? splitName(name).last : s.label })
|
|
8106
8158
|
]
|
|
8107
8159
|
},
|
|
8108
8160
|
s.index
|
|
8109
8161
|
);
|
|
8110
8162
|
})
|
|
8111
8163
|
] }),
|
|
8112
|
-
/* @__PURE__ */ (0,
|
|
8113
|
-
/* @__PURE__ */ (0,
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
8115
|
-
/* @__PURE__ */ (0,
|
|
8116
|
-
] }) : /* @__PURE__ */ (0,
|
|
8117
|
-
activeSlot && /* @__PURE__ */ (0,
|
|
8118
|
-
/* @__PURE__ */ (0,
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ss-g-xi-picker", children: [
|
|
8165
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8166
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Chip, { variant: "badge", children: activeSlot.label }),
|
|
8167
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("strong", { children: t.pickFor(activeSlot.label) })
|
|
8168
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("strong", { children: t.allPicked }) }),
|
|
8169
|
+
activeSlot && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8170
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8119
8171
|
SearchField,
|
|
8120
8172
|
{
|
|
8121
8173
|
id: searchId,
|
|
@@ -8127,18 +8179,18 @@ function StartingXiGame({
|
|
|
8127
8179
|
disabled: submitting
|
|
8128
8180
|
}
|
|
8129
8181
|
),
|
|
8130
|
-
/* @__PURE__ */ (0,
|
|
8131
|
-
/* @__PURE__ */ (0,
|
|
8132
|
-
/* @__PURE__ */ (0,
|
|
8133
|
-
/* @__PURE__ */ (0,
|
|
8182
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "ss-g-xi-list", children: available.map((p) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("button", { type: "button", className: "ss-g-xi-opt", disabled: submitting, onClick: () => pick(p.playerId), children: [
|
|
8183
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-xi-opt-no", "aria-hidden": "true", children: p.jerseyNumber ?? "" }),
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-xi-opt-name", children: p.playerName }),
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "ss-g-xi-opt-pos", children: p.positionName })
|
|
8134
8186
|
] }) }, p.playerId)) })
|
|
8135
8187
|
] })
|
|
8136
8188
|
] })
|
|
8137
8189
|
] }),
|
|
8138
|
-
/* @__PURE__ */ (0,
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8140
|
-
/* @__PURE__ */ (0,
|
|
8141
|
-
/* @__PURE__ */ (0,
|
|
8190
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(FooterBar, { children: [
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GameButton, { variant: "primary", block: true, disabled: !canSubmit, onClick: handleSubmit, children: submitting ? t.submitting : t.submit }),
|
|
8192
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("p", { className: "ss-g-xi-lock", children: [
|
|
8193
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconLock, {}),
|
|
8142
8194
|
lockAtUtc ? t.locksAt(ui.games.formatDayTime(lockAtUtc)) : t.locksSoon
|
|
8143
8195
|
] })
|
|
8144
8196
|
] })
|
|
@@ -8146,8 +8198,8 @@ function StartingXiGame({
|
|
|
8146
8198
|
}
|
|
8147
8199
|
|
|
8148
8200
|
// src/components/games/StatLadderGame.tsx
|
|
8149
|
-
var
|
|
8150
|
-
var
|
|
8201
|
+
var import_react47 = require("react");
|
|
8202
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8151
8203
|
function ladderClue(ladder) {
|
|
8152
8204
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
8153
8205
|
if (!mystery) return null;
|
|
@@ -8169,9 +8221,9 @@ function parseClientState9(json) {
|
|
|
8169
8221
|
}
|
|
8170
8222
|
function NameStack({ name }) {
|
|
8171
8223
|
const { first, last } = splitName(name);
|
|
8172
|
-
return /* @__PURE__ */ (0,
|
|
8173
|
-
first && /* @__PURE__ */ (0,
|
|
8174
|
-
/* @__PURE__ */ (0,
|
|
8224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "ss-g-sl-name", children: [
|
|
8225
|
+
first && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("small", { children: `${first[0]}.` }),
|
|
8226
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("b", { children: last })
|
|
8175
8227
|
] });
|
|
8176
8228
|
}
|
|
8177
8229
|
function StatLadderGame({
|
|
@@ -8183,16 +8235,16 @@ function StatLadderGame({
|
|
|
8183
8235
|
onBack
|
|
8184
8236
|
}) {
|
|
8185
8237
|
const t = ui.games.statLadder;
|
|
8186
|
-
const [query, setQuery] = (0,
|
|
8187
|
-
const [selectedId, setSelectedId] = (0,
|
|
8188
|
-
const searchId = (0,
|
|
8238
|
+
const [query, setQuery] = (0, import_react47.useState)("");
|
|
8239
|
+
const [selectedId, setSelectedId] = (0, import_react47.useState)(null);
|
|
8240
|
+
const searchId = (0, import_react47.useId)();
|
|
8189
8241
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
8190
8242
|
const revealed = clientState != null;
|
|
8191
|
-
const header = /* @__PURE__ */ (0,
|
|
8243
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
8192
8244
|
if (!config) {
|
|
8193
|
-
return /* @__PURE__ */ (0,
|
|
8245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8194
8246
|
header,
|
|
8195
|
-
/* @__PURE__ */ (0,
|
|
8247
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8196
8248
|
] });
|
|
8197
8249
|
}
|
|
8198
8250
|
const question = t.question(config.statLabel);
|
|
@@ -8204,44 +8256,45 @@ function StatLadderGame({
|
|
|
8204
8256
|
if (selectedId === null || submitting || revealed) return;
|
|
8205
8257
|
onSubmit(JSON.stringify({ guessedPlayerId: selectedId }));
|
|
8206
8258
|
}
|
|
8207
|
-
return /* @__PURE__ */ (0,
|
|
8259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-screen", "data-game": "stat-ladder", "data-testid": "game-screen-stat-ladder", children: [
|
|
8208
8260
|
header,
|
|
8209
|
-
/* @__PURE__ */ (0,
|
|
8210
|
-
/* @__PURE__ */ (0,
|
|
8211
|
-
|
|
8212
|
-
/* @__PURE__ */ (0,
|
|
8261
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-body", children: [
|
|
8262
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: 0, ui }),
|
|
8263
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-sl-prompt", children: [
|
|
8264
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Chip, { variant: "accent", icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconShield, { size: 14 }), className: "ss-g-sl-stat", children: config.statLabel }),
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("h3", { className: "ss-g-sl-q", children: [
|
|
8213
8266
|
question.pre,
|
|
8214
|
-
/* @__PURE__ */ (0,
|
|
8267
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("em", { children: question.emph }),
|
|
8215
8268
|
question.post
|
|
8216
8269
|
] })
|
|
8217
8270
|
] }),
|
|
8218
|
-
/* @__PURE__ */ (0,
|
|
8219
|
-
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0,
|
|
8271
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ol", { className: "ss-g-sl-rungs", children: rungs.map(
|
|
8272
|
+
(rung) => rung.rank === 2 ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8220
8273
|
"li",
|
|
8221
8274
|
{
|
|
8222
8275
|
className: "ss-g-sl-rung ss-g-sl-rung--mystery",
|
|
8223
8276
|
"data-testid": "sl-mystery-rung",
|
|
8224
8277
|
"data-result": revealed ? clientState.isCorrect ? "correct" : "wrong" : void 0,
|
|
8225
8278
|
children: [
|
|
8226
|
-
/* @__PURE__ */ (0,
|
|
8227
|
-
revealed ? /* @__PURE__ */ (0,
|
|
8228
|
-
revealed ? /* @__PURE__ */ (0,
|
|
8229
|
-
/* @__PURE__ */ (0,
|
|
8279
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-rank", children: "2" }),
|
|
8280
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PlayerAvatar, { name: clientState.revealedRank2.playerName, className: "ss-g-sl-av" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Silhouette, { size: 52, variant: "mystery" }),
|
|
8281
|
+
revealed ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(NameStack, { name: clientState.revealedRank2.playerName }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-who", children: t.whoSecond }),
|
|
8282
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-val ss-g-sl-val--mystery", children: rung.statValue })
|
|
8230
8283
|
]
|
|
8231
8284
|
},
|
|
8232
8285
|
rung.rank
|
|
8233
|
-
) : /* @__PURE__ */ (0,
|
|
8234
|
-
/* @__PURE__ */ (0,
|
|
8235
|
-
/* @__PURE__ */ (0,
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8237
|
-
/* @__PURE__ */ (0,
|
|
8286
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("li", { className: "ss-g-sl-rung", children: [
|
|
8287
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-rank", children: rung.rank }),
|
|
8288
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PlayerAvatar, { name: rung.playerName ?? "?", className: "ss-g-sl-av" }),
|
|
8289
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(NameStack, { name: rung.playerName ?? "?" }),
|
|
8290
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-val", children: rung.statValue })
|
|
8238
8291
|
] }, rung.rank)
|
|
8239
8292
|
) }),
|
|
8240
|
-
clue && /* @__PURE__ */ (0,
|
|
8241
|
-
/* @__PURE__ */ (0,
|
|
8242
|
-
/* @__PURE__ */ (0,
|
|
8293
|
+
clue && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("p", { className: "ss-g-sl-clue", children: [
|
|
8294
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconBulb, {}),
|
|
8295
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: t.clue(clue, config.statLabel) })
|
|
8243
8296
|
] }),
|
|
8244
|
-
!revealed && /* @__PURE__ */ (0,
|
|
8297
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "ss-g-sl-pool", children: pool.map((p) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8245
8298
|
"button",
|
|
8246
8299
|
{
|
|
8247
8300
|
type: "button",
|
|
@@ -8254,13 +8307,13 @@ function StatLadderGame({
|
|
|
8254
8307
|
setQuery(p.playerName);
|
|
8255
8308
|
},
|
|
8256
8309
|
children: [
|
|
8257
|
-
/* @__PURE__ */ (0,
|
|
8258
|
-
/* @__PURE__ */ (0,
|
|
8259
|
-
selectedId === p.playerId && /* @__PURE__ */ (0,
|
|
8310
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PlayerAvatar, { name: p.playerName, className: "ss-g-sl-opt-av" }),
|
|
8311
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "ss-g-sl-opt-name", children: p.playerName }),
|
|
8312
|
+
selectedId === p.playerId && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconCheck, {})
|
|
8260
8313
|
]
|
|
8261
8314
|
}
|
|
8262
8315
|
) }, p.playerId)) }),
|
|
8263
|
-
revealed && /* @__PURE__ */ (0,
|
|
8316
|
+
revealed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8264
8317
|
ResultCard,
|
|
8265
8318
|
{
|
|
8266
8319
|
tone: clientState.isCorrect ? "win" : "lose",
|
|
@@ -8271,8 +8324,8 @@ function StatLadderGame({
|
|
|
8271
8324
|
}
|
|
8272
8325
|
)
|
|
8273
8326
|
] }),
|
|
8274
|
-
!revealed && /* @__PURE__ */ (0,
|
|
8275
|
-
/* @__PURE__ */ (0,
|
|
8327
|
+
!revealed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ss-g-sl-guess", children: [
|
|
8328
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8276
8329
|
SearchField,
|
|
8277
8330
|
{
|
|
8278
8331
|
id: searchId,
|
|
@@ -8287,13 +8340,13 @@ function StatLadderGame({
|
|
|
8287
8340
|
disabled: submitting
|
|
8288
8341
|
}
|
|
8289
8342
|
),
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8343
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GameButton, { variant: "primary", disabled: selectedId === null || submitting, onClick: guess, children: t.guess })
|
|
8291
8344
|
] }) })
|
|
8292
8345
|
] });
|
|
8293
8346
|
}
|
|
8294
8347
|
|
|
8295
8348
|
// src/components/games/FanMotmGame.tsx
|
|
8296
|
-
var
|
|
8349
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
8297
8350
|
function parseClientState10(json) {
|
|
8298
8351
|
if (!json) return null;
|
|
8299
8352
|
try {
|
|
@@ -8314,20 +8367,20 @@ function FanMotmGame({
|
|
|
8314
8367
|
const clientState = parseClientState10(result?.clientStateJson);
|
|
8315
8368
|
const alreadyVoted = result?.alreadyPlayed === true;
|
|
8316
8369
|
const pickedId = clientState?.pickedPlayerId ?? null;
|
|
8317
|
-
const header = /* @__PURE__ */ (0,
|
|
8370
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8318
8371
|
GameHeader,
|
|
8319
8372
|
{
|
|
8320
8373
|
title: t.title,
|
|
8321
8374
|
eyebrow: t.eyebrow,
|
|
8322
|
-
right: alreadyVoted ? /* @__PURE__ */ (0,
|
|
8375
|
+
right: alreadyVoted ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "success", icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconCheck, {}), children: t.voted }) : void 0,
|
|
8323
8376
|
onBack,
|
|
8324
8377
|
backLabel: ui.back
|
|
8325
8378
|
}
|
|
8326
8379
|
);
|
|
8327
8380
|
if (!config) {
|
|
8328
|
-
return /* @__PURE__ */ (0,
|
|
8381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8329
8382
|
header,
|
|
8330
|
-
/* @__PURE__ */ (0,
|
|
8383
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading })
|
|
8331
8384
|
] });
|
|
8332
8385
|
}
|
|
8333
8386
|
const picked = config.candidates.find((c) => c.playerId === pickedId) ?? null;
|
|
@@ -8335,12 +8388,12 @@ function FanMotmGame({
|
|
|
8335
8388
|
if (alreadyVoted || submitting) return;
|
|
8336
8389
|
onSubmit(JSON.stringify({ pickedPlayerId: candidateId }));
|
|
8337
8390
|
}
|
|
8338
|
-
return /* @__PURE__ */ (0,
|
|
8391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-screen", "data-game": "fan-motm", "data-testid": "game-screen-fan-motm", children: [
|
|
8339
8392
|
header,
|
|
8340
|
-
/* @__PURE__ */ (0,
|
|
8341
|
-
/* @__PURE__ */ (0,
|
|
8393
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "ss-g-body", children: [
|
|
8394
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("ul", { className: "ss-g-motm-list", children: config.candidates.map((c) => {
|
|
8342
8395
|
const isVoted = alreadyVoted && pickedId === c.playerId;
|
|
8343
|
-
return /* @__PURE__ */ (0,
|
|
8396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
8344
8397
|
"button",
|
|
8345
8398
|
{
|
|
8346
8399
|
type: "button",
|
|
@@ -8349,24 +8402,24 @@ function FanMotmGame({
|
|
|
8349
8402
|
disabled: alreadyVoted || submitting,
|
|
8350
8403
|
onClick: () => handleVote(c.playerId),
|
|
8351
8404
|
children: [
|
|
8352
|
-
/* @__PURE__ */ (0,
|
|
8353
|
-
/* @__PURE__ */ (0,
|
|
8354
|
-
isVoted && /* @__PURE__ */ (0,
|
|
8405
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PlayerAvatar, { name: c.playerName, className: "ss-g-motm-av" }),
|
|
8406
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-g-motm-name", children: c.playerName }),
|
|
8407
|
+
isVoted && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Chip, { variant: "accent", className: "ss-g-motm-pill", children: t.yourVote })
|
|
8355
8408
|
]
|
|
8356
8409
|
}
|
|
8357
8410
|
) }, c.playerId);
|
|
8358
8411
|
}) }),
|
|
8359
|
-
alreadyVoted && picked && /* @__PURE__ */ (0,
|
|
8412
|
+
alreadyVoted && picked && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ResultCard, { tone: "neutral", title: t.youVoted(picked.playerName), detail: t.thanks, onBack, ui })
|
|
8360
8413
|
] }),
|
|
8361
|
-
/* @__PURE__ */ (0,
|
|
8362
|
-
!alreadyVoted && /* @__PURE__ */ (0,
|
|
8363
|
-
/* @__PURE__ */ (0,
|
|
8414
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(FooterBar, { children: [
|
|
8415
|
+
!alreadyVoted && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-motm-foot", children: t.tapToVote }),
|
|
8416
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "ss-g-motm-fun", children: t.forFun })
|
|
8364
8417
|
] })
|
|
8365
8418
|
] });
|
|
8366
8419
|
}
|
|
8367
8420
|
|
|
8368
8421
|
// src/components/GameScreenHost.tsx
|
|
8369
|
-
var
|
|
8422
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
8370
8423
|
var FIXTURE_GAME_IDS = /* @__PURE__ */ new Set([
|
|
8371
8424
|
"matchday-predictor",
|
|
8372
8425
|
"starting-xi",
|
|
@@ -8390,8 +8443,8 @@ function GameScreenHost({
|
|
|
8390
8443
|
ui
|
|
8391
8444
|
}) {
|
|
8392
8445
|
const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
|
|
8393
|
-
const [configJson, setConfigJson] = (0,
|
|
8394
|
-
(0,
|
|
8446
|
+
const [configJson, setConfigJson] = (0, import_react48.useState)(null);
|
|
8447
|
+
(0, import_react48.useEffect)(() => {
|
|
8395
8448
|
setConfigJson(null);
|
|
8396
8449
|
if (!conversation) return;
|
|
8397
8450
|
let cancelled = false;
|
|
@@ -8414,12 +8467,12 @@ function GameScreenHost({
|
|
|
8414
8467
|
fixtureId: fixtureId || void 0,
|
|
8415
8468
|
locale: ui.games.lang
|
|
8416
8469
|
});
|
|
8417
|
-
(0,
|
|
8470
|
+
(0, import_react48.useEffect)(() => {
|
|
8418
8471
|
if (conversation) hydrate();
|
|
8419
8472
|
}, [conversation, gameId]);
|
|
8420
|
-
const hydrateRef = (0,
|
|
8473
|
+
const hydrateRef = (0, import_react48.useRef)(hydrate);
|
|
8421
8474
|
hydrateRef.current = hydrate;
|
|
8422
|
-
(0,
|
|
8475
|
+
(0, import_react48.useEffect)(() => {
|
|
8423
8476
|
if (!FIXTURE_GAME_IDS.has(gameId)) return;
|
|
8424
8477
|
if (rawStatus !== "pending") return;
|
|
8425
8478
|
const timerId = setInterval(() => {
|
|
@@ -8442,7 +8495,7 @@ function GameScreenHost({
|
|
|
8442
8495
|
function renderScreen() {
|
|
8443
8496
|
switch (gameId) {
|
|
8444
8497
|
case "mystery-tiger":
|
|
8445
|
-
return /* @__PURE__ */ (0,
|
|
8498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8446
8499
|
MysteryTigerGame,
|
|
8447
8500
|
{
|
|
8448
8501
|
...sharedProps,
|
|
@@ -8450,7 +8503,7 @@ function GameScreenHost({
|
|
|
8450
8503
|
}
|
|
8451
8504
|
);
|
|
8452
8505
|
case "higher-or-lower":
|
|
8453
|
-
return /* @__PURE__ */ (0,
|
|
8506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8454
8507
|
HigherOrLowerGame,
|
|
8455
8508
|
{
|
|
8456
8509
|
...sharedProps,
|
|
@@ -8458,7 +8511,7 @@ function GameScreenHost({
|
|
|
8458
8511
|
}
|
|
8459
8512
|
);
|
|
8460
8513
|
case "career-path":
|
|
8461
|
-
return /* @__PURE__ */ (0,
|
|
8514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8462
8515
|
CareerPathGame,
|
|
8463
8516
|
{
|
|
8464
8517
|
...sharedProps,
|
|
@@ -8467,7 +8520,7 @@ function GameScreenHost({
|
|
|
8467
8520
|
);
|
|
8468
8521
|
case "beat-the-grid": {
|
|
8469
8522
|
const btgConfig = safeParseConfig(configJson);
|
|
8470
|
-
return /* @__PURE__ */ (0,
|
|
8523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8471
8524
|
BeatTheGridGame,
|
|
8472
8525
|
{
|
|
8473
8526
|
...sharedProps,
|
|
@@ -8477,7 +8530,7 @@ function GameScreenHost({
|
|
|
8477
8530
|
);
|
|
8478
8531
|
}
|
|
8479
8532
|
case "guess-the-xi":
|
|
8480
|
-
return /* @__PURE__ */ (0,
|
|
8533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8481
8534
|
GuessTheXiGame,
|
|
8482
8535
|
{
|
|
8483
8536
|
...sharedProps,
|
|
@@ -8485,7 +8538,7 @@ function GameScreenHost({
|
|
|
8485
8538
|
}
|
|
8486
8539
|
);
|
|
8487
8540
|
case "daily-quiz":
|
|
8488
|
-
return /* @__PURE__ */ (0,
|
|
8541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8489
8542
|
DailyQuizGame,
|
|
8490
8543
|
{
|
|
8491
8544
|
...sharedProps,
|
|
@@ -8493,7 +8546,7 @@ function GameScreenHost({
|
|
|
8493
8546
|
}
|
|
8494
8547
|
);
|
|
8495
8548
|
case "matchday-predictor":
|
|
8496
|
-
return /* @__PURE__ */ (0,
|
|
8549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8497
8550
|
MatchdayPredictorGame,
|
|
8498
8551
|
{
|
|
8499
8552
|
...sharedProps,
|
|
@@ -8501,7 +8554,7 @@ function GameScreenHost({
|
|
|
8501
8554
|
}
|
|
8502
8555
|
);
|
|
8503
8556
|
case "starting-xi":
|
|
8504
|
-
return /* @__PURE__ */ (0,
|
|
8557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8505
8558
|
StartingXiGame,
|
|
8506
8559
|
{
|
|
8507
8560
|
...sharedProps,
|
|
@@ -8509,7 +8562,7 @@ function GameScreenHost({
|
|
|
8509
8562
|
}
|
|
8510
8563
|
);
|
|
8511
8564
|
case "stat-ladder":
|
|
8512
|
-
return /* @__PURE__ */ (0,
|
|
8565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8513
8566
|
StatLadderGame,
|
|
8514
8567
|
{
|
|
8515
8568
|
...sharedProps,
|
|
@@ -8517,7 +8570,7 @@ function GameScreenHost({
|
|
|
8517
8570
|
}
|
|
8518
8571
|
);
|
|
8519
8572
|
case "fan-motm":
|
|
8520
|
-
return /* @__PURE__ */ (0,
|
|
8573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8521
8574
|
FanMotmGame,
|
|
8522
8575
|
{
|
|
8523
8576
|
...sharedProps,
|
|
@@ -8525,10 +8578,10 @@ function GameScreenHost({
|
|
|
8525
8578
|
}
|
|
8526
8579
|
);
|
|
8527
8580
|
default:
|
|
8528
|
-
return /* @__PURE__ */ (0,
|
|
8581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-g-screen", "data-testid": `game-screen-${gameId}`, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GameHeader, { title: gameTitle({ gameId }, ui.games.titles), onBack, backLabel: ui.back }) });
|
|
8529
8582
|
}
|
|
8530
8583
|
}
|
|
8531
|
-
return /* @__PURE__ */ (0,
|
|
8584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ss-w-gscreen", "data-testid": "gscreen", "data-lock-at": lockAtUtc ?? void 0, children: renderScreen() });
|
|
8532
8585
|
}
|
|
8533
8586
|
|
|
8534
8587
|
// src/components/games/ui/fonts.ts
|
|
@@ -8545,7 +8598,7 @@ function ensureGamesFonts(doc = document) {
|
|
|
8545
8598
|
}
|
|
8546
8599
|
|
|
8547
8600
|
// src/components/GamesPanel.tsx
|
|
8548
|
-
var
|
|
8601
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8549
8602
|
function GamesPanel({
|
|
8550
8603
|
loggedIn,
|
|
8551
8604
|
games,
|
|
@@ -8554,13 +8607,13 @@ function GamesPanel({
|
|
|
8554
8607
|
leaderboard,
|
|
8555
8608
|
refreshHub
|
|
8556
8609
|
}) {
|
|
8557
|
-
const [selected, setSelected] = (0,
|
|
8558
|
-
(0,
|
|
8610
|
+
const [selected, setSelected] = (0, import_react49.useState)(null);
|
|
8611
|
+
(0, import_react49.useEffect)(() => {
|
|
8559
8612
|
ensureGamesFonts();
|
|
8560
8613
|
}, []);
|
|
8561
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
8614
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GamesLoginWall, { ui });
|
|
8562
8615
|
if (selected !== null) {
|
|
8563
|
-
return /* @__PURE__ */ (0,
|
|
8616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-w-gscreen-wrap", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8564
8617
|
GameScreenHost,
|
|
8565
8618
|
{
|
|
8566
8619
|
selected,
|
|
@@ -8574,7 +8627,7 @@ function GamesPanel({
|
|
|
8574
8627
|
}
|
|
8575
8628
|
) });
|
|
8576
8629
|
}
|
|
8577
|
-
return /* @__PURE__ */ (0,
|
|
8630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ss-g-hub-wrap", "data-testid": "games-hub", lang: ui.games.lang, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8578
8631
|
GamesHub,
|
|
8579
8632
|
{
|
|
8580
8633
|
games,
|
|
@@ -8586,10 +8639,10 @@ function GamesPanel({
|
|
|
8586
8639
|
}
|
|
8587
8640
|
|
|
8588
8641
|
// src/components/Leaderboard.tsx
|
|
8589
|
-
var
|
|
8642
|
+
var import_react50 = require("react");
|
|
8590
8643
|
|
|
8591
8644
|
// src/components/LeaderboardRow.tsx
|
|
8592
|
-
var
|
|
8645
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
8593
8646
|
function formatPoints(n) {
|
|
8594
8647
|
return n.toLocaleString("en");
|
|
8595
8648
|
}
|
|
@@ -8598,14 +8651,14 @@ function LeaderboardWeeklyRow({
|
|
|
8598
8651
|
isMe
|
|
8599
8652
|
}) {
|
|
8600
8653
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
8601
|
-
return /* @__PURE__ */ (0,
|
|
8602
|
-
/* @__PURE__ */ (0,
|
|
8654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
8655
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: rankClass, children: [
|
|
8603
8656
|
"#",
|
|
8604
8657
|
row.rank
|
|
8605
8658
|
] }),
|
|
8606
|
-
/* @__PURE__ */ (0,
|
|
8607
|
-
/* @__PURE__ */ (0,
|
|
8608
|
-
row.currentStreak > 0 && /* @__PURE__ */ (0,
|
|
8659
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
8660
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.points) }),
|
|
8661
|
+
row.currentStreak > 0 && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "ss-w-lb2-streak", children: [
|
|
8609
8662
|
"\u{1F525} ",
|
|
8610
8663
|
row.currentStreak
|
|
8611
8664
|
] })
|
|
@@ -8616,18 +8669,18 @@ function LeaderboardAllTimeRow({
|
|
|
8616
8669
|
isMe
|
|
8617
8670
|
}) {
|
|
8618
8671
|
const rankClass = `ss-w-lb2-rank${row.rank <= 3 ? " ss-w-lb2-rank--top3" : ""}`;
|
|
8619
|
-
return /* @__PURE__ */ (0,
|
|
8620
|
-
/* @__PURE__ */ (0,
|
|
8672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `ss-w-lb2-row${isMe ? " ss-w-lb2-row--you" : ""}`, children: [
|
|
8673
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: rankClass, children: [
|
|
8621
8674
|
"#",
|
|
8622
8675
|
row.rank
|
|
8623
8676
|
] }),
|
|
8624
|
-
/* @__PURE__ */ (0,
|
|
8625
|
-
/* @__PURE__ */ (0,
|
|
8677
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-lb2-handle", children: row.handle }),
|
|
8678
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-lb2-points", children: formatPoints(row.allTimePoints) })
|
|
8626
8679
|
] });
|
|
8627
8680
|
}
|
|
8628
8681
|
|
|
8629
8682
|
// src/components/LeaderboardEmpty.tsx
|
|
8630
|
-
var
|
|
8683
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
8631
8684
|
function LeaderboardEmpty({
|
|
8632
8685
|
segment,
|
|
8633
8686
|
lastWeek,
|
|
@@ -8636,48 +8689,48 @@ function LeaderboardEmpty({
|
|
|
8636
8689
|
ui
|
|
8637
8690
|
}) {
|
|
8638
8691
|
if (segment === "alltime") {
|
|
8639
|
-
return /* @__PURE__ */ (0,
|
|
8640
|
-
/* @__PURE__ */ (0,
|
|
8641
|
-
/* @__PURE__ */ (0,
|
|
8692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-lb-empty ss-w-lb-empty--alltime", children: [
|
|
8693
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: "\u{1F4CA}" }),
|
|
8694
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "ss-w-lb-empty-body", children: ui.leaderboardAllTimeEmpty })
|
|
8642
8695
|
] });
|
|
8643
8696
|
}
|
|
8644
8697
|
const fresh = lastWeek != null;
|
|
8645
8698
|
const title = fresh ? ui.leaderboardEmptyFreshTitle : ui.leaderboardEmptyColdTitle;
|
|
8646
8699
|
const body = fresh ? ui.leaderboardEmptyFreshBody : ui.leaderboardEmptyColdBody;
|
|
8647
|
-
return /* @__PURE__ */ (0,
|
|
8648
|
-
weeklyPrize && /* @__PURE__ */ (0,
|
|
8649
|
-
/* @__PURE__ */ (0,
|
|
8650
|
-
/* @__PURE__ */ (0,
|
|
8700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-lb-empty", children: [
|
|
8701
|
+
weeklyPrize && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-prize", children: [
|
|
8702
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-prize-icon", "aria-hidden": "true", children: "\u{1F3C6}" }),
|
|
8703
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-prize-body", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-prize-text", children: weeklyPrize }) })
|
|
8651
8704
|
] }),
|
|
8652
|
-
/* @__PURE__ */ (0,
|
|
8653
|
-
/* @__PURE__ */ (0,
|
|
8654
|
-
/* @__PURE__ */ (0,
|
|
8655
|
-
/* @__PURE__ */ (0,
|
|
8656
|
-
onPlay && /* @__PURE__ */ (0,
|
|
8705
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-lb-empty-hero", children: [
|
|
8706
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "ss-w-lb-empty-icon", "aria-hidden": "true", children: fresh ? "\u{1F3C6}" : "\u{1F3AE}" }),
|
|
8707
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h4", { className: "ss-w-lb-empty-title", children: title }),
|
|
8708
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "ss-w-lb-empty-body", children: body }),
|
|
8709
|
+
onPlay && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("button", { type: "button", className: "ss-w-lb-empty-cta", onClick: onPlay, children: ui.leaderboardEmptyCta })
|
|
8657
8710
|
] }),
|
|
8658
|
-
fresh && lastWeek && /* @__PURE__ */ (0,
|
|
8659
|
-
/* @__PURE__ */ (0,
|
|
8660
|
-
/* @__PURE__ */ (0,
|
|
8661
|
-
/* @__PURE__ */ (0,
|
|
8662
|
-
/* @__PURE__ */ (0,
|
|
8711
|
+
fresh && lastWeek && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "ss-w-lb-last", children: [
|
|
8712
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb-last-label", children: ui.leaderboardLastWeekLabel }),
|
|
8713
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb-last-champ", "aria-hidden": "true", children: "\u{1F947}" }),
|
|
8714
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb-last-handle", children: lastWeek.handle }),
|
|
8715
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "ss-w-lb-last-points", children: formatPoints(lastWeek.points) })
|
|
8663
8716
|
] })
|
|
8664
8717
|
] });
|
|
8665
8718
|
}
|
|
8666
8719
|
|
|
8667
8720
|
// src/components/Leaderboard.tsx
|
|
8668
|
-
var
|
|
8721
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
8669
8722
|
function Leaderboard({
|
|
8670
8723
|
data,
|
|
8671
8724
|
ui,
|
|
8672
8725
|
onPlay
|
|
8673
8726
|
}) {
|
|
8674
|
-
const [segment, setSegment] = (0,
|
|
8727
|
+
const [segment, setSegment] = (0, import_react50.useState)("weekly");
|
|
8675
8728
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
8676
8729
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
8677
8730
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
8678
|
-
return /* @__PURE__ */ (0,
|
|
8679
|
-
/* @__PURE__ */ (0,
|
|
8680
|
-
/* @__PURE__ */ (0,
|
|
8731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb2", children: [
|
|
8732
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-seg", children: [
|
|
8733
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8681
8734
|
"button",
|
|
8682
8735
|
{
|
|
8683
8736
|
type: "button",
|
|
@@ -8687,7 +8740,7 @@ function Leaderboard({
|
|
|
8687
8740
|
children: ui.leaderboardThisWeek
|
|
8688
8741
|
}
|
|
8689
8742
|
),
|
|
8690
|
-
/* @__PURE__ */ (0,
|
|
8743
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8691
8744
|
"button",
|
|
8692
8745
|
{
|
|
8693
8746
|
type: "button",
|
|
@@ -8698,7 +8751,7 @@ function Leaderboard({
|
|
|
8698
8751
|
}
|
|
8699
8752
|
)
|
|
8700
8753
|
] }),
|
|
8701
|
-
isEmpty ? /* @__PURE__ */ (0,
|
|
8754
|
+
isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8702
8755
|
LeaderboardEmpty,
|
|
8703
8756
|
{
|
|
8704
8757
|
segment,
|
|
@@ -8707,15 +8760,15 @@ function Leaderboard({
|
|
|
8707
8760
|
onPlay,
|
|
8708
8761
|
ui
|
|
8709
8762
|
}
|
|
8710
|
-
) : /* @__PURE__ */ (0,
|
|
8711
|
-
/* @__PURE__ */ (0,
|
|
8763
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
8764
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8712
8765
|
LeaderboardWeeklyRow,
|
|
8713
8766
|
{
|
|
8714
8767
|
row,
|
|
8715
8768
|
isMe: row.operatorUserId === data.myWeeklyRow?.operatorUserId
|
|
8716
8769
|
},
|
|
8717
8770
|
row.operatorUserId
|
|
8718
|
-
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0,
|
|
8771
|
+
)) : data.allTimeTop.map((row) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8719
8772
|
LeaderboardAllTimeRow,
|
|
8720
8773
|
{
|
|
8721
8774
|
row,
|
|
@@ -8723,18 +8776,18 @@ function Leaderboard({
|
|
|
8723
8776
|
},
|
|
8724
8777
|
row.operatorUserId
|
|
8725
8778
|
)) }),
|
|
8726
|
-
/* @__PURE__ */ (0,
|
|
8727
|
-
myRow != null && (offBoard ? /* @__PURE__ */ (0,
|
|
8728
|
-
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0,
|
|
8729
|
-
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0,
|
|
8779
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-kitline", children: "\u{1F3BD}" }),
|
|
8780
|
+
myRow != null && (offBoard ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lbgap", children: ui.leaderboardOffBoard }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "ss-w-lb2-rows", children: [
|
|
8781
|
+
segment === "weekly" && data.myWeeklyRow && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(LeaderboardWeeklyRow, { row: data.myWeeklyRow, isMe: true }),
|
|
8782
|
+
segment === "alltime" && data.myAllTimeRow && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(LeaderboardAllTimeRow, { row: data.myAllTimeRow, isMe: true })
|
|
8730
8783
|
] })),
|
|
8731
|
-
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0,
|
|
8784
|
+
segment === "alltime" && data.myAllTimeRow && !offBoard && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lb2-rows", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ss-w-lb2-row", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "ss-w-lb2-handle", children: formatPoints(data.allTimeTop.reduce((s, r) => s + r.allTimePoints, 0)) }) }) })
|
|
8732
8785
|
] })
|
|
8733
8786
|
] });
|
|
8734
8787
|
}
|
|
8735
8788
|
|
|
8736
8789
|
// src/components/LeaderboardPanel.tsx
|
|
8737
|
-
var
|
|
8790
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
8738
8791
|
var EMPTY_PAYLOAD = {
|
|
8739
8792
|
week: "",
|
|
8740
8793
|
weeklyTop: [],
|
|
@@ -8745,19 +8798,19 @@ var EMPTY_PAYLOAD = {
|
|
|
8745
8798
|
lastWeek: null
|
|
8746
8799
|
};
|
|
8747
8800
|
function LeaderboardPanel({ loggedIn, data, loading, onPlay, ui }) {
|
|
8748
|
-
if (!loggedIn) return /* @__PURE__ */ (0,
|
|
8749
|
-
if (data === null && loading) return /* @__PURE__ */ (0,
|
|
8750
|
-
return /* @__PURE__ */ (0,
|
|
8801
|
+
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(GamesLoginWall, { ui });
|
|
8802
|
+
if (data === null && loading) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-mon-list" });
|
|
8803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Leaderboard, { data: data ?? EMPTY_PAYLOAD, ui, onPlay }) });
|
|
8751
8804
|
}
|
|
8752
8805
|
|
|
8753
8806
|
// src/components/PresetSpeedDial.tsx
|
|
8754
|
-
var
|
|
8755
|
-
var
|
|
8807
|
+
var import_react51 = require("react");
|
|
8808
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
8756
8809
|
function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef, buttonRef }) {
|
|
8757
|
-
const pillsId = (0,
|
|
8810
|
+
const pillsId = (0, import_react51.useId)();
|
|
8758
8811
|
const tabIndex = expanded ? 0 : -1;
|
|
8759
|
-
return /* @__PURE__ */ (0,
|
|
8760
|
-
/* @__PURE__ */ (0,
|
|
8812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ref: rootRef, className: "ss-w-dial", children: [
|
|
8813
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
8761
8814
|
"button",
|
|
8762
8815
|
{
|
|
8763
8816
|
ref: buttonRef,
|
|
@@ -8768,36 +8821,36 @@ function PresetSpeedDial({ expanded, showDot, strings, onToggle, onOpen, rootRef
|
|
|
8768
8821
|
"aria-label": strings.dialName,
|
|
8769
8822
|
onClick: onToggle,
|
|
8770
8823
|
children: [
|
|
8771
|
-
/* @__PURE__ */ (0,
|
|
8772
|
-
/* @__PURE__ */ (0,
|
|
8773
|
-
showDot && !expanded ? /* @__PURE__ */ (0,
|
|
8824
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--open", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SlidersIcon, {}) }),
|
|
8825
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-dial-icon ss-w-dial-icon--close", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CloseIcon, {}) }),
|
|
8826
|
+
showDot && !expanded ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-dial-dot", "aria-hidden": "true" }) : null
|
|
8774
8827
|
]
|
|
8775
8828
|
}
|
|
8776
8829
|
),
|
|
8777
|
-
/* @__PURE__ */ (0,
|
|
8778
|
-
/* @__PURE__ */ (0,
|
|
8779
|
-
/* @__PURE__ */ (0,
|
|
8780
|
-
/* @__PURE__ */ (0,
|
|
8830
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { id: pillsId, className: "ss-w-dial-pills", "data-open": expanded ? "" : void 0, children: [
|
|
8831
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("numbers"), children: [
|
|
8832
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SlidersIcon, {}),
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.setNumbers })
|
|
8781
8834
|
] }),
|
|
8782
|
-
/* @__PURE__ */ (0,
|
|
8783
|
-
/* @__PURE__ */ (0,
|
|
8784
|
-
/* @__PURE__ */ (0,
|
|
8835
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("button", { type: "button", className: "ss-w-dial-pill", tabIndex, onClick: () => onOpen("combo"), children: [
|
|
8836
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ComboIcon, {}),
|
|
8837
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "ss-w-dial-pill-label", children: strings.buildCombo })
|
|
8785
8838
|
] })
|
|
8786
8839
|
] })
|
|
8787
8840
|
] });
|
|
8788
8841
|
}
|
|
8789
8842
|
|
|
8790
8843
|
// src/components/PresetTools.tsx
|
|
8791
|
-
var
|
|
8792
|
-
var
|
|
8844
|
+
var import_react52 = require("react");
|
|
8845
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
8793
8846
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
8794
8847
|
function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
8795
|
-
const dialogRef = (0,
|
|
8796
|
-
const titleId = (0,
|
|
8797
|
-
(0,
|
|
8848
|
+
const dialogRef = (0, import_react52.useRef)(null);
|
|
8849
|
+
const titleId = (0, import_react52.useId)();
|
|
8850
|
+
(0, import_react52.useEffect)(() => {
|
|
8798
8851
|
dialogRef.current?.focus();
|
|
8799
8852
|
}, []);
|
|
8800
|
-
(0,
|
|
8853
|
+
(0, import_react52.useEffect)(() => {
|
|
8801
8854
|
const onKey = (e) => {
|
|
8802
8855
|
if (e.key !== "Escape") return;
|
|
8803
8856
|
e.stopPropagation();
|
|
@@ -8827,79 +8880,79 @@ function PresetToolModal({ title, closeLabel, onClose, children, footer }) {
|
|
|
8827
8880
|
first.focus();
|
|
8828
8881
|
}
|
|
8829
8882
|
};
|
|
8830
|
-
return /* @__PURE__ */ (0,
|
|
8831
|
-
/* @__PURE__ */ (0,
|
|
8832
|
-
/* @__PURE__ */ (0,
|
|
8833
|
-
/* @__PURE__ */ (0,
|
|
8883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: trapTab, children: [
|
|
8884
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-tool-head", children: [
|
|
8885
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
8886
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CloseIcon, {}) })
|
|
8834
8887
|
] }),
|
|
8835
|
-
/* @__PURE__ */ (0,
|
|
8836
|
-
footer ? /* @__PURE__ */ (0,
|
|
8888
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-tool-body", children }),
|
|
8889
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
8837
8890
|
] }) });
|
|
8838
8891
|
}
|
|
8839
8892
|
function fillTemplate(template, slots) {
|
|
8840
8893
|
return template.split(/(\{[a-z]+\})/).filter((part) => part !== "").map((part, i) => {
|
|
8841
8894
|
const key = /^\{([a-z]+)\}$/.exec(part)?.[1];
|
|
8842
|
-
return /* @__PURE__ */ (0,
|
|
8895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react52.Fragment, { children: key !== void 0 && key in slots ? slots[key] : part }, i);
|
|
8843
8896
|
});
|
|
8844
8897
|
}
|
|
8845
8898
|
function NumberSelect({ current, choices: choices2, label, notToday, lockEmpty = true, onChoose }) {
|
|
8846
8899
|
const selected = Math.max(0, choices2.findIndex((c) => c.text === current));
|
|
8847
|
-
return /* @__PURE__ */ (0,
|
|
8848
|
-
/* @__PURE__ */ (0,
|
|
8849
|
-
/* @__PURE__ */ (0,
|
|
8900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "ss-w-tool-num", children: [
|
|
8901
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: current }),
|
|
8902
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("select", { className: "ss-w-tool-num-select", "aria-label": label, value: String(selected), onChange: (e) => {
|
|
8850
8903
|
const c = choices2[Number(e.target.value)];
|
|
8851
8904
|
if (c) onChoose(c.value);
|
|
8852
|
-
}, children: choices2.map((c, i) => /* @__PURE__ */ (0,
|
|
8905
|
+
}, children: choices2.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: String(i), disabled: lockEmpty && !c.available && i !== selected, children: c.available ? c.text : `${c.text}${notToday}` }, i)) })
|
|
8853
8906
|
] });
|
|
8854
8907
|
}
|
|
8855
8908
|
function ChoiceSelect({ currentIdx, sizeLabels, optionLabels, label, onChoose }) {
|
|
8856
8909
|
const sizeText = sizeLabels[currentIdx] ?? "";
|
|
8857
|
-
return /* @__PURE__ */ (0,
|
|
8858
|
-
/* @__PURE__ */ (0,
|
|
8859
|
-
/* @__PURE__ */ (0,
|
|
8910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "ss-w-tool-num", children: [
|
|
8911
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-num-size", "aria-hidden": "true", children: sizeText }),
|
|
8912
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("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__ */ (0, import_jsx_runtime93.jsx)("option", { value: String(i), children: opt }, i)) })
|
|
8860
8913
|
] });
|
|
8861
8914
|
}
|
|
8862
8915
|
function SendButton({ label, display, disabled, onClick }) {
|
|
8863
|
-
return /* @__PURE__ */ (0,
|
|
8916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
8864
8917
|
}
|
|
8865
8918
|
function PickList({ picks, formatKickoff }) {
|
|
8866
|
-
return /* @__PURE__ */ (0,
|
|
8867
|
-
/* @__PURE__ */ (0,
|
|
8919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("li", { className: "ss-w-tool-pick", children: [
|
|
8920
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "ss-w-tool-pick-match", children: [
|
|
8868
8921
|
p.homeTeamName,
|
|
8869
8922
|
" \u2013 ",
|
|
8870
8923
|
p.awayTeamName
|
|
8871
8924
|
] }),
|
|
8872
|
-
/* @__PURE__ */ (0,
|
|
8925
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "ss-w-tool-pick-sel", children: [
|
|
8873
8926
|
p.marketLabel,
|
|
8874
8927
|
": ",
|
|
8875
8928
|
p.selectionLabel,
|
|
8876
8929
|
p.line ? ` ${p.line}` : ""
|
|
8877
8930
|
] }),
|
|
8878
|
-
/* @__PURE__ */ (0,
|
|
8879
|
-
/* @__PURE__ */ (0,
|
|
8931
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
8932
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-pick-price", children: p.price.toFixed(2) })
|
|
8880
8933
|
] }, p.matchOddsId)) });
|
|
8881
8934
|
}
|
|
8882
8935
|
function ComboPreview({ cell, formatKickoff }) {
|
|
8883
|
-
return /* @__PURE__ */ (0,
|
|
8884
|
-
/* @__PURE__ */ (0,
|
|
8885
|
-
/* @__PURE__ */ (0,
|
|
8936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
8937
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PickList, { picks: cell.combo.legs, formatKickoff }),
|
|
8938
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-tool-math", children: cell.combo.multiplication })
|
|
8886
8939
|
] });
|
|
8887
8940
|
}
|
|
8888
8941
|
function Unavailable({ text }) {
|
|
8889
|
-
return /* @__PURE__ */ (0,
|
|
8942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "ss-w-tool-unavailable", children: text });
|
|
8890
8943
|
}
|
|
8891
8944
|
function AskRow({ icon, ask, ready, send }) {
|
|
8892
|
-
return /* @__PURE__ */ (0,
|
|
8893
|
-
/* @__PURE__ */ (0,
|
|
8894
|
-
/* @__PURE__ */ (0,
|
|
8895
|
-
/* @__PURE__ */ (0,
|
|
8896
|
-
ready ? /* @__PURE__ */ (0,
|
|
8945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("section", { className: "ss-w-tool-row ss-w-tool-row--ask", children: [
|
|
8946
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-icon", "aria-hidden": "true", children: icon }),
|
|
8947
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-tool-main", children: [
|
|
8948
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "ss-w-tool-ask", children: ask }),
|
|
8949
|
+
ready ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-ready", children: ready }) : null
|
|
8897
8950
|
] }),
|
|
8898
8951
|
send
|
|
8899
8952
|
] });
|
|
8900
8953
|
}
|
|
8901
8954
|
function RoundSend({ label, display, disabled, onClick }) {
|
|
8902
|
-
return /* @__PURE__ */ (0,
|
|
8955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { type: "button", className: "ss-w-tool-go", "aria-label": `${label}: ${display}`, disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SendIcon, {}) });
|
|
8903
8956
|
}
|
|
8904
8957
|
var BIG_COMBO = { total: 50, legs: 6 };
|
|
8905
8958
|
function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
@@ -8908,15 +8961,15 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
8908
8961
|
const totals = comboTotals(grid);
|
|
8909
8962
|
const legChoices = comboLegChoices(grid);
|
|
8910
8963
|
const count = FIXED_SINGLES_COUNT;
|
|
8911
|
-
const [maxPrice, setMaxPrice] = (0,
|
|
8912
|
-
const [minPrice, setMinPrice] = (0,
|
|
8913
|
-
const [start] = (0,
|
|
8914
|
-
const [total, setTotal] = (0,
|
|
8915
|
-
const [legs, setLegs] = (0,
|
|
8916
|
-
const [bigStart] = (0,
|
|
8917
|
-
const [bigTotal, setBigTotal] = (0,
|
|
8918
|
-
const [bigLegs, setBigLegs] = (0,
|
|
8919
|
-
const [announcement, setAnnouncement] = (0,
|
|
8964
|
+
const [maxPrice, setMaxPrice] = (0, import_react52.useState)(() => startSingles(grid.singles, limits, START.maxPrice, count));
|
|
8965
|
+
const [minPrice, setMinPrice] = (0, import_react52.useState)(() => startSingles(grid.singlesFrom, floors, START.minPrice, count));
|
|
8966
|
+
const [start] = (0, import_react52.useState)(() => startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs));
|
|
8967
|
+
const [total, setTotal] = (0, import_react52.useState)(start.total);
|
|
8968
|
+
const [legs, setLegs] = (0, import_react52.useState)(start.legs);
|
|
8969
|
+
const [bigStart] = (0, import_react52.useState)(() => startCombo(grid, totals, legChoices, BIG_COMBO.total, BIG_COMBO.legs));
|
|
8970
|
+
const [bigTotal, setBigTotal] = (0, import_react52.useState)(bigStart.total);
|
|
8971
|
+
const [bigLegs, setBigLegs] = (0, import_react52.useState)(bigStart.legs);
|
|
8972
|
+
const [announcement, setAnnouncement] = (0, import_react52.useState)("");
|
|
8920
8973
|
const maxCell = findSingles(grid.singles, maxPrice, count);
|
|
8921
8974
|
const minCell = findSingles(grid.singlesFrom, minPrice, count);
|
|
8922
8975
|
const comboCell = findCombo(grid, total, legs);
|
|
@@ -8960,95 +9013,95 @@ function SetNumbersTool({ grid, strings, streaming, onSend, onClose }) {
|
|
|
8960
9013
|
const totalChoices = totals.map((v) => ({ value: v, text: v.toFixed(1), available: legChoices.some((n) => !!findCombo(grid, v, n)) }));
|
|
8961
9014
|
const legChoicesFor = (t) => legChoices.map((n) => ({ value: n, text: String(n), available: !!findCombo(grid, t, n) }));
|
|
8962
9015
|
const markets = grid.markets ?? [];
|
|
8963
|
-
const [marketIdx, setMarketIdx] = (0,
|
|
9016
|
+
const [marketIdx, setMarketIdx] = (0, import_react52.useState)(0);
|
|
8964
9017
|
const marketCell = markets[marketIdx] ?? null;
|
|
8965
9018
|
const marketLabels = markets.map((c) => strings.marketShort(c.marketDeveloperName, c.marketLabel, c.selectionLabel ?? null));
|
|
8966
9019
|
const singlesReady = (cell) => cell ? strings.readyCount(cell.picks.length) : strings.unavailable;
|
|
8967
9020
|
const comboReady = (cell) => cell ? strings.readyAt(cell.combo.total) : strings.unavailable;
|
|
8968
|
-
return /* @__PURE__ */ (0,
|
|
8969
|
-
/* @__PURE__ */ (0,
|
|
9021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(PresetToolModal, { title: strings.setNumbers, closeLabel: strings.close, onClose, children: [
|
|
9022
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8970
9023
|
AskRow,
|
|
8971
9024
|
{
|
|
8972
9025
|
icon: "\u{1F3AF}",
|
|
8973
9026
|
ask: fillTemplate(strings.maxPriceRow, {
|
|
8974
9027
|
count: String(count),
|
|
8975
|
-
price: /* @__PURE__ */ (0,
|
|
9028
|
+
price: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: maxPrice.toFixed(2), choices: maxChoices, label: strings.maxPriceName, notToday: strings.notToday, onChoose: chooseMax })
|
|
8976
9029
|
}),
|
|
8977
9030
|
ready: singlesReady(maxCell),
|
|
8978
|
-
send: /* @__PURE__ */ (0,
|
|
9031
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RoundSend, { label: strings.send, display: strings.maxPriceDisplay(count, maxPrice), disabled: !maxCell || streaming, onClick: () => {
|
|
8979
9032
|
if (maxCell) onSend(maxPriceAsk(maxCell, strings));
|
|
8980
9033
|
} })
|
|
8981
9034
|
}
|
|
8982
9035
|
),
|
|
8983
|
-
/* @__PURE__ */ (0,
|
|
9036
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8984
9037
|
AskRow,
|
|
8985
9038
|
{
|
|
8986
9039
|
icon: "\u{1F4C8}",
|
|
8987
9040
|
ask: fillTemplate(strings.minPriceRow, {
|
|
8988
9041
|
count: String(count),
|
|
8989
|
-
price: /* @__PURE__ */ (0,
|
|
9042
|
+
price: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: minPrice.toFixed(2), choices: minChoices, label: strings.minPriceName, notToday: strings.notToday, onChoose: chooseMin })
|
|
8990
9043
|
}),
|
|
8991
9044
|
ready: singlesReady(minCell),
|
|
8992
|
-
send: /* @__PURE__ */ (0,
|
|
9045
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RoundSend, { label: strings.send, display: strings.minPriceDisplay(count, minPrice), disabled: !minCell || streaming, onClick: () => {
|
|
8993
9046
|
if (minCell) onSend(minPriceAsk(minCell, strings));
|
|
8994
9047
|
} })
|
|
8995
9048
|
}
|
|
8996
9049
|
),
|
|
8997
|
-
/* @__PURE__ */ (0,
|
|
9050
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8998
9051
|
AskRow,
|
|
8999
9052
|
{
|
|
9000
9053
|
icon: "\u2728",
|
|
9001
9054
|
ask: fillTemplate(strings.comboRow, {
|
|
9002
|
-
legs: /* @__PURE__ */ (0,
|
|
9003
|
-
total: /* @__PURE__ */ (0,
|
|
9055
|
+
legs: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: String(legs), choices: legChoicesFor(total), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseLegs }),
|
|
9056
|
+
total: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: total.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseTotal })
|
|
9004
9057
|
}),
|
|
9005
9058
|
ready: comboReady(comboCell),
|
|
9006
|
-
send: /* @__PURE__ */ (0,
|
|
9059
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(legs, total), disabled: !comboCell || streaming, onClick: () => {
|
|
9007
9060
|
if (comboCell) onSend(comboAsk(comboCell, strings));
|
|
9008
9061
|
} })
|
|
9009
9062
|
}
|
|
9010
9063
|
),
|
|
9011
|
-
/* @__PURE__ */ (0,
|
|
9064
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9012
9065
|
AskRow,
|
|
9013
9066
|
{
|
|
9014
9067
|
icon: "\u{1F3C6}",
|
|
9015
9068
|
ask: fillTemplate(strings.bigComboRow, {
|
|
9016
|
-
legs: /* @__PURE__ */ (0,
|
|
9017
|
-
total: /* @__PURE__ */ (0,
|
|
9069
|
+
legs: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: String(bigLegs), choices: legChoicesFor(bigTotal), label: strings.matchesLabel, notToday: strings.notToday, lockEmpty: false, onChoose: chooseBigLegs }),
|
|
9070
|
+
total: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberSelect, { current: bigTotal.toFixed(1), choices: totalChoices, label: strings.totalLabel, notToday: strings.notToday, onChoose: chooseBigTotal })
|
|
9018
9071
|
}),
|
|
9019
9072
|
ready: comboReady(bigCell),
|
|
9020
|
-
send: /* @__PURE__ */ (0,
|
|
9073
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RoundSend, { label: strings.send, display: strings.comboDisplay(bigLegs, bigTotal), disabled: !bigCell || streaming, onClick: () => {
|
|
9021
9074
|
if (bigCell) onSend(comboAsk(bigCell, strings));
|
|
9022
9075
|
} })
|
|
9023
9076
|
}
|
|
9024
9077
|
),
|
|
9025
|
-
markets.length > 0 && /* @__PURE__ */ (0,
|
|
9078
|
+
markets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9026
9079
|
AskRow,
|
|
9027
9080
|
{
|
|
9028
9081
|
icon: "\u26BD",
|
|
9029
9082
|
ask: fillTemplate(strings.marketRow, {
|
|
9030
|
-
market: /* @__PURE__ */ (0,
|
|
9083
|
+
market: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ChoiceSelect, { currentIdx: marketIdx, sizeLabels: marketLabels, optionLabels: marketLabels, label: strings.marketName, onChoose: chooseMarket })
|
|
9031
9084
|
}),
|
|
9032
9085
|
ready: marketCell ? strings.readyCount(marketCell.count) : null,
|
|
9033
|
-
send: /* @__PURE__ */ (0,
|
|
9086
|
+
send: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RoundSend, { label: strings.send, display: marketCell ? marketDisplay(marketCell, strings) : "", disabled: !marketCell || streaming, onClick: () => {
|
|
9034
9087
|
if (marketCell) onSend(marketAsk(marketCell, strings));
|
|
9035
9088
|
} })
|
|
9036
9089
|
}
|
|
9037
9090
|
),
|
|
9038
|
-
/* @__PURE__ */ (0,
|
|
9091
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9039
9092
|
] });
|
|
9040
9093
|
}
|
|
9041
9094
|
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
9042
9095
|
const totals = comboTotals(grid);
|
|
9043
9096
|
const legChoices = comboLegChoices(grid);
|
|
9044
|
-
const [start] = (0,
|
|
9045
|
-
const [total, setTotal] = (0,
|
|
9046
|
-
const [legs, setLegs] = (0,
|
|
9097
|
+
const [start] = (0, import_react52.useState)(() => initialTotal === void 0 ? startCombo(grid, totals, legChoices, START.comboTotal, START.comboLegs) : null);
|
|
9098
|
+
const [total, setTotal] = (0, import_react52.useState)(() => initialTotal !== void 0 ? nearest(totals, initialTotal) : start.total);
|
|
9099
|
+
const [legs, setLegs] = (0, import_react52.useState)(() => {
|
|
9047
9100
|
if (initialTotal === void 0) return initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : start.legs;
|
|
9048
9101
|
const from = initialLegs !== void 0 ? clampLegs(legChoices, initialLegs) : startValue(legChoices, START.comboLegs);
|
|
9049
9102
|
return legsForTotal(grid, nearest(totals, initialTotal), from);
|
|
9050
9103
|
});
|
|
9051
|
-
const [announcement, setAnnouncement] = (0,
|
|
9104
|
+
const [announcement, setAnnouncement] = (0, import_react52.useState)("");
|
|
9052
9105
|
const cell = findCombo(grid, total, legs);
|
|
9053
9106
|
const minLegs = legChoices[0] ?? legs;
|
|
9054
9107
|
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
@@ -9059,29 +9112,29 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
9059
9112
|
const d = strings.comboDisplay(nextLegs, nextTotal);
|
|
9060
9113
|
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
9061
9114
|
};
|
|
9062
|
-
const footer = /* @__PURE__ */ (0,
|
|
9115
|
+
const footer = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SendButton, { label: strings.send, display, disabled: !cell || streaming, onClick: () => {
|
|
9063
9116
|
if (cell) onSend(comboAsk(cell, strings));
|
|
9064
9117
|
} });
|
|
9065
|
-
return /* @__PURE__ */ (0,
|
|
9066
|
-
/* @__PURE__ */ (0,
|
|
9067
|
-
/* @__PURE__ */ (0,
|
|
9068
|
-
/* @__PURE__ */ (0,
|
|
9118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
9119
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
9120
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
9121
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "ss-w-tool-chips", children: totals.map((t) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("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)) })
|
|
9069
9122
|
] }),
|
|
9070
|
-
/* @__PURE__ */ (0,
|
|
9071
|
-
/* @__PURE__ */ (0,
|
|
9072
|
-
/* @__PURE__ */ (0,
|
|
9073
|
-
/* @__PURE__ */ (0,
|
|
9074
|
-
/* @__PURE__ */ (0,
|
|
9075
|
-
/* @__PURE__ */ (0,
|
|
9123
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
9124
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
9125
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "ss-w-tool-stepper", children: [
|
|
9126
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
9127
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "ss-w-tool-count", children: legs }),
|
|
9128
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
9076
9129
|
] })
|
|
9077
9130
|
] }),
|
|
9078
|
-
cell ? /* @__PURE__ */ (0,
|
|
9079
|
-
/* @__PURE__ */ (0,
|
|
9131
|
+
cell ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ComboPreview, { cell, formatKickoff }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Unavailable, { text: strings.unavailable }),
|
|
9132
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
9080
9133
|
] });
|
|
9081
9134
|
}
|
|
9082
9135
|
|
|
9083
9136
|
// src/usePresetDial.ts
|
|
9084
|
-
var
|
|
9137
|
+
var import_react53 = require("react");
|
|
9085
9138
|
function sendInFlight(messages, isStreaming) {
|
|
9086
9139
|
const last = messages[messages.length - 1];
|
|
9087
9140
|
return isStreaming && !!last && last.role === "assistant" && !last.done && !last.isGreeting;
|
|
@@ -9095,25 +9148,25 @@ function lastUserId(messages) {
|
|
|
9095
9148
|
}
|
|
9096
9149
|
var SCROLL_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]);
|
|
9097
9150
|
function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming, activeTab }) {
|
|
9098
|
-
const [expanded, setExpanded] = (0,
|
|
9099
|
-
const fold = (0,
|
|
9100
|
-
const toggle = (0,
|
|
9151
|
+
const [expanded, setExpanded] = (0, import_react53.useState)(() => !sendInFlight(messages, isStreaming));
|
|
9152
|
+
const fold = (0, import_react53.useCallback)(() => setExpanded(false), []);
|
|
9153
|
+
const toggle = (0, import_react53.useCallback)(() => setExpanded((e) => !e), []);
|
|
9101
9154
|
const currentUserId = lastUserId(messages);
|
|
9102
|
-
const userIdRef = (0,
|
|
9103
|
-
(0,
|
|
9155
|
+
const userIdRef = (0, import_react53.useRef)(currentUserId);
|
|
9156
|
+
(0, import_react53.useEffect)(() => {
|
|
9104
9157
|
if (currentUserId === userIdRef.current) return;
|
|
9105
9158
|
userIdRef.current = currentUserId;
|
|
9106
9159
|
setExpanded(false);
|
|
9107
9160
|
}, [currentUserId]);
|
|
9108
|
-
const tabRef = (0,
|
|
9109
|
-
(0,
|
|
9161
|
+
const tabRef = (0, import_react53.useRef)(activeTab);
|
|
9162
|
+
(0, import_react53.useEffect)(() => {
|
|
9110
9163
|
if (activeTab === tabRef.current) return;
|
|
9111
9164
|
tabRef.current = activeTab;
|
|
9112
9165
|
setExpanded(false);
|
|
9113
9166
|
}, [activeTab]);
|
|
9114
|
-
const expandedRef = (0,
|
|
9167
|
+
const expandedRef = (0, import_react53.useRef)(expanded);
|
|
9115
9168
|
expandedRef.current = expanded;
|
|
9116
|
-
(0,
|
|
9169
|
+
(0, import_react53.useEffect)(() => {
|
|
9117
9170
|
const onEscape = (e) => {
|
|
9118
9171
|
const dial = dialRef.current;
|
|
9119
9172
|
if (e.key !== "Escape" || !dial || !e.composedPath().includes(dial)) return;
|
|
@@ -9126,7 +9179,7 @@ function usePresetDial({ layerRef, dialRef, dialButtonRef, messages, isStreaming
|
|
|
9126
9179
|
window.addEventListener("keydown", onEscape, true);
|
|
9127
9180
|
return () => window.removeEventListener("keydown", onEscape, true);
|
|
9128
9181
|
}, [dialRef, dialButtonRef]);
|
|
9129
|
-
(0,
|
|
9182
|
+
(0, import_react53.useEffect)(() => {
|
|
9130
9183
|
if (!expanded) return;
|
|
9131
9184
|
const layer = layerRef.current;
|
|
9132
9185
|
const inDial = (e) => {
|
|
@@ -9178,11 +9231,11 @@ function markToolSeen() {
|
|
|
9178
9231
|
}
|
|
9179
9232
|
|
|
9180
9233
|
// src/components/ChatPanel.tsx
|
|
9181
|
-
var
|
|
9234
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9182
9235
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
9183
9236
|
function useIsModal() {
|
|
9184
|
-
const [modal, setModal] = (0,
|
|
9185
|
-
(0,
|
|
9237
|
+
const [modal, setModal] = (0, import_react54.useState)(false);
|
|
9238
|
+
(0, import_react54.useEffect)(() => {
|
|
9186
9239
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
9187
9240
|
const mql = window.matchMedia(FULLSCREEN_QUERY);
|
|
9188
9241
|
const sync = () => setModal(mql.matches);
|
|
@@ -9196,7 +9249,7 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
|
|
|
9196
9249
|
function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, gamesResult, leaderboardResult, loggedIn, conversation, presetGrid }) {
|
|
9197
9250
|
const { state, close, stop, send, reset } = controller;
|
|
9198
9251
|
const isModal = useIsModal();
|
|
9199
|
-
(0,
|
|
9252
|
+
(0, import_react54.useEffect)(() => {
|
|
9200
9253
|
const onKey = (e) => {
|
|
9201
9254
|
if (e.key === "Escape") close();
|
|
9202
9255
|
};
|
|
@@ -9211,17 +9264,17 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9211
9264
|
monitor?.setActiveTab("chat");
|
|
9212
9265
|
send(text, { grounding });
|
|
9213
9266
|
};
|
|
9214
|
-
(0,
|
|
9267
|
+
(0, import_react54.useEffect)(() => {
|
|
9215
9268
|
if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
|
|
9216
9269
|
}, [monitor, state.isStreaming, state.messages.length]);
|
|
9217
9270
|
const onChatTab = !monitor || monitor.activeTab === "chat";
|
|
9218
|
-
const layerRef = (0,
|
|
9219
|
-
const dialRef = (0,
|
|
9220
|
-
const dialButtonRef = (0,
|
|
9221
|
-
const inputRef = (0,
|
|
9222
|
-
const focusAfterCloseRef = (0,
|
|
9223
|
-
const [tool, setTool] = (0,
|
|
9224
|
-
const [toolSeen, setToolSeen] = (0,
|
|
9271
|
+
const layerRef = (0, import_react54.useRef)(null);
|
|
9272
|
+
const dialRef = (0, import_react54.useRef)(null);
|
|
9273
|
+
const dialButtonRef = (0, import_react54.useRef)(null);
|
|
9274
|
+
const inputRef = (0, import_react54.useRef)(null);
|
|
9275
|
+
const focusAfterCloseRef = (0, import_react54.useRef)(null);
|
|
9276
|
+
const [tool, setTool] = (0, import_react54.useState)(null);
|
|
9277
|
+
const [toolSeen, setToolSeen] = (0, import_react54.useState)(readToolSeen);
|
|
9225
9278
|
const dial = usePresetDial({
|
|
9226
9279
|
layerRef,
|
|
9227
9280
|
dialRef,
|
|
@@ -9232,45 +9285,45 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9232
9285
|
});
|
|
9233
9286
|
const { fold } = dial;
|
|
9234
9287
|
const showDial = !!presetGrid && onChatTab && !tool;
|
|
9235
|
-
const openTool = (0,
|
|
9288
|
+
const openTool = (0, import_react54.useCallback)((next) => {
|
|
9236
9289
|
fold();
|
|
9237
9290
|
markToolSeen();
|
|
9238
9291
|
setToolSeen(true);
|
|
9239
9292
|
setTool(next);
|
|
9240
9293
|
}, [fold]);
|
|
9241
|
-
const onPill = (0,
|
|
9242
|
-
const toolsValue = (0,
|
|
9294
|
+
const onPill = (0, import_react54.useCallback)((kind) => openTool(kind === "numbers" ? { kind: "numbers" } : { kind: "combo" }), [openTool]);
|
|
9295
|
+
const toolsValue = (0, import_react54.useMemo)(
|
|
9243
9296
|
() => presetGrid ? { openBuilder: (total, legs) => openTool({ kind: "combo", total, legs }), changeLabel: ui.presets.changeCombo } : null,
|
|
9244
9297
|
[presetGrid, openTool, ui.presets.changeCombo]
|
|
9245
9298
|
);
|
|
9246
|
-
const closeTool = (0,
|
|
9299
|
+
const closeTool = (0, import_react54.useCallback)(() => {
|
|
9247
9300
|
focusAfterCloseRef.current = "dial";
|
|
9248
9301
|
setTool(null);
|
|
9249
9302
|
}, []);
|
|
9250
|
-
const sendAsk = (0,
|
|
9303
|
+
const sendAsk = (0, import_react54.useCallback)((ask) => {
|
|
9251
9304
|
focusAfterCloseRef.current = "composer";
|
|
9252
9305
|
setTool(null);
|
|
9253
9306
|
monitor?.setActiveTab("chat");
|
|
9254
9307
|
send(ask.message, { displayText: ask.displayText, preset: ask.preset });
|
|
9255
9308
|
}, [monitor, send]);
|
|
9256
|
-
const formatKickoff = (0,
|
|
9309
|
+
const formatKickoff = (0, import_react54.useCallback)((kickoffUtc) => {
|
|
9257
9310
|
const k = ui.bettingKickoff(kickoffUtc);
|
|
9258
9311
|
return `${k.dayLabel} ${k.time}`;
|
|
9259
9312
|
}, [ui]);
|
|
9260
|
-
(0,
|
|
9313
|
+
(0, import_react54.useEffect)(() => {
|
|
9261
9314
|
if (tool) return;
|
|
9262
9315
|
const target = focusAfterCloseRef.current;
|
|
9263
9316
|
focusAfterCloseRef.current = null;
|
|
9264
9317
|
if (target === "dial") dialButtonRef.current?.focus();
|
|
9265
9318
|
else if (target === "composer") inputRef.current?.focus();
|
|
9266
9319
|
}, [tool]);
|
|
9267
|
-
(0,
|
|
9320
|
+
(0, import_react54.useEffect)(() => {
|
|
9268
9321
|
if (!tool || onChatTab && presetGrid) return;
|
|
9269
9322
|
focusAfterCloseRef.current = "composer";
|
|
9270
9323
|
setTool(null);
|
|
9271
9324
|
}, [tool, onChatTab, presetGrid]);
|
|
9272
|
-
return /* @__PURE__ */ (0,
|
|
9273
|
-
/* @__PURE__ */ (0,
|
|
9325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
9326
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9274
9327
|
ChatHeader,
|
|
9275
9328
|
{
|
|
9276
9329
|
onClose: close,
|
|
@@ -9283,7 +9336,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9283
9336
|
moreOptionsLabel: ui.moreOptions
|
|
9284
9337
|
}
|
|
9285
9338
|
),
|
|
9286
|
-
monitor && /* @__PURE__ */ (0,
|
|
9339
|
+
monitor && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9287
9340
|
TabBar,
|
|
9288
9341
|
{
|
|
9289
9342
|
monitor,
|
|
@@ -9295,9 +9348,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9295
9348
|
gamesEnabled: gamesResult?.enabled ?? false
|
|
9296
9349
|
}
|
|
9297
9350
|
),
|
|
9298
|
-
/* @__PURE__ */ (0,
|
|
9299
|
-
/* @__PURE__ */ (0,
|
|
9300
|
-
showDial ? /* @__PURE__ */ (0,
|
|
9351
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { ref: layerRef, className: "ss-w-chat-layer", "data-dial": presetGrid ? "" : void 0, style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
9352
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(MessageList, { controller, ui, slip, onDashboardTap, monitor }) }),
|
|
9353
|
+
showDial ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9301
9354
|
PresetSpeedDial,
|
|
9302
9355
|
{
|
|
9303
9356
|
expanded: dial.expanded,
|
|
@@ -9309,12 +9362,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9309
9362
|
buttonRef: dialButtonRef
|
|
9310
9363
|
}
|
|
9311
9364
|
) : null,
|
|
9312
|
-
tool && presetGrid && onChatTab ? tool.kind === "numbers" ? /* @__PURE__ */ (0,
|
|
9365
|
+
tool && presetGrid && onChatTab ? tool.kind === "numbers" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SetNumbersTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, onSend: sendAsk, onClose: closeTool }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
9313
9366
|
] }),
|
|
9314
|
-
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0,
|
|
9315
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0,
|
|
9316
|
-
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0,
|
|
9317
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0,
|
|
9367
|
+
monitor && discovery && monitor.activeTab === "today" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TodayPanel, { discovery, ui, monitor }),
|
|
9368
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(MatchesPanel, { monitor, ui, slip, onAsk: handleAsk }),
|
|
9369
|
+
monitor && monitor.activeTab === "odds" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(OddsPanel, { monitor, ui, slip }),
|
|
9370
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9318
9371
|
GamesPanel,
|
|
9319
9372
|
{
|
|
9320
9373
|
loggedIn: !!loggedIn,
|
|
@@ -9328,7 +9381,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9328
9381
|
}
|
|
9329
9382
|
}
|
|
9330
9383
|
),
|
|
9331
|
-
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0,
|
|
9384
|
+
monitor && monitor.activeTab === "leaderboard" && leaderboardResult && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9332
9385
|
LeaderboardPanel,
|
|
9333
9386
|
{
|
|
9334
9387
|
loggedIn: !!loggedIn,
|
|
@@ -9338,7 +9391,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9338
9391
|
ui
|
|
9339
9392
|
}
|
|
9340
9393
|
),
|
|
9341
|
-
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0,
|
|
9394
|
+
(!monitor || monitor.activeTab !== "games" && monitor.activeTab !== "leaderboard") && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9342
9395
|
ChatInput,
|
|
9343
9396
|
{
|
|
9344
9397
|
ref: inputRef,
|
|
@@ -9356,9 +9409,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, g
|
|
|
9356
9409
|
}
|
|
9357
9410
|
|
|
9358
9411
|
// src/components/HostEventsProvider.tsx
|
|
9359
|
-
var
|
|
9412
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9360
9413
|
function HostEventsProvider({ value, children }) {
|
|
9361
|
-
return /* @__PURE__ */ (0,
|
|
9414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SlipStateContext.Provider, { value: value.slipState, children });
|
|
9362
9415
|
}
|
|
9363
9416
|
|
|
9364
9417
|
// src/styles/css.generated.ts
|
|
@@ -11003,10 +11056,41 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
11003
11056
|
.ss-g-motm-pill { flex: none; padding: 3px 8px; font-size: 11px; }
|
|
11004
11057
|
.ss-g-motm-foot { font-size: 14px; font-weight: 600; }
|
|
11005
11058
|
.ss-g-motm-fun { font-size: 11px; color: var(--ss-g-faint); }
|
|
11059
|
+
|
|
11060
|
+
/* \u2500\u2500 tap-to-answer tray + per-game team-colour band (u503) \u2500\u2500 */
|
|
11061
|
+
.ss-g-tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 150px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
|
|
11062
|
+
.ss-g-tray-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 78px; padding: 6px 4px; border: 1px solid var(--ss-g-line); border-radius: 14px; background: var(--ss-g-surface); color: var(--ss-g-ink); font-family: var(--ss-g-font-body); cursor: pointer; }
|
|
11063
|
+
.ss-g-tray-chip:hover, .ss-g-tray-chip:focus-visible { background: var(--ss-g-raised); border-color: var(--ss-w-accent); outline: none; }
|
|
11064
|
+
.ss-g-tray-chip:disabled { opacity: .5; cursor: default; }
|
|
11065
|
+
.ss-g-tray-av { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ss-g-raised); color: var(--ss-g-muted); font-size: 14px; font-weight: 700; }
|
|
11066
|
+
.ss-g-tray-av img { width: 100%; height: 100%; object-fit: cover; }
|
|
11067
|
+
.ss-g-tray-name { width: 100%; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
|
|
11068
|
+
.ss-g-tray-first { max-width: 100%; font-size: 10px; font-weight: 500; color: var(--ss-g-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
11069
|
+
.ss-g-tray-last { max-width: 100%; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
11070
|
+
|
|
11071
|
+
/* Each game gets its own band colour: the operator accent mixed into the ground, hue-nudged per game.
|
|
11072
|
+
Browsers without relative colour syntax keep the plain accent mix. */
|
|
11073
|
+
.ss-g-screen[data-game] { --ss-g-band: color-mix(in srgb, var(--ss-w-accent) var(--ss-g-band-mix, 18%), var(--ss-g-ground)); }
|
|
11074
|
+
@supports (color: oklch(from red l c h)) {
|
|
11075
|
+
.ss-g-screen[data-game] { --ss-g-band: oklch(from color-mix(in srgb, var(--ss-w-accent) var(--ss-g-band-mix, 18%), var(--ss-g-ground)) l calc(c * 1.5) calc(h + var(--ss-g-hue-shift, 0))); }
|
|
11076
|
+
}
|
|
11077
|
+
.ss-g-screen[data-game="mystery-tiger"] { --ss-g-band-mix: 14%; --ss-g-hue-shift: 0; }
|
|
11078
|
+
.ss-g-screen[data-game="career-path"] { --ss-g-band-mix: 11%; --ss-g-hue-shift: -24; }
|
|
11079
|
+
.ss-g-screen[data-game] > .ss-g-head { background: var(--ss-g-band); border-radius: 0 0 24px 24px; padding-bottom: 12px; }
|
|
11080
|
+
.ss-g-worth { flex: none; display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--ss-g-muted); }
|
|
11081
|
+
.ss-g-worth-now { font-family: var(--ss-g-font-display); font-weight: 800; font-size: 18px; letter-spacing: .02em; text-transform: uppercase; color: var(--ss-w-accent); }
|
|
11082
|
+
.ss-g-screen[data-game="beat-the-grid"] { --ss-g-band-mix: 13%; --ss-g-hue-shift: 14; }
|
|
11083
|
+
.ss-g-screen[data-game="guess-the-xi"] { --ss-g-band-mix: 12%; --ss-g-hue-shift: -36; }
|
|
11084
|
+
.ss-g-screen[data-game="higher-or-lower"] { --ss-g-band-mix: 16%; --ss-g-hue-shift: 28; }
|
|
11085
|
+
.ss-g-screen[data-game="daily-quiz"] { --ss-g-band-mix: 10%; --ss-g-hue-shift: -12; }
|
|
11086
|
+
.ss-g-screen[data-game="stat-ladder"] { --ss-g-band-mix: 15%; --ss-g-hue-shift: 36; }
|
|
11087
|
+
.ss-g-screen[data-game="matchday-predictor"] { --ss-g-band-mix: 18%; --ss-g-hue-shift: -4; }
|
|
11088
|
+
.ss-g-screen[data-game="starting-xi"] { --ss-g-band-mix: 9%; --ss-g-hue-shift: -30; }
|
|
11089
|
+
.ss-g-screen[data-game="fan-motm"] { --ss-g-band-mix: 14%; --ss-g-hue-shift: 8; }
|
|
11006
11090
|
`;
|
|
11007
11091
|
|
|
11008
11092
|
// src/StatsWidget.tsx
|
|
11009
|
-
var
|
|
11093
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
11010
11094
|
function buildClient(props) {
|
|
11011
11095
|
try {
|
|
11012
11096
|
if ("client" in props && props.client) {
|
|
@@ -11031,24 +11115,24 @@ function injectStyles(root) {
|
|
|
11031
11115
|
function StatsWidget(props) {
|
|
11032
11116
|
const injectedClient = "client" in props ? props.client : void 0;
|
|
11033
11117
|
const cfg = props.config;
|
|
11034
|
-
const built = (0,
|
|
11035
|
-
const logger = (0,
|
|
11118
|
+
const built = (0, import_react55.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
|
|
11119
|
+
const logger = (0, import_react55.useMemo)(
|
|
11036
11120
|
() => built ? built.client.createEventLogger({
|
|
11037
11121
|
operatorUserId: cfg?.userContext?.operatorUserId,
|
|
11038
11122
|
anonymousUserId: cfg?.userContext?.anonymousUserId
|
|
11039
11123
|
}) : null,
|
|
11040
11124
|
[built?.client]
|
|
11041
11125
|
);
|
|
11042
|
-
const ui = (0,
|
|
11043
|
-
const rootRef = (0,
|
|
11044
|
-
const introDoneRef = (0,
|
|
11045
|
-
const markIntroDone = (0,
|
|
11126
|
+
const ui = (0, import_react55.useMemo)(() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }), [props.config]);
|
|
11127
|
+
const rootRef = (0, import_react55.useRef)(null);
|
|
11128
|
+
const introDoneRef = (0, import_react55.useRef)(false);
|
|
11129
|
+
const markIntroDone = (0, import_react55.useCallback)(() => {
|
|
11046
11130
|
introDoneRef.current = true;
|
|
11047
11131
|
}, []);
|
|
11048
11132
|
const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}`;
|
|
11049
11133
|
const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey);
|
|
11050
|
-
const [hasToday, setHasToday] = (0,
|
|
11051
|
-
const liveCardWatches = (0,
|
|
11134
|
+
const [hasToday, setHasToday] = (0, import_react55.useState)(false);
|
|
11135
|
+
const liveCardWatches = (0, import_react55.useMemo)(() => {
|
|
11052
11136
|
const seen = /* @__PURE__ */ new Set();
|
|
11053
11137
|
const out = [];
|
|
11054
11138
|
for (const msg of controller.state.messages) {
|
|
@@ -11070,15 +11154,15 @@ function StatsWidget(props) {
|
|
|
11070
11154
|
hasToday,
|
|
11071
11155
|
watches: liveCardWatches
|
|
11072
11156
|
});
|
|
11073
|
-
const getSchedule = (0,
|
|
11157
|
+
const getSchedule = (0, import_react55.useCallback)(
|
|
11074
11158
|
(localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes) : Promise.resolve(null),
|
|
11075
11159
|
[built]
|
|
11076
11160
|
);
|
|
11077
|
-
const getStates = (0,
|
|
11161
|
+
const getStates = (0, import_react55.useCallback)(
|
|
11078
11162
|
(matchIds) => built ? built.conversation.getStates(matchIds) : Promise.resolve(null),
|
|
11079
11163
|
[built]
|
|
11080
11164
|
);
|
|
11081
|
-
const pinnedMatchIds = (0,
|
|
11165
|
+
const pinnedMatchIds = (0, import_react55.useMemo)(
|
|
11082
11166
|
() => monitor.pins.filter((p) => p.kind === "match").map((p) => p.matchId),
|
|
11083
11167
|
[monitor.pins]
|
|
11084
11168
|
);
|
|
@@ -11090,11 +11174,11 @@ function StatsWidget(props) {
|
|
|
11090
11174
|
pinnedMatchIds
|
|
11091
11175
|
});
|
|
11092
11176
|
const todayHasContent = visibleGroupsOf(discovery.groups, discovery.states).length > 0;
|
|
11093
|
-
(0,
|
|
11177
|
+
(0, import_react55.useEffect)(() => {
|
|
11094
11178
|
setHasToday(todayHasContent);
|
|
11095
11179
|
}, [todayHasContent]);
|
|
11096
|
-
const prevLiveSnapshotRef = (0,
|
|
11097
|
-
(0,
|
|
11180
|
+
const prevLiveSnapshotRef = (0, import_react55.useRef)(monitor.snapshot);
|
|
11181
|
+
(0, import_react55.useEffect)(() => {
|
|
11098
11182
|
const snap = monitor.snapshot;
|
|
11099
11183
|
if (!snap || snap === prevLiveSnapshotRef.current) return;
|
|
11100
11184
|
prevLiveSnapshotRef.current = snap;
|
|
@@ -11130,14 +11214,14 @@ function StatsWidget(props) {
|
|
|
11130
11214
|
}, [monitor.snapshot]);
|
|
11131
11215
|
const gamesResult = useGames(built?.conversation ?? null, { activeTab: monitor.activeTab });
|
|
11132
11216
|
const leaderboardResult = useLeaderboard(built?.conversation ?? null, { activeTab: monitor.activeTab });
|
|
11133
|
-
const getPricePresets = (0,
|
|
11217
|
+
const getPricePresets = (0, import_react55.useCallback)(
|
|
11134
11218
|
(locale2) => built ? built.conversation.getPricePresets(locale2, { pool: "open" }) : Promise.resolve(null),
|
|
11135
11219
|
[built]
|
|
11136
11220
|
);
|
|
11137
11221
|
const presetGrid = usePresetGrid({ getPricePresets, isOpen: controller.state.isOpen, locale: ui.presets.lang });
|
|
11138
11222
|
const markTodayActivity = monitor.markTodayActivity;
|
|
11139
|
-
const prevLiveCountRef = (0,
|
|
11140
|
-
(0,
|
|
11223
|
+
const prevLiveCountRef = (0, import_react55.useRef)(0);
|
|
11224
|
+
(0, import_react55.useEffect)(() => {
|
|
11141
11225
|
const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
|
|
11142
11226
|
prevLiveCountRef.current = discovery.liveCount;
|
|
11143
11227
|
if (rose) markTodayActivity();
|
|
@@ -11151,7 +11235,7 @@ function StatsWidget(props) {
|
|
|
11151
11235
|
closePanel: controller.close
|
|
11152
11236
|
});
|
|
11153
11237
|
const markAdded = hostEvents.markAdded;
|
|
11154
|
-
const slip = (0,
|
|
11238
|
+
const slip = (0, import_react55.useMemo)(
|
|
11155
11239
|
() => {
|
|
11156
11240
|
const handler = props.config?.onAddToSlip;
|
|
11157
11241
|
return {
|
|
@@ -11170,11 +11254,12 @@ function StatsWidget(props) {
|
|
|
11170
11254
|
},
|
|
11171
11255
|
[props.config?.onAddToSlip, controller.state.conversationId, markAdded]
|
|
11172
11256
|
);
|
|
11173
|
-
const onDashboardTap = (0,
|
|
11257
|
+
const onDashboardTap = (0, import_react55.useMemo)(
|
|
11174
11258
|
() => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
|
|
11175
11259
|
[built, logger]
|
|
11176
11260
|
);
|
|
11177
11261
|
const dismissPopup = usePopupTelemetry(logger, controller.state.isOpen, controller.state.popupText, controller.dismissPopup);
|
|
11262
|
+
useOpenTelemetry(logger, controller.state.isOpen);
|
|
11178
11263
|
const asks = bubbleAsks(controller.state.messages, ui.presets.standoutAsk).map((ask) => ({
|
|
11179
11264
|
label: ask.label,
|
|
11180
11265
|
onTap: () => runBubbleAsk(ask, {
|
|
@@ -11188,11 +11273,11 @@ function StatsWidget(props) {
|
|
|
11188
11273
|
const operatorUserId = cfg?.userContext?.operatorUserId;
|
|
11189
11274
|
const anonymousUserId = cfg?.userContext?.anonymousUserId;
|
|
11190
11275
|
const conversationId = controller.state.conversationId ?? void 0;
|
|
11191
|
-
(0,
|
|
11276
|
+
(0, import_react55.useEffect)(() => {
|
|
11192
11277
|
if (!logger) return;
|
|
11193
11278
|
logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
|
|
11194
11279
|
}, [logger, operatorUserId, anonymousUserId, conversationId]);
|
|
11195
|
-
(0,
|
|
11280
|
+
(0, import_react55.useEffect)(() => {
|
|
11196
11281
|
if (!logger) return;
|
|
11197
11282
|
logger.resume();
|
|
11198
11283
|
const onHide = () => {
|
|
@@ -11210,14 +11295,14 @@ function StatsWidget(props) {
|
|
|
11210
11295
|
logger.dispose();
|
|
11211
11296
|
};
|
|
11212
11297
|
}, [logger]);
|
|
11213
|
-
(0,
|
|
11298
|
+
(0, import_react55.useEffect)(() => {
|
|
11214
11299
|
if (!built || !ui.injectStyles) return;
|
|
11215
11300
|
const node = rootRef.current?.getRootNode();
|
|
11216
11301
|
if (node) injectStyles(node);
|
|
11217
11302
|
}, [built, ui.injectStyles]);
|
|
11218
11303
|
if (!built) return null;
|
|
11219
11304
|
const attrs = themeAttrs(ui);
|
|
11220
|
-
return /* @__PURE__ */ (0,
|
|
11305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("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__ */ (0, import_jsx_runtime96.jsx)(
|
|
11221
11306
|
ChatPanel,
|
|
11222
11307
|
{
|
|
11223
11308
|
controller,
|
|
@@ -11232,7 +11317,7 @@ function StatsWidget(props) {
|
|
|
11232
11317
|
conversation: built?.conversation ?? null,
|
|
11233
11318
|
presetGrid
|
|
11234
11319
|
}
|
|
11235
|
-
) : /* @__PURE__ */ (0,
|
|
11320
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11236
11321
|
ChatFab,
|
|
11237
11322
|
{
|
|
11238
11323
|
label: ui.launcherLabel,
|