fansunited-frontend-components 0.0.97 → 0.0.99

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.
Files changed (69) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +958 -1464
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +1 -1
  5. package/CompetitionStatistics.js +2042 -2215
  6. package/CompetitorCard.js +4281 -4919
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +6010 -7547
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +546 -849
  12. package/List.js +227 -218
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +50 -42
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +2 -2
  17. package/PlayerOfTheMatch.js +285 -269
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +80 -127
  20. package/README.md +1 -1
  21. package/Standings.js +991 -1324
  22. package/TopX.js +1120 -1167
  23. package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
  24. package/chunks/CheckCircle-I1FktW5Y.js +13 -0
  25. package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
  26. package/chunks/Person-CXRqyF4E.js +11 -0
  27. package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
  28. package/chunks/Search-CIXthh0D.js +17 -0
  29. package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
  30. package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
  31. package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
  32. package/chunks/index-BENM3N_w.js +4 -0
  33. package/chunks/index-BRxAV693.js +4 -0
  34. package/chunks/index-BXYTsvIX.js +4 -0
  35. package/chunks/index-C0ilols1.js +4 -0
  36. package/chunks/index-D7VhczXH.js +4 -0
  37. package/chunks/index-DKwvdw9t.js +4 -0
  38. package/chunks/index-DZN-AITW.js +4 -0
  39. package/chunks/main-B2sDRFF4.js +2184 -0
  40. package/chunks/main-CzfWaEQP.js +4869 -0
  41. package/chunks/main-DFNl3g_U.js +4910 -0
  42. package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
  43. package/chunks/main-DiBlJBNb.js +1956 -0
  44. package/chunks/main-DxvBjXsd.js +1775 -0
  45. package/chunks/main-S8_NDSiY.js +3209 -0
  46. package/chunks/main-lBgr8Liq.js +6571 -0
  47. package/chunks/{withVersionStamp-BkiEu_79.js → withVersionStamp-BsLyhvNA.js} +1 -1
  48. package/package.json +2 -2
  49. package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
  50. package/chunks/OddsStrip-BnSp5TXa.js +0 -383
  51. package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
  52. package/chunks/chevron-left-CxfCSZcr.js +0 -13
  53. package/chunks/chevron-right-BEQMacFn.js +0 -13
  54. package/chunks/index-Aq5MbUB9.js +0 -4
  55. package/chunks/index-BBQm_8LD.js +0 -4
  56. package/chunks/index-BC_sWWgc.js +0 -4
  57. package/chunks/index-DXKDJ1Vp.js +0 -4
  58. package/chunks/index-DjT5NrbA.js +0 -4
  59. package/chunks/index-DvLRehH6.js +0 -4
  60. package/chunks/index-aIMaxR-p.js +0 -4
  61. package/chunks/main-52Wff7qC.js +0 -11441
  62. package/chunks/main-B58mi9jx.js +0 -5622
  63. package/chunks/main-BIdXUTZS.js +0 -7308
  64. package/chunks/main-DD-NEzC7.js +0 -8241
  65. package/chunks/main-DUnfJPzY.js +0 -3608
  66. package/chunks/main-DpCBqqg_.js +0 -1950
  67. package/chunks/main-Drznt1ak.js +0 -1790
  68. package/chunks/users-wbJRbqW8.js +0 -16
  69. package/chunks/x-CK4GYo7T.js +0 -14
