fansunited-frontend-components 0.0.89 → 0.0.90

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 (121) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +10 -10
  3. package/ClassicQuizPlay.js +1 -1
  4. package/CollectLead.js +7 -7
  5. package/CompetitionStatistics.js +5 -5
  6. package/CompetitorCard.js +10 -10
  7. package/Discussion.js +1 -1
  8. package/EitherOrPlay.js +1 -1
  9. package/EventCard.js +17 -17
  10. package/EventGamePlay.js +1 -1
  11. package/Leaderboard.js +251 -251
  12. package/List.js +15 -15
  13. package/MatchQuizPlay.js +1 -1
  14. package/Odds.js +3 -3
  15. package/PersonalityQuizPlay.js +1 -1
  16. package/PickThePair.js +11 -11
  17. package/PlayerOfTheMatch.js +22 -22
  18. package/PollVote.js +1 -1
  19. package/Predictor.js +1 -1
  20. package/Standings.js +10 -10
  21. package/TopX.js +402 -400
  22. package/chunks/{AccessTime-C0zbWECY.js → AccessTime-BVP1qnmC.js} +1 -1
  23. package/chunks/{AlertMessage-CieUTNsw.js → AlertMessage-aNev3ob9.js} +6 -6
  24. package/chunks/{Avatar-5aOX2Vb1.js → Avatar-Ck9sDlUF.js} +3 -3
  25. package/chunks/{Button-3riWYmL7.js → Button-C5sVDXUr.js} +4 -4
  26. package/chunks/{Card-ByCnCChk.js → Card-DMO0MtFg.js} +3 -3
  27. package/chunks/{CardActions-b3pAJZRO.js → CardActions-CniskUBs.js} +6 -6
  28. package/chunks/{CardContent-CnyZ1WVy.js → CardContent-DSmkIh5e.js} +2 -2
  29. package/chunks/{ChanceGameEmbedVariant-cWHucFuB.js → ChanceGameEmbedVariant-C9U7q27r.js} +10 -10
  30. package/chunks/{CheckCircle-WUucf55H.js → CheckCircle-BLQUgEFO.js} +1 -1
  31. package/chunks/{Chip-BILKBLRO.js → Chip-CbmpDsTx.js} +4 -4
  32. package/chunks/{CircularProgress-Dfx_fE8L.js → CircularProgress-BCucLg2A.js} +2 -2
  33. package/chunks/{Close-C-YXDM7Y.js → Close-BJaeWPmO.js} +1 -1
  34. package/chunks/{Close-D1Qu6Zr7.js → Close-Bn_Gk4s2.js} +1 -1
  35. package/chunks/{CollectLeadForm-BfrhOCqn.js → CollectLeadForm-e59gRdao.js} +21 -21
  36. package/chunks/{ConsentsList-DkWpnlLW.js → ConsentsList-ByAN0_kp.js} +6 -6
  37. package/chunks/{DirectionScope-eDYFWvxN.js → DirectionScope-Ty03Pl0K.js} +1 -1
  38. package/chunks/{Divider-pZCe2d20.js → Divider-D-SATYZX.js} +3 -3
  39. package/chunks/{Edit-NHQMon6F.js → Edit-uzcXQ0W4.js} +4 -4
  40. package/chunks/{EmojiEvents-DXh-xemn.js → EmojiEvents-DzZMpyj0.js} +1 -1
  41. package/chunks/{FavoriteBorder-CQrHuIk5.js → FavoriteBorder-Dz8YRmah.js} +1 -1
  42. package/chunks/{FormControl-DttxxDyJ.js → FormControl-CApGuvy1.js} +4 -4
  43. package/chunks/{FormLabel-D3_mG4D1.js → FormLabel-BhUVGv0u.js} +3 -3
  44. package/chunks/{GlobalStyles-CafmeGDq.js → GlobalStyles-BiXuRSRs.js} +1 -1
  45. package/chunks/{InlineSpinner-DkC1XUc7.js → InlineSpinner-BIQuuKyA.js} +2 -2
  46. package/chunks/{Input-ksZwfsfA.js → Input-C1c9bTgf.js} +4 -4
  47. package/chunks/{KeyboardArrowDown-Ctf2n_n8.js → KeyboardArrowDown-BBL6SAyg.js} +1 -1
  48. package/chunks/{KeyboardArrowRight-CfETLrEt.js → KeyboardArrowRight-DQMFvDqL.js} +1 -1
  49. package/chunks/{Link-CjxMesIg.js → Link-IhyfKeZX.js} +3 -3
  50. package/chunks/{ListItemButton-O4Zqw3zP.js → ListItemButton-C6H1ykg-.js} +4 -4
  51. package/chunks/{ModalClose-Btz9Kn0q.js → ModalClose-COLCM3hQ.js} +6 -6
  52. package/chunks/{ModalDialog-BF_s4rug.js → ModalDialog-19Yt0pTv.js} +6 -6
  53. package/chunks/{NotFoundSkeleton-D2Yx2gZV.js → NotFoundSkeleton-B7aXpJX0.js} +2 -2
  54. package/chunks/{Notification-rNcLeEkz.js → Notification-DPPIzFpw.js} +7 -7
  55. package/chunks/{OddsSkeleton-C6M4oCTF.js → OddsSkeleton-BdKCmc4R.js} +3 -3
  56. package/chunks/{OddsStrip-XQfQiBhM.js → OddsStrip-c9Y8VgmW.js} +4 -4
  57. package/chunks/{OverlayScoreStateSkeleton-w9-f7MPj.js → OverlayScoreStateSkeleton-CGiMhlGz.js} +4 -4
  58. package/chunks/{OverlayScoreStateWrapperSkeleton-B9O-4AU_.js → OverlayScoreStateWrapperSkeleton-mzBPgf_P.js} +1 -1
  59. package/chunks/{OverlaySignInSkeleton-Clq-LJjf.js → OverlaySignInSkeleton-DnxRxCfU.js} +4 -4
  60. package/chunks/{OverlaySkeleton-yDtGLLaG.js → OverlaySkeleton-bXtFE1Y6.js} +9 -9
  61. package/chunks/{Person-DWyYenEx.js → Person-CuxlprBB.js} +1 -1
  62. package/chunks/{PersonOutline-DJJGMjkg.js → PersonOutline-BViWQgNV.js} +1 -1
  63. package/chunks/{PickOneOfX-BZ-IEEEH.js → PickOneOfX-DbBYeZnU.js} +3 -3
  64. package/chunks/{Popper-Wp7BQGU_.js → Popper-B-W5OzQt.js} +3 -3
  65. package/chunks/{Portal-Dw20M2LG.js → Portal-C1ku1V2Y.js} +2 -2
  66. package/chunks/{Portal-Beqgjlza.js → Portal-C49jCyHC.js} +1 -1
  67. package/chunks/{Predictor-BbQ-o3tU.js → Predictor-DGjo_dOB.js} +3643 -3294
  68. package/chunks/{PrizeCard-Cb1YuuYM.js → PrizeCard-BIJVHmYW.js} +240 -192
  69. package/chunks/{Search-BOtjWnG5.js → Search-RBBj-3Z1.js} +1 -1
  70. package/chunks/{Select-DXJCZ6D3.js → Select-Be-2TLJx.js} +7 -7
  71. package/chunks/{Sheet-MP2rgW4b.js → Sheet-DHMJRANx.js} +3 -3
  72. package/chunks/{SignInCta-DWtXHD9B.js → SignInCta-Bz6nl2c-.js} +3 -3
  73. package/chunks/{Spinner-pC2OM4AI.js → Spinner-DQytYdCL.js} +2 -2
  74. package/chunks/{SportsSoccer-C3JxFjui.js → SportsSoccer-Dwp9CkcQ.js} +1 -1
  75. package/chunks/{Stack-CU4pq5Q5.js → Stack-Dx-77BoB.js} +2 -2
  76. package/chunks/{StandardContentSkeleton-Qg1eXOB-.js → StandardContentSkeleton-DV_CkaNl.js} +1 -1
  77. package/chunks/{Table-hk72eRqw.js → Table-D3ou_zxz.js} +2 -2
  78. package/chunks/{Tabs-DiWLN-D7.js → Tabs-D32XKc8G.js} +5 -5
  79. package/chunks/{Textarea-BhxhPabe.js → Textarea-HrQcjIXY.js} +3 -3
  80. package/chunks/{TimerOutlined-CRwZ7isE.js → TimerOutlined-mHIHDBDv.js} +1 -1
  81. package/chunks/{Tooltip-D3L0qTul.js → Tooltip-iozKqko2.js} +5 -5
  82. package/chunks/{Typography-nBRgZwsp.js → Typography-CHHyHOvn.js} +1 -1
  83. package/chunks/{colorInversionUtils-BhmtNPM2.js → colorInversionUtils-CJrDu9ZF.js} +1 -1
  84. package/chunks/{createSvgIcon-C8SzTn0h.js → createSvgIcon-D7NSIoD-.js} +1 -1
  85. package/chunks/{createSvgIcon-y3WkUldr.js → createSvgIcon-DVhK14Wp.js} +2 -2
  86. package/chunks/{dividerClasses-B-2pg9aw.js → dividerClasses-CpWiK9X3.js} +1 -1
  87. package/chunks/{elementAcceptingRef-Bdcp531Z.js → elementAcceptingRef-B8Ay5UA0.js} +1 -1
  88. package/chunks/{formLabelClasses-CECx8x_t.js → formLabelClasses-Bb77PWNt.js} +1 -1
  89. package/chunks/{helpers-BX3cctTx.js → helpers-BjZ558HQ.js} +1 -1
  90. package/chunks/index-BKdbemPX.js +4 -0
  91. package/chunks/index-BL8osWuT.js +4 -0
  92. package/chunks/index-BXktLXqU.js +4 -0
  93. package/chunks/index-BoKBAjSl.js +4 -0
  94. package/chunks/index-DhEpZQT8.js +4 -0
  95. package/chunks/{index-DP3Xa63T.js → index-DzjRMnaE.js} +1 -1
  96. package/chunks/index-WsrzdqEQ.js +4 -0
  97. package/chunks/index-ibZpQ0KD.js +4 -0
  98. package/chunks/{main-DKeA0imc.js → main-BV-r09In.js} +22 -22
  99. package/chunks/{main-Cj_sNGwd.js → main-BgDvdmc8.js} +30 -30
  100. package/chunks/{main-DVStQO7c.js → main-CA5G2ZQX.js} +28 -28
  101. package/chunks/{main-B7xsd2jd.js → main-DSQ1vaFe.js} +34 -34
  102. package/chunks/{main-DZzxaZiR.js → main-D_Rq1xVm.js} +25 -25
  103. package/chunks/{main-Dh0w2gH9.js → main-DcPlB4Wk.js} +19 -19
  104. package/chunks/{main-BG-hwFMf.js → main-Ig2neK0P.js} +18 -18
  105. package/chunks/{main-CqifYDEd.js → main-bAzdlcP_.js} +3 -3
  106. package/chunks/{useButton-CbtwvfQQ.js → useButton-BdGcfaoz.js} +3 -3
  107. package/chunks/{useConsents-DdPK793X.js → useConsents-6ZATswQ4.js} +12 -12
  108. package/chunks/{useEventCallback-KK900PzE.js → useEventCallback-D-FE-RIP.js} +1 -1
  109. package/chunks/{useForwardedInput-Emz99PzK.js → useForwardedInput-DFaOgtZp.js} +2 -2
  110. package/chunks/{useImageVariant-DPC_XqjI.js → useImageVariant-B_dj28Qx.js} +1 -1
  111. package/chunks/{useParticipationDraft-DEWbYjqA.js → useParticipationDraft-BO1gUTVy.js} +6 -6
  112. package/chunks/{useSwitch-ZW00ibaC.js → useSwitch-DeOFp4Ck.js} +3 -3
  113. package/index.js +4 -4
  114. package/package.json +2 -2
  115. package/chunks/index-2ImPs9d7.js +0 -4
  116. package/chunks/index-CitKdUxn.js +0 -4
  117. package/chunks/index-CyKc-9u8.js +0 -4
  118. package/chunks/index-D7bJ5A4g.js +0 -4
  119. package/chunks/index-DWXxfmN5.js +0 -4
  120. package/chunks/index-DcTq5zsy.js +0 -4
  121. package/chunks/index-Ddsiaelf.js +0 -4
