@opexa/portal-sdk 0.0.8 → 0.0.10

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.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var ye = Object.defineProperty;
2
- var be = (i, e, t) => e in i ? ye(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var c = (i, e, t) => be(i, typeof e != "symbol" ? e + "" : e, t);
1
+ var ge = Object.defineProperty;
2
+ var Ee = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var m = (i, e, t) => Ee(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as w } from "@opexa/object-id";
5
5
  import { ObjectId as vt } from "@opexa/object-id";
6
- const f = {
6
+ const y = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -15,12 +15,12 @@ const f = {
15
15
  function o(i, ...e) {
16
16
  let t = "";
17
17
  for (const [a, r] of i.entries()) {
18
- const n = e.at(a) ?? "";
19
- t = `${t}${r}${n}`;
18
+ const s = e.at(a) ?? "";
19
+ t = `${t}${r}${s}`;
20
20
  }
21
21
  return t.trim();
22
22
  }
23
- const Se = o`
23
+ const Ae = o`
24
24
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
25
25
  announcements(first: $first, after: $after, filter: $filter) {
26
26
  edges {
@@ -46,15 +46,15 @@ const Se = o`
46
46
  }
47
47
  }
48
48
  }
49
- `, y = o`
49
+ `, g = o`
50
50
  fragment GameFragment on Game {
51
51
  id
52
52
  type
53
53
  name
54
54
  provider
55
55
  }
56
- `, Ae = o`
57
- ${y}
56
+ `, Se = o`
57
+ ${g}
58
58
 
59
59
  query Game($id: ObjectId!) {
60
60
  node(id: $id) {
@@ -63,8 +63,8 @@ const Se = o`
63
63
  }
64
64
  }
65
65
  }
66
- `, Ee = o`
67
- ${y}
66
+ `, ke = o`
67
+ ${g}
68
68
 
69
69
  query Games($after: Cursor, $first: Int, $filter: GameFilterInput) {
70
70
  games(after: $after, first: $first, filter: $filter) {
@@ -83,16 +83,16 @@ const Se = o`
83
83
  }
84
84
  }
85
85
  }
86
- `, ke = o`
87
- ${y}
86
+ `, Ce = o`
87
+ ${g}
88
88
 
89
89
  query GamesByName($search: String!, $filter: GameFilterInput, $first: Int) {
90
90
  gamesByName(search: $search, filter: $filter, first: $first) {
91
91
  ...GameFragment
92
92
  }
93
93
  }
94
- `, Ce = o`
95
- ${y}
94
+ `, Te = o`
95
+ ${g}
96
96
 
97
97
  query GameSession($id: ObjectId!) {
98
98
  node(id: $id) {
@@ -108,21 +108,20 @@ const Se = o`
108
108
  }
109
109
  }
110
110
  }
111
- `, Te = o`
111
+ `, _e = o`
112
112
  mutation CreateGameSession($input: CreateGameSessionInput!) {
113
113
  createGameSession(input: $input) {
114
114
  ... on GameDoesNotExistError {
115
- code: __typename
116
- message
115
+ __typename
117
116
  }
118
117
  }
119
118
  }
120
- `, _e = o`
119
+ `, ve = o`
121
120
  mutation EndGameSession($input: EndGameSessionInput!) {
122
121
  endGameSession(input: $input)
123
122
  }
124
- `, ve = o`
125
- ${y}
123
+ `, Me = o`
124
+ ${g}
126
125
 
127
126
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
128
127
  member {
@@ -180,16 +179,16 @@ const Se = o`
180
179
  }
181
180
  }
182
181
 
183
- ${y}
184
- `, C = o`
182
+ ${g}
183
+ `, T = o`
185
184
  fragment FileFragment on File {
186
185
  id
187
186
  url
188
187
  status
189
188
  dateTimeCreated
190
189
  }
191
- `, pe = o`
192
- ${C}
190
+ `, he = o`
191
+ ${T}
193
192
 
194
193
  query File($id: ObjectId!) {
195
194
  node(id: $id) {
@@ -203,22 +202,19 @@ o`
203
202
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
204
203
  uploadPrivateImageFile(input: $input) {
205
204
  ... on FileFormatNotSupportedError {
206
- code: __typename
207
- message
205
+ __typename
208
206
  }
209
207
  ... on FileNameTooLongError {
210
- code: __typename
211
- message
208
+ __typename
212
209
  }
213
210
  ... on FileSizeTooBigError {
214
- code: __typename
215
- message
211
+ __typename
216
212
  }
217
213
  }
218
214
  }
219
215
  `;
220
216
  const we = o`
221
- ${C}
217
+ ${T}
222
218
 
223
219
  fragment CashbackFragment on Cashback {
224
220
  id
@@ -233,7 +229,7 @@ const we = o`
233
229
  dateTimeCreated
234
230
  dateTimeLastUpdated
235
231
  }
236
- `, Me = o`
232
+ `, Ne = o`
237
233
  ${we}
238
234
 
239
235
  query Cashbacks {
@@ -241,8 +237,8 @@ const we = o`
241
237
  ...CashbackFragment
242
238
  }
243
239
  }
244
- `, _ = o`
245
- ${C}
240
+ `, v = o`
241
+ ${T}
246
242
 
247
243
  fragment PromoFragment on Promo {
248
244
  id
@@ -260,8 +256,8 @@ const we = o`
260
256
  dateTimeCreated
261
257
  dateTimeLastUpdated
262
258
  }
263
- `, Ne = o`
264
- ${_}
259
+ `, Ie = o`
260
+ ${v}
265
261
 
266
262
  query Promos {
267
263
  promos {
@@ -269,15 +265,15 @@ const we = o`
269
265
  }
270
266
  }
271
267
  `, Re = o`
272
- ${_}
268
+ ${v}
273
269
 
274
270
  query AvailablePromos($filter: PromoFilterInput) {
275
271
  availablePromos(filter: $filter) {
276
272
  ...PromoFragment
277
273
  }
278
274
  }
279
- `, Ie = o`
280
- ${_}
275
+ `, xe = o`
276
+ ${v}
281
277
 
282
278
  query Bonus {
283
279
  bonus {
@@ -305,7 +301,7 @@ const we = o`
305
301
  dateTimeLastUpdated
306
302
  }
307
303
  }
308
- `, Ge = o`
304
+ `, Pe = o`
309
305
  ${we}
310
306
 
311
307
  query CashbackBonuses {
@@ -319,12 +315,11 @@ const we = o`
319
315
  dateTimeLastUpdated
320
316
  }
321
317
  }
322
- `, Pe = o`
318
+ `, Ge = o`
323
319
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
324
320
  claimCashbackBonus(input: $input) {
325
321
  ... on CashbackBonusDoesNotExistError {
326
- code: __typename
327
- message
322
+ __typename
328
323
  }
329
324
  }
330
325
  }
@@ -357,118 +352,94 @@ const we = o`
357
352
  }
358
353
  }
359
354
  }
360
- `, Ue = o`
355
+ `, Be = o`
361
356
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
362
357
  createGCashDeposit(input: $input) {
363
358
  ... on DepositPromoMaximumAmountExceededError {
364
- code: __typename
365
- message
359
+ __typename
366
360
  }
367
361
  ... on DepositPromoMinimumAmountNotMetError {
368
- code: __typename
369
- message
362
+ __typename
370
363
  }
371
364
  ... on HasActiveBonusError {
372
- code: __typename
373
- message
365
+ __typename
374
366
  }
375
367
  ... on MaximumDepositAmountExceededError {
376
- code: __typename
377
- message
368
+ __typename
378
369
  }
379
370
  ... on MinimumDepositAmountNotMetError {
380
- code: __typename
381
- message
371
+ __typename
382
372
  }
383
373
  ... on MinimumFirstDepositAmountNotMetError {
384
- code: __typename
385
- message
374
+ __typename
386
375
  }
387
376
  ... on PromoNotEnabledError {
388
- code: __typename
389
- message
377
+ __typename
390
378
  }
391
379
  ... on WalletDoesNotExistError {
392
- code: __typename
393
- message
380
+ __typename
394
381
  }
395
382
  }
396
383
  }
397
- `, xe = o`
384
+ `, We = o`
398
385
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
399
386
  createMayaDeposit(input: $input) {
400
387
  ... on DepositPromoMaximumAmountExceededError {
401
- code: __typename
402
- message
388
+ __typename
403
389
  }
404
390
  ... on DepositPromoMinimumAmountNotMetError {
405
- code: __typename
406
- message
391
+ __typename
407
392
  }
408
393
  ... on HasActiveBonusError {
409
- code: __typename
410
- message
394
+ __typename
411
395
  }
412
396
  ... on MaximumDepositAmountExceededError {
413
- code: __typename
414
- message
397
+ __typename
415
398
  }
416
399
  ... on MinimumDepositAmountNotMetError {
417
- code: __typename
418
- message
400
+ __typename
419
401
  }
420
402
  ... on MinimumFirstDepositAmountNotMetError {
421
- code: __typename
422
- message
403
+ __typename
423
404
  }
424
405
  ... on PromoNotEnabledError {
425
- code: __typename
426
- message
406
+ __typename
427
407
  }
428
408
  ... on WalletDoesNotExistError {
429
- code: __typename
430
- message
409
+ __typename
431
410
  }
432
411
  }
433
412
  }
434
- `, We = o`
413
+ `, Ue = o`
435
414
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
436
415
  createMayaAppDeposit(input: $input) {
437
416
  ... on DepositPromoMaximumAmountExceededError {
438
- code: __typename
439
- message
417
+ __typename
440
418
  }
441
419
  ... on DepositPromoMinimumAmountNotMetError {
442
- code: __typename
443
- message
420
+ __typename
444
421
  }
445
422
  ... on HasActiveBonusError {
446
- code: __typename
447
- message
423
+ __typename
448
424
  }
449
425
  ... on MaximumDepositAmountExceededError {
450
- code: __typename
451
- message
426
+ __typename
452
427
  }
453
428
  ... on MinimumDepositAmountNotMetError {
454
- code: __typename
455
- message
429
+ __typename
456
430
  }
457
431
  ... on MinimumFirstDepositAmountNotMetError {
458
- code: __typename
459
- message
432
+ __typename
460
433
  }
461
434
  ... on PromoNotEnabledError {
462
- code: __typename
463
- message
435
+ __typename
464
436
  }
465
437
  ... on WalletDoesNotExistError {
466
- code: __typename
467
- message
438
+ __typename
468
439
  }
469
440
  }
470
441
  }
471
- `, Be = o`
442
+ `, Oe = o`
472
443
  query Deposit($id: ObjectId!) {
473
444
  node(id: $id) {
474
445
  ... on GCashDeposit {
@@ -508,19 +479,19 @@ const we = o`
508
479
  }
509
480
  }
510
481
  }
511
- `, Oe = o`
482
+ `, qe = o`
512
483
  query DepositsCount {
513
484
  member {
514
485
  depositsCount
515
486
  }
516
487
  }
517
- `, qe = o`
488
+ `, Fe = o`
518
489
  query Member {
519
490
  member {
520
491
  dateTimeLastActive
521
492
  }
522
493
  }
523
- `, Fe = o`
494
+ `, Le = o`
524
495
  query MemberAccount {
525
496
  memberAccount: self {
526
497
  ... on MemberAccount {
@@ -538,13 +509,14 @@ const we = o`
538
509
  mobileNumberVerified
539
510
  mobileNumberVerificationRequired
540
511
  transactionPassword
512
+ secretAnswerSubmitted
541
513
  dateTimeCreated
542
514
  dateTimeLastUpdated
543
515
  }
544
516
  }
545
517
  }
546
- `, Le = o`
547
- ${C}
518
+ `, Ve = o`
519
+ ${T}
548
520
 
549
521
  query MemberVerification {
550
522
  memberAccount: self {
@@ -567,7 +539,7 @@ const we = o`
567
539
  }
568
540
  }
569
541
  }
