@opexa/portal-sdk 0.0.25 → 0.0.27

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,8 +1,8 @@
1
1
  var Te = Object.defineProperty;
2
- var Ce = (n, e, t) => e in n ? Te(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var c = (n, e, t) => Ce(n, typeof e != "symbol" ? e + "" : e, t);
2
+ var Ce = (o, e, t) => e in o ? Te(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var m = (o, e, t) => Ce(o, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as E } from "@opexa/object-id";
5
- import { ObjectId as Ut } from "@opexa/object-id";
5
+ import { ObjectId as Gt } from "@opexa/object-id";
6
6
  const S = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -13,23 +13,23 @@ const S = {
13
13
  GameSession: 204,
14
14
  MayaSession: 230
15
15
  };
16
- function o(n, ...e) {
16
+ function n(o, ...e) {
17
17
  let t = "";
18
- for (const [a, r] of n.entries()) {
18
+ for (const [a, r] of o.entries()) {
19
19
  const s = e.at(a) ?? "";
20
20
  t = `${t}${r}${s}`;
21
21
  }
22
22
  return t.trim();
23
23
  }
24
- const V = o`
24
+ const x = n`
25
25
  fragment FileFragment on File {
26
26
  id
27
27
  url
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, Ne = o`
32
- ${V}
31
+ `, ve = n`
32
+ ${x}
33
33
 
34
34
  query File($id: ObjectId!) {
35
35
  node(id: $id) {
@@ -38,7 +38,7 @@ const V = o`
38
38
  }
39
39
  }
40
40
  }
41
- `, ve = o`
41
+ `, Ne = n`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const V = o`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ie = o`
55
+ `, Ie = n`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const V = o`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, Me = o`
65
+ `, Me = n`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const V = o`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, De = o`
74
+ `, De = n`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -79,23 +79,17 @@ const V = o`
79
79
  }
80
80
  }
81
81
  }
82
- `, H = o`
83
- fragment GameFragment on Game {
84
- id
85
- type
86
- name
87
- provider
88
- }
89
- `, ge = o`
90
- ${H}
91
-
82
+ `, ye = n`
92
83
  query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
93
84
  games(first: $first, after: $after, filter: $filter) {
94
85
  edges {
95
86
  cursor
96
87
  node {
97
88
  ... on Game {
98
- ...GameFragment
89
+ id
90
+ type
91
+ name
92
+ provider
99
93
  }
100
94
  }
101
95
  }
@@ -106,20 +100,22 @@ const V = o`
106
100
  }
107
101
  }
108
102
  }
109
- `, Ee = o`
110
- ${H}
111
-
103
+ `, ge = n`
112
104
  query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
113
105
  gamesByName(first: $first, search: $search, filter: $filter) {
114
- id
106
+ ... on Game {
107
+ id
108
+ type
109
+ name
110
+ provider
111
+ }
115
112
  }
116
113
  }
117
- `, Re = o`
114
+ `, Ee = n`
118
115
  query GameSession($id: ObjectId!) {
119
116
  node(id: $id) {
120
117
  ... on GameSession {
121
118
  id
122
- game
123
119
  status
124
120
  launchUrl
125
121
  dateTimeCreated
@@ -127,7 +123,7 @@ const V = o`
127
123
  }
128
124
  }
129
125
  }
130
- `, Se = o`
126
+ `, Se = n`
131
127
  mutation CreateGameSession($input: CreateGameSessionInput!) {
132
128
  createGameSession(input: $input) {
133
129
  ... on GameDoesNotExistError {
@@ -135,26 +131,11 @@ const V = o`
135
131
  }
136
132
  }
137
133
  }
138
- `, Pe = o`
134
+ `, Re = n`
139
135
  mutation EndGameSession($input: EndGameSessionInput!) {
140
136
  endGameSession(input: $input)
141
137
  }
142
- `, xe = o`
143
- query GameSession($id: ObjectId!) {
144
- node(id: $id) {
145
- ... on GameSession {
146
- id
147
- game {
148
- id
149
- }
150
- status
151
- launchUrl
152
- dateTimeCreated
153
- dateTimeLastUpdated
154
- }
155
- }
156
- }
157
- `, Ge = o`
138
+ `, Pe = n`
158
139
  mutation EndGameSession($input: EndGameSessionInput!) {
159
140
  endGameSession(input: $input) {
160
141
  ... on GameSessionDoesNotExistError {
@@ -168,7 +149,7 @@ const V = o`
168
149
  }
169
150
  }
170
151
  }
171
- `, Oe = o`
152
+ `, xe = n`
172
153
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
173
154
  announcements(first: $first, after: $after, filter: $filter) {
174
155
  edges {
@@ -194,7 +175,7 @@ const V = o`
194
175
  }
195
176
  }
196
177
  }
197
- `, Ue = o`
178
+ `, Ge = n`
198
179
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
199
180
  member {
200
181
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -261,7 +242,7 @@ const V = o`
261
242
  }
262
243
  }
263
244
  }
264
- `, $e = o`
245
+ `, Oe = n`
265
246
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
266
247
  createGCashWithdrawal(input: $input) {
267
248
  ... on AccountNotVerifiedError {
@@ -284,7 +265,7 @@ const V = o`
284
265
  }
285
266
  }
286
267
  }
287
- `, Be = o`
268
+ `, Ue = n`
288
269
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
289
270
  createMayaWithdrawal(input: $input) {
290
271
  ... on AccountNotVerifiedError {
@@ -307,7 +288,7 @@ const V = o`
307
288
  }
308
289
  }
309
290
  }
310
- `, qe = o`
291
+ `, Be = n`
311
292
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
312
293
  createMayaAppWithdrawal(input: $input) {
313
294
  ... on AccountNotVerifiedError {
@@ -327,7 +308,7 @@ const V = o`
327
308
  }
328
309
  }
329
310
  }
330
- `, We = o`
311
+ `, $e = n`
331
312
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
332
313
  createBankWithdrawal(input: $input) {
333
314
  ... on MobileNumberNotVerifiedError {
@@ -350,11 +331,11 @@ const V = o`
350
331
  }
351
332
  }
352
333
  }
353
- `, Le = o`
334
+ `, We = n`
354
335
  query RemainingDailyWithdrawalsCount {
355
336
  remainingDailyWithdrawalsCount
356
337
  }
357
- `, Fe = o`
338
+ `, qe = n`
358
339
  query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
359
340
  member {
360
341
  depositRecords(after: $after, first: $first, filter: $filter) {
@@ -383,7 +364,7 @@ const V = o`
383
364
  }
384
365
  }
385
366
  }
386
- `, Ve = o`
367
+ `, Le = n`
387
368
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
388
369
  createGCashDeposit(input: $input) {
389
370
  ... on DepositPromoMaximumAmountExceededError {
@@ -412,7 +393,7 @@ const V = o`
412
393
  }
413
394
  }
414
395
  }
415
- `, He = o`
396
+ `, Ve = n`
416
397
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
417
398
  createMayaDeposit(input: $input) {
418
399
  ... on DepositPromoMaximumAmountExceededError {
@@ -441,7 +422,7 @@ const V = o`
441
422
  }
442
423
  }
443
424
  }
444
- `, Ye = o`
425
+ `, Fe = n`
445
426
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
446
427
  createMayaAppDeposit(input: $input) {
447
428
  ... on DepositPromoMaximumAmountExceededError {
@@ -470,7 +451,7 @@ const V = o`
470
451
  }
471
452
  }
472
453
  }
473
- `, je = o`
454
+ `, He = n`
474
455
  query Deposit($id: ObjectId!) {
475
456
  node(id: $id) {
476
457
  ... on GCashDeposit {
@@ -502,15 +483,13 @@ const V = o`
502
483
  }
503
484
  }
504
485
  }
505
- `, Qe = o`
486
+ `, Ye = n`
506
487
  query DepositsCount {
507
488
  member {
508
489
  depositsCount
509
490
  }
510
491
  }
511
- `, Ke = o`
512
- ${H}
513
-
492
+ `, je = n`
514
493
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
515
494
  member {
516
495
  betRecords(first: $first, after: $after, filter: $filter) {
@@ -522,7 +501,9 @@ const V = o`
522
501
  id
523
502
  serialCode
524
503
  game {
525
- ...GameFragment
504
+ name
505
+ type
506
+ provider
526
507
  }
527
508
  bet
528
509
  payout
@@ -548,16 +529,17 @@ const V = o`
548
529
  }
549
530
  }
550
531
  }