package/Leaderboard.js CHANGED
@@ -1,43 +1,43 @@
1
1
  import { jsxs as E, jsx as l, Fragment as ce } from "react/jsx-runtime";
2
2
  import z, { useState as B, useEffect as Q, useCallback as me, useMemo as D } from "react";
3
- import { a as X, b as fe, v as he, x as ge, g as G, f as de, u as O, d as j, B as L, c as ue, m as be, p as ye, o as xe, q as Ce, r as ve, C as Te, s as Pe, E as Se, t as we, w as Ee } from "./chunks/PrizeCard-Cb1YuuYM.js";
3
+ import { a as X, b as fe, v as he, x as ge, g as G, f as de, u as O, d as j, B as I, c as ue, m as be, p as ye, o as xe, q as Ce, r as ve, C as Te, s as Pe, E as Se, t as we, w as Ee } from "./chunks/PrizeCard-BIJVHmYW.js";
4
4
  import { createPortal as Ae } from "react-dom";
5
- import { A as J } from "./chunks/AlertMessage-CieUTNsw.js";
6
- import { F as Ie } from "./chunks/FormLabel-D3_mG4D1.js";
7
- import { T as R } from "./chunks/Typography-nBRgZwsp.js";
8
- import { S as Re, a as Le } from "./chunks/Select-DXJCZ6D3.js";
9
- import { P as ee } from "./chunks/Person-DWyYenEx.js";
10
- import { h as U, a as Me } from "./chunks/helpers-BX3cctTx.js";
11
- import { S as ze } from "./chunks/Spinner-pC2OM4AI.js";
12
- import { S as Be } from "./chunks/Sheet-MP2rgW4b.js";
13
- import { T as Fe } from "./chunks/Table-hk72eRqw.js";
14
- import { A as te } from "./chunks/Avatar-5aOX2Vb1.js";
15
- import { D as H } from "./chunks/DirectionScope-eDYFWvxN.js";
16
- import { I as k, B as re } from "./chunks/Button-3riWYmL7.js";
5
+ import { A as J } from "./chunks/AlertMessage-aNev3ob9.js";
6
+ import { F as Re } from "./chunks/FormLabel-BhUVGv0u.js";
7
+ import { T as L } from "./chunks/Typography-CHHyHOvn.js";
8
+ import { S as Le, a as Ie } from "./chunks/Select-Be-2TLJx.js";
9
+ import { P as ee } from "./chunks/Person-CuxlprBB.js";
10
+ import { h as U, a as Me } from "./chunks/helpers-BjZ558HQ.js";
11
+ import { S as ze } from "./chunks/Spinner-DQytYdCL.js";
12
+ import { S as Be } from "./chunks/Sheet-DHMJRANx.js";
13
+ import { T as Fe } from "./chunks/Table-D3ou_zxz.js";
14
+ import { A as te } from "./chunks/Avatar-Ck9sDlUF.js";
15
+ import { D as H } from "./chunks/DirectionScope-Ty03Pl0K.js";
16
+ import { I as k, B as re } from "./chunks/Button-C5sVDXUr.js";
17
17
  import { C as Ue, a as $e } from "./chunks/chevrons-right-CXSpQt9w.js";
