@opexa/portal-components 0.0.112 → 0.0.114

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 (208) hide show
  1. package/dist/client/hooks/index.d.ts +65 -0
  2. package/dist/client/hooks/index.js +65 -0
  3. package/dist/client/hooks/useCashbackQuery.js +3 -0
  4. package/dist/client/hooks/useCashbacksQuery.js +3 -0
  5. package/dist/client/hooks/useChunk.js +3 -2
  6. package/dist/client/hooks/useFavoriteGamesQuery.js +3 -0
  7. package/dist/client/hooks/useInstapayBankListQuery.js +3 -0
  8. package/dist/client/hooks/useJackpotPayoutsQuery.js +3 -0
  9. package/dist/client/hooks/useJackpotsCountQuery.js +3 -0
  10. package/dist/client/hooks/useJackpotsQuery.js +3 -0
  11. package/dist/client/hooks/usePlatformQuery.js +3 -0
  12. package/dist/client/hooks/usePromoQuery.js +3 -0
  13. package/dist/client/hooks/usePromosQuery.js +3 -0
  14. package/dist/client/hooks/useRecommendedGamesQuery.js +5 -2
  15. package/dist/client/hooks/useRemainingTime.d.ts +2 -2
  16. package/dist/client/hooks/useRemainingTime.js +35 -24
  17. package/dist/client/hooks/useSiteQuery.js +4 -2
  18. package/dist/client/hooks/useTopWinsQuery.js +3 -0
  19. package/dist/client/services/index.d.ts +4 -0
  20. package/dist/client/services/index.js +4 -0
  21. package/dist/client/utils/index.d.ts +3 -0
  22. package/dist/client/utils/index.js +3 -0
  23. package/dist/components/Bonus/Bonus.client.js +1 -1
  24. package/dist/components/Cashback/Cashback.client.js +1 -1
  25. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
  26. package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
  27. package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
  28. package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
  29. package/dist/components/CashbackBonus/index.d.ts +1 -0
  30. package/dist/components/CashbackBonus/index.js +1 -0
  31. package/dist/components/Disclaimer/DisclaimerV2.js +6 -4
  32. package/dist/components/Empty.d.ts +9 -0
  33. package/dist/components/Empty.js +7 -0
  34. package/dist/components/FavoriteGames/FavoriteGames.client.js +23 -1
  35. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  36. package/dist/components/Games/GameContext.d.ts +2 -0
  37. package/dist/components/Games/GameContext.js +2 -0
  38. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  39. package/dist/components/InfiniteScroll.d.ts +10 -0
  40. package/dist/components/InfiniteScroll.js +25 -0
  41. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
  42. package/dist/components/JackpotCounter/JackpotCounter.client.js +66 -0
  43. package/dist/components/JackpotCounter/JackpotCounter.d.ts +17 -0
  44. package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
  45. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +18 -0
  46. package/dist/components/JackpotCounter/JackpotCounterItem.js +109 -0
  47. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -0
  48. package/dist/components/JackpotCounter/index.d.ts +1 -0
  49. package/dist/components/JackpotCounter/index.js +1 -0
  50. package/dist/components/Jackpots/JackpotDesktop.d.ts +1 -0
  51. package/dist/components/Jackpots/JackpotDesktop.js +45 -0
  52. package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
  53. package/dist/components/Jackpots/JackpotGameProviders.js +41 -0
  54. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
  55. package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
  56. package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
  57. package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
  58. package/dist/components/Jackpots/JackpotMobile.d.ts +1 -0
  59. package/dist/components/Jackpots/JackpotMobile.js +46 -0
  60. package/dist/components/Jackpots/JackpotRules.d.ts +5 -0
  61. package/dist/components/Jackpots/JackpotRules.js +11 -0
  62. package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
  63. package/dist/components/Jackpots/Jackpots.client.js +29 -0
  64. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  65. package/dist/components/Jackpots/JackpotsContext.d.ts +4 -0
  66. package/dist/components/Jackpots/JackpotsContext.js +3 -0
  67. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  68. package/dist/components/Jackpots/useJackpotData.d.ts +14 -0
  69. package/dist/components/Jackpots/useJackpotData.js +93 -0
  70. package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
  71. package/dist/components/Jackpots/useJackpotItemData.js +87 -0
  72. package/dist/components/KYC/Header.d.ts +1 -0
  73. package/dist/components/KYC/Header.js +8 -0
  74. package/dist/components/KYC/Step1.d.ts +1 -0
  75. package/dist/components/KYC/Step1.js +13 -0
  76. package/dist/components/KYC/Step2.d.ts +1 -0
  77. package/dist/components/KYC/Step2.js +13 -0
  78. package/dist/components/KYC/Step3.d.ts +1 -0
  79. package/dist/components/KYC/Step3.js +13 -0
  80. package/dist/components/KYC/Step4.d.ts +1 -0
  81. package/dist/components/KYC/Step4.js +7 -0
  82. package/dist/components/Messages/MessageItem.d.ts +4 -0
  83. package/dist/components/Messages/MessageItem.js +34 -0
  84. package/dist/components/News/News.js +1 -1
  85. package/dist/components/PortalProvider/WebVitals.d.ts +1 -0
  86. package/dist/components/PortalProvider/WebVitals.js +8 -0
  87. package/dist/components/Promo/Promo.client.js +1 -1
  88. package/dist/components/Promo/PromoContent.d.ts +2 -0
  89. package/dist/components/Promo/PromoContent.js +9 -0
  90. package/dist/components/Promos/PromoCarousel.d.ts +2 -0
  91. package/dist/components/Promos/PromoCarousel.js +41 -0
  92. package/dist/components/Promos/PromoGrid.d.ts +2 -0
  93. package/dist/components/Promos/PromoGrid.js +12 -0
  94. package/dist/components/Promos/PromoItem.d.ts +7 -0
  95. package/dist/components/Promos/PromoItem.js +10 -0
  96. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -1
  97. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +25 -28
  98. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  99. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
  100. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -1
  101. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +3 -27
  102. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -1
  103. package/dist/components/Quests/WageringQuest/WageringQuest.js +9 -12
  104. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  105. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
  106. package/dist/components/Search/Search.lazy.js +1 -1
  107. package/dist/components/TopWins/TopWins.client.js +2 -2
  108. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
  109. package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
  110. package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
  111. package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
  112. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
  113. package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
  114. package/dist/components/TournamentCounter/index.d.ts +1 -0
  115. package/dist/components/TournamentCounter/index.js +1 -0
  116. package/dist/components/Tournaments/TournamentDesktop.d.ts +1 -0
  117. package/dist/components/Tournaments/TournamentDesktop.js +57 -0
  118. package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
  119. package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
  120. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
  121. package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
  122. package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
  123. package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
  124. package/dist/components/Tournaments/TournamentMobile.d.ts +1 -0
  125. package/dist/components/Tournaments/TournamentMobile.js +55 -0
  126. package/dist/components/Tournaments/TournamentRules.d.ts +5 -0
  127. package/dist/components/Tournaments/TournamentRules.js +11 -0
  128. package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
  129. package/dist/components/Tournaments/Tournaments.client.js +20 -0
  130. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  131. package/dist/components/Tournaments/TournamentsContext.d.ts +4 -0
  132. package/dist/components/Tournaments/TournamentsContext.js +3 -0
  133. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  134. package/dist/components/Tournaments/useTournamentData.d.ts +10 -0
  135. package/dist/components/Tournaments/useTournamentData.js +72 -0
  136. package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
  137. package/dist/components/Tournaments/useTournamentItemData.js +64 -0
  138. package/dist/components/index.d.ts +33 -0
  139. package/dist/components/index.js +33 -0
  140. package/dist/constants/endpoints.d.ts +10 -0
  141. package/dist/constants/endpoints.js +41 -0
  142. package/dist/constants/envVars.d.ts +5 -0
  143. package/dist/constants/envVars.js +28 -0
  144. package/dist/constants/gameProviders.d.ts +4 -0
  145. package/dist/constants/gameProviders.js +368 -0
  146. package/dist/constants/gameTypes.d.ts +3 -0
  147. package/dist/constants/gameTypes.js +64 -0
  148. package/dist/constants/headerKeys.d.ts +2 -0
  149. package/dist/constants/headerKeys.js +2 -0
  150. package/dist/constants/secretQuestions.d.ts +3 -0
  151. package/dist/constants/secretQuestions.js +24 -0
  152. package/dist/constants/storageKeys.d.ts +2 -0
  153. package/dist/constants/storageKeys.js +2 -0
  154. package/dist/icons/index.d.ts +65 -0
  155. package/dist/icons/index.js +65 -0
  156. package/dist/images/hacksaw-gaming.png +0 -0
  157. package/dist/images/pagcor2.png +0 -0
  158. package/dist/server/services/index.d.ts +4 -0
  159. package/dist/server/services/index.js +4 -0
  160. package/dist/server/utils/index.d.ts +29 -0
  161. package/dist/server/utils/index.js +29 -0
  162. package/dist/server/utils/prefetchSiteQuery.js +1 -4
  163. package/dist/services/auth.d.ts +21 -2
  164. package/dist/services/auth.js +25 -6
  165. package/dist/services/cmsPortal.d.ts +1 -1
  166. package/dist/services/cmsPortal.js +31 -5
  167. package/dist/services/portal.js +27 -3
  168. package/dist/services/queries.js +2369 -2369
  169. package/dist/services/report.js +45 -5
  170. package/dist/services/wallet.js +26 -3
  171. package/dist/styles/theme.css +699 -699
  172. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  173. package/dist/ui/Badge/Badge.d.ts +12 -12
  174. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  175. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  176. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  177. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  178. package/dist/ui/DatePicker/DatePicker.d.ts +192 -192
  179. package/dist/ui/Dialog/Dialog.d.ts +55 -55
  180. package/dist/ui/Dialog/dialog.recipe.d.ts +5 -5
  181. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  182. package/dist/ui/Menu/Menu.d.ts +307 -307
  183. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  184. package/dist/ui/Presence.d.ts +2 -0
  185. package/dist/ui/Presence.js +7 -0
  186. package/dist/ui/Prose.d.ts +2 -0
  187. package/dist/ui/Prose.js +5 -0
  188. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  189. package/dist/ui/Select/Select.d.ts +45 -45
  190. package/dist/ui/Select/select.recipe.d.ts +3 -3
  191. package/dist/ui/Table/Table.d.ts +21 -21
  192. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  193. package/dist/ui/Table/table.recipe.d.ts +3 -3
  194. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  195. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  196. package/dist/ui/index.d.ts +26 -0
  197. package/dist/ui/index.js +26 -0
  198. package/dist/utils/index.d.ts +17 -0
  199. package/dist/utils/index.js +17 -0
  200. package/dist/utils/isMobile.d.ts +5 -0
  201. package/dist/utils/isMobile.js +9 -0
  202. package/package.json +163 -163
  203. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestRules.d.ts +0 -6
  204. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestRules.js +0 -15
  205. package/dist/components/Quests/OnboardingQuest/OnboardingQuestRules.d.ts +0 -6
  206. package/dist/components/Quests/OnboardingQuest/OnboardingQuestRules.js +0 -15
  207. package/dist/components/Quests/WageringQuest/WageringQuestRules.d.ts +0 -7
  208. package/dist/components/Quests/WageringQuest/WageringQuestRules.js +0 -17
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery';
2
+ export * from './useAuthenticateMutation';
3
+ export * from './useAvailablePromosQuery';
4
+ export * from './useAvailableQuestsQuery';
5
+ export * from './useBetRecordsQuery';
6
+ export * from './useBonusesQuery';
7
+ export * from './useBonusQuery';
8
+ export * from './useCashbackBonusesQuery';
9
+ export * from './useCashbackBonusQuery';
10
+ export * from './useCashbackQuery';
11
+ export * from './useCashbacksQuery';
12
+ export * from './useCheckInDailyCheckInQuestMutation';
13
+ export * from './useChunk';
14
+ export * from './useClaimCashbackBonusMutation';
15
+ export * from './useClaimSpotBonusMutation';
16
+ export * from './useControllableState';
17
+ export * from './useCooldown';
18
+ export * from './useCreateGameSessionMutation';
19
+ export * from './useCreateGCashDepositMutation';
20
+ export * from './useCreateGCashWithdrawalMutation';
21
+ export * from './useCreateInstapayWithdrawalMutation';
22
+ export * from './useCreateMayaAppDepositMutation';
23
+ export * from './useCreateMayaAppWithdrawalMutation';
24
+ export * from './useCreateMayaDepositMutation';
25
+ export * from './useCreateMayaWithdrawalMutation';
26
+ export * from './useCreateOnlineBankDepositMutation';
27
+ export * from './useCreateQRPHDepositMutation';
28
+ export * from './useDepositQuery';
29
+ export * from './useDepositRecordsQuery';
30
+ export * from './useDepositsCountQuery';
31
+ export * from './useDisclosure';
32
+ export * from './useEndGameSessionMutation';
33
+ export * from './useFavoriteGamesQuery';
34
+ export * from './useGamesQuery';
35
+ export * from './useGlobalStore';
36
+ export * from './useInfiniteQueryHelper';
37
+ export * from './useInstapayBankListQuery';
38
+ export * from './useIsMayaSessionValidQuery';
39
+ export * from './useJackpotsQuery';
40
+ export * from './useLocaleInfo';
41
+ export * from './useMarkGameAsFavoriteMutation';
42
+ export * from './useMarkMessageAsReadMutation';
43
+ export * from './useMemberVerificationQuery';
44
+ export * from './useMessagesQuery';
45
+ export * from './useMobileNumberParser';
46
+ export * from './useOnMMA';
47
+ export * from './usePaymentSettingsQuery';
48
+ export * from './usePlatformQuery';
49
+ export * from './useProfileCompletionQuery';
50
+ export * from './usePromoQuery';
51
+ export * from './usePromosQuery';
52
+ export * from './useRemainingTime';
53
+ export * from './useSendVerificationCodeMutation';
54
+ export * from './useSessionQuery';
55
+ export * from './useSignInMutation';
56
+ export * from './useSignOutMutation';
57
+ export * from './useSignUpMutation';
58
+ export * from './useTopWinsQuery';
59
+ export * from './useTournamentsQuery';
60
+ export * from './useTransactionRecordsQuery';
61
+ export * from './useUnmarkGameAsFavoriteMutation';
62
+ export * from './useUnreadMessagesCountQuery';
63
+ export * from './useUpdateAccountMutation';
64
+ export * from './useWalletQuery';
65
+ export * from './useWithdrawalRecordsQuery';
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery.js';
2
+ export * from './useAuthenticateMutation.js';
3
+ export * from './useAvailablePromosQuery.js';
4
+ export * from './useAvailableQuestsQuery.js';
5
+ export * from './useBetRecordsQuery.js';
6
+ export * from './useBonusesQuery.js';
7
+ export * from './useBonusQuery.js';
8
+ export * from './useCashbackBonusesQuery.js';
9
+ export * from './useCashbackBonusQuery.js';
10
+ export * from './useCashbackQuery.js';
11
+ export * from './useCashbacksQuery.js';
12
+ export * from './useCheckInDailyCheckInQuestMutation.js';
13
+ export * from './useChunk.js';
14
+ export * from './useClaimCashbackBonusMutation.js';
15
+ export * from './useClaimSpotBonusMutation.js';
16
+ export * from './useControllableState.js';
17
+ export * from './useCooldown.js';
18
+ export * from './useCreateGameSessionMutation.js';
19
+ export * from './useCreateGCashDepositMutation.js';
20
+ export * from './useCreateGCashWithdrawalMutation.js';
21
+ export * from './useCreateInstapayWithdrawalMutation.js';
22
+ export * from './useCreateMayaAppDepositMutation.js';
23
+ export * from './useCreateMayaAppWithdrawalMutation.js';
24
+ export * from './useCreateMayaDepositMutation.js';
25
+ export * from './useCreateMayaWithdrawalMutation.js';
26
+ export * from './useCreateOnlineBankDepositMutation.js';
27
+ export * from './useCreateQRPHDepositMutation.js';
28
+ export * from './useDepositQuery.js';
29
+ export * from './useDepositRecordsQuery.js';
30
+ export * from './useDepositsCountQuery.js';
31
+ export * from './useDisclosure.js';
32
+ export * from './useEndGameSessionMutation.js';
33
+ export * from './useFavoriteGamesQuery.js';
34
+ export * from './useGamesQuery.js';
35
+ export * from './useGlobalStore.js';
36
+ export * from './useInfiniteQueryHelper.js';
37
+ export * from './useInstapayBankListQuery.js';
38
+ export * from './useIsMayaSessionValidQuery.js';
39
+ export * from './useJackpotsQuery.js';
40
+ export * from './useLocaleInfo.js';
41
+ export * from './useMarkGameAsFavoriteMutation.js';
42
+ export * from './useMarkMessageAsReadMutation.js';
43
+ export * from './useMemberVerificationQuery.js';
44
+ export * from './useMessagesQuery.js';
45
+ export * from './useMobileNumberParser.js';
46
+ export * from './useOnMMA.js';
47
+ export * from './usePaymentSettingsQuery.js';
48
+ export * from './usePlatformQuery.js';
49
+ export * from './useProfileCompletionQuery.js';
50
+ export * from './usePromoQuery.js';
51
+ export * from './usePromosQuery.js';
52
+ export * from './useRemainingTime.js';
53
+ export * from './useSendVerificationCodeMutation.js';
54
+ export * from './useSessionQuery.js';
55
+ export * from './useSignInMutation.js';
56
+ export * from './useSignOutMutation.js';
57
+ export * from './useSignUpMutation.js';
58
+ export * from './useTopWinsQuery.js';
59
+ export * from './useTournamentsQuery.js';
60
+ export * from './useTransactionRecordsQuery.js';
61
+ export * from './useUnmarkGameAsFavoriteMutation.js';
62
+ export * from './useUnreadMessagesCountQuery.js';
63
+ export * from './useUpdateAccountMutation.js';
64
+ export * from './useWalletQuery.js';
65
+ export * from './useWithdrawalRecordsQuery.js';
@@ -3,6 +3,9 @@ import { getCashback } from '../../services/wallet.js';
3
3
  import { getCashbackQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useCashbackQuery = (id, config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  enabled: !id ? false : config?.enabled,
8
11
  queryKey: getCashbackQueryKey(id),
@@ -3,6 +3,9 @@ import { getCashbacks } from '../../services/wallet.js';
3
3
  import { getCashbacksQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useCashbacksQuery = (config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getCashbacksQueryKey(),
8
11
  queryFn: async ({ signal }) => {
@@ -1,7 +1,8 @@
1
1
  import { chunk } from 'lodash-es';
2
- import { useState } from 'react';
2
+ import { cache, useState } from 'react';
3
+ const fn = cache(chunk);
3
4
  export function useChunk(items, size) {
4
- const chunks = chunk(items, size);
5
+ const chunks = fn(items, size);
5
6
  const [currentIndex, setCurrentIndex] = useState(0);
6
7
  const currentItems = chunks.at(currentIndex) ?? [];
7
8
  const loadedItems = (() => {
@@ -7,6 +7,9 @@ import { useSessionQuery } from './useSessionQuery.js';
7
7
  export const useFavoriteGamesQuery = (config) => {
8
8
  const sessionQuery = useSessionQuery();
9
9
  return useQuery({
10
+ refetchOnMount: false,
11
+ refetchOnReconnect: false,
12
+ refetchOnWindowFocus: false,
10
13
  ...config,
11
14
  enabled: config?.enabled === false
12
15
  ? false
@@ -7,6 +7,9 @@ import { useSessionQuery } from './useSessionQuery.js';
7
7
  export const useInstapayBankListQuery = (config) => {
8
8
  const sessionQuery = useSessionQuery();
9
9
  const query = useQuery({
10
+ refetchOnMount: false,
11
+ refetchOnReconnect: false,
12
+ refetchOnWindowFocus: false,
10
13
  ...config,
11
14
  enabled: config?.enabled === false
12
15
  ? false
@@ -3,6 +3,9 @@ import { getJackpotPayouts, } from '../../services/report.js';
3
3
  import { getJackpotPayoutsQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useJackpotPayoutsQuery = (input, config) => {
5
5
  const query = useInfiniteQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getJackpotPayoutsQueryKey(input),
8
11
  queryFn: ({ pageParam, signal }) => {
@@ -3,6 +3,9 @@ import { getJackpotsCount, } from '../../services/report.js';
3
3
  import { getJackpotsCountQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useJackpotsCountQuery = (input, config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getJackpotsCountQueryKey(input),
8
11
  queryFn: async ({ signal }) => {
@@ -3,6 +3,9 @@ import { getJackpots } from '../../services/report.js';
3
3
  import { getJackpotsQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useJackpotsQuery = (input, config) => {
5
5
  const query = useInfiniteQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getJackpotsQueryKey(input),
8
11
  queryFn: ({ pageParam, signal }) => {
@@ -3,6 +3,9 @@ import { getPlatform } from '../../services/portal.js';
3
3
  import { getPlatformQueryKey } from '../../utils/queryKeys.js';
4
4
  export const usePlatformQuery = (config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getPlatformQueryKey(),
8
11
  queryFn: async ({ signal }) => {
@@ -3,6 +3,9 @@ import { getPromo } from '../../services/wallet.js';
3
3
  import { getPromoQueryKey } from '../../utils/queryKeys.js';
4
4
  export const usePromoQuery = (id, config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  enabled: !id ? false : config?.enabled,
8
11
  queryKey: getPromoQueryKey(id),
@@ -3,6 +3,9 @@ import { getPromos } from '../../services/wallet.js';
3
3
  import { getPromosQueryKey } from '../../utils/queryKeys.js';
4
4
  export const usePromosQuery = (config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getPromosQueryKey(),
8
11
  queryFn: async ({ signal }) => {
@@ -1,17 +1,20 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getRecommendedGames } from '../../services/portal.js';
4
- import { getOnboardingStatusQueryKey } from '../../utils/queryKeys.js';
4
+ import { getRecommendedGamesQueryKey } from '../../utils/queryKeys.js';
5
5
  import { getSession } from '../services/getSession.js';
6
6
  import { useSessionQuery } from './useSessionQuery.js';
7
7
  export const useRecommendedGamesQuery = (config) => {
8
8
  const sessionQuery = useSessionQuery();
9
9
  const query = useQuery({
10
+ refetchOnMount: false,
11
+ refetchOnReconnect: false,
12
+ refetchOnWindowFocus: false,
10
13
  ...config,
11
14
  enabled: config?.enabled === false
12
15
  ? false
13
16
  : sessionQuery.data?.status === 'authenticated',
14
- queryKey: getOnboardingStatusQueryKey(),
17
+ queryKey: getRecommendedGamesQueryKey(),
15
18
  queryFn: async ({ signal }) => {
16
19
  const session = await getSession();
17
20
  invariant(session.status === 'authenticated');
@@ -7,12 +7,12 @@ interface UseRemainingTimeOptions {
7
7
  onExpired?: () => void;
8
8
  }
9
9
  export declare function useRemainingTime(value: Date | string | number, options?: UseRemainingTimeOptions): {
10
+ subscribe: (subscriber: Subscriber) => () => void;
10
11
  days: number;
11
12
  hours: number;
12
13
  minutes: number;
13
- expired: boolean;
14
14
  seconds: number;
15
+ expired: boolean;
15
16
  toString(): string;
16
- subscribe: (subscriber: Subscriber) => () => void;
17
17
  };
18
18
  export {};
@@ -1,7 +1,36 @@
1
1
  import { differenceInDays, differenceInHours, differenceInMinutes, differenceInSeconds, isAfter, } from 'date-fns';
2
2
  import { isNumber, isString, noop } from 'lodash-es';
3
- import { useRef, useState } from 'react';
3
+ import { cache, useRef, useState } from 'react';
4
4
  import { useInterval } from 'usehooks-ts';
5
+ const getRemainingTime = cache((value, compareValue) => {
6
+ const expiration = isString(value) || isNumber(value) ? new Date(value) : value;
7
+ const expired = isAfter(compareValue, expiration);
8
+ const days = expired ? 0 : differenceInDays(expiration, compareValue);
9
+ const hours = expired
10
+ ? 0
11
+ : differenceInHours(expiration, compareValue) - days * 24;
12
+ const minutes = expired
13
+ ? 0
14
+ : differenceInMinutes(expiration, compareValue) -
15
+ days * 24 * 60 -
16
+ hours * 60;
17
+ const seconds = expired
18
+ ? 0
19
+ : differenceInSeconds(expiration, compareValue) -
20
+ days * 24 * 60 * 60 -
21
+ hours * 60 * 60 -
22
+ minutes * 60;
23
+ return {
24
+ days,
25
+ hours,
26
+ minutes,
27
+ seconds,
28
+ expired,
29
+ toString() {
30
+ return `${days}d:${hours}h:${minutes}m:${seconds}s`;
31
+ },
32
+ };
33
+ });
5
34
  export function useRemainingTime(value, options = {}) {
6
35
  const subscribers = useRef([
7
36
  () => {
@@ -21,35 +50,17 @@ export function useRemainingTime(value, options = {}) {
21
50
  });
22
51
  };
23
52
  const [now, setNow] = useState(new Date());
24
- const expiration = isString(value) || isNumber(value) ? new Date(value) : value;
25
- const expired = isAfter(now, expiration);
26
- const days = expired ? 0 : differenceInDays(expiration, now);
27
- const hours = expired ? 0 : differenceInHours(expiration, now) - days * 24;
28
- const minutes = expired
29
- ? 0
30
- : differenceInMinutes(expiration, now) - days * 24 * 60 - hours * 60;
31
- const seconds = expired
32
- ? 0
33
- : differenceInSeconds(expiration, now) -
34
- days * 24 * 60 * 60 -
35
- hours * 60 * 60 -
36
- minutes * 60;
53
+ const exp = isString(value) || isNumber(value) ? new Date(value) : value;
54
+ const res = getRemainingTime(exp, now);
37
55
  useInterval(() => {
38
56
  const d = new Date();
39
57
  setNow(d);
40
- if (isAfter(d, expiration)) {
58
+ if (isAfter(d, exp)) {
41
59
  triggerEvent({ type: 'EXPIRED' });
42
60
  }
43
- }, expired ? null : 1000);
61
+ }, res.expired ? null : 1000);
44
62
  return {
45
- days,
46
- hours,
47
- minutes,
48
- expired,
49
- seconds,
50
- toString() {
51
- return `${days}d:${hours}h:${minutes}m:${seconds}s`;
52
- },
63
+ ...res,
53
64
  subscribe,
54
65
  };
55
66
  }
@@ -1,14 +1,16 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
- import { SITE_ID } from '../../constants/index.js';
4
3
  import { getSite } from '../../services/cmsPortal.js';
5
4
  import { getSiteQueryKey } from '../../utils/queryKeys.js';
6
5
  export const useSiteQuery = (config) => {
7
6
  return useQuery({
7
+ refetchOnMount: false,
8
+ refetchOnReconnect: false,
9
+ refetchOnWindowFocus: false,
8
10
  ...config,
9
11
  queryKey: getSiteQueryKey(),
10
12
  queryFn: async ({ signal }) => {
11
- const site = await getSite(SITE_ID, { signal });
13
+ const site = await getSite({ signal });
12
14
  invariant(site);
13
15
  return site;
14
16
  },
@@ -3,6 +3,9 @@ import { getTopWins } from '../../services/portal.js';
3
3
  import { getTopWinsQueryKey } from '../../utils/queryKeys.js';
4
4
  export const useTopWinsQuery = (config) => {
5
5
  return useQuery({
6
+ refetchOnMount: false,
7
+ refetchOnReconnect: false,
8
+ refetchOnWindowFocus: false,
6
9
  ...config,
7
10
  queryKey: getTopWinsQueryKey(),
8
11
  queryFn: async ({ signal }) => {
@@ -0,0 +1,4 @@
1
+ export * from './authenticate';
2
+ export * from './getSession';
3
+ export * from './signIn';
4
+ export * from './signOut';
@@ -0,0 +1,4 @@
1
+ export * from './authenticate.js';
2
+ export * from './getSession.js';
3
+ export * from './signIn.js';
4
+ export * from './signOut.js';
@@ -0,0 +1,3 @@
1
+ export * from './createContext';
2
+ export * from './createRecipeContext';
3
+ export * from './toaster';
@@ -0,0 +1,3 @@
1
+ export * from './createContext.js';
2
+ export * from './createRecipeContext.js';
3
+ export * from './toaster.js';
@@ -13,7 +13,7 @@ import piggyBank from '../../images/piggy-bank.png';
13
13
  import { Badge } from '../../ui/Badge/index.js';
14
14
  import { Collapsible } from '../../ui/Collapsible/index.js';
15
15
  import { Progress } from '../../ui/Progress/index.js';
16
- import { Prose } from '../../ui/Prose/index.js';
16
+ import { Prose } from '../../ui/Prose.js';
17
17
  import { capitalize } from '../../utils/capitalize.js';
18
18
  import { formatNumber } from '../../utils/formatNumber.js';
19
19
  import { parseDecimal } from '../../utils/parseDecimal.js';
@@ -11,7 +11,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
11
11
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
12
12
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
13
13
  import { Button } from '../../ui/Button/index.js';
14
- import { Prose } from '../../ui/Prose/index.js';
14
+ import { Prose } from '../../ui/Prose.js';
15
15
  export function Cashback__client(props) {
16
16
  const availablePromosQuery = useAvailablePromosQuery();
17
17
  const cashbackQuery = useCashbackQuery(props.id);
@@ -0,0 +1,2 @@
1
+ import type { CashbackBonusProps } from './CashbackBonus';
2
+ export declare function CashbackBonus__client(props: CashbackBonusProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image from 'next/image';
4
+ import Link from 'next/link';
5
+ import { ChevronLeftIcon, ChevronRightIcon, StopWatchIcon } from '../../icons/index.js';
6
+ import { Badge, Collapsible, Progress, Prose } from '../../ui/index.js';
7
+ export function CashbackBonus__client(props) {
8
+ return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx(Image, { src: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-3xl h-auto w-full rounded-xl" }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: "brand", className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: "9d:10h:11m" })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "50 PHP First Deposit Bonus" }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: "20.00" }), " / 50.00 PHP"] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }), _jsx("p", { children: "5x" })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { children: "Wagering" }), _jsx("p", { children: "400/1000" })] }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] }), _jsxs(Collapsible.Root, { className: "mt-xl lg:mt-6", children: [_jsxs(Collapsible.Trigger, { className: "text-button-tertiary-fg flex w-fit items-center justify-center gap-sm text-sm font-semibold lg:mx-auto", children: ["Game Provider Contribution", _jsx(Collapsible.Indicator, { asChild: true, children: _jsx(ChevronRightIcon, { className: "size-5" }) })] }), _jsxs(Collapsible.Content, { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl space-y-1.5 rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Playson" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "25%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Betsoft Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "13%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Microgaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "50%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Realtime Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "10%" })] })] })] }), _jsxs(Prose, { className: "mt-xl lg:mt-6", children: [_jsx("h3", { children: "How to get bonus" }), _jsxs("ol", { children: [_jsx("li", { children: "All OFWin members are eligible for this program." }), _jsx("li", { children: "50 PHP of game credit will be automatically credited to the new member account upon completion of first deposit Auctor vel in vitae placerat." }), _jsx("li", { children: "Member must reach a 5x turnover requirement before a withdrawal can be made. Attempting to make a withdrawal before this turnover requirement is completed could cause your bonus to be voided." }), _jsx("li", { children: "Players will have 10 days from the date the bonus is awarded to complete the rollover requirement." }), _jsx("li", { children: "Bets used to meet other bonus rollover requirements will not count toward this promotion." })] }), _jsx("h3", { children: "Terms and Conditions" }), _jsxs("ul", { children: [_jsx("li", { children: "Only one account per player is allowed. No same IP address/bank account name allowed. Players who have multiple or fraudulent accounts will not be qualified for the promotion." }), _jsx("li", { children: "Players that are found to have any duplicate accounts or those who participate in fraudulent activities may have their funds forfeited and their accounts closed." }), _jsx("li", { children: "OFWin reserves the right to amend or cancel this Referral Program at any time. OFWin General Terms and Conditions apply." })] })] })] }));
9
+ }
@@ -0,0 +1,10 @@
1
+ export interface CashbackBonusProps {
2
+ id: string;
3
+ className?: string;
4
+ /**
5
+ * @description URL for the bonuses details page
6
+ * @default "/rewards"
7
+ */
8
+ viewAllUrl?: string;
9
+ }
10
+ export declare function CashbackBonus(props: CashbackBonusProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CashbackBonus__client } from './CashbackBonus.client.js';
3
+ export async function CashbackBonus(props) {
4
+ return _jsx(CashbackBonus__client, { ...props });
5
+ }
@@ -0,0 +1 @@
1
+ export * from './CashbackBonus';
@@ -0,0 +1 @@
1
+ export * from './CashbackBonus.js';
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
4
  import { useRef, useState } from 'react';
5
- import pagcorLogo from '../../images/pagcor.png';
5
+ import pagcorLogo from '../../images/pagcor2.png';
6
6
  import responsibleGamingLogo from '../../images/responsible-gaming.png';
7
7
  import { Button } from '../../ui/Button/index.js';
8
8
  import { Dialog } from '../../ui/Dialog/index.js';
@@ -15,8 +15,10 @@ export function DisclaimerV2(props) {
15
15
  const acceptTriggerRef = useRef(null);
16
16
  const [isResponsibleGamingOpen, setResponsibleGamingOpen] = useState(false);
17
17
  const [isTermsOfUseOpen, setTermsOfUseOpen] = useState(false);
18
- return (_jsxs(_Fragment, { children: [_jsx(ResponsibleGaming, { responsibleGamingContent: props.responsibleGamingContent, logo: props.logo, open: isResponsibleGamingOpen, onCloseAction: () => setResponsibleGamingOpen(false) }), _jsx(TermsOfUse, { termsOfUseContent: props.termsOfUseContent, siteName: props.siteName, logo: props.logo, open: isTermsOfUseOpen, onCloseAction: () => setTermsOfUseOpen(false) }), _jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { style: { zIndex: 50 } }), _jsx(Dialog.Positioner, { style: { zIndex: 51 }, children: _jsxs(Dialog.Content, { className: "z-1 flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: ["Please read our \u00A0", _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
19
- setResponsibleGamingOpen(true);
20
- }, children: "Responsible Gaming" }), "guidelines carefully:"] }), _jsxs(Dialog.Description, { className: "mt-4 text-sm", children: [_jsxs("ul", { className: "space-y-1 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "I am over 21 years of age."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "I am not a government official, or employee connected directly with the operation of the Government or any of its agencies, member of the Armed Forces of the Philippines, including the Army, Navy, Air Force, or the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), _jsxs("div", { children: ["I have read and agreed to \u00A0", _jsxs("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => setTermsOfUseOpen(true), children: [props.siteName, " Terms of Use"] })] })] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "I am not a Gaming Employment License (GEL) holder."] })] }), _jsx("div", { className: "mt-4", children: "Fund or credits in the account of player who is found ineligible to play shall mean forfeiture of said fund/credits in favor of the Government." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Proceed" }), _jsx(Button, { type: "button", className: "mt-3", onClick: disclaimer.close, variant: "outline", children: "Exit" })] }) })] }) })] }));
18
+ return (_jsxs(_Fragment, { children: [_jsx(ResponsibleGaming, { responsibleGamingContent: props.responsibleGamingContent, logo: props.logo, open: isResponsibleGamingOpen, onCloseAction: () => setResponsibleGamingOpen(false) }), _jsx(TermsOfUse, { termsOfUseContent: props.termsOfUseContent, siteName: props.siteName, logo: props.logo, open: isTermsOfUseOpen, onCloseAction: () => setTermsOfUseOpen(false) }), _jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: 'z-sticky' }), _jsx(Dialog.Positioner, { className: 'z-sticky', children: _jsxs(Dialog.Content, { className: " flex h-full w-full flex-col items-start gap-y-4 p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-4 text-sm", children: [_jsxs("ul", { className: "space-y-1.5 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), _jsxs("div", { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
19
+ setTermsOfUseOpen(true);
20
+ }, children: "Terms of Use" }), ' ', "and", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
21
+ setResponsibleGamingOpen(true);
22
+ }, children: "Responsible Gaming" })] }), _jsx("div", { children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law" })] }) }), _jsxs("div", { className: "mt-4 flex w-full gap-3", children: [_jsx(Button, { type: "button", onClick: disclaimer.close, variant: "outline", children: "Exit" }), _jsx(Button, { ref: acceptTriggerRef, type: "button", onClick: disclaimer.close, children: "Accept" })] })] }) })] }) })] }));
21
23
  }
22
24
  const Circle = () => (_jsx("div", { children: _jsx("div", { className: "border-brand-400 flex h-4.5 w-4.5 items-center justify-center rounded-full border", children: _jsx("div", { className: "bg-brand-400 h-3 w-3 rounded-full" }) }) }));
@@ -0,0 +1,9 @@
1
+ import type { ComponentProps, ComponentType } from 'react';
2
+ export interface EmptyProps {
3
+ icon: ComponentType<ComponentProps<'svg'>>;
4
+ title: string;
5
+ message: string;
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ }
9
+ export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function Empty(props) {
3
+ return (_jsxs("div", { role: "alert", "aria-live": "polite", style: props.style, className: props.className, children: [_jsxs("div", { className: "relative mx-auto w-[9.5rem] pt-4", children: [_jsx("div", { className: "bg-utility-gray-200 absolute left-1/2 top-0 size-[6.5rem] -translate-x-1/2 rounded-full" }), _jsx(CloudIcon, { className: "relative h-auto w-full shrink-0" }), _jsx("div", { className: "bg-utility-gray-200/40 absolute bottom-2 left-1/2 flex size-12 -translate-x-1/2 items-center justify-center rounded-full backdrop-blur-sm", children: _jsx(props.icon, { className: "size-6 text-white" }) }), _jsx("div", { className: "bg-utility-gray-200 absolute left-4 top-3.5 size-2.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute bottom-0.5 left-3 size-3.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-3.5 top-1 size-2 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-0 top-6.5 size-3.5 rounded-full" })] }), _jsx("h2", { className: "mt-xl text-center font-semibold", children: props.title }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: props.message })] }));
4
+ }
5
+ function CloudIcon(props) {
6
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152 104", fill: "none", ...props, children: [_jsxs("g", { filter: "url(#filter0_dd_2719_19242)", children: [_jsx("path", { d: "M77.6 0C66.8273 0 57.2978 5.32329 51.4987 13.4829C49.605 13.0363 47.6301 12.8 45.6 12.8C31.4615 12.8 20 24.2615 20 38.4C20 52.5385 31.4615 64 45.6 64L109.6 64C121.971 64 132 53.9712 132 41.6C132 29.2288 121.971 19.2 109.6 19.2C108.721 19.2 107.854 19.2506 107.002 19.349C102.098 7.9677 90.7797 0 77.6 0Z", fill: "#F9FAFB" }), _jsx("ellipse", { cx: "45.6", cy: "38.4008", rx: "25.6", ry: "25.6", fill: "url(#paint0_linear_2719_19242)" }), _jsx("circle", { cx: "77.6", cy: "32", r: "32", fill: "url(#paint1_linear_2719_19242)" }), _jsx("ellipse", { cx: "109.6", cy: "41.5992", rx: "22.4", ry: "22.4", fill: "url(#paint2_linear_2719_19242)" })] }), _jsxs("defs", { children: [_jsxs("filter", { id: "filter0_dd_2719_19242", x: "0", y: "0", width: "152", height: "104", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [_jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect1_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "8" }), _jsx("feGaussianBlur", { stdDeviation: "4" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.03 0" }), _jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_2719_19242" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect2_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "20" }), _jsx("feGaussianBlur", { stdDeviation: "12" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.08 0" }), _jsx("feBlend", { mode: "normal", in2: "effect1_dropShadow_2719_19242", result: "effect2_dropShadow_2719_19242" }), _jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect2_dropShadow_2719_19242", result: "shape" })] }), _jsxs("linearGradient", { id: "paint0_linear_2719_19242", x1: "25.9429", y1: "21.4865", x2: "71.2", y2: "64.0007", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint1_linear_2719_19242", x1: "53.0286", y1: "10.8571", x2: "109.6", y2: "64", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint2_linear_2719_19242", x1: "92.4", y1: "26.7992", x2: "132", y2: "63.9992", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] })] })] }));
7
+ }
@@ -1,6 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import useEmblaCarousel from 'embla-carousel-react';
3
4
  import Image from 'next/image';
5
+ import { useCallback, useEffect, useState } from 'react';
4
6
  import { twMerge } from 'tailwind-merge';
5
7
  import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
6
8
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
@@ -12,11 +14,31 @@ import { Button } from '../../ui/Button/index.js';
12
14
  import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
13
15
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
14
16
  export function FavoriteGames__client(props) {
17
+ const [emblaRef, emblaApi] = useEmblaCarousel({
18
+ align: 'start',
19
+ slidesToScroll: 1,
20
+ });
21
+ const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
22
+ const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
23
+ const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
24
+ const onNextButtonClick = useCallback(async () => {
25
+ emblaApi?.scrollNext();
26
+ }, [emblaApi]);
27
+ const onSelect = useCallback((emblaApi) => {
28
+ setPrevBtnDisabled(!emblaApi?.canScrollPrev());
29
+ setNextBtnDisabled(!emblaApi?.canScrollNext());
30
+ }, []);
31
+ useEffect(() => {
32
+ if (!emblaApi)
33
+ return;
34
+ onSelect(emblaApi);
35
+ emblaApi.on('reInit', onSelect).on('select', onSelect);
36
+ }, [emblaApi, onSelect]);
15
37
  const gamesQuery = useFavoriteGamesQuery();
16
38
  const games = gamesQuery.data ?? [];
17
39
  if (games.length <= 0)
18
40
  return null;
19
- return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Favorite Games' }), _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", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] }) })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md'), children: games.map((game) => (_jsx(Item, { game: game }, game.id))) }) })] }));
41
+ return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Favorite Games' }), _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 lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md'), children: games.map((game) => (_jsx(Item, { game: game }, game.id))) }) })] }));
20
42
  }
21
43
  function Item({ game }) {
22
44
  const sessionQuery = useSessionQuery();
@@ -21,7 +21,7 @@ import { AlertDialog } from '../../ui/AlertDialog/index.js';
21
21
  import { Button } from '../../ui/Button/index.js';
22
22
  import { IconButton } from '../../ui/IconButton/index.js';
23
23
  import { Portal } from '../../ui/Portal/index.js';
24
- import { Presence } from '../../ui/Presence/index.js';
24
+ import { Presence } from '../../ui/Presence.js';
25
25
  export function GameLaunch() {
26
26
  const globalStore = useGlobalStore(useShallow((ctx) => ({
27
27
  gameLaunch: ctx.gameLaunch,