@opexa/portal-components 0.0.614 → 0.0.616

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 (224) hide show
  1. package/dist/components/Cashback/Cashback.client.d.ts +12 -1
  2. package/dist/components/Cashback/Cashback.client.js +23 -4
  3. package/dist/components/Jackpots/Jackpots.module.css +184 -184
  4. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  5. package/dist/components/KYC/KYCVerificationStatus.lazy.js +2 -2
  6. package/dist/components/Quests/WageringQuest.d.ts +3 -1
  7. package/dist/components/Quests/WageringQuest.js +64 -1
  8. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.js +3 -3
  9. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  10. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  11. package/dist/components/Tournaments/TournamentsList/TournamentsListItemDesktop.js +3 -3
  12. package/dist/components/Tournaments/TournamentsList/TournamentsListItemMobile.js +3 -3
  13. package/dist/handlers/index.d.ts +2 -2
  14. package/dist/services/queries.js +2758 -2758
  15. package/dist/styles/theme.css +762 -762
  16. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  17. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  18. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  19. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  20. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  21. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  22. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  23. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  24. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  25. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  26. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  27. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  28. package/dist/ui/Menu/Menu.d.ts +306 -306
  29. package/dist/ui/Menu/menu.recipe.d.ts +17 -17
  30. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  31. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  32. package/dist/ui/Progress/Progress.d.ts +27 -27
  33. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  34. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  35. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  36. package/dist/ui/Select/Select.d.ts +45 -45
  37. package/dist/ui/Select/select.recipe.d.ts +3 -3
  38. package/dist/ui/Table/Table.d.ts +21 -21
  39. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  40. package/dist/ui/Table/table.recipe.d.ts +3 -3
  41. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  42. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  43. package/dist/utils/mask.d.ts +19 -0
  44. package/dist/utils/mask.js +23 -0
  45. package/package.json +163 -163
  46. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  47. package/dist/components/DigitainLauncher/Loading.js +0 -5
  48. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  49. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  50. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  51. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  52. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  53. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  54. package/dist/components/FeatureFlag/index.d.ts +0 -1
  55. package/dist/components/FeatureFlag/index.js +0 -1
  56. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  57. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  58. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  59. package/dist/components/KYC/AutoOpen.js +0 -40
  60. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  61. package/dist/components/KYC/BasicInformation.js +0 -101
  62. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  63. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  64. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  65. package/dist/components/KYC/CaptureSelfie.js +0 -285
  66. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  67. package/dist/components/KYC/DisplayImage.js +0 -8
  68. package/dist/components/KYC/FileUpload.d.ts +0 -10
  69. package/dist/components/KYC/FileUpload.js +0 -72
  70. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  71. package/dist/components/KYC/IdentityVerification.js +0 -120
  72. package/dist/components/KYC/Indicator.d.ts +0 -1
  73. package/dist/components/KYC/Indicator.js +0 -8
  74. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  75. package/dist/components/KYC/KYC.lazy.js +0 -45
  76. package/dist/components/KYC/KYCContext.d.ts +0 -6
  77. package/dist/components/KYC/KYCContext.js +0 -2
  78. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  79. package/dist/components/KYC/NoCameraError.js +0 -6
  80. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  81. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  82. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  83. package/dist/components/KYC/PersonalInformation.js +0 -122
  84. package/dist/components/KYC/backup/Header.d.ts +0 -1
  85. package/dist/components/KYC/backup/Header.js +0 -8
  86. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  87. package/dist/components/KYC/backup/Indicator.js +0 -9
  88. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  89. package/dist/components/KYC/backup/KYC.js +0 -14
  90. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  91. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  92. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  93. package/dist/components/KYC/backup/KYCContext.js +0 -2
  94. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  95. package/dist/components/KYC/backup/Step1.js +0 -13
  96. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  97. package/dist/components/KYC/backup/Step2.js +0 -13
  98. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  99. package/dist/components/KYC/backup/Step3.js +0 -13
  100. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  101. package/dist/components/KYC/backup/Step4.js +0 -7
  102. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  103. package/dist/components/KYC/backup/useKYC.js +0 -8
  104. package/dist/components/KYC/loadModels.d.ts +0 -1
  105. package/dist/components/KYC/loadModels.js +0 -9
  106. package/dist/components/KYC/useKYC.d.ts +0 -25
  107. package/dist/components/KYC/useKYC.js +0 -38
  108. package/dist/components/KYC/utils.d.ts +0 -9
  109. package/dist/components/KYC/utils.js +0 -79
  110. package/dist/components/Messages/Message.d.ts +0 -1
  111. package/dist/components/Messages/Message.js +0 -35
  112. package/dist/components/Messages/MessageContext.d.ts +0 -6
  113. package/dist/components/Messages/MessageContext.js +0 -2
  114. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  115. package/dist/components/Messages/MessagePopup.js +0 -20
  116. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  117. package/dist/components/Messages/MessageTrigger.js +0 -19
  118. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  119. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  120. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  121. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  122. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  123. package/dist/components/Quests/CountdownTimer.js +0 -33
  124. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  125. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  126. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  127. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  128. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  129. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  130. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  131. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  132. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  133. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  134. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  135. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  136. package/dist/components/SessionWatcher/index.d.ts +0 -1
  137. package/dist/components/SessionWatcher/index.js +0 -1
  138. package/dist/components/SignIn/utils.d.ts +0 -8
  139. package/dist/components/SignIn/utils.js +0 -26
  140. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  141. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  142. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  143. package/dist/components/SignUp/SignUpContext.js +0 -2
  144. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  145. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  146. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  147. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  148. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  149. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  150. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  151. package/dist/components/SignUp/SignUpForm.js +0 -284
  152. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  153. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  154. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  155. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  156. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  157. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  158. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  159. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  160. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  161. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  162. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  163. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  164. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  165. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  166. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  167. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  168. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  169. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  170. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  171. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  172. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  173. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  174. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  175. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  176. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  177. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  178. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  179. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  180. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  181. package/dist/components/shared/IdDocumentField.client.js +0 -204
  182. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  183. package/dist/components/shared/IdDocumentField.js +0 -11
  184. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  185. package/dist/components/shared/SelfieField.client.js +0 -327
  186. package/dist/components/shared/SelfieField.d.ts +0 -2
  187. package/dist/components/shared/SelfieField.js +0 -11
  188. package/dist/constants/BranchCode.d.ts +0 -4
  189. package/dist/constants/BranchCode.js +0 -42
  190. package/dist/constants/Branches.d.ts +0 -2
  191. package/dist/constants/Branches.js +0 -42
  192. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  193. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  194. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  195. package/dist/handlers/postTransformSelfieImage.js +0 -71
  196. package/dist/handlers.d.ts +0 -43
  197. package/dist/handlers.js +0 -297
  198. package/dist/icons/BellRingIcon.d.ts +0 -2
  199. package/dist/icons/BellRingIcon.js +0 -4
  200. package/dist/images/responsible-gaming-yellow.png +0 -0
  201. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  202. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  203. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  204. package/dist/third-parties/FacebookPixel/api.js +0 -1
  205. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  206. package/dist/third-parties/FacebookPixel/index.js +0 -1
  207. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  208. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  209. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  210. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  211. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  212. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  213. package/dist/third-parties/index.d.ts +0 -2
  214. package/dist/third-parties/index.js +0 -2
  215. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  216. package/dist/utils/dataUrlToBlob.js +0 -11
  217. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  218. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  219. package/dist/utils/getGameName.d.ts +0 -1
  220. package/dist/utils/getGameName.js +0 -6
  221. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  222. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  223. package/dist/utils/resizeImageSize.d.ts +0 -2
  224. package/dist/utils/resizeImageSize.js +0 -11
