everest-npm-features 0.0.58 → 0.0.59

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 (90) hide show
  1. package/dist/{PlayArrow-BRz9FV4L.js → PlayArrow-BlkZJiHn.js} +1 -1
  2. package/dist/{auth-CD7qxhDF.js → auth-WhDJHZtr.js} +1 -1
  3. package/dist/{bank-C2LtDonX.js → bank-BaOrdTcI.js} +1 -1
  4. package/dist/components/RocketRamp/MinimalKyc/form.js +5 -4
  5. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  6. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  7. package/dist/components/RocketRamp/Player/Buy/form.js +4 -4
  8. package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
  9. package/dist/components/RocketRamp/Player/Dashboard/index.js +2 -2
  10. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  11. package/dist/components/RocketRamp/Player/Sell/form.js +4 -4
  12. package/dist/components/RocketRamp/Player/Sell/index.js +11 -10
  13. package/dist/components/RocketRamp/Player/SignIn/index.js +2 -2
  14. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  15. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  16. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  17. package/dist/components/RocketRamp/Player/SignUp/index.js +2 -2
  18. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
  19. package/dist/components/RocketRamp/ResetPassword/index.js +2 -2
  20. package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
  21. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
  22. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
  23. package/dist/components/RocketRamp/Transactions/index.js +2 -2
  24. package/dist/components/Shared/FullKyc/edd.js +5 -4
  25. package/dist/components/Shared/FullKyc/index.js +4 -4
  26. package/dist/components/Shared/FullKyc/pep.js +1 -1
  27. package/dist/components/Shared/FullKyc/personalDetails.js +2 -2
  28. package/dist/components/Shared/FullKyc/userInfo.js +3 -3
  29. package/dist/components/Shared/MinimalKyc/index.js +2 -2
  30. package/dist/components/Shared/Sumsub/index.d.ts +5 -0
  31. package/dist/components/Shared/Sumsub/index.js +83 -0
  32. package/dist/components/Wallet/Account/createIban.js +4 -3
  33. package/dist/components/Wallet/Account/ibanItem.js +5 -4
  34. package/dist/components/Wallet/Account/index.js +6 -5
  35. package/dist/components/Wallet/Account/sendIban.js +11 -11
  36. package/dist/components/Wallet/Buy/confirmTransaction.js +6 -5
  37. package/dist/components/Wallet/Buy/form.js +4 -4
  38. package/dist/components/Wallet/Buy/index.js +6 -6
  39. package/dist/components/Wallet/Deposit/index.js +4 -3
  40. package/dist/components/Wallet/EnterpriseKyc/edd.js +4 -3
  41. package/dist/components/Wallet/EnterpriseKyc/index.js +3 -3
  42. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +13 -12
  43. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +4 -3
  44. package/dist/components/Wallet/EnterpriseKyc/verify.js +4 -3
  45. package/dist/components/Wallet/History/index.js +2 -2
  46. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +12 -11
  47. package/dist/components/Wallet/Portfolio/index.js +7 -6
  48. package/dist/components/Wallet/Profile/documents.js +15 -15
  49. package/dist/components/Wallet/Profile/index.js +4 -3
  50. package/dist/components/Wallet/Profile/storage.js +12 -12
  51. package/dist/components/Wallet/Receive/index.js +2 -2
  52. package/dist/components/Wallet/Sell/confirmTransaction.js +5 -4
  53. package/dist/components/Wallet/Sell/form.js +4 -4
  54. package/dist/components/Wallet/Sell/index.js +6 -6
  55. package/dist/components/Wallet/Send/index.js +14 -13
  56. package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
  57. package/dist/components/Wallet/Shared/BankSelect/index.js +3 -3
  58. package/dist/components/Wallet/Shared/CardCorp/index.js +4 -3
  59. package/dist/components/Wallet/Shared/addBank.js +5 -4
  60. package/dist/components/Wallet/Shared/connectPlaidBank.js +2 -2
  61. package/dist/components/Wallet/Shared/manualSend.js +5 -4
  62. package/dist/components/Wallet/SignIn/index.js +2 -2
  63. package/dist/components/Wallet/SignUp/index.js +2 -2
  64. package/dist/components/Wallet/Stake/index.js +6 -5
  65. package/dist/components/Wallet/Swap/form.js +7 -6
  66. package/dist/components/Wallet/Swap/index.js +5 -5
  67. package/dist/components/Wallet/Withdraw/bankSelect.js +4 -4
  68. package/dist/components/Wallet/Withdraw/confirmTransaction.js +3 -3
  69. package/dist/components/Wallet/Withdraw/form.js +4 -4
  70. package/dist/components/Wallet/Withdraw/index.js +5 -5
  71. package/dist/{constants-Styrbvke.js → constants-DREDnCMu.js} +482 -481
  72. package/dist/{cryptoAssets-CFtzXGbk.js → cryptoAssets-DbyDgq4J.js} +1 -1
  73. package/dist/{index-DAla2tRU.js → index-BXutc9ik.js} +8 -7
  74. package/dist/index-CWoxdH_Z.js +543 -0
  75. package/dist/{index-Du_jGnyO.js → index-CuPCW3XC.js} +29 -29
  76. package/dist/{index-DM6mBQ7L.js → index-DJ7xuxBy.js} +9 -8
  77. package/dist/{index-AVcxYfIV.js → index-DV1dVcrY.js} +31 -30
  78. package/dist/{index-Da-BlrMH.js → index-DYP5Ex_T.js} +9 -8
  79. package/dist/{index-CKjKCXeQ.js → index-PoMNqntN.js} +4 -4
  80. package/dist/index.esm-I_Bp2YLf.js +224 -0
  81. package/dist/kyc-D4s_B9Cf.js +33 -0
  82. package/dist/main.js +7 -7
  83. package/dist/{order-uVUTqaQ2.js → order-DGBbo_Ox.js} +1 -1
  84. package/dist/{stake-Dgx86wzO.js → stake-CdMc5H7D.js} +1 -1
  85. package/dist/util/constants.d.ts +4 -0
  86. package/dist/util/constants.js +104 -101
  87. package/dist/{wallet-BkdExH6h.js → wallet-DvfdQOju.js} +1 -1
  88. package/package.json +4 -2
  89. package/dist/index-g4Gy1BHB.js +0 -503
  90. package/dist/kyc-Ee4qAZby.js +0 -26
