@opexa/portal-components 0.0.244 → 0.0.246

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 (62) hide show
  1. package/dist/client/hooks/useInfiniteQueryHelper.js +1 -1
  2. package/dist/components/Account/Account.lazy.js +6 -3
  3. package/dist/components/AccountInfo/AccountInfo.js +1 -1
  4. package/dist/components/AccountVerification/AccountVerification.js +5 -2
  5. package/dist/components/Banner/Banner.js +2 -1
  6. package/dist/components/BetRecords/BetRecords.client.d.ts +4 -0
  7. package/dist/components/BetRecords/BetRecords.client.js +2 -2
  8. package/dist/components/Bonuses/Bonuses.client.js +13 -8
  9. package/dist/components/GameLaunch/GameLaunchTrigger.js +7 -0
  10. package/dist/components/GameProviders/GameProvidersCarousel.js +2 -2
  11. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  12. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  13. package/dist/components/KYC/utils.js +18 -18
  14. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  15. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  16. package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
  17. package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
  18. package/dist/components/shared/IdDocumentField.client.js +204 -0
  19. package/dist/components/shared/IdDocumentField.d.ts +1 -24
  20. package/dist/components/shared/IdDocumentField.js +7 -201
  21. package/dist/components/shared/SelfieField.client.d.ts +20 -0
  22. package/dist/components/shared/SelfieField.client.js +327 -0
  23. package/dist/components/shared/SelfieField.d.ts +1 -20
  24. package/dist/components/shared/SelfieField.js +7 -314
  25. package/dist/services/queries.d.ts +1 -1
  26. package/dist/services/queries.js +2528 -2527
  27. package/dist/styles/theme.css +694 -694
  28. package/dist/types/index.d.ts +6 -0
  29. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  30. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  31. package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
  32. package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
  33. package/dist/utils/getGameImageUrl.js +3 -5
  34. package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
  35. package/dist/utils/isBetween3amAnd3pm.js +5 -0
  36. package/package.json +165 -165
  37. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  38. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  39. package/dist/components/FeatureFlag/index.d.ts +0 -1
  40. package/dist/components/FeatureFlag/index.js +0 -1
  41. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  42. package/dist/components/KYC/AutoOpen.js +0 -45
  43. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  44. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  45. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  46. package/dist/components/SignUp/SignUpContext.js +0 -2
  47. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  48. package/dist/components/SignUp/SignUpForm.js +0 -283
  49. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  50. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  51. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  52. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  53. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  54. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  55. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  56. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  57. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  58. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  59. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  60. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  61. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  62. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
@@ -20,7 +20,7 @@ export function useInfiniteQueryHelper(useQuery, variables) {
20
20
  const rows = availablePages.at(page - 1) ?? [];
21
21
  const totalRows = query.data?.pages.at(-1)?.totalCount ?? 0;
22
22
  const totalPages = Math.ceil(totalRows / pageSize);
23
- const hasNextPage = query.data?.pages.at(-1)?.pageInfo.hasNextPage ?? false;
23
+ const hasNextPage = page < totalPages;
24
24
  const hasPrevPage = page > 1;
25
25
  const next = async () => {
26
26
  if (!hasNextPage) {
@@ -2,6 +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 Link from 'next/link';
5
+ import { useRouter } from 'next/navigation';
5
6
  import { twMerge } from 'tailwind-merge';
6
7
  import { useShallow } from 'zustand/shallow';
7
8
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
@@ -45,6 +46,7 @@ const defaultAccountProps = {
45
46
  };
46
47
  const recipe = accountRecipe();
47
48
  export function Account(props) {
49
+ const router = useRouter();
48
50
  const globalStore = useGlobalStore(useShallow((ctx) => ({
49
51
  account: ctx.account,
50
52
  account__mobile: ctx.account__mobile,
@@ -57,14 +59,14 @@ export function Account(props) {
57
59
  }, lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsxs(Drawer.Content, { className: twMerge('relative', 'flex', 'flex-col', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'w-full', 'px-xl', 'py-6', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
58
60
  ['--offset-top-mobile']: mobileOffsetTop,
59
61
  ['--offset-top-desktop']: desktopOffsetTop,
60
- }, children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, {})] }) }) }) }), _jsx(Popover.Root, { open: globalStore.account.open, onOpenChange: (details) => {
62
+ }, children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, { router: router })] }) }) }) }), _jsx(Popover.Root, { open: globalStore.account.open, onOpenChange: (details) => {
61
63
  globalStore.account.setOpen(details.open);
62
64
  }, lazyMount: true, unmountOnExit: true, positioning: {
63
65
  placement: 'bottom',
64
66
  strategy: 'fixed',
65
67
  }, ids: {
66
68
  trigger: 'opexa-portal-components:account-trigger',
67
- }, children: _jsx(Portal, { children: _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "border-border-primary bg-bg-primary relative z-popover w-[23.438rem] overflow-hidden rounded-xl border p-xl ui-open:animate-fade-in ui-closed:animate-fade-out", children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, {})] }) }) }) })] }));
69
+ }, children: _jsx(Portal, { children: _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "border-border-primary bg-bg-primary relative z-popover w-[23.438rem] overflow-hidden rounded-xl border p-xl ui-open:animate-fade-in ui-closed:animate-fade-out", children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, { router: router })] }) }) }) })] }));
68
70
  }