@@ -1,7 +1,18 @@
1
+ export interface ClassNameEntries {
2
+ root?: string;
3
+ cashbackDescription?: string;
4
+ }
1
5
  export interface CashbackProps {
2
6
  id: string;
3
7
  /** @default '/promos' */
4
8
  viewAllPromosUrl?: string;
5
- className?: string;
9
+ className?: string | ClassNameEntries;
10
+ transformDescription?: {
11
+ replacements: {
12
+ pattern: string;
13
+ replace: string;
14
+ flags?: string;
15
+ }[];
16
+ };
6
17
  }
7
18
  export declare function Cashback__client(props: CashbackProps): import("react/jsx-runtime").JSX.Element | null;
@@ -2,8 +2,10 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { tz } from '@date-fns/tz';
4
4
  import { format } from 'date-fns';
5
+ import { isString } from 'lodash-es';
5
6
  import Image from 'next/image';
6
7
  import Link from 'next/link';
8
+ import { twMerge } from 'tailwind-merge';
7
9
  import { useShallow } from 'zustand/shallow';
8
10
  import { useAvailablePromosQuery } from '../../client/hooks/useAvailablePromosQuery.js';
9
11
  import { useCashbackQuery } from '../../client/hooks/useCashbackQuery.js';
@@ -24,12 +26,29 @@ export function Cashback__client(props) {
24
26
  })));