@@ -1,4 +1,4 @@
1
- import { a2 as t, a3 as s, a4 as e } from "./constants-Styrbvke.js";
1
+ import { a2 as t, a3 as s, a4 as e } from "./constants-DREDnCMu.js";
2
2
  const p = (a) => ({
3
3
  type: t,
4
4
  payload: a
@@ -1,13 +1,13 @@
1
1
  import { jsxs as n, Fragment as E, jsx as e } from "react/jsx-runtime";
2
2
  import { useMemo as et, useState as h, useEffect as x, useRef as tt } from "react";
3
3
  import rt from "./hoc/withThemeProvider.js";
4
- import { P as nt, f as ot } from "./PlayArrow-BRz9FV4L.js";
4
+ import { P as nt, f as ot } from "./PlayArrow-BlkZJiHn.js";
5
5
  import { I as it } from "./Info-BVeUSPyk.js";
6
6
  import { G as me } from "./generic-token-B_ptO5yb.js";
7
7
  import { TOKEN_TO_FIAT as de, ESTIMATE_TOOLTIP_TEXT as st, SELL_WITHDRAW_ICON as at, DIALOG_SUCCESS_ICON as Re, DIALOG_ERROR_ICON as lt } from "./util/constants.js";
8
- import { aC as R, ad as ct } from "./constants-Styrbvke.js";
8
+ import { aE as R, af as ct } from "./constants-DREDnCMu.js";
9
9
  import { c as ze, d as mt } from "./index-BQNs1mvn.js";
10
- import { d as dt, e as We, b as X, c as Ee, f as ut, i as pt, g as ht } from "./order-uVUTqaQ2.js";
10
+ import { d as dt, e as We, b as X, c as Ee, f as ut, i as pt, g as ht } from "./order-DGBbo_Ox.js";
11
11
  import { M as ft } from "./tooltip-3UvETWtS.js";
12
12
  import { getCurrencySymbol as Me, getNetworkBackGround as xt, displayWalletAddress as yt } from "./util/functions.js";
13
13
  import gt from "./components/Wallet/Shared/backBtn.js";
@@ -26,13 +26,14 @@ import "./moment-h96o7c8I.js";
26
26
  import "./index.esm-BsMAMhYW.js";
27
27
  import "./web3-u4qDZYpo.js";
28
28
  import "./index-ceeCtFuh.js";
29
+ import "./index.esm-I_Bp2YLf.js";
29
30
  import { useDialogContext as Le } from "./context/dialogContext.js";
30
31
  import { T as i } from "./Typography-pAaje37G.js";
31
32
  import { B as T } from "./Box-B0YSYLco.js";
32
33
  import { G as r } from "./Grid-CFe3amXO.js";
33
34
  import { C as I } from "./CircularProgress-xZA3lvba.js";
34
- import { f as Ct } from "./cryptoAssets-CFtzXGbk.js";
35
- import { u as Nt, a as vt } from "./wallet-BkdExH6h.js";
35
+ import { f as Ct } from "./cryptoAssets-DbyDgq4J.js";
36
+ import { u as Nt, a as vt } from "./wallet-DvfdQOju.js";
36
37
  import { AuthContainer as kt } from "./components/Wallet/Shared/Container/index.js";
37
38
  import St from "./components/Shared/MinimalKyc/index.js";
38
39
  import Oe from "./components/Wallet/Shared/Input/index.js";
@@ -905,7 +906,7 @@ const Ft = ({
905
906
  }
906
907
  )
907
908
  }[z] });
