everest-npm-features 0.0.17 → 0.0.18

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 (133) hide show
  1. package/dist/CheckCircle-BiltyzEJ.js +8 -0
  2. package/dist/PlayArrow-BYMBg9J8.js +8 -0
  3. package/dist/assets/index10.css +1 -1
  4. package/dist/assets/index11.css +1 -1
  5. package/dist/assets/index2.css +1 -1
  6. package/dist/assets/index3.css +1 -1
  7. package/dist/assets/index4.css +1 -1
  8. package/dist/assets/index5.css +1 -1
  9. package/dist/assets/index6.css +1 -1
  10. package/dist/assets/index7.css +1 -1
  11. package/dist/assets/index8.css +1 -1
  12. package/dist/assets/index9.css +1 -1
  13. package/dist/assets/styles2.css +1 -1
  14. package/dist/assets/styles3.css +1 -0
  15. package/dist/{auth-PInt5Jrb.js → auth-RJ36qeYb.js} +1 -1
  16. package/dist/{bank-BDnnvwyk.js → bank-Dml7vXW5.js} +10 -10
  17. package/dist/components/RocketRamp/MinimalKyc/form.js +5 -5
  18. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  19. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  20. package/dist/components/RocketRamp/Player/Buy/form.js +5 -5
  21. package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
  22. package/dist/components/RocketRamp/Player/Dashboard/index.js +13 -15
  23. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  24. package/dist/components/RocketRamp/Player/Sell/form.js +5 -5
  25. package/dist/components/RocketRamp/Player/Sell/index.js +8 -8
  26. package/dist/components/RocketRamp/Player/SignIn/index.js +3 -3
  27. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  28. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  29. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  30. package/dist/components/RocketRamp/Player/SignUp/index.js +3 -3
  31. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
  32. package/dist/components/RocketRamp/ResetPassword/index.js +3 -3
  33. package/dist/components/RocketRamp/Shared/Input/index.js +9 -9
  34. package/dist/components/RocketRamp/Store/SignUp/index.js +3 -3
  35. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
  36. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
  37. package/dist/components/RocketRamp/Transactions/index.js +7 -7
  38. package/dist/components/Shared/HistoryItem/index.js +40 -40
  39. package/dist/components/Shared/MinimalKyc/index.js +3 -3
  40. package/dist/components/Shared/tooltip.js +5 -2108
  41. package/dist/components/Wallet/Account/createIban.js +1 -1
  42. package/dist/components/Wallet/Account/iban.js +5 -5
  43. package/dist/components/Wallet/Account/index.js +17 -17
  44. package/dist/components/Wallet/Account/sendIban.js +16 -16
  45. package/dist/components/Wallet/Buy/confirmTransaction.d.ts +2 -2
  46. package/dist/components/Wallet/Buy/confirmTransaction.js +5 -4
  47. package/dist/components/Wallet/Buy/form.d.ts +2 -2
  48. package/dist/components/Wallet/Buy/form.js +9 -6
  49. package/dist/components/Wallet/Buy/index.d.ts +1 -1
  50. package/dist/components/Wallet/Buy/index.js +7 -7
  51. package/dist/components/Wallet/Deposit/index.d.ts +2 -0
  52. package/dist/components/Wallet/Deposit/index.js +110 -0
  53. package/dist/components/Wallet/EnterpriseKyc/edd.js +92 -80
  54. package/dist/components/Wallet/EnterpriseKyc/index.js +121 -108
  55. package/dist/components/Wallet/EnterpriseKyc/orgDetails.d.ts +1 -1
  56. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +110 -85
  57. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +2 -2
  58. package/dist/components/Wallet/EnterpriseKyc/types.d.ts +1 -0
  59. package/dist/components/Wallet/EnterpriseKyc/verify.js +2 -2
  60. package/dist/components/Wallet/History/index.js +4 -4
  61. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +33 -33
  62. package/dist/components/Wallet/Portfolio/index.js +171 -138
  63. package/dist/components/Wallet/Profile/documents.js +4 -4
  64. package/dist/components/Wallet/Profile/index.js +4 -4
  65. package/dist/components/Wallet/Receive/index.js +8 -8
  66. package/dist/components/Wallet/Sell/confirmTransaction.d.ts +3 -0
  67. package/dist/components/Wallet/Sell/confirmTransaction.js +18 -0
  68. package/dist/components/Wallet/Sell/form.d.ts +3 -0
  69. package/dist/components/Wallet/Sell/form.js +32 -0
  70. package/dist/components/Wallet/Sell/index.d.ts +6 -0
  71. package/dist/components/Wallet/Sell/index.js +22 -0
  72. package/dist/components/Wallet/Send/index.js +6 -6
  73. package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
  74. package/dist/components/Wallet/Shared/ConnectWallet/index.js +1 -1
  75. package/dist/components/Wallet/Shared/Container/index.js +1 -1
  76. package/dist/components/Wallet/Shared/Order/types.d.ts +51 -0
  77. package/dist/components/Wallet/Shared/TokenModal/index.d.ts +1 -1
  78. package/dist/components/Wallet/Shared/TokenModal/index.js +5 -5
  79. package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +4 -4
  80. package/dist/components/Wallet/Shared/addBank.js +6 -6
  81. package/dist/components/Wallet/Shared/connectPlaidBank.js +7 -7
  82. package/dist/components/Wallet/Shared/pin.js +1 -1
  83. package/dist/components/Wallet/SignIn/index.js +3 -3
  84. package/dist/components/Wallet/SignUp/index.js +3 -3
  85. package/dist/components/Wallet/Stake/gems/index.js +1 -1
  86. package/dist/components/Wallet/Stake/id/index.js +3 -3
  87. package/dist/components/Wallet/Stake/index.js +7 -7
  88. package/dist/components/Wallet/Swap/index.d.ts +3 -2
  89. package/dist/components/Wallet/Swap/index.js +327 -271
  90. package/dist/components/Wallet/SwapAndUniSwap/index.js +31 -35
  91. package/dist/components/Wallet/{Buy → SwapAndUniSwap}/types.d.ts +4 -13
  92. package/dist/components/Wallet/SwapAndUniSwap/types.js +1 -0
  93. package/dist/components/Wallet/Withdraw/bankSelect.d.ts +4 -0
  94. package/dist/components/Wallet/Withdraw/bankSelect.js +21 -0
  95. package/dist/components/Wallet/Withdraw/confirmTransaction.d.ts +3 -0
  96. package/dist/components/Wallet/Withdraw/confirmTransaction.js +19 -0
  97. package/dist/components/Wallet/Withdraw/form.d.ts +3 -0
  98. package/dist/components/Wallet/Withdraw/form.js +26 -0
  99. package/dist/components/Wallet/Withdraw/index.d.ts +7 -0
  100. package/dist/components/Wallet/Withdraw/index.js +22 -0
  101. package/dist/constants-QcvnheTz.js +5307 -0
  102. package/dist/cryptoAssets-DBfxll21.js +16 -0
  103. package/dist/{documents-b3tR38Qf.js → documents-Bd28UFLu.js} +3 -3
  104. package/dist/{fiatAssets-Di1Dvl51.js → fiatAssets-w5Lh-MSu.js} +1 -1
  105. package/dist/hooks/useDialog/index.js +22 -22
  106. package/dist/hooks/useRrDialog/index.js +1 -1
  107. package/dist/{iban-D3Y3E3cN.js → iban-CKaN4sIM.js} +6 -6
  108. package/dist/index-BEdISdN-.js +709 -0
  109. package/dist/{index-BhJeqQtm.js → index-BNaxzTKI.js} +164 -163
  110. package/dist/index-BvftsxV1.js +677 -0
  111. package/dist/index-DSHZv8ZQ.js +569 -0
  112. package/dist/{index-D2XCPzg3.js → index-_KAhqkWc.js} +144 -143
  113. package/dist/{index-DQaPU81n.js → index-f15o1nhn.js} +3 -3
  114. package/dist/{kyc-8mSMgUlU.js → kyc-V7cIa71M.js} +1 -1
  115. package/dist/main.d.ts +4 -0
  116. package/dist/main.js +47 -39
  117. package/dist/order-6L4LZOBs.js +41 -0
  118. package/dist/{react-redux-B4BZippc.js → react-redux-C7I9-1M6.js} +2 -2
  119. package/dist/{stake-Cf5t27F3.js → stake-r4KUlRcz.js} +1 -1
  120. package/dist/styles.module-BFHktEw2.js +30 -0
  121. package/dist/{styles.module-Ctfaq7f2.js → styles.module-DJk7Pf0F.js} +1 -1
  122. package/dist/tooltip-BVZ66d8C.js +2111 -0
  123. package/dist/util/constants.d.ts +1 -0
  124. package/dist/util/constants.js +84 -83
  125. package/dist/{wallet-Bghw0_Nm.js → wallet-D7MEPP5y.js} +1 -1
  126. package/package.json +2 -2
  127. package/dist/PlayArrow-Dent7shn.js +0 -21
  128. package/dist/assets/index12.css +0 -1
  129. package/dist/assets/index13.css +0 -1
  130. package/dist/constants-A8X7fywY.js +0 -3882
  131. package/dist/index-Bqxs_jIU.js +0 -709
  132. package/dist/order-DTnCUIx0.js +0 -34
  133. /package/dist/components/Wallet/{Buy → Shared/Order}/types.js +0 -0
