@opexa/portal-components 0.0.746 → 0.0.748

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 (186) hide show
  1. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  2. package/dist/components/DigitainLauncher/Loading.js +5 -0
  3. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
  4. package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
  5. package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
  6. package/dist/components/Disclaimer/TermsOfUse.js +13 -0
  7. package/dist/components/FeatureFlag/FeatureFlag.d.ts +1 -0
  8. package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
  9. package/dist/components/FeatureFlag/index.d.ts +1 -0
  10. package/dist/components/FeatureFlag/index.js +1 -0
  11. package/dist/components/Jackpots/Jackpots.module.css +219 -219
  12. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  13. package/dist/components/Jackpots/JackpotsCarouselNext/JackpotsCarouselStageItem.js +4 -19
  14. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  15. package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageDesktop.js +5 -5
  16. package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageMobile.js +5 -11
  17. package/dist/components/KYC/AutoOpen.d.ts +1 -0
  18. package/dist/components/KYC/AutoOpen.js +40 -0
  19. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  20. package/dist/components/KYC/BasicInformation.js +101 -0
  21. package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
  22. package/dist/components/KYC/CaptureIdDocument.js +219 -0
  23. package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
  24. package/dist/components/KYC/CaptureSelfie.js +285 -0
  25. package/dist/components/KYC/DisplayImage.d.ts +5 -0
  26. package/dist/components/KYC/DisplayImage.js +8 -0
  27. package/dist/components/KYC/FileUpload.d.ts +10 -0
  28. package/dist/components/KYC/FileUpload.js +72 -0
  29. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  30. package/dist/components/KYC/IdentityVerification.js +120 -0
  31. package/dist/components/KYC/Indicator.d.ts +1 -0
  32. package/dist/components/KYC/Indicator.js +8 -0
  33. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  34. package/dist/components/KYC/KYC.lazy.js +45 -0
  35. package/dist/components/KYC/KYCContext.d.ts +6 -0
  36. package/dist/components/KYC/KYCContext.js +2 -0
  37. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  38. package/dist/components/KYC/KYCVerificationStatus.lazy.js +13 -7
  39. package/dist/components/KYC/KycOpenOnHomeMount.js +5 -5
  40. package/dist/components/KYC/NoCameraError.d.ts +7 -0
  41. package/dist/components/KYC/NoCameraError.js +6 -0
  42. package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
  43. package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
  44. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  45. package/dist/components/KYC/PersonalInformation.js +122 -0
  46. package/dist/components/KYC/backup/Header.d.ts +1 -0
  47. package/dist/components/KYC/backup/Header.js +8 -0
  48. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  49. package/dist/components/KYC/backup/Indicator.js +9 -0
  50. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  51. package/dist/components/KYC/backup/KYC.js +14 -0
  52. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  53. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  54. package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
  55. package/dist/components/KYC/backup/KYCContext.js +2 -0
  56. package/dist/components/KYC/backup/Step1.d.ts +1 -0
  57. package/dist/components/KYC/backup/Step1.js +13 -0
  58. package/dist/components/KYC/backup/Step2.d.ts +1 -0
  59. package/dist/components/KYC/backup/Step2.js +13 -0
  60. package/dist/components/KYC/backup/Step3.d.ts +1 -0
  61. package/dist/components/KYC/backup/Step3.js +13 -0
  62. package/dist/components/KYC/backup/Step4.d.ts +1 -0
  63. package/dist/components/KYC/backup/Step4.js +7 -0
  64. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  65. package/dist/components/KYC/backup/useKYC.js +8 -0
  66. package/dist/components/KYC/loadModels.d.ts +1 -0
  67. package/dist/components/KYC/loadModels.js +9 -0
  68. package/dist/components/KYC/useKYC.d.ts +25 -0
  69. package/dist/components/KYC/useKYC.js +38 -0
  70. package/dist/components/KYC/utils.d.ts +9 -0
  71. package/dist/components/KYC/utils.js +79 -0
  72. package/dist/components/Messages/Message.d.ts +1 -0
  73. package/dist/components/Messages/Message.js +35 -0
  74. package/dist/components/Messages/MessageContext.d.ts +6 -0
  75. package/dist/components/Messages/MessageContext.js +2 -0
  76. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  77. package/dist/components/Messages/MessagePopup.js +20 -0
  78. package/dist/components/Messages/MessageTrigger.d.ts +8 -0
  79. package/dist/components/Messages/MessageTrigger.js +19 -0
  80. package/dist/components/Messages/MessagesPopup.js +1 -1
  81. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  82. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  83. package/dist/components/Quests/CountdownTimer.d.ts +15 -0
  84. package/dist/components/Quests/CountdownTimer.js +33 -0
  85. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
  86. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
  87. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  88. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
  89. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
  90. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
  91. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
  92. package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
  93. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  94. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
  95. package/dist/components/SignIn/utils.d.ts +8 -0
  96. package/dist/components/SignIn/utils.js +26 -0
  97. package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
  98. package/dist/components/SignUp/SignUp.lazy.js +18 -0
  99. package/dist/components/SignUp/SignUpContext.d.ts +6 -0
  100. package/dist/components/SignUp/SignUpContext.js +2 -0
  101. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
  102. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
  103. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
  104. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
  105. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
  106. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
  107. package/dist/components/SignUp/SignUpForm.d.ts +1 -0
  108. package/dist/components/SignUp/SignUpForm.js +284 -0
  109. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
  110. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
  111. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
  112. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
  113. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
  114. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
  115. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
  116. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
  117. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
  118. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
  119. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
  120. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
  121. package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
  122. package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
  123. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
  124. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
  125. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
  126. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
  127. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
  128. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
  129. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
  130. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
  131. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
  132. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
  133. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
  134. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
  135. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
  136. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
  137. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  138. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  139. package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
  140. package/dist/components/shared/IdDocumentField.client.js +204 -0
  141. package/dist/components/shared/IdDocumentField.d.ts +2 -0
  142. package/dist/components/shared/IdDocumentField.js +11 -0
  143. package/dist/components/shared/SelfieField.client.d.ts +20 -0
  144. package/dist/components/shared/SelfieField.client.js +327 -0
  145. package/dist/components/shared/SelfieField.d.ts +2 -0
  146. package/dist/components/shared/SelfieField.js +11 -0
  147. package/dist/constants/BranchCode.d.ts +4 -0
  148. package/dist/constants/BranchCode.js +42 -0
  149. package/dist/constants/Branches.d.ts +2 -0
  150. package/dist/constants/Branches.js +42 -0
  151. package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
  152. package/dist/handlers/postTransformIdFrontImage.js +67 -0
  153. package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
  154. package/dist/handlers/postTransformSelfieImage.js +71 -0
  155. package/dist/handlers.d.ts +43 -0
  156. package/dist/handlers.js +297 -0
  157. package/dist/icons/BellRingIcon.d.ts +2 -0
  158. package/dist/icons/BellRingIcon.js +4 -0
  159. package/dist/images/responsible-gaming-yellow.png +0 -0
  160. package/dist/services/queries.js +3072 -3072
  161. package/dist/styles/theme.css +773 -773
  162. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  163. package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
  164. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  165. package/dist/third-parties/FacebookPixel/api.js +1 -0
  166. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  167. package/dist/third-parties/FacebookPixel/index.js +1 -0
  168. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  169. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
  170. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  171. package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
  172. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  173. package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
  174. package/dist/third-parties/index.d.ts +2 -0
  175. package/dist/third-parties/index.js +2 -0
  176. package/dist/utils/dataUrlToBlob.d.ts +1 -0
  177. package/dist/utils/dataUrlToBlob.js +11 -0
  178. package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
  179. package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
  180. package/dist/utils/getGameName.d.ts +1 -0
  181. package/dist/utils/getGameName.js +6 -0
  182. package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
  183. package/dist/utils/isBetween3amAnd3pm.js +5 -0
  184. package/dist/utils/resizeImageSize.d.ts +2 -0
  185. package/dist/utils/resizeImageSize.js +11 -0
  186. package/package.json +176 -176