69
71
  function Profile() {
70
72
  const accountQuery = useAccountQuery();
@@ -105,7 +107,7 @@ function Wallet() {
105
107
  globalStore.mobileProfile.setOpen(false);
106
108
  }, children: "Deposit" })] })] }));
107
109
  }
108
- function Links() {
110
+ function Links({ router }) {
109
111
  const accountProps = useAccountPropsContext();
110
112
  const globalStore = useGlobalStore(useShallow((ctx) => ({
111
113
  account: ctx.account,
@@ -116,6 +118,7 @@ function Links() {
116
118
  onSuccess() {
117
119
  localStorage.clear();
118
120
  sessionStorage.clear();
121
+ router.replace('/');
119
122
  },
120
123
  });
121
124
  const unreadMessagesCountQuery = useUnreadMessagesCountQuery({}, { refetchInterval: 5000 });
@@ -87,7 +87,7 @@ function PersonalInfo() {
87
87
  ? data.birthDay
88
88
  : undefined,
89
89
  });
90
- }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Real name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.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 })] })] }), form.formState.isDirty && (_jsxs("div", { className: "border-border-secondary flex justify-end gap-lg border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
90
+ }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.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 })] })] }), form.formState.isDirty && (_jsxs("div", { className: "border-border-secondary flex justify-end gap-lg border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
91
91
  }
92
92
  function ContactInfo() {
93
93
  const localeInfo = useLocaleInfo();
@@ -13,6 +13,7 @@ import { FaceIdIcon } from '../../icons/FaceIdIcon.js';
13
13
  import { FileCheck02Icon } from '../../icons/FileCheck02Icon.js';
14
14
  import { FileSearch02Icon } from '../../icons/FileSearch02Icon.js';
15
15
  import { FileX02Icon } from '../../icons/FileX02Icon.js';
16
+ import { Spinner02Icon } from '../../icons/Spinner02Icon.js';
16
17
  import { Button } from '../../ui/Button/index.js';
17
18
  export function AccountVerification(props) {
18
19
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -28,8 +29,10 @@ export function AccountVerification(props) {
28
29
  const empty = verification == null;
29
30
  const pending = verification?.status === 'PENDING';
30
31
  const success = verification?.status === 'VERIFIED' || verification?.status === 'APPROVED';
31
- const failed = verification?.status === 'REJECTED' ||
32
- verification?.status === 'UNVERIFIED';
32
+ const failed = verification?.status === 'REJECTED';
33
+ if (verificationQuery.isLoading) {
34
+ return _jsx(Spinner02Icon, { className: "text-text-brand-primary-600 size-5" });
35
+ }
33
36
  return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "text-text-secondary-700 text-sm font-semibold", children: "Verify your identity" }), _jsx("p", { className: "text-text-tertiary-600 text-sm", children: "Complete personal verification to unlock all features and enhance account security." })] }), _jsx(ark.svg, { asChild: true, className: twMerge('size-6', profileCompletion?.accountVerification
34
37
  ? 'text-text-success-primary'
35
38
  : 'text-text-warning-primary'), children: profileCompletion?.accountVerification ? (_jsx(CheckVerified02Icon, {})) : (_jsx(AlertCircleIcon, {})) })] }), _jsxs("div", { className: "shadow-xs border-border-secondary bg-bg-primary-alt mt-5 rounded-xl border", children: [_jsx("div", { className: "px-4 py-5", children: _jsxs("ul", { className: "space-y-lg", children: [_jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(FileCheck02Icon, {}), "Basic Information"] }), _jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(CreditCard02Icon, {}), "Government ID"] }), _jsxs("li", { className: "text-text-secondary-700 icon:size-6 icon:text-text-nav-item-button-icon flex items-center gap-lg", children: [_jsx(FaceIdIcon, {}), "Facial Verification"] })] }) }), !isKycCompleted && (_jsx("div", { className: "border-border-secondary flex justify-end border-t px-4 py-3 lg:py-xl", children: _jsx(Button, { size: "sm", className: "w-full lg:w-fit", onClick: () => globalStore.kyc.setOpen(true), children: "Verify Now" }) }))] }), success && _jsx(VerificationSuccess, {}), pending && _jsx(VerificationInProgress, {}), failed && _jsx(VerificationFailed, {}), empty && _jsx(VerificationNotSubmitted, {})] }));
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import emblaCarouselAutoplay from 'embla-carousel-autoplay';
4
4
  import useEmblaCarousel, {} from 'embla-carousel-react';
