@vpdev2/metakyc-sdk 1.0.41 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1343 -1201
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/form-config.d.ts +13 -1
- package/dist/types/form-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var G = (e, t, r) =>
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import { jsx as a, jsxs as i, Fragment as
|
|
8
|
-
import { useForm as
|
|
9
|
-
import { z as
|
|
10
|
-
var
|
|
11
|
-
const
|
|
1
|
+
var at = Object.defineProperty;
|
|
2
|
+
var nt = (e, t, r) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var G = (e, t, r) => nt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import st from "axios";
|
|
5
|
+
import * as Ye from "react";
|
|
6
|
+
import ye, { createContext as it, useState as x, useMemo as Se, useEffect as ee, useContext as lt, useRef as te, useCallback as Q, forwardRef as Te, createElement as je } from "react";
|
|
7
|
+
import { jsx as a, jsxs as i, Fragment as ot } from "react/jsx-runtime";
|
|
8
|
+
import { useForm as ct, Controller as Ie } from "react-hook-form";
|
|
9
|
+
import { z as ke } from "zod";
|
|
10
|
+
var U = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(U || {}), $e = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))($e || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), dt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(dt || {}), ut = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(ut || {}), Ee = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(Ee || {}), Re = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(Re || {}), mt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(mt || {}), pt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(pt || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), ht = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(ht || {}), Be = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Be || {}), gt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(gt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(yt || {}), ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(ft || {}), Ce = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ce || {}), xt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(xt || {}), bt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(bt || {}), pe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(pe || {}), vt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(vt || {});
|
|
11
|
+
const _e = {
|
|
12
12
|
firstName: { label: "First Name", type: "text" },
|
|
13
13
|
lastName: { label: "Last Name", type: "text" },
|
|
14
14
|
email: { label: "Email", type: "email" },
|
|
@@ -31,13 +31,13 @@ const $e = {
|
|
|
31
31
|
defaultLanguage: { label: "Default Language", type: "select" },
|
|
32
32
|
educationLevel: { label: "Education Level", type: "text" },
|
|
33
33
|
occupation: { label: "Occupation", type: "text" }
|
|
34
|
-
},
|
|
34
|
+
}, wt = [
|
|
35
35
|
"firstName",
|
|
36
36
|
"lastName",
|
|
37
37
|
"email",
|
|
38
38
|
"phonenumber",
|
|
39
39
|
"dateOfBirth"
|
|
40
|
-
],
|
|
40
|
+
], Qe = [
|
|
41
41
|
{ value: "EN", label: "English" },
|
|
42
42
|
{ value: "DE", label: "German" },
|
|
43
43
|
{ value: "FR", label: "French" },
|
|
@@ -56,8 +56,8 @@ const $e = {
|
|
|
56
56
|
{ value: "FI", label: "Finnish" },
|
|
57
57
|
{ value: "NO", label: "Norwegian" }
|
|
58
58
|
];
|
|
59
|
-
var
|
|
60
|
-
const
|
|
59
|
+
var se = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(se || {});
|
|
60
|
+
const kt = {
|
|
61
61
|
timeout: 3e4,
|
|
62
62
|
retries: 3,
|
|
63
63
|
locale: "en",
|
|
@@ -65,7 +65,7 @@ const bt = {
|
|
|
65
65
|
pattern: "host-controller"
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
class
|
|
68
|
+
class Nt {
|
|
69
69
|
constructor(t) {
|
|
70
70
|
this.config = t;
|
|
71
71
|
}
|
|
@@ -105,19 +105,19 @@ class xt {
|
|
|
105
105
|
}[t] || t;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
class
|
|
108
|
+
class we extends Error {
|
|
109
109
|
constructor(r, n, s, l, o) {
|
|
110
110
|
super(r);
|
|
111
111
|
G(this, "response");
|
|
112
|
-
this.code = n, this.details = s, this.validationErrors = l, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this,
|
|
112
|
+
this.code = n, this.details = s, this.validationErrors = l, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this, we.prototype);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
class
|
|
115
|
+
class Le {
|
|
116
116
|
/**
|
|
117
117
|
* Process an error from the API response
|
|
118
118
|
*/
|
|
119
119
|
static handleApiError(t) {
|
|
120
|
-
return new
|
|
120
|
+
return new we(
|
|
121
121
|
t.message || "An unknown error occurred",
|
|
122
122
|
t.code,
|
|
123
123
|
t.details || void 0,
|
|
@@ -130,44 +130,44 @@ class Fe {
|
|
|
130
130
|
static handleAxiosError(t) {
|
|
131
131
|
if (t.response) {
|
|
132
132
|
const r = t.response.data;
|
|
133
|
-
return r && r.error ? new
|
|
133
|
+
return r && r.error ? new we(
|
|
134
134
|
r.error.message || "An unknown error occurred",
|
|
135
135
|
r.error.code,
|
|
136
136
|
r.error.details || void 0,
|
|
137
137
|
r.error.validationErrors || void 0,
|
|
138
138
|
t.response
|
|
139
|
-
) : r && r.result && r.result.message ? new
|
|
139
|
+
) : r && r.result && r.result.message ? new we(
|
|
140
140
|
r.result.message,
|
|
141
141
|
t.response.status,
|
|
142
142
|
`HTTP ${t.response.status}: ${t.response.statusText}`,
|
|
143
143
|
void 0,
|
|
144
144
|
t.response
|
|
145
|
-
) : new
|
|
145
|
+
) : new we(
|
|
146
146
|
(r == null ? void 0 : r.message) || t.message || "Request failed",
|
|
147
147
|
t.response.status,
|
|
148
148
|
`HTTP ${t.response.status}: ${t.response.statusText}`,
|
|
149
149
|
void 0,
|
|
150
150
|
t.response
|
|
151
151
|
);
|
|
152
|
-
} else return t.request ? new
|
|
152
|
+
} else return t.request ? new we(
|
|
153
153
|
"No response from server",
|
|
154
154
|
0,
|
|
155
155
|
"The request was made but no response was received. Please check your network connection."
|
|
156
|
-
) : new
|
|
156
|
+
) : new we(t.message || "An unexpected error occurred", 0, t.toString());
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Check if an error is a MetaKYCError
|
|
160
160
|
*/
|
|
161
161
|
static isMetaKYCError(t) {
|
|
162
|
-
return t instanceof
|
|
162
|
+
return t instanceof we;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
class
|
|
165
|
+
class St {
|
|
166
166
|
constructor(t) {
|
|
167
167
|
G(this, "axiosInstance");
|
|
168
168
|
G(this, "endpointBuilder");
|
|
169
169
|
G(this, "config");
|
|
170
|
-
this.config = { ...
|
|
170
|
+
this.config = { ...kt, ...t }, this.endpointBuilder = new Nt(this.config.endpoints), this.axiosInstance = st.create({
|
|
171
171
|
baseURL: this.config.baseUrl,
|
|
172
172
|
timeout: this.config.timeout,
|
|
173
173
|
headers: {
|
|
@@ -203,7 +203,7 @@ class vt {
|
|
|
203
203
|
});
|
|
204
204
|
return this.handleResponse(l);
|
|
205
205
|
} catch (s) {
|
|
206
|
-
throw
|
|
206
|
+
throw Le.handleAxiosError(s);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
@@ -214,7 +214,7 @@ class vt {
|
|
|
214
214
|
const s = this.buildEndpoint(t, r), l = await this.axiosInstance.post(s, n);
|
|
215
215
|
return this.handleResponse(l);
|
|
216
216
|
} catch (s) {
|
|
217
|
-
throw
|
|
217
|
+
throw Le.handleAxiosError(s);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
@@ -225,7 +225,7 @@ class vt {
|
|
|
225
225
|
const s = this.buildEndpoint(t, r), l = await this.axiosInstance.put(s, n);
|
|
226
226
|
return this.handleResponse(l);
|
|
227
227
|
} catch (s) {
|
|
228
|
-
throw
|
|
228
|
+
throw Le.handleAxiosError(s);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
@@ -238,7 +238,7 @@ class vt {
|
|
|
238
238
|
});
|
|
239
239
|
return this.handleResponse(l);
|
|
240
240
|
} catch (s) {
|
|
241
|
-
throw
|
|
241
|
+
throw Le.handleAxiosError(s);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
@@ -247,7 +247,7 @@ class vt {
|
|
|
247
247
|
handleResponse(t) {
|
|
248
248
|
const r = t.data;
|
|
249
249
|
if (!r.success && r.error)
|
|
250
|
-
throw
|
|
250
|
+
throw Le.handleApiError(r.error);
|
|
251
251
|
return r;
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
@@ -257,7 +257,7 @@ class vt {
|
|
|
257
257
|
return this.axiosInstance;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class Ct {
|
|
261
261
|
constructor(t) {
|
|
262
262
|
this.httpClient = t;
|
|
263
263
|
}
|
|
@@ -376,7 +376,7 @@ class wt {
|
|
|
376
376
|
)).result;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
class
|
|
379
|
+
class At {
|
|
380
380
|
constructor(t) {
|
|
381
381
|
this.httpClient = t;
|
|
382
382
|
}
|
|
@@ -403,7 +403,7 @@ class kt {
|
|
|
403
403
|
)).result;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
class
|
|
406
|
+
class It {
|
|
407
407
|
constructor(t) {
|
|
408
408
|
this.httpClient = t;
|
|
409
409
|
}
|
|
@@ -431,7 +431,7 @@ class Nt {
|
|
|
431
431
|
await this.httpClient.post("UploadDocument", "ReviewUploadDocument", t);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
class
|
|
434
|
+
class Et {
|
|
435
435
|
constructor(t) {
|
|
436
436
|
this.httpClient = t;
|
|
437
437
|
}
|
|
@@ -457,7 +457,7 @@ class St {
|
|
|
457
457
|
)).result;
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class Rt {
|
|
461
461
|
constructor(t) {
|
|
462
462
|
this.httpClient = t;
|
|
463
463
|
}
|
|
@@ -479,7 +479,7 @@ class Ct {
|
|
|
479
479
|
await this.httpClient.get("Applicant", "PassOverview", { applicantId: t });
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
class
|
|
482
|
+
class Ft {
|
|
483
483
|
constructor(t) {
|
|
484
484
|
this.httpClient = t;
|
|
485
485
|
}
|
|
@@ -514,7 +514,7 @@ class At {
|
|
|
514
514
|
)).result;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
class
|
|
517
|
+
class Dt {
|
|
518
518
|
constructor(t) {
|
|
519
519
|
this.httpClient = t;
|
|
520
520
|
}
|
|
@@ -569,7 +569,7 @@ class Et {
|
|
|
569
569
|
return this.identityCompanyRequest(r);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
class
|
|
572
|
+
class Pt {
|
|
573
573
|
constructor(t) {
|
|
574
574
|
this.httpClient = t;
|
|
575
575
|
}
|
|
@@ -605,7 +605,7 @@ class It {
|
|
|
605
605
|
)).result;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
class
|
|
608
|
+
class Lt {
|
|
609
609
|
constructor(t) {
|
|
610
610
|
this.httpClient = t;
|
|
611
611
|
}
|
|
@@ -631,7 +631,7 @@ class Rt {
|
|
|
631
631
|
)).result;
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const de = {
|
|
635
635
|
name: "Default",
|
|
636
636
|
title: "KYC Verification",
|
|
637
637
|
logo: {
|
|
@@ -690,7 +690,7 @@ const le = {
|
|
|
690
690
|
textMuted: "#9ca3af"
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
},
|
|
693
|
+
}, Mt = {
|
|
694
694
|
name: "Corporate",
|
|
695
695
|
logo: {
|
|
696
696
|
url: "",
|
|
@@ -723,7 +723,7 @@ const le = {
|
|
|
723
723
|
cardPadding: "1.5rem",
|
|
724
724
|
inputHeight: "2.5rem"
|
|
725
725
|
}
|
|
726
|
-
},
|
|
726
|
+
}, Tt = {
|
|
727
727
|
name: "Fintech",
|
|
728
728
|
logo: {
|
|
729
729
|
url: "",
|
|
@@ -756,7 +756,7 @@ const le = {
|
|
|
756
756
|
cardPadding: "2rem",
|
|
757
757
|
inputHeight: "3rem"
|
|
758
758
|
}
|
|
759
|
-
},
|
|
759
|
+
}, Ot = {
|
|
760
760
|
name: "Healthcare",
|
|
761
761
|
logo: {
|
|
762
762
|
url: "",
|
|
@@ -798,7 +798,7 @@ const le = {
|
|
|
798
798
|
textSecondary: "#CBD5E1"
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
},
|
|
801
|
+
}, $t = {
|
|
802
802
|
name: "Modern",
|
|
803
803
|
logo: {
|
|
804
804
|
url: "",
|
|
@@ -831,7 +831,7 @@ const le = {
|
|
|
831
831
|
cardPadding: "2rem",
|
|
832
832
|
inputHeight: "3rem"
|
|
833
833
|
}
|
|
834
|
-
},
|
|
834
|
+
}, Bt = {
|
|
835
835
|
name: "Minimal",
|
|
836
836
|
logo: {
|
|
837
837
|
url: "",
|
|
@@ -864,18 +864,18 @@ const le = {
|
|
|
864
864
|
cardPadding: "1.25rem",
|
|
865
865
|
inputHeight: "2.25rem"
|
|
866
866
|
}
|
|
867
|
-
},
|
|
868
|
-
[
|
|
869
|
-
[
|
|
870
|
-
[
|
|
871
|
-
[
|
|
872
|
-
[
|
|
873
|
-
[
|
|
867
|
+
}, zt = {
|
|
868
|
+
[se.Default]: de,
|
|
869
|
+
[se.Corporate]: Mt,
|
|
870
|
+
[se.Fintech]: Tt,
|
|
871
|
+
[se.Healthcare]: Ot,
|
|
872
|
+
[se.Modern]: $t,
|
|
873
|
+
[se.Minimal]: Bt
|
|
874
874
|
};
|
|
875
|
-
function
|
|
876
|
-
return
|
|
875
|
+
function Me(e) {
|
|
876
|
+
return zt[e] || de;
|
|
877
877
|
}
|
|
878
|
-
class
|
|
878
|
+
class _t {
|
|
879
879
|
constructor(t) {
|
|
880
880
|
this.httpClient = t;
|
|
881
881
|
}
|
|
@@ -890,8 +890,8 @@ class Ot {
|
|
|
890
890
|
"GetThemeConfiguration"
|
|
891
891
|
);
|
|
892
892
|
if (!r.result.isEnabled)
|
|
893
|
-
return
|
|
894
|
-
let n = r.result.preset ?
|
|
893
|
+
return Me(se.Default);
|
|
894
|
+
let n = r.result.preset ? Me(r.result.preset) : Me(se.Default);
|
|
895
895
|
if (r.result.title && (n.title = r.result.title), r.result.logo && (n.logo = { ...n.logo, ...r.result.logo }), r.result.colors && (n.colors = { ...n.colors, ...r.result.colors }), r.result.typography && (n.typography = { ...n.typography, ...r.result.typography }), r.result.spacing && (n.spacing = { ...n.spacing, ...r.result.spacing }), r.result.customCSS && (n.customCSS = r.result.customCSS), r.result.darkMode && (n.darkMode = {
|
|
896
896
|
colors: {
|
|
897
897
|
...(t = n.darkMode) == null ? void 0 : t.colors,
|
|
@@ -905,7 +905,7 @@ class Ot {
|
|
|
905
905
|
}
|
|
906
906
|
return n;
|
|
907
907
|
} catch (r) {
|
|
908
|
-
return console.warn("[ThemeService] Failed to fetch theme configuration:", r),
|
|
908
|
+
return console.warn("[ThemeService] Failed to fetch theme configuration:", r), Me(se.Default);
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
/**
|
|
@@ -919,19 +919,19 @@ class Ot {
|
|
|
919
919
|
*/
|
|
920
920
|
getAvailablePresets() {
|
|
921
921
|
return [
|
|
922
|
-
{ id:
|
|
923
|
-
{ id:
|
|
924
|
-
{ id:
|
|
925
|
-
{ id:
|
|
926
|
-
{ id:
|
|
927
|
-
{ id:
|
|
922
|
+
{ id: se.Default, name: "Default" },
|
|
923
|
+
{ id: se.Corporate, name: "Corporate" },
|
|
924
|
+
{ id: se.Fintech, name: "Fintech" },
|
|
925
|
+
{ id: se.Healthcare, name: "Healthcare" },
|
|
926
|
+
{ id: se.Modern, name: "Modern" },
|
|
927
|
+
{ id: se.Minimal, name: "Minimal" }
|
|
928
928
|
];
|
|
929
929
|
}
|
|
930
930
|
/**
|
|
931
931
|
* Preview theme (doesn't save)
|
|
932
932
|
*/
|
|
933
933
|
getPreviewTheme(t, r) {
|
|
934
|
-
const n =
|
|
934
|
+
const n = Me(t);
|
|
935
935
|
return r ? {
|
|
936
936
|
...n,
|
|
937
937
|
...r,
|
|
@@ -942,7 +942,7 @@ class Ot {
|
|
|
942
942
|
} : n;
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Ut {
|
|
946
946
|
constructor() {
|
|
947
947
|
G(this, "listeners", /* @__PURE__ */ new Map());
|
|
948
948
|
}
|
|
@@ -987,9 +987,9 @@ class $t {
|
|
|
987
987
|
this.listeners.delete(t);
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
class
|
|
990
|
+
class qt {
|
|
991
991
|
constructor() {
|
|
992
|
-
G(this, "events", new
|
|
992
|
+
G(this, "events", new Ut());
|
|
993
993
|
G(this, "_applicantId", null);
|
|
994
994
|
G(this, "_progress", null);
|
|
995
995
|
G(this, "_error", null);
|
|
@@ -1025,7 +1025,7 @@ class Bt {
|
|
|
1025
1025
|
*/
|
|
1026
1026
|
get status() {
|
|
1027
1027
|
var t;
|
|
1028
|
-
return ((t = this._progress) == null ? void 0 : t.status) ||
|
|
1028
|
+
return ((t = this._progress) == null ? void 0 : t.status) || xe.None;
|
|
1029
1029
|
}
|
|
1030
1030
|
/**
|
|
1031
1031
|
* Get workflow result
|
|
@@ -1044,19 +1044,19 @@ class Bt {
|
|
|
1044
1044
|
* Check if workflow is complete
|
|
1045
1045
|
*/
|
|
1046
1046
|
get isComplete() {
|
|
1047
|
-
return this.status ===
|
|
1047
|
+
return this.status === xe.Finished;
|
|
1048
1048
|
}
|
|
1049
1049
|
/**
|
|
1050
1050
|
* Check if workflow is on hold
|
|
1051
1051
|
*/
|
|
1052
1052
|
get isOnHold() {
|
|
1053
|
-
return this.status ===
|
|
1053
|
+
return this.status === xe.OnHold;
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Check if workflow is in progress
|
|
1057
1057
|
*/
|
|
1058
1058
|
get isInProgress() {
|
|
1059
|
-
return this.status ===
|
|
1059
|
+
return this.status === xe.InProgress;
|
|
1060
1060
|
}
|
|
1061
1061
|
/**
|
|
1062
1062
|
* Set applicant ID
|
|
@@ -1070,7 +1070,7 @@ class Bt {
|
|
|
1070
1070
|
updateProgress(t) {
|
|
1071
1071
|
var n, s;
|
|
1072
1072
|
const r = (n = this._progress) == null ? void 0 : n.currentStep;
|
|
1073
|
-
this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (r == null ? void 0 : r.order) !== ((s = t.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status ===
|
|
1073
|
+
this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (r == null ? void 0 : r.order) !== ((s = t.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status === xe.Finished && t.workflowResult && this.events.emit("completed", t.workflowResult);
|
|
1074
1074
|
}
|
|
1075
1075
|
/**
|
|
1076
1076
|
* Set error
|
|
@@ -1127,7 +1127,7 @@ class Bt {
|
|
|
1127
1127
|
this.events.clear();
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
class
|
|
1130
|
+
class Kt {
|
|
1131
1131
|
constructor() {
|
|
1132
1132
|
G(this, "handlers", /* @__PURE__ */ new Map());
|
|
1133
1133
|
}
|
|
@@ -1155,7 +1155,7 @@ class zt {
|
|
|
1155
1155
|
async loadStepData(t, r) {
|
|
1156
1156
|
const n = this.getHandler(t);
|
|
1157
1157
|
if (!n)
|
|
1158
|
-
throw new Error(`No handler registered for step action: ${
|
|
1158
|
+
throw new Error(`No handler registered for step action: ${U[t]}`);
|
|
1159
1159
|
return n.loadData(r);
|
|
1160
1160
|
}
|
|
1161
1161
|
/**
|
|
@@ -1164,61 +1164,61 @@ class zt {
|
|
|
1164
1164
|
async submitStepData(t, r) {
|
|
1165
1165
|
const n = this.getHandler(t);
|
|
1166
1166
|
if (!n)
|
|
1167
|
-
throw new Error(`No handler registered for step action: ${
|
|
1167
|
+
throw new Error(`No handler registered for step action: ${U[t]}`);
|
|
1168
1168
|
return n.submitData(r);
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
class
|
|
1171
|
+
class jt {
|
|
1172
1172
|
constructor(t, r, n, s, l, o, c, d) {
|
|
1173
1173
|
G(this, "state");
|
|
1174
1174
|
G(this, "stepRouter");
|
|
1175
|
-
this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = d, this.state = new
|
|
1175
|
+
this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = d, this.state = new qt(), this.stepRouter = new Kt(), this.registerStepHandlers();
|
|
1176
1176
|
}
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Register all step handlers
|
|
1179
1179
|
*/
|
|
1180
1180
|
registerStepHandlers() {
|
|
1181
|
-
this.stepRouter.registerHandler(
|
|
1181
|
+
this.stepRouter.registerHandler(U.Questionaries, {
|
|
1182
1182
|
loadData: (t) => this.questionnaireService.getQuestionnaire(t),
|
|
1183
1183
|
submitData: async (t) => {
|
|
1184
1184
|
await this.questionnaireService.fillQuestionnaire(t);
|
|
1185
1185
|
}
|
|
1186
|
-
}), this.stepRouter.registerHandler(
|
|
1186
|
+
}), this.stepRouter.registerHandler(U.UploadDocument, {
|
|
1187
1187
|
loadData: (t) => this.uploadDocumentService.getUploadDocument(t),
|
|
1188
1188
|
submitData: (t) => this.uploadDocumentService.fillUploadDocument(t)
|
|
1189
|
-
}), this.stepRouter.registerHandler(
|
|
1189
|
+
}), this.stepRouter.registerHandler(U.AppropriatenessTest, {
|
|
1190
1190
|
loadData: (t) => this.appropriatenessTestService.getAppropriatenessTest(t),
|
|
1191
1191
|
submitData: async (t) => {
|
|
1192
1192
|
await this.appropriatenessTestService.fillAppropriatenessTest(t);
|
|
1193
1193
|
}
|
|
1194
|
-
}), this.stepRouter.registerHandler(
|
|
1194
|
+
}), this.stepRouter.registerHandler(U.Overview, {
|
|
1195
1195
|
loadData: (t) => this.overviewService.getOverviewData(t),
|
|
1196
1196
|
submitData: (t) => this.overviewService.passOverview(t.applicantId)
|
|
1197
|
-
}), this.stepRouter.registerHandler(
|
|
1197
|
+
}), this.stepRouter.registerHandler(U.RiskScoring, {
|
|
1198
1198
|
loadData: (t) => this.riskScoringService.getRiskCriterias(t),
|
|
1199
1199
|
submitData: async (t) => {
|
|
1200
1200
|
await this.riskScoringService.submitRiskScoring(t);
|
|
1201
1201
|
}
|
|
1202
|
-
}), this.stepRouter.registerHandler(
|
|
1202
|
+
}), this.stepRouter.registerHandler(U.IdentitySdk, {
|
|
1203
1203
|
loadData: async (t) => ({
|
|
1204
1204
|
applicantId: t,
|
|
1205
1205
|
message: "Identity verification required"
|
|
1206
1206
|
}),
|
|
1207
1207
|
submitData: async () => {
|
|
1208
1208
|
}
|
|
1209
|
-
}), this.stepRouter.registerHandler(
|
|
1209
|
+
}), this.stepRouter.registerHandler(U.InvestorCategorization, {
|
|
1210
1210
|
loadData: (t) => this.investorCategorizationService.getInvestorCategorization(t),
|
|
1211
1211
|
submitData: async (t) => {
|
|
1212
1212
|
await this.investorCategorizationService.setInvestorCategorization(t);
|
|
1213
1213
|
}
|
|
1214
|
-
}), this.stepRouter.registerHandler(
|
|
1214
|
+
}), this.stepRouter.registerHandler(U.ManualReview, {
|
|
1215
1215
|
loadData: async (t) => ({
|
|
1216
1216
|
applicantId: t,
|
|
1217
1217
|
message: "Your application is under manual review"
|
|
1218
1218
|
}),
|
|
1219
1219
|
submitData: async () => {
|
|
1220
1220
|
}
|
|
1221
|
-
}), this.stepRouter.registerHandler(
|
|
1221
|
+
}), this.stepRouter.registerHandler(U.AdditionalData, {
|
|
1222
1222
|
loadData: async (t) => ({
|
|
1223
1223
|
applicantId: t,
|
|
1224
1224
|
message: "Additional data required"
|
|
@@ -1312,7 +1312,7 @@ class Ut {
|
|
|
1312
1312
|
return this.stepRouter;
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function Ze(e, t) {
|
|
1316
1316
|
return new Promise((r, n) => {
|
|
1317
1317
|
if (t && document.getElementById(t)) {
|
|
1318
1318
|
r();
|
|
@@ -1322,14 +1322,14 @@ function We(e, t) {
|
|
|
1322
1322
|
s.src = e, t && (s.id = t), s.async = !0, s.onload = () => r(), s.onerror = () => n(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
|
|
1323
1323
|
});
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function Ur(e) {
|
|
1326
1326
|
return !!document.getElementById(e);
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function qr(e) {
|
|
1329
1329
|
const t = document.getElementById(e);
|
|
1330
1330
|
t && t.remove();
|
|
1331
1331
|
}
|
|
1332
|
-
class
|
|
1332
|
+
class Ht {
|
|
1333
1333
|
constructor(t) {
|
|
1334
1334
|
G(this, "sdk", null);
|
|
1335
1335
|
G(this, "config");
|
|
@@ -1339,7 +1339,7 @@ class _t {
|
|
|
1339
1339
|
* Load Sumsub SDK
|
|
1340
1340
|
*/
|
|
1341
1341
|
async loadSDK() {
|
|
1342
|
-
await
|
|
1342
|
+
await Ze(
|
|
1343
1343
|
"https://cdn.sumsub.com/websdk/v2/production/websdk.js",
|
|
1344
1344
|
"sumsub-sdk"
|
|
1345
1345
|
);
|
|
@@ -1384,7 +1384,7 @@ class _t {
|
|
|
1384
1384
|
this.sdk && this.sdk.on("idCheck.onError", t);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
class
|
|
1387
|
+
class Wt {
|
|
1388
1388
|
constructor(t) {
|
|
1389
1389
|
G(this, "sdk", null);
|
|
1390
1390
|
G(this, "config");
|
|
@@ -1394,7 +1394,7 @@ class qt {
|
|
|
1394
1394
|
* Load Onfido SDK
|
|
1395
1395
|
*/
|
|
1396
1396
|
async loadSDK() {
|
|
1397
|
-
await
|
|
1397
|
+
await Ze(
|
|
1398
1398
|
"https://sdk.onfido.com/v12.0.0/onfido.min.js",
|
|
1399
1399
|
"onfido-sdk"
|
|
1400
1400
|
);
|
|
@@ -1450,7 +1450,7 @@ class qt {
|
|
|
1450
1450
|
this.sdk && (this.sdk.tearDown(), this.sdk = null);
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
-
class
|
|
1453
|
+
class Yt {
|
|
1454
1454
|
constructor(t) {
|
|
1455
1455
|
G(this, "sardineContext", null);
|
|
1456
1456
|
G(this, "config");
|
|
@@ -1529,10 +1529,10 @@ class Kt {
|
|
|
1529
1529
|
console.log(`[SardinAI] Device ID: ${c.deviceId}`);
|
|
1530
1530
|
},
|
|
1531
1531
|
// New callback for session updates
|
|
1532
|
-
onConfigUpdate: (c, d,
|
|
1532
|
+
onConfigUpdate: (c, d, m) => {
|
|
1533
1533
|
switch (c) {
|
|
1534
1534
|
case "SESSION_UPDATE_FAILED":
|
|
1535
|
-
console.error("[SardinAI] Session update failed:",
|
|
1535
|
+
console.error("[SardinAI] Session update failed:", m);
|
|
1536
1536
|
break;
|
|
1537
1537
|
case "SESSION_UPDATED":
|
|
1538
1538
|
console.log("[SardinAI] Session updated:", d);
|
|
@@ -1594,18 +1594,18 @@ class Kt {
|
|
|
1594
1594
|
this.sardineContext && (this.sardineContext = null);
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
|
-
class
|
|
1597
|
+
class De {
|
|
1598
1598
|
/**
|
|
1599
1599
|
* Create a provider instance
|
|
1600
1600
|
*/
|
|
1601
1601
|
static createProvider(t, r) {
|
|
1602
1602
|
switch (t) {
|
|
1603
|
-
case
|
|
1604
|
-
return new
|
|
1605
|
-
case
|
|
1606
|
-
return new
|
|
1607
|
-
case
|
|
1608
|
-
return new
|
|
1603
|
+
case fe.Sumsub:
|
|
1604
|
+
return new Ht(r);
|
|
1605
|
+
case fe.Onfido:
|
|
1606
|
+
return new Wt(r);
|
|
1607
|
+
case fe.SardinAI:
|
|
1608
|
+
return new Yt(r);
|
|
1609
1609
|
default:
|
|
1610
1610
|
throw new Error(`Unsupported identity provider: ${t}`);
|
|
1611
1611
|
}
|
|
@@ -1616,7 +1616,7 @@ class Ee {
|
|
|
1616
1616
|
static parseProviderConfig(t, r, n) {
|
|
1617
1617
|
var s;
|
|
1618
1618
|
switch (t) {
|
|
1619
|
-
case
|
|
1619
|
+
case fe.Sumsub:
|
|
1620
1620
|
return {
|
|
1621
1621
|
accessToken: r.accessToken || r.token,
|
|
1622
1622
|
applicantEmail: r.email,
|
|
@@ -1624,11 +1624,11 @@ class Ee {
|
|
|
1624
1624
|
externalUserId: r.externalUserId,
|
|
1625
1625
|
lang: r.lang || "en"
|
|
1626
1626
|
};
|
|
1627
|
-
case
|
|
1627
|
+
case fe.Onfido:
|
|
1628
1628
|
return {
|
|
1629
1629
|
token: r.token || r.sdkToken
|
|
1630
1630
|
};
|
|
1631
|
-
case
|
|
1631
|
+
case fe.SardinAI:
|
|
1632
1632
|
const l = ((s = n == null ? void 0 : n.identityProviders) == null ? void 0 : s.sardinai) || {};
|
|
1633
1633
|
return {
|
|
1634
1634
|
clientId: l.clientId || r.clientId,
|
|
@@ -1644,9 +1644,9 @@ class Ee {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
class
|
|
1647
|
+
class Qt {
|
|
1648
1648
|
constructor(t) {
|
|
1649
|
-
G(this, "currentTheme",
|
|
1649
|
+
G(this, "currentTheme", de);
|
|
1650
1650
|
G(this, "customStyleElement", null);
|
|
1651
1651
|
G(this, "container");
|
|
1652
1652
|
this.container = t || document.documentElement;
|
|
@@ -1726,19 +1726,19 @@ class jt {
|
|
|
1726
1726
|
mergeWithDefault(t) {
|
|
1727
1727
|
var r;
|
|
1728
1728
|
return {
|
|
1729
|
-
name: t.name ||
|
|
1730
|
-
title: t.title ||
|
|
1731
|
-
logo: { ...
|
|
1732
|
-
colors: { ...
|
|
1733
|
-
typography: t.typography ? { ...
|
|
1734
|
-
spacing: t.spacing ? { ...
|
|
1729
|
+
name: t.name || de.name,
|
|
1730
|
+
title: t.title || de.title,
|
|
1731
|
+
logo: { ...de.logo, ...t.logo },
|
|
1732
|
+
colors: { ...de.colors, ...t.colors },
|
|
1733
|
+
typography: t.typography ? { ...de.typography, ...t.typography } : de.typography,
|
|
1734
|
+
spacing: t.spacing ? { ...de.spacing, ...t.spacing } : de.spacing,
|
|
1735
1735
|
customCSS: t.customCSS,
|
|
1736
1736
|
darkMode: t.darkMode ? {
|
|
1737
1737
|
colors: {
|
|
1738
|
-
...(r =
|
|
1738
|
+
...(r = de.darkMode) == null ? void 0 : r.colors,
|
|
1739
1739
|
...t.darkMode.colors
|
|
1740
1740
|
}
|
|
1741
|
-
} :
|
|
1741
|
+
} : de.darkMode,
|
|
1742
1742
|
applicantFormVisibleFields: t.applicantFormVisibleFields,
|
|
1743
1743
|
applicantFormRequiredFields: t.applicantFormRequiredFields,
|
|
1744
1744
|
allowedLanguages: t.allowedLanguages,
|
|
@@ -1755,7 +1755,7 @@ class jt {
|
|
|
1755
1755
|
* Reset to default theme
|
|
1756
1756
|
*/
|
|
1757
1757
|
resetTheme() {
|
|
1758
|
-
this.applyTheme(
|
|
1758
|
+
this.applyTheme(de);
|
|
1759
1759
|
}
|
|
1760
1760
|
/**
|
|
1761
1761
|
* Remove all custom styles
|
|
@@ -1770,28 +1770,28 @@ class jt {
|
|
|
1770
1770
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
|
-
const
|
|
1774
|
-
const [r, n] =
|
|
1775
|
-
const d = new
|
|
1773
|
+
const Je = it(null), Kr = ({ config: e, children: t }) => {
|
|
1774
|
+
const [r, n] = x(null), s = ye.useRef(!1), l = ye.useRef(!1), o = Se(() => {
|
|
1775
|
+
const d = new St(e), m = new Ct(d), w = new At(d), N = new It(d), y = new Et(d), h = new Rt(d), g = new Ft(d), k = new Dt(d), b = new Pt(d), p = new Lt(d), F = new _t(d), C = new Qt();
|
|
1776
1776
|
return {
|
|
1777
1777
|
httpClient: d,
|
|
1778
|
-
applicantService:
|
|
1778
|
+
applicantService: m,
|
|
1779
1779
|
questionnaireService: w,
|
|
1780
1780
|
uploadDocumentService: N,
|
|
1781
1781
|
appropriatenessTestService: y,
|
|
1782
1782
|
overviewService: h,
|
|
1783
1783
|
riskScoringService: g,
|
|
1784
1784
|
identityService: k,
|
|
1785
|
-
baseInformationService:
|
|
1786
|
-
investorCategorizationService:
|
|
1787
|
-
themeService:
|
|
1788
|
-
themeManager:
|
|
1785
|
+
baseInformationService: b,
|
|
1786
|
+
investorCategorizationService: p,
|
|
1787
|
+
themeService: F,
|
|
1788
|
+
themeManager: C
|
|
1789
1789
|
};
|
|
1790
|
-
}, [e]), c =
|
|
1790
|
+
}, [e]), c = Se(() => ({
|
|
1791
1791
|
config: e,
|
|
1792
1792
|
...o,
|
|
1793
1793
|
currentTheme: r,
|
|
1794
|
-
createOrchestrator: () => new
|
|
1794
|
+
createOrchestrator: () => new jt(
|
|
1795
1795
|
o.applicantService,
|
|
1796
1796
|
o.questionnaireService,
|
|
1797
1797
|
o.uploadDocumentService,
|
|
@@ -1814,24 +1814,24 @@ const Qe = rt(null), zr = ({ config: e, children: t }) => {
|
|
|
1814
1814
|
return;
|
|
1815
1815
|
}
|
|
1816
1816
|
console.log("[MetaKYC] Fetching theme from backend...");
|
|
1817
|
-
const
|
|
1818
|
-
o.themeManager.applyTheme(
|
|
1819
|
-
} catch (
|
|
1820
|
-
console.warn("[MetaKYC] Failed to load theme, using default:",
|
|
1817
|
+
const m = await o.themeService.getThemeConfiguration();
|
|
1818
|
+
o.themeManager.applyTheme(m), n(o.themeManager.getCurrentTheme()), l.current = !0, console.log("[MetaKYC] Theme loaded and applied", m);
|
|
1819
|
+
} catch (m) {
|
|
1820
|
+
console.warn("[MetaKYC] Failed to load theme, using default:", m), n(o.themeManager.getCurrentTheme()), l.current = !0;
|
|
1821
1821
|
} finally {
|
|
1822
1822
|
s.current = !1;
|
|
1823
1823
|
}
|
|
1824
1824
|
})(), () => {
|
|
1825
1825
|
o.themeManager.cleanup();
|
|
1826
|
-
}), []), /* @__PURE__ */ a(
|
|
1826
|
+
}), []), /* @__PURE__ */ a(Je.Provider, { value: c, children: t });
|
|
1827
1827
|
};
|
|
1828
|
-
function
|
|
1829
|
-
const e =
|
|
1828
|
+
function he() {
|
|
1829
|
+
const e = lt(Je);
|
|
1830
1830
|
if (!e)
|
|
1831
1831
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1832
1832
|
return e;
|
|
1833
1833
|
}
|
|
1834
|
-
async function
|
|
1834
|
+
async function Vt(e) {
|
|
1835
1835
|
return new Promise((t, r) => {
|
|
1836
1836
|
const n = new FileReader();
|
|
1837
1837
|
n.readAsDataURL(e), n.onload = () => {
|
|
@@ -1840,10 +1840,10 @@ async function Ht(e) {
|
|
|
1840
1840
|
}, n.onerror = (s) => r(s);
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function jr(e, t) {
|
|
1844
1844
|
return e.size <= t;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Hr(e, t) {
|
|
1847
1847
|
return t.split(",").map((n) => n.trim()).some((n) => {
|
|
1848
1848
|
if (n.endsWith("/*")) {
|
|
1849
1849
|
const s = n.slice(0, -2);
|
|
@@ -1852,104 +1852,104 @@ function _r(e, t) {
|
|
|
1852
1852
|
return e.type === n;
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
|
-
function
|
|
1855
|
+
function Ue(e) {
|
|
1856
1856
|
if (e === 0) return "0 Bytes";
|
|
1857
1857
|
const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
|
|
1858
1858
|
return Math.round(e / Math.pow(t, n) * 100) / 100 + " " + r[n];
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function Wr(e) {
|
|
1861
1861
|
return e;
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function ie(...e) {
|
|
1864
1864
|
return e.filter(Boolean).join(" ");
|
|
1865
1865
|
}
|
|
1866
|
-
const
|
|
1866
|
+
const Pe = {
|
|
1867
1867
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
1868
1868
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
1869
1869
|
};
|
|
1870
|
-
function
|
|
1870
|
+
function Gt(e) {
|
|
1871
1871
|
try {
|
|
1872
|
-
localStorage.setItem(
|
|
1872
|
+
localStorage.setItem(Pe.APPLICANT_ID, e.toString());
|
|
1873
1873
|
} catch (t) {
|
|
1874
1874
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
function
|
|
1877
|
+
function Zt() {
|
|
1878
1878
|
try {
|
|
1879
|
-
const e = localStorage.getItem(
|
|
1879
|
+
const e = localStorage.getItem(Pe.APPLICANT_ID);
|
|
1880
1880
|
return e ? parseInt(e, 10) : null;
|
|
1881
1881
|
} catch (e) {
|
|
1882
1882
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Jt() {
|
|
1886
1886
|
try {
|
|
1887
|
-
localStorage.removeItem(
|
|
1887
|
+
localStorage.removeItem(Pe.APPLICANT_ID);
|
|
1888
1888
|
} catch (e) {
|
|
1889
1889
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function Xt(e) {
|
|
1893
1893
|
try {
|
|
1894
|
-
localStorage.setItem(
|
|
1894
|
+
localStorage.setItem(Pe.WORKFLOW_STATE, JSON.stringify(e));
|
|
1895
1895
|
} catch (t) {
|
|
1896
1896
|
console.warn("Failed to save workflow state to storage:", t);
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function Yr() {
|
|
1900
1900
|
try {
|
|
1901
|
-
const e = localStorage.getItem(
|
|
1901
|
+
const e = localStorage.getItem(Pe.WORKFLOW_STATE);
|
|
1902
1902
|
return e ? JSON.parse(e) : null;
|
|
1903
1903
|
} catch (e) {
|
|
1904
1904
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function er() {
|
|
1908
1908
|
try {
|
|
1909
|
-
localStorage.removeItem(
|
|
1909
|
+
localStorage.removeItem(Pe.WORKFLOW_STATE);
|
|
1910
1910
|
} catch (e) {
|
|
1911
1911
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1915
|
-
|
|
1914
|
+
function Qr() {
|
|
1915
|
+
Jt(), er();
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
const { createOrchestrator: t } =
|
|
1917
|
+
function tr(e) {
|
|
1918
|
+
const { createOrchestrator: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(null), d = te(null), m = e || Zt();
|
|
1919
1919
|
ee(() => {
|
|
1920
1920
|
d.current || (d.current = t());
|
|
1921
1921
|
}, [t]), ee(() => {
|
|
1922
|
-
var
|
|
1923
|
-
r &&
|
|
1924
|
-
applicantId:
|
|
1925
|
-
currentStepOrder: (
|
|
1922
|
+
var C;
|
|
1923
|
+
r && m && (Gt(m), Xt({
|
|
1924
|
+
applicantId: m,
|
|
1925
|
+
currentStepOrder: (C = r.currentStep) == null ? void 0 : C.order,
|
|
1926
1926
|
status: r.status,
|
|
1927
1927
|
lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1928
1928
|
workflowKey: r.workFlowKey,
|
|
1929
1929
|
nextWorkflowKey: r.nextWorkflowKey
|
|
1930
1930
|
}));
|
|
1931
|
-
}, [r,
|
|
1932
|
-
const w =
|
|
1933
|
-
if (!(!
|
|
1931
|
+
}, [r, m]);
|
|
1932
|
+
const w = te(!1), N = te(!1), y = Q(async () => {
|
|
1933
|
+
if (!(!m || !d.current)) {
|
|
1934
1934
|
if (w.current) {
|
|
1935
1935
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
1936
1936
|
return;
|
|
1937
1937
|
}
|
|
1938
1938
|
w.current = !0, l(!0), c(null);
|
|
1939
1939
|
try {
|
|
1940
|
-
const
|
|
1941
|
-
n(
|
|
1942
|
-
} catch (
|
|
1943
|
-
c(
|
|
1940
|
+
const C = await d.current.initialize(m);
|
|
1941
|
+
n(C), N.current = !0;
|
|
1942
|
+
} catch (C) {
|
|
1943
|
+
c(C);
|
|
1944
1944
|
} finally {
|
|
1945
1945
|
l(!1), w.current = !1;
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
-
}, [
|
|
1948
|
+
}, [m]);
|
|
1949
1949
|
ee(() => {
|
|
1950
|
-
|
|
1951
|
-
}, [
|
|
1952
|
-
const h =
|
|
1950
|
+
m && !N.current && y();
|
|
1951
|
+
}, [m, y]);
|
|
1952
|
+
const h = Q(async () => {
|
|
1953
1953
|
if (d.current) {
|
|
1954
1954
|
if (w.current) {
|
|
1955
1955
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
@@ -1957,43 +1957,43 @@ function Zt(e) {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
w.current = !0, l(!0), c(null);
|
|
1959
1959
|
try {
|
|
1960
|
-
const
|
|
1961
|
-
n(
|
|
1962
|
-
} catch (
|
|
1963
|
-
c(
|
|
1960
|
+
const C = await d.current.refreshProgress();
|
|
1961
|
+
n(C);
|
|
1962
|
+
} catch (C) {
|
|
1963
|
+
c(C);
|
|
1964
1964
|
} finally {
|
|
1965
1965
|
l(!1), w.current = !1;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
}, []), g =
|
|
1968
|
+
}, []), g = Q(async () => {
|
|
1969
1969
|
if (d.current) {
|
|
1970
1970
|
l(!0), c(null);
|
|
1971
1971
|
try {
|
|
1972
|
-
const
|
|
1973
|
-
n(
|
|
1974
|
-
} catch (
|
|
1975
|
-
c(
|
|
1972
|
+
const C = await d.current.moveToNextStep();
|
|
1973
|
+
n(C);
|
|
1974
|
+
} catch (C) {
|
|
1975
|
+
c(C);
|
|
1976
1976
|
} finally {
|
|
1977
1977
|
l(!1);
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
|
-
}, []), k =
|
|
1980
|
+
}, []), k = Q(async () => {
|
|
1981
1981
|
if (d.current) {
|
|
1982
1982
|
l(!0), c(null);
|
|
1983
1983
|
try {
|
|
1984
|
-
const
|
|
1985
|
-
n(
|
|
1986
|
-
} catch (
|
|
1987
|
-
c(
|
|
1984
|
+
const C = await d.current.moveToPreviousStep();
|
|
1985
|
+
n(C);
|
|
1986
|
+
} catch (C) {
|
|
1987
|
+
c(C);
|
|
1988
1988
|
} finally {
|
|
1989
1989
|
l(!1);
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
}, []),
|
|
1992
|
+
}, []), b = Q(async (C) => {
|
|
1993
1993
|
if (d.current) {
|
|
1994
1994
|
l(!0), c(null);
|
|
1995
1995
|
try {
|
|
1996
|
-
await d.current.submitCurrentStep(
|
|
1996
|
+
await d.current.submitCurrentStep(C);
|
|
1997
1997
|
const v = await d.current.refreshProgress();
|
|
1998
1998
|
n(v);
|
|
1999
1999
|
} catch (v) {
|
|
@@ -2002,31 +2002,31 @@ function Zt(e) {
|
|
|
2002
2002
|
l(!1);
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
}, []),
|
|
2005
|
+
}, []), p = Ye.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((C, v) => C.order - v.order) : [], [r == null ? void 0 : r.stepInfoList]), F = Ye.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
|
|
2006
2006
|
return {
|
|
2007
2007
|
progress: r,
|
|
2008
|
-
applicantId:
|
|
2008
|
+
applicantId: m,
|
|
2009
2009
|
currentStep: (r == null ? void 0 : r.currentStep) || null,
|
|
2010
|
-
steps:
|
|
2011
|
-
status: (r == null ? void 0 : r.status) ||
|
|
2010
|
+
steps: p,
|
|
2011
|
+
status: (r == null ? void 0 : r.status) || xe.None,
|
|
2012
2012
|
workflowResult: (r == null ? void 0 : r.workflowResult) || null,
|
|
2013
2013
|
workflowKey: r == null ? void 0 : r.workFlowKey,
|
|
2014
2014
|
nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
|
|
2015
|
-
hasWorkflowChanged:
|
|
2015
|
+
hasWorkflowChanged: F,
|
|
2016
2016
|
isLoading: s,
|
|
2017
2017
|
error: o,
|
|
2018
|
-
isComplete: (r == null ? void 0 : r.status) ===
|
|
2019
|
-
isOnHold: (r == null ? void 0 : r.status) ===
|
|
2018
|
+
isComplete: (r == null ? void 0 : r.status) === xe.Finished,
|
|
2019
|
+
isOnHold: (r == null ? void 0 : r.status) === xe.OnHold,
|
|
2020
2020
|
refreshProgress: h,
|
|
2021
2021
|
moveToNext: g,
|
|
2022
2022
|
moveBack: k,
|
|
2023
|
-
submitCurrentStep:
|
|
2023
|
+
submitCurrentStep: b,
|
|
2024
2024
|
orchestrator: d.current
|
|
2025
2025
|
};
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const { questionnaireService: t, applicantService: r } =
|
|
2029
|
-
var
|
|
2027
|
+
function rr(e) {
|
|
2028
|
+
const { questionnaireService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, d] = x(!1), [m, w] = x(!1), [N, y] = x(null), h = te(!1), g = te(null), k = Q(async () => {
|
|
2029
|
+
var p, F;
|
|
2030
2030
|
if (e) {
|
|
2031
2031
|
if (h.current) {
|
|
2032
2032
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
@@ -2034,24 +2034,24 @@ function Jt(e) {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
h.current = !0, d(!0), y(null);
|
|
2036
2036
|
try {
|
|
2037
|
-
const [
|
|
2037
|
+
const [C, v] = await Promise.all([
|
|
2038
2038
|
t.getQuestionnaire(e),
|
|
2039
2039
|
r.getApplicantData(e).catch(() => null)
|
|
2040
2040
|
]);
|
|
2041
|
-
if (s(
|
|
2041
|
+
if (s(C), (p = v == null ? void 0 : v.questionnaireResults) != null && p.length && C) {
|
|
2042
2042
|
const K = /* @__PURE__ */ new Map();
|
|
2043
2043
|
for (const f of v.questionnaireResults)
|
|
2044
|
-
f.question && ((
|
|
2045
|
-
const
|
|
2044
|
+
f.question && ((F = f.answers) != null && F.length) && K.set(f.question.trim().toLowerCase(), f.answers);
|
|
2045
|
+
const Y = {}, M = C.questionGroups.flatMap((f) => f.questions ?? []);
|
|
2046
2046
|
for (const f of M) {
|
|
2047
2047
|
const A = f.text.trim().toLowerCase();
|
|
2048
|
-
K.has(A) && (
|
|
2048
|
+
K.has(A) && (Y[f.id] = K.get(A));
|
|
2049
2049
|
}
|
|
2050
|
-
o(
|
|
2050
|
+
o(Y);
|
|
2051
2051
|
}
|
|
2052
2052
|
g.current = e;
|
|
2053
|
-
} catch (
|
|
2054
|
-
y(
|
|
2053
|
+
} catch (C) {
|
|
2054
|
+
y(C);
|
|
2055
2055
|
} finally {
|
|
2056
2056
|
d(!1), h.current = !1;
|
|
2057
2057
|
}
|
|
@@ -2060,13 +2060,13 @@ function Jt(e) {
|
|
|
2060
2060
|
ee(() => {
|
|
2061
2061
|
e && g.current !== e && k();
|
|
2062
2062
|
}, [e]);
|
|
2063
|
-
const
|
|
2064
|
-
async (
|
|
2063
|
+
const b = Q(
|
|
2064
|
+
async (p) => {
|
|
2065
2065
|
w(!0), y(null);
|
|
2066
2066
|
try {
|
|
2067
|
-
return await t.fillQuestionnaire(
|
|
2068
|
-
} catch (
|
|
2069
|
-
throw y(
|
|
2067
|
+
return await t.fillQuestionnaire(p);
|
|
2068
|
+
} catch (F) {
|
|
2069
|
+
throw y(F), F;
|
|
2070
2070
|
} finally {
|
|
2071
2071
|
w(!1);
|
|
2072
2072
|
}
|
|
@@ -2077,14 +2077,14 @@ function Jt(e) {
|
|
|
2077
2077
|
questionnaire: n,
|
|
2078
2078
|
initialAnswers: l,
|
|
2079
2079
|
isLoading: c,
|
|
2080
|
-
isSubmitting:
|
|
2080
|
+
isSubmitting: m,
|
|
2081
2081
|
error: N,
|
|
2082
2082
|
load: k,
|
|
2083
|
-
submit:
|
|
2083
|
+
submit: b
|
|
2084
2084
|
};
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
const { uploadDocumentService: t } =
|
|
2086
|
+
function ar(e) {
|
|
2087
|
+
const { uploadDocumentService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(0), [w, N] = x(null), y = te(!1), h = te(null), g = Q(async () => {
|
|
2088
2088
|
if (e) {
|
|
2089
2089
|
if (y.current) {
|
|
2090
2090
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2092,10 +2092,10 @@ function Xt(e) {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
y.current = !0, l(!0), N(null);
|
|
2094
2094
|
try {
|
|
2095
|
-
const
|
|
2096
|
-
n(
|
|
2097
|
-
} catch (
|
|
2098
|
-
N(
|
|
2095
|
+
const b = await t.getUploadDocument(e);
|
|
2096
|
+
n(b), h.current = e;
|
|
2097
|
+
} catch (b) {
|
|
2098
|
+
N(b);
|
|
2099
2099
|
} finally {
|
|
2100
2100
|
l(!1), y.current = !1;
|
|
2101
2101
|
}
|
|
@@ -2104,13 +2104,13 @@ function Xt(e) {
|
|
|
2104
2104
|
ee(() => {
|
|
2105
2105
|
e && h.current !== e && g();
|
|
2106
2106
|
}, [e]);
|
|
2107
|
-
const k =
|
|
2108
|
-
async (
|
|
2109
|
-
c(!0),
|
|
2107
|
+
const k = Q(
|
|
2108
|
+
async (b) => {
|
|
2109
|
+
c(!0), m(0), N(null);
|
|
2110
2110
|
try {
|
|
2111
|
-
await t.fillUploadDocument(
|
|
2112
|
-
} catch (
|
|
2113
|
-
throw N(
|
|
2111
|
+
await t.fillUploadDocument(b), m(100);
|
|
2112
|
+
} catch (p) {
|
|
2113
|
+
throw N(p), p;
|
|
2114
2114
|
} finally {
|
|
2115
2115
|
c(!1);
|
|
2116
2116
|
}
|
|
@@ -2127,19 +2127,19 @@ function Xt(e) {
|
|
|
2127
2127
|
submit: k
|
|
2128
2128
|
};
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2131
|
-
const { appropriatenessTestService: t } =
|
|
2130
|
+
function Vr(e) {
|
|
2131
|
+
const { appropriatenessTestService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(null), [w, N] = x(null), y = te(!1), h = te(null), g = Q(async () => {
|
|
2132
2132
|
if (e) {
|
|
2133
2133
|
if (y.current) {
|
|
2134
2134
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
2135
2135
|
return;
|
|
2136
2136
|
}
|
|
2137
|
-
y.current = !0, l(!0),
|
|
2137
|
+
y.current = !0, l(!0), m(null);
|
|
2138
2138
|
try {
|
|
2139
|
-
const
|
|
2140
|
-
n(
|
|
2141
|
-
} catch (
|
|
2142
|
-
|
|
2139
|
+
const b = await t.getAppropriatenessTest(e);
|
|
2140
|
+
n(b), h.current = e;
|
|
2141
|
+
} catch (b) {
|
|
2142
|
+
m(b);
|
|
2143
2143
|
} finally {
|
|
2144
2144
|
l(!1), y.current = !1;
|
|
2145
2145
|
}
|
|
@@ -2148,14 +2148,14 @@ function Hr(e) {
|
|
|
2148
2148
|
ee(() => {
|
|
2149
2149
|
e && h.current !== e && g();
|
|
2150
2150
|
}, [e]);
|
|
2151
|
-
const k =
|
|
2152
|
-
async (
|
|
2153
|
-
c(!0),
|
|
2151
|
+
const k = Q(
|
|
2152
|
+
async (b) => {
|
|
2153
|
+
c(!0), m(null);
|
|
2154
2154
|
try {
|
|
2155
|
-
const
|
|
2156
|
-
return N(
|
|
2157
|
-
} catch (
|
|
2158
|
-
throw
|
|
2155
|
+
const p = await t.fillAppropriatenessTest(b);
|
|
2156
|
+
return N(p), p;
|
|
2157
|
+
} catch (p) {
|
|
2158
|
+
throw m(p), p;
|
|
2159
2159
|
} finally {
|
|
2160
2160
|
c(!1);
|
|
2161
2161
|
}
|
|
@@ -2172,19 +2172,19 @@ function Hr(e) {
|
|
|
2172
2172
|
submit: k
|
|
2173
2173
|
};
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2176
|
-
const { overviewService: t } =
|
|
2175
|
+
function nr(e) {
|
|
2176
|
+
const { overviewService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(null), w = te(!1), N = te(null), y = Q(async () => {
|
|
2177
2177
|
if (e) {
|
|
2178
2178
|
if (w.current) {
|
|
2179
2179
|
console.log("[Overview] Load already in progress, skipping...");
|
|
2180
2180
|
return;
|
|
2181
2181
|
}
|
|
2182
|
-
w.current = !0, l(!0),
|
|
2182
|
+
w.current = !0, l(!0), m(null);
|
|
2183
2183
|
try {
|
|
2184
2184
|
const g = await t.getOverviewData(e);
|
|
2185
2185
|
n(g), N.current = e;
|
|
2186
2186
|
} catch (g) {
|
|
2187
|
-
|
|
2187
|
+
m(g);
|
|
2188
2188
|
} finally {
|
|
2189
2189
|
l(!1), w.current = !1;
|
|
2190
2190
|
}
|
|
@@ -2193,13 +2193,13 @@ function er(e) {
|
|
|
2193
2193
|
ee(() => {
|
|
2194
2194
|
e && N.current !== e && y();
|
|
2195
2195
|
}, [e]);
|
|
2196
|
-
const h =
|
|
2196
|
+
const h = Q(async () => {
|
|
2197
2197
|
if (e) {
|
|
2198
|
-
c(!0),
|
|
2198
|
+
c(!0), m(null);
|
|
2199
2199
|
try {
|
|
2200
2200
|
await t.passOverview(e);
|
|
2201
2201
|
} catch (g) {
|
|
2202
|
-
throw
|
|
2202
|
+
throw m(g), g;
|
|
2203
2203
|
} finally {
|
|
2204
2204
|
c(!1);
|
|
2205
2205
|
}
|
|
@@ -2214,10 +2214,10 @@ function er(e) {
|
|
|
2214
2214
|
passOverview: h
|
|
2215
2215
|
};
|
|
2216
2216
|
}
|
|
2217
|
-
function
|
|
2218
|
-
const { identityService: t } =
|
|
2217
|
+
function sr(e) {
|
|
2218
|
+
const { identityService: t } = he(), [r, n] = x(
|
|
2219
2219
|
null
|
|
2220
|
-
), [s, l] =
|
|
2220
|
+
), [s, l] = x(!1), [o, c] = x(null), d = te(!1), m = Q(
|
|
2221
2221
|
async (y, h) => {
|
|
2222
2222
|
if (e) {
|
|
2223
2223
|
if (d.current) {
|
|
@@ -2244,7 +2244,7 @@ function tr(e) {
|
|
|
2244
2244
|
}
|
|
2245
2245
|
},
|
|
2246
2246
|
[e, t]
|
|
2247
|
-
), w =
|
|
2247
|
+
), w = Q(
|
|
2248
2248
|
async (y, h) => {
|
|
2249
2249
|
if (e) {
|
|
2250
2250
|
l(!0), c(null);
|
|
@@ -2264,7 +2264,7 @@ function tr(e) {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
},
|
|
2266
2266
|
[e, t]
|
|
2267
|
-
), N =
|
|
2267
|
+
), N = Q(async () => {
|
|
2268
2268
|
if (e) {
|
|
2269
2269
|
if (d.current) {
|
|
2270
2270
|
console.log("[Identity] Restart already in progress, skipping...");
|
|
@@ -2295,14 +2295,14 @@ function tr(e) {
|
|
|
2295
2295
|
token: (r == null ? void 0 : r.publicProviderTokenObject) || null,
|
|
2296
2296
|
isLoading: s,
|
|
2297
2297
|
error: o,
|
|
2298
|
-
requestIdentity:
|
|
2298
|
+
requestIdentity: m,
|
|
2299
2299
|
requestCompanyIdentity: w,
|
|
2300
2300
|
restartIdentity: N
|
|
2301
2301
|
};
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2304
|
-
const { riskScoringService: t, applicantService: r } =
|
|
2305
|
-
var
|
|
2303
|
+
function ir(e) {
|
|
2304
|
+
const { riskScoringService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, d] = x(!1), [m, w] = x(!1), [N, y] = x(null), [h, g] = x(null), k = te(!1), b = te(null), p = Q(async () => {
|
|
2305
|
+
var C;
|
|
2306
2306
|
if (e) {
|
|
2307
2307
|
if (k.current) {
|
|
2308
2308
|
console.log("[RiskScoring] Load already in progress, skipping...");
|
|
@@ -2314,18 +2314,18 @@ function rr(e) {
|
|
|
2314
2314
|
t.getRiskCriterias(e),
|
|
2315
2315
|
r.getApplicantData(e).catch(() => null)
|
|
2316
2316
|
]);
|
|
2317
|
-
if (s(v), (
|
|
2318
|
-
const
|
|
2319
|
-
for (const f of
|
|
2317
|
+
if (s(v), (C = K == null ? void 0 : K.riskScoringResults) != null && C.length) {
|
|
2318
|
+
const Y = K.riskScoringResults[0], M = {};
|
|
2319
|
+
for (const f of Y.riskCriteriaResults ?? [])
|
|
2320
2320
|
if (f.riskCriteriaId != null && f.answer != null && f.answer !== "") {
|
|
2321
2321
|
const A = [...new Set(
|
|
2322
|
-
f.answer.split(",").map((
|
|
2322
|
+
f.answer.split(",").map((D) => D.trim()).filter((D) => D !== "")
|
|
2323
2323
|
)];
|
|
2324
2324
|
A.length > 0 && (M[f.riskCriteriaId] = A);
|
|
2325
2325
|
}
|
|
2326
2326
|
o(M);
|
|
2327
2327
|
}
|
|
2328
|
-
|
|
2328
|
+
b.current = e;
|
|
2329
2329
|
} catch (v) {
|
|
2330
2330
|
y(v);
|
|
2331
2331
|
} finally {
|
|
@@ -2334,13 +2334,13 @@ function rr(e) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
}, [e, t, r]);
|
|
2336
2336
|
ee(() => {
|
|
2337
|
-
e &&
|
|
2337
|
+
e && b.current !== e && p();
|
|
2338
2338
|
}, [e]);
|
|
2339
|
-
const
|
|
2340
|
-
async (
|
|
2339
|
+
const F = Q(
|
|
2340
|
+
async (C) => {
|
|
2341
2341
|
w(!0), y(null);
|
|
2342
2342
|
try {
|
|
2343
|
-
const v = await t.submitRiskScoring(
|
|
2343
|
+
const v = await t.submitRiskScoring(C);
|
|
2344
2344
|
return g(v), v;
|
|
2345
2345
|
} catch (v) {
|
|
2346
2346
|
throw y(v), v;
|
|
@@ -2355,17 +2355,17 @@ function rr(e) {
|
|
|
2355
2355
|
initialAnswers: l,
|
|
2356
2356
|
result: h,
|
|
2357
2357
|
isLoading: c,
|
|
2358
|
-
isSubmitting:
|
|
2358
|
+
isSubmitting: m,
|
|
2359
2359
|
error: N,
|
|
2360
|
-
load:
|
|
2361
|
-
submit:
|
|
2360
|
+
load: p,
|
|
2361
|
+
submit: F
|
|
2362
2362
|
};
|
|
2363
2363
|
}
|
|
2364
|
-
function
|
|
2365
|
-
const { applicantService: e, config: t } =
|
|
2364
|
+
function lr() {
|
|
2365
|
+
const { applicantService: e, config: t } = he(), [r, n] = x(!1), [s, l] = x(null), o = te(!1), c = te(!1), d = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(h) {
|
|
2366
2366
|
const g = Math.random() * 16 | 0;
|
|
2367
2367
|
return (h === "x" ? g : g & 3 | 8).toString(16);
|
|
2368
|
-
}),
|
|
2368
|
+
}), m = Q(
|
|
2369
2369
|
async (h) => {
|
|
2370
2370
|
var g;
|
|
2371
2371
|
if (o.current)
|
|
@@ -2373,10 +2373,10 @@ function ar() {
|
|
|
2373
2373
|
o.current = !0, n(!0), l(null);
|
|
2374
2374
|
try {
|
|
2375
2375
|
if (h.applicantAdditionalDatas || (h.applicantAdditionalDatas = []), (g = t.identityProviders) != null && g.sardinai) {
|
|
2376
|
-
const
|
|
2377
|
-
console.log("[SardinAI] Generated session key:",
|
|
2376
|
+
const b = d();
|
|
2377
|
+
console.log("[SardinAI] Generated session key:", b), h.applicantAdditionalDatas.push({
|
|
2378
2378
|
paramName: "sessionKey",
|
|
2379
|
-
value:
|
|
2379
|
+
value: b
|
|
2380
2380
|
});
|
|
2381
2381
|
}
|
|
2382
2382
|
return await e.createApplicant(h);
|
|
@@ -2387,7 +2387,7 @@ function ar() {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
},
|
|
2389
2389
|
[e, t]
|
|
2390
|
-
), w =
|
|
2390
|
+
), w = Q(
|
|
2391
2391
|
async (h) => {
|
|
2392
2392
|
n(!0), l(null);
|
|
2393
2393
|
try {
|
|
@@ -2399,7 +2399,7 @@ function ar() {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
},
|
|
2401
2401
|
[e]
|
|
2402
|
-
), N =
|
|
2402
|
+
), N = Q(
|
|
2403
2403
|
async (h) => {
|
|
2404
2404
|
if (c.current)
|
|
2405
2405
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
@@ -2413,7 +2413,7 @@ function ar() {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
},
|
|
2415
2415
|
[e]
|
|
2416
|
-
), y =
|
|
2416
|
+
), y = Q(
|
|
2417
2417
|
async (h) => {
|
|
2418
2418
|
n(!0), l(null);
|
|
2419
2419
|
try {
|
|
@@ -2429,7 +2429,7 @@ function ar() {
|
|
|
2429
2429
|
return {
|
|
2430
2430
|
isLoading: r,
|
|
2431
2431
|
error: s,
|
|
2432
|
-
createApplicant:
|
|
2432
|
+
createApplicant: m,
|
|
2433
2433
|
createCompanyApplicant: w,
|
|
2434
2434
|
getApplicantData: N,
|
|
2435
2435
|
stopProgress: y
|
|
@@ -2450,7 +2450,7 @@ const q = ({
|
|
|
2450
2450
|
outline: "border-2 border-primary-500 text-primary-500 hover:bg-primary-50 focus:ring-primary-500",
|
|
2451
2451
|
danger: "bg-danger-500 text-white hover:bg-danger-600 focus:ring-danger-500",
|
|
2452
2452
|
ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-400"
|
|
2453
|
-
},
|
|
2453
|
+
}, m = {
|
|
2454
2454
|
sm: "px-3 py-1.5 text-sm",
|
|
2455
2455
|
md: "px-4 py-2 text-base",
|
|
2456
2456
|
lg: "px-6 py-3 text-lg"
|
|
@@ -2458,7 +2458,7 @@ const q = ({
|
|
|
2458
2458
|
return /* @__PURE__ */ i(
|
|
2459
2459
|
"button",
|
|
2460
2460
|
{
|
|
2461
|
-
className:
|
|
2461
|
+
className: ie(c, d[t], m[r], l),
|
|
2462
2462
|
disabled: s || n,
|
|
2463
2463
|
...o,
|
|
2464
2464
|
children: [
|
|
@@ -2496,7 +2496,7 @@ const q = ({
|
|
|
2496
2496
|
]
|
|
2497
2497
|
}
|
|
2498
2498
|
);
|
|
2499
|
-
},
|
|
2499
|
+
}, ue = Te(
|
|
2500
2500
|
({ label: e, error: t, helperText: r, leftIcon: n, rightIcon: s, className: l, ...o }, c) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2501
2501
|
e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2502
2502
|
e,
|
|
@@ -2508,7 +2508,7 @@ const q = ({
|
|
|
2508
2508
|
"input",
|
|
2509
2509
|
{
|
|
2510
2510
|
ref: c,
|
|
2511
|
-
className:
|
|
2511
|
+
className: ie(
|
|
2512
2512
|
"block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
|
|
2513
2513
|
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
|
|
2514
2514
|
"disabled:bg-gray-100 disabled:cursor-not-allowed",
|
|
@@ -2527,11 +2527,11 @@ const q = ({
|
|
|
2527
2527
|
!t && r && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-gray-500", children: r })
|
|
2528
2528
|
] })
|
|
2529
2529
|
);
|
|
2530
|
-
|
|
2531
|
-
const
|
|
2530
|
+
ue.displayName = "Input";
|
|
2531
|
+
const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
2532
2532
|
"div",
|
|
2533
2533
|
{
|
|
2534
|
-
className:
|
|
2534
|
+
className: ie(
|
|
2535
2535
|
"metakyc-card rounded-xl shadow-sm border",
|
|
2536
2536
|
t
|
|
2537
2537
|
),
|
|
@@ -2542,30 +2542,30 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2542
2542
|
...r,
|
|
2543
2543
|
children: e
|
|
2544
2544
|
}
|
|
2545
|
-
),
|
|
2545
|
+
), oe = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
2546
2546
|
"div",
|
|
2547
2547
|
{
|
|
2548
|
-
className:
|
|
2548
|
+
className: ie("px-6 py-4 border-b", t),
|
|
2549
2549
|
style: {
|
|
2550
2550
|
borderColor: "var(--metakyc-border, #e5e7eb)"
|
|
2551
2551
|
},
|
|
2552
2552
|
...r,
|
|
2553
2553
|
children: e
|
|
2554
2554
|
}
|
|
2555
|
-
),
|
|
2555
|
+
), B = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a("div", { className: ie("px-6 py-4", t), ...r, children: e }), me = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
2556
2556
|
"div",
|
|
2557
2557
|
{
|
|
2558
|
-
className:
|
|
2558
|
+
className: ie("px-6 py-4 border-t", t),
|
|
2559
2559
|
style: {
|
|
2560
2560
|
borderColor: "var(--metakyc-border, #e5e7eb)"
|
|
2561
2561
|
},
|
|
2562
2562
|
...r,
|
|
2563
2563
|
children: e
|
|
2564
2564
|
}
|
|
2565
|
-
),
|
|
2565
|
+
), Ne = ({ children: e, variant: t = "default", className: r, ...n }) => /* @__PURE__ */ a(
|
|
2566
2566
|
"span",
|
|
2567
2567
|
{
|
|
2568
|
-
className:
|
|
2568
|
+
className: ie(
|
|
2569
2569
|
"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",
|
|
2570
2570
|
{
|
|
2571
2571
|
default: "bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",
|
|
@@ -2579,16 +2579,16 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2579
2579
|
...n,
|
|
2580
2580
|
children: e
|
|
2581
2581
|
}
|
|
2582
|
-
),
|
|
2582
|
+
), be = ({ size: e = "md", className: t, ...r }) => {
|
|
2583
2583
|
const n = {
|
|
2584
2584
|
sm: "h-4 w-4",
|
|
2585
2585
|
md: "h-8 w-8",
|
|
2586
2586
|
lg: "h-12 w-12"
|
|
2587
2587
|
};
|
|
2588
|
-
return /* @__PURE__ */ a("div", { className:
|
|
2588
|
+
return /* @__PURE__ */ a("div", { className: ie("flex items-center justify-center", t), ...r, children: /* @__PURE__ */ i(
|
|
2589
2589
|
"svg",
|
|
2590
2590
|
{
|
|
2591
|
-
className:
|
|
2591
|
+
className: ie("animate-spin text-primary-500", n[e]),
|
|
2592
2592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2593
2593
|
fill: "none",
|
|
2594
2594
|
viewBox: "0 0 24 24",
|
|
@@ -2615,7 +2615,7 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2615
2615
|
]
|
|
2616
2616
|
}
|
|
2617
2617
|
) });
|
|
2618
|
-
},
|
|
2618
|
+
}, Ae = Te(
|
|
2619
2619
|
({ label: e, error: t, helperText: r, options: n, placeholder: s, className: l, ...o }, c) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2620
2620
|
e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2621
2621
|
e,
|
|
@@ -2625,7 +2625,7 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2625
2625
|
"select",
|
|
2626
2626
|
{
|
|
2627
2627
|
ref: c,
|
|
2628
|
-
className:
|
|
2628
|
+
className: ie(
|
|
2629
2629
|
"block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
|
|
2630
2630
|
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
|
|
2631
2631
|
"disabled:bg-gray-100 disabled:cursor-not-allowed",
|
|
@@ -2636,14 +2636,14 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2636
2636
|
...o,
|
|
2637
2637
|
children: [
|
|
2638
2638
|
s && /* @__PURE__ */ a("option", { value: "", disabled: !0, children: s }, "__placeholder__"),
|
|
2639
|
-
n.map((d,
|
|
2639
|
+
n.map((d, m) => /* @__PURE__ */ a(
|
|
2640
2640
|
"option",
|
|
2641
2641
|
{
|
|
2642
2642
|
value: d.value,
|
|
2643
2643
|
disabled: d.disabled,
|
|
2644
2644
|
children: d.label
|
|
2645
2645
|
},
|
|
2646
|
-
d.value || `option-${
|
|
2646
|
+
d.value || `option-${m}`
|
|
2647
2647
|
))
|
|
2648
2648
|
]
|
|
2649
2649
|
}
|
|
@@ -2652,8 +2652,8 @@ const O = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
|
|
|
2652
2652
|
!t && r && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-gray-500", children: r })
|
|
2653
2653
|
] })
|
|
2654
2654
|
);
|
|
2655
|
-
|
|
2656
|
-
const
|
|
2655
|
+
Ae.displayName = "Select";
|
|
2656
|
+
const or = ({
|
|
2657
2657
|
label: e,
|
|
2658
2658
|
value: t,
|
|
2659
2659
|
onChange: r,
|
|
@@ -2662,22 +2662,22 @@ const nr = ({
|
|
|
2662
2662
|
disabled: l = !1,
|
|
2663
2663
|
required: o = !1
|
|
2664
2664
|
}) => {
|
|
2665
|
-
const [c, d] =
|
|
2665
|
+
const [c, d] = x(!1), [m, w] = x(""), N = te(null);
|
|
2666
2666
|
ee(() => {
|
|
2667
|
-
const
|
|
2668
|
-
N.current && !N.current.contains(
|
|
2667
|
+
const b = (p) => {
|
|
2668
|
+
N.current && !N.current.contains(p.target) && (d(!1), w(""));
|
|
2669
2669
|
};
|
|
2670
|
-
return document.addEventListener("mousedown",
|
|
2670
|
+
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
2671
2671
|
}, []);
|
|
2672
2672
|
const y = n.filter(
|
|
2673
|
-
(
|
|
2674
|
-
), h = (
|
|
2675
|
-
l || (t.includes(
|
|
2676
|
-
}, g = (
|
|
2677
|
-
|
|
2678
|
-
}, k = (
|
|
2679
|
-
var
|
|
2680
|
-
return ((
|
|
2673
|
+
(b) => b.label.toLowerCase().includes(m.toLowerCase())
|
|
2674
|
+
), h = (b) => {
|
|
2675
|
+
l || (t.includes(b) ? r(t.filter((p) => p !== b)) : r([...t, b]));
|
|
2676
|
+
}, g = (b, p) => {
|
|
2677
|
+
p.stopPropagation(), l || r(t.filter((F) => F !== b));
|
|
2678
|
+
}, k = (b) => {
|
|
2679
|
+
var p;
|
|
2680
|
+
return ((p = n.find((F) => F.value === b)) == null ? void 0 : p.label) || b;
|
|
2681
2681
|
};
|
|
2682
2682
|
return /* @__PURE__ */ i("div", { className: "w-full metakyc-multiselect", ref: N, children: [
|
|
2683
2683
|
e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
@@ -2689,7 +2689,7 @@ const nr = ({
|
|
|
2689
2689
|
"div",
|
|
2690
2690
|
{
|
|
2691
2691
|
onClick: () => !l && d(!c),
|
|
2692
|
-
className:
|
|
2692
|
+
className: ie(
|
|
2693
2693
|
"metakyc-multiselect-trigger",
|
|
2694
2694
|
"min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors",
|
|
2695
2695
|
"bg-white dark:bg-gray-800",
|
|
@@ -2698,17 +2698,17 @@ const nr = ({
|
|
|
2698
2698
|
l ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
2699
2699
|
),
|
|
2700
2700
|
children: [
|
|
2701
|
-
t.length === 0 ? /* @__PURE__ */ a("span", { className: "metakyc-multiselect-placeholder text-gray-400 dark:text-gray-500 leading-6", children: s }) : /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
2701
|
+
t.length === 0 ? /* @__PURE__ */ a("span", { className: "metakyc-multiselect-placeholder text-gray-400 dark:text-gray-500 leading-6", children: s }) : /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((b) => /* @__PURE__ */ i(
|
|
2702
2702
|
"span",
|
|
2703
2703
|
{
|
|
2704
2704
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded bg-blue-100 dark:bg-blue-900/40 text-blue-800 dark:text-blue-300 text-xs font-medium",
|
|
2705
2705
|
children: [
|
|
2706
|
-
k(
|
|
2706
|
+
k(b),
|
|
2707
2707
|
!l && /* @__PURE__ */ a(
|
|
2708
2708
|
"button",
|
|
2709
2709
|
{
|
|
2710
2710
|
type: "button",
|
|
2711
|
-
onClick: (
|
|
2711
|
+
onClick: (p) => g(b, p),
|
|
2712
2712
|
className: "metakyc-multiselect-chip-remove",
|
|
2713
2713
|
style: {
|
|
2714
2714
|
background: "transparent",
|
|
@@ -2734,7 +2734,7 @@ const nr = ({
|
|
|
2734
2734
|
)
|
|
2735
2735
|
]
|
|
2736
2736
|
},
|
|
2737
|
-
|
|
2737
|
+
b
|
|
2738
2738
|
)) }),
|
|
2739
2739
|
/* @__PURE__ */ a("span", { className: "metakyc-multiselect-arrow absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-xs", children: c ? "▲" : "▼" })
|
|
2740
2740
|
]
|
|
@@ -2750,39 +2750,39 @@ const nr = ({
|
|
|
2750
2750
|
"input",
|
|
2751
2751
|
{
|
|
2752
2752
|
type: "text",
|
|
2753
|
-
value:
|
|
2754
|
-
onChange: (
|
|
2753
|
+
value: m,
|
|
2754
|
+
onChange: (b) => w(b.target.value),
|
|
2755
2755
|
placeholder: "Search...",
|
|
2756
2756
|
autoFocus: !0,
|
|
2757
|
-
onClick: (
|
|
2757
|
+
onClick: (b) => b.stopPropagation(),
|
|
2758
2758
|
className: "metakyc-multiselect-search w-full px-2 py-1.5 text-sm rounded focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
2759
2759
|
style: { border: "1px solid #d1d5db" }
|
|
2760
2760
|
}
|
|
2761
2761
|
) }),
|
|
2762
|
-
/* @__PURE__ */ a("ul", { className: "max-h-48 overflow-y-auto py-1", children: y.length === 0 ? /* @__PURE__ */ a("li", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No results" }) : y.map((
|
|
2762
|
+
/* @__PURE__ */ a("ul", { className: "max-h-48 overflow-y-auto py-1", children: y.length === 0 ? /* @__PURE__ */ a("li", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No results" }) : y.map((b) => /* @__PURE__ */ i(
|
|
2763
2763
|
"li",
|
|
2764
2764
|
{
|
|
2765
|
-
onClick: () => h(
|
|
2766
|
-
className:
|
|
2765
|
+
onClick: () => h(b.value),
|
|
2766
|
+
className: ie(
|
|
2767
2767
|
"metakyc-multiselect-option",
|
|
2768
2768
|
"flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
|
|
2769
2769
|
"hover:bg-gray-50 dark:hover:bg-gray-700",
|
|
2770
|
-
t.includes(
|
|
2770
|
+
t.includes(b.value) && "metakyc-multiselect-option-selected bg-blue-50 dark:bg-blue-900/20"
|
|
2771
2771
|
),
|
|
2772
2772
|
children: [
|
|
2773
2773
|
/* @__PURE__ */ a(
|
|
2774
2774
|
"input",
|
|
2775
2775
|
{
|
|
2776
2776
|
type: "checkbox",
|
|
2777
|
-
checked: t.includes(
|
|
2777
|
+
checked: t.includes(b.value),
|
|
2778
2778
|
readOnly: !0,
|
|
2779
2779
|
className: "rounded border-gray-300 text-blue-600 pointer-events-none"
|
|
2780
2780
|
}
|
|
2781
2781
|
),
|
|
2782
|
-
/* @__PURE__ */ a("span", { className: "text-gray-900 dark:text-gray-100", children:
|
|
2782
|
+
/* @__PURE__ */ a("span", { className: "text-gray-900 dark:text-gray-100", children: b.label })
|
|
2783
2783
|
]
|
|
2784
2784
|
},
|
|
2785
|
-
|
|
2785
|
+
b.value
|
|
2786
2786
|
)) }),
|
|
2787
2787
|
t.length > 0 && /* @__PURE__ */ a("div", { className: "metakyc-multiselect-clear p-2 border-t border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ i(
|
|
2788
2788
|
"button",
|
|
@@ -2804,7 +2804,7 @@ const nr = ({
|
|
|
2804
2804
|
)
|
|
2805
2805
|
] })
|
|
2806
2806
|
] });
|
|
2807
|
-
},
|
|
2807
|
+
}, cr = ({
|
|
2808
2808
|
label: e,
|
|
2809
2809
|
error: t,
|
|
2810
2810
|
accept: r,
|
|
@@ -2814,34 +2814,34 @@ const nr = ({
|
|
|
2814
2814
|
value: o = [],
|
|
2815
2815
|
className: c
|
|
2816
2816
|
}) => {
|
|
2817
|
-
const [d,
|
|
2818
|
-
if (!
|
|
2819
|
-
const
|
|
2820
|
-
if (s &&
|
|
2821
|
-
const v =
|
|
2817
|
+
const [d, m] = x(!1), w = te(null), N = (p) => {
|
|
2818
|
+
if (!p) return;
|
|
2819
|
+
const F = Array.from(p);
|
|
2820
|
+
if (s && F.filter((v) => v.size > s).length > 0) {
|
|
2821
|
+
const v = Ue(s);
|
|
2822
2822
|
alert(`Some files exceed the maximum size of ${v}`);
|
|
2823
2823
|
return;
|
|
2824
2824
|
}
|
|
2825
|
-
l == null || l(n ? [...o, ...
|
|
2826
|
-
}, y = (
|
|
2827
|
-
|
|
2825
|
+
l == null || l(n ? [...o, ...F] : [F[0]]);
|
|
2826
|
+
}, y = (p) => {
|
|
2827
|
+
p.preventDefault(), m(!0);
|
|
2828
2828
|
}, h = () => {
|
|
2829
|
-
|
|
2830
|
-
}, g = (
|
|
2831
|
-
|
|
2829
|
+
m(!1);
|
|
2830
|
+
}, g = (p) => {
|
|
2831
|
+
p.preventDefault(), m(!1), N(p.dataTransfer.files);
|
|
2832
2832
|
}, k = () => {
|
|
2833
|
-
var
|
|
2834
|
-
(
|
|
2835
|
-
},
|
|
2836
|
-
const
|
|
2837
|
-
l == null || l(
|
|
2833
|
+
var p;
|
|
2834
|
+
(p = w.current) == null || p.click();
|
|
2835
|
+
}, b = (p) => {
|
|
2836
|
+
const F = o.filter((C, v) => v !== p);
|
|
2837
|
+
l == null || l(F);
|
|
2838
2838
|
};
|
|
2839
|
-
return /* @__PURE__ */ i("div", { className:
|
|
2839
|
+
return /* @__PURE__ */ i("div", { className: ie("w-full", c), children: [
|
|
2840
2840
|
e && /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: e }),
|
|
2841
2841
|
/* @__PURE__ */ i(
|
|
2842
2842
|
"div",
|
|
2843
2843
|
{
|
|
2844
|
-
className:
|
|
2844
|
+
className: ie(
|
|
2845
2845
|
"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors",
|
|
2846
2846
|
d ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-300 dark:border-gray-600 hover:border-primary-500",
|
|
2847
2847
|
t && "border-danger-500"
|
|
@@ -2859,7 +2859,7 @@ const nr = ({
|
|
|
2859
2859
|
className: "hidden",
|
|
2860
2860
|
accept: r,
|
|
2861
2861
|
multiple: n,
|
|
2862
|
-
onChange: (
|
|
2862
|
+
onChange: (p) => N(p.target.files)
|
|
2863
2863
|
}
|
|
2864
2864
|
),
|
|
2865
2865
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
@@ -2887,13 +2887,13 @@ const nr = ({
|
|
|
2887
2887
|
] }),
|
|
2888
2888
|
s && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500", children: [
|
|
2889
2889
|
"Maximum file size: ",
|
|
2890
|
-
|
|
2890
|
+
Ue(s)
|
|
2891
2891
|
] })
|
|
2892
2892
|
] })
|
|
2893
2893
|
]
|
|
2894
2894
|
}
|
|
2895
2895
|
),
|
|
2896
|
-
o.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: o.map((
|
|
2896
|
+
o.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: o.map((p, F) => /* @__PURE__ */ i(
|
|
2897
2897
|
"div",
|
|
2898
2898
|
{
|
|
2899
2899
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -2915,10 +2915,10 @@ const nr = ({
|
|
|
2915
2915
|
)
|
|
2916
2916
|
}
|
|
2917
2917
|
),
|
|
2918
|
-
/* @__PURE__ */ a("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children:
|
|
2918
|
+
/* @__PURE__ */ a("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: p.name }),
|
|
2919
2919
|
/* @__PURE__ */ i("span", { className: "text-xs text-gray-500", children: [
|
|
2920
2920
|
"(",
|
|
2921
|
-
|
|
2921
|
+
Ue(p.size),
|
|
2922
2922
|
")"
|
|
2923
2923
|
] })
|
|
2924
2924
|
] }),
|
|
@@ -2926,8 +2926,8 @@ const nr = ({
|
|
|
2926
2926
|
"button",
|
|
2927
2927
|
{
|
|
2928
2928
|
type: "button",
|
|
2929
|
-
onClick: (
|
|
2930
|
-
|
|
2929
|
+
onClick: (C) => {
|
|
2930
|
+
C.stopPropagation(), b(F);
|
|
2931
2931
|
},
|
|
2932
2932
|
className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
|
|
2933
2933
|
children: /* @__PURE__ */ a("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ a(
|
|
@@ -2942,11 +2942,11 @@ const nr = ({
|
|
|
2942
2942
|
)
|
|
2943
2943
|
]
|
|
2944
2944
|
},
|
|
2945
|
-
|
|
2945
|
+
F
|
|
2946
2946
|
)) }),
|
|
2947
2947
|
t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: t })
|
|
2948
2948
|
] });
|
|
2949
|
-
},
|
|
2949
|
+
}, dr = Te(
|
|
2950
2950
|
({ countryCode: e = "+1", onCountryCodeChange: t, className: r, ...n }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
2951
2951
|
n.label && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2952
2952
|
n.label,
|
|
@@ -2959,7 +2959,7 @@ const nr = ({
|
|
|
2959
2959
|
type: "text",
|
|
2960
2960
|
value: e,
|
|
2961
2961
|
onChange: (l) => t == null ? void 0 : t(l.target.value),
|
|
2962
|
-
className:
|
|
2962
|
+
className: ie(
|
|
2963
2963
|
"w-20 rounded-lg border px-3 py-2 text-sm",
|
|
2964
2964
|
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
|
|
2965
2965
|
"border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white"
|
|
@@ -2968,11 +2968,11 @@ const nr = ({
|
|
|
2968
2968
|
}
|
|
2969
2969
|
),
|
|
2970
2970
|
/* @__PURE__ */ a(
|
|
2971
|
-
|
|
2971
|
+
ue,
|
|
2972
2972
|
{
|
|
2973
2973
|
ref: s,
|
|
2974
2974
|
type: "tel",
|
|
2975
|
-
className:
|
|
2975
|
+
className: ie("flex-1", r),
|
|
2976
2976
|
...n,
|
|
2977
2977
|
label: ""
|
|
2978
2978
|
}
|
|
@@ -2981,28 +2981,28 @@ const nr = ({
|
|
|
2981
2981
|
n.error && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: n.error })
|
|
2982
2982
|
] })
|
|
2983
2983
|
);
|
|
2984
|
-
|
|
2984
|
+
dr.displayName = "PhoneInput";
|
|
2985
2985
|
/**
|
|
2986
2986
|
* @license lucide-react v0.574.0 - ISC
|
|
2987
2987
|
*
|
|
2988
2988
|
* This source code is licensed under the ISC license.
|
|
2989
2989
|
* See the LICENSE file in the root directory of this source tree.
|
|
2990
2990
|
*/
|
|
2991
|
-
const
|
|
2991
|
+
const Xe = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
|
|
2992
2992
|
/**
|
|
2993
2993
|
* @license lucide-react v0.574.0 - ISC
|
|
2994
2994
|
*
|
|
2995
2995
|
* This source code is licensed under the ISC license.
|
|
2996
2996
|
* See the LICENSE file in the root directory of this source tree.
|
|
2997
2997
|
*/
|
|
2998
|
-
const
|
|
2998
|
+
const ur = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2999
2999
|
/**
|
|
3000
3000
|
* @license lucide-react v0.574.0 - ISC
|
|
3001
3001
|
*
|
|
3002
3002
|
* This source code is licensed under the ISC license.
|
|
3003
3003
|
* See the LICENSE file in the root directory of this source tree.
|
|
3004
3004
|
*/
|
|
3005
|
-
const
|
|
3005
|
+
const mr = (e) => e.replace(
|
|
3006
3006
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3007
3007
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
3008
3008
|
);
|
|
@@ -3012,8 +3012,8 @@ const or = (e) => e.replace(
|
|
|
3012
3012
|
* This source code is licensed under the ISC license.
|
|
3013
3013
|
* See the LICENSE file in the root directory of this source tree.
|
|
3014
3014
|
*/
|
|
3015
|
-
const
|
|
3016
|
-
const t =
|
|
3015
|
+
const Ve = (e) => {
|
|
3016
|
+
const t = mr(e);
|
|
3017
3017
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3018
3018
|
};
|
|
3019
3019
|
/**
|
|
@@ -3022,7 +3022,7 @@ const He = (e) => {
|
|
|
3022
3022
|
* This source code is licensed under the ISC license.
|
|
3023
3023
|
* See the LICENSE file in the root directory of this source tree.
|
|
3024
3024
|
*/
|
|
3025
|
-
var
|
|
3025
|
+
var pr = {
|
|
3026
3026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3027
3027
|
width: 24,
|
|
3028
3028
|
height: 24,
|
|
@@ -3039,7 +3039,7 @@ var cr = {
|
|
|
3039
3039
|
* This source code is licensed under the ISC license.
|
|
3040
3040
|
* See the LICENSE file in the root directory of this source tree.
|
|
3041
3041
|
*/
|
|
3042
|
-
const
|
|
3042
|
+
const hr = (e) => {
|
|
3043
3043
|
for (const t in e)
|
|
3044
3044
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3045
3045
|
return !0;
|
|
@@ -3051,7 +3051,7 @@ const dr = (e) => {
|
|
|
3051
3051
|
* This source code is licensed under the ISC license.
|
|
3052
3052
|
* See the LICENSE file in the root directory of this source tree.
|
|
3053
3053
|
*/
|
|
3054
|
-
const
|
|
3054
|
+
const gr = Te(
|
|
3055
3055
|
({
|
|
3056
3056
|
color: e = "currentColor",
|
|
3057
3057
|
size: t = 24,
|
|
@@ -3061,21 +3061,21 @@ const ur = Pe(
|
|
|
3061
3061
|
children: l,
|
|
3062
3062
|
iconNode: o,
|
|
3063
3063
|
...c
|
|
3064
|
-
}, d) =>
|
|
3064
|
+
}, d) => je(
|
|
3065
3065
|
"svg",
|
|
3066
3066
|
{
|
|
3067
3067
|
ref: d,
|
|
3068
|
-
...
|
|
3068
|
+
...pr,
|
|
3069
3069
|
width: t,
|
|
3070
3070
|
height: t,
|
|
3071
3071
|
stroke: e,
|
|
3072
3072
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
3073
|
-
className:
|
|
3074
|
-
...!l && !
|
|
3073
|
+
className: Xe("lucide", s),
|
|
3074
|
+
...!l && !hr(c) && { "aria-hidden": "true" },
|
|
3075
3075
|
...c
|
|
3076
3076
|
},
|
|
3077
3077
|
[
|
|
3078
|
-
...o.map(([
|
|
3078
|
+
...o.map(([m, w]) => je(m, w)),
|
|
3079
3079
|
...Array.isArray(l) ? l : [l]
|
|
3080
3080
|
]
|
|
3081
3081
|
)
|
|
@@ -3086,20 +3086,20 @@ const ur = Pe(
|
|
|
3086
3086
|
* This source code is licensed under the ISC license.
|
|
3087
3087
|
* See the LICENSE file in the root directory of this source tree.
|
|
3088
3088
|
*/
|
|
3089
|
-
const
|
|
3090
|
-
const r =
|
|
3091
|
-
({ className: n, ...s }, l) =>
|
|
3089
|
+
const et = (e, t) => {
|
|
3090
|
+
const r = Te(
|
|
3091
|
+
({ className: n, ...s }, l) => je(gr, {
|
|
3092
3092
|
ref: l,
|
|
3093
3093
|
iconNode: t,
|
|
3094
|
-
className:
|
|
3095
|
-
`lucide-${
|
|
3094
|
+
className: Xe(
|
|
3095
|
+
`lucide-${ur(Ve(e))}`,
|
|
3096
3096
|
`lucide-${e}`,
|
|
3097
3097
|
n
|
|
3098
3098
|
),
|
|
3099
3099
|
...s
|
|
3100
3100
|
})
|
|
3101
3101
|
);
|
|
3102
|
-
return r.displayName =
|
|
3102
|
+
return r.displayName = Ve(e), r;
|
|
3103
3103
|
};
|
|
3104
3104
|
/**
|
|
3105
3105
|
* @license lucide-react v0.574.0 - ISC
|
|
@@ -3107,15 +3107,15 @@ const Ge = (e, t) => {
|
|
|
3107
3107
|
* This source code is licensed under the ISC license.
|
|
3108
3108
|
* See the LICENSE file in the root directory of this source tree.
|
|
3109
3109
|
*/
|
|
3110
|
-
const
|
|
3110
|
+
const yr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], tt = et("chevron-left", yr);
|
|
3111
3111
|
/**
|
|
3112
3112
|
* @license lucide-react v0.574.0 - ISC
|
|
3113
3113
|
*
|
|
3114
3114
|
* This source code is licensed under the ISC license.
|
|
3115
3115
|
* See the LICENSE file in the root directory of this source tree.
|
|
3116
3116
|
*/
|
|
3117
|
-
const
|
|
3118
|
-
function
|
|
3117
|
+
const fr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], rt = et("chevron-right", fr);
|
|
3118
|
+
function xr(e, t) {
|
|
3119
3119
|
const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
|
|
3120
3120
|
if (e.isRequired && r)
|
|
3121
3121
|
return e.errorMessage || "This field is required";
|
|
@@ -3144,7 +3144,7 @@ function hr(e, t) {
|
|
|
3144
3144
|
}
|
|
3145
3145
|
return null;
|
|
3146
3146
|
}
|
|
3147
|
-
function
|
|
3147
|
+
function br(e) {
|
|
3148
3148
|
const t = e.flatMap(
|
|
3149
3149
|
(n, s) => (n.questions ?? []).map((l, o) => ({ question: l, groupIndex: s, qIdx: o }))
|
|
3150
3150
|
), r = /* @__PURE__ */ new Map();
|
|
@@ -3154,41 +3154,41 @@ function gr(e) {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
return Array.from(r.entries()).sort(([n], [s]) => n - s).map(([, n]) => n);
|
|
3156
3156
|
}
|
|
3157
|
-
const
|
|
3157
|
+
const vr = ({
|
|
3158
3158
|
applicantId: e,
|
|
3159
3159
|
onComplete: t,
|
|
3160
3160
|
onBack: r
|
|
3161
3161
|
}) => {
|
|
3162
|
-
const { questionnaire: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } =
|
|
3163
|
-
|
|
3164
|
-
s && Object.keys(s).length > 0 && Object.keys(
|
|
3162
|
+
const { questionnaire: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } = rr(e), [m, w] = x({}), [N, y] = x({}), [h, g] = x(0);
|
|
3163
|
+
ye.useEffect(() => {
|
|
3164
|
+
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && w(s);
|
|
3165
3165
|
}, [s]);
|
|
3166
|
-
const k =
|
|
3167
|
-
() => n ?
|
|
3166
|
+
const k = Se(
|
|
3167
|
+
() => n ? br(n.questionGroups) : [],
|
|
3168
3168
|
[n]
|
|
3169
|
-
),
|
|
3169
|
+
), b = h === k.length - 1, p = k[h] ?? [], F = Q((M, f) => {
|
|
3170
3170
|
w((A) => ({ ...A, [M]: f })), y((A) => {
|
|
3171
|
-
const
|
|
3172
|
-
return delete
|
|
3171
|
+
const D = { ...A };
|
|
3172
|
+
return delete D[M], D;
|
|
3173
3173
|
});
|
|
3174
|
-
}, []),
|
|
3174
|
+
}, []), C = Q(() => {
|
|
3175
3175
|
const M = {};
|
|
3176
|
-
for (const { question: f } of
|
|
3177
|
-
const A =
|
|
3176
|
+
for (const { question: f } of p) {
|
|
3177
|
+
const A = xr(f, m[f.id] ?? []);
|
|
3178
3178
|
A && (M[f.id] = A);
|
|
3179
3179
|
}
|
|
3180
3180
|
return y((f) => ({ ...f, ...M })), Object.keys(M).length === 0;
|
|
3181
|
-
}, [
|
|
3182
|
-
|
|
3181
|
+
}, [p, m]), v = () => {
|
|
3182
|
+
C() && g((M) => M + 1);
|
|
3183
3183
|
}, K = () => {
|
|
3184
3184
|
h > 0 ? g((M) => M - 1) : r == null || r();
|
|
3185
|
-
},
|
|
3186
|
-
if (!(!
|
|
3185
|
+
}, Y = async () => {
|
|
3186
|
+
if (!(!C() || !n))
|
|
3187
3187
|
try {
|
|
3188
3188
|
const M = n.questionGroups.flatMap(
|
|
3189
|
-
(A) => (A.questions ?? []).map((
|
|
3190
|
-
questionId:
|
|
3191
|
-
values:
|
|
3189
|
+
(A) => (A.questions ?? []).map((D) => ({
|
|
3190
|
+
questionId: D.id,
|
|
3191
|
+
values: m[D.id] ?? []
|
|
3192
3192
|
}))
|
|
3193
3193
|
), f = {
|
|
3194
3194
|
applicantId: e,
|
|
@@ -3200,11 +3200,11 @@ const yr = ({
|
|
|
3200
3200
|
console.error("Questionnaire submit error:", M);
|
|
3201
3201
|
}
|
|
3202
3202
|
};
|
|
3203
|
-
return l ? /* @__PURE__ */ a(
|
|
3203
|
+
return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
|
|
3204
3204
|
"Error loading questionnaire: ",
|
|
3205
3205
|
c.message
|
|
3206
|
-
] }) }) }) : n ? /* @__PURE__ */ i(
|
|
3207
|
-
/* @__PURE__ */ i(
|
|
3206
|
+
] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
|
|
3207
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
3208
3208
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: n.displayName }),
|
|
3209
3209
|
n.subtitle && /* @__PURE__ */ a("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.subtitle }),
|
|
3210
3210
|
k.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
|
|
@@ -3228,17 +3228,17 @@ const yr = ({
|
|
|
3228
3228
|
)) })
|
|
3229
3229
|
] })
|
|
3230
3230
|
] }),
|
|
3231
|
-
/* @__PURE__ */ a(
|
|
3232
|
-
|
|
3231
|
+
/* @__PURE__ */ a(B, { className: "space-y-6", children: p.map(({ question: M }) => /* @__PURE__ */ a(
|
|
3232
|
+
wr,
|
|
3233
3233
|
{
|
|
3234
3234
|
question: M,
|
|
3235
|
-
value:
|
|
3235
|
+
value: m[M.id] ?? [],
|
|
3236
3236
|
error: N[M.id],
|
|
3237
|
-
onChange: (f) =>
|
|
3237
|
+
onChange: (f) => F(M.id, f)
|
|
3238
3238
|
},
|
|
3239
3239
|
M.id
|
|
3240
3240
|
)) }),
|
|
3241
|
-
/* @__PURE__ */ i(
|
|
3241
|
+
/* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
|
|
3242
3242
|
/* @__PURE__ */ i(
|
|
3243
3243
|
q,
|
|
3244
3244
|
{
|
|
@@ -3247,17 +3247,17 @@ const yr = ({
|
|
|
3247
3247
|
onClick: K,
|
|
3248
3248
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3249
3249
|
children: [
|
|
3250
|
-
/* @__PURE__ */ a(
|
|
3250
|
+
/* @__PURE__ */ a(tt, { size: 14 }),
|
|
3251
3251
|
h > 0 ? "Previous" : "Back"
|
|
3252
3252
|
]
|
|
3253
3253
|
}
|
|
3254
3254
|
),
|
|
3255
|
-
|
|
3255
|
+
b ? /* @__PURE__ */ a(
|
|
3256
3256
|
q,
|
|
3257
3257
|
{
|
|
3258
3258
|
type: "button",
|
|
3259
3259
|
isLoading: o,
|
|
3260
|
-
onClick:
|
|
3260
|
+
onClick: Y,
|
|
3261
3261
|
children: "Continue"
|
|
3262
3262
|
}
|
|
3263
3263
|
) : /* @__PURE__ */ i(
|
|
@@ -3268,14 +3268,14 @@ const yr = ({
|
|
|
3268
3268
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3269
3269
|
children: [
|
|
3270
3270
|
"Next",
|
|
3271
|
-
/* @__PURE__ */ a(
|
|
3271
|
+
/* @__PURE__ */ a(rt, { size: 14 })
|
|
3272
3272
|
]
|
|
3273
3273
|
}
|
|
3274
3274
|
)
|
|
3275
3275
|
] }),
|
|
3276
3276
|
c && /* @__PURE__ */ a("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: c.message }) })
|
|
3277
3277
|
] }) : null;
|
|
3278
|
-
},
|
|
3278
|
+
}, wr = ({ question: e, value: t, error: r, onChange: n }) => {
|
|
3279
3279
|
var o;
|
|
3280
3280
|
const l = (((o = e.defaultAnswers) == null ? void 0 : o.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
|
|
3281
3281
|
return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
@@ -3286,7 +3286,7 @@ const yr = ({
|
|
|
3286
3286
|
e.subtitle && /* @__PURE__ */ a("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.subtitle }),
|
|
3287
3287
|
e.description && /* @__PURE__ */ a("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.description }),
|
|
3288
3288
|
l === "text" && /* @__PURE__ */ a(
|
|
3289
|
-
|
|
3289
|
+
ue,
|
|
3290
3290
|
{
|
|
3291
3291
|
value: t[0] ?? "",
|
|
3292
3292
|
onChange: (c) => n([c.target.value]),
|
|
@@ -3296,7 +3296,7 @@ const yr = ({
|
|
|
3296
3296
|
}
|
|
3297
3297
|
),
|
|
3298
3298
|
l === "single-select" && /* @__PURE__ */ a(
|
|
3299
|
-
|
|
3299
|
+
Ae,
|
|
3300
3300
|
{
|
|
3301
3301
|
value: t[0] ?? "",
|
|
3302
3302
|
onChange: (c) => n([c.target.value]),
|
|
@@ -3355,7 +3355,7 @@ const yr = ({
|
|
|
3355
3355
|
type: "checkbox",
|
|
3356
3356
|
checked: t.includes(c),
|
|
3357
3357
|
onChange: (d) => {
|
|
3358
|
-
d.target.checked ? n([...t, c]) : n(t.filter((
|
|
3358
|
+
d.target.checked ? n([...t, c]) : n(t.filter((m) => m !== c));
|
|
3359
3359
|
},
|
|
3360
3360
|
className: "metakyc-option-input",
|
|
3361
3361
|
style: {
|
|
@@ -3382,24 +3382,24 @@ const yr = ({
|
|
|
3382
3382
|
] }),
|
|
3383
3383
|
r && l === "text" && null
|
|
3384
3384
|
] });
|
|
3385
|
-
},
|
|
3385
|
+
}, kr = ({
|
|
3386
3386
|
applicantId: e,
|
|
3387
3387
|
onComplete: t,
|
|
3388
3388
|
onBack: r
|
|
3389
3389
|
}) => {
|
|
3390
|
-
const { uploadDocument: n, isLoading: s, isSubmitting: l, error: o, submit: c } =
|
|
3390
|
+
const { uploadDocument: n, isLoading: s, isSubmitting: l, error: o, submit: c } = ar(e), [d, m] = x({}), w = async (N) => {
|
|
3391
3391
|
if (N.preventDefault(), !n) return;
|
|
3392
3392
|
const y = await Promise.all(
|
|
3393
3393
|
n.uploadDocumentFiles.map(async (g) => {
|
|
3394
|
-
const k = d[g.id] || [],
|
|
3395
|
-
k.map(async (
|
|
3396
|
-
fileName:
|
|
3397
|
-
fileData: await
|
|
3394
|
+
const k = d[g.id] || [], b = await Promise.all(
|
|
3395
|
+
k.map(async (p) => ({
|
|
3396
|
+
fileName: p.name,
|
|
3397
|
+
fileData: await Vt(p)
|
|
3398
3398
|
}))
|
|
3399
3399
|
);
|
|
3400
3400
|
return {
|
|
3401
3401
|
uploadDocumentFileId: g.id,
|
|
3402
|
-
valueList:
|
|
3402
|
+
valueList: b
|
|
3403
3403
|
};
|
|
3404
3404
|
})
|
|
3405
3405
|
), h = {
|
|
@@ -3409,16 +3409,16 @@ const yr = ({
|
|
|
3409
3409
|
};
|
|
3410
3410
|
await c(h), t == null || t();
|
|
3411
3411
|
};
|
|
3412
|
-
return s ? /* @__PURE__ */ a(
|
|
3412
|
+
return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
|
|
3413
3413
|
"Error loading document requirements: ",
|
|
3414
3414
|
o.message
|
|
3415
|
-
] }) }) }) : n ? /* @__PURE__ */ a("form", { onSubmit: w, children: /* @__PURE__ */ i(
|
|
3416
|
-
/* @__PURE__ */ i(
|
|
3415
|
+
] }) }) }) : n ? /* @__PURE__ */ a("form", { onSubmit: w, children: /* @__PURE__ */ i($, { children: [
|
|
3416
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
3417
3417
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: n.displayName }),
|
|
3418
3418
|
n.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.subtitle })
|
|
3419
3419
|
] }),
|
|
3420
|
-
/* @__PURE__ */ a(
|
|
3421
|
-
|
|
3420
|
+
/* @__PURE__ */ a(B, { className: "space-y-6", children: n.uploadDocumentFiles.map((N) => /* @__PURE__ */ a(
|
|
3421
|
+
cr,
|
|
3422
3422
|
{
|
|
3423
3423
|
label: N.displayName,
|
|
3424
3424
|
accept: N.allowedTypes,
|
|
@@ -3426,30 +3426,30 @@ const yr = ({
|
|
|
3426
3426
|
maxSize: N.maxEachFileSizeByte,
|
|
3427
3427
|
value: d[N.id] || [],
|
|
3428
3428
|
onChange: (y) => {
|
|
3429
|
-
|
|
3429
|
+
m((h) => ({ ...h, [N.id]: y }));
|
|
3430
3430
|
}
|
|
3431
3431
|
},
|
|
3432
3432
|
N.id
|
|
3433
3433
|
)) }),
|
|
3434
|
-
/* @__PURE__ */ i(
|
|
3434
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
3435
3435
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3436
3436
|
/* @__PURE__ */ a(q, { type: "submit", isLoading: l, children: "Continue" })
|
|
3437
3437
|
] })
|
|
3438
3438
|
] }) }) : null;
|
|
3439
|
-
},
|
|
3440
|
-
const { overview: n, isLoading: s, isSubmitting: l, error: o, passOverview: c } =
|
|
3439
|
+
}, Nr = ({ applicantId: e, onComplete: t, onBack: r }) => {
|
|
3440
|
+
const { overview: n, isLoading: s, isSubmitting: l, error: o, passOverview: c } = nr(e), d = async () => {
|
|
3441
3441
|
await c(), t == null || t();
|
|
3442
3442
|
};
|
|
3443
|
-
return s ? /* @__PURE__ */ a(
|
|
3443
|
+
return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
|
|
3444
3444
|
"Error loading overview: ",
|
|
3445
3445
|
o.message
|
|
3446
|
-
] }) }) }) : n ? /* @__PURE__ */ i(
|
|
3447
|
-
/* @__PURE__ */ i(
|
|
3446
|
+
] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
|
|
3447
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
3448
3448
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: n.title || "Overview" }),
|
|
3449
3449
|
n.description && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.description })
|
|
3450
3450
|
] }),
|
|
3451
|
-
/* @__PURE__ */ a(
|
|
3452
|
-
/* @__PURE__ */ a("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children:
|
|
3451
|
+
/* @__PURE__ */ a(B, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((m, w) => m.order - w.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
|
|
3452
|
+
/* @__PURE__ */ a("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: m.order + 1 }) }),
|
|
3453
3453
|
/* @__PURE__ */ i(
|
|
3454
3454
|
"div",
|
|
3455
3455
|
{
|
|
@@ -3461,19 +3461,19 @@ const yr = ({
|
|
|
3461
3461
|
background: "transparent"
|
|
3462
3462
|
},
|
|
3463
3463
|
children: [
|
|
3464
|
-
/* @__PURE__ */ a("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children:
|
|
3465
|
-
|
|
3464
|
+
/* @__PURE__ */ a("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children: m.title }),
|
|
3465
|
+
m.description && /* @__PURE__ */ a("p", { className: "metakyc-step-description text-sm text-gray-600 dark:text-gray-400", children: m.description })
|
|
3466
3466
|
]
|
|
3467
3467
|
}
|
|
3468
3468
|
)
|
|
3469
|
-
] },
|
|
3470
|
-
/* @__PURE__ */ i(
|
|
3469
|
+
] }, m.order)) : /* @__PURE__ */ a("div", { className: "text-center py-8", children: /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Loading overview data..." }) }) }),
|
|
3470
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
3471
3471
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3472
3472
|
/* @__PURE__ */ a(q, { onClick: d, isLoading: l, children: "Continue" })
|
|
3473
3473
|
] })
|
|
3474
3474
|
] }) : null;
|
|
3475
3475
|
};
|
|
3476
|
-
function
|
|
3476
|
+
function Sr(e, t) {
|
|
3477
3477
|
const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
|
|
3478
3478
|
if (e.isRequired && r)
|
|
3479
3479
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3485,7 +3485,7 @@ function vr(e, t) {
|
|
|
3485
3485
|
return e.errorMessage || "Invalid format";
|
|
3486
3486
|
} catch {
|
|
3487
3487
|
}
|
|
3488
|
-
const s = e.valueDataType ===
|
|
3488
|
+
const s = e.valueDataType === Ce.Integer || e.valueDataType === Ce.Decimal || e.valueDataType === Ce.DigitOnly;
|
|
3489
3489
|
if (s && n.trim() !== "") {
|
|
3490
3490
|
const l = Number(n);
|
|
3491
3491
|
if (!isNaN(l)) {
|
|
@@ -3503,105 +3503,105 @@ function vr(e, t) {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
return null;
|
|
3505
3505
|
}
|
|
3506
|
-
function
|
|
3506
|
+
function Cr(e) {
|
|
3507
3507
|
const t = /* @__PURE__ */ new Map();
|
|
3508
3508
|
return e.forEach((r, n) => {
|
|
3509
3509
|
const s = r.pageNumber != null && r.pageNumber > 0 ? r.pageNumber : 1;
|
|
3510
3510
|
t.has(s) || t.set(s, []), t.get(s).push({ criterion: r, idx: n });
|
|
3511
3511
|
}), Array.from(t.entries()).sort(([r], [n]) => r - n).map(([, r]) => r);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function Ar(e) {
|
|
3514
3514
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3515
3515
|
}
|
|
3516
|
-
const
|
|
3516
|
+
const Ir = ({
|
|
3517
3517
|
applicantId: e,
|
|
3518
3518
|
onComplete: t,
|
|
3519
3519
|
onBack: r
|
|
3520
3520
|
}) => {
|
|
3521
|
-
const { criteria: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } =
|
|
3522
|
-
|
|
3523
|
-
s && Object.keys(s).length > 0 && Object.keys(
|
|
3521
|
+
const { criteria: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } = ir(e), [m, w] = x({}), [N, y] = x({}), [h, g] = x(0), [k, b] = x(!1);
|
|
3522
|
+
ye.useEffect(() => {
|
|
3523
|
+
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && w(s);
|
|
3524
3524
|
}, [s]);
|
|
3525
|
-
const
|
|
3526
|
-
() => n && n.length > 0 ?
|
|
3525
|
+
const p = Se(
|
|
3526
|
+
() => n && n.length > 0 ? Cr(n) : [],
|
|
3527
3527
|
[n]
|
|
3528
|
-
),
|
|
3529
|
-
|
|
3530
|
-
!l && n && n.length === 0 && !k && !o && (
|
|
3528
|
+
), F = h === p.length - 1, C = p[h] ?? [];
|
|
3529
|
+
ye.useEffect(() => {
|
|
3530
|
+
!l && n && n.length === 0 && !k && !o && (b(!0), d({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3531
3531
|
}, [l, n, k, o, d, e, t]);
|
|
3532
|
-
const v =
|
|
3533
|
-
w((
|
|
3534
|
-
const H = { ...
|
|
3532
|
+
const v = Q((A, D) => {
|
|
3533
|
+
w((V) => ({ ...V, [A]: D })), y((V) => {
|
|
3534
|
+
const H = { ...V };
|
|
3535
3535
|
return delete H[A], H;
|
|
3536
3536
|
});
|
|
3537
|
-
}, []), K =
|
|
3537
|
+
}, []), K = Q(() => {
|
|
3538
3538
|
const A = {};
|
|
3539
|
-
for (const { criterion:
|
|
3540
|
-
const
|
|
3541
|
-
|
|
3539
|
+
for (const { criterion: D } of C) {
|
|
3540
|
+
const V = Sr(D, m[D.id] ?? []);
|
|
3541
|
+
V && (A[D.id] = V);
|
|
3542
3542
|
}
|
|
3543
|
-
return y((
|
|
3544
|
-
}, [
|
|
3543
|
+
return y((D) => ({ ...D, ...A })), Object.keys(A).length === 0;
|
|
3544
|
+
}, [C, m]), Y = () => {
|
|
3545
3545
|
K() && g((A) => A + 1);
|
|
3546
3546
|
}, M = () => {
|
|
3547
3547
|
h > 0 ? g((A) => A - 1) : r == null || r();
|
|
3548
3548
|
}, f = async () => {
|
|
3549
3549
|
if (!(!K() || !n))
|
|
3550
3550
|
try {
|
|
3551
|
-
const A = n.map((
|
|
3552
|
-
const H = (
|
|
3553
|
-
return H.length > 0 ? { riskCriteriaId:
|
|
3554
|
-
}).filter((
|
|
3551
|
+
const A = n.map((V) => {
|
|
3552
|
+
const H = (m[V.id] ?? []).filter((P) => P && P.trim());
|
|
3553
|
+
return H.length > 0 ? { riskCriteriaId: V.id, values: H } : null;
|
|
3554
|
+
}).filter((V) => V !== null);
|
|
3555
3555
|
await d({ applicantId: e, criteriaValueInputs: A }), t == null || t();
|
|
3556
3556
|
} catch (A) {
|
|
3557
3557
|
console.error("Risk scoring submit error:", A);
|
|
3558
3558
|
}
|
|
3559
3559
|
};
|
|
3560
|
-
return l ? /* @__PURE__ */ a(
|
|
3561
|
-
/* @__PURE__ */ a(
|
|
3560
|
+
return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
3561
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
3562
3562
|
/* @__PURE__ */ a("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
|
|
3563
|
-
] }) }) : !l && n && n.length === 0 ? /* @__PURE__ */ a(
|
|
3564
|
-
/* @__PURE__ */ a(
|
|
3563
|
+
] }) }) : !l && n && n.length === 0 ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
3564
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
3565
3565
|
/* @__PURE__ */ a("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
|
|
3566
|
-
] }) }) : c ? /* @__PURE__ */ a(
|
|
3566
|
+
] }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
|
|
3567
3567
|
"Error loading criteria: ",
|
|
3568
3568
|
c.message
|
|
3569
|
-
] }) }) }) : n ? /* @__PURE__ */ i(
|
|
3570
|
-
/* @__PURE__ */ i(
|
|
3569
|
+
] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
|
|
3570
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
3571
3571
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
|
|
3572
3572
|
/* @__PURE__ */ a("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
|
|
3573
|
-
|
|
3573
|
+
p.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
|
|
3574
3574
|
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
3575
3575
|
"Page ",
|
|
3576
3576
|
h + 1,
|
|
3577
3577
|
" of ",
|
|
3578
|
-
|
|
3578
|
+
p.length
|
|
3579
3579
|
] }),
|
|
3580
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children:
|
|
3580
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: p.map((A, D) => /* @__PURE__ */ a(
|
|
3581
3581
|
"div",
|
|
3582
3582
|
{
|
|
3583
3583
|
className: "rounded-full transition-all duration-200",
|
|
3584
3584
|
style: {
|
|
3585
3585
|
height: "6px",
|
|
3586
|
-
width:
|
|
3587
|
-
backgroundColor:
|
|
3586
|
+
width: D === h ? "20px" : "6px",
|
|
3587
|
+
backgroundColor: D <= h ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3588
3588
|
}
|
|
3589
3589
|
},
|
|
3590
|
-
|
|
3590
|
+
D
|
|
3591
3591
|
)) })
|
|
3592
3592
|
] })
|
|
3593
3593
|
] }),
|
|
3594
|
-
/* @__PURE__ */ a(
|
|
3595
|
-
|
|
3594
|
+
/* @__PURE__ */ a(B, { className: "space-y-6", children: C.map(({ criterion: A }) => /* @__PURE__ */ a(
|
|
3595
|
+
Er,
|
|
3596
3596
|
{
|
|
3597
3597
|
criterion: A,
|
|
3598
|
-
value:
|
|
3598
|
+
value: m[A.id] ?? [],
|
|
3599
3599
|
error: N[A.id],
|
|
3600
|
-
onChange: (
|
|
3600
|
+
onChange: (D) => v(A.id, D)
|
|
3601
3601
|
},
|
|
3602
3602
|
A.id
|
|
3603
3603
|
)) }),
|
|
3604
|
-
/* @__PURE__ */ i(
|
|
3604
|
+
/* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
|
|
3605
3605
|
/* @__PURE__ */ i(
|
|
3606
3606
|
q,
|
|
3607
3607
|
{
|
|
@@ -3610,28 +3610,28 @@ const Nr = ({
|
|
|
3610
3610
|
onClick: M,
|
|
3611
3611
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3612
3612
|
children: [
|
|
3613
|
-
/* @__PURE__ */ a(
|
|
3613
|
+
/* @__PURE__ */ a(tt, { size: 14 }),
|
|
3614
3614
|
h > 0 ? "Previous" : "Back"
|
|
3615
3615
|
]
|
|
3616
3616
|
}
|
|
3617
3617
|
),
|
|
3618
|
-
|
|
3618
|
+
F ? /* @__PURE__ */ a(q, { type: "button", isLoading: o, onClick: f, children: "Continue" }) : /* @__PURE__ */ i(
|
|
3619
3619
|
q,
|
|
3620
3620
|
{
|
|
3621
3621
|
type: "button",
|
|
3622
|
-
onClick:
|
|
3622
|
+
onClick: Y,
|
|
3623
3623
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
3624
3624
|
children: [
|
|
3625
3625
|
"Next",
|
|
3626
|
-
/* @__PURE__ */ a(
|
|
3626
|
+
/* @__PURE__ */ a(rt, { size: 14 })
|
|
3627
3627
|
]
|
|
3628
3628
|
}
|
|
3629
3629
|
)
|
|
3630
3630
|
] }),
|
|
3631
3631
|
c && /* @__PURE__ */ a("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: c.message }) })
|
|
3632
3632
|
] }) : null;
|
|
3633
|
-
},
|
|
3634
|
-
const s =
|
|
3633
|
+
}, Er = ({ criterion: e, value: t, error: r, onChange: n }) => {
|
|
3634
|
+
const s = Ar(e), l = e.valueDataType === Ce.Integer || e.valueDataType === Ce.Decimal || e.valueDataType === Ce.DigitOnly;
|
|
3635
3635
|
return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
3636
3636
|
/* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
3637
3637
|
e.displayName,
|
|
@@ -3640,7 +3640,7 @@ const Nr = ({
|
|
|
3640
3640
|
e.description && /* @__PURE__ */ a("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.description }),
|
|
3641
3641
|
l && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ a("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? `Range: ${e.min} – ${e.max}` : e.min !== void 0 ? `Minimum: ${e.min}` : `Maximum: ${e.max}` }),
|
|
3642
3642
|
s === "text" && /* @__PURE__ */ a(
|
|
3643
|
-
|
|
3643
|
+
ue,
|
|
3644
3644
|
{
|
|
3645
3645
|
value: t[0] ?? "",
|
|
3646
3646
|
onChange: (o) => n([o.target.value]),
|
|
@@ -3651,7 +3651,7 @@ const Nr = ({
|
|
|
3651
3651
|
min: e.min,
|
|
3652
3652
|
max: e.max,
|
|
3653
3653
|
onKeyDown: (o) => {
|
|
3654
|
-
e.valueDataType ===
|
|
3654
|
+
e.valueDataType === Ce.DigitOnly && ["e", "E", "+", "-", "."].includes(o.key) && o.preventDefault();
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
3657
|
),
|
|
@@ -3730,7 +3730,7 @@ const Nr = ({
|
|
|
3730
3730
|
r && /* @__PURE__ */ a("p", { className: "text-sm text-danger-500", children: r })
|
|
3731
3731
|
] }),
|
|
3732
3732
|
s === "country" && /* @__PURE__ */ a(
|
|
3733
|
-
|
|
3733
|
+
Ae,
|
|
3734
3734
|
{
|
|
3735
3735
|
value: t[0] ?? "",
|
|
3736
3736
|
onChange: (o) => n([o.target.value]),
|
|
@@ -3747,18 +3747,18 @@ const Nr = ({
|
|
|
3747
3747
|
}
|
|
3748
3748
|
)
|
|
3749
3749
|
] });
|
|
3750
|
-
},
|
|
3750
|
+
}, Rr = ({
|
|
3751
3751
|
applicantId: e,
|
|
3752
3752
|
onComplete: t,
|
|
3753
3753
|
onBack: r
|
|
3754
3754
|
}) => {
|
|
3755
|
-
const { investorCategorizationService: n } =
|
|
3755
|
+
const { investorCategorizationService: n } = he(), [s, l] = x(null), [o, c] = x(!1), [d, m] = x(null);
|
|
3756
3756
|
return /* @__PURE__ */ a("form", { onSubmit: async (N) => {
|
|
3757
3757
|
if (N.preventDefault(), s === null) {
|
|
3758
|
-
|
|
3758
|
+
m("Please select an investor type");
|
|
3759
3759
|
return;
|
|
3760
3760
|
}
|
|
3761
|
-
c(!0),
|
|
3761
|
+
c(!0), m(null);
|
|
3762
3762
|
try {
|
|
3763
3763
|
const y = {
|
|
3764
3764
|
applicantId: e,
|
|
@@ -3768,23 +3768,23 @@ const Nr = ({
|
|
|
3768
3768
|
const h = await n.setInvestorCategorization(y);
|
|
3769
3769
|
console.log("Investor categorization result:", h), t == null || t();
|
|
3770
3770
|
} catch (y) {
|
|
3771
|
-
console.error("Error submitting investor categorization:", y),
|
|
3771
|
+
console.error("Error submitting investor categorization:", y), m(y.message || "Failed to submit investor categorization");
|
|
3772
3772
|
} finally {
|
|
3773
3773
|
c(!1);
|
|
3774
3774
|
}
|
|
3775
|
-
}, children: /* @__PURE__ */ i(
|
|
3776
|
-
/* @__PURE__ */ i(
|
|
3775
|
+
}, children: /* @__PURE__ */ i($, { children: [
|
|
3776
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
3777
3777
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: "Which statement best describes you?" }),
|
|
3778
3778
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: "All Tokenise clients are treated as Retail Investors under EU regulation, which gives you the highest level of investor protection. For our internal purposes, we ask you to select the description that best matches your situation" })
|
|
3779
3779
|
] }),
|
|
3780
|
-
/* @__PURE__ */ i(
|
|
3780
|
+
/* @__PURE__ */ i(B, { className: "space-y-4", children: [
|
|
3781
3781
|
/* @__PURE__ */ a("p", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: "Choose one" }),
|
|
3782
3782
|
/* @__PURE__ */ a(
|
|
3783
3783
|
"label",
|
|
3784
3784
|
{
|
|
3785
3785
|
className: `
|
|
3786
3786
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
3787
|
-
${s ===
|
|
3787
|
+
${s === pe.Individual ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
|
|
3788
3788
|
`,
|
|
3789
3789
|
children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
|
|
3790
3790
|
/* @__PURE__ */ a(
|
|
@@ -3792,9 +3792,9 @@ const Nr = ({
|
|
|
3792
3792
|
{
|
|
3793
3793
|
type: "radio",
|
|
3794
3794
|
name: "investorType",
|
|
3795
|
-
value:
|
|
3796
|
-
checked: s ===
|
|
3797
|
-
onChange: () => l(
|
|
3795
|
+
value: pe.Individual,
|
|
3796
|
+
checked: s === pe.Individual,
|
|
3797
|
+
onChange: () => l(pe.Individual),
|
|
3798
3798
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
3799
3799
|
}
|
|
3800
3800
|
),
|
|
@@ -3810,7 +3810,7 @@ const Nr = ({
|
|
|
3810
3810
|
{
|
|
3811
3811
|
className: `
|
|
3812
3812
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
3813
|
-
${s ===
|
|
3813
|
+
${s === pe.Sophisticated ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
|
|
3814
3814
|
`,
|
|
3815
3815
|
children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
|
|
3816
3816
|
/* @__PURE__ */ a(
|
|
@@ -3818,9 +3818,9 @@ const Nr = ({
|
|
|
3818
3818
|
{
|
|
3819
3819
|
type: "radio",
|
|
3820
3820
|
name: "investorType",
|
|
3821
|
-
value:
|
|
3822
|
-
checked: s ===
|
|
3823
|
-
onChange: () => l(
|
|
3821
|
+
value: pe.Sophisticated,
|
|
3822
|
+
checked: s === pe.Sophisticated,
|
|
3823
|
+
onChange: () => l(pe.Sophisticated),
|
|
3824
3824
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
3825
3825
|
}
|
|
3826
3826
|
),
|
|
@@ -3841,7 +3841,7 @@ const Nr = ({
|
|
|
3841
3841
|
{
|
|
3842
3842
|
className: `
|
|
3843
3843
|
block p-4 border-2 rounded-lg cursor-pointer transition-all
|
|
3844
|
-
${s ===
|
|
3844
|
+
${s === pe.HighNetWorth ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
|
|
3845
3845
|
`,
|
|
3846
3846
|
children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
|
|
3847
3847
|
/* @__PURE__ */ a(
|
|
@@ -3849,9 +3849,9 @@ const Nr = ({
|
|
|
3849
3849
|
{
|
|
3850
3850
|
type: "radio",
|
|
3851
3851
|
name: "investorType",
|
|
3852
|
-
value:
|
|
3853
|
-
checked: s ===
|
|
3854
|
-
onChange: () => l(
|
|
3852
|
+
value: pe.HighNetWorth,
|
|
3853
|
+
checked: s === pe.HighNetWorth,
|
|
3854
|
+
onChange: () => l(pe.HighNetWorth),
|
|
3855
3855
|
className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
3856
3856
|
}
|
|
3857
3857
|
),
|
|
@@ -3872,7 +3872,7 @@ const Nr = ({
|
|
|
3872
3872
|
d
|
|
3873
3873
|
] }) })
|
|
3874
3874
|
] }),
|
|
3875
|
-
/* @__PURE__ */ i(
|
|
3875
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
3876
3876
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3877
3877
|
/* @__PURE__ */ a(
|
|
3878
3878
|
q,
|
|
@@ -3885,73 +3885,73 @@ const Nr = ({
|
|
|
3885
3885
|
)
|
|
3886
3886
|
] })
|
|
3887
3887
|
] }) });
|
|
3888
|
-
},
|
|
3888
|
+
}, Fr = ({
|
|
3889
3889
|
applicantId: e,
|
|
3890
3890
|
onComplete: t,
|
|
3891
3891
|
onBack: r
|
|
3892
3892
|
}) => {
|
|
3893
|
-
const { appropriatenessTestService: n } =
|
|
3893
|
+
const { appropriatenessTestService: n } = he(), [s, l] = x(null), [o, c] = x(!0), [d, m] = x(!1), [w, N] = x(null), [y, h] = x({}), [g, k] = x(0), [b, p] = x(!1), [F, C] = x(!1), [v, K] = x(0);
|
|
3894
3894
|
ee(() => {
|
|
3895
3895
|
(async () => {
|
|
3896
3896
|
try {
|
|
3897
3897
|
c(!0), N(null), console.log("Loading appropriateness test for applicant:", e);
|
|
3898
|
-
const
|
|
3899
|
-
if (console.log("Appropriateness test data:",
|
|
3900
|
-
const Z =
|
|
3898
|
+
const E = await n.getAppropriatenessTest(e);
|
|
3899
|
+
if (console.log("Appropriateness test data:", E), l(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3900
|
+
const Z = Y(E.waitTimeSpanForNextTry);
|
|
3901
3901
|
Z > 0 && K(Z);
|
|
3902
3902
|
}
|
|
3903
|
-
} catch (
|
|
3904
|
-
console.error("Error loading appropriateness test:",
|
|
3903
|
+
} catch (E) {
|
|
3904
|
+
console.error("Error loading appropriateness test:", E), N(E.message || "Failed to load appropriateness test");
|
|
3905
3905
|
} finally {
|
|
3906
3906
|
c(!1);
|
|
3907
3907
|
}
|
|
3908
3908
|
})();
|
|
3909
3909
|
}, [e, n]);
|
|
3910
|
-
const
|
|
3911
|
-
const
|
|
3912
|
-
if (
|
|
3913
|
-
const [Z, j,
|
|
3914
|
-
return Z * 3600 + j * 60 +
|
|
3910
|
+
const Y = (P) => {
|
|
3911
|
+
const E = P.split(":").map(Number);
|
|
3912
|
+
if (E.length === 3) {
|
|
3913
|
+
const [Z, j, le] = E;
|
|
3914
|
+
return Z * 3600 + j * 60 + le;
|
|
3915
3915
|
}
|
|
3916
3916
|
return 0;
|
|
3917
|
-
}, M = (
|
|
3918
|
-
const
|
|
3919
|
-
return `${
|
|
3917
|
+
}, M = (P) => {
|
|
3918
|
+
const E = Math.floor(P / 60), Z = P % 60;
|
|
3919
|
+
return `${E.toString().padStart(2, "0")}:${Z.toString().padStart(2, "0")}`;
|
|
3920
3920
|
};
|
|
3921
3921
|
ee(() => {
|
|
3922
|
-
if (!
|
|
3923
|
-
const
|
|
3924
|
-
k((
|
|
3922
|
+
if (!b || g <= 0) return;
|
|
3923
|
+
const P = setInterval(() => {
|
|
3924
|
+
k((E) => E <= 1 ? (C(!0), 0) : E - 1);
|
|
3925
3925
|
}, 1e3);
|
|
3926
|
-
return () => clearInterval(
|
|
3927
|
-
}, [
|
|
3926
|
+
return () => clearInterval(P);
|
|
3927
|
+
}, [b, g]), ee(() => {
|
|
3928
3928
|
if (v <= 0) return;
|
|
3929
|
-
const
|
|
3930
|
-
K((
|
|
3929
|
+
const P = setInterval(() => {
|
|
3930
|
+
K((E) => E <= 1 ? 0 : E - 1);
|
|
3931
3931
|
}, 1e3);
|
|
3932
|
-
return () => clearInterval(
|
|
3932
|
+
return () => clearInterval(P);
|
|
3933
3933
|
}, [v]), ee(() => {
|
|
3934
|
-
|
|
3935
|
-
}, [
|
|
3934
|
+
F && !d && D();
|
|
3935
|
+
}, [F]);
|
|
3936
3936
|
const f = () => {
|
|
3937
|
-
s && (
|
|
3938
|
-
}, A = (
|
|
3937
|
+
s && (p(!0), k(s.testDurationSec));
|
|
3938
|
+
}, A = (P, E) => {
|
|
3939
3939
|
h((Z) => ({
|
|
3940
3940
|
...Z,
|
|
3941
|
-
[
|
|
3941
|
+
[P]: E
|
|
3942
3942
|
}));
|
|
3943
|
-
},
|
|
3944
|
-
if (
|
|
3945
|
-
if (!
|
|
3946
|
-
const
|
|
3947
|
-
if (
|
|
3948
|
-
N(`Please answer all questions. ${
|
|
3943
|
+
}, D = async (P) => {
|
|
3944
|
+
if (P && P.preventDefault(), !!s) {
|
|
3945
|
+
if (!F) {
|
|
3946
|
+
const E = s.appropriatenessQuestions.length - Object.keys(y).length;
|
|
3947
|
+
if (E > 0) {
|
|
3948
|
+
N(`Please answer all questions. ${E} question(s) remaining.`);
|
|
3949
3949
|
return;
|
|
3950
3950
|
}
|
|
3951
3951
|
}
|
|
3952
|
-
|
|
3952
|
+
m(!0), N(null);
|
|
3953
3953
|
try {
|
|
3954
|
-
const
|
|
3954
|
+
const E = s.appropriatenessQuestions.map(
|
|
3955
3955
|
(j) => ({
|
|
3956
3956
|
appropriatenessQuestionId: j.id,
|
|
3957
3957
|
value: y[j.id] || ""
|
|
@@ -3960,55 +3960,55 @@ const Nr = ({
|
|
|
3960
3960
|
), Z = {
|
|
3961
3961
|
applicantId: e,
|
|
3962
3962
|
appropriatenessTestId: s.id,
|
|
3963
|
-
appropriatenessQuestionResults:
|
|
3963
|
+
appropriatenessQuestionResults: E
|
|
3964
3964
|
};
|
|
3965
3965
|
console.log("Submitting appropriateness test:", Z);
|
|
3966
3966
|
try {
|
|
3967
3967
|
const j = await n.fillAppropriatenessTest(Z);
|
|
3968
|
-
console.log("Appropriateness test result:", j), j.message && (j.message.toLowerCase().includes("pass") || j.message.toLowerCase().includes("success") || j.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(j.message || "Test completed. Please check the result."),
|
|
3968
|
+
console.log("Appropriateness test result:", j), j.message && (j.message.toLowerCase().includes("pass") || j.message.toLowerCase().includes("success") || j.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(j.message || "Test completed. Please check the result."), p(!1), C(!1), h({}), setTimeout(() => V(), 1e3));
|
|
3969
3969
|
} catch (j) {
|
|
3970
3970
|
if (j.code === 400 && j.message) {
|
|
3971
|
-
const
|
|
3972
|
-
console.log("Test failed:",
|
|
3971
|
+
const le = j.message;
|
|
3972
|
+
console.log("Test failed:", le), N(le), p(!1), C(!1), h({}), setTimeout(() => V(), 1500);
|
|
3973
3973
|
} else
|
|
3974
3974
|
throw j;
|
|
3975
3975
|
}
|
|
3976
|
-
} catch (
|
|
3977
|
-
console.error("Error submitting appropriateness test:",
|
|
3976
|
+
} catch (E) {
|
|
3977
|
+
console.error("Error submitting appropriateness test:", E), N(E.message || "Failed to submit test. Please try again."), p(!1), C(!1), h({});
|
|
3978
3978
|
} finally {
|
|
3979
|
-
|
|
3979
|
+
m(!1);
|
|
3980
3980
|
}
|
|
3981
3981
|
}
|
|
3982
|
-
},
|
|
3982
|
+
}, V = async () => {
|
|
3983
3983
|
try {
|
|
3984
|
-
const
|
|
3985
|
-
if (console.log("Reloaded test data:",
|
|
3986
|
-
const
|
|
3987
|
-
|
|
3984
|
+
const P = await n.getAppropriatenessTest(e);
|
|
3985
|
+
if (console.log("Reloaded test data:", P), l(P), P.waitTimeSpanForNextTry && P.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3986
|
+
const E = Y(P.waitTimeSpanForNextTry);
|
|
3987
|
+
E > 0 && K(E);
|
|
3988
3988
|
}
|
|
3989
|
-
} catch (
|
|
3990
|
-
console.error("Error reloading test data:",
|
|
3989
|
+
} catch (P) {
|
|
3990
|
+
console.error("Error reloading test data:", P), N((E) => E + `
|
|
3991
3991
|
|
|
3992
3992
|
Failed to reload test data. Please refresh the page.`);
|
|
3993
3993
|
}
|
|
3994
3994
|
};
|
|
3995
3995
|
if (o)
|
|
3996
|
-
return /* @__PURE__ */ a(
|
|
3997
|
-
/* @__PURE__ */ a(
|
|
3996
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
3997
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
3998
3998
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
|
|
3999
3999
|
] }) });
|
|
4000
4000
|
if (!s)
|
|
4001
|
-
return /* @__PURE__ */ a(
|
|
4001
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
|
|
4002
4002
|
/* @__PURE__ */ a("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
|
|
4003
4003
|
w && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: w })
|
|
4004
4004
|
] }) });
|
|
4005
4005
|
if (v > 0)
|
|
4006
|
-
return /* @__PURE__ */ i(
|
|
4007
|
-
/* @__PURE__ */ i(
|
|
4006
|
+
return /* @__PURE__ */ i($, { children: [
|
|
4007
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
4008
4008
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
4009
4009
|
s.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: s.subtitle })
|
|
4010
4010
|
] }),
|
|
4011
|
-
/* @__PURE__ */ i(
|
|
4011
|
+
/* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
|
|
4012
4012
|
/* @__PURE__ */ i("div", { className: "mb-6", children: [
|
|
4013
4013
|
/* @__PURE__ */ a("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: M(v) }),
|
|
4014
4014
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
@@ -4017,8 +4017,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4017
4017
|
] })
|
|
4018
4018
|
] });
|
|
4019
4019
|
const H = s.testAllowedMaxTry - s.totalFailedTries;
|
|
4020
|
-
return
|
|
4021
|
-
/* @__PURE__ */ a(
|
|
4020
|
+
return b ? /* @__PURE__ */ a("form", { onSubmit: D, children: /* @__PURE__ */ i($, { children: [
|
|
4021
|
+
/* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
4022
4022
|
/* @__PURE__ */ i("div", { children: [
|
|
4023
4023
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
4024
4024
|
s.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.subtitle })
|
|
@@ -4034,22 +4034,22 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4034
4034
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
4035
4035
|
] })
|
|
4036
4036
|
] }) }),
|
|
4037
|
-
/* @__PURE__ */ i(
|
|
4037
|
+
/* @__PURE__ */ i(B, { className: "space-y-6", children: [
|
|
4038
4038
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4039
|
-
/* @__PURE__ */ i(
|
|
4039
|
+
/* @__PURE__ */ i(Ne, { variant: "info", children: [
|
|
4040
4040
|
"Question ",
|
|
4041
4041
|
Object.keys(y).length,
|
|
4042
4042
|
" of ",
|
|
4043
4043
|
s.totalQuestionCount
|
|
4044
4044
|
] }),
|
|
4045
|
-
/* @__PURE__ */ i(
|
|
4045
|
+
/* @__PURE__ */ i(Ne, { variant: H > 1 ? "success" : "warning", children: [
|
|
4046
4046
|
H,
|
|
4047
4047
|
" attempt",
|
|
4048
4048
|
H !== 1 ? "s" : "",
|
|
4049
4049
|
" remaining"
|
|
4050
4050
|
] })
|
|
4051
4051
|
] }),
|
|
4052
|
-
s.appropriatenessQuestions.map((
|
|
4052
|
+
s.appropriatenessQuestions.map((P, E) => /* @__PURE__ */ i(
|
|
4053
4053
|
"div",
|
|
4054
4054
|
{
|
|
4055
4055
|
className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
|
|
@@ -4057,27 +4057,27 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4057
4057
|
/* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
4058
4058
|
/* @__PURE__ */ i("span", { className: "inline-block px-2 py-1 text-xs font-semibold text-primary-700 bg-primary-100 dark:text-primary-300 dark:bg-primary-900/30 rounded mb-2", children: [
|
|
4059
4059
|
"Question ",
|
|
4060
|
-
|
|
4060
|
+
E + 1
|
|
4061
4061
|
] }),
|
|
4062
|
-
|
|
4063
|
-
/* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children:
|
|
4062
|
+
P.groupName && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: P.groupName }),
|
|
4063
|
+
/* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: P.question })
|
|
4064
4064
|
] }),
|
|
4065
|
-
/* @__PURE__ */ a("div", { className: "space-y-2", children:
|
|
4065
|
+
/* @__PURE__ */ a("div", { className: "space-y-2", children: P.answers.map((Z, j) => /* @__PURE__ */ i(
|
|
4066
4066
|
"label",
|
|
4067
4067
|
{
|
|
4068
4068
|
className: `
|
|
4069
4069
|
flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
|
|
4070
|
-
${y[
|
|
4070
|
+
${y[P.id] === Z ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
|
|
4071
4071
|
`,
|
|
4072
4072
|
children: [
|
|
4073
4073
|
/* @__PURE__ */ a(
|
|
4074
4074
|
"input",
|
|
4075
4075
|
{
|
|
4076
4076
|
type: "radio",
|
|
4077
|
-
name: `question-${
|
|
4077
|
+
name: `question-${P.id}`,
|
|
4078
4078
|
value: Z,
|
|
4079
|
-
checked: y[
|
|
4080
|
-
onChange: (
|
|
4079
|
+
checked: y[P.id] === Z,
|
|
4080
|
+
onChange: (le) => A(P.id, le.target.value),
|
|
4081
4081
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
|
|
4082
4082
|
disabled: d
|
|
4083
4083
|
}
|
|
@@ -4089,19 +4089,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4089
4089
|
)) })
|
|
4090
4090
|
]
|
|
4091
4091
|
},
|
|
4092
|
-
|
|
4092
|
+
P.id
|
|
4093
4093
|
)),
|
|
4094
|
-
w && !
|
|
4094
|
+
w && !F && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
4095
4095
|
/* @__PURE__ */ a("strong", { children: "Error:" }),
|
|
4096
4096
|
" ",
|
|
4097
4097
|
w
|
|
4098
4098
|
] }) }),
|
|
4099
|
-
|
|
4099
|
+
F && /* @__PURE__ */ a("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
|
|
4100
4100
|
/* @__PURE__ */ a("strong", { children: "Time's up!" }),
|
|
4101
4101
|
" Your answers are being submitted automatically."
|
|
4102
4102
|
] }) })
|
|
4103
4103
|
] }),
|
|
4104
|
-
/* @__PURE__ */ i(
|
|
4104
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
4105
4105
|
/* @__PURE__ */ a(
|
|
4106
4106
|
q,
|
|
4107
4107
|
{
|
|
@@ -4118,33 +4118,33 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4118
4118
|
type: "submit",
|
|
4119
4119
|
isLoading: d,
|
|
4120
4120
|
disabled: Object.keys(y).length < s.totalQuestionCount,
|
|
4121
|
-
children:
|
|
4121
|
+
children: F ? "Submitting..." : "Submit Test"
|
|
4122
4122
|
}
|
|
4123
4123
|
)
|
|
4124
4124
|
] })
|
|
4125
|
-
] }) }) : /* @__PURE__ */ i(
|
|
4126
|
-
/* @__PURE__ */ i(
|
|
4125
|
+
] }) }) : /* @__PURE__ */ i($, { children: [
|
|
4126
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
4127
4127
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
|
|
4128
4128
|
s.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: s.subtitle })
|
|
4129
4129
|
] }),
|
|
4130
|
-
/* @__PURE__ */ i(
|
|
4130
|
+
/* @__PURE__ */ i(B, { children: [
|
|
4131
4131
|
s.description && /* @__PURE__ */ a("div", { className: "mb-6 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-gray-700 dark:text-gray-300", children: s.description }) }),
|
|
4132
4132
|
/* @__PURE__ */ i("div", { className: "space-y-4 mb-6", children: [
|
|
4133
4133
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4134
4134
|
/* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
|
|
4135
|
-
/* @__PURE__ */ a(
|
|
4135
|
+
/* @__PURE__ */ a(Ne, { variant: "info", children: s.totalQuestionCount })
|
|
4136
4136
|
] }),
|
|
4137
4137
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4138
4138
|
/* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
4139
|
-
/* @__PURE__ */ a(
|
|
4139
|
+
/* @__PURE__ */ a(Ne, { variant: "info", children: M(s.testDurationSec) })
|
|
4140
4140
|
] }),
|
|
4141
4141
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4142
4142
|
/* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
4143
|
-
/* @__PURE__ */ a(
|
|
4143
|
+
/* @__PURE__ */ a(Ne, { variant: "info", children: s.testCorrectAnswerPassLimit })
|
|
4144
4144
|
] }),
|
|
4145
4145
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4146
4146
|
/* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4147
|
-
/* @__PURE__ */ a(
|
|
4147
|
+
/* @__PURE__ */ a(Ne, { variant: H > 1 ? "success" : "warning", children: H })
|
|
4148
4148
|
] })
|
|
4149
4149
|
] }),
|
|
4150
4150
|
w && /* @__PURE__ */ a("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
@@ -4154,7 +4154,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4154
4154
|
] }) }),
|
|
4155
4155
|
H <= 0 && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
4156
4156
|
] }),
|
|
4157
|
-
/* @__PURE__ */ i(
|
|
4157
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
4158
4158
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
4159
4159
|
/* @__PURE__ */ a(
|
|
4160
4160
|
q,
|
|
@@ -4167,13 +4167,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4167
4167
|
)
|
|
4168
4168
|
] })
|
|
4169
4169
|
] });
|
|
4170
|
-
},
|
|
4170
|
+
}, Dr = ({
|
|
4171
4171
|
applicantId: e,
|
|
4172
4172
|
onComplete: t,
|
|
4173
4173
|
onBack: r
|
|
4174
4174
|
}) => {
|
|
4175
|
-
var Z, j,
|
|
4176
|
-
const { applicantService: n, baseInformationService: s, config: l } =
|
|
4175
|
+
var Z, j, le, re;
|
|
4176
|
+
const { applicantService: n, baseInformationService: s, config: l } = he(), { identityData: o, provider: c, token: d, isLoading: m, error: w, requestIdentity: N, restartIdentity: y } = sr(e), [h, g] = x(null), [k, b] = x(null), [p, F] = x([]), [C, v] = x(!0), [K, Y] = x(!1), [M, f] = x(null), [A, D] = x(!1), V = ye.useRef(!1), H = ct({
|
|
4177
4177
|
defaultValues: {
|
|
4178
4178
|
street: "",
|
|
4179
4179
|
streetNumber: "",
|
|
@@ -4187,160 +4187,160 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4187
4187
|
ee(() => {
|
|
4188
4188
|
(async () => {
|
|
4189
4189
|
try {
|
|
4190
|
-
const [
|
|
4190
|
+
const [L, ae] = await Promise.all([
|
|
4191
4191
|
n.getApplicantData(e),
|
|
4192
4192
|
s.getCountries("", "en")
|
|
4193
4193
|
]);
|
|
4194
|
-
|
|
4195
|
-
const J = /* @__PURE__ */ new Set(),
|
|
4196
|
-
const
|
|
4197
|
-
return !
|
|
4194
|
+
b(L);
|
|
4195
|
+
const J = /* @__PURE__ */ new Set(), ce = ae.filter((ve) => {
|
|
4196
|
+
const u = ve.abbreviation3 || ve.abbreviation;
|
|
4197
|
+
return !u || J.has(u) ? !1 : (J.add(u), !0);
|
|
4198
4198
|
});
|
|
4199
|
-
|
|
4200
|
-
const
|
|
4199
|
+
F(ce);
|
|
4200
|
+
const z = L.applicantRequestData;
|
|
4201
4201
|
if (H.reset({
|
|
4202
|
-
street: (
|
|
4203
|
-
streetNumber: (
|
|
4204
|
-
city: (
|
|
4205
|
-
zip: (
|
|
4206
|
-
country: (
|
|
4207
|
-
nationality: (
|
|
4208
|
-
phonenumber: (
|
|
4209
|
-
}),
|
|
4210
|
-
console.log("[Identity] Found existing identity verification, auto-requesting..."),
|
|
4202
|
+
street: (z == null ? void 0 : z.street) || "",
|
|
4203
|
+
streetNumber: (z == null ? void 0 : z.streetNumber) || "",
|
|
4204
|
+
city: (z == null ? void 0 : z.city) || "",
|
|
4205
|
+
zip: (z == null ? void 0 : z.zip) || "",
|
|
4206
|
+
country: (z == null ? void 0 : z.country) || "",
|
|
4207
|
+
nationality: (z == null ? void 0 : z.nationality) || "",
|
|
4208
|
+
phonenumber: (z == null ? void 0 : z.phonenumber) || ""
|
|
4209
|
+
}), L.kycRecords && L.kycRecords.length > 0 && L.kycRecords[0].providerTokenObject !== null && !V.current) {
|
|
4210
|
+
console.log("[Identity] Found existing identity verification, auto-requesting..."), V.current = !0;
|
|
4211
4211
|
try {
|
|
4212
|
-
await N(),
|
|
4213
|
-
} catch (
|
|
4214
|
-
console.error("[Identity] Auto-request failed:",
|
|
4212
|
+
await N(), Y(!0);
|
|
4213
|
+
} catch (ve) {
|
|
4214
|
+
console.error("[Identity] Auto-request failed:", ve);
|
|
4215
4215
|
}
|
|
4216
4216
|
}
|
|
4217
|
-
} catch (
|
|
4218
|
-
console.error("Error loading applicant data:",
|
|
4217
|
+
} catch (L) {
|
|
4218
|
+
console.error("Error loading applicant data:", L);
|
|
4219
4219
|
} finally {
|
|
4220
4220
|
v(!1);
|
|
4221
4221
|
}
|
|
4222
4222
|
})();
|
|
4223
4223
|
}, [e]), ee(() => {
|
|
4224
|
-
o && !K && (console.log("[Identity] Identity data already loaded, showing provider"),
|
|
4224
|
+
o && !K && (console.log("[Identity] Identity data already loaded, showing provider"), Y(!0));
|
|
4225
4225
|
}, [o, K]), ee(() => {
|
|
4226
4226
|
if (d) {
|
|
4227
4227
|
if (d.expiresAt) {
|
|
4228
|
-
const
|
|
4229
|
-
if (Date.now() >=
|
|
4230
|
-
console.warn("[Identity] Token has expired (expiresAt)"),
|
|
4228
|
+
const O = new Date(d.expiresAt).getTime();
|
|
4229
|
+
if (Date.now() >= O) {
|
|
4230
|
+
console.warn("[Identity] Token has expired (expiresAt)"), D(!0), f("Your verification session has expired. Please restart.");
|
|
4231
4231
|
return;
|
|
4232
4232
|
}
|
|
4233
4233
|
}
|
|
4234
4234
|
if (d.url)
|
|
4235
4235
|
try {
|
|
4236
|
-
const
|
|
4237
|
-
if (
|
|
4238
|
-
console.warn("[Identity] Token URL indicates expiration"),
|
|
4236
|
+
const L = new URL(d.url).toString().toLowerCase();
|
|
4237
|
+
if (L.includes("expired") || L.includes("invalid") || L.includes("error")) {
|
|
4238
|
+
console.warn("[Identity] Token URL indicates expiration"), D(!0), f("Your verification link has expired. Please restart.");
|
|
4239
4239
|
return;
|
|
4240
4240
|
}
|
|
4241
4241
|
} catch {
|
|
4242
4242
|
console.error("[Identity] Invalid token URL");
|
|
4243
4243
|
}
|
|
4244
4244
|
if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
|
|
4245
|
-
console.warn("[Identity] Token object indicates expiration"),
|
|
4245
|
+
console.warn("[Identity] Token object indicates expiration"), D(!0), f("Your verification session has expired. Please restart.");
|
|
4246
4246
|
return;
|
|
4247
4247
|
}
|
|
4248
4248
|
}
|
|
4249
4249
|
}, [d]), ee(() => {
|
|
4250
4250
|
if (c !== null && d && !h && K && !A) {
|
|
4251
|
-
const
|
|
4251
|
+
const O = c;
|
|
4252
4252
|
if (d.url) {
|
|
4253
4253
|
console.log("[Identity] Loading provider URL for user verification:", d.url), f(null);
|
|
4254
4254
|
try {
|
|
4255
|
-
if (new URL(d.url),
|
|
4255
|
+
if (new URL(d.url), O === fe.SardinAI) {
|
|
4256
4256
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4257
4257
|
try {
|
|
4258
|
-
const
|
|
4259
|
-
|
|
4258
|
+
const L = De.parseProviderConfig(c, d, l);
|
|
4259
|
+
De.createProvider(c, L).initialize().then(() => {
|
|
4260
4260
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4261
4261
|
}).catch((J) => {
|
|
4262
4262
|
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", J);
|
|
4263
4263
|
});
|
|
4264
|
-
} catch (
|
|
4265
|
-
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):",
|
|
4264
|
+
} catch (L) {
|
|
4265
|
+
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", L);
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
4268
|
g({ type: "url", url: d.url });
|
|
4269
|
-
} catch (
|
|
4270
|
-
console.error("[Identity] Invalid URL:",
|
|
4269
|
+
} catch (L) {
|
|
4270
|
+
console.error("[Identity] Invalid URL:", L), f("Invalid verification URL. Please restart."), D(!0);
|
|
4271
4271
|
}
|
|
4272
4272
|
return;
|
|
4273
4273
|
}
|
|
4274
|
-
if (
|
|
4274
|
+
if (O === fe.SardinAI) {
|
|
4275
4275
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), f(null);
|
|
4276
4276
|
try {
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4279
|
-
console.log("[SardinAI] Risk SDK initialized successfully"), g(
|
|
4277
|
+
const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
|
|
4278
|
+
ae.initialize().then(() => {
|
|
4279
|
+
console.log("[SardinAI] Risk SDK initialized successfully"), g(ae), setTimeout(() => {
|
|
4280
4280
|
t == null || t();
|
|
4281
4281
|
}, 2e3);
|
|
4282
4282
|
}).catch((J) => {
|
|
4283
|
-
var
|
|
4283
|
+
var z;
|
|
4284
4284
|
console.error("[SardinAI] Failed to initialize:", J);
|
|
4285
|
-
const
|
|
4286
|
-
|
|
4285
|
+
const ce = ((z = J.message) == null ? void 0 : z.toLowerCase()) || "";
|
|
4286
|
+
ce.includes("expired") || ce.includes("invalid") || ce.includes("401") || ce.includes("400") ? (D(!0), f("Session expired or invalid. Please restart verification.")) : f(`Failed to initialize: ${J.message}`);
|
|
4287
4287
|
});
|
|
4288
|
-
} catch (
|
|
4289
|
-
console.error("[SardinAI] Error creating provider:",
|
|
4288
|
+
} catch (L) {
|
|
4289
|
+
console.error("[SardinAI] Error creating provider:", L), f(`Configuration error: ${L.message}`);
|
|
4290
4290
|
}
|
|
4291
4291
|
return;
|
|
4292
4292
|
}
|
|
4293
4293
|
try {
|
|
4294
4294
|
f(null);
|
|
4295
|
-
const
|
|
4296
|
-
|
|
4297
|
-
var
|
|
4298
|
-
console.error("[Sumsub] Initialization error:", J), f(`Failed to initialize: ${J.message}`), (
|
|
4299
|
-
}),
|
|
4295
|
+
const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
|
|
4296
|
+
O === fe.Sumsub ? (ae.initialize("identity-container").catch((J) => {
|
|
4297
|
+
var ce;
|
|
4298
|
+
console.error("[Sumsub] Initialization error:", J), f(`Failed to initialize: ${J.message}`), (ce = J.message) != null && ce.toLowerCase().includes("expired") && D(!0);
|
|
4299
|
+
}), ae.onComplete && ae.onComplete(() => {
|
|
4300
4300
|
t == null || t();
|
|
4301
|
-
})) :
|
|
4301
|
+
})) : O === fe.Onfido && ae.initialize("identity-container").catch((J) => {
|
|
4302
4302
|
console.error("[Onfido] Initialization error:", J), f(`Failed to initialize: ${J.message}`);
|
|
4303
|
-
}), g(
|
|
4304
|
-
} catch (
|
|
4305
|
-
console.error("[Identity] Provider setup error:",
|
|
4303
|
+
}), g(ae);
|
|
4304
|
+
} catch (L) {
|
|
4305
|
+
console.error("[Identity] Provider setup error:", L), f(`Setup error: ${L.message}`);
|
|
4306
4306
|
}
|
|
4307
4307
|
}
|
|
4308
4308
|
return () => {
|
|
4309
4309
|
if (h && h.destroy)
|
|
4310
4310
|
try {
|
|
4311
4311
|
h.destroy();
|
|
4312
|
-
} catch (
|
|
4313
|
-
console.error("[Identity] Error destroying provider:",
|
|
4312
|
+
} catch (O) {
|
|
4313
|
+
console.error("[Identity] Error destroying provider:", O);
|
|
4314
4314
|
}
|
|
4315
4315
|
};
|
|
4316
4316
|
}, [c, d, h, K, t, A]);
|
|
4317
|
-
const
|
|
4317
|
+
const P = async () => {
|
|
4318
4318
|
try {
|
|
4319
|
-
f(null),
|
|
4320
|
-
} catch (
|
|
4321
|
-
console.error("Error starting identity verification:",
|
|
4319
|
+
f(null), D(!1), await N(), Y(!0);
|
|
4320
|
+
} catch (O) {
|
|
4321
|
+
console.error("Error starting identity verification:", O);
|
|
4322
4322
|
}
|
|
4323
|
-
},
|
|
4323
|
+
}, E = async () => {
|
|
4324
4324
|
try {
|
|
4325
|
-
f(null),
|
|
4326
|
-
} catch (
|
|
4327
|
-
console.error("Error restarting identity verification:",
|
|
4325
|
+
f(null), D(!1), g(null), console.log("[Identity] Restarting verification..."), await y(), Y(!0);
|
|
4326
|
+
} catch (O) {
|
|
4327
|
+
console.error("Error restarting identity verification:", O), f(O.message || "Failed to restart verification");
|
|
4328
4328
|
}
|
|
4329
4329
|
};
|
|
4330
|
-
if (
|
|
4331
|
-
return /* @__PURE__ */ a(
|
|
4332
|
-
/* @__PURE__ */ a(
|
|
4330
|
+
if (C || m)
|
|
4331
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
4332
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
4333
4333
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
|
|
4334
4334
|
] }) });
|
|
4335
4335
|
if (w)
|
|
4336
|
-
return /* @__PURE__ */ a(
|
|
4336
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
|
|
4337
4337
|
"Error: ",
|
|
4338
4338
|
w.message
|
|
4339
4339
|
] }) }) });
|
|
4340
4340
|
if (K && (M || A))
|
|
4341
|
-
return /* @__PURE__ */ i(
|
|
4342
|
-
/* @__PURE__ */ a(
|
|
4343
|
-
/* @__PURE__ */ i(
|
|
4341
|
+
return /* @__PURE__ */ i($, { children: [
|
|
4342
|
+
/* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4343
|
+
/* @__PURE__ */ i(B, { children: [
|
|
4344
4344
|
/* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg mb-6", children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
|
|
4345
4345
|
/* @__PURE__ */ a(
|
|
4346
4346
|
"svg",
|
|
@@ -4374,15 +4374,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4374
4374
|
] })
|
|
4375
4375
|
] })
|
|
4376
4376
|
] }),
|
|
4377
|
-
/* @__PURE__ */ i(
|
|
4377
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
4378
4378
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
4379
|
-
/* @__PURE__ */ a(q, { type: "button", onClick:
|
|
4379
|
+
/* @__PURE__ */ a(q, { type: "button", onClick: E, disabled: m, children: m ? "Restarting..." : "Restart Verification" })
|
|
4380
4380
|
] })
|
|
4381
4381
|
] });
|
|
4382
4382
|
if (K && o) {
|
|
4383
|
-
const
|
|
4384
|
-
return d != null && d.url ? /* @__PURE__ */ i(
|
|
4385
|
-
/* @__PURE__ */ a(
|
|
4383
|
+
const O = c;
|
|
4384
|
+
return d != null && d.url ? /* @__PURE__ */ i($, { children: [
|
|
4385
|
+
/* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
4386
4386
|
/* @__PURE__ */ i("div", { children: [
|
|
4387
4387
|
/* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
|
|
4388
4388
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
@@ -4393,13 +4393,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4393
4393
|
type: "button",
|
|
4394
4394
|
variant: "outline",
|
|
4395
4395
|
size: "sm",
|
|
4396
|
-
onClick:
|
|
4397
|
-
disabled:
|
|
4396
|
+
onClick: E,
|
|
4397
|
+
disabled: m,
|
|
4398
4398
|
children: "Restart"
|
|
4399
4399
|
}
|
|
4400
4400
|
)
|
|
4401
4401
|
] }) }),
|
|
4402
|
-
/* @__PURE__ */ i(
|
|
4402
|
+
/* @__PURE__ */ i(B, { children: [
|
|
4403
4403
|
/* @__PURE__ */ a("div", { className: "mb-4 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-800 dark:text-yellow-200 text-sm", children: [
|
|
4404
4404
|
/* @__PURE__ */ a("strong", { children: "Important:" }),
|
|
4405
4405
|
' If you see an "expired" or "invalid link" message below, click the "Restart" button above to generate a new verification session.'
|
|
@@ -4411,14 +4411,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4411
4411
|
className: "w-full h-full border-0 rounded-lg",
|
|
4412
4412
|
allow: "camera; microphone; geolocation",
|
|
4413
4413
|
title: "Identity Verification",
|
|
4414
|
-
onLoad: (
|
|
4415
|
-
var
|
|
4414
|
+
onLoad: (L) => {
|
|
4415
|
+
var ae, J, ce;
|
|
4416
4416
|
console.log("[Identity] Iframe loaded");
|
|
4417
4417
|
try {
|
|
4418
|
-
const
|
|
4419
|
-
if (
|
|
4420
|
-
const
|
|
4421
|
-
(
|
|
4418
|
+
const z = L.target, Fe = z.contentDocument || ((ae = z.contentWindow) == null ? void 0 : ae.document);
|
|
4419
|
+
if (Fe) {
|
|
4420
|
+
const ve = ((ce = (J = Fe.body) == null ? void 0 : J.textContent) == null ? void 0 : ce.toLowerCase()) || "";
|
|
4421
|
+
(ve.includes("expired") || ve.includes("invalid") || ve.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), D(!0), f("Your verification link has expired."));
|
|
4422
4422
|
}
|
|
4423
4423
|
} catch {
|
|
4424
4424
|
console.log("[Identity] Cannot check iframe content (CORS)");
|
|
@@ -4427,32 +4427,32 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4427
4427
|
}
|
|
4428
4428
|
) })
|
|
4429
4429
|
] }),
|
|
4430
|
-
r && /* @__PURE__ */ a(
|
|
4431
|
-
] }) :
|
|
4432
|
-
/* @__PURE__ */ i(
|
|
4430
|
+
r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(q, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4431
|
+
] }) : O === fe.SardinAI ? /* @__PURE__ */ i($, { children: [
|
|
4432
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
4433
4433
|
/* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
|
|
4434
4434
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
|
|
4435
4435
|
] }),
|
|
4436
|
-
/* @__PURE__ */ a(
|
|
4437
|
-
/* @__PURE__ */ a(
|
|
4436
|
+
/* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
|
|
4437
|
+
/* @__PURE__ */ a(be, { className: "mb-4" }),
|
|
4438
4438
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
|
|
4439
4439
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
|
|
4440
4440
|
] }) })
|
|
4441
|
-
] }) : /* @__PURE__ */ i(
|
|
4442
|
-
/* @__PURE__ */ i(
|
|
4441
|
+
] }) : /* @__PURE__ */ i($, { children: [
|
|
4442
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
4443
4443
|
/* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
|
|
4444
4444
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
4445
4445
|
] }),
|
|
4446
|
-
/* @__PURE__ */ a(
|
|
4447
|
-
r && /* @__PURE__ */ a(
|
|
4446
|
+
/* @__PURE__ */ a(B, { children: /* @__PURE__ */ a("div", { id: "identity-container", className: "min-h-[400px]" }) }),
|
|
4447
|
+
r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(q, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4448
4448
|
] });
|
|
4449
4449
|
}
|
|
4450
|
-
return /* @__PURE__ */ a("form", { onSubmit: H.handleSubmit(
|
|
4451
|
-
/* @__PURE__ */ i(
|
|
4450
|
+
return /* @__PURE__ */ a("form", { onSubmit: H.handleSubmit(P), children: /* @__PURE__ */ i($, { children: [
|
|
4451
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
4452
4452
|
/* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Review Your Information" }),
|
|
4453
4453
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
|
|
4454
4454
|
] }),
|
|
4455
|
-
/* @__PURE__ */ i(
|
|
4455
|
+
/* @__PURE__ */ i(B, { className: "space-y-6", children: [
|
|
4456
4456
|
/* @__PURE__ */ i("div", { className: "space-y-4 pb-4 border-b border-gray-200 dark:border-gray-700", children: [
|
|
4457
4457
|
/* @__PURE__ */ i("div", { children: [
|
|
4458
4458
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
|
|
@@ -4464,31 +4464,31 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4464
4464
|
] }),
|
|
4465
4465
|
/* @__PURE__ */ i("div", { children: [
|
|
4466
4466
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Email" }),
|
|
4467
|
-
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: (
|
|
4467
|
+
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: (le = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : le.email })
|
|
4468
4468
|
] }),
|
|
4469
4469
|
/* @__PURE__ */ i("div", { children: [
|
|
4470
4470
|
/* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
|
|
4471
|
-
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: ((
|
|
4471
|
+
/* @__PURE__ */ a("p", { className: "mt-1 text-base", children: ((re = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : re.dateOfBirth) || "Not provided" })
|
|
4472
4472
|
] })
|
|
4473
4473
|
] }),
|
|
4474
4474
|
/* @__PURE__ */ i("div", { className: "space-y-4", children: [
|
|
4475
4475
|
/* @__PURE__ */ a("h3", { className: "text-lg font-semibold", children: "Address Information" }),
|
|
4476
4476
|
/* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4477
4477
|
/* @__PURE__ */ a(
|
|
4478
|
-
|
|
4478
|
+
Ie,
|
|
4479
4479
|
{
|
|
4480
4480
|
control: H.control,
|
|
4481
4481
|
name: "country",
|
|
4482
|
-
render: ({ field:
|
|
4483
|
-
|
|
4482
|
+
render: ({ field: O }) => /* @__PURE__ */ a(
|
|
4483
|
+
Ae,
|
|
4484
4484
|
{
|
|
4485
|
-
...
|
|
4485
|
+
...O,
|
|
4486
4486
|
label: "Country",
|
|
4487
4487
|
options: [
|
|
4488
4488
|
{ value: "", label: "Select country..." },
|
|
4489
|
-
...
|
|
4490
|
-
value:
|
|
4491
|
-
label:
|
|
4489
|
+
...p.map((L) => ({
|
|
4490
|
+
value: L.abbreviation3 || L.abbreviation,
|
|
4491
|
+
label: L.name
|
|
4492
4492
|
}))
|
|
4493
4493
|
]
|
|
4494
4494
|
}
|
|
@@ -4496,20 +4496,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4496
4496
|
}
|
|
4497
4497
|
),
|
|
4498
4498
|
/* @__PURE__ */ a(
|
|
4499
|
-
|
|
4499
|
+
Ie,
|
|
4500
4500
|
{
|
|
4501
4501
|
control: H.control,
|
|
4502
4502
|
name: "nationality",
|
|
4503
|
-
render: ({ field:
|
|
4504
|
-
|
|
4503
|
+
render: ({ field: O }) => /* @__PURE__ */ a(
|
|
4504
|
+
Ae,
|
|
4505
4505
|
{
|
|
4506
|
-
...
|
|
4506
|
+
...O,
|
|
4507
4507
|
label: "Nationality",
|
|
4508
4508
|
options: [
|
|
4509
4509
|
{ value: "", label: "Select nationality..." },
|
|
4510
|
-
...
|
|
4511
|
-
value:
|
|
4512
|
-
label:
|
|
4510
|
+
...p.map((L) => ({
|
|
4511
|
+
value: L.abbreviation3 || L.abbreviation,
|
|
4512
|
+
label: L.name
|
|
4513
4513
|
}))
|
|
4514
4514
|
]
|
|
4515
4515
|
}
|
|
@@ -4519,56 +4519,56 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4519
4519
|
] }),
|
|
4520
4520
|
/* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4521
4521
|
/* @__PURE__ */ a(
|
|
4522
|
-
|
|
4522
|
+
Ie,
|
|
4523
4523
|
{
|
|
4524
4524
|
control: H.control,
|
|
4525
4525
|
name: "street",
|
|
4526
|
-
render: ({ field:
|
|
4526
|
+
render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street" })
|
|
4527
4527
|
}
|
|
4528
4528
|
),
|
|
4529
4529
|
/* @__PURE__ */ a(
|
|
4530
|
-
|
|
4530
|
+
Ie,
|
|
4531
4531
|
{
|
|
4532
4532
|
control: H.control,
|
|
4533
4533
|
name: "streetNumber",
|
|
4534
|
-
render: ({ field:
|
|
4534
|
+
render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street Number" })
|
|
4535
4535
|
}
|
|
4536
4536
|
)
|
|
4537
4537
|
] }),
|
|
4538
4538
|
/* @__PURE__ */ i("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
4539
4539
|
/* @__PURE__ */ a(
|
|
4540
|
-
|
|
4540
|
+
Ie,
|
|
4541
4541
|
{
|
|
4542
4542
|
control: H.control,
|
|
4543
4543
|
name: "city",
|
|
4544
|
-
render: ({ field:
|
|
4544
|
+
render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "City" })
|
|
4545
4545
|
}
|
|
4546
4546
|
),
|
|
4547
4547
|
/* @__PURE__ */ a(
|
|
4548
|
-
|
|
4548
|
+
Ie,
|
|
4549
4549
|
{
|
|
4550
4550
|
control: H.control,
|
|
4551
4551
|
name: "zip",
|
|
4552
|
-
render: ({ field:
|
|
4552
|
+
render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "ZIP/Postal Code" })
|
|
4553
4553
|
}
|
|
4554
4554
|
)
|
|
4555
4555
|
] }),
|
|
4556
4556
|
/* @__PURE__ */ a(
|
|
4557
|
-
|
|
4557
|
+
Ie,
|
|
4558
4558
|
{
|
|
4559
4559
|
control: H.control,
|
|
4560
4560
|
name: "phonenumber",
|
|
4561
|
-
render: ({ field:
|
|
4561
|
+
render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Phone Number", type: "tel" })
|
|
4562
4562
|
}
|
|
4563
4563
|
)
|
|
4564
4564
|
] })
|
|
4565
4565
|
] }),
|
|
4566
|
-
/* @__PURE__ */ i(
|
|
4566
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
4567
4567
|
r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
4568
|
-
/* @__PURE__ */ a(q, { type: "submit", isLoading:
|
|
4568
|
+
/* @__PURE__ */ a(q, { type: "submit", isLoading: m, children: "Confirm and Start Verification" })
|
|
4569
4569
|
] })
|
|
4570
4570
|
] }) });
|
|
4571
|
-
},
|
|
4571
|
+
}, Ge = ({
|
|
4572
4572
|
kycStatus: e,
|
|
4573
4573
|
reviewStatus: t,
|
|
4574
4574
|
workflowResult: r,
|
|
@@ -4576,63 +4576,63 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4576
4576
|
onContinue: s,
|
|
4577
4577
|
onContactSupport: l
|
|
4578
4578
|
}) => {
|
|
4579
|
-
const c = e ===
|
|
4579
|
+
const c = e === Ee.Approved ? {
|
|
4580
4580
|
type: "success",
|
|
4581
4581
|
title: "Verification Approved",
|
|
4582
4582
|
icon: "✓",
|
|
4583
4583
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
4584
4584
|
iconColor: "text-green-600 dark:text-green-400",
|
|
4585
4585
|
message: "Your identity verification has been successfully approved."
|
|
4586
|
-
} : e ===
|
|
4586
|
+
} : e === Ee.Rejected ? {
|
|
4587
4587
|
type: "error",
|
|
4588
4588
|
title: "Verification Rejected",
|
|
4589
4589
|
icon: "✕",
|
|
4590
4590
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
4591
4591
|
iconColor: "text-red-600 dark:text-red-400",
|
|
4592
4592
|
message: "Unfortunately, your identity verification was not approved."
|
|
4593
|
-
} : e ===
|
|
4593
|
+
} : e === Ee.Pending || e === Ee.InProgress ? {
|
|
4594
4594
|
type: "pending",
|
|
4595
4595
|
title: "Verification Pending",
|
|
4596
4596
|
icon: "⏱",
|
|
4597
4597
|
iconBg: "bg-blue-100 dark:bg-blue-900/30",
|
|
4598
4598
|
iconColor: "text-blue-600 dark:text-blue-400",
|
|
4599
4599
|
message: "Your identity verification is currently being processed."
|
|
4600
|
-
} : t ===
|
|
4600
|
+
} : t === Re.Approved ? {
|
|
4601
4601
|
type: "success",
|
|
4602
4602
|
title: "Application Approved",
|
|
4603
4603
|
icon: "✓",
|
|
4604
4604
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
4605
4605
|
iconColor: "text-green-600 dark:text-green-400",
|
|
4606
4606
|
message: "Your application has been approved."
|
|
4607
|
-
} : t ===
|
|
4607
|
+
} : t === Re.Reject ? {
|
|
4608
4608
|
type: "error",
|
|
4609
4609
|
title: "Application Rejected",
|
|
4610
4610
|
icon: "✕",
|
|
4611
4611
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
4612
4612
|
iconColor: "text-red-600 dark:text-red-400",
|
|
4613
4613
|
message: "Your application has been rejected."
|
|
4614
|
-
} : t ===
|
|
4614
|
+
} : t === Re.UnderReview || t === Re.AdminReview ? {
|
|
4615
4615
|
type: "pending",
|
|
4616
4616
|
title: "Under Review",
|
|
4617
4617
|
icon: "📋",
|
|
4618
4618
|
iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
|
|
4619
4619
|
iconColor: "text-yellow-700 dark:text-yellow-400",
|
|
4620
4620
|
message: "Your application is currently under manual review."
|
|
4621
|
-
} : r ===
|
|
4621
|
+
} : r === $e.Success ? {
|
|
4622
4622
|
type: "success",
|
|
4623
4623
|
title: "Process Complete",
|
|
4624
4624
|
icon: "✓",
|
|
4625
4625
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
4626
4626
|
iconColor: "text-green-600 dark:text-green-400",
|
|
4627
4627
|
message: "Your verification process has been completed successfully."
|
|
4628
|
-
} : r ===
|
|
4628
|
+
} : r === $e.Failed ? {
|
|
4629
4629
|
type: "error",
|
|
4630
4630
|
title: "Process Failed",
|
|
4631
4631
|
icon: "✕",
|
|
4632
4632
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
4633
4633
|
iconColor: "text-red-600 dark:text-red-400",
|
|
4634
4634
|
message: "The verification process could not be completed."
|
|
4635
|
-
} : r ===
|
|
4635
|
+
} : r === $e.AdminReview ? {
|
|
4636
4636
|
type: "pending",
|
|
4637
4637
|
title: "Admin Review Required",
|
|
4638
4638
|
icon: "📋",
|
|
@@ -4647,8 +4647,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4647
4647
|
iconColor: "text-blue-600 dark:text-blue-400",
|
|
4648
4648
|
message: "Your application is being reviewed."
|
|
4649
4649
|
};
|
|
4650
|
-
return /* @__PURE__ */ i(
|
|
4651
|
-
/* @__PURE__ */ i(
|
|
4650
|
+
return /* @__PURE__ */ i($, { children: [
|
|
4651
|
+
/* @__PURE__ */ i(B, { className: "py-12", children: [
|
|
4652
4652
|
/* @__PURE__ */ a("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ a(
|
|
4653
4653
|
"div",
|
|
4654
4654
|
{
|
|
@@ -4658,10 +4658,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4658
4658
|
) }),
|
|
4659
4659
|
/* @__PURE__ */ a("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: c.title }),
|
|
4660
4660
|
/* @__PURE__ */ a("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ a(
|
|
4661
|
-
|
|
4661
|
+
Ne,
|
|
4662
4662
|
{
|
|
4663
4663
|
variant: c.type === "success" ? "success" : c.type === "error" ? "danger" : c.type === "pending" ? "warning" : "info",
|
|
4664
|
-
children: e != null ?
|
|
4664
|
+
children: e != null ? Ee[e] : Re[t]
|
|
4665
4665
|
}
|
|
4666
4666
|
) }),
|
|
4667
4667
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: n || c.message }),
|
|
@@ -4693,24 +4693,24 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4693
4693
|
/* @__PURE__ */ a("div", { className: "mt-6 pt-6 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
4694
4694
|
/* @__PURE__ */ i("div", { children: [
|
|
4695
4695
|
/* @__PURE__ */ a("span", { className: "text-gray-500 dark:text-gray-400", children: "KYC Status:" }),
|
|
4696
|
-
/* @__PURE__ */ a("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ?
|
|
4696
|
+
/* @__PURE__ */ a("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: e != null ? Ee[e] : "Not Available" })
|
|
4697
4697
|
] }),
|
|
4698
4698
|
/* @__PURE__ */ i("div", { children: [
|
|
4699
4699
|
/* @__PURE__ */ a("span", { className: "text-gray-500 dark:text-gray-400", children: "Review Status:" }),
|
|
4700
|
-
/* @__PURE__ */ a("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children:
|
|
4700
|
+
/* @__PURE__ */ a("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: Re[t] })
|
|
4701
4701
|
] })
|
|
4702
4702
|
] }) })
|
|
4703
4703
|
] }),
|
|
4704
|
-
/* @__PURE__ */ i(
|
|
4704
|
+
/* @__PURE__ */ i(me, { className: "flex justify-center gap-4", children: [
|
|
4705
4705
|
c.type === "success" && s && /* @__PURE__ */ a(q, { onClick: s, size: "lg", children: "Continue" }),
|
|
4706
|
-
c.type === "error" && /* @__PURE__ */ i(
|
|
4706
|
+
c.type === "error" && /* @__PURE__ */ i(ot, { children: [
|
|
4707
4707
|
l && /* @__PURE__ */ a(q, { variant: "outline", onClick: l, children: "Contact Support" }),
|
|
4708
4708
|
s && /* @__PURE__ */ a(q, { onClick: s, children: "Try Again" })
|
|
4709
4709
|
] }),
|
|
4710
4710
|
c.type === "pending" && /* @__PURE__ */ a("div", { className: "text-center", children: /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
4711
4711
|
] })
|
|
4712
4712
|
] });
|
|
4713
|
-
},
|
|
4713
|
+
}, Pr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ a("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ a(
|
|
4714
4714
|
"img",
|
|
4715
4715
|
{
|
|
4716
4716
|
src: e.url,
|
|
@@ -4725,15 +4725,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4725
4725
|
console.warn("[Logo] Failed to load logo:", e.url), r.target.style.display = "none";
|
|
4726
4726
|
}
|
|
4727
4727
|
}
|
|
4728
|
-
) }),
|
|
4728
|
+
) }), He = ({
|
|
4729
4729
|
title: e,
|
|
4730
4730
|
subtitle: t,
|
|
4731
4731
|
className: r = ""
|
|
4732
4732
|
}) => {
|
|
4733
|
-
const { currentTheme: n } =
|
|
4733
|
+
const { currentTheme: n } = he(), s = e || (n == null ? void 0 : n.title) || "", l = !!(n != null && n.logo && n.logo.visible && n.logo.url), o = !!s;
|
|
4734
4734
|
return !l && !o ? null : /* @__PURE__ */ i("div", { className: `metakyc-header ${r}`, children: [
|
|
4735
4735
|
/* @__PURE__ */ i("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
|
|
4736
|
-
l && /* @__PURE__ */ a(
|
|
4736
|
+
l && /* @__PURE__ */ a(Pr, { config: n.logo }),
|
|
4737
4737
|
l && o && /* @__PURE__ */ a(
|
|
4738
4738
|
"span",
|
|
4739
4739
|
{
|
|
@@ -4746,65 +4746,77 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4746
4746
|
] }),
|
|
4747
4747
|
t && /* @__PURE__ */ a("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
|
|
4748
4748
|
] });
|
|
4749
|
-
},
|
|
4750
|
-
function
|
|
4749
|
+
}, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
|
|
4750
|
+
function Ke(e) {
|
|
4751
4751
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
4752
4752
|
}
|
|
4753
|
-
const
|
|
4753
|
+
const Oe = {
|
|
4754
|
+
width: "16px",
|
|
4755
|
+
height: "16px",
|
|
4756
|
+
minWidth: "16px",
|
|
4757
|
+
flexShrink: 0,
|
|
4758
|
+
flexGrow: 0,
|
|
4759
|
+
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
4760
|
+
cursor: "pointer",
|
|
4761
|
+
margin: 0,
|
|
4762
|
+
padding: 0,
|
|
4763
|
+
display: "inline-block",
|
|
4764
|
+
verticalAlign: "middle"
|
|
4765
|
+
}, Gr = ({
|
|
4754
4766
|
workflowKey: e,
|
|
4755
4767
|
externalRefId: t,
|
|
4756
4768
|
onSuccess: r,
|
|
4757
4769
|
onCancel: n
|
|
4758
4770
|
}) => {
|
|
4759
|
-
var
|
|
4760
|
-
const { config: s, baseInformationService: l, currentTheme: o } =
|
|
4761
|
-
if (!
|
|
4771
|
+
var z, Fe, ve;
|
|
4772
|
+
const { config: s, baseInformationService: l, currentTheme: o } = he(), { createApplicant: c, isLoading: d } = lr(), m = e || ((z = s.applicantForm) == null ? void 0 : z.workflowKey);
|
|
4773
|
+
if (!m)
|
|
4762
4774
|
throw new Error(
|
|
4763
4775
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
4764
4776
|
);
|
|
4765
|
-
const w = t || ((
|
|
4777
|
+
const w = t || ((Fe = s.applicantForm) == null ? void 0 : Fe.externalRefId) || "", [N, y] = x([]), [h, g] = x(!0), k = te(!1), b = te(!1);
|
|
4766
4778
|
ee(() => {
|
|
4767
4779
|
(async () => {
|
|
4768
|
-
if (!(k.current ||
|
|
4780
|
+
if (!(k.current || b.current)) {
|
|
4769
4781
|
k.current = !0, g(!0);
|
|
4770
4782
|
try {
|
|
4771
|
-
const
|
|
4783
|
+
const I = await l.getCountries("", s.locale || "en"), T = /* @__PURE__ */ new Set();
|
|
4772
4784
|
y(
|
|
4773
|
-
|
|
4774
|
-
),
|
|
4775
|
-
} catch (
|
|
4776
|
-
console.error("Failed to load countries:",
|
|
4785
|
+
I.map((S) => ({ value: S.abbreviation3 || S.abbreviation, label: S.name })).filter((S) => !S.value || T.has(S.value) ? !1 : (T.add(S.value), !0))
|
|
4786
|
+
), b.current = !0;
|
|
4787
|
+
} catch (I) {
|
|
4788
|
+
console.error("Failed to load countries:", I);
|
|
4777
4789
|
} finally {
|
|
4778
4790
|
g(!1), k.current = !1;
|
|
4779
4791
|
}
|
|
4780
4792
|
}
|
|
4781
4793
|
})();
|
|
4782
4794
|
}, []);
|
|
4783
|
-
const
|
|
4795
|
+
const p = Se(
|
|
4784
4796
|
() => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
|
|
4785
4797
|
[o == null ? void 0 : o.applicantFormPages]
|
|
4786
|
-
),
|
|
4787
|
-
const
|
|
4788
|
-
if (
|
|
4789
|
-
if (
|
|
4790
|
-
for (const
|
|
4791
|
-
for (const
|
|
4792
|
-
!
|
|
4793
|
-
return Array.from(
|
|
4794
|
-
}, [o == null ? void 0 : o.applicantFormRequiredFields,
|
|
4795
|
-
var
|
|
4796
|
-
if (
|
|
4797
|
-
const
|
|
4798
|
-
for (const
|
|
4799
|
-
return Array.from(
|
|
4798
|
+
), F = Se(() => {
|
|
4799
|
+
const u = new Set(qe), I = o == null ? void 0 : o.applicantFormRequiredFields;
|
|
4800
|
+
if (I) for (const T of I) u.add(T);
|
|
4801
|
+
if (p)
|
|
4802
|
+
for (const T of p)
|
|
4803
|
+
for (const S of T.fields)
|
|
4804
|
+
!S.isCustom && S.name && S.required && u.add(S.name);
|
|
4805
|
+
return Array.from(u);
|
|
4806
|
+
}, [o == null ? void 0 : o.applicantFormRequiredFields, p]), C = Se(() => {
|
|
4807
|
+
var T;
|
|
4808
|
+
if (p) {
|
|
4809
|
+
const S = p.flatMap((_) => _.fields).filter((_) => !_.isCustom && _.name).map((_) => _.name), R = new Set(S);
|
|
4810
|
+
for (const _ of qe) R.add(_);
|
|
4811
|
+
return Array.from(R);
|
|
4800
4812
|
}
|
|
4801
|
-
let
|
|
4802
|
-
(
|
|
4803
|
-
const
|
|
4804
|
-
for (const
|
|
4805
|
-
return Array.from(
|
|
4806
|
-
}, [(
|
|
4807
|
-
workflowKey:
|
|
4813
|
+
let u;
|
|
4814
|
+
(T = s.applicantForm) != null && T.visibleFields ? u = s.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? u = o.applicantFormVisibleFields : u = wt;
|
|
4815
|
+
const I = new Set(u);
|
|
4816
|
+
for (const S of qe) I.add(S);
|
|
4817
|
+
return Array.from(I);
|
|
4818
|
+
}, [(ve = s.applicantForm) == null ? void 0 : ve.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, p]), [v, K] = x({
|
|
4819
|
+
workflowKey: m,
|
|
4808
4820
|
firstName: "",
|
|
4809
4821
|
lastName: "",
|
|
4810
4822
|
title: "",
|
|
@@ -4828,374 +4840,504 @@ const Yr = ({
|
|
|
4828
4840
|
educationLevel: "",
|
|
4829
4841
|
occupation: "",
|
|
4830
4842
|
taxNumber: ""
|
|
4831
|
-
}), [
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4843
|
+
}), [Y, M] = x({}), [f, A] = x(0), [D, V] = x({}), [H, P] = x(null), [E, Z] = x(!1), j = (u, I) => K((T) => ({ ...T, [u]: I })), le = (u, I) => M((T) => ({ ...T, [u]: I })), re = Se(() => p ? p.filter(
|
|
4844
|
+
(u) => !u.conditionalOn || Y[u.conditionalOn] === "true"
|
|
4845
|
+
) : null, [p, Y]);
|
|
4846
|
+
ee(() => {
|
|
4847
|
+
re && f >= re.length && re.length > 0 && A(re.length - 1);
|
|
4848
|
+
}, [re == null ? void 0 : re.length]);
|
|
4849
|
+
const O = (u) => {
|
|
4850
|
+
var T;
|
|
4851
|
+
const I = {};
|
|
4852
|
+
for (const S of u.fields)
|
|
4853
|
+
if (S.isCustom) {
|
|
4854
|
+
if (S.required && S.paramName) {
|
|
4855
|
+
const R = Y[S.paramName], _ = S.displayText || S.label || S.paramName;
|
|
4856
|
+
S.customType === "checkbox" || S.customType === "link_checkbox" ? R !== "true" && (I[S.paramName] = `${_} is required.`) : (!R || R.trim() === "") && (I[S.paramName] = `${_} is required.`);
|
|
4839
4857
|
}
|
|
4840
|
-
} else if (
|
|
4841
|
-
const
|
|
4842
|
-
if (
|
|
4843
|
-
const
|
|
4844
|
-
|
|
4858
|
+
} else if (S.name) {
|
|
4859
|
+
const R = S.name;
|
|
4860
|
+
if (F.includes(R) && Ke(v[R])) {
|
|
4861
|
+
const _ = S.displayText || ((T = _e[R]) == null ? void 0 : T.label) || R;
|
|
4862
|
+
I[R] = `${_} is required.`;
|
|
4845
4863
|
}
|
|
4846
4864
|
}
|
|
4847
|
-
return
|
|
4848
|
-
},
|
|
4849
|
-
var
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4865
|
+
return I;
|
|
4866
|
+
}, L = async (u) => {
|
|
4867
|
+
var T;
|
|
4868
|
+
const I = re;
|
|
4869
|
+
if (I && !u) {
|
|
4870
|
+
const S = O(I[f]);
|
|
4871
|
+
if (Object.keys(S).length > 0) {
|
|
4872
|
+
V(S);
|
|
4854
4873
|
return;
|
|
4855
4874
|
}
|
|
4856
|
-
|
|
4875
|
+
V({}), A((R) => R + 1);
|
|
4857
4876
|
return;
|
|
4858
4877
|
}
|
|
4859
|
-
if (
|
|
4860
|
-
let
|
|
4861
|
-
for (const
|
|
4862
|
-
|
|
4863
|
-
if (Object.keys(
|
|
4864
|
-
|
|
4878
|
+
if (I) {
|
|
4879
|
+
let S = {};
|
|
4880
|
+
for (const R of I)
|
|
4881
|
+
S = { ...S, ...O(R) };
|
|
4882
|
+
if (Object.keys(S).length > 0) {
|
|
4883
|
+
V(S);
|
|
4865
4884
|
return;
|
|
4866
4885
|
}
|
|
4867
4886
|
}
|
|
4868
|
-
Z(!0),
|
|
4887
|
+
Z(!0), P(null);
|
|
4869
4888
|
try {
|
|
4870
4889
|
if (!v.externalRefId || v.externalRefId.trim() === "") {
|
|
4871
|
-
|
|
4890
|
+
P("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
4872
4891
|
return;
|
|
4873
4892
|
}
|
|
4874
|
-
for (const
|
|
4875
|
-
if (
|
|
4876
|
-
const
|
|
4877
|
-
|
|
4893
|
+
for (const W of F)
|
|
4894
|
+
if (Ke(v[W])) {
|
|
4895
|
+
const X = ((T = _e[W]) == null ? void 0 : T.label) || W;
|
|
4896
|
+
P(`${X} is required.`);
|
|
4878
4897
|
return;
|
|
4879
4898
|
}
|
|
4880
|
-
const
|
|
4899
|
+
const S = {
|
|
4881
4900
|
workflowKey: v.workflowKey,
|
|
4882
4901
|
externalRefId: v.externalRefId.trim()
|
|
4883
4902
|
};
|
|
4884
|
-
|
|
4885
|
-
if (
|
|
4886
|
-
const
|
|
4887
|
-
|
|
4903
|
+
C.forEach((W) => {
|
|
4904
|
+
if (W === "externalRefId") return;
|
|
4905
|
+
const X = v[W];
|
|
4906
|
+
Ke(X) || (S[W] = X);
|
|
4888
4907
|
});
|
|
4889
|
-
const
|
|
4890
|
-
if (
|
|
4891
|
-
for (const
|
|
4892
|
-
for (const
|
|
4893
|
-
if (
|
|
4894
|
-
const
|
|
4895
|
-
|
|
4908
|
+
const R = [];
|
|
4909
|
+
if (I) {
|
|
4910
|
+
for (const W of I)
|
|
4911
|
+
for (const X of W.fields)
|
|
4912
|
+
if (X.isCustom && X.paramName) {
|
|
4913
|
+
const ge = Y[X.paramName] ?? "";
|
|
4914
|
+
R.push({ paramName: X.paramName, paramValue: ge });
|
|
4896
4915
|
}
|
|
4897
4916
|
}
|
|
4898
|
-
|
|
4899
|
-
const
|
|
4900
|
-
r(
|
|
4901
|
-
} catch (
|
|
4902
|
-
console.error("Error creating applicant:",
|
|
4917
|
+
R.length > 0 && (S.applicantAdditionalDatas = R);
|
|
4918
|
+
const _ = await c(S);
|
|
4919
|
+
r(_.applicantId);
|
|
4920
|
+
} catch (S) {
|
|
4921
|
+
console.error("Error creating applicant:", S), P(S.message || "Failed to create applicant");
|
|
4903
4922
|
} finally {
|
|
4904
4923
|
Z(!1);
|
|
4905
4924
|
}
|
|
4906
|
-
},
|
|
4907
|
-
var
|
|
4908
|
-
const
|
|
4909
|
-
if (!
|
|
4910
|
-
const
|
|
4911
|
-
switch (
|
|
4925
|
+
}, ae = (u, I, T) => {
|
|
4926
|
+
var We;
|
|
4927
|
+
const S = _e[u];
|
|
4928
|
+
if (!S) return null;
|
|
4929
|
+
const R = F.includes(u), _ = D[u], W = T || S.label, X = I ?? u, ge = { required: R };
|
|
4930
|
+
switch (S.type) {
|
|
4912
4931
|
case "select":
|
|
4913
|
-
if (
|
|
4932
|
+
if (u === "country" || u === "nationality" || u === "taxCountry" || u === "countryOfBirth")
|
|
4914
4933
|
return /* @__PURE__ */ a(
|
|
4915
|
-
|
|
4934
|
+
Ae,
|
|
4916
4935
|
{
|
|
4917
|
-
...
|
|
4918
|
-
label:
|
|
4919
|
-
value: v[
|
|
4920
|
-
onChange: (
|
|
4921
|
-
options: [{ value: "", label: `Select ${
|
|
4936
|
+
...ge,
|
|
4937
|
+
label: W,
|
|
4938
|
+
value: v[u] || "",
|
|
4939
|
+
onChange: (ne) => j(u, ne.target.value),
|
|
4940
|
+
options: [{ value: "", label: `Select ${W.toLowerCase()}...` }, ...N],
|
|
4922
4941
|
disabled: h
|
|
4923
4942
|
},
|
|
4924
|
-
|
|
4943
|
+
X
|
|
4925
4944
|
);
|
|
4926
|
-
if (
|
|
4945
|
+
if (u === "salutation")
|
|
4927
4946
|
return /* @__PURE__ */ a(
|
|
4928
|
-
|
|
4947
|
+
Ae,
|
|
4929
4948
|
{
|
|
4930
|
-
...
|
|
4931
|
-
label:
|
|
4932
|
-
value: ((
|
|
4933
|
-
onChange: (
|
|
4949
|
+
...ge,
|
|
4950
|
+
label: W,
|
|
4951
|
+
value: ((We = v[u]) == null ? void 0 : We.toString()) || "",
|
|
4952
|
+
onChange: (ne) => j(u, ne.target.value ? Number(ne.target.value) : null),
|
|
4934
4953
|
options: [
|
|
4935
4954
|
{ value: "", label: "Select salutation..." },
|
|
4936
|
-
{ value:
|
|
4937
|
-
{ value:
|
|
4938
|
-
{ value:
|
|
4955
|
+
{ value: Be.Male.toString(), label: "Male" },
|
|
4956
|
+
{ value: Be.Female.toString(), label: "Female" },
|
|
4957
|
+
{ value: Be.Other.toString(), label: "Other" }
|
|
4939
4958
|
]
|
|
4940
4959
|
},
|
|
4941
|
-
|
|
4960
|
+
X
|
|
4942
4961
|
);
|
|
4943
|
-
if (
|
|
4944
|
-
const
|
|
4962
|
+
if (u === "defaultLanguage") {
|
|
4963
|
+
const ne = o != null && o.allowedLanguages && o.allowedLanguages.length > 0 ? Qe.filter((ze) => o.allowedLanguages.includes(ze.value)) : Qe;
|
|
4945
4964
|
return /* @__PURE__ */ a(
|
|
4946
|
-
|
|
4965
|
+
Ae,
|
|
4947
4966
|
{
|
|
4948
|
-
...
|
|
4949
|
-
label:
|
|
4950
|
-
value: v[
|
|
4951
|
-
onChange: (
|
|
4952
|
-
options: [{ value: "", label: "Select language..." }, ...
|
|
4967
|
+
...ge,
|
|
4968
|
+
label: W,
|
|
4969
|
+
value: v[u] || "",
|
|
4970
|
+
onChange: (ze) => j(u, ze.target.value),
|
|
4971
|
+
options: [{ value: "", label: "Select language..." }, ...ne]
|
|
4953
4972
|
},
|
|
4954
|
-
|
|
4973
|
+
X
|
|
4955
4974
|
);
|
|
4956
4975
|
}
|
|
4957
4976
|
return null;
|
|
4958
4977
|
case "multiselect":
|
|
4959
|
-
return
|
|
4960
|
-
|
|
4978
|
+
return u === "otherNationality" ? /* @__PURE__ */ a(
|
|
4979
|
+
or,
|
|
4961
4980
|
{
|
|
4962
|
-
...
|
|
4963
|
-
label:
|
|
4964
|
-
value: v[
|
|
4965
|
-
onChange: (
|
|
4981
|
+
...ge,
|
|
4982
|
+
label: W,
|
|
4983
|
+
value: v[u] || [],
|
|
4984
|
+
onChange: (ne) => j(u, ne),
|
|
4966
4985
|
options: N,
|
|
4967
4986
|
placeholder: "Select other nationalities...",
|
|
4968
4987
|
disabled: h
|
|
4969
4988
|
},
|
|
4970
|
-
|
|
4989
|
+
X
|
|
4971
4990
|
) : null;
|
|
4972
4991
|
case "date":
|
|
4973
4992
|
return /* @__PURE__ */ a(
|
|
4974
|
-
|
|
4993
|
+
ue,
|
|
4975
4994
|
{
|
|
4976
|
-
...
|
|
4995
|
+
...ge,
|
|
4977
4996
|
type: "date",
|
|
4978
|
-
label:
|
|
4979
|
-
value: v[
|
|
4980
|
-
onChange: (
|
|
4981
|
-
error:
|
|
4997
|
+
label: W,
|
|
4998
|
+
value: v[u] || "",
|
|
4999
|
+
onChange: (ne) => j(u, ne.target.value),
|
|
5000
|
+
error: _
|
|
4982
5001
|
},
|
|
4983
|
-
|
|
5002
|
+
X
|
|
4984
5003
|
);
|
|
4985
5004
|
case "email":
|
|
4986
5005
|
return /* @__PURE__ */ a(
|
|
4987
|
-
|
|
5006
|
+
ue,
|
|
4988
5007
|
{
|
|
4989
|
-
...
|
|
5008
|
+
...ge,
|
|
4990
5009
|
type: "email",
|
|
4991
|
-
label:
|
|
4992
|
-
value: v[
|
|
4993
|
-
onChange: (
|
|
4994
|
-
error:
|
|
5010
|
+
label: W,
|
|
5011
|
+
value: v[u] || "",
|
|
5012
|
+
onChange: (ne) => j(u, ne.target.value),
|
|
5013
|
+
error: _
|
|
4995
5014
|
},
|
|
4996
|
-
|
|
5015
|
+
X
|
|
4997
5016
|
);
|
|
4998
5017
|
case "tel":
|
|
4999
5018
|
return /* @__PURE__ */ a(
|
|
5000
|
-
|
|
5019
|
+
ue,
|
|
5001
5020
|
{
|
|
5002
|
-
...
|
|
5021
|
+
...ge,
|
|
5003
5022
|
type: "tel",
|
|
5004
|
-
label:
|
|
5005
|
-
value: v[
|
|
5006
|
-
onChange: (
|
|
5007
|
-
error:
|
|
5023
|
+
label: W,
|
|
5024
|
+
value: v[u] || "",
|
|
5025
|
+
onChange: (ne) => j(u, ne.target.value),
|
|
5026
|
+
error: _
|
|
5008
5027
|
},
|
|
5009
|
-
|
|
5028
|
+
X
|
|
5010
5029
|
);
|
|
5011
5030
|
default:
|
|
5012
5031
|
return /* @__PURE__ */ a(
|
|
5013
|
-
|
|
5032
|
+
ue,
|
|
5014
5033
|
{
|
|
5015
|
-
...
|
|
5034
|
+
...ge,
|
|
5016
5035
|
type: "text",
|
|
5017
|
-
label:
|
|
5018
|
-
value: v[
|
|
5019
|
-
onChange: (
|
|
5020
|
-
error:
|
|
5036
|
+
label: W,
|
|
5037
|
+
value: v[u] || "",
|
|
5038
|
+
onChange: (ne) => j(u, ne.target.value),
|
|
5039
|
+
error: _
|
|
5021
5040
|
},
|
|
5022
|
-
|
|
5041
|
+
X
|
|
5023
5042
|
);
|
|
5024
5043
|
}
|
|
5025
|
-
},
|
|
5026
|
-
if (!
|
|
5027
|
-
const
|
|
5028
|
-
|
|
5044
|
+
}, J = (u, I) => {
|
|
5045
|
+
if (!u.paramName) return null;
|
|
5046
|
+
const T = D[u.paramName], S = u.displayText || u.label || u.paramName;
|
|
5047
|
+
if (u.customType === "checkbox")
|
|
5048
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
5049
|
+
/* @__PURE__ */ i(
|
|
5050
|
+
"label",
|
|
5051
|
+
{
|
|
5052
|
+
className: "metakyc-option-label",
|
|
5053
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
5054
|
+
children: [
|
|
5055
|
+
/* @__PURE__ */ a(
|
|
5056
|
+
"input",
|
|
5057
|
+
{
|
|
5058
|
+
type: "checkbox",
|
|
5059
|
+
checked: Y[u.paramName] === "true",
|
|
5060
|
+
onChange: (R) => le(u.paramName, R.target.checked ? "true" : "false"),
|
|
5061
|
+
className: "metakyc-option-input",
|
|
5062
|
+
style: Oe
|
|
5063
|
+
}
|
|
5064
|
+
),
|
|
5065
|
+
/* @__PURE__ */ i(
|
|
5066
|
+
"span",
|
|
5067
|
+
{
|
|
5068
|
+
className: "metakyc-option-text",
|
|
5069
|
+
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5070
|
+
children: [
|
|
5071
|
+
S,
|
|
5072
|
+
u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5073
|
+
]
|
|
5074
|
+
}
|
|
5075
|
+
)
|
|
5076
|
+
]
|
|
5077
|
+
}
|
|
5078
|
+
),
|
|
5079
|
+
T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: T })
|
|
5080
|
+
] }, `custom-${I}`);
|
|
5081
|
+
if (u.customType === "link_checkbox")
|
|
5082
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
5083
|
+
/* @__PURE__ */ i(
|
|
5084
|
+
"label",
|
|
5085
|
+
{
|
|
5086
|
+
className: "metakyc-option-label",
|
|
5087
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
5088
|
+
children: [
|
|
5089
|
+
/* @__PURE__ */ a(
|
|
5090
|
+
"input",
|
|
5091
|
+
{
|
|
5092
|
+
type: "checkbox",
|
|
5093
|
+
checked: Y[u.paramName] === "true",
|
|
5094
|
+
onChange: (R) => le(u.paramName, R.target.checked ? "true" : "false"),
|
|
5095
|
+
className: "metakyc-option-input",
|
|
5096
|
+
style: { ...Oe, alignSelf: "flex-start", marginTop: "2px" }
|
|
5097
|
+
}
|
|
5098
|
+
),
|
|
5099
|
+
/* @__PURE__ */ i(
|
|
5100
|
+
"span",
|
|
5101
|
+
{
|
|
5102
|
+
className: "metakyc-option-text",
|
|
5103
|
+
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5104
|
+
children: [
|
|
5105
|
+
S,
|
|
5106
|
+
" ",
|
|
5107
|
+
u.linkUrl && /* @__PURE__ */ a(
|
|
5108
|
+
"a",
|
|
5109
|
+
{
|
|
5110
|
+
href: u.linkUrl,
|
|
5111
|
+
target: "_blank",
|
|
5112
|
+
rel: "noopener noreferrer",
|
|
5113
|
+
className: "underline",
|
|
5114
|
+
style: { color: "var(--metakyc-primary, #2563eb)" },
|
|
5115
|
+
onClick: (R) => R.stopPropagation(),
|
|
5116
|
+
children: u.linkText || u.linkUrl
|
|
5117
|
+
}
|
|
5118
|
+
),
|
|
5119
|
+
u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5120
|
+
]
|
|
5121
|
+
}
|
|
5122
|
+
)
|
|
5123
|
+
]
|
|
5124
|
+
}
|
|
5125
|
+
),
|
|
5126
|
+
T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: T })
|
|
5127
|
+
] }, `custom-${I}`);
|
|
5128
|
+
if (u.customType === "group_checkbox") {
|
|
5129
|
+
const R = (Y[u.paramName] || "").split(",").filter(Boolean);
|
|
5130
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
|
|
5131
|
+
/* @__PURE__ */ i(
|
|
5132
|
+
"div",
|
|
5133
|
+
{
|
|
5134
|
+
className: "text-sm font-medium",
|
|
5135
|
+
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5136
|
+
children: [
|
|
5137
|
+
S,
|
|
5138
|
+
u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5139
|
+
]
|
|
5140
|
+
}
|
|
5141
|
+
),
|
|
5142
|
+
/* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (u.options || []).map((_) => /* @__PURE__ */ i(
|
|
5143
|
+
"label",
|
|
5144
|
+
{
|
|
5145
|
+
className: "metakyc-option-label",
|
|
5146
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
5147
|
+
children: [
|
|
5148
|
+
/* @__PURE__ */ a(
|
|
5149
|
+
"input",
|
|
5150
|
+
{
|
|
5151
|
+
type: "checkbox",
|
|
5152
|
+
checked: R.includes(_.value),
|
|
5153
|
+
onChange: (W) => {
|
|
5154
|
+
const X = W.target.checked ? [...R, _.value] : R.filter((ge) => ge !== _.value);
|
|
5155
|
+
le(u.paramName, X.join(","));
|
|
5156
|
+
},
|
|
5157
|
+
className: "metakyc-option-input",
|
|
5158
|
+
style: Oe
|
|
5159
|
+
}
|
|
5160
|
+
),
|
|
5161
|
+
/* @__PURE__ */ a(
|
|
5162
|
+
"span",
|
|
5163
|
+
{
|
|
5164
|
+
className: "metakyc-option-text",
|
|
5165
|
+
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5166
|
+
children: _.label
|
|
5167
|
+
}
|
|
5168
|
+
)
|
|
5169
|
+
]
|
|
5170
|
+
},
|
|
5171
|
+
_.value
|
|
5172
|
+
)) }),
|
|
5173
|
+
T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: T })
|
|
5174
|
+
] }, `custom-${I}`);
|
|
5175
|
+
}
|
|
5176
|
+
return u.customType === "radio_group" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
|
|
5029
5177
|
/* @__PURE__ */ i(
|
|
5030
|
-
"
|
|
5178
|
+
"div",
|
|
5031
5179
|
{
|
|
5032
|
-
className: "
|
|
5180
|
+
className: "text-sm font-medium",
|
|
5033
5181
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5034
5182
|
children: [
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
{
|
|
5038
|
-
type: "checkbox",
|
|
5039
|
-
checked: V[p.paramName] === "true",
|
|
5040
|
-
onChange: (z) => de(p.paramName, z.target.checked ? "true" : "false"),
|
|
5041
|
-
className: "h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
|
|
5042
|
-
}
|
|
5043
|
-
),
|
|
5044
|
-
/* @__PURE__ */ i("span", { children: [
|
|
5045
|
-
E,
|
|
5046
|
-
p.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5047
|
-
] })
|
|
5183
|
+
S,
|
|
5184
|
+
u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5048
5185
|
]
|
|
5049
5186
|
}
|
|
5050
5187
|
),
|
|
5051
|
-
|
|
5052
|
-
] }, `custom-${L}`) : p.customType === "link_checkbox" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
5053
|
-
/* @__PURE__ */ i(
|
|
5188
|
+
/* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (u.options || []).map((R) => /* @__PURE__ */ i(
|
|
5054
5189
|
"label",
|
|
5055
5190
|
{
|
|
5056
|
-
className: "
|
|
5057
|
-
style: {
|
|
5191
|
+
className: "metakyc-option-label",
|
|
5192
|
+
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
5058
5193
|
children: [
|
|
5059
5194
|
/* @__PURE__ */ a(
|
|
5060
5195
|
"input",
|
|
5061
5196
|
{
|
|
5062
|
-
type: "
|
|
5063
|
-
checked:
|
|
5064
|
-
onChange: (
|
|
5065
|
-
|
|
5197
|
+
type: "radio",
|
|
5198
|
+
checked: Y[u.paramName] === R.value,
|
|
5199
|
+
onChange: () => le(u.paramName, R.value),
|
|
5200
|
+
name: `radio-group-${u.paramName}-${I}`,
|
|
5201
|
+
className: "metakyc-option-input",
|
|
5202
|
+
style: Oe
|
|
5066
5203
|
}
|
|
5067
5204
|
),
|
|
5068
|
-
/* @__PURE__ */
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
"
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
rel: "noopener noreferrer",
|
|
5077
|
-
className: "underline",
|
|
5078
|
-
style: { color: "var(--metakyc-primary, #2563eb)" },
|
|
5079
|
-
onClick: (z) => z.stopPropagation(),
|
|
5080
|
-
children: p.linkText || p.linkUrl
|
|
5081
|
-
}
|
|
5082
|
-
),
|
|
5083
|
-
p.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
5084
|
-
] })
|
|
5205
|
+
/* @__PURE__ */ a(
|
|
5206
|
+
"span",
|
|
5207
|
+
{
|
|
5208
|
+
className: "metakyc-option-text",
|
|
5209
|
+
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
5210
|
+
children: R.label
|
|
5211
|
+
}
|
|
5212
|
+
)
|
|
5085
5213
|
]
|
|
5086
|
-
}
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5214
|
+
},
|
|
5215
|
+
R.value
|
|
5216
|
+
)) }),
|
|
5217
|
+
T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: T })
|
|
5218
|
+
] }, `custom-${I}`) : /* @__PURE__ */ a(
|
|
5219
|
+
ue,
|
|
5091
5220
|
{
|
|
5092
5221
|
type: "text",
|
|
5093
|
-
label: `${
|
|
5094
|
-
value:
|
|
5095
|
-
onChange: (
|
|
5096
|
-
required:
|
|
5097
|
-
error:
|
|
5222
|
+
label: `${S}${u.required ? " *" : ""}`,
|
|
5223
|
+
value: Y[u.paramName] || "",
|
|
5224
|
+
onChange: (R) => le(u.paramName, R.target.value),
|
|
5225
|
+
required: u.required,
|
|
5226
|
+
error: T
|
|
5098
5227
|
},
|
|
5099
|
-
`custom-${
|
|
5228
|
+
`custom-${I}`
|
|
5100
5229
|
);
|
|
5101
|
-
},
|
|
5102
|
-
const
|
|
5103
|
-
return /* @__PURE__ */ a("div", { className:
|
|
5230
|
+
}, ce = (u) => /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4", children: u.fields.map((I, T) => {
|
|
5231
|
+
const S = I.colSpan === 1 ? "col-span-1" : "col-span-2", R = I.isCustom ? `custom-${T}-${I.paramName}` : `builtin-${I.name}-${T}`;
|
|
5232
|
+
return /* @__PURE__ */ a("div", { className: S, children: I.isCustom ? J(I, T) : ae(I.name, R, I.displayText) }, R);
|
|
5104
5233
|
}) });
|
|
5105
5234
|
if (h)
|
|
5106
|
-
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a(
|
|
5107
|
-
/* @__PURE__ */ a(
|
|
5235
|
+
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
5236
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
5108
5237
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
|
|
5109
5238
|
] }) }) });
|
|
5110
|
-
if (
|
|
5111
|
-
const
|
|
5112
|
-
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(
|
|
5113
|
-
/* @__PURE__ */ a(
|
|
5114
|
-
|
|
5115
|
-
{
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5239
|
+
if (re) {
|
|
5240
|
+
const u = re[f] ?? re[0], I = f === 0, T = f === re.length - 1, S = re.length, R = Object.values(D);
|
|
5241
|
+
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i($, { children: [
|
|
5242
|
+
/* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(He, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
|
|
5243
|
+
/* @__PURE__ */ i(B, { children: [
|
|
5244
|
+
(u.title || u.subtitle || u.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
5245
|
+
u.title && /* @__PURE__ */ a(
|
|
5246
|
+
"h3",
|
|
5247
|
+
{
|
|
5248
|
+
className: "font-semibold text-base",
|
|
5249
|
+
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
5250
|
+
children: u.title
|
|
5251
|
+
}
|
|
5252
|
+
),
|
|
5253
|
+
u.subtitle && /* @__PURE__ */ a(
|
|
5254
|
+
"p",
|
|
5255
|
+
{
|
|
5256
|
+
className: "text-sm mt-0.5",
|
|
5257
|
+
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
5258
|
+
children: u.subtitle
|
|
5259
|
+
}
|
|
5260
|
+
),
|
|
5261
|
+
u.description && u.description !== u.subtitle && /* @__PURE__ */ a(
|
|
5262
|
+
"p",
|
|
5263
|
+
{
|
|
5264
|
+
className: "text-xs mt-1",
|
|
5265
|
+
style: { color: "var(--metakyc-text-secondary, #6b7280)" },
|
|
5266
|
+
children: u.description
|
|
5267
|
+
}
|
|
5268
|
+
)
|
|
5269
|
+
] }),
|
|
5270
|
+
(H || R.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
5123
5271
|
H && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
|
|
5124
5272
|
/* @__PURE__ */ a("strong", { children: "Error:" }),
|
|
5125
5273
|
" ",
|
|
5126
5274
|
H
|
|
5127
5275
|
] }),
|
|
5128
|
-
|
|
5276
|
+
R.map((_, W) => /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: _ }, W))
|
|
5129
5277
|
] }),
|
|
5130
|
-
|
|
5131
|
-
|
|
5278
|
+
S > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
5279
|
+
re.map((_, W) => /* @__PURE__ */ a(
|
|
5132
5280
|
"div",
|
|
5133
5281
|
{
|
|
5134
|
-
className: `h-1.5 rounded-full transition-all ${
|
|
5135
|
-
style:
|
|
5282
|
+
className: `h-1.5 rounded-full transition-all ${W === f ? "bg-blue-600 flex-1" : W < f ? "bg-blue-300 w-8" : "bg-gray-200 w-8"}`,
|
|
5283
|
+
style: W === f ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : W < f ? { backgroundColor: "var(--metakyc-primary-light, #dbeafe)", opacity: 0.7 } : void 0
|
|
5136
5284
|
},
|
|
5137
|
-
|
|
5285
|
+
W
|
|
5138
5286
|
)),
|
|
5139
5287
|
/* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
5140
5288
|
f + 1,
|
|
5141
5289
|
" / ",
|
|
5142
|
-
|
|
5290
|
+
S
|
|
5143
5291
|
] })
|
|
5144
5292
|
] }),
|
|
5145
|
-
|
|
5293
|
+
ce(u)
|
|
5146
5294
|
] }),
|
|
5147
|
-
/* @__PURE__ */ i(
|
|
5295
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
5148
5296
|
/* @__PURE__ */ i("div", { children: [
|
|
5149
|
-
!
|
|
5297
|
+
!I && /* @__PURE__ */ a(
|
|
5150
5298
|
q,
|
|
5151
5299
|
{
|
|
5152
5300
|
type: "button",
|
|
5153
5301
|
variant: "outline",
|
|
5154
5302
|
onClick: () => {
|
|
5155
|
-
A((
|
|
5303
|
+
A((_) => _ - 1), V({});
|
|
5156
5304
|
},
|
|
5157
|
-
disabled:
|
|
5305
|
+
disabled: E || d,
|
|
5158
5306
|
children: "Previous"
|
|
5159
5307
|
}
|
|
5160
5308
|
),
|
|
5161
|
-
|
|
5309
|
+
I && n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled: E || d, children: "Cancel" })
|
|
5162
5310
|
] }),
|
|
5163
5311
|
/* @__PURE__ */ a(
|
|
5164
5312
|
q,
|
|
5165
5313
|
{
|
|
5166
5314
|
type: "button",
|
|
5167
|
-
isLoading:
|
|
5168
|
-
onClick: () => T
|
|
5169
|
-
children:
|
|
5315
|
+
isLoading: E || d,
|
|
5316
|
+
onClick: () => L(T),
|
|
5317
|
+
children: T ? "Submit" : "Next"
|
|
5170
5318
|
}
|
|
5171
5319
|
)
|
|
5172
5320
|
] })
|
|
5173
5321
|
] }) });
|
|
5174
5322
|
}
|
|
5175
|
-
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a("form", { onSubmit: async (
|
|
5176
|
-
|
|
5177
|
-
}, children: /* @__PURE__ */ i(
|
|
5178
|
-
/* @__PURE__ */ a(
|
|
5179
|
-
|
|
5180
|
-
{
|
|
5181
|
-
title: "Create Applicant",
|
|
5182
|
-
subtitle: "Please fill in the required information to begin the KYC verification process."
|
|
5183
|
-
}
|
|
5184
|
-
) }),
|
|
5185
|
-
/* @__PURE__ */ i($, { children: [
|
|
5323
|
+
return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a("form", { onSubmit: async (u) => {
|
|
5324
|
+
u.preventDefault(), await L(!0);
|
|
5325
|
+
}, children: /* @__PURE__ */ i($, { children: [
|
|
5326
|
+
/* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(He, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
|
|
5327
|
+
/* @__PURE__ */ i(B, { children: [
|
|
5186
5328
|
H && /* @__PURE__ */ a("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
|
|
5187
5329
|
/* @__PURE__ */ a("strong", { children: "Error:" }),
|
|
5188
5330
|
" ",
|
|
5189
5331
|
H
|
|
5190
5332
|
] }) }),
|
|
5191
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children:
|
|
5333
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: C.map((u) => ae(u)) })
|
|
5192
5334
|
] }),
|
|
5193
|
-
/* @__PURE__ */ i(
|
|
5194
|
-
n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled:
|
|
5195
|
-
/* @__PURE__ */ a(q, { type: "submit", isLoading:
|
|
5335
|
+
/* @__PURE__ */ i(me, { className: "flex justify-between", children: [
|
|
5336
|
+
n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled: E || d, children: "Cancel" }),
|
|
5337
|
+
/* @__PURE__ */ a(q, { type: "submit", isLoading: E || d, children: "Create Applicant" })
|
|
5196
5338
|
] })
|
|
5197
5339
|
] }) }) });
|
|
5198
|
-
},
|
|
5340
|
+
}, Zr = ({
|
|
5199
5341
|
applicantId: e,
|
|
5200
5342
|
onComplete: t,
|
|
5201
5343
|
onError: r,
|
|
@@ -5207,33 +5349,33 @@ const Yr = ({
|
|
|
5207
5349
|
currentStep: o,
|
|
5208
5350
|
steps: c,
|
|
5209
5351
|
workflowKey: d,
|
|
5210
|
-
nextWorkflowKey:
|
|
5352
|
+
nextWorkflowKey: m,
|
|
5211
5353
|
hasWorkflowChanged: w,
|
|
5212
5354
|
isLoading: N,
|
|
5213
5355
|
error: y,
|
|
5214
5356
|
moveBack: h,
|
|
5215
5357
|
refreshProgress: g
|
|
5216
|
-
} =
|
|
5217
|
-
if (
|
|
5358
|
+
} = tr(e), [k, b] = ye.useState(!1);
|
|
5359
|
+
if (ye.useEffect(() => {
|
|
5218
5360
|
y && r && r(y);
|
|
5219
|
-
}, [y, r]),
|
|
5361
|
+
}, [y, r]), ye.useEffect(() => {
|
|
5220
5362
|
l != null && l.workflowResult && t && t(l.workflowResult);
|
|
5221
|
-
}, [l == null ? void 0 : l.workflowResult, t]),
|
|
5363
|
+
}, [l == null ? void 0 : l.workflowResult, t]), ye.useEffect(() => {
|
|
5222
5364
|
n === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
5223
|
-
}, [n]),
|
|
5224
|
-
w &&
|
|
5365
|
+
}, [n]), ye.useEffect(() => {
|
|
5366
|
+
w && b(!1);
|
|
5225
5367
|
}, [w]), N || !l)
|
|
5226
|
-
return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a(
|
|
5227
|
-
/* @__PURE__ */ a(
|
|
5368
|
+
return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
5369
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
5228
5370
|
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
|
|
5229
5371
|
] }) }) });
|
|
5230
5372
|
if (y)
|
|
5231
|
-
return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a(
|
|
5373
|
+
return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
|
|
5232
5374
|
/* @__PURE__ */ a("p", { className: "text-danger-500 text-lg mb-4", children: "An error occurred" }),
|
|
5233
5375
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: y.message })
|
|
5234
5376
|
] }) }) }) });
|
|
5235
5377
|
if (w && !k)
|
|
5236
|
-
return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a(
|
|
5378
|
+
return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
|
|
5237
5379
|
/* @__PURE__ */ a("div", { className: "mb-6", children: /* @__PURE__ */ a("div", { className: "inline-flex items-center justify-center w-16 h-16 rounded-full bg-blue-100 dark:bg-blue-900 mb-4", children: /* @__PURE__ */ a("svg", { className: "w-8 h-8 text-blue-600 dark:text-blue-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }) }),
|
|
5238
5380
|
/* @__PURE__ */ a("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white mb-2", children: "Workflow Transition" }),
|
|
5239
5381
|
/* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mb-6", children: "Your application workflow has been updated based on your progress." }),
|
|
@@ -5246,7 +5388,7 @@ const Yr = ({
|
|
|
5246
5388
|
/* @__PURE__ */ a("svg", { className: "w-6 h-6 text-gray-400 mx-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) }),
|
|
5247
5389
|
/* @__PURE__ */ i("div", { className: "text-right", children: [
|
|
5248
5390
|
/* @__PURE__ */ a("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "New Workflow" }),
|
|
5249
|
-
/* @__PURE__ */ a("p", { className: "font-medium text-blue-600 dark:text-blue-400", children:
|
|
5391
|
+
/* @__PURE__ */ a("p", { className: "font-medium text-blue-600 dark:text-blue-400", children: m })
|
|
5250
5392
|
] })
|
|
5251
5393
|
] }),
|
|
5252
5394
|
l.nextWorkflowName && /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-2 text-xs", children: l.nextWorkflowName })
|
|
@@ -5254,15 +5396,15 @@ const Yr = ({
|
|
|
5254
5396
|
/* @__PURE__ */ a(
|
|
5255
5397
|
"button",
|
|
5256
5398
|
{
|
|
5257
|
-
onClick: () =>
|
|
5399
|
+
onClick: () => b(!0),
|
|
5258
5400
|
className: "px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors",
|
|
5259
5401
|
children: "Continue with New Workflow"
|
|
5260
5402
|
}
|
|
5261
5403
|
)
|
|
5262
5404
|
] }) }) }) });
|
|
5263
|
-
if (l.status ===
|
|
5405
|
+
if (l.status === xe.Finished || l.status === xe.OnHold)
|
|
5264
5406
|
return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a(
|
|
5265
|
-
|
|
5407
|
+
Ge,
|
|
5266
5408
|
{
|
|
5267
5409
|
kycStatus: l.kycStatus,
|
|
5268
5410
|
reviewStatus: l.reviewStatus,
|
|
@@ -5275,55 +5417,55 @@ const Yr = ({
|
|
|
5275
5417
|
}
|
|
5276
5418
|
) });
|
|
5277
5419
|
if (!o)
|
|
5278
|
-
return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a(
|
|
5279
|
-
/* @__PURE__ */ a(
|
|
5280
|
-
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: l.status ===
|
|
5420
|
+
return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
|
|
5421
|
+
/* @__PURE__ */ a(be, { className: "my-8" }),
|
|
5422
|
+
/* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: l.status === xe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
5281
5423
|
] }) }) });
|
|
5282
|
-
const
|
|
5424
|
+
const p = (v) => {
|
|
5283
5425
|
switch (v) {
|
|
5284
|
-
case
|
|
5426
|
+
case U.Overview:
|
|
5285
5427
|
return "Overview";
|
|
5286
|
-
case
|
|
5428
|
+
case U.Questionaries:
|
|
5287
5429
|
return "Questionnaire";
|
|
5288
|
-
case
|
|
5430
|
+
case U.UploadDocument:
|
|
5289
5431
|
return "Documents";
|
|
5290
|
-
case
|
|
5432
|
+
case U.IdentitySdk:
|
|
5291
5433
|
return "Identity";
|
|
5292
|
-
case
|
|
5434
|
+
case U.RiskScoring:
|
|
5293
5435
|
return "Risk Assessment";
|
|
5294
|
-
case
|
|
5436
|
+
case U.InvestorCategorization:
|
|
5295
5437
|
return "Investor Categorization";
|
|
5296
|
-
case
|
|
5438
|
+
case U.AppropriatenessTest:
|
|
5297
5439
|
return "Appropriateness Test";
|
|
5298
|
-
case
|
|
5440
|
+
case U.AdditionalData:
|
|
5299
5441
|
return "Additional Data";
|
|
5300
|
-
case
|
|
5442
|
+
case U.ManualReview:
|
|
5301
5443
|
return "Review";
|
|
5302
5444
|
default:
|
|
5303
5445
|
return "";
|
|
5304
5446
|
}
|
|
5305
|
-
},
|
|
5306
|
-
const v = c.filter((f) => f.visibility !== !1), K = v.findIndex((f) => f.order === o.order),
|
|
5447
|
+
}, F = () => {
|
|
5448
|
+
const v = c.filter((f) => f.visibility !== !1), K = v.findIndex((f) => f.order === o.order), Y = K >= 0 ? K + 1 : 1, M = v.length;
|
|
5307
5449
|
return /* @__PURE__ */ i("div", { className: "mb-6", children: [
|
|
5308
5450
|
/* @__PURE__ */ i("div", { className: "flex items-start justify-between mb-4", children: [
|
|
5309
|
-
/* @__PURE__ */ a(
|
|
5310
|
-
/* @__PURE__ */ i(
|
|
5451
|
+
/* @__PURE__ */ a(He, {}),
|
|
5452
|
+
/* @__PURE__ */ i(Ne, { variant: l.status === 1 ? "info" : "success", children: [
|
|
5311
5453
|
"Step ",
|
|
5312
|
-
|
|
5454
|
+
Y,
|
|
5313
5455
|
" of ",
|
|
5314
5456
|
M
|
|
5315
5457
|
] })
|
|
5316
5458
|
] }),
|
|
5317
5459
|
/* @__PURE__ */ a("div", { className: "flex items-center", children: v.map((f, A) => {
|
|
5318
|
-
const
|
|
5319
|
-
return /* @__PURE__ */ i(
|
|
5460
|
+
const D = A < K, V = f.order === o.order;
|
|
5461
|
+
return /* @__PURE__ */ i(ye.Fragment, { children: [
|
|
5320
5462
|
/* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
5321
5463
|
/* @__PURE__ */ a(
|
|
5322
5464
|
"div",
|
|
5323
5465
|
{
|
|
5324
5466
|
className: `
|
|
5325
5467
|
w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
|
|
5326
|
-
${
|
|
5468
|
+
${D || V ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
|
|
5327
5469
|
`,
|
|
5328
5470
|
children: A + 1
|
|
5329
5471
|
}
|
|
@@ -5331,21 +5473,21 @@ const Yr = ({
|
|
|
5331
5473
|
/* @__PURE__ */ a(
|
|
5332
5474
|
"span",
|
|
5333
5475
|
{
|
|
5334
|
-
className: `ml-2 text-sm ${
|
|
5335
|
-
children: f.displayName || f.name ||
|
|
5476
|
+
className: `ml-2 text-sm ${V ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
|
|
5477
|
+
children: f.displayName || f.name || p(f.action) || `Step ${A + 1}`
|
|
5336
5478
|
}
|
|
5337
5479
|
)
|
|
5338
5480
|
] }),
|
|
5339
5481
|
A < v.length - 1 && /* @__PURE__ */ a(
|
|
5340
5482
|
"div",
|
|
5341
5483
|
{
|
|
5342
|
-
className: `flex-1 h-0.5 mx-4 ${
|
|
5484
|
+
className: `flex-1 h-0.5 mx-4 ${D ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
|
|
5343
5485
|
}
|
|
5344
5486
|
)
|
|
5345
5487
|
] }, f.order);
|
|
5346
5488
|
}) })
|
|
5347
5489
|
] });
|
|
5348
|
-
},
|
|
5490
|
+
}, C = () => {
|
|
5349
5491
|
const v = {
|
|
5350
5492
|
applicantId: e,
|
|
5351
5493
|
onComplete: async () => {
|
|
@@ -5354,24 +5496,24 @@ const Yr = ({
|
|
|
5354
5496
|
onBack: o.order > 0 ? h : void 0
|
|
5355
5497
|
};
|
|
5356
5498
|
switch (o.action) {
|
|
5357
|
-
case
|
|
5358
|
-
return /* @__PURE__ */ a(
|
|
5359
|
-
case
|
|
5360
|
-
return /* @__PURE__ */ a(
|
|
5361
|
-
case
|
|
5362
|
-
return /* @__PURE__ */ a(xr, { ...v });
|
|
5363
|
-
case _.IdentitySdk:
|
|
5364
|
-
return /* @__PURE__ */ a(Er, { ...v });
|
|
5365
|
-
case _.RiskScoring:
|
|
5499
|
+
case U.Questionaries:
|
|
5500
|
+
return /* @__PURE__ */ a(vr, { ...v });
|
|
5501
|
+
case U.UploadDocument:
|
|
5502
|
+
return /* @__PURE__ */ a(kr, { ...v });
|
|
5503
|
+
case U.Overview:
|
|
5366
5504
|
return /* @__PURE__ */ a(Nr, { ...v });
|
|
5367
|
-
case
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
case
|
|
5505
|
+
case U.IdentitySdk:
|
|
5506
|
+
return /* @__PURE__ */ a(Dr, { ...v });
|
|
5507
|
+
case U.RiskScoring:
|
|
5508
|
+
return /* @__PURE__ */ a(Ir, { ...v });
|
|
5509
|
+
case U.AdditionalData:
|
|
5510
|
+
case U.InvestorCategorization:
|
|
5511
|
+
return /* @__PURE__ */ a(Rr, { ...v });
|
|
5512
|
+
case U.AppropriatenessTest:
|
|
5513
|
+
return /* @__PURE__ */ a(Fr, { ...v });
|
|
5514
|
+
case U.ManualReview:
|
|
5373
5515
|
return /* @__PURE__ */ a(
|
|
5374
|
-
|
|
5516
|
+
Ge,
|
|
5375
5517
|
{
|
|
5376
5518
|
kycStatus: l.kycStatus,
|
|
5377
5519
|
reviewStatus: l.reviewStatus,
|
|
@@ -5380,31 +5522,31 @@ const Yr = ({
|
|
|
5380
5522
|
}
|
|
5381
5523
|
);
|
|
5382
5524
|
default:
|
|
5383
|
-
return /* @__PURE__ */ a(
|
|
5384
|
-
/* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(
|
|
5525
|
+
return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
|
|
5526
|
+
/* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(be, {}) }),
|
|
5385
5527
|
/* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
|
|
5386
5528
|
"Processing step: ",
|
|
5387
5529
|
o.title || o.name
|
|
5388
5530
|
] }),
|
|
5389
5531
|
/* @__PURE__ */ i("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
5390
5532
|
"Action type: ",
|
|
5391
|
-
|
|
5533
|
+
U[o.action]
|
|
5392
5534
|
] })
|
|
5393
5535
|
] }) });
|
|
5394
5536
|
}
|
|
5395
5537
|
};
|
|
5396
5538
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${s || ""}`, children: [
|
|
5397
|
-
|
|
5398
|
-
|
|
5539
|
+
F(),
|
|
5540
|
+
C()
|
|
5399
5541
|
] });
|
|
5400
5542
|
};
|
|
5401
|
-
function
|
|
5402
|
-
return
|
|
5403
|
-
questionResults:
|
|
5543
|
+
function Jr(e) {
|
|
5544
|
+
return ke.object({
|
|
5545
|
+
questionResults: ke.any()
|
|
5404
5546
|
}).passthrough();
|
|
5405
5547
|
}
|
|
5406
|
-
function
|
|
5407
|
-
let t =
|
|
5548
|
+
function Lr(e) {
|
|
5549
|
+
let t = ke.array(ke.instanceof(File));
|
|
5408
5550
|
if (e.isRequired ? t = t.min(
|
|
5409
5551
|
1,
|
|
5410
5552
|
`${e.displayName} is required`
|
|
@@ -5425,139 +5567,139 @@ function Rr(e) {
|
|
|
5425
5567
|
}
|
|
5426
5568
|
return t;
|
|
5427
5569
|
}
|
|
5428
|
-
function
|
|
5570
|
+
function Xr(e) {
|
|
5429
5571
|
const t = {};
|
|
5430
5572
|
return e.uploadDocumentFiles.forEach((r) => {
|
|
5431
5573
|
const n = `file_${r.id}`;
|
|
5432
|
-
t[n] =
|
|
5433
|
-
}),
|
|
5574
|
+
t[n] = Lr(r);
|
|
5575
|
+
}), ke.object(t);
|
|
5434
5576
|
}
|
|
5435
|
-
function
|
|
5436
|
-
return
|
|
5577
|
+
function ea(e) {
|
|
5578
|
+
return ke.any();
|
|
5437
5579
|
}
|
|
5438
|
-
function
|
|
5439
|
-
return
|
|
5580
|
+
function Mr(e) {
|
|
5581
|
+
return ke.string().min(1, "This question is required");
|
|
5440
5582
|
}
|
|
5441
|
-
function
|
|
5583
|
+
function ta(e) {
|
|
5442
5584
|
const t = {};
|
|
5443
5585
|
return e.appropriatenessQuestions.forEach((r) => {
|
|
5444
5586
|
const n = `question_${r.id}`;
|
|
5445
|
-
t[n] =
|
|
5446
|
-
}),
|
|
5587
|
+
t[n] = Mr();
|
|
5588
|
+
}), ke.object(t);
|
|
5447
5589
|
}
|
|
5448
|
-
const
|
|
5590
|
+
const ra = ke.any();
|
|
5449
5591
|
export {
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5592
|
+
Qe as ALLOWED_LANGUAGES,
|
|
5593
|
+
dt as ApplicantProgressOnHoldReason,
|
|
5594
|
+
xe as ApplicantProgressStatus,
|
|
5595
|
+
Ct as ApplicantService,
|
|
5596
|
+
mt as ApplicantStatus,
|
|
5597
|
+
ft as AppropriatenessQuestionType,
|
|
5598
|
+
Et as AppropriatenessTestService,
|
|
5599
|
+
Fr as AppropriatenessTestStep,
|
|
5600
|
+
Ne as Badge,
|
|
5601
|
+
Pt as BaseInformationService,
|
|
5460
5602
|
q as Button,
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5603
|
+
$ as Card,
|
|
5604
|
+
B as CardContent,
|
|
5605
|
+
me as CardFooter,
|
|
5606
|
+
oe as CardHeader,
|
|
5607
|
+
Gr as CreateApplicantForm,
|
|
5608
|
+
bt as CriteriaBuiltInType,
|
|
5609
|
+
wt as DEFAULT_VISIBLE_FIELDS,
|
|
5610
|
+
yt as DocumentReviewStatus,
|
|
5611
|
+
Nt as EndpointBuilder,
|
|
5612
|
+
Le as ErrorHandler,
|
|
5613
|
+
Ut as EventEmitter,
|
|
5614
|
+
_e as FIELD_METADATA,
|
|
5615
|
+
gt as FileType,
|
|
5616
|
+
cr as FileUpload,
|
|
5617
|
+
Be as GenderType,
|
|
5618
|
+
He as Header,
|
|
5619
|
+
St as HttpClient,
|
|
5620
|
+
De as IdentityProviderManager,
|
|
5621
|
+
Dt as IdentityService,
|
|
5622
|
+
fe as IdentityVerificationProvider,
|
|
5623
|
+
Dr as IdentityVerificationStep,
|
|
5624
|
+
ue as Input,
|
|
5625
|
+
Lt as InvestorCategorizationService,
|
|
5626
|
+
Rr as InvestorCategorizationStep,
|
|
5627
|
+
pe as InvestorCategorizationType,
|
|
5628
|
+
vt as InvestorCategoryType,
|
|
5629
|
+
pt as KycProcessStatus,
|
|
5630
|
+
Ee as KycStatus,
|
|
5631
|
+
Ge as KycStatusDisplay,
|
|
5632
|
+
Zr as KycWorkflow,
|
|
5633
|
+
Pr as Logo,
|
|
5634
|
+
Je as MetaKYCContext,
|
|
5635
|
+
we as MetaKYCError,
|
|
5636
|
+
Kr as MetaKYCProvider,
|
|
5637
|
+
or as MultiSelect,
|
|
5638
|
+
Wt as OnfidoProvider,
|
|
5639
|
+
Rt as OverviewService,
|
|
5640
|
+
Nr as OverviewStep,
|
|
5641
|
+
dr as PhoneInput,
|
|
5642
|
+
At as QuestionnaireService,
|
|
5643
|
+
vr as QuestionnaireStep,
|
|
5644
|
+
Re as ReviewStatus,
|
|
5645
|
+
xt as RiskCriteriaType,
|
|
5646
|
+
ut as RiskLevel,
|
|
5647
|
+
Ft as RiskScoringService,
|
|
5648
|
+
Ir as RiskScoringStep,
|
|
5649
|
+
Yt as SardinAIProvider,
|
|
5650
|
+
Ae as Select,
|
|
5651
|
+
be as Spinner,
|
|
5652
|
+
Kt as StepRouter,
|
|
5653
|
+
Ht as SumsubProvider,
|
|
5654
|
+
Qt as ThemeManager,
|
|
5655
|
+
se as ThemePreset,
|
|
5656
|
+
_t as ThemeService,
|
|
5657
|
+
It as UploadDocumentService,
|
|
5658
|
+
kr as UploadDocumentStep,
|
|
5659
|
+
ht as UserType,
|
|
5660
|
+
Ce as ValueDataType,
|
|
5661
|
+
jt as WorkflowOrchestrator,
|
|
5662
|
+
$e as WorkflowResultType,
|
|
5663
|
+
qt as WorkflowState,
|
|
5664
|
+
U as WorkflowStepAction,
|
|
5665
|
+
ra as appropriatenessTestSchema,
|
|
5666
|
+
Qr as clearAllStorage,
|
|
5667
|
+
Jt as clearApplicantId,
|
|
5668
|
+
er as clearWorkflowState,
|
|
5669
|
+
ie as cn,
|
|
5670
|
+
Mt as corporateTheme,
|
|
5671
|
+
kt as defaultConfig,
|
|
5672
|
+
de as defaultTheme,
|
|
5673
|
+
Vt as fileToBase64,
|
|
5674
|
+
Tt as fintechTheme,
|
|
5675
|
+
Ue as formatFileSize,
|
|
5676
|
+
ta as generateAppropriatenessSchema,
|
|
5677
|
+
Jr as generateQuestionnaireSchema,
|
|
5678
|
+
ea as generateRiskScoringSchema,
|
|
5679
|
+
Xr as generateUploadDocumentSchema,
|
|
5680
|
+
Wr as getAcceptString,
|
|
5681
|
+
Zt as getApplicantId,
|
|
5682
|
+
Me as getThemePreset,
|
|
5683
|
+
Yr as getWorkflowState,
|
|
5684
|
+
Ot as healthcareTheme,
|
|
5685
|
+
Ur as isScriptLoaded,
|
|
5686
|
+
Ze as loadScript,
|
|
5687
|
+
Bt as minimalTheme,
|
|
5688
|
+
$t as modernTheme,
|
|
5689
|
+
qr as removeScript,
|
|
5690
|
+
Gt as saveApplicantId,
|
|
5691
|
+
Xt as saveWorkflowState,
|
|
5692
|
+
zt as themePresets,
|
|
5693
|
+
lr as useApplicant,
|
|
5694
|
+
Vr as useAppropriatenessTest,
|
|
5695
|
+
sr as useIdentityVerification,
|
|
5696
|
+
tr as useKycWorkflow,
|
|
5697
|
+
he as useMetaKYC,
|
|
5698
|
+
nr as useOverview,
|
|
5699
|
+
rr as useQuestionnaire,
|
|
5700
|
+
ir as useRiskScoring,
|
|
5701
|
+
ar as useUploadDocument,
|
|
5702
|
+
jr as validateFileSize,
|
|
5703
|
+
Hr as validateFileType
|
|
5562
5704
|
};
|
|
5563
5705
|
//# sourceMappingURL=index.js.map
|