fansunited-widgets-cdn 0.0.86-RC3 → 0.0.86-RC5
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/chunks/{Alert-CuOsmojH.js → Alert-B6o66mYo.js} +39 -39
- package/chunks/{CardContent-CD-WZh1l.js → CardContent-NCZhfGcZ.js} +16 -16
- package/chunks/{Snackbar-DHxnbCA3.js → ChevronRight-1pLZ7T0v.js} +100 -94
- package/chunks/{ClassicQuizWrapper-t04e9_6c.js → ClassicQuizWrapper-n2epPO4k.js} +201 -205
- package/chunks/CollectLeadForm-C_3plJtn-Dr8J3eDw.js +3918 -0
- package/chunks/{CollectLeadWrapper-CVAVswua.js → CollectLeadWrapper-CCtTZAxL.js} +55 -56
- package/chunks/EitherOrById-ClGwMK0b.js +6820 -0
- package/chunks/EitherOrPreviewWrapper-BYiKyYwi.js +46 -0
- package/chunks/Error-BurPfBJw-DWYn31sK.js +1119 -0
- package/chunks/{EventGameWrapper-BxyLL3eA.js → EventGameWrapper-BphusLTk.js} +208 -219
- package/chunks/{Grid-Dpv_ZL23.js → Grid-yjqNNhEx.js} +32 -32
- package/chunks/{IconButton-Lt9Xks7c.js → IconButton-D7onwgY0.js} +22 -22
- package/chunks/{List-DLPlZGTP.js → List-8Vy9IZiv.js} +26 -29
- package/chunks/{MatchPredictionContainer-Ct6gXvLw.js → MatchPredictionContainer-BGytBwLo.js} +52 -54
- package/chunks/{MatchQuizWrapper-Fu6RfWVn.js → MatchQuizWrapper-BGjldBpF.js} +73 -85
- package/chunks/{OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js → OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js} +104 -105
- package/chunks/{OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js → OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js} +18 -19
- package/chunks/{PersonalityQuizWrapper-MpUK4n3Y.js → PersonalityQuizWrapper-BgLFw5tM.js} +3 -3
- package/chunks/{PlayerOfTheMatch-D4vuR7pz.js → PlayerOfTheMatch-CImBLG3T.js} +1008 -609
- package/chunks/{PollWrapper-CzKj8xxE.js → PollWrapper-QpIKCCVF.js} +30 -34
- package/chunks/Portal-DegkUXpU-ByGP9zS1.js +19236 -0
- package/chunks/{PreviewQuizById-WWS_LyJR.js → PreviewQuizById-Ba6yhxKV.js} +11 -14
- package/chunks/Sheet-U5EnSrgg.js +282 -0
- package/chunks/{Stack-Dgf2LXN0.js → Stack-DbDi7kPO.js} +30 -30
- package/chunks/Tabs-leN3Fb8D--YMyy3EM.js +783 -0
- package/chunks/{TeamNextMatchPrediction-C7HilNqW.js → TeamNextMatchPrediction-9VSQOCcC.js} +2 -2
- package/chunks/Tutorial-CRJLOovs.js +1072 -0
- package/chunks/createLucideIcon-CMWOQsDL.js +381 -0
- package/chunks/{createSvgIcon-DVA0KIUd.js → createSvgIcon-D9D4a1R9.js} +412 -390
- package/chunks/default-quiz-bg-ADjjIfPj.js +126 -0
- package/chunks/{index-C9MpfjqV.js → index-0ADq_9jd.js} +1 -1
- package/chunks/{index-DePIySlY.js → index-B74jHeYm.js} +2 -2
- package/chunks/{index-tzsdMoo-.js → index-BfVvJg5R.js} +1 -1
- package/chunks/{index-BqCHiyI6.js → index-BycLbIYY.js} +1 -1
- package/chunks/{index-DvgG9XJj.js → index-C6KAc5B_.js} +1 -1
- package/chunks/{index-24AwmTVJ.js → index-CHV6tlpH.js} +5 -5
- package/chunks/{index-C5qRf4TV.js → index-CILd3yUc.js} +1 -1
- package/chunks/index-CJqcqbHq.js +5 -0
- package/chunks/{index-CMmQs5A5.js → index-CK2RXrJm.js} +1 -1
- package/chunks/{index-BU6iona7.js → index-CPTAlr_t.js} +1 -1
- package/chunks/{index-DNeawo0R.js → index-CiB_Gqim.js} +1 -1
- package/chunks/{index-QpZE-92Y.js → index-CvGJXa6l.js} +1 -1
- package/chunks/{index-BSD7mvEU.js → index-CviTG4Nv.js} +1 -1
- package/chunks/index-DUQ2LFod-Cw45tHim.js +4510 -0
- package/chunks/{index-rgFj976B.js → index-Da0AXb_O.js} +1 -1
- package/chunks/{index-DoRYU_1L.js → index-DwR4J2nN.js} +1 -1
- package/chunks/{index-3vJS8JzK.js → index-UwW9niUj.js} +1 -1
- package/chunks/index.es-wHqA4PHm.js +11480 -0
- package/chunks/{init-BEkECL0v.js → init-C-gCorsh.js} +1 -1
- package/chunks/{main-XP7dqk6g.js → main-Bh6iw92_.js} +548 -564
- package/chunks/{Button-BV7YIFkS.js → resolveProps-Bgg0H6c2.js} +471 -313
- package/chunks/{users-D_xgC4iQ.js → users-CXdzg3DM.js} +1 -1
- package/fu-widgets.es.js +2 -2
- package/fu-widgets.iife.js +310 -257
- package/manifest.json +56 -72
- package/package.json +1 -1
- package/chunks/AspectRatio-D3Sgxj7p.js +0 -125
- package/chunks/Avatar-BTsEKfhc.js +0 -186
- package/chunks/Card-DRIT0wtY.js +0 -129
- package/chunks/ChevronRight-BrCKlr3T.js +0 -11
- package/chunks/Chip-6HLNTHMI.js +0 -281
- package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +0 -1560
- package/chunks/DialogActions-C5kAgHal.js +0 -45
- package/chunks/DialogContent-MIXff4nd.js +0 -60
- package/chunks/EitherOrById-CAo8gPjm.js +0 -1496
- package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +0 -47
- package/chunks/Error-DhQL89pn-BwTV1meb.js +0 -418
- package/chunks/Link-DLuj1USf.js +0 -228
- package/chunks/ListItemDecorator-CE2eQLip.js +0 -1882
- package/chunks/ModalDialog-Ci3hulZA.js +0 -619
- package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +0 -2764
- package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +0 -12717
- package/chunks/Portal-DA1mxzSo.js +0 -41
- package/chunks/Select-p_cHpLhi.js +0 -3418
- package/chunks/Sheet-BaCzogZK.js +0 -167
- package/chunks/Tabs-CSu_cWNi.js +0 -784
- package/chunks/Tutorial-DFNZxmAx.js +0 -427
- package/chunks/createLucideIcon-B6NxpYkb.js +0 -79
- package/chunks/createSvgIcon-7h7XC877.js +0 -119
- package/chunks/default-quiz-bg-CTzaADn7.js +0 -4
- package/chunks/getReactElementRef-BD-S8A24.js +0 -25
- package/chunks/index-CicEY2Jv.js +0 -5
- package/chunks/index.es-CHqz6mjo.js +0 -6162
- package/chunks/resolveProps-BfYZubfk.js +0 -37
- package/chunks/variantColorInheritance-DI3wUohX.js +0 -28
package/chunks/{MatchPredictionContainer-Ct6gXvLw.js → MatchPredictionContainer-BGytBwLo.js}
RENAMED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { j as e, B as
|
|
2
|
-
import { B as U, T as w } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { I as ce } from "./IconButton-Lt9Xks7c.js";
|
|
9
|
-
import { A as le } from "./Alert-CuOsmojH.js";
|
|
1
|
+
import { j as e, B as f, t as C, r as a, a as W, p as q, C as ne } from "./main-Bh6iw92_.js";
|
|
2
|
+
import { B as U, T as w, C as K } from "./resolveProps-Bgg0H6c2.js";
|
|
3
|
+
import { G as D } from "./Grid-yjqNNhEx.js";
|
|
4
|
+
import { S as te, C as ie, a as ae } from "./ChevronRight-1pLZ7T0v.js";
|
|
5
|
+
import { c as V } from "./createSvgIcon-D9D4a1R9.js";
|
|
6
|
+
import { I as ce } from "./IconButton-D7onwgY0.js";
|
|
7
|
+
import { A as le } from "./Alert-B6o66mYo.js";
|
|
10
8
|
const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
11
9
|
d: "M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
12
10
|
}), "CheckCircleOutline"), ue = V(/* @__PURE__ */ e.jsx("path", {
|
|
@@ -218,7 +216,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
218
216
|
isLoading: n,
|
|
219
217
|
predictionCount: l,
|
|
220
218
|
totalPredictions: c,
|
|
221
|
-
onClick:
|
|
219
|
+
onClick: h,
|
|
222
220
|
teamName: x,
|
|
223
221
|
teamLogo: p
|
|
224
222
|
}) => {
|
|
@@ -229,26 +227,26 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
229
227
|
{
|
|
230
228
|
variant: "outlined",
|
|
231
229
|
color: "primary",
|
|
232
|
-
onClick: () => !s &&
|
|
230
|
+
onClick: () => !s && h(t),
|
|
233
231
|
disabled: n || s,
|
|
234
232
|
sx: (i) => b.predictionButton.base(i, r, s),
|
|
235
233
|
children: y ? (
|
|
236
234
|
// Draw button content
|
|
237
235
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
238
|
-
/* @__PURE__ */ e.jsx(
|
|
236
|
+
/* @__PURE__ */ e.jsx(f, { sx: b.teamLogoContainer, children: /* @__PURE__ */ e.jsx(w, { level: "h3", textColor: "text.primary", sx: { fontWeight: "bold" }, children: "X" }) }),
|
|
239
237
|
/* @__PURE__ */ e.jsx(w, { level: "body-sm", textColor: "text.primary", children: C("predictions.draw") })
|
|
240
238
|
] })
|
|
241
239
|
) : (
|
|
242
240
|
// Team button content
|
|
243
241
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
244
|
-
p && /* @__PURE__ */ e.jsx(
|
|
242
|
+
p && /* @__PURE__ */ e.jsx(f, { sx: b.teamLogoContainer, children: /* @__PURE__ */ e.jsx("img", { src: p, alt: x || "", style: b.teamLogoImage }) }),
|
|
245
243
|
/* @__PURE__ */ e.jsx(w, { level: "body-sm", textColor: "text.primary", children: x || "" })
|
|
246
244
|
] })
|
|
247
245
|
)
|
|
248
246
|
}
|
|
249
247
|
),
|
|
250
|
-
s && /* @__PURE__ */ e.jsxs(
|
|
251
|
-
/* @__PURE__ */ e.jsx(
|
|
248
|
+
s && /* @__PURE__ */ e.jsxs(f, { sx: b.progressContainer, children: [
|
|
249
|
+
/* @__PURE__ */ e.jsx(f, { sx: b.progressTrack, children: /* @__PURE__ */ e.jsx(f, { sx: b.progressIndicator(r, m) }) }),
|
|
252
250
|
/* @__PURE__ */ e.jsxs(w, { level: "body-xs", textAlign: "center", textColor: "text.secondary", children: [
|
|
253
251
|
m,
|
|
254
252
|
"% (",
|
|
@@ -263,7 +261,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
263
261
|
x: 0,
|
|
264
262
|
2: 0,
|
|
265
263
|
total: 0
|
|
266
|
-
}), [c,
|
|
264
|
+
}), [c, h] = a.useState(!1), [x, p] = a.useState(null), m = async () => {
|
|
267
265
|
try {
|
|
268
266
|
const i = await t.predictor.getMarketSummary(r, s);
|
|
269
267
|
if (i && i.fullTimeOneXTwo) {
|
|
@@ -280,7 +278,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
280
278
|
console.error("Error fetching market summary:", i), p(i instanceof Error ? i : new Error("Failed to fetch market summary"));
|
|
281
279
|
}
|
|
282
280
|
}, y = async (i) => {
|
|
283
|
-
|
|
281
|
+
h(!0);
|
|
284
282
|
try {
|
|
285
283
|
return await t.predictor.makeFootballPrediction(r, s, i), l((o) => {
|
|
286
284
|
const d = { ...o };
|
|
@@ -289,7 +287,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
289
287
|
} catch (o) {
|
|
290
288
|
return console.error("Error making prediction:", o), p(o instanceof Error ? o : new Error("Failed to make prediction")), !1;
|
|
291
289
|
} finally {
|
|
292
|
-
|
|
290
|
+
h(!1);
|
|
293
291
|
}
|
|
294
292
|
};
|
|
295
293
|
return a.useEffect(() => {
|
|
@@ -303,8 +301,8 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
303
301
|
};
|
|
304
302
|
}, pe = ({ match: t, market: r, title: s }) => {
|
|
305
303
|
var A, E, O, T, B, z;
|
|
306
|
-
const n = W(), { defaultImagePlaceholderUrl: l } = q(), [c,
|
|
307
|
-
|
|
304
|
+
const n = W(), { defaultImagePlaceholderUrl: l } = q(), [c, h] = a.useState(null), [x, p] = a.useState(!1), [m, y] = a.useState(!1), { predictionStats: i, isLoading: o, makePrediction: d } = oe(n, t.id, r), u = async (H) => {
|
|
305
|
+
h(H), await d(H) && (p(!0), y(!0), setTimeout(() => {
|
|
308
306
|
y(!1);
|
|
309
307
|
}, 3e3));
|
|
310
308
|
}, S = s || (r === "HT_1X2" ? C("predictions.question_ht_1x2") : C("predictions.question_ft_1x2"));
|
|
@@ -365,8 +363,8 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
365
363
|
)
|
|
366
364
|
] });
|
|
367
365
|
}, N = a.memo(({ score: t, onIncrement: r, onDecrement: s, isLoading: n, layout: l }) => {
|
|
368
|
-
const c = (x) => /* @__PURE__ */ e.jsx(ce, { size: "sm", variant: "solid", color: "primary", ...x }),
|
|
369
|
-
return l === "horizontal" ? /* @__PURE__ */ e.jsxs(
|
|
366
|
+
const c = (x) => /* @__PURE__ */ e.jsx(ce, { size: "sm", variant: "solid", color: "primary", ...x }), h = /* @__PURE__ */ e.jsx(w, { level: "h3", sx: g.scoreDisplay, children: t });
|
|
367
|
+
return l === "horizontal" ? /* @__PURE__ */ e.jsxs(f, { sx: g.scoreInputContainer.horizontal, children: [
|
|
370
368
|
/* @__PURE__ */ e.jsx(
|
|
371
369
|
c,
|
|
372
370
|
{
|
|
@@ -387,7 +385,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
387
385
|
children: /* @__PURE__ */ e.jsx(ie, {})
|
|
388
386
|
}
|
|
389
387
|
),
|
|
390
|
-
|
|
388
|
+
h,
|
|
391
389
|
/* @__PURE__ */ e.jsx(
|
|
392
390
|
c,
|
|
393
391
|
{
|
|
@@ -408,7 +406,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
408
406
|
children: /* @__PURE__ */ e.jsx(ae, {})
|
|
409
407
|
}
|
|
410
408
|
)
|
|
411
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
409
|
+
] }) : /* @__PURE__ */ e.jsx(f, { sx: g.scoreInputContainer.vertical, children: /* @__PURE__ */ e.jsxs(f, { sx: g.scoreInputContainer.verticalInner, children: [
|
|
412
410
|
/* @__PURE__ */ e.jsx(
|
|
413
411
|
c,
|
|
414
412
|
{
|
|
@@ -424,7 +422,7 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
424
422
|
children: /* @__PURE__ */ e.jsx(xe, {})
|
|
425
423
|
}
|
|
426
424
|
),
|
|
427
|
-
|
|
425
|
+
h,
|
|
428
426
|
/* @__PURE__ */ e.jsx(
|
|
429
427
|
c,
|
|
430
428
|
{
|
|
@@ -445,14 +443,14 @@ const de = V(/* @__PURE__ */ e.jsx("path", {
|
|
|
445
443
|
N.displayName = "ScoreInput";
|
|
446
444
|
const F = a.memo(({ team: t, sx: r }) => {
|
|
447
445
|
var s;
|
|
448
|
-
return /* @__PURE__ */ e.jsxs(
|
|
449
|
-
((s = t == null ? void 0 : t.assets) == null ? void 0 : s.logo) && /* @__PURE__ */ e.jsx(
|
|
446
|
+
return /* @__PURE__ */ e.jsxs(f, { sx: { ...g.teamDisplay.base, ...r }, children: [
|
|
447
|
+
((s = t == null ? void 0 : t.assets) == null ? void 0 : s.logo) && /* @__PURE__ */ e.jsx(f, { component: "img", src: t.assets.logo, alt: t.name, sx: g.teamLogo }),
|
|
450
448
|
/* @__PURE__ */ e.jsx(w, { level: "title-md", sx: g.teamName, children: (t == null ? void 0 : t.name) || "Team" })
|
|
451
449
|
] });
|
|
452
450
|
});
|
|
453
451
|
F.displayName = "TeamDisplay";
|
|
454
452
|
const me = ({ match: t, market: r, title: s }) => {
|
|
455
|
-
const n = W(), { defaultImagePlaceholderUrl: l } = q(), [c,
|
|
453
|
+
const n = W(), { defaultImagePlaceholderUrl: l } = q(), [c, h] = a.useState(0), [x, p] = a.useState(0), [m, y] = a.useState(!1), [i, o] = a.useState(!1), [d, u] = a.useState(!1), [S, A] = a.useState(!0), [E, O] = a.useState(null), { isLoading: T, makePrediction: B } = oe(n, t.id, r);
|
|
456
454
|
a.useEffect(() => {
|
|
457
455
|
const k = async () => {
|
|
458
456
|
var j, $, R;
|
|
@@ -469,7 +467,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
469
467
|
);
|
|
470
468
|
if ((R = ($ = (j = P == null ? void 0 : P.fixtures) == null ? void 0 : j[0]) == null ? void 0 : $.prediction) != null && R.value) {
|
|
471
469
|
const M = P.fixtures[0].prediction.value, [v, L] = M.split(":").map(Number);
|
|
472
|
-
!isNaN(v) && !isNaN(L) && (
|
|
470
|
+
!isNaN(v) && !isNaN(L) && (h(v), p(L), O(P.id));
|
|
473
471
|
}
|
|
474
472
|
}
|
|
475
473
|
} catch (_) {
|
|
@@ -506,15 +504,15 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
506
504
|
y(!1), u(!0), setTimeout(() => u(!1), 3e3);
|
|
507
505
|
}
|
|
508
506
|
}, I = (k) => {
|
|
509
|
-
k === "home" ?
|
|
507
|
+
k === "home" ? h((j) => Math.min(j + 1, 99)) : p((j) => Math.min(j + 1, 99)), o(!1);
|
|
510
508
|
}, Y = (k) => {
|
|
511
|
-
k === "home" ?
|
|
509
|
+
k === "home" ? h((j) => Math.max(j - 1, 0)) : p((j) => Math.max(j - 1, 0)), o(!1);
|
|
512
510
|
}, se = i ? C("predictions.success_message", "Prediction accepted") : E ? C("predictions.update_prediction", "Update prediction") : C("predictions.make_prediction", "Submit prediction");
|
|
513
511
|
return /* @__PURE__ */ e.jsxs(K, { sx: { ...g.card, backgroundImage: l ? `url(${l})` : "none" }, children: [
|
|
514
512
|
/* @__PURE__ */ e.jsx(w, { level: "h4", sx: g.title, children: z }),
|
|
515
|
-
/* @__PURE__ */ e.jsxs(
|
|
513
|
+
/* @__PURE__ */ e.jsxs(f, { sx: g.desktopContainer, children: [
|
|
516
514
|
/* @__PURE__ */ e.jsx(F, { team: t.homeTeam, sx: g.teamDisplay.homeDesktop }),
|
|
517
|
-
/* @__PURE__ */ e.jsxs(
|
|
515
|
+
/* @__PURE__ */ e.jsxs(f, { sx: g.scoreControlsContainer, children: [
|
|
518
516
|
/* @__PURE__ */ e.jsx(
|
|
519
517
|
N,
|
|
520
518
|
{
|
|
@@ -539,8 +537,8 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
539
537
|
] }),
|
|
540
538
|
/* @__PURE__ */ e.jsx(F, { team: t.awayTeam, sx: g.teamDisplay.awayDesktop })
|
|
541
539
|
] }),
|
|
542
|
-
/* @__PURE__ */ e.jsxs(
|
|
543
|
-
/* @__PURE__ */ e.jsxs(
|
|
540
|
+
/* @__PURE__ */ e.jsxs(f, { sx: g.mobileContainer, children: [
|
|
541
|
+
/* @__PURE__ */ e.jsxs(f, { sx: g.mobileRow, children: [
|
|
544
542
|
/* @__PURE__ */ e.jsx(F, { team: t.homeTeam }),
|
|
545
543
|
/* @__PURE__ */ e.jsx(
|
|
546
544
|
N,
|
|
@@ -553,7 +551,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
553
551
|
}
|
|
554
552
|
)
|
|
555
553
|
] }),
|
|
556
|
-
/* @__PURE__ */ e.jsxs(
|
|
554
|
+
/* @__PURE__ */ e.jsxs(f, { sx: g.mobileRow, children: [
|
|
557
555
|
/* @__PURE__ */ e.jsx(F, { team: t.awayTeam }),
|
|
558
556
|
/* @__PURE__ */ e.jsx(
|
|
559
557
|
N,
|
|
@@ -589,7 +587,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
589
587
|
isLoading: n,
|
|
590
588
|
predictionCount: l,
|
|
591
589
|
totalPredictions: c,
|
|
592
|
-
onClick:
|
|
590
|
+
onClick: h
|
|
593
591
|
}) => {
|
|
594
592
|
const x = re(l, c);
|
|
595
593
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -598,7 +596,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
598
596
|
{
|
|
599
597
|
variant: "outlined",
|
|
600
598
|
color: "primary",
|
|
601
|
-
onClick: () => !s &&
|
|
599
|
+
onClick: () => !s && h(),
|
|
602
600
|
disabled: n || s,
|
|
603
601
|
sx: (p) => ({
|
|
604
602
|
...b.predictionButton.base(p, r, s),
|
|
@@ -607,8 +605,8 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
607
605
|
children: /* @__PURE__ */ e.jsx(w, { level: "body-sm", textColor: "text.primary", children: t === "yes" ? C("predictions.yes") : C("predictions.no") })
|
|
608
606
|
}
|
|
609
607
|
),
|
|
610
|
-
s && /* @__PURE__ */ e.jsxs(
|
|
611
|
-
/* @__PURE__ */ e.jsx(
|
|
608
|
+
s && /* @__PURE__ */ e.jsxs(f, { sx: b.progressContainer, children: [
|
|
609
|
+
/* @__PURE__ */ e.jsx(f, { sx: b.progressTrack, children: /* @__PURE__ */ e.jsx(f, { sx: b.progressIndicator(r, x) }) }),
|
|
612
610
|
/* @__PURE__ */ e.jsxs(w, { level: "body-xs", textAlign: "center", textColor: "text.secondary", children: [
|
|
613
611
|
x,
|
|
614
612
|
"% (",
|
|
@@ -617,12 +615,12 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
617
615
|
] })
|
|
618
616
|
] })
|
|
619
617
|
] });
|
|
620
|
-
},
|
|
618
|
+
}, he = (t, r, s, n) => {
|
|
621
619
|
const [l, c] = a.useState({
|
|
622
620
|
yes: 0,
|
|
623
621
|
no: 0,
|
|
624
622
|
total: 0
|
|
625
|
-
}), [
|
|
623
|
+
}), [h, x] = a.useState(!1), [p, m] = a.useState(null), y = async () => {
|
|
626
624
|
try {
|
|
627
625
|
const o = n ? (
|
|
628
626
|
// @ts-expect-error - market is not assignable to type 'MarketType'
|
|
@@ -662,13 +660,13 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
662
660
|
r && y();
|
|
663
661
|
}, [r, n]), {
|
|
664
662
|
predictionStats: l,
|
|
665
|
-
isLoading:
|
|
663
|
+
isLoading: h,
|
|
666
664
|
error: p,
|
|
667
665
|
makePrediction: i,
|
|
668
666
|
refreshSummary: y
|
|
669
667
|
};
|
|
670
|
-
},
|
|
671
|
-
const l = W(), { defaultImagePlaceholderUrl: c } = q(), [
|
|
668
|
+
}, fe = ({ match: t, market: r, title: s, playerId: n }) => {
|
|
669
|
+
const l = W(), { defaultImagePlaceholderUrl: c } = q(), [h, x] = a.useState(null), [p, m] = a.useState(!1), [y, i] = a.useState(!1), { predictionStats: o, isLoading: d, makePrediction: u } = he(l, t.id, r, n), S = async (E) => {
|
|
672
670
|
x(E), await u(E) && (m(!0), i(!0), setTimeout(() => {
|
|
673
671
|
i(!1);
|
|
674
672
|
}, 3e3));
|
|
@@ -694,7 +692,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
694
692
|
ee,
|
|
695
693
|
{
|
|
696
694
|
type: "yes",
|
|
697
|
-
isSelected:
|
|
695
|
+
isSelected: h === !0,
|
|
698
696
|
isPredictionMade: p,
|
|
699
697
|
isLoading: d,
|
|
700
698
|
predictionCount: o.yes,
|
|
@@ -706,7 +704,7 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
706
704
|
ee,
|
|
707
705
|
{
|
|
708
706
|
type: "no",
|
|
709
|
-
isSelected:
|
|
707
|
+
isSelected: h === !1,
|
|
710
708
|
isPredictionMade: p,
|
|
711
709
|
isLoading: d,
|
|
712
710
|
predictionCount: o.no,
|
|
@@ -728,14 +726,14 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
728
726
|
)
|
|
729
727
|
] });
|
|
730
728
|
}, ge = ["BOTH_TEAMS_SCORE", "PENALTY_MATCH", "RED_CARD_MATCH"], ye = ["FT_1X2", "HT_1X2"], Ce = ["CORRECT_SCORE", "CORRECT_SCORE_HT", "CORRECT_SCORE_ADVANCED"], Se = ({ match: t, market: r }) => {
|
|
731
|
-
const s = () => !t || !t.availableMarkets ? !1 : t.availableMarkets.includes(r), n = () => s() ? ye.includes(r) ? /* @__PURE__ */ e.jsx(pe, { match: t, market: r }) : ge.includes(r) ? /* @__PURE__ */ e.jsx(
|
|
732
|
-
return /* @__PURE__ */ e.jsx(
|
|
733
|
-
},
|
|
734
|
-
const [n, l] = a.useState(!0), [c,
|
|
729
|
+
const s = () => !t || !t.availableMarkets ? !1 : t.availableMarkets.includes(r), n = () => s() ? ye.includes(r) ? /* @__PURE__ */ e.jsx(pe, { match: t, market: r }) : ge.includes(r) ? /* @__PURE__ */ e.jsx(fe, { match: t, market: r }) : Ce.includes(r) ? /* @__PURE__ */ e.jsx(me, { match: t, market: r }) : (console.warn(`Unsupported market type: ${r}`), null) : (console.warn(`Market ${r} is not available for match ${t.id}`), null);
|
|
730
|
+
return /* @__PURE__ */ e.jsx(f, { children: n() });
|
|
731
|
+
}, Re = ({ contentId: t, market: r, contentType: s }) => {
|
|
732
|
+
const [n, l] = a.useState(!0), [c, h] = a.useState(null), [x, p] = a.useState(!1), m = W(), y = async () => {
|
|
735
733
|
l(!0), p(!1);
|
|
736
734
|
try {
|
|
737
735
|
let i;
|
|
738
|
-
s === "match" ? i = await m.football.getMatchById(t) : i = await m.football.getNextMatchForTeam(t),
|
|
736
|
+
s === "match" ? i = await m.football.getMatchById(t) : i = await m.football.getNextMatchForTeam(t), h(i);
|
|
739
737
|
} catch (i) {
|
|
740
738
|
console.warn(`Error fetching ${s}:`, i), p(!0);
|
|
741
739
|
} finally {
|
|
@@ -744,8 +742,8 @@ const me = ({ match: t, market: r, title: s }) => {
|
|
|
744
742
|
};
|
|
745
743
|
return a.useEffect(() => {
|
|
746
744
|
y();
|
|
747
|
-
}, [t, s]), !c || x ? null : n ? /* @__PURE__ */ e.jsx(
|
|
745
|
+
}, [t, s]), !c || x ? null : n ? /* @__PURE__ */ e.jsx(f, { sx: { display: "flex", justifyContent: "center", p: 4 }, children: /* @__PURE__ */ e.jsx(ne, {}) }) : /* @__PURE__ */ e.jsx(Se, { match: c, market: r });
|
|
748
746
|
};
|
|
749
747
|
export {
|
|
750
|
-
|
|
748
|
+
Re as default
|
|
751
749
|
};
|