551
- `, ze = o`
532
+ `, Qe = n`
552
533
  query LatestBetRecords {
553
534
  latestBetRecords {
554
535
  id
555
536
  member {
556
- id
557
537
  name
558
538
  }
559
539
  game {
560
- ...GameFragment
540
+ name
541
+ type
542
+ provider
561
543
  }
562
544
  bet
563
545
  payout
@@ -566,9 +548,7 @@ const V = o`
566
548
  dateTimeCreated
567
549
  }
568
550
  }
569
-
570
- ${H}
571
- `, Je = o`
551
+ `, Ke = n`
572
552
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
573
553
  member {
574
554
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -594,8 +574,8 @@ const V = o`
594
574
  }
595
575
  }
596
576
  }
597
- `, Q = o`
598
- ${V}
577
+ `, U = n`
578
+ ${x}
599
579
 
600
580
  fragment PromoFragment on Promo {
601
581
  id
@@ -613,24 +593,24 @@ const V = o`
613
593
  dateTimeCreated
614
594
  dateTimeLastUpdated
615
595
  }
616
- `, Xe = o`
617
- ${Q}
596
+ `, ze = n`
597
+ ${U}
618
598
 
619
599
  query Promos {
620
600
  promos {
621
601
  ...PromoFragment
622
602
  }
623
603
  }
624
- `, Ze = o`
625
- ${Q}
604
+ `, Je = n`
605
+ ${U}
626
606
 
627
607
  query AvailablePromos($filter: PromoFilterInput) {
628
608
  availablePromos(filter: $filter) {
629
609
  ...PromoFragment
630
610
  }
631
611
  }
632
- `, Ae = o`
633
- ${V}
612
+ `, be = n`
613
+ ${x}
634
614
 
635
615
  fragment CashbackFragment on Cashback {
636
616
  id
@@ -645,16 +625,16 @@ const V = o`
645
625
  dateTimeCreated
646
626
  dateTimeLastUpdated
647
627
  }
648
- `, et = o`
649
- ${Ae}
628
+ `, Xe = n`
629
+ ${be}
650
630
 
651
631
  query Cashbacks {
652
632
  cashbacks {
653
633
  ...CashbackFragment
654
634
  }
655
635
  }
656
- `, tt = o`
657
- ${Q}
636
+ `, Ze = n`
637
+ ${U}
658
638
 
659
639
  query Bonus {
660
640
  bonus {
@@ -682,8 +662,8 @@ const V = o`
682
662
  dateTimeLastUpdated
683
663
  }
684
664
  }
685
- `, at = o`
686
- ${Ae}
665
+ `, et = n`
666
+ ${be}
687
667
 
688
668
  query CashbackBonuses {
689
669
  cashbackBonuses {
@@ -696,7 +676,7 @@ const V = o`
696
676
  dateTimeLastUpdated
697
677
  }
698
678
  }
699
- `, rt = o`
679
+ `, tt = n`
700
680
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
701
681
  claimCashbackBonus(input: $input) {
702
682
  ... on CashbackBonusDoesNotExistError {
@@ -704,13 +684,13 @@ const V = o`
704
684
  }
705
685
  }
706
686
  }
707
- `, nt = o`
687
+ `, at = n`
708
688
  query Member {
709
689
  member {
710
690
  dateTimeLastActive
711
691
  }
712
692
  }
713
- `, ot = o`
693
+ `, rt = n`
714
694
  query MemberAccount {
715
695
  memberAccount: self {
716
696
  ... on MemberAccount {
@@ -734,8 +714,8 @@ const V = o`
734
714
  }
735
715
  }
736
716
  }
737
- `, it = o`
738
- ${V}
717
+ `, ot = n`
718
+ ${x}
739
719
 
740
720
  query MemberVerification {
741
721
  memberAccount: self {
@@ -758,7 +738,7 @@ const V = o`
758
738
  }
759
739
  }
760
740
  }
761
- `, st = o`
741
+ `, nt = n`
762
742
  mutation RegisterMemberAccount(
763
743
  $input: RegisterMemberAccountInput!
764
744
  $referralCode: String
@@ -794,7 +774,7 @@ const V = o`
794
774
  }
795
775
  }
796
776
  }
797
- `, mt = o`
777
+ `, it = n`
798
778
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
799
779
  updateMemberAccount(input: $input) {
800
780
  ... on AccountNameNotAvailableError {
@@ -820,7 +800,7 @@ const V = o`
820
800
  }
821
801
  }
822
802
  }
823
- `, ct = o`
803
+ `, st = n`
824
804
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
825
805
  resetPassword(input: $input, verificationCode: $verificationCode) {
826
806
  ... on AccountNotFoundError {
@@ -831,11 +811,11 @@ const V = o`
831
811
  }
832
812
  }
833
813
  }
834
- `, dt = o`
814
+ `, ct = n`
835
815
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
836
816
  deleteMemberAccount(input: $input)
837
817
  }
838
- `, ut = o`
818
+ `, mt = n`
839
819
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
840
820
  verifyMobileNumber(input: $input) {
841
821
  ... on InvalidSMSVerificationCodeError {
@@ -846,7 +826,7 @@ const V = o`
846
826
  }
847
827
  }
848
828
  }
849
- `, lt = o`
829
+ `, dt = n`
850
830
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
851
831
  createMemberVerification(input: $input) {
852
832
  ... on FileDoesNotExistError {
@@ -860,7 +840,7 @@ const V = o`
860
840
  }
861
841
  }
862
842
  }
863
- `, pt = o`
843
+ `, ut = n`
864
844
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
865
845
  updateMemberVerification(input: $input) {
866
846
  ... on FileDoesNotExistError {
@@ -877,7 +857,7 @@ const V = o`
877
857
  }
878
858
  }
879
859
  }
880
- `, ft = o`
860
+ `, lt = n`
881
861
  query ProfileCompletion {
882
862
  profileCompletion {
883
863
  completionPercentage
@@ -888,7 +868,7 @@ const V = o`
888
868
  accountPassword
889
869
  }
890
870
  }
891
- `, ht = o`
871
+ `, pt = n`
892
872
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
893
873
  sendVerificationCode(input: $input) {
894
874
  ... on InvalidPlatformError {
@@ -899,7 +879,7 @@ const V = o`
899
879
  }
900
880
  }
901
881
  }
902
- `, wt = o`
882
+ `, ft = n`
903
883
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
904
884
  minimumAmount
905
885
  maximumAmount
@@ -953,7 +933,7 @@ const V = o`
953
933
  multiplier
954
934
  }
955
935
  }