908
- }, Wr = rt(Mt);
909
+ }, Mr = rt(Mt);
909
910
  export {
910
911
  Pe as C,
911
912
  Y as F,
@@ -914,5 +915,5 @@ export {
914
915
  It as a,
915
916
  zt as b,
916
917
  Wt as c,
917
- Wr as i
918
+ Mr as i
918
919
  };
@@ -0,0 +1,543 @@
1
+ import { jsxs as v, Fragment as ae, jsx as t } from "react/jsx-runtime";
2
+ import { useState as n, useEffect as z, useRef as Ne } from "react";
3
+ import { AuthContainer as Oe } from "./components/Wallet/Shared/Container/index.js";
4
+ import Ae from "./hoc/withThemeProvider.js";
5
+ import ye from "./components/Wallet/Shared/Input/index.js";
6
+ import Se from "./components/Wallet/Shared/appButton.js";
7
+ import "./index-DlQqWbXG.js";
8
+ import "./components/Wallet/Shared/Auth/otpForm.js";
9
+ import { d as T, f as _e } from "./constants-DREDnCMu.js";
10
+ import { c as Pe, d as Re } from "./kyc-D4s_B9Cf.js";
11
+ import { useSnackBarContext as ce } from "./context/snackBarContext.js";
12
+ import xe from "./hooks/useEverestDispatch.js";
13
+ import "./util/conversions.js";
14
+ import "./index-CAoLi5Qq.js";
15
+ import ve from "./components/Wallet/Shared/step.js";
16
+ import "./react-webcam-B3cXh1XT.js";
17
+ import "./components/Shared/transition.js";
18
+ import "./tooltip-3UvETWtS.js";
19
+ import "./components/Wallet/Shared/pin.js";
20
+ import "./moment-h96o7c8I.js";
21
+ import "./index.esm-BsMAMhYW.js";
22
+ import { c as Be } from "./countries-BVn1FubK.js";
23
+ import "./web3-u4qDZYpo.js";
24
+ import "./index-ceeCtFuh.js";
25
+ import { useDialogContext as Le } from "./context/dialogContext.js";
26
+ import le from "./components/Shared/FullKyc/countryList.js";
27
+ import { B as D } from "./Box-B0YSYLco.js";
28
+ import { T as ee } from "./Typography-pAaje37G.js";
29
+ import be from "./components/Shared/FullKyc/pep.js";
30
+ import { u as ne } from "./react-redux-C7I9-1M6.js";
31
+ import Te from "./components/Shared/FullKyc/edd.js";
32
+ import Fe from "./components/Shared/Sumsub/index.js";
33
+ import { F as Ie } from "./FormControl-RtZDQMdA.js";
34
+ import { I as Ke } from "./TextField-DPpRUQe3.js";
35
+ import { S as Me } from "./Select-CB5yWmyn.js";
36
+ import { M as ie } from "./MenuItem-DUdYOJr4.js";
37
+ import { G as oe } from "./Grid-CFe3amXO.js";
38
+ const ze = ({
39
+ inputComponent: g,
40
+ buttonComponent: j,
41
+ setUserInfo: q,
42
+ userInfo: l,
43
+ docData: o,
44
+ setScreen: h,
45
+ userEmail: C,
46
+ kycFlow: E
47
+ }) => {
48
+ const d = xe();
49
+ Le();
50
+ const { showAlertMessage: c } = ce(), s = g ?? ye, U = j ?? Se, [a, f] = n(l.gender || ""), [u, F] = n(!1), [I, y] = n(l.email || ""), [te, re] = n(!1), [Y, Z] = n(""), [p, $] = n(l.address || ""), [r, K] = n(l.city || ""), [S, X] = n(l.state || ""), [N, W] = n(l.zipCode || ""), [O, e] = n(
51
+ l.country || null
52
+ ), [A, _] = n(!1);
53
+ z(() => {
54
+ C && (y(C), re(!0));
55
+ }, [C]), z(() => {
56
+ var i;
57
+ if (o != null && o.issuingCountry) {
58
+ o.gender && (f(o.gender), F(!0));
59
+ const x = Be.find(
60
+ (m) => m.alpha3 === o.issuingCountry
61
+ );
62
+ q({ ...l, country: x, nationality: x });
63
+ const R = new Date(o.birthDate), B = R.getTimezoneOffset() * 6e4, L = new Date(
64
+ R.getTime() + B
65
+ );
66
+ if (Z(L.toLocaleDateString("en-US")), (i = o.checkedAddressBean) != null && i.street) {
67
+ const m = o.checkedAddressBean;
68
+ _(!0), $(m.street), K(m.city), X(m.state), W(m.postalCode);
69
+ }
70
+ } else
71
+ P();
72
+ }, []);
73
+ const P = () => {
74
+ d(Pe());
75
+ };
76
+ return /* @__PURE__ */ v(ae, { children: [
77
+ E !== T && /* @__PURE__ */ t(D, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ t(ve, { totalSteps: 4, currentStep: 2 }) }),
78
+ /* @__PURE__ */ v(D, { pl: 2, mt: 4, children: [
79
+ /* @__PURE__ */ t(ee, { variant: "h5", sx: { fontWeight: "bold" }, color: "primary", children: "Personal details" }),
80
+ E !== T && /* @__PURE__ */ v(ae, { children: [
81
+ /* @__PURE__ */ t(ee, { variant: "caption", children: "Good news! Some of the information will be populated from scanning your document earlier." }),
82
+ /* @__PURE__ */ t(
83
+ s,
84
+ {
85
+ sx: { mt: 3 },
86
+ label: "Date of Birth",
87
+ value: Y,
88
+ disabled: !0,
89
+ required: !0
90
+ }
91
+ ),
92
+ /* @__PURE__ */ v(Ie, { sx: { mt: 3 }, fullWidth: !0, children: [
93
+ /* @__PURE__ */ t(Ke, { children: "Gender" }),
94
+ /* @__PURE__ */ v(
95
+ Me,
96
+ {
97
+ value: a,
98
+ label: "Gender",
99
+ onChange: (i) => f(i.target.value),
100
+ disabled: !!(u && a),
101
+ required: !0,
102
+ children: [
103
+ /* @__PURE__ */ t(ie, { value: "M", children: "Male" }, "M"),
104
+ /* @__PURE__ */ t(ie, { value: "F", children: "Female" }, "F"),
105
+ /* @__PURE__ */ t(ie, { value: "X", children: "Another" }, "X")
106
+ ]
107
+ }
108
+ )
109
+ ] }),
110
+ /* @__PURE__ */ t(
111
+ s,
112
+ {
113
+ sx: { mt: 3 },
114
+ label: "Email",
115
+ value: I,
116
+ onChange: (i) => y(i.target.value),
117
+ disabled: te,
118
+ required: !0
119
+ }
120
+ )
121
+ ] }),
122
+ /* @__PURE__ */ t(
123
+ s,
124
+ {
125
+ sx: { mt: 3 },
126
+ label: "Home Address",
127
+ value: p,
128
+ onChange: (i) => $(i.target.value),
129
+ disabled: !!(A && p),
130
+ required: !0
131
+ }
132
+ ),
133
+ /* @__PURE__ */ v(oe, { container: !0, spacing: 2, sx: { mt: 3 }, children: [
134
+ /* @__PURE__ */ t(oe, { size: 6, children: /* @__PURE__ */ t(
135
+ s,
136
+ {
137
+ label: "City",
138
+ value: r,
139
+ onChange: (i) => K(i.target.value),
140
+ disabled: !!(A && r),
141
+ required: !0
142
+ }
143
+ ) }),
144
+ /* @__PURE__ */ t(oe, { size: 6, children: /* @__PURE__ */ t(
145
+ s,
146
+ {
147
+ label: "State/Province",
148
+ value: S,
149
+ onChange: (i) => X(i.target.value),
150
+ required: !0
151
+ }
152
+ ) })
153
+ ] }),
154
+ /* @__PURE__ */ t(
155
+ s,
156
+ {
157
+ sx: { mt: 3 },
158
+ label: "Zipcode",
159
+ value: N,
160
+ onChange: (i) => W(i.target.value),
161
+ disabled: !!(A && N),
162
+ required: !0
163
+ }
164
+ ),
165
+ /* @__PURE__ */ t(
166
+ le,
167
+ {
168
+ value: O,
169
+ onChange: e,
170
+ label: "Country of residence"
171
+ }
172
+ )
173
+ ] }),
174
+ /* @__PURE__ */ t(
175
+ U,
176
+ {
177
+ sx: { mt: 3 },
178
+ variant: "contained",
179
+ onClick: () => {
180
+ if (E !== T) {
181
+ if (!Y)
182
+ return c({ message: "Please provide date of birth" });
183
+ if (!a)
184
+ return c({ message: "Please provide gender" });
185
+ }
186
+ if (!p)
187
+ return c({ message: "Please provide address" });
188
+ if (!r) return c({ message: "Please provide city" });
189
+ if (!S) return c({ message: "Please provide state" });
190
+ if (!N)
191
+ return c({ message: "Please provide zip code" });
192
+ if (!O)
193
+ return c({
194
+ message: "Please select country of residency"
195
+ });
196
+ q({
197
+ ...l,
198
+ gender: a,
199
+ email: I,
200
+ address: p,
201
+ city: r,
202
+ state: S,
203
+ zipCode: N,
204
+ country: O
205
+ }), h(
206
+ E !== T ? de : pe
207
+ );
208
+ },
209
+ disabled: E !== T && !I || E !== T && !a || !p || !O,
210
+ fullWidth: !0,
211
+ children: /* @__PURE__ */ t("strong", { children: "Next" })
212
+ }
213
+ )
214
+ ] });
215
+ }, qe = ({
216
+ userInfo: g,
217
+ setUserInfo: j,
218
+ setScreen: q,
219
+ inputComponent: l,
220
+ buttonComponent: o
221
+ }) => {
222
+ const { showAlertMessage: h } = ce(), C = l ?? ye, E = o ?? Se, [d, c] = n(
223
+ g.placeOfBirth || null
224
+ ), [s, U] = n(
225
+ g.nationality || null
226
+ ), [a, f] = n(g.occupation || ""), [u, F] = n(g.employer || "");
227
+ return /* @__PURE__ */ v(ae, { children: [
228
+ /* @__PURE__ */ t(D, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ t(ve, { totalSteps: 4, currentStep: 3 }) }),
229
+ /* @__PURE__ */ v(D, { pl: 2, mt: 4, children: [
230
+ /* @__PURE__ */ t(ee, { variant: "h5", sx: { fontWeight: "bold" }, color: "primary", children: "More Personal details" }),
231
+ /* @__PURE__ */ t(ee, { variant: "caption", children: "Good news! Some of the information will be populated from scanning your document earlier." }),
232
+ /* @__PURE__ */ t(
233
+ le,
234
+ {
235
+ value: d,
236
+ onChange: c,
237
+ label: "Place Of Birth"
238
+ }
239
+ ),
240
+ /* @__PURE__ */ t(
241
+ le,
242
+ {
243
+ value: s,
244
+ onChange: U,
245
+ label: "Country of citizenship"
246
+ }
247
+ ),
248
+ /* @__PURE__ */ t(
249
+ C,
250
+ {
251
+ sx: { mt: 3 },
252
+ label: "Occupation",
253
+ value: a,
254
+ onChange: (y) => f(y.target.value)
255
+ }
256
+ ),
257
+ /* @__PURE__ */ t(
258
+ C,
259
+ {
260
+ sx: { mt: 3 },
261
+ label: "Employer",
262
+ value: u,
263
+ onChange: (y) => F(y.target.value)
264
+ }
265
+ )
266
+ ] }),
267
+ /* @__PURE__ */ t(
268
+ E,
269
+ {
270
+ sx: { mt: 3 },
271
+ variant: "contained",
272
+ onClick: () => {
273
+ if (!d) {
274
+ h({ message: "Please select place of birth" });
275
+ return;
276
+ }
277
+ if (!s) {
278
+ h({ message: "Please provide address" });
279
+ return;
280
+ }
281
+ if (!a) {
282
+ h({ message: "Please provide city" });
283
+ return;
284
+ }
285
+ j({
286
+ ...g,
287
+ placeOfBirth: d,
288
+ nationality: s,
289
+ occupation: a,
290
+ employer: u
291
+ }), q(pe);
292
+ },
293
+ disabled: !d || !s || !a || !u,
294
+ fullWidth: !0,
295
+ children: /* @__PURE__ */ t("strong", { children: "Next" })
296
+ }
297
+ )
298
+ ] });
299
+ }, se = "INCODE_SCREEN", Q = "USER_INFO_SCREEN", de = "PERSONAL_DETAILS_SCREEN", pe = "PEP_SCREEN", Ue = "EDD_SCREEN", We = {
300
+ BANK_STATEMENT: {
301
+ text: "",
302
+ file: [],
303
+ preview: []
304
+ },
305
+ PROOF_OF_INCOME: {
306
+ text: "",
307
+ file: [],
308
+ preview: []
309
+ },
310
+ SOURCE_OF_WEALTH: {
311
+ text: "",
312
+ file: [],
313
+ preview: []
314
+ }
315
+ }, we = ({
316
+ configurationId: g,
317
+ incodeApiKey: j,
318
+ incodeApiUrl: q,
319
+ incodeOnBoardingUrl: l,
320
+ withContainer: o = !1,
321
+ successHandler: h,
322
+ updateScreen: C,
323
+ isModalView: E = !1,
324
+ kycFlow: d
325
+ }) => {
326
+ const c = Ne(!0), { showAlertMessage: s } = ce(), U = xe(), a = ne((e) => e.user), f = ne((e) => e.user.kyc);
327
+ ne((e) => e.session.uuid);
328
+ const u = a.kyc, F = u.processComplete, I = {}, [y, te] = n(I);
329
+ n({ token: "" });
330
+ const [re, Y] = n(""), [Z, p] = n(
331
+ d === T ? Q : se
332
+ );
333
+ z(() => {
334
+ if (c.current) {
335
+ c.current = !1;
336
+ return;
337
+ }
338
+ let e;
339
+ switch (Z) {
340
+ case Q:
341
+ e = se;
342
+ break;
343
+ case de:
344
+ e = Q;
345
+ break;
346
+ case pe:
347
+ e = de;
348
+ break;
349
+ default:
350
+ e = se;
351
+ }
352
+ p(e);
353
+ }, [C]), z(() => {
354
+ h && F && (s({ message: "KYC has been done successfully.", type: "success" }), h());
355
+ }, [h, F]);
356
+ const $ = {
357
+ gender: "",
358
+ email: "",
359
+ address: "",
360
+ city: "",
361
+ state: "",
362
+ zipCode: "",
363
+ placeOfBirth: "",
364
+ country: "",
365
+ nationality: "",
366
+ occupation: "",
367
+ employer: "",
368
+ isPoliticalExpose: !1,
369
+ politicalExpose: "",
370
+ origin: "",
371
+ frequency: "",
372
+ reason: "",
373
+ source: ""
374
+ }, [r, K] = n($), [S, X] = n(We);
375
+ z(() => {
376
+ S.BANK_STATEMENT.file.length > 0 && N(S);
377
+ }, [S]);
378
+ const N = (e) => {
379
+ W(
380
+ r.isPoliticalExpose,
381
+ r.politicalExpose,
382
+ r.frequency,
383
+ r.reason,
384
+ r.source,
385
+ r.origin,
386
+ e,
387
+ !0
388
+ );
389
+ }, W = (e, A, _, P, M, i, x, R = !1) => {
390
+ var B, L, m;
391
+ if (d !== _e && !R) {
392
+ p(Ue);
393
+ return;
394
+ }
395
+ if (!u.loader) {
396
+ const V = {
397
+ street: r.address,
398
+ city: r.city,
399
+ postcode: r.zipCode,
400
+ state: r.state,
401
+ country: (B = r.country) == null ? void 0 : B.alpha3
402
+ }, H = {
403
+ isExposed: e,
404
+ exposed: A,
405
+ frequency: _,
406
+ reason: P,
407
+ source: M,
408
+ originFunds: i
409
+ }, J = {
410
+ frequency: _,
411
+ reason: P,
412
+ source: M,
413
+ originFunds: i
414
+ }, w = {
415
+ kycFlow: d,
416
+ email: r.email,
417
+ gender: r.gender,
418
+ birthPlace: (L = r.placeOfBirth) == null ? void 0 : L.alpha3,
419
+ nationality: (m = r.nationality) == null ? void 0 : m.alpha3,
420
+ occupation: r.occupation,
421
+ employer: r.employer,
422
+ residentialAddress: V,
423
+ politicalExposure: H,
424
+ customerDueDiligence: J,
425
+ workflow: {
426
+ token: re
427
+ }
428
+ };
429
+ if (x) {
430
+ const G = Object.entries(x).filter(([k, b]) => b.file && b.file.length > 0).map(([k, b]) => ({
431
+ file: b.file[0],
432
+ type: k
433
+ }));
434
+ G.length > 0 && (w.eddDocuments = G);
435
+ }
436
+ U(Re(w));
437
+ }
438
+ };
439
+ z(() => {
440
+ var _, P, M, i, x, R, B, L, m, V, H, J, w, G, k, b, me, fe, ue, he, Ee, ge, Ce;
441
+ const e = f == null ? void 0 : f.sumsubDocumentData;
442
+ if (!e) return;
443
+ const A = {
444
+ name: {
445
+ fullName: `${((_ = e == null ? void 0 : e.documentData) == null ? void 0 : _.firstName) ?? ""} ${((P = e == null ? void 0 : e.documentData) == null ? void 0 : P.lastName) ?? ""}`.trim(),
446
+ firstName: ((M = e == null ? void 0 : e.documentData) == null ? void 0 : M.firstName) ?? "",
447
+ givenName: ((i = e == null ? void 0 : e.documentData) == null ? void 0 : i.firstName) ?? "",
448
+ paternalLastName: ((x = e == null ? void 0 : e.documentData) == null ? void 0 : x.lastName) ?? ""
449
+ },
450
+ address: ((B = (R = e == null ? void 0 : e.documentData) == null ? void 0 : R.address) == null ? void 0 : B.street) ?? "",
451
+ checkedAddressBean: {
452
+ street: ((m = (L = e == null ? void 0 : e.documentData) == null ? void 0 : L.address) == null ? void 0 : m.street) ?? "",
453
+ city: ((H = (V = e == null ? void 0 : e.documentData) == null ? void 0 : V.address) == null ? void 0 : H.city) ?? "",
454
+ state: ((w = (J = e == null ? void 0 : e.documentData) == null ? void 0 : J.address) == null ? void 0 : w.state) ?? "",
455
+ postalCode: ((k = (G = e == null ? void 0 : e.documentData) == null ? void 0 : G.address) == null ? void 0 : k.postcode) ?? "",
456
+ zipColonyOptions: []
457
+ },
458
+ typeOfId: ((b = e == null ? void 0 : e.document) == null ? void 0 : b.docType) ?? "",
459
+ documentFrontSubtype: "",
460
+ documentBackSubtype: "",
461
+ issueFront: 0,
462
+ issueBack: 0,
463
+ birthDate: Date.parse(((me = e == null ? void 0 : e.documentData) == null ? void 0 : me.dateOfBirth) ?? "") || 0,
464
+ gender: ((fe = e == null ? void 0 : e.documentData) == null ? void 0 : fe.gender) ?? "",
465
+ personalNumber: ((ue = e == null ? void 0 : e.documentData) == null ? void 0 : ue.number) ?? "",
466
+ issuedAt: "",
467
+ expireAt: ((he = e == null ? void 0 : e.documentData) == null ? void 0 : he.dateOfExpiry) ?? "",
468
+ expirationDate: Date.parse(((Ee = e == null ? void 0 : e.documentData) == null ? void 0 : Ee.dateOfExpiry) ?? "") || 0,
469
+ issueDate: 0,
470
+ issuingCountry: ((ge = e == null ? void 0 : e.document) == null ? void 0 : ge.issuingCountry) ?? ((Ce = e == null ? void 0 : e.documentData) == null ? void 0 : Ce.issuingCountry) ?? "",
471
+ notExtracted: 0,
472
+ notExtractedDetails: [],
473
+ additionalAttrs: [],
474
+ ocrDataConfidence: {
475
+ birthDateConfidence: 0,
476
+ nameConfidence: 0,
477
+ givenNameConfidence: 0,
478
+ fathersSurnameConfidence: 0,
479
+ addressConfidence: 0,
480
+ issueDateConfidence: 0,
481
+ expirationDateConfidence: 0,
482
+ issuedAtConfidence: 0,
483
+ expireAtConfidence: 0,
484
+ personalNumberConfidence: 0
485
+ }
486
+ };
487
+ te(A), p(Q);
488
+ }, [f]);
489
+ const O = {
490
+ INCODE_SCREEN: /* @__PURE__ */ t(Fe, { onApplicantIdLoaded: Y }),
491
+ USER_INFO_SCREEN: /* @__PURE__ */ t(
492
+ ze,
493
+ {
494
+ docData: y,
495
+ setScreen: p,
496
+ setUserInfo: K,
497
+ userInfo: r,
498
+ userEmail: a.profile.email,
499
+ kycFlow: d
500
+ }
501
+ ),
502
+ PERSONAL_DETAILS_SCREEN: /* @__PURE__ */ t(
503
+ qe,
504
+ {
505
+ setScreen: p,
506
+ setUserInfo: K,
507
+ userInfo: r
508
+ }
509
+ ),
510
+ PEP_SCREEN: /* @__PURE__ */ t(
511
+ be,
512
+ {
513
+ setScreen: p,
514
+ setUserInfo: K,
515
+ userInfo: r,
516
+ processKyc: W,
517
+ processLoader: u.loader,
518
+ kycFlow: d
519
+ }
520
+ ),
521
+ EDD_SCREEN: /* @__PURE__ */ t(
522
+ Te,
523
+ {
524
+ kycStoreData: f,
525
+ eddData: S,
526
+ setEddData: X,
527
+ processKyc: N,
528
+ processLoader: u.loader
529
+ }
530
+ )
531
+ }[Z];
532
+ return o ? /* @__PURE__ */ t(Oe, { addPadding: !1, children: O }) : O;
533
+ }, At = Ae(we);
534
+ export {
535
+ Ue as E,
536
+ At as F,
537
+ se as I,
538
+ qe as P,
539
+ ze as U,
540
+ Q as a,
541
+ de as b,
542
+ pe as c
543
+ };