18
18
  import { C as Qe } from "./chunks/chevron-left-CxfCSZcr.js";
19
19
  import { C as He } from "./chunks/chevron-right-BEQMacFn.js";
20
20
  const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()).join(" "), _e = ({
21
21
  options: e,
22
22
  selectedId: t,
23
- onChange: a
23
+ onChange: o
24
24
  }) => {
25
- const { t: r } = X(), { shadowRootElement: o } = fe(he), b = ge(), v = G(), d = de(), m = O().primary, c = j(), C = v.textColor, p = {
25
+ const { t: r } = X(), { shadowRootElement: a } = fe(he), h = ge(), v = G(), y = de(), d = O().primary, c = j(), C = v.textColor, p = {
26
26
  background: {
27
- surface: b.colorSchemes.light.palette.background.surface,
28
- popup: b.colorSchemes.light.palette.background.popup
27
+ surface: h.colorSchemes.light.palette.background.surface,
28
+ popup: h.colorSchemes.light.palette.background.popup
29
29
  },
30
30
  neutral: {
31
- outlinedBorder: b.colorSchemes.light.palette.neutral.outlinedBorder,
32
- outlinedColor: b.colorSchemes.light.palette.neutral.outlinedColor,
33
- outlinedHoverBg: b.colorSchemes.light.palette.neutral.outlinedHoverBg,
34
- plainActiveBg: b.colorSchemes.light.palette.neutral.plainActiveBg,
35
- plainHoverBg: b.colorSchemes.light.palette.neutral.plainHoverBg,
36
- plainHoverColor: b.colorSchemes.light.palette.neutral.plainHoverColor
31
+ outlinedBorder: h.colorSchemes.light.palette.neutral.outlinedBorder,
32
+ outlinedColor: h.colorSchemes.light.palette.neutral.outlinedColor,
33
+ outlinedHoverBg: h.colorSchemes.light.palette.neutral.outlinedHoverBg,
34
+ plainActiveBg: h.colorSchemes.light.palette.neutral.plainActiveBg,
35
+ plainHoverBg: h.colorSchemes.light.palette.neutral.plainHoverBg,
36
+ plainHoverColor: h.colorSchemes.light.palette.neutral.plainHoverColor
37
37
  }
38
38
  }, x = {
39
39
  flexShrink: 0,
40
- fontFamily: m,
40
+ fontFamily: d,
41
41
  fontSize: "0.65em",
42
42
  fontWeight: 600,
43
43
  letterSpacing: "0.05em",
@@ -45,11 +45,11 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
45
45
  color: p.neutral.outlinedColor,
46
46
  bgcolor: p.neutral.plainHoverBg,
47
47
  border: `1px solid ${p.neutral.outlinedBorder}`,
48
- borderRadius: d.sm,
48
+ borderRadius: y.sm,
49
49
  px: c["2xs"],
50
50
  py: c["3xs"]
51
51
  }, A = (g) => /* @__PURE__ */ E(
52
- L,
52
+ I,
53
53
  {
54
54
  sx: {
55
55
  display: "flex",
@@ -60,14 +60,14 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
60
60
  },
61
61
  children: [
62
62
  /* @__PURE__ */ l("span", { children: g.label }),
63
- g.type && /* @__PURE__ */ l(L, { sx: x, children: ke(g.type) })
63
+ g.type && /* @__PURE__ */ l(I, { sx: x, children: ke(g.type) })
64
64
  ]
65
65
  }
66
66
  ), P = {
67
67
  root: {
68
68
  sx: {
69
- fontFamily: m,
70
- borderRadius: d.sm,
69
+ fontFamily: d,
70
+ borderRadius: y.sm,
71
71
  bgcolor: p.background.surface,
72
72
  borderColor: p.neutral.outlinedBorder,
73
73
  color: p.neutral.outlinedColor,
@@ -76,17 +76,17 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
76
76
  }
77
77
  },
78
78
  listbox: {
79
- container: o,
79
+ container: a,
80
80
  sx: {
81
81
  zIndex: 10,
82
82
  bgcolor: p.background.popup,
83
83
  border: `1px solid ${p.neutral.outlinedBorder}`,
84
- borderRadius: d.sm,
84
+ borderRadius: y.sm,
85
85
  boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)"
86
86
  }
87
87
  }
88
88
  }, u = {
89
- fontFamily: m,
89
+ fontFamily: d,
90
90
  color: `${p.neutral.outlinedColor} !important`,
91
91
  bgcolor: "transparent",
92
92
  "&:hover": {
@@ -102,20 +102,20 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
102
102
  color: `${p.neutral.outlinedColor} !important`
103
103
  }
104
104
  };
105
- return /* @__PURE__ */ E(L, { sx: { display: "flex", flexDirection: "column", gap: c["2xs"] }, children: [
105
+ return /* @__PURE__ */ E(I, { sx: { display: "flex", flexDirection: "column", gap: c["2xs"] }, children: [
106
106
  /* @__PURE__ */ l(
107
- Ie,
107
+ Re,
108
108
  {
109
109
  sx: {
110
110
  color: `${C} !important`,
111
- fontFamily: m,
111
+ fontFamily: d,
112
112
  fontSize: "0.875em"
113
113
  },
114
114
  children: /* @__PURE__ */ l(
115
- R,
115
+ L,
116
116
  {
117
117
  sx: {
118
- fontFamily: m,
118
+ fontFamily: d,
119
119
  fontSize: "0.875em",
120
120
  color: C
121
121
  },
@@ -125,31 +125,31 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
125
125
  }
126
126
  ),
127
127
  /* @__PURE__ */ l(
128
- Re,
128
+ Le,
129
129
  {
130
130
  value: t,
131
- onChange: (g, S) => S && a(S),
131
+ onChange: (g, S) => S && o(S),
132
132
  slotProps: P,
133
133
  renderValue: (g) => {
134
134
  if (!g) return null;
135
- const S = e.find((f) => f.id === g.value);
135
+ const S = e.find((m) => m.id === g.value);
136
136
  return S ? A(S) : g.label;
137
137
  },
138
- children: e.map((g) => /* @__PURE__ */ l(Le, { value: g.id, sx: u, children: A(g) }, g.id))
138
+ children: e.map((g) => /* @__PURE__ */ l(Ie, { value: g.id, sx: u, children: A(g) }, g.id))
139
139
  }
140
140
  )
141
141
  ] });
142
142
  }, De = ({
143
143
  leaderboard: e,
144
144
  userRank: t,
145
- showHeading: a,
145
+ showHeading: o,
146
146
  title: r,
147
- description: o,
148
- isSplitVariant: b,
147
+ description: a,
148
+ isSplitVariant: h,
149
149
  brandingColors: v,
150
- rankStyles: d
150
+ rankStyles: y
151
151
  }) => {
152
- const { t: m } = X(), c = ue(), C = G(), p = (v == null ? void 0 : v.primaryColor) || C.palette.primary.plainColor, x = (v == null ? void 0 : v.contentColor) || C.textColor, A = C.textColor, P = O().primary, u = O().secondary, g = de(), S = j(), f = be(), i = C.surfaceVariant, n = c.colorSchemes.light.palette.primary.onPrimary, h = C.outlineEnabledBorder, s = {
152
+ const { t: d } = X(), c = ue(), C = G(), p = (v == null ? void 0 : v.primaryColor) || C.palette.primary.plainColor, x = (v == null ? void 0 : v.contentColor) || C.textColor, A = C.textColor, P = O().primary, u = O().secondary, g = de(), S = j(), m = be(), i = C.surfaceVariant, n = c.colorSchemes.light.palette.primary.onPrimary, f = C.outlineEnabledBorder, s = {
153
153
  leaderboardContainer: {
154
154
  display: "flex",
155
155
  flexDirection: "column",
@@ -167,7 +167,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
167
167
  tableContainer: {
168
168
  overflowX: "auto",
169
169
  borderRadius: g.md,
170
- border: `1px solid ${h}`
170
+ border: `1px solid ${f}`
171
171
  },
172
172
  table: {
173
173
  backgroundColor: i,
@@ -184,7 +184,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
184
184
  fontWeight: 600,
185
185
  fontSize: "0.875em",
186
186
  textAlign: "center",
187
- borderBottom: `1px solid ${h}`
187
+ borderBottom: `1px solid ${f}`
188
188
  }
189
189
  },
190
190
  headerCellPosition: {
@@ -283,11 +283,11 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
283
283
  if (!e)
284
284
  return /* @__PURE__ */ l(ze, { my: 10 });
285
285
  if (e.length === 0)
286
- return /* @__PURE__ */ l(R, { level: "body-lg", sx: s.noLeaderboardText, children: m("leaderboard.noLeaderboardAvailable") });
287
- const T = t, w = T == null ? void 0 : T.profileId, F = w && e.some((y) => y.profileId === w);
288
- return /* @__PURE__ */ E(L, { sx: s.leaderboardContainer, children: [
289
- a && /* @__PURE__ */ E(
290
- L,
286
+ return /* @__PURE__ */ l(L, { level: "body-lg", sx: s.noLeaderboardText, children: d("leaderboard.noLeaderboardAvailable") });
287
+ const T = t, w = T == null ? void 0 : T.profileId, F = w && e.some((b) => b.profileId === w);
288
+ return /* @__PURE__ */ E(I, { sx: s.leaderboardContainer, children: [
289
+ o && /* @__PURE__ */ E(
290
+ I,
291
291
  {
292
292
  sx: {
293
293
  display: "flex",
@@ -297,7 +297,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
297
297
  },
298
298
  children: [
299
299
  /* @__PURE__ */ l(
300
- R,
300
+ L,
301
301
  {
302
302
  level: "body-sm",
303
303
  sx: {
@@ -310,11 +310,11 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
310
310
  opacity: "60%",
311
311
  fontFamily: u
312
312
  },
313
- children: m("leaderboard.heading")
313
+ children: d("leaderboard.heading")
314
314
  }
315
315
  ),
316
316
  /* @__PURE__ */ E(
317
- L,
317
+ I,
318
318
  {
319
319
  sx: {
320
320
  display: "flex",
@@ -322,9 +322,9 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
322
322
  gap: S["3xs"]
323
323
  },
324
324
  children: [
325
- r && /* @__PURE__ */ l(R, { level: "h4", sx: s.leaderboardTitle, children: r }),
326
- o && /* @__PURE__ */ l(
327
- R,
325
+ r && /* @__PURE__ */ l(L, { level: "h4", sx: s.leaderboardTitle, children: r }),
326
+ a && /* @__PURE__ */ l(
327
+ L,
328
328
  {
329
329
  sx: {
330
330
  fontWeight: 400,
@@ -335,7 +335,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
335
335
  opacity: "60%",
336
336
  fontFamily: P
337
337
  },
338
- children: Me(o)
338
+ children: Me(a)
339
339
  }
340
340
  )
341
341
  ]
@@ -354,43 +354,43 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
354
354
  sx: s.table,
355
355
  children: [
356
356
  /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ E("tr", { children: [
357
- /* @__PURE__ */ l("th", { style: s.headerCellPosition, children: f || b ? "" : m("leaderboard.position") }),
358
- /* @__PURE__ */ l("th", { style: s.headerCellName, children: m("leaderboard.name") }),
359
- /* @__PURE__ */ l("th", { style: s.headerCellPoints, children: f || b ? "🎯" : m("leaderboard.points") })
357
+ /* @__PURE__ */ l("th", { style: s.headerCellPosition, children: m || h ? "" : d("leaderboard.position") }),
358
+ /* @__PURE__ */ l("th", { style: s.headerCellName, children: d("leaderboard.name") }),
359
+ /* @__PURE__ */ l("th", { style: s.headerCellPoints, children: m || h ? "🎯" : d("leaderboard.points") })
360
360
  ] }) }),
361
361
  /* @__PURE__ */ E("tbody", { children: [
362
362
  T && !F && /* @__PURE__ */ E("tr", { style: s.userRow, children: [
363
- /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
363
+ /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(L, { sx: s.positionText, children: [
364
364
  "#",
365
365
  T.position
366
366
  ] }) }),
367
- /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
367
+ /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(I, { sx: s.nameCell, children: [
368
368
  /* @__PURE__ */ l(te, { sx: s.leaderboardAvatar, children: /* @__PURE__ */ l(ee, { sx: s.avatarIcon }) }),
369
- /* @__PURE__ */ l(R, { sx: s.nameText, children: m("leaderboard.you") })
369
+ /* @__PURE__ */ l(L, { sx: s.nameText, children: d("leaderboard.you") })
370
370
  ] }) }),
371
- /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: T.points }) })
371
+ /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(L, { sx: s.pointsText, children: T.points }) })
372
372
  ] }),
373
- e.map((y, I) => {
373
+ e.map((b, R) => {
374
374
  var V, Y, q, K;
375
- const M = w === y.profileId, pe = M ? s.userRow : d == null ? void 0 : d[I + 1];
375
+ const M = w === b.profileId, pe = M ? s.userRow : y == null ? void 0 : y[R + 1];
376
376
  return /* @__PURE__ */ E("tr", { style: pe, children: [
377
- /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
377
+ /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(L, { sx: s.positionText, children: [
378
378
  "#",
379
- y.position
379
+ b.position
380
380
  ] }) }),
381
- /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
381
+ /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(I, { sx: s.nameCell, children: [
382
382
  /* @__PURE__ */ l(
383
383
  te,
384
384
  {
385
- src: ((V = y.profileModel) == null ? void 0 : V.avatar) || void 0,
385
+ src: ((V = b.profileModel) == null ? void 0 : V.avatar) || void 0,
386
386
  sx: s.leaderboardAvatar,
387
- children: (Y = y.profileModel) != null && Y.avatar ? /* @__PURE__ */ l(ce, {}) : /* @__PURE__ */ l(ee, { sx: s.avatarIcon })
387
+ children: (Y = b.profileModel) != null && Y.avatar ? /* @__PURE__ */ l(ce, {}) : /* @__PURE__ */ l(ee, { sx: s.avatarIcon })
388
388
  }
389
389
  ),
390
- /* @__PURE__ */ l(R, { sx: s.nameText, children: M ? m("leaderboard.you") : ((q = y.profileModel) == null ? void 0 : q.nickname) || ((K = y.profileModel) == null ? void 0 : K.name) || m("leaderboard.anonymous") })
390
+ /* @__PURE__ */ l(L, { sx: s.nameText, children: M ? d("leaderboard.you") : ((q = b.profileModel) == null ? void 0 : q.nickname) || ((K = b.profileModel) == null ? void 0 : K.name) || d("leaderboard.anonymous") })
391
391
  ] }) }),
392
- /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: y.points }) })
393
- ] }, y.profileId);
392
+ /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(L, { sx: s.pointsText, children: b.points }) })
393
+ ] }, b.profileId);
394
394
  })
395
395
  ] })
