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/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 gt, Spinner as tt, DirectionalIcon as k, Portal as ht } from "fansunited-frontend-core";
3
- import { Card as mt, CardCover as q, CardContent as ft, Box as h, Chip as yt, Typography as D, Modal as xt, ModalDialog as Ct, ModalClose as It, IconButton as W, Button as nt } from "@mui/joy";
4
- import { useState as A, useRef as z, useCallback as j, useEffect as wt, lazy as Z, Suspense as St } from "react";
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 { U as Tt } from "./chunks/users-wbJRbqW8.js";
7
- import { C as bt, a as Pt } from "./chunks/chevrons-right-CXSpQt9w.js";
8
- import { C as Et } from "./chunks/chevron-left-CxfCSZcr.js";
9
- import { C as Lt } from "./chunks/chevron-right-BEQMacFn.js";
10
- import { w as Mt } from "./chunks/withVersionStamp-BkiEu_79.js";
11
- const et = (n) => {
12
- const e = n.entityModel;
13
- if (!e) return null;
14
- switch (n.entityType) {
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 = e;
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 = e;
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 = e;
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 = e;
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 = e;
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 = e;
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
- }, Ut = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Rt = (n) => {
86
+ }, Rt = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), _t = (e) => {
78
87
  var t;
79
- const e = (t = et(n)) == null ? void 0 : t.status;
80
- return !!(e && Ut.has(e));
81
- }, _t = 50, Ft = 3, zt = (n, e, t, p) => {
82
- const l = p === "paged", a = p === "limited", [r, c] = A([]), [y, s] = A(!1), [U, O] = A(!1), [V, v] = A(!l), [B, R] = A(1), [E, Q] = A(1), w = z([]), _ = z([]), N = z(/* @__PURE__ */ new Set()), I = z(1), L = z(!1), S = z(!1), b = z(null), d = z(0), m = it(), i = j(
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 H;
85
- const f = await n.lists.getListContent(
86
- e,
93
+ var N;
94
+ const m = await e.lists.getListContent(
95
+ n,
87
96
  { limit: C, page: u },
88
- m
89
- ), g = (H = f.meta) == null ? void 0 : H.pagination, M = f.data ?? [];
97
+ f
98
+ ), h = (N = m.meta) == null ? void 0 : N.pagination, L = m.data ?? [];
90
99
  return {
91
- valid: M.filter(Rt),
92
- rawCount: M.length,
93
- pageCount: (g == null ? void 0 : g.numberOfPages) ?? 1
100
+ valid: L.filter(_t),
101
+ rawCount: L.length,
102
+ pageCount: (h == null ? void 0 : h.numberOfPages) ?? 1
94
103
  };
95
104
  },
96
- [n, e, m]
105
+ [e, n, f]
97
106
  ), F = j(async () => {
98
- if (S.current || !n || !e) return;
99
- const u = d.current, C = () => u !== d.current, f = a ? t - _.current.length : t;
100
- if (f <= 0) {
101
- v(!1);
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 < f && !L.current) {
113
+ if (w.current.length < m && !M.current) {
105
114
  S.current = !0, s(!0);
106
115
  try {
107
- let M = 0;
108
- for (; w.current.length < f && !L.current && M < Ft; ) {
116
+ let L = 0;
117
+ for (; w.current.length < m && !M.current && L < vt; ) {
109
118
  const {
110
- valid: H,
119
+ valid: N,
111
120
  rawCount: ot,
112
121
  pageCount: rt
113
- } = await i(I.current, _t);
122
+ } = await i(I.current, Ft);
114
123
  if (C()) return;
115
- M += 1;
116
- const $ = H.filter(
117
- (G) => !N.current.has(G.entityId)
124
+ L += 1;
125
+ const $ = N.filter(
126
+ (G) => !k.current.has(G.entityId)
118
127
  );
119
- $.forEach((G) => N.current.add(G.entityId)), w.current.push(...$), (ot === 0 || I.current >= rt) && (L.current = !0), I.current += 1;
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 (M) {
130
+ } catch (L) {
122
131
  if (C()) return;
123
- console.warn("Error fetching list content:", M), O(!0);
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 g = [..._.current, ...w.current.splice(0, f)];
131
- _.current = g, c(g), v(
132
- !a && (w.current.length > 0 || !L.current)
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, e, n]), T = j(
143
+ }, [i, a, t, n, e]), b = j(
135
144
  (u, C) => {
136
- const f = Math.max(1, Math.ceil(u.length / t)), g = Math.min(Math.max(C, 1), f);
137
- c(u.slice((g - 1) * t, g * t)), Q(f), R(g);
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 (b.current) {
144
- T(b.current, u);
152
+ if (T.current) {
153
+ b(T.current, u);
145
154
  return;
146
155
  }
147
- if (S.current || !n || !e) return;
148
- const C = d.current, f = () => 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: g,
153
- rawCount: M,
154
- pageCount: H
161
+ valid: h,
162
+ rawCount: L,
163
+ pageCount: N
155
164
  } = await i(u, t);
156
- if (f()) return;
157
- if (M > t) {
158
- b.current = g, T(g, u);
165
+ if (m()) return;
166
+ if (L > t) {
167
+ T.current = h, b(h, u);
159
168
  return;
160
169
  }
161
- c(g), Q(H), R(u);
162
- } catch (g) {
163
- if (f()) return;
164
- console.warn("Error fetching list content:", g), O(!0);
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
- f() || (S.current = !1, s(!1));
175
+ m() || (S.current = !1, s(!1));
167
176
  }
168
177
  },
169
- [i, t, e, n, T]
178
+ [i, t, n, e, b]
170
179
  );
171
180
  return wt(() => {
172
- d.current += 1, S.current = !1, w.current = [], _.current = [], N.current = /* @__PURE__ */ new Set(), I.current = 1, L.current = !1, b.current = null, c([]), O(!1), v(!l), R(1), Q(1), l ? x(1) : F();
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: V,
186
+ hasMore: Z,
178
187
  loadMore: F,
179
- page: B,
188
+ page: H,
180
189
  pageCount: E,
181
190
  goToPage: x
182
191
  };
183
192
  }, Y = () => {
184
- const n = st(), e = at(), t = ct(), p = lt();
193
+ const e = st(), n = at(), t = ct(), p = lt();
185
194
  return {
186
- fonts: e,
195
+ fonts: n,
187
196
  spacing: p,
188
197
  radius: t,
189
198
  colors: {
190
- surface: n.surface,
191
- text: n.textPrimary,
192
- primary: n.palette.primary.plainColor,
193
- onPrimary: n.palette.primary.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 = (n, e) => {
208
- switch (n) {
216
+ }, X = "{CONTENT_ID}", At = (e, n) => {
217
+ switch (e) {
209
218
  case "CLASSIC_QUIZ":
210
- return e == null ? void 0 : e.classicQuizUrl;
219
+ return n == null ? void 0 : n.classicQuizUrl;
211
220
  case "PERSONALITY_QUIZ":
212
- return e == null ? void 0 : e.personalityQuizUrl;
221
+ return n == null ? void 0 : n.personalityQuizUrl;
213
222
  case "EITHER_OR":
214
- return e == null ? void 0 : e.eitherOrUrl;
223
+ return n == null ? void 0 : n.eitherOrUrl;
215
224
  case "POLL":
216
- return e == null ? void 0 : e.pollUrl;
225
+ return n == null ? void 0 : n.pollUrl;
217
226
  case "MATCH_QUIZ":
218
- return e == null ? void 0 : e.matchQuizUrl;
227
+ return n == null ? void 0 : n.matchQuizUrl;
219
228
  case "CUSTOM_EVENT_GAME":
220
- return e == null ? void 0 : e.eventGameUrl;
229
+ return n == null ? void 0 : n.eventGameUrl;
221
230
  default:
222
231
  return;
223
232
  }
224
- }, Ot = (n) => !!(n != null && n.classicQuizUrl || n != null && n.personalityQuizUrl || n != null && n.eitherOrUrl || n != null && n.pollUrl || n != null && n.matchQuizUrl || n != null && n.eventGameUrl), vt = (n, e) => {
225
- const t = At(n.entityType, e);
226
- return t ? t.includes(X) ? t.replace(X, n.entityId) : t : null;
227
- }, Qt = (n, e) => {
228
- const t = n == null ? void 0 : n.images;
229
- return t ? e ? t.mobileLogo || t.mainLogo || null : t.mainLogo || t.mobileLogo || null : null;
230
- }, Nt = ({
231
- item: n,
232
- entityData: e,
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 = Qt(e.branding, c);
247
+ const { t: a } = K(), r = Y(), c = J(), y = kt(n.branding, c);
239
248
  return /* @__PURE__ */ P(
240
- mt,
249
+ ft,
241
250
  {
242
- onClick: () => l(n),
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 = e.images) == null ? void 0 : s.cover) || ((U = e.images) == null ? void 0 : U.main) || p || dt,
266
- alt: e.title,
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(ft, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
281
+ /* @__PURE__ */ P(mt, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
273
282
  /* @__PURE__ */ P(
274
- h,
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(h, { children: [
292
+ /* @__PURE__ */ P(g, { children: [
284
293
  /* @__PURE__ */ P(
285
- h,
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
- !!e.participationCount && /* @__PURE__ */ o(
309
- D,
317
+ !!n.participationCount && /* @__PURE__ */ o(
318
+ V,
310
319
  {
311
- startDecorator: /* @__PURE__ */ o(Tt, { size: 16, color: r.onImage.text }),
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: e.participationCount
326
+ children: n.participationCount
318
327
  }
319
328
  )
320
329
  ]
321
330
  }
322
331
  ),
323
332
  /* @__PURE__ */ o(
324
- D,
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: e.title
347
+ children: n.title
339
348
  }
340
349
  )
341
350
  ] }),
342
351
  y && !c && /* @__PURE__ */ P(
343
- h,
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
- D,
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
- h,
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
- h,
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
- D,
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
- h,
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
- }, Bt = Z(() => import("./chunks/index-BBQm_8LD.js")), Ht = Z(
432
- () => import("./chunks/index-DXKDJ1Vp.js")
433
- ), Zt = Z(() => import("./chunks/index-DjT5NrbA.js")), Vt = Z(() => import("./chunks/index-DvLRehH6.js")), Dt = Z(() => import("./chunks/index-BC_sWWgc.js")), kt = Z(() => import("./chunks/index-Aq5MbUB9.js")), Wt = ({
434
- item: n,
435
- open: e,
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: O,
445
- additionalCTA: V,
446
- shareCTA: v,
447
- rulesDisplay: B,
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: N,
462
+ aggregateTranslatedVotes: k,
454
463
  optionsLayout: I,
455
- imagePosition: L,
464
+ imagePosition: M,
456
465
  defaultImagePlaceholderUrl: S,
457
- disableCache: b,
466
+ disableCache: T,
458
467
  matchQuiz: d,
459
- eventGame: m,
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: O,
469
- additionalCTA: V,
470
- rulesDisplay: B,
477
+ signInCTA: A,
478
+ additionalCTA: Z,
479
+ rulesDisplay: H,
471
480
  defaultImagePlaceholderUrl: S,
472
- disableCache: b,
473
- template: gt.STANDARD,
474
- imagePosition: L
475
- }, T = { ...F, chanceGameVariant: Q }, x = () => {
476
- if (!n) return null;
477
- switch (n.entityType) {
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
- Bt,
489
+ Nt,
481
490
  {
482
- ...T,
483
- entityId: n.entityId,
484
- shareCTA: v,
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
- Ht,
505
+ Bt,
497
506
  {
498
- ...T,
499
- entityId: n.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
- ...T,
510
- entityId: n.entityId,
518
+ ...b,
519
+ entityId: e.entityId,
511
520
  optionsLayout: I,
512
- aggregateTranslatedVotes: N,
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: n.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
- ...T,
530
- entityId: n.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
- kt,
549
+ Wt,
541
550
  {
542
- ...T,
543
- entityId: n.entityId,
551
+ ...b,
552
+ entityId: e.entityId,
544
553
  optionsLayout: I,
545
- showPredictionDetails: (m == null ? void 0 : m.showPredictionDetails) ?? !0,
546
- showCountdown: (m == null ? void 0 : m.showCountdown) ?? !0,
547
- showPoints: (m == null ? void 0 : m.showPoints) ?? !0,
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(h, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
553
- D,
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: n.entityType })
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: e,
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(h, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(St, { fallback: /* @__PURE__ */ o(tt, { my: 4 }), children: x() }) })
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
- }, jt = (n, e) => {
613
+ }, Yt = (e, n) => {
605
614
  const t = [];
606
- for (let p = n; p <= e; p += 1) t.push(p);
615
+ for (let p = e; p <= n; p += 1) t.push(p);
607
616
  return t;
608
- }, Yt = (n, e) => {
609
- if (e <= 0) return [];
610
- const t = [1], p = Math.max(2, n - 1), l = Math.min(e - 1, n + 1);
611
- return p > 2 && t.push("gap-start"), t.push(...jt(p, l)), l < e - 1 && t.push("gap-end"), e > 1 && t.push(e), t;
612
- }, Gt = ({
613
- page: n,
614
- count: e,
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 <= e && c !== n && p(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
- h,
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 || n === 1,
653
+ disabled: t || e === 1,
645
654
  onClick: () => a(1),
646
655
  sx: r,
647
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(bt, { size: 18 }) })
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 || n === 1,
656
- onClick: () => a(n - 1),
664
+ disabled: t || e === 1,
665
+ onClick: () => a(e - 1),
657
666
  sx: r,
658
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Et, { size: 18 }) })
667
+ children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
659
668
  }
660
669
  ),
661
- Yt(n, e).map((c, y) => {
670
+ Gt(e, n).map((c, y) => {
662
671
  if (typeof c == "string")
663
672
  return /* @__PURE__ */ o(
664
- h,
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 === n;
686
+ const s = c === e;
678
687
  return /* @__PURE__ */ o(
679
- nt,
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 || n === e,
705
- onClick: () => a(n + 1),
713
+ disabled: t || e === n,
714
+ onClick: () => a(e + 1),
706
715
  sx: r,
707
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Lt, { size: 18 }) })
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 || n === e,
716
- onClick: () => a(e),
724
+ disabled: t || e === n,
725
+ onClick: () => a(n),
717
726
  sx: r,
718
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
727
+ children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Mt, { size: 18 }) })
719
728
  }
720
729
  )
721
730
  ]
722
731
  }
723
732
  );
724
- }, Kt = {
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
- }, $t = (n) => {
740
+ }, qt = (e) => {
732
741
  const {
733
- entityId: e,
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
- } = n, { t: y } = K(), s = Y(), U = J(), [O, V] = A(null), [v, B] = A(!1), {
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: N,
755
+ page: k,
747
756
  pageCount: I,
748
- goToPage: L
749
- } = zt(t, e, p, a), S = Ot(r), b = a === "paged", d = (x) => {
750
- const u = vt(x, r);
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 || (V(x), B(!0));
756
- }, m = U ? 1 : Math.max(1, Math.floor(l)), i = b && I > 1, F = !b && w && !E, T = !(b && E);
757
- return Q || !E && R.length === 0 && !i ? null : /* @__PURE__ */ P(h, { sx: { fontSize: "1em", fontFamily: s.fonts.secondary }, children: [
758
- T && /* @__PURE__ */ o(
759
- h,
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(${m}, minmax(0, 1fr))`,
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 = et(x);
777
+ const u = nt(x);
769
778
  if (!u) return null;
770
- const C = Kt[x.entityType];
779
+ const C = $t[x.entityType];
771
780
  return /* @__PURE__ */ o(
772
- Nt,
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
- h,
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
- nt,
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(h, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
828
- Gt,
836
+ i && /* @__PURE__ */ o(g, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
837
+ Kt,
829
838
  {
830
- page: N,
839
+ page: k,
831
840
  count: I,
832
841
  disabled: E,
833
- onChange: L
842
+ onChange: M
834
843
  }
835
844
  ) }),
836
845
  /* @__PURE__ */ o(
837
- Wt,
846
+ jt,
838
847
  {
839
- item: O,
840
- open: v,
841
- onClose: () => B(!1),
842
- listProps: n
848
+ item: A,
849
+ open: O,
850
+ onClose: () => H(!1),
851
+ listProps: e
843
852
  }
844
853
  )
845
854
  ] });
846
- }, qt = (n) => /* @__PURE__ */ o(ht, { packageName: "list", ...n, children: /* @__PURE__ */ o($t, { ...n }) }), ln = Mt(qt);
855
+ }, Xt = (e) => /* @__PURE__ */ o(gt, { packageName: "list", ...e, children: /* @__PURE__ */ o(qt, { ...e }) }), ae = Lt(Xt);
847
856
  export {
848
- ln as List
857
+ ae as List
849
858
  };