25
27
  if (!cashback)
26
28
  return null;
27
- return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "flex w-fit items-center gap-lg font-semibold text-button-tertiary-fg text-lg", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), cashback.banner?.url && (_jsx(Image, { src: cashback.banner.url, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" })), claimable && (_jsx(Button, { className: "mt-xl lg:mt-6", onClick: () => {
29
+ const classNames = isString(props.className)
30
+ ? { root: props.className }
31
+ : (props.className ?? {});
32
+ const descriptionHtml = (() => {
33
+ let html = cashback.description ?? '';
34
+ const cfg = props.transformDescription;
35
+ if (cfg?.replacements?.length) {
36
+ for (const r of cfg.replacements) {
37
+ try {
38
+ const re = new RegExp(r.pattern, r.flags ?? 'g');
39
+ html = html.replace(re, r.replace);
40
+ }
41
+ catch {
42
+ // ignore invalid regex
43
+ }
44
+ }
45
+ }
46
+ return html;
47
+ })();
48
+ return (_jsxs("div", { className: classNames.root, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "flex w-fit items-center gap-lg font-semibold text-button-tertiary-fg text-lg", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), cashback.banner?.url && (_jsx(Image, { src: cashback.banner.url, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" })), claimable && (_jsx(Button, { className: "mt-xl lg:mt-6", onClick: () => {
28
49
  globalStore.depositWithdrawal.setOpen(true);
29
50
  globalStore.depositWithdrawal.setPromo(cashback.id);
30
51
  }, children: "Deposit Now" })), _jsx("h1", { className: "mt-xl font-semibold text-2xl lg:mt-6 lg:text-3xl", children: cashback.name }), _jsxs("p", { className: "mt-xl text-text-secondary-700 lg:mt-6", children: ["Ends", ' ', format(cashback.activationEndDateTime, 'MM/dd/yyy hh:mm:ss a', {
31
52
  in: tz(localeInfo.timezone),
32
- })] }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
33
- __html: cashback.description,
34
- } })] }));
53
+ })] }), _jsx(Prose, { className: twMerge('mt-2xl lg:mt-6', classNames.cashbackDescription), dangerouslySetInnerHTML: { __html: descriptionHtml } })] }));
35
54
  }