5
+ import isMobile from 'is-mobile';
5
6
  import Image from 'next/image';
6
7
  import Link from 'next/link';
7
8
  import { Fragment, useEffect, useState } from 'react';
@@ -30,7 +31,7 @@ export function Banner(props) {
30
31
  };
31
32
  }, [emblaApi]);
32
33
  return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
33
- const img = (_jsx(Image, { src: banner.src, alt: "", width: 1200, height: 300, className: "block h-auto w-full rounded-xl", priority: index === 0 }));
34
+ const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? 400 : 1200, height: isMobile() ? 225 : 300, className: "block h-auto w-full", priority: index === 0 }));
34
35
  return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
35
36
  }) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
36
37
  emblaApi?.scrollTo(index);
@@ -16,5 +16,9 @@ export interface BetRecordsProps {
16
16
  */
17
17
  gameProvidersGroup?: Partial<Record<GameType, GameProvider[]>>;
18
18
  className?: string;
19
+ placeholder?: {
20
+ gameProvider?: string;
21
+ status?: string;
22
+ };
19
23
  }
20
24
  export declare function BetRecords__client(props: BetRecordsProps): import("react/jsx-runtime").JSX.Element;
@@ -137,7 +137,7 @@ export function BetRecords__client(props) {
137
137
  });
