fansunited-frontend-components 1.2.0 → 1.3.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/BattleOfFans.js +1 -1
- package/Betslip.js +2 -2
- package/ChanceGame.js +1 -1
- package/ClassicQuizPlay.js +1 -1
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +1 -1
- package/CompetitorCard.js +1 -1
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1 -1
- package/EventCard.js +1 -1
- package/EventGamePlay.js +1 -1
- package/Leaderboard.js +1 -1
- package/List.js +1 -1
- package/MatchQuizPlay.js +1 -1
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +1 -1
- package/PickThePair.js +1 -1
- package/PlayerOfTheMatch.js +1 -1
- package/PollVote.js +1 -1
- package/Predictor.js +1576 -1569
- package/ProfileStats.js +1 -1
- package/README.md +40 -0
- package/Standings.js +1 -1
- package/TopX.js +722 -715
- package/chunks/{main-P2WNvBZE.js → main-8Yt_jn04.js} +402 -392
- package/chunks/{withVersionStamp-C1gbpK3-.js → withVersionStamp-BOktiTgW.js} +1 -1
- package/package.json +2 -2
package/TopX.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { radius as L, space as r, Checkbox as lr, ButtonSpinner as
|
|
3
|
-
import { M as mr } from "./chunks/main-
|
|
4
|
-
import
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { useDisableCache as Xt, extractSdkErrorMessage as Bt, betslipApi as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as De } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { radius as L, space as r, Checkbox as lr, ButtonSpinner as Ln, baseBody as Rn, Avatar as dr, Notification as pr, WidgetPortal as ur } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
+
import { M as mr } from "./chunks/main-8Yt_jn04.js";
|
|
4
|
+
import pe, { createContext as hr, useContext as gr, useState as $, useCallback as j, useEffect as Z, useMemo as K, useRef as Ce } from "react";
|
|
5
|
+
import { useTranslation as ie } from "react-i18next";
|
|
6
|
+
import { useDisableCache as Xt, extractSdkErrorMessage as Bt, betslipApi as Bn, toIntlLocale as fr, DirectionalIcon as $t, bidiIsolate as Co, useConstantContext as ao, ConstantsContext as co, useIsMobile as $n } from "fansunited-frontend-core";
|
|
7
7
|
import { MarketEnum as yr } from "fansunited-sdk-esm/enums";
|
|
8
|
-
import { u as br, s as
|
|
9
|
-
import { css as n, keyframes as
|
|
10
|
-
import { c as x, p as N, f as P, a as Ie, L as kr, b as
|
|
11
|
-
import { ShieldOutlinedIcon as
|
|
8
|
+
import { u as br, s as Dn, a as xr, O as vr } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
|
|
9
|
+
import { css as n, keyframes as ye } from "@emotion/react";
|
|
10
|
+
import { c as x, p as N, f as P, a as Ie, L as kr, b as Pn, m as Nn, d as Sr, G as wr, P as Cr, R as Tr, e as Ir } from "./chunks/predictionsHelpers-D8j0Y78z.js";
|
|
11
|
+
import { ShieldOutlinedIcon as On, PersonIcon as Er } from "fansunited-frontend-core/ui/icons";
|
|
12
12
|
import "fansunited-frontend-core/ui/icons/lucide";
|
|
13
|
-
import { w as Lr } from "./chunks/withVersionStamp-
|
|
14
|
-
const
|
|
15
|
-
const e =
|
|
13
|
+
import { w as Lr } from "./chunks/withVersionStamp-BOktiTgW.js";
|
|
14
|
+
const An = hr(null), Rr = ({ children: e, ...o }) => /* @__PURE__ */ t(An.Provider, { value: o, children: e }), Ye = () => {
|
|
15
|
+
const e = gr(An);
|
|
16
16
|
if (!e)
|
|
17
17
|
throw new Error(
|
|
18
18
|
"useTopXPredictorContext must be used within TopXPredictorProvider"
|
|
@@ -38,8 +38,8 @@ const On = gr(null), Rr = ({ children: e, ...o }) => /* @__PURE__ */ t(On.Provid
|
|
|
38
38
|
l.fixtures.filter(
|
|
39
39
|
(a) => a.market === "CORRECT_SCORE" || a.market === "CORRECT_SCORE_ADVANCED"
|
|
40
40
|
).forEach((a) => {
|
|
41
|
-
var
|
|
42
|
-
const u = ((
|
|
41
|
+
var h, p, c, y;
|
|
42
|
+
const u = ((h = a.prediction) == null ? void 0 : h.value) ?? "0:0", { homeScore: s, awayScore: m } = $r(u);
|
|
43
43
|
o.set(a.matchId, {
|
|
44
44
|
matchId: a.matchId,
|
|
45
45
|
predictionId: l.id,
|
|
@@ -52,7 +52,7 @@ const On = gr(null), Rr = ({ children: e, ...o }) => /* @__PURE__ */ t(On.Provid
|
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
}), o;
|
|
55
|
-
}, Dr = ["FT_1X2"],
|
|
55
|
+
}, Dr = ["FT_1X2"], Xn = (e, o, i, l) => br(e, o, {
|
|
56
56
|
enabled: i,
|
|
57
57
|
markets: Dr,
|
|
58
58
|
sport: "FOOTBALL",
|
|
@@ -83,7 +83,7 @@ async function Nr(e, o, i, l) {
|
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
function Or() {
|
|
86
|
-
const { sdk: e, userIsLoggedIn: o, consents: i, entityId: l } = Ye(), [d, a] =
|
|
86
|
+
const { sdk: e, userIsLoggedIn: o, consents: i, entityId: l } = Ye(), [d, a] = $(null), [u, s] = $(!0), m = j(async () => {
|
|
87
87
|
if (!o) {
|
|
88
88
|
a(null), s(!1);
|
|
89
89
|
return;
|
|
@@ -96,19 +96,19 @@ function Or() {
|
|
|
96
96
|
s(!1);
|
|
97
97
|
}
|
|
98
98
|
}, [e, o]);
|
|
99
|
-
|
|
99
|
+
Z(() => {
|
|
100
100
|
m();
|
|
101
101
|
}, [m]);
|
|
102
|
-
const
|
|
102
|
+
const h = j(
|
|
103
103
|
async (y) => {
|
|
104
104
|
await Nr(e, i, y, l), a((v) => {
|
|
105
|
-
const
|
|
106
|
-
return y.forEach((C) =>
|
|
105
|
+
const S = new Set(v ?? []);
|
|
106
|
+
return y.forEach((C) => S.add(C)), S;
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
109
|
[e, i, l]
|
|
110
|
-
), p =
|
|
111
|
-
return { accepted: d, loading: u, available: p, missingRequired: c, submit:
|
|
110
|
+
), p = K(() => d ? i.filter((y) => !d.has(y.consentId)) : i, [i, d]), c = K(() => p.filter((y) => y.required), [p]);
|
|
111
|
+
return { accepted: d, loading: u, available: p, missingRequired: c, submit: h, refresh: m };
|
|
112
112
|
}
|
|
113
113
|
const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--fu-ucrc-primary-solid-disabled-color, ${e})`, Io = (e) => `var(--fu-ucrc-primary-solid-disabled-bg, ${e})`, oo = {
|
|
114
114
|
"&:disabled": {
|
|
@@ -118,7 +118,7 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
118
118
|
backgroundColor: Io("#F0F4F8")
|
|
119
119
|
},
|
|
120
120
|
".dark &:disabled": { color: To("#636B74"), backgroundColor: Io("#171A1C") }
|
|
121
|
-
}, wt = x("outlineEnabledBorder"), jt = N("danger", "plainColor"), Dt = N("primary", "plainColor"),
|
|
121
|
+
}, wt = x("outlineEnabledBorder"), jt = N("danger", "plainColor"), Dt = N("primary", "plainColor"), Wn = {
|
|
122
122
|
WebkitTapHighlightColor: "transparent",
|
|
123
123
|
boxSizing: "border-box",
|
|
124
124
|
display: "inline-flex",
|
|
@@ -149,7 +149,7 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
149
149
|
borderColor: `var(--fu-ucrc-primary-outlined-disabled-border, ${o[1]})`
|
|
150
150
|
}
|
|
151
151
|
}), Eo = {
|
|
152
|
-
...
|
|
152
|
+
...Wn,
|
|
153
153
|
border: "none",
|
|
154
154
|
fontWeight: 700,
|
|
155
155
|
backgroundColor: Dt,
|
|
@@ -157,7 +157,7 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
157
157
|
"&:hover": { backgroundColor: Dt, opacity: 0.88 },
|
|
158
158
|
"&:active": { backgroundColor: "var(--fu-ucrc-primary-solid-active-bg)" },
|
|
159
159
|
...oo
|
|
160
|
-
},
|
|
160
|
+
}, ce = {
|
|
161
161
|
overlay: n({
|
|
162
162
|
position: "fixed",
|
|
163
163
|
inset: 0,
|
|
@@ -231,7 +231,7 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
231
231
|
errorText: n({ ...Te, fontFamily: P.primary, fontSize: "0.875em", color: jt }),
|
|
232
232
|
actions: n({ display: "flex", gap: r("sm"), justifyContent: "flex-end", paddingTop: r("2xs") }),
|
|
233
233
|
cancel: n({
|
|
234
|
-
...
|
|
234
|
+
...Wn,
|
|
235
235
|
border: `1px solid ${wt}`,
|
|
236
236
|
backgroundColor: "transparent",
|
|
237
237
|
fontWeight: 600,
|
|
@@ -265,43 +265,43 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
265
265
|
initialAccepted: o,
|
|
266
266
|
onChange: i
|
|
267
267
|
}) => {
|
|
268
|
-
const l =
|
|
268
|
+
const l = K(
|
|
269
269
|
() => e.map(
|
|
270
270
|
(c) => `${c.consentId}:${c.required ? 1 : 0}:${c.defaultChecked ? 1 : 0}`
|
|
271
271
|
).join("|"),
|
|
272
272
|
[e]
|
|
273
|
-
), d =
|
|
273
|
+
), d = K(
|
|
274
274
|
() => o ? [...o].sort().join(",") : "",
|
|
275
275
|
[o]
|
|
276
|
-
), a =
|
|
276
|
+
), a = K(() => {
|
|
277
277
|
const c = o ?? /* @__PURE__ */ new Set(), y = {};
|
|
278
278
|
for (const v of e)
|
|
279
279
|
c.has(v.consentId) ? y[v.consentId] = !0 : v.required ? y[v.consentId] = !1 : y[v.consentId] = !!v.defaultChecked;
|
|
280
280
|
return y;
|
|
281
|
-
}, [l, d]), [u, s] =
|
|
282
|
-
|
|
281
|
+
}, [l, d]), [u, s] = $(a), m = Ce(`${l}::${d}`);
|
|
282
|
+
Z(() => {
|
|
283
283
|
const c = `${l}::${d}`;
|
|
284
284
|
m.current !== c && (m.current = c, s(a));
|
|
285
285
|
}, [l, d, a]);
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
}, [i]),
|
|
286
|
+
const h = Ce(i);
|
|
287
|
+
if (Z(() => {
|
|
288
|
+
h.current = i;
|
|
289
|
+
}, [i]), Z(() => {
|
|
290
290
|
const c = Object.entries(u).filter(([, y]) => y).map(([y]) => y);
|
|
291
|
-
|
|
291
|
+
h.current(c);
|
|
292
292
|
}, [u]), e.length === 0) return null;
|
|
293
293
|
const p = o ?? /* @__PURE__ */ new Set();
|
|
294
294
|
return /* @__PURE__ */ t("div", { css: tt.root, children: e.map((c) => {
|
|
295
295
|
const y = p.has(c.consentId), v = !!u[c.consentId];
|
|
296
|
-
return /* @__PURE__ */ t("div", { css: tt.control, children: /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ t("div", { css: tt.control, children: /* @__PURE__ */ g("label", { css: y ? tt.labelDisabled : tt.label, children: [
|
|
297
297
|
/* @__PURE__ */ t("span", { css: tt.checkbox, children: /* @__PURE__ */ t(
|
|
298
298
|
lr,
|
|
299
299
|
{
|
|
300
300
|
checked: v,
|
|
301
301
|
disabled: y,
|
|
302
|
-
onChange: (
|
|
302
|
+
onChange: (S) => s((C) => ({
|
|
303
303
|
...C,
|
|
304
|
-
[c.consentId]:
|
|
304
|
+
[c.consentId]: S.target.checked
|
|
305
305
|
}))
|
|
306
306
|
}
|
|
307
307
|
) }),
|
|
@@ -324,19 +324,19 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
324
324
|
onAccept: a,
|
|
325
325
|
onCancel: u
|
|
326
326
|
}) => {
|
|
327
|
-
const { t: s } =
|
|
328
|
-
|
|
327
|
+
const { t: s } = ie("common"), [m, h] = $([]), [p, c] = $(!1), [y, v] = $(null);
|
|
328
|
+
Z(() => {
|
|
329
329
|
if (!e) return;
|
|
330
|
-
const I = (
|
|
331
|
-
|
|
330
|
+
const I = (R) => {
|
|
331
|
+
R.key === "Escape" && u();
|
|
332
332
|
};
|
|
333
333
|
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
334
334
|
}, [e, u]);
|
|
335
|
-
const
|
|
335
|
+
const S = K(() => {
|
|
336
336
|
const I = new Set(m);
|
|
337
|
-
return i.length > 0 && i.every((
|
|
337
|
+
return i.length > 0 && i.every((R) => I.has(R.consentId));
|
|
338
338
|
}, [m, i]), C = async () => {
|
|
339
|
-
if (
|
|
339
|
+
if (S) {
|
|
340
340
|
c(!0), v(null);
|
|
341
341
|
try {
|
|
342
342
|
await d(m), a();
|
|
@@ -349,43 +349,43 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
|
-
return !e || i.length === 0 ? null : /* @__PURE__ */ t("div", { css:
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */ t("p", { css:
|
|
355
|
-
/* @__PURE__ */ t("button", { type: "button", onClick: u, css:
|
|
352
|
+
return !e || i.length === 0 ? null : /* @__PURE__ */ t("div", { css: ce.overlay, onClick: u, children: /* @__PURE__ */ g("div", { css: ce.dialog, onClick: (I) => I.stopPropagation(), children: [
|
|
353
|
+
/* @__PURE__ */ g("div", { css: ce.header, children: [
|
|
354
|
+
/* @__PURE__ */ t("p", { css: ce.title, children: s("topX.consent.gateTitle") }),
|
|
355
|
+
/* @__PURE__ */ t("button", { type: "button", onClick: u, css: ce.close, children: "✕" })
|
|
356
356
|
] }),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */ t("p", { css:
|
|
357
|
+
/* @__PURE__ */ g("div", { css: ce.body, children: [
|
|
358
|
+
/* @__PURE__ */ t("p", { css: ce.description, children: s("topX.consent.gateDescription") }),
|
|
359
359
|
/* @__PURE__ */ t(
|
|
360
360
|
Xr,
|
|
361
361
|
{
|
|
362
362
|
consents: o,
|
|
363
363
|
initialAccepted: l ?? void 0,
|
|
364
|
-
onChange:
|
|
364
|
+
onChange: h
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
y && /* @__PURE__ */ t("div", { css:
|
|
368
|
-
/* @__PURE__ */
|
|
367
|
+
y && /* @__PURE__ */ t("div", { css: ce.error, children: /* @__PURE__ */ t("p", { css: ce.errorText, children: y }) }),
|
|
368
|
+
/* @__PURE__ */ g("div", { css: ce.actions, children: [
|
|
369
369
|
/* @__PURE__ */ t(
|
|
370
370
|
"button",
|
|
371
371
|
{
|
|
372
372
|
type: "button",
|
|
373
373
|
onClick: u,
|
|
374
374
|
disabled: p,
|
|
375
|
-
css:
|
|
375
|
+
css: ce.cancel,
|
|
376
376
|
children: s("topX.consent.cancel")
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ g(
|
|
380
380
|
"button",
|
|
381
381
|
{
|
|
382
382
|
type: "button",
|
|
383
383
|
onClick: C,
|
|
384
|
-
disabled: !
|
|
385
|
-
css: p ?
|
|
384
|
+
disabled: !S || p,
|
|
385
|
+
css: p ? ce.acceptBusy : ce.accept,
|
|
386
386
|
children: [
|
|
387
387
|
s("topX.consent.acceptAndContinue"),
|
|
388
|
-
p && /* @__PURE__ */ t(
|
|
388
|
+
p && /* @__PURE__ */ t(Ln, { size: 20, thickness: 3 })
|
|
389
389
|
]
|
|
390
390
|
}
|
|
391
391
|
)
|
|
@@ -394,12 +394,12 @@ const Te = { margin: 0, display: "block", lineHeight: 1.5 }, To = (e) => `var(--
|
|
|
394
394
|
] }) });
|
|
395
395
|
};
|
|
396
396
|
function Mr() {
|
|
397
|
-
const { available: e, missingRequired: o, accepted: i, loading: l, submit: d } = Or(), [a, u] =
|
|
397
|
+
const { available: e, missingRequired: o, accepted: i, loading: l, submit: d } = Or(), [a, u] = $(!1), s = Ce(null), m = j(async () => (l && await new Promise((c) => setTimeout(c, 50)), o.length === 0 ? !0 : new Promise((c) => {
|
|
398
398
|
s.current = c, u(!0);
|
|
399
|
-
})), [l, o]),
|
|
399
|
+
})), [l, o]), h = j(() => {
|
|
400
400
|
var c;
|
|
401
401
|
u(!1), (c = s.current) == null || c.call(s, !0), s.current = null;
|
|
402
|
-
}, []), p =
|
|
402
|
+
}, []), p = j(() => {
|
|
403
403
|
var c;
|
|
404
404
|
u(!1), (c = s.current) == null || c.call(s, !1), s.current = null;
|
|
405
405
|
}, []);
|
|
@@ -413,7 +413,7 @@ function Mr() {
|
|
|
413
413
|
missingRequired: o,
|
|
414
414
|
accepted: i,
|
|
415
415
|
submit: d,
|
|
416
|
-
onAccept:
|
|
416
|
+
onAccept: h,
|
|
417
417
|
onCancel: p
|
|
418
418
|
}
|
|
419
419
|
)
|
|
@@ -433,26 +433,26 @@ const zr = (e) => ({
|
|
|
433
433
|
})),
|
|
434
434
|
tiebreaker: e.tiebreaker ?? null
|
|
435
435
|
}), lo = (e, o, i) => {
|
|
436
|
-
const [l, d] =
|
|
437
|
-
return
|
|
436
|
+
const [l, d] = $([]), [a, u] = $(!1), [s, m] = $(null), h = Xt(), p = (o ?? []).join(",");
|
|
437
|
+
return Z(() => {
|
|
438
438
|
if (!e || !i) return;
|
|
439
439
|
let c = !1;
|
|
440
440
|
return u(!0), m(null), (async () => {
|
|
441
441
|
var y, v;
|
|
442
442
|
try {
|
|
443
|
-
const
|
|
443
|
+
const S = o && o.length > 0 ? { gameIds: o } : void 0, C = [];
|
|
444
444
|
let I;
|
|
445
445
|
for (; ; ) {
|
|
446
|
-
const
|
|
447
|
-
C.push(...
|
|
448
|
-
const
|
|
449
|
-
if (!
|
|
450
|
-
I =
|
|
446
|
+
const R = I ? { ...S ?? {}, startAfter: I } : S, _ = await e.topX.getGames(R, h), T = (_ == null ? void 0 : _.data) ?? [];
|
|
447
|
+
C.push(...T.map(zr));
|
|
448
|
+
const k = (v = (y = _ == null ? void 0 : _.meta) == null ? void 0 : y.pagination) == null ? void 0 : v.nextPageStartsAfter;
|
|
449
|
+
if (!k) break;
|
|
450
|
+
I = k;
|
|
451
451
|
}
|
|
452
452
|
c || d(C);
|
|
453
|
-
} catch (
|
|
453
|
+
} catch (S) {
|
|
454
454
|
c || m(
|
|
455
|
-
Bt(
|
|
455
|
+
Bt(S, e, "Failed to load Top X games")
|
|
456
456
|
);
|
|
457
457
|
} finally {
|
|
458
458
|
c || u(!1);
|
|
@@ -460,7 +460,7 @@ const zr = (e) => ({
|
|
|
460
460
|
})(), () => {
|
|
461
461
|
c = !0;
|
|
462
462
|
};
|
|
463
|
-
}, [e, p, i,
|
|
463
|
+
}, [e, p, i, h]), { games: l, loading: a, error: s };
|
|
464
464
|
}, no = (e) => {
|
|
465
465
|
if (!e) return Number.POSITIVE_INFINITY;
|
|
466
466
|
const o = new Date(e).getTime();
|
|
@@ -527,23 +527,23 @@ const zr = (e) => ({
|
|
|
527
527
|
betslipTrigger: l,
|
|
528
528
|
isDirty: d = !1
|
|
529
529
|
}) => {
|
|
530
|
-
const a = Ce(null), u =
|
|
531
|
-
const s =
|
|
530
|
+
const a = Ce(null), u = K(() => {
|
|
531
|
+
const s = Dn(`${o}:${i}`);
|
|
532
532
|
return s ? { outcomeKey: s } : null;
|
|
533
533
|
}, [o, i]);
|
|
534
|
-
return
|
|
534
|
+
return Z(() => {
|
|
535
535
|
if (d && l === "predictions-only" && (u != null && u.outcomeKey)) {
|
|
536
536
|
const s = `${e}:FT_1X2:${u.outcomeKey}`;
|
|
537
|
-
|
|
537
|
+
Bn.setSelection(s), a.current = s;
|
|
538
538
|
}
|
|
539
539
|
}, [e, l, u == null ? void 0 : u.outcomeKey, d]), { predictedOutcome: u };
|
|
540
|
-
}, Kr =
|
|
540
|
+
}, Kr = ye({ "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.5 } }), rt = x("surfaceVariant"), Ur = Ie(rt, 128 / 255), Kt = {
|
|
541
541
|
backgroundColor: x("surface"),
|
|
542
542
|
borderRadius: L("sm"),
|
|
543
543
|
border: `1px solid ${x("outlineEnabledBorder")}`,
|
|
544
544
|
padding: r("md"),
|
|
545
545
|
animation: `${Kr} 2s ease-in-out infinite`
|
|
546
|
-
}, ro = { display: "flex", alignItems: "center", justifyContent: "space-between" }, Yr = { width: "32px", height: "32px", borderRadius: L("xs"), backgroundColor: Ur }, Bo = { height: "14px", backgroundColor: rt, borderRadius: L("xs") },
|
|
546
|
+
}, ro = { display: "flex", alignItems: "center", justifyContent: "space-between" }, Yr = { width: "32px", height: "32px", borderRadius: L("xs"), backgroundColor: Ur }, Bo = { height: "14px", backgroundColor: rt, borderRadius: L("xs") }, le = {
|
|
547
547
|
// Every third card starts later, so the pulse ripples across the grid.
|
|
548
548
|
card: [n(Kt), n({ ...Kt, animationDelay: "150ms" }), n({ ...Kt, animationDelay: "300ms" })],
|
|
549
549
|
header: n({ ...ro, marginBottom: r("md") }),
|
|
@@ -577,24 +577,24 @@ const zr = (e) => ({
|
|
|
577
577
|
kickoffDate: e,
|
|
578
578
|
locale: o,
|
|
579
579
|
rightContent: i
|
|
580
|
-
}) => /* @__PURE__ */
|
|
580
|
+
}) => /* @__PURE__ */ g("div", { css: $o.root, children: [
|
|
581
581
|
/* @__PURE__ */ t("p", { css: $o.date, children: qr(e, o) }),
|
|
582
582
|
i ?? null
|
|
583
|
-
] }), Zr =
|
|
584
|
-
/* @__PURE__ */ t("div", { css:
|
|
585
|
-
/* @__PURE__ */ t("div", { css:
|
|
586
|
-
/* @__PURE__ */
|
|
587
|
-
/* @__PURE__ */ t("div", { css:
|
|
588
|
-
/* @__PURE__ */ t("div", { css:
|
|
583
|
+
] }), Zr = pe.memo(Jr), Qr = ({ index: e = 0 }) => /* @__PURE__ */ g("div", { css: le.card[e % 3], children: [
|
|
584
|
+
/* @__PURE__ */ t("div", { css: le.header, children: /* @__PURE__ */ t("div", { css: le.date }) }),
|
|
585
|
+
/* @__PURE__ */ t("div", { css: le.teams, children: [0, 1].map((o) => /* @__PURE__ */ g("div", { css: le.team, children: [
|
|
586
|
+
/* @__PURE__ */ g("div", { css: le.identity, children: [
|
|
587
|
+
/* @__PURE__ */ t("div", { css: le.logo }),
|
|
588
|
+
/* @__PURE__ */ t("div", { css: le.name[o] })
|
|
589
589
|
] }),
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */ t("div", { css:
|
|
592
|
-
/* @__PURE__ */ t("div", { css:
|
|
593
|
-
/* @__PURE__ */ t("div", { css:
|
|
590
|
+
/* @__PURE__ */ g("div", { css: le.controls, children: [
|
|
591
|
+
/* @__PURE__ */ t("div", { css: le.stepper }),
|
|
592
|
+
/* @__PURE__ */ t("div", { css: le.score }),
|
|
593
|
+
/* @__PURE__ */ t("div", { css: le.stepper })
|
|
594
594
|
] })
|
|
595
595
|
] }, o)) }),
|
|
596
|
-
/* @__PURE__ */ t("div", { css:
|
|
597
|
-
] }), io =
|
|
596
|
+
/* @__PURE__ */ t("div", { css: le.button })
|
|
597
|
+
] }), io = pe.memo(Qr), fe = (e, o) => Ie(e, parseInt(o, 16) / 255), po = N("primary", "plainColor"), Mn = N("primary", "onPrimary"), Be = N("success", "plainColor"), Pt = N("warning", "plainColor"), ft = N("danger", "plainColor"), Pe = x("textPrimary"), de = x("textSecondary"), Ee = x("surfaceVariant"), it = x("outlineEnabledBorder"), oe = { ...Rn, fontFamily: P.primary }, Ne = { display: "flex", alignItems: "center", justifyContent: "center" }, mt = (e, o) => n({
|
|
598
598
|
backgroundColor: x("surface"),
|
|
599
599
|
backgroundSize: "cover",
|
|
600
600
|
backgroundPosition: "center center",
|
|
@@ -608,9 +608,9 @@ const zr = (e) => ({
|
|
|
608
608
|
}), ei = {
|
|
609
609
|
none: mt(it),
|
|
610
610
|
predicted: mt(N("primary", "outlinedBorder"), po),
|
|
611
|
-
correct: mt(
|
|
612
|
-
partial: mt(
|
|
613
|
-
wrong: mt(
|
|
611
|
+
correct: mt(fe(Be, "30"), Be),
|
|
612
|
+
partial: mt(fe(Pt, "30"), Pt),
|
|
613
|
+
wrong: mt(fe(ft, "30"), ft)
|
|
614
614
|
}, ti = n({
|
|
615
615
|
display: "flex",
|
|
616
616
|
justifyContent: "flex-end",
|
|
@@ -618,12 +618,12 @@ const zr = (e) => ({
|
|
|
618
618
|
marginBottom: r("2xs"),
|
|
619
619
|
paddingRight: "1px"
|
|
620
620
|
}), Ut = (e) => n({
|
|
621
|
-
...
|
|
621
|
+
...oe,
|
|
622
622
|
width: e,
|
|
623
623
|
fontSize: "0.5625em",
|
|
624
624
|
textTransform: "uppercase",
|
|
625
625
|
letterSpacing: "0.08em",
|
|
626
|
-
color:
|
|
626
|
+
color: de,
|
|
627
627
|
fontWeight: 500,
|
|
628
628
|
textAlign: "center"
|
|
629
629
|
}), oi = { 36: Ut(36), 42: Ut(42), 48: Ut(48) }, ni = n({
|
|
@@ -642,7 +642,7 @@ const zr = (e) => ({
|
|
|
642
642
|
fontFamily: P.primary,
|
|
643
643
|
fontSize: "0.75em",
|
|
644
644
|
fontWeight: 500,
|
|
645
|
-
color:
|
|
645
|
+
color: de
|
|
646
646
|
}), si = n({
|
|
647
647
|
display: "flex",
|
|
648
648
|
alignItems: "center",
|
|
@@ -667,7 +667,7 @@ const zr = (e) => ({
|
|
|
667
667
|
backgroundColor: Ee,
|
|
668
668
|
flexShrink: 0
|
|
669
669
|
}), di = n({
|
|
670
|
-
...
|
|
670
|
+
...oe,
|
|
671
671
|
fontSize: "0.875em",
|
|
672
672
|
fontWeight: 500,
|
|
673
673
|
color: Pe,
|
|
@@ -683,8 +683,8 @@ const zr = (e) => ({
|
|
|
683
683
|
border: `1px solid ${N("primary", "outlinedBorder")}`
|
|
684
684
|
}),
|
|
685
685
|
past: n({ ...Rt, backgroundColor: Ee })
|
|
686
|
-
}, Yt = { ...
|
|
687
|
-
muted: n({ ...Yt, color:
|
|
686
|
+
}, Yt = { ...oe, fontSize: "1.25em", fontWeight: 700 }, Tt = {
|
|
687
|
+
muted: n({ ...Yt, color: de }),
|
|
688
688
|
primary: n({ ...Yt, color: po }),
|
|
689
689
|
plain: n({ ...Yt, color: Pe })
|
|
690
690
|
}, Do = {
|
|
@@ -708,8 +708,8 @@ const zr = (e) => ({
|
|
|
708
708
|
border: `1px solid ${it}`
|
|
709
709
|
})
|
|
710
710
|
}, No = {
|
|
711
|
-
you: n({ ...
|
|
712
|
-
result: n({ ...
|
|
711
|
+
you: n({ ...oe, fontSize: "0.875em", fontWeight: 600, color: de }),
|
|
712
|
+
result: n({ ...oe, fontSize: "0.875em", fontWeight: 700, color: Pe })
|
|
713
713
|
}, Oo = {
|
|
714
714
|
you: n({
|
|
715
715
|
...Ne,
|
|
@@ -728,8 +728,8 @@ const zr = (e) => ({
|
|
|
728
728
|
border: `1px solid ${it}`
|
|
729
729
|
})
|
|
730
730
|
}, Ao = {
|
|
731
|
-
you: n({ ...
|
|
732
|
-
result: n({ ...
|
|
731
|
+
you: n({ ...oe, fontSize: "0.8125em", fontWeight: 600, color: de, lineHeight: 1 }),
|
|
732
|
+
result: n({ ...oe, fontSize: "0.9375em", fontWeight: 700, lineHeight: 1, color: Pe })
|
|
733
733
|
}, pi = n({ display: "flex", alignItems: "center", gap: r("2xs"), flexShrink: 0 }), Xo = (e) => n({
|
|
734
734
|
...Ne,
|
|
735
735
|
width: 32,
|
|
@@ -738,11 +738,11 @@ const zr = (e) => ({
|
|
|
738
738
|
border: "none",
|
|
739
739
|
padding: 0,
|
|
740
740
|
cursor: e ? "not-allowed" : "pointer",
|
|
741
|
-
color:
|
|
741
|
+
color: de,
|
|
742
742
|
opacity: e ? 0.4 : 1,
|
|
743
743
|
transition: "color 0.15s, transform 0.1s",
|
|
744
744
|
flexShrink: 0,
|
|
745
|
-
"&:hover": { color: e ?
|
|
745
|
+
"&:hover": { color: e ? de : Pe },
|
|
746
746
|
"&:active": { transform: e ? "none" : "scale(0.95)" }
|
|
747
747
|
}), Wo = { enabled: Xo(!1), disabled: Xo(!0) }, ui = n({
|
|
748
748
|
...Rt,
|
|
@@ -751,15 +751,15 @@ const zr = (e) => ({
|
|
|
751
751
|
fontFamily: P.primary,
|
|
752
752
|
fontSize: "1.25em",
|
|
753
753
|
fontWeight: 700
|
|
754
|
-
}), mi =
|
|
754
|
+
}), mi = ye({ "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.2 } }), hi = ye({
|
|
755
755
|
from: { opacity: 0, transform: "translateX(6px)" },
|
|
756
756
|
to: { opacity: 1, transform: "translateX(0)" }
|
|
757
|
-
}),
|
|
757
|
+
}), gi = ye({ to: { transform: "rotate(360deg)" } }), fi = n({
|
|
758
758
|
display: "inline-flex",
|
|
759
759
|
alignItems: "center",
|
|
760
760
|
gap: r("3xs"),
|
|
761
761
|
backgroundColor: ft,
|
|
762
|
-
color:
|
|
762
|
+
color: Mn,
|
|
763
763
|
fontSize: "0.6em",
|
|
764
764
|
fontWeight: 700,
|
|
765
765
|
letterSpacing: "0.07em",
|
|
@@ -774,14 +774,14 @@ const zr = (e) => ({
|
|
|
774
774
|
width: "5px",
|
|
775
775
|
height: "5px",
|
|
776
776
|
borderRadius: "50%",
|
|
777
|
-
backgroundColor:
|
|
777
|
+
backgroundColor: Mn,
|
|
778
778
|
flexShrink: 0,
|
|
779
779
|
animation: `${mi} 1s ease-in-out infinite`
|
|
780
780
|
}), bi = n({
|
|
781
781
|
display: "flex",
|
|
782
782
|
alignItems: "center",
|
|
783
783
|
gap: r("xs"),
|
|
784
|
-
animation: `${
|
|
784
|
+
animation: `${hi} 0.15s ease`
|
|
785
785
|
}), xi = n({
|
|
786
786
|
height: 28,
|
|
787
787
|
borderRadius: L("xs"),
|
|
@@ -789,7 +789,7 @@ const zr = (e) => ({
|
|
|
789
789
|
background: "none",
|
|
790
790
|
cursor: "pointer",
|
|
791
791
|
...Ne,
|
|
792
|
-
color:
|
|
792
|
+
color: de,
|
|
793
793
|
flexShrink: 0,
|
|
794
794
|
transition: "color 0.15s, border-color 0.15s",
|
|
795
795
|
"&:hover": { color: Pe, borderColor: Pe },
|
|
@@ -812,7 +812,7 @@ const zr = (e) => ({
|
|
|
812
812
|
flexShrink: 0,
|
|
813
813
|
opacity: e ? 0.6 : 1,
|
|
814
814
|
transition: "opacity 0.15s"
|
|
815
|
-
}), vi = { idle: Mo(!1), submitting: Mo(!0) }, ki = n({ animation: `${
|
|
815
|
+
}), vi = { idle: Mo(!1), submitting: Mo(!0) }, ki = n({ animation: `${gi} 0.7s linear infinite` }), Si = n({
|
|
816
816
|
width: 28,
|
|
817
817
|
height: 28,
|
|
818
818
|
display: "inline-flex",
|
|
@@ -827,10 +827,10 @@ const zr = (e) => ({
|
|
|
827
827
|
transition: "background-color 0.15s, color 0.15s",
|
|
828
828
|
"&:hover": { backgroundColor: Ee }
|
|
829
829
|
}), wi = n({
|
|
830
|
-
...
|
|
830
|
+
...oe,
|
|
831
831
|
fontSize: "0.6875em",
|
|
832
832
|
fontStyle: "italic",
|
|
833
|
-
color:
|
|
833
|
+
color: de,
|
|
834
834
|
opacity: 0.65,
|
|
835
835
|
letterSpacing: "0.01em",
|
|
836
836
|
userSelect: "none"
|
|
@@ -838,11 +838,11 @@ const zr = (e) => ({
|
|
|
838
838
|
correct: N("success", "softBg"),
|
|
839
839
|
partial: N("warning", "softBg"),
|
|
840
840
|
wrong: N("danger", "softBg")
|
|
841
|
-
}, uo = (e) =>
|
|
842
|
-
"0%": { boxShadow: `0 0 0 0 ${
|
|
843
|
-
"60%": { boxShadow: `0 0 0 5px ${
|
|
844
|
-
"100%": { boxShadow: `0 0 0 0 ${
|
|
845
|
-
}), Ii =
|
|
841
|
+
}, uo = (e) => fe(st[e], "60"), Ti = ye({
|
|
842
|
+
"0%": { boxShadow: `0 0 0 0 ${fe(Be, "40")}` },
|
|
843
|
+
"60%": { boxShadow: `0 0 0 5px ${fe(Be, "00")}` },
|
|
844
|
+
"100%": { boxShadow: `0 0 0 0 ${fe(Be, "00")}` }
|
|
845
|
+
}), Ii = ye({
|
|
846
846
|
from: { opacity: 0, transform: "translateY(-4px) scale(0.97)" },
|
|
847
847
|
to: { opacity: 1, transform: "translateY(0) scale(1)" }
|
|
848
848
|
}), Ei = n({ position: "relative" }), Li = (e) => {
|
|
@@ -869,14 +869,14 @@ const zr = (e) => ({
|
|
|
869
869
|
animation: e === "correct" ? `${Ti} 1.2s ease-out 0.3s 1` : "none",
|
|
870
870
|
"&:hover": { opacity: 0.8 },
|
|
871
871
|
"&:focus-visible": { outline: `2px solid ${o}`, outlineOffset: "2px" },
|
|
872
|
-
"&:active": { backgroundColor:
|
|
872
|
+
"&:active": { backgroundColor: fe(o, "22") }
|
|
873
873
|
});
|
|
874
874
|
}, at = (e) => ({
|
|
875
875
|
correct: e("correct"),
|
|
876
876
|
partial: e("partial"),
|
|
877
877
|
wrong: e("wrong")
|
|
878
878
|
}), Ri = at(Li), Bi = at(
|
|
879
|
-
(e) => n({ ...
|
|
879
|
+
(e) => n({ ...oe, fontSize: "0.6875em", fontWeight: 700, color: st[e], lineHeight: 1 })
|
|
880
880
|
), $i = at(
|
|
881
881
|
(e) => n({
|
|
882
882
|
position: "absolute",
|
|
@@ -898,7 +898,7 @@ const zr = (e) => ({
|
|
|
898
898
|
minWidth: 180
|
|
899
899
|
}), Ni = at(
|
|
900
900
|
(e) => n({
|
|
901
|
-
...
|
|
901
|
+
...oe,
|
|
902
902
|
fontSize: "0.75em",
|
|
903
903
|
fontWeight: 700,
|
|
904
904
|
color: st[e],
|
|
@@ -906,9 +906,9 @@ const zr = (e) => ({
|
|
|
906
906
|
marginBottom: r("2xs")
|
|
907
907
|
})
|
|
908
908
|
), zo = n({
|
|
909
|
-
...
|
|
909
|
+
...oe,
|
|
910
910
|
fontSize: "0.6875em",
|
|
911
|
-
color:
|
|
911
|
+
color: de,
|
|
912
912
|
lineHeight: 1.4,
|
|
913
913
|
marginBottom: r("2xs")
|
|
914
914
|
}), Oi = n({
|
|
@@ -925,20 +925,20 @@ const zr = (e) => ({
|
|
|
925
925
|
ok: n({ flexShrink: 0, stroke: Be }),
|
|
926
926
|
miss: n({ flexShrink: 0, opacity: 0.5, stroke: ft })
|
|
927
927
|
}, Wi = {
|
|
928
|
-
ok: n({ ...
|
|
929
|
-
miss: n({ ...
|
|
928
|
+
ok: n({ ...oe, fontSize: "0.6875em", color: Pe, opacity: 1, lineHeight: 1.3 }),
|
|
929
|
+
miss: n({ ...oe, fontSize: "0.6875em", color: de, opacity: 0.6, lineHeight: 1.3 })
|
|
930
930
|
}, _o = (e) => n({
|
|
931
|
-
...
|
|
931
|
+
...oe,
|
|
932
932
|
fontSize: "0.6875em",
|
|
933
933
|
fontWeight: 600,
|
|
934
|
-
color: e ? Pt :
|
|
934
|
+
color: e ? Pt : de,
|
|
935
935
|
opacity: e ? 1 : 0.45,
|
|
936
936
|
lineHeight: 1.3,
|
|
937
937
|
whiteSpace: "nowrap",
|
|
938
938
|
marginLeft: r("xs")
|
|
939
939
|
}), Mi = { ok: _o(!0), miss: _o(!1) }, zi = at(
|
|
940
940
|
(e) => n({
|
|
941
|
-
...
|
|
941
|
+
...oe,
|
|
942
942
|
fontSize: "0.6875em",
|
|
943
943
|
fontWeight: 600,
|
|
944
944
|
color: st[e],
|
|
@@ -979,7 +979,7 @@ const zr = (e) => ({
|
|
|
979
979
|
onIncrement: o,
|
|
980
980
|
onDecrement: i,
|
|
981
981
|
disabled: l = !1
|
|
982
|
-
}) => /* @__PURE__ */
|
|
982
|
+
}) => /* @__PURE__ */ g("div", { css: pi, children: [
|
|
983
983
|
/* @__PURE__ */ t(
|
|
984
984
|
"button",
|
|
985
985
|
{
|
|
@@ -999,7 +999,7 @@ const zr = (e) => ({
|
|
|
999
999
|
children: /* @__PURE__ */ t($t, { children: /* @__PURE__ */ t(_i, {}) })
|
|
1000
1000
|
}
|
|
1001
1001
|
)
|
|
1002
|
-
] }), Hi =
|
|
1002
|
+
] }), Hi = pe.memo(Gi), ji = ({
|
|
1003
1003
|
team: e,
|
|
1004
1004
|
score: o,
|
|
1005
1005
|
isPast: i,
|
|
@@ -1009,13 +1009,13 @@ const zr = (e) => ({
|
|
|
1009
1009
|
matchScore: u,
|
|
1010
1010
|
onIncrement: s,
|
|
1011
1011
|
onDecrement: m,
|
|
1012
|
-
isSubmitting:
|
|
1012
|
+
isSubmitting: h = !1,
|
|
1013
1013
|
readOnly: p = !1
|
|
1014
1014
|
}) => {
|
|
1015
1015
|
const c = e.logo ?? null;
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
c ? /* @__PURE__ */ t("img", { src: c, alt: e.name, css: ci }) : /* @__PURE__ */ t("div", { css: li, children: /* @__PURE__ */ t(
|
|
1016
|
+
return /* @__PURE__ */ g("div", { css: si, children: [
|
|
1017
|
+
/* @__PURE__ */ g("div", { css: ai, children: [
|
|
1018
|
+
c ? /* @__PURE__ */ t("img", { src: c, alt: e.name, css: ci }) : /* @__PURE__ */ t("div", { css: li, children: /* @__PURE__ */ t(On, { size: "20px", color: x("textSecondary") }) }),
|
|
1019
1019
|
/* @__PURE__ */ t("p", { css: di, children: e.shortName ?? e.name })
|
|
1020
1020
|
] }),
|
|
1021
1021
|
!p && !i && !l && !d && /* @__PURE__ */ t(
|
|
@@ -1024,62 +1024,62 @@ const zr = (e) => ({
|
|
|
1024
1024
|
score: o,
|
|
1025
1025
|
onIncrement: s,
|
|
1026
1026
|
onDecrement: m,
|
|
1027
|
-
disabled:
|
|
1027
|
+
disabled: h
|
|
1028
1028
|
}
|
|
1029
1029
|
),
|
|
1030
1030
|
!p && !i && !l && d && /* @__PURE__ */ t("div", { css: Ct.locked, children: /* @__PURE__ */ t("p", { css: Tt.muted, children: u ?? o }) }),
|
|
1031
1031
|
!p && l && !i && !d && /* @__PURE__ */ t("div", { css: Ct.predicted, children: /* @__PURE__ */ t("p", { css: Tt.primary, children: o }) }),
|
|
1032
|
-
!p && l && !i && d && u != null && /* @__PURE__ */
|
|
1032
|
+
!p && l && !i && d && u != null && /* @__PURE__ */ g("div", { css: Do.live, children: [
|
|
1033
1033
|
/* @__PURE__ */ t("div", { css: Po.you, children: /* @__PURE__ */ t("p", { css: No.you, children: o }) }),
|
|
1034
1034
|
/* @__PURE__ */ t("div", { css: Po.result, children: /* @__PURE__ */ t("p", { css: No.result, children: u }) })
|
|
1035
1035
|
] }),
|
|
1036
1036
|
!p && l && !i && d && u == null && /* @__PURE__ */ t("div", { css: Ct.locked, children: /* @__PURE__ */ t("p", { css: Tt.plain, children: o }) }),
|
|
1037
|
-
i && u != null && a != null && /* @__PURE__ */
|
|
1037
|
+
i && u != null && a != null && /* @__PURE__ */ g("div", { css: Do.past, children: [
|
|
1038
1038
|
/* @__PURE__ */ t("div", { css: Oo.you, children: /* @__PURE__ */ t("p", { css: Ao.you, children: a }) }),
|
|
1039
1039
|
/* @__PURE__ */ t("div", { css: Oo.result, children: /* @__PURE__ */ t("p", { css: Ao.result, children: u }) })
|
|
1040
1040
|
] }),
|
|
1041
1041
|
i && u != null && a == null && /* @__PURE__ */ t("div", { css: Ct.past, children: /* @__PURE__ */ t("p", { css: Tt.plain, children: u ?? 0 }) })
|
|
1042
1042
|
] });
|
|
1043
|
-
}, Go =
|
|
1043
|
+
}, Go = pe.memo(ji), Vi = ({
|
|
1044
1044
|
existingPrediction: e,
|
|
1045
1045
|
matchHomeScore: o,
|
|
1046
1046
|
matchAwayScore: i,
|
|
1047
1047
|
pointsAlternative: l = {}
|
|
1048
1048
|
}) => {
|
|
1049
|
-
const { t: d } =
|
|
1050
|
-
if (
|
|
1049
|
+
const { t: d } = ie("common"), [a, u] = $(!1), s = Ce(null);
|
|
1050
|
+
if (Z(() => {
|
|
1051
1051
|
if (!a) return;
|
|
1052
|
-
const B = (
|
|
1053
|
-
s.current && !s.current.contains(
|
|
1052
|
+
const B = (M) => {
|
|
1053
|
+
s.current && !s.current.contains(M.target) && u(!1);
|
|
1054
1054
|
};
|
|
1055
1055
|
return document.addEventListener("mousedown", B), () => document.removeEventListener("mousedown", B);
|
|
1056
1056
|
}, [a]), e.status !== "SETTLED") return null;
|
|
1057
|
-
const m = e.outcome === "CORRECT",
|
|
1057
|
+
const m = e.outcome === "CORRECT", h = Object.keys(l).length > 0 && Object.values(l).every((B) => B === 0), p = !m && e.outcome === "PARTIALLY_CORRECT" && !h, c = m ? "correct" : p ? "partial" : "wrong", y = d(m ? "topX.outcomes.correct" : p ? "topX.outcomes.correctPartial" : "topX.outcomes.incorrect"), v = e.points ?? 0, S = v > 0 ? `${Co(`+${v}`)} ${d("topX.play.pts")}` : `0 ${d("topX.play.pts")}`, C = e.homeScore, I = e.awayScore, R = o != null && i != null, _ = (B) => B > 0 ? 1 : B < 0 ? -1 : 0, T = R && C === o, k = R && I === i, D = R && _(C - I) === _(o - i), O = R && C - I === o - i, Q = Object.keys(l).length > 0, ee = [
|
|
1058
1058
|
{
|
|
1059
1059
|
label: d("topX.outcomes.correctOutcome"),
|
|
1060
|
-
ok:
|
|
1060
|
+
ok: D,
|
|
1061
1061
|
altKey: "CORRECT_OUTCOME_1X2"
|
|
1062
1062
|
},
|
|
1063
1063
|
{
|
|
1064
1064
|
label: d("topX.outcomes.correctHomeGoals"),
|
|
1065
|
-
ok:
|
|
1065
|
+
ok: T,
|
|
1066
1066
|
altKey: "CORRECT_HOME_GOALS"
|
|
1067
1067
|
},
|
|
1068
1068
|
{
|
|
1069
1069
|
label: d("topX.outcomes.correctAwayGoals"),
|
|
1070
|
-
ok:
|
|
1070
|
+
ok: k,
|
|
1071
1071
|
altKey: "CORRECT_AWAY_GOALS"
|
|
1072
1072
|
},
|
|
1073
1073
|
{
|
|
1074
1074
|
label: d("topX.outcomes.correctGoalDiff"),
|
|
1075
|
-
ok:
|
|
1075
|
+
ok: O,
|
|
1076
1076
|
altKey: "CORRECT_GOAL_DIFFERENCE"
|
|
1077
1077
|
}
|
|
1078
|
-
], se =
|
|
1078
|
+
], se = Q ? ee.filter(
|
|
1079
1079
|
(B) => (l[B.altKey] ?? 0) > 0
|
|
1080
|
-
) :
|
|
1081
|
-
return /* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1080
|
+
) : ee;
|
|
1081
|
+
return /* @__PURE__ */ g("div", { ref: s, css: Ei, children: [
|
|
1082
|
+
/* @__PURE__ */ g(
|
|
1083
1083
|
"button",
|
|
1084
1084
|
{
|
|
1085
1085
|
type: "button",
|
|
@@ -1100,7 +1100,7 @@ const zr = (e) => ({
|
|
|
1100
1100
|
strokeLinejoin: "round",
|
|
1101
1101
|
children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
|
|
1102
1102
|
}
|
|
1103
|
-
) : p ? /* @__PURE__ */
|
|
1103
|
+
) : p ? /* @__PURE__ */ g(
|
|
1104
1104
|
"svg",
|
|
1105
1105
|
{
|
|
1106
1106
|
width: "11",
|
|
@@ -1115,7 +1115,7 @@ const zr = (e) => ({
|
|
|
1115
1115
|
/* @__PURE__ */ t("path", { d: "M12 5l7 7-7 7" })
|
|
1116
1116
|
]
|
|
1117
1117
|
}
|
|
1118
|
-
) : /* @__PURE__ */
|
|
1118
|
+
) : /* @__PURE__ */ g(
|
|
1119
1119
|
"svg",
|
|
1120
1120
|
{
|
|
1121
1121
|
width: "10",
|
|
@@ -1131,19 +1131,19 @@ const zr = (e) => ({
|
|
|
1131
1131
|
]
|
|
1132
1132
|
}
|
|
1133
1133
|
),
|
|
1134
|
-
/* @__PURE__ */ t("p", { css: Bi[c], children:
|
|
1134
|
+
/* @__PURE__ */ t("p", { css: Bi[c], children: S })
|
|
1135
1135
|
]
|
|
1136
1136
|
}
|
|
1137
1137
|
),
|
|
1138
|
-
a && /* @__PURE__ */
|
|
1138
|
+
a && /* @__PURE__ */ g("div", { css: $i[c], children: [
|
|
1139
1139
|
/* @__PURE__ */ t("div", { css: Di[c] }),
|
|
1140
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ g("div", { css: Pi, children: [
|
|
1141
1141
|
/* @__PURE__ */ t("p", { css: Ni[c], children: y }),
|
|
1142
|
-
m ? /* @__PURE__ */ t("p", { css: zo, children: d("topX.outcomes.exactScoreDesc") }) : p &&
|
|
1143
|
-
const
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
|
|
1142
|
+
m ? /* @__PURE__ */ t("p", { css: zo, children: d("topX.outcomes.exactScoreDesc") }) : p && R ? /* @__PURE__ */ t("div", { css: Oi, children: se.map(({ label: B, ok: M, altKey: f }) => {
|
|
1143
|
+
const z = l[f] ?? 0;
|
|
1144
|
+
return /* @__PURE__ */ g("div", { css: Ai, children: [
|
|
1145
|
+
/* @__PURE__ */ g("div", { css: Xi, children: [
|
|
1146
|
+
M ? /* @__PURE__ */ t(
|
|
1147
1147
|
"svg",
|
|
1148
1148
|
{
|
|
1149
1149
|
width: "10",
|
|
@@ -1156,7 +1156,7 @@ const zr = (e) => ({
|
|
|
1156
1156
|
css: Fo.ok,
|
|
1157
1157
|
children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
|
|
1158
1158
|
}
|
|
1159
|
-
) : /* @__PURE__ */
|
|
1159
|
+
) : /* @__PURE__ */ g(
|
|
1160
1160
|
"svg",
|
|
1161
1161
|
{
|
|
1162
1162
|
width: "10",
|
|
@@ -1172,20 +1172,20 @@ const zr = (e) => ({
|
|
|
1172
1172
|
]
|
|
1173
1173
|
}
|
|
1174
1174
|
),
|
|
1175
|
-
/* @__PURE__ */ t("p", { css: Wi[
|
|
1175
|
+
/* @__PURE__ */ t("p", { css: Wi[M ? "ok" : "miss"], children: B })
|
|
1176
1176
|
] }),
|
|
1177
|
-
|
|
1178
|
-
Co(`+${
|
|
1177
|
+
z > 0 && /* @__PURE__ */ g("p", { css: Mi[M ? "ok" : "miss"], children: [
|
|
1178
|
+
Co(`+${z}`),
|
|
1179
1179
|
" ",
|
|
1180
1180
|
d("topX.play.pts")
|
|
1181
1181
|
] })
|
|
1182
1182
|
] }, B);
|
|
1183
1183
|
}) }) : !m && !p ? /* @__PURE__ */ t("p", { css: zo, children: d("topX.outcomes.noPointsDesc") }) : null,
|
|
1184
|
-
/* @__PURE__ */ t("p", { css: zi[c], children:
|
|
1184
|
+
/* @__PURE__ */ t("p", { css: zi[c], children: S })
|
|
1185
1185
|
] })
|
|
1186
1186
|
] })
|
|
1187
1187
|
] });
|
|
1188
|
-
}, Ki =
|
|
1188
|
+
}, Ki = pe.memo(Vi), Ui = ({
|
|
1189
1189
|
isLive: e,
|
|
1190
1190
|
isPast: o,
|
|
1191
1191
|
isLocked: i,
|
|
@@ -1195,29 +1195,29 @@ const zr = (e) => ({
|
|
|
1195
1195
|
matchAwayScore: u,
|
|
1196
1196
|
existingPrediction: s,
|
|
1197
1197
|
pointsAlternative: m,
|
|
1198
|
-
isDirty:
|
|
1198
|
+
isDirty: h,
|
|
1199
1199
|
canEdit: p,
|
|
1200
1200
|
submitting: c,
|
|
1201
1201
|
onConfirm: y,
|
|
1202
1202
|
onStartEdit: v,
|
|
1203
|
-
onCancelEdit:
|
|
1203
|
+
onCancelEdit: S
|
|
1204
1204
|
}) => {
|
|
1205
|
-
const { t: C } =
|
|
1206
|
-
return e ? /* @__PURE__ */
|
|
1205
|
+
const { t: C } = ie("common");
|
|
1206
|
+
return e ? /* @__PURE__ */ g("div", { css: fi, children: [
|
|
1207
1207
|
/* @__PURE__ */ t("div", { css: yi }),
|
|
1208
1208
|
C("topX.play.live")
|
|
1209
|
-
] }) : d && p && !o && !e ? /* @__PURE__ */
|
|
1210
|
-
|
|
1209
|
+
] }) : d && p && !o && !e ? /* @__PURE__ */ g("div", { css: bi, children: [
|
|
1210
|
+
S && /* @__PURE__ */ t(
|
|
1211
1211
|
"button",
|
|
1212
1212
|
{
|
|
1213
1213
|
type: "button",
|
|
1214
|
-
onClick:
|
|
1214
|
+
onClick: S,
|
|
1215
1215
|
disabled: c,
|
|
1216
1216
|
css: xi,
|
|
1217
1217
|
children: C("topX.play.cancelEdit", "Cancel")
|
|
1218
1218
|
}
|
|
1219
1219
|
),
|
|
1220
|
-
|
|
1220
|
+
h && y && /* @__PURE__ */ t(
|
|
1221
1221
|
"button",
|
|
1222
1222
|
{
|
|
1223
1223
|
type: "button",
|
|
@@ -1261,7 +1261,7 @@ const zr = (e) => ({
|
|
|
1261
1261
|
onClick: v,
|
|
1262
1262
|
title: C("topX.play.editButton", "Edit"),
|
|
1263
1263
|
css: Si,
|
|
1264
|
-
children: /* @__PURE__ */
|
|
1264
|
+
children: /* @__PURE__ */ g(
|
|
1265
1265
|
"svg",
|
|
1266
1266
|
{
|
|
1267
1267
|
width: "14",
|
|
@@ -1288,7 +1288,7 @@ const zr = (e) => ({
|
|
|
1288
1288
|
pointsAlternative: m
|
|
1289
1289
|
}
|
|
1290
1290
|
) : /* @__PURE__ */ t("p", { css: wi, children: C("topX.play.noPredictionMade", "No prediction made") }) : null;
|
|
1291
|
-
}, Yi =
|
|
1291
|
+
}, Yi = pe.memo(Ui), qi = ({
|
|
1292
1292
|
match: e,
|
|
1293
1293
|
existingPrediction: o,
|
|
1294
1294
|
homeScore: i,
|
|
@@ -1298,58 +1298,58 @@ const zr = (e) => ({
|
|
|
1298
1298
|
onDecrement: u,
|
|
1299
1299
|
matchOdds: s,
|
|
1300
1300
|
oddsLoading: m,
|
|
1301
|
-
pointsAlternative:
|
|
1301
|
+
pointsAlternative: h,
|
|
1302
1302
|
matchCardBgImageUrl: p,
|
|
1303
1303
|
canEdit: c,
|
|
1304
1304
|
isEditing: y,
|
|
1305
1305
|
submitting: v,
|
|
1306
|
-
readOnly:
|
|
1306
|
+
readOnly: S,
|
|
1307
1307
|
lockedByGame: C,
|
|
1308
1308
|
onConfirm: I,
|
|
1309
|
-
onStartEdit:
|
|
1310
|
-
onCancelEdit:
|
|
1309
|
+
onStartEdit: R,
|
|
1310
|
+
onCancelEdit: _
|
|
1311
1311
|
}) => {
|
|
1312
|
-
const { t:
|
|
1312
|
+
const { t: T } = ie("common"), { betslip: k, odds: D } = Ye(), { language: O } = ao(co), Q = K(
|
|
1313
1313
|
() => new Date(e.kickoffAt),
|
|
1314
1314
|
[e.kickoffAt]
|
|
1315
|
-
),
|
|
1315
|
+
), ee = e.status === "FINISHED", se = e.status === "LIVE", B = Q < /* @__PURE__ */ new Date() && ee, M = 15 * 60 * 1e3, f = S || C || !ee && (se || Date.now() >= Q.getTime() - M), z = e.homeScore ?? null, H = e.awayScore ?? null, ne = !!o, te = ne && !y, { predictedOutcome: U } = Vr({
|
|
1316
1316
|
matchId: e.id,
|
|
1317
1317
|
homeScore: i,
|
|
1318
1318
|
awayScore: l,
|
|
1319
|
-
betslipTrigger:
|
|
1319
|
+
betslipTrigger: k ? k.trigger ?? "predictions-only" : void 0,
|
|
1320
1320
|
isDirty: d
|
|
1321
|
-
}),
|
|
1321
|
+
}), re = j(
|
|
1322
1322
|
() => a(e.id, "home"),
|
|
1323
1323
|
[e.id, a]
|
|
1324
|
-
), be =
|
|
1324
|
+
), be = j(
|
|
1325
1325
|
() => u(e.id, "home"),
|
|
1326
1326
|
[e.id, u]
|
|
1327
|
-
), Oe =
|
|
1327
|
+
), Oe = j(
|
|
1328
1328
|
() => a(e.id, "away"),
|
|
1329
1329
|
[e.id, a]
|
|
1330
|
-
),
|
|
1330
|
+
), ue = j(
|
|
1331
1331
|
() => u(e.id, "away"),
|
|
1332
1332
|
[e.id, u]
|
|
1333
|
-
), Ae =
|
|
1334
|
-
(
|
|
1335
|
-
(
|
|
1333
|
+
), Ae = j(
|
|
1334
|
+
(ae) => {
|
|
1335
|
+
(k == null ? void 0 : k.trigger) === "odds-only" && Bn.setSelection(`${e.id}:${ae.market}:${ae.pick}`);
|
|
1336
1336
|
},
|
|
1337
|
-
[e.id,
|
|
1338
|
-
),
|
|
1337
|
+
[e.id, k == null ? void 0 : k.trigger]
|
|
1338
|
+
), me = te && !B && !f, Ze = (o == null ? void 0 : o.status) === "SETTLED", _e = o == null ? void 0 : o.outcome, q = B && Ze ? _e === "CORRECT" ? "correct" : _e === "PARTIALLY_CORRECT" ? "partial" : "wrong" : me ? "predicted" : "none";
|
|
1339
1339
|
if (v && y)
|
|
1340
1340
|
return /* @__PURE__ */ t(io, {});
|
|
1341
|
-
const xe = f && !B &&
|
|
1342
|
-
return /* @__PURE__ */
|
|
1341
|
+
const xe = f && !B && z != null && o ? [T("topX.play.you"), T("topX.play.columnResult")] : B && z != null ? o ? [T("topX.play.you"), T("topX.play.columnResult")] : [T("topX.play.columnResult")] : null;
|
|
1342
|
+
return /* @__PURE__ */ g(
|
|
1343
1343
|
"div",
|
|
1344
1344
|
{
|
|
1345
|
-
css: ei[
|
|
1345
|
+
css: ei[q],
|
|
1346
1346
|
style: p ? { backgroundImage: `url(${p})` } : void 0,
|
|
1347
1347
|
children: [
|
|
1348
1348
|
/* @__PURE__ */ t(
|
|
1349
1349
|
Zr,
|
|
1350
1350
|
{
|
|
1351
|
-
kickoffDate:
|
|
1352
|
-
locale:
|
|
1351
|
+
kickoffDate: Q,
|
|
1352
|
+
locale: O ?? void 0,
|
|
1353
1353
|
rightContent: /* @__PURE__ */ t(
|
|
1354
1354
|
Yi,
|
|
1355
1355
|
{
|
|
@@ -1357,31 +1357,31 @@ const zr = (e) => ({
|
|
|
1357
1357
|
isPast: B,
|
|
1358
1358
|
isPredicted: te,
|
|
1359
1359
|
isLocked: f,
|
|
1360
|
-
hasExistingPrediction:
|
|
1360
|
+
hasExistingPrediction: ne,
|
|
1361
1361
|
isEditing: !!y,
|
|
1362
|
-
matchHomeScore:
|
|
1362
|
+
matchHomeScore: z,
|
|
1363
1363
|
matchAwayScore: H,
|
|
1364
1364
|
existingPrediction: o,
|
|
1365
|
-
pointsAlternative:
|
|
1365
|
+
pointsAlternative: h,
|
|
1366
1366
|
isDirty: d,
|
|
1367
1367
|
canEdit: c,
|
|
1368
1368
|
submitting: v,
|
|
1369
1369
|
onConfirm: I,
|
|
1370
|
-
onStartEdit:
|
|
1371
|
-
onCancelEdit:
|
|
1370
|
+
onStartEdit: R,
|
|
1371
|
+
onCancelEdit: _
|
|
1372
1372
|
}
|
|
1373
1373
|
)
|
|
1374
1374
|
}
|
|
1375
1375
|
),
|
|
1376
|
-
xe && /* @__PURE__ */ t("div", { css: ti, children: xe.map((
|
|
1376
|
+
xe && /* @__PURE__ */ t("div", { css: ti, children: xe.map((ae, Xe, Ge) => /* @__PURE__ */ t(
|
|
1377
1377
|
"p",
|
|
1378
1378
|
{
|
|
1379
1379
|
css: oi[Ge.length === 1 ? 48 : Xe === 0 ? 36 : 42],
|
|
1380
|
-
children:
|
|
1380
|
+
children: ae
|
|
1381
1381
|
},
|
|
1382
1382
|
Xe
|
|
1383
1383
|
)) }),
|
|
1384
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ g("div", { css: ni, children: [
|
|
1385
1385
|
/* @__PURE__ */ t(
|
|
1386
1386
|
Go,
|
|
1387
1387
|
{
|
|
@@ -1391,10 +1391,10 @@ const zr = (e) => ({
|
|
|
1391
1391
|
isPredicted: te,
|
|
1392
1392
|
isLocked: f,
|
|
1393
1393
|
existingPredictionScore: (o == null ? void 0 : o.homeScore) ?? null,
|
|
1394
|
-
matchScore:
|
|
1395
|
-
onIncrement:
|
|
1394
|
+
matchScore: z,
|
|
1395
|
+
onIncrement: re,
|
|
1396
1396
|
onDecrement: be,
|
|
1397
|
-
readOnly:
|
|
1397
|
+
readOnly: S
|
|
1398
1398
|
}
|
|
1399
1399
|
),
|
|
1400
1400
|
/* @__PURE__ */ t(
|
|
@@ -1408,25 +1408,25 @@ const zr = (e) => ({
|
|
|
1408
1408
|
existingPredictionScore: (o == null ? void 0 : o.awayScore) ?? null,
|
|
1409
1409
|
matchScore: H,
|
|
1410
1410
|
onIncrement: Oe,
|
|
1411
|
-
onDecrement:
|
|
1412
|
-
readOnly:
|
|
1411
|
+
onDecrement: ue,
|
|
1412
|
+
readOnly: S
|
|
1413
1413
|
}
|
|
1414
1414
|
)
|
|
1415
1415
|
] }),
|
|
1416
|
-
!B && !
|
|
1417
|
-
f && !te && /* @__PURE__ */ t("div", { css: ii, children:
|
|
1418
|
-
!f &&
|
|
1419
|
-
!f &&
|
|
1416
|
+
!B && !S && /* @__PURE__ */ g("div", { css: ri, children: [
|
|
1417
|
+
f && !te && /* @__PURE__ */ t("div", { css: ii, children: T("topX.play.predictionsClosed") }),
|
|
1418
|
+
!f && U && m && !s && /* @__PURE__ */ t(xr, { size: "dense" }),
|
|
1419
|
+
!f && U && s && /* @__PURE__ */ t(
|
|
1420
1420
|
vr,
|
|
1421
1421
|
{
|
|
1422
1422
|
odds: s,
|
|
1423
1423
|
market: "FT_1X2",
|
|
1424
|
-
picks: [
|
|
1424
|
+
picks: [U.outcomeKey],
|
|
1425
1425
|
size: "dense",
|
|
1426
1426
|
bare: !0,
|
|
1427
|
-
mode:
|
|
1428
|
-
flashInterval:
|
|
1429
|
-
linkPrices: (
|
|
1427
|
+
mode: D.mode ?? "default",
|
|
1428
|
+
flashInterval: D.flashInterval,
|
|
1429
|
+
linkPrices: (k == null ? void 0 : k.trigger) !== "odds-only",
|
|
1430
1430
|
onSelect: Ae
|
|
1431
1431
|
}
|
|
1432
1432
|
)
|
|
@@ -1434,20 +1434,20 @@ const zr = (e) => ({
|
|
|
1434
1434
|
]
|
|
1435
1435
|
}
|
|
1436
1436
|
);
|
|
1437
|
-
}, Ji =
|
|
1437
|
+
}, Ji = pe.memo(qi), Nt = "var(--fu-ucrc-topx-status)", Ho = {
|
|
1438
1438
|
PENDING: "var(--fu-ucrc-warning-plain-color, #d97706)",
|
|
1439
1439
|
OPEN: "var(--fu-ucrc-success-plain-color, #16a34a)",
|
|
1440
1440
|
LIVE: "var(--fu-ucrc-danger-plain-color, #dc2626)",
|
|
1441
1441
|
CLOSED: x("textSecondary"),
|
|
1442
1442
|
SETTLED: `var(--fu-ucrc-primary-plain-color, ${x("textPrimary")})`,
|
|
1443
1443
|
CANCELED: "var(--fu-ucrc-danger-plain-color, #dc2626)"
|
|
1444
|
-
}, Ot = x("outlineEnabledBorder"),
|
|
1445
|
-
"0%, 100%": { outlineColor:
|
|
1444
|
+
}, Ot = x("outlineEnabledBorder"), zn = Ie(Nt, 0.2), Zi = ye({
|
|
1445
|
+
"0%, 100%": { outlineColor: zn },
|
|
1446
1446
|
"50%": { outlineColor: Ie(Nt, 0) }
|
|
1447
|
-
}),
|
|
1447
|
+
}), Fn = {
|
|
1448
1448
|
backgroundColor: "var(--fu-ucrc-topx-step)",
|
|
1449
1449
|
opacity: "var(--fu-ucrc-topx-step-opacity)"
|
|
1450
|
-
},
|
|
1450
|
+
}, _n = { ...Fn, borderRadius: "50%", flexShrink: 0 }, jo = { ..._n, width: "12px", height: "12px", outline: `3px solid ${zn}` }, Vo = {
|
|
1451
1451
|
width: "40px",
|
|
1452
1452
|
height: "40px",
|
|
1453
1453
|
display: "flex",
|
|
@@ -1461,7 +1461,7 @@ const zr = (e) => ({
|
|
|
1461
1461
|
padding: 0,
|
|
1462
1462
|
transition: "transform 0.15s",
|
|
1463
1463
|
flexShrink: 0
|
|
1464
|
-
},
|
|
1464
|
+
}, Y = {
|
|
1465
1465
|
root: n({
|
|
1466
1466
|
display: "flex",
|
|
1467
1467
|
alignItems: "center",
|
|
@@ -1515,8 +1515,8 @@ const zr = (e) => ({
|
|
|
1515
1515
|
marginLeft: "auto",
|
|
1516
1516
|
marginRight: "auto"
|
|
1517
1517
|
}),
|
|
1518
|
-
line: n({ ...
|
|
1519
|
-
dot: n({ ...
|
|
1518
|
+
line: n({ ...Fn, flex: 1, height: "2px" }),
|
|
1519
|
+
dot: n({ ..._n, width: "8px", height: "8px" }),
|
|
1520
1520
|
dotCurrent: n(jo),
|
|
1521
1521
|
dotPulsing: n({ ...jo, animation: `${Zi} 1.2s ease-in-out infinite` }),
|
|
1522
1522
|
labelRow: n({ display: "flex", justifyContent: "center", marginTop: r("3xs") }),
|
|
@@ -1626,37 +1626,37 @@ const zr = (e) => ({
|
|
|
1626
1626
|
"--fu-ucrc-topx-step": e,
|
|
1627
1627
|
"--fu-ucrc-topx-step-opacity": o
|
|
1628
1628
|
}), ns = ({ status: e }) => {
|
|
1629
|
-
const { t: o } =
|
|
1630
|
-
return /* @__PURE__ */
|
|
1629
|
+
const { t: o } = ie("common"), [i, l] = $(!1), d = e === "CANCELED", a = d ? -1 : Ko.findIndex((m) => m === e), u = Ho[e], s = e === "LIVE";
|
|
1630
|
+
return /* @__PURE__ */ g(
|
|
1631
1631
|
"div",
|
|
1632
1632
|
{
|
|
1633
|
-
css:
|
|
1633
|
+
css: Y.timeline,
|
|
1634
1634
|
style: { "--fu-ucrc-topx-status": u },
|
|
1635
1635
|
children: [
|
|
1636
|
-
/* @__PURE__ */ t("div", { css:
|
|
1637
|
-
const p =
|
|
1636
|
+
/* @__PURE__ */ t("div", { css: Y.track, children: Ko.map((m, h) => {
|
|
1637
|
+
const p = h === a, c = h < a, y = Ho[m], v = d ? u : p || c ? y : Ot, S = d ? 0.55 : c ? Uo : 1;
|
|
1638
1638
|
let C = Ot, I = 1;
|
|
1639
|
-
return d ? (C = u, I = 0.4) :
|
|
1640
|
-
|
|
1639
|
+
return d ? (C = u, I = 0.4) : h < a ? (C = y, I = Uo) : h === a && (C = y, I = 1), /* @__PURE__ */ g(pe.Fragment, { children: [
|
|
1640
|
+
h > 0 && /* @__PURE__ */ t("div", { css: Y.line, style: Yo(C, I) }),
|
|
1641
1641
|
/* @__PURE__ */ t(
|
|
1642
1642
|
"div",
|
|
1643
1643
|
{
|
|
1644
|
-
css: p ? s ?
|
|
1645
|
-
style: Yo(v,
|
|
1644
|
+
css: p ? s ? Y.dotPulsing : Y.dotCurrent : Y.dot,
|
|
1645
|
+
style: Yo(v, S)
|
|
1646
1646
|
}
|
|
1647
1647
|
)
|
|
1648
1648
|
] }, m);
|
|
1649
1649
|
}) }),
|
|
1650
|
-
/* @__PURE__ */ t("div", { css:
|
|
1650
|
+
/* @__PURE__ */ t("div", { css: Y.labelRow, children: /* @__PURE__ */ g(
|
|
1651
1651
|
"div",
|
|
1652
1652
|
{
|
|
1653
|
-
css:
|
|
1653
|
+
css: Y.labelAnchor,
|
|
1654
1654
|
onMouseEnter: () => l(!0),
|
|
1655
1655
|
onMouseLeave: () => l(!1),
|
|
1656
1656
|
children: [
|
|
1657
|
-
/* @__PURE__ */ t("span", { css:
|
|
1658
|
-
/* @__PURE__ */ t("span", { css:
|
|
1659
|
-
i && /* @__PURE__ */ t("div", { css:
|
|
1657
|
+
/* @__PURE__ */ t("span", { css: Y.label, children: o(ts[e]) }),
|
|
1658
|
+
/* @__PURE__ */ t("span", { css: Y.info, children: "ⓘ" }),
|
|
1659
|
+
i && /* @__PURE__ */ t("div", { css: Y.tooltip, children: o(os[e]) })
|
|
1660
1660
|
]
|
|
1661
1661
|
}
|
|
1662
1662
|
) })
|
|
@@ -1672,29 +1672,29 @@ const zr = (e) => ({
|
|
|
1672
1672
|
gameNavLabel: a = "gameWeek"
|
|
1673
1673
|
}) => {
|
|
1674
1674
|
var y;
|
|
1675
|
-
const { t: u } =
|
|
1676
|
-
return /* @__PURE__ */
|
|
1675
|
+
const { t: u } = ie("common"), s = o <= 0, m = o >= e.length - 1, h = u("topX.play.gameweek", { index: o + 1 }), p = a === "gameWeek" ? h : (i == null ? void 0 : i.title) || h, c = a === "titleAndDescription" && ((y = i == null ? void 0 : i.description) == null ? void 0 : y.trim()) || null;
|
|
1676
|
+
return /* @__PURE__ */ g("div", { css: Y.root, children: [
|
|
1677
1677
|
/* @__PURE__ */ t(
|
|
1678
1678
|
"button",
|
|
1679
1679
|
{
|
|
1680
1680
|
type: "button",
|
|
1681
1681
|
disabled: s,
|
|
1682
1682
|
onClick: l,
|
|
1683
|
-
css: s ?
|
|
1683
|
+
css: s ? Y.buttonDisabled : Y.button,
|
|
1684
1684
|
children: /* @__PURE__ */ t($t, { children: /* @__PURE__ */ t(Qi, {}) })
|
|
1685
1685
|
}
|
|
1686
1686
|
),
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */ t("p", { css:
|
|
1687
|
+
/* @__PURE__ */ g("div", { css: Y.center, children: [
|
|
1688
|
+
/* @__PURE__ */ t("p", { css: Y.title, children: p }),
|
|
1689
1689
|
c && /* @__PURE__ */ t(
|
|
1690
1690
|
"div",
|
|
1691
1691
|
{
|
|
1692
|
-
css:
|
|
1692
|
+
css: Y.description,
|
|
1693
1693
|
dir: "auto",
|
|
1694
1694
|
dangerouslySetInnerHTML: { __html: c }
|
|
1695
1695
|
}
|
|
1696
1696
|
),
|
|
1697
|
-
i && /* @__PURE__ */ t("div", { css:
|
|
1697
|
+
i && /* @__PURE__ */ t("div", { css: Y.timelineWrap, children: /* @__PURE__ */ t(ns, { status: i.status }) })
|
|
1698
1698
|
] }),
|
|
1699
1699
|
/* @__PURE__ */ t(
|
|
1700
1700
|
"button",
|
|
@@ -1702,19 +1702,19 @@ const zr = (e) => ({
|
|
|
1702
1702
|
type: "button",
|
|
1703
1703
|
disabled: m,
|
|
1704
1704
|
onClick: d,
|
|
1705
|
-
css: m ?
|
|
1705
|
+
css: m ? Y.buttonDisabled : Y.button,
|
|
1706
1706
|
children: /* @__PURE__ */ t($t, { children: /* @__PURE__ */ t(es, {}) })
|
|
1707
1707
|
}
|
|
1708
1708
|
)
|
|
1709
1709
|
] });
|
|
1710
|
-
}, is =
|
|
1710
|
+
}, is = pe.memo(rs), yt = x("outlineEnabledBorder"), qt = "var(--fu-ucrc-danger-plain-color, #dc2626)", we = {
|
|
1711
1711
|
success: N("success", "plainColor"),
|
|
1712
1712
|
warning: "var(--fu-ucrc-warning-plain-color, #DC6803)",
|
|
1713
1713
|
danger: N("danger", "plainColor"),
|
|
1714
1714
|
primary: N("primary", "plainColor"),
|
|
1715
1715
|
outline: yt,
|
|
1716
1716
|
muted: x("textSecondary")
|
|
1717
|
-
},
|
|
1717
|
+
}, ht = "var(--fu-ucrc-topx-summary)", so = {
|
|
1718
1718
|
backgroundColor: x("surface"),
|
|
1719
1719
|
border: `1px solid ${yt}`,
|
|
1720
1720
|
borderRadius: L("sm"),
|
|
@@ -1733,9 +1733,9 @@ const zr = (e) => ({
|
|
|
1733
1733
|
flex: 1,
|
|
1734
1734
|
height: "8px",
|
|
1735
1735
|
borderRadius: "3px",
|
|
1736
|
-
backgroundColor:
|
|
1736
|
+
backgroundColor: ht,
|
|
1737
1737
|
transition: "background-color 0.3s, box-shadow 0.3s"
|
|
1738
|
-
}, Zo = { flex: 1, height: "6px", borderRadius: "3px", border: `1px dashed ${yt}` },
|
|
1738
|
+
}, Zo = { flex: 1, height: "6px", borderRadius: "3px", border: `1px dashed ${yt}` }, G = {
|
|
1739
1739
|
root: n({ display: "flex", justifyContent: "flex-end" }),
|
|
1740
1740
|
// Desktop caps the card's width; mobile lets it fill the row.
|
|
1741
1741
|
card: { desktop: n({ ...so, maxWidth: "320px" }), mobile: n({ ...so, maxWidth: "100%" }) },
|
|
@@ -1795,12 +1795,12 @@ const zr = (e) => ({
|
|
|
1795
1795
|
total: n({ fontWeight: 400, color: x("textSecondary") }),
|
|
1796
1796
|
bar: n({ display: "flex", gap: "3px", marginBottom: r("2xs") }),
|
|
1797
1797
|
segment: n({ ...Jo, boxShadow: "none" }),
|
|
1798
|
-
segmentPredicted: n({ ...Jo, boxShadow: `0 0 6px ${Ie(
|
|
1798
|
+
segmentPredicted: n({ ...Jo, boxShadow: `0 0 6px ${Ie(ht, 85 / 255)}` }),
|
|
1799
1799
|
legend: n({ display: "flex", justifyContent: "flex-end", gap: "5px", flexWrap: "wrap" }),
|
|
1800
|
-
item: n({ display: "inline-flex", alignItems: "center", gap: r("3xs"), color:
|
|
1800
|
+
item: n({ display: "inline-flex", alignItems: "center", gap: r("3xs"), color: ht, cursor: "default" }),
|
|
1801
1801
|
partialIcon: n({ ...Fe, fontSize: "0.75em", fontWeight: 700, lineHeight: 1, color: "inherit" }),
|
|
1802
|
-
itemCount: n({ ...Fe, fontSize: "0.625em", fontWeight: 700, color:
|
|
1803
|
-
itemLabel: n({ ...Fe, fontSize: "0.5625em", fontWeight: 500, color:
|
|
1802
|
+
itemCount: n({ ...Fe, fontSize: "0.625em", fontWeight: 700, color: ht, lineHeight: 1 }),
|
|
1803
|
+
itemLabel: n({ ...Fe, fontSize: "0.5625em", fontWeight: 500, color: ht, lineHeight: 1, opacity: 0.8 }),
|
|
1804
1804
|
pending: n({ ...Fe, fontSize: "0.6875em", color: x("textSecondary"), textAlign: "right" })
|
|
1805
1805
|
}, Qo = (e) => ({ "--fu-ucrc-topx-summary": e }), ss = ({
|
|
1806
1806
|
matches: e,
|
|
@@ -1811,11 +1811,11 @@ const zr = (e) => ({
|
|
|
1811
1811
|
mobile: a,
|
|
1812
1812
|
gameStatus: u
|
|
1813
1813
|
}) => {
|
|
1814
|
-
const { t: s } =
|
|
1814
|
+
const { t: s } = ie("common"), m = a ? "mobile" : "desktop";
|
|
1815
1815
|
if (u === "CANCELED")
|
|
1816
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1817
|
-
/* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */ t("div", { css:
|
|
1816
|
+
return /* @__PURE__ */ t("div", { css: G.root, children: /* @__PURE__ */ g("div", { css: G.voidCard[m], children: [
|
|
1817
|
+
/* @__PURE__ */ g("div", { css: G.voidRow, children: [
|
|
1818
|
+
/* @__PURE__ */ t("div", { css: G.voidIcon, children: /* @__PURE__ */ g(
|
|
1819
1819
|
"svg",
|
|
1820
1820
|
{
|
|
1821
1821
|
width: "20",
|
|
@@ -1832,26 +1832,26 @@ const zr = (e) => ({
|
|
|
1832
1832
|
]
|
|
1833
1833
|
}
|
|
1834
1834
|
) }),
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */ t("p", { css:
|
|
1837
|
-
/* @__PURE__ */ t("p", { css:
|
|
1835
|
+
/* @__PURE__ */ g("div", { css: G.voidText, children: [
|
|
1836
|
+
/* @__PURE__ */ t("p", { css: G.voidTitle, children: s("topX.play.voidTitle", "Void") }),
|
|
1837
|
+
/* @__PURE__ */ t("p", { css: G.voidMessage, children: s(
|
|
1838
1838
|
"topX.play.voidMessage",
|
|
1839
1839
|
"Game cancelled — your predictions are void."
|
|
1840
1840
|
) })
|
|
1841
1841
|
] })
|
|
1842
1842
|
] }),
|
|
1843
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ g("div", { css: G.voidBar, children: [
|
|
1844
1844
|
e.map((p) => /* @__PURE__ */ t(
|
|
1845
1845
|
"div",
|
|
1846
1846
|
{
|
|
1847
|
-
css: o.has(p.id) ?
|
|
1847
|
+
css: o.has(p.id) ? G.voidSegmentPredicted : G.voidSegment
|
|
1848
1848
|
},
|
|
1849
1849
|
p.id
|
|
1850
1850
|
)),
|
|
1851
|
-
/* @__PURE__ */ t("div", { css:
|
|
1851
|
+
/* @__PURE__ */ t("div", { css: G.voidStrike })
|
|
1852
1852
|
] })
|
|
1853
1853
|
] }) });
|
|
1854
|
-
const
|
|
1854
|
+
const h = [
|
|
1855
1855
|
{
|
|
1856
1856
|
count: l.correct,
|
|
1857
1857
|
color: we.success,
|
|
@@ -1875,13 +1875,13 @@ const zr = (e) => ({
|
|
|
1875
1875
|
count: l.partial,
|
|
1876
1876
|
color: we.warning,
|
|
1877
1877
|
label: s("topX.outcomes.correctPartial", "Partial"),
|
|
1878
|
-
icon: /* @__PURE__ */ t("span", { css:
|
|
1878
|
+
icon: /* @__PURE__ */ t("span", { css: G.partialIcon, children: "~" })
|
|
1879
1879
|
},
|
|
1880
1880
|
{
|
|
1881
1881
|
count: l.incorrect,
|
|
1882
1882
|
color: we.danger,
|
|
1883
1883
|
label: s("topX.outcomes.incorrect", "Wrong"),
|
|
1884
|
-
icon: /* @__PURE__ */
|
|
1884
|
+
icon: /* @__PURE__ */ g(
|
|
1885
1885
|
"svg",
|
|
1886
1886
|
{
|
|
1887
1887
|
width: "9",
|
|
@@ -1923,39 +1923,39 @@ const zr = (e) => ({
|
|
|
1923
1923
|
)
|
|
1924
1924
|
}
|
|
1925
1925
|
];
|
|
1926
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1927
|
-
/* @__PURE__ */
|
|
1928
|
-
/* @__PURE__ */ t("p", { css:
|
|
1929
|
-
/* @__PURE__ */
|
|
1926
|
+
return /* @__PURE__ */ t("div", { css: G.root, children: /* @__PURE__ */ g("div", { css: G.card[m], children: [
|
|
1927
|
+
/* @__PURE__ */ g("div", { css: G.header, children: [
|
|
1928
|
+
/* @__PURE__ */ t("p", { css: G.label, children: s("topX.play.yourPredictions", "Your Predictions") }),
|
|
1929
|
+
/* @__PURE__ */ g("p", { css: G.count, children: [
|
|
1930
1930
|
i,
|
|
1931
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ g("span", { css: G.total, children: [
|
|
1932
1932
|
"/",
|
|
1933
1933
|
e.length
|
|
1934
1934
|
] })
|
|
1935
1935
|
] })
|
|
1936
1936
|
] }),
|
|
1937
|
-
/* @__PURE__ */ t("div", { css:
|
|
1937
|
+
/* @__PURE__ */ t("div", { css: G.bar, children: e.map((p) => {
|
|
1938
1938
|
const c = o.get(p.id);
|
|
1939
1939
|
let y;
|
|
1940
1940
|
return c ? c.status === "SETTLED" ? c.outcome === "CORRECT" ? y = we.success : c.outcome === "PARTIALLY_CORRECT" ? y = we.warning : y = we.danger : y = we.primary : y = we.outline, /* @__PURE__ */ t(
|
|
1941
1941
|
"div",
|
|
1942
1942
|
{
|
|
1943
|
-
css: c ?
|
|
1943
|
+
css: c ? G.segmentPredicted : G.segment,
|
|
1944
1944
|
style: Qo(y)
|
|
1945
1945
|
},
|
|
1946
1946
|
p.id
|
|
1947
1947
|
);
|
|
1948
1948
|
}) }),
|
|
1949
|
-
d ? /* @__PURE__ */ t("div", { css:
|
|
1949
|
+
d ? /* @__PURE__ */ t("div", { css: G.legend, children: h.filter((p) => p.count > 0).map((p, c) => /* @__PURE__ */ g("div", { css: G.item, style: Qo(p.color), children: [
|
|
1950
1950
|
p.icon,
|
|
1951
|
-
/* @__PURE__ */ t("p", { css:
|
|
1952
|
-
/* @__PURE__ */ t("p", { css:
|
|
1951
|
+
/* @__PURE__ */ t("p", { css: G.itemCount, children: p.count }),
|
|
1952
|
+
/* @__PURE__ */ t("p", { css: G.itemLabel, children: p.label })
|
|
1953
1953
|
] }, c)) }) : (
|
|
1954
1954
|
// CLOSED but not yet settled → predictions are in, awaiting results
|
|
1955
|
-
/* @__PURE__ */ t("p", { css:
|
|
1955
|
+
/* @__PURE__ */ t("p", { css: G.pending, children: s("topX.play.pendingResults", "Awaiting results") })
|
|
1956
1956
|
)
|
|
1957
1957
|
] }) });
|
|
1958
|
-
}, as =
|
|
1958
|
+
}, as = pe.memo(ss), Gn = N("primary", "plainColor"), cs = "var(--fu-ucrc-primary-on-primary, #fff)", ls = `var(--fu-ucrc-primary-primary-container, color-mix(in srgb, ${Gn} 75%, #000 25%))`, It = { ...Te, color: cs }, en = (e) => ({
|
|
1959
1959
|
participation: n({
|
|
1960
1960
|
...It,
|
|
1961
1961
|
fontFamily: P.primary,
|
|
@@ -2014,46 +2014,46 @@ const zr = (e) => ({
|
|
|
2014
2014
|
paddingLeft: r("md"),
|
|
2015
2015
|
paddingRight: r("md"),
|
|
2016
2016
|
// The client's button gradient when set, else the hero header's.
|
|
2017
|
-
background: `var(--fu-ucrc-primary-primary-button-gradient, linear-gradient(to right, ${
|
|
2017
|
+
background: `var(--fu-ucrc-primary-primary-button-gradient, linear-gradient(to right, ${Gn}, ${ls}))`,
|
|
2018
2018
|
borderRadius: L("sm")
|
|
2019
2019
|
}),
|
|
2020
2020
|
desktop: en(!1),
|
|
2021
2021
|
mobile: en(!0)
|
|
2022
2022
|
}, ds = ({ predictionsCutoff: e }) => {
|
|
2023
|
-
const { t: o } =
|
|
2024
|
-
const
|
|
2023
|
+
const { t: o } = ie("common"), i = $n(), l = j(() => {
|
|
2024
|
+
const h = (/* @__PURE__ */ new Date()).getTime(), c = new Date(e).getTime() - h;
|
|
2025
2025
|
if (c <= 0)
|
|
2026
2026
|
return { days: 0, hours: 0, minutes: 0, seconds: 0, total: 0 };
|
|
2027
2027
|
const y = Math.floor(c / (1e3 * 60 * 60 * 24)), v = Math.floor(
|
|
2028
2028
|
c % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
2029
|
-
),
|
|
2030
|
-
return { days: y, hours: v, minutes:
|
|
2031
|
-
}, [e]), [d, a] =
|
|
2029
|
+
), S = Math.floor(c % (1e3 * 60 * 60) / (1e3 * 60)), C = Math.floor(c % (1e3 * 60) / 1e3);
|
|
2030
|
+
return { days: y, hours: v, minutes: S, seconds: C, total: c };
|
|
2031
|
+
}, [e]), [d, a] = $({
|
|
2032
2032
|
days: 0,
|
|
2033
2033
|
hours: 0,
|
|
2034
2034
|
minutes: 0,
|
|
2035
2035
|
seconds: 0,
|
|
2036
2036
|
total: 0
|
|
2037
2037
|
});
|
|
2038
|
-
if (
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
const p = setInterval(
|
|
2038
|
+
if (Z(() => {
|
|
2039
|
+
const h = () => a(l());
|
|
2040
|
+
h();
|
|
2041
|
+
const p = setInterval(h, 1e3);
|
|
2042
2042
|
return () => clearInterval(p);
|
|
2043
2043
|
}, [l]), d.total <= 0)
|
|
2044
2044
|
return null;
|
|
2045
|
-
const u = i ? "mobile" : "desktop", s = (
|
|
2046
|
-
/* @__PURE__ */ t("p", { css: Ke[u].value, children:
|
|
2045
|
+
const u = i ? "mobile" : "desktop", s = (h, p) => /* @__PURE__ */ g("div", { css: Ke[u].unit, children: [
|
|
2046
|
+
/* @__PURE__ */ t("p", { css: Ke[u].value, children: h.toString().padStart(2, "0") }),
|
|
2047
2047
|
/* @__PURE__ */ t("p", { css: Ke[u].label, children: p })
|
|
2048
2048
|
] }), m = /* @__PURE__ */ t("p", { css: Ke[u].separator, children: ":" });
|
|
2049
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ g("div", { css: Ke.root, children: [
|
|
2050
2050
|
/* @__PURE__ */ t("p", { css: Ke[u].participation, children: o("topX.countdown.label") }),
|
|
2051
|
-
/* @__PURE__ */
|
|
2052
|
-
d.days > 0 && /* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ g("div", { css: Ke[u].units, children: [
|
|
2052
|
+
d.days > 0 && /* @__PURE__ */ g(De, { children: [
|
|
2053
2053
|
s(d.days, o("topX.countdown.daysShort")),
|
|
2054
2054
|
m
|
|
2055
2055
|
] }),
|
|
2056
|
-
(d.days > 0 || d.hours > 0) && /* @__PURE__ */
|
|
2056
|
+
(d.days > 0 || d.hours > 0) && /* @__PURE__ */ g(De, { children: [
|
|
2057
2057
|
s(d.hours, o("topX.countdown.hoursShort")),
|
|
2058
2058
|
m
|
|
2059
2059
|
] }),
|
|
@@ -2062,7 +2062,7 @@ const zr = (e) => ({
|
|
|
2062
2062
|
s(d.seconds, o("topX.countdown.secondsShort"))
|
|
2063
2063
|
] })
|
|
2064
2064
|
] });
|
|
2065
|
-
}, $e = N("primary", "plainColor"),
|
|
2065
|
+
}, $e = N("primary", "plainColor"), Hn = x("textPrimary"), Wt = x("textSecondary"), ct = x("surfaceVariant"), mo = x("outlineEnabledBorder"), qe = { ...Rn, fontFamily: P.primary }, jn = ye({ "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.5 } }), Mt = {
|
|
2066
2066
|
width: "100%",
|
|
2067
2067
|
maxWidth: 360,
|
|
2068
2068
|
backgroundColor: x("surface"),
|
|
@@ -2074,16 +2074,16 @@ const zr = (e) => ({
|
|
|
2074
2074
|
paddingBottom: r("sm"),
|
|
2075
2075
|
display: "flex",
|
|
2076
2076
|
flexDirection: "column"
|
|
2077
|
-
}, Je = { backgroundColor: ct, borderRadius: L("xs") }, ps =
|
|
2077
|
+
}, Je = { backgroundColor: ct, borderRadius: L("xs") }, ps = ye({
|
|
2078
2078
|
"0%": { transform: "scale(0.92)" },
|
|
2079
2079
|
"60%": { transform: "scale(1.04)" },
|
|
2080
2080
|
"100%": { transform: "scale(1)" }
|
|
2081
|
-
}), us = n({ ...Mt, gap: r("2xs") }), ms = n({ ...Mt, gap: r("2xs"), animation: `${
|
|
2081
|
+
}), us = n({ ...Mt, gap: r("2xs") }), ms = n({ ...Mt, gap: r("2xs"), animation: `${jn} 2s ease-in-out infinite` }), tn = n({
|
|
2082
2082
|
display: "flex",
|
|
2083
2083
|
alignItems: "center",
|
|
2084
2084
|
justifyContent: "space-between",
|
|
2085
2085
|
gap: r("sm")
|
|
2086
|
-
}),
|
|
2086
|
+
}), hs = n({ ...Je, height: 14, width: "60%" }), gs = n({ ...Je, height: 16, width: 32, flexShrink: 0 }), fs = n({
|
|
2087
2087
|
height: 5,
|
|
2088
2088
|
width: "100%",
|
|
2089
2089
|
backgroundColor: ct,
|
|
@@ -2094,7 +2094,7 @@ const zr = (e) => ({
|
|
|
2094
2094
|
...qe,
|
|
2095
2095
|
fontSize: "0.8125em",
|
|
2096
2096
|
fontWeight: 600,
|
|
2097
|
-
color:
|
|
2097
|
+
color: Hn,
|
|
2098
2098
|
minWidth: 0,
|
|
2099
2099
|
lineHeight: 1.2
|
|
2100
2100
|
}), bs = n({
|
|
@@ -2119,7 +2119,7 @@ const zr = (e) => ({
|
|
|
2119
2119
|
}), xs = { enabled: on(!1), disabled: on(!0) }, vs = n({
|
|
2120
2120
|
display: "block",
|
|
2121
2121
|
position: "absolute",
|
|
2122
|
-
backgroundColor:
|
|
2122
|
+
backgroundColor: fe($e, "22"),
|
|
2123
2123
|
borderRadius: "999px",
|
|
2124
2124
|
height: "5px",
|
|
2125
2125
|
top: "50%",
|
|
@@ -2150,9 +2150,9 @@ const zr = (e) => ({
|
|
|
2150
2150
|
backgroundColor: N("primary", "onPrimary"),
|
|
2151
2151
|
border: `2.5px solid ${$e}`,
|
|
2152
2152
|
boxShadow: "none",
|
|
2153
|
-
"&:hover, &:has(input:focus-visible)": { boxShadow: `0 0 0 6px ${
|
|
2153
|
+
"&:hover, &:has(input:focus-visible)": { boxShadow: `0 0 0 6px ${fe($e, "26")}` },
|
|
2154
2154
|
// Joy's Mui-active came after Mui-focusVisible; the `:has(input)` matches its specificity.
|
|
2155
|
-
"&[data-active], &[data-active]:has(input)": { boxShadow: `0 0 0 8px ${
|
|
2155
|
+
"&[data-active], &[data-active]:has(input)": { boxShadow: `0 0 0 8px ${fe($e, "40")}` },
|
|
2156
2156
|
"&:has(input:focus-visible)": {
|
|
2157
2157
|
outline: "max(4px, 16px / 3.6) solid rgba(var(--fu-ucrc-primary-main-channel) / 0.32)",
|
|
2158
2158
|
outlineOffset: 0
|
|
@@ -2172,7 +2172,7 @@ const zr = (e) => ({
|
|
|
2172
2172
|
...Mt,
|
|
2173
2173
|
fontSize: "1em",
|
|
2174
2174
|
gap: r("xs"),
|
|
2175
|
-
animation: `${
|
|
2175
|
+
animation: `${jn} 2s ease-in-out infinite`
|
|
2176
2176
|
}), rn = n({
|
|
2177
2177
|
display: "grid",
|
|
2178
2178
|
gridTemplateColumns: "1fr 1fr",
|
|
@@ -2232,7 +2232,7 @@ const zr = (e) => ({
|
|
|
2232
2232
|
...qe,
|
|
2233
2233
|
fontSize: "0.8125em",
|
|
2234
2234
|
fontWeight: 700,
|
|
2235
|
-
color:
|
|
2235
|
+
color: Hn,
|
|
2236
2236
|
lineHeight: 1.2,
|
|
2237
2237
|
overflow: "hidden",
|
|
2238
2238
|
textOverflow: "ellipsis",
|
|
@@ -2284,71 +2284,71 @@ const zr = (e) => ({
|
|
|
2284
2284
|
backgroundColor: ct,
|
|
2285
2285
|
borderRadius: L("full"),
|
|
2286
2286
|
flexShrink: 0
|
|
2287
|
-
}), Ue = 1,
|
|
2287
|
+
}), Ue = 1, gt = 90, Gs = 1, un = 10, Jt = (e) => Math.max(Ue, Math.min(gt, e)), Hs = { direction: "ltr" }, js = "translate(-50%, -50%)", Vs = ({
|
|
2288
2288
|
value: e,
|
|
2289
2289
|
onChange: o,
|
|
2290
2290
|
disabled: i,
|
|
2291
2291
|
loading: l
|
|
2292
2292
|
}) => {
|
|
2293
|
-
const { t: d } =
|
|
2294
|
-
(
|
|
2293
|
+
const { t: d } = ie("common"), a = Ce(null), u = Ce(null), [s, m] = $(!1), h = e === "" ? NaN : parseInt(e, 10), p = Number.isNaN(h) ? Gs : h, c = Jt(p), y = (c - Ue) * 100 / (gt - Ue), v = j(
|
|
2294
|
+
(T) => {
|
|
2295
2295
|
if (i) return;
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2296
|
+
const k = Jt(T);
|
|
2297
|
+
k !== c && o(String(k));
|
|
2298
2298
|
},
|
|
2299
2299
|
[i, c, o]
|
|
2300
|
-
),
|
|
2301
|
-
|
|
2302
|
-
const C = (
|
|
2303
|
-
const
|
|
2304
|
-
return Jt(Math.round((
|
|
2300
|
+
), S = Ce(v);
|
|
2301
|
+
S.current = v;
|
|
2302
|
+
const C = (T) => {
|
|
2303
|
+
const k = a.current.getBoundingClientRect(), D = (T - k.left) / k.width;
|
|
2304
|
+
return Jt(Math.round((gt - Ue) * D) + Ue);
|
|
2305
2305
|
};
|
|
2306
|
-
|
|
2307
|
-
var
|
|
2306
|
+
Z(() => {
|
|
2307
|
+
var O;
|
|
2308
2308
|
if (!s) return;
|
|
2309
|
-
const
|
|
2310
|
-
return
|
|
2311
|
-
|
|
2309
|
+
const T = ((O = a.current) == null ? void 0 : O.ownerDocument) ?? document, k = (Q) => S.current(C(Q.clientX)), D = () => m(!1);
|
|
2310
|
+
return T.addEventListener("pointermove", k), T.addEventListener("pointerup", D), T.addEventListener("pointercancel", D), () => {
|
|
2311
|
+
T.removeEventListener("pointermove", k), T.removeEventListener("pointerup", D), T.removeEventListener("pointercancel", D);
|
|
2312
2312
|
};
|
|
2313
2313
|
}, [s]);
|
|
2314
|
-
const I = (
|
|
2315
|
-
var
|
|
2316
|
-
i ||
|
|
2317
|
-
},
|
|
2318
|
-
let
|
|
2319
|
-
(
|
|
2314
|
+
const I = (T) => {
|
|
2315
|
+
var k;
|
|
2316
|
+
i || T.button !== 0 || ((k = u.current) == null || k.focus({ preventScroll: !0 }), m(!0), v(C(T.clientX)));
|
|
2317
|
+
}, R = (T) => {
|
|
2318
|
+
let k = null;
|
|
2319
|
+
(T.key === "ArrowLeft" || T.key === "ArrowDown") && T.shiftKey || T.key === "PageDown" ? k = c - un : ((T.key === "ArrowRight" || T.key === "ArrowUp") && T.shiftKey || T.key === "PageUp") && (k = c + un), k !== null && (v(k), T.preventDefault());
|
|
2320
2320
|
};
|
|
2321
2321
|
if (l)
|
|
2322
|
-
return /* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
/* @__PURE__ */ t("div", { css:
|
|
2325
|
-
/* @__PURE__ */ t("div", { css:
|
|
2322
|
+
return /* @__PURE__ */ g("div", { css: ms, children: [
|
|
2323
|
+
/* @__PURE__ */ g("div", { css: tn, children: [
|
|
2324
|
+
/* @__PURE__ */ t("div", { css: hs }),
|
|
2325
|
+
/* @__PURE__ */ t("div", { css: gs })
|
|
2326
2326
|
] }),
|
|
2327
2327
|
/* @__PURE__ */ t("div", { css: fs })
|
|
2328
2328
|
] });
|
|
2329
|
-
const
|
|
2330
|
-
return /* @__PURE__ */
|
|
2331
|
-
/* @__PURE__ */
|
|
2329
|
+
const _ = i ? "disabled" : "enabled";
|
|
2330
|
+
return /* @__PURE__ */ g("div", { css: us, children: [
|
|
2331
|
+
/* @__PURE__ */ g("div", { css: tn, children: [
|
|
2332
2332
|
/* @__PURE__ */ t("p", { css: ys, children: d("topX.play.tiebreaker.label") }),
|
|
2333
|
-
/* @__PURE__ */
|
|
2333
|
+
/* @__PURE__ */ g("p", { css: bs, children: [
|
|
2334
2334
|
c,
|
|
2335
2335
|
"'"
|
|
2336
2336
|
] }, c)
|
|
2337
2337
|
] }),
|
|
2338
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ g(
|
|
2339
2339
|
"span",
|
|
2340
2340
|
{
|
|
2341
2341
|
ref: a,
|
|
2342
|
-
css: xs[
|
|
2342
|
+
css: xs[_],
|
|
2343
2343
|
onPointerDown: I,
|
|
2344
|
-
onMouseDown: (
|
|
2344
|
+
onMouseDown: (T) => T.preventDefault(),
|
|
2345
2345
|
children: [
|
|
2346
2346
|
/* @__PURE__ */ t("span", { css: vs }),
|
|
2347
2347
|
/* @__PURE__ */ t("span", { css: ks, style: { left: "0%", width: `${y}%` } }),
|
|
2348
2348
|
/* @__PURE__ */ t(
|
|
2349
2349
|
"span",
|
|
2350
2350
|
{
|
|
2351
|
-
css: Ss[
|
|
2351
|
+
css: Ss[_],
|
|
2352
2352
|
"data-active": s && !i ? "" : void 0,
|
|
2353
2353
|
style: { left: `${y}%`, transform: js },
|
|
2354
2354
|
children: /* @__PURE__ */ t(
|
|
@@ -2359,17 +2359,17 @@ const zr = (e) => ({
|
|
|
2359
2359
|
css: ws,
|
|
2360
2360
|
style: Hs,
|
|
2361
2361
|
min: Ue,
|
|
2362
|
-
max:
|
|
2362
|
+
max: gt,
|
|
2363
2363
|
step: 1,
|
|
2364
2364
|
value: c,
|
|
2365
2365
|
disabled: i,
|
|
2366
2366
|
"aria-label": d("topX.play.tiebreaker.label"),
|
|
2367
2367
|
"aria-orientation": "horizontal",
|
|
2368
2368
|
"aria-valuemin": Ue,
|
|
2369
|
-
"aria-valuemax":
|
|
2369
|
+
"aria-valuemax": gt,
|
|
2370
2370
|
"aria-valuenow": c,
|
|
2371
|
-
onChange: (
|
|
2372
|
-
onKeyDown:
|
|
2371
|
+
onChange: (T) => v(T.target.valueAsNumber),
|
|
2372
|
+
onKeyDown: R
|
|
2373
2373
|
}
|
|
2374
2374
|
)
|
|
2375
2375
|
}
|
|
@@ -2391,7 +2391,7 @@ const zr = (e) => ({
|
|
|
2391
2391
|
}, Zt = ({ children: e }) => /* @__PURE__ */ t("p", { css: Es, children: e }), Qt = ({
|
|
2392
2392
|
value: e,
|
|
2393
2393
|
muted: o
|
|
2394
|
-
}) => /* @__PURE__ */
|
|
2394
|
+
}) => /* @__PURE__ */ g("div", { css: Ls, children: [
|
|
2395
2395
|
/* @__PURE__ */ t(
|
|
2396
2396
|
"p",
|
|
2397
2397
|
{
|
|
@@ -2410,47 +2410,47 @@ const zr = (e) => ({
|
|
|
2410
2410
|
goalType: u,
|
|
2411
2411
|
loading: s
|
|
2412
2412
|
}) => {
|
|
2413
|
-
const { t: m } =
|
|
2414
|
-
return s ? /* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2416
|
-
/* @__PURE__ */
|
|
2413
|
+
const { t: m } = ie("common"), h = m(Ks(u));
|
|
2414
|
+
return s ? /* @__PURE__ */ g("div", { css: Ts, children: [
|
|
2415
|
+
/* @__PURE__ */ g("div", { css: rn, children: [
|
|
2416
|
+
/* @__PURE__ */ g("div", { css: sn, children: [
|
|
2417
2417
|
/* @__PURE__ */ t("div", { css: Xs }),
|
|
2418
2418
|
/* @__PURE__ */ t("div", { css: pn })
|
|
2419
2419
|
] }),
|
|
2420
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ g("div", { css: an, children: [
|
|
2421
2421
|
/* @__PURE__ */ t("div", { css: Ws }),
|
|
2422
2422
|
/* @__PURE__ */ t("div", { css: pn })
|
|
2423
2423
|
] })
|
|
2424
2424
|
] }),
|
|
2425
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ g("div", { css: ln, children: [
|
|
2426
2426
|
/* @__PURE__ */ t("div", { css: Ms }),
|
|
2427
|
-
/* @__PURE__ */
|
|
2427
|
+
/* @__PURE__ */ g("div", { css: dn, children: [
|
|
2428
2428
|
/* @__PURE__ */ t("div", { css: zs }),
|
|
2429
2429
|
/* @__PURE__ */ t("div", { css: Fs })
|
|
2430
2430
|
] }),
|
|
2431
2431
|
/* @__PURE__ */ t("div", { css: _s })
|
|
2432
2432
|
] })
|
|
2433
|
-
] }) : /* @__PURE__ */
|
|
2434
|
-
o == null ? /* @__PURE__ */
|
|
2433
|
+
] }) : /* @__PURE__ */ g("div", { css: Cs, children: [
|
|
2434
|
+
o == null ? /* @__PURE__ */ g("div", { css: Is, children: [
|
|
2435
2435
|
/* @__PURE__ */ t(Zt, { children: m("topX.play.goldenGoalResult.actualLabel") }),
|
|
2436
2436
|
/* @__PURE__ */ t(Qt, { value: e })
|
|
2437
|
-
] }) : /* @__PURE__ */
|
|
2438
|
-
/* @__PURE__ */
|
|
2437
|
+
] }) : /* @__PURE__ */ g("div", { css: rn, children: [
|
|
2438
|
+
/* @__PURE__ */ g("div", { css: sn, children: [
|
|
2439
2439
|
/* @__PURE__ */ t(Zt, { children: m("topX.play.goldenGoalResult.actualLabel") }),
|
|
2440
2440
|
/* @__PURE__ */ t(Qt, { value: e })
|
|
2441
2441
|
] }),
|
|
2442
|
-
/* @__PURE__ */
|
|
2442
|
+
/* @__PURE__ */ g("div", { css: an, children: [
|
|
2443
2443
|
/* @__PURE__ */ t(Zt, { children: m("topX.play.goldenGoalResult.yourGuess") }),
|
|
2444
2444
|
/* @__PURE__ */ t(Qt, { value: o, muted: !0 })
|
|
2445
2445
|
] })
|
|
2446
2446
|
] }),
|
|
2447
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ g("div", { css: ln, children: [
|
|
2448
2448
|
/* @__PURE__ */ t(dr, { src: l || void 0, css: $s, children: !l && /* @__PURE__ */ t(Er, { color: x("textSecondary"), size: "0.875em" }) }),
|
|
2449
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ g("div", { css: dn, children: [
|
|
2450
2450
|
/* @__PURE__ */ t("p", { css: Ds, children: i || m("topX.play.goldenGoalResult.unknownPlayer") }),
|
|
2451
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ g("div", { css: Ps, children: [
|
|
2452
2452
|
a ? /* @__PURE__ */ t("img", { src: a, alt: d, css: Ns }) : /* @__PURE__ */ t(
|
|
2453
|
-
|
|
2453
|
+
On,
|
|
2454
2454
|
{
|
|
2455
2455
|
size: "0.75em",
|
|
2456
2456
|
color: x("textSecondary")
|
|
@@ -2459,10 +2459,10 @@ const zr = (e) => ({
|
|
|
2459
2459
|
/* @__PURE__ */ t("p", { css: Os, children: d })
|
|
2460
2460
|
] })
|
|
2461
2461
|
] }),
|
|
2462
|
-
/* @__PURE__ */ t("span", { css: As, children:
|
|
2462
|
+
/* @__PURE__ */ t("span", { css: As, children: h })
|
|
2463
2463
|
] })
|
|
2464
2464
|
] });
|
|
2465
|
-
}, Ys =
|
|
2465
|
+
}, Ys = pe.memo(Us), Vn = N("primary", "plainColor"), qs = N("primary", "onPrimary"), mn = "var(--fu-ucrc-primary-primary-button-gradient, none)", hn = `var(--fu-ucrc-primary-primary-container, ${Vn})`, gn = N("danger", "plainColor"), Js = {
|
|
2466
2466
|
display: "grid",
|
|
2467
2467
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 300px), 1fr))",
|
|
2468
2468
|
gap: r("md")
|
|
@@ -2500,16 +2500,16 @@ const zr = (e) => ({
|
|
|
2500
2500
|
lineHeight: 1.5,
|
|
2501
2501
|
textTransform: "uppercase",
|
|
2502
2502
|
letterSpacing: "0.05em",
|
|
2503
|
-
backgroundColor:
|
|
2503
|
+
backgroundColor: Vn,
|
|
2504
2504
|
backgroundImage: mn,
|
|
2505
2505
|
color: qs,
|
|
2506
|
-
"&:hover": { backgroundColor:
|
|
2507
|
-
"&:active": { backgroundColor:
|
|
2506
|
+
"&:hover": { backgroundColor: hn, backgroundImage: mn },
|
|
2507
|
+
"&:active": { backgroundColor: hn },
|
|
2508
2508
|
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
|
|
2509
|
-
}, Qs =
|
|
2509
|
+
}, Qs = ye({
|
|
2510
2510
|
from: { opacity: 0, transform: "translateY(4px)" },
|
|
2511
2511
|
to: { opacity: 1, transform: "translateY(0)" }
|
|
2512
|
-
}), ea =
|
|
2512
|
+
}), ea = ye({ to: { transform: "rotate(360deg)" } }), xn = {
|
|
2513
2513
|
width: "28px",
|
|
2514
2514
|
height: "28px",
|
|
2515
2515
|
borderRadius: L("xs"),
|
|
@@ -2521,7 +2521,7 @@ const zr = (e) => ({
|
|
|
2521
2521
|
color: N("success", "plainColor"),
|
|
2522
2522
|
flexShrink: 0,
|
|
2523
2523
|
transition: "opacity 0.15s"
|
|
2524
|
-
},
|
|
2524
|
+
}, W = {
|
|
2525
2525
|
column: n(fn),
|
|
2526
2526
|
grid: n(Js),
|
|
2527
2527
|
message: n({ ...yn, textAlign: "center", paddingTop: r("xl"), paddingBottom: r("xl") }),
|
|
@@ -2577,7 +2577,7 @@ const zr = (e) => ({
|
|
|
2577
2577
|
fontWeight: 500,
|
|
2578
2578
|
color: x("textSecondary"),
|
|
2579
2579
|
transition: "color 0.15s, background-color 0.15s",
|
|
2580
|
-
"&:hover": { color:
|
|
2580
|
+
"&:hover": { color: gn, backgroundColor: N("danger", "softBg") }
|
|
2581
2581
|
}),
|
|
2582
2582
|
confirmRow: n({
|
|
2583
2583
|
display: "flex",
|
|
@@ -2590,7 +2590,7 @@ const zr = (e) => ({
|
|
|
2590
2590
|
fontFamily: P.primary,
|
|
2591
2591
|
fontSize: "0.8125em",
|
|
2592
2592
|
fontWeight: 600,
|
|
2593
|
-
color:
|
|
2593
|
+
color: gn,
|
|
2594
2594
|
whiteSpace: "nowrap"
|
|
2595
2595
|
}),
|
|
2596
2596
|
cancelButton: n({
|
|
@@ -2612,19 +2612,19 @@ const zr = (e) => ({
|
|
|
2612
2612
|
confirmButtonBusy: n({ ...xn, cursor: "default", opacity: 0.6 }),
|
|
2613
2613
|
spinner: n({ animation: `${ea} 0.7s linear infinite` })
|
|
2614
2614
|
}, ta = () => {
|
|
2615
|
-
const { t: e } =
|
|
2615
|
+
const { t: e } = ie("common"), { signInCTA: o } = Ye();
|
|
2616
2616
|
if (o != null && o.component) return /* @__PURE__ */ t(De, { children: o.component });
|
|
2617
2617
|
const i = (o == null ? void 0 : o.defaultLabel) ?? e("common.signIn");
|
|
2618
|
-
return o != null && o.url && !o.onClick ? /* @__PURE__ */ t("a", { href: o.url, css:
|
|
2619
|
-
}, oa =
|
|
2618
|
+
return o != null && o.url && !o.onClick ? /* @__PURE__ */ t("a", { href: o.url, css: W.cta, children: /* @__PURE__ */ t("span", { css: W.ctaLabel, children: i }) }) : /* @__PURE__ */ t("button", { type: "button", onClick: o == null ? void 0 : o.onClick, css: W.cta, children: /* @__PURE__ */ t("span", { css: W.ctaLabel, children: i }) });
|
|
2619
|
+
}, oa = pe.memo(ta), ot = (e, o) => (e == null ? void 0 : e.filter((i) => i.position === o)) ?? [], nt = ({ banners: e }) => e.length === 0 ? null : /* @__PURE__ */ t(De, { children: e.map((o, i) => /* @__PURE__ */ t("div", { children: o.render() }, i)) }), na = 0, ra = 20, Lt = (e) => Math.max(na, Math.min(ra, e)), vn = {
|
|
2620
2620
|
open: !1,
|
|
2621
2621
|
variant: "success",
|
|
2622
2622
|
title: "",
|
|
2623
2623
|
message: ""
|
|
2624
|
-
},
|
|
2624
|
+
}, ho = (e) => `topx:pending:${e}`, ia = (e) => {
|
|
2625
2625
|
if (typeof localStorage > "u") return null;
|
|
2626
2626
|
try {
|
|
2627
|
-
const o = localStorage.getItem(
|
|
2627
|
+
const o = localStorage.getItem(ho(e));
|
|
2628
2628
|
if (!o) return null;
|
|
2629
2629
|
const i = JSON.parse(o);
|
|
2630
2630
|
return !i || typeof i != "object" ? null : {
|
|
@@ -2637,13 +2637,13 @@ const zr = (e) => ({
|
|
|
2637
2637
|
}, sa = (e, o) => {
|
|
2638
2638
|
if (!(typeof localStorage > "u"))
|
|
2639
2639
|
try {
|
|
2640
|
-
localStorage.setItem(
|
|
2640
|
+
localStorage.setItem(ho(e), JSON.stringify(o));
|
|
2641
2641
|
} catch {
|
|
2642
2642
|
}
|
|
2643
2643
|
}, eo = (e) => {
|
|
2644
2644
|
if (!(typeof localStorage > "u"))
|
|
2645
2645
|
try {
|
|
2646
|
-
localStorage.removeItem(
|
|
2646
|
+
localStorage.removeItem(ho(e));
|
|
2647
2647
|
} catch {
|
|
2648
2648
|
}
|
|
2649
2649
|
}, aa = ({
|
|
@@ -2656,155 +2656,155 @@ const zr = (e) => ({
|
|
|
2656
2656
|
gameNavLabel: u = "gameWeek"
|
|
2657
2657
|
}) => {
|
|
2658
2658
|
var xo, vo;
|
|
2659
|
-
const { t: s } =
|
|
2659
|
+
const { t: s } = ie("common"), m = $n(), { sdk: h, userIsLoggedIn: p, showOdds: c, odds: y } = Ye();
|
|
2660
2660
|
ao(co);
|
|
2661
|
-
const v = Xt(), { ensureConsents:
|
|
2662
|
-
games:
|
|
2663
|
-
loading:
|
|
2664
|
-
error:
|
|
2665
|
-
} = lo(
|
|
2666
|
-
() =>
|
|
2667
|
-
[
|
|
2668
|
-
), [
|
|
2669
|
-
|
|
2670
|
-
se.current !==
|
|
2671
|
-
}, [
|
|
2672
|
-
const B =
|
|
2673
|
-
() =>
|
|
2661
|
+
const v = Xt(), { ensureConsents: S, modal: C } = Mr(), I = !!e, {
|
|
2662
|
+
games: R,
|
|
2663
|
+
loading: _,
|
|
2664
|
+
error: T
|
|
2665
|
+
} = lo(h, e == null ? void 0 : e.gameIds, I), k = K(() => _r(R), [R]), D = K(() => Gr(k), [k]), O = K(
|
|
2666
|
+
() => k.current ? k.previous.length : Math.max(0, D.length - 1),
|
|
2667
|
+
[k, D.length]
|
|
2668
|
+
), [Q, ee] = $(O), se = Ce(O);
|
|
2669
|
+
Z(() => {
|
|
2670
|
+
se.current !== O && (ee(O), se.current = O);
|
|
2671
|
+
}, [O]);
|
|
2672
|
+
const B = j(
|
|
2673
|
+
() => ee((b) => Math.max(0, b - 1)),
|
|
2674
2674
|
[]
|
|
2675
|
-
),
|
|
2676
|
-
() =>
|
|
2677
|
-
[
|
|
2678
|
-
), f =
|
|
2679
|
-
(b,
|
|
2680
|
-
) : [], [f]), [H,
|
|
2675
|
+
), M = j(
|
|
2676
|
+
() => ee((b) => Math.min(D.length - 1, b + 1)),
|
|
2677
|
+
[D.length]
|
|
2678
|
+
), f = D[Q] ?? null, z = K(() => f ? f.fixtures.map((b) => jr(b.matchModel)).sort(
|
|
2679
|
+
(b, w) => new Date(b.kickoffAt).getTime() - new Date(w.kickoffAt).getTime()
|
|
2680
|
+
) : [], [f]), [H, ne] = $(/* @__PURE__ */ new Map()), [te, U] = $(!1), [re, be] = $(
|
|
2681
2681
|
/* @__PURE__ */ new Map()
|
|
2682
|
-
), [Oe,
|
|
2683
|
-
|
|
2684
|
-
const
|
|
2685
|
-
return
|
|
2682
|
+
), [Oe, ue] = $(/* @__PURE__ */ new Set()), [Ae, me] = $(/* @__PURE__ */ new Set()), Ze = j((b) => {
|
|
2683
|
+
me((w) => {
|
|
2684
|
+
const A = new Set(w);
|
|
2685
|
+
return A.add(b), A;
|
|
2686
2686
|
});
|
|
2687
|
-
}, []), _e =
|
|
2688
|
-
(b,
|
|
2689
|
-
be((
|
|
2690
|
-
const E = new Map(
|
|
2691
|
-
return E.set(b, { home:
|
|
2692
|
-
}),
|
|
2693
|
-
const E = new Set(
|
|
2687
|
+
}, []), _e = j(
|
|
2688
|
+
(b, w, A) => {
|
|
2689
|
+
be((X) => {
|
|
2690
|
+
const E = new Map(X);
|
|
2691
|
+
return E.set(b, { home: w, away: A }), E;
|
|
2692
|
+
}), ue((X) => {
|
|
2693
|
+
const E = new Set(X);
|
|
2694
2694
|
return E.delete(b), E;
|
|
2695
|
-
}),
|
|
2696
|
-
const E = new Set(
|
|
2695
|
+
}), me((X) => {
|
|
2696
|
+
const E = new Set(X);
|
|
2697
2697
|
return E.delete(b), E;
|
|
2698
2698
|
});
|
|
2699
2699
|
},
|
|
2700
2700
|
[]
|
|
2701
|
-
), [
|
|
2701
|
+
), [q, xe] = $(""), ae = Ce(""), [Xe, Ge] = $(!1), [V, ve] = $(null), [lt, We] = $(!1), [He, zt] = $(!1), [Qe, fo] = $(!1), [Yn, bt] = $(!1), [qn, je] = $(vn), Jn = j(
|
|
2702
2702
|
() => je((b) => ({ ...b, open: !1 })),
|
|
2703
2703
|
[]
|
|
2704
|
-
), [Zn, Qn] =
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
var b,
|
|
2704
|
+
), [Zn, Qn] = $({});
|
|
2705
|
+
Z(() => {
|
|
2706
|
+
h && (async () => {
|
|
2707
|
+
var b, w;
|
|
2708
2708
|
try {
|
|
2709
|
-
const
|
|
2710
|
-
(
|
|
2709
|
+
const A = await h.loyalty.getConfigV2(v), E = (((w = (b = A == null ? void 0 : A.rewards) == null ? void 0 : b.points) == null ? void 0 : w.predictor) ?? []).find(
|
|
2710
|
+
(F) => F.id === "CORRECT_SCORE_ADVANCED"
|
|
2711
2711
|
);
|
|
2712
2712
|
E != null && E.alternative && Qn(E.alternative);
|
|
2713
2713
|
} catch {
|
|
2714
2714
|
}
|
|
2715
2715
|
})();
|
|
2716
|
-
}, [
|
|
2717
|
-
const er =
|
|
2718
|
-
() =>
|
|
2719
|
-
[
|
|
2720
|
-
), { odds: tr, loading: or } =
|
|
2721
|
-
|
|
2716
|
+
}, [h, v]);
|
|
2717
|
+
const er = K(
|
|
2718
|
+
() => z.filter((b) => b.status !== "FINISHED").map((b) => b.id),
|
|
2719
|
+
[z]
|
|
2720
|
+
), { odds: tr, loading: or } = Xn(
|
|
2721
|
+
h,
|
|
2722
2722
|
er,
|
|
2723
2723
|
c,
|
|
2724
2724
|
y
|
|
2725
2725
|
);
|
|
2726
|
-
|
|
2727
|
-
if (!f || !
|
|
2728
|
-
|
|
2726
|
+
Z(() => {
|
|
2727
|
+
if (!f || !h) {
|
|
2728
|
+
ne(/* @__PURE__ */ new Map()), be(/* @__PURE__ */ new Map()), ue(/* @__PURE__ */ new Set()), me(/* @__PURE__ */ new Set()), bt(!1), xe(""), ae.current = "", U(!1);
|
|
2729
2729
|
return;
|
|
2730
2730
|
}
|
|
2731
2731
|
let b = !1;
|
|
2732
|
-
return
|
|
2733
|
-
var
|
|
2732
|
+
return U(!0), je(vn), (async () => {
|
|
2733
|
+
var w, A, X, E;
|
|
2734
2734
|
try {
|
|
2735
|
-
let
|
|
2735
|
+
let F = /* @__PURE__ */ new Map(), he;
|
|
2736
2736
|
if (p)
|
|
2737
2737
|
try {
|
|
2738
|
-
const
|
|
2738
|
+
const J = await h.topX.getMyGamePrediction(
|
|
2739
2739
|
f.id
|
|
2740
2740
|
);
|
|
2741
|
-
if (
|
|
2742
|
-
if (Array.isArray(
|
|
2743
|
-
|
|
2744
|
-
const ke =
|
|
2745
|
-
|
|
2746
|
-
} else
|
|
2741
|
+
if (J)
|
|
2742
|
+
if (Array.isArray(J.data)) {
|
|
2743
|
+
F = Ht([J]);
|
|
2744
|
+
const ke = J.data[0];
|
|
2745
|
+
he = (w = ke == null ? void 0 : ke.tiebreaker) == null ? void 0 : w.goldenGoal;
|
|
2746
|
+
} else J.fixtures && (F = Ht([{ data: [J] }]), he = (A = J.tiebreaker) == null ? void 0 : A.goldenGoal);
|
|
2747
2747
|
} catch {
|
|
2748
2748
|
}
|
|
2749
2749
|
if (b) return;
|
|
2750
|
-
|
|
2750
|
+
ne(F);
|
|
2751
2751
|
const Ve = /* @__PURE__ */ new Map();
|
|
2752
|
-
let Me =
|
|
2753
|
-
if (
|
|
2754
|
-
|
|
2755
|
-
Ve.set(ke, { home:
|
|
2752
|
+
let Me = he != null ? String(he) : (X = f.tiebreaker) != null && X.timeTiebreaker ? "1" : "";
|
|
2753
|
+
if (F.size > 0)
|
|
2754
|
+
F.forEach((J, ke) => {
|
|
2755
|
+
Ve.set(ke, { home: J.homeScore, away: J.awayScore });
|
|
2756
2756
|
});
|
|
2757
2757
|
else {
|
|
2758
|
-
const
|
|
2759
|
-
if (
|
|
2760
|
-
for (const [ke, ze] of Object.entries(
|
|
2758
|
+
const J = ia(f.id);
|
|
2759
|
+
if (J) {
|
|
2760
|
+
for (const [ke, ze] of Object.entries(J.scores))
|
|
2761
2761
|
ze && typeof ze.home == "number" && typeof ze.away == "number" && Ve.set(ke, {
|
|
2762
2762
|
home: Lt(ze.home),
|
|
2763
2763
|
away: Lt(ze.away)
|
|
2764
2764
|
});
|
|
2765
|
-
|
|
2765
|
+
J.goldenGoal && ((E = f.tiebreaker) != null && E.timeTiebreaker) && (Me = J.goldenGoal);
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
|
-
be(Ve),
|
|
2768
|
+
be(Ve), ue(/* @__PURE__ */ new Set()), me(/* @__PURE__ */ new Set()), xe(Me), ae.current = Me;
|
|
2769
2769
|
} finally {
|
|
2770
|
-
b ||
|
|
2770
|
+
b || U(!1);
|
|
2771
2771
|
}
|
|
2772
2772
|
})(), () => {
|
|
2773
2773
|
b = !0;
|
|
2774
2774
|
};
|
|
2775
|
-
}, [f == null ? void 0 : f.id,
|
|
2776
|
-
const xt =
|
|
2777
|
-
(b,
|
|
2778
|
-
be((
|
|
2779
|
-
const E = new Map(
|
|
2780
|
-
return E.set(b,
|
|
2781
|
-
}),
|
|
2782
|
-
const E = new Set(
|
|
2775
|
+
}, [f == null ? void 0 : f.id, h, p]);
|
|
2776
|
+
const xt = j(
|
|
2777
|
+
(b, w, A) => {
|
|
2778
|
+
be((X) => {
|
|
2779
|
+
const E = new Map(X), F = E.get(b) ?? { home: 0, away: 0 }, he = w === "home" ? { ...F, home: Lt(F.home + A) } : { ...F, away: Lt(F.away + A) };
|
|
2780
|
+
return E.set(b, he), E;
|
|
2781
|
+
}), ue((X) => {
|
|
2782
|
+
const E = new Set(X);
|
|
2783
2783
|
return E.add(b), E;
|
|
2784
2784
|
});
|
|
2785
2785
|
},
|
|
2786
2786
|
[]
|
|
2787
|
-
), nr =
|
|
2788
|
-
(b,
|
|
2787
|
+
), nr = j(
|
|
2788
|
+
(b, w) => xt(b, w, 1),
|
|
2789
2789
|
[xt]
|
|
2790
|
-
), rr =
|
|
2791
|
-
(b,
|
|
2790
|
+
), rr = j(
|
|
2791
|
+
(b, w) => xt(b, w, -1),
|
|
2792
2792
|
[xt]
|
|
2793
|
-
), dt = (f == null ? void 0 : f.status) === "OPEN", pt = f != null && f.predictionsCutoff ? Date.now() >= new Date(f.predictionsCutoff).getTime() : !1, vt = dt && !pt && p && !He, kt =
|
|
2793
|
+
), dt = (f == null ? void 0 : f.status) === "OPEN", pt = f != null && f.predictionsCutoff ? Date.now() >= new Date(f.predictionsCutoff).getTime() : !1, vt = dt && !pt && p && !He, kt = j(
|
|
2794
2794
|
async (b) => {
|
|
2795
|
-
var
|
|
2796
|
-
if (!f || !vt ||
|
|
2795
|
+
var X;
|
|
2796
|
+
if (!f || !vt || S && !await S()) return;
|
|
2797
2797
|
zt(!0);
|
|
2798
|
-
const
|
|
2799
|
-
const
|
|
2798
|
+
const w = z.map((E) => {
|
|
2799
|
+
const F = re.get(E.id) ?? { home: 0, away: 0 };
|
|
2800
2800
|
return {
|
|
2801
2801
|
matchId: E.id,
|
|
2802
2802
|
market: yr.CORRECT_SCORE_ADVANCED,
|
|
2803
2803
|
matchType: "FOOTBALL",
|
|
2804
|
-
prediction: { value: `${
|
|
2804
|
+
prediction: { value: `${F.home}:${F.away}` }
|
|
2805
2805
|
};
|
|
2806
2806
|
});
|
|
2807
|
-
if (
|
|
2807
|
+
if (w.length === 0) {
|
|
2808
2808
|
zt(!1), je({
|
|
2809
2809
|
open: !0,
|
|
2810
2810
|
variant: "error",
|
|
@@ -2813,21 +2813,21 @@ const zr = (e) => ({
|
|
|
2813
2813
|
});
|
|
2814
2814
|
return;
|
|
2815
2815
|
}
|
|
2816
|
-
const
|
|
2816
|
+
const A = {
|
|
2817
2817
|
gameInstanceId: f.id,
|
|
2818
|
-
fixtures:
|
|
2818
|
+
fixtures: w
|
|
2819
2819
|
};
|
|
2820
|
-
if ((
|
|
2821
|
-
const E = Number(
|
|
2822
|
-
Number.isNaN(E) || (
|
|
2820
|
+
if ((X = f.tiebreaker) != null && X.timeTiebreaker && q !== "") {
|
|
2821
|
+
const E = Number(q);
|
|
2822
|
+
Number.isNaN(E) || (A.tiebreaker = { goldenGoal: E });
|
|
2823
2823
|
}
|
|
2824
2824
|
try {
|
|
2825
|
-
const E = await
|
|
2825
|
+
const E = await h.topX.play(A);
|
|
2826
2826
|
if (E != null && E.fixtures) {
|
|
2827
|
-
const
|
|
2828
|
-
|
|
2827
|
+
const F = Ht([{ data: [E] }]);
|
|
2828
|
+
ne(F);
|
|
2829
2829
|
}
|
|
2830
|
-
|
|
2830
|
+
ue(/* @__PURE__ */ new Set()), me(/* @__PURE__ */ new Set()), ae.current = q, eo(f.id), b != null && b.silent || je({
|
|
2831
2831
|
open: !0,
|
|
2832
2832
|
variant: "success",
|
|
2833
2833
|
title: s("topX.play.submitSuccess"),
|
|
@@ -2839,7 +2839,7 @@ const zr = (e) => ({
|
|
|
2839
2839
|
variant: "error",
|
|
2840
2840
|
title: Bt(
|
|
2841
2841
|
E,
|
|
2842
|
-
|
|
2842
|
+
h,
|
|
2843
2843
|
s("topX.errors.submitFailed")
|
|
2844
2844
|
),
|
|
2845
2845
|
message: ""
|
|
@@ -2851,43 +2851,43 @@ const zr = (e) => ({
|
|
|
2851
2851
|
[
|
|
2852
2852
|
f,
|
|
2853
2853
|
vt,
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2854
|
+
S,
|
|
2855
|
+
z,
|
|
2856
|
+
re,
|
|
2857
|
+
q,
|
|
2858
|
+
h,
|
|
2859
2859
|
s
|
|
2860
2860
|
]
|
|
2861
|
-
), ir =
|
|
2862
|
-
var
|
|
2861
|
+
), ir = j(async () => {
|
|
2862
|
+
var w, A;
|
|
2863
2863
|
if (!f || Qe) return;
|
|
2864
|
-
const b = (
|
|
2864
|
+
const b = (w = H.values().next().value) == null ? void 0 : w.predictionId;
|
|
2865
2865
|
if (b) {
|
|
2866
2866
|
fo(!0);
|
|
2867
2867
|
try {
|
|
2868
|
-
await
|
|
2869
|
-
const
|
|
2870
|
-
xe(
|
|
2868
|
+
await h.topX.delete(b), ne(/* @__PURE__ */ new Map()), be(/* @__PURE__ */ new Map()), ue(/* @__PURE__ */ new Set()), me(/* @__PURE__ */ new Set());
|
|
2869
|
+
const X = (A = f.tiebreaker) != null && A.timeTiebreaker ? "1" : "";
|
|
2870
|
+
xe(X), ae.current = X, bt(!1), eo(f.id), je({
|
|
2871
2871
|
open: !0,
|
|
2872
2872
|
variant: "success",
|
|
2873
2873
|
title: s("topX.play.clearSuccess"),
|
|
2874
2874
|
message: ""
|
|
2875
2875
|
});
|
|
2876
|
-
} catch (
|
|
2876
|
+
} catch (X) {
|
|
2877
2877
|
je({
|
|
2878
2878
|
open: !0,
|
|
2879
2879
|
variant: "error",
|
|
2880
|
-
title: Bt(
|
|
2880
|
+
title: Bt(X, h, s("topX.errors.deleteFailed")),
|
|
2881
2881
|
message: ""
|
|
2882
2882
|
});
|
|
2883
2883
|
} finally {
|
|
2884
2884
|
fo(!1);
|
|
2885
2885
|
}
|
|
2886
2886
|
}
|
|
2887
|
-
}, [f, Qe, H,
|
|
2888
|
-
|
|
2889
|
-
var
|
|
2890
|
-
if (!f || !
|
|
2887
|
+
}, [f, Qe, H, h, s]);
|
|
2888
|
+
Z(() => {
|
|
2889
|
+
var w;
|
|
2890
|
+
if (!f || !h) {
|
|
2891
2891
|
ve(null), We(!1);
|
|
2892
2892
|
return;
|
|
2893
2893
|
}
|
|
@@ -2895,25 +2895,25 @@ const zr = (e) => ({
|
|
|
2895
2895
|
ve(null), We(!1);
|
|
2896
2896
|
return;
|
|
2897
2897
|
}
|
|
2898
|
-
if (!((
|
|
2898
|
+
if (!((w = f.tiebreaker) != null && w.timeTiebreaker)) {
|
|
2899
2899
|
ve(null), We(!1);
|
|
2900
2900
|
return;
|
|
2901
2901
|
}
|
|
2902
2902
|
let b = !1;
|
|
2903
2903
|
return ve(null), We(!0), (async () => {
|
|
2904
|
-
var
|
|
2904
|
+
var A, X, E, F, he, Ve, Me, J, ke, ze, ko;
|
|
2905
2905
|
try {
|
|
2906
|
-
const Gt = await
|
|
2906
|
+
const Gt = await h.topX.getMarketsResultsForGame(
|
|
2907
2907
|
f.id,
|
|
2908
2908
|
v
|
|
2909
2909
|
);
|
|
2910
2910
|
if (b) return;
|
|
2911
|
-
const Se = (
|
|
2911
|
+
const Se = (X = (A = Gt == null ? void 0 : Gt.tieBreakers) == null ? void 0 : A.goldenGoals) == null ? void 0 : X[0];
|
|
2912
2912
|
if (!Se) {
|
|
2913
2913
|
ve(null);
|
|
2914
2914
|
return;
|
|
2915
2915
|
}
|
|
2916
|
-
const Le = Se.matchModel, So = ((E = Se.playerModel) == null ? void 0 : E.teams) ?? [], wo = (
|
|
2916
|
+
const Le = Se.matchModel, So = ((E = Se.playerModel) == null ? void 0 : E.teams) ?? [], wo = (F = Le == null ? void 0 : Le.homeTeam) == null ? void 0 : F.id, cr = (he = Le == null ? void 0 : Le.awayTeam) == null ? void 0 : he.id;
|
|
2917
2917
|
let St = So.find(
|
|
2918
2918
|
(et) => (et == null ? void 0 : et.id) === wo || (et == null ? void 0 : et.id) === cr
|
|
2919
2919
|
) ?? null;
|
|
@@ -2922,7 +2922,7 @@ const zr = (e) => ({
|
|
|
2922
2922
|
ve({
|
|
2923
2923
|
minute: Se.minute,
|
|
2924
2924
|
// An empty name falls back to first + last (`??` let "" through).
|
|
2925
|
-
playerName: ((Ve = Se.playerModel) == null ? void 0 : Ve.name) || [(Me = Se.playerModel) == null ? void 0 : Me.firstName, (
|
|
2925
|
+
playerName: ((Ve = Se.playerModel) == null ? void 0 : Ve.name) || [(Me = Se.playerModel) == null ? void 0 : Me.firstName, (J = Se.playerModel) == null ? void 0 : J.lastName].filter(Boolean).join(" "),
|
|
2926
2926
|
playerAvatar: ((ze = (ke = Se.playerModel) == null ? void 0 : ke.assets) == null ? void 0 : ze.headshot) ?? null,
|
|
2927
2927
|
teamName: (Re == null ? void 0 : Re.shortName) ?? (Re == null ? void 0 : Re.name) ?? "",
|
|
2928
2928
|
teamLogo: ((ko = Re == null ? void 0 : Re.assets) == null ? void 0 : ko.logo) ?? null,
|
|
@@ -2936,26 +2936,26 @@ const zr = (e) => ({
|
|
|
2936
2936
|
})(), () => {
|
|
2937
2937
|
b = !0;
|
|
2938
2938
|
};
|
|
2939
|
-
}, [f,
|
|
2940
|
-
var
|
|
2939
|
+
}, [f, h, v]), Z(() => {
|
|
2940
|
+
var X;
|
|
2941
2941
|
if (!f || H.size > 0 || te) return;
|
|
2942
|
-
const b = (
|
|
2943
|
-
if (!(
|
|
2942
|
+
const b = (X = f.tiebreaker) != null && X.timeTiebreaker ? "1" : "";
|
|
2943
|
+
if (!(re.size > 0) && !(!!q && q !== b)) {
|
|
2944
2944
|
eo(f.id);
|
|
2945
2945
|
return;
|
|
2946
2946
|
}
|
|
2947
2947
|
sa(f.id, {
|
|
2948
|
-
scores: Object.fromEntries(
|
|
2949
|
-
goldenGoal:
|
|
2948
|
+
scores: Object.fromEntries(re),
|
|
2949
|
+
goldenGoal: q
|
|
2950
2950
|
});
|
|
2951
2951
|
}, [
|
|
2952
2952
|
f,
|
|
2953
2953
|
H.size,
|
|
2954
2954
|
te,
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
]),
|
|
2958
|
-
if (H.size === 0 || !dt || pt || !p || Oe.size > 0 || Ae.size > 0 ||
|
|
2955
|
+
re,
|
|
2956
|
+
q
|
|
2957
|
+
]), Z(() => {
|
|
2958
|
+
if (H.size === 0 || !dt || pt || !p || Oe.size > 0 || Ae.size > 0 || q === ae.current) return;
|
|
2959
2959
|
const b = setTimeout(async () => {
|
|
2960
2960
|
Ge(!0);
|
|
2961
2961
|
try {
|
|
@@ -2966,7 +2966,7 @@ const zr = (e) => ({
|
|
|
2966
2966
|
}, 600);
|
|
2967
2967
|
return () => clearTimeout(b);
|
|
2968
2968
|
}, [
|
|
2969
|
-
|
|
2969
|
+
q,
|
|
2970
2970
|
H.size,
|
|
2971
2971
|
dt,
|
|
2972
2972
|
pt,
|
|
@@ -2975,38 +2975,38 @@ const zr = (e) => ({
|
|
|
2975
2975
|
Ae.size,
|
|
2976
2976
|
kt
|
|
2977
2977
|
]);
|
|
2978
|
-
const yo =
|
|
2979
|
-
() =>
|
|
2980
|
-
[
|
|
2981
|
-
), ut =
|
|
2982
|
-
let b = 0,
|
|
2983
|
-
return H.forEach((
|
|
2984
|
-
|
|
2985
|
-
}),
|
|
2986
|
-
(
|
|
2987
|
-
}), { correct: b, partial:
|
|
2988
|
-
}, [H,
|
|
2989
|
-
if (o ||
|
|
2990
|
-
return /* @__PURE__ */ t("div", { css:
|
|
2991
|
-
if (i ||
|
|
2992
|
-
return /* @__PURE__ */ t("p", { css:
|
|
2993
|
-
if (
|
|
2994
|
-
return /* @__PURE__ */ t("p", { css:
|
|
2978
|
+
const yo = z.length > 0 ? z.length : 10, sr = K(
|
|
2979
|
+
() => z.filter((b) => H.has(b.id)).length,
|
|
2980
|
+
[z, H]
|
|
2981
|
+
), ut = K(() => {
|
|
2982
|
+
let b = 0, w = 0, A = 0, X = 0, E = 0;
|
|
2983
|
+
return H.forEach((F, he) => {
|
|
2984
|
+
z.find((Me) => Me.id === he) && (F.status === "SETTLED" ? F.outcome === "CORRECT" ? b++ : F.outcome === "PARTIALLY_CORRECT" ? w++ : A++ : X++);
|
|
2985
|
+
}), z.forEach((F) => {
|
|
2986
|
+
(F.status === "FINISHED" || F.status === "CANCELLED") && !H.has(F.id) && E++;
|
|
2987
|
+
}), { correct: b, partial: w, incorrect: A, active: X, skipped: E };
|
|
2988
|
+
}, [H, z]), ar = ut.correct + ut.partial + ut.incorrect + ut.skipped > 0;
|
|
2989
|
+
if (o || _)
|
|
2990
|
+
return /* @__PURE__ */ t("div", { css: W.column, children: /* @__PURE__ */ t("div", { css: W.grid, children: Array.from({ length: yo }, (b, w) => w).map((b) => /* @__PURE__ */ t(io, { index: b }, b)) }) });
|
|
2991
|
+
if (i || T)
|
|
2992
|
+
return /* @__PURE__ */ t("p", { css: W.message, children: s("topX.errors.loadFailed") });
|
|
2993
|
+
if (D.length === 0)
|
|
2994
|
+
return /* @__PURE__ */ t("p", { css: W.message, children: s("topX.play.noGames") });
|
|
2995
2995
|
const Ft = ot(l, "left"), _t = ot(l, "right"), bo = !m && (Ft.length > 0 || _t.length > 0);
|
|
2996
|
-
return /* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
2996
|
+
return /* @__PURE__ */ g(De, { children: [
|
|
2997
|
+
/* @__PURE__ */ g("div", { css: W.column, children: [
|
|
2998
2998
|
/* @__PURE__ */ t(nt, { banners: ot(l, "above-group-nav") }),
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
bo && Ft.length > 0 && /* @__PURE__ */ t("div", { css:
|
|
3001
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ g("div", { css: W.layout, children: [
|
|
3000
|
+
bo && Ft.length > 0 && /* @__PURE__ */ t("div", { css: W.rail, children: /* @__PURE__ */ t(nt, { banners: Ft }) }),
|
|
3001
|
+
/* @__PURE__ */ g("div", { css: W.center, children: [
|
|
3002
3002
|
/* @__PURE__ */ t(
|
|
3003
3003
|
is,
|
|
3004
3004
|
{
|
|
3005
|
-
games:
|
|
3006
|
-
gameIndex:
|
|
3005
|
+
games: D,
|
|
3006
|
+
gameIndex: Q,
|
|
3007
3007
|
currentGame: f,
|
|
3008
3008
|
onPrev: B,
|
|
3009
|
-
onNext:
|
|
3009
|
+
onNext: M,
|
|
3010
3010
|
gameNavLabel: u
|
|
3011
3011
|
}
|
|
3012
3012
|
),
|
|
@@ -3022,20 +3022,20 @@ const zr = (e) => ({
|
|
|
3022
3022
|
banners: ot(l, "below-group-nav")
|
|
3023
3023
|
}
|
|
3024
3024
|
),
|
|
3025
|
-
te ? /* @__PURE__ */ t("div", { css:
|
|
3026
|
-
/* @__PURE__ */
|
|
3027
|
-
|
|
3028
|
-
const
|
|
3029
|
-
home: (
|
|
3030
|
-
away: (
|
|
3025
|
+
te ? /* @__PURE__ */ t("div", { css: W.grid, children: Array.from({ length: yo }, (b, w) => w).map((b) => /* @__PURE__ */ t(io, { index: b }, b)) }) : z.length === 0 ? /* @__PURE__ */ t("div", { css: W.empty, children: /* @__PURE__ */ t("p", { css: W.emptyText, children: s("topX.play.noMatches") }) }) : /* @__PURE__ */ g(De, { children: [
|
|
3026
|
+
/* @__PURE__ */ g("div", { css: W.grid, children: [
|
|
3027
|
+
z.map((b) => {
|
|
3028
|
+
const w = H.get(b.id) ?? null, A = re.get(b.id) ?? {
|
|
3029
|
+
home: (w == null ? void 0 : w.homeScore) ?? 0,
|
|
3030
|
+
away: (w == null ? void 0 : w.awayScore) ?? 0
|
|
3031
3031
|
};
|
|
3032
3032
|
return /* @__PURE__ */ t(
|
|
3033
3033
|
Ji,
|
|
3034
3034
|
{
|
|
3035
3035
|
match: b,
|
|
3036
|
-
existingPrediction:
|
|
3037
|
-
homeScore:
|
|
3038
|
-
awayScore:
|
|
3036
|
+
existingPrediction: w,
|
|
3037
|
+
homeScore: A.home,
|
|
3038
|
+
awayScore: A.away,
|
|
3039
3039
|
isDirty: Oe.has(b.id),
|
|
3040
3040
|
onIncrement: nr,
|
|
3041
3041
|
onDecrement: rr,
|
|
@@ -3051,8 +3051,8 @@ const zr = (e) => ({
|
|
|
3051
3051
|
onStartEdit: () => Ze(b.id),
|
|
3052
3052
|
onCancelEdit: () => _e(
|
|
3053
3053
|
b.id,
|
|
3054
|
-
(
|
|
3055
|
-
(
|
|
3054
|
+
(w == null ? void 0 : w.homeScore) ?? 0,
|
|
3055
|
+
(w == null ? void 0 : w.awayScore) ?? 0
|
|
3056
3056
|
),
|
|
3057
3057
|
onConfirm: () => kt()
|
|
3058
3058
|
},
|
|
@@ -3061,50 +3061,50 @@ const zr = (e) => ({
|
|
|
3061
3061
|
}),
|
|
3062
3062
|
C
|
|
3063
3063
|
] }),
|
|
3064
|
-
(f == null ? void 0 : f.status) === "OPEN" && /* @__PURE__ */
|
|
3064
|
+
(f == null ? void 0 : f.status) === "OPEN" && /* @__PURE__ */ g("div", { css: W.actionRow, children: [
|
|
3065
3065
|
(xo = f == null ? void 0 : f.tiebreaker) != null && xo.timeTiebreaker ? /* @__PURE__ */ t(
|
|
3066
3066
|
Vs,
|
|
3067
3067
|
{
|
|
3068
|
-
value:
|
|
3068
|
+
value: q,
|
|
3069
3069
|
onChange: xe,
|
|
3070
3070
|
disabled: !dt || pt || Xe,
|
|
3071
3071
|
loading: Xe
|
|
3072
3072
|
}
|
|
3073
3073
|
) : /* @__PURE__ */ t("div", {}),
|
|
3074
|
-
/* @__PURE__ */ t("div", { css:
|
|
3074
|
+
/* @__PURE__ */ t("div", { css: W.actions, children: p ? H.size === 0 && /* @__PURE__ */ g(
|
|
3075
3075
|
"button",
|
|
3076
3076
|
{
|
|
3077
3077
|
type: "button",
|
|
3078
3078
|
onClick: () => kt(),
|
|
3079
3079
|
disabled: !vt,
|
|
3080
|
-
css: He ?
|
|
3080
|
+
css: He ? W.ctaBusy : W.cta,
|
|
3081
3081
|
children: [
|
|
3082
3082
|
s("topX.play.submitButton"),
|
|
3083
|
-
He && /* @__PURE__ */ t(
|
|
3083
|
+
He && /* @__PURE__ */ t(Ln, { size: 20, thickness: 3 })
|
|
3084
3084
|
]
|
|
3085
3085
|
}
|
|
3086
3086
|
) : /* @__PURE__ */ t(oa, {}) })
|
|
3087
3087
|
] })
|
|
3088
3088
|
] }),
|
|
3089
3089
|
/* @__PURE__ */ t(nt, { banners: ot(l, "below-matches") }),
|
|
3090
|
-
p &&
|
|
3091
|
-
f.status === "SETTLED" && ((vo = f.tiebreaker) != null && vo.timeTiebreaker) && (lt ||
|
|
3090
|
+
p && z.length > 0 && !te && f && (f.status === "SETTLED" || f.status === "CLOSED" || f.status === "CANCELED") && /* @__PURE__ */ g("div", { css: W.settledRow, children: [
|
|
3091
|
+
f.status === "SETTLED" && ((vo = f.tiebreaker) != null && vo.timeTiebreaker) && (lt || V) ? /* @__PURE__ */ t(
|
|
3092
3092
|
Ys,
|
|
3093
3093
|
{
|
|
3094
|
-
actualMinute: (
|
|
3095
|
-
predictedMinute: H.size > 0 &&
|
|
3096
|
-
playerName: (
|
|
3097
|
-
playerAvatar: (
|
|
3098
|
-
teamName: (
|
|
3099
|
-
teamLogo: (
|
|
3100
|
-
goalType: (
|
|
3094
|
+
actualMinute: (V == null ? void 0 : V.minute) ?? 0,
|
|
3095
|
+
predictedMinute: H.size > 0 && q ? parseInt(q, 10) : null,
|
|
3096
|
+
playerName: (V == null ? void 0 : V.playerName) ?? "",
|
|
3097
|
+
playerAvatar: (V == null ? void 0 : V.playerAvatar) ?? null,
|
|
3098
|
+
teamName: (V == null ? void 0 : V.teamName) ?? "",
|
|
3099
|
+
teamLogo: (V == null ? void 0 : V.teamLogo) ?? null,
|
|
3100
|
+
goalType: (V == null ? void 0 : V.goalType) ?? "goal",
|
|
3101
3101
|
loading: lt
|
|
3102
3102
|
}
|
|
3103
3103
|
) : /* @__PURE__ */ t("div", {}),
|
|
3104
3104
|
/* @__PURE__ */ t(
|
|
3105
3105
|
as,
|
|
3106
3106
|
{
|
|
3107
|
-
matches:
|
|
3107
|
+
matches: z,
|
|
3108
3108
|
predictions: H,
|
|
3109
3109
|
predictedCount: sr,
|
|
3110
3110
|
outcomeCounts: ut,
|
|
@@ -3114,15 +3114,15 @@ const zr = (e) => ({
|
|
|
3114
3114
|
}
|
|
3115
3115
|
)
|
|
3116
3116
|
] }),
|
|
3117
|
-
p && H.size > 0 && dt && !pt && !te && /* @__PURE__ */ t("div", { css:
|
|
3118
|
-
/* @__PURE__ */ t("p", { css:
|
|
3117
|
+
p && H.size > 0 && dt && !pt && !te && /* @__PURE__ */ t("div", { css: W.dangerFooter, children: Yn ? /* @__PURE__ */ g("div", { css: W.confirmRow, children: [
|
|
3118
|
+
/* @__PURE__ */ t("p", { css: W.confirmPrompt, children: s("topX.play.clearConfirmPrompt") }),
|
|
3119
3119
|
/* @__PURE__ */ t(
|
|
3120
3120
|
"button",
|
|
3121
3121
|
{
|
|
3122
3122
|
type: "button",
|
|
3123
3123
|
onClick: () => bt(!1),
|
|
3124
3124
|
disabled: Qe,
|
|
3125
|
-
css:
|
|
3125
|
+
css: W.cancelButton,
|
|
3126
3126
|
children: s("topX.play.cancelEdit")
|
|
3127
3127
|
}
|
|
3128
3128
|
),
|
|
@@ -3133,7 +3133,7 @@ const zr = (e) => ({
|
|
|
3133
3133
|
onClick: ir,
|
|
3134
3134
|
disabled: Qe,
|
|
3135
3135
|
title: s("topX.play.clearButton"),
|
|
3136
|
-
css: Qe ?
|
|
3136
|
+
css: Qe ? W.confirmButtonBusy : W.confirmButton,
|
|
3137
3137
|
children: Qe ? /* @__PURE__ */ t(
|
|
3138
3138
|
"svg",
|
|
3139
3139
|
{
|
|
@@ -3144,7 +3144,7 @@ const zr = (e) => ({
|
|
|
3144
3144
|
stroke: "currentColor",
|
|
3145
3145
|
strokeWidth: "2.5",
|
|
3146
3146
|
strokeLinecap: "round",
|
|
3147
|
-
css:
|
|
3147
|
+
css: W.spinner,
|
|
3148
3148
|
children: /* @__PURE__ */ t("path", { d: "M12 2a10 10 0 0 1 10 10" })
|
|
3149
3149
|
}
|
|
3150
3150
|
) : /* @__PURE__ */ t(
|
|
@@ -3163,14 +3163,14 @@ const zr = (e) => ({
|
|
|
3163
3163
|
)
|
|
3164
3164
|
}
|
|
3165
3165
|
)
|
|
3166
|
-
] }) : /* @__PURE__ */
|
|
3166
|
+
] }) : /* @__PURE__ */ g(
|
|
3167
3167
|
"button",
|
|
3168
3168
|
{
|
|
3169
3169
|
type: "button",
|
|
3170
3170
|
onClick: () => bt(!0),
|
|
3171
|
-
css:
|
|
3171
|
+
css: W.clearLink,
|
|
3172
3172
|
children: [
|
|
3173
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ g(
|
|
3174
3174
|
"svg",
|
|
3175
3175
|
{
|
|
3176
3176
|
width: "13",
|
|
@@ -3195,7 +3195,7 @@ const zr = (e) => ({
|
|
|
3195
3195
|
}
|
|
3196
3196
|
) })
|
|
3197
3197
|
] }),
|
|
3198
|
-
bo && _t.length > 0 && /* @__PURE__ */ t("div", { css:
|
|
3198
|
+
bo && _t.length > 0 && /* @__PURE__ */ t("div", { css: W.rail, children: /* @__PURE__ */ t(nt, { banners: _t }) })
|
|
3199
3199
|
] }),
|
|
3200
3200
|
/* @__PURE__ */ t(nt, { banners: ot(l, "bottom") })
|
|
3201
3201
|
] }),
|
|
@@ -3210,16 +3210,16 @@ const zr = (e) => ({
|
|
|
3210
3210
|
}
|
|
3211
3211
|
return Number.isFinite(o) ? { min: o, max: i } : { min: 0, max: 0 };
|
|
3212
3212
|
}, ca = ({ template: e }) => {
|
|
3213
|
-
const { t: o } =
|
|
3213
|
+
const { t: o } = ie("common"), { entityId: i, sdk: l, userIsLoggedIn: d } = Ye(), a = Xt(), { games: u } = lo(l, e == null ? void 0 : e.gameIds, !!e), s = K(
|
|
3214
3214
|
() => u.filter((p) => p.status === "SETTLED").sort((p, c) => to(p).min - to(c).min).map((p) => {
|
|
3215
3215
|
const c = to(p);
|
|
3216
3216
|
return { id: p.id, label: p.title || p.id, from: c.min, to: c.max };
|
|
3217
3217
|
}),
|
|
3218
3218
|
[u]
|
|
3219
|
-
), m =
|
|
3219
|
+
), m = j(
|
|
3220
3220
|
(p, c) => p === null ? l.loyalty.getLeaderboard(i, c, a) : l.loyalty.getLeaderboardForGame(p, c, a),
|
|
3221
3221
|
[i, l, a]
|
|
3222
|
-
),
|
|
3222
|
+
), h = j(
|
|
3223
3223
|
(p) => l.loyalty.getOwnRankings(
|
|
3224
3224
|
p === null ? { rankType: "TEMPLATE", leaderboardIds: [i] } : { rankType: "GAME", leaderboardIds: [p], gameType: "TOP_X" },
|
|
3225
3225
|
a
|
|
@@ -3235,32 +3235,32 @@ const zr = (e) => ({
|
|
|
3235
3235
|
scopes: s,
|
|
3236
3236
|
scopeHeading: o("topX.leaderboard.byGame"),
|
|
3237
3237
|
fetchPage: m,
|
|
3238
|
-
fetchOwnRanking:
|
|
3238
|
+
fetchOwnRanking: h
|
|
3239
3239
|
}
|
|
3240
3240
|
);
|
|
3241
|
-
},
|
|
3242
|
-
const [i, l] =
|
|
3243
|
-
return
|
|
3244
|
-
!e || !o || (a(!0), s(null), o.loyalty.getTemplateById(e, m).then((
|
|
3241
|
+
}, Kn = (e, o) => {
|
|
3242
|
+
const [i, l] = $(null), [d, a] = $(!0), [u, s] = $(null), m = Xt();
|
|
3243
|
+
return Z(() => {
|
|
3244
|
+
!e || !o || (a(!0), s(null), o.loyalty.getTemplateById(e, m).then((h) => {
|
|
3245
3245
|
var p, c;
|
|
3246
|
-
|
|
3247
|
-
id:
|
|
3248
|
-
title:
|
|
3249
|
-
description:
|
|
3250
|
-
image: ((p =
|
|
3251
|
-
rules:
|
|
3252
|
-
gameIds:
|
|
3253
|
-
adContent:
|
|
3254
|
-
related: (
|
|
3246
|
+
h.type === "GAMES" && h.gameTypes && h.gameTypes.includes("TOP_X") && l({
|
|
3247
|
+
id: h.id ?? e,
|
|
3248
|
+
title: h.name ?? "",
|
|
3249
|
+
description: h.description ?? null,
|
|
3250
|
+
image: ((p = h.images) == null ? void 0 : p.cover) || ((c = h.images) == null ? void 0 : c.main) || null,
|
|
3251
|
+
rules: h.rules ?? null,
|
|
3252
|
+
gameIds: h.gameIds ?? [],
|
|
3253
|
+
adContent: h.adContent ?? null,
|
|
3254
|
+
related: (h.related ?? []).map((y) => ({
|
|
3255
3255
|
entityId: y.entityId,
|
|
3256
3256
|
entityType: y.entityType,
|
|
3257
3257
|
entityRelationship: y.entityRelationship
|
|
3258
3258
|
}))
|
|
3259
3259
|
});
|
|
3260
|
-
}).catch((
|
|
3260
|
+
}).catch((h) => {
|
|
3261
3261
|
s(
|
|
3262
3262
|
Bt(
|
|
3263
|
-
|
|
3263
|
+
h,
|
|
3264
3264
|
o,
|
|
3265
3265
|
"Failed to load Top X games template"
|
|
3266
3266
|
)
|
|
@@ -3270,10 +3270,10 @@ const zr = (e) => ({
|
|
|
3270
3270
|
}));
|
|
3271
3271
|
}, [e, o, m]), { template: i, loading: d, error: u };
|
|
3272
3272
|
}, la = (e) => {
|
|
3273
|
-
const o = e ?
|
|
3273
|
+
const o = e ? Dn(`${e.home}:${e.away}`) : null;
|
|
3274
3274
|
return o ? { market: "FT_1X2", pick: o } : null;
|
|
3275
3275
|
}, kn = (e) => e ? `${e.home}–${e.away}` : null;
|
|
3276
|
-
function
|
|
3276
|
+
function Un(e) {
|
|
3277
3277
|
var i, l;
|
|
3278
3278
|
if (!((i = e == null ? void 0 : e.fixtures) != null && i.length)) return 0;
|
|
3279
3279
|
let o = 1 / 0;
|
|
@@ -3287,43 +3287,43 @@ function da(e, o, i, l) {
|
|
|
3287
3287
|
const d = [];
|
|
3288
3288
|
return e.forEach((a) => {
|
|
3289
3289
|
var c, y;
|
|
3290
|
-
const u = ((c = a.predictionModel) == null ? void 0 : c.fixtures) ?? [], s = ((y = a.predictionModel) == null ? void 0 : y.gameInstanceId) ?? null, m = s ? i.get(s) ?? null : null,
|
|
3291
|
-
let p =
|
|
3292
|
-
p === 0 && s && (p = String(s).split("").reduce((v,
|
|
3293
|
-
var se, B,
|
|
3294
|
-
const
|
|
3290
|
+
const u = ((c = a.predictionModel) == null ? void 0 : c.fixtures) ?? [], s = ((y = a.predictionModel) == null ? void 0 : y.gameInstanceId) ?? null, m = s ? i.get(s) ?? null : null, h = (m == null ? void 0 : m.title) || s || "—";
|
|
3291
|
+
let p = Un(m);
|
|
3292
|
+
p === 0 && s && (p = String(s).split("").reduce((v, S) => v * 31 + S.charCodeAt(0) >>> 0, 0)), u.forEach((v) => {
|
|
3293
|
+
var se, B, M, f, z, H, ne, te, U, re, be, Oe, ue, Ae, me, Ze, _e, q, xe, ae, Xe, Ge, V, ve, lt, We, He;
|
|
3294
|
+
const S = v.matchId ?? ((se = v.matchModel) == null ? void 0 : se.id) ?? String(Math.random()), C = `${a.predictionId}::${S}`, I = Pn((B = v.prediction) == null ? void 0 : B.value), R = Nn((M = v.result) == null ? void 0 : M.outcome), _ = R !== "pending", T = ((H = (z = (f = v.matchModel) == null ? void 0 : f.scores) == null ? void 0 : z.ftScore) == null ? void 0 : H.homeGoals) ?? null, k = ((U = (te = (ne = v.matchModel) == null ? void 0 : ne.scores) == null ? void 0 : te.ftScore) == null ? void 0 : U.awayGoals) ?? null, D = _ && T != null && k != null ? { home: T, away: k } : null, O = ((re = v.matchModel) == null ? void 0 : re.kickoffAt) ?? null, { kickoff: Q, dateLabel: ee } = Sr(O, l);
|
|
3295
3295
|
d.push({
|
|
3296
3296
|
id: C,
|
|
3297
|
-
matchId:
|
|
3297
|
+
matchId: S,
|
|
3298
3298
|
round: p,
|
|
3299
|
-
roundLabel:
|
|
3299
|
+
roundLabel: h,
|
|
3300
3300
|
homeTeam: {
|
|
3301
3301
|
name: ((Oe = (be = v.matchModel) == null ? void 0 : be.homeTeam) == null ? void 0 : Oe.name) ?? "—",
|
|
3302
|
-
shortName: ((Ae = (
|
|
3303
|
-
logo: ((_e = (Ze = (
|
|
3302
|
+
shortName: ((Ae = (ue = v.matchModel) == null ? void 0 : ue.homeTeam) == null ? void 0 : Ae.shortName) ?? null,
|
|
3303
|
+
logo: ((_e = (Ze = (me = v.matchModel) == null ? void 0 : me.homeTeam) == null ? void 0 : Ze.assets) == null ? void 0 : _e.logo) ?? null
|
|
3304
3304
|
},
|
|
3305
3305
|
awayTeam: {
|
|
3306
|
-
name: ((xe = (
|
|
3307
|
-
shortName: ((Xe = (
|
|
3308
|
-
logo: ((ve = (
|
|
3306
|
+
name: ((xe = (q = v.matchModel) == null ? void 0 : q.awayTeam) == null ? void 0 : xe.name) ?? "—",
|
|
3307
|
+
shortName: ((Xe = (ae = v.matchModel) == null ? void 0 : ae.awayTeam) == null ? void 0 : Xe.shortName) ?? null,
|
|
3308
|
+
logo: ((ve = (V = (Ge = v.matchModel) == null ? void 0 : Ge.awayTeam) == null ? void 0 : V.assets) == null ? void 0 : ve.logo) ?? null
|
|
3309
3309
|
},
|
|
3310
|
-
kickoff:
|
|
3311
|
-
kickoffIso:
|
|
3312
|
-
dateLabel:
|
|
3313
|
-
played:
|
|
3310
|
+
kickoff: Q,
|
|
3311
|
+
kickoffIso: O,
|
|
3312
|
+
dateLabel: ee,
|
|
3313
|
+
played: _,
|
|
3314
3314
|
// Scoreline only: the shared rows are labelled, the odds chip backs the predicted score's 1X2.
|
|
3315
3315
|
market: "CORRECT_SCORE_ADVANCED",
|
|
3316
3316
|
marketLabel: null,
|
|
3317
3317
|
predictionLabel: kn(I),
|
|
3318
3318
|
odds: la(I),
|
|
3319
3319
|
prediction: I,
|
|
3320
|
-
result:
|
|
3321
|
-
outcome:
|
|
3320
|
+
result: D,
|
|
3321
|
+
outcome: R,
|
|
3322
3322
|
points: ((lt = v.result) == null ? void 0 : lt.points) ?? null,
|
|
3323
|
-
selfPrediction: (o == null ? void 0 : o.get(
|
|
3324
|
-
selfPredictionLabel: kn((o == null ? void 0 : o.get(
|
|
3325
|
-
selfPoints: ((We = o == null ? void 0 : o.get(
|
|
3326
|
-
selfOutcome: ((He = o == null ? void 0 : o.get(
|
|
3323
|
+
selfPrediction: (o == null ? void 0 : o.get(S)) ?? null,
|
|
3324
|
+
selfPredictionLabel: kn((o == null ? void 0 : o.get(S)) ?? null),
|
|
3325
|
+
selfPoints: ((We = o == null ? void 0 : o.get(S)) == null ? void 0 : We.points) ?? null,
|
|
3326
|
+
selfOutcome: ((He = o == null ? void 0 : o.get(S)) == null ? void 0 : He.outcome) ?? null
|
|
3327
3327
|
});
|
|
3328
3328
|
});
|
|
3329
3329
|
}), d;
|
|
@@ -3333,55 +3333,55 @@ function pa(e) {
|
|
|
3333
3333
|
return e.forEach((i) => {
|
|
3334
3334
|
var d;
|
|
3335
3335
|
(((d = i.predictionModel) == null ? void 0 : d.fixtures) ?? []).forEach((a) => {
|
|
3336
|
-
var m,
|
|
3337
|
-
const u = a.matchId ?? ((m = a.matchModel) == null ? void 0 : m.id), s =
|
|
3336
|
+
var m, h, p, c;
|
|
3337
|
+
const u = a.matchId ?? ((m = a.matchModel) == null ? void 0 : m.id), s = Pn((h = a.prediction) == null ? void 0 : h.value);
|
|
3338
3338
|
u && s && o.set(u, {
|
|
3339
3339
|
...s,
|
|
3340
3340
|
points: ((p = a.result) == null ? void 0 : p.points) ?? null,
|
|
3341
|
-
outcome:
|
|
3341
|
+
outcome: Nn((c = a.result) == null ? void 0 : c.outcome)
|
|
3342
3342
|
});
|
|
3343
3343
|
});
|
|
3344
3344
|
}), o;
|
|
3345
3345
|
}
|
|
3346
3346
|
const ua = ({ templateId: e, target: o, self: i }) => {
|
|
3347
|
-
const { language: l } = ao(co), { sdk: d, showOdds: a, odds: u } = Ye(), { template: s } =
|
|
3347
|
+
const { language: l } = ao(co), { sdk: d, showOdds: a, odds: u } = Ye(), { template: s } = Kn(e, d), { games: m } = lo(
|
|
3348
3348
|
d,
|
|
3349
3349
|
s == null ? void 0 : s.gameIds,
|
|
3350
3350
|
!!s
|
|
3351
|
-
),
|
|
3351
|
+
), h = K(() => {
|
|
3352
3352
|
const C = /* @__PURE__ */ new Map();
|
|
3353
3353
|
return m.forEach((I) => C.set(I.id, I)), C;
|
|
3354
|
-
}, [m]), p =
|
|
3354
|
+
}, [m]), p = K(() => pa(i), [i]), c = K(
|
|
3355
3355
|
() => da(
|
|
3356
3356
|
o,
|
|
3357
3357
|
p,
|
|
3358
|
-
|
|
3358
|
+
h,
|
|
3359
3359
|
l ?? void 0
|
|
3360
3360
|
),
|
|
3361
|
-
[o, p,
|
|
3362
|
-
), y =
|
|
3361
|
+
[o, p, h, l]
|
|
3362
|
+
), y = K(
|
|
3363
3363
|
() => c.filter((C) => !C.played).map((C) => C.matchId),
|
|
3364
3364
|
[c]
|
|
3365
|
-
), { odds: v } =
|
|
3365
|
+
), { odds: v } = Xn(
|
|
3366
3366
|
d,
|
|
3367
3367
|
y,
|
|
3368
3368
|
a,
|
|
3369
3369
|
u
|
|
3370
|
-
),
|
|
3370
|
+
), S = K(() => {
|
|
3371
3371
|
const C = /* @__PURE__ */ new Map();
|
|
3372
3372
|
return o.forEach((I) => {
|
|
3373
|
-
var
|
|
3374
|
-
const
|
|
3375
|
-
if (
|
|
3376
|
-
const
|
|
3377
|
-
C.set(
|
|
3378
|
-
points: ((
|
|
3379
|
-
label:
|
|
3380
|
-
sortKey: (
|
|
3373
|
+
var Q, ee;
|
|
3374
|
+
const R = ((Q = I.predictionModel) == null ? void 0 : Q.gameInstanceId) ?? null;
|
|
3375
|
+
if (!R) return;
|
|
3376
|
+
const _ = h.get(R) ?? null, T = (_ == null ? void 0 : _.title) || R, k = ((ee = I.predictionModel) == null ? void 0 : ee.points) ?? 0, D = Un(_), O = C.get(R);
|
|
3377
|
+
C.set(R, {
|
|
3378
|
+
points: ((O == null ? void 0 : O.points) ?? 0) + k,
|
|
3379
|
+
label: T,
|
|
3380
|
+
sortKey: (O == null ? void 0 : O.sortKey) ?? D
|
|
3381
3381
|
});
|
|
3382
|
-
}), [...C.values()].sort((I,
|
|
3383
|
-
}, [o,
|
|
3384
|
-
return { matches: c, recentRounds:
|
|
3382
|
+
}), [...C.values()].sort((I, R) => I.sortKey - R.sortKey).slice(-5).map(({ points: I, label: R }) => ({ points: I, label: R }));
|
|
3383
|
+
}, [o, h]);
|
|
3384
|
+
return { matches: c, recentRounds: S, odds: v, hasSelfPredictions: p.size > 0 };
|
|
3385
3385
|
}, ma = ({ children: e }) => {
|
|
3386
3386
|
const { entityId: o, sdk: i, language: l, themeOptions: d, userIsLoggedIn: a, signInCTA: u } = Ye();
|
|
3387
3387
|
return /* @__PURE__ */ t(
|
|
@@ -3398,7 +3398,7 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3398
3398
|
children: e
|
|
3399
3399
|
}
|
|
3400
3400
|
);
|
|
3401
|
-
},
|
|
3401
|
+
}, go = N("primary", "plainColor"), At = N("primary", "onPrimary"), ha = "var(--fu-ucrc-primary-primary-button-gradient, none)", ga = `var(--fu-ucrc-primary-primary-container, color-mix(in srgb, ${go} 75%, #000 25%))`, Sn = `linear-gradient(to right, ${go}, ${ga})`, wn = {
|
|
3402
3402
|
backgroundSize: "cover",
|
|
3403
3403
|
backgroundPosition: "center",
|
|
3404
3404
|
color: At,
|
|
@@ -3419,7 +3419,7 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3419
3419
|
cursor: "pointer",
|
|
3420
3420
|
transition: "background-color 0.15s, color 0.15s",
|
|
3421
3421
|
flexShrink: 0
|
|
3422
|
-
}, Tn = { color: At, backgroundColor:
|
|
3422
|
+
}, Tn = { color: At, backgroundColor: go, backgroundImage: ha }, ge = {
|
|
3423
3423
|
root: n({ fontFamily: P.primary, color: x("textPrimary"), backgroundColor: x("surfaceVariant") }),
|
|
3424
3424
|
hero: n({ background: Sn, ...wn }),
|
|
3425
3425
|
// `--fu-ucrc-topx-hero-image` is the header image's `url(…)`, set inline.
|
|
@@ -3485,16 +3485,16 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3485
3485
|
paddingTop: r("lg"),
|
|
3486
3486
|
paddingBottom: r("lg")
|
|
3487
3487
|
})
|
|
3488
|
-
},
|
|
3488
|
+
}, In = [
|
|
3489
3489
|
"play",
|
|
3490
3490
|
"private-leagues",
|
|
3491
3491
|
"leaderboard",
|
|
3492
3492
|
"rules",
|
|
3493
3493
|
"prizes"
|
|
3494
|
-
],
|
|
3494
|
+
], En = (e) => {
|
|
3495
3495
|
if (typeof window > "u") return null;
|
|
3496
|
-
const
|
|
3497
|
-
return
|
|
3496
|
+
const o = window.location.hash.replace("#", "");
|
|
3497
|
+
return e.includes(o) ? o : null;
|
|
3498
3498
|
}, fa = (e) => {
|
|
3499
3499
|
const {
|
|
3500
3500
|
entityId: o,
|
|
@@ -3504,57 +3504,63 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3504
3504
|
userIsLoggedIn: a = !1,
|
|
3505
3505
|
signInCTA: u,
|
|
3506
3506
|
tabs: s,
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3507
|
+
tab: m,
|
|
3508
|
+
showHeader: h,
|
|
3509
|
+
defaultImagePlaceholderUrl: p,
|
|
3510
|
+
playTabBanners: c,
|
|
3511
|
+
consents: y = [],
|
|
3512
|
+
matchCardBgImageUrl: v,
|
|
3513
|
+
betslip: S,
|
|
3514
|
+
showOdds: C = !1,
|
|
3515
|
+
odds: I,
|
|
3516
|
+
operatorId: R,
|
|
3517
|
+
showCountdown: _ = !0,
|
|
3518
|
+
gameNavLabel: T = "gameWeek"
|
|
3519
|
+
} = e, { t: k } = ie("common"), D = m && In.includes(m) ? m : null, O = K(
|
|
3520
|
+
() => D ? [D] : s && s.length > 0 ? s : In,
|
|
3521
|
+
[D, s]
|
|
3522
|
+
), Q = h ?? !D, [ee, se] = $(
|
|
3523
|
+
() => En(O) ?? O[0]
|
|
3524
|
+
), B = D ?? ee, { template: M, loading: f } = Kn(o, i);
|
|
3525
|
+
Z(() => {
|
|
3526
|
+
if (D) return;
|
|
3527
|
+
const U = () => {
|
|
3528
|
+
const re = En(O);
|
|
3529
|
+
re && se(re);
|
|
3524
3530
|
};
|
|
3525
|
-
return window.addEventListener("hashchange",
|
|
3526
|
-
}, [
|
|
3527
|
-
const
|
|
3528
|
-
|
|
3529
|
-
},
|
|
3530
|
-
play:
|
|
3531
|
-
leaderboard:
|
|
3532
|
-
"private-leagues":
|
|
3533
|
-
rules:
|
|
3534
|
-
prizes:
|
|
3535
|
-
},
|
|
3536
|
-
switch (
|
|
3531
|
+
return window.addEventListener("hashchange", U), () => window.removeEventListener("hashchange", U);
|
|
3532
|
+
}, [O, D]);
|
|
3533
|
+
const z = (U) => {
|
|
3534
|
+
se(U), window.history.pushState(null, "", `#${U}`);
|
|
3535
|
+
}, H = {
|
|
3536
|
+
play: k("topX.tabs.play"),
|
|
3537
|
+
leaderboard: k("topX.tabs.leaderboard"),
|
|
3538
|
+
"private-leagues": k("topX.tabs.privateLeagues"),
|
|
3539
|
+
rules: k("topX.tabs.rules"),
|
|
3540
|
+
prizes: k("topX.tabs.prizes")
|
|
3541
|
+
}, ne = p ?? (M == null ? void 0 : M.image) ?? void 0, te = () => {
|
|
3542
|
+
switch (B) {
|
|
3537
3543
|
case "play":
|
|
3538
3544
|
return /* @__PURE__ */ t(
|
|
3539
3545
|
aa,
|
|
3540
3546
|
{
|
|
3541
|
-
template:
|
|
3542
|
-
loading:
|
|
3547
|
+
template: M,
|
|
3548
|
+
loading: f,
|
|
3543
3549
|
error: null,
|
|
3544
|
-
playTabBanners:
|
|
3545
|
-
matchCardBgImageUrl:
|
|
3546
|
-
showCountdown:
|
|
3547
|
-
gameNavLabel:
|
|
3550
|
+
playTabBanners: c,
|
|
3551
|
+
matchCardBgImageUrl: v,
|
|
3552
|
+
showCountdown: _,
|
|
3553
|
+
gameNavLabel: T
|
|
3548
3554
|
}
|
|
3549
3555
|
);
|
|
3550
3556
|
case "leaderboard":
|
|
3551
|
-
return /* @__PURE__ */ t(ca, { template:
|
|
3557
|
+
return /* @__PURE__ */ t(ca, { template: M });
|
|
3552
3558
|
case "private-leagues":
|
|
3553
|
-
return /* @__PURE__ */ t(Ir, { template:
|
|
3559
|
+
return /* @__PURE__ */ t(Ir, { template: M });
|
|
3554
3560
|
case "rules":
|
|
3555
|
-
return /* @__PURE__ */ t(Tr, { template:
|
|
3561
|
+
return /* @__PURE__ */ t(Tr, { template: M, loading: f });
|
|
3556
3562
|
case "prizes":
|
|
3557
|
-
return /* @__PURE__ */ t(Cr, { template:
|
|
3563
|
+
return /* @__PURE__ */ t(Cr, { template: M, loading: f });
|
|
3558
3564
|
default:
|
|
3559
3565
|
return null;
|
|
3560
3566
|
}
|
|
@@ -3568,51 +3574,51 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3568
3574
|
themeOptions: d,
|
|
3569
3575
|
userIsLoggedIn: a,
|
|
3570
3576
|
signInCTA: u,
|
|
3571
|
-
tabs:
|
|
3572
|
-
defaultImagePlaceholderUrl:
|
|
3573
|
-
consents:
|
|
3574
|
-
betslip:
|
|
3575
|
-
showOdds:
|
|
3576
|
-
odds: Br(
|
|
3577
|
-
children: /* @__PURE__ */
|
|
3578
|
-
/* @__PURE__ */ t(
|
|
3577
|
+
tabs: O,
|
|
3578
|
+
defaultImagePlaceholderUrl: p,
|
|
3579
|
+
consents: y,
|
|
3580
|
+
betslip: S,
|
|
3581
|
+
showOdds: C,
|
|
3582
|
+
odds: Br(I, R, S),
|
|
3583
|
+
children: /* @__PURE__ */ g("div", { css: ge.root, children: [
|
|
3584
|
+
Q && /* @__PURE__ */ t(
|
|
3579
3585
|
"div",
|
|
3580
3586
|
{
|
|
3581
|
-
css:
|
|
3582
|
-
style:
|
|
3583
|
-
children: /* @__PURE__ */ t("div", { children:
|
|
3584
|
-
/* @__PURE__ */ t("div", { css:
|
|
3585
|
-
/* @__PURE__ */ t("div", { css:
|
|
3586
|
-
] }) : /* @__PURE__ */
|
|
3587
|
-
/* @__PURE__ */ t("h1", { css:
|
|
3588
|
-
(
|
|
3587
|
+
css: ne ? ge.heroImage : ge.hero,
|
|
3588
|
+
style: ne ? { "--fu-ucrc-topx-hero-image": `url(${JSON.stringify(ne)})` } : void 0,
|
|
3589
|
+
children: /* @__PURE__ */ t("div", { children: f ? /* @__PURE__ */ g(De, { children: [
|
|
3590
|
+
/* @__PURE__ */ t("div", { css: ge.titleSkeleton }),
|
|
3591
|
+
/* @__PURE__ */ t("div", { css: ge.descriptionSkeleton })
|
|
3592
|
+
] }) : /* @__PURE__ */ g(De, { children: [
|
|
3593
|
+
/* @__PURE__ */ t("h1", { css: ge.title, children: (M == null ? void 0 : M.title) ?? "" }),
|
|
3594
|
+
(M == null ? void 0 : M.description) && /* @__PURE__ */ t(
|
|
3589
3595
|
"div",
|
|
3590
3596
|
{
|
|
3591
|
-
css:
|
|
3597
|
+
css: ge.description,
|
|
3592
3598
|
dir: "auto",
|
|
3593
|
-
dangerouslySetInnerHTML: { __html:
|
|
3599
|
+
dangerouslySetInnerHTML: { __html: M.description }
|
|
3594
3600
|
}
|
|
3595
3601
|
)
|
|
3596
3602
|
] }) })
|
|
3597
3603
|
}
|
|
3598
3604
|
),
|
|
3599
|
-
/* @__PURE__ */ t("div", { css:
|
|
3605
|
+
!D && /* @__PURE__ */ t("div", { css: ge.tabBar, children: O.map((U) => /* @__PURE__ */ t(
|
|
3600
3606
|
"button",
|
|
3601
3607
|
{
|
|
3602
3608
|
type: "button",
|
|
3603
|
-
onClick: () =>
|
|
3604
|
-
css:
|
|
3605
|
-
children:
|
|
3609
|
+
onClick: () => z(U),
|
|
3610
|
+
css: B === U ? ge.tabActive : ge.tab,
|
|
3611
|
+
children: H[U]
|
|
3606
3612
|
},
|
|
3607
|
-
|
|
3613
|
+
U
|
|
3608
3614
|
)) }),
|
|
3609
|
-
/* @__PURE__ */ t("div", { css:
|
|
3615
|
+
/* @__PURE__ */ t("div", { css: ge.content, children: /* @__PURE__ */ t(ma, { children: te() }) })
|
|
3610
3616
|
] })
|
|
3611
3617
|
}
|
|
3612
3618
|
);
|
|
3613
3619
|
}, ya = (e) => {
|
|
3614
|
-
var o, i, l, d, a, u, s, m,
|
|
3615
|
-
return /* @__PURE__ */
|
|
3620
|
+
var o, i, l, d, a, u, s, m, h, p, c, y, v;
|
|
3621
|
+
return /* @__PURE__ */ g(De, { children: [
|
|
3616
3622
|
/* @__PURE__ */ t(
|
|
3617
3623
|
ur,
|
|
3618
3624
|
{
|
|
@@ -3626,6 +3632,7 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3626
3632
|
/* @__PURE__ */ t(
|
|
3627
3633
|
mr,
|
|
3628
3634
|
{
|
|
3635
|
+
embedded: !0,
|
|
3629
3636
|
sdk: e.sdk,
|
|
3630
3637
|
language: e.language,
|
|
3631
3638
|
themeOptions: ((o = e.betslip) == null ? void 0 : o.themeOptions) ?? e.themeOptions,
|
|
@@ -3637,7 +3644,7 @@ const ua = ({ templateId: e, target: o, self: i }) => {
|
|
|
3637
3644
|
stakePresets: (u = e.betslip) == null ? void 0 : u.stakePresets,
|
|
3638
3645
|
ctaUrlTemplate: (s = e.betslip) == null ? void 0 : s.ctaUrlTemplate,
|
|
3639
3646
|
brandingLogoUrl: (m = e.betslip) == null ? void 0 : m.brandingLogoUrl,
|
|
3640
|
-
operatorId: ((
|
|
3647
|
+
operatorId: ((h = e.betslip) == null ? void 0 : h.operatorId) ?? ((c = (p = e.odds) == null ? void 0 : p.operators) == null ? void 0 : c[0]) ?? e.operatorId,
|
|
3641
3648
|
affiliateId: (y = e.betslip) == null ? void 0 : y.affiliateId,
|
|
3642
3649
|
labels: (v = e.betslip) == null ? void 0 : v.labels
|
|
3643
3650
|
}
|