@@ -1,184 +1,184 @@
1
- @keyframes arrow-green-flash {
2
- 0% {
3
- color: #abefc6;
4
- }
5
- 100% {
6
- color: #079455;
7
- }
8
- }
9
-
10
- .animate-arrow-green-flash-1 {
11
- animation: arrow-green-flash 0.4s infinite;
12
- animation-delay: -0.2s;
13
- }
14
-
15
- .animate-arrow-green-flash-2 {
16
- animation: arrow-green-flash 0.4s infinite;
17
- animation-delay: -0.1s;
18
- }
19
-
20
- .animate-arrow-green-flash-3 {
21
- animation: arrow-green-flash 0.4s infinite;
22
- }
23
-
24
- @keyframes arrow-red-flash {
25
- 0%,
26
- 100% {
27
- color: #f97066;
28
- }
29
- 50% {
30
- color: #fecdca;
31
- }
32
- }
33
-
34
- .animate-arrow-red-flash-1 {
35
- animation: arrow-red-flash 0.4s infinite;
36
- }
37
-
38
- .animate-arrow-red-flash-2 {
39
- animation: arrow-red-flash 0.4s infinite;
40
- animation-delay: -0.1s;
41
- }
42
-
43
- .animate-arrow-red-flash-3 {
44
- animation: arrow-red-flash 0.4s infinite;
45
- animation-delay: -0.2s;
46
- }
47
-
48
- /* Animated BG */
49
- @keyframes rotate {
50
- to {
51
- transform: rotate(1turn);
52
- }
53
- }
54
-
55
- .light-rays {
56
- position: absolute;
57
- top: 0;
58
- left: 0;
59
- right: 0;
60
- bottom: 0;
61
- overflow: hidden;
62
-
63
- --first: var(--color-jackpot-rays-primary);
64
- --second: var(--color-jackpot-rays-secondary);
65
- }
66
-
67
- .light-rays::before,
68
- .light-rays::after {
69
- content: '';
70
- position: absolute;
71
- top: var(--light-rays-top, 150px);
72
- left: calc(50% - 90px);
73
- margin: -100vmax;
74
- width: 200vmax;
75
- height: 200vmax;
76
- opacity: 0.6;
77
- transform-origin: center;
78
- }
79
-
80
- .light-rays::before {
81
- background: conic-gradient(
82
- var(--first) 0deg 7.2deg,
83
- var(--second) 7.2deg 14.4deg,
84
- var(--first) 14.4deg 21.6deg,
85
- var(--second) 21.6deg 28.8deg,
86
- var(--first) 28.8deg 36deg,
87
- var(--second) 36deg 43.2deg,
88
- var(--first) 43.2deg 50.4deg,
89
- var(--second) 50.4deg 57.6deg,
90
- var(--first) 57.6deg 64.8deg,
91
- var(--second) 64.8deg 72deg,
92
- var(--first) 72deg 79.2deg,
93
- var(--second) 79.2deg 86.4deg,
94
- var(--first) 86.4deg 93.6deg,
95
- var(--second) 93.6deg 100.8deg,
96
- var(--first) 100.8deg 108deg,
97
- var(--second) 108deg 115.2deg,
98
- var(--first) 115.2deg 122.4deg,
99
- var(--second) 122.4deg 129.6deg,
100
- var(--first) 129.6deg 136.8deg,
101
- var(--second) 136.8deg 144deg,
102
- var(--first) 144deg 151.2deg,
103
- var(--second) 151.2deg 158.4deg,
104
- var(--first) 158.4deg 165.6deg,
105
- var(--second) 165.6deg 172.8deg,
106
- var(--first) 172.8deg 180deg,
107
- var(--second) 180deg 187.2deg,
108
- var(--first) 187.2deg 194.4deg,
109
- var(--second) 194.4deg 201.6deg,
110
- var(--first) 201.6deg 208.8deg,
111
- var(--second) 208.8deg 216deg,
112
- var(--first) 216deg 223.2deg,
113
- var(--second) 223.2deg 230.4deg,
114
- var(--first) 230.4deg 237.6deg,
115
- var(--second) 237.6deg 244.8deg,
116
- var(--first) 244.8deg 252deg,
117
- var(--second) 252deg 259.2deg,
118
- var(--first) 259.2deg 266.4deg,
119
- var(--second) 266.4deg 273.6deg,
120
- var(--first) 273.6deg 280.8deg,
121
- var(--second) 280.8deg 288deg,
122
- var(--first) 288deg 295.2deg,
123
- var(--second) 295.2deg 302.4deg,
124
- var(--first) 302.4deg 309.6deg,
125
- var(--second) 309.6deg 316.8deg,
126
- var(--first) 316.8deg 324deg,
127
- var(--second) 324deg 331.2deg,
128
- var(--first) 331.2deg 338.4deg,
129
- var(--second) 338.4deg 345.6deg,
130
- var(--first) 345.6deg 352.8deg,
131
- var(--second) 352.8deg 360deg
132
- );
133
- animation: rotate 20s linear infinite;
134
- }
135
-
136
- @media (max-width: 1024px) {
137
- .light-rays::before,
138
- .light-rays::after {
139
- left: auto;
140
- right: 11%;
141
- }
142
- }
143
-
144
- /* ScrollArea.module.css */
145
- .scrollArea {
146
- overflow-y: scroll;
147
- padding-right: 4px;
148
- }
149
-
150
- /* WebKit-based browsers */
151
- .scrollArea::-webkit-scrollbar {
152
- width: 8px;
153
- }
154
-
155
- .scrollArea::-webkit-scrollbar-track {
156
- background: var(--color-jackpot-table-scrollbar-track);
157
- border-radius: 9999px;
158
- }
159
-
160
- .scrollArea::-webkit-scrollbar-thumb {
161
- background-color: var(--color-jackpot-table-scrollbar-thumb);
162
- border-radius: 9999px;
163
- }
164
-
165
- @keyframes waveColor {
166
- 0%,
167
- 2.5% {
168
- color: var(--wave-highlight-color);
169
- }
170
- 2.51%,
171
- 100% {
172
- color: var(--color-brand-300);
173
- }
174
- }
175
-
176
- .animate-wave-color-success {
177
- --wave-highlight-color: var(--color-success-800);
178
- animation: waveColor 4s ease-in-out infinite;
179
- }
180
-
181
- .animate-wave-color-error {
182
- --wave-highlight-color: var(--color-error-600);
183
- animation: waveColor 4s ease-in-out infinite;
184
- }
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-jackpot-rays-primary);
64
+ --second: var(--color-jackpot-rays-secondary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-jackpot-table-scrollbar-track);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-jackpot-table-scrollbar-thumb);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -20,8 +20,8 @@ export function KYCVerificationStatus() {
20
20
  return (_jsx(Dialog.Root, { open: globalStore.kycVerificationStatus.open, onOpenChange: (details) => {
21
21
  globalStore.kycVerificationStatus.setOpen(details.open);
22
22
  }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED' && 'Verification Required'] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
23
- `Your account verification is still under review. Please wait
24
- until it's approved before you can continue playing or
23
+ `Your account verification is still under review. Please wait
24
+ until it's approved before you can continue playing or
25
25
  depositing.`, status === 'REJECTED' &&
26
26
  'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED' &&
27
27
  'Your account is not yet verified. Please complete the verification process to continue playing or depositing.'] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
@@ -20,8 +20,8 @@ export function KYCVerificationStatus() {
20
20
  return (_jsx(Dialog.Root, { open: globalStore.kycVerificationStatus.open, onOpenChange: (details) => {
21
21
  globalStore.kycVerificationStatus.setOpen(details.open);
22
22
  }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED' && 'Verification Required'] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
23
- `Your account verification is still under review. Please wait
24
- until it's approved before you can continue playing or
23
+ `Your account verification is still under review. Please wait
24
+ until it's approved before you can continue playing or
25
25
  depositing.`, status === 'REJECTED' &&
26
26
  'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED' &&
27
27
  'Your account is not yet verified. Please complete the verification process to continue playing or depositing.'] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
@@ -1,4 +1,5 @@
1
- import type { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
+ import type { GameProvidersCarouselProps } from '../GameProviders/GameProvidersCarousel';
2
3
  export interface ClassNameEntries {
3
4
  root?: string;
4
5
  progressBarContainer?: string;
@@ -12,3 +13,4 @@ export declare function WageringQuest(props: {
12
13
  customComplete?: ReactNode;
13
14
  showTurnoverDecimals?: boolean;
14
15
  }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function GameProvidersCarousel(props: GameProvidersCarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,26 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import useEmblaCarousel, {} from 'embla-carousel-react';
3
4
  import { isString } from 'lodash-es';
5
+ import Image from 'next/image';
6
+ import Link from 'next/link';
7
+ import { useCallback, useEffect, useState } from 'react';
4
8
  import { twMerge } from 'tailwind-merge';
5
9
  import { useControllableState } from '../../client/hooks/useControllableState.js';
6
10
  import { useDisclosure } from '../../client/hooks/useDisclosure.js';
11
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
7
12
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
8
13
  import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
14
+ import { GAME_PROVIDER_DATA } from '../../constants/index.js';
15
+ import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
16
+ import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
9
17
  import { InfoCircleIcon } from '../../icons/InfoCircleIcon.js';
10
18
  import { XIcon } from '../../icons/XIcon.js';
11
19
  import { Button } from '../../ui/Button/index.js';
12
20
  import { Dialog } from '../../ui/Dialog/index.js';
13
21
  import { Portal } from '../../ui/Portal/index.js';
14
22
  import { Prose } from '../../ui/Prose/index.js';
23
+ import { callIfFn } from '../../utils/callIfFn.js';
15
24
  import { parseDecimal } from '../../utils/parseDecimal.js';
16
25
  import { useQuestContext } from './QuestsContext.js';
17
26
  import { RemainingTime } from './RemainingTime.js';
@@ -38,10 +47,64 @@ export function WageringQuest(props) {
38
47
  }
39
48
  function Rules(props) {
40
49
  const quest = useQuestContext();
50
+ const featureFlag = useFeatureFlag();
41
51
  const [open, setOpen] = useControllableState({
42
52
  value: props.open,
43
53
  defaultValue: props.defaultOpen ?? false,
44
54
  onChange: props.onOpenChange,
45
55
  });
46
- return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), _jsx("div", { className: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
56
+ return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), featureFlag.enabled && (_jsx(GameProvidersCarousel, { layout: "carousel", gameProviders: [
57
+ 'JILI',
58
+ 'PRAGMATICPLAY',
59
+ 'HOLLYWOODTV',
60
+ 'ALIZE',
61
+ 'BTI',
62
+ 'CQ9',
63
+ 'DARWIN',
64
+ 'DG',
65
+ 'EVOLUTION_NETENT',
66
+ 'EVOLUTION_REDTIGER',
67
+ 'EZUGI',
68
+ ] })), _jsx("div", { className: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
69
+ }
70
+ export function GameProvidersCarousel(props) {
71
+ const [emblaRef, emblaApi] = useEmblaCarousel({
72
+ align: 'start',
73
+ slidesToScroll: 3,
74
+ breakpoints: {
75
+ '(min-width: 1024px)': {
76
+ align: 'start',
77
+ slidesToScroll: 6,
78
+ },
79
+ },
80
+ });
81
+ const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
82
+ const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
83
+ const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
84
+ const onNextButtonClick = useCallback(async () => {
85
+ emblaApi?.scrollNext();
86
+ }, [emblaApi]);
87
+ const onSelect = useCallback((emblaApi) => {
88
+ setPrevBtnDisabled(!emblaApi?.canScrollPrev());
89
+ setNextBtnDisabled(!emblaApi?.canScrollNext());
90
+ }, []);
91
+ useEffect(() => {
92
+ if (!emblaApi)
93
+ return;
94
+ onSelect(emblaApi);
95
+ emblaApi.on('reInit', onSelect).on('select', onSelect);
96
+ }, [emblaApi, onSelect]);
97
+ const viewGamesUrl = (data) => {
98
+ return props.viewGamesUrl
99
+ ? callIfFn(props.viewGamesUrl, data)
100
+ .replace(':id', data?.id)
101
+ .replace(':slug', data?.slug)
102
+ : `/providers/${data.slug}`;
103
+ };
104
+ const { enabled } = useFeatureFlag();
105
+ const combinedProviders = enabled
106
+ ? [...props.gameProviders, ...(props.futureGameProviders ?? [])]
107
+ : props.gameProviders;
108
+ const gameProviders = combinedProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
109
+ return (_jsxs("div", { className: "mt-6", children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsx("div", { className: "grow" }), _jsx("div", { className: "flex items-center justify-center gap-xl", children: _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] }) })] }), _jsx("div", { ref: emblaRef, className: "relative mt-lg overflow-hidden", children: _jsx("div", { className: "grid grid-flow-col grid-rows-1 gap-md", children: gameProviders.map((provider) => (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-[3.5rem] w-[110px] items-center overflow-hidden rounded-md bg-brand-800'), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full') }) }, provider.id))) }) })] }));
47
110
  }
