@everymatrix/player-account-controller 1.67.3 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/components/{GeneralLogout-DC1eQria.js → GeneralLogout-CYE3twI-.js} +1493 -1458
  2. package/components/{GeneralLogout-BvHI6IRl.js → GeneralLogout-CgxHUYZx.js} +1474 -1439
  3. package/components/GeneralLogout-Dzu2Sl-x.cjs +21 -0
  4. package/components/{PlayerAccountBettingHistory-Bo3-gODs.js → PlayerAccountBettingHistory-B0IsJ01N.js} +27 -27
  5. package/components/{PlayerAccountBettingHistory-BTEzWQvN.js → PlayerAccountBettingHistory-BXBMy618.js} +27 -27
  6. package/components/{PlayerAccountBettingHistory-DgHU9Jz9.cjs → PlayerAccountBettingHistory-BtDZukYI.cjs} +1 -1
  7. package/components/{PlayerAccountBiometrics-DRMe1Ngk.js → PlayerAccountBiometrics-CCk_4MyI.js} +22 -22
  8. package/components/{PlayerAccountBiometrics-DXk7ouzk.cjs → PlayerAccountBiometrics-CEEVheLt.cjs} +1 -1
  9. package/components/{PlayerAccountBiometrics-eJ0NsGhR.js → PlayerAccountBiometrics-DrmVF6dX.js} +22 -22
  10. package/components/{PlayerAccountClosure-CenyN-4X.js → PlayerAccountClosure-B_xwOPds.js} +17 -17
  11. package/components/{PlayerAccountClosure-DMF66IyF.cjs → PlayerAccountClosure-DoZ91aH2.cjs} +1 -1
  12. package/components/{PlayerAccountClosure-D4FSDBR-.js → PlayerAccountClosure-UwL_V2IO.js} +17 -17
  13. package/components/{PlayerAccountController-D3jDQKMc.js → PlayerAccountController-Bj-XgQJE.js} +2247 -2187
  14. package/components/{PlayerAccountController-C88OV9t0.js → PlayerAccountController-CvlVSeuD.js} +2250 -2190
  15. package/components/PlayerAccountController-DOYR_ETm.cjs +1 -0
  16. package/components/{PlayerAccountGamingLimits-bgH5yldD.js → PlayerAccountGamingLimits-B0QALjVi.js} +19 -19
  17. package/components/{PlayerAccountGamingLimits-C5-wP3x8.cjs → PlayerAccountGamingLimits-BIXEO8qU.cjs} +1 -1
  18. package/components/{PlayerAccountGamingLimits-qvefhQXf.js → PlayerAccountGamingLimits-C11On8aq.js} +19 -19
  19. package/components/{PlayerAccountGamingLimitsConfirmationModal-B-Zcfwzu.js → PlayerAccountGamingLimitsConfirmationModal-57Q5qtf8.js} +53 -53
  20. package/components/PlayerAccountGamingLimitsConfirmationModal-CVJUvbSC.cjs +1 -0
  21. package/components/{PlayerAccountGamingLimitsConfirmationModal-BSuURD9X.js → PlayerAccountGamingLimitsConfirmationModal-CztJ5DKd.js} +53 -53
  22. package/components/PlayerAccountGamingLimitsGroupEdit-C40tSY9Z.js +4792 -0
  23. package/components/PlayerAccountGamingLimitsGroupEdit-CoayAtf0.js +4792 -0
  24. package/components/PlayerAccountGamingLimitsGroupEdit-Crtmu06d.cjs +2 -0
  25. package/components/{PlayerAccountGamingLimitsHistory2-B0Hm0NN-.js → PlayerAccountGamingLimitsHistory2-BLK-Rk6N.js} +48 -48
  26. package/components/{PlayerAccountGamingLimitsHistory2-CkXX1K7L.js → PlayerAccountGamingLimitsHistory2-Br4h7_eS.js} +46 -46
  27. package/components/{PlayerAccountGamingLimitsHistory2-C0g0UlRl.cjs → PlayerAccountGamingLimitsHistory2-CreFMkf_.cjs} +1 -1
  28. package/components/{PlayerAccountGamingLimitsInfoCard-DxIPZWF4.cjs → PlayerAccountGamingLimitsInfoCard-COS0sgRr.cjs} +1 -1
  29. package/components/{PlayerAccountGamingLimitsInfoCard-ByqimrlU.js → PlayerAccountGamingLimitsInfoCard-D5Vpi7Gd.js} +80 -80
  30. package/components/{PlayerAccountGamingLimitsInfoCard-D2xDA5AE.js → PlayerAccountGamingLimitsInfoCard-blI001Nx.js} +80 -80
  31. package/components/{PlayerAccountGamingLimitsPage2Gm16-Bjtas4Og.js → PlayerAccountGamingLimitsPage2Gm16-C-xpYl-9.js} +118 -118
  32. package/components/{PlayerAccountGamingLimitsPage2Gm16-AMitiwvP.js → PlayerAccountGamingLimitsPage2Gm16-DHrtbHzT.js} +101 -101
  33. package/components/{PlayerAccountGamingLimitsPage2Gm16-DfhEHyrV.cjs → PlayerAccountGamingLimitsPage2Gm16-D_gOt2wG.cjs} +2 -2
  34. package/components/{PlayerAccountGamingLimitsPopup-DkQcpWO7.cjs → PlayerAccountGamingLimitsPopup-CmNqLNxB.cjs} +1 -1
  35. package/components/{PlayerAccountGamingLimitsPopup-Bhe4pnzt.js → PlayerAccountGamingLimitsPopup-DTb6cpuT.js} +28 -28
  36. package/components/{PlayerAccountGamingLimitsPopup-LjmHojBJ.js → PlayerAccountGamingLimitsPopup-Dz9ROowj.js} +28 -28
  37. package/components/{PlayerAccountGamingLimitsWrapper2-bXqMOFZu.js → PlayerAccountGamingLimitsWrapper2-BCk1ujGX.js} +36 -36
  38. package/components/{PlayerAccountGamingLimitsWrapper2-Db4M3i4n.js → PlayerAccountGamingLimitsWrapper2-CfyD6xtV.js} +36 -36
  39. package/components/{PlayerAccountGamingLimitsWrapper2-DUm34VGO.cjs → PlayerAccountGamingLimitsWrapper2-CwscbjX3.cjs} +1 -1
  40. package/components/PlayerAccountGeneralConfirmationModal-DHEkFez0.cjs +1 -0
  41. package/components/{PlayerAccountGeneralConfirmationModal-BXvbser8.js → PlayerAccountGeneralConfirmationModal-DbBEBukz.js} +100 -105
  42. package/components/{PlayerAccountGeneralConfirmationModal-Ct4ffM2k.js → PlayerAccountGeneralConfirmationModal-DzZ3ym_J.js} +100 -105
  43. package/components/{PlayerAccountMenu-BZSV920e.cjs → PlayerAccountMenu-BZnkRiU-.cjs} +1 -1
  44. package/components/{PlayerAccountMenu-COhw6RUO.js → PlayerAccountMenu-D4d9TQsD.js} +29 -29
  45. package/components/{PlayerAccountMenu-CXkbGum8.js → PlayerAccountMenu-j3TA2Osb.js} +29 -29
  46. package/components/{PlayerAccountModal-BlJKMVDD.js → PlayerAccountModal-Cbpkb5P6.js} +44 -44
  47. package/components/{PlayerAccountModal-C2BAyjz8.js → PlayerAccountModal-Co5a_OZZ.js} +44 -44
  48. package/components/{PlayerAccountModal-lwDOdDa4.cjs → PlayerAccountModal-SsGlrcmj.cjs} +1 -1
  49. package/components/{PlayerAccountNotifications-Br27rQuw.js → PlayerAccountNotifications-CkbUxjuk.js} +35 -35
  50. package/components/{PlayerAccountNotifications-CzMMRPni.cjs → PlayerAccountNotifications-ejASOsrU.cjs} +1 -1
  51. package/components/{PlayerAccountNotifications-YIzJUJtW.js → PlayerAccountNotifications-f0A-2obd.js} +120 -120
  52. package/components/{PlayerAccountProductRestriction-JWXFId11.js → PlayerAccountProductRestriction-BXXflOCi.js} +2228 -2202
  53. package/components/{PlayerAccountProductRestriction-B77qHgnG.js → PlayerAccountProductRestriction-f6Ihr4uI.js} +2241 -2215
  54. package/components/{PlayerAccountProductRestriction-DWcq863g.cjs → PlayerAccountProductRestriction-uj_BwdJ0.cjs} +271 -271
  55. package/components/{PlayerAccountSelfExclusion-hvxg512S.js → PlayerAccountSelfExclusion-B3xDcZXs.js} +898 -900
  56. package/components/{PlayerAccountSelfExclusion-DgB8NI71.cjs → PlayerAccountSelfExclusion-NoFOWnwy.cjs} +155 -155
  57. package/components/{PlayerAccountSelfExclusion-B-7yOGf0.js → PlayerAccountSelfExclusion-tzK5a7dq.js} +1208 -1210
  58. package/components/{PlayerAccountTimeout-BZa0DlXA.js → PlayerAccountTimeout-DFM9IiTT.js} +103 -103
  59. package/components/{PlayerAccountTimeout-ouzdA1ph.cjs → PlayerAccountTimeout-HZrAxL_1.cjs} +1 -1
  60. package/components/{PlayerAccountTimeout-DiPXXjP_.js → PlayerAccountTimeout-b0Nl9gfs.js} +103 -103
  61. package/components/{PlayerAccountTransactionsHistory-tOK25Lc2.js → PlayerAccountTransactionsHistory-B_kH0Hjt.js} +56 -56
  62. package/components/{PlayerAccountTransactionsHistory-DApJMGFo.js → PlayerAccountTransactionsHistory-DoyCBIgA.js} +56 -56
  63. package/components/{PlayerAccountTransactionsHistory-DrGUOnga.cjs → PlayerAccountTransactionsHistory-PIw_RR0i.cjs} +1 -1
  64. package/components/{PlayerActiveBonuses-dQ_zgejC.js → PlayerActiveBonuses-CSDz-kWg.js} +490 -460
  65. package/components/{PlayerActiveBonuses-5Q7f3yAG.js → PlayerActiveBonuses-CrOQdlJB.js} +497 -467
  66. package/components/PlayerActiveBonuses-wlP0A00N.cjs +1 -0
  67. package/components/PlayerBonusCard-BBQEU4zs.cjs +1 -0
  68. package/components/{PlayerBonusCard-uudC6LGS.js → PlayerBonusCard-Ca4GQeMu.js} +207 -191
  69. package/components/{PlayerBonusCard-CBO8neP8.js → PlayerBonusCard-qHJ-z21x.js} +207 -191
  70. package/components/PlayerBonusHistory-2blkOHr3.js +1051 -0
  71. package/components/PlayerBonusHistory-ChzkBbAH.js +1040 -0
  72. package/components/PlayerBonusHistory-D2uJLN_3.cjs +1 -0
  73. package/components/{PlayerChangePassword-BUbXMFnB.js → PlayerChangePassword-C2ZoKuCq.js} +66 -66
  74. package/components/{PlayerChangePassword-D4DzBZed.js → PlayerChangePassword-ChwKfBC6.js} +66 -66
  75. package/components/{PlayerChangePassword-D0aYOkoZ.cjs → PlayerChangePassword-LgjKzYU1.cjs} +1 -1
  76. package/components/{PlayerDeposit-lfkc7jOj.js → PlayerDeposit-BPZ5wCAZ.js} +29 -29
  77. package/components/{PlayerDeposit-DAFmH9HW.cjs → PlayerDeposit-Dzg8Ltb1.cjs} +1 -1
  78. package/components/{PlayerDeposit-BB64hmyO.js → PlayerDeposit-VLcz0tQH.js} +29 -29
  79. package/components/PlayerGamingHistory-8wco0drZ.js +1016 -0
  80. package/components/{PlayerGamingHistory-NKBfYTcF.js → PlayerGamingHistory-CRFPc2yB.js} +472 -456
  81. package/components/PlayerGamingHistory-D5C8zTFo.cjs +1 -0
  82. package/components/{PlayerPendingWithdrawals-DbuXpIXl.cjs → PlayerPendingWithdrawals-BMwtFNQT.cjs} +1 -1
  83. package/components/{PlayerPendingWithdrawals-QAaJbf_-.js → PlayerPendingWithdrawals-DeNKdUgJ.js} +26 -26
  84. package/components/{PlayerPendingWithdrawals-B6qiUkpB.js → PlayerPendingWithdrawals-go7okUzL.js} +26 -26
  85. package/components/{PlayerProfileInfo-CQWJWCmN.cjs → PlayerProfileInfo-DcmY9plr.cjs} +1 -1
  86. package/components/{PlayerProfileInfo-Bpxnw7hG.js → PlayerProfileInfo-FeIk7zXc.js} +120 -120
  87. package/components/{PlayerProfileInfo-C-yTxZtj.js → PlayerProfileInfo-lfogo592.js} +116 -116
  88. package/components/{PlayerRealityCheck-CFJVJn17.cjs → PlayerRealityCheck-BrVF76qp.cjs} +1 -1
  89. package/components/{PlayerRealityCheck-DQ-_y3IT.js → PlayerRealityCheck-C2TUMl9-.js} +45 -45
  90. package/components/{PlayerRealityCheck-CyxiiYoi.js → PlayerRealityCheck-DMNAglZN.js} +44 -44
  91. package/components/{PlayerTransactionHistory-BOtRm_b6.cjs → PlayerTransactionHistory-4VtQqLAc.cjs} +1 -1
  92. package/components/{PlayerTransactionHistory-6G6ws2ky.js → PlayerTransactionHistory-A-aVfyoc.js} +19 -19
  93. package/components/{PlayerTransactionHistory-BjRhtwD4.js → PlayerTransactionHistory-BFV_XJw9.js} +19 -19
  94. package/components/{PlayerWithdrawal-OBRjEIH9.cjs → PlayerWithdrawal-BMLgaRLc.cjs} +1 -1
  95. package/components/{PlayerWithdrawal-BIBZrL0i.js → PlayerWithdrawal-B_wQZI_t.js} +19 -19
  96. package/components/{PlayerWithdrawal-CuR6Pb4o.js → PlayerWithdrawal-CTttZqLr.js} +19 -19
  97. package/es2015/player-account-controller.cjs +1 -1
  98. package/es2015/player-account-controller.js +1 -1
  99. package/esnext/player-account-controller.js +1 -1
  100. package/package.json +1 -1
  101. package/stencil/{checkbox-group-input_14-yDxYy7hE.js → checkbox-group-input_14-0MlabybW.js} +3270 -3262
  102. package/stencil/{checkbox-group-input_14-BQWBhbsW.cjs → checkbox-group-input_14-BUUOn-f1.cjs} +263 -263
  103. package/stencil/{checkbox-group-input_14-Rk4kY_Jo.js → checkbox-group-input_14-D0Wi9yCm.js} +3273 -3265
  104. package/stencil/{index-13661b98-mRWmP463.js → index-13661b98-Dd0kDfGP.js} +215 -215
  105. package/stencil/{index-13661b98-l0CINbAR.js → index-13661b98-Vb11Gqfi.js} +207 -207
  106. package/stencil/index-13661b98-wjpz7oVL.cjs +1 -0
  107. package/stencil/{index-1ef3a64c-Dd-0nq4l.js → index-1ef3a64c-B5I86vac.js} +192 -192
  108. package/stencil/{index-1ef3a64c-B1Hda3TY.js → index-1ef3a64c-DqUPq8OL.js} +185 -185
  109. package/stencil/index-1ef3a64c-uiTzpR-U.cjs +1 -0
  110. package/stencil/{index-7c5e707a-CuTkyLaW.js → index-7c5e707a-2AC9SnQ7.js} +209 -209
  111. package/stencil/index-7c5e707a-BM4sfR0h.js +643 -0
  112. package/stencil/index-7c5e707a-Cw-c3Bke.cjs +1 -0
  113. package/stencil/{index-9c0f6c58-RPoO1End.js → index-9c0f6c58-BB5opCt9.js} +176 -176
  114. package/stencil/index-9c0f6c58-DmOKHEVq.cjs +1 -0
  115. package/stencil/{index-9c0f6c58-NlVKpLut.js → index-9c0f6c58-bxjYqwOi.js} +180 -180
  116. package/stencil/index-b2193545-CnMZ4-Ff.js +519 -0
  117. package/stencil/index-b2193545-Ct5AhxM8.cjs +1 -0
  118. package/stencil/index-b2193545-DePry399.js +503 -0
  119. package/stencil/{pam-change-password-CCgx2ZAF.cjs → pam-change-password-1_IegfkZ.cjs} +1 -1
  120. package/stencil/{pam-change-password-CDNRmQRk.js → pam-change-password-BUGFXbZ2.js} +1 -1
  121. package/stencil/{pam-change-password-CThYR6vj.js → pam-change-password-D23ISzqi.js} +1 -1
  122. package/stencil/{pam-change-password-f4a1e7e7-B3Gc4JmD.cjs → pam-change-password-f4a1e7e7-BqEyIcXD.cjs} +1 -1
  123. package/stencil/{pam-change-password-f4a1e7e7-DegbNPpZ.js → pam-change-password-f4a1e7e7-Cxe8Atmr.js} +1 -1
  124. package/stencil/{pam-change-password-f4a1e7e7-B0x-tDUM.js → pam-change-password-f4a1e7e7-DzJmDiaX.js} +1 -1
  125. package/stencil/{player-kyc-verification-Cxnz1raa.js → player-kyc-verification-CMAkNiAB.js} +9 -9
  126. package/stencil/{player-kyc-verification-qKWuqiUm.cjs → player-kyc-verification-DYcPWwfi.cjs} +2 -2
  127. package/stencil/{player-kyc-verification-DA_O1Dqu.js → player-kyc-verification-p2WFnKBp.js} +12 -12
  128. package/stencil/{ui-skeleton-1cb75d00-CZJ4UoDJ.js → ui-skeleton-1cb75d00-BI5A-j0y.js} +1 -1
  129. package/stencil/{ui-skeleton-1cb75d00-dFWe5qbW.cjs → ui-skeleton-1cb75d00-Batko5iK.cjs} +1 -1
  130. package/stencil/{ui-skeleton-1cb75d00-D5Bub0nv.js → ui-skeleton-1cb75d00-CwDKR1VD.js} +1 -1
  131. package/stencil/{ui-skeleton-CZ5yC1WO.js → ui-skeleton-C974aG7g.js} +2 -2
  132. package/stencil/{ui-skeleton-vLKdvRqw.js → ui-skeleton-DoX-UmRU.js} +2 -2
  133. package/stencil/{ui-skeleton-BH5oLkn9.cjs → ui-skeleton-t0bb1jH7.cjs} +1 -1
  134. package/stencil/{user-deposit-withdrawal-BMWb-WJE.js → user-deposit-withdrawal-BjmaGgRK.js} +46 -46
  135. package/stencil/{user-deposit-withdrawal-ByE9O4TW.js → user-deposit-withdrawal-D6SDVw3h.js} +46 -46
  136. package/stencil/{user-deposit-withdrawal-DGTrOlxS.cjs → user-deposit-withdrawal-Du59X_-y.cjs} +2 -2
  137. package/stencil/user-transaction-history-7_yFZr3w.js +1645 -0
  138. package/stencil/user-transaction-history-DZZT2rYX.cjs +1 -0
  139. package/stencil/user-transaction-history-Dpd_aKdj.js +1621 -0
  140. package/components/GeneralLogout-DweBl3EQ.cjs +0 -21
  141. package/components/PlayerAccountController-BrHDusjh.cjs +0 -1
  142. package/components/PlayerAccountGamingLimitsConfirmationModal-DzBevsyQ.cjs +0 -1
  143. package/components/PlayerAccountGamingLimitsGroupEdit-CgtvM5l0.js +0 -2893
  144. package/components/PlayerAccountGamingLimitsGroupEdit-DflmfEfo.js +0 -2893
  145. package/components/PlayerAccountGamingLimitsGroupEdit-JOrwbKuQ.cjs +0 -1
  146. package/components/PlayerAccountGeneralConfirmationModal-dy9TCHFm.cjs +0 -1
  147. package/components/PlayerActiveBonuses-C7-7ACSS.cjs +0 -1
  148. package/components/PlayerBonusCard-nwlvuWsq.cjs +0 -1
  149. package/components/PlayerBonusHistory-CG01zuOG.js +0 -985
  150. package/components/PlayerBonusHistory-D1AxPL0k.js +0 -986
  151. package/components/PlayerBonusHistory-DI5gRSGg.cjs +0 -1
  152. package/components/PlayerGamingHistory-C7HQc8KL.cjs +0 -1
  153. package/components/PlayerGamingHistory-DxA-MkBo.js +0 -975
  154. package/stencil/index-13661b98-Pl0EtfMi.cjs +0 -1
  155. package/stencil/index-1ef3a64c-CCWt3IAA.cjs +0 -1
  156. package/stencil/index-7c5e707a-8-4_dLFT.js +0 -643
  157. package/stencil/index-7c5e707a-nBsW029h.cjs +0 -1
  158. package/stencil/index-9c0f6c58-DbSOntvG.cjs +0 -1
  159. package/stencil/index-b2193545-BXNomIzV.js +0 -519
  160. package/stencil/index-b2193545-CYe2oVMy.js +0 -503
  161. package/stencil/index-b2193545-DxRobzZI.cjs +0 -1
  162. package/stencil/user-transaction-history-BU4-cXt6.js +0 -350
  163. package/stencil/user-transaction-history-CXBKXul8.js +0 -374
  164. package/stencil/user-transaction-history-DLLIZ5Ck.cjs +0 -1
