fansunited-frontend-components 0.0.39 → 0.0.40
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/ChanceGame.js +104 -102
- package/ClassicQuizPlay.js +45 -42
- package/CollectLead.js +25 -24
- package/Discussion.js +376 -378
- package/EitherOrPlay.d.ts +4 -0
- package/EitherOrPlay.d.ts.map +1 -0
- package/EitherOrPlay.js +2533 -0
- package/EventGamePlay.js +59 -54
- package/MatchQuizPlay.js +63 -57
- package/PersonalityQuizPlay.js +7935 -7201
- package/PickThePair.js +153 -151
- package/PollVote.js +108 -104
- package/chunks/{AlertMessage-C2aBXCrl.js → AlertMessage-cjTHrMUK.js} +51 -51
- package/chunks/ArrowRightAlt-88jKjh6A.js +8 -0
- package/chunks/Avatar-CQCrd1m-.js +352 -0
- package/chunks/ChanceGameEmbedVariant-DWqOTf4o.js +1051 -0
- package/chunks/{CheckCircle-D-GH16Lb.js → CheckCircle-ClY-iOQ5.js} +105 -105
- package/chunks/{CollectLeadForm-o9NdYQgu.js → CollectLeadForm-0vVnu4DL.js} +5 -5
- package/chunks/FavoriteBorder-BHnvGBrn.js +11 -0
- package/chunks/{useInfoPage-v91yL5SS.js → NotFoundSkeleton-B3RNa8KJ.js} +451 -646
- package/chunks/Notification-BTtUhfZQ.js +615 -0
- package/chunks/OverlayLeadAfterCollection-CaBbwZVo.js +480 -0
- package/chunks/{OverlayScoreStateSkeleton-xvq9lQEi.js → OverlayScoreStateSkeleton-DJn0Rim3.js} +3 -3
- package/chunks/Person-D0Im9_zE.js +522 -0
- package/chunks/{PickOneOfX-C2YpLk40.js → PickOneOfX-DYQ4c1o2.js} +7 -7
- package/chunks/{Portal-DWAr8MhA.js → Portal-B9wkUnY2.js} +7 -7
- package/chunks/{ConstantsProvider-BPJJz9fq.js → PrizeCard-gMp7I66d.js} +3593 -2860
- package/chunks/{Spinner-m59ZJZ35.js → Spinner-BBA89t5s.js} +50 -50
- package/chunks/StandardLeadAfterCollection-L1cOGfS6.js +432 -0
- package/chunks/{Tabs-BGihvj9C.js → Tabs-D_n8rNw3.js} +28 -28
- package/chunks/{Textarea-Bzlb89Zp.js → Textarea-BdN2xj4j.js} +44 -44
- package/chunks/{TimerOutlined-DiX8hCoC.js → TimerOutlined-DmKZDDI-.js} +1 -1
- package/chunks/chevron-right-DGEksBI7.js +330 -0
- package/chunks/default-quiz-bg-vertical-CT7rrg9o.js +5 -0
- package/chunks/index-2s5UkG1y.js +1607 -0
- package/chunks/useImageVariant-pnFelF9A.js +535 -0
- package/chunks/useInfoPage-DPkzE5Gn.js +204 -0
- package/components.d.ts +2 -1
- package/components.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/package.json +1 -1
- package/chunks/ChanceGameEmbedVariant-BvIKBhq_.js +0 -2609
- package/chunks/Notification-Bwcoljir.js +0 -961
- package/chunks/OverlayLeadAfterCollection-B3D5ct0J.js +0 -901
- package/chunks/chevron-right-Dlc9ZKhv.js +0 -846
- package/chunks/useImageVariant-Do8kOVs2.js +0 -537
package/PickThePair.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as t, jsxs as w, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { g as Ie, u as me, h as se,
|
|
3
|
-
import K, { useMemo as ge, useCallback as
|
|
4
|
-
import {
|
|
5
|
-
import { S as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { g as Ie, u as me, h as se, b as We, l as De } from "./chunks/useImageVariant-pnFelF9A.js";
|
|
3
|
+
import K, { useMemo as ge, useCallback as ze, useEffect as de, useState as G } from "react";
|
|
4
|
+
import { A as ne, e as Z, S as Le, j as ee, k as X, F as ue, B as h, ap as ae, h as re, ac as Be, T as p, u as fe, f as te, D as ke, aq as pe, W as he, ab as Ue, i as Ae, a as $e, C as _e, b as He, E as Ee, d as Oe } from "./chunks/PrizeCard-gMp7I66d.js";
|
|
5
|
+
import { S as je } from "./chunks/Spinner-BBA89t5s.js";
|
|
6
|
+
import { createPortal as Me } from "react-dom";
|
|
7
|
+
import { O as Ne, u as Ve } from "./chunks/useInfoPage-DPkzE5Gn.js";
|
|
8
|
+
import { N as Ye, S as qe } from "./chunks/NotFoundSkeleton-B3RNa8KJ.js";
|
|
9
|
+
import { C as Xe } from "./chunks/CollectLeadForm-0vVnu4DL.js";
|
|
10
|
+
import { T as Ge } from "./chunks/TimerOutlined-DmKZDDI-.js";
|
|
11
|
+
import { d as Qe, a as Je } from "./chunks/default-quiz-bg-vertical-CT7rrg9o.js";
|
|
10
12
|
const xe = ({
|
|
11
13
|
sdk: e,
|
|
12
14
|
contentId: n,
|
|
@@ -14,9 +16,9 @@ const xe = ({
|
|
|
14
16
|
contentName: c,
|
|
15
17
|
brandingColors: i,
|
|
16
18
|
brandingUrls: s,
|
|
17
|
-
campaignId:
|
|
19
|
+
campaignId: l,
|
|
18
20
|
campaignName: d,
|
|
19
|
-
startGame:
|
|
21
|
+
startGame: a,
|
|
20
22
|
fields: o = ["fullName", "email"],
|
|
21
23
|
leadTitle: y,
|
|
22
24
|
leadDescription: g,
|
|
@@ -27,9 +29,9 @@ const xe = ({
|
|
|
27
29
|
isSubmittingParticipation: S = !1,
|
|
28
30
|
onSuccessLabel: W
|
|
29
31
|
}) => {
|
|
30
|
-
const { t: R } = ne(), T = y ?? R("leads.header.title"), N = g ?? R("leads.header.description"), L = u ?? R("leads.buttons.submit"), z = x ?? R("leads.success.title"), I = b ?? R("leads.success.description"), U =
|
|
32
|
+
const { t: R } = ne(), T = y ?? R("leads.header.title"), N = g ?? R("leads.header.description"), L = u ?? R("leads.buttons.submit"), z = x ?? R("leads.success.title"), I = b ?? R("leads.success.description"), U = a ? {
|
|
31
33
|
defaultLabel: W,
|
|
32
|
-
onClick:
|
|
34
|
+
onClick: a
|
|
33
35
|
} : void 0, F = {
|
|
34
36
|
id: n,
|
|
35
37
|
type: r,
|
|
@@ -45,14 +47,14 @@ const xe = ({
|
|
|
45
47
|
}
|
|
46
48
|
};
|
|
47
49
|
return /* @__PURE__ */ t(
|
|
48
|
-
|
|
50
|
+
Xe,
|
|
49
51
|
{
|
|
50
52
|
sdk: e,
|
|
51
53
|
content: F,
|
|
52
54
|
onSuccessCta: U,
|
|
53
55
|
branding: $,
|
|
54
56
|
campaign: {
|
|
55
|
-
id:
|
|
57
|
+
id: l,
|
|
56
58
|
name: d
|
|
57
59
|
},
|
|
58
60
|
fields: o,
|
|
@@ -72,7 +74,7 @@ const xe = ({
|
|
|
72
74
|
brandingBorderColor: n,
|
|
73
75
|
state: r
|
|
74
76
|
}) => {
|
|
75
|
-
const c = Z(), i =
|
|
77
|
+
const c = Z(), i = Le(), s = r === "play" ? i : c, l = ee().md, d = n || X().secondaryContainer, o = ue().size + " solid " + d;
|
|
76
78
|
return /* @__PURE__ */ t(
|
|
77
79
|
h,
|
|
78
80
|
{
|
|
@@ -80,7 +82,7 @@ const xe = ({
|
|
|
80
82
|
display: "flex",
|
|
81
83
|
flexDirection: s ? "column" : "row",
|
|
82
84
|
width: "100%",
|
|
83
|
-
borderRadius:
|
|
85
|
+
borderRadius: l,
|
|
84
86
|
boxShadow: "md",
|
|
85
87
|
border: o,
|
|
86
88
|
overflow: "hidden",
|
|
@@ -98,12 +100,12 @@ const xe = ({
|
|
|
98
100
|
notFoundMessage: n("pickThePair.pickThePairNotFoundDescription")
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
|
-
return e ===
|
|
103
|
+
return e === ae.LANDING_PAGE ? r : /* @__PURE__ */ t(we, { brandingBorderColor: null, children: r });
|
|
102
104
|
}, Re = (e) => {
|
|
103
|
-
const n = re().secondary, r =
|
|
105
|
+
const n = re().secondary, r = Be(), c = e.isSplitVariant && r, i = Z(), s = Ie(e.primaryUrl, e.secondaryUrl, "logo");
|
|
104
106
|
if (!e.brandingLogo)
|
|
105
107
|
return null;
|
|
106
|
-
const
|
|
108
|
+
const l = () => {
|
|
107
109
|
s && window.open(s, "_blank", "noopener,noreferrer");
|
|
108
110
|
}, d = /* @__PURE__ */ t(
|
|
109
111
|
"img",
|
|
@@ -115,7 +117,7 @@ const xe = ({
|
|
|
115
117
|
maxWidth: "100px"
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
|
-
),
|
|
120
|
+
), a = s ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
119
121
|
h,
|
|
120
122
|
{
|
|
121
123
|
component: "a",
|
|
@@ -132,7 +134,7 @@ const xe = ({
|
|
|
132
134
|
) : /* @__PURE__ */ t(
|
|
133
135
|
h,
|
|
134
136
|
{
|
|
135
|
-
onClick:
|
|
137
|
+
onClick: l,
|
|
136
138
|
sx: {
|
|
137
139
|
cursor: "pointer",
|
|
138
140
|
display: "inline-flex"
|
|
@@ -169,7 +171,7 @@ const xe = ({
|
|
|
169
171
|
children: e.label
|
|
170
172
|
}
|
|
171
173
|
),
|
|
172
|
-
|
|
174
|
+
a
|
|
173
175
|
]
|
|
174
176
|
}
|
|
175
177
|
) : /* @__PURE__ */ w(
|
|
@@ -200,7 +202,7 @@ const xe = ({
|
|
|
200
202
|
children: e.label
|
|
201
203
|
}
|
|
202
204
|
),
|
|
203
|
-
|
|
205
|
+
a
|
|
204
206
|
]
|
|
205
207
|
}
|
|
206
208
|
);
|
|
@@ -211,7 +213,7 @@ const xe = ({
|
|
|
211
213
|
textColor: c,
|
|
212
214
|
bgcolor: i,
|
|
213
215
|
mdBorderRadius: s,
|
|
214
|
-
isExtraSmall:
|
|
216
|
+
isExtraSmall: l
|
|
215
217
|
} = e;
|
|
216
218
|
return {
|
|
217
219
|
leadCollectionContainer: {
|
|
@@ -259,7 +261,7 @@ const xe = ({
|
|
|
259
261
|
fontFamily: r,
|
|
260
262
|
color: c,
|
|
261
263
|
textAlign: "center",
|
|
262
|
-
fontSize:
|
|
264
|
+
fontSize: l ? "16px" : "18px",
|
|
263
265
|
fontWeight: 500
|
|
264
266
|
},
|
|
265
267
|
instructions: {
|
|
@@ -273,35 +275,35 @@ const xe = ({
|
|
|
273
275
|
},
|
|
274
276
|
footerContainer: {
|
|
275
277
|
display: "flex",
|
|
276
|
-
flexDirection:
|
|
278
|
+
flexDirection: l ? "column" : "row",
|
|
277
279
|
justifyContent: "space-between",
|
|
278
|
-
alignItems:
|
|
280
|
+
alignItems: l ? "stretch" : "center",
|
|
279
281
|
gap: n.md,
|
|
280
282
|
px: n.md
|
|
281
283
|
// mb: spacingScale.md,
|
|
282
284
|
},
|
|
283
285
|
footerContainerNoLogo: {
|
|
284
286
|
display: "flex",
|
|
285
|
-
justifyContent:
|
|
287
|
+
justifyContent: l ? "center" : "flex-end",
|
|
286
288
|
gap: n.md,
|
|
287
289
|
px: n.md
|
|
288
290
|
// mb: spacingScale.md,
|
|
289
291
|
},
|
|
290
|
-
getTimeUpOverlayStyle: (d,
|
|
292
|
+
getTimeUpOverlayStyle: (d, a) => {
|
|
291
293
|
const o = (g, u) => {
|
|
292
294
|
const x = parseInt(g.slice(1, 3), 16), b = parseInt(g.slice(3, 5), 16), P = parseInt(g.slice(5, 7), 16);
|
|
293
295
|
return `rgba(${x}, ${b}, ${P}, ${u})`;
|
|
294
296
|
}, y = d.startsWith("#") ? o(d, 0.5) : d.startsWith("rgb") ? d.replace(")", ", 0.50)").replace("rgb", "rgba") : "rgba(0, 0, 0, 0.50)";
|
|
295
297
|
return {
|
|
296
|
-
position:
|
|
297
|
-
top:
|
|
298
|
-
left:
|
|
299
|
-
right:
|
|
300
|
-
bottom:
|
|
301
|
-
minHeight:
|
|
298
|
+
position: a ? "relative" : "absolute",
|
|
299
|
+
top: a ? "auto" : 0,
|
|
300
|
+
left: a ? "auto" : 0,
|
|
301
|
+
right: a ? "auto" : 0,
|
|
302
|
+
bottom: a ? "auto" : 0,
|
|
303
|
+
minHeight: a ? "300px" : "auto",
|
|
302
304
|
// Match questionContentContainer width and margins on mobile
|
|
303
|
-
maxWidth:
|
|
304
|
-
margin:
|
|
305
|
+
maxWidth: a ? "1200px" : "auto",
|
|
306
|
+
margin: a ? `0 ${n.md}` : "auto",
|
|
305
307
|
width: "auto",
|
|
306
308
|
backgroundColor: y,
|
|
307
309
|
backdropFilter: "blur(4px)",
|
|
@@ -325,13 +327,13 @@ const xe = ({
|
|
|
325
327
|
timeUpText: {
|
|
326
328
|
color: "#FFFFFF",
|
|
327
329
|
fontWeight: 700,
|
|
328
|
-
fontSize:
|
|
330
|
+
fontSize: l ? "32px" : "48px",
|
|
329
331
|
lineHeight: 1.2,
|
|
330
332
|
textAlign: "center",
|
|
331
333
|
textShadow: "0 2px 20px rgba(0, 0, 0, 0.3)",
|
|
332
334
|
animation: "slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
333
|
-
padding:
|
|
334
|
-
maxWidth:
|
|
335
|
+
padding: l ? 2 : 3,
|
|
336
|
+
maxWidth: l ? "280px" : "500px",
|
|
335
337
|
"@keyframes slideUp": {
|
|
336
338
|
from: {
|
|
337
339
|
transform: "translateY(20px)",
|
|
@@ -346,7 +348,7 @@ const xe = ({
|
|
|
346
348
|
welcome: {
|
|
347
349
|
fontFamily: r,
|
|
348
350
|
color: c,
|
|
349
|
-
fontSize:
|
|
351
|
+
fontSize: l ? "0.875em" : "1em",
|
|
350
352
|
fontWeight: 400,
|
|
351
353
|
lineHeight: 1.5,
|
|
352
354
|
maxWidth: "800px",
|
|
@@ -361,9 +363,9 @@ const xe = ({
|
|
|
361
363
|
whiteTextColor: c,
|
|
362
364
|
successColor: i,
|
|
363
365
|
dangerColor: s,
|
|
364
|
-
optionBackground:
|
|
366
|
+
optionBackground: l,
|
|
365
367
|
spacingScale: d,
|
|
366
|
-
xlBorderRadius:
|
|
368
|
+
xlBorderRadius: a,
|
|
367
369
|
borderSize: o
|
|
368
370
|
} = e;
|
|
369
371
|
return {
|
|
@@ -391,8 +393,8 @@ const xe = ({
|
|
|
391
393
|
gap: d["2xs"],
|
|
392
394
|
justifyContent: "space-between",
|
|
393
395
|
padding: `${d.xs} ${d.sm}`,
|
|
394
|
-
backgroundColor: u ? s : g ? i : y ? n :
|
|
395
|
-
borderRadius:
|
|
396
|
+
backgroundColor: u ? s : g ? i : y ? n : l,
|
|
397
|
+
borderRadius: a,
|
|
396
398
|
cursor: "pointer",
|
|
397
399
|
transition: "all 0.3s ease",
|
|
398
400
|
position: "relative",
|
|
@@ -405,7 +407,7 @@ const xe = ({
|
|
|
405
407
|
WebkitTapHighlightColor: "transparent",
|
|
406
408
|
"&:hover": y || g || u ? {} : {
|
|
407
409
|
border: `${o} solid ${n}`,
|
|
408
|
-
backgroundColor:
|
|
410
|
+
backgroundColor: l,
|
|
409
411
|
transform: "translateY(-2px)"
|
|
410
412
|
}
|
|
411
413
|
}),
|
|
@@ -496,9 +498,9 @@ function Fe(e, n) {
|
|
|
496
498
|
const d = ce(s);
|
|
497
499
|
c.push(...d);
|
|
498
500
|
}
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
501
|
-
const d = ce(
|
|
501
|
+
const l = r.filter((d) => !i.includes(d));
|
|
502
|
+
if (l.length > 0) {
|
|
503
|
+
const d = ce(l);
|
|
502
504
|
i.push(...d);
|
|
503
505
|
}
|
|
504
506
|
return {
|
|
@@ -513,13 +515,13 @@ const ve = ({
|
|
|
513
515
|
selectedLeft: c,
|
|
514
516
|
selectedRight: i,
|
|
515
517
|
showError: s,
|
|
516
|
-
onSelectLeft:
|
|
518
|
+
onSelectLeft: l,
|
|
517
519
|
onSelectRight: d,
|
|
518
|
-
brandingColors:
|
|
520
|
+
brandingColors: a,
|
|
519
521
|
disabled: o = !1,
|
|
520
522
|
isTimeUp: y = !1
|
|
521
523
|
}) => {
|
|
522
|
-
const g = Z(), u = X(), x = fe(), b = te(), P = ee().xl, S = ue().size, W = (
|
|
524
|
+
const g = Z(), u = X(), x = fe(), b = te(), P = ee().xl, S = ue().size, W = (a == null ? void 0 : a.primary_color) || u.palette.primary.plainColor, R = (a == null ? void 0 : a.content_color) || x.colorSchemes.light.textColor, T = x.colorSchemes.dark.textColor, N = u.palette.success.plainColor, L = u.palette.danger.plainColor, I = et({
|
|
523
525
|
primaryColor: W,
|
|
524
526
|
textColor: R,
|
|
525
527
|
whiteTextColor: T,
|
|
@@ -537,7 +539,7 @@ const ve = ({
|
|
|
537
539
|
const C = F(k);
|
|
538
540
|
if (!C) return null;
|
|
539
541
|
const m = f === "left" ? $(k) : E(k), v = f === "left" && c === k || f === "right" && i === k, H = (v || m) && C.images, A = g ? ((B = C.images) == null ? void 0 : B.mobile) || ((j = C.images) == null ? void 0 : j.main) : (M = C.images) == null ? void 0 : M.main, O = f === "left" ? C.optionA : C.optionB, V = () => {
|
|
540
|
-
o || s || y || (f === "left" ?
|
|
542
|
+
o || s || y || (f === "left" ? l(k) : d(k));
|
|
541
543
|
}, D = s && v, Y = s && !v;
|
|
542
544
|
return /* @__PURE__ */ w(
|
|
543
545
|
h,
|
|
@@ -589,7 +591,7 @@ const ve = ({
|
|
|
589
591
|
] });
|
|
590
592
|
}, ye = (e) => {
|
|
591
593
|
let n;
|
|
592
|
-
const r = X(), c = te(), i = r.palette.danger.softBg, s = r.palette.danger.plainColor,
|
|
594
|
+
const r = X(), c = te(), i = r.palette.danger.softBg, s = r.palette.danger.plainColor, l = r.palette.warning.softBg, d = r.palette.warning.plainColor, a = e.brandingPrimaryColor || r.palette.primary.plainColor, o = ee().xl, y = re().secondary, g = r.palette.primary.onPrimary, u = {
|
|
593
595
|
"@keyframes pulse": {
|
|
594
596
|
"0%": {
|
|
595
597
|
transform: "scale(1)"
|
|
@@ -601,7 +603,7 @@ const ve = ({
|
|
|
601
603
|
transform: "scale(1)"
|
|
602
604
|
}
|
|
603
605
|
}
|
|
604
|
-
}, x =
|
|
606
|
+
}, x = ze(() => {
|
|
605
607
|
const S = e.timer - 1;
|
|
606
608
|
e.onTimeUpdate(S);
|
|
607
609
|
}, [e.onTimeUpdate, e.timer]);
|
|
@@ -619,11 +621,11 @@ const ve = ({
|
|
|
619
621
|
iconColor: s,
|
|
620
622
|
animation: "pulse 1s infinite"
|
|
621
623
|
} : S <= 50 ? {
|
|
622
|
-
background:
|
|
624
|
+
background: l,
|
|
623
625
|
color: d,
|
|
624
626
|
iconColor: d
|
|
625
627
|
} : {
|
|
626
|
-
background:
|
|
628
|
+
background: a,
|
|
627
629
|
color: g,
|
|
628
630
|
iconColor: g
|
|
629
631
|
};
|
|
@@ -649,7 +651,7 @@ const ve = ({
|
|
|
649
651
|
},
|
|
650
652
|
children: [
|
|
651
653
|
/* @__PURE__ */ t(
|
|
652
|
-
|
|
654
|
+
Ge,
|
|
653
655
|
{
|
|
654
656
|
sx: {
|
|
655
657
|
width: "24px",
|
|
@@ -684,10 +686,10 @@ const ve = ({
|
|
|
684
686
|
meetsThreshold: c,
|
|
685
687
|
totalPairs: i,
|
|
686
688
|
matchedPairs: s,
|
|
687
|
-
brandingColors:
|
|
689
|
+
brandingColors: l,
|
|
688
690
|
bgcolor: d
|
|
689
691
|
}) => {
|
|
690
|
-
const { t:
|
|
692
|
+
const { t: a } = ne(), o = Z(), y = X(), g = te(), u = ee().md, x = (l == null ? void 0 : l.content_color) || y.textColor, b = (l == null ? void 0 : l.primary_color) || y.palette.primary.plainColor, P = y.palette.danger.plainColor, S = y.palette.success.plainColor, W = y.surface, R = i - s, T = c ? S : P;
|
|
691
693
|
return /* @__PURE__ */ t(
|
|
692
694
|
h,
|
|
693
695
|
{
|
|
@@ -738,7 +740,7 @@ const ve = ({
|
|
|
738
740
|
opacity: 0.7,
|
|
739
741
|
fontSize: o ? "0.75em" : "0.875em"
|
|
740
742
|
},
|
|
741
|
-
children:
|
|
743
|
+
children: a("pickThePair.challengeStats.attempts")
|
|
742
744
|
}
|
|
743
745
|
)
|
|
744
746
|
] }),
|
|
@@ -767,7 +769,7 @@ const ve = ({
|
|
|
767
769
|
opacity: 0.7,
|
|
768
770
|
fontSize: o ? "0.75em" : "0.875em"
|
|
769
771
|
},
|
|
770
|
-
children:
|
|
772
|
+
children: a("pickThePair.challengeStats.accuracy")
|
|
771
773
|
}
|
|
772
774
|
)
|
|
773
775
|
] }),
|
|
@@ -796,7 +798,7 @@ const ve = ({
|
|
|
796
798
|
opacity: 0.7,
|
|
797
799
|
fontSize: o ? "0.75em" : "0.875em"
|
|
798
800
|
},
|
|
799
|
-
children:
|
|
801
|
+
children: a("pickThePair.challengeStats.target")
|
|
800
802
|
}
|
|
801
803
|
)
|
|
802
804
|
] }),
|
|
@@ -822,7 +824,7 @@ const ve = ({
|
|
|
822
824
|
opacity: 0.7,
|
|
823
825
|
fontSize: o ? "0.75em" : "0.875em"
|
|
824
826
|
},
|
|
825
|
-
children:
|
|
827
|
+
children: a("pickThePair.challengeStats.remaining")
|
|
826
828
|
}
|
|
827
829
|
)
|
|
828
830
|
] })
|
|
@@ -897,7 +899,7 @@ const ve = ({
|
|
|
897
899
|
) });
|
|
898
900
|
}, nt = (e) => {
|
|
899
901
|
var T, N, L, z, I, U, F, $, E, _, k, f, C, m, v, H, A, O, V, D, Y, B, j;
|
|
900
|
-
const { t: n } = ne(), r = Z(), c = pe(), i = ((T = e.infoPage.branding) == null ? void 0 : T.colors) || null, s = r ? ((L = (N = e.infoPage.branding) == null ? void 0 : N.images) == null ? void 0 : L.mobile_logo) || ((I = (z = e.infoPage.branding) == null ? void 0 : z.images) == null ? void 0 : I.main_logo) || "" : ((F = (U = e.infoPage.branding) == null ? void 0 : U.images) == null ? void 0 : F.main_logo) || "",
|
|
902
|
+
const { t: n } = ne(), r = Z(), c = pe(), i = ((T = e.infoPage.branding) == null ? void 0 : T.colors) || null, s = r ? ((L = (N = e.infoPage.branding) == null ? void 0 : N.images) == null ? void 0 : L.mobile_logo) || ((I = (z = e.infoPage.branding) == null ? void 0 : z.images) == null ? void 0 : I.main_logo) || "" : ((F = (U = e.infoPage.branding) == null ? void 0 : U.images) == null ? void 0 : F.main_logo) || "", l = e.imagePosition || "left", [d, a] = G(!1), o = me(
|
|
901
903
|
{
|
|
902
904
|
images: e.infoPage.images,
|
|
903
905
|
imagePlaceholder: e.defaultImagePlaceholderUrl || ""
|
|
@@ -911,7 +913,7 @@ const ve = ({
|
|
|
911
913
|
mdBorderRadius: b,
|
|
912
914
|
isExtraSmall: y
|
|
913
915
|
}), W = e.matchedPairs.length === e.pairData.pairs.length, R = (M) => {
|
|
914
|
-
var q, J, ie, oe,
|
|
916
|
+
var q, J, ie, oe, le;
|
|
915
917
|
return /* @__PURE__ */ t(
|
|
916
918
|
Re,
|
|
917
919
|
{
|
|
@@ -919,7 +921,7 @@ const ve = ({
|
|
|
919
921
|
textColor: M,
|
|
920
922
|
label: ((q = e.infoPage.labels) == null ? void 0 : q.sponsor) || null,
|
|
921
923
|
primaryUrl: (ie = (J = e.infoPage.branding) == null ? void 0 : J.urls) == null ? void 0 : ie.primary_url,
|
|
922
|
-
secondaryUrl: (
|
|
924
|
+
secondaryUrl: (le = (oe = e.infoPage.branding) == null ? void 0 : oe.urls) == null ? void 0 : le.secondary_url
|
|
923
925
|
}
|
|
924
926
|
);
|
|
925
927
|
};
|
|
@@ -934,7 +936,7 @@ const ve = ({
|
|
|
934
936
|
},
|
|
935
937
|
headline: n("pickThePair.headline"),
|
|
936
938
|
finalImage: o,
|
|
937
|
-
imagePosition:
|
|
939
|
+
imagePosition: l,
|
|
938
940
|
embedCodeContainerRef: void 0,
|
|
939
941
|
hasEmbedCode: !1,
|
|
940
942
|
children: /* @__PURE__ */ w(Q, { children: [
|
|
@@ -1091,7 +1093,7 @@ const ve = ({
|
|
|
1091
1093
|
label: n("pickThePair.buttons.continue"),
|
|
1092
1094
|
buttonColor: (i == null ? void 0 : i.primary_color) || X().palette.primary.plainColor,
|
|
1093
1095
|
isVoting: !1,
|
|
1094
|
-
onClick: () =>
|
|
1096
|
+
onClick: () => a(!0)
|
|
1095
1097
|
}
|
|
1096
1098
|
)
|
|
1097
1099
|
]
|
|
@@ -1109,7 +1111,7 @@ const ve = ({
|
|
|
1109
1111
|
textColor: c,
|
|
1110
1112
|
bgcolor: i,
|
|
1111
1113
|
mdBorderRadius: s,
|
|
1112
|
-
mobile:
|
|
1114
|
+
mobile: l,
|
|
1113
1115
|
surface: d
|
|
1114
1116
|
} = e;
|
|
1115
1117
|
return {
|
|
@@ -1135,19 +1137,19 @@ const ve = ({
|
|
|
1135
1137
|
flexDirection: "column",
|
|
1136
1138
|
gap: n.md,
|
|
1137
1139
|
textAlign: "center",
|
|
1138
|
-
padding:
|
|
1140
|
+
padding: l ? `0 ${n.md}` : `0 ${n.lg}`
|
|
1139
1141
|
},
|
|
1140
1142
|
title: {
|
|
1141
1143
|
fontFamily: r,
|
|
1142
1144
|
color: c,
|
|
1143
|
-
fontSize:
|
|
1145
|
+
fontSize: l ? "1.75em" : "2.25em",
|
|
1144
1146
|
fontWeight: 700,
|
|
1145
1147
|
lineHeight: 1.2
|
|
1146
1148
|
},
|
|
1147
1149
|
subtitle: {
|
|
1148
1150
|
fontFamily: r,
|
|
1149
1151
|
color: c,
|
|
1150
|
-
fontSize:
|
|
1152
|
+
fontSize: l ? "1em" : "1.125em",
|
|
1151
1153
|
fontWeight: 400,
|
|
1152
1154
|
lineHeight: 1.5,
|
|
1153
1155
|
maxWidth: "800px",
|
|
@@ -1156,7 +1158,7 @@ const ve = ({
|
|
|
1156
1158
|
welcome: {
|
|
1157
1159
|
fontFamily: r,
|
|
1158
1160
|
color: c,
|
|
1159
|
-
fontSize:
|
|
1161
|
+
fontSize: l ? "0.875em" : "1em",
|
|
1160
1162
|
fontWeight: 400,
|
|
1161
1163
|
lineHeight: 1.5,
|
|
1162
1164
|
maxWidth: "800px",
|
|
@@ -1166,7 +1168,7 @@ const ve = ({
|
|
|
1166
1168
|
instructions: {
|
|
1167
1169
|
fontFamily: r,
|
|
1168
1170
|
color: c,
|
|
1169
|
-
fontSize:
|
|
1171
|
+
fontSize: l ? "1em" : "1.3em",
|
|
1170
1172
|
fontWeight: 500,
|
|
1171
1173
|
lineHeight: 1.5,
|
|
1172
1174
|
textAlign: "center"
|
|
@@ -1174,7 +1176,7 @@ const ve = ({
|
|
|
1174
1176
|
disclaimer: {
|
|
1175
1177
|
fontFamily: r,
|
|
1176
1178
|
color: c,
|
|
1177
|
-
fontSize:
|
|
1179
|
+
fontSize: l ? "0.75em" : "0.875em",
|
|
1178
1180
|
fontWeight: 400,
|
|
1179
1181
|
lineHeight: 1.5,
|
|
1180
1182
|
textAlign: "center",
|
|
@@ -1186,10 +1188,10 @@ const ve = ({
|
|
|
1186
1188
|
gap: n.md,
|
|
1187
1189
|
backgroundColor: d,
|
|
1188
1190
|
borderRadius: s,
|
|
1189
|
-
padding:
|
|
1191
|
+
padding: l ? n.lg : n.xl,
|
|
1190
1192
|
maxWidth: "600px",
|
|
1191
1193
|
margin: "0 auto",
|
|
1192
|
-
width:
|
|
1194
|
+
width: l ? `calc(100% - ${n.md} * 2)` : `calc(100% - ${n.lg} * 2)`,
|
|
1193
1195
|
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
1194
1196
|
backdropFilter: "blur(4px)",
|
|
1195
1197
|
boxSizing: "border-box"
|
|
@@ -1200,11 +1202,11 @@ const ve = ({
|
|
|
1200
1202
|
gap: n.md,
|
|
1201
1203
|
backgroundColor: d,
|
|
1202
1204
|
borderRadius: s,
|
|
1203
|
-
px:
|
|
1204
|
-
py:
|
|
1205
|
+
px: l ? n.md : n.lg,
|
|
1206
|
+
py: l ? n.md : n.lg,
|
|
1205
1207
|
maxWidth: "1200px",
|
|
1206
1208
|
margin: "0 auto",
|
|
1207
|
-
width:
|
|
1209
|
+
width: l ? `calc(100% - ${n.md} * 2)` : `calc(100% - ${n.lg} * 2)`,
|
|
1208
1210
|
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
1209
1211
|
overflow: "hidden",
|
|
1210
1212
|
boxSizing: "border-box"
|
|
@@ -1216,11 +1218,11 @@ const ve = ({
|
|
|
1216
1218
|
alignItems: "center",
|
|
1217
1219
|
gap: n.sm
|
|
1218
1220
|
},
|
|
1219
|
-
getTimeUpOverlayStyle: (
|
|
1221
|
+
getTimeUpOverlayStyle: (a, o) => {
|
|
1220
1222
|
const y = (u, x) => {
|
|
1221
1223
|
const b = parseInt(u.slice(1, 3), 16), P = parseInt(u.slice(3, 5), 16), S = parseInt(u.slice(5, 7), 16);
|
|
1222
1224
|
return `rgba(${b}, ${P}, ${S}, ${x})`;
|
|
1223
|
-
}, g =
|
|
1225
|
+
}, g = a.startsWith("#") ? y(a, 0.5) : a.startsWith("rgb") ? a.replace(")", ", 0.50)").replace("rgb", "rgba") : "rgba(0, 0, 0, 0.50)";
|
|
1224
1226
|
return {
|
|
1225
1227
|
position: o ? "relative" : "absolute",
|
|
1226
1228
|
top: o ? "auto" : 0,
|
|
@@ -1255,13 +1257,13 @@ const ve = ({
|
|
|
1255
1257
|
timeUpText: {
|
|
1256
1258
|
color: "#FFFFFF",
|
|
1257
1259
|
fontWeight: 700,
|
|
1258
|
-
fontSize:
|
|
1260
|
+
fontSize: l ? "2em" : "3em",
|
|
1259
1261
|
lineHeight: 1.2,
|
|
1260
1262
|
textAlign: "center",
|
|
1261
1263
|
textShadow: "0 2px 20px rgba(0, 0, 0, 0.3)",
|
|
1262
1264
|
animation: "slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1263
|
-
padding:
|
|
1264
|
-
maxWidth:
|
|
1265
|
+
padding: l ? 2 : 3,
|
|
1266
|
+
maxWidth: l ? "280px" : "500px",
|
|
1265
1267
|
"@keyframes slideUp": {
|
|
1266
1268
|
from: {
|
|
1267
1269
|
transform: "translateY(20px)",
|
|
@@ -1281,9 +1283,9 @@ const ve = ({
|
|
|
1281
1283
|
whiteTextColor: c,
|
|
1282
1284
|
successColor: i,
|
|
1283
1285
|
dangerColor: s,
|
|
1284
|
-
optionBackground:
|
|
1286
|
+
optionBackground: l,
|
|
1285
1287
|
surface: d,
|
|
1286
|
-
mobile:
|
|
1288
|
+
mobile: a,
|
|
1287
1289
|
spacingScale: o,
|
|
1288
1290
|
xlBorderRadius: y,
|
|
1289
1291
|
borderSize: g
|
|
@@ -1291,19 +1293,19 @@ const ve = ({
|
|
|
1291
1293
|
return {
|
|
1292
1294
|
container: {
|
|
1293
1295
|
display: "flex",
|
|
1294
|
-
flexDirection:
|
|
1295
|
-
gap:
|
|
1296
|
+
flexDirection: a ? "column" : "row",
|
|
1297
|
+
gap: a ? o.xs : o["2xl"],
|
|
1296
1298
|
width: "100%",
|
|
1297
1299
|
maxWidth: "100%",
|
|
1298
1300
|
boxSizing: "border-box",
|
|
1299
1301
|
overflow: "hidden",
|
|
1300
1302
|
bgcolor: d,
|
|
1301
|
-
pt:
|
|
1303
|
+
pt: a ? 0 : o["2xs"]
|
|
1302
1304
|
},
|
|
1303
1305
|
column: {
|
|
1304
1306
|
display: "flex",
|
|
1305
1307
|
flexDirection: "column",
|
|
1306
|
-
gap:
|
|
1308
|
+
gap: a ? o.xs : o.sm,
|
|
1307
1309
|
flex: 1,
|
|
1308
1310
|
minWidth: 0,
|
|
1309
1311
|
maxWidth: "100%"
|
|
@@ -1314,26 +1316,26 @@ const ve = ({
|
|
|
1314
1316
|
gap: o["2xs"],
|
|
1315
1317
|
justifyContent: "space-between",
|
|
1316
1318
|
padding: `${o.xs} ${o.sm}`,
|
|
1317
|
-
backgroundColor: P ? s : b ? i : x ? n :
|
|
1318
|
-
borderTopLeftRadius: u === "left" &&
|
|
1319
|
-
borderBottomLeftRadius: u === "left" &&
|
|
1320
|
-
borderTopRightRadius: u === "right" &&
|
|
1321
|
-
borderBottomRightRadius: u === "right" &&
|
|
1319
|
+
backgroundColor: P ? s : b ? i : x ? n : l,
|
|
1320
|
+
borderTopLeftRadius: u === "left" && a ? "0px" : y,
|
|
1321
|
+
borderBottomLeftRadius: u === "left" && a ? "0px" : y,
|
|
1322
|
+
borderTopRightRadius: u === "right" && a ? "0px" : y,
|
|
1323
|
+
borderBottomRightRadius: u === "right" && a ? "0px" : y,
|
|
1322
1324
|
cursor: "pointer",
|
|
1323
1325
|
transition: "all 0.3s ease",
|
|
1324
1326
|
position: "relative",
|
|
1325
|
-
minHeight:
|
|
1326
|
-
width:
|
|
1327
|
+
minHeight: a ? "48px" : "56px",
|
|
1328
|
+
width: a ? "90%" : "100%",
|
|
1327
1329
|
maxWidth: "100%",
|
|
1328
1330
|
boxSizing: "border-box",
|
|
1329
1331
|
overflow: "visible",
|
|
1330
1332
|
border: `${g} solid ${x && !b && !P ? n : "transparent"}`,
|
|
1331
1333
|
WebkitTapHighlightColor: "transparent",
|
|
1332
|
-
marginLeft:
|
|
1333
|
-
marginRight:
|
|
1334
|
+
marginLeft: a && u === "right" ? "auto" : 0,
|
|
1335
|
+
marginRight: a && u === "left" ? "auto" : 0,
|
|
1334
1336
|
"&:hover": x || b || P ? {} : {
|
|
1335
1337
|
border: `${g} solid ${n}`,
|
|
1336
|
-
backgroundColor:
|
|
1338
|
+
backgroundColor: l,
|
|
1337
1339
|
transform: "translateY(-2px)"
|
|
1338
1340
|
}
|
|
1339
1341
|
}),
|
|
@@ -1355,8 +1357,8 @@ const ve = ({
|
|
|
1355
1357
|
}
|
|
1356
1358
|
},
|
|
1357
1359
|
getImageContainerStyle: (u, x, b) => ({
|
|
1358
|
-
width:
|
|
1359
|
-
height:
|
|
1360
|
+
width: a ? "48px" : "56px",
|
|
1361
|
+
height: a ? "48px" : "56px",
|
|
1360
1362
|
borderRadius: "50%",
|
|
1361
1363
|
overflow: "hidden",
|
|
1362
1364
|
backgroundColor: "#FFFFFF",
|
|
@@ -1365,7 +1367,7 @@ const ve = ({
|
|
|
1365
1367
|
top: "50%",
|
|
1366
1368
|
transform: "translateY(-50%)",
|
|
1367
1369
|
zIndex: 10,
|
|
1368
|
-
...b === "left" ? { right:
|
|
1370
|
+
...b === "left" ? { right: a ? "-12px" : "-14px" } : { left: a ? "-12px" : "-14px" },
|
|
1369
1371
|
border: x ? `${g} solid ${s}` : u ? `${g} solid ${i}` : `${g} solid ${n}`,
|
|
1370
1372
|
boxShadow: "0 2px 12px rgba(0, 0, 0, 0.15)"
|
|
1371
1373
|
}),
|
|
@@ -1380,7 +1382,7 @@ const ve = ({
|
|
|
1380
1382
|
getOptionTitleStyle: (u, x, b, P) => ({
|
|
1381
1383
|
color: x || b || P ? c : r,
|
|
1382
1384
|
fontWeight: 600,
|
|
1383
|
-
fontSize:
|
|
1385
|
+
fontSize: a ? "0.8125em" : "0.9375em",
|
|
1384
1386
|
lineHeight: 1.3,
|
|
1385
1387
|
wordBreak: "break-word",
|
|
1386
1388
|
overflowWrap: "break-word",
|
|
@@ -1390,7 +1392,7 @@ const ve = ({
|
|
|
1390
1392
|
getOptionSubtitleStyle: (u, x, b, P) => ({
|
|
1391
1393
|
color: x || b || P ? c : r,
|
|
1392
1394
|
opacity: 0.7,
|
|
1393
|
-
fontSize:
|
|
1395
|
+
fontSize: a ? "0.6875em" : "0.8125em",
|
|
1394
1396
|
lineHeight: 1.3,
|
|
1395
1397
|
wordBreak: "break-word",
|
|
1396
1398
|
overflowWrap: "break-word",
|
|
@@ -1399,25 +1401,25 @@ const ve = ({
|
|
|
1399
1401
|
}),
|
|
1400
1402
|
matchIndicator: {
|
|
1401
1403
|
position: "absolute",
|
|
1402
|
-
right:
|
|
1404
|
+
right: a ? o.xs : o.sm,
|
|
1403
1405
|
top: "50%",
|
|
1404
1406
|
transform: "translateY(-50%)"
|
|
1405
1407
|
}
|
|
1406
1408
|
};
|
|
1407
|
-
},
|
|
1409
|
+
}, lt = ({
|
|
1408
1410
|
pairs: e,
|
|
1409
1411
|
order: n,
|
|
1410
1412
|
matchedPairs: r,
|
|
1411
1413
|
selectedLeft: c,
|
|
1412
1414
|
selectedRight: i,
|
|
1413
1415
|
showError: s,
|
|
1414
|
-
onSelectLeft:
|
|
1416
|
+
onSelectLeft: l,
|
|
1415
1417
|
onSelectRight: d,
|
|
1416
|
-
brandingColors:
|
|
1418
|
+
brandingColors: a,
|
|
1417
1419
|
disabled: o = !1,
|
|
1418
1420
|
isTimeUp: y = !1
|
|
1419
1421
|
}) => {
|
|
1420
|
-
const g = Z(), u = fe(), x = X(), b =
|
|
1422
|
+
const g = Z(), u = fe(), x = X(), b = Ue(), P = te(), S = ee().xl, W = ue().size, R = (a == null ? void 0 : a.primary_color) || x.palette.primary.plainColor, T = (a == null ? void 0 : a.content_color) || u.colorSchemes.light.textColor, N = u.colorSchemes.dark.textColor, L = x.palette.success.plainColor, z = x.palette.danger.plainColor, I = b === "dark" ? "#FFFFFF" : x.onSurface, U = x.surface, F = ot({
|
|
1421
1423
|
primaryColor: R,
|
|
1422
1424
|
textColor: T,
|
|
1423
1425
|
whiteTextColor: N,
|
|
@@ -1437,7 +1439,7 @@ const ve = ({
|
|
|
1437
1439
|
const v = E(C);
|
|
1438
1440
|
if (!v) return null;
|
|
1439
1441
|
const H = m === "left" ? _(C) : k(C), A = m === "left" && c === C || m === "right" && i === C, O = (A || H) && v.images, V = g ? ((M = v.images) == null ? void 0 : M.mobile) || ((q = v.images) == null ? void 0 : q.main) : (J = v.images) == null ? void 0 : J.main, D = m === "left" ? v.optionA : v.optionB, Y = () => {
|
|
1440
|
-
o || s || y || (m === "left" ?
|
|
1442
|
+
o || s || y || (m === "left" ? l(C) : d(C));
|
|
1441
1443
|
}, B = s && A, j = s && !A;
|
|
1442
1444
|
return /* @__PURE__ */ w(
|
|
1443
1445
|
h,
|
|
@@ -1504,7 +1506,7 @@ const ve = ({
|
|
|
1504
1506
|
/* @__PURE__ */ t(h, { sx: F.column, children: $.columnA.map((C) => f(C, "left")) }),
|
|
1505
1507
|
/* @__PURE__ */ t(h, { sx: F.column, children: $.columnB.map((C) => f(C, "right")) })
|
|
1506
1508
|
] });
|
|
1507
|
-
},
|
|
1509
|
+
}, at = (e) => {
|
|
1508
1510
|
var P, S, W, R, T, N, L, z, I, U, F, $, E, _, k, f, C, m, v, H, A, O, V, D, Y, B, j, M, q;
|
|
1509
1511
|
const { t: n } = ne(), r = Z(), c = ((P = e.infoPage.branding) == null ? void 0 : P.colors) || null, i = me(
|
|
1510
1512
|
{
|
|
@@ -1512,9 +1514,9 @@ const ve = ({
|
|
|
1512
1514
|
imagePlaceholder: e.defaultImagePlaceholderUrl || ""
|
|
1513
1515
|
},
|
|
1514
1516
|
he.STANDARD
|
|
1515
|
-
), s = e.matchedPairs.length === e.pairData.pairs.length,
|
|
1517
|
+
), s = e.matchedPairs.length === e.pairData.pairs.length, l = X(), d = (c == null ? void 0 : c.content_color) || l.textColor, a = re().primary, o = (c == null ? void 0 : c.background_color) || l.surfaceVariant, y = ee().md, g = (c == null ? void 0 : c.primary_color) || l.palette.primary.plainColor, u = te(), x = l.surface, b = it({
|
|
1516
1518
|
spacingScale: u,
|
|
1517
|
-
fontFamilyPrimary:
|
|
1519
|
+
fontFamilyPrimary: a,
|
|
1518
1520
|
textColor: d,
|
|
1519
1521
|
bgcolor: se(o || ""),
|
|
1520
1522
|
mdBorderRadius: y,
|
|
@@ -1580,7 +1582,7 @@ const ve = ({
|
|
|
1580
1582
|
/* @__PURE__ */ w(h, { sx: { ...b.pairSection, position: "relative" }, children: [
|
|
1581
1583
|
((R = e.infoPage.labels) == null ? void 0 : R.instructions) && /* @__PURE__ */ t(p, { level: "title-md", sx: b.instructions, children: e.infoPage.labels.instructions }),
|
|
1582
1584
|
/* @__PURE__ */ t(
|
|
1583
|
-
|
|
1585
|
+
lt,
|
|
1584
1586
|
{
|
|
1585
1587
|
pairs: e.pairData.pairs,
|
|
1586
1588
|
order: e.pairData.config.order,
|
|
@@ -1732,7 +1734,7 @@ const ve = ({
|
|
|
1732
1734
|
}
|
|
1733
1735
|
}), ct = (e) => {
|
|
1734
1736
|
var $, E, _, k, f, C, m, v, H, A, O, V;
|
|
1735
|
-
const [n, r] = K.useState(!1), c = te(), i = fe(), { t: s } = ne(),
|
|
1737
|
+
const [n, r] = K.useState(!1), c = te(), i = fe(), { t: s } = ne(), l = Z(), d = pe(), { brandingImage: a, brandingColors: o, brandingLogo: y } = We(e.infoPage.branding || null), g = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? Qe : Je, u = a || me(
|
|
1736
1738
|
{
|
|
1737
1739
|
images: e.infoPage.images,
|
|
1738
1740
|
imagePlaceholder: g
|
|
@@ -1747,7 +1749,7 @@ const ve = ({
|
|
|
1747
1749
|
onPrimaryColor: W,
|
|
1748
1750
|
fontFamilyPrimary: R,
|
|
1749
1751
|
darkTextColor: T,
|
|
1750
|
-
isMobile:
|
|
1752
|
+
isMobile: l,
|
|
1751
1753
|
isExtraSmall: d,
|
|
1752
1754
|
textColor: N,
|
|
1753
1755
|
opacity: "60%"
|
|
@@ -1764,7 +1766,7 @@ const ve = ({
|
|
|
1764
1766
|
}
|
|
1765
1767
|
);
|
|
1766
1768
|
}, F = () => {
|
|
1767
|
-
var D, Y, B, j, M, q, J, ie, oe,
|
|
1769
|
+
var D, Y, B, j, M, q, J, ie, oe, le, Pe, Se, Ce, Te;
|
|
1768
1770
|
return /* @__PURE__ */ t(Q, { children: n ? /* @__PURE__ */ w(Q, { children: [
|
|
1769
1771
|
/* @__PURE__ */ t(h, { sx: z.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
|
|
1770
1772
|
xe,
|
|
@@ -1782,7 +1784,7 @@ const ve = ({
|
|
|
1782
1784
|
leadTitle: (J = e.infoPage.labels) == null ? void 0 : J.leadTitle,
|
|
1783
1785
|
leadDescription: (ie = e.infoPage.labels) == null ? void 0 : ie.leadDescription,
|
|
1784
1786
|
leadCta: (oe = e.infoPage.labels) == null ? void 0 : oe.leadCta,
|
|
1785
|
-
leadSuccessTitle: (
|
|
1787
|
+
leadSuccessTitle: (le = e.infoPage.labels) == null ? void 0 : le.leadSuccessTitle,
|
|
1786
1788
|
leadSuccessDescription: (Pe = e.infoPage.labels) == null ? void 0 : Pe.leadSuccessDescription,
|
|
1787
1789
|
syncWithProfile: (Se = e.leads) == null ? void 0 : Se.syncWithProfile
|
|
1788
1790
|
}
|
|
@@ -1871,7 +1873,7 @@ const ve = ({
|
|
|
1871
1873
|
] }) });
|
|
1872
1874
|
};
|
|
1873
1875
|
return /* @__PURE__ */ t(
|
|
1874
|
-
|
|
1876
|
+
Ne,
|
|
1875
1877
|
{
|
|
1876
1878
|
entity: {
|
|
1877
1879
|
...e.infoPage,
|
|
@@ -1885,9 +1887,9 @@ const ve = ({
|
|
|
1885
1887
|
}
|
|
1886
1888
|
);
|
|
1887
1889
|
}, st = (e) => {
|
|
1888
|
-
const [n, r] = G([]), [c, i] = G(null), [s,
|
|
1890
|
+
const [n, r] = G([]), [c, i] = G(null), [s, l] = G(null), [d, a] = G(!1), [o, y] = G(0), [g, u] = G(!1), [x, b] = G(!1), [P, S] = G(0), [W, R] = G(0), { infoPage: T } = Ve(e.entityId, "pick-the-pair", e.sdk), N = () => {
|
|
1889
1891
|
if (T && T.id !== "not-found") {
|
|
1890
|
-
const f = Object.keys(
|
|
1892
|
+
const f = Object.keys(De);
|
|
1891
1893
|
if (T.language && f.includes(T.language))
|
|
1892
1894
|
return T.language;
|
|
1893
1895
|
if (T.language)
|
|
@@ -1897,7 +1899,7 @@ const ve = ({
|
|
|
1897
1899
|
};
|
|
1898
1900
|
de(() => {
|
|
1899
1901
|
const f = N();
|
|
1900
|
-
|
|
1902
|
+
Ae(f);
|
|
1901
1903
|
}, [e.language, T]);
|
|
1902
1904
|
const L = ge(() => {
|
|
1903
1905
|
if (!T || T.id === "not-found")
|
|
@@ -1929,7 +1931,7 @@ const ve = ({
|
|
|
1929
1931
|
}, [L.config.timeLimit]);
|
|
1930
1932
|
const z = L.config.mode.toLowerCase() === "challenge", I = n.length, U = P > 0 ? I / P * 100 : 0, F = U >= L.config.successThresholdPercent;
|
|
1931
1933
|
if (!T)
|
|
1932
|
-
return /* @__PURE__ */ t(
|
|
1934
|
+
return /* @__PURE__ */ t(je, { my: 20 });
|
|
1933
1935
|
if (T.id === "not-found")
|
|
1934
1936
|
return /* @__PURE__ */ t(Ke, { template: e.template });
|
|
1935
1937
|
const $ = (f) => {
|
|
@@ -1944,12 +1946,12 @@ const ve = ({
|
|
|
1944
1946
|
s ? f === s ? (S((m) => m + 1), r((m) => [
|
|
1945
1947
|
...m,
|
|
1946
1948
|
{ leftId: f, rightId: s }
|
|
1947
|
-
]), i(null),
|
|
1948
|
-
|
|
1949
|
+
]), i(null), l(null)) : (S((m) => m + 1), R((m) => m + 1), i(f), a(!0), setTimeout(() => {
|
|
1950
|
+
a(!1), i(null), l(null);
|
|
1949
1951
|
}, 800)) : i(f);
|
|
1950
1952
|
}, E = (f) => {
|
|
1951
1953
|
if (s === f) {
|
|
1952
|
-
|
|
1954
|
+
l(null);
|
|
1953
1955
|
return;
|
|
1954
1956
|
}
|
|
1955
1957
|
if (n.some((m) => m.rightId === f)) {
|
|
@@ -1959,16 +1961,16 @@ const ve = ({
|
|
|
1959
1961
|
c ? f === c ? (S((m) => m + 1), r((m) => [
|
|
1960
1962
|
...m,
|
|
1961
1963
|
{ leftId: c, rightId: f }
|
|
1962
|
-
]), i(null),
|
|
1963
|
-
|
|
1964
|
-
}, 800)) :
|
|
1964
|
+
]), i(null), l(null)) : (S((m) => m + 1), R((m) => m + 1), l(f), a(!0), setTimeout(() => {
|
|
1965
|
+
a(!1), i(null), l(null);
|
|
1966
|
+
}, 800)) : l(f);
|
|
1965
1967
|
}, _ = (f) => {
|
|
1966
1968
|
y(f), f === 0 && (u(!1), b(!0));
|
|
1967
1969
|
}, k = async () => {
|
|
1968
1970
|
u(!1);
|
|
1969
1971
|
};
|
|
1970
|
-
return e.template ===
|
|
1971
|
-
|
|
1972
|
+
return e.template === ae.LANDING_PAGE ? /* @__PURE__ */ t(
|
|
1973
|
+
at,
|
|
1972
1974
|
{
|
|
1973
1975
|
infoPage: T,
|
|
1974
1976
|
pairData: L,
|
|
@@ -1992,7 +1994,7 @@ const ve = ({
|
|
|
1992
1994
|
onSubmit: k,
|
|
1993
1995
|
onTimeUpdate: _
|
|
1994
1996
|
}
|
|
1995
|
-
) : e.template ===
|
|
1997
|
+
) : e.template === ae.OVERLAY ? /* @__PURE__ */ t(
|
|
1996
1998
|
ct,
|
|
1997
1999
|
{
|
|
1998
2000
|
infoPage: T,
|
|
@@ -2029,7 +2031,7 @@ const ve = ({
|
|
|
2029
2031
|
sdk: e.sdk,
|
|
2030
2032
|
leads: e.leads,
|
|
2031
2033
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2032
|
-
imagePosition: e.template ===
|
|
2034
|
+
imagePosition: e.template === ae.STANDARD ? e.imagePosition : void 0,
|
|
2033
2035
|
timer: o,
|
|
2034
2036
|
isTimerRunning: g,
|
|
2035
2037
|
isTimeUp: x,
|
|
@@ -2048,12 +2050,12 @@ const ve = ({
|
|
|
2048
2050
|
var u;
|
|
2049
2051
|
const [n, r] = K.useState(!1), c = K.useRef(
|
|
2050
2052
|
`pick-the-pair-shadow-root-${Math.random().toString(36).substring(2, 11)}`
|
|
2051
|
-
), i = K.useRef(null), s = K.useRef(null),
|
|
2053
|
+
), i = K.useRef(null), s = K.useRef(null), l = K.useRef(null), d = K.useRef(null);
|
|
2052
2054
|
K.useEffect(() => {
|
|
2053
2055
|
if (i.current)
|
|
2054
|
-
return i.current.shadowRoot ? (s.current = i.current.shadowRoot,
|
|
2056
|
+
return i.current.shadowRoot ? (s.current = i.current.shadowRoot, l.current = s.current.getElementById(
|
|
2055
2057
|
c.current
|
|
2056
|
-
),
|
|
2058
|
+
), l.current || (l.current = document.createElement("div"), l.current.id = c.current, s.current.appendChild(l.current))) : (s.current = i.current.attachShadow({ mode: "open" }), l.current = document.createElement("div"), l.current.id = c.current, s.current.appendChild(l.current)), d.current || (d.current = $e({
|
|
2057
2059
|
key: "pick-the-pair-css",
|
|
2058
2060
|
prepend: !0,
|
|
2059
2061
|
container: s.current
|
|
@@ -2061,20 +2063,20 @@ const ve = ({
|
|
|
2061
2063
|
r(!1);
|
|
2062
2064
|
};
|
|
2063
2065
|
}, []);
|
|
2064
|
-
const
|
|
2065
|
-
...
|
|
2066
|
-
mode: e.template ===
|
|
2067
|
-
}, y = /* @__PURE__ */ t(h, { ref: i }), g = n && i.current &&
|
|
2068
|
-
/* @__PURE__ */ t(
|
|
2069
|
-
|
|
2066
|
+
const a = e.themeOptions, o = {
|
|
2067
|
+
...a,
|
|
2068
|
+
mode: e.template === ae.OVERLAY ? "dark" : a == null ? void 0 : a.mode
|
|
2069
|
+
}, y = /* @__PURE__ */ t(h, { ref: i }), g = n && i.current && l.current && d.current ? Me(
|
|
2070
|
+
/* @__PURE__ */ t(_e, { value: d.current, children: /* @__PURE__ */ t(He, { containerRef: i, children: /* @__PURE__ */ t(
|
|
2071
|
+
Ee,
|
|
2070
2072
|
{
|
|
2071
2073
|
customTheme: o,
|
|
2072
2074
|
mode: o == null ? void 0 : o.mode,
|
|
2073
|
-
shadowRootElement:
|
|
2075
|
+
shadowRootElement: l.current,
|
|
2074
2076
|
children: /* @__PURE__ */ t(
|
|
2075
|
-
|
|
2077
|
+
Oe,
|
|
2076
2078
|
{
|
|
2077
|
-
shadowRootElement:
|
|
2079
|
+
shadowRootElement: l.current,
|
|
2078
2080
|
leadPhoneCountryCode: ((u = e.leads) == null ? void 0 : u.phoneCountryCode) || null,
|
|
2079
2081
|
language: null,
|
|
2080
2082
|
optionsLayout: null,
|
|
@@ -2083,13 +2085,13 @@ const ve = ({
|
|
|
2083
2085
|
)
|
|
2084
2086
|
}
|
|
2085
2087
|
) }) }),
|
|
2086
|
-
|
|
2088
|
+
l.current
|
|
2087
2089
|
) : null;
|
|
2088
2090
|
return /* @__PURE__ */ w(Q, { children: [
|
|
2089
2091
|
y,
|
|
2090
2092
|
g
|
|
2091
2093
|
] });
|
|
2092
|
-
}, mt = (e) => /* @__PURE__ */ t(dt, { ...e, children: /* @__PURE__ */ t(st, { ...e }) }),
|
|
2094
|
+
}, mt = (e) => /* @__PURE__ */ t(dt, { ...e, children: /* @__PURE__ */ t(st, { ...e }) }), kt = mt;
|
|
2093
2095
|
export {
|
|
2094
|
-
|
|
2096
|
+
kt as PickThePair
|
|
2095
2097
|
};
|