fansunited-frontend-components 0.0.53 → 0.0.55
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/Betslip.js +1 -1
- package/ChanceGame.js +7 -7
- package/ClassicQuizPlay.js +19 -19
- package/CollectLead.js +6 -6
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +99 -93
- package/EventGamePlay.js +22 -22
- package/Leaderboard.js +9 -9
- package/MatchQuizPlay.js +25 -25
- package/PersonalityQuizPlay.js +18 -18
- package/PickThePair.js +8 -8
- package/PollVote.js +16 -16
- package/Predictor.js +67 -69
- package/chunks/{AlertMessage-CQ9WJHSb.js → AlertMessage-BKksUsV9.js} +4 -4
- package/chunks/{ArrowRightAlt-C1U8SNu-.js → ArrowRightAlt-Dz5adIZG.js} +1 -1
- package/chunks/{Avatar-COVJnfGS.js → Avatar-Cm5QOeVC.js} +3 -3
- package/chunks/{Button-COvmPv4P.js → Button-DPGn5NZd.js} +1 -1
- package/chunks/{ChanceGameEmbedVariant-lfZlSATv.js → ChanceGameEmbedVariant-ConiQ7Ej.js} +8 -8
- package/chunks/{CheckCircle-h7-xLUq-.js → CheckCircle-DSloUas8.js} +2 -2
- package/chunks/{Close-DBaorsP1.js → Close-3OfJFbc2.js} +1 -1
- package/chunks/{Close-BTC6xyyj.js → Close-RflsWFtK.js} +1 -1
- package/chunks/{CollectLeadForm-O7Cpe0ix.js → CollectLeadForm-DGbeJX5k.js} +14 -14
- package/chunks/{Divider-DBCeQt9x.js → Divider-CX-Q07Pb.js} +3 -3
- package/chunks/{Edit-BwwxJdNv.js → Edit-DD3_eq9I.js} +5 -5
- package/chunks/{EmojiEvents-DVPGlTU_.js → EmojiEvents-DZiJTHmn.js} +1 -1
- package/chunks/{FavoriteBorder-BnhfbKy1.js → FavoriteBorder-DdzKOJK4.js} +1 -1
- package/chunks/{FormControl-COjw1gQd.js → FormControl-DMPYb4NZ.js} +4 -4
- package/chunks/{FormLabel-e5_v5cjP.js → FormLabel-D1-amwv5.js} +3 -3
- package/chunks/{Input-er-Yyqtt.js → Input-Bf_Of6m_.js} +3 -3
- package/chunks/{KeyboardArrowDown-BeaYH92n.js → KeyboardArrowDown-CbtwRxfA.js} +1 -1
- package/chunks/{ModalDialog-XkhZtgYm.js → ModalDialog-CmE2hP2R.js} +3 -3
- package/chunks/{NotFoundSkeleton-C71TRYl5.js → NotFoundSkeleton-BJ7rW_uC.js} +7 -7
- package/chunks/{Notification-CkPupg9q.js → Notification-BG5P1Xiq.js} +5 -5
- package/chunks/{OverlayApiErrorSkeleton-CkuDu9uV.js → OverlayApiErrorSkeleton-TzgpJPyA.js} +6 -6
- package/chunks/{OverlayLeadAfterCollection-Dkxl4cKn.js → OverlayLeadAfterCollection-OgciFxV5.js} +5 -5
- package/chunks/{OverlayScoreStateSkeleton-RauDjIg5.js → OverlayScoreStateSkeleton-BnWKglMw.js} +4 -4
- package/chunks/{Person-WCt2MN5j.js → Person-B4_Qrd55.js} +2 -2
- package/chunks/{PickOneOfX-DabfTR2W.js → PickOneOfX-gVM5GmqF.js} +2 -2
- package/chunks/{Popper-OPgbZzY7.js → Popper-DlJYI9q0.js} +2 -2
- package/chunks/{Portal-BQilulgu.js → Portal-Bjgk7NwD.js} +1 -1
- package/chunks/{PrizeCard-DgHyperX.js → PrizeCard-C2El3VOB.js} +747 -727
- package/chunks/{Select-9gmhEo71.js → Select-BtID79ha.js} +4 -4
- package/chunks/{Spinner-BoysVPn7.js → Spinner-DWJCKaY5.js} +2 -2
- package/chunks/{SplitLeadAfterCollection-C5oCDYT1.js → SplitLeadAfterCollection-D0v9FpUM.js} +6 -6
- package/chunks/{Stack-INH9bhkC.js → Stack-CNhi3qAZ.js} +2 -2
- package/chunks/{StandardContentSkeleton-DsAhzMfU.js → StandardContentSkeleton-CGC0O2rh.js} +1 -1
- package/chunks/{Tabs-DaVatjCJ.js → Tabs-Bh_l_QcU.js} +4 -4
- package/chunks/{Textarea-DeMxp3Zn.js → Textarea-CfUzSon9.js} +4 -4
- package/chunks/{TimerOutlined-DJh2vL3s.js → TimerOutlined-Cq6_x3k0.js} +1 -1
- package/chunks/{helpers-Bd9FT9hj.js → helpers-uh28Hksw.js} +1 -1
- package/chunks/index-DUdE2FPw.js +4 -0
- package/chunks/{main-C7QFqjXA.js → main-B69-LPOU.js} +4 -4
- package/chunks/{main-DWw1vqVY.js → main-BJWrrdA7.js} +14 -14
- package/chunks/{useEventCallback-vbTEFVPa.js → useEventCallback-Dqgs56Ox.js} +2 -2
- package/chunks/{useForwardedInput-DumYVfgj.js → useForwardedInput-BtJQsvkW.js} +3 -3
- package/chunks/{useImageVariant-B1ObJh_B.js → useImageVariant-f37LbO43.js} +1 -1
- package/index.js +3 -3
- package/package.json +2 -2
- package/chunks/index-BjfKDjAM.js +0 -4
package/EitherOrPlay.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as t, jsxs as g, Fragment as De } from "react/jsx-runtime";
|
|
2
|
-
import { useState as D, useEffect as ge, useRef as qe, useCallback as
|
|
3
|
-
import { l as Ce, c as be, k as ze, B as r, f as se, i as xe, a as q, b as fe, e as pe, H as Ht, u as Me, d as jt, W as Se, m as St, n as Gt } from "./chunks/PrizeCard-
|
|
4
|
-
import { P as Vt } from "./chunks/Portal-
|
|
2
|
+
import { useState as D, useEffect as ge, useRef as qe, useCallback as Oe } from "react";
|
|
3
|
+
import { l as Ce, c as be, k as ze, B as r, f as se, i as xe, a as q, b as fe, e as pe, H as Ht, u as Me, d as jt, W as Se, m as St, n as Gt } from "./chunks/PrizeCard-C2El3VOB.js";
|
|
4
|
+
import { P as Vt } from "./chunks/Portal-Bjgk7NwD.js";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { S as He } from "./chunks/Spinner-
|
|
6
|
+
import { S as He } from "./chunks/Spinner-DWJCKaY5.js";
|
|
7
7
|
import { z as Nt } from "./chunks/index-5MPtbA_r.js";
|
|
8
|
-
import { g as Yt, h as re, e as je, a as Ct } from "./chunks/helpers-
|
|
9
|
-
import { S as _t, N as qt, O as Kt } from "./chunks/NotFoundSkeleton-
|
|
10
|
-
import { u as Xt, b as Ge, d as Ke, a as Xe } from "./chunks/useImageVariant-
|
|
11
|
-
import { A as Ze, O as Zt } from "./chunks/ArrowRightAlt-
|
|
12
|
-
import { T as x, B as me } from "./chunks/Button-
|
|
13
|
-
import { F as Fe, a as It } from "./chunks/FavoriteBorder-
|
|
14
|
-
import { E as Pe } from "./chunks/EmojiEvents-
|
|
15
|
-
import { C as Ne } from "./chunks/CheckCircle-
|
|
16
|
-
import { T as Jt } from "./chunks/TimerOutlined-
|
|
17
|
-
import { S as we } from "./chunks/Stack-
|
|
18
|
-
import { A as Qt, S as Tt, O as en } from "./chunks/OverlayApiErrorSkeleton-
|
|
19
|
-
import { S as tn, T as nn, P as rn } from "./chunks/Person-
|
|
20
|
-
import { A as on } from "./chunks/Avatar-
|
|
21
|
-
import { t as vt, T as Pt, a as kt, b as Ee, c as We } from "./chunks/Tabs-
|
|
22
|
-
import { S as ln, a as an, O as sn, b as cn } from "./chunks/OverlayLeadAfterCollection-
|
|
23
|
-
import { C as dn } from "./chunks/CollectLeadForm-
|
|
8
|
+
import { g as Yt, h as re, e as je, a as Ct } from "./chunks/helpers-uh28Hksw.js";
|
|
9
|
+
import { S as _t, N as qt, O as Kt } from "./chunks/NotFoundSkeleton-BJ7rW_uC.js";
|
|
10
|
+
import { u as Xt, b as Ge, d as Ke, a as Xe } from "./chunks/useImageVariant-f37LbO43.js";
|
|
11
|
+
import { A as Ze, O as Zt } from "./chunks/ArrowRightAlt-Dz5adIZG.js";
|
|
12
|
+
import { T as x, B as me } from "./chunks/Button-DPGn5NZd.js";
|
|
13
|
+
import { F as Fe, a as It } from "./chunks/FavoriteBorder-DdzKOJK4.js";
|
|
14
|
+
import { E as Pe } from "./chunks/EmojiEvents-DZiJTHmn.js";
|
|
15
|
+
import { C as Ne } from "./chunks/CheckCircle-DSloUas8.js";
|
|
16
|
+
import { T as Jt } from "./chunks/TimerOutlined-Cq6_x3k0.js";
|
|
17
|
+
import { S as we } from "./chunks/Stack-CNhi3qAZ.js";
|
|
18
|
+
import { A as Qt, S as Tt, O as en } from "./chunks/OverlayApiErrorSkeleton-TzgpJPyA.js";
|
|
19
|
+
import { S as tn, T as nn, P as rn } from "./chunks/Person-B4_Qrd55.js";
|
|
20
|
+
import { A as on } from "./chunks/Avatar-Cm5QOeVC.js";
|
|
21
|
+
import { t as vt, T as Pt, a as kt, b as Ee, c as We } from "./chunks/Tabs-Bh_l_QcU.js";
|
|
22
|
+
import { S as ln, a as an, O as sn, b as cn } from "./chunks/OverlayLeadAfterCollection-OgciFxV5.js";
|
|
23
|
+
import { C as dn } from "./chunks/CollectLeadForm-DGbeJX5k.js";
|
|
24
24
|
const un = Ce([/* @__PURE__ */ t("path", {
|
|
25
25
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
26
26
|
}, "0"), /* @__PURE__ */ t("path", {
|
|
@@ -198,8 +198,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
198
198
|
signInCTA: i,
|
|
199
199
|
showSignInCTA: s
|
|
200
200
|
}) => {
|
|
201
|
-
var k, v, W, R, F, E,
|
|
202
|
-
const { t: d } = se(), f = xe(), l = ze(), u = ((k = n == null ? void 0 : n.branding) == null ? void 0 : k.colors) || null, a = (u == null ? void 0 : u.primaryColor) || q().palette.primary.plainColor, m = q().palette.primary.onPrimary, y = (u == null ? void 0 : u.contentColor) || q().textColor, b = q().surfaceVariant, h = be().primary, I = fe().xl,
|
|
201
|
+
var k, v, W, R, F, E, L, o, z;
|
|
202
|
+
const { t: d } = se(), f = xe(), l = ze(), u = ((k = n == null ? void 0 : n.branding) == null ? void 0 : k.colors) || null, a = (u == null ? void 0 : u.primaryColor) || q().palette.primary.plainColor, m = q().palette.primary.onPrimary, y = (u == null ? void 0 : u.contentColor) || q().textColor, b = q().surfaceVariant, h = be().primary, I = fe().xl, O = fe().md, p = pe(), S = re(a || ""), C = re(b || ""), P = S ? `rgba(${S.replace(/[^\d,]/g, "")}, 0.12)` : `${a}20`, c = f ? ((W = (v = n == null ? void 0 : n.branding) == null ? void 0 : v.images) == null ? void 0 : W.mobileLogo) || ((F = (R = n == null ? void 0 : n.branding) == null ? void 0 : R.images) == null ? void 0 : F.mainLogo) || "" : ((L = (E = n == null ? void 0 : n.branding) == null ? void 0 : E.images) == null ? void 0 : L.mainLogo) || "", B = [
|
|
203
203
|
{
|
|
204
204
|
icon: /* @__PURE__ */ t(zt, { sx: { fontSize: "1.1em" } }),
|
|
205
205
|
title: d("eitherOr.tutorial.step1Title"),
|
|
@@ -209,9 +209,13 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
icon: /* @__PURE__ */ t(Fe, { sx: { fontSize: "1.1em" } }),
|
|
212
|
-
title: d("eitherOr.tutorial.step2Title", {
|
|
212
|
+
title: d("eitherOr.tutorial.step2Title", {
|
|
213
|
+
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
214
|
+
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
215
|
+
}),
|
|
213
216
|
description: d("eitherOr.tutorial.step2Description", {
|
|
214
|
-
lives: (n == null ? void 0 : n.lives) ?? 3
|
|
217
|
+
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
218
|
+
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
215
219
|
})
|
|
216
220
|
},
|
|
217
221
|
{
|
|
@@ -233,7 +237,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
233
237
|
r,
|
|
234
238
|
{
|
|
235
239
|
sx: {
|
|
236
|
-
borderRadius:
|
|
240
|
+
borderRadius: O,
|
|
237
241
|
overflow: "hidden",
|
|
238
242
|
bgcolor: C ? `rgba(${C.replace(/[^\d,]/g, "")}, 0.5)` : b,
|
|
239
243
|
display: "flex",
|
|
@@ -470,9 +474,9 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
470
474
|
brandingPrimaryColor: f,
|
|
471
475
|
optionIndex: l = 0
|
|
472
476
|
}) => {
|
|
473
|
-
const u = q(), a = pe(), m = f || u.palette.primary.plainColor, y = u.palette.primary.onPrimary, b = u.palette.success.plainColor, h = u.palette.danger.plainColor, I = re(m || ""),
|
|
477
|
+
const u = q(), a = pe(), m = f || u.palette.primary.plainColor, y = u.palette.primary.onPrimary, b = u.palette.success.plainColor, h = u.palette.danger.plainColor, I = re(m || ""), O = I ? I.replace(/[^\d,]/g, "") : null, p = Xt(e.images ?? null), S = !!p, C = l === 0 ? "A" : "B", P = i.selectedOption === e.id, c = P && !!i.isCorrect || e.id === i.correctOptionId, B = P && !i.isCorrect || !!i.timedOut && e.id !== i.correctOptionId;
|
|
474
478
|
if (!S) {
|
|
475
|
-
const k = l === 0 ? "135deg" : "225deg", v = c ? `linear-gradient(${k}, ${b}20 0%, ${b}0D 100%)` : B ? `linear-gradient(${k}, ${h}20 0%, ${h}0D 100%)` :
|
|
479
|
+
const k = l === 0 ? "135deg" : "225deg", v = c ? `linear-gradient(${k}, ${b}20 0%, ${b}0D 100%)` : B ? `linear-gradient(${k}, ${h}20 0%, ${h}0D 100%)` : O ? `linear-gradient(${k}, rgba(${O}, 0.22) 0%, rgba(${O}, 0.08) 60%, rgba(${O}, 0.14) 100%)` : `linear-gradient(${k}, ${m}38 0%, ${m}14 60%, ${m}24 100%)`, W = O ? `repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(${O}, 0.04) 10px, rgba(${O}, 0.04) 11px)` : "none", R = c ? b : B ? h : O ? `rgba(${O}, 0.3)` : `${m}4D`, F = c ? b : B ? h : m;
|
|
476
480
|
return /* @__PURE__ */ g(
|
|
477
481
|
r,
|
|
478
482
|
{
|
|
@@ -494,7 +498,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
494
498
|
boxShadow: c ? `0 0 0 3px ${b}30` : B ? `0 0 0 3px ${h}30` : "none",
|
|
495
499
|
"&:hover": n ? {} : {
|
|
496
500
|
transform: "scale(1.01)",
|
|
497
|
-
boxShadow: `0 4px 16px ${
|
|
501
|
+
boxShadow: `0 4px 16px ${O ? `rgba(${O}, 0.2)` : `${m}33`}`
|
|
498
502
|
}
|
|
499
503
|
},
|
|
500
504
|
children: [
|
|
@@ -523,7 +527,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
523
527
|
flexShrink: 0,
|
|
524
528
|
zIndex: 2,
|
|
525
529
|
transition: "background-color 0.25s",
|
|
526
|
-
boxShadow: c ? `0 2px 8px ${b}59` : B ? `0 2px 8px ${h}59` : `0 2px 8px ${
|
|
530
|
+
boxShadow: c ? `0 2px 8px ${b}59` : B ? `0 2px 8px ${h}59` : `0 2px 8px ${O ? `rgba(${O}, 0.35)` : `${m}59`}`
|
|
527
531
|
},
|
|
528
532
|
children: c ? /* @__PURE__ */ t(Ne, { sx: { fontSize: "1.3em", color: "#fff" } }) : B ? /* @__PURE__ */ t(Ye, { sx: { fontSize: "1.3em", color: "#fff" } }) : /* @__PURE__ */ t(
|
|
529
533
|
x,
|
|
@@ -663,7 +667,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
663
667
|
]
|
|
664
668
|
}
|
|
665
669
|
);
|
|
666
|
-
},
|
|
670
|
+
}, Lt = ({
|
|
667
671
|
time: e,
|
|
668
672
|
maxTime: n,
|
|
669
673
|
brandingPrimaryColor: i
|
|
@@ -751,10 +755,10 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
751
755
|
game: a
|
|
752
756
|
}) => {
|
|
753
757
|
var X, oe, ee, te, ie, ce, _, j, w, $;
|
|
754
|
-
const [m, y] = D(0), [b, h] = D(!1), [I,
|
|
758
|
+
const [m, y] = D(0), [b, h] = D(!1), [I, O] = D(0), [p, S] = D(0), [C, P] = D(!1), c = qe(0), { t: B } = se(), k = xe(), v = ze(), W = q(), R = W.surfaceVariant, F = u || W.palette.primary.plainColor, E = ((oe = (X = a == null ? void 0 : a.branding) == null ? void 0 : X.colors) == null ? void 0 : oe.contentColor) || W.textColor, L = fe().md, o = pe(), z = re(R || ""), H = re(F || ""), U = k ? ((te = (ee = a == null ? void 0 : a.branding) == null ? void 0 : ee.images) == null ? void 0 : te.mobileLogo) || ((ce = (ie = a == null ? void 0 : a.branding) == null ? void 0 : ie.images) == null ? void 0 : ce.mainLogo) || "" : ((j = (_ = a == null ? void 0 : a.branding) == null ? void 0 : _.images) == null ? void 0 : j.mainLogo) || "", N = B("common.labels.point", { count: m });
|
|
755
759
|
ge(() => {
|
|
756
760
|
if (l != null && l.currentPoints && l.currentPoints > m) {
|
|
757
|
-
|
|
761
|
+
O(l.currentPoints - m), h(!0), S((V) => V + 1);
|
|
758
762
|
const A = setTimeout(() => h(!1), 1e3);
|
|
759
763
|
return y(l.currentPoints), () => clearTimeout(A);
|
|
760
764
|
}
|
|
@@ -870,7 +874,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
870
874
|
},
|
|
871
875
|
children: [
|
|
872
876
|
/* @__PURE__ */ t(r, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(
|
|
873
|
-
|
|
877
|
+
Lt,
|
|
874
878
|
{
|
|
875
879
|
time: n,
|
|
876
880
|
maxTime: s,
|
|
@@ -882,7 +886,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
882
886
|
r,
|
|
883
887
|
{
|
|
884
888
|
sx: {
|
|
885
|
-
borderRadius:
|
|
889
|
+
borderRadius: L,
|
|
886
890
|
overflow: "hidden",
|
|
887
891
|
bgcolor: z ? `rgba(${z.replace(/[^\d,]/g, "")}, 0.5)` : W.surfaceVariant,
|
|
888
892
|
display: "flex",
|
|
@@ -1027,12 +1031,12 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1027
1031
|
additionalCTA: f
|
|
1028
1032
|
}) => {
|
|
1029
1033
|
var oe, ee, te, ie, ce, _, j, w, $;
|
|
1030
|
-
const { t: l } = se(), u = q(), a = d || u.palette.primary.plainColor, m = u.palette.primary.onPrimary, y = ((ee = (oe = n == null ? void 0 : n.branding) == null ? void 0 : oe.colors) == null ? void 0 : ee.contentColor) || u.textColor, b = u.palette.success.plainColor, h = u.palette.danger.plainColor, I = u.palette.success.softBg,
|
|
1034
|
+
const { t: l } = se(), u = q(), a = d || u.palette.primary.plainColor, m = u.palette.primary.onPrimary, y = ((ee = (oe = n == null ? void 0 : n.branding) == null ? void 0 : oe.colors) == null ? void 0 : ee.contentColor) || u.textColor, b = u.palette.success.plainColor, h = u.palette.danger.plainColor, I = u.palette.success.softBg, O = u.palette.danger.softBg, p = fe().md, S = fe().xl, C = pe(), P = be().primary, c = xe(), B = ze(), k = re(a || ""), v = k ? k.replace(/[^\d,]/g, "") : null, W = c ? ((ie = (te = n == null ? void 0 : n.branding) == null ? void 0 : te.images) == null ? void 0 : ie.mobileLogo) || ((_ = (ce = n == null ? void 0 : n.branding) == null ? void 0 : ce.images) == null ? void 0 : _.mainLogo) || "" : ((w = (j = n == null ? void 0 : n.branding) == null ? void 0 : j.images) == null ? void 0 : w.mainLogo) || "", [R, F] = D(0), [E, L] = D(null), o = (e == null ? void 0 : e.currentPoints) ?? 0, z = R > 0 && o >= R;
|
|
1031
1035
|
if (ge(() => {
|
|
1032
1036
|
n && (async () => {
|
|
1033
1037
|
try {
|
|
1034
1038
|
const V = await i.miniGames.getMyEitherOrStats(n.id);
|
|
1035
|
-
F(V.personalBest ?? 0),
|
|
1039
|
+
F(V.personalBest ?? 0), L(V.betterThan ?? null);
|
|
1036
1040
|
} catch {
|
|
1037
1041
|
}
|
|
1038
1042
|
})();
|
|
@@ -1368,7 +1372,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1368
1372
|
icon: /* @__PURE__ */ t(Ye, { sx: { fontSize: "1.25em", color: h } }),
|
|
1369
1373
|
value: N,
|
|
1370
1374
|
label: l("eitherOr.results.wrong", "Wrong"),
|
|
1371
|
-
bg:
|
|
1375
|
+
bg: O,
|
|
1372
1376
|
valueSx: { color: h },
|
|
1373
1377
|
labelSx: { color: h }
|
|
1374
1378
|
},
|
|
@@ -1559,12 +1563,12 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1559
1563
|
primaryColor: i,
|
|
1560
1564
|
textColor: s
|
|
1561
1565
|
}) => {
|
|
1562
|
-
const { t: d } = se(), f = q(), l = fe(), u = pe(), a = be().primary, m = f.outlineEnabledBorder, y = re(i), [b, h] = D(null), [I,
|
|
1566
|
+
const { t: d } = se(), f = q(), l = fe(), u = pe(), a = be().primary, m = f.outlineEnabledBorder, y = re(i), [b, h] = D(null), [I, O] = D(!1);
|
|
1563
1567
|
if (ge(() => {
|
|
1564
|
-
const
|
|
1565
|
-
setTimeout(() =>
|
|
1568
|
+
const L = requestAnimationFrame(() => {
|
|
1569
|
+
setTimeout(() => O(!0), 80);
|
|
1566
1570
|
});
|
|
1567
|
-
return () => cancelAnimationFrame(
|
|
1571
|
+
return () => cancelAnimationFrame(L);
|
|
1568
1572
|
}, []), !e || e.length === 0)
|
|
1569
1573
|
return /* @__PURE__ */ t(r, { sx: { py: u.lg, textAlign: "center" }, children: /* @__PURE__ */ t(
|
|
1570
1574
|
x,
|
|
@@ -1578,10 +1582,10 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1578
1582
|
children: "No distribution data available."
|
|
1579
1583
|
}
|
|
1580
1584
|
) });
|
|
1581
|
-
const p = e.filter((
|
|
1582
|
-
(
|
|
1585
|
+
const p = e.filter((L) => L.totalUsers > 0), S = Math.max(...p.map((L) => L.totalUsers), 1), C = Math.log(S + 1), P = e.reduce((L, o) => L + o.totalUsers, 0), c = n != null ? e.find(
|
|
1586
|
+
(L) => n >= L.rangeStartInclusive && n <= L.rangeEndInclusive
|
|
1583
1587
|
) ?? null : null, B = c ? p.findIndex(
|
|
1584
|
-
(
|
|
1588
|
+
(L) => L.rangeStartInclusive === c.rangeStartInclusive
|
|
1585
1589
|
) : -1, k = b !== null ? p[b] : null, v = k ? `${ke(k.rangeStartInclusive)} – ${ke(k.rangeEndInclusive)} ${d("eitherOr.standings.pts", "pts")}` : c ? d("eitherOr.standings.yourRange", "Your range: {{start}} – {{end}}", {
|
|
1586
1590
|
start: ke(c.rangeStartInclusive),
|
|
1587
1591
|
end: ke(c.rangeEndInclusive)
|
|
@@ -1590,7 +1594,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1590
1594
|
), E = new Set(
|
|
1591
1595
|
Array.from(
|
|
1592
1596
|
{ length: R },
|
|
1593
|
-
(
|
|
1597
|
+
(L, o) => Math.min(o * F, p.length - 1)
|
|
1594
1598
|
)
|
|
1595
1599
|
);
|
|
1596
1600
|
return /* @__PURE__ */ g(
|
|
@@ -1730,8 +1734,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1730
1734
|
height: `${Sn}px`,
|
|
1731
1735
|
width: "100%"
|
|
1732
1736
|
},
|
|
1733
|
-
children: p.map((
|
|
1734
|
-
const z = o === B, H = b === o, U = Math.log(
|
|
1737
|
+
children: p.map((L, o) => {
|
|
1738
|
+
const z = o === B, H = b === o, U = Math.log(L.totalUsers + 1) / C * 100, N = z || H ? i : `rgba(${y}, 0.5)`;
|
|
1735
1739
|
return /* @__PURE__ */ t(
|
|
1736
1740
|
r,
|
|
1737
1741
|
{
|
|
@@ -1783,7 +1787,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1783
1787
|
}
|
|
1784
1788
|
),
|
|
1785
1789
|
/* @__PURE__ */ t(r, { sx: { height: "1px", backgroundColor: m, mt: "1px" } }),
|
|
1786
|
-
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: p.map((
|
|
1790
|
+
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: p.map((L, o) => {
|
|
1787
1791
|
if (!E.has(o)) return null;
|
|
1788
1792
|
const z = p.length > 1 ? o / (p.length - 1) * 100 : 0, H = o === 0, U = o === p.length - 1;
|
|
1789
1793
|
return /* @__PURE__ */ t(
|
|
@@ -1800,7 +1804,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1800
1804
|
lineHeight: 1,
|
|
1801
1805
|
userSelect: "none"
|
|
1802
1806
|
},
|
|
1803
|
-
children: ke(
|
|
1807
|
+
children: ke(L.rangeStartInclusive)
|
|
1804
1808
|
},
|
|
1805
1809
|
o
|
|
1806
1810
|
);
|
|
@@ -1808,14 +1812,14 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
1808
1812
|
]
|
|
1809
1813
|
}
|
|
1810
1814
|
);
|
|
1811
|
-
}, Be = 10,
|
|
1815
|
+
}, Be = 10, Ot = ({
|
|
1812
1816
|
game: e,
|
|
1813
1817
|
sdk: n,
|
|
1814
1818
|
stepInfo: i,
|
|
1815
1819
|
brandingPrimaryColor: s
|
|
1816
1820
|
}) => {
|
|
1817
1821
|
var T;
|
|
1818
|
-
const { t: d } = se(), f = Me(), l = q(), u = ((T = e == null ? void 0 : e.branding) == null ? void 0 : T.colors) || null, a = s || (u == null ? void 0 : u.primaryColor) || l.palette.primary.plainColor, m = (u == null ? void 0 : u.contentColor) || l.textColor, y = be().primary, b = be().secondary, h = fe(), I = pe(),
|
|
1822
|
+
const { t: d } = se(), f = Me(), l = q(), u = ((T = e == null ? void 0 : e.branding) == null ? void 0 : T.colors) || null, a = s || (u == null ? void 0 : u.primaryColor) || l.palette.primary.plainColor, m = (u == null ? void 0 : u.contentColor) || l.textColor, y = be().primary, b = be().secondary, h = fe(), I = pe(), O = ze(), p = l.surfaceVariant, S = f.colorSchemes.light.palette.primary.onPrimary, C = l.outlineEnabledBorder, [P, c] = D(null), [B, k] = D(!0), [v, W] = D(0), [R, F] = D(null), [E, L] = D("leaderboard"), o = (i == null ? void 0 : i.currentPoints) ?? 0;
|
|
1819
1823
|
ge(() => {
|
|
1820
1824
|
(async () => {
|
|
1821
1825
|
try {
|
|
@@ -2024,7 +2028,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2024
2028
|
return /* @__PURE__ */ t(
|
|
2025
2029
|
r,
|
|
2026
2030
|
{
|
|
2027
|
-
onClick: () =>
|
|
2031
|
+
onClick: () => L(M.id),
|
|
2028
2032
|
sx: {
|
|
2029
2033
|
flex: 1,
|
|
2030
2034
|
display: "flex",
|
|
@@ -2083,9 +2087,9 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2083
2087
|
sx: z.table,
|
|
2084
2088
|
children: [
|
|
2085
2089
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
2086
|
-
/* @__PURE__ */ t("th", { style: z.headerCellPosition, children:
|
|
2090
|
+
/* @__PURE__ */ t("th", { style: z.headerCellPosition, children: O ? "" : d("eitherOr.leaderboard.position", "#") }),
|
|
2087
2091
|
/* @__PURE__ */ t("th", { style: z.headerCellName, children: d("eitherOr.leaderboard.name", "Name") }),
|
|
2088
|
-
/* @__PURE__ */ t("th", { style: z.headerCellPoints, children:
|
|
2092
|
+
/* @__PURE__ */ t("th", { style: z.headerCellPoints, children: O ? "🎯" : d("eitherOr.leaderboard.points", "Pts") })
|
|
2089
2093
|
] }) }),
|
|
2090
2094
|
/* @__PURE__ */ t("tbody", { children: N.map((M, G) => {
|
|
2091
2095
|
var te, ie, ce;
|
|
@@ -2240,10 +2244,10 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2240
2244
|
showStandings: b,
|
|
2241
2245
|
additionalCTA: h,
|
|
2242
2246
|
onGameStart: I,
|
|
2243
|
-
onSelection:
|
|
2247
|
+
onSelection: O,
|
|
2244
2248
|
onPlayAgain: p,
|
|
2245
2249
|
imagePosition: S = "left"
|
|
2246
|
-
} = e, { t: C } = se(), P = q(), c = ((M = n == null ? void 0 : n.branding) == null ? void 0 : M.colors) || null, B = (c == null ? void 0 : c.primaryColor) || P.palette.primary.plainColor, k = P.secondaryContainer, v = P.surfaceTintDim, W = ((G = re(v || "")) == null ? void 0 : G.replace(/[^\d,]/g, "")) ?? null, R = fe().md, F = be().primary, E = pe(),
|
|
2250
|
+
} = e, { t: C } = se(), P = q(), c = ((M = n == null ? void 0 : n.branding) == null ? void 0 : M.colors) || null, B = (c == null ? void 0 : c.primaryColor) || P.palette.primary.plainColor, k = P.secondaryContainer, v = P.surfaceTintDim, W = ((G = re(v || "")) == null ? void 0 : G.replace(/[^\d,]/g, "")) ?? null, R = fe().md, F = be().primary, E = pe(), L = xe(), [o, z] = D(0), H = Ge(
|
|
2247
2251
|
{
|
|
2248
2252
|
images: n == null ? void 0 : n.images,
|
|
2249
2253
|
imagePlaceholder: m || ""
|
|
@@ -2271,7 +2275,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2271
2275
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2272
2276
|
selected: l,
|
|
2273
2277
|
feedback: u,
|
|
2274
|
-
onSelect:
|
|
2278
|
+
onSelect: O,
|
|
2275
2279
|
stepInfo: s,
|
|
2276
2280
|
brandingPrimaryColor: (c == null ? void 0 : c.primaryColor) || null,
|
|
2277
2281
|
game: n
|
|
@@ -2297,8 +2301,8 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2297
2301
|
flexDirection: "row",
|
|
2298
2302
|
justifyContent: "center",
|
|
2299
2303
|
alignItems: "center",
|
|
2300
|
-
flex:
|
|
2301
|
-
width:
|
|
2304
|
+
flex: L ? "0 0 auto" : 1,
|
|
2305
|
+
width: L ? "100%" : "auto",
|
|
2302
2306
|
borderBottom: "1px solid " + k,
|
|
2303
2307
|
opacity: "60%",
|
|
2304
2308
|
py: E.sm,
|
|
@@ -2336,7 +2340,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2336
2340
|
sx: {
|
|
2337
2341
|
fontSize: "1em",
|
|
2338
2342
|
"--Icon-fontSize": "1.25em",
|
|
2339
|
-
flexDirection:
|
|
2343
|
+
flexDirection: L ? "column" : "row"
|
|
2340
2344
|
},
|
|
2341
2345
|
children: [
|
|
2342
2346
|
/* @__PURE__ */ t(Ee, { sx: Y, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
@@ -2398,7 +2402,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2398
2402
|
),
|
|
2399
2403
|
o === 0 && /* @__PURE__ */ t(We, { value: 0, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: T, children: U() }) }),
|
|
2400
2404
|
o === 1 && /* @__PURE__ */ t(We, { value: 1, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: T, children: /* @__PURE__ */ t(
|
|
2401
|
-
|
|
2405
|
+
Ot,
|
|
2402
2406
|
{
|
|
2403
2407
|
game: n,
|
|
2404
2408
|
sdk: a,
|
|
@@ -2489,7 +2493,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2489
2493
|
buttonRadius: l,
|
|
2490
2494
|
primaryColor: u,
|
|
2491
2495
|
onPrimaryColor: a
|
|
2492
|
-
}),
|
|
2496
|
+
}), O = () => {
|
|
2493
2497
|
var B, k, v, W;
|
|
2494
2498
|
return e.signInCTA ? (B = e.signInCTA) != null && B.component ? e.signInCTA.component : (k = e.signInCTA) != null && k.onClick ? /* @__PURE__ */ t(
|
|
2495
2499
|
me,
|
|
@@ -2561,7 +2565,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2561
2565
|
headline: b("eitherOr.headline"),
|
|
2562
2566
|
finalImage: d,
|
|
2563
2567
|
imagePosition: h,
|
|
2564
|
-
signInContent:
|
|
2568
|
+
signInContent: O(),
|
|
2565
2569
|
brandingContent: /* @__PURE__ */ t(
|
|
2566
2570
|
de,
|
|
2567
2571
|
{
|
|
@@ -2660,7 +2664,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2660
2664
|
leadCta: b,
|
|
2661
2665
|
leadSuccessTitle: h,
|
|
2662
2666
|
leadSuccessDescription: I,
|
|
2663
|
-
syncWithProfile:
|
|
2667
|
+
syncWithProfile: O = !1,
|
|
2664
2668
|
isAfterPosition: p = !1,
|
|
2665
2669
|
isSubmittingParticipation: S = !1
|
|
2666
2670
|
}) => {
|
|
@@ -2694,7 +2698,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2694
2698
|
successTitle: k,
|
|
2695
2699
|
successDescription: v
|
|
2696
2700
|
},
|
|
2697
|
-
syncWithProfile:
|
|
2701
|
+
syncWithProfile: O,
|
|
2698
2702
|
isSubmittingParticipation: S
|
|
2699
2703
|
}
|
|
2700
2704
|
);
|
|
@@ -2845,9 +2849,9 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2845
2849
|
showStandings: b,
|
|
2846
2850
|
additionalCTA: h,
|
|
2847
2851
|
onGameStart: I,
|
|
2848
|
-
onSelection:
|
|
2852
|
+
onSelection: O,
|
|
2849
2853
|
onPlayAgain: p
|
|
2850
|
-
} = e, S = Me(), C = pe(), P = xe(), { t: c } = se(), [B, k] = D(0), [v, W] = D(0), [R, F] = D(!1), [E,
|
|
2854
|
+
} = e, S = Me(), C = pe(), P = xe(), { t: c } = se(), [B, k] = D(0), [v, W] = D(0), [R, F] = D(!1), [E, L] = D(0), [o, z] = D(0), [H, U] = D(!1), N = qe(0), { brandingImage: Y, brandingColors: T } = je(
|
|
2851
2855
|
n.branding || null
|
|
2852
2856
|
), M = m || (P ? Ke : Xe), G = Ge(
|
|
2853
2857
|
{ images: n == null ? void 0 : n.images, imagePlaceholder: M },
|
|
@@ -2867,7 +2871,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2867
2871
|
});
|
|
2868
2872
|
ge(() => {
|
|
2869
2873
|
if (s != null && s.currentPoints && s.currentPoints > v) {
|
|
2870
|
-
|
|
2874
|
+
L(s.currentPoints - v), F(!0), z((ae) => ae + 1);
|
|
2871
2875
|
const ne = setTimeout(() => F(!1), 1e3);
|
|
2872
2876
|
return W(s.currentPoints), () => clearTimeout(ne);
|
|
2873
2877
|
}
|
|
@@ -2910,18 +2914,18 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2910
2914
|
}, Ft = () => {
|
|
2911
2915
|
const ne = (s == null ? void 0 : s.currentStreak) ?? 0, ae = H ? Te : ne % Te, ve = Math.floor(ne / Te) + 1;
|
|
2912
2916
|
return /* @__PURE__ */ g(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2913
|
-
Array.from({ length: Te }, (Ve,
|
|
2917
|
+
Array.from({ length: Te }, (Ve, Le) => /* @__PURE__ */ t(
|
|
2914
2918
|
r,
|
|
2915
2919
|
{
|
|
2916
2920
|
sx: {
|
|
2917
2921
|
flex: 1,
|
|
2918
2922
|
height: 4,
|
|
2919
|
-
bgcolor:
|
|
2923
|
+
bgcolor: Le < ae ? _ : $,
|
|
2920
2924
|
borderRadius: "2px",
|
|
2921
2925
|
transition: "background-color 0.3s ease"
|
|
2922
2926
|
}
|
|
2923
2927
|
},
|
|
2924
|
-
`streak-${
|
|
2928
|
+
`streak-${Le}`
|
|
2925
2929
|
)),
|
|
2926
2930
|
ve > 1 && /* @__PURE__ */ g(
|
|
2927
2931
|
x,
|
|
@@ -2963,7 +2967,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2963
2967
|
var ne;
|
|
2964
2968
|
return i ? /* @__PURE__ */ g(r, { sx: Q.mainContentSection, children: [
|
|
2965
2969
|
/* @__PURE__ */ t(r, { sx: Q.timerContainer, children: /* @__PURE__ */ t(
|
|
2966
|
-
|
|
2970
|
+
Lt,
|
|
2967
2971
|
{
|
|
2968
2972
|
time: f,
|
|
2969
2973
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
@@ -2979,7 +2983,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2979
2983
|
option: i.optionOne,
|
|
2980
2984
|
selected: l,
|
|
2981
2985
|
feedback: u,
|
|
2982
|
-
onSelect:
|
|
2986
|
+
onSelect: O,
|
|
2983
2987
|
pairId: i.pairId,
|
|
2984
2988
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
2985
2989
|
optionIndex: 0
|
|
@@ -2992,7 +2996,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
2992
2996
|
option: i.optionTwo,
|
|
2993
2997
|
selected: l,
|
|
2994
2998
|
feedback: u,
|
|
2995
|
-
onSelect:
|
|
2999
|
+
onSelect: O,
|
|
2996
3000
|
pairId: i.pairId,
|
|
2997
3001
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
2998
3002
|
optionIndex: 1
|
|
@@ -3180,7 +3184,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3180
3184
|
value: 1,
|
|
3181
3185
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3182
3186
|
children: /* @__PURE__ */ t(r, { sx: Qe, children: /* @__PURE__ */ t(
|
|
3183
|
-
|
|
3187
|
+
Ot,
|
|
3184
3188
|
{
|
|
3185
3189
|
game: n,
|
|
3186
3190
|
sdk: a,
|
|
@@ -3219,10 +3223,12 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3219
3223
|
{
|
|
3220
3224
|
icon: /* @__PURE__ */ t(Fe, { sx: { fontSize: "1.1em" } }),
|
|
3221
3225
|
title: c("eitherOr.tutorial.step2Title", {
|
|
3222
|
-
lives: (n == null ? void 0 : n.lives) ?? 3
|
|
3226
|
+
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
3227
|
+
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
3223
3228
|
}),
|
|
3224
3229
|
description: c("eitherOr.tutorial.step2Description", {
|
|
3225
|
-
lives: (n == null ? void 0 : n.lives) ?? 3
|
|
3230
|
+
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
3231
|
+
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
3226
3232
|
})
|
|
3227
3233
|
},
|
|
3228
3234
|
{
|
|
@@ -3265,7 +3271,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3265
3271
|
"& > *": { position: "relative", zIndex: 1 }
|
|
3266
3272
|
},
|
|
3267
3273
|
children: ae.map((ve, Ve) => {
|
|
3268
|
-
const
|
|
3274
|
+
const Le = Ve === ae.length - 1;
|
|
3269
3275
|
return /* @__PURE__ */ g(r, { children: [
|
|
3270
3276
|
/* @__PURE__ */ g(
|
|
3271
3277
|
r,
|
|
@@ -3328,7 +3334,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3328
3334
|
]
|
|
3329
3335
|
}
|
|
3330
3336
|
),
|
|
3331
|
-
!
|
|
3337
|
+
!Le && /* @__PURE__ */ t(
|
|
3332
3338
|
r,
|
|
3333
3339
|
{
|
|
3334
3340
|
sx: {
|
|
@@ -3401,7 +3407,7 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3401
3407
|
children: Mt()
|
|
3402
3408
|
}
|
|
3403
3409
|
);
|
|
3404
|
-
},
|
|
3410
|
+
}, Ln = (e) => ({
|
|
3405
3411
|
// Pulse animation for buttons
|
|
3406
3412
|
pulseAnimation: {
|
|
3407
3413
|
"@keyframes pulse": {
|
|
@@ -3439,17 +3445,17 @@ const un = Ce([/* @__PURE__ */ t("path", {
|
|
|
3439
3445
|
display: "flex",
|
|
3440
3446
|
alignItems: "center"
|
|
3441
3447
|
}
|
|
3442
|
-
}),
|
|
3443
|
-
var P, c, B, k, v, W, R, F, E,
|
|
3448
|
+
}), On = (e) => {
|
|
3449
|
+
var P, c, B, k, v, W, R, F, E, L, o;
|
|
3444
3450
|
const n = Me(), { t: i } = se(), s = xe(), d = St(
|
|
3445
3451
|
Se.OVERLAY
|
|
3446
3452
|
), f = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : s ? Ke : Xe, l = Ge(
|
|
3447
3453
|
{ images: e.eitherOr.images, imagePlaceholder: f },
|
|
3448
3454
|
Se.OVERLAY
|
|
3449
|
-
), { brandingImage: u, brandingColors: a, brandingLogo: m } = je(e.eitherOr.branding || null), b = Ct(u || l), h = (c = (P = n.customRadius) == null ? void 0 : P.light) == null ? void 0 : c.xl, I = (a == null ? void 0 : a.primaryColor) || ((W = (v = (k = (B = n.colorSchemes) == null ? void 0 : B.light) == null ? void 0 : k.palette) == null ? void 0 : v.primary) == null ? void 0 : W.plainColor),
|
|
3455
|
+
), { brandingImage: u, brandingColors: a, brandingLogo: m } = je(e.eitherOr.branding || null), b = Ct(u || l), h = (c = (P = n.customRadius) == null ? void 0 : P.light) == null ? void 0 : c.xl, I = (a == null ? void 0 : a.primaryColor) || ((W = (v = (k = (B = n.colorSchemes) == null ? void 0 : B.light) == null ? void 0 : k.palette) == null ? void 0 : v.primary) == null ? void 0 : W.plainColor), O = (L = (E = (F = (R = n.colorSchemes) == null ? void 0 : R.light) == null ? void 0 : F.palette) == null ? void 0 : E.primary) == null ? void 0 : L.onPrimary, p = n.customFontFamily.dark.primary, S = Ln({
|
|
3450
3456
|
buttonRadius: h,
|
|
3451
3457
|
primaryColor: I,
|
|
3452
|
-
onPrimaryColor:
|
|
3458
|
+
onPrimaryColor: O,
|
|
3453
3459
|
fontFamilyPrimary: p
|
|
3454
3460
|
}), C = () => {
|
|
3455
3461
|
var z, H, U, N;
|
|
@@ -3569,7 +3575,7 @@ const Dn = (e) => {
|
|
|
3569
3575
|
), [s, d] = D(null), [f, l] = D(null), [u, a] = D(10), [m, y] = D(null), [b, h] = D({
|
|
3570
3576
|
isCorrect: null,
|
|
3571
3577
|
selectedOption: null
|
|
3572
|
-
}), [I,
|
|
3578
|
+
}), [I, O] = D(!1), [p, S] = D(!1), [C, P] = D(!1), [c, B] = D(""), [k, v] = D(!1), [W, R] = D(!1), [F, E] = D(!1), L = qe(null), o = fn(e.entityId, e.sdk), {
|
|
3573
3579
|
setIsUnauthorized: z,
|
|
3574
3580
|
setIsApiError: H
|
|
3575
3581
|
} = hn(e.entityId, e.sdk, I);
|
|
@@ -3586,7 +3592,7 @@ const Dn = (e) => {
|
|
|
3586
3592
|
const w = j.steps.find(
|
|
3587
3593
|
(A) => {
|
|
3588
3594
|
var V;
|
|
3589
|
-
return A.pairId === ((V =
|
|
3595
|
+
return A.pairId === ((V = L.current) == null ? void 0 : V.pairId);
|
|
3590
3596
|
}
|
|
3591
3597
|
), $ = ((w == null ? void 0 : w.optionOne.value) ?? 0) >= ((w == null ? void 0 : w.optionTwo.value) ?? 0) ? (w == null ? void 0 : w.optionOne.id) ?? null : (w == null ? void 0 : w.optionTwo.id) ?? null;
|
|
3592
3598
|
h({
|
|
@@ -3613,7 +3619,7 @@ const Dn = (e) => {
|
|
|
3613
3619
|
const $ = j;
|
|
3614
3620
|
$.data.error.code === 401 || $.data.error.code === 403 ? S(!0) : (P(!0), B($.data.error.message));
|
|
3615
3621
|
}
|
|
3616
|
-
}, Y =
|
|
3622
|
+
}, Y = Oe(async () => {
|
|
3617
3623
|
var j;
|
|
3618
3624
|
if ((o == null ? void 0 : o.authRequirement) === "LEAD" && ((j = e.leads) == null ? void 0 : j.position) === "before" && !k) {
|
|
3619
3625
|
R(!0);
|
|
@@ -3637,8 +3643,8 @@ const Dn = (e) => {
|
|
|
3637
3643
|
o == null ? void 0 : o.time,
|
|
3638
3644
|
k
|
|
3639
3645
|
]);
|
|
3640
|
-
|
|
3641
|
-
const T =
|
|
3646
|
+
L.current = s;
|
|
3647
|
+
const T = Oe(
|
|
3642
3648
|
async (j, w) => {
|
|
3643
3649
|
if (!m) {
|
|
3644
3650
|
y(w);
|
|
@@ -3675,7 +3681,7 @@ const Dn = (e) => {
|
|
|
3675
3681
|
(te = e.leads) == null ? void 0 : te.position,
|
|
3676
3682
|
k
|
|
3677
3683
|
]
|
|
3678
|
-
), M =
|
|
3684
|
+
), M = Oe(async () => {
|
|
3679
3685
|
var j;
|
|
3680
3686
|
if (v(!0), ((j = e.leads) == null ? void 0 : j.position) === "before") {
|
|
3681
3687
|
E(!0);
|
|
@@ -3691,10 +3697,10 @@ const Dn = (e) => {
|
|
|
3691
3697
|
}
|
|
3692
3698
|
} else
|
|
3693
3699
|
R(!1), E(!1), i(K.RESULTS);
|
|
3694
|
-
}, [(ie = e.leads) == null ? void 0 : ie.position, e.entityId, e.sdk, o == null ? void 0 : o.time]), G =
|
|
3700
|
+
}, [(ie = e.leads) == null ? void 0 : ie.position, e.entityId, e.sdk, o == null ? void 0 : o.time]), G = Oe(() => {
|
|
3695
3701
|
i(K.TUTORIAL), d(null), l(null), a((o == null ? void 0 : o.time) ?? 10), y(null), h({ isCorrect: null, selectedOption: null }), v(!1), R(!1);
|
|
3696
3702
|
}, [o == null ? void 0 : o.time]), J = () => {
|
|
3697
|
-
P(!1), S(!1), B(""), H(!1), z(!1),
|
|
3703
|
+
P(!1), S(!1), B(""), H(!1), z(!1), O(!I), i(K.TUTORIAL), d(null), l(null), y(null), h({ isCorrect: null, selectedOption: null }), v(!1), R(!1);
|
|
3698
3704
|
};
|
|
3699
3705
|
if (!o)
|
|
3700
3706
|
return /* @__PURE__ */ t(He, { my: 20 });
|
|
@@ -3722,7 +3728,7 @@ const Dn = (e) => {
|
|
|
3722
3728
|
rulesDisplay: e.rulesDisplay
|
|
3723
3729
|
}
|
|
3724
3730
|
) : $e(e) ? /* @__PURE__ */ t(
|
|
3725
|
-
|
|
3731
|
+
On,
|
|
3726
3732
|
{
|
|
3727
3733
|
eitherOr: o,
|
|
3728
3734
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
package/EventGamePlay.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as t, jsxs as m, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import Je, { useState as Q, useEffect as je, useRef as At, createContext as zt, useCallback as et, useMemo as Ve } from "react";
|
|
3
|
-
import { i as Y, b as J, a as p, d as He, B as i, c as q, e as ae, u as ue, f as ne, g as We, k as Se, C as It, q as Dt, j as Mt, W as le, m as Ee, h as kt } from "./chunks/PrizeCard-
|
|
4
|
-
import { P as Bt } from "./chunks/Portal-
|
|
3
|
+
import { i as Y, b as J, a as p, d as He, B as i, c as q, e as ae, u as ue, f as ne, g as We, k as Se, C as It, q as Dt, j as Mt, W as le, m as Ee, h as kt } from "./chunks/PrizeCard-C2El3VOB.js";
|
|
4
|
+
import { P as Bt } from "./chunks/Portal-Bjgk7NwD.js";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { g as Ht, h as N, e as tt, s as Le, a as Wt, b as Et } from "./chunks/helpers-
|
|
7
|
-
import { S as Ft } from "./chunks/Spinner-
|
|
8
|
-
import { a as $t, b as Lt, S as Ut, C as xt, c as yt } from "./chunks/ChanceGameEmbedVariant-
|
|
9
|
-
import { N as Xe } from "./chunks/Notification-
|
|
6
|
+
import { g as Ht, h as N, e as tt, s as Le, a as Wt, b as Et } from "./chunks/helpers-uh28Hksw.js";
|
|
7
|
+
import { S as Ft } from "./chunks/Spinner-DWJCKaY5.js";
|
|
8
|
+
import { a as $t, b as Lt, S as Ut, C as xt, c as yt } from "./chunks/ChanceGameEmbedVariant-ConiQ7Ej.js";
|
|
9
|
+
import { N as Xe } from "./chunks/Notification-BG5P1Xiq.js";
|
|
10
10
|
import { E as Vt, a as W, m as jt } from "./chunks/index-5MPtbA_r.js";
|
|
11
|
-
import { T as ht, D as Nt, S as Tt, R as Ue, N as Ot, O as qt } from "./chunks/NotFoundSkeleton-
|
|
12
|
-
import { b as Ce, d as Me, a as Be } from "./chunks/useImageVariant-
|
|
13
|
-
import { T as x, I as De, B as Re } from "./chunks/Button-
|
|
14
|
-
import { K as Yt, a as _t, H as Zt, D as Xt, E as Kt } from "./chunks/Edit-
|
|
15
|
-
import { I as wt } from "./chunks/Input-
|
|
16
|
-
import { S as Qt, a as Jt } from "./chunks/Select-
|
|
17
|
-
import { C as en } from "./chunks/Close-
|
|
18
|
-
import { M as tn, a as nn } from "./chunks/ModalDialog-
|
|
19
|
-
import { S as Rt, T as pt, P as bt } from "./chunks/Person-
|
|
20
|
-
import { A as Qe, S as an, O as on } from "./chunks/OverlayApiErrorSkeleton-
|
|
21
|
-
import { C as ln } from "./chunks/CheckCircle-
|
|
22
|
-
import { A as rn, I as cn, W as dn } from "./chunks/AlertMessage-
|
|
23
|
-
import { S as sn } from "./chunks/Stack-
|
|
24
|
-
import { T as mn, a as gn, b as St, t as Ct, c as vt } from "./chunks/Tabs-
|
|
25
|
-
import { A as Pt } from "./chunks/Avatar-
|
|
11
|
+
import { T as ht, D as Nt, S as Tt, R as Ue, N as Ot, O as qt } from "./chunks/NotFoundSkeleton-BJ7rW_uC.js";
|
|
12
|
+
import { b as Ce, d as Me, a as Be } from "./chunks/useImageVariant-f37LbO43.js";
|
|
13
|
+
import { T as x, I as De, B as Re } from "./chunks/Button-DPGn5NZd.js";
|
|
14
|
+
import { K as Yt, a as _t, H as Zt, D as Xt, E as Kt } from "./chunks/Edit-DD3_eq9I.js";
|
|
15
|
+
import { I as wt } from "./chunks/Input-Bf_Of6m_.js";
|
|
16
|
+
import { S as Qt, a as Jt } from "./chunks/Select-BtID79ha.js";
|
|
17
|
+
import { C as en } from "./chunks/Close-3OfJFbc2.js";
|
|
18
|
+
import { M as tn, a as nn } from "./chunks/ModalDialog-CmE2hP2R.js";
|
|
19
|
+
import { S as Rt, T as pt, P as bt } from "./chunks/Person-B4_Qrd55.js";
|
|
20
|
+
import { A as Qe, S as an, O as on } from "./chunks/OverlayApiErrorSkeleton-TzgpJPyA.js";
|
|
21
|
+
import { C as ln } from "./chunks/CheckCircle-DSloUas8.js";
|
|
22
|
+
import { A as rn, I as cn, W as dn } from "./chunks/AlertMessage-BKksUsV9.js";
|
|
23
|
+
import { S as sn } from "./chunks/Stack-CNhi3qAZ.js";
|
|
24
|
+
import { T as mn, a as gn, b as St, t as Ct, c as vt } from "./chunks/Tabs-Bh_l_QcU.js";
|
|
25
|
+
import { A as Pt } from "./chunks/Avatar-Cm5QOeVC.js";
|
|
26
26
|
import { C as un, a as fn } from "./chunks/chevron-right-B3IZtaMT.js";
|
|
27
|
-
import { O as xn } from "./chunks/OverlayScoreStateSkeleton-
|
|
27
|
+
import { O as xn } from "./chunks/OverlayScoreStateSkeleton-BnWKglMw.js";
|
|
28
28
|
const yn = (e, n, a) => {
|
|
29
29
|
const [r, c] = Q(null), [d, f] = Q(null), o = async () => {
|
|
30
30
|
try {
|