138
138
  }, lazyMount: true, deselectable: true, positioning: {
139
139
  sameWidth: true,
140
- }, children: [_jsxs(Select.Trigger, { className: "w-full lg:w-[14rem]", children: [_jsx(Select.ValueText, { placeholder: "Game Vendor" }), _jsx(Select.Context, { children: (api) => (_jsx(_Fragment, { children: api.value.length ? (_jsx(Select.ClearTrigger, { asChild: true, children: _jsx("span", { onClick: (e) => {
140
+ }, children: [_jsxs(Select.Trigger, { className: "w-full lg:w-[14rem]", children: [_jsx(Select.ValueText, { placeholder: props.placeholder?.gameProvider ?? 'Game Vendor' }), _jsx(Select.Context, { children: (api) => (_jsx(_Fragment, { children: api.value.length ? (_jsx(Select.ClearTrigger, { asChild: true, children: _jsx("span", { onClick: (e) => {
141
141
  e.stopPropagation();
142
142
  }, children: "Clear" }) })) : (_jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })) })) })] }), _jsx(Portal, { children: _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: providerCollection.items.map((provider) => (_jsxs(Select.Item, { item: provider, children: [_jsx(Select.ItemText, { children: provider.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, provider.id))) }) }) }) })] }), _jsxs(Select.Root, { collection: statusCollection, value: state.status ? [state.status] : [], onValueChange: (details) => {
143
143
  const value = z
@@ -149,7 +149,7 @@ export function BetRecords__client(props) {
149
149
  });
150
150
  }, lazyMount: true, deselectable: true, positioning: {
151
151
  sameWidth: true,
152
- }, children: [_jsxs(Select.Trigger, { className: "w-full lg:w-[14rem]", children: [_jsx(Select.ValueText, { placeholder: "Status" }), _jsx(Select.Context, { children: (api) => (_jsx(_Fragment, { children: api.value.length ? (_jsx(Select.ClearTrigger, { asChild: true, children: _jsx("span", { onClick: (e) => {
152
+ }, children: [_jsxs(Select.Trigger, { className: "w-full lg:w-[14rem]", children: [_jsx(Select.ValueText, { placeholder: props.placeholder?.status ?? 'Status' }), _jsx(Select.Context, { children: (api) => (_jsx(_Fragment, { children: api.value.length ? (_jsx(Select.ClearTrigger, { asChild: true, children: _jsx("span", { onClick: (e) => {
153
153
  e.stopPropagation();
154
154
  }, children: "Clear" }) })) : (_jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })) })) })] }), _jsx(Portal, { children: _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: statusCollection.items.map((status) => (_jsxs(Select.Item, { item: status, children: [_jsx(Select.ItemText, { children: capitalize(status, {
155
155
  delimiter: capitalize.delimiters.UNDERSCORE,
@@ -102,22 +102,27 @@ function CashbackBonus(props) {
102
102
  });
103
103
  },
104
104
  });
105
- const balance = parseDecimal(bonus.balance, 0);
106
- const total = parseDecimal(bonus.total, 0);
105
+ const currentAccumulatedCashbackAmount = parseDecimal(bonus.balance, 0);
106
+ const totalAccumulatedCashbackAmount = parseDecimal(bonus.total, 0);
107
107
  const minimumCashback = parseDecimal(props.data.cashback.minimumCashback, 0);
108
- const maximumMonthlyCashback = parseDecimal(props.data.cashback.maximumMonthlyCashback, 0);
109
- const disabled = balance <= 0 || total > maximumMonthlyCashback || balance < minimumCashback;
108
+ const maximumMonthlyCashbackLimit = parseDecimal(props.data.cashback.maximumMonthlyCashback, 0);
109
+ const hasNoCashback = currentAccumulatedCashbackAmount <= 0;
110
+ const hasReachedOrExceededMonthlyLimit = totalAccumulatedCashbackAmount >= maximumMonthlyCashbackLimit;
111
+ const belowMinimumCashbackThreshold = currentAccumulatedCashbackAmount < minimumCashback;
112
+ const disabled = hasNoCashback ||
113
+ hasReachedOrExceededMonthlyLimit ||
114
+ belowMinimumCashbackThreshold;
110
115
  return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex flex-col overflow-hidden rounded-2xl border", children: [cashback.banner?.url ? (_jsx(Image, { src: cashback.banner.url, alt: "", width: 400, height: 200, className: "h-[11.25rem] w-full object-cover" })) : (_jsx("div", { style: {
111
116
  background: 'radial-gradient(75.21% 75.21% at 50% 50%, rgba(249, 163, 8, 0.3) 0%, rgba(0, 0, 0, 0) 100%), var(--color-bg-primary-alt)',
112
- }, children: _jsx(Image, { src: moneyOnHand, alt: "", className: "mx-auto h-[11.25rem] w-auto shrink-0 object-cover", draggable: false, width: 600, height: 600 }) })), _jsxs("div", { className: "flex grow flex-col px-xl py-3xl", children: [_jsx("p", { className: "line-clamp-1 text-center text-xl font-semibold text-white", children: cashback.name }), _jsx("h2", { className: "mt-2 text-center text-3xl font-semibold text-white", children: formatNumber(bonus.balance, {
117
+ }, children: _jsx(Image, { src: moneyOnHand, alt: "", className: "mx-auto h-[11.25rem] w-auto shrink-0 object-cover", draggable: false, width: 600, height: 600 }) })), _jsxs("div", { className: "flex grow flex-col px-xl py-3xl", children: [_jsx("p", { className: "line-clamp-1 text-center text-xl font-semibold text-white", children: cashback.name }), _jsx("h2", { className: "mt-2 text-center text-3xl font-semibold text-white", children: formatNumber(currentAccumulatedCashbackAmount, {
113
118
  currency: localeInfo.currency.code,
114
119
  }) }), _jsx("div", { className: "text-text-secondary-700 mt-2 line-clamp-1 text-center text-sm", dangerouslySetInnerHTML: {
115
120
  __html: cashback.description,
116
121
  } }), _jsx("div", { className: "grow" }), disabled ? (_jsxs(Popover.Root, { lazyMount: true, unmountOnExit: true, positioning: {
117
122
  placement: 'top',
118
- }, children: [_jsx(Button, { size: "sm", className: "mt-6", "aria-disabled": true, asChild: true, children: _jsx(Popover.Trigger, { children: "Claim" }) }), _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "bg-bg-quaternary rounded-md px-2.5 py-2 text-sm font-medium", children: [_jsx(Popover.Arrow, { className: "arrow-bg-bg-quaternary arrow-size-3", children: _jsx(Popover.ArrowTip, {}) }), "You need", ' ', formatNumber(minimumCashback - balance, {
119
- currency: localeInfo.currency.code,
120
- }), ' ', "to claim this cashback."] }) })] })) : (_jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending || disabled, onClick: () => {
123
+ }, children: [_jsx(Button, { size: "sm", className: "mt-6", "aria-disabled": true, asChild: true, children: _jsx(Popover.Trigger, { children: "Claim" }) }), _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "bg-bg-quaternary rounded-md px-2.5 py-2 text-sm font-medium", children: [_jsx(Popover.Arrow, { className: "arrow-bg-bg-quaternary arrow-size-3", children: _jsx(Popover.ArrowTip, {}) }), hasReachedOrExceededMonthlyLimit ? (_jsx(_Fragment, { children: "You've claimed the maximum cashback for this month." })) : (_jsxs(_Fragment, { children: ["You need", ' ', formatNumber(minimumCashback - currentAccumulatedCashbackAmount, {
124
+ currency: localeInfo.currency.code,
125
+ }), ' ', "to claim this cashback."] }))] }) })] })) : (_jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending || disabled, onClick: () => {
121
126
  claimCashbackBonusMutation.mutate(bonus.id);
122
127
  }, children: "Claim" }))] })] }));
123
128
  }
@@ -6,6 +6,8 @@ import { useCreateGameSessionMutation } from '../../client/hooks/useCreateGameSe
6
6
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
7
7
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
8
8
  import { toaster } from '../../client/utils/toaster.js';
9
+ import { GAMES_AVAILABLE_3PM_TO_3AM } from '../../utils/gamesAvailable3pmTo3am.js';
10
+ import { isBetween3amAnd3pm } from '../../utils/isBetween3amAnd3pm.js';
9
11
  export function GameLaunchTrigger(props) {
10
12
  const sessionQuery = useSessionQuery();
11
13
  const createGameSessionMutation = useCreateGameSessionMutation();
@@ -25,6 +27,11 @@ export function GameLaunchTrigger(props) {
25
27
  : globalStore.gameLaunch.details.status === 'WAITING'
26
28
  ? 'closed'
27
29
  : 'open', ...props, disabled: disabled, onClick: async (e) => {
30
+ // prevent game launch for games that are only available between 3 PM and 3 AM
31
+ if (!isBetween3amAnd3pm() &&
32
+ GAMES_AVAILABLE_3PM_TO_3AM.includes(props.game.name)) {
33
+ return;
34
+ }
28
35
  if (sessionQuery.data?.status === 'unauthenticated') {
29
36
  globalStore.signIn.setOpen(true);
30
37
  return props.onClick?.(e);
@@ -37,8 +37,8 @@ export function GameProvidersCarousel(props) {
37
37
  const viewGamesUrl = (data) => {
38
38
  return props.viewGamesUrl
39
39
  ? callIfFn(props.viewGamesUrl, data)
40
- .replace(':id', data.id)
41
- .replace(':slug', data.slug)
40
+ .replace(':id', data?.id)
41
+ .replace(':slug', data?.slug)
42
42
  : `/providers/${data.slug}`;
43
43
  };
44
44
  const gameProviders = props.gameProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
@@ -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
+ }