570
- `, Ve = o`
542
+ `, Ye = o`
571
543
  mutation RegisterMemberAccount(
572
544
  $input: RegisterMemberAccountInput!
573
545
  $referralCode: String
@@ -581,32 +553,25 @@ const we = o`
581
553
  reCAPTCHAResponse: $reCAPTCHAResponse
582
554
  ) {
583
555
  ... on AccountNameNotAvailableError {
584
- code: __typename
585
- message
556
+ __typename
586
557
  }
587
558
  ... on InvalidPlatformError {
588
- code: __typename
589
- message
559
+ __typename
590
560
  }
591
561
  ... on InvalidPlatformError {
592
- code: __typename
593
- message
562
+ __typename
594
563
  }
595
564
  ... on InvalidReCAPTCHAResponseError {
596
- code: __typename
597
- message
565
+ __typename
598
566
  }
599
567
  ... on InvalidSMSVerificationCodeError {
600
- code: __typename
601
- message
568
+ __typename
602
569
  }
603
570
  ... on MinimumAgeRequirementError {
604
- code: __typename
605
- message
571
+ __typename
606
572
  }
607
573
  ... on MobileNumberNotAvailableError {
608
- code: __typename
609
- message
574
+ __typename
610
575
  }
611
576
  }
612
577
  }
@@ -614,45 +579,36 @@ const we = o`
614
579
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
615
580
  updateMemberAccount(input: $input) {
616
581
  ... on AccountNameNotAvailableError {
617
- code: __typename
618
- message
582
+ __typename
619
583
  }
620
584
  ... on EmailAddressNotAvailableError {
621
- code: __typename
622
- message
585
+ __typename
623
586
  }
624
587
  ... on InvalidTransactionPasswordError {
625
- code: __typename
626
- message
588
+ __typename
627
589
  }
628
590
  ... on MobileNumberNotAvailableError {
629
- code: __typename
630
- message
591
+ __typename
631
592
  }
632
593
  ... on NickNameNotAvailableError {
633
- code: __typename
634
- message
594
+ __typename
635
595
  }
636
596
  ... on RealNameAlreadySetError {
637
- code: __typename
638
- message
597
+ __typename
639
598
  }
640
599
  ... on ValidIdAlreadySetError {
641
- code: __typename
642
- message
600
+ __typename
643
601
  }
644
602
  }
645
603
  }
646
- `, Ye = o`
604
+ `, je = o`
647
605
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
648
606
  resetPassword(input: $input, verificationCode: $verificationCode) {
649
607
  ... on AccountNotFoundError {
650
- code: __typename
651
- message
608
+ __typename
652
609
  }
653
610
  ... on InvalidVerificationCodeError {
654
- code: __typename
655
- message
611
+ __typename
656
612
  }
657
613
  }
658
614
  }
@@ -660,71 +616,60 @@ const we = o`
660
616
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
661
617
  deleteMemberAccount(input: $input)
662
618
  }
663
- `, je = o`
619
+ `, Ke = o`
664
620
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
665
621
  sendVerificationCode(input: $input) {
666
622
  ... on InvalidPlatformError {
667
- code: __typename
668
- message
623
+ __typename
669
624
  }
670
625
  ... on NotReadyToSendVerficationCodeError {
671
- code: __typename
672
- message
626
+ __typename
673
627
  }
674
628
  }
675
629
  }
676
- `, Ke = o`
630
+ `, ze = o`
677
631
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
678
632
  verifyMobileNumber(input: $input) {
679
633
  ... on InvalidSMSVerificationCodeError {
680
- code: __typename
681
- message
634
+ __typename
682
635
  }
683
636
  ... on MobileNumberAlreadyVerifiedError {
684
- code: __typename
685
- message
637
+ __typename
686
638
  }
687
639
  }
688
640
  }
689
- `, ze = o`
641
+ `, Je = o`
690
642
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
691
643
  createMemberVerification(input: $input) {
692
644
  ... on FileDoesNotExistError {
693
- code: __typename
694
- message
645
+ __typename
695
646
  }
696
647
  ... on FileNotReadyError {
697
- code: __typename
698
- message
648
+ __typename
699
649
  }
700
650
  ... on MemberVerificationAlreadyExistsError {
701
- code: __typename
702
- message
651
+ __typename
703
652
  }
704
653
  }
705
654
  }
706
- `, Je = o`
655
+ `, Xe = o`
707
656
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
708
657
  updateMemberVerification(input: $input) {
709
658
  ... on FileDoesNotExistError {
710
- code: __typename
711
- message
659
+ __typename
712
660
  }
713
661
  ... on FileNotReadyError {
714
- code: __typename
715
- message
662
+ __typename
716
663
  }
717
664
  ... on MemberVerificationAlreadyApprovedError {
718
- code: __typename
719
- message
665
+ __typename
720
666
  }
721
667
  ... on MemberVerificationDoesNotExistError {
722
- code: __typename
723
- message
668
+ __typename
724
669
  }
725
670
  }
726
671
  }
727
- `, Xe = o`
672
+ `, Ze = o`
728
673
  query ProfileCompletion {
729
674
  profileCompletion {
730
675
  completionPercentage
@@ -735,7 +680,7 @@ const we = o`
735
680
  accountPassword
736
681
  }
737
682
  }
738
- `, Ze = o`
683
+ `, et = o`
739
684
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
740
685
  minimumAmount
741
686
  maximumAmount
@@ -789,7 +734,7 @@ const we = o`
789
734
  multiplier
790
735
  }
791
736
  }
792
- `, et = o`
737
+ `, tt = o`
793
738
  query PointsWallet {
794
739
  pointsWallet {
795
740
  id
@@ -798,16 +743,15 @@ const we = o`
798
743
  dateTimeCreated
799
744
  }
800
745
  }
801
- `, tt = o`
746
+ `, at = o`
802
747
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
803
748
  pointsToCashConversion(input: $input) {
804
749
  ... on InsufficientPointsError {
805
- code: __typename
806
- message
750
+ __typename
807
751
  }
808
752
  }
809
753
  }
810
- `, at = o`
754
+ `, rt = o`
811
755
  query MayaSession($id: ObjectId!) {
812
756
  mayaSession(id: $id) {
813
757
  id
@@ -815,7 +759,7 @@ const we = o`
815
759
  dateTimeCreated
816
760
  }
817
761
  }
818
- `, rt = o`
762
+ `, nt = o`
819
763
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
820
764
  member {
821
765
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -841,7 +785,7 @@ const we = o`
841
785
  }
842
786
  }
843
787
  }
844
- `, nt = o`
788
+ `, ot = o`
845
789
  query Wallet {
846
790
  wallet {
847
791
  id
@@ -851,7 +795,7 @@ const we = o`
851
795
  dateTimeLastUpdated
852
796
  }
853
797
  }
854
- `, st = o`
798
+ `, it = o`
855
799
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
856
800
  member {
857
801
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -918,61 +862,49 @@ const we = o`
918
862
  }
919
863
  }
920
864
  }
921
- `, ot = o`
865
+ `, st = o`
922
866
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
923
867
  createGCashWithdrawal(input: $input) {
924
868
  ... on AccountNotVerifiedError {
925
- code: __typename
926
- message
869
+ __typename
927
870
  }
928
871
  ... on InvalidTransactionPasswordError {
929
- code: __typename
930
- message
872
+ __typename
931
873
  }
932
874
  ... on InvalidWithdrawalAmountError {
933
- code: __typename
934
- message
875
+ __typename
935
876
  }
936
877
  ... on MobileNumberNotVerifiedError {
937
- code: __typename
938
- message
878
+ __typename
939
879
  }
940
880
  ... on NotEnoughBalanceError {
941
- code: __typename
942
- message
881
+ __typename
943
882
  }
944
883
  ... on WithdrawalDailyLimitExceededError {
945
- code: __typename
946
- message
884
+ __typename
947
885
  }
948
886
  }
949
887
  }
950
- `, it = o`
888
+ `, mt = o`
951
889
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
952
890
  createMayaWithdrawal(input: $input) {
953
891
  ... on AccountNotVerifiedError {
954
- code: __typename
955
- message
892
+ __typename
956
893
  }
957
894
  ... on InvalidTransactionPasswordError {
958
- code: __typename
959
- message
895
+ __typename
960
896
  }
961
897
  ... on InvalidWithdrawalAmountError {
962
- code: __typename
963
- message
898
+ __typename
964
899
  }
965
900
  ... on MobileNumberNotVerifiedError {
966
- code: __typename
967
- message
901
+ __typename
968
902
  }
969
903
  ... on NotEnoughBalanceError {
970
- code: __typename
971
- message
904
+ __typename
972
905
  }
973
906
  ... on WithdrawalDailyLimitExceededError {
974
- code: __typename
975
- message
907
+ __typename
976
908
  }
977
909
  }
978
910
  }
@@ -980,24 +912,19 @@ const we = o`
980
912
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
981
913
  createMayaAppWithdrawal(input: $input) {
982
914
  ... on AccountNotVerifiedError {
983
- code: __typename
984
- message
915
+ __typename
985
916
  }
986
917
  ... on InvalidTransactionPasswordError {
987
- code: __typename
988
- message
918
+ __typename
989
919
  }
990
920
  ... on InvalidWithdrawalAmountError {
991
- code: __typename
992
- message
921
+ __typename
993
922
  }
994
923
  ... on NotEnoughBalanceError {
995
- code: __typename
996
- message
924
+ __typename
997
925
  }
998
926
  ... on WithdrawalDailyLimitExceededError {
999
- code: __typename
1000
- message
927
+ __typename
1001
928
  }
1002
929
  }
1003
930
  }
@@ -1005,54 +932,99 @@ const we = o`
1005
932
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
1006
933
  createBankWithdrawal(input: $input) {
1007
934
  ... on MobileNumberNotVerifiedError {
1008
- code: __typename
1009
- message
935
+ __typename
1010
936
  }
1011
937
  ... on AccountNotVerifiedError {
1012
- code: __typename
1013
- message
938
+ __typename
1014
939
  }
1015
940
  ... on InvalidWithdrawalAmountError {
1016
- code: __typename
1017
- message
941
+ __typename
1018
942
  }
1019
943
  ... on WithdrawalDailyLimitExceededError {
1020
- code: __typename
1021
- message
944
+ __typename
1022
945
  }
1023
946
  ... on InvalidTransactionPasswordError {
1024
- code: __typename
1025
- message
947
+ __typename
1026
948
  }
1027
949
  ... on NotEnoughBalanceError {
1028
- code: __typename
1029
- message
950
+ __typename
1030
951
  }
1031
952
  }
1032
953
  }
1033
- `, mt = o`
954
+ `, ut = o`
1034
955
  query RemainingDailyWithdrawalsCount {
1035
956
  remainingDailyWithdrawalsCount
1036
957
  }