@@ -16,7 +16,7 @@ import trophy from '../../../images/trophy.png';
16
16
  import trophyTwo from '../../../images/trophy-two.png';
17
17
  import { formatNumber } from '../../../utils/formatNumber.js';
18
18
  import { isStyleEntries } from '../../../utils/isStyleEntries.js';
19
- import { mask } from '../../../utils/mask.js';
19
+ import { maskFirstLast } from '../../../utils/mask.js';
20
20
  import { useTournamentsCarouselItemContext } from './TournamentsCarouselContext.js';
21
21
  import css from './TournamentsCarouselItem.module.css';
22
22
  export function TournamentsCarouselItem({ style, className, viewAllUrl, }) {
@@ -87,14 +87,14 @@ export function TournamentsCarouselItem({ style, className, viewAllUrl, }) {
87
87
  currency: localeInfo.currency.code,
88
88
  minDecimalPlaces: 2,
89
89
  maxDecimalPlaces: 2,
90
- }) }), _jsx("div", { className: "mt-4 block text-left text-base text-text-primary-900 lg:hidden", children: "Play and Win!" })] }), _jsx("div", { className: "flex items-end lg:hidden", children: _jsx(Image, { src: trophy, alt: "trophy", width: 155, height: 155, className: "h-23 w-auto" }) })] })] }), _jsx("div", { className: "-bottom-16 absolute right-0 z-1 hidden lg:block", children: _jsx(Image, { width: 155, height: 155, src: trophy, alt: "trophy", className: "px-6 py-2.5" }) })] }), tournament.topPayouts.length ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsx("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: mask(tournament?.topPayouts[0]?.member?.name || '') }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(tournament?.topPayouts[0]?.amount, {
90
+ }) }), _jsx("div", { className: "mt-4 block text-left text-base text-text-primary-900 lg:hidden", children: "Play and Win!" })] }), _jsx("div", { className: "flex items-end lg:hidden", children: _jsx(Image, { src: trophy, alt: "trophy", width: 155, height: 155, className: "h-23 w-auto" }) })] })] }), _jsx("div", { className: "-bottom-16 absolute right-0 z-1 hidden lg:block", children: _jsx(Image, { width: 155, height: 155, src: trophy, alt: "trophy", className: "px-6 py-2.5" }) })] }), tournament.topPayouts.length ? (_jsx("div", { children: _jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [_jsxs("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: [_jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }), _jsx("div", { className: "absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 font-bold text-brand-950 text-xs", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: maskFirstLast(tournament?.topPayouts[0]?.member?.name || '') }), _jsx("div", { className: "text-2xl text-brand-400", children: formatNumber(tournament?.topPayouts[0]?.amount, {
91
91
  currency: localeInfo.currency.code,
92
92
  minDecimalPlaces: 2,
93
93
  maxDecimalPlaces: 2,
94
94
  }) })] })] }) })) : (_jsxs("div", { className: "relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[4.125rem] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs", children: [_jsx(Trophy01Icon, { className: "size-3.5 text-utility-brand-600" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] }))] }) }) }) }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Image, { width: 24, height: 24, src: trophyTwo, alt: "leaderboardIcon", className: "size-full w-6" }), _jsx("div", { className: "font-semibold text-lg text-text-primary-900", children: tournament.currentLeaderboard.edges.length
95
95
  ? 'Leaderboard'
96
96
  : 'Starting soon!' })] }), _jsxs(Link, { className: "flex font-semibold text-button-tertiary-fg text-sm", href: viewAllUrl ?? '/tournaments', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[17rem] overflow-y-scroll', css.scrollArea), children: _jsx("div", { className: "overflow-hidden rounded-xl border-gray-200", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "h-8 bg-bg-secondary font-medium text-text-tertiary-600 text-xs", children: [_jsx("th", { className: "w-[3.25rem]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: tournament.currentLeaderboard.edges.length
97
- ? tournament.currentLeaderboard.edges.map((tournament, i) => (_jsxs("tr", { className: "bg-bg-primary text-sm text-text-secondary-700", children: [_jsx("td", { className: "h-12 w-[3.25rem] border-border-secondary border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center font-bold text-2xs', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "h-12 border-border-secondary border-t-2", children: mask(tournament.node.username) }), _jsxs("td", { className: "h-12 border-border-secondary border-t-2", children: [tournament.node.multiplier, "x"] }), i + 1 <= prizeAmountsByRank.length ? (_jsx("td", { className: "h-12 border-border-secondary border-t-2 text-brand-400", children: formatNumber(prizeAmountsByRank[i], {
97
+ ? tournament.currentLeaderboard.edges.map((tournament, i) => (_jsxs("tr", { className: "bg-bg-primary text-sm text-text-secondary-700", children: [_jsx("td", { className: "h-12 w-[3.25rem] border-border-secondary border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center font-bold text-2xs', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "h-12 border-border-secondary border-t-2", children: maskFirstLast(tournament.node.username) }), _jsxs("td", { className: "h-12 border-border-secondary border-t-2", children: [tournament.node.multiplier, "x"] }), i + 1 <= prizeAmountsByRank.length ? (_jsx("td", { className: "h-12 border-border-secondary border-t-2 text-brand-400", children: formatNumber(prizeAmountsByRank[i], {
98
98
  currency: localeInfo.currency.code,
99
99
  minDecimalPlaces: 2,
100
100
  maxDecimalPlaces: 2,