@@ -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-bg-tertiary);
64
- --second: var(--color-bg-quaternary);
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-bg-primary-alt);
157
- border-radius: 9999px;
158
- }
159
-
160
- .scrollArea::-webkit-scrollbar-thumb {
161
- background-color: var(--color-bg-quaternary);
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-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
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-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
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
+ }
@@ -22,7 +22,7 @@ import { JackpotsListItemRules } from './JackpotsListItemRules.js';
22
22
  import { useJackpotsListItemData } from './useJackpotsListItemData.js';
23
23
  export function JackpotMultiStageDesktop({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', customJackpotStageChest, className, ...props }) {
24
24
  const jackpot = useJackpotsListItemContext();
25
- const { rootRef, topJackpotPayout, filteredGameProviders, localeInfo, isPayingOut, jackpotAmount, arrowImages, } = useJackpotsListItemData();
25
+ const { rootRef, filteredGameProviders, localeInfo, isPayingOut, arrowImages, } = useJackpotsListItemData();
26
26
  const getChestImages = (stage) => {
27
27
  if (stage === 1) {
28
28
  return {
@@ -56,7 +56,7 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
56
56
  : parsed;
57
57
  const overallPercentage = parseInt(jackpot.overallProgressPercentage ?? '0');
58
58
  const isCompleted = overallPercentage >= 100;
59
- const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_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: twMerge('absolute right-0 bottom-safe-area-inset-bottom 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', className?.latestPayoutRankRoot), children: "1st" })] })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" }), _jsx("div", { className: twMerge('-right-0 absolute bottom-safe-area-inset-bottom z-20 flex h-7 w-7 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 text-center font-bold text-brand-950 text-xs', className?.latestPayoutRankRoot), children: "1st" })] }));
59
+ const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_jsx("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" }) })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" })] }));
60
60
  const PayoutBadge = () => (_jsxs("div", { className: twMerge('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', className?.latestPayoutBadgeRoot), children: [_jsx(Trophy01Icon, { className: twMerge('size-3.5 text-utility-brand-600', className?.latestPayoutBadgeIcon) }), "Winner"] }));