1037
958
  `;
1038
- class ut {
959
+ function d(i) {
960
+ return {
961
+ name: i,
962
+ message: {
963
+ AccountNameNotAvailableError: "Username is no longer available",
964
+ AccountNotFoundError: "Account does not exist",
965
+ AccountNotVerifiedError: "Account is not verified",
966
+ CashbackBonusDoesNotExistError: "Cashback bonus does not exists",
967
+ DepositPromoMaximumAmountExceededError: "Deposit amount exceeds maximum amount",
968
+ DepositPromoMinimumAmountNotMetError: "Deposit amount does not meet minimum amount",
969
+ EmailAddressNotAvailableError: "Email is no longer available",
970
+ FileDoesNotExistError: "File does not exist",
971
+ FileFormatNotSupportedError: "File format is not supported",
972
+ FileNameTooLongError: "File name is too long",
973
+ FileNotReadyError: "File is not yet ready",
974
+ FileSizeTooBigError: "File size is too big",
975
+ GameDoesNotExistError: "Game does not exist",
976
+ HasActiveBonusError: "Account has active bonus",
977
+ InsufficientPointsError: "Insufficient points",
978
+ InvalidPlatformError: "Invalid platform",
979
+ InvalidReCAPTCHAResponseError: "Invalid reCAPTCHA",
980
+ InvalidSMSVerificationCodeError: "Invalid SMS verification code",
981
+ InvalidTransactionPasswordError: "Invalid transaction password",
982
+ InvalidVerificationCodeError: "Invalid verification code",
983
+ InvalidWithdrawalAmountError: "Invalid withdrawal amount",
984
+ MaximumDepositAmountExceededError: "Maximum deposit amount exceeded",
985
+ MemberVerificationAlreadyApprovedError: "Member verification is already approved",
986
+ MemberVerificationAlreadyExistsError: "Member verification already exists",
987
+ MemberVerificationDoesNotExistError: "Member verification does not exist",
988
+ MinimumAgeRequirementError: "Minimum age requirement not met",
989
+ MinimumDepositAmountNotMetError: "Minimum deposit amount not met",
990
+ MinimumFirstDepositAmountNotMetError: "Minimum first deposit amount not met",
991
+ MobileNumberAlreadyVerifiedError: "Mobile number is already verified",
992
+ MobileNumberNotAvailableError: "Mobile number is no longer available",
993
+ MobileNumberNotVerifiedError: "Mobile number is not verified",
994
+ NickNameNotAvailableError: "Nickname is no longer available",
995
+ NotEnoughBalanceError: "Insufficient balance",
996
+ NotReadyToSendVerficationCodeError: "Not ready to send verification code",
997
+ PromoNotEnabledError: "Promo is not enabled",
998
+ RealNameAlreadySetError: "Real name is already set",
999
+ ValidIdAlreadySetError: "Valid ID is already set",
1000
+ WalletDoesNotExistError: "Wallet does not exist",
1001
+ WithdrawalDailyLimitExceededError: "Daily withdrawal limit exceeded",
1002
+ AccountBlacklisted: "Account is blacklisted",
1003
+ AccountNotFound: "Account not found",
1004
+ InvalidToken: "Invalid token",
1005
+ InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1006
+ SessionExpired: "Session expired"
1007
+ }[i]
1008
+ };
1009
+ }
1010
+ class lt {
1039
1011
  constructor(e) {
1040
- c(this, "client");
1012
+ m(this, "client");
1041
1013
  this.client = e;
1042
1014
  }
1043
1015
  /** aka `Query.self` */
1044
1016
  async memberAccount() {
1045
- const e = await this.client.request(Fe);
1017
+ const e = await this.client.request(Le);
1046
1018
  return e.ok ? {
1047
1019
  ok: !0,
1048
1020
  data: e.data.memberAccount
1049
1021
  } : e;
1050
1022
  }
1051
1023
  async registerMemberAccount(e) {
1052
- const t = await this.client.request(Ve, e);
1024
+ const t = await this.client.request(Ye, e);
1053
1025
  return t.ok ? t.data.registerMemberAccount ? {
1054
1026
  ok: !1,
1055
- error: t.data.registerMemberAccount
1027
+ error: d(t.data.registerMemberAccount.__typename)
1056
1028
  } : {
1057
1029
  ok: !0
1058
1030
  } : t;
@@ -1061,7 +1033,7 @@ class ut {
1061
1033
  const t = await this.client.request(He, e);
1062
1034
  return t.ok ? t.data.updateMemberAccount ? {
1063
1035
  ok: !1,
1064
- error: t.data.updateMemberAccount
1036
+ error: d(t.data.updateMemberAccount.__typename)
1065
1037
  } : {
1066
1038
  ok: !0
1067
1039
  } : t;
@@ -1073,68 +1045,68 @@ class ut {
1073
1045
  } : {
1074
1046
  ok: !1,
1075
1047
  error: {
1076
- code: "UnknownError",
1048
+ name: "UnknownError",
1077
1049
  message: "Something went wrong."
1078
1050
  }
1079
1051
  } : t;
1080
1052
  }
1081
1053
  async resetPassword(e) {
1082
1054
  const t = await this.client.request(
1083
- Ye,
1055
+ je,
1084
1056
  e
1085
1057
  );
1086
1058
  return t.ok ? t.data.resetPassword ? {
1087
1059
  ok: !1,
1088
- error: t.data.resetPassword
1060
+ error: d(t.data.resetPassword.__typename)
1089
1061
  } : {
1090
1062
  ok: !0
1091
1063
  } : t;
1092
1064
  }
1093
1065
  async profileCompletion() {
1094
- const e = await this.client.request(Xe);
1066
+ const e = await this.client.request(Ze);
1095
1067
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1096
1068
  }
1097
1069
  async platform() {
1098
- return await this.client.request(Ze);
1070
+ return await this.client.request(et);
1099
1071
  }
1100
1072
  async sendVerificationCode(e) {
1101
- const t = await this.client.request(je, e);
1073
+ const t = await this.client.request(Ke, e);
1102
1074
  return t.ok ? t.data.sendVerificationCode ? {
1103
1075
  ok: !1,
1104
- error: t.data.sendVerificationCode
1076
+ error: d(t.data.sendVerificationCode.__typename)
1105
1077
  } : {
1106
1078
  ok: !0
1107
1079
  } : t;
1108
1080
  }
1109
1081
  async verifyMobileNumber(e) {
1110
- const t = await this.client.request(Ke, e);
1082
+ const t = await this.client.request(ze, e);
1111
1083
  return t.ok ? t.data.verifyMobileNumber ? {
1112
1084
  ok: !1,
1113
- error: t.data.verifyMobileNumber
1085
+ error: d(t.data.verifyMobileNumber.__typename)
1114
1086
  } : {
1115
1087
  ok: !0
1116
1088
  } : t;
1117
1089
  }
1118
1090
  async createMemberVerification(e) {
1119
- const t = await this.client.request(ze, e);
1091
+ const t = await this.client.request(Je, e);
1120
1092
  return t.ok ? t.data.createMemberVerification ? {
1121
1093
  ok: !1,
1122
- error: t.data.createMemberVerification
1094
+ error: d(t.data.createMemberVerification.__typename)
1123
1095
  } : {
1124
1096
  ok: !0
1125
1097
  } : t;
1126
1098
  }
1127
1099
  async updateMemberVerification(e) {
1128
- const t = await this.client.request(Je, e);
1100
+ const t = await this.client.request(Xe, e);
1129
1101
  return t.ok ? t.data.updateMemberVerification ? {
1130
1102
  ok: !1,
1131
- error: t.data.updateMemberVerification
1103
+ error: d(t.data.updateMemberVerification.__typename)
1132
1104
  } : {
1133
1105
  ok: !0
1134
1106
  } : t;
1135
1107
  }
1136
1108
  async memberVerification() {
1137
- const e = await this.client.request(Le);
1109
+ const e = await this.client.request(Ve);
1138
1110
  return e.ok ? {
1139
1111
  ok: !0,
1140
1112
  data: e.data.memberAccount.verification
@@ -1142,7 +1114,7 @@ class ut {
1142
1114
  }
1143
1115
  async announcements(e) {
1144
1116
  const t = await this.client.request(
1145
- Se,
1117
+ Ae,
1146
1118
  e
1147
1119
  );
1148
1120
  return t.ok ? {
@@ -1151,304 +1123,231 @@ class ut {
1151
1123
  } : t;
1152
1124
  }
1153
1125
  }
1154
- function h(i, e) {
1155
- const t = T[i] ? T[i] : T[500];
1126
+ function u(i, e) {
1127
+ const t = _[i] ? _[i] : _[500];
1156
1128
  return {
1157
- code: t.code,
1129
+ name: t.name,
1158
1130
  message: e ?? t.message
1159
1131
  };
1160
1132
  }
1161
- const T = {
1162
- 400: { code: "HttpBadRequest", message: "Bad Request" },
1163
- 401: { code: "HttpUnauthorized", message: "Unauthorized" },
1164
- 403: { code: "HttpForbidden", message: "Forbidden" },
1165
- 404: { code: "HttpNotFound", message: "Not Found" },
1166
- 408: { code: "HttpRequestTimeout", message: "Request Timeout" },
1167
- 429: { code: "HttpTooManyRequests", message: "Too Many Requests" },
1168
- 500: { code: "HttpInternalServerError", message: "Internal Server Error" }
1133
+ const _ = {
1134
+ 400: { name: "HttpBadRequest", message: "Bad Request" },
1135
+ 401: { name: "HttpUnauthorized", message: "Unauthorized" },
1136
+ 403: { name: "HttpForbidden", message: "Forbidden" },
1137
+ 404: { name: "HttpNotFound", message: "Not Found" },
1138
+ 408: { name: "HttpRequestTimeout", message: "Request Timeout" },
1139
+ 429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1140
+ 500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1169
1141
  };
1170
- class lt {
1171
- constructor(e, t) {
1172
- c(this, "url");
1173
- c(this, "options");
1174
- c(this, "middlewares");
1175
- var r;
1176
- const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1177
- a.append("Content-Type", "application/json"), this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
1142
+ class pt {
1143
+ constructor(e) {
1144
+ m(this, "url");
1145
+ m(this, "platform");
1146
+ this.url = e.url, this.platform = e.platform;
1178
1147
  }
1179
- async post(e, t) {
1180
- const a = new URL(this.url);
1181
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((d, m) => {
1182
- a.searchParams.append(m, d);
1183
- });
1184
- const r = t != null && t.body ? JSON.stringify(t.body) : void 0, n = await this.runMiddlewares(
1185
- new Request(a, {
1186
- ...this.options,
1187
- body: r,
1188
- method: "POST"
1189
- })
1190
- );
1191
- t != null && t.headers && new Headers(t.headers).forEach((d, m) => {
1192
- n.headers.set(m, d);
1148
+ async createSession(e) {
1149
+ const t = new Headers({
1150
+ "Content-Type": "application/json",
1151
+ "Platform-Code": this.platform,
1152
+ Role: "MEMBER"
1193
1153
  });
1154
+ switch (e.type) {
1155
+ case "NAME_AND_PASSWORD": {
1156
+ const a = `${e.name}:${e.password}`, r = Buffer.from(a).toString("base64");
1157
+ t.set("Authorization", `Basic ${r}`);
1158
+ break;
1159
+ }
1160
+ case "MOBILE_NUMBER": {
1161
+ const a = `${e.mobileNumber}:${e.verificationCode}`, r = Buffer.from(a).toString("base64");
1162
+ t.set("Authorization", `MobileNumberOTP ${r}`);
1163
+ break;
1164
+ }
1165
+ case "MAYA": {
1166
+ t.set("Authorization", `Maya ${e.sessionId}`);
1167
+ break;
1168
+ }
1169
+ }
1194
1170
  try {
1195
- const d = await fetch(n);
1196
- return d.ok ? {
1171
+ const a = await fetch(`${this.url}/sessions`, {
1172
+ method: "POST",
1173
+ headers: t
1174
+ }), r = await a.json();
1175
+ return a.ok ? {
1197
1176
  ok: !0,
1198
- data: await d.json()
1177
+ data: r
1178
+ } : r.code === "ACCOUNT_BLACKLISTED" ? {
1179
+ ok: !1,
1180
+ error: d("AccountBlacklisted")
1199
1181
  } : {
1200
1182
  ok: !1,
1201
- error: await this.safeToJson(d) ?? h(d.status)
1183
+ error: u(a.status)
1202
1184
  };
1203
1185
  } catch {
1204
1186
  return {
1205
1187
  ok: !1,
1206
- error: {
1207
- code: "HttpInternalServerError",
1208
- message: "Something went wrong."
1209
- }
1188
+ error: u(500)
1210
1189
  };
1211
1190
  }
1212
1191
  }
1213
- async get(e, t) {
1214
- const a = new URL(this.url);
1215
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((n, d) => {
1216
- a.searchParams.append(d, n);
1217
- });
1218
- const r = await this.runMiddlewares(
1219
- new Request(a, {
1220
- ...this.options,
1221
- method: "GET"
1222
- })
1223
- );
1224
- t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
1225
- r.headers.set(d, n);
1192
+ async authenticate(e) {
1193
+ const t = new Headers({
1194
+ "Content-Type": "application/json",
1195
+ "Platform-Code": this.platform,
1196
+ Role: "MEMBER"
1226
1197
  });
1198
+ if (e.type === "SECURITY_QUESTION") {
1199
+ t.set("Authorization", `Bearer ${e.token}`);
1200
+ try {
1201
+ const a = await fetch(`${this.url}/session/${e.token}/authenticate`, {
1202
+ method: "POST",
1203
+ headers: t,
1204
+ body: JSON.stringify({
1205
+ secretAnswer: e.secretAnswer
1206
+ })
1207
+ }), r = await a.json();
1208
+ return a.ok ? {
1209
+ ok: !0,
1210
+ data: r
1211
+ } : a.status === 401 || a.status === 403 ? {
1212
+ ok: !1,
1213
+ error: d("InvalidTokenOrSecretAnswer")
1214
+ } : {
1215
+ ok: !1,
1216
+ error: u(a.status)
1217
+ };
1218
+ } catch {
1219
+ return {
1220
+ ok: !1,
1221
+ error: u(500)
1222
+ };
1223
+ }
1224
+ }
1225
+ throw new Error("Invalid input 'type'");
1226
+ }
1227
+ async refreshSession(e) {
1227
1228
  try {
1228
- const n = await fetch(r);
1229
- return n.ok ? {
1229
+ const t = await fetch(`${this.url}/session:refresh`, {
1230
+ method: "POST",
1231
+ headers: {
1232
+ "Content-Type": "application/json",
1233
+ "Platform-Code": this.platform,
1234
+ Role: "MEMBER",
1235
+ Authorization: `Bearer ${e}`
1236
+ }
1237
+ }), a = await t.json();
1238
+ return t.ok ? {
1230
1239
  ok: !0,
1231
- data: await n.json()
1232
- } : {
1240
+ data: a
1241
+ } : a.code === "ACCOUNT_BLACKLISTED" ? {
1233
1242
  ok: !1,
1234
- error: await this.safeToJson(n) ?? h(n.status)
1235
- };
1236
- } catch {
1237
- return {
1243
+ error: d("AccountBlacklisted")
1244
+ } : t.status === 403 || t.status === 401 ? {
1238
1245
  ok: !1,
1239
- error: {
1240
- code: "HttpInternalServerError",
1241
- message: "Something went wrong."
1242
- }
1243
- };
1244
- }
1245
- }
1246
- async delete(e, t) {
1247
- const a = new URL(this.url);
1248
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((n, d) => {
1249
- a.searchParams.append(d, n);
1250
- });
1251
- const r = await this.runMiddlewares(
1252
- new Request(a, {
1253
- ...this.options,
1254
- method: "DELETE"
1255
- })
1256
- );
1257
- t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
1258
- r.headers.set(d, n);
1259
- });
1260
- try {
1261
- const n = await fetch(r);
1262
- return n.ok ? {
1263
- ok: !0
1246
+ error: d("InvalidToken")
1264
1247
  } : {
1265
1248
  ok: !1,
1266
- error: h(n.status)
1249
+ error: u(t.status)
1267
1250
  };
1268
1251
  } catch {
1269
1252
  return {
1270
1253
  ok: !1,
1271
- error: {
1272
- code: "HttpInternalServerError",
1273
- message: "Something went wrong."
1274
- }
1254
+ error: u(500)
1275
1255
  };
1276
1256
  }
1277
1257
  }
1278
- async runMiddlewares(e) {
1279
- let t = e.clone();
1280
- for (const a of this.middlewares)
1281
- t = await a(t);
1282
- return t;
1283
- }
1284
- async safeToJson(e) {
1258
+ async destroySession(e) {
1285
1259
  try {
1286
- return await e.json();
1260
+ const t = await fetch(`${this.url}/session`, {
1261
+ method: "DELETE",
1262
+ headers: {
1263
+ "Content-Type": "application/json",
1264
+ "Platform-Code": this.platform,
1265
+ Role: "MEMBER",
1266
+ Authorization: `Bearer ${e}`
1267
+ }
1268
+ });
1269
+ return t.ok ? { ok: !0 } : { ok: !1, error: u(t.status) };
1287
1270
  } catch {
1288
- return null;
1271
+ return { ok: !1, error: u(500) };
1289
1272
  }
1290
1273
  }
1291
- }
1292
- class pt {
1293
- constructor(e) {
1294
- c(this, "client");
1295
- this.client = new lt(e.url, {
1296
- middlewares: [
1297
- (t) => (t.headers.set("Platform-Code", e.platform), t.headers.set("Role", "MEMBER"), t)
1298
- ]
1299
- });
1300
- }
1301
- async createSession(e) {
1302
- const t = new Headers();
1303
- switch (e.type) {
1304
- case "NAME_AND_PASSWORD": {
1305
- const r = `${e.name}:${e.password}`, n = Buffer.from(r).toString("base64");
1306
- t.set("Authorization", `Basic ${n}`);
1307
- break;
1308
- }
1309
- case "MOBILE_NUMBER": {
1310
- const r = `${e.mobileNumber}:${e.verificationCode}`, n = Buffer.from(r).toString("base64");
1311
- t.set("Authorization", `MobileNumberOTP ${n}`);
1312
- break;
1313
- }
1314
- case "MAYA": {
1315
- t.set("Authorization", `Maya ${e.sessionId}`);
1316
- break;
1317
- }
1318
- }
1319
- const a = await this.client.post("/sessions", {
1320
- headers: t
1321
- });
1322
- return a.ok ? a : a.error.code === "ACCOUNT_BLACKLISTED" ? {
1323
- ok: !1,
1324
- error: {
1325
- code: "AccountBlacklisted",
1326
- message: "Account is blacklisted"
1327
- }
1328
- } : a.error.code === "HttpForbidden" || a.error.code === "HttpUnauthorized" ? {
1329
- ok: !1,
1330
- error: {
1331
- code: "AccountNotFound",
1332
- message: "Invalid credentials."
1333
- }
1334
- } : a;
1335
- }
1336
- async authenticate(e) {
1337
- if (e.type === "SECURITY_QUESTION") {
1338
- const t = await this.client.post(
1339
- `/session/${e.token}/authenticate`,
1340
- {
1341
- body: {
1342
- secretAnswer: e.secretAnswer
1343
- }
1344
- }
1345
- );
1346
- return t.ok ? t : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
1347
- ok: !1,
1348
- error: {
1349
- code: "InvalidTokenOrAnswer",
1350
- message: "Invalid token or secret answer"
1274
+ async verifySession(e) {
1275
+ try {
1276
+ return (await fetch(`${this.url}/session`, {
1277
+ method: "GET",
1278
+ headers: {
1279
+ "Content-Type": "application/json",
1280
+ "Platform-Code": this.platform,
1281
+ Role: "MEMBER",
1282
+ Authorization: `Bearer ${e}`
1351
1283
  }
1352
- } : t;
1284
+ })).ok;
1285
+ } catch {
1286
+ return !0;
1353
1287
  }
1354
- throw new Error("Invalid input 'type'");
1355
- }
1356
- async refreshSession(e) {
1357
- const t = await this.client.post("/session:refresh", {
1358
- headers: {
1359
- Authorization: `Bearer ${e}`
1360
- }
1361
- });
1362
- return t.ok ? t : t.error.code === "ACCOUNT_BLACKLISTED" ? {
1363
- ok: !1,
1364
- error: {
1365
- code: "AccountBlacklisted",
1366
- message: "Account is blacklisted"
1367
- }
1368
- } : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
1369
- ok: !1,
1370
- error: {
1371
- code: "InvalidToken",
1372
- message: "Invalid token."
1373
- }
1374
- } : t;
1375
- }
1376
- async destroySession(e) {
1377
- return await this.client.delete("/session", {
1378
- headers: {
1379
- Authorization: `Bearer ${e}`
1380
- }
1381
- });
1382
- }
1383
- async verifySession(e) {
1384
- return (await this.client.get("/session", {
1385
- headers: {
1386
- Authorization: `Bearer ${e}`
1387
- }
1388
- })).ok;
1389
1288
  }
1390
1289
  }
1391
1290
  class ht {
1392
1291
  constructor(e) {
1393
- c(this, "client");
1292
+ m(this, "client");
1394
1293
  this.client = e;
1395
1294
  }
1396
1295
  async file(e) {
1397
- const t = await this.client.request(pe, e);
1296
+ const t = await this.client.request(he, e);
1398
1297
  return t.ok ? {
1399
1298
  ok: !0,
1400
1299
  data: t.data.node
1401
1300
  } : t;
1402
1301
  }
1403
1302
  async uploadPrivateImageFile(e) {
1404
- const t = await this.client.upload(pe, e);
1303
+ const t = await this.client.upload(he, e);
1405
1304
  return t.ok ? t.data.uploadPrivateImageFile ? {
1406
1305
  ok: !1,
1407
- error: t.data.uploadPrivateImageFile
1306
+ error: d(t.data.uploadPrivateImageFile.__typename)
1408
1307
  } : {
1409
1308
  ok: !0
1410
1309
  } : t;
1411
1310
  }
1412
1311
  }
1413
- class fe {
1312
+ class ye {
1414
1313
  constructor(e) {
1415
- c(this, "client");
1314
+ m(this, "client");
1416
1315
  this.client = e;
1417
1316
  }
1418
1317
  async game(e) {
1419
- const t = await this.client.request(Ae, e);
1318
+ const t = await this.client.request(Se, e);
1420
1319
  return t.ok ? { ok: !0, data: t.data.node } : t;
1421
1320
  }
1422
1321
  async games(e) {
1423
- const t = await this.client.request(Ee, e);
1322
+ const t = await this.client.request(ke, e);
1424
1323
  return t.ok ? { ok: !0, data: t.data.games } : t;
1425
1324
  }
1426
1325
  async gamesByName(e) {
1427
1326
  const t = await this.client.request(
1428
- ke,
1327
+ Ce,
1429
1328
  e
1430
1329
  );
1431
1330
  return t.ok ? { ok: !0, data: t.data.gamesByName } : t;
1432
1331
  }
1433
1332
  async gameSession(e) {
1434
1333
  const t = await this.client.request(
1435
- Ce,
1334
+ Te,
1436
1335
  e
1437
1336
  );
1438
1337
  return t.ok ? { ok: !0, data: t.data.node } : t;
1439
1338
  }
1440
1339
  async createGameSession(e) {
1441
- const t = await this.client.request(Te, e);
1340
+ const t = await this.client.request(_e, e);
1442
1341
  return t.ok ? t.data.createGameSession ? {
1443
1342
  ok: !1,
1444
- error: t.data.createGameSession
1343
+ error: d(t.data.createGameSession.__typename)
1445
1344
  } : {
1446
1345
  ok: !0
1447
1346
  } : t;
1448
1347
  }
1449
1348
  async endGameSession(e) {
1450
1349
  const t = await this.client.request(
1451
- _e,
1350
+ ve,
1452
1351
  e
1453
1352
  );
1454
1353
  return t.ok ? t.data.endGameSession ? {
@@ -1456,31 +1355,31 @@ class fe {
1456
1355
  } : {
1457
1356
  ok: !1,
1458
1357
  error: {
1459
- code: "UnknownError",
1358
+ name: "UnknownError",
1460
1359
  message: "Something went wrong."
1461
1360
  }
1462
1361
  } : t;
1463
1362
  }
1464
1363
  }
1465
- class wt {
1364
+ class ft {
1466
1365
  constructor(e) {
1467
- c(this, "client");
1366
+ m(this, "client");
1468
1367
  this.client = e;
1469
1368
  }
1470
1369
  async betRecords(e) {
1471
1370
  const t = await this.client.request(
1472
- ve,
1371
+ Me,
1473
1372
  e
1474
1373
  );
1475
1374
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1476
1375
  }
1477
1376
  async transactionRecords(e) {
1478
- const t = await this.client.request(rt, e);
1377
+ const t = await this.client.request(nt, e);
1479
1378
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1480
1379
  }
1481
1380
  async withdrawalRecords(e) {
1482
1381
  const t = await this.client.request(
1483
- st,
1382
+ it,
1484
1383
  e
1485
1384
  );
1486
1385
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
@@ -1493,17 +1392,17 @@ class wt {
1493
1392
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1494
1393
  }
1495
1394
  async depositsCount() {
1496
- const e = await this.client.request(Oe);
1395
+ const e = await this.client.request(qe);
1497
1396
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1498
1397
  }
1499
1398
  async member() {
1500
- const e = await this.client.request(qe);
1399
+ const e = await this.client.request(Fe);
1501
1400
  return e.ok ? { ok: e.ok, data: e.data.member } : e;
1502
1401
  }
1503
1402
  }
1504
- class ft {
1403
+ class wt {
1505
1404
  constructor(e) {
1506
- c(this, "url");
1405
+ m(this, "url");
1507
1406
  this.url = e.url;
1508
1407
  }
1509
1408
  gameThumbnails(e) {
@@ -1513,13 +1412,13 @@ class ft {
1513
1412
  ];
1514
1413
  }
1515
1414
  }
1516
- class gt extends fe {
1415
+ class yt extends ye {
1517
1416
  async promos() {
1518
- const e = await this.client.request(Ne);
1417
+ const e = await this.client.request(Ie);
1519
1418
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1520
1419
  }
1521
1420
  async cashbacks() {
1522
- const e = await this.client.request(Me);
1421
+ const e = await this.client.request(Ne);
1523
1422
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1524
1423
  }
1525
1424
  async availablePromos(e) {
@@ -1530,14 +1429,14 @@ class gt extends fe {
1530
1429
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1531
1430
  }
1532
1431
  async cashbackBonuses() {
1533
- const e = await this.client.request(Ge);
1432
+ const e = await this.client.request(Pe);
1534
1433
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1535
1434
  }
1536
1435
  async claimCashbackBonus(e) {
1537
- const t = await this.client.request(Pe, e);
1436
+ const t = await this.client.request(Ge, e);
1538
1437
  return t.ok ? t.data.claimCashbackBonus ? {
1539
1438
  ok: !1,
1540
- error: t.data.claimCashbackBonus
1439
+ error: d(t.data.claimCashbackBonus.__typename)
1541
1440
  } : {
1542
1441
  ok: !0
1543
1442
  } : {
@@ -1546,61 +1445,61 @@ class gt extends fe {
1546
1445
  };
1547
1446
  }
1548
1447
  async bonus() {
1549
- const e = await this.client.request(Ie);
1448
+ const e = await this.client.request(xe);
1550
1449
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1551
1450
  }
1552
1451
  async wallet() {
1553
- const e = await this.client.request(nt);
1452
+ const e = await this.client.request(ot);
1554
1453
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1555
1454
  }
1556
1455
  async deposit(e) {
1557
1456
  const t = await this.client.request(
1558
- Be,
1457
+ Oe,
1559
1458
  e
1560
1459
  );
1561
1460
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1562
1461
  }
1563
1462
  async createGCashDeposit(e) {
1564
- const t = await this.client.request(Ue, e);
1463
+ const t = await this.client.request(Be, e);
1565
1464
  return t.ok ? t.data.createGCashDeposit ? {
1566
1465
  ok: !1,
1567
- error: t.data.createGCashDeposit
1466
+ error: d(t.data.createGCashDeposit.__typename)
1568
1467
  } : {
1569
1468
  ok: !0
1570
1469
  } : t;
1571
1470
  }
1572
1471
  async createMayaDeposit(e) {
1573
- const t = await this.client.request(xe, e);
1472
+ const t = await this.client.request(We, e);
1574
1473
  return t.ok ? t.data.createMayaDeposit ? {
1575
1474
  ok: !1,
1576
- error: t.data.createMayaDeposit
1475
+ error: d(t.data.createMayaDeposit.__typename)
1577
1476
  } : {
1578
1477
  ok: !0
1579
1478
  } : t;
1580
1479
  }
1581
1480
  async createMayaAppDeposit(e) {
1582
- const t = await this.client.request(We, e);
1481
+ const t = await this.client.request(Ue, e);
1583
1482
  return t.ok ? t.data.createMayaAppDeposit ? {
1584
1483
  ok: !1,
1585
- error: t.data.createMayaAppDeposit
1484
+ error: d(t.data.createMayaAppDeposit.__typename)
1586
1485
  } : {
1587
1486
  ok: !0
1588
1487
  } : t;
1589
1488
  }
1590
1489
  async createGCashWithdrawal(e) {
1591
- const t = await this.client.request(ot, e);
1490
+ const t = await this.client.request(st, e);
1592
1491
  return t.ok ? t.data.createGCashWithdrawal ? {
1593
1492
  ok: !1,
1594
- error: t.data.createGCashWithdrawal
1493
+ error: d(t.data.createGCashWithdrawal.__typename)
1595
1494
  } : {
1596
1495
  ok: !0
1597
1496
  } : t;
1598
1497
  }
1599
1498
  async createMayaWithdrawal(e) {
1600
- const t = await this.client.request(it, e);
1499
+ const t = await this.client.request(mt, e);
1601
1500
  return t.ok ? t.data.createMayaWithdrawal ? {
1602
1501
  ok: !1,
1603
- error: t.data.createMayaWithdrawal
1502
+ error: d(t.data.createMayaWithdrawal.__typename)
1604
1503
  } : {
1605
1504
  ok: !0
1606
1505
  } : t;
@@ -1609,7 +1508,7 @@ class gt extends fe {
1609
1508
  const t = await this.client.request(dt, e);
1610
1509
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1611
1510
  ok: !1,
1612
- error: t.data.createMayaAppWithdrawal
1511
+ error: d(t.data.createMayaAppWithdrawal.__typename)
1613
1512
  } : {
1614
1513
  ok: !0
1615
1514
  } : t;
@@ -1618,41 +1517,41 @@ class gt extends fe {
1618
1517
  const t = await this.client.request(ct, e);
1619
1518
  return t.ok ? t.data.createBankWithdrawal ? {
1620
1519
  ok: !1,
1621
- error: t.data.createBankWithdrawal
1520
+ error: d(t.data.createBankWithdrawal.__typename)
1622
1521
  } : {
1623
1522
  ok: !0
1624
1523
  } : t;
1625
1524
  }
1626
1525
  async remainingDailyWithdrawalsCount() {
1627
1526
  const e = await this.client.request(
1628
- mt
1527
+ ut
1629
1528
  );
1630
1529
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1631
1530
  }
1632
1531
  async pointsWallet() {
1633
- const e = await this.client.request(et);
1532
+ const e = await this.client.request(tt);
1634
1533
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1635
1534
  }
1636
1535
  async pointsToCashConversion(e) {
1637
- const t = await this.client.request(tt, e);
1536
+ const t = await this.client.request(at, e);
1638
1537
  return t.ok ? t.data.pointsToCashConversion ? {
1639
1538
  ok: !1,
1640
- error: t.data.pointsToCashConversion
1539
+ error: d(t.data.pointsToCashConversion.__typename)
1641
1540
  } : {
1642
1541
  ok: !0
1643
1542
  } : t;
1644
1543
  }
1645
1544
  async mayaSession(e) {
1646
1545
  const t = await this.client.request(
1647
- at,
1546
+ rt,
1648
1547
  e
1649
1548
  );
1650
1549
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
1651
1550
  }
1652
1551
  }
1653
- class yt {
1552
+ class bt {
1654
1553
  constructor(e) {
1655
- c(this, "client");
1554
+ m(this, "client");
1656
1555
  this.client = e;
1657
1556
  }
1658
1557
  async latestBetRecords() {
@@ -1663,11 +1562,11 @@ class yt {
1663
1562
  } : e;
1664
1563
  }
1665
1564
  }
1666
- class g {
1565
+ class b {
1667
1566
  constructor(e, t) {
1668
- c(this, "url");
1669
- c(this, "options");
1670
- c(this, "middlewares");
1567
+ m(this, "url");
1568
+ m(this, "options");
1569
+ m(this, "middlewares");
1671
1570
  var r;
1672
1571
  const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1673
1572
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1675,7 +1574,7 @@ class g {
1675
1574
  async request(e, t) {
1676
1575
  const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
1677
1576
  r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
1678
- const n = await this.runMiddlewares(
1577
+ const s = await this.runMiddlewares(
1679
1578
  new Request(this.url, {
1680
1579
  ...this.options,
1681
1580
  body: a,
@@ -1683,13 +1582,13 @@ class g {
1683
1582
  method: "POST"
1684
1583
  })
1685
1584
  );
1686
- return await this.exec(n);
1585
+ return await this.exec(s);
1687
1586
  }
1688
1587
  /** Single file upload */
1689
1588
  async upload(e, t) {
1690
1589
  const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
1691
1590
  r.set("Accept", "application/json"), r.delete("Content-Type");
1692
- const n = await this.runMiddlewares(
1591
+ const s = await this.runMiddlewares(
1693
1592
  new Request(this.url, {
1694
1593
  ...this.options,
1695
1594
  body: a,
@@ -1697,32 +1596,26 @@ class g {
1697
1596
  method: "POST"
1698
1597
  })
1699
1598
  );
1700
- return await this.exec(n);
1599
+ return await this.exec(s);
1701
1600
  }
1702
1601
  async exec(e) {
1703
- var t, a, r, n, d, m;
1602
+ var t, a, r, s, c, h;
1704
1603
  try {
1705
- const l = await fetch(e);
1706
- if (!l.ok)
1707
- return { ok: !1, error: h(l.status) };
1708
- const b = await l.json(), k = b.data, u = (t = b.errors) == null ? void 0 : t.at(0);
1709
- return u ? ((a = u.extensions) == null ? void 0 : a.code) === "FORBIDDEN" ? { ok: !1, error: h(403, u.message) } : ((r = u.extensions) == null ? void 0 : r.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, u.message) } : ((n = u.extensions) == null ? void 0 : n.code) === "BAD_USER_INPUT" || ((d = u.extensions) == null ? void 0 : d.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, u.message) } : ((m = u.extensions) == null ? void 0 : m.code) === "ACCESS_TOKEN_EXPIRED" ? {
1604
+ const p = await fetch(e);
1605
+ if (!p.ok)
1606
+ return { ok: !1, error: u(p.status) };
1607
+ const E = await p.json(), C = E.data, l = (t = E.errors) == null ? void 0 : t.at(0);
1608
+ return l ? ((a = l.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = l.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: u(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: u(401, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((h = l.extensions) == null ? void 0 : h.code) === "BAD_REQUEST" ? { ok: !1, error: u(400, l.message) } : {
1710
1609
  ok: !1,
1711
- error: {
1712
- code: "HttpForbidden",
1713
- message: u.message ?? "Access token expired."
1714
- }
1715
- } : {
1716
- ok: !1,
1717
- error: h(500, u.message)
1610
+ error: u(500, l.message)
1718
1611
  } : {
1719
1612
  ok: !0,
1720
- data: k
1613
+ data: C
1721
1614
  };
1722
1615
  } catch {
1723
1616
  return {
1724
1617
  ok: !1,
1725
- error: h(500)
1618
+ error: u(500)
1726
1619
  };
1727
1620
  }
1728
1621
  }
@@ -1733,40 +1626,40 @@ class g {
1733
1626
  return t;
1734
1627
  }
1735
1628
  createUploadBody(e, t) {
1736
- const { files: a, others: r } = this.extractFiles(t), n = new FormData();
1737
- n.append(
1629
+ const { files: a, others: r } = this.extractFiles(t), s = new FormData();
1630
+ s.append(
1738
1631
  "operations",
1739
1632
  JSON.stringify({
1740
1633
  query: e,
1741
1634
  variables: t
1742
1635
  })
1743
- ), Object.entries(r).forEach(([m, l]) => {
1744
- n.append(m, JSON.stringify(l));
1636
+ ), Object.entries(r).forEach(([h, p]) => {
1637
+ s.append(h, JSON.stringify(p));
1745
1638
  });
1746
- const d = {};
1747
- return Object.keys(a).forEach((m, l) => {
1748
- d[l.toString()] = `variables.${m}`;
1749
- }), n.append("map", JSON.stringify(d)), Object.values(a).forEach((m, l) => {
1750
- n.append(l.toString(), m);
1751
- }), n;
1639
+ const c = {};
1640
+ return Object.keys(a).forEach((h, p) => {
1641
+ c[p.toString()] = `variables.${h}`;
1642
+ }), s.append("map", JSON.stringify(c)), Object.values(a).forEach((h, p) => {
1643
+ s.append(p.toString(), h);
1644
+ }), s;
1752
1645
  }
1753
1646
  extractFiles(e) {
1754
1647
  const t = {}, a = {};
1755
- return Object.entries(e).forEach(([r, n]) => {
1756
- n instanceof File || n instanceof Blob ? t[r] = n : a[r] = n;
1648
+ return Object.entries(e).forEach(([r, s]) => {
1649
+ s instanceof File || s instanceof Blob ? t[r] = s : a[r] = s;
1757
1650
  }), {
1758
1651
  files: t,
1759
1652
  others: a
1760
1653
  };
1761
1654
  }
1762
1655
  }
1763
- async function p(i) {
1656
+ async function f(i) {
1764
1657
  const e = new TextEncoder().encode(i), t = await crypto.subtle.digest("SHA-256", e);
1765
- return Array.from(new Uint8Array(t)).map((n) => n.toString(16).padStart(2, "0")).join("");
1658
+ return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1766
1659
  }
1767
- class ge {
1660
+ class be {
1768
1661
  constructor(e) {
1769
- c(this, "enabled");
1662
+ m(this, "enabled");
1770
1663
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1771
1664
  }
1772
1665
  info(e) {
@@ -1782,36 +1675,36 @@ class ge {
1782
1675
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1783
1676
  }
1784
1677
  }
1785
- function v(i) {
1678
+ function M(i) {
1786
1679
  return new Date(i.getTime());
1787
1680
  }
1788
- function S(i, e) {
1789
- const t = v(i);
1681
+ function A(i, e) {
1682
+ const t = M(i);
1790
1683
  return t.setDate(t.getDate() + e), t;
1791
1684
  }
1792
- function A(i, e) {
1793
- const t = v(i);
1685
+ function S(i, e) {
1686
+ const t = M(i);
1794
1687
  return t.setMinutes(t.getMinutes() + e), t;
1795
1688
  }
1796
- function he(i, e) {
1689
+ function fe(i, e) {
1797
1690
  return i.getTime() > e.getTime();
1798
1691
  }
1799
- function bt(i) {
1692
+ function gt(i) {
1800
1693
  return new Promise((e) => {
1801
1694
  setTimeout(e, i);
1802
1695
  });
1803
1696
  }
1804
- function E(i, e) {
1805
- const t = v(i);
1697
+ function k(i, e) {
1698
+ const t = M(i);
1806
1699
  return t.setMinutes(t.getMinutes() - e), t;
1807
1700
  }
1808
- class St {
1701
+ class Et {
1809
1702
  constructor(e) {
1810
- c(this, "logger");
1811
- c(this, "storageKey", "session");
1812
- c(this, "authService");
1813
- c(this, "_refreshing", !1);
1814
- this.authService = new pt(e), this.logger = new ge({
1703
+ m(this, "logger");
1704
+ m(this, "storageKey", "session");
1705
+ m(this, "authService");
1706
+ m(this, "_refreshing", !1);
1707
+ this.authService = new pt(e), this.logger = new be({
1815
1708
  enabled: e.log ?? !1
1816
1709
  });
1817
1710
  }
@@ -1826,21 +1719,21 @@ class St {
1826
1719
  return this.logger.warn("'localStorage' is not available on the server."), {
1827
1720
  ok: !1,
1828
1721
  error: {
1829
- code: "UnknownError",
1722
+ name: "UnknownError",
1830
1723
  message: "Server sign in is not supported."
1831
1724
  }
1832
1725
  };
1833
1726
  if (e.type === "MAYA") {
1834
1727
  const r = await this.authService.createSession(e);
1835
1728
  if (r.ok) {
1836
- const n = /* @__PURE__ */ new Date();
1729
+ const s = /* @__PURE__ */ new Date();
1837
1730
  return window.localStorage.setItem(
1838
1731
  this.storageKey,
1839
1732
  JSON.stringify({
1840
1733
  ...r.data,
1841
1734
  maya: !0,
1842
- accessTokenExpiresAt: A(n, 8).getTime(),
1843
- refreshTokenExpiresAt: E(S(n, 30), 2).getTime()
1735
+ accessTokenExpiresAt: S(s, 8).getTime(),
1736
+ refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
1844
1737
  })
1845
1738
  ), {
1846
1739
  ok: !0,
@@ -1852,13 +1745,13 @@ class St {
1852
1745
  if (e.type === "MOBILE_NUMBER") {
1853
1746
  const r = await this.authService.createSession(e);
1854
1747
  if (r.ok) {
1855
- const n = /* @__PURE__ */ new Date();
1748
+ const s = /* @__PURE__ */ new Date();
1856
1749
  return window.localStorage.setItem(
1857
1750
  this.storageKey,
1858
1751
  JSON.stringify({
1859
1752
  ...r.data,
1860
- accessTokenExpiresAt: A(n, 8).getTime(),
1861
- refreshTokenExpiresAt: E(S(n, 30), 2).getTime()
1753
+ accessTokenExpiresAt: S(s, 8).getTime(),
1754
+ refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
1862
1755
  })
1863
1756
  ), {
1864
1757
  ok: !0,
@@ -1881,8 +1774,8 @@ class St {
1881
1774
  this.storageKey,
1882
1775
  JSON.stringify({
1883
1776
  ...t.data,
1884
- accessTokenExpiresAt: A(a, 8).getTime(),
1885
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1777
+ accessTokenExpiresAt: S(a, 8).getTime(),
1778
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1886
1779
  })
1887
1780
  ), {
1888
1781
  ok: !0,
@@ -1897,8 +1790,8 @@ class St {
1897
1790
  this.storageKey,
1898
1791
  JSON.stringify({
1899
1792
  ...t.data,
1900
- accessTokenExpiresAt: A(a, 8).getTime(),
1901
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1793
+ accessTokenExpiresAt: S(a, 8).getTime(),
1794
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1902
1795
  })
1903
1796
  ), { ok: !0 };
1904
1797
  } else
@@ -1911,7 +1804,7 @@ class St {
1911
1804
  data: null
1912
1805
  };
1913
1806
  if (this.refreshing)
1914
- return await bt(1e3), await this.get();
1807
+ return await gt(1e3), await this.get();
1915
1808
  const e = window.localStorage.getItem(this.storageKey);
1916
1809
  if (!e)
1917
1810
  return {
@@ -1920,31 +1813,31 @@ class St {
1920
1813
  };
1921
1814
  try {
1922
1815
  let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
1923
- const r = new Date(t.accessTokenExpiresAt), n = new Date(t.refreshTokenExpiresAt);
1924
- if (he(a, n))
1816
+ const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
1817
+ if (fe(a, s))
1925
1818
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
1926
1819
  ok: !1,
1927
1820
  error: {
1928
- code: "SessionExpired",
1821
+ name: "SessionExpired",
1929
1822
  message: "Session expired."
1930
1823
  }
1931
1824
  };
1932
- if (he(a, r)) {
1825
+ if (fe(a, r)) {
1933
1826
  this.logger.info("Refreshing session..."), this.refreshing = !0;
1934
- const d = await this.authService.refreshSession(t.refreshToken);
1935
- if (this.refreshing = !1, !d.ok)
1936
- return this.logger.error(`Failed to refresh session: ${d.error.message}`), d.error.code === "InvalidToken" || d.error.code === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1827
+ const c = await this.authService.refreshSession(t.refreshToken);
1828
+ if (this.refreshing = !1, !c.ok)
1829
+ return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1937
1830
  ok: !1,
1938
- error: d.error
1831
+ error: c.error
1939
1832
  }) : (this.logger.warn("Old session returned."), {
1940
1833
  ok: !0,
1941
1834
  data: t
1942
1835
  });
1943
1836
  this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
1944
1837
  ...t,
1945
- ...d.data,
1946
- accessTokenExpiresAt: A(a, 8).getTime(),
1947
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1838
+ ...c.data,
1839
+ accessTokenExpiresAt: S(a, 8).getTime(),
1840
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1948
1841
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
1949
1842
  }
1950
1843
  return {
@@ -1955,7 +1848,7 @@ class St {
1955
1848
  return {
1956
1849
  ok: !1,
1957
1850
  error: {
1958
- code: "UnknownError",
1851
+ name: "UnknownError",
1959
1852
  message: "Something went wrong."
1960
1853
  }
1961
1854
  };
@@ -1971,11 +1864,11 @@ class St {
1971
1864
  (t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
1972
1865
  }
1973
1866
  async verify() {
1974
- var a, r, n;
1867
+ var a, r, s;
1975
1868
  if (this.isServer)
1976
1869
  return this.logger.warn("'localStorage' is not available on the server."), !0;
1977
1870
  const e = await this.get();
1978
- if (((a = e.error) == null ? void 0 : a.code) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.code) === "SessionExpired" || ((n = e.error) == null ? void 0 : n.code) === "AccountBlacklisted") return !1;
1871
+ if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklisted") return !1;
1979
1872
  if (!e.data) return !0;
1980
1873
  const t = await this.authService.verifySession(e.data.accessToken);
1981
1874
  return t || window.localStorage.removeItem(this.storageKey), t;
@@ -1984,7 +1877,7 @@ class St {
1984
1877
  return typeof window > "u";
1985
1878
  }
1986
1879
  }
1987
- function s(i, e) {
1880
+ function n(i, e) {
1988
1881
  if (typeof i == "number" && !Number.isNaN(i))
1989
1882
  return i;
1990
1883
  if (typeof i == "string") {
@@ -1996,9 +1889,9 @@ function s(i, e) {
1996
1889
  }
1997
1890
  class At {
1998
1891
  constructor(e) {
1999
- c(this, "staticService");
1892
+ m(this, "staticService");
2000
1893
  const t = (e == null ? void 0 : e.environment) === "development";
2001
- this.staticService = new ft({
1894
+ this.staticService = new wt({
2002
1895
  url: t ? "https://static.development.opexa.io/graphql" : "https://static.opexa.io/graphql"
2003
1896
  });
2004
1897
  }
@@ -2027,88 +1920,88 @@ class At {
2027
1920
  };
2028
1921
  }
2029
1922
  platform(e) {
2030
- var t, a, r, n, d, m, l, b, k, u, D, M, N, R, I, G, P, $, U, x, W, B, O, q, F, L, V, H, Y, Q, j, K, z, J, X, Z, ee, te, ae, re, ne, se, oe, ie, de, ce, me, ue, le;
1923
+ var t, a, r, s, c, h, p, E, C, l, D, N, I, R, x, P, G, $, B, W, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, de, ce, ue, le, pe;
2031
1924
  return {
2032
1925
  paymentSettings: {
2033
- minimumFirstDepositAmount: s(e.minimumFirstDepositAmount),
1926
+ minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
2034
1927
  restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
2035
1928
  depositGateway: {
2036
1929
  bank: {
2037
1930
  androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
2038
1931
  iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
2039
1932
  webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
2040
- mobileWebEnabled: ((n = e.bankDepositGatewaySettings) == null ? void 0 : n.mobileWebEnabled) ?? !1,
2041
- minimumAmount: s((d = e.bankDepositGatewaySettings) == null ? void 0 : d.minimumAmount),
2042
- maximumAmount: s((m = e.bankDepositGatewaySettings) == null ? void 0 : m.maximumAmount)
1933
+ mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
1934
+ minimumAmount: n((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
1935
+ maximumAmount: n((h = e.bankDepositGatewaySettings) == null ? void 0 : h.maximumAmount)
2043
1936
  },
2044
1937
  gcash: {
2045
- androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2046
- iosEnabled: ((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.iosEnabled) ?? !1,
2047
- webEnabled: ((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2048
- mobileWebEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.mobileWebEnabled) ?? !1,
2049
- minimumAmount: s((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.minimumAmount),
2050
- maximumAmount: s((M = e.gcashDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
1938
+ androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
1939
+ iosEnabled: ((E = e.gcashDepositGatewaySettings) == null ? void 0 : E.iosEnabled) ?? !1,
1940
+ webEnabled: ((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
1941
+ mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
1942
+ minimumAmount: n((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.minimumAmount),
1943
+ maximumAmount: n((N = e.gcashDepositGatewaySettings) == null ? void 0 : N.maximumAmount)
2051
1944
  },
2052
1945
  maya: {
2053
- androidEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
1946
+ androidEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.androidEnabled) ?? !1,
2054
1947
  iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2055
- webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2056
- mobileWebEnabled: ((G = e.mayaDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2057
- minimumAmount: s((P = e.mayaDepositGatewaySettings) == null ? void 0 : P.minimumAmount),
2058
- maximumAmount: s(($ = e.mayaDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
1948
+ webEnabled: ((x = e.mayaDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
1949
+ mobileWebEnabled: ((P = e.mayaDepositGatewaySettings) == null ? void 0 : P.mobileWebEnabled) ?? !1,
1950
+ minimumAmount: n((G = e.mayaDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
1951
+ maximumAmount: n(($ = e.mayaDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2059
1952
  },
2060
1953
  mayaApp: {
2061
- androidEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2062
- iosEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.iosEnabled) ?? !1,
2063
- webEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.webEnabled) ?? !1,
2064
- mobileWebEnabled: ((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.mobileWebEnabled) ?? !1,
2065
- minimumAmount: s((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.minimumAmount),
2066
- maximumAmount: s((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.maximumAmount)
1954
+ androidEnabled: ((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.androidEnabled) ?? !1,
1955
+ iosEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
1956
+ webEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.webEnabled) ?? !1,
1957
+ mobileWebEnabled: ((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.mobileWebEnabled) ?? !1,
1958
+ minimumAmount: n((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.minimumAmount),
1959
+ maximumAmount: n((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.maximumAmount)
2067
1960
  }
2068
1961
  },
2069
1962
  withdrawalGateway: {
2070
1963
  bank: {
2071
- androidEnabled: ((F = e.bankWithdrawalGatewaySettings) == null ? void 0 : F.androidEnabled) ?? !1,
2072
- iosEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.iosEnabled) ?? !1,
2073
- webEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.webEnabled) ?? !1,
1964
+ androidEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.androidEnabled) ?? !1,
1965
+ iosEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.iosEnabled) ?? !1,
1966
+ webEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.webEnabled) ?? !1,
2074
1967
  mobileWebEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.mobileWebEnabled) ?? !1,
2075
- minimumAmount: s((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.minimumAmount),
2076
- maximumAmount: s((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.maximumAmount)
1968
+ minimumAmount: n((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.minimumAmount),
1969
+ maximumAmount: n((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.maximumAmount)
2077
1970
  },
2078
1971
  gcash: {
2079
- androidEnabled: ((j = e.gcashWithdrawalGatewaySettings) == null ? void 0 : j.androidEnabled) ?? !1,
2080
- iosEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.iosEnabled) ?? !1,
2081
- webEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.webEnabled) ?? !1,
2082
- mobileWebEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.mobileWebEnabled) ?? !1,
2083
- minimumAmount: s((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.minimumAmount),
2084
- maximumAmount: s(
2085
- (Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.maximumAmount,
1972
+ androidEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.androidEnabled) ?? !1,
1973
+ iosEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.iosEnabled) ?? !1,
1974
+ webEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.webEnabled) ?? !1,
1975
+ mobileWebEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.mobileWebEnabled) ?? !1,
1976
+ minimumAmount: n((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.minimumAmount),
1977
+ maximumAmount: n(
1978
+ (ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.maximumAmount,
2086
1979
  1e6
2087
1980
  )
2088
1981
  },
2089
1982
  maya: {
2090
- androidEnabled: ((ee = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ee.androidEnabled) ?? !1,
2091
- iosEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.iosEnabled) ?? !1,
2092
- webEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.webEnabled) ?? !1,
2093
- mobileWebEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.mobileWebEnabled) ?? !1,
2094
- minimumAmount: s((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.minimumAmount),
2095
- maximumAmount: s((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
1983
+ androidEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.androidEnabled) ?? !1,
1984
+ iosEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.iosEnabled) ?? !1,
1985
+ webEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.webEnabled) ?? !1,
1986
+ mobileWebEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.mobileWebEnabled) ?? !1,
1987
+ minimumAmount: n((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.minimumAmount),
1988
+ maximumAmount: n((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.maximumAmount)
2096
1989
  },
2097
1990
  mayaApp: {
2098
- androidEnabled: ((oe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : oe.androidEnabled) ?? !1,
2099
- iosEnabled: ((ie = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
1991
+ androidEnabled: ((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.androidEnabled) ?? !1,
1992
+ iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2100
1993
  webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
2101
1994
  mobileWebEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.mobileWebEnabled) ?? !1,
2102
- minimumAmount: s((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.minimumAmount),
2103
- maximumAmount: s(
2104
- (ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.maximumAmount,
1995
+ minimumAmount: n((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.minimumAmount),
1996
+ maximumAmount: n(
1997
+ (le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.maximumAmount,
2105
1998
  1e6
2106
1999
  )
2107
2000
  }
2108
2001
  }
2109
2002
  },
2110
2003
  pointsClubSettings: {
2111
- multiplier: s((le = e.pointsClubSettings) == null ? void 0 : le.multiplier, 0)
2004
+ multiplier: n((pe = e.pointsClubSettings) == null ? void 0 : pe.multiplier, 0)
2112
2005
  }
2113
2006
  };
2114
2007
  }
@@ -2128,6 +2021,7 @@ class At {
2128
2021
  validId: e.validId ?? void 0,
2129
2022
  verificationStatus: e.verificationStatus,
2130
2023
  transactionPassword: e.transactionPassword,
2024
+ secretAnswerSubmitted: e.secretAnswerSubmitted ?? !1,
2131
2025
  dateTimeLastActive: e.dateTimeLastActive ? new Date(e.dateTimeLastActive) : void 0,
2132
2026
  dateTimeCreated: new Date(e.dateTimeCreated),
2133
2027
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2136,7 +2030,7 @@ class At {
2136
2030
  wallet(e) {
2137
2031
  return {
2138
2032
  ...e,
2139
- balance: s(e.balance, 0),
2033
+ balance: n(e.balance, 0),
2140
2034
  dateTimeCreated: new Date(e.dateTimeCreated),
2141
2035
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2142
2036
  };
@@ -2159,7 +2053,7 @@ class At {
2159
2053
  profileCompletion(e) {
2160
2054
  return {
2161
2055
  ...e,
2162
- completionPercentage: s(e, 0)
2056
+ completionPercentage: n(e, 0)
2163
2057
  };
2164
2058
  }
2165
2059
  announcement(e) {
@@ -2174,9 +2068,9 @@ class At {
2174
2068
  withdrawalRecord(e) {
2175
2069
  return {
2176
2070
  ...e,
2177
- amount: s(e.amount, 0),
2178
- netAmount: s(e.netAmount, 0),
2179
- fee: s(e.fee, 0),
2071
+ amount: n(e.amount, 0),
2072
+ netAmount: n(e.netAmount, 0),
2073
+ fee: n(e.fee, 0),
2180
2074
  reference: e.reference ?? void 0,
2181
2075
  bank: e.bank ?? void 0,
2182
2076
  recipientMobileNumber: e.recipientMobileNumber ?? void 0,
@@ -2188,9 +2082,9 @@ class At {
2188
2082
  deposit(e) {
2189
2083
  return {
2190
2084
  ...e,
2191
- fee: s(e.fee, 0),
2192
- amount: s(e.amount, 0),
2193
- netAmount: s(e.netAmount, 0),
2085
+ fee: n(e.fee, 0),
2086
+ amount: n(e.amount, 0),
2087
+ netAmount: n(e.netAmount, 0),
2194
2088
  reference: e.reference ?? void 0,
2195
2089
  checkoutUrl: e.checkoutUrl ?? void 0,
2196
2090
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2200,9 +2094,9 @@ class At {
2200
2094
  depositRecord(e) {
2201
2095
  return {
2202
2096
  ...e,
2203
- amount: s(e.amount, 0),
2204
- fee: s(e.fee, 0),
2205
- netAmount: s(e.netAmount, 0),
2097
+ amount: n(e.amount, 0),
2098
+ fee: n(e.fee, 0),
2099
+ netAmount: n(e.netAmount, 0),
2206
2100
  reference: e.reference ?? void 0,
2207
2101
  dateTimeCreated: new Date(e.dateTimeCreated),
2208
2102
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2212,12 +2106,12 @@ class At {
2212
2106
  var t;
2213
2107
  return {
2214
2108
  ...e,
2215
- bet: s(e.bet, 0),
2216
- payout: s(e.payout, 0),
2217
- jackpotContribution: s(e.jackpotContribution, 0),
2218
- jackpotPayout: s(e.jackpotPayout, 0),
2219
- winloss: s(e.winloss),
2220
- validBet: s(e.validBet, 0),
2109
+ bet: n(e.bet, 0),
2110
+ payout: n(e.payout, 0),
2111
+ jackpotContribution: n(e.jackpotContribution, 0),
2112
+ jackpotPayout: n(e.jackpotPayout, 0),
2113
+ winloss: n(e.winloss),
2114
+ validBet: n(e.validBet, 0),
2221
2115
  vendorRoundId: e.vendorRoundId ?? void 0,
2222
2116
  game: this.game(e.game),
2223
2117
  dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
@@ -2235,9 +2129,9 @@ class At {
2235
2129
  return {
2236
2130
  ...e,
2237
2131
  game: this.game(e.game),
2238
- bet: s(e.bet, 0),
2239
- payout: s(e.payout, 0),
2240
- validBet: s(e.validBet, 0),
2132
+ bet: n(e.bet, 0),
2133
+ payout: n(e.payout, 0),
2134
+ validBet: n(e.validBet, 0),
2241
2135
  dateTimeSettled: new Date(e.dateTimeSettled),
2242
2136
  dateTimeCreated: new Date(e.dateTimeCreated)
2243
2137
  };
@@ -2245,9 +2139,9 @@ class At {
2245
2139
  transactionRecord(e) {
2246
2140
  return {
2247
2141
  ...e,
2248
- amount: s(e.amount, 0),
2142
+ amount: n(e.amount, 0),
2249
2143
  content: e.content ?? void 0,
2250
- currentBalance: s(e.currentBalance, 0),
2144
+ currentBalance: n(e.currentBalance, 0),
2251
2145
  dateTimeCreated: new Date(e.dateTimeCreated)
2252
2146
  };
2253
2147
  }
@@ -2273,8 +2167,8 @@ class At {
2273
2167
  ...e.banner,
2274
2168
  dateTimeCreated: new Date(e.banner.dateTimeCreated)
2275
2169
  },
2276
- maximumBonusAmount: s(e.maximumBonusAmount),
2277
- minimumBonusAmount: s(e.minimumBonusAmount),
2170
+ maximumBonusAmount: n(e.maximumBonusAmount),
2171
+ minimumBonusAmount: n(e.minimumBonusAmount),
2278
2172
  activationEndDateTime: new Date(e.activationEndDateTime),
2279
2173
  activationStartDateTime: new Date(e.activationStartDateTime),
2280
2174
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2301,22 +2195,22 @@ class At {
2301
2195
  /* deposit here does not have an id and depositNumber field */
2302
2196
  deposit: e.deposit ? {
2303
2197
  ...e.deposit,
2304
- fee: s(e.deposit.fee, 0),
2305
- amount: s(e.deposit.amount, 0),
2306
- netAmount: s(e.deposit.netAmount, 0),
2198
+ fee: n(e.deposit.fee, 0),
2199
+ amount: n(e.deposit.amount, 0),
2200
+ netAmount: n(e.deposit.netAmount, 0),
2307
2201
  reference: e.deposit.reference ?? void 0,
2308
2202
  dateTimeCreated: new Date(e.deposit.dateTimeCreated),
2309
2203
  dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
2310
2204
  } : void 0,
2311
- balance: s(e.balance, 0),
2312
- amount: s(e.amount, 0),
2205
+ balance: n(e.balance, 0),
2206
+ amount: n(e.amount, 0),
2313
2207
  expiration: new Date(e.expiration),
2314
- turnoverRequirement: s(e.turnoverRequirement, 0),
2315
- currentTurnoverRequirementContribution: s(
2208
+ turnoverRequirement: n(e.turnoverRequirement, 0),
2209
+ currentTurnoverRequirementContribution: n(
2316
2210
  e.currentTurnoverRequirementContribution,
2317
2211
  0
2318
2212
  ),
2319
- currentTurnoverRequirementContributionPercentage: s(
2213
+ currentTurnoverRequirementContributionPercentage: n(
2320
2214
  e.currentTurnoverRequirementContributionPercentage,
2321
2215
  0
2322
2216
  ),
@@ -2327,7 +2221,7 @@ class At {
2327
2221
  cashbackBonus(e) {
2328
2222
  return {
2329
2223
  id: e.id,
2330
- balance: s(e.balance, 0),
2224
+ balance: n(e.balance, 0),
2331
2225
  cashback: this.cashback(e.cashback),
2332
2226
  dateTimeCreated: new Date(e.dateTimeCreated),
2333
2227
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2343,7 +2237,7 @@ class At {
2343
2237
  pointsWallet(e) {
2344
2238
  return {
2345
2239
  id: e.id,
2346
- points: s(e.points, 0),
2240
+ points: n(e.points, 0),
2347
2241
  account: e.account,
2348
2242
  dateTimeCreated: new Date(e.dateTimeCreated)
2349
2243
  };
@@ -2351,17 +2245,17 @@ class At {
2351
2245
  }
2352
2246
  class Ct {
2353
2247
  constructor(e) {
2354
- c(this, "gameService");
2355
- c(this, "fileService");
2356
- c(this, "walletService");
2357
- c(this, "reportService");
2358
- c(this, "portalService");
2359
- c(this, "accountService");
2360
- c(this, "sessionManager");
2361
- c(this, "transformer");
2362
- c(this, "logger");
2248
+ m(this, "gameService");
2249
+ m(this, "fileService");
2250
+ m(this, "walletService");
2251
+ m(this, "reportService");
2252
+ m(this, "portalService");
2253
+ m(this, "accountService");
2254
+ m(this, "sessionManager");
2255
+ m(this, "transformer");
2256
+ m(this, "logger");
2363
2257
  const t = e.environment === "development";
2364
- this.sessionManager = new St({
2258
+ this.sessionManager = new Et({
2365
2259
  ...e,
2366
2260
  url: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io"
2367
2261
  });
@@ -2374,37 +2268,37 @@ class Ct {
2374
2268
  }
2375
2269
  }
2376
2270
  };
2377
- this.gameService = new fe(
2378
- new g(
2271
+ this.gameService = new ye(
2272
+ new b(
2379
2273
  t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2380
2274
  a
2381
2275
  )
2382
2276
  ), this.fileService = new ht(
2383
- new g(
2277
+ new b(
2384
2278
  t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2385
2279
  a
2386
2280
  )
2387
- ), this.walletService = new gt(
2388
- new g(
2281
+ ), this.walletService = new yt(
2282
+ new b(
2389
2283
  t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2390
2284
  a
2391
2285
  )
2392
- ), this.reportService = new wt(
2393
- new g(
2286
+ ), this.reportService = new ft(
2287
+ new b(
2394
2288
  t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2395
2289
  a
2396
2290
  )
2397
- ), this.accountService = new ut(
2398
- new g(
2291
+ ), this.accountService = new lt(
2292
+ new b(
2399
2293
  t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2400
2294
  a
2401
2295
  )
2402
- ), this.portalService = new yt(
2403
- new g(
2296
+ ), this.portalService = new bt(
2297
+ new b(
2404
2298
  t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2405
2299
  a
2406
2300
  )
2407
- ), this.transformer = new At(e), this.logger = new ge({
2301
+ ), this.transformer = new At(e), this.logger = new be({
2408
2302
  enabled: e.log ?? !1
2409
2303
  });
2410
2304
  }
@@ -2420,7 +2314,7 @@ class Ct {
2420
2314
  case "NAME_AND_PASSWORD": {
2421
2315
  const t = await this.sessionManager.create({
2422
2316
  ...e,
2423
- password: await p(e.password)
2317
+ password: await f(e.password)
2424
2318
  });
2425
2319
  return t.data ? {
2426
2320
  ok: !0,
@@ -2480,13 +2374,13 @@ class Ct {
2480
2374
  return await this.sessionManager.createFromAuthenticator({
2481
2375
  type: "SECURITY_QUESTION",
2482
2376
  token: e.token,
2483
- secretAnswer: await p(e.secretAnswer)
2377
+ secretAnswer: await f(e.secretAnswer)
2484
2378
  });
2485
2379
  default:
2486
2380
  return {
2487
2381
  ok: !1,
2488
2382
  error: {
2489
- code: "HttpBadRequest",
2383
+ name: "HttpBadRequest",
2490
2384
  message: "Invalid input 'type'"
2491
2385
  }
2492
2386
  };
@@ -2522,10 +2416,10 @@ class Ct {
2522
2416
  watchSession(e) {
2523
2417
  const t = e.interval ?? 3e4, a = e.onInvalid;
2524
2418
  let r = null;
2525
- const n = () => setTimeout(async () => {
2526
- await this.sessionManager.verify() || await a(), r = n();
2419
+ const s = () => setTimeout(async () => {
2420
+ await this.sessionManager.verify() || await a(), r = s();
2527
2421
  }, t);
2528
- return r = n(), function() {
2422
+ return r = s(), function() {
2529
2423
  r && clearTimeout(r);
2530
2424
  };
2531
2425
  }
@@ -2591,12 +2485,12 @@ class Ct {
2591
2485
  * ```
