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.
- package/Betslip.js +2 -2
- package/ChanceGame.js +958 -1464
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4281 -4919
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6010 -7547
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +546 -849
- package/List.js +227 -218
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +2 -2
- package/PlayerOfTheMatch.js +285 -269
- package/PollVote.js +2 -2
- package/Predictor.js +80 -127
- package/README.md +1 -1
- package/Standings.js +991 -1324
- package/TopX.js +1120 -1167
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
- package/chunks/CheckCircle-I1FktW5Y.js +13 -0
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/Person-CXRqyF4E.js +11 -0
- package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
- package/chunks/Search-CIXthh0D.js +17 -0
- package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
- package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
- package/chunks/index-BENM3N_w.js +4 -0
- package/chunks/index-BRxAV693.js +4 -0
- package/chunks/index-BXYTsvIX.js +4 -0
- package/chunks/index-C0ilols1.js +4 -0
- package/chunks/index-D7VhczXH.js +4 -0
- package/chunks/index-DKwvdw9t.js +4 -0
- package/chunks/index-DZN-AITW.js +4 -0
- package/chunks/main-B2sDRFF4.js +2184 -0
- package/chunks/main-CzfWaEQP.js +4869 -0
- package/chunks/main-DFNl3g_U.js +4910 -0
- package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
- package/chunks/main-DiBlJBNb.js +1956 -0
- package/chunks/main-DxvBjXsd.js +1775 -0
- package/chunks/main-S8_NDSiY.js +3209 -0
- package/chunks/main-lBgr8Liq.js +6571 -0
- package/chunks/{withVersionStamp-BkiEu_79.js → withVersionStamp-BsLyhvNA.js} +1 -1
- package/package.json +2 -2
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
package/List.js
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { jsxs as P, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useDisableCache as it, useColors as st, useFontFamily as at, useCornerRadius as ct, useSpacingScale as lt, isMobile as J, defaultBg as dt, useConstantContext as pt, ConstantsContext as ut, WidgetTemplate as
|
|
3
|
-
import { Card as
|
|
4
|
-
import { useState as
|
|
2
|
+
import { useDisableCache as it, useColors as st, useFontFamily as at, useCornerRadius as ct, useSpacingScale as lt, isMobile as J, defaultBg as dt, useConstantContext as pt, ConstantsContext as ut, WidgetTemplate as ht, Spinner as tt, DirectionalIcon as D, Portal as gt } from "fansunited-frontend-core";
|
|
3
|
+
import { Card as ft, CardCover as q, CardContent as mt, Box as g, Chip as yt, Typography as V, Modal as xt, ModalDialog as Ct, ModalClose as It, IconButton as W, Button as et } from "@mui/joy";
|
|
4
|
+
import { useState as z, useRef as v, useCallback as j, useEffect as wt, lazy as B, Suspense as St } from "react";
|
|
5
5
|
import { useTranslation as K } from "react-i18next";
|
|
6
|
-
import {
|
|
7
|
-
import { C as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import { c as bt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
7
|
+
import { C as Tt, a as Pt, b as Et, c as Mt } from "./chunks/chevrons-right-HWKW2c4I.js";
|
|
8
|
+
import { w as Lt } from "./chunks/withVersionStamp-BsLyhvNA.js";
|
|
9
|
+
/**
|
|
10
|
+
* @license lucide-react v0.454.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const Ut = bt("Users", [
|
|
16
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
17
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
18
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
19
|
+
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
|
|
20
|
+
]), nt = (e) => {
|
|
21
|
+
const n = e.entityModel;
|
|
22
|
+
if (!n) return null;
|
|
23
|
+
switch (e.entityType) {
|
|
15
24
|
case "CLASSIC_QUIZ": {
|
|
16
|
-
const t =
|
|
25
|
+
const t = n;
|
|
17
26
|
return {
|
|
18
27
|
title: t.title,
|
|
19
28
|
images: t.images,
|
|
@@ -23,7 +32,7 @@ const et = (n) => {
|
|
|
23
32
|
};
|
|
24
33
|
}
|
|
25
34
|
case "PERSONALITY_QUIZ": {
|
|
26
|
-
const t =
|
|
35
|
+
const t = n;
|
|
27
36
|
return {
|
|
28
37
|
title: t.title,
|
|
29
38
|
images: t.images,
|
|
@@ -33,7 +42,7 @@ const et = (n) => {
|
|
|
33
42
|
};
|
|
34
43
|
}
|
|
35
44
|
case "POLL": {
|
|
36
|
-
const t =
|
|
45
|
+
const t = n;
|
|
37
46
|
return {
|
|
38
47
|
title: t.title,
|
|
39
48
|
images: t.images,
|
|
@@ -43,7 +52,7 @@ const et = (n) => {
|
|
|
43
52
|
};
|
|
44
53
|
}
|
|
45
54
|
case "EITHER_OR": {
|
|
46
|
-
const t =
|
|
55
|
+
const t = n;
|
|
47
56
|
return {
|
|
48
57
|
title: t.title,
|
|
49
58
|
images: t.images,
|
|
@@ -53,7 +62,7 @@ const et = (n) => {
|
|
|
53
62
|
};
|
|
54
63
|
}
|
|
55
64
|
case "MATCH_QUIZ": {
|
|
56
|
-
const t =
|
|
65
|
+
const t = n;
|
|
57
66
|
return {
|
|
58
67
|
title: t.title,
|
|
59
68
|
images: t.images,
|
|
@@ -63,7 +72,7 @@ const et = (n) => {
|
|
|
63
72
|
};
|
|
64
73
|
}
|
|
65
74
|
case "CUSTOM_EVENT_GAME": {
|
|
66
|
-
const t =
|
|
75
|
+
const t = n;
|
|
67
76
|
return {
|
|
68
77
|
title: t.title,
|
|
69
78
|
images: t.images,
|
|
@@ -74,123 +83,123 @@ const et = (n) => {
|
|
|
74
83
|
default:
|
|
75
84
|
return null;
|
|
76
85
|
}
|
|
77
|
-
},
|
|
86
|
+
}, Rt = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), _t = (e) => {
|
|
78
87
|
var t;
|
|
79
|
-
const
|
|
80
|
-
return !!(
|
|
81
|
-
},
|
|
82
|
-
const l = p === "paged", a = p === "limited", [r, c] =
|
|
88
|
+
const n = (t = nt(e)) == null ? void 0 : t.status;
|
|
89
|
+
return !!(n && Rt.has(n));
|
|
90
|
+
}, Ft = 50, vt = 3, zt = (e, n, t, p) => {
|
|
91
|
+
const l = p === "paged", a = p === "limited", [r, c] = z([]), [y, s] = z(!1), [U, A] = z(!1), [Z, O] = z(!l), [H, R] = z(1), [E, Q] = z(1), w = v([]), _ = v([]), k = v(/* @__PURE__ */ new Set()), I = v(1), M = v(!1), S = v(!1), T = v(null), d = v(0), f = it(), i = j(
|
|
83
92
|
async (u, C) => {
|
|
84
|
-
var
|
|
85
|
-
const
|
|
86
|
-
|
|
93
|
+
var N;
|
|
94
|
+
const m = await e.lists.getListContent(
|
|
95
|
+
n,
|
|
87
96
|
{ limit: C, page: u },
|
|
88
|
-
|
|
89
|
-
),
|
|
97
|
+
f
|
|
98
|
+
), h = (N = m.meta) == null ? void 0 : N.pagination, L = m.data ?? [];
|
|
90
99
|
return {
|
|
91
|
-
valid:
|
|
92
|
-
rawCount:
|
|
93
|
-
pageCount: (
|
|
100
|
+
valid: L.filter(_t),
|
|
101
|
+
rawCount: L.length,
|
|
102
|
+
pageCount: (h == null ? void 0 : h.numberOfPages) ?? 1
|
|
94
103
|
};
|
|
95
104
|
},
|
|
96
|
-
[
|
|
105
|
+
[e, n, f]
|
|
97
106
|
), F = j(async () => {
|
|
98
|
-
if (S.current || !
|
|
99
|
-
const u = d.current, C = () => u !== d.current,
|
|
100
|
-
if (
|
|
101
|
-
|
|
107
|
+
if (S.current || !e || !n) return;
|
|
108
|
+
const u = d.current, C = () => u !== d.current, m = a ? t - _.current.length : t;
|
|
109
|
+
if (m <= 0) {
|
|
110
|
+
O(!1);
|
|
102
111
|
return;
|
|
103
112
|
}
|
|
104
|
-
if (w.current.length <
|
|
113
|
+
if (w.current.length < m && !M.current) {
|
|
105
114
|
S.current = !0, s(!0);
|
|
106
115
|
try {
|
|
107
|
-
let
|
|
108
|
-
for (; w.current.length <
|
|
116
|
+
let L = 0;
|
|
117
|
+
for (; w.current.length < m && !M.current && L < vt; ) {
|
|
109
118
|
const {
|
|
110
|
-
valid:
|
|
119
|
+
valid: N,
|
|
111
120
|
rawCount: ot,
|
|
112
121
|
pageCount: rt
|
|
113
|
-
} = await i(I.current,
|
|
122
|
+
} = await i(I.current, Ft);
|
|
114
123
|
if (C()) return;
|
|
115
|
-
|
|
116
|
-
const $ =
|
|
117
|
-
(G) => !
|
|
124
|
+
L += 1;
|
|
125
|
+
const $ = N.filter(
|
|
126
|
+
(G) => !k.current.has(G.entityId)
|
|
118
127
|
);
|
|
119
|
-
$.forEach((G) =>
|
|
128
|
+
$.forEach((G) => k.current.add(G.entityId)), w.current.push(...$), (ot === 0 || I.current >= rt) && (M.current = !0), I.current += 1;
|
|
120
129
|
}
|
|
121
|
-
} catch (
|
|
130
|
+
} catch (L) {
|
|
122
131
|
if (C()) return;
|
|
123
|
-
console.warn("Error fetching list content:",
|
|
132
|
+
console.warn("Error fetching list content:", L), A(!0);
|
|
124
133
|
return;
|
|
125
134
|
} finally {
|
|
126
135
|
C() || (S.current = !1, s(!1));
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
if (C()) return;
|
|
130
|
-
const
|
|
131
|
-
_.current =
|
|
132
|
-
!a && (w.current.length > 0 || !
|
|
139
|
+
const h = [..._.current, ...w.current.splice(0, m)];
|
|
140
|
+
_.current = h, c(h), O(
|
|
141
|
+
!a && (w.current.length > 0 || !M.current)
|
|
133
142
|
);
|
|
134
|
-
}, [i, a, t,
|
|
143
|
+
}, [i, a, t, n, e]), b = j(
|
|
135
144
|
(u, C) => {
|
|
136
|
-
const
|
|
137
|
-
c(u.slice((
|
|
145
|
+
const m = Math.max(1, Math.ceil(u.length / t)), h = Math.min(Math.max(C, 1), m);
|
|
146
|
+
c(u.slice((h - 1) * t, h * t)), Q(m), R(h);
|
|
138
147
|
},
|
|
139
148
|
[t]
|
|
140
149
|
), x = j(
|
|
141
150
|
async (u) => {
|
|
142
151
|
if (u < 1) return;
|
|
143
|
-
if (
|
|
144
|
-
T
|
|
152
|
+
if (T.current) {
|
|
153
|
+
b(T.current, u);
|
|
145
154
|
return;
|
|
146
155
|
}
|
|
147
|
-
if (S.current || !
|
|
148
|
-
const C = d.current,
|
|
156
|
+
if (S.current || !e || !n) return;
|
|
157
|
+
const C = d.current, m = () => C !== d.current;
|
|
149
158
|
S.current = !0, s(!0);
|
|
150
159
|
try {
|
|
151
160
|
const {
|
|
152
|
-
valid:
|
|
153
|
-
rawCount:
|
|
154
|
-
pageCount:
|
|
161
|
+
valid: h,
|
|
162
|
+
rawCount: L,
|
|
163
|
+
pageCount: N
|
|
155
164
|
} = await i(u, t);
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
158
|
-
|
|
165
|
+
if (m()) return;
|
|
166
|
+
if (L > t) {
|
|
167
|
+
T.current = h, b(h, u);
|
|
159
168
|
return;
|
|
160
169
|
}
|
|
161
|
-
c(
|
|
162
|
-
} catch (
|
|
163
|
-
if (
|
|
164
|
-
console.warn("Error fetching list content:",
|
|
170
|
+
c(h), Q(N), R(u);
|
|
171
|
+
} catch (h) {
|
|
172
|
+
if (m()) return;
|
|
173
|
+
console.warn("Error fetching list content:", h), A(!0);
|
|
165
174
|
} finally {
|
|
166
|
-
|
|
175
|
+
m() || (S.current = !1, s(!1));
|
|
167
176
|
}
|
|
168
177
|
},
|
|
169
|
-
[i, t,
|
|
178
|
+
[i, t, n, e, b]
|
|
170
179
|
);
|
|
171
180
|
return wt(() => {
|
|
172
|
-
d.current += 1, S.current = !1, w.current = [], _.current = [],
|
|
181
|
+
d.current += 1, S.current = !1, w.current = [], _.current = [], k.current = /* @__PURE__ */ new Set(), I.current = 1, M.current = !1, T.current = null, c([]), A(!1), O(!l), R(1), Q(1), l ? x(1) : F();
|
|
173
182
|
}, [l, x, F]), {
|
|
174
183
|
items: r,
|
|
175
184
|
loading: y,
|
|
176
185
|
error: U,
|
|
177
|
-
hasMore:
|
|
186
|
+
hasMore: Z,
|
|
178
187
|
loadMore: F,
|
|
179
|
-
page:
|
|
188
|
+
page: H,
|
|
180
189
|
pageCount: E,
|
|
181
190
|
goToPage: x
|
|
182
191
|
};
|
|
183
192
|
}, Y = () => {
|
|
184
|
-
const
|
|
193
|
+
const e = st(), n = at(), t = ct(), p = lt();
|
|
185
194
|
return {
|
|
186
|
-
fonts:
|
|
195
|
+
fonts: n,
|
|
187
196
|
spacing: p,
|
|
188
197
|
radius: t,
|
|
189
198
|
colors: {
|
|
190
|
-
surface:
|
|
191
|
-
text:
|
|
192
|
-
primary:
|
|
193
|
-
onPrimary:
|
|
199
|
+
surface: e.surface,
|
|
200
|
+
text: e.textPrimary,
|
|
201
|
+
primary: e.palette.primary.plainColor,
|
|
202
|
+
onPrimary: e.palette.primary.onPrimary
|
|
194
203
|
},
|
|
195
204
|
/** Fixed tones for content painted over the card's cover image. */
|
|
196
205
|
onImage: {
|
|
@@ -204,42 +213,42 @@ const et = (n) => {
|
|
|
204
213
|
labelShadow: "0 1px 2px rgba(0,0,0,0.4)"
|
|
205
214
|
}
|
|
206
215
|
};
|
|
207
|
-
}, X = "{CONTENT_ID}", At = (
|
|
208
|
-
switch (
|
|
216
|
+
}, X = "{CONTENT_ID}", At = (e, n) => {
|
|
217
|
+
switch (e) {
|
|
209
218
|
case "CLASSIC_QUIZ":
|
|
210
|
-
return
|
|
219
|
+
return n == null ? void 0 : n.classicQuizUrl;
|
|
211
220
|
case "PERSONALITY_QUIZ":
|
|
212
|
-
return
|
|
221
|
+
return n == null ? void 0 : n.personalityQuizUrl;
|
|
213
222
|
case "EITHER_OR":
|
|
214
|
-
return
|
|
223
|
+
return n == null ? void 0 : n.eitherOrUrl;
|
|
215
224
|
case "POLL":
|
|
216
|
-
return
|
|
225
|
+
return n == null ? void 0 : n.pollUrl;
|
|
217
226
|
case "MATCH_QUIZ":
|
|
218
|
-
return
|
|
227
|
+
return n == null ? void 0 : n.matchQuizUrl;
|
|
219
228
|
case "CUSTOM_EVENT_GAME":
|
|
220
|
-
return
|
|
229
|
+
return n == null ? void 0 : n.eventGameUrl;
|
|
221
230
|
default:
|
|
222
231
|
return;
|
|
223
232
|
}
|
|
224
|
-
}, Ot = (
|
|
225
|
-
const t = At(
|
|
226
|
-
return t ? t.includes(X) ? t.replace(X,
|
|
227
|
-
},
|
|
228
|
-
const t =
|
|
229
|
-
return t ?
|
|
230
|
-
},
|
|
231
|
-
item:
|
|
232
|
-
entityData:
|
|
233
|
+
}, Ot = (e) => !!(e != null && e.classicQuizUrl || e != null && e.personalityQuizUrl || e != null && e.eitherOrUrl || e != null && e.pollUrl || e != null && e.matchQuizUrl || e != null && e.eventGameUrl), Qt = (e, n) => {
|
|
234
|
+
const t = At(e.entityType, n);
|
|
235
|
+
return t ? t.includes(X) ? t.replace(X, e.entityId) : t : null;
|
|
236
|
+
}, kt = (e, n) => {
|
|
237
|
+
const t = e == null ? void 0 : e.images;
|
|
238
|
+
return t ? n ? t.mobileLogo || t.mainLogo || null : t.mainLogo || t.mobileLogo || null : null;
|
|
239
|
+
}, Ht = ({
|
|
240
|
+
item: e,
|
|
241
|
+
entityData: n,
|
|
233
242
|
typeLabel: t,
|
|
234
243
|
imagePlaceholder: p,
|
|
235
244
|
onClick: l
|
|
236
245
|
}) => {
|
|
237
246
|
var s, U;
|
|
238
|
-
const { t: a } = K(), r = Y(), c = J(), y =
|
|
247
|
+
const { t: a } = K(), r = Y(), c = J(), y = kt(n.branding, c);
|
|
239
248
|
return /* @__PURE__ */ P(
|
|
240
|
-
|
|
249
|
+
ft,
|
|
241
250
|
{
|
|
242
|
-
onClick: () => l(
|
|
251
|
+
onClick: () => l(e),
|
|
243
252
|
sx: {
|
|
244
253
|
fontSize: "1em",
|
|
245
254
|
fontFamily: r.fonts.secondary,
|
|
@@ -262,16 +271,16 @@ const et = (n) => {
|
|
|
262
271
|
/* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(
|
|
263
272
|
"img",
|
|
264
273
|
{
|
|
265
|
-
src: ((s =
|
|
266
|
-
alt:
|
|
274
|
+
src: ((s = n.images) == null ? void 0 : s.cover) || ((U = n.images) == null ? void 0 : U.main) || p || dt,
|
|
275
|
+
alt: n.title,
|
|
267
276
|
loading: "lazy",
|
|
268
277
|
style: { transition: "transform 0.4s ease-out" }
|
|
269
278
|
}
|
|
270
279
|
) }),
|
|
271
280
|
/* @__PURE__ */ o(q, { sx: { background: r.onImage.scrim } }),
|
|
272
|
-
/* @__PURE__ */ P(
|
|
281
|
+
/* @__PURE__ */ P(mt, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
|
|
273
282
|
/* @__PURE__ */ P(
|
|
274
|
-
|
|
283
|
+
g,
|
|
275
284
|
{
|
|
276
285
|
sx: {
|
|
277
286
|
display: "flex",
|
|
@@ -280,9 +289,9 @@ const et = (n) => {
|
|
|
280
289
|
gap: r.spacing.md
|
|
281
290
|
},
|
|
282
291
|
children: [
|
|
283
|
-
/* @__PURE__ */ P(
|
|
292
|
+
/* @__PURE__ */ P(g, { children: [
|
|
284
293
|
/* @__PURE__ */ P(
|
|
285
|
-
|
|
294
|
+
g,
|
|
286
295
|
{
|
|
287
296
|
sx: {
|
|
288
297
|
display: "flex",
|
|
@@ -305,23 +314,23 @@ const et = (n) => {
|
|
|
305
314
|
children: t
|
|
306
315
|
}
|
|
307
316
|
),
|
|
308
|
-
!!
|
|
309
|
-
|
|
317
|
+
!!n.participationCount && /* @__PURE__ */ o(
|
|
318
|
+
V,
|
|
310
319
|
{
|
|
311
|
-
startDecorator: /* @__PURE__ */ o(
|
|
320
|
+
startDecorator: /* @__PURE__ */ o(Ut, { size: 16, color: r.onImage.text }),
|
|
312
321
|
sx: {
|
|
313
322
|
fontSize: "0.875em",
|
|
314
323
|
fontFamily: r.fonts.secondary,
|
|
315
324
|
color: r.onImage.text
|
|
316
325
|
},
|
|
317
|
-
children:
|
|
326
|
+
children: n.participationCount
|
|
318
327
|
}
|
|
319
328
|
)
|
|
320
329
|
]
|
|
321
330
|
}
|
|
322
331
|
),
|
|
323
332
|
/* @__PURE__ */ o(
|
|
324
|
-
|
|
333
|
+
V,
|
|
325
334
|
{
|
|
326
335
|
sx: {
|
|
327
336
|
fontSize: "1.5em",
|
|
@@ -335,12 +344,12 @@ const et = (n) => {
|
|
|
335
344
|
unicodeBidi: "plaintext",
|
|
336
345
|
flex: 1
|
|
337
346
|
},
|
|
338
|
-
children:
|
|
347
|
+
children: n.title
|
|
339
348
|
}
|
|
340
349
|
)
|
|
341
350
|
] }),
|
|
342
351
|
y && !c && /* @__PURE__ */ P(
|
|
343
|
-
|
|
352
|
+
g,
|
|
344
353
|
{
|
|
345
354
|
sx: {
|
|
346
355
|
display: "flex",
|
|
@@ -352,7 +361,7 @@ const et = (n) => {
|
|
|
352
361
|
},
|
|
353
362
|
children: [
|
|
354
363
|
/* @__PURE__ */ o(
|
|
355
|
-
|
|
364
|
+
V,
|
|
356
365
|
{
|
|
357
366
|
sx: {
|
|
358
367
|
fontSize: "0.7em",
|
|
@@ -365,7 +374,7 @@ const et = (n) => {
|
|
|
365
374
|
}
|
|
366
375
|
),
|
|
367
376
|
/* @__PURE__ */ o(
|
|
368
|
-
|
|
377
|
+
g,
|
|
369
378
|
{
|
|
370
379
|
sx: {
|
|
371
380
|
"& img": {
|
|
@@ -384,7 +393,7 @@ const et = (n) => {
|
|
|
384
393
|
}
|
|
385
394
|
),
|
|
386
395
|
y && c && /* @__PURE__ */ P(
|
|
387
|
-
|
|
396
|
+
g,
|
|
388
397
|
{
|
|
389
398
|
sx: {
|
|
390
399
|
display: "flex",
|
|
@@ -398,7 +407,7 @@ const et = (n) => {
|
|
|
398
407
|
},
|
|
399
408
|
children: [
|
|
400
409
|
/* @__PURE__ */ o(
|
|
401
|
-
|
|
410
|
+
V,
|
|
402
411
|
{
|
|
403
412
|
sx: {
|
|
404
413
|
fontSize: "0.7em",
|
|
@@ -409,7 +418,7 @@ const et = (n) => {
|
|
|
409
418
|
}
|
|
410
419
|
),
|
|
411
420
|
/* @__PURE__ */ o(
|
|
412
|
-
|
|
421
|
+
g,
|
|
413
422
|
{
|
|
414
423
|
sx: {
|
|
415
424
|
height: "24px",
|
|
@@ -428,11 +437,11 @@ const et = (n) => {
|
|
|
428
437
|
]
|
|
429
438
|
}
|
|
430
439
|
);
|
|
431
|
-
},
|
|
432
|
-
() => import("./chunks/index-
|
|
433
|
-
), Zt =
|
|
434
|
-
item:
|
|
435
|
-
open:
|
|
440
|
+
}, Nt = B(() => import("./chunks/index-C0ilols1.js")), Bt = B(
|
|
441
|
+
() => import("./chunks/index-DZN-AITW.js")
|
|
442
|
+
), Zt = B(() => import("./chunks/index-BENM3N_w.js")), Vt = B(() => import("./chunks/index-DKwvdw9t.js")), Dt = B(() => import("./chunks/index-BXYTsvIX.js")), Wt = B(() => import("./chunks/index-D7VhczXH.js")), jt = ({
|
|
443
|
+
item: e,
|
|
444
|
+
open: n,
|
|
436
445
|
onClose: t,
|
|
437
446
|
listProps: p
|
|
438
447
|
}) => {
|
|
@@ -441,22 +450,22 @@ const et = (n) => {
|
|
|
441
450
|
language: y,
|
|
442
451
|
themeOptions: s,
|
|
443
452
|
userIsLoggedIn: U,
|
|
444
|
-
signInCTA:
|
|
445
|
-
additionalCTA:
|
|
446
|
-
shareCTA:
|
|
447
|
-
rulesDisplay:
|
|
453
|
+
signInCTA: A,
|
|
454
|
+
additionalCTA: Z,
|
|
455
|
+
shareCTA: O,
|
|
456
|
+
rulesDisplay: H,
|
|
448
457
|
leads: R,
|
|
449
458
|
consents: E,
|
|
450
459
|
chanceGameVariant: Q,
|
|
451
460
|
showAnswerExplanations: w,
|
|
452
461
|
hideCorrectOption: _,
|
|
453
|
-
aggregateTranslatedVotes:
|
|
462
|
+
aggregateTranslatedVotes: k,
|
|
454
463
|
optionsLayout: I,
|
|
455
|
-
imagePosition:
|
|
464
|
+
imagePosition: M,
|
|
456
465
|
defaultImagePlaceholderUrl: S,
|
|
457
|
-
disableCache:
|
|
466
|
+
disableCache: T,
|
|
458
467
|
matchQuiz: d,
|
|
459
|
-
eventGame:
|
|
468
|
+
eventGame: f,
|
|
460
469
|
callbacks: i
|
|
461
470
|
} = p, F = {
|
|
462
471
|
sdk: c,
|
|
@@ -465,23 +474,23 @@ const et = (n) => {
|
|
|
465
474
|
leads: R,
|
|
466
475
|
consents: E,
|
|
467
476
|
userIsLoggedIn: U,
|
|
468
|
-
signInCTA:
|
|
469
|
-
additionalCTA:
|
|
470
|
-
rulesDisplay:
|
|
477
|
+
signInCTA: A,
|
|
478
|
+
additionalCTA: Z,
|
|
479
|
+
rulesDisplay: H,
|
|
471
480
|
defaultImagePlaceholderUrl: S,
|
|
472
|
-
disableCache:
|
|
473
|
-
template:
|
|
474
|
-
imagePosition:
|
|
475
|
-
},
|
|
476
|
-
if (!
|
|
477
|
-
switch (
|
|
481
|
+
disableCache: T,
|
|
482
|
+
template: ht.STANDARD,
|
|
483
|
+
imagePosition: M
|
|
484
|
+
}, b = { ...F, chanceGameVariant: Q }, x = () => {
|
|
485
|
+
if (!e) return null;
|
|
486
|
+
switch (e.entityType) {
|
|
478
487
|
case "CLASSIC_QUIZ":
|
|
479
488
|
return /* @__PURE__ */ o(
|
|
480
|
-
|
|
489
|
+
Nt,
|
|
481
490
|
{
|
|
482
|
-
...
|
|
483
|
-
entityId:
|
|
484
|
-
shareCTA:
|
|
491
|
+
...b,
|
|
492
|
+
entityId: e.entityId,
|
|
493
|
+
shareCTA: O,
|
|
485
494
|
showAnswerExplanations: w,
|
|
486
495
|
hideCorrectOption: _,
|
|
487
496
|
optionsLayout: I,
|
|
@@ -493,10 +502,10 @@ const et = (n) => {
|
|
|
493
502
|
);
|
|
494
503
|
case "PERSONALITY_QUIZ":
|
|
495
504
|
return /* @__PURE__ */ o(
|
|
496
|
-
|
|
505
|
+
Bt,
|
|
497
506
|
{
|
|
498
|
-
...
|
|
499
|
-
entityId:
|
|
507
|
+
...b,
|
|
508
|
+
entityId: e.entityId,
|
|
500
509
|
showAnswerExplanations: w,
|
|
501
510
|
optionsLayout: I,
|
|
502
511
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
@@ -506,10 +515,10 @@ const et = (n) => {
|
|
|
506
515
|
return /* @__PURE__ */ o(
|
|
507
516
|
Zt,
|
|
508
517
|
{
|
|
509
|
-
...
|
|
510
|
-
entityId:
|
|
518
|
+
...b,
|
|
519
|
+
entityId: e.entityId,
|
|
511
520
|
optionsLayout: I,
|
|
512
|
-
aggregateTranslatedVotes:
|
|
521
|
+
aggregateTranslatedVotes: k,
|
|
513
522
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
514
523
|
}
|
|
515
524
|
);
|
|
@@ -518,7 +527,7 @@ const et = (n) => {
|
|
|
518
527
|
Vt,
|
|
519
528
|
{
|
|
520
529
|
...F,
|
|
521
|
-
entityId:
|
|
530
|
+
entityId: e.entityId,
|
|
522
531
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
523
532
|
}
|
|
524
533
|
);
|
|
@@ -526,8 +535,8 @@ const et = (n) => {
|
|
|
526
535
|
return /* @__PURE__ */ o(
|
|
527
536
|
Dt,
|
|
528
537
|
{
|
|
529
|
-
...
|
|
530
|
-
entityId:
|
|
538
|
+
...b,
|
|
539
|
+
entityId: e.entityId,
|
|
531
540
|
showPredictionDetails: (d == null ? void 0 : d.showPredictionDetails) ?? !0,
|
|
532
541
|
showCountdown: (d == null ? void 0 : d.showCountdown) ?? !0,
|
|
533
542
|
showTeamLabels: (d == null ? void 0 : d.showTeamLabels) ?? !0,
|
|
@@ -537,27 +546,27 @@ const et = (n) => {
|
|
|
537
546
|
);
|
|
538
547
|
case "CUSTOM_EVENT_GAME":
|
|
539
548
|
return /* @__PURE__ */ o(
|
|
540
|
-
|
|
549
|
+
Wt,
|
|
541
550
|
{
|
|
542
|
-
...
|
|
543
|
-
entityId:
|
|
551
|
+
...b,
|
|
552
|
+
entityId: e.entityId,
|
|
544
553
|
optionsLayout: I,
|
|
545
|
-
showPredictionDetails: (
|
|
546
|
-
showCountdown: (
|
|
547
|
-
showPoints: (
|
|
554
|
+
showPredictionDetails: (f == null ? void 0 : f.showPredictionDetails) ?? !0,
|
|
555
|
+
showCountdown: (f == null ? void 0 : f.showCountdown) ?? !0,
|
|
556
|
+
showPoints: (f == null ? void 0 : f.showPoints) ?? !0,
|
|
548
557
|
callbacks: { onFinish: i == null ? void 0 : i.onFinish }
|
|
549
558
|
}
|
|
550
559
|
);
|
|
551
560
|
default:
|
|
552
|
-
return /* @__PURE__ */ o(
|
|
553
|
-
|
|
561
|
+
return /* @__PURE__ */ o(g, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
|
|
562
|
+
V,
|
|
554
563
|
{
|
|
555
564
|
sx: {
|
|
556
565
|
fontSize: "1em",
|
|
557
566
|
fontFamily: a.fonts.secondary,
|
|
558
567
|
color: a.colors.text
|
|
559
568
|
},
|
|
560
|
-
children: l("list.unsupportedContentType", { type:
|
|
569
|
+
children: l("list.unsupportedContentType", { type: e.entityType })
|
|
561
570
|
}
|
|
562
571
|
) });
|
|
563
572
|
}
|
|
@@ -565,7 +574,7 @@ const et = (n) => {
|
|
|
565
574
|
return /* @__PURE__ */ o(
|
|
566
575
|
xt,
|
|
567
576
|
{
|
|
568
|
-
open:
|
|
577
|
+
open: n,
|
|
569
578
|
onClose: t,
|
|
570
579
|
container: r,
|
|
571
580
|
sx: { zIndex: 1300 },
|
|
@@ -595,28 +604,28 @@ const et = (n) => {
|
|
|
595
604
|
}
|
|
596
605
|
}
|
|
597
606
|
),
|
|
598
|
-
/* @__PURE__ */ o(
|
|
607
|
+
/* @__PURE__ */ o(g, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(St, { fallback: /* @__PURE__ */ o(tt, { my: 4 }), children: x() }) })
|
|
599
608
|
]
|
|
600
609
|
}
|
|
601
610
|
)
|
|
602
611
|
}
|
|
603
612
|
);
|
|
604
|
-
},
|
|
613
|
+
}, Yt = (e, n) => {
|
|
605
614
|
const t = [];
|
|
606
|
-
for (let p =
|
|
615
|
+
for (let p = e; p <= n; p += 1) t.push(p);
|
|
607
616
|
return t;
|
|
608
|
-
},
|
|
609
|
-
if (
|
|
610
|
-
const t = [1], p = Math.max(2,
|
|
611
|
-
return p > 2 && t.push("gap-start"), t.push(...
|
|
612
|
-
},
|
|
613
|
-
page:
|
|
614
|
-
count:
|
|
617
|
+
}, Gt = (e, n) => {
|
|
618
|
+
if (n <= 0) return [];
|
|
619
|
+
const t = [1], p = Math.max(2, e - 1), l = Math.min(n - 1, e + 1);
|
|
620
|
+
return p > 2 && t.push("gap-start"), t.push(...Yt(p, l)), l < n - 1 && t.push("gap-end"), n > 1 && t.push(n), t;
|
|
621
|
+
}, Kt = ({
|
|
622
|
+
page: e,
|
|
623
|
+
count: n,
|
|
615
624
|
disabled: t = !1,
|
|
616
625
|
onChange: p
|
|
617
626
|
}) => {
|
|
618
627
|
const l = Y(), a = (c) => {
|
|
619
|
-
c >= 1 && c <=
|
|
628
|
+
c >= 1 && c <= n && c !== e && p(c);
|
|
620
629
|
}, r = {
|
|
621
630
|
minWidth: "2em",
|
|
622
631
|
minHeight: "2em",
|
|
@@ -626,7 +635,7 @@ const et = (n) => {
|
|
|
626
635
|
color: l.colors.text
|
|
627
636
|
};
|
|
628
637
|
return /* @__PURE__ */ P(
|
|
629
|
-
|
|
638
|
+
g,
|
|
630
639
|
{
|
|
631
640
|
sx: {
|
|
632
641
|
display: "flex",
|
|
@@ -641,10 +650,10 @@ const et = (n) => {
|
|
|
641
650
|
{
|
|
642
651
|
variant: "plain",
|
|
643
652
|
color: "neutral",
|
|
644
|
-
disabled: t ||
|
|
653
|
+
disabled: t || e === 1,
|
|
645
654
|
onClick: () => a(1),
|
|
646
655
|
sx: r,
|
|
647
|
-
children: /* @__PURE__ */ o(
|
|
656
|
+
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Tt, { size: 18 }) })
|
|
648
657
|
}
|
|
649
658
|
),
|
|
650
659
|
/* @__PURE__ */ o(
|
|
@@ -652,16 +661,16 @@ const et = (n) => {
|
|
|
652
661
|
{
|
|
653
662
|
variant: "plain",
|
|
654
663
|
color: "neutral",
|
|
655
|
-
disabled: t ||
|
|
656
|
-
onClick: () => a(
|
|
664
|
+
disabled: t || e === 1,
|
|
665
|
+
onClick: () => a(e - 1),
|
|
657
666
|
sx: r,
|
|
658
|
-
children: /* @__PURE__ */ o(
|
|
667
|
+
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
|
|
659
668
|
}
|
|
660
669
|
),
|
|
661
|
-
|
|
670
|
+
Gt(e, n).map((c, y) => {
|
|
662
671
|
if (typeof c == "string")
|
|
663
672
|
return /* @__PURE__ */ o(
|
|
664
|
-
|
|
673
|
+
g,
|
|
665
674
|
{
|
|
666
675
|
sx: {
|
|
667
676
|
...r,
|
|
@@ -674,9 +683,9 @@ const et = (n) => {
|
|
|
674
683
|
},
|
|
675
684
|
`${c}-${y}`
|
|
676
685
|
);
|
|
677
|
-
const s = c ===
|
|
686
|
+
const s = c === e;
|
|
678
687
|
return /* @__PURE__ */ o(
|
|
679
|
-
|
|
688
|
+
et,
|
|
680
689
|
{
|
|
681
690
|
variant: "plain",
|
|
682
691
|
color: "neutral",
|
|
@@ -701,10 +710,10 @@ const et = (n) => {
|
|
|
701
710
|
{
|
|
702
711
|
variant: "plain",
|
|
703
712
|
color: "neutral",
|
|
704
|
-
disabled: t ||
|
|
705
|
-
onClick: () => a(
|
|
713
|
+
disabled: t || e === n,
|
|
714
|
+
onClick: () => a(e + 1),
|
|
706
715
|
sx: r,
|
|
707
|
-
children: /* @__PURE__ */ o(
|
|
716
|
+
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Et, { size: 18 }) })
|
|
708
717
|
}
|
|
709
718
|
),
|
|
710
719
|
/* @__PURE__ */ o(
|
|
@@ -712,64 +721,64 @@ const et = (n) => {
|
|
|
712
721
|
{
|
|
713
722
|
variant: "plain",
|
|
714
723
|
color: "neutral",
|
|
715
|
-
disabled: t ||
|
|
716
|
-
onClick: () => a(
|
|
724
|
+
disabled: t || e === n,
|
|
725
|
+
onClick: () => a(n),
|
|
717
726
|
sx: r,
|
|
718
|
-
children: /* @__PURE__ */ o(
|
|
727
|
+
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Mt, { size: 18 }) })
|
|
719
728
|
}
|
|
720
729
|
)
|
|
721
730
|
]
|
|
722
731
|
}
|
|
723
732
|
);
|
|
724
|
-
},
|
|
733
|
+
}, $t = {
|
|
725
734
|
CLASSIC_QUIZ: "list.types.classicQuiz",
|
|
726
735
|
PERSONALITY_QUIZ: "list.types.personalityQuiz",
|
|
727
736
|
EITHER_OR: "list.types.eitherOr",
|
|
728
737
|
POLL: "list.types.poll",
|
|
729
738
|
MATCH_QUIZ: "list.types.matchQuiz",
|
|
730
739
|
CUSTOM_EVENT_GAME: "list.types.eventGame"
|
|
731
|
-
},
|
|
740
|
+
}, qt = (e) => {
|
|
732
741
|
const {
|
|
733
|
-
entityId:
|
|
742
|
+
entityId: n,
|
|
734
743
|
sdk: t,
|
|
735
744
|
itemsCount: p = 10,
|
|
736
745
|
itemsPerRow: l = 2,
|
|
737
746
|
widgetMode: a = "load-more",
|
|
738
747
|
urls: r,
|
|
739
748
|
defaultImagePlaceholderUrl: c
|
|
740
|
-
} =
|
|
749
|
+
} = e, { t: y } = K(), s = Y(), U = J(), [A, Z] = z(null), [O, H] = z(!1), {
|
|
741
750
|
items: R,
|
|
742
751
|
loading: E,
|
|
743
752
|
error: Q,
|
|
744
753
|
hasMore: w,
|
|
745
754
|
loadMore: _,
|
|
746
|
-
page:
|
|
755
|
+
page: k,
|
|
747
756
|
pageCount: I,
|
|
748
|
-
goToPage:
|
|
749
|
-
} = zt(t,
|
|
750
|
-
const u =
|
|
757
|
+
goToPage: M
|
|
758
|
+
} = zt(t, n, p, a), S = Ot(r), T = a === "paged", d = (x) => {
|
|
759
|
+
const u = Qt(x, r);
|
|
751
760
|
if (u) {
|
|
752
761
|
window.location.href = u;
|
|
753
762
|
return;
|
|
754
763
|
}
|
|
755
|
-
S || (
|
|
756
|
-
},
|
|
757
|
-
return Q || !E && R.length === 0 && !i ? null : /* @__PURE__ */ P(
|
|
758
|
-
|
|
759
|
-
|
|
764
|
+
S || (Z(x), H(!0));
|
|
765
|
+
}, f = U ? 1 : Math.max(1, Math.floor(l)), i = T && I > 1, F = !T && w && !E, b = !(T && E);
|
|
766
|
+
return Q || !E && R.length === 0 && !i ? null : /* @__PURE__ */ P(g, { sx: { fontSize: "1em", fontFamily: s.fonts.secondary }, children: [
|
|
767
|
+
b && /* @__PURE__ */ o(
|
|
768
|
+
g,
|
|
760
769
|
{
|
|
761
770
|
sx: {
|
|
762
771
|
display: "grid",
|
|
763
|
-
gridTemplateColumns: `repeat(${
|
|
772
|
+
gridTemplateColumns: `repeat(${f}, minmax(0, 1fr))`,
|
|
764
773
|
gap: s.spacing.xs,
|
|
765
774
|
marginBottom: s.spacing.md
|
|
766
775
|
},
|
|
767
776
|
children: R.map((x) => {
|
|
768
|
-
const u =
|
|
777
|
+
const u = nt(x);
|
|
769
778
|
if (!u) return null;
|
|
770
|
-
const C =
|
|
779
|
+
const C = $t[x.entityType];
|
|
771
780
|
return /* @__PURE__ */ o(
|
|
772
|
-
|
|
781
|
+
Ht,
|
|
773
782
|
{
|
|
774
783
|
item: x,
|
|
775
784
|
entityData: u,
|
|
@@ -784,7 +793,7 @@ const et = (n) => {
|
|
|
784
793
|
),
|
|
785
794
|
E && /* @__PURE__ */ o(tt, { my: 4 }),
|
|
786
795
|
F && /* @__PURE__ */ o(
|
|
787
|
-
|
|
796
|
+
g,
|
|
788
797
|
{
|
|
789
798
|
sx: {
|
|
790
799
|
display: "flex",
|
|
@@ -792,7 +801,7 @@ const et = (n) => {
|
|
|
792
801
|
marginTop: s.spacing.md
|
|
793
802
|
},
|
|
794
803
|
children: /* @__PURE__ */ o(
|
|
795
|
-
|
|
804
|
+
et,
|
|
796
805
|
{
|
|
797
806
|
variant: "soft",
|
|
798
807
|
onClick: _,
|
|
@@ -824,26 +833,26 @@ const et = (n) => {
|
|
|
824
833
|
)
|
|
825
834
|
}
|
|
826
835
|
),
|
|
827
|
-
i && /* @__PURE__ */ o(
|
|
828
|
-
|
|
836
|
+
i && /* @__PURE__ */ o(g, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
|
|
837
|
+
Kt,
|
|
829
838
|
{
|
|
830
|
-
page:
|
|
839
|
+
page: k,
|
|
831
840
|
count: I,
|
|
832
841
|
disabled: E,
|
|
833
|
-
onChange:
|
|
842
|
+
onChange: M
|
|
834
843
|
}
|
|
835
844
|
) }),
|
|
836
845
|
/* @__PURE__ */ o(
|
|
837
|
-
|
|
846
|
+
jt,
|
|
838
847
|
{
|
|
839
|
-
item:
|
|
840
|
-
open:
|
|
841
|
-
onClose: () =>
|
|
842
|
-
listProps:
|
|
848
|
+
item: A,
|
|
849
|
+
open: O,
|
|
850
|
+
onClose: () => H(!1),
|
|
851
|
+
listProps: e
|
|
843
852
|
}
|
|
844
853
|
)
|
|
845
854
|
] });
|
|
846
|
-
},
|
|
855
|
+
}, Xt = (e) => /* @__PURE__ */ o(gt, { packageName: "list", ...e, children: /* @__PURE__ */ o(qt, { ...e }) }), ae = Lt(Xt);
|
|
847
856
|
export {
|
|
848
|
-
|
|
857
|
+
ae as List
|
|
849
858
|
};
|