61
61
  const ProgressBar = () => (_jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "font-semibold text-sm text-text-primary-900", children: ["Stage ", jackpot.stage, " Progress"] }), isCompleted ? 100 : currStageProgressPercentage, "%"] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary lg:h-4", max: 100, value: isCompleted ? 100 : currStageProgressPercentage, children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarTrack), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) })] }));
62
62
  const OverallProgressBar = () => {
@@ -84,7 +84,7 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
84
84
  return null;
85
85
  }
86
86
  return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-tertiary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5', window.location.href.includes('blucky') &&
87
- styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-semibold text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpotAmount, {
87
+ styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-semibold text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
88
88
  currency: localeInfo.currency.code,
89
89
  minDecimalPlaces: 2,
90
90
  maxDecimalPlaces: 2,
@@ -92,10 +92,10 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
92
92
  currency: localeInfo.currency.code,
93
93
  minDecimalPlaces: 2,
94
94
  maxDecimalPlaces: 2,
95
- })] })] })] }), _jsx("div", { className: "min-w-30" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children: topJackpotPayout?.amount ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(topJackpotPayout.member.name, {
95
+ })] })] })] }), _jsx("div", { className: "min-w-30" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children: jackpot.stages?.[jackpot.stage - 1]?.member?.name ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(jackpot.stages?.[jackpot.stage - 1]?.member?.name, {
96
96
  firstCharsCount: 3,
97
97
  midLength: 3,
98
- }) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(topJackpotPayout.amount, {
98
+ }) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
99
99
  currency: localeInfo.currency.code,
100
100
  minDecimalPlaces: 2,
101
101
  maxDecimalPlaces: 2,
@@ -18,20 +18,14 @@ import leaderboard from '../../../images/leaderboard.png';
18
18
  import { Button } from '../../../ui/Button/index.js';
19
19
  import { formatNumber } from '../../../utils/formatNumber.js';
20
20
  import { maskFirstLast } from '../../../utils/mask.js';
21
- import { parseDecimal } from '../../../utils/parseDecimal.js';
22
21
  import styles from '../Jackpots.module.css';
23
22
  import { useJackpotsListItemContext } from './JackpotsListContext.js';
24
23
  import { JackpotsListItemGameProviders } from './JackpotsListItemGameProviders.js';
25
24
  import { JackpotsListItemRules } from './JackpotsListItemRules.js';
26
25
  import { useJackpotsListItemData } from './useJackpotsListItemData.js';
27
- function getPercentage(value, total) {
28
- const v = parseDecimal(value, 0);
29
- const t = parseDecimal(total, 0);
30
- return t === 0 ? 0 : (v / t) * 100;
31
- }
32
26
  export function JackpotMultiStageMobile({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', customJackpotStageChest, chestImagesByTier, className, ...props }) {
33
27
  const jackpot = useJackpotsListItemContext();
34
- const { rootRef, topJackpotPayout, filteredGameProviders, localeInfo, isPayingOut, jackpotAmount, arrowImages, } = useJackpotsListItemData();
28
+ const { rootRef, filteredGameProviders, localeInfo, isPayingOut, arrowImages, } = useJackpotsListItemData();
35
29
  const getChestImages = (stage) => {
36
30
  if (stage === 1) {
37
31
  return {
@@ -80,7 +74,7 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
80
74
  : parsed;
81
75
  const overallPercentage = parseInt(jackpot.overallProgressPercentage ?? '0');
82
76
  const isCompleted = overallPercentage >= 100;
83
- const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_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: twMerge('absolute right-0 bottom-safe-area-inset-bottom 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', className?.latestPayoutRankRoot), children: "1st" })] })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" }), _jsx("div", { className: twMerge('-right-0 absolute bottom-safe-area-inset-bottom z-20 flex h-7 w-7 items-center justify-center rounded-full border-[1.5px] border-bg-primary bg-yellow-400 text-center font-bold text-brand-950 text-xs', className?.latestPayoutRankRoot), children: "1st" })] }));
77
+ const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_jsx("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" }) })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" })] }));
84
78
  const PayoutBadge = () => (_jsxs("div", { className: twMerge('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', className?.latestPayoutBadgeRoot), children: [_jsx(Trophy01Icon, { className: twMerge('size-3.5 text-utility-brand-600', className?.latestPayoutBadgeIcon) }), "Winner"] }));