@@ -0,0 +1,569 @@
1
+ import { jsxs as a, Fragment as E, jsx as e } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as _ } from "react";
3
+ import Ce from "./hoc/withThemeProvider.js";
4
+ import oe from "./components/Wallet/Shared/backBtn.js";
5
+ import { DIALOG_SUCCESS_ICON as be, PAYMENT_BANK as j, SEPA_ICON as ve, VISA_ICON as ke, PAYMENT_PROVIDER_PAYSAFE as Ee, FIAT_WITHDRAW as D, VISA_PAYMENT as Ie, VISA_PAYMENT_ACTIVE as Se, SEPA_PAYMENT as Be, SEPA_PAYMENT_ACTIVE as Fe } from "./util/constants.js";
6
+ import { s as u } from "./styles.module-BFHktEw2.js";
7
+ import Q from "./components/Wallet/Shared/appButton.js";
8
+ import "./constants-QcvnheTz.js";
9
+ import { b as se } from "./index-f15o1nhn.js";
10
+ import { o as J, b as ce, c as Re, h as Te, a as Pe, f as Me } from "./order-6L4LZOBs.js";
11
+ import { u as W, a as le } from "./react-redux-C7I9-1M6.js";
12
+ import { f as we } from "./fiatAssets-w5Lh-MSu.js";
13
+ import { u as Oe } from "./wallet-D7MEPP5y.js";
14
+ import { useSnackBarContext as ze } from "./context/snackBarContext.js";
15
+ import { AuthContainer as We } from "./components/Wallet/Shared/Container/index.js";
16
+ import Ye from "./components/Shared/MinimalKyc/index.js";
17
+ import Le from "./components/Wallet/Shared/Input/index.js";
18
+ import { A as Ke } from "./ArrowRight-CZV_yDgu.js";
19
+ import { C as qe } from "./CheckCircle-BiltyzEJ.js";
20
+ import $e from "./components/Wallet/Shared/addBank.js";
21
+ import { u as Ge } from "./bank-Dml7vXW5.js";
22
+ import Ve from "./components/Wallet/Shared/connectPlaidBank.js";
23
+ import { B as y } from "./Box-rIIGCyb6.js";
24
+ import { C as k } from "./CircularProgress-CBhr9Pli.js";
25
+ import { G as m } from "./Grid-C6plET3a.js";
26
+ import { T as i } from "./Typography-DiFeMX5p.js";
27
+ import { P as je } from "./PlayArrow-BYMBg9J8.js";
28
+ import { G as He } from "./generic-token-B_ptO5yb.js";
29
+ import { getCurrencySymbol as Ue } from "./util/functions.js";
30
+ import { G as l } from "./Grid2-DJW3x_WO.js";
31
+ import { F as H } from "./FormControl-uQi14shL.js";
32
+ import { F as U } from "./FilledInput-Bvhqpjsa.js";
33
+ import { F as ae } from "./TextField-BtFFWrf2.js";
34
+ import { S as De } from "./Select-BsqVGicz.js";
35
+ import { M as Je } from "./MenuItem-BKHoKEhO.js";
36
+ import { L as Qe } from "./ListItemIcon-BO6nZHNq.js";
37
+ import { I as Xe } from "./InputAdornment-BStVwy6a.js";
38
+ import { I as Ze } from "./IconButton-DRnoPKKH.js";
39
+ import { useDialog as et } from "./hooks/useDialog/index.js";
40
+ const tt = ({
41
+ setScreen: N,
42
+ partnerKey: x,
43
+ orderData: c,
44
+ dispatch: d,
45
+ navigate: h
46
+ }) => {
47
+ const { openDialog: I, ConfirmDialog: g } = et(), f = W(se).banks, n = c.estimate, s = c.create.order_id, P = c.create.bank_id, M = c.loader, Y = n.fiat_amount, [L, w] = p(!1), [F, A] = p({});
48
+ _(() => {
49
+ if (P) {
50
+ const q = f.find(($) => $.id === P);
51
+ q && A(q);
52
+ }
53
+ }, [P]), _(() => {
54
+ s && L && I({
55
+ icon: be,
56
+ title: "Withdraw Success",
57
+ message: "Your transaction was successful for more details on the transaction please track your order.",
58
+ cancelButtonText: "Withdraw again",
59
+ onCancel: () => {
60
+ d(J()), N(X);
61
+ },
62
+ confirmButtonText: "Track Order",
63
+ onConfirm: () => {
64
+ h && h("/history"), d(J());
65
+ },
66
+ height: "490px"
67
+ });
68
+ }, [s]), _(() => {
69
+ K();
70
+ }, []);
71
+ const K = () => {
72
+ d(
73
+ ce({
74
+ apiKey: x,
75
+ transaction_type: n.transaction_type,
76
+ coin_amount: n.fiat_amount,
77
+ payment_type: n.payment_type,
78
+ fiat_ccy: n.fiat_currency,
79
+ payment_provider: n.payment_provider
80
+ })
81
+ );
82
+ }, C = () => {
83
+ d(
84
+ Re({
85
+ apiKey: x,
86
+ quoteId: n.quote_id,
87
+ bankId: c.create.bank_id
88
+ })
89
+ ), w(!0);
90
+ };
91
+ return /* @__PURE__ */ a(E, { children: [
92
+ /* @__PURE__ */ e(g, {}),
93
+ /* @__PURE__ */ e(
94
+ oe,
95
+ {
96
+ onClickHandler: () => N(me),
97
+ backBtnText: "Confirm Your Order"
98
+ }
99
+ ),
100
+ /* @__PURE__ */ e(i, { mt: 2, variant: "sm", fontWeight: 600, children: "Funds received at" }),
101
+ /* @__PURE__ */ a(y, { mt: 2, className: u["confirm-payment"], children: [
102
+ /* @__PURE__ */ e(
103
+ "img",
104
+ {
105
+ src: n.payment_type === j ? ve : ke,
106
+ width: 100,
107
+ alt: "payment"
108
+ }
109
+ ),
110
+ /* @__PURE__ */ e(i, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: n.payment_type === j ? "Bank Account" : "Debit Card" }) })
111
+ ] }),
112
+ n.payment_type === j && /* @__PURE__ */ a(E, { children: [
113
+ /* @__PURE__ */ e(i, { mt: 3, variant: "caption", component: "p", children: /* @__PURE__ */ e("b", { children: "Bank Details" }) }),
114
+ /* @__PURE__ */ e(y, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ a(m, { container: !0, children: [
115
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Account Name" }) }),
116
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: F.accountName }) }),
117
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Bank Name" }) }),
118
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: F.bankName }) }),
119
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "IBAN" }) }),
120
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: F.accountNumber }) }),
121
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "BIC" }) }),
122
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: F.bicCode }) })
123
+ ] }) })
124
+ ] }),
125
+ /* @__PURE__ */ e(i, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
126
+ /* @__PURE__ */ e(y, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ a(m, { container: !0, children: [
127
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Withdraw Amount" }) }),
128
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
129
+ (+Y * 1).toFixed(2),
130
+ " ",
131
+ n.fiat_currency
132
+ ] }) }),
133
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Total Amount received" }) }),
134
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
135
+ (+n.fiat_out_amount * 1).toFixed(2),
136
+ " ",
137
+ n.fiat_currency
138
+ ] }) }),
139
+ /* @__PURE__ */ e(m, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Total Fees" }) }),
140
+ /* @__PURE__ */ e(m, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
141
+ (+n.total_fee * 1).toFixed(2),
142
+ " ",
143
+ n.fiat_currency
144
+ ] }) })
145
+ ] }) }),
146
+ /* @__PURE__ */ e(y, { mt: 4, children: /* @__PURE__ */ e(
147
+ Q,
148
+ {
149
+ onClick: C,
150
+ disabled: M,
151
+ fullWidth: !0,
152
+ children: /* @__PURE__ */ e("strong", { children: M ? /* @__PURE__ */ a(E, { children: [
153
+ /* @__PURE__ */ e(k, { size: 15, color: "inherit" }),
154
+ " Processing..."
155
+ ] }) : "Payment Details" })
156
+ }
157
+ ) })
158
+ ] });
159
+ }, nt = ({
160
+ setScreen: N,
161
+ orderData: x
162
+ }) => {
163
+ const c = le(), d = W(se), h = d.loader;
164
+ d.message;
165
+ const I = d.banks, g = x.create.bank_id, [b, f] = p(!1);
166
+ _(() => {
167
+ c(Ge());
168
+ }, []);
169
+ const n = (s) => {
170
+ b || (f(!0), c(Te(s.id)), N(de));
171
+ };
172
+ return /* @__PURE__ */ a(E, { children: [
173
+ /* @__PURE__ */ e(
174
+ oe,
175
+ {
176
+ onClickHandler: () => N(X),
177
+ backBtnText: "Select Bank Account"
178
+ }
179
+ ),
180
+ h ? /* @__PURE__ */ e(y, { className: "text-center", mt: 8, children: /* @__PURE__ */ e(k, {}) }) : /* @__PURE__ */ a(E, { children: [
181
+ I.map((s) => /* @__PURE__ */ e(
182
+ y,
183
+ {
184
+ className: u["bank-item"],
185
+ onClick: () => n(s),
186
+ children: /* @__PURE__ */ a(m, { container: !0, children: [
187
+ /* @__PURE__ */ e(m, { item: !0, xs: 10, className: "content-center", children: /* @__PURE__ */ a(y, { sx: { textAlign: "left" }, children: [
188
+ /* @__PURE__ */ e("p", { className: u["bank-name"], children: /* @__PURE__ */ e("strong", { children: s.bankName }) }),
189
+ /* @__PURE__ */ a("p", { className: u["bank-account"], children: [
190
+ s.accountName,
191
+ " | ***",
192
+ s.accountNumber.slice(-4)
193
+ ] })
194
+ ] }) }),
195
+ /* @__PURE__ */ e(m, { item: !0, xs: 2, children: /* @__PURE__ */ e(i, { sx: { textAlign: "right" }, children: g === s.id ? /* @__PURE__ */ e(
196
+ qe,
197
+ {
198
+ sx: { fontSize: 30, color: "#195BB6" }
199
+ }
200
+ ) : /* @__PURE__ */ e(Ke, { sx: { fontSize: 30, color: "#195BB6" } }) }) })
201
+ ] })
202
+ },
203
+ s.id
204
+ )),
205
+ b && /* @__PURE__ */ e(y, { mt: 4, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(k, {}) })
206
+ ] }),
207
+ /* @__PURE__ */ e(Ve, {}),
208
+ /* @__PURE__ */ e(i, { className: "text-center", variant: "h6", mt: 2, mb: 2, children: /* @__PURE__ */ e("strong", { children: "OR" }) }),
209
+ /* @__PURE__ */ e($e, {})
210
+ ] });
211
+ }, it = ({
212
+ setScreen: N,
213
+ orderData: x,
214
+ dispatch: c,
215
+ fiatAssets: d,
216
+ showAlertMessage: h,
217
+ partnerKey: I
218
+ }) => {
219
+ var ne, ie;
220
+ const g = d.fiats, b = d.loader, f = x.loader, n = x.estimate, s = n.fiat_out_amount, P = n.total_fee;
221
+ let M = 0, Y = 0;
222
+ const L = n.fee_breakdown;
223
+ for (let t = 0; t < L.length; t++) {
224
+ const r = L[t];
225
+ r.name === "ev_fee" ? M = Number(r.value) : r.name === "network_fee" && (Y = Number(r.value));
226
+ }
227
+ const [w, F] = p(!1), [A, K] = p(0), [C, q] = p(2), [$, pe] = p([]), [R, ue] = p([]), [Z, he] = p(!1), [V, fe] = p(50), [ot, xe] = p(3e3), [ee, ye] = p(""), [O, te] = p(
228
+ n.fiat_amount || V.toString()
229
+ ), T = g.find((t) => t.id === C), z = Ue(T == null ? void 0 : T.symbol);
230
+ _(() => {
231
+ const t = [];
232
+ for (let r = 0; r < g.length; r++) {
233
+ const o = {}, v = g[r];
234
+ o.id = v.id, o.name = v.name, o.icon_uri = v.icon_uri, o.symbol = v.symbol, o.payment_options = [];
235
+ const S = v.payment_options;
236
+ for (let B = 0; B < S.length; B++) {
237
+ const re = {}, G = S[B];
238
+ G.payment_provider !== Ee && G.active && G.payout_allowed && (Object.assign(re, G), o.payment_options.push(re));
239
+ }
240
+ o.payment_options.length > 0 && t.push(o);
241
+ }
242
+ ue(t);
243
+ }, [g]), _(() => {
244
+ if (!C || R.length === 0)
245
+ return;
246
+ const t = [];
247
+ for (let r = 0; r < R.length; r++) {
248
+ if (R[r].id === C) {
249
+ const o = R[r].payment_options;
250
+ let v = !1;
251
+ for (let S = 0; S < o.length; S++) {
252
+ const B = o[S];
253
+ B.active && B.payout_allowed && (t.push(B), o[S].id === A && (v = !0));
254
+ }
255
+ v || K(t[0].id);
256
+ }
257
+ pe(t);
258
+ }
259
+ }, [C, R]), _(() => {
260
+ if (O && A && C) {
261
+ c(Pe()), F(!1), ye("");
262
+ const t = setTimeout(() => {
263
+ _e();
264
+ }, 1e3);
265
+ return () => clearTimeout(t);
266
+ }
267
+ }, [O, A, C]);
268
+ const _e = () => {
269
+ const t = $.find((o) => o.id === A), r = t.payment_type;
270
+ c(
271
+ ce({
272
+ apiKey: I,
273
+ transaction_type: D,
274
+ coin_amount: O,
275
+ payment_type: r,
276
+ fiat_ccy: T == null ? void 0 : T.symbol,
277
+ payment_provider: t.payment_provider
278
+ })
279
+ );
280
+ }, Ne = ({ value: t, label: r }) => {
281
+ let o;
282
+ if (r === "credit_debit_card" ? (o = Ie, A === t && (o = Se)) : (o = Be, A === t && (o = Fe)), r)
283
+ return /* @__PURE__ */ e(
284
+ y,
285
+ {
286
+ mt: 0.5,
287
+ sx: { cursor: "pointer" },
288
+ onClick: () => K(t * 1),
289
+ children: /* @__PURE__ */ e("img", { src: o, alt: "payment", width: "90%" })
290
+ }
291
+ );
292
+ };
293
+ _(() => {
294
+ const t = x.types.length;
295
+ if (t > 0)
296
+ for (let r = 0; r < t; r++) {
297
+ const o = x.types[r];
298
+ if (o.type === D) {
299
+ fe(parseFloat(o.min_deposit_amount)), xe(parseFloat(o.max_deposit_amount));
300
+ break;
301
+ }
302
+ }
303
+ }, [x.types]);
304
+ const ge = (t) => {
305
+ const r = t.target.value;
306
+ r ? /^([0-9]+)$/.test(r) && te(r) : te("");
307
+ }, Ae = () => {
308
+ if (!A)
309
+ return h({ message: "Please select payment method" }), !1;
310
+ if (!O)
311
+ return h({ message: "Please enter amount" }), !1;
312
+ if (!s)
313
+ return h({
314
+ message: "Please wait for the estimate to be calculated and then press next"
315
+ }), !1;
316
+ N(me);
317
+ };
318
+ return /* @__PURE__ */ a(E, { children: [
319
+ /* @__PURE__ */ e(l, { container: !0, children: /* @__PURE__ */ e(l, { size: { xs: 6 }, children: /* @__PURE__ */ e(i, { className: u.label, variant: "caption", component: "p", children: "You Pay" }) }) }),
320
+ /* @__PURE__ */ a(l, { mt: 0.5, spacing: 0, container: !0, children: [
321
+ /* @__PURE__ */ e(l, { size: { xs: 6 }, children: /* @__PURE__ */ a(
322
+ H,
323
+ {
324
+ variant: "filled",
325
+ className: `${u.amount} ${u["fiat-field"]}`,
326
+ fullWidth: !0,
327
+ children: [
328
+ /* @__PURE__ */ e(
329
+ U,
330
+ {
331
+ value: O,
332
+ onChange: ge,
333
+ type: "text",
334
+ placeholder: `${V > 0 ? "$" + V + " minimum value" : ""}`,
335
+ error: w,
336
+ disableUnderline: !0,
337
+ required: !0,
338
+ fullWidth: !0
339
+ }
340
+ ),
341
+ /* @__PURE__ */ e(ae, { className: u["amount-symbol"], children: " " })
342
+ ]
343
+ }
344
+ ) }),
345
+ /* @__PURE__ */ e(l, { size: { xs: 6 }, className: "content-center", children: b ? /* @__PURE__ */ e(
346
+ k,
347
+ {
348
+ sx: { ml: 1 },
349
+ size: 30
350
+ }
351
+ ) : /* @__PURE__ */ e(
352
+ H,
353
+ {
354
+ variant: "filled",
355
+ className: `text-left ${u["fiat-picker"]}`,
356
+ fullWidth: !0,
357
+ children: /* @__PURE__ */ e(
358
+ De,
359
+ {
360
+ input: /* @__PURE__ */ e(U, { disableUnderline: !0 }),
361
+ sx: {
362
+ borderTopLeftRadius: 0,
363
+ "&::before": {
364
+ borderBottom: "none"
365
+ },
366
+ ".MuiSelect-select": {
367
+ fontSize: "21px",
368
+ fontWeight: "bold",
369
+ color: "#16359d",
370
+ padding: "27px 12px 10px !important"
371
+ },
372
+ ".dropdown-list-item, span": {
373
+ position: "relative",
374
+ bottom: "5px"
375
+ },
376
+ ".MuiSvgIcon-root": {
377
+ fill: "#16359D !important"
378
+ }
379
+ },
380
+ value: C,
381
+ variant: "filled",
382
+ displayEmpty: !0,
383
+ onChange: (t) => q(t.target.value),
384
+ error: w,
385
+ children: R.map((t) => /* @__PURE__ */ a(Je, { value: t.id, children: [
386
+ /* @__PURE__ */ e(Qe, { className: u["dropdown-list-item"], children: /* @__PURE__ */ e(
387
+ "img",
388
+ {
389
+ src: t.icon_uri,
390
+ onError: ({ currentTarget: r }) => {
391
+ r.onerror = null, r.src = He;
392
+ },
393
+ alt: "tokenImg",
394
+ width: "40",
395
+ height: "40"
396
+ }
397
+ ) }),
398
+ /* @__PURE__ */ e("span", { children: t.symbol })
399
+ ] }, t.id))
400
+ }
401
+ )
402
+ }
403
+ ) }),
404
+ ee && /* @__PURE__ */ e(i, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: ee }) })
405
+ ] }),
406
+ /* @__PURE__ */ a(y, { className: "text-left", mt: 3, children: [
407
+ /* @__PURE__ */ e(i, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
408
+ b ? /* @__PURE__ */ e(k, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(l, { mt: 0.5, container: !0, children: $.map((t) => /* @__PURE__ */ e(l, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
409
+ Ne,
410
+ {
411
+ label: t.payment_type,
412
+ value: t.id
413
+ }
414
+ ) }, t.id)) })
415
+ ] }),
416
+ /* @__PURE__ */ e(l, { mt: 4, container: !0, children: /* @__PURE__ */ e(l, { size: { xs: 4 }, children: /* @__PURE__ */ e(i, { className: u.label, variant: "caption", component: "p", children: "You Receive" }) }) }),
417
+ /* @__PURE__ */ e(l, { mt: 0.5, container: !0, children: /* @__PURE__ */ e(l, { size: { xs: 12 }, children: /* @__PURE__ */ a(
418
+ H,
419
+ {
420
+ className: `${u.amount} ${u["fiat-field"]}`,
421
+ fullWidth: !0,
422
+ children: [
423
+ /* @__PURE__ */ e(
424
+ U,
425
+ {
426
+ disableUnderline: !0,
427
+ value: s && parseFloat((+s * 1).toFixed(5)),
428
+ startAdornment: /* @__PURE__ */ e(Xe, { position: "start", children: /* @__PURE__ */ e(
429
+ i,
430
+ {
431
+ sx: {
432
+ fontWeight: "bold",
433
+ fontSize: "24px",
434
+ marginTop: "12px"
435
+ },
436
+ children: z
437
+ }
438
+ ) }),
439
+ type: "text",
440
+ readOnly: !0,
441
+ fullWidth: !0
442
+ }
443
+ ),
444
+ /* @__PURE__ */ e(ae, { className: u["amount-symbol"], children: +((ne = n == null ? void 0 : n.output_token) == null ? void 0 : ne.fiat_amount) * 1 > 0 ? z + (+((ie = n == null ? void 0 : n.output_token) == null ? void 0 : ie.fiat_amount) * 1).toFixed(2) : /* @__PURE__ */ e(E, { children: " " }) })
445
+ ]
446
+ }
447
+ ) }) }),
448
+ /* @__PURE__ */ e(y, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ a(l, { container: !0, children: [
449
+ /* @__PURE__ */ e(l, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ a(
450
+ Ze,
451
+ {
452
+ sx: { padding: "0" },
453
+ onClick: () => he((t) => !t),
454
+ disableFocusRipple: !0,
455
+ disableRipple: !0,
456
+ children: [
457
+ /* @__PURE__ */ e(i, { variant: "caption", fontWeight: 500, children: "Fee Calculation" }),
458
+ /* @__PURE__ */ e(
459
+ je,
460
+ {
461
+ sx: {
462
+ transform: `rotate(${Z ? "90" : "0"}deg)`,
463
+ fontSize: "15px"
464
+ }
465
+ }
466
+ )
467
+ ]
468
+ }
469
+ ) }),
470
+ Z && /* @__PURE__ */ a(E, { children: [
471
+ /* @__PURE__ */ e(l, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Everest Fee" }) }),
472
+ /* @__PURE__ */ e(l, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
473
+ z,
474
+ f ? /* @__PURE__ */ e(k, { size: 30, color: "primary" }) : M.toFixed(2)
475
+ ] }) }),
476
+ /* @__PURE__ */ e(l, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Network Fee" }) }),
477
+ /* @__PURE__ */ e(l, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
478
+ z,
479
+ f ? /* @__PURE__ */ e(
480
+ k,
481
+ {
482
+ sx: { ml: 1 },
483
+ size: 15,
484
+ color: "primary"
485
+ }
486
+ ) : Y.toFixed(2)
487
+ ] }) })
488
+ ] }),
489
+ /* @__PURE__ */ e(l, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Total Fees" }) }),
490
+ /* @__PURE__ */ e(l, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(i, { variant: "caption", children: [
491
+ z,
492
+ f ? /* @__PURE__ */ e(k, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(P).toFixed(2)
493
+ ] }) })
494
+ ] }) }),
495
+ /* @__PURE__ */ e(y, { mt: 4, children: /* @__PURE__ */ e(
496
+ Q,
497
+ {
498
+ onClick: Ae,
499
+ disabled: w || !s,
500
+ fullWidth: !0,
501
+ children: /* @__PURE__ */ e("strong", { children: "Next" })
502
+ }
503
+ ) })
504
+ ] });
505
+ }, X = "FORM_SCREEN", me = "BANK_SCREEN", de = "CONFIRM_SCREEN", rt = "MINIMAL_KYC_SCREEN", at = ({ partnerKey: N, navigate: x }) => {
506
+ const c = le(), d = W((s) => s.order), h = d.error, I = W((s) => s.fiatAssets), g = W(
507
+ (s) => s.cryptoAssets
508
+ ), [b, f] = p(X), { showAlertMessage: n } = ze();
509
+ return _(() => {
510
+ h && n({ message: h });
511
+ }, [h]), _(() => {
512
+ d.initMinimalKyc && (n({ message: h, type: "info" }), f(rt));
513
+ }, [d.initMinimalKyc]), _(() => (c(we()), c(Me(D)), c(Oe()), () => {
514
+ c(J());
515
+ }), []), /* @__PURE__ */ e(We, { addPadding: !0, children: {
516
+ FORM_SCREEN: /* @__PURE__ */ e(
517
+ it,
518
+ {
519
+ cryptoAssets: g,
520
+ showAlertMessage: n,
521
+ setScreen: f,
522
+ fiatAssets: I,
523
+ orderData: d,
524
+ dispatch: c,
525
+ partnerKey: N
526
+ }
527
+ ),
528
+ BANK_SCREEN: /* @__PURE__ */ e(
529
+ nt,
530
+ {
531
+ showAlertMessage: n,
532
+ setScreen: f,
533
+ orderData: d,
534
+ dispatch: c
535
+ }
536
+ ),
537
+ CONFIRM_SCREEN: /* @__PURE__ */ e(
538
+ tt,
539
+ {
540
+ partnerKey: N,
541
+ setScreen: f,
542
+ showAlertMessage: n,
543
+ orderData: d,
544
+ dispatch: c,
545
+ navigate: x
546
+ }
547
+ ),
548
+ MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
549
+ Ye,
550
+ {
551
+ inputComponent: Le,
552
+ buttonComponent: Q,
553
+ onComplete: () => {
554
+ f(de);
555
+ }
556
+ }
557
+ )
558
+ }[b] });
559
+ }, jt = Ce(at);
560
+ export {
561
+ tt as B,
562
+ de as C,
563
+ X as F,
564
+ rt as M,
565
+ nt as W,
566
+ it as a,
567
+ me as b,
568
+ jt as i
569
+ };