fansunited-frontend-components 0.0.95 → 0.0.96

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 (104) hide show
  1. package/Betslip.d.ts +1 -2
  2. package/Betslip.d.ts.map +1 -1
  3. package/Betslip.js +4 -3
  4. package/ChanceGame.js +165 -163
  5. package/ChanceGameComponent.d.ts +1 -1
  6. package/ChanceGameComponent.d.ts.map +1 -1
  7. package/ClassicQuizPlay.d.ts +1 -1
  8. package/ClassicQuizPlay.d.ts.map +1 -1
  9. package/ClassicQuizPlay.js +4 -3
  10. package/CollectLead.d.ts +1 -1
  11. package/CollectLead.d.ts.map +1 -1
  12. package/CollectLead.js +37 -36
  13. package/CompetitionStatistics.d.ts +1 -2
  14. package/CompetitionStatistics.d.ts.map +1 -1
  15. package/CompetitionStatistics.js +458 -451
  16. package/CompetitorCard.d.ts +1 -2
  17. package/CompetitorCard.d.ts.map +1 -1
  18. package/CompetitorCard.js +1235 -1226
  19. package/Discussion.d.ts +1 -1
  20. package/Discussion.d.ts.map +1 -1
  21. package/Discussion.js +4 -3
  22. package/EitherOrPlay.d.ts +1 -1
  23. package/EitherOrPlay.d.ts.map +1 -1
  24. package/EitherOrPlay.js +4 -3
  25. package/EventCard.d.ts +1 -2
  26. package/EventCard.d.ts.map +1 -1
  27. package/EventCard.js +1249 -1244
  28. package/EventGamePlay.d.ts +1 -1
  29. package/EventGamePlay.d.ts.map +1 -1
  30. package/EventGamePlay.js +4 -3
  31. package/Leaderboard.d.ts +1 -1
  32. package/Leaderboard.d.ts.map +1 -1
  33. package/Leaderboard.js +482 -449
  34. package/List.d.ts +1 -2
  35. package/List.d.ts.map +1 -1
  36. package/List.js +258 -254
  37. package/MatchQuizPlay.d.ts +1 -1
  38. package/MatchQuizPlay.d.ts.map +1 -1
  39. package/MatchQuizPlay.js +4 -3
  40. package/Odds.d.ts +1 -2
  41. package/Odds.d.ts.map +1 -1
  42. package/Odds.js +35 -34
  43. package/PersonalityQuizPlay.d.ts +1 -1
  44. package/PersonalityQuizPlay.d.ts.map +1 -1
  45. package/PersonalityQuizPlay.js +4 -3
  46. package/PickThePair.js +102 -100
  47. package/PickThePairComponent.d.ts +1 -1
  48. package/PickThePairComponent.d.ts.map +1 -1
  49. package/PlayerOfTheMatch.d.ts +1 -2
  50. package/PlayerOfTheMatch.d.ts.map +1 -1
  51. package/PlayerOfTheMatch.js +1096 -1085
  52. package/PollVote.d.ts +1 -1
  53. package/PollVote.d.ts.map +1 -1
  54. package/PollVote.js +4 -3
  55. package/Predictor.d.ts +1 -2
  56. package/Predictor.d.ts.map +1 -1
  57. package/Predictor.js +4553 -4525
  58. package/README.md +1 -1
  59. package/Standings.d.ts +1 -2
  60. package/Standings.d.ts.map +1 -1
  61. package/Standings.js +404 -394
  62. package/TopX.d.ts +1 -2
  63. package/TopX.d.ts.map +1 -1
  64. package/TopX.js +5296 -5286
  65. package/chunks/{ChanceGameEmbedVariant-C3NGwvTF.js → ChanceGameEmbedVariant-CVys-3Zh.js} +1 -1
  66. package/chunks/{OddsSkeleton-Bav8FHHN.js → OddsSkeleton-ClJE2xhR.js} +5 -5
  67. package/chunks/{OddsStrip-CviVfQI4.js → OddsStrip-BnSp5TXa.js} +3 -3
  68. package/chunks/{PickOneOfX-a6Dv0-rR.js → PickOneOfX-DaJtkbCw.js} +6 -6
  69. package/chunks/index-Aq5MbUB9.js +4 -0
  70. package/chunks/index-BBQm_8LD.js +4 -0
  71. package/chunks/index-BC_sWWgc.js +4 -0
  72. package/chunks/index-DXKDJ1Vp.js +4 -0
  73. package/chunks/index-DjT5NrbA.js +4 -0
  74. package/chunks/index-DvLRehH6.js +4 -0
  75. package/chunks/index-aIMaxR-p.js +4 -0
  76. package/chunks/{main-Dj4Manb5.js → main-52Wff7qC.js} +1763 -1757
  77. package/chunks/{main-dwV_55lz.js → main-65WcUqAl.js} +615 -615
  78. package/chunks/{main-gexg6lc-.js → main-B58mi9jx.js} +349 -334
  79. package/chunks/{main-Dys2_Jt2.js → main-BIdXUTZS.js} +842 -827
  80. package/chunks/{main-CFwRpvUi.js → main-DD-NEzC7.js} +818 -817
  81. package/chunks/{main-DjiQz1dv.js → main-DUnfJPzY.js} +311 -311
  82. package/chunks/{main-eAQMCxQ7.js → main-DpCBqqg_.js} +322 -321
  83. package/chunks/{main-D9tFZv2q.js → main-Drznt1ak.js} +283 -282
  84. package/chunks/withVersionStamp-B6nArAj4.js +16 -0
  85. package/index.d.ts.map +1 -1
  86. package/index.js +45 -50
  87. package/package.json +57 -49
  88. package/withVersionStamp.d.ts +4 -0
  89. package/withVersionStamp.d.ts.map +1 -0
  90. package/chunks/3dicons-bookmark-fav-dynamic-color-BkMV51tL.js +0 -4
  91. package/chunks/3dicons-crow-dynamic-color-BnvCj9i8.js +0 -4
  92. package/chunks/3dicons-fire-dynamic-color-rNRL0kAe.js +0 -4
  93. package/chunks/3dicons-flag-dynamic-color-BscQxNXn.js +0 -4
  94. package/chunks/3dicons-medal-dynamic-color-CsR036OL.js +0 -4
  95. package/chunks/3dicons-rocket-dynamic-color-EiHCJ2rb.js +0 -4
  96. package/chunks/3dicons-target-dynamic-color-ChQzHpwv.js +0 -4
  97. package/chunks/3dicons-thumb-down-dynamic-color-NQLnsNFt.js +0 -4
  98. package/chunks/index-B1d9q8fX.js +0 -4
  99. package/chunks/index-BP0pvFJ4.js +0 -4
  100. package/chunks/index-CHZyL_g_.js +0 -4
  101. package/chunks/index-CeCUdRmF.js +0 -4
  102. package/chunks/index-Ckyyw-I8.js +0 -4
  103. package/chunks/index-DGvCP5G8.js +0 -4
  104. package/chunks/index-yjMVOgwO.js +0 -4