85
79
  const ProgressBar = () => (_jsxs("div", { className: "flex w-full flex-col items-center justify-between", children: [_jsxs("div", { className: "mb-[5px] flex w-full items-center justify-between", children: [_jsxs("div", { className: "font-semibold text-text-primary-900 text-xs", children: ["Stage ", jackpot.stage] }), isCompleted ? 100 : currStageProgressPercentage, "%"] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary", max: 100, value: isCompleted ? 100 : currStageProgressPercentage, "aria-valuemax": 100, "aria-label": "Stage progress", children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarTrack), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) })] }));
86
80
  const OverallProgressBar = () => {
@@ -108,7 +102,7 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
108
102
  return null;
109
103
  }
110
104
  return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-primary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl bg-bg-tertiary p-3 text-center lg:gap-4 lg:p-5', window.location.href.includes('blucky') &&
111
- styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsx("div", { className: "flex w-full flex-col", children: _jsxs("div", { className: "relative flex w-full items-center justify-between", children: [_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpotAmount, {
105
+ styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsx("div", { className: "flex w-full flex-col", children: _jsxs("div", { className: "relative flex w-full items-center justify-between", children: [_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
112
106
  currency: localeInfo.currency.code,
113
107
  minDecimalPlaces: 2,
114
108
  maxDecimalPlaces: 2,
@@ -116,9 +110,9 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
116
110
  currency: localeInfo.currency.code,
117
111
  minDecimalPlaces: 2,
118
112
  maxDecimalPlaces: 2,
119
- })] })] }), _jsx(ProgressBar, {})] }), chestImages?.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 100, height: 100, src: chestImages?.image, alt: "chest", className: twMerge('size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }) }) }) }), _jsx("div", { className: twMerge('relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4', className?.latestPayoutRoot), children: topJackpotPayout?.amount ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(topJackpotPayout.member.name, {
113
+ })] })] }), _jsx(ProgressBar, {})] }), chestImages?.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 100, height: 100, src: chestImages?.image, alt: "chest", className: twMerge('size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }) }) }) }), _jsx("div", { className: twMerge('relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4', className?.latestPayoutRoot), children: jackpot.stages?.[jackpot.stage - 1]?.member?.name ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(jackpot.stages?.[jackpot.stage - 1]?.member?.name, {
120
114
  firstCharsCount: 3,
121
- }) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(topJackpotPayout.amount, {
115
+ }) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
122
116
  currency: localeInfo.currency.code,