396
396
  ]
@@ -400,35 +400,35 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
400
400
  }, Oe = ({
401
401
  count: e = 10,
402
402
  page: t = 1,
403
- onChange: a,
403
+ onChange: o,
404
404
  siblingCount: r = 1,
405
- boundaryCount: o = 1,
406
- showFirstButton: b = !0,
405
+ boundaryCount: a = 1,
406
+ showFirstButton: h = !0,
407
407
  showLastButton: v = !0,
408
- size: d = "md",
409
- disabled: m = !1,
408
+ size: y = "md",
409
+ disabled: d = !1,
410
410
  isOverlayVariant: c = !1
411
411
  }) => {
412
412
  const C = ue(), p = (i) => {
413
- a && i >= 1 && i <= e && a(i);
413
+ o && i >= 1 && i <= e && o(i);
414
414
  }, x = (i, n) => {
415
- const h = [];
416
- for (let s = i; s <= n; s++) h.push(s);
417
- return h;
415
+ const f = [];
416
+ for (let s = i; s <= n; s++) f.push(s);
417
+ return f;
418
418
  }, P = (() => {
419
419
  if (e <= 0) return [];
420
- const i = x(1, Math.min(o, e)), n = x(
421
- Math.max(e - o + 1, o + 1),
420
+ const i = x(1, Math.min(a, e)), n = x(
421
+ Math.max(e - a + 1, a + 1),
422
422
  e
423
- ), h = Math.max(o + 1, t - r), s = Math.min(e - o, t + r), T = [...i];
424
- if (h > o + 1 && T.push("ellipsis-start"), h <= s)
425
- for (let w = h; w <= s; w++)
423
+ ), f = Math.max(a + 1, t - r), s = Math.min(e - a, t + r), T = [...i];
424
+ if (f > a + 1 && T.push("ellipsis-start"), f <= s)
425
+ for (let w = f; w <= s; w++)
426
426
  T.push(w);
427
- s < e - o && T.push("ellipsis-end");
427
+ s < e - a && T.push("ellipsis-end");
428
428
  for (const w of n)
429
429
  T.includes(w) || T.push(w);
430
430
  return T;
431
- })(), u = d === "sm" ? "sm" : d === "lg" ? "lg" : "md", g = d === "sm" ? 16 : d === "lg" ? 24 : 20, S = (i = !1) => {
431
+ })(), u = y === "sm" ? "sm" : y === "lg" ? "lg" : "md", g = y === "sm" ? 16 : y === "lg" ? 24 : 20, S = (i = !1) => {
432
432
  if (!c)
433
433
  return {
434
434
  borderRadius: "8px",
@@ -458,7 +458,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
458
458
  opacity: 0.5
459
459
  }
460
460
  };