956
- `, yt = o`
936
+ `, ht = n`
957
937
  query MayaSession($id: ObjectId!) {
958
938
  mayaSession(id: $id) {
959
939
  id
@@ -962,9 +942,9 @@ const V = o`
962
942
  }
963
943
  }
964
944
  `;
965
- function d(n) {
945
+ function d(o) {
966
946
  return {
967
- name: n,
947
+ name: o,
968
948
  message: {
969
949
  AccountNameNotAvailableError: "Username is no longer available",
970
950
  AccountNotFoundError: "Account does not exist",
@@ -1013,24 +993,24 @@ function d(n) {
1013
993
  InvalidToken: "Invalid token",
1014
994
  InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1015
995
  SessionExpired: "Session expired"
1016
- }[n]
996
+ }[o]
1017
997
  };
1018
998
  }
1019
- class gt {
999
+ class wt {
1020
1000
  constructor(e) {
1021
- c(this, "client");
1001
+ m(this, "client");
1022
1002
  this.client = e;
1023
1003
  }
1024
1004
  /** aka `Query.self` */
1025
1005
  async memberAccount() {
1026
- const e = await this.client.request(ot);
1006
+ const e = await this.client.request(rt);
1027
1007
  return e.ok ? {
1028
1008
  ok: !0,
1029
1009
  data: e.data.memberAccount
1030
1010
  } : e;
1031
1011
  }
1032
1012
  async registerMemberAccount(e) {
1033
- const t = await this.client.request(st, e);
1013
+ const t = await this.client.request(nt, e);
1034
1014
  return t.ok ? t.data.registerMemberAccount ? {
1035
1015
  ok: !1,
1036
1016
  error: d(t.data.registerMemberAccount.__typename)
@@ -1039,7 +1019,7 @@ class gt {
1039
1019
  } : t;
1040
1020
  }
1041
1021
  async updateMemberAccount(e) {
1042
- const t = await this.client.request(mt, e);
1022
+ const t = await this.client.request(it, e);
1043
1023
  return t.ok ? t.data.updateMemberAccount ? {
1044
1024
  ok: !1,
1045
1025
  error: d(t.data.updateMemberAccount.__typename)
@@ -1048,7 +1028,7 @@ class gt {
1048
1028
  } : t;
1049
1029
  }
1050
1030
  async deleteMemberAccount(e) {
1051
- const t = await this.client.request(dt, e);
1031
+ const t = await this.client.request(ct, e);
1052
1032
  return t.ok ? t.data.deleteMemberAccount ? {
1053
1033
  ok: !0
1054
1034
  } : {
@@ -1061,7 +1041,7 @@ class gt {
1061
1041
  }
1062
1042
  async resetPassword(e) {
1063
1043
  const t = await this.client.request(
1064
- ct,
1044
+ st,
1065
1045
  e
1066
1046
  );
1067
1047
  return t.ok ? t.data.resetPassword ? {
@@ -1072,14 +1052,14 @@ class gt {
1072
1052
  } : t;
1073
1053
  }
1074
1054
  async profileCompletion() {
1075
- const e = await this.client.request(ft);
1055
+ const e = await this.client.request(lt);
1076
1056
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1077
1057
  }
1078
1058
  async platform() {
1079
- return await this.client.request(wt);
1059
+ return await this.client.request(ft);
1080
1060
  }
1081
1061
  async sendVerificationCode(e) {
1082
- const t = await this.client.request(ht, e);
1062
+ const t = await this.client.request(pt, e);
1083
1063
  return t.ok ? t.data.sendVerificationCode ? {
1084
1064
  ok: !1,
1085
1065
  error: d(t.data.sendVerificationCode.__typename)
@@ -1088,7 +1068,7 @@ class gt {
1088
1068
  } : t;
1089
1069
  }
1090
1070
  async verifyMobileNumber(e) {
1091
- const t = await this.client.request(ut, e);
1071
+ const t = await this.client.request(mt, e);
1092
1072
  return t.ok ? t.data.verifyMobileNumber ? {
1093
1073
  ok: !1,
1094
1074
  error: d(t.data.verifyMobileNumber.__typename)
@@ -1097,7 +1077,7 @@ class gt {
1097
1077
  } : t;
1098
1078
  }
1099
1079
  async createMemberVerification(e) {
1100
- const t = await this.client.request(lt, e);
1080
+ const t = await this.client.request(dt, e);
1101
1081
  return t.ok ? t.data.createMemberVerification ? {
1102
1082
  ok: !1,
1103
1083
  error: d(t.data.createMemberVerification.__typename)
@@ -1106,7 +1086,7 @@ class gt {
1106
1086
  } : t;
1107
1087
  }
1108
1088
  async updateMemberVerification(e) {
1109
- const t = await this.client.request(pt, e);
1089
+ const t = await this.client.request(ut, e);
1110
1090
  return t.ok ? t.data.updateMemberVerification ? {
1111
1091
  ok: !1,
1112
1092
  error: d(t.data.updateMemberVerification.__typename)
@@ -1115,7 +1095,7 @@ class gt {
1115
1095
  } : t;
1116
1096
  }
1117
1097
  async memberVerification() {
1118
- const e = await this.client.request(it);
1098
+ const e = await this.client.request(ot);
1119
1099
  return e.ok ? {
1120
1100
  ok: !0,
1121
1101
  data: e.data.memberAccount.verification
@@ -1123,7 +1103,7 @@ class gt {
1123
1103
  }
1124
1104
  async announcements(e) {
1125
1105
  const t = await this.client.request(
1126
- Oe,
1106
+ xe,
1127
1107
  e
1128
1108
  );
1129
1109
  return t.ok ? {
@@ -1132,14 +1112,14 @@ class gt {
1132
1112
  } : t;
1133
1113
  }
1134
1114
  }
1135
- function h(n, e) {
1136
- const t = Y[n] ? Y[n] : Y[500];
1115
+ function h(o, e) {
1116
+ const t = G[o] ? G[o] : G[500];
1137
1117
  return {
1138
1118
  name: t.name,
1139
1119
  message: e ?? t.message
1140
1120
  };
1141
1121
  }
1142
- const Y = {
1122
+ const G = {
1143
1123
  400: { name: "HttpBadRequest", message: "Bad Request" },
1144
1124
  401: { name: "HttpUnauthorized", message: "Unauthorized" },
1145
1125
  403: { name: "HttpForbidden", message: "Forbidden" },
@@ -1148,10 +1128,10 @@ const Y = {
1148
1128
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1149
1129
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1150
1130
  };
1151
- class Et {
1131
+ class yt {
1152
1132
  constructor(e) {
1153
- c(this, "url");
1154
- c(this, "platform");
1133
+ m(this, "url");
1134
+ m(this, "platform");
1155
1135
  this.url = e.url, this.platform = e.platform;
1156
1136
  }
1157
1137
  async createSession(e) {
@@ -1289,20 +1269,20 @@ class Et {
1289
1269
  }
1290
1270
  }
1291
1271
  }
1292
- class St {
1272
+ class gt {
1293
1273
  constructor(e) {
1294
- c(this, "client");
1274
+ m(this, "client");
1295
1275
  this.client = e;
1296
1276
  }
1297
1277
  async file(e) {
1298
- const t = await this.client.request(Ne, e);
1278
+ const t = await this.client.request(ve, e);
1299
1279
  return t.ok ? {
1300
1280
  ok: !0,
1301
1281
  data: t.data.node
1302
1282
  } : t;
1303
1283
  }
1304
1284
  async uploadPrivateImageFile(e) {
1305
- const t = await this.client.upload(ve, e);
1285
+ const t = await this.client.upload(Ne, e);
1306
1286
  return t.ok ? t.data.uploadPrivateImageFile ? {
1307
1287
  ok: !1,
1308
1288
  error: d(t.data.uploadPrivateImageFile.__typename)
@@ -1311,48 +1291,48 @@ class St {
1311
1291
  } : t;
1312
1292
  }
1313
1293
  }
1314
- class At {
1294
+ class Et {
1315
1295
  constructor(e) {
1316
- c(this, "client");
1296
+ m(this, "client");
1317
1297
  this.client = e;
1318
1298
  }
1319
1299
  async betRecords(e) {
1320
1300
  const t = await this.client.request(
1321
- Ke,
1301
+ je,
1322
1302
  e
1323
1303
  );
1324
1304
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1325
1305
  }
1326
1306
  async transactionRecords(e) {
1327
- const t = await this.client.request(Je, e);
1307
+ const t = await this.client.request(Ke, e);
1328
1308
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1329
1309
  }
1330
1310
  async withdrawalRecords(e) {
1331
1311
  const t = await this.client.request(
1332
- Ue,
1312
+ Ge,
1333
1313
  e
1334
1314
  );
1335
1315
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
1336
1316
  }
1337
1317
  async depositRecords(e) {
1338
1318
  const t = await this.client.request(
1339
- Fe,
1319
+ qe,
1340
1320
  e
1341
1321
  );
1342
1322
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1343
1323
  }
1344
1324
  async depositsCount() {
1345
- const e = await this.client.request(Qe);
1325
+ const e = await this.client.request(Ye);
1346
1326
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1347
1327
  }
1348
1328
  async member() {
1349
- const e = await this.client.request(nt);
1329
+ const e = await this.client.request(at);
1350
1330
  return e.ok ? { ok: e.ok, data: e.data.member } : e;
1351
1331
  }
1352
1332
  }
1353
- class bt {
1333
+ class St {
1354
1334
  constructor(e) {
1355
- c(this, "url");
1335
+ m(this, "url");
1356
1336
  this.url = e.url;
1357
1337
  }
1358
1338
  gameThumbnails(e) {
@@ -1362,32 +1342,32 @@ class bt {
1362
1342
  ];
1363
1343
  }
1364
1344
  }
1365
- class be {
1345
+ class Ae {
1366
1346
  constructor(e) {
1367
- c(this, "client");
1347
+ m(this, "client");
1368
1348
  this.client = e;
1369
1349
  }
1370
1350
  async promos() {
1371
- const e = await this.client.request(Xe);
1351
+ const e = await this.client.request(ze);
1372
1352
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1373
1353
  }
1374
1354
  async cashbacks() {
1375
- const e = await this.client.request(et);
1355
+ const e = await this.client.request(Xe);
1376
1356
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1377
1357
  }
1378
1358
  async availablePromos(e) {
1379
1359
  const t = await this.client.request(
1380
- Ze,
1360
+ Je,
1381
1361
  e
1382
1362
  );
1383
1363
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1384
1364
  }
1385
1365
  async cashbackBonuses() {
1386
- const e = await this.client.request(at);
1366
+ const e = await this.client.request(et);
1387
1367
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1388
1368
  }
1389
1369
  async claimCashbackBonus(e) {
1390
- const t = await this.client.request(rt, e);
1370
+ const t = await this.client.request(tt, e);
1391
1371
  return t.ok ? t.data.claimCashbackBonus ? {
1392
1372
  ok: !1,
1393
1373
  error: d(t.data.claimCashbackBonus.__typename)
@@ -1399,7 +1379,7 @@ class be {
1399
1379
  };
1400
1380
  }
1401
1381
  async bonus() {
1402
- const e = await this.client.request(tt);
1382
+ const e = await this.client.request(Ze);
1403
1383
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1404
1384
  }
1405
1385
  async wallet() {
@@ -1408,13 +1388,13 @@ class be {
1408
1388
  }
1409
1389
  async deposit(e) {
1410
1390
  const t = await this.client.request(
1411
- je,
1391
+ He,
1412
1392
  e
1413
1393
  );
1414
1394
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1415
1395
  }
1416
1396
  async createGCashDeposit(e) {
1417
- const t = await this.client.request(Ve, e);
1397
+ const t = await this.client.request(Le, e);
1418
1398
  return t.ok ? t.data.createGCashDeposit ? {
1419
1399
  ok: !1,
1420
1400
  error: d(t.data.createGCashDeposit.__typename)
@@ -1423,7 +1403,7 @@ class be {
1423
1403
  } : t;
1424
1404
  }
1425
1405
  async createMayaDeposit(e) {
1426
- const t = await this.client.request(He, e);
1406
+ const t = await this.client.request(Ve, e);
1427
1407
  return t.ok ? t.data.createMayaDeposit ? {
1428
1408
  ok: !1,
1429
1409
  error: d(t.data.createMayaDeposit.__typename)
@@ -1432,7 +1412,7 @@ class be {
1432
1412
  } : t;
1433
1413
  }
1434
1414
  async createMayaAppDeposit(e) {
1435
- const t = await this.client.request(Ye, e);
1415
+ const t = await this.client.request(Fe, e);
1436
1416
  return t.ok ? t.data.createMayaAppDeposit ? {
1437
1417
  ok: !1,
1438
1418
  error: d(t.data.createMayaAppDeposit.__typename)
@@ -1441,7 +1421,7 @@ class be {
1441
1421
  } : t;
1442
1422
  }
1443
1423
  async createGCashWithdrawal(e) {
1444
- const t = await this.client.request($e, e);
1424
+ const t = await this.client.request(Oe, e);
1445
1425
  return t.ok ? t.data.createGCashWithdrawal ? {
1446
1426
  ok: !1,
1447
1427
  error: d(t.data.createGCashWithdrawal.__typename)
@@ -1450,7 +1430,7 @@ class be {
1450
1430
  } : t;
1451
1431
  }
1452
1432
  async createMayaWithdrawal(e) {
1453
- const t = await this.client.request(Be, e);
1433
+ const t = await this.client.request(Ue, e);
1454
1434
  return t.ok ? t.data.createMayaWithdrawal ? {
1455
1435
  ok: !1,
1456
1436
  error: d(t.data.createMayaWithdrawal.__typename)
@@ -1459,7 +1439,7 @@ class be {
1459
1439
  } : t;
1460
1440
  }
1461
1441
  async createMayaAppWithdrawal(e) {
1462
- const t = await this.client.request(qe, e);
1442
+ const t = await this.client.request(Be, e);
1463
1443
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1464
1444
  ok: !1,
1465
1445
  error: d(t.data.createMayaAppWithdrawal.__typename)
@@ -1468,7 +1448,7 @@ class be {
1468
1448
  } : t;
1469
1449
  }
1470
1450
  async createBankWithdrawal(e) {
1471
- const t = await this.client.request(We, e);
1451
+ const t = await this.client.request($e, e);
1472
1452
  return t.ok ? t.data.createBankWithdrawal ? {
1473
1453
  ok: !1,
1474
1454
  error: d(t.data.createBankWithdrawal.__typename)
@@ -1478,7 +1458,7 @@ class be {
1478
1458
  }
1479
1459
  async remainingDailyWithdrawalsCount() {
1480
1460
  const e = await this.client.request(
1481
- Le
1461
+ We
1482
1462
  );
1483
1463
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1484
1464
  }
@@ -1497,27 +1477,27 @@ class be {
1497
1477
  }
1498
1478
  async mayaSession(e) {
1499
1479
  const t = await this.client.request(
1500
- yt,
1480
+ ht,
1501
1481
  e
1502
1482
  );
1503
1483
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
1504
1484
  }
1505
1485
  /** @deprecated */
1506
1486
  async games(e) {
1507
- const t = await this.client.request(ge, e);
1487
+ const t = await this.client.request(ye, e);
1508
1488
  return t.ok ? { ok: t.ok, data: t.data.games } : t;
1509
1489
  }
1510
1490
  /** @deprecated */
1511
1491
  async gamesByName(e) {
1512
1492
  const t = await this.client.request(
1513
- Ee,
1493
+ ge,
1514
1494
  e
1515
1495
  );
1516
1496
  return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1517
1497
  }
1518
1498
  async gameSession(e) {
1519
1499
  const t = await this.client.request(
1520
- Re,
1500
+ Ee,
1521
1501
  e
1522
1502
  );
1523
1503
  return t.ok ? { ok: !0, data: t.data.node } : t;
@@ -1533,7 +1513,7 @@ class be {
1533
1513
  }
1534
1514
  async endGameSession(e) {
1535
1515
  const t = await this.client.request(
1536
- Pe,
1516
+ Re,
1537
1517
  e
1538
1518
  );
1539
1519
  return t.ok ? t.data.endGameSession ? {
@@ -1547,11 +1527,11 @@ class be {
1547
1527
  } : t;
1548
1528
  }
1549
1529
  }
1550
- class _t {
1530
+ class bt {
1551
1531
  constructor(e) {
1552
- c(this, "url");
1553
- c(this, "siteId");
1554
- c(this, "platformId");
1532
+ m(this, "url");
1533
+ m(this, "siteId");
1534
+ m(this, "platformId");
1555
1535
  this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1556
1536
  }
1557
1537
  async self() {
@@ -1562,18 +1542,18 @@ class _t {
1562
1542
  } : e;
1563
1543
  }
1564
1544
  async games(e) {
1565
- var r, s, m, u, l, p, y, f, b, _, k, T, C, N, v, I, M, D, R, P, x, G, O, U, $, B;
1545
+ var r, s, c, u, l, p, y, f, A, _, k, T, C, v, N, I;
1566
1546
  const t = new URLSearchParams();
1567
- e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), (s = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.name) != null && s.equal && t.set("filter[name][eq]", e.filter.name.equal), (u = (m = e == null ? void 0 : e.filter) == null ? void 0 : m.name) != null && u.notEqual && t.set("filter[name][neq]", e.filter.name.notEqual), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.name) != null && p.in && t.set("filter[name][in]", e.filter.name.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.name) != null && f.notIn && t.set("filter[name][nin]", e.filter.name.notIn.join(",")), (_ = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.name) != null && _.contains && t.set("filter[name][contains]", e.filter.name.contains), (T = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.type) != null && T.equal && t.set("filter[type][eq]", e.filter.type.equal), (N = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.type) != null && N.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (I = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.type) != null && I.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (D = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.type) != null && D.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.provider) != null && P.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.provider) != null && G.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (U = (O = e == null ? void 0 : e.filter) == null ? void 0 : O.provider) != null && U.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (B = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.provider) != null && B.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1547
+ e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (r = e == null ? void 0 : e.filter) == null ? void 0 : r.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (p = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && p.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (f = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && f.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (_ = (A = e == null ? void 0 : e.filter) == null ? void 0 : A.provider) != null && _.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (v = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && v.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (I = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && I.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(","));
1568
1548
  const a = await this.getJson("/games", t);
1569
1549
  return a.ok ? {
1570
1550
  ok: !0,
1571
1551
  data: {
1572
- edges: a.data.data.map((q) => ({
1573
- node: q,
1574
- cursor: q.cursor
1552
+ edges: a.data.data.map((M) => ({
1553
+ node: M,
1554
+ cursor: M.cursor
1575
1555
  })),
1576
- totalCount: a.data.totalCount,
1556
+ totalCount: a.data.totalCount ?? 0,
1577
1557
  pageInfo: {
1578
1558
  hasNextPage: !!a.data.next,
1579
1559
  endCursor: a.data.next
@@ -1619,27 +1599,27 @@ class _t {
1619
1599
  }
1620
1600
  }
1621
1601
  }
1622
- class kt {
1602
+ class At {
1623
1603
  constructor(e) {
1624
- c(this, "client");
1604
+ m(this, "client");
1625
1605
  this.client = e;
1626
1606
  }
1627
1607
  /** @deprecated */
1628
1608
  async games(e) {
1629
- const t = await this.client.request(ge, e);
1609
+ const t = await this.client.request(ye, e);
1630
1610
  return t.ok ? { ok: t.ok, data: t.data.games } : t;
1631
1611
  }
1632
1612
  /** @deprecated */
1633
1613
  async gamesByName(e) {
1634
1614
  const t = await this.client.request(
1635
- Ee,
1615
+ ge,
1636
1616
  e
1637
1617
  );
1638
1618
  return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1639
1619
  }
1640
1620
  async gameSession(e) {
1641
1621
  const t = await this.client.request(
1642
- xe,
1622
+ Ee,
1643
1623
  e
1644
1624
  );
1645
1625
  return t.ok ? { ok: !0, data: t.data.node } : t;
@@ -1654,7 +1634,7 @@ class kt {
1654
1634
  } : t;
1655
1635
  }
1656
1636
  async endGameSession(e) {
1657
- const t = await this.client.request(Ge, e);
1637
+ const t = await this.client.request(Pe, e);
1658
1638
  return t.ok ? t.data.endGameSession ? {
1659
1639
  ok: !1,
1660
1640
  error: d(t.data.endGameSession.__typename)
@@ -1663,46 +1643,46 @@ class kt {
1663
1643
  } : t;
1664
1644
  }
1665
1645
  }
1666
- class Tt {
1646
+ class _t {
1667
1647
  constructor(e) {
1668
- c(this, "client");
1648
+ m(this, "client");
1669
1649
  this.client = e;
1670
1650
  }
1671
1651
  async latestBetRecords() {
1672
- const e = await this.client.request(ze);
1652
+ const e = await this.client.request(Qe);
1673
1653
  return e.ok ? {
1674
1654
  ok: !0,
1675
1655
  data: e.data.latestBetRecords
1676
1656
  } : e;
1677
1657
  }
1678
1658
  }
1679
- function Ct(n, e, t) {
1680
- return n < e ? e : n > t ? t : n;
1659
+ function kt(o, e, t) {
1660
+ return o < e ? e : o > t ? t : o;
1681
1661
  }
1682
- function j(n) {
1683
- return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1662
+ function O(o) {
1663
+ return Object.prototype.toString.call(o) === "[object Object]" && Object(o) === o;
1684
1664
  }
1685
- function Nt(n) {
1665
+ function Tt(o) {
1686
1666
  const e = [];
1687
1667
  function t(a, r = []) {
1688
1668
  for (const s in a) {
1689
- const m = a[s];
1690
- j(m) ? t(m, [...r, s]) : Array.isArray(m) ? t(vt(m), [...r, s]) : e.push({
1669
+ const c = a[s];
1670
+ O(c) ? t(c, [...r, s]) : Array.isArray(c) ? t(Ct(c), [...r, s]) : e.push({
1691
1671
  key: [...r, s],
1692
- value: m
1672
+ value: c
1693
1673
  });
1694
1674
  }
1695
1675
  }
1696
- return t(n), e;
1676
+ return t(o), e;
1697
1677
  }
1698
- function vt(n) {
1699
- return n.reduce((e, t, a) => (e[a] = t, e), {});
1678
+ function Ct(o) {
1679
+ return o.reduce((e, t, a) => (e[a] = t, e), {});
1700
1680
  }
1701
- class A {
1681
+ class b {
1702
1682
  constructor(e, t) {
1703
- c(this, "url");
1704
- c(this, "options");
1705
- c(this, "middlewares");
1683
+ m(this, "url");
1684
+ m(this, "options");
1685
+ m(this, "middlewares");
1706
1686
  var r;
1707
1687
  const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1708
1688
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1735,13 +1715,13 @@ class A {
1735
1715
  return await this.exec(s);
1736
1716
  }
1737
1717
  async exec(e) {
1738
- var t, a, r, s, m, u;
1718
+ var t, a, r, s, c, u;
1739
1719
  try {
1740
1720
  const l = await fetch(e);
1741
1721
  if (!l.ok)
1742
1722
  return { ok: !1, error: h(l.status) };
1743
1723
  const p = await l.json(), y = p.data, f = (t = p.errors) == null ? void 0 : t.at(0);
1744
- return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, f.message) } : ((m = f.extensions) == null ? void 0 : m.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, f.message) } : {
1724
+ return f ? ((a = f.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = f.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, f.message) } : ((s = f.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, f.message) } : ((c = f.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = f.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, f.message) } : {
1745
1725
  ok: !1,
1746
1726
  error: h(500, f.message)
1747
1727
  } : {
@@ -1762,8 +1742,8 @@ class A {
1762
1742
  return t;
1763
1743
  }
1764
1744
  createUploadBody(e, t) {
1765
- const a = Nt(t).filter(
1766
- (m) => m.value instanceof File || m.value instanceof Blob
1745
+ const a = Tt(t).filter(
1746
+ (c) => c.value instanceof File || c.value instanceof Blob
1767
1747
  ), r = new FormData();
1768
1748
  r.append(
1769
1749
  "operations",
@@ -1773,20 +1753,20 @@ class A {
1773
1753
  })
1774
1754
  );
1775
1755
  const s = {};
1776
- return a.forEach((m, u) => {
1777
- s[u.toString()] = [`variables.${m.key.join(".")}`];
1778
- }), r.append("map", JSON.stringify(s)), a.forEach((m, u) => {
1779
- r.append(u.toString(), m.value);
1756
+ return a.forEach((c, u) => {
1757
+ s[u.toString()] = [`variables.${c.key.join(".")}`];
1758
+ }), r.append("map", JSON.stringify(s)), a.forEach((c, u) => {
1759
+ r.append(u.toString(), c.value);
1780
1760
  }), r;
1781
1761
  }
1782
1762
  }
1783
- async function g(n) {
1784
- const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
1763
+ async function g(o) {
1764
+ const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
1785
1765
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1786
1766
  }
1787
1767
  class _e {
1788
1768
  constructor(e) {
1789
- c(this, "enabled");
1769
+ m(this, "enabled");
1790
1770
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1791
1771
  }
1792
1772
  info(e) {
@@ -1802,54 +1782,54 @@ class _e {
1802
1782
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1803
1783
  }
1804
1784
  }
1805
- function K(n) {
1806
- return new Date(n.getTime());
1785
+ function B(o) {
1786
+ return new Date(o.getTime());
1807
1787
  }
1808
- function W(n, e) {
1809
- const t = K(n);
1788
+ function D(o, e) {
1789
+ const t = B(o);
1810
1790
  return t.setDate(t.getDate() + e), t;
1811
1791
  }
1812
- function L(n, e) {
1813
- const t = K(n);
1792
+ function R(o, e) {
1793
+ const t = B(o);
1814
1794
  return t.setMinutes(t.getMinutes() + e), t;
1815
1795
  }
1816
- function we(n, e) {
1817
- return n.getTime() > e.getTime();
1796
+ function he(o, e) {
1797
+ return o.getTime() > e.getTime();
1818
1798
  }
1819
- function ke(n) {
1799
+ function ke(o) {
1820
1800
  return new Promise((e) => {
1821
- setTimeout(e, n);
1801
+ setTimeout(e, o);
1822
1802
  });
1823
1803
  }
1824
- function ye(n, e) {
1804
+ function we(o, e) {
1825
1805
  const {
1826
1806
  until: t,
1827
1807
  interval: a = 1e3,
1828
1808
  maxAttempt: r = 3
1829
1809
  /**/
1830
1810
  } = e;
1831
- async function s(m, u) {
1832
- const l = u ?? r, p = await n(...m);
1833
- return t(p) ? p : l > 1 ? (await ke(a * ((r - l) / 2)), s(m, l - 1)) : p;
1811
+ async function s(c, u) {
1812
+ const l = u ?? r, p = await o(...c);
1813
+ return t(p) ? p : l > 1 ? (await ke(a * ((r - l) / 2)), s(c, l - 1)) : p;
1834
1814
  }
1835
- return async (...m) => await s(m);
1815
+ return async (...c) => await s(c);
1836
1816
  }
1837
- function F(n, e) {
1838
- const t = K(n);
1817
+ function P(o, e) {
1818
+ const t = B(o);
1839
1819
  return t.setMinutes(t.getMinutes() - e), t;
1840
1820
  }
1841
- class It {
1821
+ class vt {
1842
1822
  constructor(e) {
1843
- c(this, "logger");
1844
- c(this, "storageKey", "session");
1845
- c(this, "authService");
1846
- c(this, "walletService");
1847
- c(this, "_refreshing", !1);
1848
- this.authService = new Et({
1823
+ m(this, "logger");
1824
+ m(this, "storageKey", "session");
1825
+ m(this, "authService");
1826
+ m(this, "walletService");
1827
+ m(this, "_refreshing", !1);
1828
+ this.authService = new yt({
1849
1829
  url: e.authUrl,
1850
1830
  platform: e.platform
1851
- }), this.walletService = new be(
1852
- new A(e.walletUrl, {
1831
+ }), this.walletService = new Ae(
1832
+ new b(e.walletUrl, {
1853
1833
  middlewares: [
1854
1834
  (t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
1855
1835
  ]
@@ -1874,7 +1854,7 @@ class It {
1874
1854
  }
1875
1855
  };
1876
1856
  if (e.type === "MAYA") {
1877
- const s = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
1857
+ const s = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
1878
1858
  until: (p) => {
1879
1859
  var y;
1880
1860
  return p.ok && ((y = p.data) == null ? void 0 : y.member) != null;
@@ -1883,7 +1863,7 @@ class It {
1883
1863
  maxAttempt: 5
1884
1864
  })();
1885
1865
  if (!s.ok) return s;
1886
- const u = await ye(() => this.authService.createSession(e), {
1866
+ const u = await we(() => this.authService.createSession(e), {
1887
1867
  until: (p) => p.ok,
1888
1868
  interval: 1e3,
1889
1869
  maxAttempt: 5
@@ -1894,8 +1874,8 @@ class It {
1894
1874
  this.storageKey,
1895
1875
  JSON.stringify({
1896
1876
  ...u.data,
1897
- accessTokenExpiresAt: L(l, 8).getTime(),
1898
- refreshTokenExpiresAt: F(W(l, 30), 2).getTime()
1877
+ accessTokenExpiresAt: R(l, 8).getTime(),
1878
+ refreshTokenExpiresAt: P(D(l, 30), 2).getTime()
1899
1879
  })
1900
1880
  ), {
1901
1881
  ok: !0,
@@ -1910,8 +1890,8 @@ class It {
1910
1890
  this.storageKey,
1911
1891
  JSON.stringify({
1912
1892
  ...r.data,
1913
- accessTokenExpiresAt: L(s, 8).getTime(),
1914
- refreshTokenExpiresAt: F(W(s, 30), 2).getTime()
1893
+ accessTokenExpiresAt: R(s, 8).getTime(),
1894
+ refreshTokenExpiresAt: P(D(s, 30), 2).getTime()
1915
1895
  })
1916
1896
  ), {
1917
1897
  ok: !0,
@@ -1934,8 +1914,8 @@ class It {
1934
1914
  this.storageKey,
1935
1915
  JSON.stringify({
1936
1916
  ...t.data,
1937
- accessTokenExpiresAt: L(a, 8).getTime(),
1938
- refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
1917
+ accessTokenExpiresAt: R(a, 8).getTime(),
1918
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1939
1919
  })
1940
1920
  ), {
1941
1921
  ok: !0,
@@ -1950,8 +1930,8 @@ class It {
1950
1930
  this.storageKey,
1951
1931
  JSON.stringify({
1952
1932
  ...t.data,
1953
- accessTokenExpiresAt: L(a, 8).getTime(),
1954
- refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
1933
+ accessTokenExpiresAt: R(a, 8).getTime(),
1934
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
1955
1935
  })
1956
1936
  ), { ok: !0 };
1957
1937
  } else
@@ -1974,7 +1954,7 @@ class It {
1974
1954
  try {
1975
1955
  let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
1976
1956
  const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
1977
- if (we(a, s))
1957
+ if (he(a, s))
1978
1958
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
1979
1959
  ok: !1,
1980
1960
  error: {
@@ -1982,22 +1962,22 @@ class It {
1982
1962
  message: "Session expired."
1983
1963
  }
1984
1964
  };
1985
- if (we(a, r)) {
1965
+ if (he(a, r)) {
1986
1966
  this.logger.info("Refreshing session..."), this.refreshing = !0;
1987
- const m = await this.authService.refreshSession(t.refreshToken);
1988
- if (this.refreshing = !1, !m.ok)
1989
- return this.logger.error(`Failed to refresh session: ${m.error.message}`), m.error.name === "InvalidToken" || m.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1967
+ const c = await this.authService.refreshSession(t.refreshToken);
1968
+ if (this.refreshing = !1, !c.ok)
1969
+ return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1990
1970
  ok: !1,
1991
- error: m.error
1971
+ error: c.error
1992
1972
  }) : (this.logger.warn("Old session returned."), {
1993
1973
  ok: !0,
1994
1974
  data: t
1995
1975
  });
1996
1976
  this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
1997
1977
  ...t,
1998
- ...m.data,
1999
- accessTokenExpiresAt: L(a, 8).getTime(),
2000
- refreshTokenExpiresAt: F(W(a, 30), 2).getTime()
1978
+ ...c.data,
1979
+ accessTokenExpiresAt: R(a, 8).getTime(),
1980
+ refreshTokenExpiresAt: P(D(a, 30), 2).getTime()
2001
1981
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
2002
1982
  }
2003
1983
  return {
@@ -2037,17 +2017,17 @@ class It {
2037
2017
  return typeof window > "u";
2038
2018
  }
2039
2019
  }
2040
- function w(n) {
2020
+ function w(o) {
2041
2021
  const e = {};
2042
- for (const t in n) {
2043
- const a = n[t];
2022
+ for (const t in o) {
2023
+ const a = o[t];
2044
2024
  if (a !== null && a !== void 0) {
2045
- if (j(a)) {
2025
+ if (O(a)) {
2046
2026
  e[t] = w(a);
2047
2027
  continue;
2048
2028
  }
2049
2029
  if (Array.isArray(a)) {
2050
- e[t] = a.map((r) => j(r) ? w(r) : r);
2030
+ e[t] = a.map((r) => O(r) ? w(r) : r);
2051
2031
  continue;
2052
2032
  }
2053
2033
  e[t] = a;
@@ -2055,21 +2035,21 @@ function w(n) {
2055
2035
  }
2056
2036
  return e;
2057
2037
  }
2058
- function i(n, e) {
2059
- if (typeof n == "number" && !Number.isNaN(n))
2060
- return n;
2061
- if (typeof n == "string") {
2062
- const t = Number.parseFloat(n);
2038
+ function i(o, e) {
2039
+ if (typeof o == "number" && !Number.isNaN(o))
2040
+ return o;
2041
+ if (typeof o == "string") {
2042
+ const t = Number.parseFloat(o);
2063
2043
  if (!Number.isNaN(t))
2064
2044
  return t;
2065
2045
  }
2066
2046
  return e;
2067
2047
  }
2068
- class Mt {
2048
+ class Nt {
2069
2049
  constructor(e) {
2070
- c(this, "staticService");
2050
+ m(this, "staticService");
2071
2051
  const t = (e == null ? void 0 : e.environment) === "development";
2072
- this.staticService = new bt({
2052
+ this.staticService = new St({
2073
2053
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2074
2054
  });
2075
2055
  }
@@ -2109,7 +2089,7 @@ class Mt {
2109
2089
  return w(t);
2110
2090
  }
2111
2091
  platform(e) {
2112
- var t, a, r, s, m, u, l, p, y, f, b, _, k, T, C, N, v, I, M, D, R, P, x, G, O, U, $, B, q, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, ce, de, ue, le, pe, fe, he;
2092
+ var t, a, r, s, c, u, l, p, y, f, A, _, k, T, C, v, N, I, M, $, W, q, L, V, F, H, Y, j, Q, K, z, J, X, Z, ee, te, ae, re, oe, ne, ie, se, ce, me, de, ue, le, pe, fe;
2113
2093
  return {
2114
2094
  paymentSettings: {
2115
2095
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2120,7 +2100,7 @@ class Mt {
2120
2100
  iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
2121
2101
  webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
2122
2102
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2123
- minimumAmount: i((m = e.bankDepositGatewaySettings) == null ? void 0 : m.minimumAmount),
2103
+ minimumAmount: i((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2124
2104
  maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2125
2105
  },
2126
2106
  gcash: {
@@ -2128,69 +2108,69 @@ class Mt {
2128
2108
  iosEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.iosEnabled) ?? !1,
2129
2109
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2130
2110
  mobileWebEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.mobileWebEnabled) ?? !1,
2131
- minimumAmount: i((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.minimumAmount),
2111
+ minimumAmount: i((A = e.gcashDepositGatewaySettings) == null ? void 0 : A.minimumAmount),
2132
2112
  maximumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
2133
2113
  },
2134
2114
  maya: {
2135
2115
  androidEnabled: ((k = e.mayaDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
2136
2116
  iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
2137
2117
  webEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
2138
- mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
2139
- minimumAmount: i((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.minimumAmount),
2118
+ mobileWebEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.mobileWebEnabled) ?? !1,
2119
+ minimumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
2140
2120
  maximumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
2141
2121
  },
2142
2122
  mayaApp: {
2143
2123
  androidEnabled: ((M = e.mayaAppDepositGatewaySettings) == null ? void 0 : M.androidEnabled) ?? !1,
2144
- iosEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.iosEnabled) ?? !1,
2145
- webEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.webEnabled) ?? !1,
2146
- mobileWebEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.mobileWebEnabled) ?? !1,
2147
- minimumAmount: i((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.minimumAmount),
2148
- maximumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
2124
+ iosEnabled: (($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.iosEnabled) ?? !1,
2125
+ webEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.webEnabled) ?? !1,
2126
+ mobileWebEnabled: ((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.mobileWebEnabled) ?? !1,
2127
+ minimumAmount: i((L = e.mayaAppDepositGatewaySettings) == null ? void 0 : L.minimumAmount),
2128
+ maximumAmount: i((V = e.mayaAppDepositGatewaySettings) == null ? void 0 : V.maximumAmount)
2149
2129
  }
2150
2130
  },
2151
2131
  withdrawalGateway: {
2152
2132
  bank: {
2153
- androidEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.androidEnabled) ?? !1,
2154
- iosEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.iosEnabled) ?? !1,
2155
- webEnabled: (($ = e.bankWithdrawalGatewaySettings) == null ? void 0 : $.webEnabled) ?? !1,
2156
- mobileWebEnabled: ((B = e.bankWithdrawalGatewaySettings) == null ? void 0 : B.mobileWebEnabled) ?? !1,
2157
- minimumAmount: i((q = e.bankWithdrawalGatewaySettings) == null ? void 0 : q.minimumAmount),
2158
- maximumAmount: i((z = e.bankWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount)
2133
+ androidEnabled: ((F = e.bankWithdrawalGatewaySettings) == null ? void 0 : F.androidEnabled) ?? !1,
2134
+ iosEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.iosEnabled) ?? !1,
2135
+ webEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.webEnabled) ?? !1,
2136
+ mobileWebEnabled: ((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.mobileWebEnabled) ?? !1,
2137
+ minimumAmount: i((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.minimumAmount),
2138
+ maximumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.maximumAmount)
2159
2139
  },
2160
2140
  gcash: {
2161
- androidEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
2162
- iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
2163
- webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
2164
- mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
2165
- minimumAmount: i((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
2141
+ androidEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.androidEnabled) ?? !1,
2142
+ iosEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.iosEnabled) ?? !1,
2143
+ webEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.webEnabled) ?? !1,
2144
+ mobileWebEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.mobileWebEnabled) ?? !1,
2145
+ minimumAmount: i((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.minimumAmount),
2166
2146
  maximumAmount: i(
2167
- (ae = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ae.maximumAmount,
2147
+ (te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.maximumAmount,
2168
2148
  1e6
2169
2149
  )
2170
2150
  },
2171
2151
  maya: {
2172
- androidEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.androidEnabled) ?? !1,
2173
- iosEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.iosEnabled) ?? !1,
2152
+ androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
2153
+ iosEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.iosEnabled) ?? !1,
2174
2154
  webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
2175
- mobileWebEnabled: ((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
2176
- minimumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
2177
- maximumAmount: i((me = e.mayaWithdrawalGatewaySettings) == null ? void 0 : me.maximumAmount)
2155
+ mobileWebEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.mobileWebEnabled) ?? !1,
2156
+ minimumAmount: i((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.minimumAmount),
2157
+ maximumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
2178
2158
  },
2179
2159
  mayaApp: {
2180
2160
  androidEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.androidEnabled) ?? !1,
2181
- iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2182
- webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2183
- mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2184
- minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
2161
+ iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2162
+ webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
2163
+ mobileWebEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.mobileWebEnabled) ?? !1,
2164
+ minimumAmount: i((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.minimumAmount),
2185
2165
  maximumAmount: i(
2186
- (fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
2166
+ (pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.maximumAmount,
2187
2167
  1e6
2188
2168
  )
2189
2169
  }
2190
2170
  }
2191
2171
  },
2192
2172
  pointsClubSettings: {
2193
- multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
2173
+ multiplier: i((fe = e.pointsClubSettings) == null ? void 0 : fe.multiplier, 0)
2194
2174
  }
2195
2175
  };
2196
2176
  }
@@ -2316,7 +2296,7 @@ class Mt {
2316
2296
  winloss: i(e.winloss),
2317
2297
  validBet: i(e.validBet, 0),
2318
2298
  vendorRoundId: e.vendorRoundId ?? void 0,
2319
- game: this.game(e.game),
2299
+ game: e.game,
2320
2300
  serialCode: e.serialCode,
2321
2301
  dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
2322
2302
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2334,7 +2314,7 @@ class Mt {
2334
2314
  return {
2335
2315
  id: e.id,
2336
2316
  member: e.member,
2337
- game: this.game(e.game),
2317
+ game: e.game,
2338
2318
  bet: i(e.bet, 0),
2339
2319
  payout: i(e.payout, 0),
2340
2320
  validBet: i(e.validBet, 0),
@@ -2368,7 +2348,10 @@ class Mt {
2368
2348
  id: e.id,
2369
2349
  type: e.type,
2370
2350
  name: e.name,
2371
- images: this.staticService.gameThumbnails(e),
2351
+ images: this.staticService.gameThumbnails({
2352
+ id: e.externalId,
2353
+ provider: e.provider
2354
+ }),
2372
2355
  provider: e.provider,
2373
2356
  externalId: e.externalId
2374
2357
  };
@@ -2470,27 +2453,27 @@ class Mt {
2470
2453
  };
2471
2454
  }
2472
2455
  }
2473
- var Dt = { VITE_AUTH_DEVELOPMENT_URL: "https://auth.development.opexa.io", VITE_AUTH_PRODUCTION_URL: "https://auth.opexa.io", VITE_GAME_DEVELOPMENT_URL: "https://game.development.opexa.io/graphql", VITE_GAME_PRODUCTION_URL: "https://game.opexa.io/graphql", VITE_FILE_DEVELOPMENT_URL: "https://file.development.opexa.io/graphql", VITE_FILE_PRODUCTION_URL: "https://file.opexa.io/graphql", VITE_REPORT_DEVELOPMENT_URL: "https://report.development.opexa.io/graphql", VITE_REPORT_PRODUCTION_URL: "https://report.opexa.io/graphql", VITE_WALLET_DEVELOPMENT_URL: "https://wallet.development.opexa.io/graphql", VITE_WALLET_PRODUCTION_URL: "https://wallet.opexa.io/graphql", VITE_ACCOUNT_DEVELOPMENT_URL: "https://account.development.opexa.io/graphql", VITE_ACCOUNT_PRODUCTION_URL: "https://account.opexa.io/graphql", VITE_PORTAL_DEVELOPMENT_URL: "https://portal.development.opexa.io/graphql", VITE_PORTAL_PRODUCTION_URL: "https://portal.opexa.io/graphql", VITE_STATIC_DEVELOPMENT_URL: "https://static.development.opexa.io", VITE_STATIC_PRODUCTION_URL: "https://static.opexa.io", VITE_CMS_PORTAL_DEVELOPMENT_URL: "https://portal-api.opexacms.io/v1", BASE_URL: "/", MODE: "library", DEV: !1, PROD: !0, SSR: !1 };
2474
- class xt {
2456
+ var It = { VITE_AUTH_DEVELOPMENT_URL: "https://auth.development.opexa.io", VITE_AUTH_PRODUCTION_URL: "https://auth.opexa.io", VITE_GAME_DEVELOPMENT_URL: "https://game.development.opexa.io/graphql", VITE_GAME_PRODUCTION_URL: "https://game.opexa.io/graphql", VITE_FILE_DEVELOPMENT_URL: "https://file.development.opexa.io/graphql", VITE_FILE_PRODUCTION_URL: "https://file.opexa.io/graphql", VITE_REPORT_DEVELOPMENT_URL: "https://report.development.opexa.io/graphql", VITE_REPORT_PRODUCTION_URL: "https://report.opexa.io/graphql", VITE_WALLET_DEVELOPMENT_URL: "https://wallet.development.opexa.io/graphql", VITE_WALLET_PRODUCTION_URL: "https://wallet.opexa.io/graphql", VITE_ACCOUNT_DEVELOPMENT_URL: "https://account.development.opexa.io/graphql", VITE_ACCOUNT_PRODUCTION_URL: "https://account.opexa.io/graphql", VITE_PORTAL_DEVELOPMENT_URL: "https://portal.development.opexa.io/graphql", VITE_PORTAL_PRODUCTION_URL: "https://portal.opexa.io/graphql", VITE_STATIC_DEVELOPMENT_URL: "https://static.development.opexa.io", VITE_STATIC_PRODUCTION_URL: "https://static.opexa.io", VITE_CMS_PORTAL_DEVELOPMENT_URL: "https://portal-api.opexacms.io/v1", BASE_URL: "/", MODE: "library", DEV: !1, PROD: !0, SSR: !1 };
2457
+ class Rt {
2475
2458
  constructor(e) {
2476
- c(this, "gameService");
2477
- c(this, "fileService");
2478
- c(this, "walletService");
2479
- c(this, "reportService");
2480
- c(this, "portalService");
2481
- c(this, "accountService");
2482
- c(this, "cmsPortalService");
2483
- c(this, "sessionManager");
2484
- c(this, "transformer");
2485
- c(this, "logger");
2459
+ m(this, "gameService");
2460
+ m(this, "fileService");
2461
+ m(this, "walletService");
2462
+ m(this, "reportService");
2463
+ m(this, "portalService");
2464
+ m(this, "accountService");
2465
+ m(this, "cmsPortalService");
2466
+ m(this, "sessionManager");
2467
+ m(this, "transformer");
2468
+ m(this, "logger");
2486
2469
  const t = e.environment === "development";
2487
- this.sessionManager = new It({
2470
+ this.sessionManager = new vt({
2488
2471
  authUrl: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
2489
2472
  walletUrl: t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2490
2473
  platform: e.platform,
2491
2474
  log: e.log
2492
- }), this.cmsPortalService = new _t({
2493
- url: t ? "https://portal-api.opexacms.io/v1" : Dt.VITE_CMS_PORTAL_PRODUCTION_URL,
2475
+ }), this.cmsPortalService = new bt({
2476
+ url: t ? "https://portal-api.opexacms.io/v1" : It.VITE_CMS_PORTAL_PRODUCTION_URL,
2494
2477
  site: e.site,
2495
2478
  platform: e.sitePlatform
2496
2479
  });
@@ -2503,37 +2486,37 @@ class xt {
2503
2486
  }
2504
2487
  }
2505
2488
  };
2506
- this.gameService = new kt(
2507
- new A(
2489
+ this.gameService = new At(
2490
+ new b(
2508
2491
  t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2509
2492
  a
2510
2493
  )
2511
- ), this.fileService = new St(
2512
- new A(
2494
+ ), this.fileService = new gt(
2495
+ new b(
2513
2496
  t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2514
2497
  a
2515
2498
  )
2516
- ), this.walletService = new be(
2517
- new A(
2499
+ ), this.walletService = new Ae(
2500
+ new b(
2518
2501
  t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2519
2502
  a
2520
2503
  )
2521
- ), this.reportService = new At(
2522
- new A(
2504
+ ), this.reportService = new Et(
2505
+ new b(
2523
2506
  t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2524
2507
  a
2525
2508
  )
2526
- ), this.accountService = new gt(
2527
- new A(
2509
+ ), this.accountService = new wt(
2510
+ new b(
2528
2511
  t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2529
2512
  a
2530
2513
  )
2531
- ), this.portalService = new Tt(
2532
- new A(
2514
+ ), this.portalService = new _t(
2515
+ new b(
2533
2516
  t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2534
2517
  a
2535
2518
  )
2536
- ), this.transformer = new Mt(e), this.logger = new _e({
2519
+ ), this.transformer = new Nt(e), this.logger = new _e({
2537
2520
  enabled: e.log ?? !1
2538
2521
  });
2539
2522
  }
@@ -2649,7 +2632,7 @@ class xt {
2649
2632
  * ```
2650
2633
  */
2651
2634
  watchSession(e) {
2652
- const t = Ct(e.interval ?? 3e4, 3e4, 6e4);
2635
+ const t = kt(e.interval ?? 3e4, 3e4, 6e4);
2653
2636
  let a = null;
2654
2637
  const r = () => setTimeout(async () => {
2655
2638
  await this.sessionManager.verify() || await e.onInvalid(), a = r();
@@ -3088,13 +3071,27 @@ class xt {
3088
3071
  /*+----------------------------------------+*/
3089
3072
  /**/
3090
3073
  async betRecords(e) {
3091
- const t = await this.reportService.betRecords(e);
3074
+ var a, r;
3075
+ const t = await this.reportService.betRecords({
3076
+ ...e,
3077
+ ...(e == null ? void 0 : e.filter) && {
3078
+ filter: {
3079
+ ...e.filter,
3080
+ ...((a = e.filter) == null ? void 0 : a.gameType) && {
3081
+ game__type: e.filter.gameType
3082
+ },
3083
+ ...((r = e.filter) == null ? void 0 : r.gameProvider) && {
3084
+ game__provider: e.filter.gameProvider
3085
+ }
3086
+ }
3087
+ }
3088
+ });
3092
3089
  return t.ok ? {
3093
3090
  ok: !0,
3094
3091
  data: {
3095
- betRecords: t.data.edges.map(({ cursor: a, node: r }) => ({
3096
- ...this.transformer.transform.betRecord(r),
3097
- cursor: a
3092
+ betRecords: t.data.edges.map(({ cursor: s, node: c }) => ({
3093
+ ...this.transformer.transform.betRecord(c),
3094
+ cursor: s
3098
3095
  })),
3099
3096
  totalCount: t.data.totalCount,
3100
3097
  endCursor: t.data.pageInfo.endCursor ?? void 0,
@@ -3264,10 +3261,7 @@ class xt {
3264
3261
  const t = await this.gameService.gameSession({ id: e });
3265
3262
  return t.ok ? {
3266
3263
  ok: !0,
3267
- data: t.data ? this.transformer.transform.gameSession({
3268
- ...t.data,
3269
- game: t.data.game.id
3270
- }) : null
3264
+ data: t.data ? this.transformer.transform.gameSession(t.data) : null
3271
3265
  } : t;
3272
3266
  }
3273
3267
  async gameSession__next(e) {
@@ -3324,7 +3318,7 @@ class xt {
3324
3318
  type: a,
3325
3319
  provider: r,
3326
3320
  externalId: s
3327
- } = t.data, m = a === "SPORTS" ? e.id ?? (await E.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? E.generate(S.GameSession).toString(), l = [
3321
+ } = t.data, c = a === "SPORTS" ? e.id ?? (await E.generateFromKey(S.Game, `SPORTS:${r}`)).toString() : e.id ?? E.generate(S.GameSession).toString(), l = [
3328
3322
  /**/
3329
3323
  "RTG",
3330
3324
  "DARWIN",
@@ -3333,8 +3327,8 @@ class xt {
3333
3327
  "EVOLUTION",
3334
3328
  "EVOLUTION_NETENT",
3335
3329
  "EVOLUTION_REDTIGER"
3336
- ].includes(r) ? await this.walletService.createGameSession({ input: { id: m, game: s } }) : await this.gameService.createGameSession({ input: { id: m, game: s } });
3337
- return l.ok ? { ok: !0, data: { id: m } } : l;
3330
+ ].includes(r) ? await this.walletService.createGameSession({ input: { id: c, game: s } }) : await this.gameService.createGameSession({ input: { id: c, game: s } });
3331
+ return l.ok ? { ok: !0, data: { id: c } } : l;
3338
3332
  }
3339
3333
  /** @deprecated use `endGameSession__next` */
3340
3334
  async endGameSession(e) {
@@ -3408,8 +3402,8 @@ class xt {
3408
3402
  }
3409
3403
  }
3410
3404
  export {
3411
- Ut as ObjectId,
3405
+ Gt as ObjectId,
3412
3406
  S as ObjectType,
3413
- xt as Sdk
3407
+ Rt as Sdk
3414
3408
  };
3415
3409
  //# sourceMappingURL=index.mjs.map