123
117
  minDecimalPlaces: 2,
124
118
  maxDecimalPlaces: 2,
@@ -0,0 +1 @@
1
+ export declare function AutoOpen(): null;
@@ -0,0 +1,40 @@
1
+ import { useEffect } from 'react';
2
+ import { useShallow } from 'zustand/shallow';
3
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
4
+ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
5
+ import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
6
+ import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
7
+ import { KYC_PROMPT_LOCALSTORAGE_KEY } from '../../constants/index.js';
8
+ export function AutoOpen() {
9
+ const kycStore = useGlobalStore(useShallow((ctx) => ctx.kyc));
10
+ const { data: session } = useSessionQuery();
11
+ const { data: account } = useAccountQuery();
12
+ const { data: verification } = useMemberVerificationQuery();
13
+ const isBasicInfoCompleted = account?.realName !== null && account?.birthDay !== null;
14
+ const isUploadCompleted = verification &&
15
+ verification.idFrontImage !== null &&
16
+ verification.selfieImage !== null;
17
+ const isRejected = Boolean(verification?.status === 'REJECTED');
18
+ const step = !isBasicInfoCompleted
19
+ ? 1
20
+ : isRejected
21
+ ? 2
22
+ : isUploadCompleted
23
+ ? 3
24
+ : 2;
25
+ const shouldOpen = !isBasicInfoCompleted || !isUploadCompleted || isRejected;
26
+ useEffect(() => {
27
+ if (session?.status == 'authenticated' &&
28
+ shouldOpen &&
29
+ localStorage.getItem(KYC_PROMPT_LOCALSTORAGE_KEY) === null) {
30
+ kycStore.setKycReminder(true);
31
+ return;
32
+ }
33
+ }, [kycStore, session?.status, shouldOpen]);
34
+ useEffect(() => {
35
+ if (step) {
36
+ kycStore.setStep(step);
37
+ }
38
+ }, [kycStore, step]);
39
+ return null;
40
+ }
@@ -0,0 +1 @@
1
+ export declare function BasicInformation(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import { differenceInYears, format, isSameDay, isValid, parse } from 'date-fns';
4
+ import { isNil, omitBy, size } from 'lodash-es';
5
+ import { useEffect } from 'react';
6
+ import { useForm } from 'react-hook-form';
7
+ import invariant from 'tiny-invariant';
8
+ import { z } from 'zod';
9
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
10
+ import { useUpdateAccountMutation } from '../../client/hooks/useUpdateAccountMutation.js';
11
+ import { toaster } from '../../client/utils/toaster.js';
12
+ import { Button } from '../../ui/Button/index.js';
13
+ import { Dialog } from '../../ui/Dialog/index.js';
14
+ import { Field } from '../../ui/Field/index.js';
15
+ import { useKYCContext } from './KYCContext.js';
16
+ const definition = z.object({
17
+ realName: z
18
+ .string()
19
+ .min(3, 'Name must be 3 or more characters')
20
+ .max(50, 'Name must not be more than 50 characters')
21
+ .regex(/^[a-z0-9 ]+$/gi, 'Name must not contain special characters')
22
+ .trim(),
23
+ birthDay: z
24
+ .string()
25
+ .min(1, 'Date of birth is required')
26
+ .superRefine((value, ctx) => {
27
+ const dob = parse(value, 'yyyy-MM-dd', new Date());
28
+ if (!isValid(dob)) {
29
+ return ctx.addIssue({
30
+ code: z.ZodIssueCode.invalid_date,
31
+ });
32
+ }
33
+ const now = new Date();
34
+ const age = differenceInYears(now, dob);
35
+ if (age < 21) {
36
+ return ctx.addIssue({
37
+ code: z.ZodIssueCode.custom,
38
+ message: 'You must be at least 21 years old',
39
+ });
40
+ }
41
+ }),
42
+ branchCode: z.string().min(4).max(10).optional().or(z.literal('')),
43
+ });
44
+ export function BasicInformation() {
45
+ const kyc = useKYCContext();
46
+ const form = useForm({
47
+ resolver: zodResolver(definition),
48
+ mode: 'all',
49
+ defaultValues: {
50
+ birthDay: '',
51
+ branchCode: '',
52
+ realName: '',
53
+ },
54
+ });
55
+ const accountQuery = useAccountQuery();
56
+ const account = accountQuery.data;
57
+ const stepCompleted = account != null && account.realName != null && account.birthDay != null;
58
+ useEffect(() => {
59
+ if (stepCompleted)
60
+ kyc.setStep(2);
61
+ }, [stepCompleted, kyc]);
62
+ useEffect(() => {
63
+ if (account) {
64
+ form.reset({
65
+ realName: account.realName ?? '',
66
+ birthDay: account.birthDay
67
+ ? format(account.birthDay, 'yyyy-MM-dd')
68
+ : '',
69
+ });
70
+ }
71
+ }, [account, form]);
72
+ const updateAccountMutation = useUpdateAccountMutation({
73
+ onError(error) {
74
+ toaster.error({
75
+ title: 'Error',
76
+ description: error.message,
77
+ });
78
+ },
79
+ onSuccess() {
80
+ kyc.setStep(2);
81
+ toaster.success({
82
+ title: 'Success',
83
+ description: 'Basic information has been set successfully.',
84
+ });
85
+ },
86
+ });
87
+ return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center text-lg font-semibold", children: "Basic Information" }), _jsx(Dialog.Description, { className: "text-text-secondary-700 mt-xs text-center text-sm", children: "Enter your basic details for identification and communication." }), _jsxs("form", { className: "mt-3", onSubmit: form.handleSubmit((data) => {
88
+ invariant(account);
89
+ const input = omitBy({
90
+ realName: account.realName === data.realName ? undefined : data.realName,
91
+ birthDay: account.birthDay && isSameDay(data.birthDay, account.birthDay)
92
+ ? undefined
93
+ : format(data.birthDay, 'yyyy-MM-dd'),
94
+ }, isNil);
95
+ if (size(input) === 0)
96
+ return kyc.setStep(2);
97
+ updateAccountMutation.mutate(input);
98
+ }), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!accountQuery.data?.realName, children: [_jsx(Field.Label, { children: "Real Name" }), _jsx(Field.Input, { placeholder: "Enter your real name", ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-3", invalid: !!form.formState.errors.branchCode, readOnly: !!accountQuery.data?.birthDay, children: [_jsx(Field.Label, { children: "Date of Birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), _jsx(Button, { type: "submit", className: "mt-8", disabled: accountQuery.isLoading ||
99
+ updateAccountMutation.isPending ||
100
+ stepCompleted, children: "Continue" })] })] }));
101
+ }
@@ -0,0 +1 @@
1
+ export declare function CaptureIdDocument(): import("react/jsx-runtime").JSX.Element;