2592
2486
  */
2593
2487
  async createAccount(e) {
2594
- const t = e.id ?? w.generate(f.Account).toString(), a = await this.accountService.registerMemberAccount({
2488
+ const t = e.id ?? w.generate(y.Account).toString(), a = await this.accountService.registerMemberAccount({
2595
2489
  input: {
2596
2490
  id: t,
2597
2491
  name: e.name,
2598
2492
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2599
- password: await p(e.password),
2493
+ password: await f(e.password),
2600
2494
  mobileNumber: this.addAreaCode(e.mobileNumber),
2601
2495
  domain: e.domain,
2602
2496
  btag: e.btag
@@ -2627,12 +2521,12 @@ class Ct {
2627
2521
  id: e,
2628
2522
  data: {
2629
2523
  ...t,
2630
- password: t.password ? await p(t.password) : void 0,
2631
- transactionPassword: t.transactionPassword ? await p(t.transactionPassword) : void 0,
2524
+ password: t.password ? await f(t.password) : void 0,
2525
+ transactionPassword: t.transactionPassword ? await f(t.transactionPassword) : void 0,
2632
2526
  ...t.mobileNumber && {
2633
2527
  mobileNumber: this.addAreaCode(t.mobileNumber)
2634
2528
  },
2635
- secretAnswer: t.secretAnswer ? await p(t.secretAnswer) : void 0
2529
+ secretAnswer: t.secretAnswer ? await f(t.secretAnswer) : void 0
2636
2530
  }
2637
2531
  }
2638
2532
  });
@@ -2673,7 +2567,7 @@ class Ct {
2673
2567
  * ```
2674
2568
  */
2675
2569
  async submitVerificationDetails(e) {
2676
- const t = e.id ?? w.generate(f.Verification).toString(), a = await this.accountService.createMemberVerification({
2570
+ const t = e.id ?? w.generate(y.Verification).toString(), a = await this.accountService.createMemberVerification({
2677
2571
  input: {
2678
2572
  id: t,
2679
2573
  ...e
@@ -2710,7 +2604,7 @@ class Ct {
2710
2604
  return await this.accountService.resetPassword({
2711
2605
  input: {
2712
2606
  mobileNumber: this.addAreaCode(e.mobileNumber),
2713
- newPassword: await p(e.newPassword)
2607
+ newPassword: await f(e.newPassword)
2714
2608
  },
2715
2609
  verificationCode: e.verificationCode
2716
2610
  });
@@ -2797,13 +2691,13 @@ class Ct {
2797
2691
  * ```
2798
2692
  */
2799
2693
  async createWithdrawal(e) {
2800
- const t = e.id ?? w.generate(f.Withdrawal).toString();
2694
+ const t = e.id ?? w.generate(y.Withdrawal).toString();
2801
2695
  if (e.type === "BANK") {
2802
2696
  const a = await this.walletService.createBankWithdrawal({
2803
2697
  input: {
2804
2698
  id: t,
2805
2699
  amount: e.amount.toString(),
2806
- transactionPassword: await p(e.transactionPassword)
2700
+ transactionPassword: await f(e.transactionPassword)
2807
2701
  }
2808
2702
  });
2809
2703
  if (!a.ok) return a;
@@ -2813,7 +2707,7 @@ class Ct {
2813
2707
  input: {
2814
2708
  id: t,
2815
2709
  amount: e.amount.toString(),
2816
- transactionPassword: await p(e.transactionPassword),
2710
+ transactionPassword: await f(e.transactionPassword),
2817
2711
  recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
2818
2712
  }
2819
2713
  });
@@ -2824,7 +2718,7 @@ class Ct {
2824
2718
  input: {
2825
2719
  id: t,
2826
2720
  amount: e.amount.toString(),
2827
- transactionPassword: await p(e.transactionPassword),
2721
+ transactionPassword: await f(e.transactionPassword),
2828
2722
  recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
2829
2723
  }
2830
2724
  });
@@ -2835,7 +2729,7 @@ class Ct {
2835
2729
  input: {
2836
2730
  id: t,
2837
2731
  amount: e.amount.toString(),
2838
- transactionPassword: await p(e.transactionPassword)
2732
+ transactionPassword: await f(e.transactionPassword)
2839
2733
  }
2840
2734
  });
2841
2735
  if (!a.ok) return a;
@@ -2883,7 +2777,7 @@ class Ct {
2883
2777
  * ```
2884
2778
  */
2885
2779
  async createDeposit(e) {
2886
- const t = e.id ?? w.generate(f.Deposit).toString();
2780
+ const t = e.id ?? w.generate(y.Deposit).toString();
2887
2781
  if (e.type === "MAYA") {
2888
2782
  const a = await this.walletService.createMayaDeposit({
2889
2783
  input: {
@@ -3096,7 +2990,7 @@ class Ct {
3096
2990
  * ```
3097
2991
  */
3098
2992
  async createGameSession(e) {
3099
- const t = e.id ?? w.generate(f.GameSession).toString(), a = await this.gameService.createGameSession({
2993
+ const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.gameService.createGameSession({
3100
2994
  input: {
3101
2995
  id: t,
3102
2996
  game: e.game
@@ -3120,7 +3014,7 @@ class Ct {
3120
3014
  * ```
3121
3015
  */
3122
3016
  async createGameSession__next(e) {
3123
- const t = e.id ?? w.generate(f.GameSession).toString(), a = await this.walletService.createGameSession({
3017
+ const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.walletService.createGameSession({
3124
3018
  input: {
3125
3019
  id: t,
3126
3020
  game: e.game
@@ -3176,7 +3070,7 @@ class Ct {
3176
3070
  * ```
3177
3071
  */
3178
3072
  async uploadImageFile(e) {
3179
- const t = e.id ?? w.generate(f.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3073
+ const t = e.id ?? w.generate(y.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3180
3074
  input: {
3181
3075
  id: t,
3182
3076
  file: e.file
@@ -3209,7 +3103,7 @@ class Ct {
3209
3103
  }
3210
3104
  export {
3211
3105
  vt as ObjectId,
3212
- f as ObjectType,
3106
+ y as ObjectType,
3213
3107
  Ct as Sdk
3214
3108
  };
3215
3109
  //# sourceMappingURL=index.mjs.map