@vpdev2/metakyc-sdk 1.0.16 → 1.0.17
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/KycWorkflow.d.ts.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +587 -564
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ var Xe = (t, e, r) => e in t ? Je(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var K = (t, e, r) => Xe(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import et from "axios";
|
|
5
5
|
import * as Me from "react";
|
|
6
|
-
import ie, { createContext as tt, useState as N, useMemo as Re, useEffect as
|
|
6
|
+
import ie, { createContext as tt, useState as N, useMemo as Re, useEffect as W, useContext as rt, useRef as H, useCallback as q, forwardRef as Le } from "react";
|
|
7
7
|
import { jsx as n, jsxs as o, Fragment as nt } from "react/jsx-runtime";
|
|
8
8
|
import { get as De, set as Ee, appendErrors as _e, useForm as Te, Controller as J } from "react-hook-form";
|
|
9
9
|
import { z as ue } from "zod";
|
|
10
|
-
var
|
|
10
|
+
var B = /* @__PURE__ */ ((t) => (t[t.IdentitySdk = 0] = "IdentitySdk", t[t.RiskScoring = 1] = "RiskScoring", t[t.Questionaries = 2] = "Questionaries", t[t.AdditionalData = 3] = "AdditionalData", t[t.AppropriatenessTest = 4] = "AppropriatenessTest", t[t.UploadDocument = 5] = "UploadDocument", t[t.ManualReview = 6] = "ManualReview", t[t.Overview = 7] = "Overview", t[t.InvestorCategorization = 8] = "InvestorCategorization", t))(B || {}), Ne = /* @__PURE__ */ ((t) => (t[t.NotStarted = 0] = "NotStarted", t[t.InProgress = 1] = "InProgress", t[t.Success = 2] = "Success", t[t.PartialSuccess = 3] = "PartialSuccess", t[t.Failed = 4] = "Failed", t[t.Skipped = 5] = "Skipped", t[t.AdminReview = 6] = "AdminReview", t[t.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", t))(Ne || {}), le = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.InProgress = 1] = "InProgress", t[t.Finished = 2] = "Finished", t[t.OnHold = 3] = "OnHold", t[t.IdentityPending = 4] = "IdentityPending", t))(le || {}), st = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.RepresentativeKYC = 1] = "RepresentativeKYC", t[t.ManualRiskCriteria = 2] = "ManualRiskCriteria", t[t.UploadDocumentReview = 3] = "UploadDocumentReview", t[t.AdminReview = 4] = "AdminReview", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(at || {}), pe = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Pending = 1] = "Pending", t[t.Approved = 2] = "Approved", t[t.Rejected = 3] = "Rejected", t[t.ResendRequested = 4] = "ResendRequested", t[t.Unknown = 5] = "Unknown", t[t.InProgress = 6] = "InProgress", t))(pe || {}), ge = /* @__PURE__ */ ((t) => (t[t.Approved = 0] = "Approved", t[t.Reject = 1] = "Reject", t[t.UnderReview = 2] = "UnderReview", t[t.Closed = 3] = "Closed", t[t.AdminReview = 4] = "AdminReview", t[t.New = 5] = "New", t[t.InProgress = 6] = "InProgress", t))(ge || {}), it = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(it || {}), ot = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(ot || {}), oe = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(oe || {}), lt = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(lt || {}), Se = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Se || {}), ct = /* @__PURE__ */ ((t) => (t[t.Image = 0] = "Image", t[t.Video = 1] = "Video", t[t.PDF = 2] = "PDF", t[t.OfficePDF = 3] = "OfficePDF", t[t.Custom = 4] = "Custom", t))(ct || {}), dt = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(dt || {}), ut = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(ut || {}), Pe = /* @__PURE__ */ ((t) => (t[t.String = 0] = "String", t[t.Integer = 1] = "Integer", t[t.Decimal = 2] = "Decimal", t[t.Boolean = 3] = "Boolean", t[t.Date = 4] = "Date", t[t.Country = 5] = "Country", t[t.DigitOnly = 6] = "DigitOnly", t))(Pe || {}), mt = /* @__PURE__ */ ((t) => (t[t.Text = 0] = "Text", t[t.Radio = 1] = "Radio", t[t.Checkbox = 2] = "Checkbox", t[t.Dropdown = 3] = "Dropdown", t[t.Country = 4] = "Country", t))(mt || {}), ht = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(ht || {}), re = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(re || {}), pt = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(pt || {});
|
|
11
11
|
const gt = [
|
|
12
12
|
"firstName",
|
|
13
13
|
"lastName",
|
|
@@ -71,7 +71,7 @@ const gt = [
|
|
|
71
71
|
taxNumber: { label: "Tax Number", type: "text" },
|
|
72
72
|
externalRefId: { label: "External Reference ID", type: "text" }
|
|
73
73
|
};
|
|
74
|
-
var
|
|
74
|
+
var Q = /* @__PURE__ */ ((t) => (t.Default = "default", t.Corporate = "corporate", t.Fintech = "fintech", t.Healthcare = "healthcare", t.Modern = "modern", t.Minimal = "minimal", t))(Q || {});
|
|
75
75
|
const ft = {
|
|
76
76
|
timeout: 3e4,
|
|
77
77
|
retries: 3,
|
|
@@ -880,12 +880,12 @@ const Z = {
|
|
|
880
880
|
inputHeight: "2.25rem"
|
|
881
881
|
}
|
|
882
882
|
}, Tt = {
|
|
883
|
-
[
|
|
884
|
-
[
|
|
885
|
-
[
|
|
886
|
-
[
|
|
887
|
-
[
|
|
888
|
-
[
|
|
883
|
+
[Q.Default]: Z,
|
|
884
|
+
[Q.Corporate]: Rt,
|
|
885
|
+
[Q.Fintech]: Dt,
|
|
886
|
+
[Q.Healthcare]: Pt,
|
|
887
|
+
[Q.Modern]: Ft,
|
|
888
|
+
[Q.Minimal]: Lt
|
|
889
889
|
};
|
|
890
890
|
function xe(t) {
|
|
891
891
|
return Tt[t] || Z;
|
|
@@ -905,8 +905,8 @@ class Mt {
|
|
|
905
905
|
"GetThemeConfiguration"
|
|
906
906
|
);
|
|
907
907
|
if (!r.result.isEnabled)
|
|
908
|
-
return xe(
|
|
909
|
-
let s = r.result.preset ? xe(r.result.preset) : xe(
|
|
908
|
+
return xe(Q.Default);
|
|
909
|
+
let s = r.result.preset ? xe(r.result.preset) : xe(Q.Default);
|
|
910
910
|
return r.result.title && (s.title = r.result.title), r.result.logo && (s.logo = { ...s.logo, ...r.result.logo }), r.result.colors && (s.colors = { ...s.colors, ...r.result.colors }), r.result.typography && (s.typography = { ...s.typography, ...r.result.typography }), r.result.spacing && (s.spacing = { ...s.spacing, ...r.result.spacing }), r.result.customCSS && (s.customCSS = r.result.customCSS), r.result.darkMode && (s.darkMode = {
|
|
911
911
|
colors: {
|
|
912
912
|
...(e = s.darkMode) == null ? void 0 : e.colors,
|
|
@@ -914,7 +914,7 @@ class Mt {
|
|
|
914
914
|
}
|
|
915
915
|
}), s;
|
|
916
916
|
} catch (r) {
|
|
917
|
-
return console.warn("[ThemeService] Failed to fetch theme configuration:", r), xe(
|
|
917
|
+
return console.warn("[ThemeService] Failed to fetch theme configuration:", r), xe(Q.Default);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
@@ -928,12 +928,12 @@ class Mt {
|
|
|
928
928
|
*/
|
|
929
929
|
getAvailablePresets() {
|
|
930
930
|
return [
|
|
931
|
-
{ id:
|
|
932
|
-
{ id:
|
|
933
|
-
{ id:
|
|
934
|
-
{ id:
|
|
935
|
-
{ id:
|
|
936
|
-
{ id:
|
|
931
|
+
{ id: Q.Default, name: "Default" },
|
|
932
|
+
{ id: Q.Corporate, name: "Corporate" },
|
|
933
|
+
{ id: Q.Fintech, name: "Fintech" },
|
|
934
|
+
{ id: Q.Healthcare, name: "Healthcare" },
|
|
935
|
+
{ id: Q.Modern, name: "Modern" },
|
|
936
|
+
{ id: Q.Minimal, name: "Minimal" }
|
|
937
937
|
];
|
|
938
938
|
}
|
|
939
939
|
/**
|
|
@@ -1164,7 +1164,7 @@ class zt {
|
|
|
1164
1164
|
async loadStepData(e, r) {
|
|
1165
1165
|
const s = this.getHandler(e);
|
|
1166
1166
|
if (!s)
|
|
1167
|
-
throw new Error(`No handler registered for step action: ${
|
|
1167
|
+
throw new Error(`No handler registered for step action: ${B[e]}`);
|
|
1168
1168
|
return s.loadData(r);
|
|
1169
1169
|
}
|
|
1170
1170
|
/**
|
|
@@ -1173,7 +1173,7 @@ class zt {
|
|
|
1173
1173
|
async submitStepData(e, r) {
|
|
1174
1174
|
const s = this.getHandler(e);
|
|
1175
1175
|
if (!s)
|
|
1176
|
-
throw new Error(`No handler registered for step action: ${
|
|
1176
|
+
throw new Error(`No handler registered for step action: ${B[e]}`);
|
|
1177
1177
|
return s.submitData(r);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
@@ -1187,47 +1187,47 @@ class $t {
|
|
|
1187
1187
|
* Register all step handlers
|
|
1188
1188
|
*/
|
|
1189
1189
|
registerStepHandlers() {
|
|
1190
|
-
this.stepRouter.registerHandler(
|
|
1190
|
+
this.stepRouter.registerHandler(B.Questionaries, {
|
|
1191
1191
|
loadData: (e) => this.questionnaireService.getQuestionnaire(e),
|
|
1192
1192
|
submitData: async (e) => {
|
|
1193
1193
|
await this.questionnaireService.fillQuestionnaire(e);
|
|
1194
1194
|
}
|
|
1195
|
-
}), this.stepRouter.registerHandler(
|
|
1195
|
+
}), this.stepRouter.registerHandler(B.UploadDocument, {
|
|
1196
1196
|
loadData: (e) => this.uploadDocumentService.getUploadDocument(e),
|
|
1197
1197
|
submitData: (e) => this.uploadDocumentService.fillUploadDocument(e)
|
|
1198
|
-
}), this.stepRouter.registerHandler(
|
|
1198
|
+
}), this.stepRouter.registerHandler(B.AppropriatenessTest, {
|
|
1199
1199
|
loadData: (e) => this.appropriatenessTestService.getAppropriatenessTest(e),
|
|
1200
1200
|
submitData: async (e) => {
|
|
1201
1201
|
await this.appropriatenessTestService.fillAppropriatenessTest(e);
|
|
1202
1202
|
}
|
|
1203
|
-
}), this.stepRouter.registerHandler(
|
|
1203
|
+
}), this.stepRouter.registerHandler(B.Overview, {
|
|
1204
1204
|
loadData: (e) => this.overviewService.getOverviewData(e),
|
|
1205
1205
|
submitData: (e) => this.overviewService.passOverview(e.applicantId)
|
|
1206
|
-
}), this.stepRouter.registerHandler(
|
|
1206
|
+
}), this.stepRouter.registerHandler(B.RiskScoring, {
|
|
1207
1207
|
loadData: (e) => this.riskScoringService.getRiskCriterias(e),
|
|
1208
1208
|
submitData: async (e) => {
|
|
1209
1209
|
await this.riskScoringService.submitRiskScoring(e);
|
|
1210
1210
|
}
|
|
1211
|
-
}), this.stepRouter.registerHandler(
|
|
1211
|
+
}), this.stepRouter.registerHandler(B.IdentitySdk, {
|
|
1212
1212
|
loadData: async (e) => ({
|
|
1213
1213
|
applicantId: e,
|
|
1214
1214
|
message: "Identity verification required"
|
|
1215
1215
|
}),
|
|
1216
1216
|
submitData: async () => {
|
|
1217
1217
|
}
|
|
1218
|
-
}), this.stepRouter.registerHandler(
|
|
1218
|
+
}), this.stepRouter.registerHandler(B.InvestorCategorization, {
|
|
1219
1219
|
loadData: (e) => this.investorCategorizationService.getInvestorCategorization(e),
|
|
1220
1220
|
submitData: async (e) => {
|
|
1221
1221
|
await this.investorCategorizationService.setInvestorCategorization(e);
|
|
1222
1222
|
}
|
|
1223
|
-
}), this.stepRouter.registerHandler(
|
|
1223
|
+
}), this.stepRouter.registerHandler(B.ManualReview, {
|
|
1224
1224
|
loadData: async (e) => ({
|
|
1225
1225
|
applicantId: e,
|
|
1226
1226
|
message: "Your application is under manual review"
|
|
1227
1227
|
}),
|
|
1228
1228
|
submitData: async () => {
|
|
1229
1229
|
}
|
|
1230
|
-
}), this.stepRouter.registerHandler(
|
|
1230
|
+
}), this.stepRouter.registerHandler(B.AdditionalData, {
|
|
1231
1231
|
loadData: async (e) => ({
|
|
1232
1232
|
applicantId: e,
|
|
1233
1233
|
message: "Additional data required"
|
|
@@ -1321,7 +1321,7 @@ class $t {
|
|
|
1321
1321
|
return this.stepRouter;
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function Ue(t, e) {
|
|
1325
1325
|
return new Promise((r, s) => {
|
|
1326
1326
|
if (e && document.getElementById(e)) {
|
|
1327
1327
|
r();
|
|
@@ -1348,7 +1348,7 @@ class jt {
|
|
|
1348
1348
|
* Load Sumsub SDK
|
|
1349
1349
|
*/
|
|
1350
1350
|
async loadSDK() {
|
|
1351
|
-
await
|
|
1351
|
+
await Ue(
|
|
1352
1352
|
"https://cdn.sumsub.com/websdk/v2/production/websdk.js",
|
|
1353
1353
|
"sumsub-sdk"
|
|
1354
1354
|
);
|
|
@@ -1403,7 +1403,7 @@ class _t {
|
|
|
1403
1403
|
* Load Onfido SDK
|
|
1404
1404
|
*/
|
|
1405
1405
|
async loadSDK() {
|
|
1406
|
-
await
|
|
1406
|
+
await Ue(
|
|
1407
1407
|
"https://sdk.onfido.com/v12.0.0/onfido.min.js",
|
|
1408
1408
|
"onfido-sdk"
|
|
1409
1409
|
);
|
|
@@ -1459,7 +1459,7 @@ class _t {
|
|
|
1459
1459
|
this.sdk && (this.sdk.tearDown(), this.sdk = null);
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
|
-
class
|
|
1462
|
+
class Ut {
|
|
1463
1463
|
constructor(e) {
|
|
1464
1464
|
K(this, "sardineContext", null);
|
|
1465
1465
|
K(this, "config");
|
|
@@ -1614,7 +1614,7 @@ class fe {
|
|
|
1614
1614
|
case oe.Onfido:
|
|
1615
1615
|
return new _t(r);
|
|
1616
1616
|
case oe.SardinAI:
|
|
1617
|
-
return new
|
|
1617
|
+
return new Ut(r);
|
|
1618
1618
|
default:
|
|
1619
1619
|
throw new Error(`Unsupported identity provider: ${e}`);
|
|
1620
1620
|
}
|
|
@@ -1653,7 +1653,7 @@ class fe {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
|
-
class
|
|
1656
|
+
class Kt {
|
|
1657
1657
|
constructor(e) {
|
|
1658
1658
|
K(this, "currentTheme", Z);
|
|
1659
1659
|
K(this, "customStyleElement", null);
|
|
@@ -1775,22 +1775,22 @@ class Ut {
|
|
|
1775
1775
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1778
|
+
const Ke = tt(null), Or = ({ config: t, children: e }) => {
|
|
1779
1779
|
const [r, s] = N(null), a = ie.useRef(!1), i = ie.useRef(!1), l = Re(() => {
|
|
1780
|
-
const d = new vt(t), u = new xt(d), y = new wt(d),
|
|
1780
|
+
const d = new vt(t), u = new xt(d), y = new wt(d), v = new kt(d), g = new Nt(d), b = new St(d), m = new Ct(d), f = new At(d), k = new Et(d), h = new It(d), A = new Mt(d), S = new Kt();
|
|
1781
1781
|
return {
|
|
1782
1782
|
httpClient: d,
|
|
1783
1783
|
applicantService: u,
|
|
1784
1784
|
questionnaireService: y,
|
|
1785
|
-
uploadDocumentService:
|
|
1785
|
+
uploadDocumentService: v,
|
|
1786
1786
|
appropriatenessTestService: g,
|
|
1787
1787
|
overviewService: b,
|
|
1788
1788
|
riskScoringService: m,
|
|
1789
1789
|
identityService: f,
|
|
1790
1790
|
baseInformationService: k,
|
|
1791
1791
|
investorCategorizationService: h,
|
|
1792
|
-
themeService:
|
|
1793
|
-
themeManager:
|
|
1792
|
+
themeService: A,
|
|
1793
|
+
themeManager: S
|
|
1794
1794
|
};
|
|
1795
1795
|
}, [t]), c = Re(() => ({
|
|
1796
1796
|
config: t,
|
|
@@ -1807,7 +1807,7 @@ const Ue = tt(null), Or = ({ config: t, children: e }) => {
|
|
|
1807
1807
|
l.investorCategorizationService
|
|
1808
1808
|
)
|
|
1809
1809
|
}), [t, l, r]);
|
|
1810
|
-
return
|
|
1810
|
+
return W(() => ((async () => {
|
|
1811
1811
|
if (a.current || i.current) {
|
|
1812
1812
|
console.log("[MetaKYC] Theme already loading or loaded, skipping...");
|
|
1813
1813
|
return;
|
|
@@ -1828,10 +1828,10 @@ const Ue = tt(null), Or = ({ config: t, children: e }) => {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
})(), () => {
|
|
1830
1830
|
l.themeManager.cleanup();
|
|
1831
|
-
}), []), /* @__PURE__ */ n(
|
|
1831
|
+
}), []), /* @__PURE__ */ n(Ke.Provider, { value: c, children: e });
|
|
1832
1832
|
};
|
|
1833
1833
|
function se() {
|
|
1834
|
-
const t = rt(
|
|
1834
|
+
const t = rt(Ke);
|
|
1835
1835
|
if (!t)
|
|
1836
1836
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1837
1837
|
return t;
|
|
@@ -1916,25 +1916,25 @@ function Qt() {
|
|
|
1916
1916
|
console.warn("Failed to clear workflow state from storage:", t);
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1919
|
+
function Ur() {
|
|
1920
1920
|
Yt(), Qt();
|
|
1921
1921
|
}
|
|
1922
1922
|
function Gt(t) {
|
|
1923
1923
|
const { createOrchestrator: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(null), d = H(null), u = t || Vt();
|
|
1924
|
-
|
|
1924
|
+
W(() => {
|
|
1925
1925
|
d.current || (d.current = e());
|
|
1926
|
-
}, [e]),
|
|
1927
|
-
var
|
|
1926
|
+
}, [e]), W(() => {
|
|
1927
|
+
var S;
|
|
1928
1928
|
r && u && (Ht(u), Wt({
|
|
1929
1929
|
applicantId: u,
|
|
1930
|
-
currentStepOrder: (
|
|
1930
|
+
currentStepOrder: (S = r.currentStep) == null ? void 0 : S.order,
|
|
1931
1931
|
status: r.status,
|
|
1932
1932
|
lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1933
1933
|
workflowKey: r.workFlowKey,
|
|
1934
1934
|
nextWorkflowKey: r.nextWorkflowKey
|
|
1935
1935
|
}));
|
|
1936
1936
|
}, [r, u]);
|
|
1937
|
-
const y = H(!1),
|
|
1937
|
+
const y = H(!1), v = H(!1), g = q(async () => {
|
|
1938
1938
|
if (!(!u || !d.current)) {
|
|
1939
1939
|
if (y.current) {
|
|
1940
1940
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
@@ -1942,17 +1942,17 @@ function Gt(t) {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
y.current = !0, i(!0), c(null);
|
|
1944
1944
|
try {
|
|
1945
|
-
const
|
|
1946
|
-
s(
|
|
1947
|
-
} catch (
|
|
1948
|
-
c(
|
|
1945
|
+
const S = await d.current.initialize(u);
|
|
1946
|
+
s(S), v.current = !0;
|
|
1947
|
+
} catch (S) {
|
|
1948
|
+
c(S);
|
|
1949
1949
|
} finally {
|
|
1950
1950
|
i(!1), y.current = !1;
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
}, [u]);
|
|
1954
|
-
|
|
1955
|
-
u && !
|
|
1954
|
+
W(() => {
|
|
1955
|
+
u && !v.current && g();
|
|
1956
1956
|
}, [u, g]);
|
|
1957
1957
|
const b = q(async () => {
|
|
1958
1958
|
if (d.current) {
|
|
@@ -1962,10 +1962,10 @@ function Gt(t) {
|
|
|
1962
1962
|
}
|
|
1963
1963
|
y.current = !0, i(!0), c(null);
|
|
1964
1964
|
try {
|
|
1965
|
-
const
|
|
1966
|
-
s(
|
|
1967
|
-
} catch (
|
|
1968
|
-
c(
|
|
1965
|
+
const S = await d.current.refreshProgress();
|
|
1966
|
+
s(S);
|
|
1967
|
+
} catch (S) {
|
|
1968
|
+
c(S);
|
|
1969
1969
|
} finally {
|
|
1970
1970
|
i(!1), y.current = !1;
|
|
1971
1971
|
}
|
|
@@ -1974,10 +1974,10 @@ function Gt(t) {
|
|
|
1974
1974
|
if (d.current) {
|
|
1975
1975
|
i(!0), c(null);
|
|
1976
1976
|
try {
|
|
1977
|
-
const
|
|
1978
|
-
s(
|
|
1979
|
-
} catch (
|
|
1980
|
-
c(
|
|
1977
|
+
const S = await d.current.moveToNextStep();
|
|
1978
|
+
s(S);
|
|
1979
|
+
} catch (S) {
|
|
1980
|
+
c(S);
|
|
1981
1981
|
} finally {
|
|
1982
1982
|
i(!1);
|
|
1983
1983
|
}
|
|
@@ -1986,28 +1986,28 @@ function Gt(t) {
|
|
|
1986
1986
|
if (d.current) {
|
|
1987
1987
|
i(!0), c(null);
|
|
1988
1988
|
try {
|
|
1989
|
-
const
|
|
1990
|
-
s(
|
|
1991
|
-
} catch (
|
|
1992
|
-
c(
|
|
1989
|
+
const S = await d.current.moveToPreviousStep();
|
|
1990
|
+
s(S);
|
|
1991
|
+
} catch (S) {
|
|
1992
|
+
c(S);
|
|
1993
1993
|
} finally {
|
|
1994
1994
|
i(!1);
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
1997
|
-
}, []), k = q(async (
|
|
1997
|
+
}, []), k = q(async (S) => {
|
|
1998
1998
|
if (d.current) {
|
|
1999
1999
|
i(!0), c(null);
|
|
2000
2000
|
try {
|
|
2001
|
-
await d.current.submitCurrentStep(
|
|
2002
|
-
const
|
|
2003
|
-
s(
|
|
2004
|
-
} catch (
|
|
2005
|
-
throw c(
|
|
2001
|
+
await d.current.submitCurrentStep(S);
|
|
2002
|
+
const w = await d.current.refreshProgress();
|
|
2003
|
+
s(w);
|
|
2004
|
+
} catch (w) {
|
|
2005
|
+
throw c(w), w;
|
|
2006
2006
|
} finally {
|
|
2007
2007
|
i(!1);
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
2010
|
-
}, []), h = Me.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((
|
|
2010
|
+
}, []), h = Me.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((S, w) => S.order - w.order) : [], [r == null ? void 0 : r.stepInfoList]), A = Me.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
|
|
2011
2011
|
return {
|
|
2012
2012
|
progress: r,
|
|
2013
2013
|
applicantId: u,
|
|
@@ -2017,7 +2017,7 @@ function Gt(t) {
|
|
|
2017
2017
|
workflowResult: (r == null ? void 0 : r.workflowResult) || null,
|
|
2018
2018
|
workflowKey: r == null ? void 0 : r.workFlowKey,
|
|
2019
2019
|
nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
|
|
2020
|
-
hasWorkflowChanged:
|
|
2020
|
+
hasWorkflowChanged: A,
|
|
2021
2021
|
isLoading: a,
|
|
2022
2022
|
error: l,
|
|
2023
2023
|
isComplete: (r == null ? void 0 : r.status) === le.Finished,
|
|
@@ -2030,7 +2030,7 @@ function Gt(t) {
|
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
2032
|
function Zt(t) {
|
|
2033
|
-
const { questionnaireService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1),
|
|
2033
|
+
const { questionnaireService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1), v = H(null), g = q(async () => {
|
|
2034
2034
|
if (t) {
|
|
2035
2035
|
if (y.current) {
|
|
2036
2036
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
@@ -2039,7 +2039,7 @@ function Zt(t) {
|
|
|
2039
2039
|
y.current = !0, i(!0), u(null);
|
|
2040
2040
|
try {
|
|
2041
2041
|
const m = await e.getQuestionnaire(t);
|
|
2042
|
-
s(m),
|
|
2042
|
+
s(m), v.current = t;
|
|
2043
2043
|
} catch (m) {
|
|
2044
2044
|
u(m);
|
|
2045
2045
|
} finally {
|
|
@@ -2047,8 +2047,8 @@ function Zt(t) {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
}, [t, e]);
|
|
2050
|
-
|
|
2051
|
-
t &&
|
|
2050
|
+
W(() => {
|
|
2051
|
+
t && v.current !== t && g();
|
|
2052
2052
|
}, [t]);
|
|
2053
2053
|
const b = q(
|
|
2054
2054
|
async (m) => {
|
|
@@ -2073,33 +2073,33 @@ function Zt(t) {
|
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
2075
|
function Jt(t) {
|
|
2076
|
-
const { uploadDocumentService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(0), [y,
|
|
2076
|
+
const { uploadDocumentService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(0), [y, v] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2077
2077
|
if (t) {
|
|
2078
2078
|
if (g.current) {
|
|
2079
2079
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
2080
2080
|
return;
|
|
2081
2081
|
}
|
|
2082
|
-
g.current = !0, i(!0),
|
|
2082
|
+
g.current = !0, i(!0), v(null);
|
|
2083
2083
|
try {
|
|
2084
2084
|
const k = await e.getUploadDocument(t);
|
|
2085
2085
|
s(k), b.current = t;
|
|
2086
2086
|
} catch (k) {
|
|
2087
|
-
|
|
2087
|
+
v(k);
|
|
2088
2088
|
} finally {
|
|
2089
2089
|
i(!1), g.current = !1;
|
|
2090
2090
|
}
|
|
2091
2091
|
}
|
|
2092
2092
|
}, [t, e]);
|
|
2093
|
-
|
|
2093
|
+
W(() => {
|
|
2094
2094
|
t && b.current !== t && m();
|
|
2095
2095
|
}, [t]);
|
|
2096
2096
|
const f = q(
|
|
2097
2097
|
async (k) => {
|
|
2098
|
-
c(!0), u(0),
|
|
2098
|
+
c(!0), u(0), v(null);
|
|
2099
2099
|
try {
|
|
2100
2100
|
await e.fillUploadDocument(k), u(100);
|
|
2101
2101
|
} catch (h) {
|
|
2102
|
-
throw
|
|
2102
|
+
throw v(h), h;
|
|
2103
2103
|
} finally {
|
|
2104
2104
|
c(!1);
|
|
2105
2105
|
}
|
|
@@ -2116,8 +2116,8 @@ function Jt(t) {
|
|
|
2116
2116
|
submit: f
|
|
2117
2117
|
};
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const { appropriatenessTestService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y,
|
|
2119
|
+
function Kr(t) {
|
|
2120
|
+
const { appropriatenessTestService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y, v] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2121
2121
|
if (t) {
|
|
2122
2122
|
if (g.current) {
|
|
2123
2123
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2134,7 +2134,7 @@ function Ur(t) {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
}
|
|
2136
2136
|
}, [t, e]);
|
|
2137
|
-
|
|
2137
|
+
W(() => {
|
|
2138
2138
|
t && b.current !== t && m();
|
|
2139
2139
|
}, [t]);
|
|
2140
2140
|
const f = q(
|
|
@@ -2142,7 +2142,7 @@ function Ur(t) {
|
|
|
2142
2142
|
c(!0), u(null);
|
|
2143
2143
|
try {
|
|
2144
2144
|
const h = await e.fillAppropriatenessTest(k);
|
|
2145
|
-
return
|
|
2145
|
+
return v(h), h;
|
|
2146
2146
|
} catch (h) {
|
|
2147
2147
|
throw u(h), h;
|
|
2148
2148
|
} finally {
|
|
@@ -2162,7 +2162,7 @@ function Ur(t) {
|
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
2164
|
function Xt(t) {
|
|
2165
|
-
const { overviewService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1),
|
|
2165
|
+
const { overviewService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1), v = H(null), g = q(async () => {
|
|
2166
2166
|
if (t) {
|
|
2167
2167
|
if (y.current) {
|
|
2168
2168
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2171,7 +2171,7 @@ function Xt(t) {
|
|
|
2171
2171
|
y.current = !0, i(!0), u(null);
|
|
2172
2172
|
try {
|
|
2173
2173
|
const m = await e.getOverviewData(t);
|
|
2174
|
-
s(m),
|
|
2174
|
+
s(m), v.current = t;
|
|
2175
2175
|
} catch (m) {
|
|
2176
2176
|
u(m);
|
|
2177
2177
|
} finally {
|
|
@@ -2179,8 +2179,8 @@ function Xt(t) {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
2181
|
}, [t, e]);
|
|
2182
|
-
|
|
2183
|
-
t &&
|
|
2182
|
+
W(() => {
|
|
2183
|
+
t && v.current !== t && g();
|
|
2184
2184
|
}, [t]);
|
|
2185
2185
|
const b = q(async () => {
|
|
2186
2186
|
if (t) {
|
|
@@ -2253,7 +2253,7 @@ function er(t) {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
},
|
|
2255
2255
|
[t, e]
|
|
2256
|
-
),
|
|
2256
|
+
), v = q(async () => {
|
|
2257
2257
|
if (t) {
|
|
2258
2258
|
if (d.current) {
|
|
2259
2259
|
console.log("[Identity] Restart already in progress, skipping...");
|
|
@@ -2286,11 +2286,11 @@ function er(t) {
|
|
|
2286
2286
|
error: l,
|
|
2287
2287
|
requestIdentity: u,
|
|
2288
2288
|
requestCompanyIdentity: y,
|
|
2289
|
-
restartIdentity:
|
|
2289
|
+
restartIdentity: v
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
2292
|
function tr(t) {
|
|
2293
|
-
const { riskScoringService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y,
|
|
2293
|
+
const { riskScoringService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y, v] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2294
2294
|
if (t) {
|
|
2295
2295
|
if (g.current) {
|
|
2296
2296
|
console.log("[RiskScoring] Load already in progress, skipping...");
|
|
@@ -2307,7 +2307,7 @@ function tr(t) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
2309
|
}, [t, e]);
|
|
2310
|
-
|
|
2310
|
+
W(() => {
|
|
2311
2311
|
t && b.current !== t && m();
|
|
2312
2312
|
}, [t]);
|
|
2313
2313
|
const f = q(
|
|
@@ -2315,7 +2315,7 @@ function tr(t) {
|
|
|
2315
2315
|
c(!0), u(null);
|
|
2316
2316
|
try {
|
|
2317
2317
|
const h = await e.submitRiskScoring(k);
|
|
2318
|
-
return
|
|
2318
|
+
return v(h), h;
|
|
2319
2319
|
} catch (h) {
|
|
2320
2320
|
throw u(h), h;
|
|
2321
2321
|
} finally {
|
|
@@ -2372,7 +2372,7 @@ function rr() {
|
|
|
2372
2372
|
}
|
|
2373
2373
|
},
|
|
2374
2374
|
[t]
|
|
2375
|
-
),
|
|
2375
|
+
), v = q(
|
|
2376
2376
|
async (b) => {
|
|
2377
2377
|
if (c.current)
|
|
2378
2378
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
@@ -2404,11 +2404,11 @@ function rr() {
|
|
|
2404
2404
|
error: a,
|
|
2405
2405
|
createApplicant: u,
|
|
2406
2406
|
createCompanyApplicant: y,
|
|
2407
|
-
getApplicantData:
|
|
2407
|
+
getApplicantData: v,
|
|
2408
2408
|
stopProgress: g
|
|
2409
2409
|
};
|
|
2410
2410
|
}
|
|
2411
|
-
const
|
|
2411
|
+
const _ = ({
|
|
2412
2412
|
children: t,
|
|
2413
2413
|
variant: e = "primary",
|
|
2414
2414
|
size: r = "md",
|
|
@@ -2501,7 +2501,7 @@ const j = ({
|
|
|
2501
2501
|
] })
|
|
2502
2502
|
);
|
|
2503
2503
|
X.displayName = "Input";
|
|
2504
|
-
const
|
|
2504
|
+
const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
2505
2505
|
"div",
|
|
2506
2506
|
{
|
|
2507
2507
|
className: te(
|
|
@@ -2525,7 +2525,7 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
|
2525
2525
|
...r,
|
|
2526
2526
|
children: t
|
|
2527
2527
|
}
|
|
2528
|
-
),
|
|
2528
|
+
), M = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n("div", { className: te("px-6 py-4", e), ...r, children: t }), ne = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
2529
2529
|
"div",
|
|
2530
2530
|
{
|
|
2531
2531
|
className: te("px-6 py-4 border-t", e),
|
|
@@ -2636,27 +2636,27 @@ const nr = ({
|
|
|
2636
2636
|
value: l = [],
|
|
2637
2637
|
className: c
|
|
2638
2638
|
}) => {
|
|
2639
|
-
const [d, u] = N(!1), y = H(null),
|
|
2639
|
+
const [d, u] = N(!1), y = H(null), v = (h) => {
|
|
2640
2640
|
if (!h) return;
|
|
2641
|
-
const
|
|
2642
|
-
if (a &&
|
|
2643
|
-
const
|
|
2644
|
-
alert(`Some files exceed the maximum size of ${
|
|
2641
|
+
const A = Array.from(h);
|
|
2642
|
+
if (a && A.filter((w) => w.size > a).length > 0) {
|
|
2643
|
+
const w = Ie(a);
|
|
2644
|
+
alert(`Some files exceed the maximum size of ${w}`);
|
|
2645
2645
|
return;
|
|
2646
2646
|
}
|
|
2647
|
-
i == null || i(s ? [...l, ...
|
|
2647
|
+
i == null || i(s ? [...l, ...A] : [A[0]]);
|
|
2648
2648
|
}, g = (h) => {
|
|
2649
2649
|
h.preventDefault(), u(!0);
|
|
2650
2650
|
}, b = () => {
|
|
2651
2651
|
u(!1);
|
|
2652
2652
|
}, m = (h) => {
|
|
2653
|
-
h.preventDefault(), u(!1),
|
|
2653
|
+
h.preventDefault(), u(!1), v(h.dataTransfer.files);
|
|
2654
2654
|
}, f = () => {
|
|
2655
2655
|
var h;
|
|
2656
2656
|
(h = y.current) == null || h.click();
|
|
2657
2657
|
}, k = (h) => {
|
|
2658
|
-
const
|
|
2659
|
-
i == null || i(
|
|
2658
|
+
const A = l.filter((S, w) => w !== h);
|
|
2659
|
+
i == null || i(A);
|
|
2660
2660
|
};
|
|
2661
2661
|
return /* @__PURE__ */ o("div", { className: te("w-full", c), children: [
|
|
2662
2662
|
t && /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: t }),
|
|
@@ -2681,7 +2681,7 @@ const nr = ({
|
|
|
2681
2681
|
className: "hidden",
|
|
2682
2682
|
accept: r,
|
|
2683
2683
|
multiple: s,
|
|
2684
|
-
onChange: (h) =>
|
|
2684
|
+
onChange: (h) => v(h.target.files)
|
|
2685
2685
|
}
|
|
2686
2686
|
),
|
|
2687
2687
|
/* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
@@ -2715,7 +2715,7 @@ const nr = ({
|
|
|
2715
2715
|
]
|
|
2716
2716
|
}
|
|
2717
2717
|
),
|
|
2718
|
-
l.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2", children: l.map((h,
|
|
2718
|
+
l.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2", children: l.map((h, A) => /* @__PURE__ */ o(
|
|
2719
2719
|
"div",
|
|
2720
2720
|
{
|
|
2721
2721
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -2748,8 +2748,8 @@ const nr = ({
|
|
|
2748
2748
|
"button",
|
|
2749
2749
|
{
|
|
2750
2750
|
type: "button",
|
|
2751
|
-
onClick: (
|
|
2752
|
-
|
|
2751
|
+
onClick: (S) => {
|
|
2752
|
+
S.stopPropagation(), k(A);
|
|
2753
2753
|
},
|
|
2754
2754
|
className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
|
|
2755
2755
|
children: /* @__PURE__ */ n("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
@@ -2764,7 +2764,7 @@ const nr = ({
|
|
|
2764
2764
|
)
|
|
2765
2765
|
]
|
|
2766
2766
|
},
|
|
2767
|
-
|
|
2767
|
+
A
|
|
2768
2768
|
)) }),
|
|
2769
2769
|
e && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-danger-500", children: e })
|
|
2770
2770
|
] });
|
|
@@ -2939,8 +2939,8 @@ function pr(t, e) {
|
|
|
2939
2939
|
r[l] = { message: c.message, type: c.code };
|
|
2940
2940
|
} else r[l] = { message: i, type: a };
|
|
2941
2941
|
if ("unionErrors" in s && s.unionErrors.forEach(function(y) {
|
|
2942
|
-
return y.errors.forEach(function(
|
|
2943
|
-
return t.push(
|
|
2942
|
+
return y.errors.forEach(function(v) {
|
|
2943
|
+
return t.push(v);
|
|
2944
2944
|
});
|
|
2945
2945
|
}), e) {
|
|
2946
2946
|
var d = r[l].types, u = d && d[s.code];
|
|
@@ -2958,8 +2958,8 @@ function gr(t, e) {
|
|
|
2958
2958
|
r[l] = { message: c.message, type: c.code };
|
|
2959
2959
|
} else r[l] = { message: i, type: a };
|
|
2960
2960
|
if (s.code === "invalid_union" && s.errors.forEach(function(y) {
|
|
2961
|
-
return y.forEach(function(
|
|
2962
|
-
return t.push(
|
|
2961
|
+
return y.forEach(function(v) {
|
|
2962
|
+
return t.push(v);
|
|
2963
2963
|
});
|
|
2964
2964
|
}), e) {
|
|
2965
2965
|
var d = r[l].types, u = d && d[s.code];
|
|
@@ -3067,7 +3067,7 @@ const Vr = ue.any(), xr = ({
|
|
|
3067
3067
|
}))
|
|
3068
3068
|
) } : { questionResults: [] }, [s]), u = s ? yr() : null, {
|
|
3069
3069
|
control: y,
|
|
3070
|
-
handleSubmit:
|
|
3070
|
+
handleSubmit: v,
|
|
3071
3071
|
formState: { errors: g }
|
|
3072
3072
|
} = Te({
|
|
3073
3073
|
resolver: u ? Ge(u) : void 0,
|
|
@@ -3077,11 +3077,11 @@ const Vr = ue.any(), xr = ({
|
|
|
3077
3077
|
try {
|
|
3078
3078
|
console.log("Form submitted with data:", m);
|
|
3079
3079
|
const f = s.questionGroups.flatMap(
|
|
3080
|
-
(h,
|
|
3081
|
-
var
|
|
3080
|
+
(h, A) => h.questions.map((S, w) => {
|
|
3081
|
+
var E, P, I;
|
|
3082
3082
|
return {
|
|
3083
|
-
questionId:
|
|
3084
|
-
values: ((
|
|
3083
|
+
questionId: S.id,
|
|
3084
|
+
values: ((I = (P = (E = m.questionResults) == null ? void 0 : E[A]) == null ? void 0 : P[w]) == null ? void 0 : I.values) || []
|
|
3085
3085
|
};
|
|
3086
3086
|
})
|
|
3087
3087
|
);
|
|
@@ -3096,76 +3096,76 @@ const Vr = ue.any(), xr = ({
|
|
|
3096
3096
|
console.error("Error submitting questionnaire:", f);
|
|
3097
3097
|
}
|
|
3098
3098
|
};
|
|
3099
|
-
return a ? /* @__PURE__ */ n(
|
|
3099
|
+
return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3100
3100
|
"Error loading questionnaire: ",
|
|
3101
3101
|
l.message
|
|
3102
|
-
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit:
|
|
3102
|
+
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: v(b), children: /* @__PURE__ */ o(T, { children: [
|
|
3103
3103
|
/* @__PURE__ */ o(ee, { children: [
|
|
3104
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3104
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.displayName }),
|
|
3105
3105
|
s.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.subtitle })
|
|
3106
3106
|
] }),
|
|
3107
|
-
/* @__PURE__ */ n(
|
|
3107
|
+
/* @__PURE__ */ n(M, { className: "space-y-8", children: s.questionGroups.flatMap(
|
|
3108
3108
|
(m, f) => m.questions.map((k, h) => {
|
|
3109
|
-
const
|
|
3109
|
+
const S = k.defaultAnswers && k.defaultAnswers.length > 0 ? k.showAsDropdown ? k.canMultipleAnswer ? "multi-select" : "single-select" : k.canMultipleAnswer ? "checkbox" : "radio" : "text";
|
|
3110
3110
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
3111
3111
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
3112
3112
|
k.text,
|
|
3113
3113
|
k.isRequired && /* @__PURE__ */ n("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
3114
3114
|
] }),
|
|
3115
|
-
|
|
3115
|
+
S === "text" && /* @__PURE__ */ n(
|
|
3116
3116
|
J,
|
|
3117
3117
|
{
|
|
3118
3118
|
control: y,
|
|
3119
3119
|
name: `questionResults.${f}.${h}.values.0`,
|
|
3120
|
-
render: ({ field:
|
|
3121
|
-
var
|
|
3120
|
+
render: ({ field: w }) => {
|
|
3121
|
+
var E, P, I, C;
|
|
3122
3122
|
return /* @__PURE__ */ n(
|
|
3123
3123
|
X,
|
|
3124
3124
|
{
|
|
3125
|
-
value:
|
|
3126
|
-
onChange:
|
|
3127
|
-
onBlur:
|
|
3128
|
-
name:
|
|
3125
|
+
value: w.value || "",
|
|
3126
|
+
onChange: w.onChange,
|
|
3127
|
+
onBlur: w.onBlur,
|
|
3128
|
+
name: w.name,
|
|
3129
3129
|
placeholder: "Enter your answer...",
|
|
3130
|
-
error: (
|
|
3130
|
+
error: (C = (I = (P = (E = g.questionResults) == null ? void 0 : E[f]) == null ? void 0 : P[h]) == null ? void 0 : I.values) == null ? void 0 : C.message
|
|
3131
3131
|
}
|
|
3132
3132
|
);
|
|
3133
3133
|
}
|
|
3134
3134
|
}
|
|
3135
3135
|
),
|
|
3136
|
-
(
|
|
3136
|
+
(S === "single-select" || S === "radio") && /* @__PURE__ */ n(
|
|
3137
3137
|
J,
|
|
3138
3138
|
{
|
|
3139
3139
|
control: y,
|
|
3140
3140
|
name: `questionResults.${f}.${h}.values.0`,
|
|
3141
|
-
render: ({ field:
|
|
3142
|
-
var
|
|
3141
|
+
render: ({ field: w }) => {
|
|
3142
|
+
var E, P, I, C;
|
|
3143
3143
|
return /* @__PURE__ */ n(
|
|
3144
3144
|
ye,
|
|
3145
3145
|
{
|
|
3146
|
-
value:
|
|
3147
|
-
onChange:
|
|
3148
|
-
onBlur:
|
|
3149
|
-
name:
|
|
3150
|
-
options: k.defaultAnswers.map((
|
|
3151
|
-
value:
|
|
3152
|
-
label:
|
|
3146
|
+
value: w.value || "",
|
|
3147
|
+
onChange: w.onChange,
|
|
3148
|
+
onBlur: w.onBlur,
|
|
3149
|
+
name: w.name,
|
|
3150
|
+
options: k.defaultAnswers.map((F) => ({
|
|
3151
|
+
value: F,
|
|
3152
|
+
label: F
|
|
3153
3153
|
})),
|
|
3154
3154
|
placeholder: "Select an option...",
|
|
3155
|
-
error: (
|
|
3155
|
+
error: (C = (I = (P = (E = g.questionResults) == null ? void 0 : E[f]) == null ? void 0 : P[h]) == null ? void 0 : I.values) == null ? void 0 : C.message
|
|
3156
3156
|
}
|
|
3157
3157
|
);
|
|
3158
3158
|
}
|
|
3159
3159
|
}
|
|
3160
3160
|
),
|
|
3161
|
-
(
|
|
3161
|
+
(S === "checkbox" || S === "multi-select") && /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
3162
3162
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2", children: "Choose one or more options" }),
|
|
3163
3163
|
/* @__PURE__ */ n(
|
|
3164
3164
|
J,
|
|
3165
3165
|
{
|
|
3166
3166
|
control: y,
|
|
3167
3167
|
name: `questionResults.${f}.${h}.values`,
|
|
3168
|
-
render: ({ field: { value:
|
|
3168
|
+
render: ({ field: { value: w = [], onChange: E } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: k.defaultAnswers.map((P, I) => /* @__PURE__ */ o(
|
|
3169
3169
|
"label",
|
|
3170
3170
|
{
|
|
3171
3171
|
className: "flex items-center space-x-2 cursor-pointer",
|
|
@@ -3174,10 +3174,10 @@ const Vr = ue.any(), xr = ({
|
|
|
3174
3174
|
"input",
|
|
3175
3175
|
{
|
|
3176
3176
|
type: "checkbox",
|
|
3177
|
-
checked: Array.isArray(
|
|
3178
|
-
onChange: (
|
|
3179
|
-
const
|
|
3180
|
-
|
|
3177
|
+
checked: Array.isArray(w) && w.includes(P),
|
|
3178
|
+
onChange: (C) => {
|
|
3179
|
+
const F = Array.isArray(w) ? w : [], O = C.target.checked ? [...F, P] : F.filter((V) => V !== P);
|
|
3180
|
+
E(O);
|
|
3181
3181
|
},
|
|
3182
3182
|
className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
|
|
3183
3183
|
}
|
|
@@ -3185,7 +3185,7 @@ const Vr = ue.any(), xr = ({
|
|
|
3185
3185
|
/* @__PURE__ */ n("span", { className: "text-sm", children: P })
|
|
3186
3186
|
]
|
|
3187
3187
|
},
|
|
3188
|
-
`answer-${f}-${h}-${
|
|
3188
|
+
`answer-${f}-${h}-${I}`
|
|
3189
3189
|
)) })
|
|
3190
3190
|
}
|
|
3191
3191
|
)
|
|
@@ -3194,9 +3194,9 @@ const Vr = ue.any(), xr = ({
|
|
|
3194
3194
|
})
|
|
3195
3195
|
) }),
|
|
3196
3196
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3197
|
-
r && /* @__PURE__ */ n(
|
|
3197
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3198
3198
|
/* @__PURE__ */ n(
|
|
3199
|
-
|
|
3199
|
+
_,
|
|
3200
3200
|
{
|
|
3201
3201
|
type: "submit",
|
|
3202
3202
|
isLoading: i,
|
|
@@ -3217,8 +3217,8 @@ const Vr = ue.any(), xr = ({
|
|
|
3217
3217
|
onComplete: e,
|
|
3218
3218
|
onBack: r
|
|
3219
3219
|
}) => {
|
|
3220
|
-
const { uploadDocument: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Jt(t), [d, u] = N({}), y = async (
|
|
3221
|
-
if (
|
|
3220
|
+
const { uploadDocument: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Jt(t), [d, u] = N({}), y = async (v) => {
|
|
3221
|
+
if (v.preventDefault(), !s) return;
|
|
3222
3222
|
const g = await Promise.all(
|
|
3223
3223
|
s.uploadDocumentFiles.map(async (m) => {
|
|
3224
3224
|
const f = d[m.id] || [], k = await Promise.all(
|
|
@@ -3239,46 +3239,46 @@ const Vr = ue.any(), xr = ({
|
|
|
3239
3239
|
};
|
|
3240
3240
|
await c(b), e == null || e();
|
|
3241
3241
|
};
|
|
3242
|
-
return a ? /* @__PURE__ */ n(
|
|
3242
|
+
return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3243
3243
|
"Error loading document requirements: ",
|
|
3244
3244
|
l.message
|
|
3245
|
-
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: y, children: /* @__PURE__ */ o(
|
|
3245
|
+
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: y, children: /* @__PURE__ */ o(T, { children: [
|
|
3246
3246
|
/* @__PURE__ */ o(ee, { children: [
|
|
3247
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3247
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.displayName }),
|
|
3248
3248
|
s.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.subtitle })
|
|
3249
3249
|
] }),
|
|
3250
|
-
/* @__PURE__ */ n(
|
|
3250
|
+
/* @__PURE__ */ n(M, { className: "space-y-6", children: s.uploadDocumentFiles.map((v) => /* @__PURE__ */ n(
|
|
3251
3251
|
nr,
|
|
3252
3252
|
{
|
|
3253
|
-
label:
|
|
3254
|
-
accept:
|
|
3255
|
-
multiple:
|
|
3256
|
-
maxSize:
|
|
3257
|
-
value: d[
|
|
3253
|
+
label: v.displayName,
|
|
3254
|
+
accept: v.allowedTypes,
|
|
3255
|
+
multiple: v.multipleFile,
|
|
3256
|
+
maxSize: v.maxEachFileSizeByte,
|
|
3257
|
+
value: d[v.id] || [],
|
|
3258
3258
|
onChange: (g) => {
|
|
3259
|
-
u((b) => ({ ...b, [
|
|
3259
|
+
u((b) => ({ ...b, [v.id]: g }));
|
|
3260
3260
|
}
|
|
3261
3261
|
},
|
|
3262
|
-
|
|
3262
|
+
v.id
|
|
3263
3263
|
)) }),
|
|
3264
3264
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3265
|
-
r && /* @__PURE__ */ n(
|
|
3266
|
-
/* @__PURE__ */ n(
|
|
3265
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3266
|
+
/* @__PURE__ */ n(_, { type: "submit", isLoading: i, children: "Continue" })
|
|
3267
3267
|
] })
|
|
3268
3268
|
] }) }) : null;
|
|
3269
3269
|
}, kr = ({ applicantId: t, onComplete: e, onBack: r }) => {
|
|
3270
3270
|
const { overview: s, isLoading: a, isSubmitting: i, error: l, passOverview: c } = Xt(t), d = async () => {
|
|
3271
3271
|
await c(), e == null || e();
|
|
3272
3272
|
};
|
|
3273
|
-
return a ? /* @__PURE__ */ n(
|
|
3273
|
+
return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3274
3274
|
"Error loading overview: ",
|
|
3275
3275
|
l.message
|
|
3276
|
-
] }) }) }) : s ? /* @__PURE__ */ o(
|
|
3276
|
+
] }) }) }) : s ? /* @__PURE__ */ o(T, { children: [
|
|
3277
3277
|
/* @__PURE__ */ o(ee, { children: [
|
|
3278
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3278
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.title || "Overview" }),
|
|
3279
3279
|
s.description && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.description })
|
|
3280
3280
|
] }),
|
|
3281
|
-
/* @__PURE__ */ o(
|
|
3281
|
+
/* @__PURE__ */ o(M, { className: "space-y-6", children: [
|
|
3282
3282
|
s.steps && s.steps.length > 0 ? /* @__PURE__ */ n("div", { className: "metakyc-overview-steps space-y-3", children: s.steps.sort((u, y) => u.order - y.order).map((u) => /* @__PURE__ */ o(
|
|
3283
3283
|
"div",
|
|
3284
3284
|
{
|
|
@@ -3352,8 +3352,8 @@ const Vr = ue.any(), xr = ({
|
|
|
3352
3352
|
] }) })
|
|
3353
3353
|
] }),
|
|
3354
3354
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3355
|
-
r && /* @__PURE__ */ n(
|
|
3356
|
-
/* @__PURE__ */ n(
|
|
3355
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3356
|
+
/* @__PURE__ */ n(_, { onClick: d, isLoading: i, children: "Confirm and Continue" })
|
|
3357
3357
|
] })
|
|
3358
3358
|
] }) : null;
|
|
3359
3359
|
}, Nr = ({
|
|
@@ -3367,12 +3367,12 @@ const Vr = ue.any(), xr = ({
|
|
|
3367
3367
|
values: [""]
|
|
3368
3368
|
// Initialize with empty string to prevent uncontrolled input warning
|
|
3369
3369
|
}))
|
|
3370
|
-
}, [s]),
|
|
3370
|
+
}, [s]), v = s && s.length > 0 ? br() : null, {
|
|
3371
3371
|
control: g,
|
|
3372
3372
|
handleSubmit: b,
|
|
3373
3373
|
formState: { errors: m }
|
|
3374
3374
|
} = Te({
|
|
3375
|
-
resolver:
|
|
3375
|
+
resolver: v ? Ge(v) : void 0,
|
|
3376
3376
|
defaultValues: y
|
|
3377
3377
|
});
|
|
3378
3378
|
ie.useEffect(() => {
|
|
@@ -3382,127 +3382,127 @@ const Vr = ue.any(), xr = ({
|
|
|
3382
3382
|
if (s)
|
|
3383
3383
|
try {
|
|
3384
3384
|
console.log("Risk scoring form submitted:", h), console.log("Criteria metadata:", s);
|
|
3385
|
-
const
|
|
3386
|
-
const P =
|
|
3387
|
-
return
|
|
3388
|
-
riskCriteriaId: s[
|
|
3389
|
-
values:
|
|
3385
|
+
const A = h.criteriaValueInputs.map((w, E) => {
|
|
3386
|
+
const P = w.values || [], I = Array.isArray(P) ? P.filter((C) => C && C.trim()) : P && P.toString().trim() ? [P.toString()] : [];
|
|
3387
|
+
return I.length === 0 ? null : {
|
|
3388
|
+
riskCriteriaId: s[E].id,
|
|
3389
|
+
values: I
|
|
3390
3390
|
};
|
|
3391
|
-
}).filter((
|
|
3392
|
-
console.log("Risk scoring criteriaValueInputs to submit:",
|
|
3393
|
-
const
|
|
3391
|
+
}).filter((w) => w !== null);
|
|
3392
|
+
console.log("Risk scoring criteriaValueInputs to submit:", A);
|
|
3393
|
+
const S = {
|
|
3394
3394
|
applicantId: t,
|
|
3395
|
-
criteriaValueInputs:
|
|
3395
|
+
criteriaValueInputs: A
|
|
3396
3396
|
};
|
|
3397
|
-
console.log("Final risk scoring input:",
|
|
3398
|
-
} catch (
|
|
3399
|
-
throw console.error("Error submitting risk scoring:",
|
|
3397
|
+
console.log("Final risk scoring input:", S), await c(S), console.log("Risk scoring submitted successfully!"), e == null || e();
|
|
3398
|
+
} catch (A) {
|
|
3399
|
+
throw console.error("Error submitting risk scoring:", A), A;
|
|
3400
3400
|
}
|
|
3401
3401
|
}, k = (h) => h.builtInType === 1 ? "country" : !h.defaultValues || h.defaultValues.length === 0 ? "text" : h.multipleValue ? "checkbox" : "radio";
|
|
3402
|
-
return a ? /* @__PURE__ */ n(
|
|
3402
|
+
return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
3403
3403
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3404
3404
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading risk scoring criteria..." })
|
|
3405
|
-
] }) }) : l ? /* @__PURE__ */ n(
|
|
3405
|
+
] }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3406
3406
|
"Error loading criteria: ",
|
|
3407
3407
|
l.message
|
|
3408
|
-
] }) }) }) : !a && s && s.length === 0 ? /* @__PURE__ */ n(
|
|
3408
|
+
] }) }) }) : !a && s && s.length === 0 ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
3409
3409
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3410
3410
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400", children: "No risk scoring criteria required. Moving to next step..." })
|
|
3411
|
-
] }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: b(f), children: /* @__PURE__ */ o(
|
|
3411
|
+
] }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: b(f), children: /* @__PURE__ */ o(T, { children: [
|
|
3412
3412
|
/* @__PURE__ */ o(ee, { children: [
|
|
3413
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3413
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
|
|
3414
3414
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please answer the following questions for risk evaluation" })
|
|
3415
3415
|
] }),
|
|
3416
|
-
/* @__PURE__ */ n(
|
|
3417
|
-
var
|
|
3418
|
-
const
|
|
3416
|
+
/* @__PURE__ */ n(M, { className: "space-y-8", children: s.map((h, A) => {
|
|
3417
|
+
var w, E, P;
|
|
3418
|
+
const S = k(h);
|
|
3419
3419
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
3420
3420
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
3421
3421
|
h.displayName,
|
|
3422
3422
|
h.isRequired && /* @__PURE__ */ n("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
3423
3423
|
] }),
|
|
3424
3424
|
h.description && /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: h.description }),
|
|
3425
|
-
|
|
3425
|
+
S === "text" && /* @__PURE__ */ n(
|
|
3426
3426
|
J,
|
|
3427
3427
|
{
|
|
3428
3428
|
control: g,
|
|
3429
|
-
name: `criteriaValueInputs.${
|
|
3430
|
-
render: ({ field:
|
|
3431
|
-
var
|
|
3429
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3430
|
+
render: ({ field: I }) => {
|
|
3431
|
+
var C, F, O;
|
|
3432
3432
|
return /* @__PURE__ */ n(
|
|
3433
3433
|
X,
|
|
3434
3434
|
{
|
|
3435
|
-
...
|
|
3436
|
-
value:
|
|
3435
|
+
...I,
|
|
3436
|
+
value: I.value || "",
|
|
3437
3437
|
type: h.valueDataType === Pe.DigitOnly ? "number" : "text",
|
|
3438
3438
|
placeholder: "Enter your answer...",
|
|
3439
|
-
error: (
|
|
3440
|
-
onKeyDown: (
|
|
3441
|
-
h.valueDataType === Pe.DigitOnly && ["e", "E", "+", "-", "."].includes(
|
|
3439
|
+
error: (O = (F = (C = m.criteriaValueInputs) == null ? void 0 : C[A]) == null ? void 0 : F.values) == null ? void 0 : O.message,
|
|
3440
|
+
onKeyDown: (V) => {
|
|
3441
|
+
h.valueDataType === Pe.DigitOnly && ["e", "E", "+", "-", "."].includes(V.key) && V.preventDefault();
|
|
3442
3442
|
}
|
|
3443
3443
|
}
|
|
3444
3444
|
);
|
|
3445
3445
|
}
|
|
3446
3446
|
}
|
|
3447
3447
|
),
|
|
3448
|
-
|
|
3448
|
+
S === "radio" && h.defaultValues && /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
3449
3449
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Choose one option" }),
|
|
3450
3450
|
/* @__PURE__ */ n(
|
|
3451
3451
|
J,
|
|
3452
3452
|
{
|
|
3453
3453
|
control: g,
|
|
3454
|
-
name: `criteriaValueInputs.${
|
|
3455
|
-
render: ({ field: { value:
|
|
3454
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3455
|
+
render: ({ field: { value: I, onChange: C } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((F, O) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
3456
3456
|
/* @__PURE__ */ n(
|
|
3457
3457
|
"input",
|
|
3458
3458
|
{
|
|
3459
3459
|
type: "radio",
|
|
3460
|
-
checked:
|
|
3461
|
-
onChange: () =>
|
|
3460
|
+
checked: I === F,
|
|
3461
|
+
onChange: () => C(F),
|
|
3462
3462
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
3463
3463
|
}
|
|
3464
3464
|
),
|
|
3465
|
-
/* @__PURE__ */ n("span", { className: "text-sm", children:
|
|
3466
|
-
] }, `${
|
|
3465
|
+
/* @__PURE__ */ n("span", { className: "text-sm", children: F })
|
|
3466
|
+
] }, `${A}-${O}`)) })
|
|
3467
3467
|
}
|
|
3468
3468
|
)
|
|
3469
3469
|
] }),
|
|
3470
|
-
|
|
3470
|
+
S === "checkbox" && h.defaultValues && /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
3471
3471
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Choose one or more options" }),
|
|
3472
3472
|
/* @__PURE__ */ n(
|
|
3473
3473
|
J,
|
|
3474
3474
|
{
|
|
3475
3475
|
control: g,
|
|
3476
|
-
name: `criteriaValueInputs.${
|
|
3477
|
-
render: ({ field: { value:
|
|
3476
|
+
name: `criteriaValueInputs.${A}.values`,
|
|
3477
|
+
render: ({ field: { value: I = [], onChange: C } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((F, O) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
3478
3478
|
/* @__PURE__ */ n(
|
|
3479
3479
|
"input",
|
|
3480
3480
|
{
|
|
3481
3481
|
type: "checkbox",
|
|
3482
|
-
checked: Array.isArray(
|
|
3483
|
-
onChange: (
|
|
3484
|
-
const
|
|
3485
|
-
|
|
3482
|
+
checked: Array.isArray(I) && I.includes(F),
|
|
3483
|
+
onChange: (V) => {
|
|
3484
|
+
const U = Array.isArray(I) ? I : [], p = V.target.checked ? [...U, F] : U.filter((x) => x !== F);
|
|
3485
|
+
C(p);
|
|
3486
3486
|
},
|
|
3487
3487
|
className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
|
|
3488
3488
|
}
|
|
3489
3489
|
),
|
|
3490
|
-
/* @__PURE__ */ n("span", { className: "text-sm", children:
|
|
3491
|
-
] }, `${
|
|
3490
|
+
/* @__PURE__ */ n("span", { className: "text-sm", children: F })
|
|
3491
|
+
] }, `${A}-${O}`)) })
|
|
3492
3492
|
}
|
|
3493
3493
|
)
|
|
3494
3494
|
] }),
|
|
3495
|
-
|
|
3495
|
+
S === "country" && /* @__PURE__ */ n(
|
|
3496
3496
|
J,
|
|
3497
3497
|
{
|
|
3498
3498
|
control: g,
|
|
3499
|
-
name: `criteriaValueInputs.${
|
|
3500
|
-
render: ({ field:
|
|
3501
|
-
var
|
|
3499
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3500
|
+
render: ({ field: I }) => {
|
|
3501
|
+
var C, F, O;
|
|
3502
3502
|
return /* @__PURE__ */ n(
|
|
3503
3503
|
ye,
|
|
3504
3504
|
{
|
|
3505
|
-
...
|
|
3505
|
+
...I,
|
|
3506
3506
|
options: [
|
|
3507
3507
|
{ value: "US", label: "United States" },
|
|
3508
3508
|
{ value: "GB", label: "United Kingdom" },
|
|
@@ -3510,19 +3510,19 @@ const Vr = ue.any(), xr = ({
|
|
|
3510
3510
|
// TODO: Load from base information service
|
|
3511
3511
|
],
|
|
3512
3512
|
placeholder: "Select a country...",
|
|
3513
|
-
error: (
|
|
3513
|
+
error: (O = (F = (C = m.criteriaValueInputs) == null ? void 0 : C[A]) == null ? void 0 : F.values) == null ? void 0 : O.message
|
|
3514
3514
|
}
|
|
3515
3515
|
);
|
|
3516
3516
|
}
|
|
3517
3517
|
}
|
|
3518
3518
|
),
|
|
3519
|
-
((P = (
|
|
3519
|
+
((P = (E = (w = m.criteriaValueInputs) == null ? void 0 : w[A]) == null ? void 0 : E.values) == null ? void 0 : P.message) && /* @__PURE__ */ n("p", { className: "text-sm text-danger-500 mt-1", children: m.criteriaValueInputs[A].values.message })
|
|
3520
3520
|
] }, h.id);
|
|
3521
3521
|
}) }),
|
|
3522
3522
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3523
|
-
r && /* @__PURE__ */ n(
|
|
3523
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3524
3524
|
/* @__PURE__ */ n(
|
|
3525
|
-
|
|
3525
|
+
_,
|
|
3526
3526
|
{
|
|
3527
3527
|
type: "submit",
|
|
3528
3528
|
isLoading: i,
|
|
@@ -3544,8 +3544,8 @@ const Vr = ue.any(), xr = ({
|
|
|
3544
3544
|
onBack: r
|
|
3545
3545
|
}) => {
|
|
3546
3546
|
const { investorCategorizationService: s } = se(), [a, i] = N(null), [l, c] = N(!1), [d, u] = N(null);
|
|
3547
|
-
return /* @__PURE__ */ n("form", { onSubmit: async (
|
|
3548
|
-
if (
|
|
3547
|
+
return /* @__PURE__ */ n("form", { onSubmit: async (v) => {
|
|
3548
|
+
if (v.preventDefault(), a === null) {
|
|
3549
3549
|
u("Please select an investor type");
|
|
3550
3550
|
return;
|
|
3551
3551
|
}
|
|
@@ -3563,12 +3563,12 @@ const Vr = ue.any(), xr = ({
|
|
|
3563
3563
|
} finally {
|
|
3564
3564
|
c(!1);
|
|
3565
3565
|
}
|
|
3566
|
-
}, children: /* @__PURE__ */ o(
|
|
3566
|
+
}, children: /* @__PURE__ */ o(T, { children: [
|
|
3567
3567
|
/* @__PURE__ */ o(ee, { children: [
|
|
3568
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3568
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: "Which statement best describes you?" }),
|
|
3569
3569
|
/* @__PURE__ */ n("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" })
|
|
3570
3570
|
] }),
|
|
3571
|
-
/* @__PURE__ */ o(
|
|
3571
|
+
/* @__PURE__ */ o(M, { className: "space-y-4", children: [
|
|
3572
3572
|
/* @__PURE__ */ n("p", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: "Choose one" }),
|
|
3573
3573
|
/* @__PURE__ */ n(
|
|
3574
3574
|
"label",
|
|
@@ -3664,9 +3664,9 @@ const Vr = ue.any(), xr = ({
|
|
|
3664
3664
|
] }) })
|
|
3665
3665
|
] }),
|
|
3666
3666
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3667
|
-
r && /* @__PURE__ */ n(
|
|
3667
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3668
3668
|
/* @__PURE__ */ n(
|
|
3669
|
-
|
|
3669
|
+
_,
|
|
3670
3670
|
{
|
|
3671
3671
|
type: "submit",
|
|
3672
3672
|
isLoading: l,
|
|
@@ -3681,137 +3681,137 @@ const Vr = ue.any(), xr = ({
|
|
|
3681
3681
|
onComplete: e,
|
|
3682
3682
|
onBack: r
|
|
3683
3683
|
}) => {
|
|
3684
|
-
const { appropriatenessTestService: s } = se(), [a, i] = N(null), [l, c] = N(!0), [d, u] = N(!1), [y,
|
|
3685
|
-
|
|
3684
|
+
const { appropriatenessTestService: s } = se(), [a, i] = N(null), [l, c] = N(!0), [d, u] = N(!1), [y, v] = N(null), [g, b] = N({}), [m, f] = N(0), [k, h] = N(!1), [A, S] = N(!1), [w, E] = N(0);
|
|
3685
|
+
W(() => {
|
|
3686
3686
|
(async () => {
|
|
3687
3687
|
try {
|
|
3688
|
-
c(!0),
|
|
3689
|
-
const
|
|
3690
|
-
if (console.log("Appropriateness test data:",
|
|
3691
|
-
const
|
|
3692
|
-
|
|
3688
|
+
c(!0), v(null), console.log("Loading appropriateness test for applicant:", t);
|
|
3689
|
+
const x = await s.getAppropriatenessTest(t);
|
|
3690
|
+
if (console.log("Appropriateness test data:", x), i(x), x.waitTimeSpanForNextTry && x.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3691
|
+
const z = P(x.waitTimeSpanForNextTry);
|
|
3692
|
+
z > 0 && E(z);
|
|
3693
3693
|
}
|
|
3694
|
-
} catch (
|
|
3695
|
-
console.error("Error loading appropriateness test:",
|
|
3694
|
+
} catch (x) {
|
|
3695
|
+
console.error("Error loading appropriateness test:", x), v(x.message || "Failed to load appropriateness test");
|
|
3696
3696
|
} finally {
|
|
3697
3697
|
c(!1);
|
|
3698
3698
|
}
|
|
3699
3699
|
})();
|
|
3700
3700
|
}, [t, s]);
|
|
3701
3701
|
const P = (p) => {
|
|
3702
|
-
const
|
|
3703
|
-
if (
|
|
3704
|
-
const [
|
|
3705
|
-
return
|
|
3702
|
+
const x = p.split(":").map(Number);
|
|
3703
|
+
if (x.length === 3) {
|
|
3704
|
+
const [z, $, R] = x;
|
|
3705
|
+
return z * 3600 + $ * 60 + R;
|
|
3706
3706
|
}
|
|
3707
3707
|
return 0;
|
|
3708
|
-
},
|
|
3709
|
-
const
|
|
3710
|
-
return `${
|
|
3708
|
+
}, I = (p) => {
|
|
3709
|
+
const x = Math.floor(p / 60), z = p % 60;
|
|
3710
|
+
return `${x.toString().padStart(2, "0")}:${z.toString().padStart(2, "0")}`;
|
|
3711
3711
|
};
|
|
3712
|
-
|
|
3712
|
+
W(() => {
|
|
3713
3713
|
if (!k || m <= 0) return;
|
|
3714
3714
|
const p = setInterval(() => {
|
|
3715
|
-
f((
|
|
3715
|
+
f((x) => x <= 1 ? (S(!0), 0) : x - 1);
|
|
3716
3716
|
}, 1e3);
|
|
3717
3717
|
return () => clearInterval(p);
|
|
3718
|
-
}, [k, m]),
|
|
3719
|
-
if (
|
|
3718
|
+
}, [k, m]), W(() => {
|
|
3719
|
+
if (w <= 0) return;
|
|
3720
3720
|
const p = setInterval(() => {
|
|
3721
|
-
|
|
3721
|
+
E((x) => x <= 1 ? 0 : x - 1);
|
|
3722
3722
|
}, 1e3);
|
|
3723
3723
|
return () => clearInterval(p);
|
|
3724
|
-
}, [
|
|
3725
|
-
|
|
3726
|
-
}, [
|
|
3727
|
-
const
|
|
3724
|
+
}, [w]), W(() => {
|
|
3725
|
+
A && !d && O();
|
|
3726
|
+
}, [A]);
|
|
3727
|
+
const C = () => {
|
|
3728
3728
|
a && (h(!0), f(a.testDurationSec));
|
|
3729
|
-
},
|
|
3730
|
-
b((
|
|
3731
|
-
...
|
|
3732
|
-
[p]:
|
|
3729
|
+
}, F = (p, x) => {
|
|
3730
|
+
b((z) => ({
|
|
3731
|
+
...z,
|
|
3732
|
+
[p]: x
|
|
3733
3733
|
}));
|
|
3734
|
-
},
|
|
3734
|
+
}, O = async (p) => {
|
|
3735
3735
|
if (p && p.preventDefault(), !!a) {
|
|
3736
|
-
if (!
|
|
3737
|
-
const
|
|
3738
|
-
if (
|
|
3739
|
-
|
|
3736
|
+
if (!A) {
|
|
3737
|
+
const x = a.appropriatenessQuestions.length - Object.keys(g).length;
|
|
3738
|
+
if (x > 0) {
|
|
3739
|
+
v(`Please answer all questions. ${x} question(s) remaining.`);
|
|
3740
3740
|
return;
|
|
3741
3741
|
}
|
|
3742
3742
|
}
|
|
3743
|
-
u(!0),
|
|
3743
|
+
u(!0), v(null);
|
|
3744
3744
|
try {
|
|
3745
|
-
const
|
|
3746
|
-
(
|
|
3747
|
-
appropriatenessQuestionId:
|
|
3748
|
-
value: g[
|
|
3745
|
+
const x = a.appropriatenessQuestions.map(
|
|
3746
|
+
($) => ({
|
|
3747
|
+
appropriatenessQuestionId: $.id,
|
|
3748
|
+
value: g[$.id] || ""
|
|
3749
3749
|
// Empty string if not answered
|
|
3750
3750
|
})
|
|
3751
|
-
),
|
|
3751
|
+
), z = {
|
|
3752
3752
|
applicantId: t,
|
|
3753
3753
|
appropriatenessTestId: a.id,
|
|
3754
|
-
appropriatenessQuestionResults:
|
|
3754
|
+
appropriatenessQuestionResults: x
|
|
3755
3755
|
};
|
|
3756
|
-
console.log("Submitting appropriateness test:",
|
|
3756
|
+
console.log("Submitting appropriateness test:", z);
|
|
3757
3757
|
try {
|
|
3758
|
-
const
|
|
3759
|
-
console.log("Appropriateness test result:",
|
|
3760
|
-
} catch (
|
|
3761
|
-
if (
|
|
3762
|
-
const R =
|
|
3763
|
-
console.log("Test failed:", R),
|
|
3758
|
+
const $ = await s.fillAppropriatenessTest(z);
|
|
3759
|
+
console.log("Appropriateness test result:", $), $.message && ($.message.toLowerCase().includes("pass") || $.message.toLowerCase().includes("success") || $.message.toLowerCase().includes("congratulations")) ? e == null || e() : (v($.message || "Test completed. Please check the result."), h(!1), S(!1), b({}), setTimeout(() => V(), 1e3));
|
|
3760
|
+
} catch ($) {
|
|
3761
|
+
if ($.code === 400 && $.message) {
|
|
3762
|
+
const R = $.message;
|
|
3763
|
+
console.log("Test failed:", R), v(R), h(!1), S(!1), b({}), setTimeout(() => V(), 1500);
|
|
3764
3764
|
} else
|
|
3765
|
-
throw
|
|
3765
|
+
throw $;
|
|
3766
3766
|
}
|
|
3767
|
-
} catch (
|
|
3768
|
-
console.error("Error submitting appropriateness test:",
|
|
3767
|
+
} catch (x) {
|
|
3768
|
+
console.error("Error submitting appropriateness test:", x), v(x.message || "Failed to submit test. Please try again."), h(!1), S(!1), b({});
|
|
3769
3769
|
} finally {
|
|
3770
3770
|
u(!1);
|
|
3771
3771
|
}
|
|
3772
3772
|
}
|
|
3773
|
-
},
|
|
3773
|
+
}, V = async () => {
|
|
3774
3774
|
try {
|
|
3775
3775
|
const p = await s.getAppropriatenessTest(t);
|
|
3776
3776
|
if (console.log("Reloaded test data:", p), i(p), p.waitTimeSpanForNextTry && p.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3777
|
+
const x = P(p.waitTimeSpanForNextTry);
|
|
3778
|
+
x > 0 && E(x);
|
|
3779
3779
|
}
|
|
3780
3780
|
} catch (p) {
|
|
3781
|
-
console.error("Error reloading test data:", p),
|
|
3781
|
+
console.error("Error reloading test data:", p), v((x) => x + `
|
|
3782
3782
|
|
|
3783
3783
|
Failed to reload test data. Please refresh the page.`);
|
|
3784
3784
|
}
|
|
3785
3785
|
};
|
|
3786
3786
|
if (l)
|
|
3787
|
-
return /* @__PURE__ */ n(
|
|
3787
|
+
return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
3788
3788
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3789
3789
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
|
|
3790
3790
|
] }) });
|
|
3791
3791
|
if (!a)
|
|
3792
|
-
return /* @__PURE__ */ n(
|
|
3792
|
+
return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
|
|
3793
3793
|
/* @__PURE__ */ n("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
|
|
3794
3794
|
y && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: y })
|
|
3795
3795
|
] }) });
|
|
3796
|
-
if (
|
|
3797
|
-
return /* @__PURE__ */ o(
|
|
3796
|
+
if (w > 0)
|
|
3797
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
3798
3798
|
/* @__PURE__ */ o(ee, { children: [
|
|
3799
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3799
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: a.displayName }),
|
|
3800
3800
|
a.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: a.subtitle })
|
|
3801
3801
|
] }),
|
|
3802
|
-
/* @__PURE__ */ o(
|
|
3802
|
+
/* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
|
|
3803
3803
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
3804
|
-
/* @__PURE__ */ n("div", { className: "text-6xl font-bold text-primary-500 mb-2", children:
|
|
3804
|
+
/* @__PURE__ */ n("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: I(w) }),
|
|
3805
3805
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
3806
3806
|
] }),
|
|
3807
3807
|
y && /* @__PURE__ */ n("div", { className: "mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ n("p", { className: "text-red-600 dark:text-red-400 text-sm", children: y }) })
|
|
3808
3808
|
] })
|
|
3809
3809
|
] });
|
|
3810
|
-
const
|
|
3811
|
-
return k ? /* @__PURE__ */ n("form", { onSubmit:
|
|
3810
|
+
const U = a.testAllowedMaxTry - a.totalFailedTries;
|
|
3811
|
+
return k ? /* @__PURE__ */ n("form", { onSubmit: O, children: /* @__PURE__ */ o(T, { children: [
|
|
3812
3812
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
3813
3813
|
/* @__PURE__ */ o("div", { children: [
|
|
3814
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3814
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: a.displayName }),
|
|
3815
3815
|
a.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
|
|
3816
3816
|
] }),
|
|
3817
3817
|
/* @__PURE__ */ o("div", { className: "text-right", children: [
|
|
@@ -3819,13 +3819,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3819
3819
|
"div",
|
|
3820
3820
|
{
|
|
3821
3821
|
className: `text-3xl font-bold ${m <= 60 ? "text-danger-500" : "text-primary-500"}`,
|
|
3822
|
-
children:
|
|
3822
|
+
children: I(m)
|
|
3823
3823
|
}
|
|
3824
3824
|
),
|
|
3825
3825
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
3826
3826
|
] })
|
|
3827
3827
|
] }) }),
|
|
3828
|
-
/* @__PURE__ */ o(
|
|
3828
|
+
/* @__PURE__ */ o(M, { className: "space-y-6", children: [
|
|
3829
3829
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
|
|
3830
3830
|
/* @__PURE__ */ o(he, { variant: "info", children: [
|
|
3831
3831
|
"Question ",
|
|
@@ -3833,14 +3833,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3833
3833
|
" of ",
|
|
3834
3834
|
a.totalQuestionCount
|
|
3835
3835
|
] }),
|
|
3836
|
-
/* @__PURE__ */ o(he, { variant:
|
|
3837
|
-
|
|
3836
|
+
/* @__PURE__ */ o(he, { variant: U > 1 ? "success" : "warning", children: [
|
|
3837
|
+
U,
|
|
3838
3838
|
" attempt",
|
|
3839
|
-
|
|
3839
|
+
U !== 1 ? "s" : "",
|
|
3840
3840
|
" remaining"
|
|
3841
3841
|
] })
|
|
3842
3842
|
] }),
|
|
3843
|
-
a.appropriatenessQuestions.map((p,
|
|
3843
|
+
a.appropriatenessQuestions.map((p, x) => /* @__PURE__ */ o(
|
|
3844
3844
|
"div",
|
|
3845
3845
|
{
|
|
3846
3846
|
className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
|
|
@@ -3848,17 +3848,17 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3848
3848
|
/* @__PURE__ */ o("div", { className: "mb-4", children: [
|
|
3849
3849
|
/* @__PURE__ */ o("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: [
|
|
3850
3850
|
"Question ",
|
|
3851
|
-
|
|
3851
|
+
x + 1
|
|
3852
3852
|
] }),
|
|
3853
3853
|
p.groupName && /* @__PURE__ */ n("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: p.groupName }),
|
|
3854
3854
|
/* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: p.question })
|
|
3855
3855
|
] }),
|
|
3856
|
-
/* @__PURE__ */ n("div", { className: "space-y-2", children: p.answers.map((
|
|
3856
|
+
/* @__PURE__ */ n("div", { className: "space-y-2", children: p.answers.map((z, $) => /* @__PURE__ */ o(
|
|
3857
3857
|
"label",
|
|
3858
3858
|
{
|
|
3859
3859
|
className: `
|
|
3860
3860
|
flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
|
|
3861
|
-
${g[p.id] ===
|
|
3861
|
+
${g[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"}
|
|
3862
3862
|
`,
|
|
3863
3863
|
children: [
|
|
3864
3864
|
/* @__PURE__ */ n(
|
|
@@ -3866,35 +3866,35 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3866
3866
|
{
|
|
3867
3867
|
type: "radio",
|
|
3868
3868
|
name: `question-${p.id}`,
|
|
3869
|
-
value:
|
|
3870
|
-
checked: g[p.id] ===
|
|
3871
|
-
onChange: (R) =>
|
|
3869
|
+
value: z,
|
|
3870
|
+
checked: g[p.id] === z,
|
|
3871
|
+
onChange: (R) => F(p.id, R.target.value),
|
|
3872
3872
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
|
|
3873
3873
|
disabled: d
|
|
3874
3874
|
}
|
|
3875
3875
|
),
|
|
3876
|
-
/* @__PURE__ */ n("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children:
|
|
3876
|
+
/* @__PURE__ */ n("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: z })
|
|
3877
3877
|
]
|
|
3878
3878
|
},
|
|
3879
|
-
|
|
3879
|
+
$
|
|
3880
3880
|
)) })
|
|
3881
3881
|
]
|
|
3882
3882
|
},
|
|
3883
3883
|
p.id
|
|
3884
3884
|
)),
|
|
3885
|
-
y && !
|
|
3885
|
+
y && !A && /* @__PURE__ */ n("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
3886
3886
|
/* @__PURE__ */ n("strong", { children: "Error:" }),
|
|
3887
3887
|
" ",
|
|
3888
3888
|
y
|
|
3889
3889
|
] }) }),
|
|
3890
|
-
|
|
3890
|
+
A && /* @__PURE__ */ n("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
|
|
3891
3891
|
/* @__PURE__ */ n("strong", { children: "Time's up!" }),
|
|
3892
3892
|
" Your answers are being submitted automatically."
|
|
3893
3893
|
] }) })
|
|
3894
3894
|
] }),
|
|
3895
3895
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3896
3896
|
/* @__PURE__ */ n(
|
|
3897
|
-
|
|
3897
|
+
_,
|
|
3898
3898
|
{
|
|
3899
3899
|
type: "button",
|
|
3900
3900
|
variant: "outline",
|
|
@@ -3904,21 +3904,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3904
3904
|
}
|
|
3905
3905
|
),
|
|
3906
3906
|
/* @__PURE__ */ n(
|
|
3907
|
-
|
|
3907
|
+
_,
|
|
3908
3908
|
{
|
|
3909
3909
|
type: "submit",
|
|
3910
3910
|
isLoading: d,
|
|
3911
3911
|
disabled: Object.keys(g).length < a.totalQuestionCount,
|
|
3912
|
-
children:
|
|
3912
|
+
children: A ? "Submitting..." : "Submit Test"
|
|
3913
3913
|
}
|
|
3914
3914
|
)
|
|
3915
3915
|
] })
|
|
3916
|
-
] }) }) : /* @__PURE__ */ o(
|
|
3916
|
+
] }) }) : /* @__PURE__ */ o(T, { children: [
|
|
3917
3917
|
/* @__PURE__ */ o(ee, { children: [
|
|
3918
|
-
/* @__PURE__ */ n("h2", { className: "text-
|
|
3918
|
+
/* @__PURE__ */ n("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: a.displayName }),
|
|
3919
3919
|
a.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: a.subtitle })
|
|
3920
3920
|
] }),
|
|
3921
|
-
/* @__PURE__ */ o(
|
|
3921
|
+
/* @__PURE__ */ o(M, { children: [
|
|
3922
3922
|
a.description && /* @__PURE__ */ n("div", { className: "mb-6 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg", children: /* @__PURE__ */ n("p", { className: "text-gray-700 dark:text-gray-300", children: a.description }) }),
|
|
3923
3923
|
/* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
|
|
3924
3924
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
@@ -3927,7 +3927,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3927
3927
|
] }),
|
|
3928
3928
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
3929
3929
|
/* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
3930
|
-
/* @__PURE__ */ n(he, { variant: "info", children:
|
|
3930
|
+
/* @__PURE__ */ n(he, { variant: "info", children: I(a.testDurationSec) })
|
|
3931
3931
|
] }),
|
|
3932
3932
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
3933
3933
|
/* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
@@ -3935,7 +3935,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3935
3935
|
] }),
|
|
3936
3936
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
3937
3937
|
/* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
3938
|
-
/* @__PURE__ */ n(he, { variant:
|
|
3938
|
+
/* @__PURE__ */ n(he, { variant: U > 1 ? "success" : "warning", children: U })
|
|
3939
3939
|
] })
|
|
3940
3940
|
] }),
|
|
3941
3941
|
y && /* @__PURE__ */ n("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__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
@@ -3943,16 +3943,16 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3943
3943
|
" ",
|
|
3944
3944
|
y
|
|
3945
3945
|
] }) }),
|
|
3946
|
-
|
|
3946
|
+
U <= 0 && /* @__PURE__ */ n("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ n("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
3947
3947
|
] }),
|
|
3948
3948
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
3949
|
-
r && /* @__PURE__ */ n(
|
|
3949
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
3950
3950
|
/* @__PURE__ */ n(
|
|
3951
|
-
|
|
3951
|
+
_,
|
|
3952
3952
|
{
|
|
3953
3953
|
type: "button",
|
|
3954
|
-
onClick:
|
|
3955
|
-
disabled:
|
|
3954
|
+
onClick: C,
|
|
3955
|
+
disabled: U <= 0,
|
|
3956
3956
|
children: "Start Test"
|
|
3957
3957
|
}
|
|
3958
3958
|
)
|
|
@@ -3963,8 +3963,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3963
3963
|
onComplete: e,
|
|
3964
3964
|
onBack: r
|
|
3965
3965
|
}) => {
|
|
3966
|
-
var
|
|
3967
|
-
const { applicantService: s, baseInformationService: a, config: i } = se(), { identityData: l, provider: c, token: d, isLoading: u, error: y, requestIdentity:
|
|
3966
|
+
var z, $, R, we;
|
|
3967
|
+
const { applicantService: s, baseInformationService: a, config: i } = se(), { identityData: l, provider: c, token: d, isLoading: u, error: y, requestIdentity: v, restartIdentity: g } = er(t), [b, m] = N(null), [f, k] = N(null), [h, A] = N([]), [S, w] = N(!0), [E, P] = N(!1), [I, C] = N(null), [F, O] = N(!1), V = ie.useRef(!1), U = Te({
|
|
3968
3968
|
defaultValues: {
|
|
3969
3969
|
street: "",
|
|
3970
3970
|
streetNumber: "",
|
|
@@ -3975,7 +3975,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3975
3975
|
phonenumber: ""
|
|
3976
3976
|
}
|
|
3977
3977
|
});
|
|
3978
|
-
|
|
3978
|
+
W(() => {
|
|
3979
3979
|
(async () => {
|
|
3980
3980
|
try {
|
|
3981
3981
|
const [D, G] = await Promise.all([
|
|
@@ -3983,24 +3983,24 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3983
3983
|
a.getCountries("", "en")
|
|
3984
3984
|
]);
|
|
3985
3985
|
k(D);
|
|
3986
|
-
const
|
|
3986
|
+
const Y = /* @__PURE__ */ new Set(), ae = G.filter((me) => {
|
|
3987
3987
|
const Ae = me.abbreviation3 || me.abbreviation;
|
|
3988
|
-
return !Ae ||
|
|
3988
|
+
return !Ae || Y.has(Ae) ? !1 : (Y.add(Ae), !0);
|
|
3989
3989
|
});
|
|
3990
|
-
|
|
3991
|
-
const
|
|
3992
|
-
if (
|
|
3993
|
-
street: (
|
|
3994
|
-
streetNumber: (
|
|
3995
|
-
city: (
|
|
3996
|
-
zip: (
|
|
3997
|
-
country: (
|
|
3998
|
-
nationality: (
|
|
3999
|
-
phonenumber: (
|
|
4000
|
-
}), D.kycRecords && D.kycRecords.length > 0 && D.kycRecords[0].providerTokenObject !== null && !
|
|
4001
|
-
console.log("[Identity] Found existing identity verification, auto-requesting..."),
|
|
3990
|
+
A(ae);
|
|
3991
|
+
const j = D.applicantRequestData;
|
|
3992
|
+
if (U.reset({
|
|
3993
|
+
street: (j == null ? void 0 : j.street) || "",
|
|
3994
|
+
streetNumber: (j == null ? void 0 : j.streetNumber) || "",
|
|
3995
|
+
city: (j == null ? void 0 : j.city) || "",
|
|
3996
|
+
zip: (j == null ? void 0 : j.zip) || "",
|
|
3997
|
+
country: (j == null ? void 0 : j.country) || "",
|
|
3998
|
+
nationality: (j == null ? void 0 : j.nationality) || "",
|
|
3999
|
+
phonenumber: (j == null ? void 0 : j.phonenumber) || ""
|
|
4000
|
+
}), D.kycRecords && D.kycRecords.length > 0 && D.kycRecords[0].providerTokenObject !== null && !V.current) {
|
|
4001
|
+
console.log("[Identity] Found existing identity verification, auto-requesting..."), V.current = !0;
|
|
4002
4002
|
try {
|
|
4003
|
-
await
|
|
4003
|
+
await v(), P(!0);
|
|
4004
4004
|
} catch (me) {
|
|
4005
4005
|
console.error("[Identity] Auto-request failed:", me);
|
|
4006
4006
|
}
|
|
@@ -4008,17 +4008,17 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4008
4008
|
} catch (D) {
|
|
4009
4009
|
console.error("Error loading applicant data:", D);
|
|
4010
4010
|
} finally {
|
|
4011
|
-
|
|
4011
|
+
w(!1);
|
|
4012
4012
|
}
|
|
4013
4013
|
})();
|
|
4014
|
-
}, [t]),
|
|
4015
|
-
l && !
|
|
4016
|
-
}, [l,
|
|
4014
|
+
}, [t]), W(() => {
|
|
4015
|
+
l && !E && (console.log("[Identity] Identity data already loaded, showing provider"), P(!0));
|
|
4016
|
+
}, [l, E]), W(() => {
|
|
4017
4017
|
if (d) {
|
|
4018
4018
|
if (d.expiresAt) {
|
|
4019
|
-
const
|
|
4020
|
-
if (Date.now() >=
|
|
4021
|
-
console.warn("[Identity] Token has expired (expiresAt)"),
|
|
4019
|
+
const L = new Date(d.expiresAt).getTime();
|
|
4020
|
+
if (Date.now() >= L) {
|
|
4021
|
+
console.warn("[Identity] Token has expired (expiresAt)"), O(!0), C("Your verification session has expired. Please restart.");
|
|
4022
4022
|
return;
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
@@ -4026,31 +4026,31 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4026
4026
|
try {
|
|
4027
4027
|
const D = new URL(d.url).toString().toLowerCase();
|
|
4028
4028
|
if (D.includes("expired") || D.includes("invalid") || D.includes("error")) {
|
|
4029
|
-
console.warn("[Identity] Token URL indicates expiration"),
|
|
4029
|
+
console.warn("[Identity] Token URL indicates expiration"), O(!0), C("Your verification link has expired. Please restart.");
|
|
4030
4030
|
return;
|
|
4031
4031
|
}
|
|
4032
4032
|
} catch {
|
|
4033
4033
|
console.error("[Identity] Invalid token URL");
|
|
4034
4034
|
}
|
|
4035
4035
|
if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
|
|
4036
|
-
console.warn("[Identity] Token object indicates expiration"),
|
|
4036
|
+
console.warn("[Identity] Token object indicates expiration"), O(!0), C("Your verification session has expired. Please restart.");
|
|
4037
4037
|
return;
|
|
4038
4038
|
}
|
|
4039
4039
|
}
|
|
4040
|
-
}, [d]),
|
|
4041
|
-
if (c !== null && d && !b &&
|
|
4042
|
-
const
|
|
4040
|
+
}, [d]), W(() => {
|
|
4041
|
+
if (c !== null && d && !b && E && !F) {
|
|
4042
|
+
const L = c;
|
|
4043
4043
|
if (d.url) {
|
|
4044
|
-
console.log("[Identity] Loading provider URL for user verification:", d.url),
|
|
4044
|
+
console.log("[Identity] Loading provider URL for user verification:", d.url), C(null);
|
|
4045
4045
|
try {
|
|
4046
|
-
if (new URL(d.url),
|
|
4046
|
+
if (new URL(d.url), L === oe.SardinAI) {
|
|
4047
4047
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4048
4048
|
try {
|
|
4049
4049
|
const D = fe.parseProviderConfig(c, d, i);
|
|
4050
4050
|
fe.createProvider(c, D).initialize().then(() => {
|
|
4051
4051
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4052
|
-
}).catch((
|
|
4053
|
-
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):",
|
|
4052
|
+
}).catch((Y) => {
|
|
4053
|
+
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", Y);
|
|
4054
4054
|
});
|
|
4055
4055
|
} catch (D) {
|
|
4056
4056
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", D);
|
|
@@ -4058,80 +4058,80 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4058
4058
|
}
|
|
4059
4059
|
m({ type: "url", url: d.url });
|
|
4060
4060
|
} catch (D) {
|
|
4061
|
-
console.error("[Identity] Invalid URL:", D),
|
|
4061
|
+
console.error("[Identity] Invalid URL:", D), C("Invalid verification URL. Please restart."), O(!0);
|
|
4062
4062
|
}
|
|
4063
4063
|
return;
|
|
4064
4064
|
}
|
|
4065
|
-
if (
|
|
4066
|
-
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."),
|
|
4065
|
+
if (L === oe.SardinAI) {
|
|
4066
|
+
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), C(null);
|
|
4067
4067
|
try {
|
|
4068
4068
|
const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
|
|
4069
4069
|
G.initialize().then(() => {
|
|
4070
4070
|
console.log("[SardinAI] Risk SDK initialized successfully"), m(G), setTimeout(() => {
|
|
4071
4071
|
e == null || e();
|
|
4072
4072
|
}, 2e3);
|
|
4073
|
-
}).catch((
|
|
4074
|
-
var
|
|
4075
|
-
console.error("[SardinAI] Failed to initialize:",
|
|
4076
|
-
const ae = ((
|
|
4077
|
-
ae.includes("expired") || ae.includes("invalid") || ae.includes("401") || ae.includes("400") ? (
|
|
4073
|
+
}).catch((Y) => {
|
|
4074
|
+
var j;
|
|
4075
|
+
console.error("[SardinAI] Failed to initialize:", Y);
|
|
4076
|
+
const ae = ((j = Y.message) == null ? void 0 : j.toLowerCase()) || "";
|
|
4077
|
+
ae.includes("expired") || ae.includes("invalid") || ae.includes("401") || ae.includes("400") ? (O(!0), C("Session expired or invalid. Please restart verification.")) : C(`Failed to initialize: ${Y.message}`);
|
|
4078
4078
|
});
|
|
4079
4079
|
} catch (D) {
|
|
4080
|
-
console.error("[SardinAI] Error creating provider:", D),
|
|
4080
|
+
console.error("[SardinAI] Error creating provider:", D), C(`Configuration error: ${D.message}`);
|
|
4081
4081
|
}
|
|
4082
4082
|
return;
|
|
4083
4083
|
}
|
|
4084
4084
|
try {
|
|
4085
|
-
|
|
4085
|
+
C(null);
|
|
4086
4086
|
const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
|
|
4087
|
-
|
|
4087
|
+
L === oe.Sumsub ? (G.initialize("identity-container").catch((Y) => {
|
|
4088
4088
|
var ae;
|
|
4089
|
-
console.error("[Sumsub] Initialization error:",
|
|
4089
|
+
console.error("[Sumsub] Initialization error:", Y), C(`Failed to initialize: ${Y.message}`), (ae = Y.message) != null && ae.toLowerCase().includes("expired") && O(!0);
|
|
4090
4090
|
}), G.onComplete && G.onComplete(() => {
|
|
4091
4091
|
e == null || e();
|
|
4092
|
-
})) :
|
|
4093
|
-
console.error("[Onfido] Initialization error:",
|
|
4092
|
+
})) : L === oe.Onfido && G.initialize("identity-container").catch((Y) => {
|
|
4093
|
+
console.error("[Onfido] Initialization error:", Y), C(`Failed to initialize: ${Y.message}`);
|
|
4094
4094
|
}), m(G);
|
|
4095
4095
|
} catch (D) {
|
|
4096
|
-
console.error("[Identity] Provider setup error:", D),
|
|
4096
|
+
console.error("[Identity] Provider setup error:", D), C(`Setup error: ${D.message}`);
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
4099
|
return () => {
|
|
4100
4100
|
if (b && b.destroy)
|
|
4101
4101
|
try {
|
|
4102
4102
|
b.destroy();
|
|
4103
|
-
} catch (
|
|
4104
|
-
console.error("[Identity] Error destroying provider:",
|
|
4103
|
+
} catch (L) {
|
|
4104
|
+
console.error("[Identity] Error destroying provider:", L);
|
|
4105
4105
|
}
|
|
4106
4106
|
};
|
|
4107
|
-
}, [c, d, b,
|
|
4107
|
+
}, [c, d, b, E, e, F]);
|
|
4108
4108
|
const p = async () => {
|
|
4109
4109
|
try {
|
|
4110
|
-
|
|
4111
|
-
} catch (
|
|
4112
|
-
console.error("Error starting identity verification:",
|
|
4110
|
+
C(null), O(!1), await v(), P(!0);
|
|
4111
|
+
} catch (L) {
|
|
4112
|
+
console.error("Error starting identity verification:", L);
|
|
4113
4113
|
}
|
|
4114
|
-
},
|
|
4114
|
+
}, x = async () => {
|
|
4115
4115
|
try {
|
|
4116
|
-
|
|
4117
|
-
} catch (
|
|
4118
|
-
console.error("Error restarting identity verification:",
|
|
4116
|
+
C(null), O(!1), m(null), console.log("[Identity] Restarting verification..."), await g(), P(!0);
|
|
4117
|
+
} catch (L) {
|
|
4118
|
+
console.error("Error restarting identity verification:", L), C(L.message || "Failed to restart verification");
|
|
4119
4119
|
}
|
|
4120
4120
|
};
|
|
4121
|
-
if (
|
|
4122
|
-
return /* @__PURE__ */ n(
|
|
4121
|
+
if (S || u)
|
|
4122
|
+
return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
4123
4123
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4124
4124
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
|
|
4125
4125
|
] }) });
|
|
4126
4126
|
if (y)
|
|
4127
|
-
return /* @__PURE__ */ n(
|
|
4127
|
+
return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
4128
4128
|
"Error: ",
|
|
4129
4129
|
y.message
|
|
4130
4130
|
] }) }) });
|
|
4131
|
-
if (
|
|
4132
|
-
return /* @__PURE__ */ o(
|
|
4131
|
+
if (E && (I || F))
|
|
4132
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
4133
4133
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4134
|
-
/* @__PURE__ */ o(
|
|
4134
|
+
/* @__PURE__ */ o(M, { children: [
|
|
4135
4135
|
/* @__PURE__ */ n("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__ */ o("div", { className: "flex items-start", children: [
|
|
4136
4136
|
/* @__PURE__ */ n(
|
|
4137
4137
|
"svg",
|
|
@@ -4152,8 +4152,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4152
4152
|
}
|
|
4153
4153
|
),
|
|
4154
4154
|
/* @__PURE__ */ o("div", { children: [
|
|
4155
|
-
/* @__PURE__ */ n("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4156
|
-
/* @__PURE__ */ n("p", { className: "text-red-800 dark:text-red-200 text-sm", children:
|
|
4155
|
+
/* @__PURE__ */ n("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: F ? "Session Expired" : "Verification Error" }),
|
|
4156
|
+
/* @__PURE__ */ n("p", { className: "text-red-800 dark:text-red-200 text-sm", children: I || "Your verification session has expired and needs to be restarted." })
|
|
4157
4157
|
] })
|
|
4158
4158
|
] }) }),
|
|
4159
4159
|
/* @__PURE__ */ o("div", { className: "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4", children: [
|
|
@@ -4166,31 +4166,31 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4166
4166
|
] })
|
|
4167
4167
|
] }),
|
|
4168
4168
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4169
|
-
r && /* @__PURE__ */ n(
|
|
4170
|
-
/* @__PURE__ */ n(
|
|
4169
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
4170
|
+
/* @__PURE__ */ n(_, { type: "button", onClick: x, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
|
|
4171
4171
|
] })
|
|
4172
4172
|
] });
|
|
4173
|
-
if (
|
|
4174
|
-
const
|
|
4175
|
-
return d != null && d.url ? /* @__PURE__ */ o(
|
|
4173
|
+
if (E && l) {
|
|
4174
|
+
const L = c;
|
|
4175
|
+
return d != null && d.url ? /* @__PURE__ */ o(T, { children: [
|
|
4176
4176
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4177
4177
|
/* @__PURE__ */ o("div", { children: [
|
|
4178
4178
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
|
|
4179
4179
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
4180
4180
|
] }),
|
|
4181
4181
|
/* @__PURE__ */ n(
|
|
4182
|
-
|
|
4182
|
+
_,
|
|
4183
4183
|
{
|
|
4184
4184
|
type: "button",
|
|
4185
4185
|
variant: "outline",
|
|
4186
4186
|
size: "sm",
|
|
4187
|
-
onClick:
|
|
4187
|
+
onClick: x,
|
|
4188
4188
|
disabled: u,
|
|
4189
4189
|
children: "Restart"
|
|
4190
4190
|
}
|
|
4191
4191
|
)
|
|
4192
4192
|
] }) }),
|
|
4193
|
-
/* @__PURE__ */ o(
|
|
4193
|
+
/* @__PURE__ */ o(M, { children: [
|
|
4194
4194
|
/* @__PURE__ */ n("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__ */ o("p", { className: "text-yellow-800 dark:text-yellow-200 text-sm", children: [
|
|
4195
4195
|
/* @__PURE__ */ n("strong", { children: "Important:" }),
|
|
4196
4196
|
' If you see an "expired" or "invalid link" message below, click the "Restart" button above to generate a new verification session.'
|
|
@@ -4203,13 +4203,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4203
4203
|
allow: "camera; microphone; geolocation",
|
|
4204
4204
|
title: "Identity Verification",
|
|
4205
4205
|
onLoad: (D) => {
|
|
4206
|
-
var G,
|
|
4206
|
+
var G, Y, ae;
|
|
4207
4207
|
console.log("[Identity] Iframe loaded");
|
|
4208
4208
|
try {
|
|
4209
|
-
const
|
|
4209
|
+
const j = D.target, Ce = j.contentDocument || ((G = j.contentWindow) == null ? void 0 : G.document);
|
|
4210
4210
|
if (Ce) {
|
|
4211
|
-
const me = ((ae = (
|
|
4212
|
-
(me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"),
|
|
4211
|
+
const me = ((ae = (Y = Ce.body) == null ? void 0 : Y.textContent) == null ? void 0 : ae.toLowerCase()) || "";
|
|
4212
|
+
(me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), O(!0), C("Your verification link has expired."));
|
|
4213
4213
|
}
|
|
4214
4214
|
} catch {
|
|
4215
4215
|
console.log("[Identity] Cannot check iframe content (CORS)");
|
|
@@ -4218,39 +4218,39 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4218
4218
|
}
|
|
4219
4219
|
) })
|
|
4220
4220
|
] }),
|
|
4221
|
-
r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
|
|
4222
|
-
] }) :
|
|
4221
|
+
r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4222
|
+
] }) : L === oe.SardinAI ? /* @__PURE__ */ o(T, { children: [
|
|
4223
4223
|
/* @__PURE__ */ o(ee, { children: [
|
|
4224
4224
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
|
|
4225
4225
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
|
|
4226
4226
|
] }),
|
|
4227
|
-
/* @__PURE__ */ n(
|
|
4227
|
+
/* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("div", { className: "text-center py-12", children: [
|
|
4228
4228
|
/* @__PURE__ */ n(ce, { className: "mb-4" }),
|
|
4229
4229
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
|
|
4230
4230
|
/* @__PURE__ */ n("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" })
|
|
4231
4231
|
] }) })
|
|
4232
|
-
] }) : /* @__PURE__ */ o(
|
|
4232
|
+
] }) : /* @__PURE__ */ o(T, { children: [
|
|
4233
4233
|
/* @__PURE__ */ o(ee, { children: [
|
|
4234
4234
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
|
|
4235
4235
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
|
|
4236
4236
|
] }),
|
|
4237
|
-
/* @__PURE__ */ n(
|
|
4238
|
-
r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
|
|
4237
|
+
/* @__PURE__ */ n(M, { children: /* @__PURE__ */ n("div", { id: "identity-container", className: "min-h-[400px]" }) }),
|
|
4238
|
+
r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4239
4239
|
] });
|
|
4240
4240
|
}
|
|
4241
|
-
return /* @__PURE__ */ n("form", { onSubmit:
|
|
4241
|
+
return /* @__PURE__ */ n("form", { onSubmit: U.handleSubmit(p), children: /* @__PURE__ */ o(T, { children: [
|
|
4242
4242
|
/* @__PURE__ */ o(ee, { children: [
|
|
4243
4243
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Review Your Information" }),
|
|
4244
4244
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
|
|
4245
4245
|
] }),
|
|
4246
|
-
/* @__PURE__ */ o(
|
|
4246
|
+
/* @__PURE__ */ o(M, { className: "space-y-6", children: [
|
|
4247
4247
|
/* @__PURE__ */ o("div", { className: "space-y-4 pb-4 border-b border-gray-200 dark:border-gray-700", children: [
|
|
4248
4248
|
/* @__PURE__ */ o("div", { children: [
|
|
4249
4249
|
/* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
|
|
4250
4250
|
/* @__PURE__ */ o("p", { className: "mt-1 text-base", children: [
|
|
4251
|
-
(
|
|
4251
|
+
(z = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : z.firstName,
|
|
4252
4252
|
" ",
|
|
4253
|
-
(
|
|
4253
|
+
($ = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : $.lastName
|
|
4254
4254
|
] })
|
|
4255
4255
|
] }),
|
|
4256
4256
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -4268,12 +4268,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4268
4268
|
/* @__PURE__ */ n(
|
|
4269
4269
|
J,
|
|
4270
4270
|
{
|
|
4271
|
-
control:
|
|
4271
|
+
control: U.control,
|
|
4272
4272
|
name: "country",
|
|
4273
|
-
render: ({ field:
|
|
4273
|
+
render: ({ field: L }) => /* @__PURE__ */ n(
|
|
4274
4274
|
ye,
|
|
4275
4275
|
{
|
|
4276
|
-
...
|
|
4276
|
+
...L,
|
|
4277
4277
|
label: "Country",
|
|
4278
4278
|
options: [
|
|
4279
4279
|
{ value: "", label: "Select country..." },
|
|
@@ -4289,12 +4289,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4289
4289
|
/* @__PURE__ */ n(
|
|
4290
4290
|
J,
|
|
4291
4291
|
{
|
|
4292
|
-
control:
|
|
4292
|
+
control: U.control,
|
|
4293
4293
|
name: "nationality",
|
|
4294
|
-
render: ({ field:
|
|
4294
|
+
render: ({ field: L }) => /* @__PURE__ */ n(
|
|
4295
4295
|
ye,
|
|
4296
4296
|
{
|
|
4297
|
-
...
|
|
4297
|
+
...L,
|
|
4298
4298
|
label: "Nationality",
|
|
4299
4299
|
options: [
|
|
4300
4300
|
{ value: "", label: "Select nationality..." },
|
|
@@ -4312,17 +4312,17 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4312
4312
|
/* @__PURE__ */ n(
|
|
4313
4313
|
J,
|
|
4314
4314
|
{
|
|
4315
|
-
control:
|
|
4315
|
+
control: U.control,
|
|
4316
4316
|
name: "street",
|
|
4317
|
-
render: ({ field:
|
|
4317
|
+
render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Street" })
|
|
4318
4318
|
}
|
|
4319
4319
|
),
|
|
4320
4320
|
/* @__PURE__ */ n(
|
|
4321
4321
|
J,
|
|
4322
4322
|
{
|
|
4323
|
-
control:
|
|
4323
|
+
control: U.control,
|
|
4324
4324
|
name: "streetNumber",
|
|
4325
|
-
render: ({ field:
|
|
4325
|
+
render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Street Number" })
|
|
4326
4326
|
}
|
|
4327
4327
|
)
|
|
4328
4328
|
] }),
|
|
@@ -4330,33 +4330,33 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4330
4330
|
/* @__PURE__ */ n(
|
|
4331
4331
|
J,
|
|
4332
4332
|
{
|
|
4333
|
-
control:
|
|
4333
|
+
control: U.control,
|
|
4334
4334
|
name: "city",
|
|
4335
|
-
render: ({ field:
|
|
4335
|
+
render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "City" })
|
|
4336
4336
|
}
|
|
4337
4337
|
),
|
|
4338
4338
|
/* @__PURE__ */ n(
|
|
4339
4339
|
J,
|
|
4340
4340
|
{
|
|
4341
|
-
control:
|
|
4341
|
+
control: U.control,
|
|
4342
4342
|
name: "zip",
|
|
4343
|
-
render: ({ field:
|
|
4343
|
+
render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "ZIP/Postal Code" })
|
|
4344
4344
|
}
|
|
4345
4345
|
)
|
|
4346
4346
|
] }),
|
|
4347
4347
|
/* @__PURE__ */ n(
|
|
4348
4348
|
J,
|
|
4349
4349
|
{
|
|
4350
|
-
control:
|
|
4350
|
+
control: U.control,
|
|
4351
4351
|
name: "phonenumber",
|
|
4352
|
-
render: ({ field:
|
|
4352
|
+
render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Phone Number", type: "tel" })
|
|
4353
4353
|
}
|
|
4354
4354
|
)
|
|
4355
4355
|
] })
|
|
4356
4356
|
] }),
|
|
4357
4357
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4358
|
-
r && /* @__PURE__ */ n(
|
|
4359
|
-
/* @__PURE__ */ n(
|
|
4358
|
+
r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
|
|
4359
|
+
/* @__PURE__ */ n(_, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
|
|
4360
4360
|
] })
|
|
4361
4361
|
] }) });
|
|
4362
4362
|
}, je = ({
|
|
@@ -4438,8 +4438,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4438
4438
|
iconColor: "text-blue-600 dark:text-blue-400",
|
|
4439
4439
|
message: "Your application is being reviewed."
|
|
4440
4440
|
};
|
|
4441
|
-
return /* @__PURE__ */ o(
|
|
4442
|
-
/* @__PURE__ */ o(
|
|
4441
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
4442
|
+
/* @__PURE__ */ o(M, { className: "py-12", children: [
|
|
4443
4443
|
/* @__PURE__ */ n("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ n(
|
|
4444
4444
|
"div",
|
|
4445
4445
|
{
|
|
@@ -4493,10 +4493,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4493
4493
|
] }) })
|
|
4494
4494
|
] }),
|
|
4495
4495
|
/* @__PURE__ */ o(ne, { className: "flex justify-center gap-4", children: [
|
|
4496
|
-
c.type === "success" && a && /* @__PURE__ */ n(
|
|
4496
|
+
c.type === "success" && a && /* @__PURE__ */ n(_, { onClick: a, size: "lg", children: "Continue" }),
|
|
4497
4497
|
c.type === "error" && /* @__PURE__ */ o(nt, { children: [
|
|
4498
|
-
i && /* @__PURE__ */ n(
|
|
4499
|
-
a && /* @__PURE__ */ n(
|
|
4498
|
+
i && /* @__PURE__ */ n(_, { variant: "outline", onClick: i, children: "Contact Support" }),
|
|
4499
|
+
a && /* @__PURE__ */ n(_, { onClick: a, children: "Try Again" })
|
|
4500
4500
|
] }),
|
|
4501
4501
|
c.type === "pending" && /* @__PURE__ */ n("div", { className: "text-center", children: /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
4502
4502
|
] })
|
|
@@ -4535,21 +4535,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4535
4535
|
onSuccess: r,
|
|
4536
4536
|
onCancel: s
|
|
4537
4537
|
}) => {
|
|
4538
|
-
var
|
|
4539
|
-
const { config: a, baseInformationService: i } = se(), { createApplicant: l, isLoading: c } = rr(), [d, u] = N([]), [y,
|
|
4540
|
-
if (!
|
|
4538
|
+
var O, V, U;
|
|
4539
|
+
const { config: a, baseInformationService: i } = se(), { createApplicant: l, isLoading: c } = rr(), [d, u] = N([]), [y, v] = N(!0), [g, b] = N(!1), [m, f] = N(null), k = H(!1), h = H(!1), A = t || ((O = a.applicantForm) == null ? void 0 : O.workflowKey);
|
|
4540
|
+
if (!A)
|
|
4541
4541
|
throw new Error(
|
|
4542
4542
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
4543
4543
|
);
|
|
4544
|
-
const
|
|
4545
|
-
workflowKey:
|
|
4544
|
+
const S = e || ((V = a.applicantForm) == null ? void 0 : V.externalRefId) || "", w = ((U = a.applicantForm) == null ? void 0 : U.visibleFields) || gt, [E, P] = N({
|
|
4545
|
+
workflowKey: A,
|
|
4546
4546
|
firstName: "",
|
|
4547
4547
|
lastName: "",
|
|
4548
4548
|
title: "",
|
|
4549
4549
|
email: "",
|
|
4550
4550
|
dateOfBirth: "",
|
|
4551
4551
|
phonenumber: "",
|
|
4552
|
-
externalRefId:
|
|
4552
|
+
externalRefId: S,
|
|
4553
4553
|
// Set from config or prop
|
|
4554
4554
|
mobileCountryCode: "",
|
|
4555
4555
|
street: "",
|
|
@@ -4568,67 +4568,67 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4568
4568
|
occupation: "",
|
|
4569
4569
|
taxNumber: ""
|
|
4570
4570
|
});
|
|
4571
|
-
|
|
4571
|
+
W(() => {
|
|
4572
4572
|
(async () => {
|
|
4573
4573
|
if (k.current || h.current) {
|
|
4574
4574
|
console.log("[CreateApplicant] Countries already loading or loaded, skipping...");
|
|
4575
4575
|
return;
|
|
4576
4576
|
}
|
|
4577
|
-
k.current = !0,
|
|
4577
|
+
k.current = !0, v(!0);
|
|
4578
4578
|
try {
|
|
4579
|
-
const
|
|
4579
|
+
const x = await i.getCountries("", a.locale || "en"), z = /* @__PURE__ */ new Set(), $ = x.map((R) => ({
|
|
4580
4580
|
value: R.abbreviation3 || R.abbreviation,
|
|
4581
4581
|
label: R.name
|
|
4582
|
-
})).filter((R) => !R.value ||
|
|
4583
|
-
u(
|
|
4584
|
-
} catch (
|
|
4585
|
-
console.error("Failed to load countries:",
|
|
4582
|
+
})).filter((R) => !R.value || z.has(R.value) ? !1 : (z.add(R.value), !0));
|
|
4583
|
+
u($), h.current = !0;
|
|
4584
|
+
} catch (x) {
|
|
4585
|
+
console.error("Failed to load countries:", x);
|
|
4586
4586
|
} finally {
|
|
4587
|
-
|
|
4587
|
+
v(!1), k.current = !1;
|
|
4588
4588
|
}
|
|
4589
4589
|
})();
|
|
4590
4590
|
}, []);
|
|
4591
|
-
const
|
|
4592
|
-
P((
|
|
4593
|
-
},
|
|
4591
|
+
const I = (p, x) => {
|
|
4592
|
+
P((z) => ({ ...z, [p]: x }));
|
|
4593
|
+
}, C = async (p) => {
|
|
4594
4594
|
p.preventDefault(), b(!0), f(null);
|
|
4595
4595
|
try {
|
|
4596
|
-
if (!
|
|
4596
|
+
if (!E.externalRefId || E.externalRefId.trim() === "") {
|
|
4597
4597
|
f("External Reference ID is required and cannot be empty"), b(!1);
|
|
4598
4598
|
return;
|
|
4599
4599
|
}
|
|
4600
|
-
const
|
|
4601
|
-
workflowKey:
|
|
4602
|
-
externalRefId:
|
|
4600
|
+
const x = {
|
|
4601
|
+
workflowKey: E.workflowKey,
|
|
4602
|
+
externalRefId: E.externalRefId.trim()
|
|
4603
4603
|
// Always include, never empty
|
|
4604
4604
|
};
|
|
4605
|
-
|
|
4606
|
-
if (
|
|
4607
|
-
const R =
|
|
4608
|
-
R != null && R !== "" && !(Array.isArray(R) && R.length === 0) && (
|
|
4609
|
-
}), console.log("Creating applicant with data:",
|
|
4610
|
-
const
|
|
4611
|
-
|
|
4605
|
+
w.forEach(($) => {
|
|
4606
|
+
if ($ === "externalRefId") return;
|
|
4607
|
+
const R = E[$];
|
|
4608
|
+
R != null && R !== "" && !(Array.isArray(R) && R.length === 0) && (x[$] = R);
|
|
4609
|
+
}), console.log("Creating applicant with data:", x);
|
|
4610
|
+
const z = await l(
|
|
4611
|
+
x
|
|
4612
4612
|
);
|
|
4613
|
-
console.log("Applicant created:",
|
|
4614
|
-
} catch (
|
|
4615
|
-
console.error("Error creating applicant:",
|
|
4613
|
+
console.log("Applicant created:", z), r(z.applicantId);
|
|
4614
|
+
} catch (x) {
|
|
4615
|
+
console.error("Error creating applicant:", x), f(x.message || "Failed to create applicant");
|
|
4616
4616
|
} finally {
|
|
4617
4617
|
b(!1);
|
|
4618
4618
|
}
|
|
4619
|
-
},
|
|
4620
|
-
var
|
|
4621
|
-
const
|
|
4622
|
-
switch (
|
|
4619
|
+
}, F = (p) => {
|
|
4620
|
+
var z, $;
|
|
4621
|
+
const x = yt[p];
|
|
4622
|
+
switch (x.type) {
|
|
4623
4623
|
case "select":
|
|
4624
4624
|
return p === "country" || p === "nationality" || p === "taxCountry" || p === "countryOfBirth" ? /* @__PURE__ */ n(
|
|
4625
4625
|
ye,
|
|
4626
4626
|
{
|
|
4627
|
-
label:
|
|
4628
|
-
value:
|
|
4629
|
-
onChange: (R) =>
|
|
4627
|
+
label: x.label,
|
|
4628
|
+
value: E[p] || "",
|
|
4629
|
+
onChange: (R) => I(p, R.target.value),
|
|
4630
4630
|
options: [
|
|
4631
|
-
{ value: "", label: `Select ${
|
|
4631
|
+
{ value: "", label: `Select ${x.label.toLowerCase()}...` },
|
|
4632
4632
|
...d
|
|
4633
4633
|
],
|
|
4634
4634
|
disabled: y
|
|
@@ -4637,9 +4637,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4637
4637
|
) : p === "salutation" ? /* @__PURE__ */ n(
|
|
4638
4638
|
ye,
|
|
4639
4639
|
{
|
|
4640
|
-
label:
|
|
4641
|
-
value: ((
|
|
4642
|
-
onChange: (R) =>
|
|
4640
|
+
label: x.label,
|
|
4641
|
+
value: ((z = E[p]) == null ? void 0 : z.toString()) || "",
|
|
4642
|
+
onChange: (R) => I(p, R.target.value ? Number(R.target.value) : null),
|
|
4643
4643
|
options: [
|
|
4644
4644
|
{ value: "", label: "Select salutation..." },
|
|
4645
4645
|
{ value: Se.Male.toString(), label: "Male" },
|
|
@@ -4654,11 +4654,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4654
4654
|
X,
|
|
4655
4655
|
{
|
|
4656
4656
|
type: "text",
|
|
4657
|
-
label:
|
|
4658
|
-
value: ((
|
|
4657
|
+
label: x.label,
|
|
4658
|
+
value: (($ = E[p]) == null ? void 0 : $.join(", ")) || "",
|
|
4659
4659
|
onChange: (R) => {
|
|
4660
|
-
const we = R.target.value.split(",").map((
|
|
4661
|
-
|
|
4660
|
+
const we = R.target.value.split(",").map((L) => L.trim()).filter(Boolean);
|
|
4661
|
+
I(p, we);
|
|
4662
4662
|
},
|
|
4663
4663
|
placeholder: "Enter countries separated by commas"
|
|
4664
4664
|
},
|
|
@@ -4669,9 +4669,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4669
4669
|
X,
|
|
4670
4670
|
{
|
|
4671
4671
|
type: "date",
|
|
4672
|
-
label:
|
|
4673
|
-
value:
|
|
4674
|
-
onChange: (R) =>
|
|
4672
|
+
label: x.label,
|
|
4673
|
+
value: E[p] || "",
|
|
4674
|
+
onChange: (R) => I(p, R.target.value)
|
|
4675
4675
|
},
|
|
4676
4676
|
p
|
|
4677
4677
|
);
|
|
@@ -4680,9 +4680,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4680
4680
|
X,
|
|
4681
4681
|
{
|
|
4682
4682
|
type: "email",
|
|
4683
|
-
label:
|
|
4684
|
-
value:
|
|
4685
|
-
onChange: (R) =>
|
|
4683
|
+
label: x.label,
|
|
4684
|
+
value: E[p] || "",
|
|
4685
|
+
onChange: (R) => I(p, R.target.value),
|
|
4686
4686
|
required: p === "email"
|
|
4687
4687
|
},
|
|
4688
4688
|
p
|
|
@@ -4692,9 +4692,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4692
4692
|
X,
|
|
4693
4693
|
{
|
|
4694
4694
|
type: "tel",
|
|
4695
|
-
label:
|
|
4696
|
-
value:
|
|
4697
|
-
onChange: (R) =>
|
|
4695
|
+
label: x.label,
|
|
4696
|
+
value: E[p] || "",
|
|
4697
|
+
onChange: (R) => I(p, R.target.value),
|
|
4698
4698
|
required: p === "phonenumber"
|
|
4699
4699
|
},
|
|
4700
4700
|
p
|
|
@@ -4705,19 +4705,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4705
4705
|
X,
|
|
4706
4706
|
{
|
|
4707
4707
|
type: "text",
|
|
4708
|
-
label:
|
|
4709
|
-
value:
|
|
4710
|
-
onChange: (R) =>
|
|
4708
|
+
label: x.label,
|
|
4709
|
+
value: E[p] || "",
|
|
4710
|
+
onChange: (R) => I(p, R.target.value),
|
|
4711
4711
|
required: p === "firstName" || p === "lastName" || p === "externalRefId"
|
|
4712
4712
|
},
|
|
4713
4713
|
p
|
|
4714
4714
|
);
|
|
4715
4715
|
}
|
|
4716
4716
|
};
|
|
4717
|
-
return y ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(
|
|
4717
|
+
return y ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
4718
4718
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4719
4719
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
|
|
4720
|
-
] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit:
|
|
4720
|
+
] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: C, children: /* @__PURE__ */ o(T, { children: [
|
|
4721
4721
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
|
|
4722
4722
|
Ze,
|
|
4723
4723
|
{
|
|
@@ -4725,17 +4725,17 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4725
4725
|
subtitle: "Please fill in the required information to begin the KYC verification process."
|
|
4726
4726
|
}
|
|
4727
4727
|
) }),
|
|
4728
|
-
/* @__PURE__ */ o(
|
|
4728
|
+
/* @__PURE__ */ o(M, { children: [
|
|
4729
4729
|
m && /* @__PURE__ */ n("div", { className: "mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
4730
4730
|
/* @__PURE__ */ n("strong", { children: "Error:" }),
|
|
4731
4731
|
" ",
|
|
4732
4732
|
m
|
|
4733
4733
|
] }) }),
|
|
4734
|
-
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children:
|
|
4734
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: w.map((p) => F(p)) })
|
|
4735
4735
|
] }),
|
|
4736
4736
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4737
|
-
s && /* @__PURE__ */ n(
|
|
4738
|
-
/* @__PURE__ */ n(
|
|
4737
|
+
s && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: s, disabled: g || c, children: "Cancel" }),
|
|
4738
|
+
/* @__PURE__ */ n(_, { type: "submit", isLoading: g || c, children: "Create Applicant" })
|
|
4739
4739
|
] })
|
|
4740
4740
|
] }) }) });
|
|
4741
4741
|
}, Wr = ({
|
|
@@ -4752,7 +4752,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4752
4752
|
workflowKey: d,
|
|
4753
4753
|
nextWorkflowKey: u,
|
|
4754
4754
|
hasWorkflowChanged: y,
|
|
4755
|
-
isLoading:
|
|
4755
|
+
isLoading: v,
|
|
4756
4756
|
error: g,
|
|
4757
4757
|
moveBack: b,
|
|
4758
4758
|
refreshProgress: m
|
|
@@ -4765,18 +4765,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4765
4765
|
s === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
4766
4766
|
}, [s]), ie.useEffect(() => {
|
|
4767
4767
|
y && k(!1);
|
|
4768
|
-
}, [y]),
|
|
4769
|
-
return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
|
|
4768
|
+
}, [y]), v || !i)
|
|
4769
|
+
return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
4770
4770
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4771
4771
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
|
|
4772
4772
|
] }) }) });
|
|
4773
4773
|
if (g)
|
|
4774
|
-
return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
|
|
4774
|
+
return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("div", { className: "text-center py-8", children: [
|
|
4775
4775
|
/* @__PURE__ */ n("p", { className: "text-danger-500 text-lg mb-4", children: "An error occurred" }),
|
|
4776
4776
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: g.message })
|
|
4777
4777
|
] }) }) }) });
|
|
4778
4778
|
if (y && !f)
|
|
4779
|
-
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(
|
|
4779
|
+
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("div", { className: "text-center py-8", children: [
|
|
4780
4780
|
/* @__PURE__ */ n("div", { className: "mb-6", children: /* @__PURE__ */ n("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__ */ n("svg", { className: "w-8 h-8 text-blue-600 dark:text-blue-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("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" }) }) }) }),
|
|
4781
4781
|
/* @__PURE__ */ n("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white mb-2", children: "Workflow Transition" }),
|
|
4782
4782
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mb-6", children: "Your application workflow has been updated based on your progress." }),
|
|
@@ -4818,24 +4818,47 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4818
4818
|
}
|
|
4819
4819
|
) });
|
|
4820
4820
|
if (!l)
|
|
4821
|
-
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(
|
|
4821
|
+
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
|
|
4822
4822
|
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4823
4823
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === le.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
4824
4824
|
] }) }) });
|
|
4825
|
-
const h = () => {
|
|
4826
|
-
|
|
4825
|
+
const h = (w) => {
|
|
4826
|
+
switch (w) {
|
|
4827
|
+
case B.Overview:
|
|
4828
|
+
return "Overview";
|
|
4829
|
+
case B.Questionaries:
|
|
4830
|
+
return "Questionnaire";
|
|
4831
|
+
case B.UploadDocument:
|
|
4832
|
+
return "Documents";
|
|
4833
|
+
case B.IdentitySdk:
|
|
4834
|
+
return "Identity";
|
|
4835
|
+
case B.RiskScoring:
|
|
4836
|
+
return "Risk Assessment";
|
|
4837
|
+
case B.InvestorCategorization:
|
|
4838
|
+
return "Investor Categorization";
|
|
4839
|
+
case B.AppropriatenessTest:
|
|
4840
|
+
return "Appropriateness Test";
|
|
4841
|
+
case B.AdditionalData:
|
|
4842
|
+
return "Additional Data";
|
|
4843
|
+
case B.ManualReview:
|
|
4844
|
+
return "Review";
|
|
4845
|
+
default:
|
|
4846
|
+
return "";
|
|
4847
|
+
}
|
|
4848
|
+
}, A = () => {
|
|
4849
|
+
const w = c.filter((C) => C.visibility !== !1), E = w.findIndex((C) => C.order === l.order), P = E >= 0 ? E + 1 : 1, I = w.length;
|
|
4827
4850
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4828
4851
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
4829
4852
|
/* @__PURE__ */ n(Ze, {}),
|
|
4830
4853
|
/* @__PURE__ */ o(he, { variant: i.status === 1 ? "info" : "success", children: [
|
|
4831
4854
|
"Step ",
|
|
4832
|
-
|
|
4855
|
+
P,
|
|
4833
4856
|
" of ",
|
|
4834
|
-
|
|
4857
|
+
I
|
|
4835
4858
|
] })
|
|
4836
4859
|
] }),
|
|
4837
|
-
/* @__PURE__ */ n("div", { className: "flex items-center", children:
|
|
4838
|
-
const
|
|
4860
|
+
/* @__PURE__ */ n("div", { className: "flex items-center", children: w.map((C, F) => {
|
|
4861
|
+
const O = F < E, V = C.order === l.order;
|
|
4839
4862
|
return /* @__PURE__ */ o(ie.Fragment, { children: [
|
|
4840
4863
|
/* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
4841
4864
|
/* @__PURE__ */ n(
|
|
@@ -4843,30 +4866,30 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4843
4866
|
{
|
|
4844
4867
|
className: `
|
|
4845
4868
|
w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
|
|
4846
|
-
${
|
|
4869
|
+
${O || V ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
|
|
4847
4870
|
`,
|
|
4848
|
-
children:
|
|
4871
|
+
children: F + 1
|
|
4849
4872
|
}
|
|
4850
4873
|
),
|
|
4851
4874
|
/* @__PURE__ */ n(
|
|
4852
4875
|
"span",
|
|
4853
4876
|
{
|
|
4854
|
-
className: `ml-2 text-sm ${
|
|
4855
|
-
children: C.displayName || C.name || `Step ${
|
|
4877
|
+
className: `ml-2 text-sm ${V ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
|
|
4878
|
+
children: C.displayName || C.name || h(C.action) || `Step ${F + 1}`
|
|
4856
4879
|
}
|
|
4857
4880
|
)
|
|
4858
4881
|
] }),
|
|
4859
|
-
|
|
4882
|
+
F < w.length - 1 && /* @__PURE__ */ n(
|
|
4860
4883
|
"div",
|
|
4861
4884
|
{
|
|
4862
|
-
className: `flex-1 h-0.5 mx-4 ${
|
|
4885
|
+
className: `flex-1 h-0.5 mx-4 ${O ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
|
|
4863
4886
|
}
|
|
4864
4887
|
)
|
|
4865
4888
|
] }, C.order);
|
|
4866
4889
|
}) })
|
|
4867
4890
|
] });
|
|
4868
|
-
},
|
|
4869
|
-
const
|
|
4891
|
+
}, S = () => {
|
|
4892
|
+
const w = {
|
|
4870
4893
|
applicantId: t,
|
|
4871
4894
|
onComplete: async () => {
|
|
4872
4895
|
await m();
|
|
@@ -4874,22 +4897,22 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4874
4897
|
onBack: l.order > 0 ? b : void 0
|
|
4875
4898
|
};
|
|
4876
4899
|
switch (l.action) {
|
|
4877
|
-
case
|
|
4878
|
-
return /* @__PURE__ */ n(xr, { ...
|
|
4879
|
-
case
|
|
4880
|
-
return /* @__PURE__ */ n(wr, { ...
|
|
4881
|
-
case
|
|
4882
|
-
return /* @__PURE__ */ n(kr, { ...
|
|
4883
|
-
case
|
|
4884
|
-
return /* @__PURE__ */ n(Ar, { ...
|
|
4885
|
-
case
|
|
4886
|
-
return /* @__PURE__ */ n(Nr, { ...
|
|
4887
|
-
case
|
|
4888
|
-
case
|
|
4889
|
-
return /* @__PURE__ */ n(Sr, { ...
|
|
4890
|
-
case
|
|
4891
|
-
return /* @__PURE__ */ n(Cr, { ...
|
|
4892
|
-
case
|
|
4900
|
+
case B.Questionaries:
|
|
4901
|
+
return /* @__PURE__ */ n(xr, { ...w });
|
|
4902
|
+
case B.UploadDocument:
|
|
4903
|
+
return /* @__PURE__ */ n(wr, { ...w });
|
|
4904
|
+
case B.Overview:
|
|
4905
|
+
return /* @__PURE__ */ n(kr, { ...w });
|
|
4906
|
+
case B.IdentitySdk:
|
|
4907
|
+
return /* @__PURE__ */ n(Ar, { ...w });
|
|
4908
|
+
case B.RiskScoring:
|
|
4909
|
+
return /* @__PURE__ */ n(Nr, { ...w });
|
|
4910
|
+
case B.AdditionalData:
|
|
4911
|
+
case B.InvestorCategorization:
|
|
4912
|
+
return /* @__PURE__ */ n(Sr, { ...w });
|
|
4913
|
+
case B.AppropriatenessTest:
|
|
4914
|
+
return /* @__PURE__ */ n(Cr, { ...w });
|
|
4915
|
+
case B.ManualReview:
|
|
4893
4916
|
return /* @__PURE__ */ n(
|
|
4894
4917
|
je,
|
|
4895
4918
|
{
|
|
@@ -4900,7 +4923,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4900
4923
|
}
|
|
4901
4924
|
);
|
|
4902
4925
|
default:
|
|
4903
|
-
return /* @__PURE__ */ n(
|
|
4926
|
+
return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
|
|
4904
4927
|
/* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(ce, {}) }),
|
|
4905
4928
|
/* @__PURE__ */ o("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
|
|
4906
4929
|
"Processing step: ",
|
|
@@ -4908,14 +4931,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4908
4931
|
] }),
|
|
4909
4932
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
4910
4933
|
"Action type: ",
|
|
4911
|
-
|
|
4934
|
+
B[l.action]
|
|
4912
4935
|
] })
|
|
4913
4936
|
] }) });
|
|
4914
4937
|
}
|
|
4915
4938
|
};
|
|
4916
4939
|
return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${a || ""}`, children: [
|
|
4917
|
-
|
|
4918
|
-
|
|
4940
|
+
A(),
|
|
4941
|
+
S()
|
|
4919
4942
|
] });
|
|
4920
4943
|
};
|
|
4921
4944
|
export {
|
|
@@ -4929,9 +4952,9 @@ export {
|
|
|
4929
4952
|
Cr as AppropriatenessTestStep,
|
|
4930
4953
|
he as Badge,
|
|
4931
4954
|
Et as BaseInformationService,
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4955
|
+
_ as Button,
|
|
4956
|
+
T as Card,
|
|
4957
|
+
M as CardContent,
|
|
4935
4958
|
ne as CardFooter,
|
|
4936
4959
|
ee as CardHeader,
|
|
4937
4960
|
Yr as CreateApplicantForm,
|
|
@@ -4961,7 +4984,7 @@ export {
|
|
|
4961
4984
|
je as KycStatusDisplay,
|
|
4962
4985
|
Wr as KycWorkflow,
|
|
4963
4986
|
Er as Logo,
|
|
4964
|
-
|
|
4987
|
+
Ke as MetaKYCContext,
|
|
4965
4988
|
de as MetaKYCError,
|
|
4966
4989
|
Or as MetaKYCProvider,
|
|
4967
4990
|
_t as OnfidoProvider,
|
|
@@ -4975,13 +4998,13 @@ export {
|
|
|
4975
4998
|
at as RiskLevel,
|
|
4976
4999
|
Ct as RiskScoringService,
|
|
4977
5000
|
Nr as RiskScoringStep,
|
|
4978
|
-
|
|
5001
|
+
Ut as SardinAIProvider,
|
|
4979
5002
|
ye as Select,
|
|
4980
5003
|
ce as Spinner,
|
|
4981
5004
|
zt as StepRouter,
|
|
4982
5005
|
jt as SumsubProvider,
|
|
4983
|
-
|
|
4984
|
-
|
|
5006
|
+
Kt as ThemeManager,
|
|
5007
|
+
Q as ThemePreset,
|
|
4985
5008
|
Mt as ThemeService,
|
|
4986
5009
|
kt as UploadDocumentService,
|
|
4987
5010
|
wr as UploadDocumentStep,
|
|
@@ -4990,9 +5013,9 @@ export {
|
|
|
4990
5013
|
$t as WorkflowOrchestrator,
|
|
4991
5014
|
Ne as WorkflowResultType,
|
|
4992
5015
|
Ot as WorkflowState,
|
|
4993
|
-
|
|
5016
|
+
B as WorkflowStepAction,
|
|
4994
5017
|
Vr as appropriatenessTestSchema,
|
|
4995
|
-
|
|
5018
|
+
Ur as clearAllStorage,
|
|
4996
5019
|
Yt as clearApplicantId,
|
|
4997
5020
|
Qt as clearWorkflowState,
|
|
4998
5021
|
te as cn,
|
|
@@ -5012,7 +5035,7 @@ export {
|
|
|
5012
5035
|
_r as getWorkflowState,
|
|
5013
5036
|
Pt as healthcareTheme,
|
|
5014
5037
|
Mr as isScriptLoaded,
|
|
5015
|
-
|
|
5038
|
+
Ue as loadScript,
|
|
5016
5039
|
Lt as minimalTheme,
|
|
5017
5040
|
Ft as modernTheme,
|
|
5018
5041
|
Br as removeScript,
|
|
@@ -5020,7 +5043,7 @@ export {
|
|
|
5020
5043
|
Wt as saveWorkflowState,
|
|
5021
5044
|
Tt as themePresets,
|
|
5022
5045
|
rr as useApplicant,
|
|
5023
|
-
|
|
5046
|
+
Kr as useAppropriatenessTest,
|
|
5024
5047
|
er as useIdentityVerification,
|
|
5025
5048
|
Gt as useKycWorkflow,
|
|
5026
5049
|
se as useMetaKYC,
|