package/List.js CHANGED
@@ -1,13 +1,14 @@
1
- import { jsxs as T, jsx as o } from "react/jsx-runtime";
2
- import { useColors as rt, useFontFamily as it, useCornerRadius as st, useSpacingScale as at, isMobile as X, defaultBg as ct, useConstantContext as lt, ConstantsContext as dt, WidgetTemplate as pt, Spinner as J, DirectionalIcon as k, Portal as ut } from "fansunited-frontend-core";
3
- import { Card as gt, CardCover as $, CardContent as ht, Box as y, Chip as ft, Typography as V, Modal as mt, ModalDialog as yt, ModalClose as xt, IconButton as D, Button as tt } from "@mui/joy";
4
- import { useState as F, useRef as _, useCallback as W, useEffect as Ct, lazy as H, Suspense as It } from "react";
5
- import { useTranslation as G } from "react-i18next";
6
- import { U as St } from "./chunks/users-wbJRbqW8.js";
7
- import { C as wt, a as Tt } from "./chunks/chevrons-right-CXSpQt9w.js";
8
- import { C as Pt } from "./chunks/chevron-left-CxfCSZcr.js";
9
- import { C as bt } from "./chunks/chevron-right-BEQMacFn.js";
10
- const nt = (n) => {
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";
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-B6nArAj4.js";
11
+ const et = (n) => {
11
12
  const e = n.entityModel;
12
13
  if (!e) return null;
13
14
  switch (n.entityType) {
@@ -73,116 +74,117 @@ const nt = (n) => {
73
74
  default:
74
75
  return null;
75
76
  }
76
- }, Et = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Lt = (n) => {
77
+ }, Ut = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Rt = (n) => {
77
78
  var t;
78
- const e = (t = nt(n)) == null ? void 0 : t.status;
79
- return !!(e && Et.has(e));
80
- }, Mt = 50, Ut = 3, Rt = (n, e, t, u) => {
81
- const l = u === "paged", a = u === "limited", [r, c] = F([]), [x, s] = F(!1), [M, z] = F(!1), [Z, A] = F(!l), [N, U] = F(1), [P, O] = F(1), I = _([]), R = _([]), v = _(/* @__PURE__ */ new Set()), C = _(1), b = _(!1), S = _(!1), d = _(null), g = _(0), i = W(
82
- async (p, f) => {
83
- var B;
84
- const h = await n.lists.getListContent(e, {
85
- limit: f,
86
- page: p
87
- }), m = (B = h.meta) == null ? void 0 : B.pagination, L = h.data ?? [];
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(
83
+ async (u, C) => {
84
+ var H;
85
+ const f = await n.lists.getListContent(
86
+ e,
87
+ { limit: C, page: u },
88
+ m
89
+ ), g = (H = f.meta) == null ? void 0 : H.pagination, M = f.data ?? [];
88
90
  return {
89
- valid: L.filter(Lt),
90
- rawCount: L.length,
91
- pageCount: (m == null ? void 0 : m.numberOfPages) ?? 1
91
+ valid: M.filter(Rt),
92
+ rawCount: M.length,
93
+ pageCount: (g == null ? void 0 : g.numberOfPages) ?? 1
92
94
  };
93
95
  },
94
- [n, e]
95
- ), E = W(async () => {
96
+ [n, e, m]
97
+ ), F = j(async () => {
96
98
  if (S.current || !n || !e) return;
97
- const p = g.current, f = () => p !== g.current, h = a ? t - R.current.length : t;
98
- if (h <= 0) {
99
- A(!1);
99
+ const u = d.current, C = () => u !== d.current, f = a ? t - _.current.length : t;
100
+ if (f <= 0) {
101
+ v(!1);
100
102
  return;
101
103
  }
102
- if (I.current.length < h && !b.current) {
104
+ if (w.current.length < f && !L.current) {
103
105
  S.current = !0, s(!0);
104
106
  try {
105
- let L = 0;
106
- for (; I.current.length < h && !b.current && L < Ut; ) {
107
+ let M = 0;
108
+ for (; w.current.length < f && !L.current && M < Ft; ) {
107
109
  const {
108
- valid: B,
109
- rawCount: et,
110
- pageCount: ot
111
- } = await i(C.current, Mt);
112
- if (f()) return;
113
- L += 1;
114
- const K = B.filter(
115
- (Y) => !v.current.has(Y.entityId)
110
+ valid: H,
111
+ rawCount: ot,
112
+ pageCount: rt
113
+ } = await i(I.current, _t);
114
+ if (C()) return;
115
+ M += 1;
116
+ const $ = H.filter(
117
+ (G) => !N.current.has(G.entityId)
116
118
  );
117
- K.forEach((Y) => v.current.add(Y.entityId)), I.current.push(...K), (et === 0 || C.current >= ot) && (b.current = !0), C.current += 1;
119
+ $.forEach((G) => N.current.add(G.entityId)), w.current.push(...$), (ot === 0 || I.current >= rt) && (L.current = !0), I.current += 1;
118
120
  }
119
- } catch (L) {
120
- if (f()) return;
121
- console.warn("Error fetching list content:", L), z(!0);
121
+ } catch (M) {
122
+ if (C()) return;
123
+ console.warn("Error fetching list content:", M), O(!0);
122
124
  return;
123
125
  } finally {
124
- f() || (S.current = !1, s(!1));
126
+ C() || (S.current = !1, s(!1));
125
127
  }
126
128
  }
127
- if (f()) return;
128
- const m = [...R.current, ...I.current.splice(0, h)];
129
- R.current = m, c(m), A(
130
- !a && (I.current.length > 0 || !b.current)
129
+ 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)
131
133
  );
132
- }, [i, a, t, e, n]), w = W(
133
- (p, f) => {
134
- const h = Math.max(1, Math.ceil(p.length / t)), m = Math.min(Math.max(f, 1), h);
135
- c(p.slice((m - 1) * t, m * t)), O(h), U(m);
134
+ }, [i, a, t, e, n]), T = j(
135
+ (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);
136
138
  },
137
139
  [t]
138
- ), Q = W(
139
- async (p) => {
140
- if (p < 1) return;
141
- if (d.current) {
142
- w(d.current, p);
140
+ ), x = j(
141
+ async (u) => {
142
+ if (u < 1) return;
143
+ if (b.current) {
144
+ T(b.current, u);
143
145
  return;
144
146
  }
145
147
  if (S.current || !n || !e) return;
146
- const f = g.current, h = () => f !== g.current;
148
+ const C = d.current, f = () => C !== d.current;
147
149
  S.current = !0, s(!0);
148
150
  try {
149
151
  const {
150
- valid: m,
151
- rawCount: L,
152
- pageCount: B
153
- } = await i(p, t);
154
- if (h()) return;
155
- if (L > t) {
156
- d.current = m, w(m, p);
152
+ valid: g,
153
+ rawCount: M,
154
+ pageCount: H
155
+ } = await i(u, t);
156
+ if (f()) return;
157
+ if (M > t) {
158
+ b.current = g, T(g, u);
157
159
  return;
158
160
  }
159
- c(m), O(B), U(p);
160
- } catch (m) {
161
- if (h()) return;
162
- console.warn("Error fetching list content:", m), z(!0);
161
+ c(g), Q(H), R(u);
162
+ } catch (g) {
163
+ if (f()) return;
164
+ console.warn("Error fetching list content:", g), O(!0);
163
165
  } finally {
164
- h() || (S.current = !1, s(!1));
166
+ f() || (S.current = !1, s(!1));
165
167
  }
166
168
  },
167
- [i, t, e, n, w]
169
+ [i, t, e, n, T]
168
170
  );
169
- return Ct(() => {
170
- g.current += 1, S.current = !1, I.current = [], R.current = [], v.current = /* @__PURE__ */ new Set(), C.current = 1, b.current = !1, d.current = null, c([]), z(!1), A(!l), U(1), O(1), l ? Q(1) : E();
171
- }, [l, Q, E]), {
171
+ 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();
173
+ }, [l, x, F]), {
172
174
  items: r,
173
- loading: x,
174
- error: M,
175
- hasMore: Z,
176
- loadMore: E,
177
- page: N,
178
- pageCount: P,
179
- goToPage: Q
175
+ loading: y,
176
+ error: U,
177
+ hasMore: V,
178
+ loadMore: F,
179
+ page: B,
180
+ pageCount: E,
181
+ goToPage: x
180
182
  };
181
- }, j = () => {
182
- const n = rt(), e = it(), t = st(), u = at();
183
+ }, Y = () => {
184
+ const n = st(), e = at(), t = ct(), p = lt();
183
185
  return {
184
186
  fonts: e,
185
- spacing: u,
187
+ spacing: p,
186
188
  radius: t,
187
189
  colors: {
188
190
  surface: n.surface,
@@ -202,7 +204,7 @@ const nt = (n) => {
202
204
  labelShadow: "0 1px 2px rgba(0,0,0,0.4)"
203
205
  }
204
206
  };
205
- }, q = "{CONTENT_ID}", _t = (n, e) => {
207
+ }, X = "{CONTENT_ID}", At = (n, e) => {
206
208
  switch (n) {
207
209
  case "CLASSIC_QUIZ":
208
210
  return e == null ? void 0 : e.classicQuizUrl;
@@ -219,23 +221,23 @@ const nt = (n) => {
219
221
  default:
220
222
  return;
221
223
  }
222
- }, Ft = (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), zt = (n, e) => {
223
- const t = _t(n.entityType, e);
224
- return t ? t.includes(q) ? t.replace(q, n.entityId) : t : null;
225
- }, At = (n, e) => {
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) => {
226
228
  const t = n == null ? void 0 : n.images;
227
229
  return t ? e ? t.mobileLogo || t.mainLogo || null : t.mainLogo || t.mobileLogo || null : null;
228
- }, Ot = ({
230
+ }, Nt = ({
229
231
  item: n,
230
232
  entityData: e,
231
233
  typeLabel: t,
232
- imagePlaceholder: u,
234
+ imagePlaceholder: p,
233
235
  onClick: l
234
236
  }) => {
235
- var s, M;
236
- const { t: a } = G(), r = j(), c = X(), x = At(e.branding, c);
237
- return /* @__PURE__ */ T(
238
- gt,
237
+ var s, U;
238
+ const { t: a } = K(), r = Y(), c = J(), y = Qt(e.branding, c);
239
+ return /* @__PURE__ */ P(
240
+ mt,
239
241
  {
240
242
  onClick: () => l(n),
241
243
  sx: {
@@ -257,19 +259,19 @@ const nt = (n) => {
257
259
  }
258
260
  },
259
261
  children: [
260
- /* @__PURE__ */ o($, { children: /* @__PURE__ */ o(
262
+ /* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(
261
263
  "img",
262
264
  {
263
- src: ((s = e.images) == null ? void 0 : s.cover) || ((M = e.images) == null ? void 0 : M.main) || u || ct,
265
+ src: ((s = e.images) == null ? void 0 : s.cover) || ((U = e.images) == null ? void 0 : U.main) || p || dt,
264
266
  alt: e.title,
265
267
  loading: "lazy",
266
268
  style: { transition: "transform 0.4s ease-out" }
267
269
  }
268
270
  ) }),
269
- /* @__PURE__ */ o($, { sx: { background: r.onImage.scrim } }),
270
- /* @__PURE__ */ T(ht, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
271
- /* @__PURE__ */ T(
272
- y,
271
+ /* @__PURE__ */ o(q, { sx: { background: r.onImage.scrim } }),
272
+ /* @__PURE__ */ P(ft, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
273
+ /* @__PURE__ */ P(
274
+ h,
273
275
  {
274
276
  sx: {
275
277
  display: "flex",
@@ -278,9 +280,9 @@ const nt = (n) => {
278
280
  gap: r.spacing.md
279
281
  },
280
282
  children: [
281
- /* @__PURE__ */ T(y, { children: [
282
- /* @__PURE__ */ T(
283
- y,
283
+ /* @__PURE__ */ P(h, { children: [
284
+ /* @__PURE__ */ P(
285
+ h,
284
286
  {
285
287
  sx: {
286
288
  display: "flex",
@@ -290,7 +292,7 @@ const nt = (n) => {
290
292
  },
291
293
  children: [
292
294
  t && /* @__PURE__ */ o(
293
- ft,
295
+ yt,
294
296
  {
295
297
  size: "sm",
296
298
  color: "neutral",
@@ -304,9 +306,9 @@ const nt = (n) => {
304
306
  }
305
307
  ),
306
308
  !!e.participationCount && /* @__PURE__ */ o(
307
- V,
309
+ D,
308
310
  {
309
- startDecorator: /* @__PURE__ */ o(St, { size: 16, color: r.onImage.text }),
311
+ startDecorator: /* @__PURE__ */ o(Tt, { size: 16, color: r.onImage.text }),
310
312
  sx: {
311
313
  fontSize: "0.875em",
312
314
  fontFamily: r.fonts.secondary,
@@ -319,7 +321,7 @@ const nt = (n) => {
319
321
  }
320
322
  ),
321
323
  /* @__PURE__ */ o(
322
- V,
324
+ D,
323
325
  {
324
326
  sx: {
325
327
  fontSize: "1.5em",
@@ -337,8 +339,8 @@ const nt = (n) => {
337
339
  }
338
340
  )
339
341
  ] }),
340
- x && !c && /* @__PURE__ */ T(
341
- y,
342
+ y && !c && /* @__PURE__ */ P(
343
+ h,
342
344
  {
343
345
  sx: {
344
346
  display: "flex",
@@ -350,7 +352,7 @@ const nt = (n) => {
350
352
  },
351
353
  children: [
352
354
  /* @__PURE__ */ o(
353
- V,
355
+ D,
354
356
  {
355
357
  sx: {
356
358
  fontSize: "0.7em",
@@ -363,7 +365,7 @@ const nt = (n) => {
363
365
  }
364
366
  ),
365
367
  /* @__PURE__ */ o(
366
- y,
368
+ h,
367
369
  {
368
370
  sx: {
369
371
  "& img": {
@@ -372,7 +374,7 @@ const nt = (n) => {
372
374
  maxWidth: "100%"
373
375
  }
374
376
  },
375
- children: /* @__PURE__ */ o("img", { src: x, alt: a("list.sponsoredBy") })
377
+ children: /* @__PURE__ */ o("img", { src: y, alt: a("list.sponsoredBy") })
376
378
  }
377
379
  )
378
380
  ]
@@ -381,8 +383,8 @@ const nt = (n) => {
381
383
  ]
382
384
  }
383
385
  ),
384
- x && c && /* @__PURE__ */ T(
385
- y,
386
+ y && c && /* @__PURE__ */ P(
387
+ h,
386
388
  {
387
389
  sx: {
388
390
  display: "flex",
@@ -396,7 +398,7 @@ const nt = (n) => {
396
398
  },
397
399
  children: [
398
400
  /* @__PURE__ */ o(
399
- V,
401
+ D,
400
402
  {
401
403
  sx: {
402
404
  fontSize: "0.7em",
@@ -407,7 +409,7 @@ const nt = (n) => {
407
409
  }
408
410
  ),
409
411
  /* @__PURE__ */ o(
410
- y,
412
+ h,
411
413
  {
412
414
  sx: {
413
415
  height: "24px",
@@ -416,7 +418,7 @@ const nt = (n) => {
416
418
  objectFit: "contain"
417
419
  }
418
420
  },
419
- children: /* @__PURE__ */ o("img", { src: x, alt: a("list.sponsoredBy") })
421
+ children: /* @__PURE__ */ o("img", { src: y, alt: a("list.sponsoredBy") })
420
422
  }
421
423
  )
422
424
  ]
@@ -426,61 +428,63 @@ const nt = (n) => {
426
428
  ]
427
429
  }
428
430
  );
429
- }, vt = H(() => import("./chunks/index-CHZyL_g_.js")), Qt = H(
430
- () => import("./chunks/index-DGvCP5G8.js")
431
- ), Nt = H(() => import("./chunks/index-CeCUdRmF.js")), Bt = H(() => import("./chunks/index-BP0pvFJ4.js")), Ht = H(() => import("./chunks/index-B1d9q8fX.js")), Zt = H(() => import("./chunks/index-yjMVOgwO.js")), Vt = ({
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 = ({
432
434
  item: n,
433
435
  open: e,
434
436
  onClose: t,
435
- listProps: u
437
+ listProps: p
436
438
  }) => {
437
- const { t: l } = G(), a = j(), { shadowRootElement: r } = lt(dt), {
439
+ const { t: l } = K(), a = Y(), { shadowRootElement: r } = pt(ut), {
438
440
  sdk: c,
439
- language: x,
441
+ language: y,
440
442
  themeOptions: s,
441
- userIsLoggedIn: M,
442
- signInCTA: z,
443
- additionalCTA: Z,
444
- shareCTA: A,
445
- rulesDisplay: N,
446
- leads: U,
447
- consents: P,
448
- chanceGameVariant: O,
449
- showAnswerExplanations: I,
450
- hideCorrectOption: R,
451
- aggregateTranslatedVotes: v,
452
- optionsLayout: C,
453
- imagePosition: b,
443
+ userIsLoggedIn: U,
444
+ signInCTA: O,
445
+ additionalCTA: V,
446
+ shareCTA: v,
447
+ rulesDisplay: B,
448
+ leads: R,
449
+ consents: E,
450
+ chanceGameVariant: Q,
451
+ showAnswerExplanations: w,
452
+ hideCorrectOption: _,
453
+ aggregateTranslatedVotes: N,
454
+ optionsLayout: I,
455
+ imagePosition: L,
454
456
  defaultImagePlaceholderUrl: S,
457
+ disableCache: b,
455
458
  matchQuiz: d,
456
- eventGame: g,
459
+ eventGame: m,
457
460
  callbacks: i
458
- } = u, E = {
461
+ } = p, F = {
459
462
  sdk: c,
460
- language: x,
463
+ language: y,
461
464
  themeOptions: s,
462
- leads: U,
463
- consents: P,
464
- userIsLoggedIn: M,
465
- signInCTA: z,
466
- additionalCTA: Z,
467
- rulesDisplay: N,
465
+ leads: R,
466
+ consents: E,
467
+ userIsLoggedIn: U,
468
+ signInCTA: O,
469
+ additionalCTA: V,
470
+ rulesDisplay: B,
468
471
  defaultImagePlaceholderUrl: S,
469
- template: pt.STANDARD,
470
- imagePosition: b
471
- }, w = { ...E, chanceGameVariant: O }, Q = () => {
472
+ disableCache: b,
473
+ template: gt.STANDARD,
474
+ imagePosition: L
475
+ }, T = { ...F, chanceGameVariant: Q }, x = () => {
472
476
  if (!n) return null;
473
477
  switch (n.entityType) {
474
478
  case "CLASSIC_QUIZ":
475
479
  return /* @__PURE__ */ o(
476
- vt,
480
+ Bt,
477
481
  {
478
- ...w,
482
+ ...T,
479
483
  entityId: n.entityId,
480
- shareCTA: A,
481
- showAnswerExplanations: I,
482
- hideCorrectOption: R,
483
- optionsLayout: C,
484
+ shareCTA: v,
485
+ showAnswerExplanations: w,
486
+ hideCorrectOption: _,
487
+ optionsLayout: I,
484
488
  callbacks: {
485
489
  onFinish: i == null ? void 0 : i.onFinish,
486
490
  onShare: i == null ? void 0 : i.onShare
@@ -489,40 +493,40 @@ const nt = (n) => {
489
493
  );
490
494
  case "PERSONALITY_QUIZ":
491
495
  return /* @__PURE__ */ o(
492
- Qt,
496
+ Ht,
493
497
  {
494
- ...w,
498
+ ...T,
495
499
  entityId: n.entityId,
496
- showAnswerExplanations: I,
497
- optionsLayout: C,
500
+ showAnswerExplanations: w,
501
+ optionsLayout: I,
498
502
  callbacks: { onFinish: i == null ? void 0 : i.onFinish }
499
503
  }
500
504
  );
501
505
  case "POLL":
502
506
  return /* @__PURE__ */ o(
503
- Nt,
507
+ Zt,
504
508
  {
505
- ...w,
509
+ ...T,
506
510
  entityId: n.entityId,
507
- optionsLayout: C,
508
- aggregateTranslatedVotes: v,
511
+ optionsLayout: I,
512
+ aggregateTranslatedVotes: N,
509
513
  callbacks: { onFinish: i == null ? void 0 : i.onFinish }
510
514
  }
511
515
  );
512
516
  case "EITHER_OR":
513
517
  return /* @__PURE__ */ o(
514
- Bt,
518
+ Vt,
515
519
  {
516
- ...E,
520
+ ...F,
517
521
  entityId: n.entityId,
518
522
  callbacks: { onFinish: i == null ? void 0 : i.onFinish }
519
523
  }
520
524
  );
521
525
  case "MATCH_QUIZ":
522
526
  return /* @__PURE__ */ o(
523
- Ht,
527
+ Dt,
524
528
  {
525
- ...w,
529
+ ...T,
526
530
  entityId: n.entityId,
527
531
  showPredictionDetails: (d == null ? void 0 : d.showPredictionDetails) ?? !0,
528
532
  showCountdown: (d == null ? void 0 : d.showCountdown) ?? !0,
@@ -533,20 +537,20 @@ const nt = (n) => {
533
537
  );
534
538
  case "CUSTOM_EVENT_GAME":
535
539
  return /* @__PURE__ */ o(
536
- Zt,
540
+ kt,
537
541
  {
538
- ...w,
542
+ ...T,
539
543
  entityId: n.entityId,
540
- optionsLayout: C,
541
- showPredictionDetails: (g == null ? void 0 : g.showPredictionDetails) ?? !0,
542
- showCountdown: (g == null ? void 0 : g.showCountdown) ?? !0,
543
- showPoints: (g == null ? void 0 : g.showPoints) ?? !0,
544
+ 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,
544
548
  callbacks: { onFinish: i == null ? void 0 : i.onFinish }
545
549
  }
546
550
  );
547
551
  default:
548
- return /* @__PURE__ */ o(y, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
549
- V,
552
+ return /* @__PURE__ */ o(h, { sx: { padding: a.spacing.md, textAlign: "center" }, children: /* @__PURE__ */ o(
553
+ D,
550
554
  {
551
555
  sx: {
552
556
  fontSize: "1em",
@@ -559,14 +563,14 @@ const nt = (n) => {
559
563
  }
560
564
  };
561
565
  return /* @__PURE__ */ o(
562
- mt,
566
+ xt,
563
567
  {
564
568
  open: e,
565
569
  onClose: t,
566
570
  container: r,
567
571
  sx: { zIndex: 1300 },
568
- children: /* @__PURE__ */ T(
569
- yt,
572
+ children: /* @__PURE__ */ P(
573
+ Ct,
570
574
  {
571
575
  sx: {
572
576
  fontSize: "1em",
@@ -581,7 +585,7 @@ const nt = (n) => {
581
585
  },
582
586
  children: [
583
587
  /* @__PURE__ */ o(
584
- xt,
588
+ It,
585
589
  {
586
590
  sx: {
587
591
  zIndex: 1,
@@ -591,28 +595,28 @@ const nt = (n) => {
591
595
  }
592
596
  }
593
597
  ),
594
- /* @__PURE__ */ o(y, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(It, { fallback: /* @__PURE__ */ o(J, { my: 4 }), children: Q() }) })
598
+ /* @__PURE__ */ o(h, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(St, { fallback: /* @__PURE__ */ o(tt, { my: 4 }), children: x() }) })
595
599
  ]
596
600
  }
597
601
  )
598
602
  }
599
603
  );
600
- }, kt = (n, e) => {
604
+ }, jt = (n, e) => {
601
605
  const t = [];
602
- for (let u = n; u <= e; u += 1) t.push(u);
606
+ for (let p = n; p <= e; p += 1) t.push(p);
603
607
  return t;
604
- }, Dt = (n, e) => {
608
+ }, Yt = (n, e) => {
605
609
  if (e <= 0) return [];
606
- const t = [1], u = Math.max(2, n - 1), l = Math.min(e - 1, n + 1);
607
- return u > 2 && t.push("gap-start"), t.push(...kt(u, l)), l < e - 1 && t.push("gap-end"), e > 1 && t.push(e), t;
608
- }, Wt = ({
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 = ({
609
613
  page: n,
610
614
  count: e,
611
615
  disabled: t = !1,
612
- onChange: u
616
+ onChange: p
613
617
  }) => {
614
- const l = j(), a = (c) => {
615
- c >= 1 && c <= e && c !== n && u(c);
618
+ const l = Y(), a = (c) => {
619
+ c >= 1 && c <= e && c !== n && p(c);
616
620
  }, r = {
617
621
  minWidth: "2em",
618
622
  minHeight: "2em",
@@ -621,8 +625,8 @@ const nt = (n) => {
621
625
  fontSize: "0.875em",
622
626
  color: l.colors.text
623
627
  };
624
- return /* @__PURE__ */ T(
625
- y,
628
+ return /* @__PURE__ */ P(
629
+ h,
626
630
  {
627
631
  sx: {
628
632
  display: "flex",
@@ -633,31 +637,31 @@ const nt = (n) => {
633
637
  },
634
638
  children: [
635
639
  /* @__PURE__ */ o(
636
- D,
640
+ W,
637
641
  {
638
642
  variant: "plain",
639
643
  color: "neutral",
640
644
  disabled: t || n === 1,
641
645
  onClick: () => a(1),
642
646
  sx: r,
643
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(wt, { size: 18 }) })
647
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(bt, { size: 18 }) })
644
648
  }
645
649
  ),
646
650
  /* @__PURE__ */ o(
647
- D,
651
+ W,
648
652
  {
649
653
  variant: "plain",
650
654
  color: "neutral",
651
655
  disabled: t || n === 1,
652
656
  onClick: () => a(n - 1),
653
657
  sx: r,
654
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
658
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Et, { size: 18 }) })
655
659
  }
656
660
  ),
657
- Dt(n, e).map((c, x) => {
661
+ Yt(n, e).map((c, y) => {
658
662
  if (typeof c == "string")
659
663
  return /* @__PURE__ */ o(
660
- y,
664
+ h,
661
665
  {
662
666
  sx: {
663
667
  ...r,
@@ -668,11 +672,11 @@ const nt = (n) => {
668
672
  },
669
673
  children: "…"
670
674
  },
671
- `${c}-${x}`
675
+ `${c}-${y}`
672
676
  );
673
677
  const s = c === n;
674
678
  return /* @__PURE__ */ o(
675
- tt,
679
+ nt,
676
680
  {
677
681
  variant: "plain",
678
682
  color: "neutral",
@@ -693,94 +697,94 @@ const nt = (n) => {
693
697
  );
694
698
  }),
695
699
  /* @__PURE__ */ o(
696
- D,
700
+ W,
697
701
  {
698
702
  variant: "plain",
699
703
  color: "neutral",
700
704
  disabled: t || n === e,
701
705
  onClick: () => a(n + 1),
702
706
  sx: r,
703
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(bt, { size: 18 }) })
707
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Lt, { size: 18 }) })
704
708
  }
705
709
  ),
706
710
  /* @__PURE__ */ o(
707
- D,
711
+ W,
708
712
  {
709
713
  variant: "plain",
710
714
  color: "neutral",
711
715
  disabled: t || n === e,
712
716
  onClick: () => a(e),
713
717
  sx: r,
714
- children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Tt, { size: 18 }) })
718
+ children: /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
715
719
  }
716
720
  )
717
721
  ]
718
722
  }
719
723
  );
720
- }, jt = {
724
+ }, Kt = {
721
725
  CLASSIC_QUIZ: "list.types.classicQuiz",
722
726
  PERSONALITY_QUIZ: "list.types.personalityQuiz",
723
727
  EITHER_OR: "list.types.eitherOr",
724
728
  POLL: "list.types.poll",
725
729
  MATCH_QUIZ: "list.types.matchQuiz",
726
730
  CUSTOM_EVENT_GAME: "list.types.eventGame"
727
- }, Yt = (n) => {
731
+ }, $t = (n) => {
728
732
  const {
729
733
  entityId: e,
730
734
  sdk: t,
731
- itemsCount: u = 10,
735
+ itemsCount: p = 10,
732
736
  itemsPerRow: l = 2,
733
737
  widgetMode: a = "load-more",
734
738
  urls: r,
735
739
  defaultImagePlaceholderUrl: c
736
- } = n, { t: x } = G(), s = j(), M = X(), [z, Z] = F(null), [A, N] = F(!1), {
737
- items: U,
738
- loading: P,
739
- error: O,
740
- hasMore: I,
741
- loadMore: R,
742
- page: v,
743
- pageCount: C,
744
- goToPage: b
745
- } = Rt(t, e, u, a), S = Ft(r), d = a === "paged", g = (p) => {
746
- const f = zt(p, r);
747
- if (f) {
748
- window.location.href = f;
740
+ } = n, { t: y } = K(), s = Y(), U = J(), [O, V] = A(null), [v, B] = A(!1), {
741
+ items: R,
742
+ loading: E,
743
+ error: Q,
744
+ hasMore: w,
745
+ loadMore: _,
746
+ page: N,
747
+ 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);
751
+ if (u) {
752
+ window.location.href = u;
749
753
  return;
750
754
  }
751
- S || (Z(p), N(!0));
752
- }, i = M ? 1 : Math.max(1, Math.floor(l)), E = d && C > 1, w = !d && I && !P, Q = !(d && P);
753
- return O || !P && U.length === 0 && !E ? null : /* @__PURE__ */ T(y, { sx: { fontSize: "1em", fontFamily: s.fonts.secondary }, children: [
754
- Q && /* @__PURE__ */ o(
755
- y,
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,
756
760
  {
757
761
  sx: {
758
762
  display: "grid",
759
- gridTemplateColumns: `repeat(${i}, minmax(0, 1fr))`,
763
+ gridTemplateColumns: `repeat(${m}, minmax(0, 1fr))`,
760
764
  gap: s.spacing.xs,
761
765
  marginBottom: s.spacing.md
762
766
  },
763
- children: U.map((p) => {
764
- const f = nt(p);
765
- if (!f) return null;
766
- const h = jt[p.entityType];
767
+ children: R.map((x) => {
768
+ const u = et(x);
769
+ if (!u) return null;
770
+ const C = Kt[x.entityType];
767
771
  return /* @__PURE__ */ o(
768
- Ot,
772
+ Nt,
769
773
  {
770
- item: p,
771
- entityData: f,
772
- typeLabel: h ? x(h) : "",
774
+ item: x,
775
+ entityData: u,
776
+ typeLabel: C ? y(C) : "",
773
777
  imagePlaceholder: c || "",
774
- onClick: g
778
+ onClick: d
775
779
  },
776
- p.entityId
780
+ x.entityId
777
781
  );
778
782
  })
779
783
  }
780
784
  ),
781
- P && /* @__PURE__ */ o(J, { my: 4 }),
782
- w && /* @__PURE__ */ o(
783
- y,
785
+ E && /* @__PURE__ */ o(tt, { my: 4 }),
786
+ F && /* @__PURE__ */ o(
787
+ h,
784
788
  {
785
789
  sx: {
786
790
  display: "flex",
@@ -788,10 +792,10 @@ const nt = (n) => {
788
792
  marginTop: s.spacing.md
789
793
  },
790
794
  children: /* @__PURE__ */ o(
791
- tt,
795
+ nt,
792
796
  {
793
797
  variant: "soft",
794
- onClick: R,
798
+ onClick: _,
795
799
  sx: {
796
800
  borderRadius: s.radius.xl,
797
801
  py: "10px",
@@ -815,31 +819,31 @@ const nt = (n) => {
815
819
  transform: "scale(0.98)"
816
820
  }
817
821
  },
818
- children: x("list.loadMore")
822
+ children: y("list.loadMore")
819
823
  }
820
824
  )
821
825
  }
822
826
  ),
823
- E && /* @__PURE__ */ o(y, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
824
- Wt,
827
+ i && /* @__PURE__ */ o(h, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
828
+ Gt,
825
829
  {
826
- page: v,
827
- count: C,
828
- disabled: P,
829
- onChange: b
830
+ page: N,
831
+ count: I,
832
+ disabled: E,
833
+ onChange: L
830
834
  }
831
835
  ) }),
832
836
  /* @__PURE__ */ o(
833
- Vt,
837
+ Wt,
834
838
  {
835
- item: z,
836
- open: A,
837
- onClose: () => N(!1),
839
+ item: O,
840
+ open: v,
841
+ onClose: () => B(!1),
838
842
  listProps: n
839
843
  }
840
844
  )
841
845
  ] });
842
- }, Gt = (n) => /* @__PURE__ */ o(ut, { packageName: "list", ...n, children: /* @__PURE__ */ o(Yt, { ...n }) }), rn = Gt;
846
+ }, qt = (n) => /* @__PURE__ */ o(ht, { packageName: "list", ...n, children: /* @__PURE__ */ o($t, { ...n }) }), ln = Mt(qt);
843
847
  export {
844
- rn as List
848
+ ln as List
845
849
  };