@@ -1,374 +0,0 @@
1
- var c = (t, a, i) => new Promise((n, r) => {
2
- var l = (s) => {
3
- try {
4
- d(i.next(s));
5
- } catch (u) {
6
- r(u);
7
- }
8
- }, h = (s) => {
9
- try {
10
- d(i.throw(s));
11
- } catch (u) {
12
- r(u);
13
- }
14
- }, d = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(l, h);
15
- d((i = i.apply(t, a)).next());
16
- });
17
- import { b as y, p as x, r as v, g as p, h as e, H as w, a as S } from "./index-7c5e707a-8-4_dLFT.js";
18
- import { d as C } from "./app-globals-0f993ce5-DzSE6TtH.js";
19
- var k = () => {
20
- const t = import.meta.url, a = {};
21
- return t !== "" && (a.resourcesUrl = new URL(".", t).href), x(a);
22
- };
23
- k().then((t) => c(void 0, null, function* () {
24
- return yield C(), y([["user-transaction-history", [[1, "user-transaction-history", { endpoint: [513], session: [513], language: [513], userId: [513, "user-id"], translationUrl: [513, "translation-url"], mobile: [516], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], mbSource: [513, "mb-source"], page: [32], pageSize: [32], showMobileFilter: [32], to: [32], from: [32], type: [32], transactions: [32], showLoader: [32] }, [[9, "resize", "getComponentHeight"]], { page: ["watchMultiple"], type: ["watchMultiple"], session: ["watchMultiple"], userId: ["watchMultiple"], pageSize: ["watchMultiple"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingUrlChange"], showMobileFilter: ["getComponentHeight"] }]]]], t);
25
- }));
26
- const T = {
27
- en: {
28
- deposit: "Deposit",
29
- withdrawals: "Withdrawals",
30
- show: "Show",
31
- from: "From",
32
- to: "To",
33
- filter: "Filter",
34
- transactionId: "Transaction ID",
35
- date: "Date",
36
- amount: "Amount",
37
- productType: "Product Type",
38
- status: "Status",
39
- noData: "There are no account activities"
40
- },
41
- hr: {
42
- deposit: "Uplate",
43
- withdrawals: "Isplate",
44
- show: "Prikaži",
45
- from: "Od",
46
- to: "Do",
47
- filter: "Filter",
48
- transactionId: "ID transakcije",
49
- date: "Datum",
50
- amount: "Iznos",
51
- productType: "Vrsta proizvoda",
52
- status: "Status",
53
- noData: "Nema aktivnosti na računu"
54
- }
55
- };
56
- class o {
57
- constructor() {
58
- }
59
- static loadCustomTranslations(a) {
60
- return c(this, null, function* () {
61
- try {
62
- const i = yield fetch(a, {
63
- headers: {
64
- "Content-Type": "application/json"
65
- }
66
- });
67
- if (!i.ok) {
68
- const r = yield i.text();
69
- throw new Error(r);
70
- }
71
- const n = yield i.json();
72
- o.updateTranslations(n);
73
- } catch (i) {
74
- console.error(`Failed to load translations ${a}. ${i.message}`);
75
- }
76
- });
77
- }
78
- static translate(a, i) {
79
- var n, r;
80
- const l = o.getAvaliableLanguages(i);
81
- return ((r = (n = o.customTranslation) === null || n === void 0 ? void 0 : n[l.customLanguage]) === null || r === void 0 ? void 0 : r[a]) || o.defaultTranslation[l.predefinedLanguage][a];
82
- }
83
- static getAvaliableLanguages(a) {
84
- var i;
85
- const n = !((i = o.customLanguages) === null || i === void 0) && i.includes(a) ? a : o.defaultLanguage;
86
- return { predefinedLanguage: o.supportedLanguages.includes(a) ? a : o.defaultLanguage, customLanguage: n };
87
- }
88
- static updateTranslations(a) {
89
- o.customLanguages = Array.from(/* @__PURE__ */ new Set([...o.supportedLanguages, ...Object.keys(a).map((i) => i.toLowerCase())])), o.customTranslation = a;
90
- }
91
- }
92
- o.defaultLanguage = "en";
93
- o.supportedLanguages = ["en"];
94
- o.defaultTranslation = T;
95
- const B = () => e(
96
- "div",
97
- { class: "loader" },
98
- e("div", null),
99
- e("div", null),
100
- e("div", null),
101
- e("div", null),
102
- e("div", null),
103
- e("div", null),
104
- e("div", null),
105
- e("div", null),
106
- e("div", null),
107
- e("div", null),
108
- e("div", null),
109
- e("div", null)
110
- );
111
- class f {
112
- constructor() {
113
- }
114
- static dateToFormatedString(a) {
115
- const i = a.toLocaleDateString("en-gb"), n = a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 });
116
- return `${i}, ${n}`;
117
- }
118
- }
119
- class b {
120
- constructor() {
121
- }
122
- static format(a, i) {
123
- let n = `${i} ${a}`;
124
- try {
125
- n = new Intl.NumberFormat("en-US", {
126
- style: "currency",
127
- currency: a
128
- }).format(i);
129
- } catch (r) {
130
- }
131
- return n;
132
- }
133
- }
134
- const L = (t) => e(
135
- "div",
136
- { class: "data-transaction" },
137
- e("p", null, t.productType),
138
- e(
139
- "p",
140
- { class: "text-style text-style-status" },
141
- e("span", { class: t.status.toLowerCase() }, t.status)
142
- ),
143
- e(
144
- "p",
145
- { class: "date" },
146
- t.transId,
147
- " | ",
148
- f.dateToFormatedString(new Date(t.created))
149
- ),
150
- e(
151
- "p",
152
- { class: "text-style" },
153
- b.format(t.currency, t.realAmount),
154
- " "
155
- )
156
- ), D = (t) => e(
157
- "div",
158
- { class: "page-size" },
159
- e("span", null, o.translate("show", t.language)),
160
- t.pageSizes.map((a) => e("button", { class: t.currentPageSize === a ? "active" : "", onClick: () => t.changePageSize(a) }, a))
161
- ), F = ({ from: t, to: a, applyFilters: i, language: n }) => {
162
- let r, l;
163
- const h = () => {
164
- t = r.value;
165
- }, d = () => {
166
- a = l.value;
167
- };
168
- return e(
169
- "div",
170
- { class: "period" },
171
- e(
172
- "div",
173
- { class: "period-content" },
174
- e(
175
- "div",
176
- { class: "date-input" },
177
- e("vaadin-date-picker", { value: t, ref: (s) => r = s, label: o.translate("from", n), onChange: h })
178
- ),
179
- e(
180
- "span",
181
- null,
182
- e(
183
- "svg",
184
- { width: "24px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
185
- e("path", { d: "m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z", "fill-rule": "nonzero", fill: "#5d687b" })
186
- )
187
- ),
188
- e(
189
- "div",
190
- { class: "date-input" },
191
- e("vaadin-date-picker", { value: a, ref: (s) => l = s, label: o.translate("to", n), onChange: d })
192
- ),
193
- e("button", { class: "filter-btn", onClick: () => i(t, a) }, o.translate("filter", n))
194
- )
195
- );
196
- }, M = ({ source: t, language: a }) => {
197
- const i = [
198
- { name: o.translate("transactionId", a) },
199
- {
200
- name: o.translate("date", a)
201
- },
202
- {
203
- name: o.translate("amount", a)
204
- },
205
- { name: o.translate("productType", a) },
206
- {
207
- name: o.translate("status", a)
208
- }
209
- ];
210
- return e(
211
- "table",
212
- null,
213
- e(
214
- "thead",
215
- null,
216
- e("tr", null, i.map((n) => e("th", null, n.name)))
217
- ),
218
- e("tbody", null, t.map((n) => e(
219
- "tr",
220
- null,
221
- e("td", null, n.transId),
222
- e("td", null, f.dateToFormatedString(new Date(n.created))),
223
- e(
224
- "td",
225
- null,
226
- b.format(n.currency, n.realAmount),
227
- " "
228
- ),
229
- e("td", null, n.productType),
230
- e(
231
- "td",
232
- null,
233
- e("span", { class: n.status.toLowerCase() }, n.status)
234
- )
235
- )))
236
- );
237
- };
238
- function g(t, a) {
239
- if (t) {
240
- const i = document.createElement("style");
241
- i.innerHTML = a, t.appendChild(i);
242
- }
243
- }
244
- function m(t, a) {
245
- const i = new URL(a);
246
- fetch(i.href).then((n) => n.text()).then((n) => {
247
- const r = document.createElement("style");
248
- r.innerHTML = n, t && t.appendChild(r);
249
- }).catch((n) => {
250
- console.error("There was an error while trying to load client styling from URL", n);
251
- });
252
- }
253
- function U(t, a, i) {
254
- if (window.emMessageBus) {
255
- const n = document.createElement("style");
256
- window.emMessageBus.subscribe(a, (r) => {
257
- n.innerHTML = r, t && t.appendChild(n);
258
- });
259
- }
260
- }
261
- const z = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}', I = z, H = class {
262
- constructor(t) {
263
- v(this, t), this.pageSizes = [10, 25, 50], this.pagination = null, this.endpoint = void 0, this.session = void 0, this.language = o.defaultLanguage, this.userId = void 0, this.translationUrl = void 0, this.mobile = !1, this.clientStyling = null, this.clientStylingUrl = null, this.mbSource = void 0, this.page = 0, this.pageSize = this.pageSizes[0], this.showMobileFilter = !1, this.to = void 0, this.from = void 0, this.type = "0", this.transactions = void 0, this.showLoader = !0;
264
- }
265
- watchMultiple() {
266
- this.loadTransactions();
267
- }
268
- handleClientStylingChange(t, a) {
269
- t != a && g(this.stylingContainer, this.clientStyling);
270
- }
271
- handleClientStylingUrlChange(t, a) {
272
- t != a && this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl);
273
- }
274
- componentWillLoad() {
275
- return c(this, null, function* () {
276
- this.translationUrl && (yield o.loadCustomTranslations(this.translationUrl)), this.loadTransactions();
277
- });
278
- }
279
- componentDidLoad() {
280
- this.stylingContainer && (window.emMessageBus != null ? U(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && g(this.stylingContainer, this.clientStyling), this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl)));
281
- }
282
- componentDidRender() {
283
- this.getComponentHeight();
284
- }
285
- getComponentHeight() {
286
- var t;
287
- if (this.mobile) {
288
- let a = this.el.getBoundingClientRect().height - ((t = this.el.shadowRoot.querySelector(".table")) === null || t === void 0 ? void 0 : t.getBoundingClientRect().y);
289
- this.el.style.setProperty("--heightScrollableContainer", a + "px");
290
- }
291
- }
292
- setHeightTableProperty() {
293
- let t = this.getComponentHeight();
294
- this.el.style.setProperty("--heightScrollableContainer", t + "px");
295
- }
296
- changeTransactionsType(t) {
297
- this.type = t;
298
- }
299
- changePageSize(t) {
300
- this.pageSize = t;
301
- }
302
- prev() {
303
- var t;
304
- !((t = this.pagination) === null || t === void 0) && t.previous && this.page--;
305
- }
306
- next() {
307
- var t;
308
- !((t = this.pagination) === null || t === void 0) && t.next && this.page++;
309
- }
310
- applyFilters(t, a) {
311
- this.from = t ? new Date(t).toISOString() : null, this.to = a ? new Date(a).toISOString() : null, this.loadTransactions();
312
- }
313
- showFilter() {
314
- this.showMobileFilter = !this.showMobileFilter;
315
- }
316
- disconnectedCallback() {
317
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
318
- }
319
- render() {
320
- var t;
321
- const a = p("../assets/filter.svg"), i = p("../assets/warning.svg");
322
- return e(w, { key: "8d6470d73afff5dbc8a8c3a1a47426223971ad47" }, this.showLoader ? e(B, null) : "", e("div", { key: "8c32d9425b701747559ea1e63a3b2c4bb31780ab", class: "wrapper", ref: (n) => this.stylingContainer = n }, e("div", { key: "b2a9216bfcfa5950c174f6e06a179e2ae3790f6b", class: { "types types-mobile": this.mobile, "types types-desktop": !this.mobile } }, e("button", { key: "e2ce33fe2ab27abab68bd721b8b945bde5d672ac", class: "transaction-type " + (this.type === "0" ? "clicked" : ""), onClick: () => this.changeTransactionsType("0") }, o.translate("deposit", this.language)), e("button", { key: "6d80bef56bf4ec590cc2e4aa704f930a47b29f3c", class: "transaction-type " + (this.type === "1" ? "clicked" : ""), onClick: () => this.changeTransactionsType("1") }, o.translate("withdrawals", this.language))), this.mobile ? "" : e(D, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: (n) => this.changePageSize(n) }), this.mobile ? e("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, e("img", { src: a, alt: "Filter" }), o.translate("filter", this.language)) : "", !this.mobile || this.showMobileFilter && this.mobile ? e(F, { language: this.language, applyFilters: (n, r) => this.applyFilters(n, r) }) : "", ((t = this.transactions) === null || t === void 0 ? void 0 : t.length) > 0 ? e("div", { class: "table" }, this.mobile ? e("div", { class: "mobile-table" }, this.transactions.map((n) => e(L, Object.assign({}, n)))) : e(M, { source: this.transactions, language: this.language })) : e("div", { class: "noData" }, e("img", { src: i, alt: "Warning" }), e("span", null, o.translate("noData", this.language))), e("div", { key: "14b4d34c0e1d258ea0547b4aa43766199a629526", class: "pagination" }, e("button", { key: "fdd2a70e6dacf863c0783ab8dce80951294f04cc", onClick: () => this.prev() }, "<"), e("button", { key: "3bdc96262e16573e24ba07362e80ea779d30da9f", onClick: () => this.next() }, ">"))));
323
- }
324
- loadTransactions() {
325
- return c(this, null, function* () {
326
- this.showLoader = !0;
327
- try {
328
- const t = `${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`, a = yield fetch(t, {
329
- headers: {
330
- "X-Sessionid": this.session,
331
- "Content-Type": "application/json"
332
- }
333
- });
334
- if (!a.ok) {
335
- const n = yield a.text();
336
- throw new Error(n);
337
- }
338
- const i = yield a.json();
339
- this.pagination = i.pagination, this.transactions = i.transactions;
340
- } catch (t) {
341
- console.error(t);
342
- } finally {
343
- this.showLoader = !1;
344
- }
345
- });
346
- }
347
- getParams() {
348
- var t, a;
349
- const i = /* @__PURE__ */ new Date(), n = (this.page * this.pageSize).toString(), r = (t = this.from) !== null && t !== void 0 ? t : new Date(i.getFullYear(), i.getMonth(), 1).toISOString(), l = (a = this.to) !== null && a !== void 0 ? a : new Date(i.getFullYear(), i.getMonth() + 1, 0).toISOString();
350
- return `offset=${n}&endDate=${l}&startDate=${r}&type=${this.type}&limit=${this.pageSize}`;
351
- }
352
- static get assetsDirs() {
353
- return ["../assets"];
354
- }
355
- get el() {
356
- return S(this);
357
- }
358
- static get watchers() {
359
- return {
360
- page: ["watchMultiple"],
361
- type: ["watchMultiple"],
362
- session: ["watchMultiple"],
363
- userId: ["watchMultiple"],
364
- pageSize: ["watchMultiple"],
365
- clientStyling: ["handleClientStylingChange"],
366
- clientStylingUrl: ["handleClientStylingUrlChange"],
367
- showMobileFilter: ["getComponentHeight"]
368
- };
369
- }
370
- };
371
- H.style = I;
372
- export {
373
- H as user_transaction_history
374
- };
@@ -1 +0,0 @@
1
- "use strict";var c=(t,a,i)=>new Promise((n,r)=>{var l=s=>{try{d(i.next(s))}catch(u){r(u)}},h=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?n(s.value):Promise.resolve(s.value).then(l,h);d((i=i.apply(t,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7c5e707a-nBsW029h.cjs"),x=require("./app-globals-0f993ce5-DgYhdguE.cjs");var p=typeof document!="undefined"?document.currentScript:null,v=()=>{const t=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:p&&p.tagName.toUpperCase()==="SCRIPT"&&p.src||new URL("stencil/user-transaction-history-DLLIZ5Ck.cjs",document.baseURI).href,a={};return t!==""&&(a.resourcesUrl=new URL(".",t).href),e.promiseResolve(a)};v().then(t=>c(exports,null,function*(){return yield x.globalScripts$4(),e.bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}]]]],t)}));const w={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};class o{constructor(){}static loadCustomTranslations(a){return c(this,null,function*(){try{const i=yield fetch(a,{headers:{"Content-Type":"application/json"}});if(!i.ok){const r=yield i.text();throw new Error(r)}const n=yield i.json();o.updateTranslations(n)}catch(i){console.error(`Failed to load translations ${a}. ${i.message}`)}})}static translate(a,i){var n,r;const l=o.getAvaliableLanguages(i);return((r=(n=o.customTranslation)===null||n===void 0?void 0:n[l.customLanguage])===null||r===void 0?void 0:r[a])||o.defaultTranslation[l.predefinedLanguage][a]}static getAvaliableLanguages(a){var i;const n=!((i=o.customLanguages)===null||i===void 0)&&i.includes(a)?a:o.defaultLanguage;return{predefinedLanguage:o.supportedLanguages.includes(a)?a:o.defaultLanguage,customLanguage:n}}static updateTranslations(a){o.customLanguages=Array.from(new Set([...o.supportedLanguages,...Object.keys(a).map(i=>i.toLowerCase())])),o.customTranslation=a}}o.defaultLanguage="en";o.supportedLanguages=["en"];o.defaultTranslation=w;const S=()=>e.h("div",{class:"loader"},e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null));class f{constructor(){}static dateToFormatedString(a){const i=a.toLocaleDateString("en-gb"),n=a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return`${i}, ${n}`}}class b{constructor(){}static format(a,i){let n=`${i} ${a}`;try{n=new Intl.NumberFormat("en-US",{style:"currency",currency:a}).format(i)}catch(r){}return n}}const C=t=>e.h("div",{class:"data-transaction"},e.h("p",null,t.productType),e.h("p",{class:"text-style text-style-status"},e.h("span",{class:t.status.toLowerCase()},t.status)),e.h("p",{class:"date"},t.transId," | ",f.dateToFormatedString(new Date(t.created))),e.h("p",{class:"text-style"},b.format(t.currency,t.realAmount)," ")),k=t=>e.h("div",{class:"page-size"},e.h("span",null,o.translate("show",t.language)),t.pageSizes.map(a=>e.h("button",{class:t.currentPageSize===a?"active":"",onClick:()=>t.changePageSize(a)},a))),T=({from:t,to:a,applyFilters:i,language:n})=>{let r,l;const h=()=>{t=r.value},d=()=>{a=l.value};return e.h("div",{class:"period"},e.h("div",{class:"period-content"},e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:t,ref:s=>r=s,label:o.translate("from",n),onChange:h})),e.h("span",null,e.h("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:a,ref:s=>l=s,label:o.translate("to",n),onChange:d})),e.h("button",{class:"filter-btn",onClick:()=>i(t,a)},o.translate("filter",n))))},B=({source:t,language:a})=>{const i=[{name:o.translate("transactionId",a)},{name:o.translate("date",a)},{name:o.translate("amount",a)},{name:o.translate("productType",a)},{name:o.translate("status",a)}];return e.h("table",null,e.h("thead",null,e.h("tr",null,i.map(n=>e.h("th",null,n.name)))),e.h("tbody",null,t.map(n=>e.h("tr",null,e.h("td",null,n.transId),e.h("td",null,f.dateToFormatedString(new Date(n.created))),e.h("td",null,b.format(n.currency,n.realAmount)," "),e.h("td",null,n.productType),e.h("td",null,e.h("span",{class:n.status.toLowerCase()},n.status))))))};function g(t,a){if(t){const i=document.createElement("style");i.innerHTML=a,t.appendChild(i)}}function m(t,a){const i=new URL(a);fetch(i.href).then(n=>n.text()).then(n=>{const r=document.createElement("style");r.innerHTML=n,t&&t.appendChild(r)}).catch(n=>{console.error("There was an error while trying to load client styling from URL",n)})}function L(t,a,i){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(a,r=>{n.innerHTML=r,t&&t.appendChild(n)})}}const F=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}',D=F,y=class{constructor(t){e.registerInstance(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.endpoint=void 0,this.session=void 0,this.language=o.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.mbSource=void 0,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.to=void 0,this.from=void 0,this.type="0",this.transactions=void 0,this.showLoader=!0}watchMultiple(){this.loadTransactions()}handleClientStylingChange(t,a){t!=a&&g(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,a){t!=a&&this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return c(this,null,function*(){this.translationUrl&&(yield o.loadCustomTranslations(this.translationUrl)),this.loadTransactions()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?L(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&g(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl)))}componentDidRender(){this.getComponentHeight()}getComponentHeight(){var t;if(this.mobile){let a=this.el.getBoundingClientRect().height-((t=this.el.shadowRoot.querySelector(".table"))===null||t===void 0?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",a+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;!((t=this.pagination)===null||t===void 0)&&t.previous&&this.page--}next(){var t;!((t=this.pagination)===null||t===void 0)&&t.next&&this.page++}applyFilters(t,a){this.from=t?new Date(t).toISOString():null,this.to=a?new Date(a).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){var t;const a=e.getAssetPath("../assets/filter.svg"),i=e.getAssetPath("../assets/warning.svg");return e.h(e.Host,{key:"8d6470d73afff5dbc8a8c3a1a47426223971ad47"},this.showLoader?e.h(S,null):"",e.h("div",{key:"8c32d9425b701747559ea1e63a3b2c4bb31780ab",class:"wrapper",ref:n=>this.stylingContainer=n},e.h("div",{key:"b2a9216bfcfa5950c174f6e06a179e2ae3790f6b",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},e.h("button",{key:"e2ce33fe2ab27abab68bd721b8b945bde5d672ac",class:"transaction-type "+(this.type==="0"?"clicked":""),onClick:()=>this.changeTransactionsType("0")},o.translate("deposit",this.language)),e.h("button",{key:"6d80bef56bf4ec590cc2e4aa704f930a47b29f3c",class:"transaction-type "+(this.type==="1"?"clicked":""),onClick:()=>this.changeTransactionsType("1")},o.translate("withdrawals",this.language))),this.mobile?"":e.h(k,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:n=>this.changePageSize(n)}),this.mobile?e.h("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},e.h("img",{src:a,alt:"Filter"}),o.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?e.h(T,{language:this.language,applyFilters:(n,r)=>this.applyFilters(n,r)}):"",((t=this.transactions)===null||t===void 0?void 0:t.length)>0?e.h("div",{class:"table"},this.mobile?e.h("div",{class:"mobile-table"},this.transactions.map(n=>e.h(C,Object.assign({},n)))):e.h(B,{source:this.transactions,language:this.language})):e.h("div",{class:"noData"},e.h("img",{src:i,alt:"Warning"}),e.h("span",null,o.translate("noData",this.language))),e.h("div",{key:"14b4d34c0e1d258ea0547b4aa43766199a629526",class:"pagination"},e.h("button",{key:"fdd2a70e6dacf863c0783ab8dce80951294f04cc",onClick:()=>this.prev()},"<"),e.h("button",{key:"3bdc96262e16573e24ba07362e80ea779d30da9f",onClick:()=>this.next()},">"))))}loadTransactions(){return c(this,null,function*(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,a=yield fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!a.ok){const n=yield a.text();throw new Error(n)}const i=yield a.json();this.pagination=i.pagination,this.transactions=i.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}})}getParams(){var t,a;const i=new Date,n=(this.page*this.pageSize).toString(),r=(t=this.from)!==null&&t!==void 0?t:new Date(i.getFullYear(),i.getMonth(),1).toISOString(),l=(a=this.to)!==null&&a!==void 0?a:new Date(i.getFullYear(),i.getMonth()+1,0).toISOString();return`offset=${n}&endDate=${l}&startDate=${r}&type=${this.type}&limit=${this.pageSize}`}static get assetsDirs(){return["../assets"]}get el(){return e.getElement(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}}};y.style=D;exports.user_transaction_history=y;