461
- }, f = () => {
461
+ }, m = () => {
462
462
  if (!c)
463
463
  return {
464
464
  borderRadius: "8px",
@@ -488,7 +488,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
488
488
  };
489
489
  };
490
490
  return /* @__PURE__ */ E(
491
- L,
491
+ I,
492
492
  {
493
493
  sx: {
494
494
  display: "flex",
@@ -497,15 +497,15 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
497
497
  flexWrap: "wrap"
498
498
  },
499
499
  children: [
500
- b && /* @__PURE__ */ l(
500
+ h && /* @__PURE__ */ l(
501
501
  k,
502
502
  {
503
503
  size: u,
504
504
  variant: "plain",
505
505
  color: "neutral",
506
506
  onClick: () => p(1),
507
- disabled: m || t === 1,
508
- sx: f(),
507
+ disabled: d || t === 1,
508
+ sx: m(),
509
509
  children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ue, { size: g }) })
510
510
  }
511
511
  ),
@@ -516,8 +516,8 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
516
516
  variant: "plain",
517
517
  color: "neutral",
518
518
  onClick: () => p(t - 1),
519
- disabled: m || t === 1,
520
- sx: f(),
519
+ disabled: d || t === 1,
520
+ sx: m(),
521
521
  children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qe, { size: g }) })
522
522
  }
523
523
  ),
@@ -546,16 +546,16 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
546
546
  },
547
547
  `${i}-${n}`
548
548
  );
549
- const h = i === t;
549
+ const f = i === t;
550
550
  return /* @__PURE__ */ l(
551
551
  re,
552
552
  {
553
553
  size: u,
554
- variant: h ? "solid" : "plain",
554
+ variant: f ? "solid" : "plain",
555
555
  color: "neutral",
556
556
  onClick: () => p(i),
557
- disabled: m,
558
- sx: S(h),
557
+ disabled: d,
558
+ sx: S(f),
559
559
  children: i
560
560
  },
561
561
  i
@@ -568,8 +568,8 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
568
568
  variant: "plain",
569
569
  color: "neutral",
570
570
  onClick: () => p(t + 1),
571
- disabled: m || t === e,
572
- sx: f(),
571
+ disabled: d || t === e,
572
+ sx: m(),
573
573
  children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(He, { size: g }) })
574
574
  }
575
575
  ),
@@ -580,8 +580,8 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
580
580
  variant: "plain",
581
581
  color: "neutral",
582
582
  onClick: () => p(e),
583
- disabled: m || t === e,
584
- sx: f(),
583
+ disabled: d || t === e,
584
+ sx: m(),
585
585
  children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l($e, { size: g }) })
586
586
  }
587
587
  )
@@ -605,125 +605,125 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
605
605
  return null;
606
606
  }
