fansunited-frontend-components 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BattleOfFans.js +427 -404
- package/Betslip.js +1 -1
- package/ChanceGame.js +1 -1
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +1 -1
- package/CompetitorCard.js +1 -1
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +1 -1
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +1 -1
- package/List.js +4 -4
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +1 -1
- package/PlayerOfTheMatch.js +805 -857
- package/PollVote.js +2 -2
- package/Predictor.js +1 -1
- package/ProfileStats.d.ts +4 -0
- package/ProfileStats.d.ts.map +1 -0
- package/ProfileStats.js +2781 -0
- package/README.md +61 -2
- package/Standings.js +1 -1
- package/TopX.js +1 -1
- package/chunks/index-CLJiQKNv.js +4 -0
- package/chunks/index-D6-V3WrE.js +4 -0
- package/chunks/index-Dt38wFLo.js +4 -0
- package/chunks/index-Ehvd1Qmz.js +4 -0
- package/chunks/index-QtarvzAb.js +4 -0
- package/chunks/index-kffkFNES.js +4 -0
- package/chunks/{main-DdL0UekL.js → main-BnuQygIM.js} +1853 -1783
- package/chunks/main-BpGmqCTf.js +2142 -0
- package/chunks/main-C0PSUCR_.js +3027 -0
- package/chunks/{main-LEE8n2cG.js → main-CfdOHNHz.js} +1268 -1203
- package/chunks/{main-D_QDfmAw.js → main-PpLP-LeG.js} +1797 -1753
- package/chunks/{main-C7X4dM_P.js → main-p1Qbq-Fw.js} +1532 -1483
- package/chunks/{withVersionStamp-CzdDF1rG.js → withVersionStamp-C1gbpK3-.js} +1 -1
- 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 +11 -9
- package/package.json +6 -2
- package/chunks/index-BNl8scz6.js +0 -4
- package/chunks/index-CSa2JU4m.js +0 -4
- package/chunks/index-Cd1dg0KI.js +0 -4
- package/chunks/index-Cei2fzi7.js +0 -4
- package/chunks/index-Cxb4wEJU.js +0 -4
- package/chunks/index-w1LGN5dz.js +0 -4
- package/chunks/main-07vzblS8.js +0 -2091
- package/chunks/main-DmBfwyb4.js +0 -2992
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useDisableCache as
|
|
3
|
-
import { C as
|
|
4
|
-
import
|
|
5
|
-
import { PersonalityQuizFullModel as
|
|
6
|
-
import { AspectRatio as
|
|
1
|
+
import { jsx as t, jsxs as w, Fragment as Re } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useDisableCache as ri, useInternalTheme as te, useColors as re, useImageUrl as Ke, useConstantContext as zt, ConstantsContext as wt, useIsMobile as Z, useIsLarge as kt, useBrandingModelProperties as Oe, defaultBgVertical as Ie, defaultBg as Se, useImageVariant as be, WidgetTemplate as _, DirectionalIcon as Qt, useIsExtraSmall as oi, hexToRgb as We, useIsRtl as Xe, bidiIsolateAuto as li, stripHtmlTags as si, getBrandingClickUrl as $n, useImageBackgroundGradient as Mn, sanitizeBackgroundUrl as Fn, isExpired as ci, useSignInGate as di, useConsents as ui, useParticipationDraft as gi, getRelatedInfoPageId as mi, initializeI18n as fi, ChanceGameEmbed as Nt, extractSdkError as yi } from "fansunited-frontend-core";
|
|
3
|
+
import { C as _t } from "./ChanceGameEmbedVariant-z8XYzgDW.js";
|
|
4
|
+
import Je, { useState as M, useEffect as fe, useRef as ve, useId as et, useMemo as gt } from "react";
|
|
5
|
+
import { PersonalityQuizFullModel as hi, PersonalityQuizParticipationModel as Hn } from "fansunited-sdk-esm/models";
|
|
6
|
+
import { ExpiredTooltip as tt, AspectRatio as nt, useBreakpointUp as ge, PlayCollectLeadWrapper as bi, baseButton as Ce, ButtonSpinner as On, space as f, baseBody as ye, OverlaySkeleton as xi, ConsentPanel as Te, PresentedBy as G, ConsentCta as it, ctaButton as pi, ctaLabel as vi, StandardSkeleton as Ci, SplitSkeleton as Ii, StandardContentSkeleton as Si, AdditionalCTA as At, AlertMessage as Pt, SplitScoreStateSkeleton as zi, OverlayScoreStateWrapperSkeleton as wi, NotFound as ki, OverlayApiErrorSkeleton as Wn, SplitApiErrorSkeleton as Vn, StandardApiErrorSkeleton as jn, StandardSignInSkeleton as Qi, SignInCta as qt, SplitSignInSkeleton as Ai, OverlaySignInSkeleton as Pi, StandardLeadAfterCollection as Lt, SignInGatePanel as Dt, SplitLeadAfterCollection as Ut, OverlayLeadAfterCollection as Rt, Spinner as Yt, WidgetPortal as qi } from "fansunited-frontend-core/ui/emotion";
|
|
7
7
|
import { css as n } from "@emotion/react";
|
|
8
|
-
import { ArrowRightAltIcon as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
const
|
|
11
|
-
const [r, o] =
|
|
8
|
+
import { ArrowRightAltIcon as Tt, ReplayIcon as Bt } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
import { useTranslation as W } from "react-i18next";
|
|
10
|
+
const Li = (e, i) => {
|
|
11
|
+
const [r, o] = M(null), d = ri(), a = async () => {
|
|
12
12
|
try {
|
|
13
|
-
const l = await i.miniGames.getPersonalityQuizById(e,
|
|
13
|
+
const l = await i.miniGames.getPersonalityQuizById(e, d);
|
|
14
14
|
o(l);
|
|
15
15
|
} catch (l) {
|
|
16
|
-
console.error(l), o(new
|
|
16
|
+
console.error(l), o(new hi());
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
return
|
|
20
|
-
},
|
|
21
|
-
const [a, l] =
|
|
22
|
-
r !==
|
|
23
|
-
const
|
|
19
|
+
return fe(() => (a(), () => o(null)), [e, i, d]), r;
|
|
20
|
+
}, Di = (e, i, r, o = !1, d = !1) => {
|
|
21
|
+
const [a, l] = M(null), [s, C] = M(!1), [y, g] = M(!1), [u, h] = M(""), [m, x] = M(r);
|
|
22
|
+
r !== m && (x(r), l(null));
|
|
23
|
+
const P = async () => {
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
25
|
+
const b = await i.miniGames.getMyPersonalityQuizParticipations({
|
|
26
26
|
personalityQuizIds: [e]
|
|
27
27
|
});
|
|
28
|
-
l(
|
|
29
|
-
} catch (
|
|
30
|
-
if (l([new
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
o ||
|
|
28
|
+
l(b.data);
|
|
29
|
+
} catch (b) {
|
|
30
|
+
if (l([new Hn()]), i.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
31
|
+
const q = b;
|
|
32
|
+
if (q.error.code === 401 || q.error.code === 403) {
|
|
33
|
+
o || C(!0);
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
g(!0), h(q.error.message || "");
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
o ||
|
|
39
|
+
const p = b;
|
|
40
|
+
if (p.data.error.code === 401 || p.data.error.code === 403) {
|
|
41
|
+
o || C(!0);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
g(!0), h(p.data.error.message || "");
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
return
|
|
47
|
+
return fe(() => (P(), () => l((b) => b === null ? null : [])), [e, i, r, o, d]), {
|
|
48
48
|
myParticipation: a,
|
|
49
49
|
isUnauthorized: s,
|
|
50
50
|
isApiError: y,
|
|
51
51
|
apiMessage: u,
|
|
52
|
-
setIsUnauthorized:
|
|
53
|
-
setIsApiError:
|
|
54
|
-
setApiMessage:
|
|
52
|
+
setIsUnauthorized: C,
|
|
53
|
+
setIsApiError: g,
|
|
54
|
+
setApiMessage: h
|
|
55
55
|
};
|
|
56
|
-
},
|
|
56
|
+
}, mt = {
|
|
57
57
|
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
58
58
|
flex: 1,
|
|
59
59
|
padding: "var(--fu-ucrc-space-xs)",
|
|
@@ -68,7 +68,7 @@ const Ai = (e, i) => {
|
|
|
68
68
|
"--fu-ucrc-pq-option-text": "var(--fu-ucrc-pq-light-text)",
|
|
69
69
|
"&:hover": { transform: "scale(1.02)" },
|
|
70
70
|
"&:active": { transform: "scale(0.98)" }
|
|
71
|
-
},
|
|
71
|
+
}, Zt = {
|
|
72
72
|
margin: 0,
|
|
73
73
|
unicodeBidi: "plaintext",
|
|
74
74
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
@@ -78,70 +78,78 @@ const Ai = (e, i) => {
|
|
|
78
78
|
textAlign: "center",
|
|
79
79
|
color: "var(--fu-ucrc-pq-option-text)",
|
|
80
80
|
paddingInline: "var(--fu-ucrc-space-2xs)"
|
|
81
|
-
},
|
|
82
|
-
idle: n(
|
|
83
|
-
selected: n(
|
|
81
|
+
}, Ae = {
|
|
82
|
+
idle: n(mt),
|
|
83
|
+
selected: n(mt, {
|
|
84
84
|
backgroundColor: "var(--fu-ucrc-pq-primary)",
|
|
85
85
|
boxShadow: "inset 0 0 0 var(--fu-ucrc-border-size) var(--fu-ucrc-pq-primary)",
|
|
86
86
|
"--fu-ucrc-pq-option-text": "var(--fu-ucrc-primary-on-primary)"
|
|
87
87
|
}),
|
|
88
88
|
media: n({ borderRadius: "var(--fu-ucrc-radius-xs)", overflow: "hidden", flexGrow: 1 }),
|
|
89
89
|
img: n({ width: "100%", height: "100%", objectFit: "cover" }),
|
|
90
|
-
mediaTitle: n({ ...
|
|
91
|
-
title: n({ ...
|
|
92
|
-
|
|
90
|
+
mediaTitle: n({ ...Zt, lineHeight: "24px" }),
|
|
91
|
+
title: n({ ...Zt, lineHeight: "16px", marginBlock: "auto" }),
|
|
92
|
+
// Expired: the poll's locked option look, no press feedback.
|
|
93
|
+
locked: n(mt, {
|
|
94
|
+
cursor: "not-allowed",
|
|
95
|
+
opacity: 0.5,
|
|
96
|
+
"&:hover": { transform: "scale(1)" },
|
|
97
|
+
"&:active": { transform: "scale(1)" }
|
|
98
|
+
})
|
|
99
|
+
}, Ui = (e) => {
|
|
93
100
|
var l;
|
|
94
|
-
const i =
|
|
101
|
+
const i = te(), r = re(), o = Ke(e.option.images), d = e.questionImage ? null : o, a = {
|
|
95
102
|
"--fu-ucrc-pq-primary": ((l = e.brandingColors) == null ? void 0 : l.primaryColor) || r.palette.primary.plainColor,
|
|
96
103
|
// The card is white, so its text keeps the light scheme's colour in either mode.
|
|
97
104
|
"--fu-ucrc-pq-light-text": i.colorSchemes.light.textColor
|
|
98
105
|
};
|
|
99
|
-
return /* @__PURE__ */ t(
|
|
106
|
+
return /* @__PURE__ */ t(tt, { expired: !!e.expired, wrap: !1, children: /* @__PURE__ */ t(
|
|
100
107
|
"div",
|
|
101
108
|
{
|
|
102
|
-
css: e.selectedOption === e.option.optionId ?
|
|
109
|
+
css: e.expired ? Ae.locked : e.selectedOption === e.option.optionId ? Ae.selected : Ae.idle,
|
|
103
110
|
style: a,
|
|
104
|
-
onClick: () => e.answerQuestion(e.option.optionId),
|
|
105
|
-
children:
|
|
106
|
-
/* @__PURE__ */ t("div", { css:
|
|
107
|
-
/* @__PURE__ */ t("p", { css:
|
|
108
|
-
] }) : /* @__PURE__ */ t("p", { css:
|
|
111
|
+
onClick: e.expired ? void 0 : () => e.answerQuestion(e.option.optionId),
|
|
112
|
+
children: d ? /* @__PURE__ */ w(Re, { children: [
|
|
113
|
+
/* @__PURE__ */ t("div", { css: Ae.media, children: /* @__PURE__ */ t(nt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-xs)", children: /* @__PURE__ */ t("img", { src: d, alt: "Option illustration", css: Ae.img }) }) }),
|
|
114
|
+
/* @__PURE__ */ t("p", { css: Ae.mediaTitle, children: e.option.option })
|
|
115
|
+
] }) : /* @__PURE__ */ t("p", { css: Ae.title, children: e.option.option })
|
|
109
116
|
}
|
|
110
|
-
);
|
|
111
|
-
},
|
|
112
|
-
list: n({ ...
|
|
117
|
+
) });
|
|
118
|
+
}, Kt = { display: "flex", flexDirection: "column", gap: "16px" }, Ue = {
|
|
119
|
+
list: n({ ...Kt, paddingBlock: "16px" }),
|
|
113
120
|
row: n({ display: "flex", flexDirection: "row", gap: "16px" }),
|
|
114
|
-
column: n(
|
|
121
|
+
column: n(Kt),
|
|
115
122
|
wrapRow: n({ display: "flex", flexWrap: "wrap", flexDirection: "row", gap: "16px", paddingBlock: "16px" }),
|
|
116
123
|
wrapColumn: n({ display: "flex", flexWrap: "wrap", flexDirection: "column", gap: "16px", paddingBlock: "16px" })
|
|
117
|
-
},
|
|
124
|
+
}, Ri = (e) => {
|
|
118
125
|
const i = [];
|
|
119
126
|
for (let r = 0; r < e.length; r += 2) i.push(e.slice(r, r + 2));
|
|
120
127
|
return i;
|
|
121
|
-
},
|
|
122
|
-
const i =
|
|
123
|
-
|
|
128
|
+
}, Et = (e) => {
|
|
129
|
+
const i = ge("md"), r = (o) => /* @__PURE__ */ t(
|
|
130
|
+
Ui,
|
|
124
131
|
{
|
|
125
132
|
option: o,
|
|
126
133
|
questionImage: e.questionImage,
|
|
127
134
|
selectedOption: e.selectedOption,
|
|
128
135
|
answerQuestion: e.answerQuestion,
|
|
129
|
-
brandingColors: e.brandingColors
|
|
136
|
+
brandingColors: e.brandingColors,
|
|
137
|
+
expired: e.expired
|
|
130
138
|
},
|
|
131
139
|
o.optionId
|
|
132
140
|
);
|
|
133
|
-
return e.optionsLayout === "twoByTwo" ? /* @__PURE__ */ t("div", { css:
|
|
141
|
+
return e.optionsLayout === "twoByTwo" ? /* @__PURE__ */ t("div", { css: Ue.list, children: Ri(e.options).map((o, d) => /* @__PURE__ */ t("div", { css: i ? Ue.row : Ue.column, children: o.map(r) }, `row-${d}`)) }) : e.optionsLayout === "column" ? /* @__PURE__ */ t("div", { css: Ue.list, children: e.options.map(r) }) : /* @__PURE__ */ t("div", { css: i ? Ue.wrapRow : Ue.wrapColumn, children: e.options.map(r) });
|
|
134
142
|
}, Be = ({ isAfterPosition: e = !1, ...i }) => {
|
|
135
|
-
const { t: r } =
|
|
143
|
+
const { t: r } = W();
|
|
136
144
|
return /* @__PURE__ */ t(
|
|
137
|
-
|
|
145
|
+
bi,
|
|
138
146
|
{
|
|
139
147
|
...i,
|
|
140
148
|
contentType: "personality-quiz",
|
|
141
149
|
successCtaLabel: r(e ? "personalityQuiz.buttons.finish" : "personalityQuiz.buttons.start")
|
|
142
150
|
}
|
|
143
151
|
);
|
|
144
|
-
},
|
|
152
|
+
}, Xt = {
|
|
145
153
|
paddingBlock: "10px",
|
|
146
154
|
paddingRight: "12px",
|
|
147
155
|
paddingLeft: "16px",
|
|
@@ -154,10 +162,10 @@ const Ai = (e, i) => {
|
|
|
154
162
|
"&:hover": { transform: "scale(1.02)" },
|
|
155
163
|
"&:active": { transform: "scale(0.98)" },
|
|
156
164
|
"&:disabled": { opacity: "34%" }
|
|
157
|
-
},
|
|
158
|
-
root: n(
|
|
165
|
+
}, Ne = {
|
|
166
|
+
root: n(Ce, Xt),
|
|
159
167
|
// Joy's `ml: { md: "auto" }`.
|
|
160
|
-
rootEnd: n(
|
|
168
|
+
rootEnd: n(Ce, Xt, { marginLeft: "auto" }),
|
|
161
169
|
label: n({
|
|
162
170
|
margin: 0,
|
|
163
171
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
@@ -178,11 +186,11 @@ const Ai = (e, i) => {
|
|
|
178
186
|
"--Icon-fontSize": "1em",
|
|
179
187
|
"--Icon-color": "var(--fu-ucrc-primary-on-primary)"
|
|
180
188
|
})
|
|
181
|
-
},
|
|
189
|
+
}, Ti = { "--Icon-margin": "0 -4px 0 0" }, Bi = (e) => /* @__PURE__ */ w(
|
|
182
190
|
"button",
|
|
183
191
|
{
|
|
184
192
|
type: "button",
|
|
185
|
-
css: e.pushToEnd ?
|
|
193
|
+
css: e.pushToEnd ? Ne.rootEnd : Ne.root,
|
|
186
194
|
style: {
|
|
187
195
|
"--fu-ucrc-pq-next": e.primaryColor,
|
|
188
196
|
"--fu-ucrc-primary-on-primary": e.onPrimaryColor,
|
|
@@ -191,13 +199,13 @@ const Ai = (e, i) => {
|
|
|
191
199
|
disabled: e.isLoading || e.disabled,
|
|
192
200
|
onClick: e.onClick,
|
|
193
201
|
children: [
|
|
194
|
-
/* @__PURE__ */ t("p", { css:
|
|
195
|
-
/* @__PURE__ */ t("span", { css:
|
|
196
|
-
e.isLoading && /* @__PURE__ */ t(
|
|
202
|
+
/* @__PURE__ */ t("p", { css: Ne.label, children: e.label }),
|
|
203
|
+
/* @__PURE__ */ t("span", { css: Ne.decorator, style: Ti, children: e.endDecorator }),
|
|
204
|
+
e.isLoading && /* @__PURE__ */ t(On, { size: 20, thickness: 3 })
|
|
197
205
|
]
|
|
198
206
|
}
|
|
199
|
-
),
|
|
200
|
-
...
|
|
207
|
+
), Jt = { display: "flex", alignItems: "center", gap: f("md") }, en = { gap: "8px", alignItems: "flex-start", justifyContent: "center" }, tn = {
|
|
208
|
+
...ye,
|
|
201
209
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
202
210
|
lineHeight: "150%",
|
|
203
211
|
letterSpacing: "0.15px",
|
|
@@ -205,14 +213,16 @@ const Ai = (e, i) => {
|
|
|
205
213
|
fontSize: "1.25em",
|
|
206
214
|
textAlign: "center",
|
|
207
215
|
color: "var(--fu-ucrc-pq-ovl-text)"
|
|
208
|
-
},
|
|
216
|
+
}, he = {
|
|
217
|
+
// OverlayNextButton's own pushToEnd, moved onto the expired tooltip's wrapper.
|
|
218
|
+
pushToEnd: n({ marginLeft: "auto" }),
|
|
209
219
|
// A blurred panel over the artwork, tinted by the content background at half opacity.
|
|
210
220
|
content: n({
|
|
211
221
|
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
212
|
-
padding:
|
|
222
|
+
padding: f("md"),
|
|
213
223
|
display: "flex",
|
|
214
224
|
flexDirection: "column",
|
|
215
|
-
gap:
|
|
225
|
+
gap: f("md"),
|
|
216
226
|
backdropFilter: "blur(4px)",
|
|
217
227
|
position: "relative",
|
|
218
228
|
"&::before": {
|
|
@@ -230,125 +240,126 @@ const Ai = (e, i) => {
|
|
|
230
240
|
"& > *": { position: "relative", zIndex: 1 }
|
|
231
241
|
}),
|
|
232
242
|
imageBox: n({ borderRadius: "var(--fu-ucrc-radius-sm)", overflow: "hidden" }),
|
|
233
|
-
question: n(
|
|
234
|
-
questionBlock: n(
|
|
235
|
-
steps: n(
|
|
236
|
-
questionText: n(
|
|
237
|
-
footer: n(
|
|
238
|
-
footerMobile: n(
|
|
239
|
-
},
|
|
240
|
-
var
|
|
241
|
-
const [i, r] =
|
|
242
|
-
((
|
|
243
|
-
), { optionsLayout: o } =
|
|
243
|
+
question: n(en, { display: "flex" }),
|
|
244
|
+
questionBlock: n(en, { display: "block" }),
|
|
245
|
+
steps: n(tn, { opacity: "70%" }),
|
|
246
|
+
questionText: n(tn, { unicodeBidi: "plaintext" }),
|
|
247
|
+
footer: n(Jt, { justifyContent: "space-between", flexDirection: "row" }),
|
|
248
|
+
footerMobile: n(Jt, { justifyContent: "center", flexDirection: "column-reverse" })
|
|
249
|
+
}, Ei = { width: "100%", height: "100%", objectFit: "cover" }, $i = (e) => {
|
|
250
|
+
var F, Q, S, D, z, A, L, $, c, U, R, E, V, J, Y, oe, se, ce, me, ae;
|
|
251
|
+
const [i, r] = Je.useState(
|
|
252
|
+
((F = e.leads) == null ? void 0 : F.position) === "before" && e.personalityQuiz.authRequirement === "LEAD" && !e.expired
|
|
253
|
+
), { optionsLayout: o } = zt(wt), d = te(), a = Ke(e.question.images), { t: l } = W(), s = Z(), C = kt(), y = ge("md"), { brandingImage: g, brandingColors: u, brandingLogo: h } = Oe(
|
|
244
254
|
e.personalityQuiz.branding || null
|
|
245
|
-
),
|
|
246
|
-
{ images: e.personalityQuiz.images, imagePlaceholder:
|
|
247
|
-
|
|
248
|
-
),
|
|
249
|
-
"--fu-ucrc-pq-ovl-content-bg": (u == null ? void 0 : u.backgroundColor) ||
|
|
250
|
-
"--fu-ucrc-pq-ovl-text":
|
|
251
|
-
},
|
|
255
|
+
), m = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : s ? Ie : Se, x = be(
|
|
256
|
+
{ images: e.personalityQuiz.images, imagePlaceholder: m },
|
|
257
|
+
_.OVERLAY
|
|
258
|
+
), P = g || x, b = e.currentQuestion === e.personalityQuiz.questions.length && (((Q = e.leads) == null ? void 0 : Q.position) === "after" || e.hasAfterConsents) ? l("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? l("personalityQuiz.buttons.finish") : l("personalityQuiz.buttons.next"), k = d.colorSchemes.dark, p = d.colorSchemes.light, q = (u == null ? void 0 : u.primaryColor) || p.palette.primary.plainColor, v = {
|
|
259
|
+
"--fu-ucrc-pq-ovl-content-bg": (u == null ? void 0 : u.backgroundColor) || k.surfaceVariant,
|
|
260
|
+
"--fu-ucrc-pq-ovl-text": k.textColor
|
|
261
|
+
}, T = () => {
|
|
252
262
|
r(!1);
|
|
253
263
|
};
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
|
|
264
|
+
return /* @__PURE__ */ w(
|
|
265
|
+
xi,
|
|
256
266
|
{
|
|
257
267
|
entity: e.personalityQuiz,
|
|
258
268
|
headline: l("personalityQuiz.headline"),
|
|
259
|
-
finalImage:
|
|
269
|
+
finalImage: P,
|
|
260
270
|
rulesDisplay: e.rulesDisplay,
|
|
261
271
|
children: [
|
|
262
|
-
/* @__PURE__ */ t("div", { css:
|
|
272
|
+
/* @__PURE__ */ t("div", { css: he.content, style: v, children: e.applyConsentGate ? /* @__PURE__ */ t(
|
|
263
273
|
Te,
|
|
264
274
|
{
|
|
265
275
|
consents: e.consents,
|
|
266
|
-
primaryColor:
|
|
267
|
-
textColor: (u == null ? void 0 : u.contentColor) ||
|
|
268
|
-
brandingUrls: (
|
|
276
|
+
primaryColor: q,
|
|
277
|
+
textColor: (u == null ? void 0 : u.contentColor) || k.textColor,
|
|
278
|
+
brandingUrls: (S = e.personalityQuiz.branding) == null ? void 0 : S.urls
|
|
269
279
|
}
|
|
270
280
|
) : i ? /* @__PURE__ */ t(
|
|
271
281
|
Be,
|
|
272
282
|
{
|
|
273
283
|
sdk: e.sdk,
|
|
274
|
-
startGame:
|
|
284
|
+
startGame: T,
|
|
275
285
|
contentId: e.personalityQuiz.id,
|
|
276
286
|
contentName: e.personalityQuiz.title,
|
|
277
|
-
brandingColors: (
|
|
287
|
+
brandingColors: (D = e.personalityQuiz.branding) == null ? void 0 : D.colors,
|
|
278
288
|
brandingUrls: (z = e.personalityQuiz.branding) == null ? void 0 : z.urls,
|
|
279
289
|
campaignId: (A = e.leads) == null ? void 0 : A.campaignId,
|
|
280
290
|
campaignName: (L = e.leads) == null ? void 0 : L.campaignName,
|
|
281
|
-
fields: (
|
|
282
|
-
leadTitle: (
|
|
283
|
-
leadDescription: (
|
|
284
|
-
leadCta: (
|
|
285
|
-
leadSuccessTitle: (
|
|
286
|
-
leadSuccessDescription: (
|
|
291
|
+
fields: ($ = e.leads) == null ? void 0 : $.fields,
|
|
292
|
+
leadTitle: (c = e.personalityQuiz.labels) == null ? void 0 : c.leadTitle,
|
|
293
|
+
leadDescription: (U = e.personalityQuiz.labels) == null ? void 0 : U.leadDescription,
|
|
294
|
+
leadCta: (R = e.personalityQuiz.labels) == null ? void 0 : R.leadCta,
|
|
295
|
+
leadSuccessTitle: (E = e.personalityQuiz.labels) == null ? void 0 : E.leadSuccessTitle,
|
|
296
|
+
leadSuccessDescription: (V = e.personalityQuiz.labels) == null ? void 0 : V.leadSuccessDescription,
|
|
287
297
|
consents: e.leadConsents
|
|
288
298
|
}
|
|
289
|
-
) : /* @__PURE__ */
|
|
290
|
-
a && /* @__PURE__ */ t(
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
299
|
+
) : /* @__PURE__ */ w(Re, { children: [
|
|
300
|
+
a && /* @__PURE__ */ t(nt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-sm)", children: /* @__PURE__ */ t("div", { css: he.imageBox, children: /* @__PURE__ */ t("img", { src: a, alt: "Question illustration", style: Ei }) }) }),
|
|
301
|
+
/* @__PURE__ */ w("div", { css: C ? he.questionBlock : he.question, children: [
|
|
302
|
+
/* @__PURE__ */ w("p", { css: he.steps, children: [
|
|
293
303
|
e.currentQuestion,
|
|
294
304
|
"/",
|
|
295
305
|
e.personalityQuiz.questions.length
|
|
296
306
|
] }),
|
|
297
|
-
/* @__PURE__ */ t("p", { css:
|
|
307
|
+
/* @__PURE__ */ t("p", { css: he.questionText, children: e.question.question })
|
|
298
308
|
] }),
|
|
299
309
|
/* @__PURE__ */ t(
|
|
300
|
-
|
|
310
|
+
Et,
|
|
301
311
|
{
|
|
302
312
|
options: e.question.options || [],
|
|
303
313
|
answerQuestion: e.answerQuestion,
|
|
304
314
|
selectedOption: e.selectedOption,
|
|
305
|
-
optionsLayout:
|
|
315
|
+
optionsLayout: C ? "column" : o ?? "row",
|
|
306
316
|
questionImage: a,
|
|
307
|
-
brandingColors: u
|
|
317
|
+
brandingColors: u,
|
|
318
|
+
expired: e.expired
|
|
308
319
|
}
|
|
309
320
|
)
|
|
310
321
|
] }) }),
|
|
311
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ w("div", { css: s ? he.footerMobile : he.footer, children: [
|
|
312
323
|
/* @__PURE__ */ t(
|
|
313
|
-
|
|
324
|
+
G,
|
|
314
325
|
{
|
|
315
|
-
brandingLogo:
|
|
316
|
-
textColor:
|
|
317
|
-
label: ((
|
|
318
|
-
primaryUrl: (
|
|
319
|
-
secondaryUrl: (
|
|
326
|
+
brandingLogo: h,
|
|
327
|
+
textColor: k.textColor,
|
|
328
|
+
label: ((J = e.personalityQuiz.labels) == null ? void 0 : J.sponsor) || null,
|
|
329
|
+
primaryUrl: (oe = (Y = e.personalityQuiz.branding) == null ? void 0 : Y.urls) == null ? void 0 : oe.primaryUrl,
|
|
330
|
+
secondaryUrl: (ce = (se = e.personalityQuiz.branding) == null ? void 0 : se.urls) == null ? void 0 : ce.secondaryUrl
|
|
320
331
|
}
|
|
321
332
|
),
|
|
322
333
|
e.applyConsentGate ? /* @__PURE__ */ t(
|
|
323
|
-
|
|
334
|
+
it,
|
|
324
335
|
{
|
|
325
336
|
onClick: e.startPlaying,
|
|
326
|
-
label: ((
|
|
337
|
+
label: ((ae = (me = e.consents) == null ? void 0 : me.labels) == null ? void 0 : ae.ctaLabel) || l("personalityQuiz.buttons.start"),
|
|
327
338
|
isSubmitting: e.isSubmitting,
|
|
328
|
-
primaryColor:
|
|
339
|
+
primaryColor: q,
|
|
329
340
|
showArrow: !0
|
|
330
341
|
}
|
|
331
|
-
) : !i && /* @__PURE__ */ t(
|
|
332
|
-
|
|
342
|
+
) : !i && /* @__PURE__ */ t(tt, { expired: !!e.expired, css: !s && y ? he.pushToEnd : void 0, children: /* @__PURE__ */ t(
|
|
343
|
+
Bi,
|
|
333
344
|
{
|
|
334
|
-
label:
|
|
335
|
-
primaryColor:
|
|
336
|
-
onPrimaryColor:
|
|
337
|
-
radius:
|
|
345
|
+
label: b,
|
|
346
|
+
primaryColor: q,
|
|
347
|
+
onPrimaryColor: p.palette.primary.onPrimary,
|
|
348
|
+
radius: d.customRadius.light.xl,
|
|
338
349
|
pushToEnd: !s && y,
|
|
339
|
-
disabled: e.selectedOption === null,
|
|
350
|
+
disabled: !!e.expired || e.selectedOption === null,
|
|
340
351
|
isLoading: e.isLoading,
|
|
341
352
|
onClick: e.handleNext,
|
|
342
|
-
endDecorator: /* @__PURE__ */ t(
|
|
353
|
+
endDecorator: /* @__PURE__ */ t(Qt, { children: /* @__PURE__ */ t(Tt, {}) })
|
|
343
354
|
}
|
|
344
|
-
)
|
|
355
|
+
) })
|
|
345
356
|
] })
|
|
346
357
|
]
|
|
347
358
|
}
|
|
348
359
|
);
|
|
349
|
-
},
|
|
350
|
-
root: n(
|
|
351
|
-
label: n(
|
|
360
|
+
}, ft = {
|
|
361
|
+
root: n(pi, { paddingBlock: "10px", paddingRight: "12px", paddingLeft: "16px" }),
|
|
362
|
+
label: n(vi),
|
|
352
363
|
// Joy's endDecorator: an 8px gap; icons sized and coloured like the label.
|
|
353
364
|
decorator: n({
|
|
354
365
|
display: "flex",
|
|
@@ -356,21 +367,21 @@ const Ai = (e, i) => {
|
|
|
356
367
|
"--Icon-fontSize": "1em",
|
|
357
368
|
"--Icon-color": "var(--fu-ucrc-primary-on-primary)"
|
|
358
369
|
})
|
|
359
|
-
},
|
|
370
|
+
}, Mi = { "--Icon-margin": "0 -4px 0 0" }, Gn = (e) => /* @__PURE__ */ w(
|
|
360
371
|
"button",
|
|
361
372
|
{
|
|
362
373
|
type: "button",
|
|
363
|
-
css:
|
|
374
|
+
css: ft.root,
|
|
364
375
|
style: { "--fu-ucrc-cta-bg": e.buttonColor },
|
|
365
|
-
disabled: e.isLoading || e.selectedOption === null,
|
|
376
|
+
disabled: e.disabled || e.isLoading || e.selectedOption === null,
|
|
366
377
|
onClick: e.onClick,
|
|
367
378
|
children: [
|
|
368
|
-
/* @__PURE__ */ t("p", { css:
|
|
369
|
-
e.endDecorator && /* @__PURE__ */ t("span", { css:
|
|
370
|
-
e.isLoading && /* @__PURE__ */ t(
|
|
379
|
+
/* @__PURE__ */ t("p", { css: ft.label, children: e.label }),
|
|
380
|
+
e.endDecorator && /* @__PURE__ */ t("span", { css: ft.decorator, style: Mi, children: e.endDecorator }),
|
|
381
|
+
e.isLoading && /* @__PURE__ */ t(On, { size: 20, thickness: 3 })
|
|
371
382
|
]
|
|
372
383
|
}
|
|
373
|
-
),
|
|
384
|
+
), nn = {
|
|
374
385
|
root: n({ display: "flex", justifyContent: "center", gap: "8px", paddingBlock: "var(--fu-ucrc-space-xs)" }),
|
|
375
386
|
step: n({
|
|
376
387
|
maxWidth: "82.67px",
|
|
@@ -381,19 +392,19 @@ const Ai = (e, i) => {
|
|
|
381
392
|
borderStyle: "solid",
|
|
382
393
|
transition: "background-color 0.3s ease"
|
|
383
394
|
})
|
|
384
|
-
},
|
|
385
|
-
const i =
|
|
386
|
-
const a =
|
|
395
|
+
}, Fi = (e) => {
|
|
396
|
+
const i = te(), r = i.colorSchemes.light, o = (d) => {
|
|
397
|
+
const a = d + 1;
|
|
387
398
|
return a < e.currentQuestion ? [r.palette.success.plainColor, r.palette.success.outlinedBorder] : a === e.currentQuestion ? [
|
|
388
399
|
e.brandingPrimaryColor || r.palette.primary.plainColor,
|
|
389
400
|
e.brandingPrimaryColor || r.palette.primary.outlinedBorder
|
|
390
401
|
] : [r.secondaryContainer, r.outlineEnabledBorder];
|
|
391
402
|
};
|
|
392
|
-
return /* @__PURE__ */ t("div", { css:
|
|
403
|
+
return /* @__PURE__ */ t("div", { css: nn.root, style: { "--fu-ucrc-pq-step-radius": i.customRadius.light.full }, children: Array.from({ length: e.personalityQuiz.questions.length }, (d, a) => {
|
|
393
404
|
const [l, s] = o(a);
|
|
394
|
-
return /* @__PURE__ */ t("div", { css:
|
|
405
|
+
return /* @__PURE__ */ t("div", { css: nn.step, style: { backgroundColor: l, borderColor: s } }, `step-${a + 1}`);
|
|
395
406
|
}) });
|
|
396
|
-
},
|
|
407
|
+
}, an = {
|
|
397
408
|
display: "flex",
|
|
398
409
|
width: "100%",
|
|
399
410
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
@@ -401,35 +412,35 @@ const Ai = (e, i) => {
|
|
|
401
412
|
overflow: "hidden",
|
|
402
413
|
background: "var(--fu-ucrc-surface)",
|
|
403
414
|
minHeight: "250px"
|
|
404
|
-
},
|
|
405
|
-
row: n({ ...
|
|
406
|
-
column: n({ ...
|
|
407
|
-
},
|
|
408
|
-
const r =
|
|
415
|
+
}, rn = {
|
|
416
|
+
row: n({ ...an, flexDirection: "row" }),
|
|
417
|
+
column: n({ ...an, flexDirection: "column" })
|
|
418
|
+
}, X = ({ children: e, brandingBorderColor: i }) => {
|
|
419
|
+
const r = Z();
|
|
409
420
|
return /* @__PURE__ */ t(
|
|
410
421
|
"div",
|
|
411
422
|
{
|
|
412
|
-
css: r ?
|
|
423
|
+
css: r ? rn.column : rn.row,
|
|
413
424
|
style: i ? { "--fu-ucrc-pq-card-border": i } : void 0,
|
|
414
425
|
children: e
|
|
415
426
|
}
|
|
416
427
|
);
|
|
417
|
-
},
|
|
428
|
+
}, Fe = { display: "flex", flexDirection: "column" }, _e = {
|
|
418
429
|
display: "flex",
|
|
419
430
|
alignItems: "center",
|
|
420
|
-
gap:
|
|
421
|
-
},
|
|
422
|
-
pagination: n({ ...
|
|
423
|
-
area: n({ ...
|
|
424
|
-
question: n({ ...
|
|
425
|
-
questionNarrow: n({ ...
|
|
431
|
+
gap: f("lg")
|
|
432
|
+
}, H = {
|
|
433
|
+
pagination: n({ ...Fe, gap: f("md"), paddingInline: f("md") }),
|
|
434
|
+
area: n({ ...Fe, padding: f("md") }),
|
|
435
|
+
question: n({ ...Fe, gap: f("md") }),
|
|
436
|
+
questionNarrow: n({ ...Fe, gap: f("lg") }),
|
|
426
437
|
content: n({
|
|
427
|
-
...
|
|
438
|
+
...Fe,
|
|
428
439
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
429
|
-
paddingInline:
|
|
430
|
-
paddingTop:
|
|
431
|
-
paddingBottom:
|
|
432
|
-
gap:
|
|
440
|
+
paddingInline: f("md"),
|
|
441
|
+
paddingTop: f("md"),
|
|
442
|
+
paddingBottom: f("lg"),
|
|
443
|
+
gap: f("md"),
|
|
433
444
|
backgroundColor: "var(--fu-ucrc-pq-content-bg)",
|
|
434
445
|
backdropFilter: "blur(4px)"
|
|
435
446
|
}),
|
|
@@ -439,7 +450,7 @@ const Ai = (e, i) => {
|
|
|
439
450
|
}),
|
|
440
451
|
textRow: n({ gap: "8px", display: "flex", justifyContent: "center" }),
|
|
441
452
|
text: n({
|
|
442
|
-
...
|
|
453
|
+
...ye,
|
|
443
454
|
unicodeBidi: "plaintext",
|
|
444
455
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
445
456
|
lineHeight: "150%",
|
|
@@ -449,185 +460,187 @@ const Ai = (e, i) => {
|
|
|
449
460
|
textAlign: "center",
|
|
450
461
|
color: "var(--fu-ucrc-pq-text)"
|
|
451
462
|
}),
|
|
452
|
-
footer: n({ ...
|
|
453
|
-
footerEnd: n({ ...
|
|
463
|
+
footer: n({ ..._e, justifyContent: "space-between" }),
|
|
464
|
+
footerEnd: n({ ..._e, justifyContent: "flex-end" }),
|
|
454
465
|
footerColumn: n({
|
|
455
|
-
...
|
|
466
|
+
..._e,
|
|
456
467
|
flexDirection: "column",
|
|
457
468
|
justifyContent: "space-between"
|
|
458
469
|
}),
|
|
459
470
|
footerColumnEnd: n({
|
|
460
|
-
...
|
|
471
|
+
..._e,
|
|
461
472
|
flexDirection: "column",
|
|
462
473
|
justifyContent: "flex-end"
|
|
463
474
|
}),
|
|
464
475
|
navigation: n({
|
|
465
476
|
display: "flex",
|
|
466
|
-
gap:
|
|
477
|
+
gap: f("md"),
|
|
467
478
|
justifyContent: "center",
|
|
468
479
|
alignItems: "center"
|
|
469
480
|
})
|
|
470
|
-
},
|
|
481
|
+
}, Hi = {
|
|
471
482
|
width: "100%",
|
|
472
483
|
height: "100%",
|
|
473
484
|
objectFit: "cover"
|
|
474
|
-
},
|
|
475
|
-
var
|
|
476
|
-
const [i, r] =
|
|
477
|
-
((
|
|
478
|
-
), { optionsLayout: o } =
|
|
485
|
+
}, Oi = (e) => {
|
|
486
|
+
var D, z, A, L, $, c;
|
|
487
|
+
const [i, r] = Je.useState(
|
|
488
|
+
((D = e.leads) == null ? void 0 : D.position) === "before" && e.personalityQuiz.authRequirement === "LEAD" && !e.expired
|
|
489
|
+
), { optionsLayout: o } = zt(wt), d = Ke(e.question.images), { t: a } = W(), l = Z(), s = oi(), C = ge("md"), y = re(), g = ((z = e.personalityQuiz.branding) == null ? void 0 : z.colors) || null, u = l ? ((A = e.personalityQuiz.branding) == null ? void 0 : A.images.mobileLogo) || ((L = e.personalityQuiz.branding) == null ? void 0 : L.images.mainLogo) || "" : (($ = e.personalityQuiz.branding) == null ? void 0 : $.images.mainLogo) || "", h = e.imagePosition || "left", m = be(
|
|
479
490
|
{
|
|
480
491
|
images: e.personalityQuiz.images,
|
|
481
492
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
482
493
|
},
|
|
483
|
-
|
|
484
|
-
),
|
|
485
|
-
(
|
|
486
|
-
),
|
|
487
|
-
"--fu-ucrc-pq-text":
|
|
488
|
-
"--fu-ucrc-pq-content-bg": `rgba(${
|
|
489
|
-
},
|
|
494
|
+
_.STANDARD
|
|
495
|
+
), x = e.currentQuestion === e.personalityQuiz.questions.length && (((c = e.leads) == null ? void 0 : c.position) === "after" || e.hasAfterConsents) ? a("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? a("personalityQuiz.buttons.finish") : a("personalityQuiz.buttons.next"), P = s || l && !!m, b = (g == null ? void 0 : g.contentColor) || y.textColor, k = We(
|
|
496
|
+
(g == null ? void 0 : g.backgroundColor) || y.surfaceVariant || ""
|
|
497
|
+
), p = (g == null ? void 0 : g.primaryColor) || y.palette.primary.plainColor, q = {
|
|
498
|
+
"--fu-ucrc-pq-text": b,
|
|
499
|
+
"--fu-ucrc-pq-content-bg": `rgba(${k ? k.replace(/[^\d,]/g, "") : ""}, 0.5)`
|
|
500
|
+
}, v = () => {
|
|
490
501
|
r(!1);
|
|
491
|
-
},
|
|
492
|
-
var
|
|
502
|
+
}, T = (U) => {
|
|
503
|
+
var R, E, V, J, Y;
|
|
493
504
|
return /* @__PURE__ */ t(
|
|
494
|
-
|
|
505
|
+
G,
|
|
495
506
|
{
|
|
496
507
|
brandingLogo: u,
|
|
497
|
-
textColor:
|
|
498
|
-
label: ((
|
|
499
|
-
primaryUrl: (
|
|
500
|
-
secondaryUrl: (
|
|
508
|
+
textColor: U,
|
|
509
|
+
label: ((R = e.personalityQuiz.labels) == null ? void 0 : R.sponsor) || null,
|
|
510
|
+
primaryUrl: (V = (E = e.personalityQuiz.branding) == null ? void 0 : E.urls) == null ? void 0 : V.primaryUrl,
|
|
511
|
+
secondaryUrl: (Y = (J = e.personalityQuiz.branding) == null ? void 0 : J.urls) == null ? void 0 : Y.secondaryUrl
|
|
501
512
|
}
|
|
502
513
|
);
|
|
503
|
-
},
|
|
504
|
-
var
|
|
505
|
-
return /* @__PURE__ */ t("div", { css:
|
|
506
|
-
/* @__PURE__ */ t("div", { css:
|
|
514
|
+
}, F = () => {
|
|
515
|
+
var U, R, E;
|
|
516
|
+
return /* @__PURE__ */ t("div", { css: H.area, style: q, children: /* @__PURE__ */ w("div", { css: C ? H.question : H.questionNarrow, children: [
|
|
517
|
+
/* @__PURE__ */ t("div", { css: H.content, children: /* @__PURE__ */ t(
|
|
507
518
|
Te,
|
|
508
519
|
{
|
|
509
520
|
consents: e.consents,
|
|
510
|
-
primaryColor:
|
|
511
|
-
textColor:
|
|
512
|
-
brandingUrls: (
|
|
521
|
+
primaryColor: p,
|
|
522
|
+
textColor: b,
|
|
523
|
+
brandingUrls: (U = e.personalityQuiz.branding) == null ? void 0 : U.urls,
|
|
513
524
|
align: "center"
|
|
514
525
|
}
|
|
515
526
|
) }),
|
|
516
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ w(
|
|
517
528
|
"div",
|
|
518
529
|
{
|
|
519
|
-
css:
|
|
530
|
+
css: P ? u ? H.footerColumn : H.footerColumnEnd : u ? H.footer : H.footerEnd,
|
|
520
531
|
children: [
|
|
521
|
-
u && !
|
|
522
|
-
/* @__PURE__ */ t("div", { css:
|
|
523
|
-
|
|
532
|
+
u && !P && T(b),
|
|
533
|
+
/* @__PURE__ */ t("div", { css: H.navigation, children: /* @__PURE__ */ t(
|
|
534
|
+
it,
|
|
524
535
|
{
|
|
525
536
|
onClick: e.startPlaying,
|
|
526
|
-
label: ((
|
|
537
|
+
label: ((E = (R = e.consents) == null ? void 0 : R.labels) == null ? void 0 : E.ctaLabel) || a("personalityQuiz.buttons.start"),
|
|
527
538
|
isSubmitting: e.isSubmitting,
|
|
528
|
-
primaryColor:
|
|
539
|
+
primaryColor: p,
|
|
529
540
|
showArrow: !0
|
|
530
541
|
}
|
|
531
542
|
) })
|
|
532
543
|
]
|
|
533
544
|
}
|
|
534
545
|
),
|
|
535
|
-
u &&
|
|
546
|
+
u && P && T(b)
|
|
536
547
|
] }) });
|
|
537
|
-
},
|
|
538
|
-
var
|
|
539
|
-
return /* @__PURE__ */ t("div", { css:
|
|
540
|
-
/* @__PURE__ */ t("div", { css:
|
|
548
|
+
}, Q = () => {
|
|
549
|
+
var U, R, E, V, J, Y, oe, se, ce, me, ae;
|
|
550
|
+
return /* @__PURE__ */ t("div", { css: H.area, style: q, children: /* @__PURE__ */ w("div", { css: C ? H.question : H.questionNarrow, children: [
|
|
551
|
+
/* @__PURE__ */ t("div", { css: H.content, children: /* @__PURE__ */ t(
|
|
541
552
|
Be,
|
|
542
553
|
{
|
|
543
554
|
sdk: e.sdk,
|
|
544
|
-
startGame:
|
|
555
|
+
startGame: v,
|
|
545
556
|
contentId: e.personalityQuiz.id,
|
|
546
557
|
contentName: e.personalityQuiz.title,
|
|
547
|
-
brandingColors: (
|
|
548
|
-
brandingUrls: (
|
|
549
|
-
campaignId: (
|
|
550
|
-
campaignName: (
|
|
551
|
-
fields: (
|
|
552
|
-
leadTitle: (
|
|
553
|
-
leadDescription: (
|
|
558
|
+
brandingColors: (U = e.personalityQuiz.branding) == null ? void 0 : U.colors,
|
|
559
|
+
brandingUrls: (R = e.personalityQuiz.branding) == null ? void 0 : R.urls,
|
|
560
|
+
campaignId: (E = e.leads) == null ? void 0 : E.campaignId,
|
|
561
|
+
campaignName: (V = e.leads) == null ? void 0 : V.campaignName,
|
|
562
|
+
fields: (J = e.leads) == null ? void 0 : J.fields,
|
|
563
|
+
leadTitle: (Y = e.personalityQuiz.labels) == null ? void 0 : Y.leadTitle,
|
|
564
|
+
leadDescription: (oe = e.personalityQuiz.labels) == null ? void 0 : oe.leadDescription,
|
|
554
565
|
leadCta: (se = e.personalityQuiz.labels) == null ? void 0 : se.leadCta,
|
|
555
|
-
leadSuccessTitle: (
|
|
556
|
-
leadSuccessDescription: (
|
|
557
|
-
syncWithProfile: (
|
|
566
|
+
leadSuccessTitle: (ce = e.personalityQuiz.labels) == null ? void 0 : ce.leadSuccessTitle,
|
|
567
|
+
leadSuccessDescription: (me = e.personalityQuiz.labels) == null ? void 0 : me.leadSuccessDescription,
|
|
568
|
+
syncWithProfile: (ae = e.leads) == null ? void 0 : ae.syncWithProfile,
|
|
558
569
|
consents: e.leadConsents
|
|
559
570
|
}
|
|
560
571
|
) }),
|
|
561
|
-
|
|
572
|
+
T(b)
|
|
562
573
|
] }) });
|
|
563
|
-
},
|
|
564
|
-
/* @__PURE__ */ t("div", { css:
|
|
565
|
-
|
|
574
|
+
}, S = () => /* @__PURE__ */ w(Re, { children: [
|
|
575
|
+
/* @__PURE__ */ t("div", { css: H.pagination, children: /* @__PURE__ */ t(
|
|
576
|
+
Fi,
|
|
566
577
|
{
|
|
567
578
|
personalityQuiz: e.personalityQuiz,
|
|
568
579
|
currentQuestion: e.currentQuestion,
|
|
569
580
|
userParticipation: e.userParticipation,
|
|
570
|
-
brandingPrimaryColor:
|
|
581
|
+
brandingPrimaryColor: g == null ? void 0 : g.primaryColor
|
|
571
582
|
}
|
|
572
583
|
) }),
|
|
573
|
-
/* @__PURE__ */ t("div", { css:
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
|
|
584
|
+
/* @__PURE__ */ t("div", { css: H.area, style: q, children: /* @__PURE__ */ w("div", { css: C ? H.question : H.questionNarrow, children: [
|
|
585
|
+
/* @__PURE__ */ w("div", { css: H.content, children: [
|
|
586
|
+
d && /* @__PURE__ */ t(nt, { ratio: "16/9", radius: "var(--fu-ucrc-radius-sm)", children: /* @__PURE__ */ t("div", { css: H.imageBox, children: /* @__PURE__ */ t(
|
|
576
587
|
"img",
|
|
577
588
|
{
|
|
578
|
-
src:
|
|
589
|
+
src: d,
|
|
579
590
|
alt: "Question illustration",
|
|
580
|
-
style:
|
|
591
|
+
style: Hi
|
|
581
592
|
}
|
|
582
593
|
) }) }),
|
|
583
|
-
/* @__PURE__ */ t("div", { css:
|
|
594
|
+
/* @__PURE__ */ t("div", { css: H.textRow, children: /* @__PURE__ */ t("p", { css: H.text, children: e.question.question }) }),
|
|
584
595
|
/* @__PURE__ */ t(
|
|
585
|
-
|
|
596
|
+
Et,
|
|
586
597
|
{
|
|
587
598
|
options: e.question.options || [],
|
|
588
599
|
answerQuestion: e.answerQuestion,
|
|
589
600
|
selectedOption: e.selectedOption,
|
|
590
601
|
optionsLayout: o ?? "twoByTwo",
|
|
591
|
-
questionImage:
|
|
592
|
-
brandingColors:
|
|
602
|
+
questionImage: d,
|
|
603
|
+
brandingColors: g,
|
|
604
|
+
expired: e.expired
|
|
593
605
|
}
|
|
594
606
|
)
|
|
595
607
|
] }),
|
|
596
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ w(
|
|
597
609
|
"div",
|
|
598
610
|
{
|
|
599
|
-
css:
|
|
611
|
+
css: P ? u ? H.footerColumn : H.footerColumnEnd : u ? H.footer : H.footerEnd,
|
|
600
612
|
children: [
|
|
601
|
-
u && !
|
|
602
|
-
/* @__PURE__ */ t("div", { css:
|
|
603
|
-
|
|
613
|
+
u && !P && T(b),
|
|
614
|
+
/* @__PURE__ */ t("div", { css: H.navigation, children: /* @__PURE__ */ t(tt, { expired: !!e.expired, children: /* @__PURE__ */ t(
|
|
615
|
+
Gn,
|
|
604
616
|
{
|
|
605
617
|
selectedOption: e.selectedOption,
|
|
606
|
-
endDecorator: /* @__PURE__ */ t(
|
|
607
|
-
label:
|
|
608
|
-
buttonColor:
|
|
618
|
+
endDecorator: /* @__PURE__ */ t(Qt, { children: /* @__PURE__ */ t(Tt, {}) }),
|
|
619
|
+
label: x,
|
|
620
|
+
buttonColor: p,
|
|
609
621
|
onClick: e.handleNext,
|
|
610
|
-
isLoading: e.isLoading
|
|
622
|
+
isLoading: e.isLoading,
|
|
623
|
+
disabled: e.expired
|
|
611
624
|
}
|
|
612
|
-
) })
|
|
625
|
+
) }) })
|
|
613
626
|
]
|
|
614
627
|
}
|
|
615
628
|
),
|
|
616
|
-
u &&
|
|
629
|
+
u && P && T(b)
|
|
617
630
|
] }) })
|
|
618
631
|
] });
|
|
619
|
-
return /* @__PURE__ */ t(
|
|
620
|
-
|
|
632
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (g == null ? void 0 : g.borderColor) || null, children: /* @__PURE__ */ t(
|
|
633
|
+
Ci,
|
|
621
634
|
{
|
|
622
635
|
entity: e.personalityQuiz,
|
|
623
636
|
headline: a("personalityQuiz.headline"),
|
|
624
|
-
finalImage:
|
|
625
|
-
imagePosition:
|
|
637
|
+
finalImage: m,
|
|
638
|
+
imagePosition: h,
|
|
626
639
|
rulesDisplay: e.rulesDisplay,
|
|
627
|
-
children: e.applyConsentGate ?
|
|
640
|
+
children: e.applyConsentGate ? F() : i ? Q() : S()
|
|
628
641
|
}
|
|
629
642
|
) });
|
|
630
|
-
},
|
|
643
|
+
}, bt = "var(--fu-ucrc-radius-sm)", on = {
|
|
631
644
|
margin: 0,
|
|
632
645
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
633
646
|
lineHeight: "150%",
|
|
@@ -635,150 +648,152 @@ const Ai = (e, i) => {
|
|
|
635
648
|
fontWeight: 500,
|
|
636
649
|
fontSize: "1.25em",
|
|
637
650
|
textAlign: "center"
|
|
638
|
-
},
|
|
651
|
+
}, de = {
|
|
639
652
|
questionArea: n({ width: "100%", justifyContent: "center", display: "flex", flexDirection: "column" }),
|
|
640
653
|
questionAreaContent: n({
|
|
641
|
-
padding:
|
|
654
|
+
padding: f("md"),
|
|
642
655
|
display: "flex",
|
|
643
656
|
flexDirection: "column",
|
|
644
657
|
justifyContent: "center",
|
|
645
|
-
gap:
|
|
658
|
+
gap: f("md")
|
|
646
659
|
}),
|
|
647
660
|
// Translucent panel over the card, from the branding background: `--fu-ucrc-pq-split-bg`.
|
|
648
661
|
panel: n({
|
|
649
|
-
padding:
|
|
650
|
-
gap:
|
|
662
|
+
padding: f("md"),
|
|
663
|
+
gap: f("md"),
|
|
651
664
|
display: "flex",
|
|
652
665
|
flexDirection: "column",
|
|
653
666
|
backdropFilter: "blur(4px)",
|
|
654
667
|
backgroundColor: "var(--fu-ucrc-pq-split-bg)",
|
|
655
|
-
borderRadius:
|
|
668
|
+
borderRadius: bt
|
|
656
669
|
}),
|
|
657
670
|
// Joy's `height: auto` lost to the AspectRatio's child rule.
|
|
658
|
-
questionImage: n({ borderRadius:
|
|
659
|
-
questionSection: n({ gap:
|
|
660
|
-
questionSteps: n(
|
|
661
|
-
questionText: n(
|
|
662
|
-
buttonFooter: n({ display: "flex", flexDirection: "column", gap:
|
|
663
|
-
presentedBy: n({ marginBottom:
|
|
664
|
-
},
|
|
665
|
-
var
|
|
666
|
-
const [i, r] =
|
|
667
|
-
((
|
|
668
|
-
), { optionsLayout: o } =
|
|
671
|
+
questionImage: n({ borderRadius: bt, overflow: "hidden" }),
|
|
672
|
+
questionSection: n({ gap: f("2xs"), display: "flex", flexDirection: "column", justifyContent: "center" }),
|
|
673
|
+
questionSteps: n(on, { color: "var(--fu-ucrc-pq-split-secondary)", opacity: "60%" }),
|
|
674
|
+
questionText: n(on, { unicodeBidi: "plaintext", color: "var(--fu-ucrc-text-color)" }),
|
|
675
|
+
buttonFooter: n({ display: "flex", flexDirection: "column", gap: f("lg") }),
|
|
676
|
+
presentedBy: n({ marginBottom: f("lg"), paddingInline: f("lg") })
|
|
677
|
+
}, Wi = { width: "100%", height: "100%", objectFit: "cover" }, Vi = (e) => {
|
|
678
|
+
var Q, S, D, z, A, L, $, c, U, R, E, V, J, Y, oe, se, ce, me, ae;
|
|
679
|
+
const [i, r] = Je.useState(
|
|
680
|
+
((Q = e.leads) == null ? void 0 : Q.position) === "before" && e.personalityQuiz.authRequirement === "LEAD" && !e.expired
|
|
681
|
+
), { optionsLayout: o } = zt(wt), d = te(), a = re(), l = Z(), s = kt(), C = ge("md"), y = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? Ie : Se, g = be(
|
|
669
682
|
{
|
|
670
683
|
images: e.personalityQuiz.images,
|
|
671
684
|
imagePlaceholder: y
|
|
672
685
|
},
|
|
673
|
-
|
|
674
|
-
), u =
|
|
675
|
-
"--fu-ucrc-pq-split-secondary": (
|
|
676
|
-
"--fu-ucrc-pq-split-bg": `rgba(${
|
|
677
|
-
},
|
|
686
|
+
_.SPLIT
|
|
687
|
+
), u = Ke(e.question.images), { t: h } = W(), m = ((S = e.personalityQuiz.branding) == null ? void 0 : S.colors) || null, x = l ? ((D = e.personalityQuiz.branding) == null ? void 0 : D.images.mobileLogo) || ((z = e.personalityQuiz.branding) == null ? void 0 : z.images.mainLogo) || "" : ((A = e.personalityQuiz.branding) == null ? void 0 : A.images.mainLogo) || "", P = e.currentQuestion === e.personalityQuiz.questions.length && (((L = e.leads) == null ? void 0 : L.position) === "after" || e.hasAfterConsents) ? h("personalityQuiz.buttons.continue") : e.currentQuestion === e.personalityQuiz.questions.length ? h("personalityQuiz.buttons.finish") : h("personalityQuiz.buttons.next"), b = a.textColor, k = (m == null ? void 0 : m.primaryColor) || ((c = ($ = a.palette) == null ? void 0 : $.primary) == null ? void 0 : c.plainColor), p = We((m == null ? void 0 : m.backgroundColor) || a.surfaceVariant || ""), q = {
|
|
688
|
+
"--fu-ucrc-pq-split-secondary": (m == null ? void 0 : m.contentColor) || b,
|
|
689
|
+
"--fu-ucrc-pq-split-bg": `rgba(${p ? p.replace(/[^\d,]/g, "") : ""}, 0.5)`
|
|
690
|
+
}, v = () => {
|
|
678
691
|
r(!1);
|
|
679
|
-
},
|
|
680
|
-
var Pe,
|
|
692
|
+
}, T = (ne) => {
|
|
693
|
+
var Pe, qe, Ee, ze, at;
|
|
681
694
|
return /* @__PURE__ */ t(
|
|
682
|
-
|
|
695
|
+
G,
|
|
683
696
|
{
|
|
684
|
-
brandingLogo:
|
|
685
|
-
textColor:
|
|
697
|
+
brandingLogo: x,
|
|
698
|
+
textColor: ne,
|
|
686
699
|
label: ((Pe = e.personalityQuiz.labels) == null ? void 0 : Pe.sponsor) || null,
|
|
687
|
-
primaryUrl: (
|
|
688
|
-
secondaryUrl: (
|
|
700
|
+
primaryUrl: (Ee = (qe = e.personalityQuiz.branding) == null ? void 0 : qe.urls) == null ? void 0 : Ee.primaryUrl,
|
|
701
|
+
secondaryUrl: (at = (ze = e.personalityQuiz.branding) == null ? void 0 : ze.urls) == null ? void 0 : at.secondaryUrl
|
|
689
702
|
}
|
|
690
703
|
);
|
|
691
|
-
},
|
|
692
|
-
var
|
|
693
|
-
return /* @__PURE__ */ t("div", { css:
|
|
704
|
+
}, F = () => {
|
|
705
|
+
var ne;
|
|
706
|
+
return /* @__PURE__ */ t("div", { css: de.panel, children: /* @__PURE__ */ t(
|
|
694
707
|
Te,
|
|
695
708
|
{
|
|
696
709
|
consents: e.consents,
|
|
697
|
-
primaryColor:
|
|
698
|
-
textColor:
|
|
699
|
-
brandingUrls: (
|
|
710
|
+
primaryColor: k,
|
|
711
|
+
textColor: b,
|
|
712
|
+
brandingUrls: (ne = e.personalityQuiz.branding) == null ? void 0 : ne.urls,
|
|
700
713
|
onSubmit: e.startPlaying,
|
|
701
714
|
isSubmitting: e.isSubmitting,
|
|
702
|
-
ctaLabel:
|
|
715
|
+
ctaLabel: h("personalityQuiz.buttons.start"),
|
|
703
716
|
align: "center",
|
|
704
717
|
showArrow: !0
|
|
705
718
|
}
|
|
706
719
|
) });
|
|
707
720
|
};
|
|
708
|
-
return /* @__PURE__ */
|
|
721
|
+
return /* @__PURE__ */ w(X, { brandingBorderColor: (m == null ? void 0 : m.borderColor) || null, children: [
|
|
709
722
|
/* @__PURE__ */ t(
|
|
710
|
-
|
|
723
|
+
Ii,
|
|
711
724
|
{
|
|
712
725
|
entity: e.personalityQuiz,
|
|
713
|
-
headline:
|
|
714
|
-
finalImage:
|
|
715
|
-
brandingLogo:
|
|
716
|
-
renderPresentedBy:
|
|
726
|
+
headline: h("personalityQuiz.headline"),
|
|
727
|
+
finalImage: g,
|
|
728
|
+
brandingLogo: x,
|
|
729
|
+
renderPresentedBy: T,
|
|
717
730
|
rulesDisplay: e.rulesDisplay,
|
|
718
|
-
children: /* @__PURE__ */ t("div", { css:
|
|
719
|
-
e.applyConsentGate ?
|
|
731
|
+
children: /* @__PURE__ */ t("div", { css: de.questionArea, style: q, children: /* @__PURE__ */ w("div", { css: de.questionAreaContent, children: [
|
|
732
|
+
e.applyConsentGate ? F() : i ? /* @__PURE__ */ t("div", { css: de.panel, children: /* @__PURE__ */ t(
|
|
720
733
|
Be,
|
|
721
734
|
{
|
|
722
735
|
sdk: e.sdk,
|
|
723
|
-
startGame:
|
|
736
|
+
startGame: v,
|
|
724
737
|
contentId: e.personalityQuiz.id,
|
|
725
738
|
contentName: e.personalityQuiz.title,
|
|
726
|
-
brandingColors: (
|
|
727
|
-
brandingUrls: (
|
|
728
|
-
campaignId: (
|
|
729
|
-
campaignName: (
|
|
730
|
-
fields: (
|
|
731
|
-
leadTitle: (
|
|
732
|
-
leadDescription: (
|
|
739
|
+
brandingColors: (U = e.personalityQuiz.branding) == null ? void 0 : U.colors,
|
|
740
|
+
brandingUrls: (R = e.personalityQuiz.branding) == null ? void 0 : R.urls,
|
|
741
|
+
campaignId: (E = e.leads) == null ? void 0 : E.campaignId,
|
|
742
|
+
campaignName: (V = e.leads) == null ? void 0 : V.campaignName,
|
|
743
|
+
fields: (J = e.leads) == null ? void 0 : J.fields,
|
|
744
|
+
leadTitle: (Y = e.personalityQuiz.labels) == null ? void 0 : Y.leadTitle,
|
|
745
|
+
leadDescription: (oe = e.personalityQuiz.labels) == null ? void 0 : oe.leadDescription,
|
|
733
746
|
leadCta: (se = e.personalityQuiz.labels) == null ? void 0 : se.leadCta,
|
|
734
|
-
leadSuccessTitle: (
|
|
735
|
-
leadSuccessDescription: (
|
|
736
|
-
syncWithProfile: (
|
|
747
|
+
leadSuccessTitle: (ce = e.personalityQuiz.labels) == null ? void 0 : ce.leadSuccessTitle,
|
|
748
|
+
leadSuccessDescription: (me = e.personalityQuiz.labels) == null ? void 0 : me.leadSuccessDescription,
|
|
749
|
+
syncWithProfile: (ae = e.leads) == null ? void 0 : ae.syncWithProfile,
|
|
737
750
|
consents: e.leadConsents
|
|
738
751
|
}
|
|
739
|
-
) }) : /* @__PURE__ */
|
|
740
|
-
u && /* @__PURE__ */ t(
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
/* @__PURE__ */
|
|
752
|
+
) }) : /* @__PURE__ */ w("div", { css: de.panel, children: [
|
|
753
|
+
u && /* @__PURE__ */ t(nt, { ratio: "16/9", radius: bt, children: /* @__PURE__ */ t("div", { css: de.questionImage, children: /* @__PURE__ */ t("img", { src: u, alt: "Question illustration", style: Wi }) }) }),
|
|
754
|
+
/* @__PURE__ */ w("div", { css: de.questionSection, children: [
|
|
755
|
+
/* @__PURE__ */ w("p", { css: de.questionSteps, children: [
|
|
743
756
|
e.currentQuestion,
|
|
744
757
|
"/",
|
|
745
758
|
e.personalityQuiz.questions.length
|
|
746
759
|
] }),
|
|
747
|
-
/* @__PURE__ */ t("p", { css:
|
|
760
|
+
/* @__PURE__ */ t("p", { css: de.questionText, children: e.question.question })
|
|
748
761
|
] }),
|
|
749
762
|
/* @__PURE__ */ t(
|
|
750
|
-
|
|
763
|
+
Et,
|
|
751
764
|
{
|
|
752
765
|
options: e.question.options || [],
|
|
753
766
|
answerQuestion: e.answerQuestion,
|
|
754
767
|
selectedOption: e.selectedOption,
|
|
755
768
|
optionsLayout: s ? "column" : o ?? "twoByTwo",
|
|
756
769
|
questionImage: u,
|
|
757
|
-
brandingColors:
|
|
770
|
+
brandingColors: m,
|
|
771
|
+
expired: e.expired
|
|
758
772
|
}
|
|
759
773
|
),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */ t(
|
|
762
|
-
|
|
774
|
+
/* @__PURE__ */ w("div", { css: de.buttonFooter, children: [
|
|
775
|
+
/* @__PURE__ */ t(tt, { expired: !!e.expired, children: /* @__PURE__ */ t(
|
|
776
|
+
Gn,
|
|
763
777
|
{
|
|
764
778
|
selectedOption: e.selectedOption,
|
|
765
|
-
endDecorator: /* @__PURE__ */ t(
|
|
766
|
-
label:
|
|
767
|
-
buttonColor:
|
|
779
|
+
endDecorator: /* @__PURE__ */ t(Qt, { children: /* @__PURE__ */ t(Tt, {}) }),
|
|
780
|
+
label: P,
|
|
781
|
+
buttonColor: k,
|
|
768
782
|
onClick: e.handleNext,
|
|
769
|
-
isLoading: e.isLoading
|
|
783
|
+
isLoading: e.isLoading,
|
|
784
|
+
disabled: e.expired
|
|
770
785
|
}
|
|
771
|
-
),
|
|
772
|
-
|
|
786
|
+
) }),
|
|
787
|
+
x && !s && !C && /* @__PURE__ */ t("div", { children: T((m == null ? void 0 : m.contentColor) || b) })
|
|
773
788
|
] })
|
|
774
789
|
] }),
|
|
775
|
-
i &&
|
|
790
|
+
i && x && l ? T((m == null ? void 0 : m.contentColor) || d.colorSchemes.dark.textColor) : null
|
|
776
791
|
] }) })
|
|
777
792
|
}
|
|
778
793
|
),
|
|
779
|
-
|
|
794
|
+
x && s && /* @__PURE__ */ t("div", { css: de.presentedBy, children: T((m == null ? void 0 : m.contentColor) || d.colorSchemes.dark.textColor) })
|
|
780
795
|
] });
|
|
781
|
-
},
|
|
796
|
+
}, ji = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_1048'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='24'%20height='24'%3e%3crect%20width='24'%20height='24'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_1048)'%3e%3cpath%20d='M12%2020.6254L5.20005%2016.9254V11.1254L1.36255%209.01289L12%203.21289L22.65%209.01464V16.7504H20.775V10.0504L18.8%2011.1254V16.9254L12%2020.6254ZM12%2012.6754L18.75%209.01289L12%205.36289L5.26255%209.01289L12%2012.6754ZM12%2018.4879L16.925%2015.8296V12.1129L12%2014.8254L7.07505%2012.1129V15.8296L12%2018.4879Z'%20fill='%23212121'/%3e%3c/g%3e%3c/svg%3e", Gi = "data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_504'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='25'%20height='24'%3e%3crect%20x='0.5'%20width='24'%20height='24'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_504)'%3e%3cpath%20d='M9.6875%206H11.5625V4.125H9.6875V6ZM13.4375%206V4.125H15.3125V6H13.4375ZM9.6875%2013.5V11.625H11.5625V13.5H9.6875ZM17.1875%209.75V7.875H19.0625V9.75H17.1875ZM17.1875%2013.5V11.625H19.0625V13.5H17.1875ZM13.4375%2013.5V11.625H15.3125V13.5H13.4375ZM17.1875%206V4.125H19.0625V6H17.1875ZM11.5625%207.875V6H13.4375V7.875H11.5625ZM5.9375%2019.825V4.125H7.8125V6H9.6875V7.875H7.8125V9.75H9.6875V11.625H7.8125V19.825H5.9375ZM15.3125%2011.625V9.75H17.1875V11.625H15.3125ZM11.5625%2011.625V9.75H13.4375V11.625H11.5625ZM9.6875%209.75V7.875H11.5625V9.75H9.6875ZM13.4375%209.75V7.875H15.3125V9.75H13.4375ZM15.3125%207.875V6H17.1875V7.875H15.3125Z'%20fill='%23212121'/%3e%3c/g%3e%3c/svg%3e", Ni = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_360'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='20'%3e%3crect%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_360)'%3e%3cpath%20d='M9.22917%2014.0625H10.7917V9.1875H9.22917V14.0625ZM9.99771%207.58333C10.2215%207.58333%2010.4097%207.50771%2010.5625%207.35646C10.7153%207.20507%2010.7917%207.01757%2010.7917%206.79396C10.7917%206.57021%2010.716%206.38194%2010.5648%206.22917C10.4134%206.07639%2010.2259%206%2010.0023%206C9.77854%206%209.59028%206.07563%209.4375%206.22688C9.28472%206.37826%209.20833%206.56576%209.20833%206.78938C9.20833%207.01313%209.28396%207.20139%209.43521%207.35417C9.5866%207.50694%209.7741%207.58333%209.99771%207.58333ZM10%2018.125C8.87625%2018.125%207.82021%2017.9114%206.83187%2017.4842C5.84368%2017.0568%204.98403%2016.4769%204.25292%2015.7446C3.52181%2015.0121%202.94271%2014.1522%202.51562%2013.1648C2.08854%2012.1776%201.875%2011.1226%201.875%2010C1.875%208.87625%202.08861%207.82021%202.51583%206.83187C2.94319%205.84368%203.52306%204.98403%204.25542%204.25292C4.98792%203.52181%205.84785%202.94271%206.83521%202.51562C7.82243%202.08854%208.87736%201.875%2010%201.875C11.1237%201.875%2012.1798%202.08861%2013.1681%202.51583C14.1563%202.94319%2015.016%203.52306%2015.7471%204.25542C16.4782%204.98792%2017.0573%205.84785%2017.4844%206.83521C17.9115%207.82243%2018.125%208.87736%2018.125%2010C18.125%2011.1237%2017.9114%2012.1798%2017.4842%2013.1681C17.0568%2014.1563%2016.4769%2015.016%2015.7446%2015.7471C15.0121%2016.4782%2014.1522%2017.0573%2013.1648%2017.4844C12.1776%2017.9115%2011.1226%2018.125%2010%2018.125ZM10%2016.5625C11.8264%2016.5625%2013.3767%2015.9253%2014.651%2014.651C15.9253%2013.3767%2016.5625%2011.8264%2016.5625%2010C16.5625%208.17361%2015.9253%206.62326%2014.651%205.34896C13.3767%204.07465%2011.8264%203.4375%2010%203.4375C8.17361%203.4375%206.62326%204.07465%205.34896%205.34896C4.07465%206.62326%203.4375%208.17361%203.4375%2010C3.4375%2011.8264%204.07465%2013.3767%205.34896%2014.651C6.62326%2015.9253%208.17361%2016.5625%2010%2016.5625Z'%20fill='%23212121'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e", ln = {
|
|
782
797
|
position: "relative",
|
|
783
798
|
boxSizing: "border-box",
|
|
784
799
|
display: "flex",
|
|
@@ -803,16 +818,16 @@ const Ai = (e, i) => {
|
|
|
803
818
|
opacity: "60%",
|
|
804
819
|
WebkitTapHighlightColor: "transparent",
|
|
805
820
|
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
|
|
806
|
-
},
|
|
807
|
-
off: n(
|
|
808
|
-
on: n(
|
|
821
|
+
}, sn = (e) => ({
|
|
822
|
+
off: n(ln, { "&:hover": { backgroundColor: e } }),
|
|
823
|
+
on: n(ln, {
|
|
809
824
|
backgroundColor: e,
|
|
810
825
|
borderBottom: "3px solid var(--fu-ucrc-pq-ssw-primary)",
|
|
811
826
|
opacity: "100%",
|
|
812
827
|
marginBottom: "-1px",
|
|
813
828
|
zIndex: 1
|
|
814
829
|
})
|
|
815
|
-
}),
|
|
830
|
+
}), cn = { margin: 0, alignSelf: "stretch", fontStyle: "normal" }, xt = { display: "flex", width: "24px", height: "24px", justifyContent: "center", alignItems: "center" }, dn = { ...xt, width: "20px", height: "20px" }, un = { filter: "brightness(0) invert(1)" }, gn = {
|
|
816
831
|
position: "relative",
|
|
817
832
|
zIndex: 1,
|
|
818
833
|
boxSizing: "border-box",
|
|
@@ -822,7 +837,7 @@ const Ai = (e, i) => {
|
|
|
822
837
|
// Joy's divider: the neutral channel at 20% (16% in dark mode).
|
|
823
838
|
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.2)",
|
|
824
839
|
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
825
|
-
},
|
|
840
|
+
}, yt = { flexGrow: 1, fontSize: "1em", padding: 0 }, mn = { flexGrow: 1, overflowY: "auto", fontSize: "1em", padding: "16px" }, j = {
|
|
826
841
|
root: n({ width: "100%" }),
|
|
827
842
|
// Joy's Tabs: it set the body font, 1.5 line height and neutral colour the panels inherit.
|
|
828
843
|
tabs: n({
|
|
@@ -837,9 +852,9 @@ const Ai = (e, i) => {
|
|
|
837
852
|
lineHeight: 1.5,
|
|
838
853
|
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
839
854
|
}),
|
|
840
|
-
list: n(
|
|
841
|
-
listMobile: n(
|
|
842
|
-
tab: { plain:
|
|
855
|
+
list: n(gn, { flexDirection: "row" }),
|
|
856
|
+
listMobile: n(gn, { flexDirection: "column" }),
|
|
857
|
+
tab: { plain: sn("#2121210A"), overlay: sn("#FAFAFA14") },
|
|
843
858
|
// Full width plus padding, so it overflows the tab's padding and is centred over it.
|
|
844
859
|
tabContent: n({
|
|
845
860
|
display: "flex",
|
|
@@ -850,8 +865,8 @@ const Ai = (e, i) => {
|
|
|
850
865
|
gap: "8px",
|
|
851
866
|
width: "100%"
|
|
852
867
|
}),
|
|
853
|
-
tabIcon: n(
|
|
854
|
-
tabIconInverted: n(
|
|
868
|
+
tabIcon: n(xt),
|
|
869
|
+
tabIconInverted: n(xt, un),
|
|
855
870
|
tabLabel: n({
|
|
856
871
|
margin: 0,
|
|
857
872
|
color: "var(--fu-ucrc-text-secondary)",
|
|
@@ -864,12 +879,12 @@ const Ai = (e, i) => {
|
|
|
864
879
|
textTransform: "uppercase"
|
|
865
880
|
}),
|
|
866
881
|
results: {
|
|
867
|
-
column: n(
|
|
868
|
-
row: n(
|
|
869
|
-
block: n(
|
|
882
|
+
column: n(yt, { display: "flex", flexDirection: "column" }),
|
|
883
|
+
row: n(yt, { display: "flex", flexDirection: "row" }),
|
|
884
|
+
block: n(yt)
|
|
870
885
|
},
|
|
871
|
-
answersPanel: n(
|
|
872
|
-
answersPanelMd: n(
|
|
886
|
+
answersPanel: n(mn),
|
|
887
|
+
answersPanelMd: n(mn, { maxHeight: "450px" }),
|
|
873
888
|
answers: n({
|
|
874
889
|
display: "flex",
|
|
875
890
|
flexDirection: "column",
|
|
@@ -905,7 +920,7 @@ const Ai = (e, i) => {
|
|
|
905
920
|
}),
|
|
906
921
|
single: n({ display: "flex", flexDirection: "column", alignItems: "flex-start", gap: "12px", alignSelf: "stretch" }),
|
|
907
922
|
question: n({ display: "flex", flexDirection: "column", alignItems: "flex-start", alignSelf: "stretch" }),
|
|
908
|
-
questionNumber: n(
|
|
923
|
+
questionNumber: n(cn, {
|
|
909
924
|
color: "var(--fu-ucrc-text-secondary)",
|
|
910
925
|
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
911
926
|
fontSize: "0.75em",
|
|
@@ -914,7 +929,7 @@ const Ai = (e, i) => {
|
|
|
914
929
|
letterSpacing: "1px",
|
|
915
930
|
textTransform: "uppercase"
|
|
916
931
|
}),
|
|
917
|
-
questionText: n(
|
|
932
|
+
questionText: n(cn, {
|
|
918
933
|
unicodeBidi: "plaintext",
|
|
919
934
|
color: "var(--fu-ucrc-text-primary)",
|
|
920
935
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
@@ -944,8 +959,8 @@ const Ai = (e, i) => {
|
|
|
944
959
|
alignItems: "flex-start",
|
|
945
960
|
alignSelf: "stretch"
|
|
946
961
|
}),
|
|
947
|
-
explanationIcon: n(
|
|
948
|
-
explanationIconInverted: n(
|
|
962
|
+
explanationIcon: n(dn),
|
|
963
|
+
explanationIconInverted: n(dn, un),
|
|
949
964
|
explanationText: n({
|
|
950
965
|
margin: 0,
|
|
951
966
|
unicodeBidi: "plaintext",
|
|
@@ -958,87 +973,87 @@ const Ai = (e, i) => {
|
|
|
958
973
|
lineHeight: "143%",
|
|
959
974
|
letterSpacing: "0.17px"
|
|
960
975
|
})
|
|
961
|
-
},
|
|
976
|
+
}, $t = ({
|
|
962
977
|
questions: e,
|
|
963
978
|
userParticipation: i,
|
|
964
979
|
resultsLayout: r,
|
|
965
980
|
isOverlayVariant: o,
|
|
966
|
-
children:
|
|
981
|
+
children: d,
|
|
967
982
|
brandingColors: a
|
|
968
983
|
}) => {
|
|
969
|
-
const [l, s] =
|
|
984
|
+
const [l, s] = M(0), [C, y] = M(0), g = ve([]), u = et(), h = Xe(), m = te(), { t: x } = W(), P = Z(), b = ge("md"), k = o || m.mode == "dark", p = o ? "overlay" : "plain", q = {
|
|
970
985
|
"--fu-ucrc-pq-ssw-primary": (a == null ? void 0 : a.primaryColor) || "var(--fu-ucrc-text-primary)",
|
|
971
986
|
// Kept as it was: any branding background picks the dark scheme's surface.
|
|
972
|
-
"--fu-ucrc-pq-ssw-content-bg": a != null && a.backgroundColor || o ?
|
|
973
|
-
},
|
|
974
|
-
{ icon:
|
|
975
|
-
{ icon:
|
|
976
|
-
],
|
|
987
|
+
"--fu-ucrc-pq-ssw-content-bg": a != null && a.backgroundColor || o ? m.colorSchemes.dark.surfaceVariant : "var(--fu-ucrc-surface-variant)"
|
|
988
|
+
}, v = [
|
|
989
|
+
{ icon: Gi, label: x("classicQuiz.results") },
|
|
990
|
+
{ icon: ji, label: x("classicQuiz.answers") }
|
|
991
|
+
], T = (z) => {
|
|
977
992
|
var L;
|
|
978
|
-
const A = (z +
|
|
979
|
-
y(A), (L =
|
|
980
|
-
},
|
|
981
|
-
const A =
|
|
982
|
-
|
|
983
|
-
},
|
|
993
|
+
const A = (z + v.length) % v.length;
|
|
994
|
+
y(A), (L = g.current[A]) == null || L.focus();
|
|
995
|
+
}, F = (z) => {
|
|
996
|
+
const A = h ? "ArrowLeft" : "ArrowRight", L = h ? "ArrowRight" : "ArrowLeft", $ = { [A]: C + 1, [L]: C - 1, Home: 0, End: v.length - 1 }[z.key];
|
|
997
|
+
$ !== void 0 && (z.preventDefault(), T($));
|
|
998
|
+
}, Q = (z) => {
|
|
984
999
|
var A;
|
|
985
|
-
s(z), y(z), (A =
|
|
986
|
-
},
|
|
987
|
-
var
|
|
988
|
-
const L = e.find((
|
|
989
|
-
return /* @__PURE__ */ t("div", { css:
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
|
|
1000
|
+
s(z), y(z), (A = g.current[z]) == null || A.focus();
|
|
1001
|
+
}, S = r === "responsive" ? b ? "row" : "column" : r, D = (z, A) => {
|
|
1002
|
+
var c;
|
|
1003
|
+
const L = e.find((U) => U.questionId === z.questionId), $ = (c = L == null ? void 0 : L.options.find((U) => U.optionId === z.optionId)) == null ? void 0 : c.option;
|
|
1004
|
+
return /* @__PURE__ */ t("div", { css: j.answer, children: /* @__PURE__ */ w("div", { css: j.single, children: [
|
|
1005
|
+
/* @__PURE__ */ w("div", { css: j.question, children: [
|
|
1006
|
+
/* @__PURE__ */ w("p", { css: j.questionNumber, children: [
|
|
1007
|
+
x("classicQuiz.question"),
|
|
993
1008
|
" ",
|
|
994
1009
|
A + 1
|
|
995
1010
|
] }),
|
|
996
|
-
/* @__PURE__ */ t("p", { css:
|
|
1011
|
+
/* @__PURE__ */ t("p", { css: j.questionText, children: L == null ? void 0 : L.question })
|
|
997
1012
|
] }),
|
|
998
|
-
/* @__PURE__ */ t("div", { css:
|
|
999
|
-
|
|
1013
|
+
/* @__PURE__ */ t("div", { css: j.outcome, children: /* @__PURE__ */ w("p", { css: j.yourAnswer, children: [
|
|
1014
|
+
x("classicQuiz.yourAnswer"),
|
|
1000
1015
|
" ",
|
|
1001
|
-
|
|
1016
|
+
$ && li($)
|
|
1002
1017
|
] }) }),
|
|
1003
|
-
(L == null ? void 0 : L.explanation) && /* @__PURE__ */
|
|
1018
|
+
(L == null ? void 0 : L.explanation) && /* @__PURE__ */ w("div", { css: j.explanation, children: [
|
|
1004
1019
|
/* @__PURE__ */ t(
|
|
1005
1020
|
"img",
|
|
1006
1021
|
{
|
|
1007
|
-
src:
|
|
1022
|
+
src: Ni,
|
|
1008
1023
|
alt: "explanation-icon",
|
|
1009
|
-
css: o ?
|
|
1024
|
+
css: o ? j.explanationIconInverted : j.explanationIcon
|
|
1010
1025
|
}
|
|
1011
1026
|
),
|
|
1012
|
-
/* @__PURE__ */ t("p", { css:
|
|
1027
|
+
/* @__PURE__ */ t("p", { css: j.explanationText, children: si(L.explanation) })
|
|
1013
1028
|
] })
|
|
1014
1029
|
] }) }, `user-answer-${z.questionId}`);
|
|
1015
1030
|
};
|
|
1016
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1031
|
+
return /* @__PURE__ */ t("div", { css: j.root, style: q, children: /* @__PURE__ */ w("div", { css: j.tabs, children: [
|
|
1017
1032
|
/* @__PURE__ */ t(
|
|
1018
1033
|
"div",
|
|
1019
1034
|
{
|
|
1020
1035
|
role: "tablist",
|
|
1021
1036
|
"aria-orientation": "horizontal",
|
|
1022
|
-
css:
|
|
1023
|
-
onKeyDown:
|
|
1024
|
-
children:
|
|
1037
|
+
css: P ? j.listMobile : j.list,
|
|
1038
|
+
onKeyDown: F,
|
|
1039
|
+
children: v.map((z, A) => /* @__PURE__ */ t(
|
|
1025
1040
|
"button",
|
|
1026
1041
|
{
|
|
1027
1042
|
ref: (L) => {
|
|
1028
|
-
|
|
1043
|
+
g.current[A] = L;
|
|
1029
1044
|
},
|
|
1030
1045
|
type: "button",
|
|
1031
1046
|
role: "tab",
|
|
1032
1047
|
id: `${u}-tab-${A}`,
|
|
1033
1048
|
"aria-selected": A === l,
|
|
1034
1049
|
"aria-controls": A === l ? `${u}-panel` : void 0,
|
|
1035
|
-
tabIndex: A ===
|
|
1036
|
-
css:
|
|
1037
|
-
onClick: () =>
|
|
1050
|
+
tabIndex: A === C ? 0 : -1,
|
|
1051
|
+
css: j.tab[p][A === l ? "on" : "off"],
|
|
1052
|
+
onClick: () => Q(A),
|
|
1038
1053
|
onFocus: () => y(A),
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */ t("img", { src: z.icon, alt: "answers-icon", css:
|
|
1041
|
-
/* @__PURE__ */ t("p", { css:
|
|
1054
|
+
children: /* @__PURE__ */ w("div", { css: j.tabContent, children: [
|
|
1055
|
+
/* @__PURE__ */ t("img", { src: z.icon, alt: "answers-icon", css: k ? j.tabIconInverted : j.tabIcon }),
|
|
1056
|
+
/* @__PURE__ */ t("p", { css: j.tabLabel, children: z.label })
|
|
1042
1057
|
] })
|
|
1043
1058
|
},
|
|
1044
1059
|
A
|
|
@@ -1051,27 +1066,27 @@ const Ai = (e, i) => {
|
|
|
1051
1066
|
role: "tabpanel",
|
|
1052
1067
|
id: `${u}-panel`,
|
|
1053
1068
|
"aria-labelledby": `${u}-tab-${l}`,
|
|
1054
|
-
css: l === 0 ?
|
|
1055
|
-
children: l === 0 ?
|
|
1069
|
+
css: l === 0 ? j.results[S] : b ? j.answersPanelMd : j.answersPanel,
|
|
1070
|
+
children: l === 0 ? d : /* @__PURE__ */ t("div", { css: j.answers, children: i.map((z, A) => D(z, A)) })
|
|
1056
1071
|
}
|
|
1057
1072
|
)
|
|
1058
1073
|
] }) });
|
|
1059
|
-
},
|
|
1060
|
-
const
|
|
1074
|
+
}, Mt = (e, i) => !i.personas || !e.personaResults ? [] : i.personas.map((o) => {
|
|
1075
|
+
const d = e.personaResults.find(
|
|
1061
1076
|
(a) => a.personaId === o.personaId
|
|
1062
1077
|
);
|
|
1063
|
-
return
|
|
1064
|
-
...
|
|
1078
|
+
return d ? {
|
|
1079
|
+
...d,
|
|
1065
1080
|
percent: o.percent
|
|
1066
1081
|
} : null;
|
|
1067
1082
|
}).filter(
|
|
1068
1083
|
(o) => o !== null && o.percent > 0
|
|
1069
|
-
).sort((o,
|
|
1084
|
+
).sort((o, d) => d.percent - o.percent), pt = "var(--fu-ucrc-pq-rt-primary)", Nn = "var(--fu-ucrc-pq-rt-surface)", fn = {
|
|
1070
1085
|
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1071
1086
|
fontSize: "1em",
|
|
1072
1087
|
lineHeight: 1.5,
|
|
1073
1088
|
color: "var(--fu-ucrc-neutral-plain-color)"
|
|
1074
|
-
},
|
|
1089
|
+
}, _n = {
|
|
1075
1090
|
position: "relative",
|
|
1076
1091
|
boxSizing: "border-box",
|
|
1077
1092
|
display: "flex",
|
|
@@ -1084,8 +1099,8 @@ const Ai = (e, i) => {
|
|
|
1084
1099
|
minWidth: 0,
|
|
1085
1100
|
minHeight: "auto",
|
|
1086
1101
|
margin: 0,
|
|
1087
|
-
paddingBlock:
|
|
1088
|
-
paddingInline:
|
|
1102
|
+
paddingBlock: f("sm"),
|
|
1103
|
+
paddingInline: f("md"),
|
|
1089
1104
|
border: "none",
|
|
1090
1105
|
borderBottom: "2px solid transparent",
|
|
1091
1106
|
borderRadius: 0,
|
|
@@ -1102,37 +1117,37 @@ const Ai = (e, i) => {
|
|
|
1102
1117
|
WebkitTapHighlightColor: "transparent",
|
|
1103
1118
|
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 },
|
|
1104
1119
|
"&:hover": { backgroundColor: "var(--fu-ucrc-surface-variant)", borderBottom: "2px solid var(--fu-ucrc-pq-rt-primary-25)" }
|
|
1105
|
-
},
|
|
1120
|
+
}, yn = {
|
|
1106
1121
|
borderTopLeftRadius: "var(--fu-ucrc-radius-md)",
|
|
1107
1122
|
borderTopRightRadius: "var(--fu-ucrc-pq-rt-first-end-radius)"
|
|
1108
|
-
},
|
|
1123
|
+
}, hn = n(_n, { "&:hover": { color: "var(--fu-ucrc-neutral-plain-hover-color)" } }), bn = n(_n, {
|
|
1109
1124
|
zIndex: 1,
|
|
1110
1125
|
backgroundColor: "var(--fu-ucrc-surface-variant)",
|
|
1111
|
-
borderBottom: `2px solid ${
|
|
1112
|
-
"&:hover": { borderBottom: `2px solid ${
|
|
1113
|
-
}),
|
|
1114
|
-
backgroundColor:
|
|
1126
|
+
borderBottom: `2px solid ${pt}`,
|
|
1127
|
+
"&:hover": { borderBottom: `2px solid ${pt}` }
|
|
1128
|
+
}), xn = {
|
|
1129
|
+
backgroundColor: Nn,
|
|
1115
1130
|
borderBottomLeftRadius: "var(--fu-ucrc-radius-md)",
|
|
1116
1131
|
borderBottomRightRadius: "var(--fu-ucrc-radius-md)",
|
|
1117
1132
|
backdropFilter: "blur(4px)",
|
|
1118
1133
|
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
1119
1134
|
borderTop: "none",
|
|
1120
1135
|
minHeight: "200px"
|
|
1121
|
-
},
|
|
1136
|
+
}, pn = { display: "flex", gap: f("lg") }, vn = {
|
|
1122
1137
|
width: "100%",
|
|
1123
1138
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1124
1139
|
backgroundSize: "cover",
|
|
1125
1140
|
backgroundPosition: "center",
|
|
1126
1141
|
backgroundRepeat: "no-repeat",
|
|
1127
1142
|
border: "1px solid rgba(255, 255, 255, 0.1)"
|
|
1128
|
-
},
|
|
1143
|
+
}, Cn = {
|
|
1129
1144
|
backgroundSize: "cover",
|
|
1130
1145
|
backgroundPosition: "center",
|
|
1131
1146
|
backgroundRepeat: "no-repeat",
|
|
1132
1147
|
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1133
1148
|
border: "1px solid rgba(0, 0, 0, 0.2)",
|
|
1134
1149
|
flexShrink: 0
|
|
1135
|
-
},
|
|
1150
|
+
}, O = {
|
|
1136
1151
|
wrapper: n({
|
|
1137
1152
|
display: "flex",
|
|
1138
1153
|
flexDirection: "column",
|
|
@@ -1141,15 +1156,15 @@ const Ai = (e, i) => {
|
|
|
1141
1156
|
alignSelf: "stretch",
|
|
1142
1157
|
width: "100%"
|
|
1143
1158
|
}),
|
|
1144
|
-
container: n({ padding:
|
|
1159
|
+
container: n({ padding: f("md"), marginTop: f("md") }),
|
|
1145
1160
|
// Joy's Tabs: the body font and neutral colour the panels inherit.
|
|
1146
1161
|
tabs: n({
|
|
1147
|
-
...
|
|
1162
|
+
...fn,
|
|
1148
1163
|
position: "relative",
|
|
1149
1164
|
display: "flex",
|
|
1150
1165
|
flexDirection: "column",
|
|
1151
1166
|
width: "100%",
|
|
1152
|
-
backgroundColor:
|
|
1167
|
+
backgroundColor: Nn,
|
|
1153
1168
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1154
1169
|
// Keeps the tab underline and the selected tab indicator from overshooting the rounded corners
|
|
1155
1170
|
overflow: "hidden"
|
|
@@ -1174,22 +1189,22 @@ const Ai = (e, i) => {
|
|
|
1174
1189
|
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
1175
1190
|
}),
|
|
1176
1191
|
tab: {
|
|
1177
|
-
off:
|
|
1178
|
-
on:
|
|
1179
|
-
firstOff: n(
|
|
1180
|
-
firstOn: n(
|
|
1192
|
+
off: hn,
|
|
1193
|
+
on: bn,
|
|
1194
|
+
firstOff: n(hn, { "&:hover": yn }),
|
|
1195
|
+
firstOn: n(bn, yn)
|
|
1181
1196
|
},
|
|
1182
1197
|
labelRow: n({
|
|
1183
1198
|
display: "flex",
|
|
1184
1199
|
justifyContent: "space-between",
|
|
1185
1200
|
alignItems: "center",
|
|
1186
1201
|
width: "100%",
|
|
1187
|
-
gap:
|
|
1202
|
+
gap: f("sm")
|
|
1188
1203
|
}),
|
|
1189
|
-
logo: n(
|
|
1190
|
-
logoMobile: n(
|
|
1204
|
+
logo: n(Cn, { width: "24px", height: "24px" }),
|
|
1205
|
+
logoMobile: n(Cn, { width: "20px", height: "20px" }),
|
|
1191
1206
|
label: n({
|
|
1192
|
-
...
|
|
1207
|
+
...ye,
|
|
1193
1208
|
fontSize: "inherit",
|
|
1194
1209
|
fontWeight: "inherit",
|
|
1195
1210
|
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
@@ -1200,10 +1215,10 @@ const Ai = (e, i) => {
|
|
|
1200
1215
|
}),
|
|
1201
1216
|
percentage: n({
|
|
1202
1217
|
margin: 0,
|
|
1203
|
-
backgroundColor:
|
|
1218
|
+
backgroundColor: pt,
|
|
1204
1219
|
color: "var(--fu-ucrc-pq-rt-on-primary)",
|
|
1205
|
-
paddingInline:
|
|
1206
|
-
paddingBlock:
|
|
1220
|
+
paddingInline: f("xs"),
|
|
1221
|
+
paddingBlock: f("3xs"),
|
|
1207
1222
|
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
1208
1223
|
fontSize: "0.75em",
|
|
1209
1224
|
fontWeight: 600,
|
|
@@ -1211,16 +1226,16 @@ const Ai = (e, i) => {
|
|
|
1211
1226
|
minWidth: "auto",
|
|
1212
1227
|
lineHeight: 1.2
|
|
1213
1228
|
}),
|
|
1214
|
-
panel: n({ ...
|
|
1229
|
+
panel: n({ ...fn, flexGrow: 1, padding: 0 }),
|
|
1215
1230
|
// Square top, no top border: the panel butts against the tab list underline.
|
|
1216
|
-
content: n(
|
|
1217
|
-
contentMobile: n(
|
|
1218
|
-
withImageRow: n(
|
|
1219
|
-
withImageColumn: n(
|
|
1231
|
+
content: n(xn, { padding: f("lg") }),
|
|
1232
|
+
contentMobile: n(xn, { padding: f("md") }),
|
|
1233
|
+
withImageRow: n(pn, { flexDirection: "row", alignItems: "flex-start" }),
|
|
1234
|
+
withImageColumn: n(pn, { flexDirection: "column", alignItems: "center" }),
|
|
1220
1235
|
imageSection: n({ flexShrink: 0, width: "200px", maxWidth: "300px" }),
|
|
1221
1236
|
imageSectionFull: n({ flexShrink: 0, width: "100%", maxWidth: "300px" }),
|
|
1222
|
-
personaImage: n(
|
|
1223
|
-
personaImageShort: n(
|
|
1237
|
+
personaImage: n(vn, { height: "200px" }),
|
|
1238
|
+
personaImageShort: n(vn, { height: "150px" }),
|
|
1224
1239
|
descriptionSection: n({ flex: 1, minWidth: 0 }),
|
|
1225
1240
|
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
1226
1241
|
description: n({
|
|
@@ -1230,91 +1245,91 @@ const Ai = (e, i) => {
|
|
|
1230
1245
|
fontSize: "0.95em",
|
|
1231
1246
|
opacity: 0.9
|
|
1232
1247
|
})
|
|
1233
|
-
},
|
|
1234
|
-
const [i, r] =
|
|
1248
|
+
}, _i = ({ personas: e }) => {
|
|
1249
|
+
const [i, r] = M(0), [o, d] = M(0), a = ve([]), l = et(), s = Xe(), C = te(), y = re(), g = Z(), u = ge("sm"), h = ge("md");
|
|
1235
1250
|
if (!e || e.length === 0)
|
|
1236
1251
|
return null;
|
|
1237
|
-
const
|
|
1238
|
-
"--fu-ucrc-pq-rt-primary":
|
|
1239
|
-
"--fu-ucrc-pq-rt-primary-25": `${
|
|
1240
|
-
"--fu-ucrc-pq-rt-surface": `rgba(${
|
|
1252
|
+
const m = y.palette.primary.plainColor, x = {
|
|
1253
|
+
"--fu-ucrc-pq-rt-primary": m,
|
|
1254
|
+
"--fu-ucrc-pq-rt-primary-25": `${m}40`,
|
|
1255
|
+
"--fu-ucrc-pq-rt-surface": `rgba(${We(y.surfaceVariant || "")}, 0.5)`,
|
|
1241
1256
|
// Joy read the light scheme's on-primary here, in both modes.
|
|
1242
|
-
"--fu-ucrc-pq-rt-on-primary":
|
|
1243
|
-
},
|
|
1244
|
-
"--fu-ucrc-pq-rt-tab-width":
|
|
1257
|
+
"--fu-ucrc-pq-rt-on-primary": C.colorSchemes.light.palette.primary.onPrimary
|
|
1258
|
+
}, P = {
|
|
1259
|
+
"--fu-ucrc-pq-rt-tab-width": h ? "auto" : "100%",
|
|
1245
1260
|
"--fu-ucrc-pq-rt-tab-size": u ? "0.9em" : "0.85em",
|
|
1246
|
-
"--fu-ucrc-pq-rt-first-end-radius":
|
|
1247
|
-
},
|
|
1248
|
-
var
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
},
|
|
1252
|
-
const
|
|
1253
|
-
z !== void 0 && (
|
|
1254
|
-
},
|
|
1255
|
-
var
|
|
1256
|
-
r(
|
|
1257
|
-
},
|
|
1258
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1261
|
+
"--fu-ucrc-pq-rt-first-end-radius": h ? "0px" : "var(--fu-ucrc-radius-md)"
|
|
1262
|
+
}, b = (Q) => Q && (g && Q.mobile || Q.main) || null, k = (Q) => {
|
|
1263
|
+
var D;
|
|
1264
|
+
const S = (Q + e.length) % e.length;
|
|
1265
|
+
d(S), (D = a.current[S]) == null || D.focus();
|
|
1266
|
+
}, p = (Q) => {
|
|
1267
|
+
const S = s ? "ArrowLeft" : "ArrowRight", D = s ? "ArrowRight" : "ArrowLeft", z = { [S]: o + 1, [D]: o - 1, Home: 0, End: e.length - 1 }[Q.key];
|
|
1268
|
+
z !== void 0 && (Q.preventDefault(), k(z));
|
|
1269
|
+
}, q = (Q) => {
|
|
1270
|
+
var S;
|
|
1271
|
+
r(Q), d(Q), (S = a.current[Q]) == null || S.focus();
|
|
1272
|
+
}, v = e[i], T = v ? b(v.images) : null, F = (Q) => /* @__PURE__ */ t("span", { css: O.description, dir: "auto", dangerouslySetInnerHTML: { __html: Q } });
|
|
1273
|
+
return /* @__PURE__ */ t("div", { css: O.wrapper, children: /* @__PURE__ */ t("div", { css: O.container, children: /* @__PURE__ */ w("div", { css: O.tabs, style: x, children: [
|
|
1259
1274
|
/* @__PURE__ */ t(
|
|
1260
1275
|
"div",
|
|
1261
1276
|
{
|
|
1262
1277
|
role: "tablist",
|
|
1263
1278
|
"aria-orientation": "horizontal",
|
|
1264
|
-
css:
|
|
1265
|
-
style:
|
|
1266
|
-
onKeyDown:
|
|
1267
|
-
children: e.map((
|
|
1268
|
-
var
|
|
1269
|
-
const
|
|
1279
|
+
css: O.list,
|
|
1280
|
+
style: P,
|
|
1281
|
+
onKeyDown: p,
|
|
1282
|
+
children: e.map((Q, S) => {
|
|
1283
|
+
var U, R;
|
|
1284
|
+
const D = S === 0, z = S === i, A = b(Q.images), L = ((U = Q.images) == null ? void 0 : U.mobile) || ((R = Q.images) == null ? void 0 : R.main), $ = g ? !!L : !!A && !Q.description, c = g ? L : A;
|
|
1270
1285
|
return /* @__PURE__ */ t(
|
|
1271
1286
|
"button",
|
|
1272
1287
|
{
|
|
1273
|
-
ref: (
|
|
1274
|
-
a.current[
|
|
1288
|
+
ref: (E) => {
|
|
1289
|
+
a.current[S] = E;
|
|
1275
1290
|
},
|
|
1276
1291
|
type: "button",
|
|
1277
1292
|
role: "tab",
|
|
1278
|
-
id: `${l}-tab-${
|
|
1293
|
+
id: `${l}-tab-${S}`,
|
|
1279
1294
|
"aria-selected": z,
|
|
1280
|
-
"aria-controls": z &&
|
|
1281
|
-
tabIndex:
|
|
1282
|
-
css:
|
|
1283
|
-
onClick: () =>
|
|
1284
|
-
onFocus: () =>
|
|
1285
|
-
children: /* @__PURE__ */
|
|
1286
|
-
|
|
1295
|
+
"aria-controls": z && Q.description ? `${l}-panel` : void 0,
|
|
1296
|
+
tabIndex: S === o ? 0 : -1,
|
|
1297
|
+
css: D ? z ? O.tab.firstOn : O.tab.firstOff : z ? O.tab.on : O.tab.off,
|
|
1298
|
+
onClick: () => q(S),
|
|
1299
|
+
onFocus: () => d(S),
|
|
1300
|
+
children: /* @__PURE__ */ w("div", { css: O.labelRow, children: [
|
|
1301
|
+
$ && c && /* @__PURE__ */ t(
|
|
1287
1302
|
"div",
|
|
1288
1303
|
{
|
|
1289
|
-
css:
|
|
1290
|
-
style: { backgroundImage: `url("${
|
|
1304
|
+
css: g ? O.logoMobile : O.logo,
|
|
1305
|
+
style: { backgroundImage: `url("${c}")` }
|
|
1291
1306
|
}
|
|
1292
1307
|
),
|
|
1293
|
-
/* @__PURE__ */ t("p", { css:
|
|
1294
|
-
/* @__PURE__ */
|
|
1295
|
-
|
|
1308
|
+
/* @__PURE__ */ t("p", { css: O.label, children: Q.title }),
|
|
1309
|
+
/* @__PURE__ */ w("p", { css: O.percentage, children: [
|
|
1310
|
+
Q.percent,
|
|
1296
1311
|
"%"
|
|
1297
1312
|
] })
|
|
1298
1313
|
] })
|
|
1299
1314
|
},
|
|
1300
|
-
|
|
1315
|
+
Q.personaId
|
|
1301
1316
|
);
|
|
1302
1317
|
})
|
|
1303
1318
|
}
|
|
1304
1319
|
),
|
|
1305
|
-
(
|
|
1306
|
-
/* @__PURE__ */ t("div", { css:
|
|
1320
|
+
(v == null ? void 0 : v.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${l}-panel`, "aria-labelledby": `${l}-tab-${i}`, css: O.panel, children: /* @__PURE__ */ t("div", { css: g ? O.contentMobile : O.content, children: T && !g ? /* @__PURE__ */ w("div", { css: h ? O.withImageRow : O.withImageColumn, children: [
|
|
1321
|
+
/* @__PURE__ */ t("div", { css: h ? O.imageSection : O.imageSectionFull, children: /* @__PURE__ */ t(
|
|
1307
1322
|
"div",
|
|
1308
1323
|
{
|
|
1309
|
-
css:
|
|
1310
|
-
style: { backgroundImage: `url("${
|
|
1324
|
+
css: h ? O.personaImage : O.personaImageShort,
|
|
1325
|
+
style: { backgroundImage: `url("${T}")` }
|
|
1311
1326
|
}
|
|
1312
1327
|
) }),
|
|
1313
|
-
/* @__PURE__ */ t("div", { css:
|
|
1314
|
-
] }) : /* @__PURE__ */ t("div", { css:
|
|
1328
|
+
/* @__PURE__ */ t("div", { css: O.descriptionSection, children: F(v.description) })
|
|
1329
|
+
] }) : /* @__PURE__ */ t("div", { css: O.descriptionOnly, children: F(v.description) }) }) })
|
|
1315
1330
|
] }) }) });
|
|
1316
|
-
},
|
|
1317
|
-
...
|
|
1331
|
+
}, Yn = "var(--fu-ucrc-text-primary)", vt = { display: "flex", justifyContent: "center", alignItems: "center" }, In = {
|
|
1332
|
+
...ye,
|
|
1318
1333
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1319
1334
|
fontSize: "0.8125em",
|
|
1320
1335
|
fontStyle: "normal",
|
|
@@ -1322,87 +1337,89 @@ const Ai = (e, i) => {
|
|
|
1322
1337
|
lineHeight: "22px",
|
|
1323
1338
|
letterSpacing: "0.46px",
|
|
1324
1339
|
textTransform: "uppercase"
|
|
1325
|
-
},
|
|
1326
|
-
...
|
|
1340
|
+
}, Sn = {
|
|
1341
|
+
...vt,
|
|
1327
1342
|
flexDirection: "column",
|
|
1328
|
-
paddingBlock:
|
|
1329
|
-
paddingInline:
|
|
1343
|
+
paddingBlock: f("xs"),
|
|
1344
|
+
paddingInline: f("md"),
|
|
1330
1345
|
gap: "8px",
|
|
1331
1346
|
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
1332
1347
|
// Joy's solidColor (common.white) is not in the theme snapshot.
|
|
1333
1348
|
color: "var(--fu-ucrc-primary-solid-color, #fff)",
|
|
1334
1349
|
fontSize: "0.8125em"
|
|
1335
|
-
},
|
|
1336
|
-
main: n({ flex: "1", display: "flex", flexDirection: "column", padding:
|
|
1337
|
-
chanceGame: n({ padding:
|
|
1338
|
-
buttonsRow: n(
|
|
1339
|
-
buttonsColumn: n(
|
|
1340
|
-
buttonsEnd: n(
|
|
1341
|
-
buttonsCenter: n(
|
|
1342
|
-
playAgain: n(
|
|
1350
|
+
}, Zn = { display: "flex", alignItems: "center", paddingInline: f("md") }, zn = { ...Zn, justifyContent: "space-between", gap: f("lg") }, wn = { ...Zn, gap: f("md") }, le = {
|
|
1351
|
+
main: n({ flex: "1", display: "flex", flexDirection: "column", padding: f("md"), gap: f("md") }),
|
|
1352
|
+
chanceGame: n({ padding: f("md") }),
|
|
1353
|
+
buttonsRow: n(zn, { flexDirection: "row" }),
|
|
1354
|
+
buttonsColumn: n(zn, { flexDirection: "column-reverse" }),
|
|
1355
|
+
buttonsEnd: n(wn, { justifyContent: "flex-end" }),
|
|
1356
|
+
buttonsCenter: n(wn, { justifyContent: "center" }),
|
|
1357
|
+
playAgain: n(Ce, Sn, {
|
|
1343
1358
|
border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-pq-ss-primary)",
|
|
1344
1359
|
backgroundColor: "var(--fu-ucrc-pq-ss-bg)",
|
|
1345
1360
|
"&:hover": { backgroundColor: "var(--fu-ucrc-on-surface)", borderColor: "var(--fu-ucrc-pq-ss-primary)" }
|
|
1346
1361
|
}),
|
|
1347
|
-
playAgainContent: n({ ...
|
|
1348
|
-
playAgainText: n({ ...
|
|
1349
|
-
additionalCta: n(
|
|
1362
|
+
playAgainContent: n({ ...vt, gap: "8px", alignSelf: "stretch" }),
|
|
1363
|
+
playAgainText: n({ ...In, textAlign: "center", color: Yn }),
|
|
1364
|
+
additionalCta: n(Ce, Sn, {
|
|
1350
1365
|
border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-secondary-container)",
|
|
1351
1366
|
backgroundColor: "var(--fu-ucrc-secondary-container)",
|
|
1352
1367
|
"&:hover": { opacity: 0.9 },
|
|
1353
|
-
"& > div": { ...
|
|
1354
|
-
"& p": { ...
|
|
1368
|
+
"& > div": { ...vt, gap: "8px" },
|
|
1369
|
+
"& p": { ...In, color: "var(--fu-ucrc-pq-ss-secondary)" }
|
|
1355
1370
|
}),
|
|
1356
1371
|
wrapperRow: n({ display: "flex", flexDirection: "row", width: "100%" }),
|
|
1357
1372
|
wrapperColumn: n({ display: "flex", flexDirection: "column", width: "100%" })
|
|
1358
|
-
},
|
|
1373
|
+
}, Yi = {
|
|
1359
1374
|
display: "flex",
|
|
1360
1375
|
width: "16px",
|
|
1361
1376
|
height: "16px",
|
|
1362
1377
|
justifyContent: "flex-end",
|
|
1363
1378
|
alignItems: "center",
|
|
1364
|
-
color:
|
|
1365
|
-
},
|
|
1366
|
-
var
|
|
1367
|
-
const i = re(), r =
|
|
1379
|
+
color: Yn
|
|
1380
|
+
}, Zi = (e) => {
|
|
1381
|
+
var m, x, P, b, k, p, q, v, T;
|
|
1382
|
+
const i = re(), r = be(
|
|
1368
1383
|
{
|
|
1369
1384
|
images: e.personalityQuiz.images,
|
|
1370
1385
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
1371
1386
|
},
|
|
1372
|
-
|
|
1373
|
-
), { t: o } =
|
|
1387
|
+
_.STANDARD
|
|
1388
|
+
), { t: o } = W(), d = ge("md"), a = ((m = e.personalityQuiz.branding) == null ? void 0 : m.colors) || null, l = Z() ? ((x = e.personalityQuiz.branding) == null ? void 0 : x.images.mobileLogo) || ((P = e.personalityQuiz.branding) == null ? void 0 : P.images.mainLogo) || "" : ((b = e.personalityQuiz.branding) == null ? void 0 : b.images.mainLogo) || "", s = e.imagePosition || "left", C = (a == null ? void 0 : a.contentColor) || i.textColor, y = {
|
|
1374
1389
|
"--fu-ucrc-pq-ss-primary": (a == null ? void 0 : a.primaryColor) || i.palette.primary.plainColor,
|
|
1375
1390
|
"--fu-ucrc-pq-ss-secondary": (a == null ? void 0 : a.secondaryColor) || i.textSecondary,
|
|
1376
1391
|
"--fu-ucrc-pq-ss-bg": (a == null ? void 0 : a.backgroundColor) || i.surface
|
|
1377
|
-
},
|
|
1378
|
-
var
|
|
1379
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1380
|
-
/* @__PURE__ */ t(
|
|
1381
|
-
e.chanceGameContent && /* @__PURE__ */ t("div", { css:
|
|
1382
|
-
(l || e.additionalCTA !== void 0 || !e.maxAttemptsReached) && /* @__PURE__ */
|
|
1392
|
+
}, g = Mt(e.personalityQuiz, e.summary), u = () => {
|
|
1393
|
+
var F, Q, S, D, z, A, L, $, c, U;
|
|
1394
|
+
return /* @__PURE__ */ t("div", { css: le.main, style: y, children: e.summary.personalityQuizId ? /* @__PURE__ */ w(Re, { children: [
|
|
1395
|
+
/* @__PURE__ */ t(_i, { personas: g }),
|
|
1396
|
+
e.chanceGameContent && /* @__PURE__ */ t("div", { css: le.chanceGame, children: e.chanceGameContent }),
|
|
1397
|
+
(l || e.additionalCTA !== void 0 || !e.maxAttemptsReached) && /* @__PURE__ */ w(
|
|
1383
1398
|
"div",
|
|
1384
1399
|
{
|
|
1385
|
-
css: l ?
|
|
1400
|
+
css: l ? d ? le.buttonsRow : le.buttonsColumn : d ? le.buttonsEnd : le.buttonsCenter,
|
|
1386
1401
|
children: [
|
|
1387
1402
|
l && /* @__PURE__ */ t(
|
|
1388
|
-
|
|
1403
|
+
G,
|
|
1389
1404
|
{
|
|
1390
1405
|
brandingLogo: l,
|
|
1391
|
-
textColor:
|
|
1392
|
-
label: ((
|
|
1406
|
+
textColor: C,
|
|
1407
|
+
label: ((F = e.personalityQuiz.labels) == null ? void 0 : F.sponsor) || null,
|
|
1408
|
+
primaryUrl: (S = (Q = e.personalityQuiz.branding) == null ? void 0 : Q.urls) == null ? void 0 : S.primaryUrl,
|
|
1409
|
+
secondaryUrl: (z = (D = e.personalityQuiz.branding) == null ? void 0 : D.urls) == null ? void 0 : z.secondaryUrl
|
|
1393
1410
|
}
|
|
1394
1411
|
),
|
|
1395
|
-
/* @__PURE__ */ t(
|
|
1396
|
-
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css:
|
|
1397
|
-
/* @__PURE__ */ t(
|
|
1398
|
-
/* @__PURE__ */ t("p", { css:
|
|
1412
|
+
/* @__PURE__ */ t(At, { additionalCTA: e.additionalCTA, css: le.additionalCta }),
|
|
1413
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: le.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ w("div", { css: le.playAgainContent, children: [
|
|
1414
|
+
/* @__PURE__ */ t(Bt, { style: Yi }),
|
|
1415
|
+
/* @__PURE__ */ t("p", { css: le.playAgainText, children: o("personalityQuiz.buttons.playAgain") })
|
|
1399
1416
|
] }) })
|
|
1400
1417
|
]
|
|
1401
1418
|
}
|
|
1402
1419
|
)
|
|
1403
|
-
] }) : /* @__PURE__ */
|
|
1420
|
+
] }) : /* @__PURE__ */ w(Re, { children: [
|
|
1404
1421
|
/* @__PURE__ */ t(
|
|
1405
|
-
|
|
1422
|
+
Pt,
|
|
1406
1423
|
{
|
|
1407
1424
|
variant: "error",
|
|
1408
1425
|
title: o("common.authentication.accessRequired"),
|
|
@@ -1410,26 +1427,40 @@ const Ai = (e, i) => {
|
|
|
1410
1427
|
}
|
|
1411
1428
|
),
|
|
1412
1429
|
l ? /* @__PURE__ */ t(
|
|
1413
|
-
|
|
1430
|
+
G,
|
|
1414
1431
|
{
|
|
1415
1432
|
brandingLogo: l,
|
|
1416
|
-
textColor:
|
|
1417
|
-
label: ((
|
|
1433
|
+
textColor: C,
|
|
1434
|
+
label: ((A = e.personalityQuiz.labels) == null ? void 0 : A.sponsor) || null,
|
|
1435
|
+
primaryUrl: ($ = (L = e.personalityQuiz.branding) == null ? void 0 : L.urls) == null ? void 0 : $.primaryUrl,
|
|
1436
|
+
secondaryUrl: (U = (c = e.personalityQuiz.branding) == null ? void 0 : c.urls) == null ? void 0 : U.secondaryUrl
|
|
1418
1437
|
}
|
|
1419
1438
|
) : null
|
|
1420
1439
|
] }) });
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1440
|
+
}, h = /* @__PURE__ */ t(
|
|
1441
|
+
Si,
|
|
1442
|
+
{
|
|
1443
|
+
finalImage: r,
|
|
1444
|
+
imagePosition: s,
|
|
1445
|
+
imageClickUrl: $n(
|
|
1446
|
+
(p = (k = e.personalityQuiz.branding) == null ? void 0 : k.urls) == null ? void 0 : p.primaryUrl,
|
|
1447
|
+
(v = (q = e.personalityQuiz.branding) == null ? void 0 : q.urls) == null ? void 0 : v.secondaryUrl,
|
|
1448
|
+
"image"
|
|
1449
|
+
),
|
|
1450
|
+
children: u()
|
|
1451
|
+
}
|
|
1452
|
+
);
|
|
1453
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (a == null ? void 0 : a.borderColor) || null, children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
1454
|
+
$t,
|
|
1424
1455
|
{
|
|
1425
1456
|
questions: e.personalityQuiz.questions,
|
|
1426
1457
|
userParticipation: e.summary.questions,
|
|
1427
|
-
brandingColors: (
|
|
1458
|
+
brandingColors: (T = e.personalityQuiz.branding) == null ? void 0 : T.colors,
|
|
1428
1459
|
resultsLayout: "responsive",
|
|
1429
|
-
children: /* @__PURE__ */ t("div", { css:
|
|
1460
|
+
children: /* @__PURE__ */ t("div", { css: d ? le.wrapperRow : le.wrapperColumn, children: h })
|
|
1430
1461
|
}
|
|
1431
|
-
) :
|
|
1432
|
-
},
|
|
1462
|
+
) : h });
|
|
1463
|
+
}, Ct = "var(--fu-ucrc-pq-srt-surface)", Ki = "var(--fu-ucrc-pq-srt-primary)", Kn = {
|
|
1433
1464
|
position: "relative",
|
|
1434
1465
|
boxSizing: "border-box",
|
|
1435
1466
|
display: "flex",
|
|
@@ -1443,8 +1474,8 @@ const Ai = (e, i) => {
|
|
|
1443
1474
|
minWidth: 0,
|
|
1444
1475
|
minHeight: "auto",
|
|
1445
1476
|
margin: 0,
|
|
1446
|
-
paddingBlock:
|
|
1447
|
-
paddingInline:
|
|
1477
|
+
paddingBlock: f("sm"),
|
|
1478
|
+
paddingInline: f("md"),
|
|
1448
1479
|
font: "inherit",
|
|
1449
1480
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
1450
1481
|
fontWeight: 500,
|
|
@@ -1461,30 +1492,30 @@ const Ai = (e, i) => {
|
|
|
1461
1492
|
cursor: "pointer",
|
|
1462
1493
|
WebkitTapHighlightColor: "transparent",
|
|
1463
1494
|
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 }
|
|
1464
|
-
},
|
|
1465
|
-
...
|
|
1495
|
+
}, kn = {
|
|
1496
|
+
...Kn,
|
|
1466
1497
|
"&:hover": {
|
|
1467
1498
|
backgroundColor: "var(--fu-ucrc-neutral-plain-hover-bg)",
|
|
1468
1499
|
color: "var(--fu-ucrc-neutral-plain-hover-color)",
|
|
1469
1500
|
borderRight: "2px solid var(--fu-ucrc-pq-srt-hover-edge)"
|
|
1470
1501
|
},
|
|
1471
1502
|
"&:active": { backgroundColor: "var(--fu-ucrc-neutral-plain-active-bg)" }
|
|
1472
|
-
},
|
|
1473
|
-
...
|
|
1503
|
+
}, Qn = {
|
|
1504
|
+
...Kn,
|
|
1474
1505
|
zIndex: 1,
|
|
1475
|
-
backgroundColor:
|
|
1506
|
+
backgroundColor: Ct,
|
|
1476
1507
|
borderRight: "2px solid var(--fu-ucrc-pq-srt-edge)",
|
|
1477
1508
|
borderBottom: "2px solid var(--fu-ucrc-pq-srt-edge)",
|
|
1478
1509
|
color: "var(--fu-ucrc-text-primary)",
|
|
1479
1510
|
fontWeight: 600
|
|
1480
|
-
},
|
|
1511
|
+
}, Xi = { "&:hover": { borderTopLeftRadius: "var(--fu-ucrc-radius-sm)" } }, An = {
|
|
1481
1512
|
backgroundSize: "cover",
|
|
1482
1513
|
backgroundPosition: "center",
|
|
1483
1514
|
backgroundRepeat: "no-repeat",
|
|
1484
1515
|
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1485
1516
|
border: "1px solid rgba(0, 0, 0, 0.2)",
|
|
1486
1517
|
flexShrink: 0
|
|
1487
|
-
},
|
|
1518
|
+
}, ee = {
|
|
1488
1519
|
contentWrapper: n({
|
|
1489
1520
|
display: "flex",
|
|
1490
1521
|
flexDirection: "column",
|
|
@@ -1499,7 +1530,7 @@ const Ai = (e, i) => {
|
|
|
1499
1530
|
display: "flex",
|
|
1500
1531
|
flexDirection: "column",
|
|
1501
1532
|
width: "100%",
|
|
1502
|
-
backgroundColor:
|
|
1533
|
+
backgroundColor: Ct,
|
|
1503
1534
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1504
1535
|
fontFamily: "var(--fu-ucrc-font-body)",
|
|
1505
1536
|
fontSize: "1em",
|
|
@@ -1522,21 +1553,21 @@ const Ai = (e, i) => {
|
|
|
1522
1553
|
".dark &": { boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)" }
|
|
1523
1554
|
}),
|
|
1524
1555
|
tab: {
|
|
1525
|
-
off: n(
|
|
1526
|
-
on: n(
|
|
1527
|
-
firstOff: n(
|
|
1528
|
-
firstOn: n(
|
|
1556
|
+
off: n(kn),
|
|
1557
|
+
on: n(Qn),
|
|
1558
|
+
firstOff: n(kn, Xi),
|
|
1559
|
+
firstOn: n(Qn, { borderTopLeftRadius: "var(--fu-ucrc-radius-sm)" })
|
|
1529
1560
|
},
|
|
1530
1561
|
labelRow: n({
|
|
1531
1562
|
display: "flex",
|
|
1532
1563
|
justifyContent: "space-between",
|
|
1533
1564
|
alignItems: "center",
|
|
1534
1565
|
width: "100%",
|
|
1535
|
-
gap:
|
|
1566
|
+
gap: f("sm")
|
|
1536
1567
|
}),
|
|
1537
|
-
logo: n(
|
|
1538
|
-
logoMobile: n(
|
|
1539
|
-
label: n(
|
|
1568
|
+
logo: n(An, { width: "24px", height: "24px" }),
|
|
1569
|
+
logoMobile: n(An, { width: "20px", height: "20px" }),
|
|
1570
|
+
label: n(ye, {
|
|
1540
1571
|
fontSize: "inherit",
|
|
1541
1572
|
fontWeight: "inherit",
|
|
1542
1573
|
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
@@ -1546,11 +1577,11 @@ const Ai = (e, i) => {
|
|
|
1546
1577
|
flex: 1
|
|
1547
1578
|
}),
|
|
1548
1579
|
// Always the light scheme's on-primary, as before.
|
|
1549
|
-
percentage: n(
|
|
1550
|
-
backgroundColor:
|
|
1580
|
+
percentage: n(ye, {
|
|
1581
|
+
backgroundColor: Ki,
|
|
1551
1582
|
color: "var(--fu-ucrc-pq-srt-on-primary)",
|
|
1552
|
-
paddingInline:
|
|
1553
|
-
paddingBlock:
|
|
1583
|
+
paddingInline: f("xs"),
|
|
1584
|
+
paddingBlock: f("3xs"),
|
|
1554
1585
|
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
1555
1586
|
fontSize: "0.75em",
|
|
1556
1587
|
fontWeight: 600,
|
|
@@ -1560,112 +1591,112 @@ const Ai = (e, i) => {
|
|
|
1560
1591
|
}),
|
|
1561
1592
|
panel: n({ flexGrow: 1, fontSize: "1em", padding: 0 }),
|
|
1562
1593
|
content: n({
|
|
1563
|
-
backgroundColor:
|
|
1594
|
+
backgroundColor: Ct,
|
|
1564
1595
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1565
|
-
padding:
|
|
1596
|
+
padding: f("lg"),
|
|
1566
1597
|
backdropFilter: "blur(4px)",
|
|
1567
1598
|
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
1568
1599
|
minHeight: "200px"
|
|
1569
1600
|
}),
|
|
1570
1601
|
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
1571
1602
|
description: n({ color: "var(--fu-ucrc-text-color)", fontFamily: "var(--fu-ucrc-font-primary)", lineHeight: 1.6 })
|
|
1572
|
-
},
|
|
1573
|
-
const [r, o] =
|
|
1603
|
+
}, Ji = ({ personas: e, brandingColors: i }) => {
|
|
1604
|
+
const [r, o] = M(0), [d, a] = M(0), l = ve([]), s = et(), C = Xe(), y = te(), g = re(), u = Z();
|
|
1574
1605
|
if (!e || e.length === 0)
|
|
1575
1606
|
return null;
|
|
1576
|
-
const
|
|
1577
|
-
"--fu-ucrc-pq-srt-surface": `rgba(${
|
|
1578
|
-
"--fu-ucrc-pq-srt-primary":
|
|
1607
|
+
const h = (i == null ? void 0 : i.primaryColor) || g.palette.primary.plainColor, m = {
|
|
1608
|
+
"--fu-ucrc-pq-srt-surface": `rgba(${We(g.surfaceVariant || "")}, 0.5)`,
|
|
1609
|
+
"--fu-ucrc-pq-srt-primary": h,
|
|
1579
1610
|
"--fu-ucrc-pq-srt-on-primary": y.colorSchemes.light.palette.primary.onPrimary,
|
|
1580
1611
|
// Hex alpha suffixes on the primary, as before.
|
|
1581
|
-
"--fu-ucrc-pq-srt-line": `${
|
|
1582
|
-
"--fu-ucrc-pq-srt-hover-edge": `${
|
|
1583
|
-
"--fu-ucrc-pq-srt-edge": `${
|
|
1584
|
-
},
|
|
1585
|
-
var
|
|
1586
|
-
const
|
|
1587
|
-
a(
|
|
1588
|
-
},
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
},
|
|
1592
|
-
return /* @__PURE__ */ t("div", { css:
|
|
1593
|
-
/* @__PURE__ */ t("div", { role: "tablist", "aria-orientation": "horizontal", css:
|
|
1594
|
-
const
|
|
1612
|
+
"--fu-ucrc-pq-srt-line": `${h}20`,
|
|
1613
|
+
"--fu-ucrc-pq-srt-hover-edge": `${h}40`,
|
|
1614
|
+
"--fu-ucrc-pq-srt-edge": `${h}80`
|
|
1615
|
+
}, x = (k) => {
|
|
1616
|
+
var q;
|
|
1617
|
+
const p = (k + e.length) % e.length;
|
|
1618
|
+
a(p), (q = l.current[p]) == null || q.focus();
|
|
1619
|
+
}, P = (k) => {
|
|
1620
|
+
const p = C ? "ArrowLeft" : "ArrowRight", q = C ? "ArrowRight" : "ArrowLeft", v = { [p]: d + 1, [q]: d - 1, Home: 0, End: e.length - 1 }[k.key];
|
|
1621
|
+
v !== void 0 && (k.preventDefault(), x(v));
|
|
1622
|
+
}, b = e[r];
|
|
1623
|
+
return /* @__PURE__ */ t("div", { css: ee.contentWrapper, style: m, children: /* @__PURE__ */ w("div", { css: ee.tabs, children: [
|
|
1624
|
+
/* @__PURE__ */ t("div", { role: "tablist", "aria-orientation": "horizontal", css: ee.list, onKeyDown: P, children: e.map((k, p) => {
|
|
1625
|
+
const q = p === r, v = k.images, T = u && (v == null ? void 0 : v.mobile) || (v == null ? void 0 : v.main), F = (v == null ? void 0 : v.mobile) || T;
|
|
1595
1626
|
return /* @__PURE__ */ t(
|
|
1596
1627
|
"button",
|
|
1597
1628
|
{
|
|
1598
|
-
ref: (
|
|
1599
|
-
l.current[
|
|
1629
|
+
ref: (Q) => {
|
|
1630
|
+
l.current[p] = Q;
|
|
1600
1631
|
},
|
|
1601
1632
|
type: "button",
|
|
1602
1633
|
role: "tab",
|
|
1603
|
-
id: `${s}-tab-${
|
|
1604
|
-
"aria-selected":
|
|
1605
|
-
"aria-controls":
|
|
1606
|
-
tabIndex:
|
|
1607
|
-
css:
|
|
1634
|
+
id: `${s}-tab-${p}`,
|
|
1635
|
+
"aria-selected": q,
|
|
1636
|
+
"aria-controls": q && k.description ? `${s}-panel` : void 0,
|
|
1637
|
+
tabIndex: p === d ? 0 : -1,
|
|
1638
|
+
css: p === 0 ? q ? ee.tab.firstOn : ee.tab.firstOff : q ? ee.tab.on : ee.tab.off,
|
|
1608
1639
|
onClick: () => {
|
|
1609
|
-
o(
|
|
1640
|
+
o(p), a(p);
|
|
1610
1641
|
},
|
|
1611
|
-
onFocus: () => a(
|
|
1612
|
-
children: /* @__PURE__ */
|
|
1613
|
-
|
|
1642
|
+
onFocus: () => a(p),
|
|
1643
|
+
children: /* @__PURE__ */ w("div", { css: ee.labelRow, children: [
|
|
1644
|
+
T && F && /* @__PURE__ */ t(
|
|
1614
1645
|
"div",
|
|
1615
1646
|
{
|
|
1616
|
-
css: u ?
|
|
1617
|
-
style: { backgroundImage: `url("${
|
|
1647
|
+
css: u ? ee.logoMobile : ee.logo,
|
|
1648
|
+
style: { backgroundImage: `url("${F}")` }
|
|
1618
1649
|
}
|
|
1619
1650
|
),
|
|
1620
|
-
/* @__PURE__ */ t("p", { css:
|
|
1621
|
-
/* @__PURE__ */
|
|
1622
|
-
|
|
1651
|
+
/* @__PURE__ */ t("p", { css: ee.label, children: k.title }),
|
|
1652
|
+
/* @__PURE__ */ w("p", { css: ee.percentage, children: [
|
|
1653
|
+
k.percent,
|
|
1623
1654
|
"%"
|
|
1624
1655
|
] })
|
|
1625
1656
|
] })
|
|
1626
1657
|
},
|
|
1627
|
-
|
|
1658
|
+
k.personaId
|
|
1628
1659
|
);
|
|
1629
1660
|
}) }),
|
|
1630
|
-
(
|
|
1661
|
+
(b == null ? void 0 : b.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${s}-panel`, "aria-labelledby": `${s}-tab-${r}`, css: ee.panel, children: /* @__PURE__ */ t("div", { css: ee.content, children: /* @__PURE__ */ t("div", { css: ee.descriptionOnly, children: /* @__PURE__ */ t("span", { css: ee.description, dir: "auto", dangerouslySetInnerHTML: { __html: b.description } }) }) }) })
|
|
1631
1662
|
] }) });
|
|
1632
|
-
},
|
|
1663
|
+
}, Ye = "var(--fu-ucrc-text-primary)", Xn = "var(--fu-ucrc-font-primary)", Pn = {
|
|
1633
1664
|
margin: 0,
|
|
1634
|
-
fontFamily:
|
|
1665
|
+
fontFamily: Xn,
|
|
1635
1666
|
fontSize: "0.9375em",
|
|
1636
1667
|
fontStyle: "normal",
|
|
1637
1668
|
fontWeight: 500,
|
|
1638
1669
|
lineHeight: "22px",
|
|
1639
1670
|
letterSpacing: "0.46px",
|
|
1640
1671
|
textTransform: "uppercase"
|
|
1641
|
-
},
|
|
1672
|
+
}, qn = {
|
|
1642
1673
|
display: "flex",
|
|
1643
|
-
paddingBlock:
|
|
1674
|
+
paddingBlock: f("xs"),
|
|
1644
1675
|
flexDirection: "column",
|
|
1645
1676
|
justifyContent: "center",
|
|
1646
1677
|
alignItems: "center",
|
|
1647
1678
|
gap: "8px",
|
|
1648
1679
|
borderRadius: "var(--fu-ucrc-radius-xl)",
|
|
1649
1680
|
fontSize: "0.9375em"
|
|
1650
|
-
},
|
|
1681
|
+
}, Ln = {
|
|
1651
1682
|
display: "flex",
|
|
1652
1683
|
flexDirection: "column",
|
|
1653
1684
|
justifyContent: "center",
|
|
1654
1685
|
alignItems: "center"
|
|
1655
|
-
},
|
|
1686
|
+
}, Dn = { display: "flex", flexDirection: "column", justifyContent: "center" }, ie = {
|
|
1656
1687
|
questionAreaContent: n({
|
|
1657
|
-
padding:
|
|
1688
|
+
padding: f("lg"),
|
|
1658
1689
|
display: "flex",
|
|
1659
1690
|
flexDirection: "column",
|
|
1660
1691
|
justifyContent: "center",
|
|
1661
|
-
gap:
|
|
1692
|
+
gap: f("lg"),
|
|
1662
1693
|
flex: 1,
|
|
1663
1694
|
height: "100%"
|
|
1664
1695
|
}),
|
|
1665
1696
|
// Translucent panel, from the branding background: `--fu-ucrc-pq-split-bg` on the root.
|
|
1666
1697
|
ctaPanel: n({
|
|
1667
|
-
padding:
|
|
1668
|
-
gap:
|
|
1698
|
+
padding: f("lg"),
|
|
1699
|
+
gap: f("lg"),
|
|
1669
1700
|
display: "flex",
|
|
1670
1701
|
flexDirection: "column",
|
|
1671
1702
|
backdropFilter: "blur(4px)",
|
|
@@ -1673,13 +1704,13 @@ const Ai = (e, i) => {
|
|
|
1673
1704
|
borderRadius: "var(--fu-ucrc-radius-sm)"
|
|
1674
1705
|
}),
|
|
1675
1706
|
ctaContainer: n({ display: "flex", flexDirection: "column", alignItems: "center" }),
|
|
1676
|
-
ctaContentWrapper: n(
|
|
1677
|
-
ctaContentWrapperTight: n(
|
|
1707
|
+
ctaContentWrapper: n(Ln, { gap: f("lg") }),
|
|
1708
|
+
ctaContentWrapperTight: n(Ln, { gap: 0 }),
|
|
1678
1709
|
thanks: n({
|
|
1679
1710
|
margin: 0,
|
|
1680
|
-
color:
|
|
1711
|
+
color: Ye,
|
|
1681
1712
|
textAlign: "center",
|
|
1682
|
-
fontFamily:
|
|
1713
|
+
fontFamily: Xn,
|
|
1683
1714
|
fontSize: "1.25em",
|
|
1684
1715
|
fontStyle: "normal",
|
|
1685
1716
|
fontWeight: 500,
|
|
@@ -1687,9 +1718,9 @@ const Ai = (e, i) => {
|
|
|
1687
1718
|
letterSpacing: "0.15px"
|
|
1688
1719
|
}),
|
|
1689
1720
|
buttons: n({ display: "flex", flexDirection: "column", gap: "16px" }),
|
|
1690
|
-
playAgain: n(
|
|
1721
|
+
playAgain: n(Ce, qn, {
|
|
1691
1722
|
paddingInline: "16px",
|
|
1692
|
-
color:
|
|
1723
|
+
color: Ye,
|
|
1693
1724
|
backgroundColor: "var(--fu-ucrc-surface)",
|
|
1694
1725
|
"&:hover": { backgroundColor: "var(--fu-ucrc-on-surface)" }
|
|
1695
1726
|
}),
|
|
@@ -1700,80 +1731,89 @@ const Ai = (e, i) => {
|
|
|
1700
1731
|
gap: "8px",
|
|
1701
1732
|
alignSelf: "stretch"
|
|
1702
1733
|
}),
|
|
1703
|
-
playAgainLabel: n(
|
|
1734
|
+
playAgainLabel: n(Pn, { color: Ye, textAlign: "center" }),
|
|
1704
1735
|
// Joy's solid colour (common.white) stays on the button; the label takes the secondary colour.
|
|
1705
|
-
additional: n(
|
|
1706
|
-
paddingInline:
|
|
1736
|
+
additional: n(Ce, qn, {
|
|
1737
|
+
paddingInline: f("md"),
|
|
1707
1738
|
color: "#fff",
|
|
1708
1739
|
backgroundColor: "var(--fu-ucrc-secondary-container)",
|
|
1709
1740
|
"&:hover": { opacity: 0.9 },
|
|
1710
1741
|
"& > div": { display: "flex", justifyContent: "center", alignItems: "center", gap: "8px" },
|
|
1711
|
-
"& p": { ...
|
|
1742
|
+
"& p": { ...Pn, color: "var(--fu-ucrc-pq-split-secondary)" }
|
|
1712
1743
|
}),
|
|
1713
1744
|
alertArea: {
|
|
1714
|
-
stacked: n(
|
|
1715
|
-
side: n(
|
|
1745
|
+
stacked: n(Dn, { flex: "1", width: "100%", minWidth: "100%", maxWidth: "100%" }),
|
|
1746
|
+
side: n(Dn, { flex: "0 0 50%", width: "50%", minWidth: "50%", maxWidth: "50%" })
|
|
1716
1747
|
},
|
|
1717
|
-
alertWrapper: n({ padding:
|
|
1718
|
-
},
|
|
1748
|
+
alertWrapper: n({ padding: f("lg") })
|
|
1749
|
+
}, ea = {
|
|
1719
1750
|
display: "flex",
|
|
1720
1751
|
width: "16px",
|
|
1721
1752
|
height: "16px",
|
|
1722
1753
|
justifyContent: "flex-end",
|
|
1723
1754
|
alignItems: "center",
|
|
1724
|
-
color:
|
|
1725
|
-
},
|
|
1726
|
-
var
|
|
1727
|
-
const i =
|
|
1755
|
+
color: Ye
|
|
1756
|
+
}, ta = (e) => {
|
|
1757
|
+
var k, p, q, v, T, F, Q, S, D, z;
|
|
1758
|
+
const i = te(), r = re(), { t: o } = W(), d = Z(), a = kt(), l = ge("lg"), s = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : d ? Ie : Se, C = be(
|
|
1728
1759
|
{
|
|
1729
1760
|
images: e.personalityQuiz.images,
|
|
1730
1761
|
imagePlaceholder: s
|
|
1731
1762
|
},
|
|
1732
|
-
|
|
1733
|
-
), y = ((
|
|
1734
|
-
"--fu-ucrc-pq-split-bg": `rgba(${
|
|
1763
|
+
_.SPLIT
|
|
1764
|
+
), y = ((k = e.personalityQuiz.branding) == null ? void 0 : k.colors) || null, g = (y == null ? void 0 : y.backgroundColor) || r.surfaceVariant, u = r.textColor, h = d ? ((p = e.personalityQuiz.branding) == null ? void 0 : p.images.mobileLogo) || ((q = e.personalityQuiz.branding) == null ? void 0 : q.images.mainLogo) || "" : ((v = e.personalityQuiz.branding) == null ? void 0 : v.images.mainLogo) || "", m = {
|
|
1765
|
+
"--fu-ucrc-pq-split-bg": `rgba(${g ? We(g || "").replace(/[^\d,]/g, "") : ""}, 0.5)`,
|
|
1735
1766
|
"--fu-ucrc-pq-split-secondary": (y == null ? void 0 : y.secondaryColor) || r.textSecondary
|
|
1736
|
-
},
|
|
1737
|
-
|
|
1767
|
+
}, x = Mt(e.personalityQuiz, e.summary), P = !a && h ? /* @__PURE__ */ t(
|
|
1768
|
+
G,
|
|
1738
1769
|
{
|
|
1739
|
-
brandingLogo:
|
|
1770
|
+
brandingLogo: h,
|
|
1740
1771
|
textColor: (y == null ? void 0 : y.contentColor) || i.colorSchemes.dark.textColor,
|
|
1741
|
-
label: ((
|
|
1772
|
+
label: ((T = e.personalityQuiz.labels) == null ? void 0 : T.sponsor) || null,
|
|
1773
|
+
primaryUrl: (Q = (F = e.personalityQuiz.branding) == null ? void 0 : F.urls) == null ? void 0 : Q.primaryUrl,
|
|
1774
|
+
secondaryUrl: (D = (S = e.personalityQuiz.branding) == null ? void 0 : S.urls) == null ? void 0 : D.secondaryUrl
|
|
1742
1775
|
}
|
|
1743
|
-
) : null,
|
|
1744
|
-
var
|
|
1776
|
+
) : null, b = (A) => {
|
|
1777
|
+
var L, $, c, U, R, E, V, J, Y;
|
|
1745
1778
|
return /* @__PURE__ */ t(
|
|
1746
|
-
|
|
1779
|
+
zi,
|
|
1747
1780
|
{
|
|
1748
1781
|
entity: e.personalityQuiz,
|
|
1749
1782
|
headline: o("personalityQuiz.headline"),
|
|
1750
|
-
finalImage:
|
|
1751
|
-
brandingContent:
|
|
1752
|
-
isTabulated:
|
|
1783
|
+
finalImage: C,
|
|
1784
|
+
brandingContent: P,
|
|
1785
|
+
isTabulated: A,
|
|
1753
1786
|
alwaysShowImage: !1,
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
(
|
|
1787
|
+
imageClickUrl: $n(
|
|
1788
|
+
($ = (L = e.personalityQuiz.branding) == null ? void 0 : L.urls) == null ? void 0 : $.primaryUrl,
|
|
1789
|
+
(U = (c = e.personalityQuiz.branding) == null ? void 0 : c.urls) == null ? void 0 : U.secondaryUrl,
|
|
1790
|
+
"image"
|
|
1791
|
+
),
|
|
1792
|
+
children: e.summary.personalityQuizId ? /* @__PURE__ */ w("div", { css: ie.questionAreaContent, style: m, children: [
|
|
1793
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(Ji, { personas: x, brandingColors: y }) }),
|
|
1794
|
+
(!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t("div", { id: "desktop-thanks", css: ie.ctaPanel, children: /* @__PURE__ */ t("div", { css: ie.ctaContainer, children: /* @__PURE__ */ w("div", { css: e.maxAttemptsReached ? ie.ctaContentWrapperTight : ie.ctaContentWrapper, children: [
|
|
1757
1795
|
/* @__PURE__ */ t("p", { css: ie.thanks, children: o("classicQuiz.thanksForPlaying") }),
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: ie.playAgain, onClick: e.playAgain, children: /* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */ t(
|
|
1796
|
+
/* @__PURE__ */ w("div", { css: ie.buttons, children: [
|
|
1797
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: ie.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ w("div", { css: ie.playAgainContent, children: [
|
|
1798
|
+
/* @__PURE__ */ t(Bt, { style: ea }),
|
|
1761
1799
|
/* @__PURE__ */ t("p", { css: ie.playAgainLabel, children: o("classicQuiz.buttons.playAgain") })
|
|
1762
1800
|
] }) }),
|
|
1763
|
-
/* @__PURE__ */ t(
|
|
1801
|
+
/* @__PURE__ */ t(At, { additionalCTA: e.additionalCTA, css: ie.additional })
|
|
1764
1802
|
] })
|
|
1765
1803
|
] }) }) }),
|
|
1766
1804
|
e.chanceGameContent,
|
|
1767
|
-
a &&
|
|
1768
|
-
|
|
1805
|
+
a && h && /* @__PURE__ */ t(
|
|
1806
|
+
G,
|
|
1769
1807
|
{
|
|
1770
|
-
brandingLogo:
|
|
1808
|
+
brandingLogo: h,
|
|
1771
1809
|
textColor: (y == null ? void 0 : y.contentColor) || u,
|
|
1772
|
-
label: ((
|
|
1810
|
+
label: ((R = e.personalityQuiz.labels) == null ? void 0 : R.sponsor) || null,
|
|
1811
|
+
primaryUrl: (V = (E = e.personalityQuiz.branding) == null ? void 0 : E.urls) == null ? void 0 : V.primaryUrl,
|
|
1812
|
+
secondaryUrl: (Y = (J = e.personalityQuiz.branding) == null ? void 0 : J.urls) == null ? void 0 : Y.secondaryUrl
|
|
1773
1813
|
}
|
|
1774
1814
|
)
|
|
1775
1815
|
] }) : /* @__PURE__ */ t("div", { css: l ? ie.alertArea.side : ie.alertArea.stacked, children: /* @__PURE__ */ t("div", { css: ie.alertWrapper, children: /* @__PURE__ */ t(
|
|
1776
|
-
|
|
1816
|
+
Pt,
|
|
1777
1817
|
{
|
|
1778
1818
|
variant: "error",
|
|
1779
1819
|
title: o("common.authentication.accessRequired"),
|
|
@@ -1783,17 +1823,17 @@ const Ai = (e, i) => {
|
|
|
1783
1823
|
}
|
|
1784
1824
|
);
|
|
1785
1825
|
};
|
|
1786
|
-
return /* @__PURE__ */ t(
|
|
1787
|
-
|
|
1826
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (y == null ? void 0 : y.borderColor) || null, children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
1827
|
+
$t,
|
|
1788
1828
|
{
|
|
1789
1829
|
questions: e.personalityQuiz.questions,
|
|
1790
1830
|
userParticipation: e.summary.questions,
|
|
1791
|
-
brandingColors: (
|
|
1792
|
-
resultsLayout:
|
|
1793
|
-
children:
|
|
1831
|
+
brandingColors: (z = e.personalityQuiz.branding) == null ? void 0 : z.colors,
|
|
1832
|
+
resultsLayout: d ? "column" : "row",
|
|
1833
|
+
children: b(!0)
|
|
1794
1834
|
}
|
|
1795
|
-
) :
|
|
1796
|
-
},
|
|
1835
|
+
) : b(!1) });
|
|
1836
|
+
}, It = "var(--fu-ucrc-pq-ort-primary)", Jn = "var(--fu-ucrc-pq-ort-primary-25)", ht = {
|
|
1797
1837
|
backdropFilter: "blur(4px)",
|
|
1798
1838
|
position: "relative",
|
|
1799
1839
|
"&::before": {
|
|
@@ -1809,7 +1849,7 @@ const Ai = (e, i) => {
|
|
|
1809
1849
|
zIndex: 0
|
|
1810
1850
|
},
|
|
1811
1851
|
"& > *": { position: "relative", zIndex: 1 }
|
|
1812
|
-
},
|
|
1852
|
+
}, Ze = {
|
|
1813
1853
|
position: "relative",
|
|
1814
1854
|
boxSizing: "border-box",
|
|
1815
1855
|
display: "flex",
|
|
@@ -1822,8 +1862,8 @@ const Ai = (e, i) => {
|
|
|
1822
1862
|
minWidth: 0,
|
|
1823
1863
|
minHeight: "auto",
|
|
1824
1864
|
margin: 0,
|
|
1825
|
-
paddingBlock:
|
|
1826
|
-
paddingInline:
|
|
1865
|
+
paddingBlock: f("sm"),
|
|
1866
|
+
paddingInline: f("md"),
|
|
1827
1867
|
border: "none",
|
|
1828
1868
|
borderBottom: "2px solid transparent",
|
|
1829
1869
|
borderRadius: 0,
|
|
@@ -1841,28 +1881,28 @@ const Ai = (e, i) => {
|
|
|
1841
1881
|
"&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px", zIndex: 1 },
|
|
1842
1882
|
"&:hover": {
|
|
1843
1883
|
backgroundColor: "var(--fu-ucrc-pq-ort-hover-bg)",
|
|
1844
|
-
borderBottom: `2px solid ${
|
|
1884
|
+
borderBottom: `2px solid ${Jn}`,
|
|
1845
1885
|
color: "#ffffff"
|
|
1846
1886
|
}
|
|
1847
|
-
},
|
|
1848
|
-
...
|
|
1887
|
+
}, Un = {
|
|
1888
|
+
...Ze,
|
|
1849
1889
|
zIndex: 1,
|
|
1850
1890
|
fontWeight: 600,
|
|
1851
1891
|
color: "#ffffff",
|
|
1852
|
-
borderBottom: `2px solid ${
|
|
1853
|
-
"&:hover": { ...
|
|
1854
|
-
},
|
|
1892
|
+
borderBottom: `2px solid ${It}`,
|
|
1893
|
+
"&:hover": { ...Ze["&:hover"], borderBottom: `2px solid ${It}` }
|
|
1894
|
+
}, Rn = { borderTopLeftRadius: "var(--fu-ucrc-radius-md)" }, Tn = {
|
|
1855
1895
|
backgroundSize: "cover",
|
|
1856
1896
|
backgroundPosition: "center",
|
|
1857
1897
|
backgroundRepeat: "no-repeat",
|
|
1858
1898
|
borderRadius: "var(--fu-ucrc-radius-xs)",
|
|
1859
1899
|
border: "1px solid rgba(255, 255, 255, 0.3)",
|
|
1860
1900
|
flexShrink: 0
|
|
1861
|
-
},
|
|
1901
|
+
}, na = {
|
|
1862
1902
|
flex: "none",
|
|
1863
1903
|
textAlign: "center",
|
|
1864
1904
|
maxWidth: "100%"
|
|
1865
|
-
},
|
|
1905
|
+
}, N = {
|
|
1866
1906
|
wrapper: n({
|
|
1867
1907
|
display: "flex",
|
|
1868
1908
|
flexDirection: "column",
|
|
@@ -1871,9 +1911,9 @@ const Ai = (e, i) => {
|
|
|
1871
1911
|
alignSelf: "stretch",
|
|
1872
1912
|
width: "100%"
|
|
1873
1913
|
}),
|
|
1874
|
-
container: n({ marginTop:
|
|
1914
|
+
container: n({ marginTop: f("md"), width: "100%" }),
|
|
1875
1915
|
// Joy's Tabs: the body font, 1.5 line height and neutral colour the panels inherit.
|
|
1876
|
-
tabs: n(
|
|
1916
|
+
tabs: n(ht, {
|
|
1877
1917
|
display: "flex",
|
|
1878
1918
|
flexDirection: "column",
|
|
1879
1919
|
width: "100%",
|
|
@@ -1893,26 +1933,26 @@ const Ai = (e, i) => {
|
|
|
1893
1933
|
padding: 0,
|
|
1894
1934
|
gap: 0,
|
|
1895
1935
|
fontSize: "1em",
|
|
1896
|
-
borderBottom: `1px solid ${
|
|
1936
|
+
borderBottom: `1px solid ${Jn}`,
|
|
1897
1937
|
// Joy's divider: the neutral channel at 16% (the overlay is always dark).
|
|
1898
1938
|
boxShadow: "inset 0 -1px rgba(var(--fu-ucrc-neutral-main-channel) / 0.16)"
|
|
1899
1939
|
}),
|
|
1900
1940
|
tab: {
|
|
1901
|
-
off: n(
|
|
1902
|
-
on: n(
|
|
1903
|
-
firstOff: n(
|
|
1904
|
-
firstOn: n(
|
|
1941
|
+
off: n(Ze),
|
|
1942
|
+
on: n(Un),
|
|
1943
|
+
firstOff: n(Ze, { "&:hover": Rn }),
|
|
1944
|
+
firstOn: n(Un, Rn)
|
|
1905
1945
|
},
|
|
1906
1946
|
labelRow: n({
|
|
1907
1947
|
display: "flex",
|
|
1908
1948
|
justifyContent: "space-between",
|
|
1909
1949
|
alignItems: "center",
|
|
1910
1950
|
width: "100%",
|
|
1911
|
-
gap:
|
|
1951
|
+
gap: f("sm")
|
|
1912
1952
|
}),
|
|
1913
|
-
logo: n(
|
|
1914
|
-
logoMobile: n(
|
|
1915
|
-
label: n(
|
|
1953
|
+
logo: n(Tn, { width: "24px", height: "24px" }),
|
|
1954
|
+
logoMobile: n(Tn, { width: "20px", height: "20px" }),
|
|
1955
|
+
label: n(ye, {
|
|
1916
1956
|
fontSize: "inherit",
|
|
1917
1957
|
fontWeight: "inherit",
|
|
1918
1958
|
fontFamily: "var(--fu-ucrc-font-secondary)",
|
|
@@ -1921,11 +1961,11 @@ const Ai = (e, i) => {
|
|
|
1921
1961
|
unicodeBidi: "plaintext",
|
|
1922
1962
|
flex: 1
|
|
1923
1963
|
}),
|
|
1924
|
-
percentage: n(
|
|
1925
|
-
backgroundColor:
|
|
1964
|
+
percentage: n(ye, {
|
|
1965
|
+
backgroundColor: It,
|
|
1926
1966
|
color: "var(--fu-ucrc-pq-ort-on-primary)",
|
|
1927
|
-
paddingInline:
|
|
1928
|
-
paddingBlock:
|
|
1967
|
+
paddingInline: f("xs"),
|
|
1968
|
+
paddingBlock: f("3xs"),
|
|
1929
1969
|
borderRadius: "var(--fu-ucrc-radius-sm)",
|
|
1930
1970
|
fontSize: "0.75em",
|
|
1931
1971
|
fontWeight: 600,
|
|
@@ -1934,10 +1974,10 @@ const Ai = (e, i) => {
|
|
|
1934
1974
|
lineHeight: 1.2
|
|
1935
1975
|
}),
|
|
1936
1976
|
panel: n({ flexGrow: 1, fontSize: "1em", padding: 0 }),
|
|
1937
|
-
content: n(
|
|
1938
|
-
contentMobile: n(
|
|
1977
|
+
content: n(ht, { padding: f("lg"), minHeight: "200px" }),
|
|
1978
|
+
contentMobile: n(ht, { padding: f("md"), minHeight: "200px" }),
|
|
1939
1979
|
// Rendered on desktop only, so always a row.
|
|
1940
|
-
withImage: n({ display: "flex", flexDirection: "row", alignItems: "flex-start", gap:
|
|
1980
|
+
withImage: n({ display: "flex", flexDirection: "row", alignItems: "flex-start", gap: f("lg") }),
|
|
1941
1981
|
imageSection: n({ display: "flex", justifyContent: "center", alignItems: "center", flex: "0 0 auto" }),
|
|
1942
1982
|
personaImage: n({
|
|
1943
1983
|
width: "250px",
|
|
@@ -1948,117 +1988,117 @@ const Ai = (e, i) => {
|
|
|
1948
1988
|
borderRadius: "var(--fu-ucrc-radius-md)",
|
|
1949
1989
|
border: "1px solid rgba(255, 255, 255, 0.2)"
|
|
1950
1990
|
}),
|
|
1951
|
-
descriptionSection: n(
|
|
1991
|
+
descriptionSection: n(na),
|
|
1952
1992
|
descriptionSectionWide: n({ flex: "1", textAlign: "left", maxWidth: "60%" }),
|
|
1953
1993
|
descriptionOnly: n({ display: "flex", justifyContent: "center", alignItems: "center", minHeight: "150px" }),
|
|
1954
1994
|
description: n({ color: "var(--fu-ucrc-pq-ort-text)", fontFamily: "var(--fu-ucrc-font-primary)", lineHeight: 1.6 })
|
|
1955
|
-
},
|
|
1995
|
+
}, ia = ({
|
|
1956
1996
|
personas: e,
|
|
1957
1997
|
brandingColors: i,
|
|
1958
1998
|
contentBgColor: r
|
|
1959
1999
|
}) => {
|
|
1960
|
-
var
|
|
1961
|
-
const [o,
|
|
2000
|
+
var Q;
|
|
2001
|
+
const [o, d] = M(0), [a, l] = M(0), s = ve([]), C = et(), y = Xe(), g = te(), u = Z(), h = ge("sm"), m = ge("md");
|
|
1962
2002
|
if (!e || e.length === 0)
|
|
1963
2003
|
return null;
|
|
1964
|
-
const
|
|
1965
|
-
"--fu-ucrc-pq-ort-primary":
|
|
1966
|
-
"--fu-ucrc-pq-ort-primary-25": `${
|
|
2004
|
+
const x = g.colorSchemes.dark, P = (i == null ? void 0 : i.primaryColor) || x.palette.primary.plainColor, b = {
|
|
2005
|
+
"--fu-ucrc-pq-ort-primary": P,
|
|
2006
|
+
"--fu-ucrc-pq-ort-primary-25": `${P}40`,
|
|
1967
2007
|
"--fu-ucrc-pq-ort-content-bg": r,
|
|
1968
|
-
"--fu-ucrc-pq-ort-text":
|
|
1969
|
-
"--fu-ucrc-pq-ort-hover-bg":
|
|
1970
|
-
"--fu-ucrc-pq-ort-on-primary":
|
|
1971
|
-
},
|
|
2008
|
+
"--fu-ucrc-pq-ort-text": x.textColor,
|
|
2009
|
+
"--fu-ucrc-pq-ort-hover-bg": x.surface,
|
|
2010
|
+
"--fu-ucrc-pq-ort-on-primary": x.palette.primary.onPrimary
|
|
2011
|
+
}, k = {
|
|
1972
2012
|
"--fu-ucrc-pq-ort-list-direction": u ? "column" : "row",
|
|
1973
2013
|
"--fu-ucrc-pq-ort-list-wrap": u ? "nowrap" : "wrap",
|
|
1974
2014
|
"--fu-ucrc-pq-ort-tab-width": u ? "100%" : "auto",
|
|
1975
|
-
"--fu-ucrc-pq-ort-tab-size":
|
|
1976
|
-
},
|
|
2015
|
+
"--fu-ucrc-pq-ort-tab-size": h ? "0.9em" : "0.85em"
|
|
2016
|
+
}, p = (S) => {
|
|
1977
2017
|
var z;
|
|
1978
|
-
const
|
|
1979
|
-
l(
|
|
1980
|
-
},
|
|
1981
|
-
const
|
|
1982
|
-
A !== void 0 && (
|
|
1983
|
-
},
|
|
1984
|
-
return /* @__PURE__ */ t("div", { css:
|
|
2018
|
+
const D = (S + e.length) % e.length;
|
|
2019
|
+
l(D), (z = s.current[D]) == null || z.focus();
|
|
2020
|
+
}, q = (S) => {
|
|
2021
|
+
const D = y ? "ArrowLeft" : "ArrowRight", z = y ? "ArrowRight" : "ArrowLeft", A = { [D]: a + 1, [z]: a - 1, Home: 0, End: e.length - 1 }[S.key];
|
|
2022
|
+
A !== void 0 && (S.preventDefault(), p(A));
|
|
2023
|
+
}, v = e[o], T = ((Q = v == null ? void 0 : v.images) == null ? void 0 : Q.main) || null, F = (S) => /* @__PURE__ */ t("span", { css: N.description, dir: "auto", dangerouslySetInnerHTML: { __html: S } });
|
|
2024
|
+
return /* @__PURE__ */ t("div", { css: N.wrapper, style: b, children: /* @__PURE__ */ t("div", { css: N.container, children: /* @__PURE__ */ w("div", { css: N.tabs, children: [
|
|
1985
2025
|
/* @__PURE__ */ t(
|
|
1986
2026
|
"div",
|
|
1987
2027
|
{
|
|
1988
2028
|
role: "tablist",
|
|
1989
2029
|
"aria-orientation": "horizontal",
|
|
1990
|
-
css:
|
|
1991
|
-
style:
|
|
1992
|
-
onKeyDown:
|
|
1993
|
-
children: e.map((
|
|
1994
|
-
var
|
|
1995
|
-
const z =
|
|
2030
|
+
css: N.list,
|
|
2031
|
+
style: k,
|
|
2032
|
+
onKeyDown: q,
|
|
2033
|
+
children: e.map((S, D) => {
|
|
2034
|
+
var U, R, E;
|
|
2035
|
+
const z = D === o, A = ((U = S.images) == null ? void 0 : U.main) || null, L = ((R = S.images) == null ? void 0 : R.mobile) || ((E = S.images) == null ? void 0 : E.main) || null, $ = u ? !!L : !!A && !S.description, c = u ? L : A;
|
|
1996
2036
|
return /* @__PURE__ */ t(
|
|
1997
2037
|
"button",
|
|
1998
2038
|
{
|
|
1999
|
-
ref: (
|
|
2000
|
-
s.current[
|
|
2039
|
+
ref: (V) => {
|
|
2040
|
+
s.current[D] = V;
|
|
2001
2041
|
},
|
|
2002
2042
|
type: "button",
|
|
2003
2043
|
role: "tab",
|
|
2004
|
-
id: `${
|
|
2044
|
+
id: `${C}-tab-${D}`,
|
|
2005
2045
|
"aria-selected": z,
|
|
2006
|
-
"aria-controls": z &&
|
|
2007
|
-
tabIndex:
|
|
2008
|
-
css:
|
|
2046
|
+
"aria-controls": z && S.description ? `${C}-panel` : void 0,
|
|
2047
|
+
tabIndex: D === a ? 0 : -1,
|
|
2048
|
+
css: D === 0 ? z ? N.tab.firstOn : N.tab.firstOff : z ? N.tab.on : N.tab.off,
|
|
2009
2049
|
onClick: () => {
|
|
2010
|
-
|
|
2050
|
+
d(D), l(D);
|
|
2011
2051
|
},
|
|
2012
|
-
onFocus: () => l(
|
|
2013
|
-
children: /* @__PURE__ */
|
|
2014
|
-
|
|
2052
|
+
onFocus: () => l(D),
|
|
2053
|
+
children: /* @__PURE__ */ w("div", { css: N.labelRow, children: [
|
|
2054
|
+
$ && c && /* @__PURE__ */ t(
|
|
2015
2055
|
"div",
|
|
2016
2056
|
{
|
|
2017
|
-
css: u ?
|
|
2018
|
-
style: { backgroundImage: `url("${
|
|
2057
|
+
css: u ? N.logoMobile : N.logo,
|
|
2058
|
+
style: { backgroundImage: `url("${c}")` }
|
|
2019
2059
|
}
|
|
2020
2060
|
),
|
|
2021
|
-
/* @__PURE__ */ t("p", { css:
|
|
2022
|
-
/* @__PURE__ */
|
|
2023
|
-
|
|
2061
|
+
/* @__PURE__ */ t("p", { css: N.label, children: S.title }),
|
|
2062
|
+
/* @__PURE__ */ w("p", { css: N.percentage, children: [
|
|
2063
|
+
S.percent,
|
|
2024
2064
|
"%"
|
|
2025
2065
|
] })
|
|
2026
2066
|
] })
|
|
2027
2067
|
},
|
|
2028
|
-
|
|
2068
|
+
S.personaId
|
|
2029
2069
|
);
|
|
2030
2070
|
})
|
|
2031
2071
|
}
|
|
2032
2072
|
),
|
|
2033
|
-
(
|
|
2034
|
-
/* @__PURE__ */ t("div", { css:
|
|
2035
|
-
/* @__PURE__ */ t("div", { css:
|
|
2036
|
-
] }) : /* @__PURE__ */ t("div", { css:
|
|
2073
|
+
(v == null ? void 0 : v.description) && /* @__PURE__ */ t("div", { role: "tabpanel", id: `${C}-panel`, "aria-labelledby": `${C}-tab-${o}`, css: N.panel, children: /* @__PURE__ */ t("div", { css: u ? N.contentMobile : N.content, children: T && !u ? /* @__PURE__ */ w("div", { css: N.withImage, children: [
|
|
2074
|
+
/* @__PURE__ */ t("div", { css: N.imageSection, children: /* @__PURE__ */ t("div", { css: N.personaImage, style: { backgroundImage: `url("${T}")` } }) }),
|
|
2075
|
+
/* @__PURE__ */ t("div", { css: m ? N.descriptionSectionWide : N.descriptionSection, children: F(v.description) })
|
|
2076
|
+
] }) : /* @__PURE__ */ t("div", { css: N.descriptionOnly, children: F(v.description) }) }) })
|
|
2037
2077
|
] }) }) });
|
|
2038
|
-
},
|
|
2039
|
-
...
|
|
2078
|
+
}, St = "var(--fu-ucrc-pq-oss-text-primary)", He = { display: "flex", justifyContent: "center", alignItems: "center" }, Bn = {
|
|
2079
|
+
...ye,
|
|
2040
2080
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
2041
2081
|
fontSize: "0.9375em",
|
|
2042
2082
|
fontStyle: "normal",
|
|
2043
2083
|
fontWeight: 500,
|
|
2044
2084
|
lineHeight: "24px",
|
|
2045
2085
|
textTransform: "uppercase"
|
|
2046
|
-
},
|
|
2047
|
-
...
|
|
2086
|
+
}, En = {
|
|
2087
|
+
...He,
|
|
2048
2088
|
flexDirection: "column",
|
|
2049
2089
|
gap: "8px",
|
|
2050
2090
|
borderRadius: "var(--fu-ucrc-pq-oss-radius-xl)",
|
|
2051
2091
|
color: "#fff",
|
|
2052
2092
|
fontSize: "0.9375em"
|
|
2053
|
-
},
|
|
2054
|
-
wrapperContent: n({ display: "flex", flexDirection: "column", gap: "40px", padding:
|
|
2093
|
+
}, ue = {
|
|
2094
|
+
wrapperContent: n({ display: "flex", flexDirection: "column", gap: "40px", padding: f("xl") }),
|
|
2055
2095
|
main: n({ display: "flex", flexDirection: "column", gap: "24px", zIndex: 10 }),
|
|
2056
2096
|
results: n({ display: "flex", flexDirection: "column", alignSelf: "stretch" }),
|
|
2057
|
-
cta: n({ ...
|
|
2058
|
-
ctaContent: n({ ...
|
|
2097
|
+
cta: n({ ...He, paddingBlock: f("xs"), gap: "24px", flex: "1 0 0" }),
|
|
2098
|
+
ctaContent: n({ ...He, flexDirection: "column", gap: f("md"), flex: "1 0 0" }),
|
|
2059
2099
|
thanks: n({
|
|
2060
|
-
...
|
|
2061
|
-
color:
|
|
2100
|
+
...ye,
|
|
2101
|
+
color: St,
|
|
2062
2102
|
textAlign: "center",
|
|
2063
2103
|
fontFamily: "var(--fu-ucrc-font-primary)",
|
|
2064
2104
|
fontSize: "1.25em",
|
|
@@ -2067,8 +2107,8 @@ const Ai = (e, i) => {
|
|
|
2067
2107
|
lineHeight: "120%",
|
|
2068
2108
|
letterSpacing: "0.15px"
|
|
2069
2109
|
}),
|
|
2070
|
-
buttons: n({ display: "flex", flexDirection: "column", gap:
|
|
2071
|
-
playAgain: n(
|
|
2110
|
+
buttons: n({ display: "flex", flexDirection: "column", gap: f("md") }),
|
|
2111
|
+
playAgain: n(Ce, En, {
|
|
2072
2112
|
minHeight: "48px",
|
|
2073
2113
|
paddingBlock: "12px",
|
|
2074
2114
|
paddingRight: "24px",
|
|
@@ -2076,62 +2116,62 @@ const Ai = (e, i) => {
|
|
|
2076
2116
|
backgroundColor: "var(--fu-ucrc-pq-oss-play-bg)",
|
|
2077
2117
|
"&:hover": { backgroundColor: "var(--fu-ucrc-pq-oss-play-hover)" }
|
|
2078
2118
|
}),
|
|
2079
|
-
playAgainContent: n({ ...
|
|
2080
|
-
playAgainText: n({ ...
|
|
2081
|
-
additionalCta: n(
|
|
2082
|
-
paddingBlock:
|
|
2083
|
-
paddingInline:
|
|
2119
|
+
playAgainContent: n({ ...He, gap: "8px", alignSelf: "stretch" }),
|
|
2120
|
+
playAgainText: n({ ...Bn, letterSpacing: "0.46px", textAlign: "center", color: St }),
|
|
2121
|
+
additionalCta: n(Ce, En, {
|
|
2122
|
+
paddingBlock: f("sm"),
|
|
2123
|
+
paddingInline: f("md"),
|
|
2084
2124
|
backgroundColor: "var(--fu-ucrc-pq-oss-secondary-container)",
|
|
2085
2125
|
"&:hover": { opacity: 0.9 },
|
|
2086
|
-
"& > div": { ...
|
|
2087
|
-
"& p": { ...
|
|
2126
|
+
"& > div": { ...He, gap: "8px" },
|
|
2127
|
+
"& p": { ...Bn, letterSpacing: "0.40px", color: "var(--fu-ucrc-pq-oss-secondary)" }
|
|
2088
2128
|
})
|
|
2089
|
-
},
|
|
2129
|
+
}, aa = {
|
|
2090
2130
|
display: "flex",
|
|
2091
2131
|
width: "24px",
|
|
2092
2132
|
height: "24px",
|
|
2093
2133
|
justifyContent: "center",
|
|
2094
2134
|
alignItems: "center",
|
|
2095
|
-
color:
|
|
2096
|
-
},
|
|
2097
|
-
var
|
|
2098
|
-
const i =
|
|
2135
|
+
color: St
|
|
2136
|
+
}, ra = (e) => {
|
|
2137
|
+
var b;
|
|
2138
|
+
const i = te(), { t: r } = W(), o = Mn(_.OVERLAY), d = Z(), a = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : d ? Ie : Se, { brandingImage: l, brandingColors: s, brandingLogo: C } = Oe(
|
|
2099
2139
|
e.personalityQuiz.branding || null
|
|
2100
|
-
), y =
|
|
2140
|
+
), y = be(
|
|
2101
2141
|
{ images: e.personalityQuiz.images, imagePlaceholder: a },
|
|
2102
|
-
|
|
2103
|
-
),
|
|
2142
|
+
_.OVERLAY
|
|
2143
|
+
), g = l || y, u = i.colorSchemes.dark, h = (s == null ? void 0 : s.backgroundColor) || u.onSurface, m = {
|
|
2104
2144
|
"--fu-ucrc-pq-oss-text-primary": u.textPrimary,
|
|
2105
2145
|
"--fu-ucrc-pq-oss-secondary": (s == null ? void 0 : s.secondaryColor) || u.textSecondary,
|
|
2106
2146
|
"--fu-ucrc-pq-oss-secondary-container": u.secondaryContainer,
|
|
2107
2147
|
"--fu-ucrc-pq-oss-play-bg": u.onSurface,
|
|
2108
2148
|
"--fu-ucrc-pq-oss-play-hover": u.surfaceVariant,
|
|
2109
2149
|
"--fu-ucrc-pq-oss-radius-xl": i.customRadius.light.xl
|
|
2110
|
-
},
|
|
2111
|
-
var
|
|
2112
|
-
return /* @__PURE__ */
|
|
2113
|
-
e.summary.personalityQuizId ? /* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */ t("div", { css:
|
|
2115
|
-
|
|
2150
|
+
}, x = Mt(e.personalityQuiz, e.summary), P = () => {
|
|
2151
|
+
var k, p, q, v, T;
|
|
2152
|
+
return /* @__PURE__ */ w("div", { css: ue.main, style: m, children: [
|
|
2153
|
+
e.summary.personalityQuizId ? /* @__PURE__ */ w(Re, { children: [
|
|
2154
|
+
/* @__PURE__ */ t("div", { css: ue.results, children: /* @__PURE__ */ t(
|
|
2155
|
+
ia,
|
|
2116
2156
|
{
|
|
2117
|
-
personas:
|
|
2157
|
+
personas: x,
|
|
2118
2158
|
brandingColors: s,
|
|
2119
|
-
contentBgColor:
|
|
2159
|
+
contentBgColor: h
|
|
2120
2160
|
}
|
|
2121
2161
|
) }),
|
|
2122
|
-
(!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t("div", { css:
|
|
2123
|
-
/* @__PURE__ */ t("p", { css:
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css:
|
|
2126
|
-
/* @__PURE__ */ t(
|
|
2127
|
-
/* @__PURE__ */ t("p", { css:
|
|
2162
|
+
(!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t("div", { css: ue.cta, children: /* @__PURE__ */ w("div", { css: ue.ctaContent, children: [
|
|
2163
|
+
/* @__PURE__ */ t("p", { css: ue.thanks, children: r("personalityQuiz.thanksForPlaying") }),
|
|
2164
|
+
/* @__PURE__ */ w("div", { css: ue.buttons, children: [
|
|
2165
|
+
!e.maxAttemptsReached && /* @__PURE__ */ t("button", { type: "button", css: ue.playAgain, onClick: e.playAgain, children: /* @__PURE__ */ w("div", { css: ue.playAgainContent, children: [
|
|
2166
|
+
/* @__PURE__ */ t(Bt, { style: aa }),
|
|
2167
|
+
/* @__PURE__ */ t("p", { css: ue.playAgainText, children: r("personalityQuiz.buttons.playAgain") })
|
|
2128
2168
|
] }) }),
|
|
2129
|
-
/* @__PURE__ */ t(
|
|
2169
|
+
/* @__PURE__ */ t(At, { additionalCTA: e.additionalCTA, css: ue.additionalCta })
|
|
2130
2170
|
] })
|
|
2131
2171
|
] }) }),
|
|
2132
2172
|
e.chanceGameContent
|
|
2133
2173
|
] }) : /* @__PURE__ */ t(
|
|
2134
|
-
|
|
2174
|
+
Pt,
|
|
2135
2175
|
{
|
|
2136
2176
|
variant: "error",
|
|
2137
2177
|
title: r("common.authentication.accessRequired"),
|
|
@@ -2139,59 +2179,63 @@ const Ai = (e, i) => {
|
|
|
2139
2179
|
}
|
|
2140
2180
|
),
|
|
2141
2181
|
/* @__PURE__ */ t(
|
|
2142
|
-
|
|
2182
|
+
G,
|
|
2143
2183
|
{
|
|
2144
|
-
brandingLogo:
|
|
2184
|
+
brandingLogo: C,
|
|
2145
2185
|
textColor: u.textColor,
|
|
2146
|
-
label: ((
|
|
2186
|
+
label: ((k = e.personalityQuiz.labels) == null ? void 0 : k.sponsor) || null,
|
|
2187
|
+
primaryUrl: (q = (p = e.personalityQuiz.branding) == null ? void 0 : p.urls) == null ? void 0 : q.primaryUrl,
|
|
2188
|
+
secondaryUrl: (T = (v = e.personalityQuiz.branding) == null ? void 0 : v.urls) == null ? void 0 : T.secondaryUrl
|
|
2147
2189
|
}
|
|
2148
2190
|
)
|
|
2149
2191
|
] });
|
|
2150
2192
|
};
|
|
2151
2193
|
return /* @__PURE__ */ t(
|
|
2152
|
-
|
|
2194
|
+
wi,
|
|
2153
2195
|
{
|
|
2154
2196
|
entity: e.personalityQuiz,
|
|
2155
|
-
backgroundImage:
|
|
2197
|
+
backgroundImage: Fn(g),
|
|
2156
2198
|
imageBackgroundGradient: o,
|
|
2157
2199
|
isWrappedWithScoreStateWrapper: e.showAnswerExplanations,
|
|
2158
2200
|
children: e.showAnswerExplanations ? /* @__PURE__ */ t(
|
|
2159
|
-
|
|
2201
|
+
$t,
|
|
2160
2202
|
{
|
|
2161
2203
|
questions: e.personalityQuiz.questions,
|
|
2162
2204
|
userParticipation: e.summary.questions,
|
|
2163
2205
|
resultsLayout: "block",
|
|
2164
2206
|
isOverlayVariant: !0,
|
|
2165
|
-
brandingColors: (
|
|
2166
|
-
children: /* @__PURE__ */ t("div", { css:
|
|
2207
|
+
brandingColors: (b = e.personalityQuiz.branding) == null ? void 0 : b.colors,
|
|
2208
|
+
children: /* @__PURE__ */ t("div", { css: ue.wrapperContent, children: P() })
|
|
2167
2209
|
}
|
|
2168
|
-
) :
|
|
2210
|
+
) : P()
|
|
2169
2211
|
}
|
|
2170
2212
|
);
|
|
2171
|
-
},
|
|
2172
|
-
const { t: e } =
|
|
2173
|
-
return /* @__PURE__ */ t(
|
|
2174
|
-
},
|
|
2213
|
+
}, oa = () => {
|
|
2214
|
+
const { t: e } = W();
|
|
2215
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: null, children: /* @__PURE__ */ t(ki, { title: e("personalityQuiz.quizNotFound"), message: e("personalityQuiz.quizNotFoundDescription") }) });
|
|
2216
|
+
}, la = ({
|
|
2175
2217
|
personalityQuiz: e,
|
|
2176
2218
|
template: i,
|
|
2177
2219
|
imagePosition: r,
|
|
2178
2220
|
defaultImagePlaceholderUrl: o,
|
|
2179
|
-
rulesDisplay:
|
|
2221
|
+
rulesDisplay: d
|
|
2180
2222
|
}) => {
|
|
2181
2223
|
var u;
|
|
2182
|
-
const { t: a } =
|
|
2224
|
+
const { t: a } = W(), l = Z(), s = ((u = e.branding) == null ? void 0 : u.colors) || null, { brandingLogo: C } = Oe(
|
|
2183
2225
|
e.branding || null
|
|
2184
|
-
), y = (
|
|
2185
|
-
var
|
|
2226
|
+
), y = (h) => {
|
|
2227
|
+
var m, x, P, b, k;
|
|
2186
2228
|
return /* @__PURE__ */ t(
|
|
2187
|
-
|
|
2229
|
+
G,
|
|
2188
2230
|
{
|
|
2189
|
-
brandingLogo:
|
|
2190
|
-
textColor:
|
|
2191
|
-
label: ((
|
|
2231
|
+
brandingLogo: C,
|
|
2232
|
+
textColor: h,
|
|
2233
|
+
label: ((m = e.labels) == null ? void 0 : m.sponsor) || null,
|
|
2234
|
+
primaryUrl: (P = (x = e.branding) == null ? void 0 : x.urls) == null ? void 0 : P.primaryUrl,
|
|
2235
|
+
secondaryUrl: (k = (b = e.branding) == null ? void 0 : b.urls) == null ? void 0 : k.secondaryUrl
|
|
2192
2236
|
}
|
|
2193
2237
|
);
|
|
2194
|
-
},
|
|
2238
|
+
}, g = {
|
|
2195
2239
|
entity: e,
|
|
2196
2240
|
headline: a("personalityQuiz.headline"),
|
|
2197
2241
|
tryAgainButtonText: "",
|
|
@@ -2200,33 +2244,33 @@ const Ai = (e, i) => {
|
|
|
2200
2244
|
customAlertTitle: a("personalityQuiz.gameNotAvailable"),
|
|
2201
2245
|
customAlertMessage: a("personalityQuiz.gameNotAvailableDescription"),
|
|
2202
2246
|
renderPresentedBy: y,
|
|
2203
|
-
rulesDisplay:
|
|
2247
|
+
rulesDisplay: d
|
|
2204
2248
|
};
|
|
2205
|
-
return i ===
|
|
2206
|
-
|
|
2249
|
+
return i === _.OVERLAY ? /* @__PURE__ */ t(
|
|
2250
|
+
Wn,
|
|
2207
2251
|
{
|
|
2208
|
-
...
|
|
2209
|
-
defaultImagePlaceholderUrl: o || (l ?
|
|
2252
|
+
...g,
|
|
2253
|
+
defaultImagePlaceholderUrl: o || (l ? Ie : Se)
|
|
2210
2254
|
}
|
|
2211
|
-
) : i ===
|
|
2212
|
-
|
|
2255
|
+
) : i === _.SPLIT ? /* @__PURE__ */ t(X, { brandingBorderColor: (s == null ? void 0 : s.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2256
|
+
Vn,
|
|
2213
2257
|
{
|
|
2214
|
-
...
|
|
2258
|
+
...g,
|
|
2215
2259
|
defaultImagePlaceholderUrl: o
|
|
2216
2260
|
}
|
|
2217
|
-
) }) : /* @__PURE__ */ t(
|
|
2218
|
-
|
|
2261
|
+
) }) : /* @__PURE__ */ t(X, { brandingBorderColor: (s == null ? void 0 : s.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2262
|
+
jn,
|
|
2219
2263
|
{
|
|
2220
|
-
...
|
|
2264
|
+
...g,
|
|
2221
2265
|
imagePosition: r || "left",
|
|
2222
2266
|
defaultImagePlaceholderUrl: o
|
|
2223
2267
|
}
|
|
2224
2268
|
) });
|
|
2225
|
-
},
|
|
2226
|
-
var
|
|
2227
|
-
const i = ((
|
|
2228
|
-
return /* @__PURE__ */ t(
|
|
2229
|
-
|
|
2269
|
+
}, sa = (e) => {
|
|
2270
|
+
var d, a, l, s;
|
|
2271
|
+
const i = ((d = e.personalityQuiz.branding) == null ? void 0 : d.colors) || null, r = Z() ? ((a = e.personalityQuiz.branding) == null ? void 0 : a.images.mobileLogo) || ((l = e.personalityQuiz.branding) == null ? void 0 : l.images.mainLogo) || "" : ((s = e.personalityQuiz.branding) == null ? void 0 : s.images.mainLogo) || "", { t: o } = W();
|
|
2272
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (i == null ? void 0 : i.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2273
|
+
jn,
|
|
2230
2274
|
{
|
|
2231
2275
|
entity: e.personalityQuiz,
|
|
2232
2276
|
headline: o("personalityQuiz.headline"),
|
|
@@ -2237,24 +2281,26 @@ const Ai = (e, i) => {
|
|
|
2237
2281
|
toggleTryAgain: e.toggleTryAgain,
|
|
2238
2282
|
apiErrorMessage: e.apiErrorMessage,
|
|
2239
2283
|
rulesDisplay: e.rulesDisplay,
|
|
2240
|
-
renderPresentedBy: (
|
|
2241
|
-
var y;
|
|
2284
|
+
renderPresentedBy: (C) => {
|
|
2285
|
+
var y, g, u, h, m;
|
|
2242
2286
|
return /* @__PURE__ */ t(
|
|
2243
|
-
|
|
2287
|
+
G,
|
|
2244
2288
|
{
|
|
2245
2289
|
brandingLogo: r,
|
|
2246
|
-
textColor:
|
|
2247
|
-
label: ((y = e.personalityQuiz.labels) == null ? void 0 : y.sponsor) || null
|
|
2290
|
+
textColor: C,
|
|
2291
|
+
label: ((y = e.personalityQuiz.labels) == null ? void 0 : y.sponsor) || null,
|
|
2292
|
+
primaryUrl: (u = (g = e.personalityQuiz.branding) == null ? void 0 : g.urls) == null ? void 0 : u.primaryUrl,
|
|
2293
|
+
secondaryUrl: (m = (h = e.personalityQuiz.branding) == null ? void 0 : h.urls) == null ? void 0 : m.secondaryUrl
|
|
2248
2294
|
}
|
|
2249
2295
|
);
|
|
2250
2296
|
}
|
|
2251
2297
|
}
|
|
2252
2298
|
) });
|
|
2253
|
-
},
|
|
2254
|
-
var a, l, s,
|
|
2255
|
-
const i =
|
|
2256
|
-
return /* @__PURE__ */ t(
|
|
2257
|
-
|
|
2299
|
+
}, ca = (e) => {
|
|
2300
|
+
var a, l, s, C;
|
|
2301
|
+
const i = Z(), { t: r } = W(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, d = i ? ((l = e.personalityQuiz.branding) == null ? void 0 : l.images.mobileLogo) || ((s = e.personalityQuiz.branding) == null ? void 0 : s.images.mainLogo) || "" : ((C = e.personalityQuiz.branding) == null ? void 0 : C.images.mainLogo) || "";
|
|
2302
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (o == null ? void 0 : o.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2303
|
+
Vn,
|
|
2258
2304
|
{
|
|
2259
2305
|
entity: e.personalityQuiz,
|
|
2260
2306
|
headline: r("personalityQuiz.headline"),
|
|
@@ -2265,22 +2311,24 @@ const Ai = (e, i) => {
|
|
|
2265
2311
|
apiErrorMessage: e.apiErrorMessage,
|
|
2266
2312
|
rulesDisplay: e.rulesDisplay,
|
|
2267
2313
|
renderPresentedBy: (y) => {
|
|
2268
|
-
var m;
|
|
2314
|
+
var g, u, h, m, x;
|
|
2269
2315
|
return /* @__PURE__ */ t(
|
|
2270
|
-
|
|
2316
|
+
G,
|
|
2271
2317
|
{
|
|
2272
|
-
brandingLogo:
|
|
2318
|
+
brandingLogo: d,
|
|
2273
2319
|
textColor: y,
|
|
2274
|
-
label: ((
|
|
2320
|
+
label: ((g = e.personalityQuiz.labels) == null ? void 0 : g.sponsor) || null,
|
|
2321
|
+
primaryUrl: (h = (u = e.personalityQuiz.branding) == null ? void 0 : u.urls) == null ? void 0 : h.primaryUrl,
|
|
2322
|
+
secondaryUrl: (x = (m = e.personalityQuiz.branding) == null ? void 0 : m.urls) == null ? void 0 : x.secondaryUrl
|
|
2275
2323
|
}
|
|
2276
2324
|
);
|
|
2277
2325
|
}
|
|
2278
2326
|
}
|
|
2279
2327
|
) });
|
|
2280
|
-
},
|
|
2281
|
-
const { t: i } =
|
|
2328
|
+
}, da = (e) => {
|
|
2329
|
+
const { t: i } = W(), r = Z(), o = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : r ? Ie : Se, { brandingLogo: d } = Oe(e.personalityQuiz.branding || null);
|
|
2282
2330
|
return /* @__PURE__ */ t(
|
|
2283
|
-
|
|
2331
|
+
Wn,
|
|
2284
2332
|
{
|
|
2285
2333
|
entity: e.personalityQuiz,
|
|
2286
2334
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2291,105 +2339,113 @@ const Ai = (e, i) => {
|
|
|
2291
2339
|
apiErrorMessage: e.apiErrorMessage,
|
|
2292
2340
|
rulesDisplay: e.rulesDisplay,
|
|
2293
2341
|
renderPresentedBy: (a) => {
|
|
2294
|
-
var l;
|
|
2342
|
+
var l, s, C, y, g;
|
|
2295
2343
|
return /* @__PURE__ */ t(
|
|
2296
|
-
|
|
2344
|
+
G,
|
|
2297
2345
|
{
|
|
2298
|
-
brandingLogo:
|
|
2346
|
+
brandingLogo: d,
|
|
2299
2347
|
textColor: a,
|
|
2300
|
-
label: ((l = e.personalityQuiz.labels) == null ? void 0 : l.sponsor) || null
|
|
2348
|
+
label: ((l = e.personalityQuiz.labels) == null ? void 0 : l.sponsor) || null,
|
|
2349
|
+
primaryUrl: (C = (s = e.personalityQuiz.branding) == null ? void 0 : s.urls) == null ? void 0 : C.primaryUrl,
|
|
2350
|
+
secondaryUrl: (g = (y = e.personalityQuiz.branding) == null ? void 0 : y.urls) == null ? void 0 : g.secondaryUrl
|
|
2301
2351
|
}
|
|
2302
2352
|
);
|
|
2303
2353
|
}
|
|
2304
2354
|
}
|
|
2305
2355
|
);
|
|
2306
|
-
},
|
|
2307
|
-
var u, b,
|
|
2308
|
-
const i = ((u = e.personalityQuiz.branding) == null ? void 0 : u.colors) || null, r =
|
|
2356
|
+
}, ua = (e) => {
|
|
2357
|
+
var u, h, m, x, P, b, k, p, q;
|
|
2358
|
+
const i = ((u = e.personalityQuiz.branding) == null ? void 0 : u.colors) || null, r = Z(), o = te(), d = re(), a = be(
|
|
2309
2359
|
{
|
|
2310
2360
|
images: e.personalityQuiz.images,
|
|
2311
2361
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2312
2362
|
},
|
|
2313
|
-
|
|
2314
|
-
), l = (i == null ? void 0 : i.primaryColor) ||
|
|
2315
|
-
return /* @__PURE__ */ t(
|
|
2316
|
-
|
|
2363
|
+
_.STANDARD
|
|
2364
|
+
), l = (i == null ? void 0 : i.primaryColor) || d.palette.primary.plainColor, s = (i == null ? void 0 : i.contentColor) || d.textColor, C = r ? ((h = e.personalityQuiz.branding) == null ? void 0 : h.images.mobileLogo) || ((m = e.personalityQuiz.branding) == null ? void 0 : m.images.mainLogo) || "" : ((x = e.personalityQuiz.branding) == null ? void 0 : x.images.mainLogo) || "", { t: y } = W(), g = e.imagePosition || "left";
|
|
2365
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (i == null ? void 0 : i.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2366
|
+
Qi,
|
|
2317
2367
|
{
|
|
2318
2368
|
entity: e.personalityQuiz,
|
|
2319
2369
|
headline: y("personalityQuiz.headline"),
|
|
2320
2370
|
finalImage: a,
|
|
2321
|
-
imagePosition:
|
|
2322
|
-
signInContent: /* @__PURE__ */ t(
|
|
2371
|
+
imagePosition: g,
|
|
2372
|
+
signInContent: /* @__PURE__ */ t(qt, { signInCTA: e.signInCTA, primaryColor: l, pulse: !0 }),
|
|
2323
2373
|
brandingContent: /* @__PURE__ */ t(
|
|
2324
|
-
|
|
2374
|
+
G,
|
|
2325
2375
|
{
|
|
2326
|
-
brandingLogo:
|
|
2376
|
+
brandingLogo: C,
|
|
2327
2377
|
textColor: r && a ? (i == null ? void 0 : i.contentColor) || o.colorSchemes.dark.textColor : s,
|
|
2328
|
-
label: ((
|
|
2378
|
+
label: ((P = e.personalityQuiz.labels) == null ? void 0 : P.sponsor) || null,
|
|
2379
|
+
primaryUrl: (k = (b = e.personalityQuiz.branding) == null ? void 0 : b.urls) == null ? void 0 : k.primaryUrl,
|
|
2380
|
+
secondaryUrl: (q = (p = e.personalityQuiz.branding) == null ? void 0 : p.urls) == null ? void 0 : q.secondaryUrl
|
|
2329
2381
|
}
|
|
2330
2382
|
),
|
|
2331
2383
|
rulesDisplay: e.rulesDisplay
|
|
2332
2384
|
}
|
|
2333
2385
|
) });
|
|
2334
|
-
},
|
|
2335
|
-
var
|
|
2336
|
-
const i =
|
|
2386
|
+
}, ga = (e) => {
|
|
2387
|
+
var g, u, h, m, x, P, b, k, p;
|
|
2388
|
+
const i = te(), r = re(), o = Z(), d = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : o ? Ie : Se, a = be(
|
|
2337
2389
|
{
|
|
2338
2390
|
images: e.personalityQuiz.images,
|
|
2339
|
-
imagePlaceholder:
|
|
2391
|
+
imagePlaceholder: d
|
|
2340
2392
|
},
|
|
2341
|
-
|
|
2342
|
-
), { t: l } =
|
|
2343
|
-
return /* @__PURE__ */ t(
|
|
2344
|
-
|
|
2393
|
+
_.SPLIT
|
|
2394
|
+
), { t: l } = W(), s = ((g = e.personalityQuiz.branding) == null ? void 0 : g.colors) || null, C = o ? ((u = e.personalityQuiz.branding) == null ? void 0 : u.images.mobileLogo) || ((h = e.personalityQuiz.branding) == null ? void 0 : h.images.mainLogo) || "" : ((m = e.personalityQuiz.branding) == null ? void 0 : m.images.mainLogo) || "", y = (s == null ? void 0 : s.primaryColor) || r.palette.primary.plainColor;
|
|
2395
|
+
return /* @__PURE__ */ t(X, { brandingBorderColor: (s == null ? void 0 : s.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2396
|
+
Ai,
|
|
2345
2397
|
{
|
|
2346
2398
|
entity: e.personalityQuiz,
|
|
2347
2399
|
headline: l("personalityQuiz.headline"),
|
|
2348
2400
|
finalImage: a,
|
|
2349
|
-
signInContent: /* @__PURE__ */ t(
|
|
2401
|
+
signInContent: /* @__PURE__ */ t(qt, { signInCTA: e.signInCTA, primaryColor: y, pulse: !0 }),
|
|
2350
2402
|
brandingContent: /* @__PURE__ */ t(
|
|
2351
|
-
|
|
2403
|
+
G,
|
|
2352
2404
|
{
|
|
2353
|
-
brandingLogo:
|
|
2405
|
+
brandingLogo: C,
|
|
2354
2406
|
textColor: (s == null ? void 0 : s.contentColor) || i.colorSchemes.dark.textColor,
|
|
2355
|
-
label: ((
|
|
2407
|
+
label: ((x = e.personalityQuiz.labels) == null ? void 0 : x.sponsor) || null,
|
|
2408
|
+
primaryUrl: (b = (P = e.personalityQuiz.branding) == null ? void 0 : P.urls) == null ? void 0 : b.primaryUrl,
|
|
2409
|
+
secondaryUrl: (p = (k = e.personalityQuiz.branding) == null ? void 0 : k.urls) == null ? void 0 : p.secondaryUrl
|
|
2356
2410
|
}
|
|
2357
2411
|
),
|
|
2358
2412
|
rulesDisplay: e.rulesDisplay
|
|
2359
2413
|
}
|
|
2360
2414
|
) });
|
|
2361
|
-
},
|
|
2362
|
-
var
|
|
2363
|
-
const i =
|
|
2415
|
+
}, ma = n({ display: "contents" }), fa = (e) => {
|
|
2416
|
+
var x, P, b, k, p;
|
|
2417
|
+
const i = te(), { t: r } = W(), o = Z(), d = Mn(_.OVERLAY), { brandingImage: a, brandingColors: l, brandingLogo: s } = Oe(
|
|
2364
2418
|
e.personalityQuiz.branding || null
|
|
2365
|
-
),
|
|
2419
|
+
), C = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : o ? Ie : Se, y = be({ images: e.personalityQuiz.images, imagePlaceholder: C }, _.OVERLAY), g = a || y, u = i.colorSchemes.light, h = (l == null ? void 0 : l.primaryColor) || u.palette.primary.plainColor, m = {
|
|
2366
2420
|
"--fu-ucrc-primary-on-primary": u.palette.primary.onPrimary,
|
|
2367
2421
|
"--fu-ucrc-radius-xl": i.customRadius.light.xl
|
|
2368
2422
|
};
|
|
2369
2423
|
return /* @__PURE__ */ t(
|
|
2370
|
-
|
|
2424
|
+
Pi,
|
|
2371
2425
|
{
|
|
2372
2426
|
entity: e.personalityQuiz,
|
|
2373
2427
|
headline: r("personalityQuiz.headline"),
|
|
2374
|
-
backgroundImage:
|
|
2375
|
-
imageBackgroundGradient:
|
|
2376
|
-
signInContent: /* @__PURE__ */ t("div", { css:
|
|
2428
|
+
backgroundImage: Fn(g),
|
|
2429
|
+
imageBackgroundGradient: d,
|
|
2430
|
+
signInContent: /* @__PURE__ */ t("div", { css: ma, style: m, children: /* @__PURE__ */ t(qt, { signInCTA: e.signInCTA, primaryColor: h, pulse: !0 }) }),
|
|
2377
2431
|
brandingContent: /* @__PURE__ */ t(
|
|
2378
|
-
|
|
2432
|
+
G,
|
|
2379
2433
|
{
|
|
2380
2434
|
brandingLogo: s,
|
|
2381
2435
|
textColor: i.colorSchemes.dark.textColor,
|
|
2382
|
-
label: ((
|
|
2436
|
+
label: ((x = e.personalityQuiz.labels) == null ? void 0 : x.sponsor) || null,
|
|
2437
|
+
primaryUrl: (b = (P = e.personalityQuiz.branding) == null ? void 0 : P.urls) == null ? void 0 : b.primaryUrl,
|
|
2438
|
+
secondaryUrl: (p = (k = e.personalityQuiz.branding) == null ? void 0 : k.urls) == null ? void 0 : p.secondaryUrl
|
|
2383
2439
|
}
|
|
2384
2440
|
),
|
|
2385
2441
|
rulesDisplay: e.rulesDisplay
|
|
2386
2442
|
}
|
|
2387
2443
|
);
|
|
2388
|
-
},
|
|
2444
|
+
}, ya = (e) => {
|
|
2389
2445
|
var a, l, s;
|
|
2390
|
-
const { t: i } =
|
|
2446
|
+
const { t: i } = W(), r = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, o = re(), d = (r == null ? void 0 : r.primaryColor) || o.palette.primary.plainColor;
|
|
2391
2447
|
return /* @__PURE__ */ t(
|
|
2392
|
-
|
|
2448
|
+
Lt,
|
|
2393
2449
|
{
|
|
2394
2450
|
entity: e.personalityQuiz,
|
|
2395
2451
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2398,26 +2454,26 @@ const Ai = (e, i) => {
|
|
|
2398
2454
|
imagePosition: e.imagePosition,
|
|
2399
2455
|
onLeadSubmitted: () => {
|
|
2400
2456
|
},
|
|
2401
|
-
MainCard:
|
|
2402
|
-
PresentedBy:
|
|
2457
|
+
MainCard: X,
|
|
2458
|
+
PresentedBy: G,
|
|
2403
2459
|
rulesDisplay: e.rulesDisplay,
|
|
2404
2460
|
content: /* @__PURE__ */ t(
|
|
2405
|
-
|
|
2461
|
+
Dt,
|
|
2406
2462
|
{
|
|
2407
2463
|
signInCTA: e.signInCTA,
|
|
2408
2464
|
labels: (s = (l = e.signInCTA) == null ? void 0 : l.gate) == null ? void 0 : s.labels,
|
|
2409
|
-
primaryColor:
|
|
2465
|
+
primaryColor: d,
|
|
2410
2466
|
textColor: (r == null ? void 0 : r.contentColor) || void 0,
|
|
2411
2467
|
align: "center"
|
|
2412
2468
|
}
|
|
2413
2469
|
)
|
|
2414
2470
|
}
|
|
2415
2471
|
);
|
|
2416
|
-
},
|
|
2472
|
+
}, ha = (e) => {
|
|
2417
2473
|
var a, l, s;
|
|
2418
|
-
const { t: i } =
|
|
2474
|
+
const { t: i } = W(), r = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, o = re(), d = (r == null ? void 0 : r.primaryColor) || o.palette.primary.plainColor;
|
|
2419
2475
|
return /* @__PURE__ */ t(
|
|
2420
|
-
|
|
2476
|
+
Ut,
|
|
2421
2477
|
{
|
|
2422
2478
|
entity: e.personalityQuiz,
|
|
2423
2479
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2425,26 +2481,26 @@ const Ai = (e, i) => {
|
|
|
2425
2481
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2426
2482
|
onLeadSubmitted: () => {
|
|
2427
2483
|
},
|
|
2428
|
-
MainCard:
|
|
2429
|
-
PresentedBy:
|
|
2484
|
+
MainCard: X,
|
|
2485
|
+
PresentedBy: G,
|
|
2430
2486
|
rulesDisplay: e.rulesDisplay,
|
|
2431
2487
|
content: /* @__PURE__ */ t(
|
|
2432
|
-
|
|
2488
|
+
Dt,
|
|
2433
2489
|
{
|
|
2434
2490
|
signInCTA: e.signInCTA,
|
|
2435
2491
|
labels: (s = (l = e.signInCTA) == null ? void 0 : l.gate) == null ? void 0 : s.labels,
|
|
2436
|
-
primaryColor:
|
|
2492
|
+
primaryColor: d,
|
|
2437
2493
|
textColor: (r == null ? void 0 : r.contentColor) || void 0,
|
|
2438
2494
|
align: "center"
|
|
2439
2495
|
}
|
|
2440
2496
|
)
|
|
2441
2497
|
}
|
|
2442
2498
|
);
|
|
2443
|
-
},
|
|
2499
|
+
}, ba = (e) => {
|
|
2444
2500
|
var a, l, s;
|
|
2445
|
-
const { t: i } =
|
|
2501
|
+
const { t: i } = W(), r = te(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, d = (o == null ? void 0 : o.primaryColor) || r.colorSchemes.dark.palette.primary.plainColor;
|
|
2446
2502
|
return /* @__PURE__ */ t(
|
|
2447
|
-
|
|
2503
|
+
Rt,
|
|
2448
2504
|
{
|
|
2449
2505
|
entity: e.personalityQuiz,
|
|
2450
2506
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2452,24 +2508,24 @@ const Ai = (e, i) => {
|
|
|
2452
2508
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2453
2509
|
onLeadSubmitted: () => {
|
|
2454
2510
|
},
|
|
2455
|
-
PresentedBy:
|
|
2511
|
+
PresentedBy: G,
|
|
2456
2512
|
rulesDisplay: e.rulesDisplay,
|
|
2457
2513
|
content: /* @__PURE__ */ t(
|
|
2458
|
-
|
|
2514
|
+
Dt,
|
|
2459
2515
|
{
|
|
2460
2516
|
signInCTA: e.signInCTA,
|
|
2461
2517
|
labels: (s = (l = e.signInCTA) == null ? void 0 : l.gate) == null ? void 0 : s.labels,
|
|
2462
|
-
primaryColor:
|
|
2518
|
+
primaryColor: d,
|
|
2463
2519
|
textColor: (o == null ? void 0 : o.contentColor) || r.colorSchemes.dark.textColor,
|
|
2464
2520
|
align: "center"
|
|
2465
2521
|
}
|
|
2466
2522
|
)
|
|
2467
2523
|
}
|
|
2468
2524
|
);
|
|
2469
|
-
},
|
|
2470
|
-
const { t: i } =
|
|
2525
|
+
}, xa = (e) => {
|
|
2526
|
+
const { t: i } = W();
|
|
2471
2527
|
return /* @__PURE__ */ t(
|
|
2472
|
-
|
|
2528
|
+
Lt,
|
|
2473
2529
|
{
|
|
2474
2530
|
entity: e.personalityQuiz,
|
|
2475
2531
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2479,17 +2535,17 @@ const Ai = (e, i) => {
|
|
|
2479
2535
|
imagePosition: e.imagePosition,
|
|
2480
2536
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2481
2537
|
isSubmitting: e.isSubmitting,
|
|
2482
|
-
MainCard:
|
|
2483
|
-
PresentedBy:
|
|
2538
|
+
MainCard: X,
|
|
2539
|
+
PresentedBy: G,
|
|
2484
2540
|
CollectLeadWrapper: Be,
|
|
2485
2541
|
consents: e.consents
|
|
2486
2542
|
}
|
|
2487
2543
|
);
|
|
2488
|
-
},
|
|
2544
|
+
}, pa = (e) => {
|
|
2489
2545
|
var a, l, s;
|
|
2490
|
-
const { t: i } =
|
|
2546
|
+
const { t: i } = W(), r = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, o = re(), d = (r == null ? void 0 : r.primaryColor) || o.palette.primary.plainColor;
|
|
2491
2547
|
return /* @__PURE__ */ t(
|
|
2492
|
-
|
|
2548
|
+
Lt,
|
|
2493
2549
|
{
|
|
2494
2550
|
entity: e.personalityQuiz,
|
|
2495
2551
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2498,35 +2554,35 @@ const Ai = (e, i) => {
|
|
|
2498
2554
|
imagePosition: e.imagePosition,
|
|
2499
2555
|
onLeadSubmitted: e.onSubmit,
|
|
2500
2556
|
isSubmitting: e.isSubmitting,
|
|
2501
|
-
MainCard:
|
|
2502
|
-
PresentedBy:
|
|
2557
|
+
MainCard: X,
|
|
2558
|
+
PresentedBy: G,
|
|
2503
2559
|
rulesDisplay: e.rulesDisplay,
|
|
2504
2560
|
content: /* @__PURE__ */ t(
|
|
2505
2561
|
Te,
|
|
2506
2562
|
{
|
|
2507
2563
|
consents: e.consents,
|
|
2508
|
-
primaryColor:
|
|
2564
|
+
primaryColor: d,
|
|
2509
2565
|
brandingUrls: (l = e.personalityQuiz.branding) == null ? void 0 : l.urls,
|
|
2510
2566
|
align: "center"
|
|
2511
2567
|
}
|
|
2512
2568
|
),
|
|
2513
2569
|
footerAction: /* @__PURE__ */ t(
|
|
2514
|
-
|
|
2570
|
+
it,
|
|
2515
2571
|
{
|
|
2516
2572
|
onClick: e.onSubmit,
|
|
2517
2573
|
label: ((s = e.consents.labels) == null ? void 0 : s.ctaLabel) || i("personalityQuiz.buttons.finish"),
|
|
2518
2574
|
isSubmitting: e.isSubmitting,
|
|
2519
|
-
primaryColor:
|
|
2575
|
+
primaryColor: d,
|
|
2520
2576
|
showArrow: !0
|
|
2521
2577
|
}
|
|
2522
2578
|
)
|
|
2523
2579
|
}
|
|
2524
2580
|
);
|
|
2525
|
-
},
|
|
2581
|
+
}, va = (e) => {
|
|
2526
2582
|
var a, l;
|
|
2527
|
-
const { t: i } =
|
|
2583
|
+
const { t: i } = W(), r = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, o = re(), d = (r == null ? void 0 : r.primaryColor) || o.palette.primary.plainColor;
|
|
2528
2584
|
return /* @__PURE__ */ t(
|
|
2529
|
-
|
|
2585
|
+
Ut,
|
|
2530
2586
|
{
|
|
2531
2587
|
entity: e.personalityQuiz,
|
|
2532
2588
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2534,8 +2590,8 @@ const Ai = (e, i) => {
|
|
|
2534
2590
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2535
2591
|
onLeadSubmitted: e.onSubmit,
|
|
2536
2592
|
isSubmitting: e.isSubmitting,
|
|
2537
|
-
MainCard:
|
|
2538
|
-
PresentedBy:
|
|
2593
|
+
MainCard: X,
|
|
2594
|
+
PresentedBy: G,
|
|
2539
2595
|
rulesDisplay: e.rulesDisplay,
|
|
2540
2596
|
content: (
|
|
2541
2597
|
// This template keeps its CTA inside the content frame
|
|
@@ -2543,7 +2599,7 @@ const Ai = (e, i) => {
|
|
|
2543
2599
|
Te,
|
|
2544
2600
|
{
|
|
2545
2601
|
consents: e.consents,
|
|
2546
|
-
primaryColor:
|
|
2602
|
+
primaryColor: d,
|
|
2547
2603
|
brandingUrls: (l = e.personalityQuiz.branding) == null ? void 0 : l.urls,
|
|
2548
2604
|
onSubmit: e.onSubmit,
|
|
2549
2605
|
isSubmitting: e.isSubmitting,
|
|
@@ -2555,11 +2611,11 @@ const Ai = (e, i) => {
|
|
|
2555
2611
|
)
|
|
2556
2612
|
}
|
|
2557
2613
|
);
|
|
2558
|
-
},
|
|
2614
|
+
}, Ca = (e) => {
|
|
2559
2615
|
var a, l, s;
|
|
2560
|
-
const { t: i } =
|
|
2616
|
+
const { t: i } = W(), r = te(), o = ((a = e.personalityQuiz.branding) == null ? void 0 : a.colors) || null, d = (o == null ? void 0 : o.primaryColor) || r.colorSchemes.dark.palette.primary.plainColor;
|
|
2561
2617
|
return /* @__PURE__ */ t(
|
|
2562
|
-
|
|
2618
|
+
Rt,
|
|
2563
2619
|
{
|
|
2564
2620
|
entity: e.personalityQuiz,
|
|
2565
2621
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2567,33 +2623,33 @@ const Ai = (e, i) => {
|
|
|
2567
2623
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2568
2624
|
onLeadSubmitted: e.onSubmit,
|
|
2569
2625
|
isSubmitting: e.isSubmitting,
|
|
2570
|
-
PresentedBy:
|
|
2626
|
+
PresentedBy: G,
|
|
2571
2627
|
rulesDisplay: e.rulesDisplay,
|
|
2572
2628
|
content: /* @__PURE__ */ t(
|
|
2573
2629
|
Te,
|
|
2574
2630
|
{
|
|
2575
2631
|
consents: e.consents,
|
|
2576
|
-
primaryColor:
|
|
2632
|
+
primaryColor: d,
|
|
2577
2633
|
textColor: (o == null ? void 0 : o.contentColor) || r.colorSchemes.dark.textColor,
|
|
2578
2634
|
brandingUrls: (l = e.personalityQuiz.branding) == null ? void 0 : l.urls
|
|
2579
2635
|
}
|
|
2580
2636
|
),
|
|
2581
2637
|
footerAction: /* @__PURE__ */ t(
|
|
2582
|
-
|
|
2638
|
+
it,
|
|
2583
2639
|
{
|
|
2584
2640
|
onClick: e.onSubmit,
|
|
2585
2641
|
label: ((s = e.consents.labels) == null ? void 0 : s.ctaLabel) || i("personalityQuiz.buttons.finish"),
|
|
2586
2642
|
isSubmitting: e.isSubmitting,
|
|
2587
|
-
primaryColor:
|
|
2643
|
+
primaryColor: d,
|
|
2588
2644
|
showArrow: !0
|
|
2589
2645
|
}
|
|
2590
2646
|
)
|
|
2591
2647
|
}
|
|
2592
2648
|
);
|
|
2593
|
-
},
|
|
2594
|
-
const { t: i } =
|
|
2649
|
+
}, Ia = (e) => {
|
|
2650
|
+
const { t: i } = W();
|
|
2595
2651
|
return /* @__PURE__ */ t(
|
|
2596
|
-
|
|
2652
|
+
Ut,
|
|
2597
2653
|
{
|
|
2598
2654
|
entity: e.personalityQuiz,
|
|
2599
2655
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2602,16 +2658,16 @@ const Ai = (e, i) => {
|
|
|
2602
2658
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2603
2659
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2604
2660
|
isSubmitting: e.isSubmitting,
|
|
2605
|
-
MainCard:
|
|
2606
|
-
PresentedBy:
|
|
2661
|
+
MainCard: X,
|
|
2662
|
+
PresentedBy: G,
|
|
2607
2663
|
CollectLeadWrapper: Be,
|
|
2608
2664
|
consents: e.consents
|
|
2609
2665
|
}
|
|
2610
2666
|
);
|
|
2611
|
-
},
|
|
2612
|
-
const { t: i } =
|
|
2667
|
+
}, Sa = (e) => {
|
|
2668
|
+
const { t: i } = W();
|
|
2613
2669
|
return /* @__PURE__ */ t(
|
|
2614
|
-
|
|
2670
|
+
Rt,
|
|
2615
2671
|
{
|
|
2616
2672
|
entity: e.personalityQuiz,
|
|
2617
2673
|
headline: i("personalityQuiz.headline"),
|
|
@@ -2620,487 +2676,496 @@ const Ai = (e, i) => {
|
|
|
2620
2676
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
2621
2677
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2622
2678
|
isSubmitting: e.isSubmitting,
|
|
2623
|
-
PresentedBy:
|
|
2679
|
+
PresentedBy: G,
|
|
2624
2680
|
CollectLeadWrapper: Be,
|
|
2625
2681
|
consents: e.consents
|
|
2626
2682
|
}
|
|
2627
2683
|
);
|
|
2628
2684
|
};
|
|
2629
|
-
function
|
|
2630
|
-
return e.template ===
|
|
2685
|
+
function pe(e) {
|
|
2686
|
+
return e.template === _.STANDARD;
|
|
2631
2687
|
}
|
|
2632
|
-
const
|
|
2633
|
-
var
|
|
2634
|
-
const [i, r] =
|
|
2688
|
+
const za = (e) => {
|
|
2689
|
+
var Wt, Vt, jt, Gt;
|
|
2690
|
+
const [i, r] = M(1), [o, d] = M(null), [a, l] = M([]), [s, C] = M([]), [y, g] = M(!1), [u, h] = M(!1), [m, x] = M(!1), [P, b] = M(!1), [k, p] = M(!1), [q, v] = M(!1), [T, F] = M(!1), [Q, S] = M(!1), [D, z] = M(!1), [A, L] = M(!1), $ = ve(!1), c = Li(e.entityId, e.sdk), U = ci(c == null ? void 0 : c.status), R = di({
|
|
2635
2691
|
signInCTA: e.signInCTA,
|
|
2636
|
-
authRequired: (
|
|
2692
|
+
authRequired: (c == null ? void 0 : c.authRequirement) === "REGISTERED",
|
|
2637
2693
|
userIsLoggedIn: e.userIsLoggedIn,
|
|
2638
|
-
totalSteps: ((
|
|
2639
|
-
}),
|
|
2640
|
-
myParticipation:
|
|
2641
|
-
isUnauthorized:
|
|
2642
|
-
isApiError:
|
|
2643
|
-
apiMessage:
|
|
2644
|
-
setIsUnauthorized:
|
|
2645
|
-
setIsApiError:
|
|
2646
|
-
setApiMessage:
|
|
2647
|
-
} =
|
|
2694
|
+
totalSteps: ((Wt = c == null ? void 0 : c.questions) == null ? void 0 : Wt.length) ?? 0
|
|
2695
|
+
}), E = R.isDeferred && R.isPending, {
|
|
2696
|
+
myParticipation: V,
|
|
2697
|
+
isUnauthorized: J,
|
|
2698
|
+
isApiError: Y,
|
|
2699
|
+
apiMessage: oe,
|
|
2700
|
+
setIsUnauthorized: se,
|
|
2701
|
+
setIsApiError: ce,
|
|
2702
|
+
setApiMessage: me
|
|
2703
|
+
} = Di(
|
|
2648
2704
|
e.entityId,
|
|
2649
2705
|
e.sdk,
|
|
2650
2706
|
u,
|
|
2651
|
-
|
|
2652
|
-
|
|
2707
|
+
E,
|
|
2708
|
+
R.isSignedIn
|
|
2653
2709
|
), {
|
|
2654
2710
|
loading: ae,
|
|
2655
|
-
pending:
|
|
2656
|
-
checked:
|
|
2657
|
-
setChecked:
|
|
2658
|
-
allRequiredChecked:
|
|
2659
|
-
submit:
|
|
2660
|
-
} =
|
|
2711
|
+
pending: ne,
|
|
2712
|
+
checked: Pe,
|
|
2713
|
+
setChecked: qe,
|
|
2714
|
+
allRequiredChecked: Ee,
|
|
2715
|
+
submit: ze
|
|
2716
|
+
} = ui({
|
|
2661
2717
|
sdk: e.sdk,
|
|
2662
|
-
consents: (
|
|
2718
|
+
consents: (Vt = e.consents) == null ? void 0 : Vt.items,
|
|
2663
2719
|
entityId: e.entityId,
|
|
2664
2720
|
entityType: "personality_quiz"
|
|
2665
|
-
}),
|
|
2666
|
-
|
|
2667
|
-
},
|
|
2668
|
-
var
|
|
2721
|
+
}), Le = !!((c == null ? void 0 : c.authRequirement) === "LEAD" ? (jt = e.leads) == null ? void 0 : jt.position : void 0) && ne.length > 0, we = Le ? [] : ne.filter((I) => I.position !== "after"), ke = Le ? [] : ne.filter((I) => I.position === "after"), ei = (I) => {
|
|
2722
|
+
qe(I), L(!1);
|
|
2723
|
+
}, Ft = (I) => {
|
|
2724
|
+
var B;
|
|
2669
2725
|
return {
|
|
2670
|
-
items:
|
|
2671
|
-
checked:
|
|
2672
|
-
onChange:
|
|
2673
|
-
labels: (
|
|
2726
|
+
items: I,
|
|
2727
|
+
checked: Pe,
|
|
2728
|
+
onChange: ei,
|
|
2729
|
+
labels: (B = e.consents) == null ? void 0 : B.labels,
|
|
2674
2730
|
showError: A
|
|
2675
2731
|
};
|
|
2676
|
-
},
|
|
2677
|
-
var
|
|
2678
|
-
if (!
|
|
2679
|
-
const
|
|
2680
|
-
return `${((
|
|
2681
|
-
}, [
|
|
2682
|
-
read:
|
|
2683
|
-
save:
|
|
2684
|
-
clear:
|
|
2685
|
-
} =
|
|
2732
|
+
}, ti = gt(() => {
|
|
2733
|
+
var B;
|
|
2734
|
+
if (!c) return "";
|
|
2735
|
+
const I = (c.questions || []).map((K) => K.questionId).join(",");
|
|
2736
|
+
return `${((B = c.questions) == null ? void 0 : B.length) ?? 0}:${I}`;
|
|
2737
|
+
}, [c]), {
|
|
2738
|
+
read: Ht,
|
|
2739
|
+
save: Ot,
|
|
2740
|
+
clear: $e
|
|
2741
|
+
} = gi({
|
|
2686
2742
|
namespace: "personality-quiz",
|
|
2687
2743
|
entityId: e.entityId,
|
|
2688
|
-
fingerprint:
|
|
2689
|
-
}),
|
|
2690
|
-
|
|
2691
|
-
var
|
|
2692
|
-
if (ae ||
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2744
|
+
fingerprint: ti
|
|
2745
|
+
}), De = ve([]), rt = ve(!1);
|
|
2746
|
+
fe(() => {
|
|
2747
|
+
var B;
|
|
2748
|
+
if (ae || $.current) return;
|
|
2749
|
+
const I = (c == null ? void 0 : c.authRequirement) === "LEAD" && ((B = e.leads) == null ? void 0 : B.position) === "before";
|
|
2750
|
+
F(
|
|
2751
|
+
!U && !I && we.length > 0
|
|
2752
|
+
);
|
|
2695
2753
|
}, [
|
|
2696
2754
|
ae,
|
|
2697
|
-
|
|
2698
|
-
|
|
2755
|
+
we.length,
|
|
2756
|
+
c == null ? void 0 : c.authRequirement,
|
|
2757
|
+
U
|
|
2699
2758
|
]);
|
|
2700
|
-
const
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
}, [e.language]),
|
|
2704
|
-
var
|
|
2705
|
-
(
|
|
2706
|
-
}, [s]),
|
|
2707
|
-
if (
|
|
2759
|
+
const Me = (Gt = s[0]) != null && Gt.personalityQuizId ? s[0] : V == null ? void 0 : V[0], xe = gt(() => !c || !(Me != null && Me.personalityQuizId) || !c.maxAttempts ? !1 : c.maxAttempts <= Me.attempts, [c, Me]), Ve = gt(() => c ? mi(c.related) : null, [c]);
|
|
2760
|
+
fe(() => {
|
|
2761
|
+
fi(e.language || "en");
|
|
2762
|
+
}, [e.language]), fe(() => {
|
|
2763
|
+
var I, B, K;
|
|
2764
|
+
(I = s[0]) != null && I.personalityQuizId && ((K = (B = e.callbacks) == null ? void 0 : B.onFinish) == null || K.call(B, s[0]));
|
|
2765
|
+
}, [s]), fe(() => {
|
|
2766
|
+
if (rt.current || !(c != null && c.id) || !V || ae || !R.isDeferred || !R.isSignedIn) return;
|
|
2708
2767
|
if (a.length) {
|
|
2709
|
-
|
|
2768
|
+
rt.current = !0;
|
|
2710
2769
|
return;
|
|
2711
2770
|
}
|
|
2712
|
-
|
|
2713
|
-
const
|
|
2714
|
-
if (!
|
|
2715
|
-
if (
|
|
2716
|
-
|
|
2771
|
+
rt.current = !0;
|
|
2772
|
+
const I = Ht();
|
|
2773
|
+
if (!I) return;
|
|
2774
|
+
if (xe) {
|
|
2775
|
+
$e();
|
|
2717
2776
|
return;
|
|
2718
2777
|
}
|
|
2719
|
-
const
|
|
2720
|
-
l(
|
|
2721
|
-
Math.min(
|
|
2722
|
-
),
|
|
2778
|
+
const B = I.answers || [];
|
|
2779
|
+
l(B), r(
|
|
2780
|
+
Math.min(B.length + 1, c.questions.length)
|
|
2781
|
+
), I.checkedConsents && qe(I.checkedConsents), De.current = I.heldConsentIds || [], $.current = !0, F(!1);
|
|
2723
2782
|
}, [
|
|
2724
|
-
|
|
2725
|
-
|
|
2783
|
+
c,
|
|
2784
|
+
V,
|
|
2726
2785
|
ae,
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2786
|
+
R.isDeferred,
|
|
2787
|
+
R.isSignedIn,
|
|
2788
|
+
xe,
|
|
2730
2789
|
a.length,
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
]),
|
|
2735
|
-
!
|
|
2790
|
+
Ht,
|
|
2791
|
+
$e,
|
|
2792
|
+
qe
|
|
2793
|
+
]), fe(() => {
|
|
2794
|
+
!E || !(c != null && c.id) || a.length && Ot({
|
|
2736
2795
|
answers: a,
|
|
2737
|
-
checkedConsents:
|
|
2738
|
-
heldConsentIds:
|
|
2796
|
+
checkedConsents: Pe,
|
|
2797
|
+
heldConsentIds: De.current
|
|
2739
2798
|
});
|
|
2740
|
-
}, [
|
|
2741
|
-
|
|
2742
|
-
}, [
|
|
2743
|
-
const
|
|
2744
|
-
if (
|
|
2745
|
-
var
|
|
2746
|
-
|
|
2747
|
-
}, [
|
|
2748
|
-
if (
|
|
2749
|
-
const
|
|
2750
|
-
(
|
|
2799
|
+
}, [E, c, a, Pe, Ot]), fe(() => {
|
|
2800
|
+
xe && $e();
|
|
2801
|
+
}, [xe, $e]);
|
|
2802
|
+
const je = ve(null);
|
|
2803
|
+
if (fe(() => {
|
|
2804
|
+
var I;
|
|
2805
|
+
R.isPending || !q || (v(!1), (I = je.current) == null || I.call(je));
|
|
2806
|
+
}, [R.isPending, q]), fe(() => {
|
|
2807
|
+
if (R.isPending || !De.current.length) return;
|
|
2808
|
+
const I = ne.filter(
|
|
2809
|
+
(B) => De.current.includes(B.consentId)
|
|
2751
2810
|
);
|
|
2752
|
-
|
|
2753
|
-
}, [
|
|
2754
|
-
return /* @__PURE__ */ t(
|
|
2755
|
-
if (!
|
|
2756
|
-
return /* @__PURE__ */ t(
|
|
2757
|
-
if (
|
|
2811
|
+
De.current = [], I.length && ze(I);
|
|
2812
|
+
}, [R.isPending, ne, ze]), !c || !V)
|
|
2813
|
+
return /* @__PURE__ */ t(Yt, { marginBlock: "160px" });
|
|
2814
|
+
if (!c.id)
|
|
2815
|
+
return /* @__PURE__ */ t(oa, {});
|
|
2816
|
+
if (c.status !== "ACTIVE" && !U)
|
|
2758
2817
|
return /* @__PURE__ */ t(
|
|
2759
|
-
|
|
2818
|
+
la,
|
|
2760
2819
|
{
|
|
2761
|
-
personalityQuiz:
|
|
2820
|
+
personalityQuiz: c,
|
|
2762
2821
|
template: e.template,
|
|
2763
|
-
imagePosition:
|
|
2822
|
+
imagePosition: pe(e) ? e.imagePosition : void 0,
|
|
2764
2823
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2765
2824
|
rulesDisplay: e.rulesDisplay
|
|
2766
2825
|
}
|
|
2767
2826
|
);
|
|
2768
|
-
if (
|
|
2769
|
-
return
|
|
2770
|
-
|
|
2827
|
+
if (R.isPending && R.position === "before" && !U)
|
|
2828
|
+
return pe(e) ? /* @__PURE__ */ t(
|
|
2829
|
+
ua,
|
|
2771
2830
|
{
|
|
2772
|
-
personalityQuiz:
|
|
2831
|
+
personalityQuiz: c,
|
|
2773
2832
|
imagePosition: e.imagePosition,
|
|
2774
2833
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2775
2834
|
signInCTA: e.signInCTA
|
|
2776
2835
|
}
|
|
2777
|
-
) : e.template ===
|
|
2778
|
-
|
|
2836
|
+
) : e.template === _.OVERLAY ? /* @__PURE__ */ t(
|
|
2837
|
+
fa,
|
|
2779
2838
|
{
|
|
2780
|
-
personalityQuiz:
|
|
2839
|
+
personalityQuiz: c,
|
|
2781
2840
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2782
2841
|
signInCTA: e.signInCTA
|
|
2783
2842
|
}
|
|
2784
2843
|
) : /* @__PURE__ */ t(
|
|
2785
|
-
|
|
2844
|
+
ga,
|
|
2786
2845
|
{
|
|
2787
|
-
personalityQuiz:
|
|
2846
|
+
personalityQuiz: c,
|
|
2788
2847
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2789
2848
|
signInCTA: e.signInCTA
|
|
2790
2849
|
}
|
|
2791
2850
|
);
|
|
2792
|
-
const
|
|
2793
|
-
|
|
2851
|
+
const ot = () => {
|
|
2852
|
+
ce(!1), se(!1), C([]), r(1), d(null), l([]), g(!1), x(!1), b(!1), p(!1), h(!u);
|
|
2794
2853
|
};
|
|
2795
|
-
if (
|
|
2796
|
-
return
|
|
2797
|
-
|
|
2854
|
+
if (J && !U || Y)
|
|
2855
|
+
return pe(e) ? /* @__PURE__ */ t(
|
|
2856
|
+
sa,
|
|
2798
2857
|
{
|
|
2799
|
-
personalityQuiz:
|
|
2858
|
+
personalityQuiz: c,
|
|
2800
2859
|
imagePosition: e.imagePosition,
|
|
2801
2860
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2802
|
-
apiErrorMessage:
|
|
2803
|
-
isApiError:
|
|
2861
|
+
apiErrorMessage: oe,
|
|
2862
|
+
isApiError: Y,
|
|
2804
2863
|
rulesDisplay: e.rulesDisplay,
|
|
2805
|
-
toggleTryAgain:
|
|
2864
|
+
toggleTryAgain: ot
|
|
2806
2865
|
}
|
|
2807
|
-
) : e.template ===
|
|
2808
|
-
|
|
2866
|
+
) : e.template === _.OVERLAY ? /* @__PURE__ */ t(
|
|
2867
|
+
da,
|
|
2809
2868
|
{
|
|
2810
|
-
personalityQuiz:
|
|
2869
|
+
personalityQuiz: c,
|
|
2811
2870
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2812
|
-
apiErrorMessage:
|
|
2813
|
-
isApiError:
|
|
2871
|
+
apiErrorMessage: oe,
|
|
2872
|
+
isApiError: Y,
|
|
2814
2873
|
rulesDisplay: e.rulesDisplay,
|
|
2815
|
-
toggleTryAgain:
|
|
2874
|
+
toggleTryAgain: ot
|
|
2816
2875
|
}
|
|
2817
2876
|
) : /* @__PURE__ */ t(
|
|
2818
|
-
|
|
2877
|
+
ca,
|
|
2819
2878
|
{
|
|
2820
|
-
personalityQuiz:
|
|
2879
|
+
personalityQuiz: c,
|
|
2821
2880
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2822
|
-
apiErrorMessage:
|
|
2823
|
-
isApiError:
|
|
2881
|
+
apiErrorMessage: oe,
|
|
2882
|
+
isApiError: Y,
|
|
2824
2883
|
rulesDisplay: e.rulesDisplay,
|
|
2825
|
-
toggleTryAgain:
|
|
2884
|
+
toggleTryAgain: ot
|
|
2826
2885
|
}
|
|
2827
2886
|
);
|
|
2828
|
-
const
|
|
2829
|
-
var
|
|
2830
|
-
|
|
2887
|
+
const lt = async () => {
|
|
2888
|
+
var K;
|
|
2889
|
+
if (U) return;
|
|
2890
|
+
const I = c.questions[i - 1], B = [
|
|
2831
2891
|
...a,
|
|
2832
2892
|
{
|
|
2833
|
-
questionId:
|
|
2893
|
+
questionId: I.questionId,
|
|
2834
2894
|
optionId: o
|
|
2835
2895
|
}
|
|
2836
2896
|
];
|
|
2837
|
-
if (l(
|
|
2838
|
-
r((Qe) => Qe + 1),
|
|
2897
|
+
if (l(B), i < c.questions.length) {
|
|
2898
|
+
r((Qe) => Qe + 1), d(null);
|
|
2839
2899
|
return;
|
|
2840
2900
|
}
|
|
2841
|
-
if (i ===
|
|
2842
|
-
if (
|
|
2843
|
-
|
|
2901
|
+
if (i === c.questions.length) {
|
|
2902
|
+
if (E) {
|
|
2903
|
+
v(!0);
|
|
2844
2904
|
return;
|
|
2845
2905
|
}
|
|
2846
|
-
if (
|
|
2847
|
-
|
|
2906
|
+
if (ke.length > 0 && !D) {
|
|
2907
|
+
S(!0);
|
|
2848
2908
|
return;
|
|
2849
2909
|
}
|
|
2850
|
-
if (((
|
|
2851
|
-
|
|
2910
|
+
if (((K = e.leads) == null ? void 0 : K.position) === "after" && c.authRequirement === "LEAD" && !P) {
|
|
2911
|
+
p(!0);
|
|
2852
2912
|
return;
|
|
2853
2913
|
}
|
|
2854
|
-
await
|
|
2914
|
+
await Ge(B);
|
|
2855
2915
|
}
|
|
2856
|
-
},
|
|
2916
|
+
}, Ge = async (I) => {
|
|
2857
2917
|
try {
|
|
2858
|
-
|
|
2859
|
-
const
|
|
2918
|
+
g(!0);
|
|
2919
|
+
const B = await e.sdk.miniGames.participateInPersonalityQuiz(
|
|
2860
2920
|
e.entityId,
|
|
2861
|
-
|
|
2921
|
+
I
|
|
2862
2922
|
);
|
|
2863
|
-
|
|
2864
|
-
} catch (
|
|
2865
|
-
|
|
2866
|
-
const { code:
|
|
2867
|
-
|
|
2923
|
+
g(!1), C([B]), d(null), $e();
|
|
2924
|
+
} catch (B) {
|
|
2925
|
+
g(!1), C([new Hn()]), console.error("[personality-quiz-play] participation failed", B);
|
|
2926
|
+
const { code: K, message: Qe } = yi(B, e.sdk);
|
|
2927
|
+
K === 401 || K === 403 ? se(!0) : (ce(!0), me(Qe || ""));
|
|
2868
2928
|
}
|
|
2869
|
-
},
|
|
2870
|
-
var
|
|
2871
|
-
if (
|
|
2872
|
-
|
|
2929
|
+
}, ni = async () => {
|
|
2930
|
+
var I;
|
|
2931
|
+
if (ke.length > 0 && !D) {
|
|
2932
|
+
S(!0);
|
|
2873
2933
|
return;
|
|
2874
2934
|
}
|
|
2875
|
-
if (((
|
|
2876
|
-
|
|
2935
|
+
if (((I = e.leads) == null ? void 0 : I.position) === "after" && c.authRequirement === "LEAD" && !P) {
|
|
2936
|
+
p(!0);
|
|
2877
2937
|
return;
|
|
2878
2938
|
}
|
|
2879
|
-
await
|
|
2939
|
+
await Ge(a);
|
|
2880
2940
|
};
|
|
2881
|
-
|
|
2882
|
-
const
|
|
2883
|
-
if (
|
|
2884
|
-
if (
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2941
|
+
je.current = ni;
|
|
2942
|
+
const st = async () => {
|
|
2943
|
+
if (!U) {
|
|
2944
|
+
if (we.length > 0) {
|
|
2945
|
+
if (m) return;
|
|
2946
|
+
if (!Ee(we)) {
|
|
2947
|
+
L(!0);
|
|
2948
|
+
return;
|
|
2949
|
+
}
|
|
2950
|
+
E ? De.current = we.map(
|
|
2951
|
+
(I) => I.consentId
|
|
2952
|
+
) : (x(!0), await ze(we), x(!1));
|
|
2888
2953
|
}
|
|
2889
|
-
|
|
2890
|
-
(h) => h.consentId
|
|
2891
|
-
) : (v(!0), await we(ke), v(!1));
|
|
2954
|
+
$.current = !0, F(!1);
|
|
2892
2955
|
}
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
if (!Ue(Ae)) {
|
|
2956
|
+
}, ii = async () => {
|
|
2957
|
+
if (!Ee(ke)) {
|
|
2896
2958
|
L(!0);
|
|
2897
2959
|
return;
|
|
2898
2960
|
}
|
|
2899
|
-
|
|
2900
|
-
},
|
|
2901
|
-
|
|
2902
|
-
},
|
|
2903
|
-
|
|
2904
|
-
},
|
|
2905
|
-
r(1),
|
|
2906
|
-
},
|
|
2907
|
-
const
|
|
2908
|
-
return e.template ===
|
|
2909
|
-
|
|
2961
|
+
x(!0), await ze(ke), z(!0), await Ge(a), x(!1), S(!1);
|
|
2962
|
+
}, ct = async () => {
|
|
2963
|
+
x(!0), await Ge(a), x(!1), b(!0);
|
|
2964
|
+
}, dt = (I) => {
|
|
2965
|
+
U || d(I);
|
|
2966
|
+
}, ut = () => {
|
|
2967
|
+
r(1), d(null), l([]), C([]), x(!1), b(!1), p(!1), S(!1), L(!1);
|
|
2968
|
+
}, ai = () => {
|
|
2969
|
+
const I = Ft(we), B = Le ? ne : void 0, K = ke.length > 0 && !D;
|
|
2970
|
+
return e.template === _.OVERLAY ? /* @__PURE__ */ t(
|
|
2971
|
+
$i,
|
|
2910
2972
|
{
|
|
2911
2973
|
sdk: e.sdk,
|
|
2912
2974
|
leads: e.leads,
|
|
2913
|
-
personalityQuiz:
|
|
2914
|
-
question:
|
|
2975
|
+
personalityQuiz: c,
|
|
2976
|
+
question: c.questions[i - 1],
|
|
2915
2977
|
selectedOption: o,
|
|
2916
2978
|
currentQuestion: i,
|
|
2917
|
-
answerQuestion:
|
|
2918
|
-
handleNext:
|
|
2979
|
+
answerQuestion: dt,
|
|
2980
|
+
handleNext: lt,
|
|
2919
2981
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2920
2982
|
rulesDisplay: e.rulesDisplay,
|
|
2921
2983
|
isLoading: y,
|
|
2922
|
-
consents:
|
|
2923
|
-
leadConsents:
|
|
2924
|
-
applyConsentGate:
|
|
2925
|
-
hasAfterConsents:
|
|
2926
|
-
isSubmitting:
|
|
2927
|
-
startPlaying:
|
|
2984
|
+
consents: I,
|
|
2985
|
+
leadConsents: B,
|
|
2986
|
+
applyConsentGate: T,
|
|
2987
|
+
hasAfterConsents: K,
|
|
2988
|
+
isSubmitting: m,
|
|
2989
|
+
startPlaying: st,
|
|
2990
|
+
expired: U
|
|
2928
2991
|
}
|
|
2929
|
-
) :
|
|
2930
|
-
|
|
2992
|
+
) : pe(e) ? /* @__PURE__ */ t(
|
|
2993
|
+
Oi,
|
|
2931
2994
|
{
|
|
2932
2995
|
sdk: e.sdk,
|
|
2933
2996
|
leads: e.leads,
|
|
2934
|
-
personalityQuiz:
|
|
2935
|
-
question:
|
|
2997
|
+
personalityQuiz: c,
|
|
2998
|
+
question: c.questions[i - 1],
|
|
2936
2999
|
selectedOption: o,
|
|
2937
3000
|
currentQuestion: i,
|
|
2938
|
-
answerQuestion:
|
|
2939
|
-
handleNext:
|
|
3001
|
+
answerQuestion: dt,
|
|
3002
|
+
handleNext: lt,
|
|
2940
3003
|
imagePosition: e.imagePosition,
|
|
2941
3004
|
userParticipation: a,
|
|
2942
3005
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2943
3006
|
rulesDisplay: e.rulesDisplay,
|
|
2944
3007
|
isLoading: y,
|
|
2945
|
-
consents:
|
|
2946
|
-
leadConsents:
|
|
2947
|
-
applyConsentGate:
|
|
2948
|
-
hasAfterConsents:
|
|
2949
|
-
isSubmitting:
|
|
2950
|
-
startPlaying:
|
|
3008
|
+
consents: I,
|
|
3009
|
+
leadConsents: B,
|
|
3010
|
+
applyConsentGate: T,
|
|
3011
|
+
hasAfterConsents: K,
|
|
3012
|
+
isSubmitting: m,
|
|
3013
|
+
startPlaying: st,
|
|
3014
|
+
expired: U
|
|
2951
3015
|
}
|
|
2952
3016
|
) : /* @__PURE__ */ t(
|
|
2953
|
-
|
|
3017
|
+
Vi,
|
|
2954
3018
|
{
|
|
2955
3019
|
sdk: e.sdk,
|
|
2956
3020
|
leads: e.leads,
|
|
2957
|
-
personalityQuiz:
|
|
2958
|
-
question:
|
|
3021
|
+
personalityQuiz: c,
|
|
3022
|
+
question: c.questions[i - 1],
|
|
2959
3023
|
selectedOption: o,
|
|
2960
3024
|
currentQuestion: i,
|
|
2961
|
-
answerQuestion:
|
|
2962
|
-
handleNext:
|
|
3025
|
+
answerQuestion: dt,
|
|
3026
|
+
handleNext: lt,
|
|
2963
3027
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2964
3028
|
rulesDisplay: e.rulesDisplay,
|
|
2965
3029
|
isLoading: y,
|
|
2966
|
-
consents:
|
|
2967
|
-
leadConsents:
|
|
2968
|
-
applyConsentGate:
|
|
2969
|
-
hasAfterConsents:
|
|
2970
|
-
isSubmitting:
|
|
2971
|
-
startPlaying:
|
|
3030
|
+
consents: I,
|
|
3031
|
+
leadConsents: B,
|
|
3032
|
+
applyConsentGate: T,
|
|
3033
|
+
hasAfterConsents: K,
|
|
3034
|
+
isSubmitting: m,
|
|
3035
|
+
startPlaying: st,
|
|
3036
|
+
expired: U
|
|
2972
3037
|
}
|
|
2973
3038
|
);
|
|
2974
3039
|
};
|
|
2975
|
-
if (
|
|
2976
|
-
const
|
|
2977
|
-
personalityQuiz:
|
|
3040
|
+
if (E && (q || R.position === "step" && i > R.afterStep)) {
|
|
3041
|
+
const I = {
|
|
3042
|
+
personalityQuiz: c,
|
|
2978
3043
|
sdk: e.sdk,
|
|
2979
3044
|
signInCTA: e.signInCTA,
|
|
2980
3045
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2981
3046
|
rulesDisplay: e.rulesDisplay
|
|
2982
3047
|
};
|
|
2983
|
-
return
|
|
2984
|
-
|
|
3048
|
+
return pe(e) ? /* @__PURE__ */ t(
|
|
3049
|
+
ya,
|
|
2985
3050
|
{
|
|
2986
|
-
...
|
|
3051
|
+
...I,
|
|
2987
3052
|
imagePosition: e.imagePosition
|
|
2988
3053
|
}
|
|
2989
|
-
) : e.template ===
|
|
3054
|
+
) : e.template === _.OVERLAY ? /* @__PURE__ */ t(ba, { ...I }) : /* @__PURE__ */ t(ha, { ...I });
|
|
2990
3055
|
}
|
|
2991
|
-
if (
|
|
2992
|
-
const
|
|
2993
|
-
personalityQuiz:
|
|
3056
|
+
if (Q && ke.length > 0) {
|
|
3057
|
+
const I = {
|
|
3058
|
+
personalityQuiz: c,
|
|
2994
3059
|
sdk: e.sdk,
|
|
2995
|
-
consents:
|
|
2996
|
-
onSubmit:
|
|
2997
|
-
isSubmitting:
|
|
3060
|
+
consents: Ft(ke),
|
|
3061
|
+
onSubmit: ii,
|
|
3062
|
+
isSubmitting: m,
|
|
2998
3063
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
2999
3064
|
rulesDisplay: e.rulesDisplay
|
|
3000
3065
|
};
|
|
3001
|
-
return
|
|
3002
|
-
|
|
3066
|
+
return pe(e) ? /* @__PURE__ */ t(
|
|
3067
|
+
pa,
|
|
3003
3068
|
{
|
|
3004
|
-
...
|
|
3069
|
+
...I,
|
|
3005
3070
|
imagePosition: e.imagePosition
|
|
3006
3071
|
}
|
|
3007
|
-
) : e.template ===
|
|
3072
|
+
) : e.template === _.OVERLAY ? /* @__PURE__ */ t(Ca, { ...I }) : /* @__PURE__ */ t(va, { ...I });
|
|
3008
3073
|
}
|
|
3009
|
-
if (
|
|
3010
|
-
return
|
|
3011
|
-
|
|
3074
|
+
if (k && !P)
|
|
3075
|
+
return pe(e) ? /* @__PURE__ */ t(
|
|
3076
|
+
xa,
|
|
3012
3077
|
{
|
|
3013
|
-
personalityQuiz:
|
|
3078
|
+
personalityQuiz: c,
|
|
3014
3079
|
sdk: e.sdk,
|
|
3015
3080
|
leads: e.leads,
|
|
3016
3081
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3017
3082
|
imagePosition: e.imagePosition,
|
|
3018
|
-
onLeadSubmitted:
|
|
3019
|
-
isSubmitting:
|
|
3020
|
-
consents:
|
|
3083
|
+
onLeadSubmitted: ct,
|
|
3084
|
+
isSubmitting: m,
|
|
3085
|
+
consents: Le ? ne : void 0
|
|
3021
3086
|
}
|
|
3022
|
-
) : e.template ===
|
|
3023
|
-
|
|
3087
|
+
) : e.template === _.SPLIT ? /* @__PURE__ */ t(
|
|
3088
|
+
Ia,
|
|
3024
3089
|
{
|
|
3025
|
-
personalityQuiz:
|
|
3090
|
+
personalityQuiz: c,
|
|
3026
3091
|
sdk: e.sdk,
|
|
3027
3092
|
leads: e.leads,
|
|
3028
3093
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3029
|
-
onLeadSubmitted:
|
|
3030
|
-
isSubmitting:
|
|
3031
|
-
consents:
|
|
3094
|
+
onLeadSubmitted: ct,
|
|
3095
|
+
isSubmitting: m,
|
|
3096
|
+
consents: Le ? ne : void 0
|
|
3032
3097
|
}
|
|
3033
|
-
) : e.template ===
|
|
3034
|
-
|
|
3098
|
+
) : e.template === _.OVERLAY ? /* @__PURE__ */ t(
|
|
3099
|
+
Sa,
|
|
3035
3100
|
{
|
|
3036
|
-
personalityQuiz:
|
|
3101
|
+
personalityQuiz: c,
|
|
3037
3102
|
sdk: e.sdk,
|
|
3038
3103
|
leads: e.leads,
|
|
3039
3104
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3040
|
-
onLeadSubmitted:
|
|
3041
|
-
isSubmitting:
|
|
3042
|
-
consents:
|
|
3105
|
+
onLeadSubmitted: ct,
|
|
3106
|
+
isSubmitting: m,
|
|
3107
|
+
consents: Le ? ne : void 0
|
|
3043
3108
|
}
|
|
3044
|
-
) : /* @__PURE__ */ t(
|
|
3045
|
-
if (s.length ||
|
|
3046
|
-
const
|
|
3047
|
-
return e.template ===
|
|
3048
|
-
|
|
3109
|
+
) : /* @__PURE__ */ t(Yt, { marginBlock: "160px" });
|
|
3110
|
+
if (s.length || xe) {
|
|
3111
|
+
const I = s[0] ?? V[0], B = Ve ? /* @__PURE__ */ t(Nt, { entityId: Ve, sdk: e.sdk, children: (Qe) => /* @__PURE__ */ t(_t, { infoPage: Qe, variant: e.chanceGameVariant }) }) : void 0, K = Ve ? /* @__PURE__ */ t(Nt, { entityId: Ve, sdk: e.sdk, children: (Qe) => /* @__PURE__ */ t(_t, { infoPage: Qe, variant: e.chanceGameVariant, forceMobile: !0 }) }) : void 0;
|
|
3112
|
+
return e.template === _.OVERLAY ? /* @__PURE__ */ t(
|
|
3113
|
+
ra,
|
|
3049
3114
|
{
|
|
3050
|
-
summary:
|
|
3115
|
+
summary: I,
|
|
3051
3116
|
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3052
|
-
personalityQuiz:
|
|
3053
|
-
maxAttemptsReached:
|
|
3054
|
-
playAgain:
|
|
3117
|
+
personalityQuiz: c,
|
|
3118
|
+
maxAttemptsReached: xe,
|
|
3119
|
+
playAgain: ut,
|
|
3055
3120
|
sdk: e.sdk,
|
|
3056
3121
|
leads: e.leads,
|
|
3057
3122
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3058
3123
|
rulesDisplay: e.rulesDisplay,
|
|
3059
3124
|
additionalCTA: e.additionalCTA,
|
|
3060
|
-
chanceGameContent:
|
|
3125
|
+
chanceGameContent: B
|
|
3061
3126
|
}
|
|
3062
|
-
) :
|
|
3063
|
-
|
|
3127
|
+
) : pe(e) ? /* @__PURE__ */ t(
|
|
3128
|
+
Zi,
|
|
3064
3129
|
{
|
|
3065
3130
|
imagePosition: e.imagePosition || "left",
|
|
3066
|
-
summary:
|
|
3131
|
+
summary: I,
|
|
3067
3132
|
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3068
|
-
personalityQuiz:
|
|
3069
|
-
maxAttemptsReached:
|
|
3133
|
+
personalityQuiz: c,
|
|
3134
|
+
maxAttemptsReached: xe,
|
|
3070
3135
|
sdk: e.sdk,
|
|
3071
3136
|
leads: e.leads,
|
|
3072
|
-
playAgain:
|
|
3137
|
+
playAgain: ut,
|
|
3073
3138
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3074
3139
|
rulesDisplay: e.rulesDisplay,
|
|
3075
3140
|
additionalCTA: e.additionalCTA,
|
|
3076
|
-
chanceGameContent:
|
|
3141
|
+
chanceGameContent: K
|
|
3077
3142
|
}
|
|
3078
3143
|
) : /* @__PURE__ */ t(
|
|
3079
|
-
|
|
3144
|
+
ta,
|
|
3080
3145
|
{
|
|
3081
|
-
summary:
|
|
3146
|
+
summary: I,
|
|
3082
3147
|
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
3083
|
-
personalityQuiz:
|
|
3084
|
-
maxAttemptsReached:
|
|
3085
|
-
playAgain:
|
|
3148
|
+
personalityQuiz: c,
|
|
3149
|
+
maxAttemptsReached: xe,
|
|
3150
|
+
playAgain: ut,
|
|
3086
3151
|
sdk: e.sdk,
|
|
3087
3152
|
leads: e.leads,
|
|
3088
3153
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3089
3154
|
rulesDisplay: e.rulesDisplay,
|
|
3090
3155
|
additionalCTA: e.additionalCTA,
|
|
3091
|
-
chanceGameContent:
|
|
3156
|
+
chanceGameContent: K
|
|
3092
3157
|
}
|
|
3093
3158
|
);
|
|
3094
3159
|
}
|
|
3095
|
-
return
|
|
3096
|
-
},
|
|
3160
|
+
return ai();
|
|
3161
|
+
}, wa = (e) => {
|
|
3097
3162
|
var r;
|
|
3098
|
-
const i =
|
|
3099
|
-
() => e.template ===
|
|
3163
|
+
const i = Je.useMemo(
|
|
3164
|
+
() => e.template === _.OVERLAY ? { ...e.themeOptions, mode: "dark" } : e.themeOptions,
|
|
3100
3165
|
[e.template, e.themeOptions]
|
|
3101
3166
|
);
|
|
3102
3167
|
return /* @__PURE__ */ t(
|
|
3103
|
-
|
|
3168
|
+
qi,
|
|
3104
3169
|
{
|
|
3105
3170
|
packageName: "personality-quiz-play",
|
|
3106
3171
|
language: e.language,
|
|
@@ -3111,7 +3176,7 @@ const va = (e) => {
|
|
|
3111
3176
|
children: e.children
|
|
3112
3177
|
}
|
|
3113
3178
|
);
|
|
3114
|
-
},
|
|
3179
|
+
}, Ba = (e) => /* @__PURE__ */ t(wa, { ...e, children: /* @__PURE__ */ t(za, { ...e }) });
|
|
3115
3180
|
export {
|
|
3116
|
-
|
|
3181
|
+
Ba as M
|
|
3117
3182
|
};
|