package/ChanceGame.js CHANGED
@@ -1,989 +1,778 @@
1
- import { jsx as t, jsxs as w, Fragment as re } from "react/jsx-runtime";
2
- import { isMobile as J, isLarge as Ke, useCornerRadius as ve, useColors as le, useBorderSize as Se, NotFoundSkeleton as Je, ChanceGameTemplate as he, useFontFamily as we, useSpacingScale as xe, hexToRgb as Ce, useCurrentThemeMode as Te, useImageVariant as fe, WidgetTemplate as pe, StandardSkeleton as $e, useInternalTheme as Ae, OverlaySkeleton as Ie, defaultBgVertical as Ge, defaultBg as Ee, isTablet as qe, getBrandingClickUrl as Qe, useInfoPage as Ze, initializeI18n as et, Spinner as tt, ChanceGameVariant as ne, languageToCountryCode as ot, getLanguageDirection as nt, applyDirectionToMount as rt, widgetCacheKey as it, createWidgetCache as lt, ContainerProvider as at, ThemeProvider as st, ConstantsProvider as ct } from "fansunited-frontend-core";
3
- import Z, { useState as dt, useEffect as mt } from "react";
4
- import { useTranslation as se } from "react-i18next";
5
- import { Box as d, Typography as B, Button as ue } from "@mui/joy";
6
- import { u as ht, S as ie, c as Ve, D as He, C as ut, W as xt, d as ft, e as pt, f as gt, O as yt, F as bt, b as be, a as vt, P as St } from "./chunks/PickOneOfX-DaJtkbCw.js";
7
- import { CacheProvider as wt } from "@emotion/react";
8
- import { createPortal as kt } from "react-dom";
9
- import { w as Rt } from "./chunks/withVersionStamp-BkiEu_79.js";
10
- const ke = ({
11
- children: e,
12
- brandingBorderColor: c,
13
- state: a
14
- }) => {
15
- const n = J(), g = Ke(), o = a === "play" ? g : n, h = ve().md, i = c || le().secondaryContainer, s = Se().size + " solid " + i;
16
- return /* @__PURE__ */ t(
17
- d,
18
- {
19
- sx: {
20
- display: "flex",
21
- flexDirection: o ? "column" : "row",
22
- width: "100%",
23
- borderRadius: h,
24
- boxShadow: "md",
25
- border: s,
26
- overflow: "hidden",
27
- background: le().surface,
28
- minHeight: "250px"
29
- },
30
- children: e
31
- }
32
- );
33
- }, zt = ({
34
- template: e
35
- }) => {
36
- const { t: c } = se(), a = /* @__PURE__ */ t(
37
- Je,
1
+ import { jsx as o, jsxs as w, Fragment as ue } from "@emotion/react/jsx-runtime";
2
+ import { isMobile as q, ChanceGameTemplate as ye, useBorderSize as Je, hexToRgb as Ke, useColors as Re, useCurrentThemeMode as qe, useImageVariant as we, WidgetTemplate as ve, useInternalTheme as Qe, defaultBgVertical as Ze, defaultBg as et, isTablet as bt, getBrandingClickUrl as xt, useInfoPage as yt, initializeI18n as wt, ChanceGameVariant as ne, languageToCountryCode as vt } from "fansunited-frontend-core";
3
+ import kt, { useState as St, useEffect as zt } from "react";
4
+ import { NotFound as Ot, StandardSkeleton as tt, OverlaySkeleton as ot, Spinner as Mt, WidgetPortal as Rt } from "fansunited-frontend-core/ui/emotion";
5
+ import { useTranslation as me } from "react-i18next";
6
+ import { css as n, keyframes as nt } from "@emotion/react";
7
+ import { c as re, V as e, h as Me, d as Se, o as de, u as it, e as _t, S as ce, f as ct, D as rt, C as Wt, W as $t, g as Bt, i as Ct, j as Ft, O as Dt, F as Tt, b as ze, a as It, P as At } from "./chunks/PickOneOfX-DET4ZhjV.js";
8
+ import { w as Gt } from "./chunks/withVersionStamp-BsLyhvNA.js";
9
+ const Le = {
10
+ display: "flex",
11
+ width: "100%",
12
+ borderRadius: "var(--fu-ucrc-radius-md)",
13
+ border: "var(--fu-ucrc-border-size) solid var(--fu-ucrc-cg-card-border, var(--fu-ucrc-secondary-container))",
14
+ overflow: "hidden",
15
+ background: "var(--fu-ucrc-surface)",
16
+ minHeight: "250px"
17
+ }, Xe = {
18
+ row: n({ ...Le, flexDirection: "row" }),
19
+ column: n({ ...Le, flexDirection: "column" })
20
+ }, _e = ({ children: t, brandingBorderColor: l }) => /* @__PURE__ */ o(
21
+ "div",
22
+ {
23
+ css: q() ? Xe.column : Xe.row,
24
+ style: l ? { "--fu-ucrc-cg-card-border": l } : void 0,
25
+ children: t
26
+ }
27
+ ), Lt = ({ template: t }) => {
28
+ const { t: l } = me(), b = /* @__PURE__ */ o(
29
+ Ot,
38
30
  {
39
- notFoundTitle: c("chanceGame.chanceGameNotFound"),
40
- notFoundMessage: c("chanceGame.chanceGameNotFoundDescription")
31
+ title: l("chanceGame.chanceGameNotFound"),
32
+ message: l("chanceGame.chanceGameNotFoundDescription")
41
33
  }
42
34
  );
43
- return e === he.EMBED ? a : /* @__PURE__ */ t(ke, { brandingBorderColor: null, children: a });
44
- }, Me = ({
45
- infoPage: e,
46
- enableReset: c = !1,
47
- contentColor: a,
48
- primaryColor: n,
49
- secondaryColor: g,
50
- onPrimaryColor: o,
51
- backgroundColor: h,
52
- dangerColor: i,
53
- brandingLogo: r,
35
+ return t === ye.EMBED ? b : /* @__PURE__ */ o(_e, { brandingBorderColor: null, children: b });
36
+ }, d = (t) => `var(--fu-ucrc-cg-wheel-${t})`, Xt = nt({
37
+ "0%, 100%": { transform: "translateX(0)" },
38
+ "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
39
+ "20%, 40%, 60%, 80%": { transform: "translateX(8px)" }
40
+ }), Vt = nt({
41
+ "0%, 100%": { boxShadow: `0 4px 14px 0 ${d("p40")}, 0 0 20px ${d("p15")}` },
42
+ "50%": { boxShadow: `0 6px 24px 0 ${d("p60")}, 0 0 35px ${d("p25")}` }
43
+ }), le = { ...re, fontWeight: 400, fontSize: d("text"), color: e.content }, Ve = {
44
+ position: "relative",
45
+ width: "100%",
46
+ maxWidth: d("max"),
47
+ aspectRatio: "1",
48
+ marginTop: d("wheel-mt"),
49
+ display: "flex",
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ userSelect: "none",
53
+ zIndex: 1,
54
+ transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
55
+ "&[data-shake]": { animation: `${Xt} ${d("shake")} ease-in-out 2` }
56
+ }, Oe = {
57
+ borderRadius: e.radiusXl,
58
+ paddingBlock: d("btn-py"),
59
+ paddingInline: d("btn-px"),
60
+ backgroundColor: e.primary,
61
+ color: e.onPrimary,
62
+ fontSize: d("btn-font"),
63
+ fontWeight: 700,
64
+ fontFamily: e.fontPrimary,
65
+ textTransform: "uppercase",
66
+ letterSpacing: "0.5px",
67
+ minWidth: d("btn-min"),
68
+ zIndex: 1,
69
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
70
+ transform: "scale(1)",
71
+ "&:active": { transform: "scale(0.95)" },
72
+ "&:disabled": { opacity: 0.5, animation: "none" }
73
+ }, Et = {
74
+ ...re,
75
+ fontFamily: e.fontSecondary,
76
+ fontWeight: 400,
77
+ fontSize: d("disclaimer"),
78
+ color: e.content,
79
+ opacity: 0.7,
80
+ textAlign: "center",
81
+ maxWidth: "900px",
82
+ lineHeight: 1.4
83
+ }, p = {
84
+ titleBlock: n({
85
+ display: "flex",
86
+ flexDirection: "column",
87
+ gap: e.spaceXs,
88
+ alignItems: "center",
89
+ textAlign: "center",
90
+ width: "100%",
91
+ zIndex: 1
92
+ }),
93
+ title: n(Me, {
94
+ fontFamily: e.fontPrimary,
95
+ fontWeight: 700,
96
+ fontSize: d("title"),
97
+ color: e.content,
98
+ lineHeight: 1.2
99
+ }),
100
+ titleGlow: n(Me, {
101
+ fontFamily: e.fontPrimary,
102
+ fontWeight: 700,
103
+ fontSize: d("title"),
104
+ color: e.content,
105
+ lineHeight: 1.2,
106
+ textShadow: `0 0 20px ${d("dc20")}, 0 0 40px ${d("dc10")}`
107
+ }),
108
+ underline: n({ display: "flex", alignItems: "center", gap: e.spaceXs, marginTop: e.space2xs }),
109
+ underlineStart: n({
110
+ width: d("line"),
111
+ height: "1px",
112
+ background: `linear-gradient(90deg, transparent, ${d("dc40")})`
113
+ }),
114
+ underlineGem: n({ width: "6px", height: "6px", transform: "rotate(45deg)", background: d("dc50") }),
115
+ underlineEnd: n({
116
+ width: d("line"),
117
+ height: "1px",
118
+ background: `linear-gradient(90deg, ${d("dc40")}, transparent)`
119
+ }),
120
+ subtitle: n(le, { fontFamily: e.fontSecondary, opacity: 0.8 }),
121
+ welcome: n(le, { fontFamily: e.fontPrimary, textAlign: "center", marginBottom: e.spaceMd, zIndex: 1 }),
122
+ welcomeOverlay: n(le, { fontFamily: e.fontPrimary, textAlign: "center", marginBottom: 0, zIndex: 1 }),
123
+ instructions: n(le, {
124
+ fontFamily: e.fontSecondary,
125
+ opacity: 0.7,
126
+ textAlign: "center",
127
+ maxWidth: d("instructions"),
128
+ zIndex: 1
129
+ }),
130
+ wheel: n(Ve),
131
+ wheelGlow: n(Ve, { filter: `drop-shadow(0 0 ${d("glow1")} ${d("dc20")}) drop-shadow(0 0 ${d("glow2")} ${d("dc10")})` }),
132
+ logo: n({
133
+ position: "absolute",
134
+ top: "50%",
135
+ left: "50%",
136
+ transform: "translate(-50%, -50%)",
137
+ width: "15%",
138
+ height: "15%",
139
+ objectFit: "contain",
140
+ borderRadius: "50%",
141
+ zIndex: 3,
142
+ pointerEvents: "none",
143
+ filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
144
+ }),
145
+ spin: n(Se, Oe, {
146
+ boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)",
147
+ "&:hover": { transform: "scale(1.05)", boxShadow: "0 6px 20px 0 rgba(0,0,0,0.2)" }
148
+ }),
149
+ spinDecorated: n(Se, Oe, {
150
+ boxShadow: `0 4px 14px 0 ${d("p40")}, 0 0 20px ${d("p15")}`,
151
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${d("p50")}, 0 0 30px ${d("p20")}` }
152
+ }),
153
+ spinPulsing: n(Se, Oe, {
154
+ boxShadow: `0 4px 14px 0 ${d("p40")}, 0 0 20px ${d("p15")}`,
155
+ animation: `${Vt} 2.5s ease-in-out infinite`,
156
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${d("p50")}, 0 0 30px ${d("p20")}` }
157
+ }),
158
+ reset: n(de, {
159
+ borderRadius: e.radiusXl,
160
+ paddingBlock: e.spaceSm,
161
+ paddingInline: e.spaceLg,
162
+ borderColor: e.outline,
163
+ color: e.content,
164
+ fontSize: d("reset-font"),
165
+ fontWeight: 700,
166
+ fontFamily: e.fontPrimary,
167
+ textTransform: "uppercase",
168
+ zIndex: 1,
169
+ "&:hover": { borderColor: e.primary, backgroundColor: "transparent", color: e.primary }
170
+ }),
171
+ standard: n({
172
+ display: "flex",
173
+ flexDirection: "column",
174
+ width: "100%",
175
+ height: "100%",
176
+ gap: e.spaceLg,
177
+ alignItems: "center",
178
+ position: "relative",
179
+ overflow: "auto",
180
+ boxSizing: "border-box"
181
+ }),
182
+ standardWelcome: n(le, { fontFamily: e.fontPrimary, textAlign: "center", paddingInline: e.spaceMd }),
183
+ standardArea: n({
184
+ display: "flex",
185
+ flexDirection: "column",
186
+ paddingInline: e.spaceMd,
187
+ width: "100%",
188
+ boxSizing: "border-box"
189
+ }),
190
+ standardStack: n({ display: "flex", flexDirection: "column", gap: d("stack-gap") }),
191
+ box: n({
192
+ borderRadius: e.radiusMd,
193
+ paddingInline: e.spaceSm,
194
+ paddingTop: e.spaceSm,
195
+ paddingBottom: e.spaceMd,
196
+ gap: e.spaceMd,
197
+ backgroundColor: d("box-bg"),
198
+ display: "flex",
199
+ flexDirection: "column",
200
+ alignItems: "center",
201
+ backdropFilter: "blur(4px)",
202
+ position: "relative",
203
+ overflow: "hidden"
204
+ }),
205
+ boxDecorated: n({
206
+ borderRadius: e.radiusMd,
207
+ paddingInline: e.spaceSm,
208
+ paddingTop: e.spaceSm,
209
+ paddingBottom: e.spaceMd,
210
+ gap: e.spaceMd,
211
+ backgroundColor: d("box-bg"),
212
+ display: "flex",
213
+ flexDirection: "column",
214
+ alignItems: "center",
215
+ backdropFilter: "blur(4px)",
216
+ position: "relative",
217
+ overflow: "hidden",
218
+ border: d("box-border")
219
+ }),
220
+ footer: n({ display: "flex", flexDirection: "column", alignItems: "center", gap: e.spaceMd }),
221
+ disclaimer: n(Et),
222
+ embed: n({
223
+ display: "flex",
224
+ flexDirection: "column",
225
+ width: "100%",
226
+ padding: d("pad"),
227
+ gap: e.spaceLg,
228
+ alignItems: "center",
229
+ position: "relative",
230
+ overflow: "hidden",
231
+ boxSizing: "border-box"
232
+ })
233
+ }, at = ({
234
+ infoPage: t,
235
+ enableReset: l = !1,
236
+ contentColor: b,
237
+ primaryColor: m,
238
+ secondaryColor: y,
239
+ onPrimaryColor: a,
240
+ backgroundColor: i,
241
+ dangerColor: c,
242
+ brandingLogo: $,
54
243
  isDark: s = !1,
55
- showTitleBlock: k = !1,
56
- variant: z
244
+ showTitleBlock: W = !1,
245
+ variant: B
57
246
  }) => {
58
- var E, q, M;
59
- const x = J(), b = le(), p = ve(), l = we(), m = xe(), O = Se(), v = z === "standard", u = z === "overlay", C = v || u, G = JSON.parse(e.body), L = G.segments || [], f = e.labels || {}, N = G.mode || ((E = G.config) == null ? void 0 : E.mode) || "fair", V = ((q = G.config) == null ? void 0 : q.pace) || "normal", _ = ((M = G.config) == null ? void 0 : M.decorations) ?? !1, D = Ve(n, s), {
247
+ var ee, pe, he;
248
+ const h = q(), v = it(), f = Je(), r = B === "standard", k = B === "overlay", O = r || k, A = JSON.parse(t.body), L = A.segments || [], x = t.labels || {}, _ = A.mode || ((ee = A.config) == null ? void 0 : ee.mode) || "fair", P = ((pe = A.config) == null ? void 0 : pe.pace) || "normal", M = ((he = A.config) == null ? void 0 : he.decorations) ?? !1, F = ct(m, s), {
60
249
  isSpinning: T,
61
- finalRotation: H,
62
- selectedSegment: y,
63
- showShakeAnimation: X,
64
- showResultScreen: F,
65
- showInlineResult: R,
66
- hasEntered: $,
67
- confettiActive: W,
68
- spinDuration: P,
250
+ finalRotation: N,
251
+ selectedSegment: g,
252
+ showShakeAnimation: H,
253
+ showResultScreen: D,
254
+ showInlineResult: S,
255
+ hasEntered: C,
256
+ confettiActive: I,
257
+ spinDuration: R,
69
258
  shakeAnimationDuration: U,
70
259
  confettiVelocityMultiplier: j,
71
- confettiGravity: A,
72
- handleSpin: I,
73
- handleReset: S,
74
- onConfettiComplete: ee
75
- } = ht({ segments: L, mode: N, pace: V }), te = C ? x ? "260px" : "340px" : x ? "320px" : "450px", Y = () => /* @__PURE__ */ w(re, { children: [
76
- _ && /* @__PURE__ */ t(
77
- He,
78
- {
79
- primaryColor: n,
80
- isDark: s,
81
- animationPrefix: "wheel"
82
- }
83
- ),
84
- /* @__PURE__ */ t(
85
- ut,
260
+ confettiGravity: te,
261
+ handleSpin: X,
262
+ handleReset: V,
263
+ onConfettiComplete: z
264
+ } = _t({ segments: L, mode: _, pace: P }), Q = Ke(i), oe = Q ? Q.replace(/[^\d,]/g, "") : "", Y = {
265
+ ...v,
266
+ "--fu-ucrc-cg-content": b,
267
+ "--fu-ucrc-cg-primary": m,
268
+ "--fu-ucrc-cg-on-primary": a,
269
+ "--fu-ucrc-cg-wheel-dc10": F("10"),
270
+ "--fu-ucrc-cg-wheel-dc20": F("20"),
271
+ "--fu-ucrc-cg-wheel-dc40": F("40"),
272
+ "--fu-ucrc-cg-wheel-dc50": F("50"),
273
+ "--fu-ucrc-cg-wheel-p15": `${m}15`,
274
+ "--fu-ucrc-cg-wheel-p20": `${m}20`,
275
+ "--fu-ucrc-cg-wheel-p25": `${m}25`,
276
+ "--fu-ucrc-cg-wheel-p40": `${m}40`,
277
+ "--fu-ucrc-cg-wheel-p50": `${m}50`,
278
+ "--fu-ucrc-cg-wheel-p60": `${m}60`,
279
+ // Wheel dimensions — compact for Standard and Overlay
280
+ "--fu-ucrc-cg-wheel-max": O ? h ? "260px" : "340px" : h ? "320px" : "450px",
281
+ "--fu-ucrc-cg-wheel-wheel-mt": O ? e.spaceMd : "0px",
282
+ "--fu-ucrc-cg-wheel-shake": `${U / 2}ms`,
283
+ "--fu-ucrc-cg-wheel-glow1": h ? "15px" : "25px",
284
+ "--fu-ucrc-cg-wheel-glow2": h ? "40px" : "60px",
285
+ "--fu-ucrc-cg-wheel-title": h ? "1.5rem" : "2rem",
286
+ "--fu-ucrc-cg-wheel-text": h ? "0.875rem" : "1rem",
287
+ "--fu-ucrc-cg-wheel-line": h ? "40px" : "60px",
288
+ "--fu-ucrc-cg-wheel-instructions": r ? "400px" : "600px",
289
+ "--fu-ucrc-cg-wheel-btn-py": O ? e.spaceSm : e.spaceMd,
290
+ "--fu-ucrc-cg-wheel-btn-px": O ? e.spaceLg : e.spaceXl,
291
+ "--fu-ucrc-cg-wheel-btn-font": O ? h ? "0.75rem" : "0.875rem" : h ? "1rem" : "1.125rem",
292
+ "--fu-ucrc-cg-wheel-btn-min": O ? "auto" : h ? "200px" : "250px",
293
+ "--fu-ucrc-cg-wheel-reset-font": h ? "0.75rem" : "0.875rem",
294
+ "--fu-ucrc-cg-wheel-disclaimer": h ? "0.625rem" : "0.75rem",
295
+ "--fu-ucrc-cg-wheel-stack-gap": h ? e.spaceLg : e.spaceMd,
296
+ "--fu-ucrc-cg-wheel-box-bg": `rgba(${oe}, 0.5)`,
297
+ "--fu-ucrc-cg-wheel-box-border": `${f.size} solid ${F("15")}`,
298
+ "--fu-ucrc-cg-wheel-pad": h ? e.spaceLg : e.spaceXl
299
+ }, E = T || I || !D && !S && g !== null, Z = () => /* @__PURE__ */ w(ue, { children: [
300
+ M && /* @__PURE__ */ o(rt, { primaryColor: m, isDark: s, animationPrefix: "wheel" }),
301
+ /* @__PURE__ */ o(
302
+ Wt,
86
303
  {
87
- active: W,
88
- primaryColor: n,
304
+ active: I,
305
+ primaryColor: m,
89
306
  velocityMultiplier: j,
90
- gravity: A,
91
- onComplete: ee
307
+ gravity: te,
308
+ onComplete: z
92
309
  }
93
310
  ),
94
- F && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
95
- ie,
311
+ D && (g == null ? void 0 : g.results) && /* @__PURE__ */ o(
312
+ ce,
96
313
  {
97
- result: y.results,
98
- variant: z || "embed",
314
+ result: g.results,
315
+ variant: B || "embed",
99
316
  mode: "screen",
100
- contentColor: a,
101
- primaryColor: n,
102
- onPrimaryColor: o,
103
- disclaimer: v ? void 0 : f.disclaimer,
104
- enableReset: c,
105
- onReset: S
317
+ contentColor: b,
318
+ primaryColor: m,
319
+ onPrimaryColor: a,
320
+ disclaimer: r ? void 0 : x.disclaimer,
321
+ enableReset: l,
322
+ onReset: V
106
323
  }
107
324
  ),
108
- !F && /* @__PURE__ */ w(re, { children: [
109
- k && (e.title || e.subtitle) && /* @__PURE__ */ w(
110
- d,
111
- {
112
- sx: {
113
- display: "flex",
114
- flexDirection: "column",
115
- gap: m.xs,
116
- alignItems: "center",
117
- textAlign: "center",
118
- width: "100%",
119
- zIndex: 1
120
- },
121
- children: [
122
- e.title && /* @__PURE__ */ w(re, { children: [
123
- /* @__PURE__ */ t(
124
- B,
125
- {
126
- level: "h2",
127
- sx: {
128
- fontFamily: l.primary,
129
- fontWeight: 700,
130
- fontSize: x ? "1.5rem" : "2rem",
131
- color: a,
132
- lineHeight: 1.2,
133
- ..._ && {
134
- textShadow: `0 0 20px ${D("20")}, 0 0 40px ${D("10")}`
135
- }
136
- },
137
- children: e.title
138
- }
139
- ),
140
- _ && /* @__PURE__ */ w(
141
- d,
142
- {
143
- sx: {
144
- display: "flex",
145
- alignItems: "center",
146
- gap: m.xs,
147
- mt: m["2xs"]
148
- },
149
- children: [
150
- /* @__PURE__ */ t(
151
- d,
152
- {
153
- sx: {
154
- width: x ? "40px" : "60px",
155
- height: "1px",
156
- background: `linear-gradient(90deg, transparent, ${D("40")})`
157
- }
158
- }
159
- ),
160
- /* @__PURE__ */ t(
161
- d,
162
- {
163
- sx: {
164
- width: "6px",
165
- height: "6px",
166
- transform: "rotate(45deg)",
167
- background: D("50")
168
- }
169
- }
170
- ),
171
- /* @__PURE__ */ t(
172
- d,
173
- {
174
- sx: {
175
- width: x ? "40px" : "60px",
176
- height: "1px",
177
- background: `linear-gradient(90deg, ${D("40")}, transparent)`
178
- }
179
- }
180
- )
181
- ]
182
- }
183
- )
184
- ] }),
185
- e.subtitle && /* @__PURE__ */ t(
186
- B,
187
- {
188
- level: "body-md",
189
- sx: {
190
- fontFamily: l.secondary,
191
- fontWeight: 400,
192
- fontSize: x ? "0.875rem" : "1rem",
193
- color: a,
194
- opacity: 0.8
195
- },
196
- children: e.subtitle
197
- }
198
- )
199
- ]
200
- }
201
- ),
202
- /* @__PURE__ */ w(d, { children: [
203
- !v && f.welcome && /* @__PURE__ */ t(
204
- B,
205
- {
206
- level: "body-md",
207
- sx: {
208
- fontFamily: l.primary,
209
- fontWeight: 400,
210
- fontSize: x ? "0.875rem" : "1rem",
211
- color: a,
212
- textAlign: "center",
213
- mb: u ? 0 : m.md,
214
- zIndex: 1
215
- },
216
- children: f.welcome
217
- }
218
- ),
219
- (v || u) && !R && f.instructions && /* @__PURE__ */ t(
220
- B,
221
- {
222
- level: v ? "body-sm" : "body-md",
223
- sx: {
224
- fontFamily: l.secondary,
225
- fontWeight: 400,
226
- fontSize: x ? "0.875rem" : "1rem",
227
- color: a,
228
- opacity: 0.7,
229
- textAlign: "center",
230
- maxWidth: v ? "400px" : "600px",
231
- zIndex: 1
232
- },
233
- children: f.instructions
234
- }
235
- )
325
+ !D && /* @__PURE__ */ w(ue, { children: [
326
+ W && (t.title || t.subtitle) && /* @__PURE__ */ w("div", { css: p.titleBlock, children: [
327
+ t.title && /* @__PURE__ */ w(ue, { children: [
328
+ /* @__PURE__ */ o("h2", { css: M ? p.titleGlow : p.title, children: t.title }),
329
+ M && /* @__PURE__ */ w("div", { css: p.underline, children: [
330
+ /* @__PURE__ */ o("div", { css: p.underlineStart }),
331
+ /* @__PURE__ */ o("div", { css: p.underlineGem }),
332
+ /* @__PURE__ */ o("div", { css: p.underlineEnd })
333
+ ] })
334
+ ] }),
335
+ t.subtitle && /* @__PURE__ */ o("p", { css: p.subtitle, children: t.subtitle })
336
+ ] }),
337
+ /* @__PURE__ */ w("div", { children: [
338
+ !r && x.welcome && /* @__PURE__ */ o("p", { css: k ? p.welcomeOverlay : p.welcome, children: x.welcome }),
339
+ (r || k) && !S && x.instructions && /* @__PURE__ */ o("p", { css: p.instructions, children: x.instructions })
236
340
  ] }),
237
341
  /* @__PURE__ */ w(
238
- d,
342
+ "div",
239
343
  {
240
- onClick: I,
241
- sx: {
242
- position: "relative",
243
- width: "100%",
244
- maxWidth: te,
245
- aspectRatio: "1",
246
- mt: C ? m.md : 0,
247
- display: "flex",
248
- alignItems: "center",
249
- justifyContent: "center",
250
- cursor: T || W || R || !F && !R && y !== null ? "default" : "pointer",
251
- userSelect: "none",
252
- zIndex: 1,
344
+ onClick: X,
345
+ css: M ? p.wheelGlow : p.wheel,
346
+ "data-shake": H || void 0,
347
+ style: {
348
+ cursor: E || S ? "default" : "pointer",
253
349
  // Entrance animation
254
- opacity: $ ? 1 : 0,
255
- transform: $ ? "scale(1)" : "scale(0.85)",
256
- transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
257
- // Shake animation
258
- animation: X ? `wheelShake ${U / 2}ms ease-in-out 2` : "none",
259
- "@keyframes wheelShake": {
260
- "0%, 100%": { transform: "translateX(0)" },
261
- "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
262
- "20%, 40%, 60%, 80%": { transform: "translateX(8px)" }
263
- },
264
- // Wheel glow effect (decorations only)
265
- ..._ && {
266
- filter: `drop-shadow(0 0 ${x ? "15px" : "25px"} ${D("20")}) drop-shadow(0 0 ${x ? "40px" : "60px"} ${D("10")})`
267
- }
350
+ opacity: C ? 1 : 0,
351
+ transform: C ? "scale(1)" : "scale(0.85)"
268
352
  },
269
353
  children: [
270
- /* @__PURE__ */ t(
271
- xt,
272
- {
273
- segmentCount: L.length,
274
- decorations: _,
275
- primaryColor: n
276
- }
277
- ),
278
- /* @__PURE__ */ t(
279
- ft,
354
+ /* @__PURE__ */ o($t, { segmentCount: L.length, decorations: M, primaryColor: m }),
355
+ /* @__PURE__ */ o(
356
+ Bt,
280
357
  {
281
358
  segments: L,
282
- secondaryColor: g,
283
- primaryColor: n,
284
- onPrimaryColor: o,
285
- decorations: _,
286
- isStandard: v,
287
- rotation: H,
359
+ secondaryColor: y,
360
+ primaryColor: m,
361
+ onPrimaryColor: a,
362
+ decorations: M,
363
+ isStandard: r,
364
+ rotation: N,
288
365
  isSpinning: T,
289
- spinDuration: P
290
- }
291
- ),
292
- !v && !u && r && /* @__PURE__ */ t(
293
- d,
294
- {
295
- component: "img",
296
- src: r,
297
- alt: "Logo",
298
- sx: {
299
- position: "absolute",
300
- top: "50%",
301
- left: "50%",
302
- transform: "translate(-50%, -50%)",
303
- width: "15%",
304
- height: "15%",
305
- objectFit: "contain",
306
- borderRadius: "50%",
307
- zIndex: 3,
308
- pointerEvents: "none",
309
- filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
310
- }
366
+ spinDuration: R
311
367
  }
312
368
  ),
313
- /* @__PURE__ */ t(
314
- pt,
315
- {
316
- primaryColor: n,
317
- dangerColor: i,
318
- decorations: _
319
- }
320
- )
369
+ !r && !k && $ && /* @__PURE__ */ o("img", { src: $, alt: "Logo", css: p.logo }),
370
+ /* @__PURE__ */ o(Ct, { primaryColor: m, dangerColor: c, decorations: M })
321
371
  ]
322
372
  }
323
373
  ),
324
- !v && !u && !R && f.instructions && /* @__PURE__ */ t(
325
- B,
326
- {
327
- level: "body-sm",
328
- sx: {
329
- fontFamily: l.secondary,
330
- fontWeight: 400,
331
- fontSize: x ? "0.875rem" : "1rem",
332
- color: a,
333
- opacity: 0.7,
334
- textAlign: "center",
335
- maxWidth: "400px",
336
- zIndex: 1
337
- },
338
- children: f.instructions
339
- }
340
- ),
341
- !v && R && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
342
- ie,
374
+ !r && !k && !S && x.instructions && /* @__PURE__ */ o("p", { css: p.instructions, children: x.instructions }),
375
+ !r && S && (g == null ? void 0 : g.results) && /* @__PURE__ */ o(
376
+ ce,
343
377
  {
344
- result: y.results,
378
+ result: g.results,
345
379
  variant: "embed",
346
380
  mode: "inline",
347
- contentColor: a,
348
- primaryColor: n,
349
- onPrimaryColor: o,
350
- enableReset: c,
351
- onReset: S,
381
+ contentColor: b,
382
+ primaryColor: m,
383
+ onPrimaryColor: a,
384
+ enableReset: l,
385
+ onReset: V,
352
386
  showResetButton: !0,
353
- sx: { zIndex: 1 }
387
+ raised: !0
354
388
  }
355
389
  ),
356
- f.buttonLabel && !(R && y && !y.isWinning) && /* @__PURE__ */ t(
357
- ue,
390
+ x.buttonLabel && !(S && g && !g.isWinning) && /* @__PURE__ */ o(
391
+ "button",
358
392
  {
359
- variant: "soft",
360
- disabled: T || W || !F && !R && y !== null,
361
- onClick: I,
362
- sx: {
363
- borderRadius: p.xl,
364
- py: C ? m.sm : m.md,
365
- px: C ? m.lg : m.xl,
366
- "--variant-softBg": n,
367
- "--variant-softColor": o,
368
- "--variant-softHoverBg": n,
369
- bgcolor: n,
370
- color: o,
371
- fontSize: C ? x ? "0.75rem" : "0.875rem" : x ? "1rem" : "1.125rem",
372
- fontWeight: 700,
373
- fontFamily: l.primary,
374
- textTransform: "uppercase",
375
- letterSpacing: "0.5px",
376
- minWidth: C ? void 0 : x ? "200px" : "250px",
377
- zIndex: 1,
378
- transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
379
- transform: "scale(1)",
380
- ..._ && {
381
- boxShadow: `0 4px 14px 0 ${n}40, 0 0 20px ${n}15`,
382
- animation: !T && !y ? "wheelBtnPulse 2.5s ease-in-out infinite" : "none",
383
- "@keyframes wheelBtnPulse": {
384
- "0%, 100%": {
385
- boxShadow: `0 4px 14px 0 ${n}40, 0 0 20px ${n}15`
386
- },
387
- "50%": {
388
- boxShadow: `0 6px 24px 0 ${n}60, 0 0 35px ${n}25`
389
- }
390
- }
391
- },
392
- ...!_ && {
393
- boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)"
394
- },
395
- "&:hover": {
396
- bgcolor: n,
397
- transform: "scale(1.05)",
398
- boxShadow: _ ? `0 6px 20px 0 ${n}50, 0 0 30px ${n}20` : "0 6px 20px 0 rgba(0,0,0,0.2)"
399
- },
400
- "&:active": {
401
- transform: "scale(0.95)",
402
- color: o
403
- },
404
- "&:disabled": {
405
- "--variant-softDisabledBg": n,
406
- "--variant-softDisabledColor": o,
407
- bgcolor: n,
408
- color: o,
409
- opacity: 0.5,
410
- animation: "none"
411
- }
412
- },
413
- slotProps: {
414
- loadingIndicatorCenter: {
415
- sx: {
416
- "& .MuiCircularProgress-track": {
417
- stroke: o
418
- }
419
- }
420
- }
421
- },
422
- children: f.buttonLabel
393
+ type: "button",
394
+ disabled: E,
395
+ onClick: X,
396
+ css: M ? !T && !g ? p.spinPulsing : p.spinDecorated : p.spin,
397
+ children: x.buttonLabel
423
398
  }
424
399
  ),
425
- v && R && y && !y.isWinning && /* @__PURE__ */ t(
426
- ue,
427
- {
428
- variant: "outlined",
429
- onClick: S,
430
- sx: {
431
- borderRadius: p.xl,
432
- py: m.sm,
433
- px: m.lg,
434
- borderColor: b.outlineEnabledBorder,
435
- color: a,
436
- fontSize: x ? "0.75rem" : "0.875rem",
437
- fontWeight: 700,
438
- fontFamily: l.primary,
439
- textTransform: "uppercase",
440
- zIndex: 1,
441
- "&:hover": {
442
- borderColor: n,
443
- bgcolor: "transparent",
444
- color: n
445
- }
446
- },
447
- children: "Reset Game"
448
- }
449
- )
400
+ r && S && g && !g.isWinning && /* @__PURE__ */ o("button", { type: "button", onClick: V, css: p.reset, children: "Reset Game" })
450
401
  ] })
451
402
  ] });
452
- if (v) {
453
- const Q = Ce(h), oe = Q ? Q.replace(/[^\d,]/g, "") : "";
454
- return /* @__PURE__ */ w(
455
- d,
456
- {
457
- sx: {
458
- display: "flex",
459
- flexDirection: "column",
460
- width: "100%",
461
- height: "100%",
462
- gap: m.lg,
463
- alignItems: "center",
464
- position: "relative",
465
- overflow: "auto",
466
- boxSizing: "border-box"
467
- },
468
- children: [
469
- !F && f.welcome && /* @__PURE__ */ t(
470
- B,
471
- {
472
- level: "body-md",
473
- sx: {
474
- fontFamily: l.primary,
475
- fontWeight: 400,
476
- fontSize: x ? "0.875rem" : "1rem",
477
- color: a,
478
- textAlign: "center",
479
- px: m.md
480
- },
481
- children: f.welcome
482
- }
483
- ),
484
- /* @__PURE__ */ t(
485
- d,
486
- {
487
- sx: {
488
- display: "flex",
489
- flexDirection: "column",
490
- px: m.md,
491
- width: "100%",
492
- boxSizing: "border-box"
493
- },
494
- children: /* @__PURE__ */ w(
495
- d,
496
- {
497
- sx: {
498
- display: "flex",
499
- flexDirection: "column",
500
- gap: x ? m.lg : m.md
501
- },
502
- children: [
503
- /* @__PURE__ */ t(
504
- d,
505
- {
506
- sx: {
507
- borderRadius: p.md,
508
- px: m.sm,
509
- pt: m.sm,
510
- pb: m.md,
511
- gap: m.md,
512
- bgcolor: `rgba(${oe}, 0.5)`,
513
- display: "flex",
514
- flexDirection: "column",
515
- alignItems: "center",
516
- backdropFilter: "blur(4px)",
517
- position: "relative",
518
- overflow: "hidden",
519
- ..._ && {
520
- border: `${O.size} solid ${D("15")}`
521
- }
522
- },
523
- children: Y()
524
- }
525
- ),
526
- R && (y == null ? void 0 : y.results) && /* @__PURE__ */ t(
527
- ie,
528
- {
529
- result: y.results,
530
- variant: "standard",
531
- mode: "inline",
532
- contentColor: a,
533
- primaryColor: n,
534
- onPrimaryColor: o,
535
- showResetButton: !1,
536
- sx: { mb: m.md }
537
- }
538
- ),
539
- (r || f.disclaimer) && /* @__PURE__ */ w(
540
- d,
541
- {
542
- sx: {
543
- display: "flex",
544
- flexDirection: "column",
545
- alignItems: "center",
546
- gap: m.md
547
- },
548
- children: [
549
- f.disclaimer && /* @__PURE__ */ t(
550
- B,
551
- {
552
- level: "body-sm",
553
- sx: {
554
- fontFamily: l.secondary,
555
- fontWeight: 400,
556
- fontSize: x ? "0.625rem" : "0.75rem",
557
- color: a,
558
- opacity: 0.7,
559
- textAlign: "center",
560
- maxWidth: "900px",
561
- lineHeight: 1.4
562
- },
563
- children: f.disclaimer
564
- }
565
- ),
566
- r && /* @__PURE__ */ t(
567
- "img",
568
- {
569
- src: r,
570
- alt: "Brand Logo",
571
- style: {
572
- height: "auto",
573
- maxHeight: "60px",
574
- maxWidth: "180px"
575
- }
576
- }
577
- )
578
- ]
579
- }
580
- )
581
- ]
582
- }
583
- )
584
- }
585
- )
586
- ]
587
- }
588
- );
589
- }
590
- return /* @__PURE__ */ w(
591
- d,
592
- {
593
- sx: {
594
- display: "flex",
595
- flexDirection: "column",
596
- width: "100%",
597
- p: x ? m.lg : m.xl,
598
- gap: m.lg,
599
- alignItems: "center",
600
- position: "relative",
601
- overflow: "hidden",
602
- boxSizing: "border-box"
603
- },
604
- children: [
605
- Y(),
606
- !F && f.disclaimer && /* @__PURE__ */ t(
607
- d,
403
+ return r ? /* @__PURE__ */ w("div", { css: p.standard, style: Y, children: [
404
+ !D && x.welcome && /* @__PURE__ */ o("p", { css: p.standardWelcome, children: x.welcome }),
405
+ /* @__PURE__ */ o("div", { css: p.standardArea, children: /* @__PURE__ */ w("div", { css: p.standardStack, children: [
406
+ /* @__PURE__ */ o("div", { css: M ? p.boxDecorated : p.box, children: Z() }),
407
+ S && (g == null ? void 0 : g.results) && /* @__PURE__ */ o(
408
+ ce,
409
+ {
410
+ result: g.results,
411
+ variant: "standard",
412
+ mode: "inline",
413
+ contentColor: b,
414
+ primaryColor: m,
415
+ onPrimaryColor: a,
416
+ showResetButton: !1,
417
+ spaced: !0
418
+ }
419
+ ),
420
+ ($ || x.disclaimer) && /* @__PURE__ */ w("div", { css: p.footer, children: [
421
+ x.disclaimer && /* @__PURE__ */ o("p", { css: p.disclaimer, children: x.disclaimer }),
422
+ $ && /* @__PURE__ */ o(
423
+ "img",
608
424
  {
609
- sx: {
610
- display: "flex",
611
- flexDirection: "column",
612
- alignItems: "center",
613
- gap: m.md
614
- },
615
- children: /* @__PURE__ */ t(
616
- B,
617
- {
618
- level: "body-sm",
619
- sx: {
620
- fontFamily: l.secondary,
621
- fontWeight: 400,
622
- fontSize: x ? "0.625rem" : "0.75rem",
623
- color: a,
624
- opacity: 0.7,
625
- textAlign: "center",
626
- maxWidth: "900px",
627
- lineHeight: 1.4
628
- },
629
- children: f.disclaimer
630
- }
631
- )
425
+ src: $,
426
+ alt: "Brand Logo",
427
+ style: { height: "auto", maxHeight: "60px", maxWidth: "180px" }
632
428
  }
633
429
  )
634
- ]
635
- }
636
- );
637
- }, Ft = ({
638
- infoPage: e,
639
- enableReset: c = !1,
640
- imagePosition: a = "left",
641
- defaultImagePlaceholderUrl: n
430
+ ] })
431
+ ] }) })
432
+ ] }) : /* @__PURE__ */ w("div", { css: p.embed, style: Y, children: [
433
+ Z(),
434
+ !D && x.disclaimer && /* @__PURE__ */ o("div", { css: p.footer, children: /* @__PURE__ */ o("p", { css: p.disclaimer, children: x.disclaimer }) })
435
+ ] });
436
+ }, Pt = ({
437
+ infoPage: t,
438
+ enableReset: l = !1,
439
+ imagePosition: b = "left",
440
+ defaultImagePlaceholderUrl: m
642
441
  }) => {
643
- var m, O;
644
- const { t: g } = se(), o = J(), h = le(), i = Te() === "dark", r = fe(
442
+ var k, O;
443
+ const { t: y } = me(), a = q(), i = Re(), c = qe() === "dark", $ = we(
645
444
  {
646
- images: e.images,
647
- imagePlaceholder: n || ""
445
+ images: t.images,
446
+ imagePlaceholder: m || ""
648
447
  },
649
- pe.STANDARD
650
- ), s = (m = e.branding) == null ? void 0 : m.colors, k = (s == null ? void 0 : s.primary_color) || h.palette.primary.plainColor, z = (s == null ? void 0 : s.secondary_color) || h.palette.danger.plainColor, x = (s == null ? void 0 : s.border_color) || null, b = (s == null ? void 0 : s.background_color) || h.surfaceVariant || "", p = (O = e.branding) == null ? void 0 : O.images, l = o ? (p == null ? void 0 : p.mobile_logo) || (p == null ? void 0 : p.main_logo) || "" : (p == null ? void 0 : p.main_logo) || "";
651
- return /* @__PURE__ */ t(ke, { brandingBorderColor: x, children: /* @__PURE__ */ t(
652
- $e,
448
+ ve.STANDARD
449
+ ), s = (k = t.branding) == null ? void 0 : k.colors, W = (s == null ? void 0 : s.primary_color) || i.palette.primary.plainColor, B = (s == null ? void 0 : s.secondary_color) || i.palette.danger.plainColor, h = (s == null ? void 0 : s.border_color) || null, v = (s == null ? void 0 : s.background_color) || i.surfaceVariant || "", f = (O = t.branding) == null ? void 0 : O.images, r = a ? (f == null ? void 0 : f.mobile_logo) || (f == null ? void 0 : f.main_logo) || "" : (f == null ? void 0 : f.main_logo) || "";
450
+ return /* @__PURE__ */ o(_e, { brandingBorderColor: h, children: /* @__PURE__ */ o(
451
+ tt,
653
452
  {
654
453
  entity: {
655
- ...e,
454
+ ...t,
656
455
  type: "chance-game",
657
- description: e.subtitle || "",
456
+ description: t.subtitle || "",
658
457
  rules: null
659
458
  },
660
- headline: g("chanceGame.headlinePrizeWheel"),
661
- finalImage: r,
662
- imagePosition: a,
663
- children: /* @__PURE__ */ t(
664
- Me,
459
+ headline: y("chanceGame.headlinePrizeWheel"),
460
+ finalImage: $,
461
+ imagePosition: b,
462
+ children: /* @__PURE__ */ o(
463
+ at,
665
464
  {
666
- infoPage: e,
667
- enableReset: c,
668
- contentColor: (s == null ? void 0 : s.content_color) || h.textColor,
669
- primaryColor: k,
670
- secondaryColor: z,
671
- onPrimaryColor: h.palette.primary.onPrimary,
672
- borderColor: x || void 0,
673
- backgroundColor: b,
674
- dangerColor: h.palette.danger.plainColor,
675
- shimmerColor: k,
676
- brandingLogo: l,
677
- isDark: i,
465
+ infoPage: t,
466
+ enableReset: l,
467
+ contentColor: (s == null ? void 0 : s.content_color) || i.textColor,
468
+ primaryColor: W,
469
+ secondaryColor: B,
470
+ onPrimaryColor: i.palette.primary.onPrimary,
471
+ borderColor: h || void 0,
472
+ backgroundColor: v,
473
+ dangerColor: i.palette.danger.plainColor,
474
+ shimmerColor: W,
475
+ brandingLogo: r,
476
+ isDark: c,
678
477
  showTitleBlock: !1,
679
478
  variant: "standard"
680
479
  }
681
480
  )
682
481
  }
683
482
  ) });
684
- }, Le = ({
685
- infoPage: e,
686
- enableReset: c = !1,
687
- contentColor: a,
688
- primaryColor: n,
689
- onPrimaryColor: g,
690
- borderColor: o,
691
- backgroundColor: h,
692
- dangerColor: i,
693
- cardBaseColor: r,
483
+ }, G = (t) => `var(--fu-ucrc-cg-pick-${t})`, K = { display: "flex", flexDirection: "column" }, be = { flex: 1, height: "1px" }, Ee = {
484
+ ...Me,
485
+ fontFamily: e.fontPrimary,
486
+ fontWeight: 700,
487
+ color: e.content,
488
+ lineHeight: 1.2,
489
+ textShadow: G("title-shadow")
490
+ }, Pe = { ...re, fontFamily: e.fontSecondary, fontWeight: 400, color: e.content, opacity: 0.8 }, ie = { ...re, fontFamily: e.fontPrimary, fontWeight: 400, color: e.content, textAlign: "center" }, xe = {
491
+ ...re,
492
+ fontFamily: e.fontSecondary,
493
+ fontWeight: 400,
494
+ color: e.content,
495
+ textAlign: "center",
496
+ opacity: 0.7
497
+ }, Ne = { display: "flex", alignItems: "center", gap: e.spaceSm, marginBlock: e.spaceXs }, He = {
498
+ ...re,
499
+ fontFamily: e.fontSecondary,
500
+ fontWeight: 400,
501
+ color: e.content,
502
+ opacity: 0.7,
503
+ textAlign: "center",
504
+ maxWidth: "900px",
505
+ lineHeight: 1.4
506
+ }, lt = { "&:hover": { borderColor: e.primary, backgroundColor: "transparent", color: e.primary } }, Ue = {
507
+ marginTop: e.spaceMd,
508
+ paddingInline: e.spaceLg,
509
+ paddingBlock: e.spaceSm,
510
+ fontFamily: e.fontSecondary,
511
+ fontWeight: 600,
512
+ textTransform: "uppercase",
513
+ borderRadius: e.radiusMd,
514
+ borderColor: e.border,
515
+ color: e.content,
516
+ ...lt
517
+ }, je = {
518
+ borderRadius: e.radiusXl,
519
+ paddingBlock: e.spaceSm,
520
+ paddingInline: e.spaceLg,
521
+ borderColor: G("outline"),
522
+ color: e.content,
523
+ fontWeight: 700,
524
+ fontFamily: e.fontPrimary,
525
+ textTransform: "uppercase",
526
+ ...lt
527
+ }, u = {
528
+ titleBlock: n({ ...K, gap: e.spaceXs, alignItems: "center", textAlign: "center", width: "100%" }),
529
+ title: n({ ...Ee, fontSize: "2rem" }),
530
+ titleMobile: n({ ...Ee, fontSize: "1.5rem" }),
531
+ underline: n({ display: "flex", alignItems: "center", gap: e.spaceSm, marginTop: e.spaceXs, width: "40%" }),
532
+ underlineMobile: n({ display: "flex", alignItems: "center", gap: e.spaceSm, marginTop: e.spaceXs, width: "60%" }),
533
+ lineIn: n({ ...be, background: `linear-gradient(to right, transparent, ${G("dc-40")})` }),
534
+ lineOut: n({ ...be, background: `linear-gradient(to left, transparent, ${G("dc-40")})` }),
535
+ underlineDiamond: n({
536
+ width: "8px",
537
+ height: "8px",
538
+ transform: "rotate(45deg)",
539
+ border: `${G("border-size")} solid ${G("dc-50")}`,
540
+ background: G("dc-15")
541
+ }),
542
+ subtitle: n({ ...Pe, fontSize: "1rem" }),
543
+ subtitleMobile: n({ ...Pe, fontSize: "0.875rem" }),
544
+ welcome: n({ ...ie, fontSize: "1rem", marginBottom: e.spaceMd }),
545
+ welcomeMobile: n({ ...ie, fontSize: "0.875rem", marginBottom: e.spaceMd }),
546
+ welcomeOverlay: n({ ...ie, fontSize: "1rem", marginBottom: 0 }),
547
+ welcomeOverlayMobile: n({ ...ie, fontSize: "0.875rem", marginBottom: 0 }),
548
+ instructions: n({ ...xe, fontSize: "1rem", maxWidth: "600px" }),
549
+ instructionsMobile: n({ ...xe, fontSize: "0.875rem", maxWidth: "600px" }),
550
+ instructionsStandard: n({ ...xe, fontSize: "1rem", maxWidth: "400px" }),
551
+ instructionsStandardMobile: n({ ...xe, fontSize: "0.875rem", maxWidth: "400px" }),
552
+ divider: n({ ...Ne, width: "25%" }),
553
+ dividerMobile: n({ ...Ne, width: "40%" }),
554
+ dividerIn: n({ ...be, background: `linear-gradient(to right, transparent, ${G("dc-25")})` }),
555
+ dividerOut: n({ ...be, background: `linear-gradient(to left, transparent, ${G("dc-25")})` }),
556
+ dividerDot: n({ width: "4px", height: "4px", borderRadius: "50%", background: G("dc-35") }),
557
+ grid: n({
558
+ marginTop: e.spaceLg,
559
+ marginInline: "auto",
560
+ display: "grid",
561
+ justifyContent: "center",
562
+ marginBottom: e.spaceLg,
563
+ position: "relative",
564
+ perspective: "1200px"
565
+ }),
566
+ cell: n({ display: "flex", justifyContent: "center", alignItems: "center" }),
567
+ embedReset: n(de, Ue, { fontSize: "1rem", minWidth: "180px" }),
568
+ embedResetMobile: n(de, Ue, { fontSize: "0.875rem", minWidth: "150px" }),
569
+ standardReset: n(de, je, { fontSize: "0.875rem" }),
570
+ standardResetMobile: n(de, je, { fontSize: "0.75rem" }),
571
+ standard: n({
572
+ ...K,
573
+ width: "100%",
574
+ height: "100%",
575
+ gap: e.spaceLg,
576
+ alignItems: "center",
577
+ position: "relative",
578
+ overflow: "auto",
579
+ boxSizing: "border-box"
580
+ }),
581
+ standardWelcome: n({ ...ie, fontSize: "1rem", paddingInline: e.spaceMd }),
582
+ standardWelcomeMobile: n({ ...ie, fontSize: "0.875rem", paddingInline: e.spaceMd }),
583
+ standardArea: n({ ...K, paddingInline: e.spaceMd, width: "100%", boxSizing: "border-box" }),
584
+ standardStack: n({ ...K, gap: e.spaceMd }),
585
+ standardStackMobile: n({ ...K, gap: e.spaceLg }),
586
+ gameBox: n({
587
+ borderRadius: e.radiusMd,
588
+ paddingInline: e.spaceSm,
589
+ paddingTop: e.spaceSm,
590
+ paddingBottom: e.spaceMd,
591
+ gap: e.spaceMd,
592
+ backgroundColor: G("box-bg"),
593
+ ...K,
594
+ alignItems: "center",
595
+ backdropFilter: "blur(4px)",
596
+ position: "relative",
597
+ overflow: "hidden"
598
+ }),
599
+ footer: n({ ...K, alignItems: "center", gap: e.spaceMd }),
600
+ disclaimer: n({ ...He, fontSize: "0.75rem" }),
601
+ disclaimerMobile: n({ ...He, fontSize: "0.625rem" }),
602
+ embed: n({
603
+ ...K,
604
+ width: "100%",
605
+ height: "100%",
606
+ padding: e.spaceLg,
607
+ gap: e.spaceLg,
608
+ alignItems: "center",
609
+ position: "relative",
610
+ overflow: "auto",
611
+ boxSizing: "border-box"
612
+ })
613
+ }, st = ({
614
+ infoPage: t,
615
+ enableReset: l = !1,
616
+ contentColor: b,
617
+ primaryColor: m,
618
+ onPrimaryColor: y,
619
+ borderColor: a,
620
+ backgroundColor: i,
621
+ dangerColor: c,
622
+ cardBaseColor: $,
694
623
  shimmerColor: s,
695
- brandingLogo: k = "",
696
- isDark: z = !1,
697
- showTitleBlock: x = !1,
698
- variant: b,
699
- compactCards: p = !1
624
+ brandingLogo: W = "",
625
+ isDark: B = !1,
626
+ showTitleBlock: h = !1,
627
+ variant: v,
628
+ compactCards: f = !1
700
629
  }) => {
701
- var Fe, We, _e, Oe;
702
- const l = J(), m = le(), O = ve(), v = we(), u = xe(), C = Se(), G = r || h, L = s || n, f = b === "standard", N = b === "overlay", V = f ? Ce(h) : "", _ = V ? V.replace(/[^\d,]/g, "") : "", D = p ? l ? 80 : 110 : l ? 100 : 140, T = p ? l ? 104 : 143 : l ? 130 : 180, H = p ? l ? 90 : 130 : l ? 120 : 180, y = p ? l ? "16px" : "32px" : l ? "24px" : "48px", X = p ? l ? "12px" : "32px" : l ? "16px" : "48px", F = Ve(n, z), R = JSON.parse(e.body), $ = R.segments || [], W = e.labels || {}, P = R.mode || ((Fe = R.config) == null ? void 0 : Fe.mode) || "fair", U = ((We = R.config) == null ? void 0 : We.pace) || "normal", j = ((_e = R.config) == null ? void 0 : _e.revealAll) ?? !1, A = ((Oe = R.config) == null ? void 0 : Oe.decorations) ?? !1, I = $.some((ae) => {
703
- var K;
704
- return (K = ae.images) == null ? void 0 : K.idle;
630
+ var Fe, De, Te, Ie;
631
+ const r = q(), k = Re(), O = Je(), A = it(), L = $ || i, x = s || m, _ = v === "standard", P = v === "overlay", M = _ ? Ke(i) : "", F = M ? M.replace(/[^\d,]/g, "") : "", T = f ? r ? 80 : 110 : r ? 100 : 140, N = f ? r ? 104 : 143 : r ? 130 : 180, g = f ? r ? 90 : 130 : r ? 120 : 180, H = f ? r ? "16px" : "32px" : r ? "24px" : "48px", D = f ? r ? "12px" : "32px" : r ? "16px" : "48px", S = ct(m, B), C = JSON.parse(t.body), I = C.segments || [], R = t.labels || {}, U = C.mode || ((Fe = C.config) == null ? void 0 : Fe.mode) || "fair", j = ((De = C.config) == null ? void 0 : De.pace) || "normal", te = ((Te = C.config) == null ? void 0 : Te.revealAll) ?? !1, X = ((Ie = C.config) == null ? void 0 : Ie.decorations) ?? !1, V = I.some((ae) => {
632
+ var J;
633
+ return (J = ae.images) == null ? void 0 : J.idle;
705
634
  }), {
706
- selectedSegment: S,
707
- displaySegments: ee,
708
- revealResult: te,
635
+ selectedSegment: z,
636
+ displaySegments: Q,
637
+ revealResult: oe,
709
638
  showResultScreen: Y,
710
639
  showInlineResult: E,
711
- showLoseAnimation: q,
712
- hasEntered: M,
713
- flippedCards: Q,
714
- crossfadedCards: oe,
715
- revealedOtherCards: ce,
716
- flipDuration: Xe,
717
- crossfadeDuration: Pe,
718
- loseAnimationDuration: Ue,
719
- handlePick: Re,
720
- handleReset: ge
721
- } = gt({ segments: $, mode: P, pace: U, revealAll: j }), ze = () => /* @__PURE__ */ w(re, { children: [
722
- A && /* @__PURE__ */ t(
723
- He,
724
- {
725
- primaryColor: n,
726
- isDark: z,
727
- animationPrefix: "casino"
728
- }
729
- ),
730
- Y && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
731
- ie,
640
+ showLoseAnimation: Z,
641
+ hasEntered: ee,
642
+ flippedCards: pe,
643
+ crossfadedCards: he,
644
+ revealedOtherCards: ut,
645
+ flipDuration: mt,
646
+ crossfadeDuration: pt,
647
+ loseAnimationDuration: ht,
648
+ handlePick: We,
649
+ handleReset: $e
650
+ } = Ft({ segments: I, mode: U, pace: j, revealAll: te }), Be = {
651
+ ...A,
652
+ "--fu-ucrc-cg-content": b,
653
+ "--fu-ucrc-cg-primary": m,
654
+ "--fu-ucrc-cg-border": a || k.outlineEnabledBorder,
655
+ "--fu-ucrc-cg-pick-outline": k.outlineEnabledBorder,
656
+ "--fu-ucrc-cg-pick-border-size": O.size,
657
+ "--fu-ucrc-cg-pick-title-shadow": X ? `0 0 20px ${m}20` : "none",
658
+ "--fu-ucrc-cg-pick-dc-15": S("15"),
659
+ "--fu-ucrc-cg-pick-dc-25": S("25"),
660
+ "--fu-ucrc-cg-pick-dc-35": S("35"),
661
+ "--fu-ucrc-cg-pick-dc-40": S("40"),
662
+ "--fu-ucrc-cg-pick-dc-50": S("50"),
663
+ "--fu-ucrc-cg-pick-box-bg": `rgba(${F}, 0.5)`
664
+ }, Ce = () => /* @__PURE__ */ w(ue, { children: [
665
+ X && /* @__PURE__ */ o(rt, { primaryColor: m, isDark: B, animationPrefix: "casino" }),
666
+ Y && (z == null ? void 0 : z.results) && /* @__PURE__ */ o(
667
+ ce,
732
668
  {
733
- result: S.results,
734
- variant: b || "embed",
669
+ result: z.results,
670
+ variant: v || "embed",
735
671
  mode: "screen",
736
- contentColor: a,
737
- primaryColor: n,
738
- onPrimaryColor: g,
739
- borderColor: o,
740
- disclaimer: f ? void 0 : W.disclaimer,
741
- enableReset: c,
742
- onReset: ge
672
+ contentColor: b,
673
+ primaryColor: m,
674
+ onPrimaryColor: y,
675
+ borderColor: a,
676
+ disclaimer: _ ? void 0 : R.disclaimer,
677
+ enableReset: l,
678
+ onReset: $e
743
679
  }
744
680
  ),
745
- !Y && /* @__PURE__ */ w(re, { children: [
746
- !f && x && (e.title || e.subtitle) && /* @__PURE__ */ w(
747
- d,
748
- {
749
- sx: {
750
- display: "flex",
751
- flexDirection: "column",
752
- gap: u.xs,
753
- alignItems: "center",
754
- textAlign: "center",
755
- width: "100%"
756
- },
757
- children: [
758
- e.title && /* @__PURE__ */ t(
759
- B,
760
- {
761
- level: "h2",
762
- sx: {
763
- fontFamily: v.primary,
764
- fontWeight: 700,
765
- fontSize: l ? "1.5rem" : "2rem",
766
- color: a,
767
- lineHeight: 1.2,
768
- textShadow: A ? `0 0 20px ${n}20` : "none"
769
- },
770
- children: e.title
771
- }
772
- ),
773
- A && e.title && /* @__PURE__ */ w(
774
- d,
775
- {
776
- sx: {
777
- display: "flex",
778
- alignItems: "center",
779
- gap: u.sm,
780
- mt: u.xs,
781
- width: l ? "60%" : "40%"
782
- },
783
- children: [
784
- /* @__PURE__ */ t(
785
- d,
786
- {
787
- sx: {
788
- flex: 1,
789
- height: "1px",
790
- background: `linear-gradient(to right, transparent, ${F("40")})`
791
- }
792
- }
793
- ),
794
- /* @__PURE__ */ t(
795
- d,
796
- {
797
- sx: {
798
- width: "8px",
799
- height: "8px",
800
- transform: "rotate(45deg)",
801
- border: `${C.size} solid ${F("50")}`,
802
- background: `${F("15")}`
803
- }
804
- }
805
- ),
806
- /* @__PURE__ */ t(
807
- d,
808
- {
809
- sx: {
810
- flex: 1,
811
- height: "1px",
812
- background: `linear-gradient(to left, transparent, ${F("40")})`
813
- }
814
- }
815
- )
816
- ]
817
- }
818
- ),
819
- e.subtitle && /* @__PURE__ */ t(
820
- B,
821
- {
822
- level: "body-md",
823
- sx: {
824
- fontFamily: v.secondary,
825
- fontWeight: 400,
826
- fontSize: l ? "0.875rem" : "1rem",
827
- color: a,
828
- opacity: 0.8
829
- },
830
- children: e.subtitle
831
- }
832
- )
833
- ]
834
- }
835
- ),
836
- /* @__PURE__ */ w(d, { children: [
837
- !f && W.welcome && /* @__PURE__ */ t(
838
- B,
681
+ !Y && /* @__PURE__ */ w(ue, { children: [
682
+ !_ && h && (t.title || t.subtitle) && /* @__PURE__ */ w("div", { css: u.titleBlock, children: [
683
+ t.title && /* @__PURE__ */ o("h2", { css: r ? u.titleMobile : u.title, children: t.title }),
684
+ X && t.title && /* @__PURE__ */ w("div", { css: r ? u.underlineMobile : u.underline, children: [
685
+ /* @__PURE__ */ o("div", { css: u.lineIn }),
686
+ /* @__PURE__ */ o("div", { css: u.underlineDiamond }),
687
+ /* @__PURE__ */ o("div", { css: u.lineOut })
688
+ ] }),
689
+ t.subtitle && /* @__PURE__ */ o("p", { css: r ? u.subtitleMobile : u.subtitle, children: t.subtitle })
690
+ ] }),
691
+ /* @__PURE__ */ w("div", { children: [
692
+ !_ && R.welcome && /* @__PURE__ */ o(
693
+ "p",
839
694
  {
840
- level: "body-md",
841
- sx: {
842
- fontFamily: v.primary,
843
- fontWeight: 400,
844
- fontSize: l ? "0.875rem" : "1rem",
845
- color: a,
846
- textAlign: "center",
847
- mb: N ? 0 : u.md
848
- },
849
- children: W.welcome
695
+ css: P ? r ? u.welcomeOverlayMobile : u.welcomeOverlay : r ? u.welcomeMobile : u.welcome,
696
+ children: R.welcome
850
697
  }
851
698
  ),
852
- W.instructions && !E && /* @__PURE__ */ t(
853
- B,
699
+ R.instructions && !E && /* @__PURE__ */ o(
700
+ "p",
854
701
  {
855
- level: f ? "body-sm" : "body-md",
856
- sx: {
857
- fontFamily: v.secondary,
858
- fontWeight: 400,
859
- fontSize: l ? "0.875rem" : "1rem",
860
- color: a,
861
- textAlign: "center",
862
- opacity: 0.7,
863
- maxWidth: f ? "400px" : "600px"
864
- },
865
- children: W.instructions
702
+ css: _ ? r ? u.instructionsStandardMobile : u.instructionsStandard : r ? u.instructionsMobile : u.instructions,
703
+ children: R.instructions
866
704
  }
867
705
  )
868
706
  ] }),
869
- A && /* @__PURE__ */ w(
870
- d,
871
- {
872
- sx: {
873
- display: "flex",
874
- alignItems: "center",
875
- gap: u.sm,
876
- width: l ? "40%" : "25%",
877
- my: u.xs
878
- },
879
- children: [
880
- /* @__PURE__ */ t(
881
- d,
882
- {
883
- sx: {
884
- flex: 1,
885
- height: "1px",
886
- background: `linear-gradient(to right, transparent, ${F("25")})`
887
- }
888
- }
889
- ),
890
- /* @__PURE__ */ t(
891
- d,
892
- {
893
- sx: {
894
- width: "4px",
895
- height: "4px",
896
- borderRadius: "50%",
897
- background: `${F("35")}`
898
- }
899
- }
900
- ),
901
- /* @__PURE__ */ t(
902
- d,
903
- {
904
- sx: {
905
- flex: 1,
906
- height: "1px",
907
- background: `linear-gradient(to left, transparent, ${F("25")})`
908
- }
909
- }
910
- )
911
- ]
912
- }
913
- ),
914
- /* @__PURE__ */ t(
915
- d,
707
+ X && /* @__PURE__ */ w("div", { css: r ? u.dividerMobile : u.divider, children: [
708
+ /* @__PURE__ */ o("div", { css: u.dividerIn }),
709
+ /* @__PURE__ */ o("div", { css: u.dividerDot }),
710
+ /* @__PURE__ */ o("div", { css: u.dividerOut })
711
+ ] }),
712
+ /* @__PURE__ */ o(
713
+ "div",
916
714
  {
917
- sx: {
918
- mt: u.lg,
919
- mx: "auto",
920
- display: "grid",
921
- gridTemplateColumns: I ? `repeat(3, ${H}px)` : `repeat(3, ${D}px)`,
922
- rowGap: y,
923
- columnGap: X,
924
- justifyContent: "center",
925
- mb: u.lg,
926
- position: "relative",
927
- perspective: "1200px"
715
+ css: u.grid,
716
+ style: {
717
+ gridTemplateColumns: `repeat(3, ${V ? g : T}px)`,
718
+ rowGap: H,
719
+ columnGap: D
928
720
  },
929
- children: (ee ?? $).map((ae, K) => {
930
- const ye = `card-${K}`, de = S !== null, De = Q.has(ye), me = ce.has(ye), je = de && !De && !me, Be = oe.has(ye), Ye = de && !Be && !me;
931
- return /* @__PURE__ */ t(
932
- d,
721
+ children: (Q ?? I).map((ae, J) => {
722
+ const ke = `card-${J}`, ge = z !== null, Ae = pe.has(ke), fe = ut.has(ke), gt = ge && !Ae && !fe, Ge = he.has(ke), ft = ge && !Ge && !fe;
723
+ return /* @__PURE__ */ o(
724
+ "div",
933
725
  {
934
- sx: {
935
- display: "flex",
936
- justifyContent: "center",
937
- alignItems: "center",
938
- // Staggered deal-in entrance
939
- opacity: M ? 1 : 0,
940
- transform: M ? "translateY(0) scale(1) rotateX(0deg)" : "translateY(30px) scale(0.9) rotateX(10deg)",
941
- transition: `all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${K * 100}ms`
726
+ css: u.cell,
727
+ style: {
728
+ opacity: ee ? 1 : 0,
729
+ transform: ee ? "translateY(0) scale(1) rotateX(0deg)" : "translateY(30px) scale(0.9) rotateX(10deg)",
730
+ transition: `all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${J * 100}ms`
942
731
  },
943
- children: I ? /* @__PURE__ */ t(
944
- yt,
732
+ children: V ? /* @__PURE__ */ o(
733
+ Dt,
945
734
  {
946
735
  segment: ae,
947
- index: K,
948
- selectedSegment: S,
949
- revealResult: te,
950
- isCrossfaded: Be,
951
- isOtherRevealed: me,
952
- shouldDim: Ye,
953
- isRevealed: de,
954
- hasEntered: M,
955
- objectSize: H,
956
- crossfadeDuration: Pe,
957
- isStandard: f,
958
- primaryColor: n,
959
- dangerColor: i,
960
- onPick: () => Re(K, !0)
736
+ index: J,
737
+ selectedSegment: z,
738
+ revealResult: oe,
739
+ isCrossfaded: Ge,
740
+ isOtherRevealed: fe,
741
+ shouldDim: ft,
742
+ isRevealed: ge,
743
+ hasEntered: ee,
744
+ objectSize: g,
745
+ crossfadeDuration: pt,
746
+ isStandard: _,
747
+ primaryColor: m,
748
+ dangerColor: c,
749
+ onPick: () => We(J, !0)
961
750
  }
962
- ) : /* @__PURE__ */ t(
963
- bt,
751
+ ) : /* @__PURE__ */ o(
752
+ Tt,
964
753
  {
965
754
  segment: ae,
966
- index: K,
967
- selectedSegment: S,
968
- isFlipped: De,
969
- isOtherRevealed: me,
970
- shouldDim: je,
971
- isRevealed: de,
972
- showLoseAnimation: q,
973
- hasEntered: M,
974
- cardWidth: D,
975
- cardHeight: T,
976
- flipDuration: Xe,
977
- loseAnimationDuration: Ue,
978
- cardBaseColor: G,
979
- shimmerColor: L,
980
- primaryColor: n,
981
- contentColor: a,
982
- dangerColor: i,
983
- borderColor: o,
984
- brandingLogo: k,
985
- compactCards: p,
986
- onPick: () => Re(K, !1)
755
+ index: J,
756
+ selectedSegment: z,
757
+ isFlipped: Ae,
758
+ isOtherRevealed: fe,
759
+ shouldDim: gt,
760
+ isRevealed: ge,
761
+ showLoseAnimation: Z,
762
+ hasEntered: ee,
763
+ cardWidth: T,
764
+ cardHeight: N,
765
+ flipDuration: mt,
766
+ loseAnimationDuration: ht,
767
+ cardBaseColor: L,
768
+ shimmerColor: x,
769
+ primaryColor: m,
770
+ contentColor: b,
771
+ dangerColor: c,
772
+ borderColor: a,
773
+ brandingLogo: W,
774
+ compactCards: f,
775
+ onPick: () => We(J, !1)
987
776
  }
988
777
  )
989
778
  },
@@ -992,263 +781,103 @@ const ke = ({
992
781
  })
993
782
  }
994
783
  ),
995
- !f && E && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
996
- ie,
784
+ !_ && E && (z == null ? void 0 : z.results) && /* @__PURE__ */ o(
785
+ ce,
997
786
  {
998
- result: S.results,
787
+ result: z.results,
999
788
  variant: "embed",
1000
789
  mode: "inline",
1001
- contentColor: a,
1002
- primaryColor: n,
1003
- onPrimaryColor: g,
1004
- borderColor: o,
790
+ contentColor: b,
791
+ primaryColor: m,
792
+ onPrimaryColor: y,
793
+ borderColor: a,
1005
794
  showResetButton: !1
1006
795
  }
1007
796
  ),
1008
- !f && c && E && /* @__PURE__ */ t(
1009
- ue,
1010
- {
1011
- onClick: ge,
1012
- variant: "outlined",
1013
- sx: {
1014
- mt: u.md,
1015
- px: u.lg,
1016
- py: u.sm,
1017
- fontFamily: v.secondary,
1018
- fontWeight: 600,
1019
- fontSize: l ? "0.875rem" : "1rem",
1020
- textTransform: "uppercase",
1021
- borderRadius: O.md,
1022
- borderColor: o || m.outlineEnabledBorder,
1023
- color: a,
1024
- minWidth: l ? "150px" : "180px",
1025
- "&:hover": {
1026
- borderColor: n,
1027
- bgcolor: "transparent",
1028
- color: n
1029
- }
1030
- },
1031
- children: "Reset Game"
1032
- }
1033
- ),
1034
- f && c && E && /* @__PURE__ */ t(
1035
- ue,
797
+ l && E && /* @__PURE__ */ o(
798
+ "button",
1036
799
  {
1037
- onClick: ge,
1038
- variant: "outlined",
1039
- sx: {
1040
- borderRadius: O.xl,
1041
- py: u.sm,
1042
- px: u.lg,
1043
- borderColor: m.outlineEnabledBorder,
1044
- color: a,
1045
- fontSize: l ? "0.75rem" : "0.875rem",
1046
- fontWeight: 700,
1047
- fontFamily: v.primary,
1048
- textTransform: "uppercase",
1049
- "&:hover": {
1050
- borderColor: n,
1051
- bgcolor: "transparent",
1052
- color: n
1053
- }
1054
- },
800
+ type: "button",
801
+ css: _ ? r ? u.standardResetMobile : u.standardReset : r ? u.embedResetMobile : u.embedReset,
802
+ onClick: $e,
1055
803
  children: "Reset Game"
1056
804
  }
1057
805
  )
1058
806
  ] })
1059
807
  ] });
1060
- return f ? /* @__PURE__ */ w(
1061
- d,
1062
- {
1063
- sx: {
1064
- display: "flex",
1065
- flexDirection: "column",
1066
- width: "100%",
1067
- height: "100%",
1068
- gap: u.lg,
1069
- alignItems: "center",
1070
- position: "relative",
1071
- overflow: "auto",
1072
- boxSizing: "border-box"
1073
- },
1074
- children: [
1075
- !Y && W.welcome && /* @__PURE__ */ t(
1076
- B,
1077
- {
1078
- level: "body-md",
1079
- sx: {
1080
- fontFamily: v.primary,
1081
- fontWeight: 400,
1082
- fontSize: l ? "0.875rem" : "1rem",
1083
- color: a,
1084
- textAlign: "center",
1085
- px: u.md
1086
- },
1087
- children: W.welcome
1088
- }
1089
- ),
1090
- /* @__PURE__ */ t(
1091
- d,
808
+ return _ ? /* @__PURE__ */ w("div", { css: u.standard, style: Be, children: [
809
+ !Y && R.welcome && /* @__PURE__ */ o("p", { css: r ? u.standardWelcomeMobile : u.standardWelcome, children: R.welcome }),
810
+ /* @__PURE__ */ o("div", { css: u.standardArea, children: /* @__PURE__ */ w("div", { css: r ? u.standardStackMobile : u.standardStack, children: [
811
+ /* @__PURE__ */ o("div", { css: u.gameBox, children: Ce() }),
812
+ E && (z == null ? void 0 : z.results) && /* @__PURE__ */ o(
813
+ ce,
814
+ {
815
+ result: z.results,
816
+ variant: "standard",
817
+ mode: "inline",
818
+ contentColor: b,
819
+ primaryColor: m,
820
+ onPrimaryColor: y,
821
+ showResetButton: !1,
822
+ spaced: !0
823
+ }
824
+ ),
825
+ (W || R.disclaimer) && /* @__PURE__ */ w("div", { css: u.footer, children: [
826
+ R.disclaimer && /* @__PURE__ */ o("p", { css: r ? u.disclaimerMobile : u.disclaimer, children: R.disclaimer }),
827
+ W && V && /* @__PURE__ */ o(
828
+ "img",
1092
829
  {
1093
- sx: {
1094
- display: "flex",
1095
- flexDirection: "column",
1096
- px: u.md,
1097
- width: "100%",
1098
- boxSizing: "border-box"
1099
- },
1100
- children: /* @__PURE__ */ w(
1101
- d,
1102
- {
1103
- sx: {
1104
- display: "flex",
1105
- flexDirection: "column",
1106
- gap: l ? u.lg : u.md
1107
- },
1108
- children: [
1109
- /* @__PURE__ */ t(
1110
- d,
1111
- {
1112
- sx: {
1113
- borderRadius: O.md,
1114
- px: u.sm,
1115
- pt: u.sm,
1116
- pb: u.md,
1117
- gap: u.md,
1118
- bgcolor: `rgba(${_}, 0.5)`,
1119
- display: "flex",
1120
- flexDirection: "column",
1121
- alignItems: "center",
1122
- backdropFilter: "blur(4px)",
1123
- position: "relative",
1124
- overflow: "hidden"
1125
- },
1126
- children: ze()
1127
- }
1128
- ),
1129
- E && (S == null ? void 0 : S.results) && /* @__PURE__ */ t(
1130
- ie,
1131
- {
1132
- result: S.results,
1133
- variant: "standard",
1134
- mode: "inline",
1135
- contentColor: a,
1136
- primaryColor: n,
1137
- onPrimaryColor: g,
1138
- showResetButton: !1,
1139
- sx: { mb: u.md }
1140
- }
1141
- ),
1142
- (k || W.disclaimer) && /* @__PURE__ */ w(
1143
- d,
1144
- {
1145
- sx: {
1146
- display: "flex",
1147
- flexDirection: "column",
1148
- alignItems: "center",
1149
- gap: u.md
1150
- },
1151
- children: [
1152
- W.disclaimer && /* @__PURE__ */ t(
1153
- B,
1154
- {
1155
- level: "body-sm",
1156
- sx: {
1157
- fontFamily: v.secondary,
1158
- fontWeight: 400,
1159
- fontSize: l ? "0.625rem" : "0.75rem",
1160
- color: a,
1161
- opacity: 0.7,
1162
- textAlign: "center",
1163
- maxWidth: "900px",
1164
- lineHeight: 1.4
1165
- },
1166
- children: W.disclaimer
1167
- }
1168
- ),
1169
- k && I && /* @__PURE__ */ t(
1170
- "img",
1171
- {
1172
- src: k,
1173
- alt: "Brand Logo",
1174
- style: {
1175
- height: "auto",
1176
- maxHeight: "60px",
1177
- maxWidth: "180px"
1178
- }
1179
- }
1180
- )
1181
- ]
1182
- }
1183
- )
1184
- ]
1185
- }
1186
- )
830
+ src: W,
831
+ alt: "Brand Logo",
832
+ style: { height: "auto", maxHeight: "60px", maxWidth: "180px" }
1187
833
  }
1188
834
  )
1189
- ]
1190
- }
1191
- ) : /* @__PURE__ */ t(
1192
- d,
1193
- {
1194
- sx: {
1195
- display: "flex",
1196
- flexDirection: "column",
1197
- width: "100%",
1198
- height: "100%",
1199
- p: u.lg,
1200
- gap: u.lg,
1201
- alignItems: "center",
1202
- position: "relative",
1203
- overflow: "auto",
1204
- boxSizing: "border-box"
1205
- },
1206
- children: ze()
1207
- }
1208
- );
1209
- }, Wt = ({
1210
- infoPage: e,
1211
- enableReset: c = !1,
1212
- imagePosition: a = "left",
1213
- defaultImagePlaceholderUrl: n
835
+ ] })
836
+ ] }) })
837
+ ] }) : /* @__PURE__ */ o("div", { css: u.embed, style: Be, children: Ce() });
838
+ }, Nt = ({
839
+ infoPage: t,
840
+ enableReset: l = !1,
841
+ imagePosition: b = "left",
842
+ defaultImagePlaceholderUrl: m
1214
843
  }) => {
1215
- var l, m, O;
1216
- const { t: g } = se(), o = J(), h = le(), i = Te() === "dark", r = fe(
844
+ var r, k, O;
845
+ const { t: y } = me(), a = q(), i = Re(), c = qe() === "dark", $ = we(
1217
846
  {
1218
- images: e.images,
1219
- imagePlaceholder: n || ""
847
+ images: t.images,
848
+ imagePlaceholder: m || ""
1220
849
  },
1221
- pe.STANDARD
1222
- ), s = (l = e.branding) == null ? void 0 : l.colors, k = (s == null ? void 0 : s.primary_color) || h.palette.primary.plainColor, z = (s == null ? void 0 : s.border_color) || null, x = (s == null ? void 0 : s.background_color) || h.surfaceVariant || "", b = (m = e.branding) == null ? void 0 : m.images, p = o ? (b == null ? void 0 : b.mobile_logo) || (b == null ? void 0 : b.main_logo) || "" : (b == null ? void 0 : b.main_logo) || "";
1223
- return /* @__PURE__ */ t(ke, { brandingBorderColor: z, children: /* @__PURE__ */ t(
1224
- $e,
850
+ ve.STANDARD
851
+ ), s = (r = t.branding) == null ? void 0 : r.colors, W = (s == null ? void 0 : s.primary_color) || i.palette.primary.plainColor, B = (s == null ? void 0 : s.border_color) || null, h = (s == null ? void 0 : s.background_color) || i.surfaceVariant || "", v = (k = t.branding) == null ? void 0 : k.images, f = a ? (v == null ? void 0 : v.mobile_logo) || (v == null ? void 0 : v.main_logo) || "" : (v == null ? void 0 : v.main_logo) || "";
852
+ return /* @__PURE__ */ o(_e, { brandingBorderColor: B, children: /* @__PURE__ */ o(
853
+ tt,
1225
854
  {
1226
855
  entity: {
1227
- ...e,
856
+ ...t,
1228
857
  type: "chance-game",
1229
- description: e.subtitle || "",
858
+ description: t.subtitle || "",
1230
859
  rules: null
1231
860
  },
1232
- headline: g("chanceGame.headlinePickOneOfX", {
1233
- count: ((O = JSON.parse(e.body).segments) == null ? void 0 : O.length) || 0
861
+ headline: y("chanceGame.headlinePickOneOfX", {
862
+ count: ((O = JSON.parse(t.body).segments) == null ? void 0 : O.length) || 0
1234
863
  }),
1235
- finalImage: r,
1236
- imagePosition: a,
1237
- children: /* @__PURE__ */ t(
1238
- Le,
864
+ finalImage: $,
865
+ imagePosition: b,
866
+ children: /* @__PURE__ */ o(
867
+ st,
1239
868
  {
1240
- infoPage: e,
1241
- enableReset: c,
1242
- contentColor: (s == null ? void 0 : s.content_color) || h.textPrimary,
1243
- primaryColor: k,
1244
- onPrimaryColor: (s == null ? void 0 : s.content_color) || h.palette.primary.onPrimary || h.surface,
1245
- borderColor: z || void 0,
1246
- backgroundColor: x,
1247
- dangerColor: h.palette.danger.plainColor,
1248
- cardBaseColor: x,
1249
- shimmerColor: k,
1250
- brandingLogo: p,
1251
- isDark: i,
869
+ infoPage: t,
870
+ enableReset: l,
871
+ contentColor: (s == null ? void 0 : s.content_color) || i.textPrimary,
872
+ primaryColor: W,
873
+ onPrimaryColor: (s == null ? void 0 : s.content_color) || i.palette.primary.onPrimary || i.surface,
874
+ borderColor: B || void 0,
875
+ backgroundColor: h,
876
+ dangerColor: i.palette.danger.plainColor,
877
+ cardBaseColor: h,
878
+ shimmerColor: W,
879
+ brandingLogo: f,
880
+ isDark: c,
1252
881
  showTitleBlock: !1,
1253
882
  variant: "standard",
1254
883
  compactCards: !0
@@ -1256,387 +885,252 @@ const ke = ({
1256
885
  )
1257
886
  }
1258
887
  ) });
1259
- }, Ne = (e) => ({
1260
- contentContainerWithBackdrop: {
1261
- borderRadius: e.mdBorderRadius,
1262
- display: "flex",
1263
- flexDirection: "column",
1264
- backdropFilter: "blur(4px)",
1265
- position: "relative",
1266
- overflow: "hidden",
1267
- "&::before": {
1268
- content: '""',
1269
- position: "absolute",
1270
- top: 0,
1271
- left: 0,
1272
- right: 0,
1273
- bottom: 0,
1274
- backgroundColor: e.contentBgColor,
1275
- opacity: 0.5,
1276
- borderRadius: "inherit",
1277
- zIndex: 0
1278
- },
1279
- "& > *": {
1280
- position: "relative",
1281
- zIndex: 1
1282
- },
1283
- zIndex: 2
888
+ }, dt = n({
889
+ borderRadius: "var(--fu-ucrc-cg-backdrop-radius)",
890
+ display: "flex",
891
+ flexDirection: "column",
892
+ backdropFilter: "blur(4px)",
893
+ position: "relative",
894
+ overflow: "hidden",
895
+ zIndex: 2,
896
+ "&::before": {
897
+ content: '""',
898
+ position: "absolute",
899
+ top: 0,
900
+ left: 0,
901
+ right: 0,
902
+ bottom: 0,
903
+ backgroundColor: "var(--fu-ucrc-cg-backdrop-bg)",
904
+ opacity: 0.5,
905
+ borderRadius: "inherit",
906
+ zIndex: 0
1284
907
  },
1285
- bottomFooterContainer: {
1286
- display: "flex",
1287
- alignItems: "center",
1288
- justifyContent: e.isMobile ? "center" : "space-between",
1289
- flexDirection: e.isMobile ? "column-reverse" : "row",
1290
- gap: e.spacingScale.md
1291
- },
1292
- welcome: {
1293
- fontFamily: e.fontFamilyPrimary,
1294
- color: e.textColor,
1295
- fontSize: "1em",
1296
- fontWeight: 400,
1297
- lineHeight: 1.5,
1298
- maxWidth: "800px",
1299
- margin: "0 auto",
1300
- opacity: 0.9
908
+ "& > *": {
909
+ position: "relative",
910
+ zIndex: 1
1301
911
  }
1302
- }), _t = ({
1303
- infoPage: e,
1304
- enableReset: c = !1,
1305
- defaultImagePlaceholderUrl: a
912
+ }), Ht = ({
913
+ infoPage: t,
914
+ enableReset: l = !1,
915
+ defaultImagePlaceholderUrl: b
1306
916
  }) => {
1307
- var f, N, V, _, D, T, H, y, X, F, R, $, W, P, U, j, A, I, S;
1308
- const { t: n } = se(), g = J(), o = Ae(), h = xe(), i = ((f = e.branding) == null ? void 0 : f.colors) || null, r = (N = e.branding) == null ? void 0 : N.images, s = g ? (r == null ? void 0 : r.mobile_background_image) || (r == null ? void 0 : r.background_image) || "" : (r == null ? void 0 : r.background_image) || "", k = g ? (r == null ? void 0 : r.mobile_logo) || (r == null ? void 0 : r.main_logo) || "" : (r == null ? void 0 : r.main_logo) || "", z = a || (g ? Ge : Ee), x = s || fe(
917
+ var L, x, _, P, M, F, T, N, g, H, D, S, C, I, R, U, j;
918
+ const { t: m } = me(), y = q(), a = Qe(), i = ((L = t.branding) == null ? void 0 : L.colors) || null, c = (x = t.branding) == null ? void 0 : x.images, $ = y ? (c == null ? void 0 : c.mobile_background_image) || (c == null ? void 0 : c.background_image) || "" : (c == null ? void 0 : c.background_image) || "", s = y ? (c == null ? void 0 : c.mobile_logo) || (c == null ? void 0 : c.main_logo) || "" : (c == null ? void 0 : c.main_logo) || "", W = b || (y ? Ze : et), B = $ || we(
1309
919
  {
1310
- images: e.images,
1311
- imagePlaceholder: z
920
+ images: t.images,
921
+ imagePlaceholder: W
1312
922
  },
1313
- pe.OVERLAY
1314
- ), b = o.colorSchemes.dark.textColor, p = (i == null ? void 0 : i.content_color) || b, l = (i == null ? void 0 : i.primary_color) || ((T = (D = (_ = (V = o.colorSchemes) == null ? void 0 : V.light) == null ? void 0 : _.palette) == null ? void 0 : D.primary) == null ? void 0 : T.plainColor), m = (F = (X = (y = (H = o.colorSchemes) == null ? void 0 : H.light) == null ? void 0 : y.palette) == null ? void 0 : X.primary) == null ? void 0 : F.onPrimary, O = (i == null ? void 0 : i.background_color) || (($ = (R = o.colorSchemes) == null ? void 0 : R.dark) == null ? void 0 : $.surfaceVariant), v = (j = (U = (P = (W = o.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : P.palette) == null ? void 0 : U.danger) == null ? void 0 : j.plainColor, u = o.customFontFamily.dark.primary, C = o.customRadius.dark.md, G = (I = (A = o.customRadius) == null ? void 0 : A.light) == null ? void 0 : I.xl, L = Ne({
1315
- spacingScale: h,
1316
- mdBorderRadius: C,
1317
- contentBgColor: O,
1318
- buttonRadius: G,
1319
- primaryColor: l,
1320
- onPrimaryColor: m,
1321
- fontFamilyPrimary: u,
1322
- darkTextColor: b,
1323
- isMobile: g,
1324
- textColor: p
1325
- });
1326
- return /* @__PURE__ */ t(
1327
- Ie,
923
+ ve.OVERLAY
924
+ ), h = a.colorSchemes.dark.textColor, v = (i == null ? void 0 : i.content_color) || h, f = (i == null ? void 0 : i.primary_color) || ((F = (M = (P = (_ = a.colorSchemes) == null ? void 0 : _.light) == null ? void 0 : P.palette) == null ? void 0 : M.primary) == null ? void 0 : F.plainColor), r = (H = (g = (N = (T = a.colorSchemes) == null ? void 0 : T.light) == null ? void 0 : N.palette) == null ? void 0 : g.primary) == null ? void 0 : H.onPrimary, k = (i == null ? void 0 : i.background_color) || ((S = (D = a.colorSchemes) == null ? void 0 : D.dark) == null ? void 0 : S.surfaceVariant), O = (U = (R = (I = (C = a.colorSchemes) == null ? void 0 : C.light) == null ? void 0 : I.palette) == null ? void 0 : R.danger) == null ? void 0 : U.plainColor, A = a.customRadius.dark.md;
925
+ return /* @__PURE__ */ o(
926
+ ot,
1328
927
  {
1329
928
  entity: {
1330
- ...e,
929
+ ...t,
1331
930
  type: "chance-game",
1332
- description: e.subtitle || "",
931
+ description: t.subtitle || "",
1333
932
  rules: null
1334
933
  },
1335
- headline: n("chanceGame.headlinePickOneOfX", {
1336
- count: ((S = JSON.parse(e.body).segments) == null ? void 0 : S.length) || 0
934
+ headline: m("chanceGame.headlinePickOneOfX", {
935
+ count: ((j = JSON.parse(t.body).segments) == null ? void 0 : j.length) || 0
1337
936
  }),
1338
- finalImage: x,
1339
- children: /* @__PURE__ */ t(d, { sx: L.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
1340
- Le,
937
+ finalImage: B,
938
+ children: /* @__PURE__ */ o(
939
+ "div",
1341
940
  {
1342
- infoPage: e,
1343
- enableReset: c,
1344
- contentColor: p,
1345
- primaryColor: l,
1346
- onPrimaryColor: m || "#FFFFFF",
1347
- backgroundColor: O,
1348
- dangerColor: v,
1349
- cardBaseColor: O,
1350
- shimmerColor: l,
1351
- brandingLogo: k,
1352
- isDark: !0,
1353
- showTitleBlock: !1,
1354
- variant: "overlay",
1355
- compactCards: !0
941
+ css: dt,
942
+ style: {
943
+ "--fu-ucrc-cg-backdrop-radius": A,
944
+ "--fu-ucrc-cg-backdrop-bg": k
945
+ },
946
+ children: /* @__PURE__ */ o(
947
+ st,
948
+ {
949
+ infoPage: t,
950
+ enableReset: l,
951
+ contentColor: v,
952
+ primaryColor: f,
953
+ onPrimaryColor: r || "#FFFFFF",
954
+ backgroundColor: k,
955
+ dangerColor: O,
956
+ cardBaseColor: k,
957
+ shimmerColor: f,
958
+ brandingLogo: s,
959
+ isDark: !0,
960
+ showTitleBlock: !1,
961
+ variant: "overlay",
962
+ compactCards: !0
963
+ }
964
+ )
1356
965
  }
1357
- ) })
966
+ )
1358
967
  }
1359
968
  );
1360
- }, Ot = (e) => {
1361
- const c = we().secondary, a = qe(), n = e.isSplitVariant && a, g = J(), o = Qe(e.primaryUrl, e.secondaryUrl, "logo");
1362
- if (!e.brandingLogo)
1363
- return null;
1364
- const h = () => {
1365
- o && window.open(o, "_blank", "noopener,noreferrer");
1366
- }, i = /* @__PURE__ */ t(
1367
- "img",
1368
- {
1369
- src: e.brandingLogo,
1370
- alt: "branding-logo",
1371
- style: {
1372
- maxHeight: "50px",
1373
- maxWidth: "100px"
1374
- }
1375
- }
1376
- ), r = o ? typeof window > "u" ? /* @__PURE__ */ t(
1377
- d,
1378
- {
1379
- component: "a",
1380
- href: o,
1381
- target: "_blank",
1382
- rel: "noopener noreferrer",
1383
- sx: {
1384
- cursor: "pointer",
1385
- textDecoration: "none",
1386
- display: "inline-flex"
1387
- },
1388
- children: i
1389
- }
1390
- ) : /* @__PURE__ */ t(
1391
- d,
1392
- {
1393
- onClick: h,
1394
- sx: {
1395
- cursor: "pointer",
1396
- display: "inline-flex"
1397
- },
1398
- children: i
1399
- }
1400
- ) : i;
1401
- return e.isCentered || n || g ? /* @__PURE__ */ w(
1402
- d,
1403
- {
1404
- sx: {
1405
- display: "flex",
1406
- flexDirection: "column",
1407
- gap: "8px",
1408
- alignItems: "center",
1409
- minWidth: "180px",
1410
- fontSize: "1em",
1411
- zIndex: 1
1412
- },
1413
- children: [
1414
- e.label && /* @__PURE__ */ t(
1415
- B,
1416
- {
1417
- level: "body-sm",
1418
- sx: {
1419
- fontWeight: 400,
1420
- lineHeight: "166%",
1421
- letterSpacing: "0.4px",
1422
- fontSize: "1em",
1423
- color: e.textColor,
1424
- textAlign: "right",
1425
- fontFamily: c
1426
- },
1427
- children: e.label
1428
- }
1429
- ),
1430
- r
1431
- ]
1432
- }
1433
- ) : /* @__PURE__ */ w(
1434
- d,
969
+ }, Ye = { minWidth: "180px", display: "flex", gap: "8px", alignItems: "center", fontSize: "1em" }, se = {
970
+ centered: n({ ...Ye, flexDirection: "column", zIndex: 1 }),
971
+ inline: n({ ...Ye, zIndex: 10 }),
972
+ label: n({
973
+ margin: 0,
974
+ fontWeight: 400,
975
+ lineHeight: "166%",
976
+ letterSpacing: "0.4px",
977
+ fontSize: "1em",
978
+ color: "var(--fu-ucrc-cg-presented-by)",
979
+ textAlign: "right",
980
+ fontFamily: "var(--fu-ucrc-font-secondary)"
981
+ }),
982
+ link: n({ cursor: "pointer", textDecoration: "none", display: "inline-flex" }),
983
+ clickable: n({ cursor: "pointer", display: "inline-flex" })
984
+ }, Ut = (t) => {
985
+ const l = bt(), b = q(), m = t.isSplitVariant && l, y = xt(t.primaryUrl, t.secondaryUrl, "logo");
986
+ if (!t.brandingLogo) return null;
987
+ const a = /* @__PURE__ */ o("img", { src: t.brandingLogo, alt: "branding-logo", style: { maxHeight: "50px", maxWidth: "100px" } }), i = y ? typeof window > "u" ? /* @__PURE__ */ o("a", { css: se.link, href: y, target: "_blank", rel: "noopener noreferrer", children: a }) : /* @__PURE__ */ o("div", { css: se.clickable, onClick: () => window.open(y, "_blank", "noopener,noreferrer"), children: a }) : a;
988
+ return /* @__PURE__ */ w(
989
+ "div",
1435
990
  {
1436
- sx: {
1437
- minWidth: "180px",
1438
- display: "flex",
1439
- gap: "8px",
1440
- alignItems: "center",
1441
- zIndex: 10,
1442
- fontSize: "1em"
1443
- },
991
+ css: t.isCentered || m || b ? se.centered : se.inline,
992
+ style: { "--fu-ucrc-cg-presented-by": t.textColor },
1444
993
  children: [
1445
- e.label && /* @__PURE__ */ t(
1446
- B,
1447
- {
1448
- level: "body-sm",
1449
- sx: {
1450
- fontWeight: 400,
1451
- lineHeight: "166%",
1452
- letterSpacing: "0.4px",
1453
- textAlign: "right",
1454
- fontSize: "1em",
1455
- color: e.textColor,
1456
- fontFamily: c
1457
- },
1458
- children: e.label
1459
- }
1460
- ),
1461
- r
994
+ t.label && /* @__PURE__ */ o("p", { css: se.label, children: t.label }),
995
+ i
1462
996
  ]
1463
997
  }
1464
998
  );
1465
- }, Dt = ({
1466
- infoPage: e,
1467
- enableReset: c = !1,
1468
- defaultImagePlaceholderUrl: a
999
+ }, jt = ({
1000
+ infoPage: t,
1001
+ enableReset: l = !1,
1002
+ defaultImagePlaceholderUrl: b
1469
1003
  }) => {
1470
- var N, V, _, D, T, H, y, X, F, R, $, W, P, U, j, A, I, S, ee, te, Y, E, q, M, Q, oe, ce;
1471
- const { t: n } = se(), g = J(), o = Ae(), h = xe(), i = ((N = e.branding) == null ? void 0 : N.colors) || null, r = (V = e.branding) == null ? void 0 : V.images, s = g ? (r == null ? void 0 : r.mobile_background_image) || (r == null ? void 0 : r.background_image) || "" : (r == null ? void 0 : r.background_image) || "", k = g ? (r == null ? void 0 : r.mobile_logo) || (r == null ? void 0 : r.main_logo) || "" : (r == null ? void 0 : r.main_logo) || "", z = a || (g ? Ge : Ee), x = s || fe(
1004
+ var x, _, P, M, F, T, N, g, H, D, S, C, I, R, U, j, te, X, V, z, Q, oe, Y, E, Z;
1005
+ const { t: m } = me(), y = q(), a = Qe(), i = ((x = t.branding) == null ? void 0 : x.colors) || null, c = (_ = t.branding) == null ? void 0 : _.images, $ = y ? (c == null ? void 0 : c.mobile_background_image) || (c == null ? void 0 : c.background_image) || "" : (c == null ? void 0 : c.background_image) || "", s = y ? (c == null ? void 0 : c.mobile_logo) || (c == null ? void 0 : c.main_logo) || "" : (c == null ? void 0 : c.main_logo) || "", W = b || (y ? Ze : et), B = $ || we(
1472
1006
  {
1473
- images: e.images,
1474
- imagePlaceholder: z
1007
+ images: t.images,
1008
+ imagePlaceholder: W
1475
1009
  },
1476
- pe.OVERLAY
1477
- ), b = o.colorSchemes.dark.textColor, p = (i == null ? void 0 : i.content_color) || b, l = (i == null ? void 0 : i.primary_color) || ((H = (T = (D = (_ = o.colorSchemes) == null ? void 0 : _.light) == null ? void 0 : D.palette) == null ? void 0 : T.primary) == null ? void 0 : H.plainColor), m = (i == null ? void 0 : i.secondary_color) || ((R = (F = (X = (y = o.colorSchemes) == null ? void 0 : y.light) == null ? void 0 : X.palette) == null ? void 0 : F.danger) == null ? void 0 : R.plainColor), O = (U = (P = (W = ($ = o.colorSchemes) == null ? void 0 : $.light) == null ? void 0 : W.palette) == null ? void 0 : P.primary) == null ? void 0 : U.onPrimary, v = (i == null ? void 0 : i.background_color) || ((A = (j = o.colorSchemes) == null ? void 0 : j.dark) == null ? void 0 : A.surfaceVariant), u = (te = (ee = (S = (I = o.colorSchemes) == null ? void 0 : I.light) == null ? void 0 : S.palette) == null ? void 0 : ee.danger) == null ? void 0 : te.plainColor, C = o.customFontFamily.dark.primary, G = o.customRadius.dark.md, L = (E = (Y = o.customRadius) == null ? void 0 : Y.light) == null ? void 0 : E.xl, f = Ne({
1478
- spacingScale: h,
1479
- mdBorderRadius: G,
1480
- contentBgColor: v,
1481
- buttonRadius: L,
1482
- primaryColor: l,
1483
- onPrimaryColor: O,
1484
- fontFamilyPrimary: C,
1485
- darkTextColor: b,
1486
- isMobile: g,
1487
- textColor: p
1488
- });
1010
+ ve.OVERLAY
1011
+ ), h = a.colorSchemes.dark.textColor, v = (i == null ? void 0 : i.content_color) || h, f = (i == null ? void 0 : i.primary_color) || ((T = (F = (M = (P = a.colorSchemes) == null ? void 0 : P.light) == null ? void 0 : M.palette) == null ? void 0 : F.primary) == null ? void 0 : T.plainColor), r = (i == null ? void 0 : i.secondary_color) || ((D = (H = (g = (N = a.colorSchemes) == null ? void 0 : N.light) == null ? void 0 : g.palette) == null ? void 0 : H.danger) == null ? void 0 : D.plainColor), k = (R = (I = (C = (S = a.colorSchemes) == null ? void 0 : S.light) == null ? void 0 : C.palette) == null ? void 0 : I.primary) == null ? void 0 : R.onPrimary, O = (i == null ? void 0 : i.background_color) || ((j = (U = a.colorSchemes) == null ? void 0 : U.dark) == null ? void 0 : j.surfaceVariant), A = (z = (V = (X = (te = a.colorSchemes) == null ? void 0 : te.light) == null ? void 0 : X.palette) == null ? void 0 : V.danger) == null ? void 0 : z.plainColor, L = a.customRadius.dark.md;
1489
1012
  return /* @__PURE__ */ w(
1490
- Ie,
1013
+ ot,
1491
1014
  {
1492
1015
  entity: {
1493
- ...e,
1016
+ ...t,
1494
1017
  type: "chance-game",
1495
- description: e.subtitle || "",
1018
+ description: t.subtitle || "",
1496
1019
  rules: null
1497
1020
  },
1498
- headline: n("chanceGame.headlinePrizeWheel"),
1499
- finalImage: x,
1021
+ headline: m("chanceGame.headlinePrizeWheel"),
1022
+ finalImage: B,
1500
1023
  children: [
1501
- /* @__PURE__ */ t(d, { sx: f.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
1502
- Me,
1024
+ /* @__PURE__ */ o(
1025
+ "div",
1503
1026
  {
1504
- infoPage: e,
1505
- enableReset: c,
1506
- contentColor: p,
1507
- primaryColor: l,
1508
- secondaryColor: m,
1509
- onPrimaryColor: O || "#FFFFFF",
1510
- backgroundColor: v,
1511
- dangerColor: u,
1512
- shimmerColor: l,
1513
- brandingLogo: k,
1514
- isDark: !0,
1515
- showTitleBlock: !1,
1516
- variant: "overlay"
1027
+ css: dt,
1028
+ style: {
1029
+ "--fu-ucrc-cg-backdrop-radius": L,
1030
+ "--fu-ucrc-cg-backdrop-bg": O
1031
+ },
1032
+ children: /* @__PURE__ */ o(
1033
+ at,
1034
+ {
1035
+ infoPage: t,
1036
+ enableReset: l,
1037
+ contentColor: v,
1038
+ primaryColor: f,
1039
+ secondaryColor: r,
1040
+ onPrimaryColor: k || "#FFFFFF",
1041
+ backgroundColor: O,
1042
+ dangerColor: A,
1043
+ shimmerColor: f,
1044
+ brandingLogo: s,
1045
+ isDark: !0,
1046
+ showTitleBlock: !1,
1047
+ variant: "overlay"
1048
+ }
1049
+ )
1517
1050
  }
1518
- ) }),
1519
- /* @__PURE__ */ t(
1520
- Ot,
1051
+ ),
1052
+ /* @__PURE__ */ o(
1053
+ Ut,
1521
1054
  {
1522
- brandingLogo: k,
1523
- textColor: b,
1524
- label: ((q = e.labels) == null ? void 0 : q.sponsor) || null,
1525
- primaryUrl: (Q = (M = e.branding) == null ? void 0 : M.urls) == null ? void 0 : Q.primary_url,
1526
- secondaryUrl: (ce = (oe = e.branding) == null ? void 0 : oe.urls) == null ? void 0 : ce.secondary_url
1055
+ brandingLogo: s,
1056
+ textColor: h,
1057
+ label: ((Q = t.labels) == null ? void 0 : Q.sponsor) || null,
1058
+ primaryUrl: (Y = (oe = t.branding) == null ? void 0 : oe.urls) == null ? void 0 : Y.primary_url,
1059
+ secondaryUrl: (Z = (E = t.branding) == null ? void 0 : E.urls) == null ? void 0 : Z.secondary_url
1527
1060
  }
1528
1061
  )
1529
1062
  ]
1530
1063
  }
1531
1064
  );
1532
- }, Bt = (e) => {
1533
- const { infoPage: c } = Ze(e.entityId, "chance-game", e.sdk), a = () => {
1534
- if (c && c.id !== "not-found") {
1535
- const o = Object.keys(ot);
1536
- if (c.language && o.includes(c.language))
1537
- return c.language;
1538
- if (c.language)
1065
+ }, Yt = (t) => {
1066
+ const { infoPage: l } = yt(t.entityId, "chance-game", t.sdk), b = () => {
1067
+ if (l && l.id !== "not-found") {
1068
+ const a = Object.keys(vt);
1069
+ if (l.language && a.includes(l.language))
1070
+ return l.language;
1071
+ if (l.language)
1539
1072
  return "en";
1540
1073
  }
1541
- return e.language || "en";
1542
- }, [n, g] = dt(!1);
1543
- if (mt(() => {
1544
- const o = a();
1545
- et(o).then(() => g(!0));
1546
- }, [e.language, c]), !c || !n)
1547
- return /* @__PURE__ */ t(tt, { my: 20 });
1548
- if (c.id === "not-found")
1549
- return /* @__PURE__ */ t(zt, { template: e.template });
1550
- if (e.template === he.STANDARD) {
1551
- const o = e.imagePosition, h = e.defaultImagePlaceholderUrl;
1552
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(
1553
- Wt,
1074
+ return t.language || "en";
1075
+ }, [m, y] = St(!1);
1076
+ if (zt(() => {
1077
+ const a = b();
1078
+ wt(a).then(() => y(!0));
1079
+ }, [t.language, l]), !l || !m)
1080
+ return /* @__PURE__ */ o(Mt, { marginBlock: "160px" });
1081
+ if (l.id === "not-found")
1082
+ return /* @__PURE__ */ o(Lt, { template: t.template });
1083
+ if (t.template === ye.STANDARD) {
1084
+ const a = t.imagePosition, i = t.defaultImagePlaceholderUrl;
1085
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(ze, { infoPage: l }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(
1086
+ Nt,
1554
1087
  {
1555
- infoPage: c,
1556
- imagePosition: o,
1557
- defaultImagePlaceholderUrl: h
1088
+ infoPage: l,
1089
+ imagePosition: a,
1090
+ defaultImagePlaceholderUrl: i
1558
1091
  }
1559
- ) : /* @__PURE__ */ t(
1560
- Ft,
1092
+ ) : /* @__PURE__ */ o(
1093
+ Pt,
1561
1094
  {
1562
- infoPage: c,
1563
- imagePosition: o,
1564
- defaultImagePlaceholderUrl: h
1095
+ infoPage: l,
1096
+ imagePosition: a,
1097
+ defaultImagePlaceholderUrl: i
1565
1098
  }
1566
1099
  );
1567
1100
  }
1568
- if (e.template === he.OVERLAY) {
1569
- const o = e.defaultImagePlaceholderUrl;
1570
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(
1571
- _t,
1101
+ if (t.template === ye.OVERLAY) {
1102
+ const a = t.defaultImagePlaceholderUrl;
1103
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(ze, { infoPage: l }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(
1104
+ Ht,
1572
1105
  {
1573
- infoPage: c,
1574
- defaultImagePlaceholderUrl: o
1106
+ infoPage: l,
1107
+ defaultImagePlaceholderUrl: a
1575
1108
  }
1576
- ) : /* @__PURE__ */ t(
1577
- Dt,
1109
+ ) : /* @__PURE__ */ o(
1110
+ jt,
1578
1111
  {
1579
- infoPage: c,
1580
- defaultImagePlaceholderUrl: o
1112
+ infoPage: l,
1113
+ defaultImagePlaceholderUrl: a
1581
1114
  }
1582
1115
  );
1583
1116
  }
1584
- return e.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ t(be, { infoPage: c }) : e.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ t(vt, { infoPage: c }) : /* @__PURE__ */ t(St, { infoPage: c });
1585
- }, Ct = (e) => {
1586
- const [c, a] = Z.useState(!1), n = nt(e.language), g = Z.useRef(
1587
- `chance-game-shadow-root-${Math.random().toString(36).substring(2, 11)}`
1588
- ), o = Z.useRef(null), h = Z.useRef(null), i = Z.useRef(null), [r, s] = Z.useState(null);
1589
- Z.useEffect(() => {
1590
- if (!o.current) return;
1591
- o.current.shadowRoot ? (h.current = o.current.shadowRoot, i.current = h.current.getElementById(
1592
- g.current
1593
- ), i.current || (i.current = document.createElement("div"), i.current.id = g.current, h.current.appendChild(i.current))) : (h.current = o.current.attachShadow({ mode: "open" }), i.current = document.createElement("div"), i.current.id = g.current, h.current.appendChild(i.current)), rt(i.current, n);
1594
- const p = it("chance-game", n);
1595
- return s(
1596
- (l) => (l == null ? void 0 : l.key) === p ? l : lt(
1597
- "chance-game",
1598
- h.current,
1599
- n
1600
- )
1601
- ), a(!0), () => {
1602
- a(!1);
1603
- };
1604
- }, [n]);
1605
- const k = e.themeOptions, z = {
1606
- ...k,
1607
- mode: e.template === he.OVERLAY ? "dark" : k == null ? void 0 : k.mode
1608
- }, x = /* @__PURE__ */ t(d, { ref: o, lang: e.language || "en" }), b = c && o.current && i.current && r ? kt(
1609
- // Keyed on the cache, not on `direction`: it must change in the same
1610
- // render that adopts the new cache, or CssVarsProvider writes its CSS
1611
- // variables into the outgoing cache and never repeats.
1612
- /* @__PURE__ */ t(wt, { value: r, children: /* @__PURE__ */ t(at, { containerRef: o, children: /* @__PURE__ */ t(
1613
- st,
1614
- {
1615
- customTheme: z,
1616
- mode: z == null ? void 0 : z.mode,
1617
- shadowRootElement: i.current,
1618
- direction: n,
1619
- children: /* @__PURE__ */ t(
1620
- ct,
1621
- {
1622
- shadowRootElement: i.current,
1623
- leadPhoneCountryCode: null,
1624
- language: null,
1625
- optionsLayout: null,
1626
- direction: n,
1627
- disableCache: e.disableCache ?? !1,
1628
- children: e.children
1629
- }
1630
- )
1631
- }
1632
- ) }) }, r.key),
1633
- i.current
1634
- ) : null;
1635
- return /* @__PURE__ */ w(re, { children: [
1636
- x,
1637
- b
1638
- ] });
1639
- }, Tt = (e) => /* @__PURE__ */ t(Ct, { ...e, children: /* @__PURE__ */ t(Bt, { ...e }) }), Nt = Rt(Tt);
1117
+ return t.variant === ne.PENALTY_SHOOTOUT ? /* @__PURE__ */ o(ze, { infoPage: l }) : t.variant === ne.PICK_ONE_OF_X ? /* @__PURE__ */ o(It, { infoPage: l }) : /* @__PURE__ */ o(At, { infoPage: l });
1118
+ }, Jt = (t) => {
1119
+ const l = kt.useMemo(
1120
+ () => t.template === ye.OVERLAY ? { ...t.themeOptions, mode: "dark" } : t.themeOptions,
1121
+ [t.template, t.themeOptions]
1122
+ );
1123
+ return /* @__PURE__ */ o(
1124
+ Rt,
1125
+ {
1126
+ packageName: "chance-game",
1127
+ language: t.language,
1128
+ themeOptions: l,
1129
+ disableCache: t.disableCache,
1130
+ children: t.children
1131
+ }
1132
+ );
1133
+ }, Kt = (t) => /* @__PURE__ */ o(Jt, { ...t, children: /* @__PURE__ */ o(Yt, { ...t }) }), co = Gt(Kt);
1640
1134
  export {
1641
- Nt as ChanceGame
1135
+ co as ChanceGame
1642
1136
  };