607
607
  }, oe = async (e, t) => e.length === 0 ? [] : (await t.topX.getGames({ gameIds: e })).data.map((r) => {
608
- var o;
608
+ var a;
609
609
  return {
610
610
  id: r.id,
611
611
  title: r.title,
612
612
  description: r.description || null,
613
- branding: ((o = r.branding) == null ? void 0 : o.colors) || null
613
+ branding: ((a = r.branding) == null ? void 0 : a.colors) || null
614
614
  };
615
615
  }), ne = async (e, t) => e.length === 0 ? [] : (await t.matchQuiz.getGames({ gameIds: e })).data.map((r) => {
616
- var o;
616
+ var a;
617
617
  return {
618
618
  id: r.id,
619
619
  title: r.title,
620
620
  description: r.description || null,
621
- branding: ((o = r.branding) == null ? void 0 : o.colors) || null
621
+ branding: ((a = r.branding) == null ? void 0 : a.colors) || null
622
622
  };
623
623
  }), ae = async (e, t) => e.length === 0 ? [] : (await t.loyalty.getTemplates()).data.filter((r) => e.includes(r.id)).map((r) => {
624
- var o;
624
+ var a;
625
625
  return {
626
626
  id: r.id,
627
627
  title: r.title || r.name,
628
628
  description: r.description || null,
629
- branding: ((o = r.branding) == null ? void 0 : o.colors) || null
629
+ branding: ((a = r.branding) == null ? void 0 : a.colors) || null
630
630
  };
631
631
  }), le = async (e, t) => e.length === 0 ? [] : (await t.miniGames.getClassicQuizzes({
632
632
  classicQuizIds: e,
633
633
  limit: e.length
634
634
  })).data.map((r) => {
635
- var o;
635
+ var a;
636
636
  return {
637
637
  id: r.id,
638
638
  title: r.title || r.name,
639
639
  description: r.description || null,
640
- branding: ((o = r.branding) == null ? void 0 : o.colors) || null
640
+ branding: ((a = r.branding) == null ? void 0 : a.colors) || null
641
641
  };
642
- }), Xe = async (e, t, a, r) => {
643
- const o = await t.loyalty.getLeaderboardForGame(e, { page: a, limit: r });
642
+ }), Xe = async (e, t, o, r) => {
643
+ const a = await t.loyalty.getLeaderboardForGame(e, { page: o, limit: r });
644
644
  return {
645
- leaderboard: N(o.data),
646
- pagination: Z(o.meta.pagination)
645
+ leaderboard: N(a.data),
646
+ pagination: Z(a.meta.pagination)
647
647
  };
648
- }, Ge = async (e, t, a, r) => {
649
- const o = await t.loyalty.getLeaderboard(
648
+ }, Ge = async (e, t, o, r) => {
649
+ const a = await t.loyalty.getLeaderboard(
650
650
  e,
651
- { page: a, limit: r }
651
+ { page: o, limit: r }
652
652
  );
653
653
  return {
654
- leaderboard: N(o.data),
655
- pagination: Z(o.meta.pagination)
654
+ leaderboard: N(a.data),
655
+ pagination: Z(a.meta.pagination)
656
656
  };
657
- }, W = async (e, t, a, r) => {
658
- const o = await t.miniGames.getLeaderboardForClassicQuizzes({
657
+ }, W = async (e, t, o, r) => {
658
+ const a = await t.miniGames.getLeaderboardForClassicQuizzes({
659
659
  classicQuizIds: e,
660
- page: a,
660
+ page: o,
661
661
  limit: r
662
662
  });
663
663
  return {
664
- leaderboard: N(o.data),
665
- pagination: Z(o.meta.pagination)
664
+ leaderboard: N(a.data),
665
+ pagination: Z(a.meta.pagination)
666
666
  };
667
- }, ie = (e, t, a, r) => {
668
- const o = e.type.toUpperCase();
669
- return o === "TOP_X" || o === "MATCH_QUIZ" ? Xe(e.id, t, a, r) : o === "TEMPLATE" ? Ge(e.id, t, a, r) : W([e.id], t, a, r);
670
- }, je = async (e, t, a) => {
671
- const o = a.toUpperCase() === "TEMPLATE" ? { rankType: "TEMPLATE", leaderboardIds: [e] } : { rankType: "GAME", gameType: a.toUpperCase(), leaderboardIds: [e] }, d = (await t.loyalty.getOwnRankings(o, !0)).data[0] ?? null;
667
+ }, ie = (e, t, o, r) => {
668
+ const a = e.type.toUpperCase();
669
+ return a === "TOP_X" || a === "MATCH_QUIZ" ? Xe(e.id, t, o, r) : a === "TEMPLATE" ? Ge(e.id, t, o, r) : W([e.id], t, o, r);
670
+ }, je = async (e, t, o, r) => {
671
+ const h = o.toUpperCase() === "TEMPLATE" ? { rankType: "TEMPLATE", leaderboardIds: [e] } : { rankType: "GAME", gameType: o.toUpperCase(), leaderboardIds: [e] }, d = (await t.loyalty.getOwnRankings(h, !0)).data[0] ?? null;
672
672
  return d ? {
673
673
  position: d.position,
674
- profileId: d.profileId,
675
- profileModel: d.profileModel,
674
+ profileId: r,
675
+ profileModel: null,
676
676
  points: d.points
677
677
  } : null;
678
- }, Ze = async (e, t, a) => {
679
- const b = (await t.miniGames.getClassicQuizzesUserRanking(
680
- a,
678
+ }, Ze = async (e, t, o) => {
679
+ const h = (await t.miniGames.getClassicQuizzesUserRanking(
680
+ o,
681
681
  void 0,
682
682
  !0
683
683
  )).data.find((v) => v.classicQuizId === e) ?? null;
684
- return b ? {
685
- position: b.position,
686
- profileId: a,
684
+ return h ? {
685
+ position: h.position,
686
+ profileId: o,
687
687
  profileModel: null,
688
- points: b.points
688
+ points: h.points
689
689
  } : null;
690
- }, Ne = (e, t, a) => {
690
+ }, Ne = (e, t, o) => {
691
691
  const r = e.type.toUpperCase();
692
- return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ? je(e.id, t, e.type) : Ze(e.id, t, a);
693
- }, Ve = (e, t, a, r = 10) => {
694
- const [o, b] = B({}), [v, d] = B(null), [m, c] = B(!1), [C, p] = B(!1), [x, A] = B(
692
+ return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ? je(e.id, t, e.type, o) : Ze(e.id, t, o);
693
+ }, Ve = (e, t, o, r = 10) => {
694
+ const [a, h] = B({}), [v, y] = B(null), [d, c] = B(!1), [C, p] = B(!1), [x, A] = B(
695
695
  null
696
696
  ), [P, u] = B(null);
697
697
  Q(() => {
698
- const f = {
698
+ const m = {
699
699
  topX: e.filter((n) => n.type.toUpperCase() === "TOP_X").map((n) => n.id),
700
700
  matchQuiz: e.filter((n) => n.type.toUpperCase() === "MATCH_QUIZ").map((n) => n.id),
701
701
  template: e.filter((n) => n.type.toUpperCase() === "TEMPLATE").map((n) => n.id),
702
702
  classicQuiz: e.filter((n) => n.type.toUpperCase() === "CLASSIC_QUIZ").map((n) => n.id)
703
703
  }, i = (n) => n.catch(() => []);
704
704
  Promise.all([
705
- i(oe(f.topX, t)),
706
- i(ne(f.matchQuiz, t)),
707
- i(ae(f.template, t)),
708
- i(le(f.classicQuiz, t))
705
+ i(oe(m.topX, t)),
706
+ i(ne(m.matchQuiz, t)),
707
+ i(ae(m.template, t)),
708
+ i(le(m.classicQuiz, t))
709
709
  ]).then((n) => {
710
- const h = {};
710
+ const f = {};
711
711
  n.flat().forEach((s) => {
712
- h[s.id] = s;
713
- }), b(h);
712
+ f[s.id] = s;
713
+ }), h(f);
714
714
  });
715
715
  }, [e, t]), Q(() => {
716
716
  We(t).then(A);
717
717
  }, [t]), Q(() => {
718
- if (!a || !x) {
718
+ if (!o || !x) {
719
719
  u(null);
720
720
  return;
721
721
  }
722
- let f = !1, i;
723
- if (a === $) {
724
- const n = e.map((h) => h.id);
725
- i = t.miniGames.getClassicQuizzesUserRanking(x.id, void 0, !0).then((h) => {
726
- const T = h.data.find((w) => n.includes(w.classicQuizId)) ?? null;
722
+ let m = !1, i;
723
+ if (o === $) {
724
+ const n = e.map((f) => f.id);
725
+ i = t.miniGames.getClassicQuizzesUserRanking(x.id, void 0, !0).then((f) => {
726
+ const T = f.data.find((w) => n.includes(w.classicQuizId)) ?? null;
727
727
  return T ? {
728
728
  position: T.position,
729
729
  profileId: x.id,
@@ -732,79 +732,79 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
732
732
  } : null;
733
733
  });
734
734
  } else {
735
- const n = e.find((h) => h.id === a);
735
+ const n = e.find((f) => f.id === o);
736
736
  if (!n) return;
737
737
  i = Ne(n, t, x.id);
738
738
  }
739
739
  return i.then((n) => {
740
- f || u(n);
740
+ m || u(n);
741
741
  }).catch(() => {
742
- f || u(null);
742
+ m || u(null);
743
743
  }), () => {
744
- f = !0;
744
+ m = !0;
745
745
  };
746
- }, [a, e, t, x]), Q(() => {
747
- if (!a) return;
748
- let f = !1;
749
- return c(!0), p(!1), d(null), (async () => {
746
+ }, [o, e, t, x]), Q(() => {
747
+ if (!o) return;
748
+ let m = !1;
749
+ return c(!0), p(!1), y(null), (async () => {
750
750
  try {
751
- const n = e.length > 1 && e.every((y) => y.type.toUpperCase() === "CLASSIC_QUIZ");
752
- if (a === $ && n) {
753
- const y = e.map((M) => M.id), I = await W(
754
- y,
751
+ const n = e.length > 1 && e.every((b) => b.type.toUpperCase() === "CLASSIC_QUIZ");
752
+ if (o === $ && n) {
753
+ const b = e.map((M) => M.id), R = await W(
754
+ b,
755
755
  t,
756
756
  1,
757
757
  r
758
758
  );
759
- f || d({
759
+ m || y({
760
760
  id: $,
761
761
  title: $,
762
762
  description: null,
763
763
  branding: null,
764
- ...I
764
+ ...R
765
765
  });
766
766
  return;
767
767
  }
768
- const h = e.find((y) => y.id === a);
769
- if (!h) return;
770
- const s = h.type.toUpperCase(), T = s === "TOP_X" ? oe([a], t) : s === "MATCH_QUIZ" ? ne([a], t) : s === "TEMPLATE" ? ae([a], t) : le([a], t), [w, F] = await Promise.all([
771
- ie(h, t, 1, r),
768
+ const f = e.find((b) => b.id === o);
769
+ if (!f) return;
770
+ const s = f.type.toUpperCase(), T = s === "TOP_X" ? oe([o], t) : s === "MATCH_QUIZ" ? ne([o], t) : s === "TEMPLATE" ? ae([o], t) : le([o], t), [w, F] = await Promise.all([
771
+ ie(f, t, 1, r),
772
772
  T.catch(() => [])
773
773
  ]);
774
- if (!f) {
775
- const y = F[0];
776
- d({
777
- id: a,
778
- title: (y == null ? void 0 : y.title) || a,
779
- description: (y == null ? void 0 : y.description) || null,
780
- branding: (y == null ? void 0 : y.branding) || null,
774
+ if (!m) {
775
+ const b = F[0];
776
+ y({
777
+ id: o,
778
+ title: (b == null ? void 0 : b.title) || o,
779
+ description: (b == null ? void 0 : b.description) || null,
780
+ branding: (b == null ? void 0 : b.branding) || null,
781
781
  ...w
782
782
  });
783
783
  }
784
784
  } catch (n) {
785
- console.error("Failed to fetch leaderboard:", n), f || p(!0);
785
+ console.error("Failed to fetch leaderboard:", n), m || p(!0);
786
786
  } finally {
787
- f || c(!1);
787
+ m || c(!1);
788
788
  }
789
789
  })(), () => {
790
- f = !0;
790
+ m = !0;
791
791
  };
792
- }, [a, e, t, r]);
792
+ }, [o, e, t, r]);
793
793
  const g = me(
794
- async (f) => {
795
- if (a) {
794
+ async (m) => {
795
+ if (o) {
796
796
  c(!0);
797
797
  try {
798
798
  let i;
799
- if (a === $) {
800
- const n = e.map((h) => h.id);
801
- i = await W(n, t, f, r);
799
+ if (o === $) {
800
+ const n = e.map((f) => f.id);
801
+ i = await W(n, t, m, r);
802
802
  } else {
803
- const n = e.find((h) => h.id === a);
803
+ const n = e.find((f) => f.id === o);
804
804
  if (!n) return;
805
- i = await ie(n, t, f, r);
805
+ i = await ie(n, t, m, r);
806
806
  }
807
- d((n) => n ? { ...n, ...i } : null);
807
+ y((n) => n ? { ...n, ...i } : null);
808
808
  } catch (i) {
809
809
  console.error("Failed to fetch page:", i);
810
810
  } finally {
@@ -812,64 +812,64 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
812
812
  }
813
813
  }
814
814
  },
815
- [a, e, t, r]
815
+ [o, e, t, r]
816
816
  ), S = Object.fromEntries(
817
- Object.entries(o).map(([f, i]) => [f, i.title])
817
+ Object.entries(a).map(([m, i]) => [m, i.title])
818
818
  );
819
- return { data: v, entityTitles: S, loading: m, error: C, setPage: g, userRank: P };
819
+ return { data: v, entityTitles: S, loading: d, error: C, setPage: g, userRank: P };
820
820
  }, _ = "ALL", se = ["TOP_X", "MATCH_QUIZ", "TEMPLATE", "CLASSIC_QUIZ"], Ye = (e, t) => {
821
821
  if (!Array.isArray(e) || e.length === 0)
822
822
  return "The 'entities' setting is required and must be a non-empty array.";
823
- const a = /* @__PURE__ */ new Set();
823
+ const o = /* @__PURE__ */ new Set();
824
824
  for (let r = 0; r < e.length; r++) {
825
- const o = e[r];
826
- if (!o || typeof o != "object")
825
+ const a = e[r];
826
+ if (!a || typeof a != "object")
827
827
  return `Entity at index ${r} must be an object with 'id' and 'type' fields.`;
828
- if (!o.id || typeof o.id != "string")
828
+ if (!a.id || typeof a.id != "string")
829
829
  return `Entity at index ${r} is missing a required 'id' string field.`;
830
- if (a.has(o.id))
831
- return `Duplicate entity id '${o.id}' found at index ${r}. Each entity must have a unique id.`;
832
- if (a.add(o.id), !o.type || typeof o.type != "string")
830
+ if (o.has(a.id))
831
+ return `Duplicate entity id '${a.id}' found at index ${r}. Each entity must have a unique id.`;
832
+ if (o.add(a.id), !a.type || typeof a.type != "string")
833
833
  return `Entity at index ${r} is missing a required 'type' string field.`;
834
- if (!se.includes(o.type.toUpperCase()))
835
- return `Entity at index ${r} has an invalid type '${o.type}'. Valid values are: ${se.join(", ")} (case-insensitive).`;
834
+ if (!se.includes(a.type.toUpperCase()))
835
+ return `Entity at index ${r} has an invalid type '${a.type}'. Valid values are: ${se.join(", ")} (case-insensitive).`;
836
836
  }
837
837
  return t !== void 0 && (typeof t != "number" || !Number.isInteger(t) || t < 1 || t > 50) ? "The 'pageSize' setting must be an integer between 1 and 50." : null;
838
838
  }, qe = ({
839
839
  entities: e,
840
840
  sdk: t,
841
- pageSize: a,
841
+ pageSize: o,
842
842
  rankStyles: r,
843
- showOverallOnly: o = !1,
844
- showHeading: b = !0
843
+ showOverallOnly: a = !1,
844
+ showHeading: h = !0
845
845
  }) => {
846
- var y;
847
- const { t: v } = X(), d = j(), m = G().surface, c = D(
848
- () => Ye(e, a),
849
- [e, a]
846
+ var b;
847
+ const { t: v } = X(), y = j(), d = G().surface, c = D(
848
+ () => Ye(e, o),
849
+ [e, o]
850
850
  ), C = D(
851
- () => !c && e.length > 1 && e.every((I) => I.type.toUpperCase() === "CLASSIC_QUIZ"),
851
+ () => !c && e.length > 1 && e.every((R) => R.type.toUpperCase() === "CLASSIC_QUIZ"),
852
852
  [e, c]
853
- ), p = o && C, x = C ? _ : ((y = e[0]) == null ? void 0 : y.id) || "", [A, P] = B(x);
853
+ ), p = a && C, x = C ? _ : ((b = e[0]) == null ? void 0 : b.id) || "", [A, P] = B(x);
854
854
  Q(() => {
855
855
  A === _ || e.some((M) => M.id === A) || P(x);
856
856
  }, [e]);
857
- const { data: u, entityTitles: g, loading: S, error: f, setPage: i, userRank: n } = Ve(
857
+ const { data: u, entityTitles: g, loading: S, error: m, setPage: i, userRank: n } = Ve(
858
858
  c ? [] : e,
859
859
  t,
860
860
  c ? "" : A,
861
- a
862
- ), h = D(() => {
861
+ o
862
+ ), f = D(() => {
863
863
  if (c) return [];
864
- const I = [];
865
- return C && I.push({ id: _, label: v("leaderboard.overall") }), e.forEach((M) => {
866
- I.push({
864
+ const R = [];
865
+ return C && R.push({ id: _, label: v("leaderboard.overall") }), e.forEach((M) => {
866
+ R.push({
867
867
  id: M.id,
868
868
  label: g[M.id] ?? "",
869
869
  type: M.type.toUpperCase()
870
870
  });
871
- }), I;
872
- }, [e, C, v, g, c]), s = e.every((I) => g[I.id] !== void 0), T = !c && !p && (e.length > 1 || C) && s, w = (u == null ? void 0 : u.pagination) || null, F = A === _ ? v("leaderboard.overall") : (u == null ? void 0 : u.title) || null;
871
+ }), R;
872
+ }, [e, C, v, g, c]), s = e.every((R) => g[R.id] !== void 0), T = !c && !p && (e.length > 1 || C) && s, w = (u == null ? void 0 : u.pagination) || null, F = A === _ ? v("leaderboard.overall") : (u == null ? void 0 : u.title) || null;
873
873
  return c ? /* @__PURE__ */ l(
874
874
  J,
875
875
  {
@@ -877,7 +877,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
877
877
  title: "Configuration Error",
878
878
  message: c
879
879
  }
880
- ) : f ? /* @__PURE__ */ l(
880
+ ) : m ? /* @__PURE__ */ l(
881
881
  J,
882
882
  {
883
883
  variant: "error",
@@ -885,20 +885,20 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
885
885
  message: "One or more entity IDs could not be found. Please verify the provided IDs and try again."
886
886
  }
887
887
  ) : /* @__PURE__ */ E(
888
- L,
888
+ I,
889
889
  {
890
890
  sx: {
891
891
  display: "flex",
892
892
  flexDirection: "column",
893
- gap: d.md,
894
- backgroundColor: m,
895
- padding: d.md
893
+ gap: y.md,
894
+ backgroundColor: d,
895
+ padding: y.md
896
896
  },
897
897
  children: [
898
898
  T && /* @__PURE__ */ l(
899
899
  _e,
900
900
  {
901
- options: h,
901
+ options: f,
902
902
  selectedId: A,
903
903
  onChange: P
904
904
  }
@@ -908,7 +908,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
908
908
  {
909
909
  leaderboard: S ? null : (u == null ? void 0 : u.leaderboard) || null,
910
910
  userRank: S ? null : n,
911
- showHeading: b && !T,
911
+ showHeading: h && !T,
912
912
  title: F,
913
913
  description: (u == null ? void 0 : u.description) || null,
914
914
  brandingColors: (u == null ? void 0 : u.branding) || null,
@@ -928,38 +928,38 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
928
928
  );
929
929
  }, Ke = (e) => {
930
930
  var P;
931
- const [t, a] = z.useState(!1), [r, o] = z.useState(!1), b = ye(e.language), v = z.useRef(
931
+ const [t, o] = z.useState(!1), [r, a] = z.useState(!1), h = ye(e.language), v = z.useRef(
932
932
  `leaderboard-shadow-root-${Math.random().toString(36).substring(2, 11)}`
933
- ), d = z.useRef(null), m = z.useRef(null), c = z.useRef(null), [C, p] = z.useState(null);
933
+ ), y = z.useRef(null), d = z.useRef(null), c = z.useRef(null), [C, p] = z.useState(null);
934
934
  z.useEffect(() => {
935
- xe(e.language || "en").finally(() => o(!0));
935
+ xe(e.language || "en").finally(() => a(!0));
936
936
  }, [e.language]), z.useEffect(() => {
937
- if (!d.current) return;
938
- d.current.shadowRoot ? (m.current = d.current.shadowRoot, c.current = m.current.getElementById(
937
+ if (!y.current) return;
938
+ y.current.shadowRoot ? (d.current = y.current.shadowRoot, c.current = d.current.getElementById(
939
939
  v.current
940
- ), c.current || (c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current))) : (m.current = d.current.attachShadow({ mode: "open" }), c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current)), Ce(c.current, b);
941
- const u = Ee("leaderboard", b);
940
+ ), c.current || (c.current = document.createElement("div"), c.current.id = v.current, d.current.appendChild(c.current))) : (d.current = y.current.attachShadow({ mode: "open" }), c.current = document.createElement("div"), c.current.id = v.current, d.current.appendChild(c.current)), Ce(c.current, h);
941
+ const u = Ee("leaderboard", h);
942
942
  return p(
943
943
  (g) => (g == null ? void 0 : g.key) === u ? g : ve(
944
944
  "leaderboard",
945
- m.current,
946
- b
945
+ d.current,
946
+ h
947
947
  )
948
- ), a(!0), () => {
949
- a(!1);
948
+ ), o(!0), () => {
949
+ o(!1);
950
950
  };
951
- }, [b]);
952
- const x = /* @__PURE__ */ l(L, { ref: d, lang: e.language || "en" }), A = t && r && c.current && C ? Ae(
951
+ }, [h]);
952
+ const x = /* @__PURE__ */ l(I, { ref: y, lang: e.language || "en" }), A = t && r && c.current && C ? Ae(
953
953
  // Keyed on the cache, not on `direction`: it must change in the same
954
954
  // render that adopts the new cache, or CssVarsProvider writes its CSS
955
955
  // variables into the outgoing cache and never repeats.
956
- /* @__PURE__ */ l(Te, { value: C, children: /* @__PURE__ */ l(Pe, { containerRef: d, children: /* @__PURE__ */ l(
956
+ /* @__PURE__ */ l(Te, { value: C, children: /* @__PURE__ */ l(Pe, { containerRef: y, children: /* @__PURE__ */ l(
957
957
  Se,
958
958
  {
959
959
  customTheme: e.themeOptions,
960
960
  mode: (P = e.themeOptions) == null ? void 0 : P.mode,
961
961
  shadowRootElement: c.current,
962
- direction: b,
962
+ direction: h,
963
963
  children: /* @__PURE__ */ l(
964
964
  we,
965
965
  {
@@ -967,7 +967,7 @@ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
967
967
  leadPhoneCountryCode: null,
968
968
  language: e.language,
969
969
  optionsLayout: null,
970
- direction: b,
970
+ direction: h,
971
971
  children: e.children
972
972
  }
973
973
  )