@vpdev2/metakyc-sdk 1.0.75 → 1.0.77
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/index.cjs +39 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +553 -515
- package/dist/index.js.map +1 -1
- package/dist/theme/theme-manager.d.ts +6 -0
- package/dist/theme/theme-manager.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var re = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import wt from "axios";
|
|
5
5
|
import * as ot from "react";
|
|
6
|
-
import be, { createContext as Nt, useState as k, useMemo as
|
|
6
|
+
import be, { createContext as Nt, useState as k, useMemo as Ie, useEffect as ne, useContext as St, useRef as ee, useCallback as V, forwardRef as Ge, createElement as nt } from "react";
|
|
7
7
|
import { jsx as r, jsxs as o, Fragment as Qe } from "react/jsx-runtime";
|
|
8
8
|
import Ct, { createPortal as it } from "react-dom";
|
|
9
|
-
import { useForm as
|
|
9
|
+
import { useForm as Et, Controller as Te } from "react-hook-form";
|
|
10
10
|
import { z as Ce } from "zod";
|
|
11
|
-
var J = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(J || {}), Je = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(Je || {}), ke = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ke || {}),
|
|
11
|
+
var J = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(J || {}), Je = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(Je || {}), ke = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ke || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(At || {}), It = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(It || {}), Le = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(Le || {}), De = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(De || {}), Rt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Rt || {}), Pt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Pt || {}), ve = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ve || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Ft || {}), Ze = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ze || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Tt || {}), Lt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Lt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Dt || {}), Se = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Se || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Mt || {}), Ot = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Ot || {}), fe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(fe || {}), $t = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))($t || {});
|
|
12
12
|
const $e = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -38,7 +38,7 @@ const $e = {
|
|
|
38
38
|
defaultLanguage: { label: "Default Language", type: "select" },
|
|
39
39
|
educationLevel: { label: "Education Level", type: "text" },
|
|
40
40
|
occupation: { label: "Occupation", type: "text" }
|
|
41
|
-
},
|
|
41
|
+
}, Bt = [
|
|
42
42
|
"firstName",
|
|
43
43
|
"lastName",
|
|
44
44
|
"email",
|
|
@@ -64,7 +64,7 @@ const $e = {
|
|
|
64
64
|
{ value: "NO", label: "Norwegian" }
|
|
65
65
|
];
|
|
66
66
|
var ce = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(ce || {});
|
|
67
|
-
const
|
|
67
|
+
const zt = {
|
|
68
68
|
timeout: 3e4,
|
|
69
69
|
retries: 3,
|
|
70
70
|
locale: "en",
|
|
@@ -174,7 +174,7 @@ class Ht {
|
|
|
174
174
|
re(this, "axiosInstance");
|
|
175
175
|
re(this, "endpointBuilder");
|
|
176
176
|
re(this, "config");
|
|
177
|
-
this.config = { ...
|
|
177
|
+
this.config = { ...zt, ...t }, this.endpointBuilder = new _t(this.config.endpoints), this.axiosInstance = wt.create({
|
|
178
178
|
baseURL: this.config.baseUrl,
|
|
179
179
|
timeout: this.config.timeout,
|
|
180
180
|
headers: {
|
|
@@ -1344,10 +1344,10 @@ function ht(e, t) {
|
|
|
1344
1344
|
s.src = e, t && (s.id = t), s.async = !0, s.onload = () => n(), s.onerror = () => a(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function dn(e) {
|
|
1348
1348
|
return !!document.getElementById(e);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function un(e) {
|
|
1351
1351
|
const t = document.getElementById(e);
|
|
1352
1352
|
t && t.remove();
|
|
1353
1353
|
}
|
|
@@ -1616,7 +1616,7 @@ class dr {
|
|
|
1616
1616
|
this.sardineContext && (this.sardineContext = null);
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
class
|
|
1619
|
+
class Be {
|
|
1620
1620
|
/**
|
|
1621
1621
|
* Create a provider instance
|
|
1622
1622
|
*/
|
|
@@ -1666,10 +1666,40 @@ class ze {
|
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
|
|
1669
|
+
function ur(e) {
|
|
1670
|
+
const t = e.inputBg || e.background, n = e.inputText || e.textPrimary, a = e.inputBorder || e.border, s = e.inputBorderFocus || e.primary, l = e.inputPlaceholder || e.textMuted;
|
|
1671
|
+
return `
|
|
1672
|
+
/* ── metakyc input overrides (generated by ThemeManager) ── */
|
|
1673
|
+
.metakyc-sdk input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
|
|
1674
|
+
.metakyc-sdk select,
|
|
1675
|
+
.metakyc-sdk textarea,
|
|
1676
|
+
.metakyc-sdk .metakyc-input,
|
|
1677
|
+
.metakyc-sdk .metakyc-searchable-select-trigger,
|
|
1678
|
+
.metakyc-sdk .metakyc-multiselect-trigger {
|
|
1679
|
+
background-color: ${t} !important;
|
|
1680
|
+
color: ${n} !important;
|
|
1681
|
+
border-color: ${a} !important;
|
|
1682
|
+
}
|
|
1683
|
+
.metakyc-sdk input::placeholder,
|
|
1684
|
+
.metakyc-sdk textarea::placeholder {
|
|
1685
|
+
color: ${l} !important;
|
|
1686
|
+
opacity: 1 !important;
|
|
1687
|
+
}
|
|
1688
|
+
.metakyc-sdk input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):focus,
|
|
1689
|
+
.metakyc-sdk select:focus,
|
|
1690
|
+
.metakyc-sdk textarea:focus,
|
|
1691
|
+
.metakyc-sdk .metakyc-searchable-select-trigger:focus {
|
|
1692
|
+
border-color: ${s} !important;
|
|
1693
|
+
outline-color: ${s} !important;
|
|
1694
|
+
box-shadow: 0 0 0 2px ${s}33 !important;
|
|
1695
|
+
}
|
|
1696
|
+
`;
|
|
1697
|
+
}
|
|
1698
|
+
class mr {
|
|
1670
1699
|
constructor(t) {
|
|
1671
1700
|
re(this, "currentTheme", he);
|
|
1672
1701
|
re(this, "customStyleElement", null);
|
|
1702
|
+
re(this, "inputStyleElement", null);
|
|
1673
1703
|
re(this, "container");
|
|
1674
1704
|
this.container = t || document.documentElement;
|
|
1675
1705
|
}
|
|
@@ -1701,16 +1731,17 @@ class ur {
|
|
|
1701
1731
|
"text-primary": t.textPrimary,
|
|
1702
1732
|
"text-secondary": t.textSecondary,
|
|
1703
1733
|
"text-muted": t.textMuted,
|
|
1704
|
-
// Input-specific — fall back to general colors when not explicitly set
|
|
1705
|
-
|
|
1706
|
-
"input-
|
|
1707
|
-
"input-
|
|
1708
|
-
"input-border
|
|
1709
|
-
"input-
|
|
1734
|
+
// Input-specific — fall back to general colors when not explicitly set.
|
|
1735
|
+
// Use || (not ??) so empty string '' also triggers the fallback.
|
|
1736
|
+
"input-bg": t.inputBg || t.background,
|
|
1737
|
+
"input-text": t.inputText || t.textPrimary,
|
|
1738
|
+
"input-border": t.inputBorder || t.border,
|
|
1739
|
+
"input-border-focus": t.inputBorderFocus || t.primary,
|
|
1740
|
+
"input-placeholder": t.inputPlaceholder || t.textMuted
|
|
1710
1741
|
};
|
|
1711
1742
|
Object.entries(n).forEach(([s, l]) => {
|
|
1712
|
-
this.container.style.setProperty(`--metakyc-${s}`, l);
|
|
1713
|
-
}), (a = this.currentTheme.darkMode) != null && a.colors && this.applyDarkModeColors(this.currentTheme.darkMode.colors);
|
|
1743
|
+
l && this.container.style.setProperty(`--metakyc-${s}`, l);
|
|
1744
|
+
}), this.injectInputColors(t), (a = this.currentTheme.darkMode) != null && a.colors && this.applyDarkModeColors(this.currentTheme.darkMode.colors);
|
|
1714
1745
|
}
|
|
1715
1746
|
/**
|
|
1716
1747
|
* Apply dark mode color overrides
|
|
@@ -1742,6 +1773,13 @@ class ur {
|
|
|
1742
1773
|
this.container.style.setProperty(s, a);
|
|
1743
1774
|
});
|
|
1744
1775
|
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Inject hard-coded CSS rules for inputs so the host/panel CSS cannot override them.
|
|
1778
|
+
* These rules are placed BEFORE any custom CSS so that custom CSS can still override them.
|
|
1779
|
+
*/
|
|
1780
|
+
injectInputColors(t) {
|
|
1781
|
+
this.inputStyleElement && this.inputStyleElement.remove(), this.inputStyleElement = document.createElement("style"), this.inputStyleElement.id = "metakyc-input-colors", this.inputStyleElement.textContent = ur(t), this.customStyleElement && this.customStyleElement.parentNode ? document.head.insertBefore(this.inputStyleElement, this.customStyleElement) : document.head.appendChild(this.inputStyleElement);
|
|
1782
|
+
}
|
|
1745
1783
|
/**
|
|
1746
1784
|
* Inject custom CSS into document
|
|
1747
1785
|
*/
|
|
@@ -1791,7 +1829,7 @@ class ur {
|
|
|
1791
1829
|
* Remove all custom styles
|
|
1792
1830
|
*/
|
|
1793
1831
|
cleanup() {
|
|
1794
|
-
this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1832
|
+
this.inputStyleElement && (this.inputStyleElement.remove(), this.inputStyleElement = null), this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1795
1833
|
}
|
|
1796
1834
|
/**
|
|
1797
1835
|
* Convert camelCase to kebab-case
|
|
@@ -1800,9 +1838,9 @@ class ur {
|
|
|
1800
1838
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1801
1839
|
}
|
|
1802
1840
|
}
|
|
1803
|
-
const
|
|
1804
|
-
const [n, a] = k(null), s = be.useRef(!1), l = be.useRef(!1), c =
|
|
1805
|
-
const h = new Ht(e), m = new Ut(h), v = new jt(h), C = new Kt(h), f = new Wt(h), S = new Yt(h), b = new qt(h), D = new Qt(h), F = new Gt(h), P = new Vt(h), $ = new nr(h), R = new
|
|
1841
|
+
const yt = Nt(null), mn = ({ config: e, children: t }) => {
|
|
1842
|
+
const [n, a] = k(null), s = be.useRef(!1), l = be.useRef(!1), c = Ie(() => {
|
|
1843
|
+
const h = new Ht(e), m = new Ut(h), v = new jt(h), C = new Kt(h), f = new Wt(h), S = new Yt(h), b = new qt(h), D = new Qt(h), F = new Gt(h), P = new Vt(h), $ = new nr(h), R = new mr();
|
|
1806
1844
|
return {
|
|
1807
1845
|
httpClient: h,
|
|
1808
1846
|
applicantService: m,
|
|
@@ -1817,7 +1855,7 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1817
1855
|
themeService: $,
|
|
1818
1856
|
themeManager: R
|
|
1819
1857
|
};
|
|
1820
|
-
}, [e]), u =
|
|
1858
|
+
}, [e]), u = Ie(() => ({
|
|
1821
1859
|
config: e,
|
|
1822
1860
|
...c,
|
|
1823
1861
|
currentTheme: n,
|
|
@@ -1853,15 +1891,15 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1853
1891
|
}
|
|
1854
1892
|
})(), () => {
|
|
1855
1893
|
c.themeManager.cleanup();
|
|
1856
|
-
}), []), /* @__PURE__ */ r(
|
|
1894
|
+
}), []), /* @__PURE__ */ r(yt.Provider, { value: u, children: t });
|
|
1857
1895
|
};
|
|
1858
|
-
function
|
|
1859
|
-
const e = St(
|
|
1896
|
+
function ye() {
|
|
1897
|
+
const e = St(yt);
|
|
1860
1898
|
if (!e)
|
|
1861
1899
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1862
1900
|
return e;
|
|
1863
1901
|
}
|
|
1864
|
-
async function
|
|
1902
|
+
async function pr(e) {
|
|
1865
1903
|
return new Promise((t, n) => {
|
|
1866
1904
|
const a = new FileReader();
|
|
1867
1905
|
a.readAsDataURL(e), a.onload = () => {
|
|
@@ -1870,10 +1908,10 @@ async function mr(e) {
|
|
|
1870
1908
|
}, a.onerror = (s) => n(s);
|
|
1871
1909
|
});
|
|
1872
1910
|
}
|
|
1873
|
-
function
|
|
1911
|
+
function pn(e, t) {
|
|
1874
1912
|
return e.size <= t;
|
|
1875
1913
|
}
|
|
1876
|
-
function
|
|
1914
|
+
function hn(e, t) {
|
|
1877
1915
|
return t.split(",").map((a) => a.trim()).some((a) => {
|
|
1878
1916
|
if (a.endsWith("/*")) {
|
|
1879
1917
|
const s = a.slice(0, -2);
|
|
@@ -1887,26 +1925,26 @@ function rt(e) {
|
|
|
1887
1925
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
|
1888
1926
|
return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
|
|
1889
1927
|
}
|
|
1890
|
-
function
|
|
1928
|
+
function yn(e) {
|
|
1891
1929
|
return e;
|
|
1892
1930
|
}
|
|
1893
1931
|
function oe(...e) {
|
|
1894
1932
|
return e.filter(Boolean).join(" ");
|
|
1895
1933
|
}
|
|
1896
|
-
const
|
|
1934
|
+
const ze = {
|
|
1897
1935
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
1898
1936
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
1899
1937
|
};
|
|
1900
|
-
function
|
|
1938
|
+
function hr(e) {
|
|
1901
1939
|
try {
|
|
1902
|
-
localStorage.setItem(
|
|
1940
|
+
localStorage.setItem(ze.APPLICANT_ID, e.toString());
|
|
1903
1941
|
} catch (t) {
|
|
1904
1942
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
1905
1943
|
}
|
|
1906
1944
|
}
|
|
1907
|
-
function
|
|
1945
|
+
function yr() {
|
|
1908
1946
|
try {
|
|
1909
|
-
const e = localStorage.getItem(
|
|
1947
|
+
const e = localStorage.getItem(ze.APPLICANT_ID);
|
|
1910
1948
|
return e ? parseInt(e, 10) : null;
|
|
1911
1949
|
} catch (e) {
|
|
1912
1950
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
@@ -1914,43 +1952,43 @@ function hr() {
|
|
|
1914
1952
|
}
|
|
1915
1953
|
function gr() {
|
|
1916
1954
|
try {
|
|
1917
|
-
localStorage.removeItem(
|
|
1955
|
+
localStorage.removeItem(ze.APPLICANT_ID);
|
|
1918
1956
|
} catch (e) {
|
|
1919
1957
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
1920
1958
|
}
|
|
1921
1959
|
}
|
|
1922
|
-
function
|
|
1960
|
+
function fr(e) {
|
|
1923
1961
|
try {
|
|
1924
|
-
localStorage.setItem(
|
|
1962
|
+
localStorage.setItem(ze.WORKFLOW_STATE, JSON.stringify(e));
|
|
1925
1963
|
} catch (t) {
|
|
1926
1964
|
console.warn("Failed to save workflow state to storage:", t);
|
|
1927
1965
|
}
|
|
1928
1966
|
}
|
|
1929
1967
|
function gn() {
|
|
1930
1968
|
try {
|
|
1931
|
-
const e = localStorage.getItem(
|
|
1969
|
+
const e = localStorage.getItem(ze.WORKFLOW_STATE);
|
|
1932
1970
|
return e ? JSON.parse(e) : null;
|
|
1933
1971
|
} catch (e) {
|
|
1934
1972
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
1935
1973
|
}
|
|
1936
1974
|
}
|
|
1937
|
-
function
|
|
1975
|
+
function br() {
|
|
1938
1976
|
try {
|
|
1939
|
-
localStorage.removeItem(
|
|
1977
|
+
localStorage.removeItem(ze.WORKFLOW_STATE);
|
|
1940
1978
|
} catch (e) {
|
|
1941
1979
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
1942
1980
|
}
|
|
1943
1981
|
}
|
|
1944
|
-
function
|
|
1945
|
-
gr(),
|
|
1982
|
+
function fn() {
|
|
1983
|
+
gr(), br();
|
|
1946
1984
|
}
|
|
1947
|
-
function
|
|
1948
|
-
const { createOrchestrator: t } =
|
|
1985
|
+
function xr(e) {
|
|
1986
|
+
const { createOrchestrator: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(null), h = ee(null), m = e || yr();
|
|
1949
1987
|
ne(() => {
|
|
1950
1988
|
h.current || (h.current = t());
|
|
1951
1989
|
}, [t]), ne(() => {
|
|
1952
1990
|
var R;
|
|
1953
|
-
n && m && (
|
|
1991
|
+
n && m && (hr(m), fr({
|
|
1954
1992
|
applicantId: m,
|
|
1955
1993
|
currentStepOrder: (R = n.currentStep) == null ? void 0 : R.order,
|
|
1956
1994
|
status: n.status,
|
|
@@ -2054,8 +2092,8 @@ function br(e) {
|
|
|
2054
2092
|
orchestrator: h.current
|
|
2055
2093
|
};
|
|
2056
2094
|
}
|
|
2057
|
-
function
|
|
2058
|
-
const { questionnaireService: t, applicantService: n } =
|
|
2095
|
+
function vr(e) {
|
|
2096
|
+
const { questionnaireService: t, applicantService: n } = ye(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [C, f] = k(null), S = ee(!1), b = ee(null), D = V(async () => {
|
|
2059
2097
|
var P, $;
|
|
2060
2098
|
if (e) {
|
|
2061
2099
|
if (S.current) {
|
|
@@ -2072,8 +2110,8 @@ function xr(e) {
|
|
|
2072
2110
|
const Y = /* @__PURE__ */ new Map();
|
|
2073
2111
|
for (const N of T.questionnaireResults)
|
|
2074
2112
|
N.question && (($ = N.answers) != null && $.length) && Y.set(N.question.trim().toLowerCase(), N.answers);
|
|
2075
|
-
const X = {},
|
|
2076
|
-
for (const N of
|
|
2113
|
+
const X = {}, I = R.questionGroups.flatMap((N) => N.questions ?? []);
|
|
2114
|
+
for (const N of I) {
|
|
2077
2115
|
const H = N.text.trim().toLowerCase();
|
|
2078
2116
|
Y.has(H) && (X[N.id] = Y.get(H));
|
|
2079
2117
|
}
|
|
@@ -2113,8 +2151,8 @@ function xr(e) {
|
|
|
2113
2151
|
submit: F
|
|
2114
2152
|
};
|
|
2115
2153
|
}
|
|
2116
|
-
function
|
|
2117
|
-
const { uploadDocumentService: t } =
|
|
2154
|
+
function kr(e) {
|
|
2155
|
+
const { uploadDocumentService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(0), [v, C] = k(null), f = ee(!1), S = ee(null), b = V(async () => {
|
|
2118
2156
|
if (e) {
|
|
2119
2157
|
if (f.current) {
|
|
2120
2158
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2157,8 +2195,8 @@ function vr(e) {
|
|
|
2157
2195
|
submit: D
|
|
2158
2196
|
};
|
|
2159
2197
|
}
|
|
2160
|
-
function
|
|
2161
|
-
const { appropriatenessTestService: t } =
|
|
2198
|
+
function bn(e) {
|
|
2199
|
+
const { appropriatenessTestService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), [v, C] = k(null), f = ee(!1), S = ee(null), b = V(async () => {
|
|
2162
2200
|
if (e) {
|
|
2163
2201
|
if (f.current) {
|
|
2164
2202
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2202,8 +2240,8 @@ function fn(e) {
|
|
|
2202
2240
|
submit: D
|
|
2203
2241
|
};
|
|
2204
2242
|
}
|
|
2205
|
-
function
|
|
2206
|
-
const { overviewService: t } =
|
|
2243
|
+
function wr(e) {
|
|
2244
|
+
const { overviewService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), v = ee(!1), C = ee(null), f = V(async () => {
|
|
2207
2245
|
if (e) {
|
|
2208
2246
|
if (v.current) {
|
|
2209
2247
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2244,8 +2282,8 @@ function kr(e) {
|
|
|
2244
2282
|
passOverview: S
|
|
2245
2283
|
};
|
|
2246
2284
|
}
|
|
2247
|
-
function
|
|
2248
|
-
const { identityService: t } =
|
|
2285
|
+
function Nr(e) {
|
|
2286
|
+
const { identityService: t } = ye(), [n, a] = k(
|
|
2249
2287
|
null
|
|
2250
2288
|
), [s, l] = k(!1), [c, u] = k(null), h = ee(!1), m = V(
|
|
2251
2289
|
async (f, S) => {
|
|
@@ -2330,8 +2368,8 @@ function wr(e) {
|
|
|
2330
2368
|
restartIdentity: C
|
|
2331
2369
|
};
|
|
2332
2370
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const { riskScoringService: t, applicantService: n } =
|
|
2371
|
+
function Sr(e) {
|
|
2372
|
+
const { riskScoringService: t, applicantService: n } = ye(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [C, f] = k(null), [S, b] = k(null), D = ee(!1), F = ee(null), P = V(async () => {
|
|
2335
2373
|
var R;
|
|
2336
2374
|
if (e) {
|
|
2337
2375
|
if (D.current) {
|
|
@@ -2345,15 +2383,15 @@ function Nr(e) {
|
|
|
2345
2383
|
n.getApplicantData(e).catch(() => null)
|
|
2346
2384
|
]);
|
|
2347
2385
|
if (s(T), (R = Y == null ? void 0 : Y.riskScoringResults) != null && R.length) {
|
|
2348
|
-
const X = Y.riskScoringResults[0],
|
|
2386
|
+
const X = Y.riskScoringResults[0], I = {};
|
|
2349
2387
|
for (const N of X.riskCriteriaResults ?? [])
|
|
2350
2388
|
if (N.riskCriteriaId != null && N.answer != null && N.answer !== "") {
|
|
2351
2389
|
const H = [...new Set(
|
|
2352
2390
|
N.answer.split(",").map((W) => W.trim()).filter((W) => W !== "")
|
|
2353
2391
|
)];
|
|
2354
|
-
H.length > 0 && (
|
|
2392
|
+
H.length > 0 && (I[N.riskCriteriaId] = H);
|
|
2355
2393
|
}
|
|
2356
|
-
c(
|
|
2394
|
+
c(I);
|
|
2357
2395
|
}
|
|
2358
2396
|
F.current = e;
|
|
2359
2397
|
} catch (T) {
|
|
@@ -2391,8 +2429,8 @@ function Nr(e) {
|
|
|
2391
2429
|
submit: $
|
|
2392
2430
|
};
|
|
2393
2431
|
}
|
|
2394
|
-
function
|
|
2395
|
-
const { applicantService: e, config: t } =
|
|
2432
|
+
function Cr() {
|
|
2433
|
+
const { applicantService: e, config: t } = ye(), [n, a] = k(!1), [s, l] = k(null), c = ee(!1), u = ee(!1), h = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(S) {
|
|
2396
2434
|
const b = Math.random() * 16 | 0;
|
|
2397
2435
|
return (S === "x" ? b : b & 3 | 8).toString(16);
|
|
2398
2436
|
}), m = V(
|
|
@@ -2604,7 +2642,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2604
2642
|
...n,
|
|
2605
2643
|
children: e
|
|
2606
2644
|
}
|
|
2607
|
-
),
|
|
2645
|
+
), Ae = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
|
|
2608
2646
|
"span",
|
|
2609
2647
|
{
|
|
2610
2648
|
className: oe(
|
|
@@ -2723,7 +2761,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2723
2761
|
] })
|
|
2724
2762
|
);
|
|
2725
2763
|
st.displayName = "Select";
|
|
2726
|
-
const ct = 280,
|
|
2764
|
+
const ct = 280, Er = ({
|
|
2727
2765
|
label: e,
|
|
2728
2766
|
value: t,
|
|
2729
2767
|
onChange: n,
|
|
@@ -2734,43 +2772,43 @@ const ct = 280, Cr = ({
|
|
|
2734
2772
|
}) => {
|
|
2735
2773
|
const [u, h] = k(!1), [m, v] = k(""), [C, f] = k(null), S = ee(null), b = ee(null), D = ee(null), F = V(() => {
|
|
2736
2774
|
if (!b.current) return null;
|
|
2737
|
-
const
|
|
2738
|
-
return { top: te ?
|
|
2775
|
+
const E = b.current.getBoundingClientRect(), te = window.innerHeight - E.bottom < ct && E.top > ct;
|
|
2776
|
+
return { top: te ? E.top : E.bottom + 4, left: E.left, width: E.width, openUp: te };
|
|
2739
2777
|
}, []), P = V(() => {
|
|
2740
2778
|
if (l) return;
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2779
|
+
const E = F();
|
|
2780
|
+
E && f(E), h(!0);
|
|
2743
2781
|
}, [l, F]), $ = V(() => {
|
|
2744
2782
|
h(!1), v("");
|
|
2745
2783
|
}, []);
|
|
2746
2784
|
ne(() => {
|
|
2747
2785
|
if (!u) return;
|
|
2748
|
-
const
|
|
2749
|
-
var
|
|
2786
|
+
const E = (U) => {
|
|
2787
|
+
var ge, se;
|
|
2750
2788
|
const te = U.target;
|
|
2751
|
-
!((
|
|
2789
|
+
!((ge = S.current) != null && ge.contains(te)) && !((se = D.current) != null && se.contains(te)) && $();
|
|
2752
2790
|
};
|
|
2753
|
-
return document.addEventListener("mousedown",
|
|
2791
|
+
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
2754
2792
|
}, [u, $]), ne(() => {
|
|
2755
2793
|
if (!u) return;
|
|
2756
|
-
const
|
|
2794
|
+
const E = () => {
|
|
2757
2795
|
const U = F();
|
|
2758
2796
|
U && f(U);
|
|
2759
2797
|
};
|
|
2760
|
-
return window.addEventListener("scroll",
|
|
2761
|
-
window.removeEventListener("scroll",
|
|
2798
|
+
return window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
|
|
2799
|
+
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
2762
2800
|
};
|
|
2763
2801
|
}, [u, F]);
|
|
2764
2802
|
const R = a.filter(
|
|
2765
|
-
(
|
|
2766
|
-
), T = (
|
|
2767
|
-
l || n(t.includes(
|
|
2768
|
-
}, Y = (
|
|
2769
|
-
U.stopPropagation(), l || n(t.filter((te) => te !==
|
|
2770
|
-
}, X = (
|
|
2803
|
+
(E) => E.label.toLowerCase().includes(m.toLowerCase())
|
|
2804
|
+
), T = (E) => {
|
|
2805
|
+
l || n(t.includes(E) ? t.filter((U) => U !== E) : [...t, E]);
|
|
2806
|
+
}, Y = (E, U) => {
|
|
2807
|
+
U.stopPropagation(), l || n(t.filter((te) => te !== E));
|
|
2808
|
+
}, X = (E) => {
|
|
2771
2809
|
var U;
|
|
2772
|
-
return ((U = a.find((te) => te.value ===
|
|
2773
|
-
},
|
|
2810
|
+
return ((U = a.find((te) => te.value === E)) == null ? void 0 : U.label) || E;
|
|
2811
|
+
}, I = b.current ? getComputedStyle(b.current) : null, N = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", H = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-border").trim()) || (I == null ? void 0 : I.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", W = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-text").trim()) || (I == null ? void 0 : I.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", w = (I == null ? void 0 : I.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", z = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", L = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", O = (I == null ? void 0 : I.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", G = u && C && /* @__PURE__ */ o(
|
|
2774
2812
|
"div",
|
|
2775
2813
|
{
|
|
2776
2814
|
ref: D,
|
|
@@ -2794,10 +2832,10 @@ const ct = 280, Cr = ({
|
|
|
2794
2832
|
{
|
|
2795
2833
|
type: "text",
|
|
2796
2834
|
value: m,
|
|
2797
|
-
onChange: (
|
|
2835
|
+
onChange: (E) => v(E.target.value),
|
|
2798
2836
|
placeholder: "Search...",
|
|
2799
2837
|
autoFocus: !0,
|
|
2800
|
-
onClick: (
|
|
2838
|
+
onClick: (E) => E.stopPropagation(),
|
|
2801
2839
|
className: "metakyc-multiselect-search w-full",
|
|
2802
2840
|
style: {
|
|
2803
2841
|
display: "block",
|
|
@@ -2813,12 +2851,12 @@ const ct = 280, Cr = ({
|
|
|
2813
2851
|
}
|
|
2814
2852
|
}
|
|
2815
2853
|
) }),
|
|
2816
|
-
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: R.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: w }, children: "No results" }) : R.map((
|
|
2817
|
-
const U = t.includes(
|
|
2854
|
+
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: R.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: w }, children: "No results" }) : R.map((E) => {
|
|
2855
|
+
const U = t.includes(E.value);
|
|
2818
2856
|
return /* @__PURE__ */ o(
|
|
2819
2857
|
"li",
|
|
2820
2858
|
{
|
|
2821
|
-
onClick: () => T(
|
|
2859
|
+
onClick: () => T(E.value),
|
|
2822
2860
|
className: "metakyc-multiselect-option",
|
|
2823
2861
|
style: {
|
|
2824
2862
|
display: "flex",
|
|
@@ -2828,7 +2866,7 @@ const ct = 280, Cr = ({
|
|
|
2828
2866
|
fontSize: "13px",
|
|
2829
2867
|
cursor: "pointer",
|
|
2830
2868
|
backgroundColor: U ? L : "transparent",
|
|
2831
|
-
color: U ?
|
|
2869
|
+
color: U ? z : W,
|
|
2832
2870
|
userSelect: "none"
|
|
2833
2871
|
},
|
|
2834
2872
|
onMouseEnter: (te) => {
|
|
@@ -2844,13 +2882,13 @@ const ct = 280, Cr = ({
|
|
|
2844
2882
|
type: "checkbox",
|
|
2845
2883
|
checked: U,
|
|
2846
2884
|
readOnly: !0,
|
|
2847
|
-
style: { accentColor:
|
|
2885
|
+
style: { accentColor: z, pointerEvents: "none", flexShrink: 0 }
|
|
2848
2886
|
}
|
|
2849
2887
|
),
|
|
2850
|
-
/* @__PURE__ */ r("span", { children:
|
|
2888
|
+
/* @__PURE__ */ r("span", { children: E.label })
|
|
2851
2889
|
]
|
|
2852
2890
|
},
|
|
2853
|
-
|
|
2891
|
+
E.value
|
|
2854
2892
|
);
|
|
2855
2893
|
}) }),
|
|
2856
2894
|
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${H}` }, children: /* @__PURE__ */ o(
|
|
@@ -2907,7 +2945,7 @@ const ct = 280, Cr = ({
|
|
|
2907
2945
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
2908
2946
|
children: s
|
|
2909
2947
|
}
|
|
2910
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
2948
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((E) => /* @__PURE__ */ o(
|
|
2911
2949
|
"span",
|
|
2912
2950
|
{
|
|
2913
2951
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -2916,12 +2954,12 @@ const ct = 280, Cr = ({
|
|
|
2916
2954
|
color: "var(--metakyc-primary, #2563eb)"
|
|
2917
2955
|
},
|
|
2918
2956
|
children: [
|
|
2919
|
-
X(
|
|
2957
|
+
X(E),
|
|
2920
2958
|
!l && /* @__PURE__ */ r(
|
|
2921
2959
|
"button",
|
|
2922
2960
|
{
|
|
2923
2961
|
type: "button",
|
|
2924
|
-
onClick: (U) => Y(
|
|
2962
|
+
onClick: (U) => Y(E, U),
|
|
2925
2963
|
className: "metakyc-multiselect-chip-remove",
|
|
2926
2964
|
style: {
|
|
2927
2965
|
background: "transparent",
|
|
@@ -2947,7 +2985,7 @@ const ct = 280, Cr = ({
|
|
|
2947
2985
|
)
|
|
2948
2986
|
]
|
|
2949
2987
|
},
|
|
2950
|
-
|
|
2988
|
+
E
|
|
2951
2989
|
)) }),
|
|
2952
2990
|
/* @__PURE__ */ r(
|
|
2953
2991
|
"span",
|
|
@@ -2990,13 +3028,13 @@ const ct = 280, Cr = ({
|
|
|
2990
3028
|
M && D(M), C(!0);
|
|
2991
3029
|
}, [u, T]), X = V(() => {
|
|
2992
3030
|
C(!1), S("");
|
|
2993
|
-
}, []),
|
|
3031
|
+
}, []), I = () => v ? X() : Y();
|
|
2994
3032
|
ne(() => {
|
|
2995
3033
|
if (!v) return;
|
|
2996
3034
|
const M = (Z) => {
|
|
2997
|
-
var
|
|
3035
|
+
var Ee, Pe;
|
|
2998
3036
|
const ie = Z.target;
|
|
2999
|
-
!((
|
|
3037
|
+
!((Ee = F.current) != null && Ee.contains(ie)) && !((Pe = $.current) != null && Pe.contains(ie)) && X();
|
|
3000
3038
|
};
|
|
3001
3039
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
3002
3040
|
}, [v, X]), ne(() => {
|
|
@@ -3018,7 +3056,7 @@ const ct = 280, Cr = ({
|
|
|
3018
3056
|
(M) => M.label.toLowerCase().includes(f.toLowerCase()) || M.value.toLowerCase().includes(f.toLowerCase())
|
|
3019
3057
|
), H = (se = a.find((M) => M.value === l)) == null ? void 0 : se.label, W = (M, Z) => {
|
|
3020
3058
|
u || Z || (c(M), X());
|
|
3021
|
-
}, w = P.current ? getComputedStyle(P.current) : null,
|
|
3059
|
+
}, w = P.current ? getComputedStyle(P.current) : null, z = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", L = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-border").trim()) || (w == null ? void 0 : w.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", O = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-text").trim()) || (w == null ? void 0 : w.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", G = (w == null ? void 0 : w.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", E = (w == null ? void 0 : w.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (w == null ? void 0 : w.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (w == null ? void 0 : w.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", ge = v && b && /* @__PURE__ */ o(
|
|
3022
3060
|
"div",
|
|
3023
3061
|
{
|
|
3024
3062
|
ref: $,
|
|
@@ -3033,7 +3071,7 @@ const ct = 280, Cr = ({
|
|
|
3033
3071
|
borderRadius: "8px",
|
|
3034
3072
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3035
3073
|
border: `1px solid ${L}`,
|
|
3036
|
-
backgroundColor:
|
|
3074
|
+
backgroundColor: z,
|
|
3037
3075
|
overflow: "hidden"
|
|
3038
3076
|
},
|
|
3039
3077
|
children: [
|
|
@@ -3054,7 +3092,7 @@ const ct = 280, Cr = ({
|
|
|
3054
3092
|
fontSize: "13px",
|
|
3055
3093
|
borderRadius: "6px",
|
|
3056
3094
|
border: `1px solid ${L}`,
|
|
3057
|
-
backgroundColor:
|
|
3095
|
+
backgroundColor: z,
|
|
3058
3096
|
color: O,
|
|
3059
3097
|
outline: "none",
|
|
3060
3098
|
boxSizing: "border-box"
|
|
@@ -3084,7 +3122,7 @@ const ct = 280, Cr = ({
|
|
|
3084
3122
|
cursor: M.disabled ? "not-allowed" : "pointer",
|
|
3085
3123
|
opacity: M.disabled ? 0.4 : 1,
|
|
3086
3124
|
backgroundColor: Z ? U : "transparent",
|
|
3087
|
-
color: Z ?
|
|
3125
|
+
color: Z ? E : O,
|
|
3088
3126
|
userSelect: "none"
|
|
3089
3127
|
},
|
|
3090
3128
|
onMouseEnter: (ie) => {
|
|
@@ -3126,9 +3164,9 @@ const ct = 280, Cr = ({
|
|
|
3126
3164
|
ref: P,
|
|
3127
3165
|
role: "button",
|
|
3128
3166
|
tabIndex: u ? -1 : 0,
|
|
3129
|
-
onClick:
|
|
3167
|
+
onClick: I,
|
|
3130
3168
|
onKeyDown: (M) => {
|
|
3131
|
-
(M.key === "Enter" || M.key === " ") && (M.preventDefault(),
|
|
3169
|
+
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), I()), M.key === "Escape" && X();
|
|
3132
3170
|
},
|
|
3133
3171
|
className: oe(
|
|
3134
3172
|
"metakyc-searchable-select-trigger",
|
|
@@ -3158,7 +3196,7 @@ const ct = 280, Cr = ({
|
|
|
3158
3196
|
]
|
|
3159
3197
|
}
|
|
3160
3198
|
),
|
|
3161
|
-
typeof document < "u" &&
|
|
3199
|
+
typeof document < "u" && ge ? it(ge, document.body) : null,
|
|
3162
3200
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3163
3201
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3164
3202
|
]
|
|
@@ -3361,21 +3399,21 @@ Ir.displayName = "PhoneInput";
|
|
|
3361
3399
|
* This source code is licensed under the ISC license.
|
|
3362
3400
|
* See the LICENSE file in the root directory of this source tree.
|
|
3363
3401
|
*/
|
|
3364
|
-
const
|
|
3402
|
+
const gt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
|
|
3365
3403
|
/**
|
|
3366
3404
|
* @license lucide-react v0.574.0 - ISC
|
|
3367
3405
|
*
|
|
3368
3406
|
* This source code is licensed under the ISC license.
|
|
3369
3407
|
* See the LICENSE file in the root directory of this source tree.
|
|
3370
3408
|
*/
|
|
3371
|
-
const
|
|
3409
|
+
const Rr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3372
3410
|
/**
|
|
3373
3411
|
* @license lucide-react v0.574.0 - ISC
|
|
3374
3412
|
*
|
|
3375
3413
|
* This source code is licensed under the ISC license.
|
|
3376
3414
|
* See the LICENSE file in the root directory of this source tree.
|
|
3377
3415
|
*/
|
|
3378
|
-
const
|
|
3416
|
+
const Pr = (e) => e.replace(
|
|
3379
3417
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3380
3418
|
(t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
|
|
3381
3419
|
);
|
|
@@ -3386,7 +3424,7 @@ const Rr = (e) => e.replace(
|
|
|
3386
3424
|
* See the LICENSE file in the root directory of this source tree.
|
|
3387
3425
|
*/
|
|
3388
3426
|
const ut = (e) => {
|
|
3389
|
-
const t =
|
|
3427
|
+
const t = Pr(e);
|
|
3390
3428
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3391
3429
|
};
|
|
3392
3430
|
/**
|
|
@@ -3395,7 +3433,7 @@ const ut = (e) => {
|
|
|
3395
3433
|
* This source code is licensed under the ISC license.
|
|
3396
3434
|
* See the LICENSE file in the root directory of this source tree.
|
|
3397
3435
|
*/
|
|
3398
|
-
var
|
|
3436
|
+
var Fr = {
|
|
3399
3437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3400
3438
|
width: 24,
|
|
3401
3439
|
height: 24,
|
|
@@ -3412,7 +3450,7 @@ var Pr = {
|
|
|
3412
3450
|
* This source code is licensed under the ISC license.
|
|
3413
3451
|
* See the LICENSE file in the root directory of this source tree.
|
|
3414
3452
|
*/
|
|
3415
|
-
const
|
|
3453
|
+
const Tr = (e) => {
|
|
3416
3454
|
for (const t in e)
|
|
3417
3455
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3418
3456
|
return !0;
|
|
@@ -3424,7 +3462,7 @@ const Fr = (e) => {
|
|
|
3424
3462
|
* This source code is licensed under the ISC license.
|
|
3425
3463
|
* See the LICENSE file in the root directory of this source tree.
|
|
3426
3464
|
*/
|
|
3427
|
-
const
|
|
3465
|
+
const Lr = Ge(
|
|
3428
3466
|
({
|
|
3429
3467
|
color: e = "currentColor",
|
|
3430
3468
|
size: t = 24,
|
|
@@ -3438,13 +3476,13 @@ const Tr = Ge(
|
|
|
3438
3476
|
"svg",
|
|
3439
3477
|
{
|
|
3440
3478
|
ref: h,
|
|
3441
|
-
...
|
|
3479
|
+
...Fr,
|
|
3442
3480
|
width: t,
|
|
3443
3481
|
height: t,
|
|
3444
3482
|
stroke: e,
|
|
3445
3483
|
strokeWidth: a ? Number(n) * 24 / Number(t) : n,
|
|
3446
|
-
className:
|
|
3447
|
-
...!l && !
|
|
3484
|
+
className: gt("lucide", s),
|
|
3485
|
+
...!l && !Tr(u) && { "aria-hidden": "true" },
|
|
3448
3486
|
...u
|
|
3449
3487
|
},
|
|
3450
3488
|
[
|
|
@@ -3461,11 +3499,11 @@ const Tr = Ge(
|
|
|
3461
3499
|
*/
|
|
3462
3500
|
const ft = (e, t) => {
|
|
3463
3501
|
const n = Ge(
|
|
3464
|
-
({ className: a, ...s }, l) => nt(
|
|
3502
|
+
({ className: a, ...s }, l) => nt(Lr, {
|
|
3465
3503
|
ref: l,
|
|
3466
3504
|
iconNode: t,
|
|
3467
|
-
className:
|
|
3468
|
-
`lucide-${
|
|
3505
|
+
className: gt(
|
|
3506
|
+
`lucide-${Rr(ut(e))}`,
|
|
3469
3507
|
`lucide-${e}`,
|
|
3470
3508
|
a
|
|
3471
3509
|
),
|
|
@@ -3480,15 +3518,15 @@ const ft = (e, t) => {
|
|
|
3480
3518
|
* This source code is licensed under the ISC license.
|
|
3481
3519
|
* See the LICENSE file in the root directory of this source tree.
|
|
3482
3520
|
*/
|
|
3483
|
-
const
|
|
3521
|
+
const Dr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], bt = ft("chevron-left", Dr);
|
|
3484
3522
|
/**
|
|
3485
3523
|
* @license lucide-react v0.574.0 - ISC
|
|
3486
3524
|
*
|
|
3487
3525
|
* This source code is licensed under the ISC license.
|
|
3488
3526
|
* See the LICENSE file in the root directory of this source tree.
|
|
3489
3527
|
*/
|
|
3490
|
-
const
|
|
3491
|
-
function
|
|
3528
|
+
const Mr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], xt = ft("chevron-right", Mr);
|
|
3529
|
+
function Or(e, t) {
|
|
3492
3530
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3493
3531
|
if (e.isRequired && n)
|
|
3494
3532
|
return e.errorMessage || "This field is required";
|
|
@@ -3517,7 +3555,7 @@ function Mr(e, t) {
|
|
|
3517
3555
|
}
|
|
3518
3556
|
return null;
|
|
3519
3557
|
}
|
|
3520
|
-
function
|
|
3558
|
+
function $r(e) {
|
|
3521
3559
|
const t = e.flatMap(
|
|
3522
3560
|
(a, s) => (a.questions ?? []).map((l, c) => ({ question: l, groupIndex: s, qIdx: c }))
|
|
3523
3561
|
), n = /* @__PURE__ */ new Map();
|
|
@@ -3527,38 +3565,38 @@ function Or(e) {
|
|
|
3527
3565
|
}
|
|
3528
3566
|
return Array.from(n.entries()).sort(([a], [s]) => a - s).map(([, a]) => a);
|
|
3529
3567
|
}
|
|
3530
|
-
const
|
|
3568
|
+
const Br = ({
|
|
3531
3569
|
applicantId: e,
|
|
3532
3570
|
onComplete: t,
|
|
3533
3571
|
onBack: n
|
|
3534
3572
|
}) => {
|
|
3535
|
-
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } =
|
|
3573
|
+
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = vr(e), [m, v] = k({}), [C, f] = k({}), [S, b] = k(0);
|
|
3536
3574
|
be.useEffect(() => {
|
|
3537
3575
|
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && v(s);
|
|
3538
3576
|
}, [s]);
|
|
3539
|
-
const D =
|
|
3540
|
-
() => a ?
|
|
3577
|
+
const D = Ie(
|
|
3578
|
+
() => a ? $r(a.questionGroups) : [],
|
|
3541
3579
|
[a]
|
|
3542
|
-
), F = S === D.length - 1, P = D[S] ?? [], $ = V((
|
|
3543
|
-
v((H) => ({ ...H, [
|
|
3580
|
+
), F = S === D.length - 1, P = D[S] ?? [], $ = V((I, N) => {
|
|
3581
|
+
v((H) => ({ ...H, [I]: N })), f((H) => {
|
|
3544
3582
|
const W = { ...H };
|
|
3545
|
-
return delete W[
|
|
3583
|
+
return delete W[I], W;
|
|
3546
3584
|
});
|
|
3547
3585
|
}, []), R = V(() => {
|
|
3548
|
-
const
|
|
3586
|
+
const I = {};
|
|
3549
3587
|
for (const { question: N } of P) {
|
|
3550
|
-
const H =
|
|
3551
|
-
H && (
|
|
3588
|
+
const H = Or(N, m[N.id] ?? []);
|
|
3589
|
+
H && (I[N.id] = H);
|
|
3552
3590
|
}
|
|
3553
|
-
return f((N) => ({ ...N, ...
|
|
3591
|
+
return f((N) => ({ ...N, ...I })), Object.keys(I).length === 0;
|
|
3554
3592
|
}, [P, m]), T = () => {
|
|
3555
|
-
R() && b((
|
|
3593
|
+
R() && b((I) => I + 1);
|
|
3556
3594
|
}, Y = () => {
|
|
3557
|
-
S > 0 ? b((
|
|
3595
|
+
S > 0 ? b((I) => I - 1) : n == null || n();
|
|
3558
3596
|
}, X = async () => {
|
|
3559
3597
|
if (!(!R() || !a))
|
|
3560
3598
|
try {
|
|
3561
|
-
const
|
|
3599
|
+
const I = a.questionGroups.flatMap(
|
|
3562
3600
|
(H) => (H.questions ?? []).map((W) => ({
|
|
3563
3601
|
questionId: W.id,
|
|
3564
3602
|
values: m[W.id] ?? []
|
|
@@ -3566,11 +3604,11 @@ const $r = ({
|
|
|
3566
3604
|
), N = {
|
|
3567
3605
|
applicantId: e,
|
|
3568
3606
|
questionnarieId: a.id,
|
|
3569
|
-
questionResults:
|
|
3607
|
+
questionResults: I
|
|
3570
3608
|
};
|
|
3571
3609
|
await h(N), t == null || t();
|
|
3572
|
-
} catch (
|
|
3573
|
-
console.error("Questionnaire submit error:",
|
|
3610
|
+
} catch (I) {
|
|
3611
|
+
console.error("Questionnaire submit error:", I);
|
|
3574
3612
|
}
|
|
3575
3613
|
};
|
|
3576
3614
|
return l ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3587,7 +3625,7 @@ const $r = ({
|
|
|
3587
3625
|
" of ",
|
|
3588
3626
|
D.length
|
|
3589
3627
|
] }),
|
|
3590
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((
|
|
3628
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((I, N) => /* @__PURE__ */ r(
|
|
3591
3629
|
"div",
|
|
3592
3630
|
{
|
|
3593
3631
|
className: "rounded-full transition-all duration-200",
|
|
@@ -3601,15 +3639,15 @@ const $r = ({
|
|
|
3601
3639
|
)) })
|
|
3602
3640
|
] })
|
|
3603
3641
|
] }),
|
|
3604
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question:
|
|
3642
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question: I }) => /* @__PURE__ */ r(
|
|
3605
3643
|
zr,
|
|
3606
3644
|
{
|
|
3607
|
-
question:
|
|
3608
|
-
value: m[
|
|
3609
|
-
error: C[
|
|
3610
|
-
onChange: (N) => $(
|
|
3645
|
+
question: I,
|
|
3646
|
+
value: m[I.id] ?? [],
|
|
3647
|
+
error: C[I.id],
|
|
3648
|
+
onChange: (N) => $(I.id, N)
|
|
3611
3649
|
},
|
|
3612
|
-
|
|
3650
|
+
I.id
|
|
3613
3651
|
)) }),
|
|
3614
3652
|
/* @__PURE__ */ o(me, { className: "flex items-center justify-between", children: [
|
|
3615
3653
|
/* @__PURE__ */ o(
|
|
@@ -3755,19 +3793,19 @@ const $r = ({
|
|
|
3755
3793
|
] }),
|
|
3756
3794
|
n && l === "text" && null
|
|
3757
3795
|
] });
|
|
3758
|
-
},
|
|
3796
|
+
}, _r = ({
|
|
3759
3797
|
applicantId: e,
|
|
3760
3798
|
onComplete: t,
|
|
3761
3799
|
onBack: n
|
|
3762
3800
|
}) => {
|
|
3763
|
-
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } =
|
|
3801
|
+
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = kr(e), [h, m] = k({}), v = async (C) => {
|
|
3764
3802
|
if (C.preventDefault(), !a) return;
|
|
3765
3803
|
const f = await Promise.all(
|
|
3766
3804
|
a.uploadDocumentFiles.map(async (b) => {
|
|
3767
3805
|
const D = h[b.id] || [], F = await Promise.all(
|
|
3768
3806
|
D.map(async (P) => ({
|
|
3769
3807
|
fileName: P.name,
|
|
3770
|
-
fileData: await
|
|
3808
|
+
fileData: await pr(P)
|
|
3771
3809
|
}))
|
|
3772
3810
|
);
|
|
3773
3811
|
return {
|
|
@@ -3809,8 +3847,8 @@ const $r = ({
|
|
|
3809
3847
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: l, children: "Continue" })
|
|
3810
3848
|
] })
|
|
3811
3849
|
] }) }) : null;
|
|
3812
|
-
},
|
|
3813
|
-
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } =
|
|
3850
|
+
}, Hr = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
3851
|
+
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } = wr(e), h = async () => {
|
|
3814
3852
|
await u(), t == null || t();
|
|
3815
3853
|
};
|
|
3816
3854
|
return s ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3846,7 +3884,7 @@ const $r = ({
|
|
|
3846
3884
|
] })
|
|
3847
3885
|
] }) : null;
|
|
3848
3886
|
};
|
|
3849
|
-
function
|
|
3887
|
+
function Ur(e) {
|
|
3850
3888
|
const t = (e ?? "en").toLowerCase().replace("_", "-");
|
|
3851
3889
|
try {
|
|
3852
3890
|
return Intl.NumberFormat.supportedLocalesOf([t]), t;
|
|
@@ -3854,11 +3892,11 @@ function Hr(e) {
|
|
|
3854
3892
|
return "en";
|
|
3855
3893
|
}
|
|
3856
3894
|
}
|
|
3857
|
-
function
|
|
3895
|
+
function jr(e) {
|
|
3858
3896
|
return e.valueDataType === Se.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
3859
3897
|
}
|
|
3860
|
-
function
|
|
3861
|
-
const n = new Intl.NumberFormat(
|
|
3898
|
+
function Kr(e, t) {
|
|
3899
|
+
const n = new Intl.NumberFormat(Ur(t), {
|
|
3862
3900
|
minimumFractionDigits: 0,
|
|
3863
3901
|
maximumFractionDigits: 2
|
|
3864
3902
|
});
|
|
@@ -3867,7 +3905,7 @@ function jr(e, t) {
|
|
|
3867
3905
|
return isNaN(s) ? a : n.format(s);
|
|
3868
3906
|
});
|
|
3869
3907
|
}
|
|
3870
|
-
function
|
|
3908
|
+
function Wr(e, t) {
|
|
3871
3909
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3872
3910
|
if (e.isRequired && n)
|
|
3873
3911
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3897,50 +3935,50 @@ function Kr(e, t) {
|
|
|
3897
3935
|
}
|
|
3898
3936
|
return null;
|
|
3899
3937
|
}
|
|
3900
|
-
function
|
|
3938
|
+
function Yr(e) {
|
|
3901
3939
|
const t = /* @__PURE__ */ new Map();
|
|
3902
3940
|
return e.forEach((n, a) => {
|
|
3903
3941
|
const s = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
3904
3942
|
t.has(s) || t.set(s, []), t.get(s).push({ criterion: n, idx: a });
|
|
3905
3943
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
3906
3944
|
}
|
|
3907
|
-
function
|
|
3945
|
+
function qr(e) {
|
|
3908
3946
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3909
3947
|
}
|
|
3910
|
-
const
|
|
3948
|
+
const Qr = ({
|
|
3911
3949
|
applicantId: e,
|
|
3912
3950
|
onComplete: t,
|
|
3913
3951
|
onBack: n
|
|
3914
3952
|
}) => {
|
|
3915
|
-
const { config: a } =
|
|
3953
|
+
const { config: a } = ye(), s = a.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: h, error: m, submit: v } = Sr(e), [C, f] = k({}), [S, b] = k({}), [D, F] = k(0), [P, $] = k(!1);
|
|
3916
3954
|
be.useEffect(() => {
|
|
3917
3955
|
c && Object.keys(c).length > 0 && Object.keys(C).length === 0 && f(c);
|
|
3918
3956
|
}, [c]);
|
|
3919
|
-
const R =
|
|
3920
|
-
() => l && l.length > 0 ?
|
|
3957
|
+
const R = Ie(
|
|
3958
|
+
() => l && l.length > 0 ? Yr(l) : [],
|
|
3921
3959
|
[l]
|
|
3922
3960
|
), T = D === R.length - 1, Y = R[D] ?? [];
|
|
3923
3961
|
be.useEffect(() => {
|
|
3924
3962
|
!u && l && l.length === 0 && !P && !h && ($(!0), v({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3925
3963
|
}, [u, l, P, h, v, e, t]);
|
|
3926
|
-
const X = V((w,
|
|
3927
|
-
f((L) => ({ ...L, [w]:
|
|
3964
|
+
const X = V((w, z) => {
|
|
3965
|
+
f((L) => ({ ...L, [w]: z })), b((L) => {
|
|
3928
3966
|
const O = { ...L };
|
|
3929
3967
|
return delete O[w], O;
|
|
3930
3968
|
});
|
|
3931
|
-
}, []),
|
|
3969
|
+
}, []), I = V(() => {
|
|
3932
3970
|
const w = {};
|
|
3933
|
-
for (const { criterion:
|
|
3934
|
-
const L =
|
|
3935
|
-
L && (w[
|
|
3971
|
+
for (const { criterion: z } of Y) {
|
|
3972
|
+
const L = Wr(z, C[z.id] ?? []);
|
|
3973
|
+
L && (w[z.id] = L);
|
|
3936
3974
|
}
|
|
3937
|
-
return b((
|
|
3975
|
+
return b((z) => ({ ...z, ...w })), Object.keys(w).length === 0;
|
|
3938
3976
|
}, [Y, C]), N = () => {
|
|
3939
|
-
|
|
3977
|
+
I() && F((w) => w + 1);
|
|
3940
3978
|
}, H = () => {
|
|
3941
3979
|
D > 0 ? F((w) => w - 1) : n == null || n();
|
|
3942
3980
|
}, W = async () => {
|
|
3943
|
-
if (!(!
|
|
3981
|
+
if (!(!I() || !l))
|
|
3944
3982
|
try {
|
|
3945
3983
|
const w = l.map((L) => {
|
|
3946
3984
|
const O = (C[L.id] ?? []).filter((G) => G && G.trim());
|
|
@@ -3971,28 +4009,28 @@ const qr = ({
|
|
|
3971
4009
|
" of ",
|
|
3972
4010
|
R.length
|
|
3973
4011
|
] }),
|
|
3974
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w,
|
|
4012
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w, z) => /* @__PURE__ */ r(
|
|
3975
4013
|
"div",
|
|
3976
4014
|
{
|
|
3977
4015
|
className: "rounded-full transition-all duration-200",
|
|
3978
4016
|
style: {
|
|
3979
4017
|
height: "6px",
|
|
3980
|
-
width:
|
|
3981
|
-
backgroundColor:
|
|
4018
|
+
width: z === D ? "20px" : "6px",
|
|
4019
|
+
backgroundColor: z <= D ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3982
4020
|
}
|
|
3983
4021
|
},
|
|
3984
|
-
|
|
4022
|
+
z
|
|
3985
4023
|
)) })
|
|
3986
4024
|
] })
|
|
3987
4025
|
] }),
|
|
3988
4026
|
/* @__PURE__ */ r(K, { className: "space-y-6", children: Y.map(({ criterion: w }) => /* @__PURE__ */ r(
|
|
3989
|
-
|
|
4027
|
+
Gr,
|
|
3990
4028
|
{
|
|
3991
4029
|
criterion: w,
|
|
3992
4030
|
value: C[w.id] ?? [],
|
|
3993
4031
|
error: S[w.id],
|
|
3994
4032
|
locale: s,
|
|
3995
|
-
onChange: (
|
|
4033
|
+
onChange: (z) => X(w.id, z)
|
|
3996
4034
|
},
|
|
3997
4035
|
w.id
|
|
3998
4036
|
)) }),
|
|
@@ -4025,8 +4063,8 @@ const qr = ({
|
|
|
4025
4063
|
] }),
|
|
4026
4064
|
m && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: m.message }) })
|
|
4027
4065
|
] }) : null;
|
|
4028
|
-
},
|
|
4029
|
-
const l =
|
|
4066
|
+
}, Gr = ({ criterion: e, value: t, error: n, locale: a, onChange: s }) => {
|
|
4067
|
+
const l = qr(e), c = e.valueDataType === Se.Integer || e.valueDataType === Se.Money || e.valueDataType === Se.DigitOnly, u = jr(e), h = (m) => u ? Kr(m, a) : m;
|
|
4030
4068
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
4031
4069
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
4032
4070
|
e.displayName,
|
|
@@ -4142,12 +4180,12 @@ const qr = ({
|
|
|
4142
4180
|
}
|
|
4143
4181
|
)
|
|
4144
4182
|
] });
|
|
4145
|
-
},
|
|
4183
|
+
}, Vr = ({
|
|
4146
4184
|
applicantId: e,
|
|
4147
4185
|
onComplete: t,
|
|
4148
4186
|
onBack: n
|
|
4149
4187
|
}) => {
|
|
4150
|
-
const { investorCategorizationService: a } =
|
|
4188
|
+
const { investorCategorizationService: a } = ye(), [s, l] = k(null), [c, u] = k(!1), [h, m] = k(null);
|
|
4151
4189
|
return /* @__PURE__ */ r("form", { onSubmit: async (C) => {
|
|
4152
4190
|
if (C.preventDefault(), s === null) {
|
|
4153
4191
|
m("Please select an investor type");
|
|
@@ -4280,12 +4318,12 @@ const qr = ({
|
|
|
4280
4318
|
)
|
|
4281
4319
|
] })
|
|
4282
4320
|
] }) });
|
|
4283
|
-
},
|
|
4321
|
+
}, Jr = ({
|
|
4284
4322
|
applicantId: e,
|
|
4285
4323
|
onComplete: t,
|
|
4286
4324
|
onBack: n
|
|
4287
4325
|
}) => {
|
|
4288
|
-
const { appropriatenessTestService: a } =
|
|
4326
|
+
const { appropriatenessTestService: a } = ye(), [s, l] = k(null), [c, u] = k(!0), [h, m] = k(!1), [v, C] = k(null), [f, S] = k({}), [b, D] = k(0), [F, P] = k(!1), [$, R] = k(!1), [T, Y] = k(0);
|
|
4289
4327
|
ne(() => {
|
|
4290
4328
|
(async () => {
|
|
4291
4329
|
try {
|
|
@@ -4305,11 +4343,11 @@ const qr = ({
|
|
|
4305
4343
|
const X = (L) => {
|
|
4306
4344
|
const O = L.split(":").map(Number);
|
|
4307
4345
|
if (O.length === 3) {
|
|
4308
|
-
const [G,
|
|
4309
|
-
return G * 3600 +
|
|
4346
|
+
const [G, E, U] = O;
|
|
4347
|
+
return G * 3600 + E * 60 + U;
|
|
4310
4348
|
}
|
|
4311
4349
|
return 0;
|
|
4312
|
-
},
|
|
4350
|
+
}, I = (L) => {
|
|
4313
4351
|
const O = Math.floor(L / 60), G = L % 60;
|
|
4314
4352
|
return `${O.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
|
4315
4353
|
};
|
|
@@ -4347,9 +4385,9 @@ const qr = ({
|
|
|
4347
4385
|
m(!0), C(null);
|
|
4348
4386
|
try {
|
|
4349
4387
|
const O = s.appropriatenessQuestions.map(
|
|
4350
|
-
(
|
|
4351
|
-
appropriatenessQuestionId:
|
|
4352
|
-
value: f[
|
|
4388
|
+
(E) => ({
|
|
4389
|
+
appropriatenessQuestionId: E.id,
|
|
4390
|
+
value: f[E.id] || ""
|
|
4353
4391
|
// Empty string if not answered
|
|
4354
4392
|
})
|
|
4355
4393
|
), G = {
|
|
@@ -4359,14 +4397,14 @@ const qr = ({
|
|
|
4359
4397
|
};
|
|
4360
4398
|
console.log("Submitting appropriateness test:", G);
|
|
4361
4399
|
try {
|
|
4362
|
-
const
|
|
4363
|
-
console.log("Appropriateness test result:",
|
|
4364
|
-
} catch (
|
|
4365
|
-
if (
|
|
4366
|
-
const U =
|
|
4400
|
+
const E = await a.fillAppropriatenessTest(G);
|
|
4401
|
+
console.log("Appropriateness test result:", E), E.message && (E.message.toLowerCase().includes("pass") || E.message.toLowerCase().includes("success") || E.message.toLowerCase().includes("congratulations")) ? t == null || t() : (C(E.message || "Test completed. Please check the result."), P(!1), R(!1), S({}), setTimeout(() => w(), 1e3));
|
|
4402
|
+
} catch (E) {
|
|
4403
|
+
if (E.code === 400 && E.message) {
|
|
4404
|
+
const U = E.message;
|
|
4367
4405
|
console.log("Test failed:", U), C(U), P(!1), R(!1), S({}), setTimeout(() => w(), 1500);
|
|
4368
4406
|
} else
|
|
4369
|
-
throw
|
|
4407
|
+
throw E;
|
|
4370
4408
|
}
|
|
4371
4409
|
} catch (O) {
|
|
4372
4410
|
console.error("Error submitting appropriateness test:", O), C(O.message || "Failed to submit test. Please try again."), P(!1), R(!1), S({});
|
|
@@ -4405,13 +4443,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4405
4443
|
] }),
|
|
4406
4444
|
/* @__PURE__ */ o(K, { className: "py-12 text-center", children: [
|
|
4407
4445
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4408
|
-
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children:
|
|
4446
|
+
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: I(T) }),
|
|
4409
4447
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
4410
4448
|
] }),
|
|
4411
4449
|
v && /* @__PURE__ */ r("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__ */ r("p", { className: "text-red-600 dark:text-red-400 text-sm", children: v }) })
|
|
4412
4450
|
] })
|
|
4413
4451
|
] });
|
|
4414
|
-
const
|
|
4452
|
+
const z = s.testAllowedMaxTry - s.totalFailedTries;
|
|
4415
4453
|
return F ? /* @__PURE__ */ r("form", { onSubmit: W, children: /* @__PURE__ */ o(j, { children: [
|
|
4416
4454
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4417
4455
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -4423,7 +4461,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4423
4461
|
"div",
|
|
4424
4462
|
{
|
|
4425
4463
|
className: `text-3xl font-bold ${b <= 60 ? "text-danger-500" : "text-primary-500"}`,
|
|
4426
|
-
children:
|
|
4464
|
+
children: I(b)
|
|
4427
4465
|
}
|
|
4428
4466
|
),
|
|
4429
4467
|
/* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
@@ -4431,16 +4469,16 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4431
4469
|
] }) }),
|
|
4432
4470
|
/* @__PURE__ */ o(K, { className: "space-y-6", children: [
|
|
4433
4471
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4434
|
-
/* @__PURE__ */ o(
|
|
4472
|
+
/* @__PURE__ */ o(Ae, { variant: "info", children: [
|
|
4435
4473
|
"Question ",
|
|
4436
4474
|
Object.keys(f).length,
|
|
4437
4475
|
" of ",
|
|
4438
4476
|
s.totalQuestionCount
|
|
4439
4477
|
] }),
|
|
4440
|
-
/* @__PURE__ */ o(
|
|
4441
|
-
|
|
4478
|
+
/* @__PURE__ */ o(Ae, { variant: z > 1 ? "success" : "warning", children: [
|
|
4479
|
+
z,
|
|
4442
4480
|
" attempt",
|
|
4443
|
-
|
|
4481
|
+
z !== 1 ? "s" : "",
|
|
4444
4482
|
" remaining"
|
|
4445
4483
|
] })
|
|
4446
4484
|
] }),
|
|
@@ -4457,7 +4495,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4457
4495
|
L.groupName && /* @__PURE__ */ r("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: L.groupName }),
|
|
4458
4496
|
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: L.question })
|
|
4459
4497
|
] }),
|
|
4460
|
-
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G,
|
|
4498
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G, E) => /* @__PURE__ */ o(
|
|
4461
4499
|
"label",
|
|
4462
4500
|
{
|
|
4463
4501
|
className: `
|
|
@@ -4480,7 +4518,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4480
4518
|
/* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: G })
|
|
4481
4519
|
]
|
|
4482
4520
|
},
|
|
4483
|
-
|
|
4521
|
+
E
|
|
4484
4522
|
)) })
|
|
4485
4523
|
]
|
|
4486
4524
|
},
|
|
@@ -4527,19 +4565,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4527
4565
|
/* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
|
|
4528
4566
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4529
4567
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
|
|
4530
|
-
/* @__PURE__ */ r(
|
|
4568
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.totalQuestionCount })
|
|
4531
4569
|
] }),
|
|
4532
4570
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4533
4571
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
4534
|
-
/* @__PURE__ */ r(
|
|
4572
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: I(s.testDurationSec) })
|
|
4535
4573
|
] }),
|
|
4536
4574
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4537
4575
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
4538
|
-
/* @__PURE__ */ r(
|
|
4576
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.testCorrectAnswerPassLimit })
|
|
4539
4577
|
] }),
|
|
4540
4578
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4541
4579
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4542
|
-
/* @__PURE__ */ r(
|
|
4580
|
+
/* @__PURE__ */ r(Ae, { variant: z > 1 ? "success" : "warning", children: z })
|
|
4543
4581
|
] })
|
|
4544
4582
|
] }),
|
|
4545
4583
|
v && /* @__PURE__ */ r("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: [
|
|
@@ -4547,7 +4585,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4547
4585
|
" ",
|
|
4548
4586
|
v
|
|
4549
4587
|
] }) }),
|
|
4550
|
-
|
|
4588
|
+
z <= 0 && /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ r("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
4551
4589
|
] }),
|
|
4552
4590
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4553
4591
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
@@ -4556,21 +4594,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4556
4594
|
{
|
|
4557
4595
|
type: "button",
|
|
4558
4596
|
onClick: N,
|
|
4559
|
-
disabled:
|
|
4597
|
+
disabled: z <= 0,
|
|
4560
4598
|
children: "Start Test"
|
|
4561
4599
|
}
|
|
4562
4600
|
)
|
|
4563
4601
|
] })
|
|
4564
4602
|
] });
|
|
4565
|
-
},
|
|
4603
|
+
}, Zr = ({
|
|
4566
4604
|
applicantId: e,
|
|
4567
4605
|
onComplete: t,
|
|
4568
4606
|
onBack: n
|
|
4569
4607
|
}) => {
|
|
4570
4608
|
var _e, He, Ue, je;
|
|
4571
|
-
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } =
|
|
4609
|
+
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } = ye(), { identityData: u, provider: h, token: m, isLoading: v, error: C, requestIdentity: f, restartIdentity: S } = Nr(e), [b, D] = k(null), [F, P] = k(null), [$, R] = k([]), [T, Y] = k([]), [X, I] = k(!0), [N, H] = k(!1), [W, w] = k(null), [z, L] = k(!1), O = be.useRef(!1), [G, E] = k({}), [U, te] = k({}), ge = c != null && c.reviewPageFields && c.reviewPageFields.length > 0 ? c.reviewPageFields[0] : null, se = !!(c != null && c.reviewPageDisabled), M = ee(!1);
|
|
4572
4610
|
M.current = se;
|
|
4573
|
-
const Z =
|
|
4611
|
+
const Z = Et({
|
|
4574
4612
|
defaultValues: {
|
|
4575
4613
|
street: "",
|
|
4576
4614
|
streetNumber: "",
|
|
@@ -4583,54 +4621,54 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4583
4621
|
});
|
|
4584
4622
|
ne(() => {
|
|
4585
4623
|
if (se) {
|
|
4586
|
-
O.current || (O.current = !0, f().then(() => H(!0)).catch((
|
|
4624
|
+
O.current || (O.current = !0, f().then(() => H(!0)).catch((y) => console.error("[Identity] Auto-request failed:", y)).finally(() => I(!1)));
|
|
4587
4625
|
return;
|
|
4588
4626
|
}
|
|
4589
4627
|
(async () => {
|
|
4590
4628
|
try {
|
|
4591
|
-
const [
|
|
4629
|
+
const [y, x, d] = await Promise.all([
|
|
4592
4630
|
a.getApplicantData(e),
|
|
4593
4631
|
s.getCountries("", "en"),
|
|
4594
4632
|
s.getCountries("", "en", 40)
|
|
4595
4633
|
// CountriesType.PhoneNumber
|
|
4596
4634
|
]);
|
|
4597
|
-
P(
|
|
4598
|
-
const p = /* @__PURE__ */ new Set(),
|
|
4599
|
-
R(
|
|
4600
|
-
const
|
|
4635
|
+
P(y);
|
|
4636
|
+
const p = /* @__PURE__ */ new Set(), A = x.map((q) => ({ value: q.abbreviation3 || q.abbreviation, label: q.name })).filter((q) => !q.value || p.has(q.value) ? !1 : (p.add(q.value), !0));
|
|
4637
|
+
R(A);
|
|
4638
|
+
const B = /* @__PURE__ */ new Set(), _ = d.filter((q) => q.countryCode).map((q) => ({ value: q.countryCode, label: `${q.countryCode} – ${q.name}` })).filter((q) => B.has(q.value) ? !1 : (B.add(q.value), !0));
|
|
4601
4639
|
Y(_);
|
|
4602
|
-
const
|
|
4603
|
-
if (
|
|
4604
|
-
firstName: (
|
|
4605
|
-
lastName: (
|
|
4606
|
-
email: (
|
|
4607
|
-
dateOfBirth: (
|
|
4608
|
-
title: (
|
|
4609
|
-
salutation: (
|
|
4610
|
-
phonenumber: (
|
|
4611
|
-
mobileCountryCode: (
|
|
4612
|
-
street: (
|
|
4613
|
-
streetNumber: (
|
|
4614
|
-
city: (
|
|
4615
|
-
zip: (
|
|
4616
|
-
country: (
|
|
4617
|
-
nationality: (
|
|
4618
|
-
taxCountry: (
|
|
4619
|
-
countryOfBirth: (
|
|
4620
|
-
placeOfBirth: (
|
|
4621
|
-
educationLevel: (
|
|
4622
|
-
occupation: (
|
|
4623
|
-
taxNumber: (
|
|
4624
|
-
defaultLanguage: (
|
|
4640
|
+
const g = y.applicantRequestData;
|
|
4641
|
+
if (E({
|
|
4642
|
+
firstName: (g == null ? void 0 : g.firstName) || "",
|
|
4643
|
+
lastName: (g == null ? void 0 : g.lastName) || "",
|
|
4644
|
+
email: (g == null ? void 0 : g.email) || "",
|
|
4645
|
+
dateOfBirth: (g == null ? void 0 : g.dateOfBirth) || "",
|
|
4646
|
+
title: (g == null ? void 0 : g.title) || "",
|
|
4647
|
+
salutation: (g == null ? void 0 : g.salutation) || "",
|
|
4648
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || "",
|
|
4649
|
+
mobileCountryCode: (g == null ? void 0 : g.mobileCountryCode) || "",
|
|
4650
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4651
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4652
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4653
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4654
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4655
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4656
|
+
taxCountry: (g == null ? void 0 : g.taxCountry) || "",
|
|
4657
|
+
countryOfBirth: (g == null ? void 0 : g.countryOfBirth) || "",
|
|
4658
|
+
placeOfBirth: (g == null ? void 0 : g.placeOfBirth) || "",
|
|
4659
|
+
educationLevel: (g == null ? void 0 : g.educationLevel) || "",
|
|
4660
|
+
occupation: (g == null ? void 0 : g.occupation) || "",
|
|
4661
|
+
taxNumber: (g == null ? void 0 : g.taxNumber) || "",
|
|
4662
|
+
defaultLanguage: (g == null ? void 0 : g.defaultLanguage) || ""
|
|
4625
4663
|
}), Z.reset({
|
|
4626
|
-
street: (
|
|
4627
|
-
streetNumber: (
|
|
4628
|
-
city: (
|
|
4629
|
-
zip: (
|
|
4630
|
-
country: (
|
|
4631
|
-
nationality: (
|
|
4632
|
-
phonenumber: (
|
|
4633
|
-
}),
|
|
4664
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4665
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4666
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4667
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4668
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4669
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4670
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || ""
|
|
4671
|
+
}), y.kycRecords && y.kycRecords.length > 0 && y.kycRecords[0].providerTokenObject !== null && !O.current && M.current) {
|
|
4634
4672
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), O.current = !0;
|
|
4635
4673
|
try {
|
|
4636
4674
|
await f(), H(!0);
|
|
@@ -4638,10 +4676,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4638
4676
|
console.error("[Identity] Auto-request failed:", q);
|
|
4639
4677
|
}
|
|
4640
4678
|
}
|
|
4641
|
-
} catch (
|
|
4642
|
-
console.error("Error loading applicant data:",
|
|
4679
|
+
} catch (y) {
|
|
4680
|
+
console.error("Error loading applicant data:", y);
|
|
4643
4681
|
} finally {
|
|
4644
|
-
|
|
4682
|
+
I(!1);
|
|
4645
4683
|
}
|
|
4646
4684
|
})();
|
|
4647
4685
|
}, [e]), ne(() => {
|
|
@@ -4657,8 +4695,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4657
4695
|
}
|
|
4658
4696
|
if (m.url)
|
|
4659
4697
|
try {
|
|
4660
|
-
const
|
|
4661
|
-
if (
|
|
4698
|
+
const y = new URL(m.url).toString().toLowerCase();
|
|
4699
|
+
if (y.includes("expired") || y.includes("invalid") || y.includes("error")) {
|
|
4662
4700
|
console.warn("[Identity] Token URL indicates expiration"), L(!0), w("Your verification link has expired. Please restart.");
|
|
4663
4701
|
return;
|
|
4664
4702
|
}
|
|
@@ -4671,7 +4709,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4671
4709
|
}
|
|
4672
4710
|
}
|
|
4673
4711
|
}, [m]), ne(() => {
|
|
4674
|
-
if (h !== null && m && !b && N && !
|
|
4712
|
+
if (h !== null && m && !b && N && !z) {
|
|
4675
4713
|
const i = h;
|
|
4676
4714
|
if (m.url) {
|
|
4677
4715
|
console.log("[Identity] Loading provider URL for user verification:", m.url), w(null);
|
|
@@ -4679,44 +4717,44 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4679
4717
|
if (new URL(m.url), i === ve.SardinAI) {
|
|
4680
4718
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4681
4719
|
try {
|
|
4682
|
-
const
|
|
4683
|
-
|
|
4720
|
+
const y = Be.parseProviderConfig(h, m, l);
|
|
4721
|
+
Be.createProvider(h, y).initialize().then(() => {
|
|
4684
4722
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4685
4723
|
}).catch((d) => {
|
|
4686
4724
|
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", d);
|
|
4687
4725
|
});
|
|
4688
|
-
} catch (
|
|
4689
|
-
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):",
|
|
4726
|
+
} catch (y) {
|
|
4727
|
+
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", y);
|
|
4690
4728
|
}
|
|
4691
4729
|
}
|
|
4692
4730
|
D({ type: "url", url: m.url });
|
|
4693
|
-
} catch (
|
|
4694
|
-
console.error("[Identity] Invalid URL:",
|
|
4731
|
+
} catch (y) {
|
|
4732
|
+
console.error("[Identity] Invalid URL:", y), w("Invalid verification URL. Please restart."), L(!0);
|
|
4695
4733
|
}
|
|
4696
4734
|
return;
|
|
4697
4735
|
}
|
|
4698
4736
|
if (i === ve.SardinAI) {
|
|
4699
4737
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), w(null);
|
|
4700
4738
|
try {
|
|
4701
|
-
const
|
|
4739
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4702
4740
|
x.initialize().then(() => {
|
|
4703
4741
|
console.log("[SardinAI] Risk SDK initialized successfully"), D(x), setTimeout(() => {
|
|
4704
4742
|
t == null || t();
|
|
4705
4743
|
}, 2e3);
|
|
4706
4744
|
}).catch((d) => {
|
|
4707
|
-
var
|
|
4745
|
+
var A;
|
|
4708
4746
|
console.error("[SardinAI] Failed to initialize:", d);
|
|
4709
|
-
const p = ((
|
|
4747
|
+
const p = ((A = d.message) == null ? void 0 : A.toLowerCase()) || "";
|
|
4710
4748
|
p.includes("expired") || p.includes("invalid") || p.includes("401") || p.includes("400") ? (L(!0), w("Session expired or invalid. Please restart verification.")) : w(`Failed to initialize: ${d.message}`);
|
|
4711
4749
|
});
|
|
4712
|
-
} catch (
|
|
4713
|
-
console.error("[SardinAI] Error creating provider:",
|
|
4750
|
+
} catch (y) {
|
|
4751
|
+
console.error("[SardinAI] Error creating provider:", y), w(`Configuration error: ${y.message}`);
|
|
4714
4752
|
}
|
|
4715
4753
|
return;
|
|
4716
4754
|
}
|
|
4717
4755
|
try {
|
|
4718
4756
|
w(null);
|
|
4719
|
-
const
|
|
4757
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4720
4758
|
i === ve.Sumsub ? (x.initialize("identity-container").catch((d) => {
|
|
4721
4759
|
var p;
|
|
4722
4760
|
console.error("[Sumsub] Initialization error:", d), w(`Failed to initialize: ${d.message}`), (p = d.message) != null && p.toLowerCase().includes("expired") && L(!0);
|
|
@@ -4725,8 +4763,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4725
4763
|
})) : i === ve.Onfido && x.initialize("identity-container").catch((d) => {
|
|
4726
4764
|
console.error("[Onfido] Initialization error:", d), w(`Failed to initialize: ${d.message}`);
|
|
4727
4765
|
}), D(x);
|
|
4728
|
-
} catch (
|
|
4729
|
-
console.error("[Identity] Provider setup error:",
|
|
4766
|
+
} catch (y) {
|
|
4767
|
+
console.error("[Identity] Provider setup error:", y), w(`Setup error: ${y.message}`);
|
|
4730
4768
|
}
|
|
4731
4769
|
}
|
|
4732
4770
|
return () => {
|
|
@@ -4737,14 +4775,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4737
4775
|
console.error("[Identity] Error destroying provider:", i);
|
|
4738
4776
|
}
|
|
4739
4777
|
};
|
|
4740
|
-
}, [h, m, b, N, t,
|
|
4778
|
+
}, [h, m, b, N, t, z]);
|
|
4741
4779
|
const ie = async () => {
|
|
4742
4780
|
try {
|
|
4743
4781
|
w(null), L(!1), await f(), H(!0);
|
|
4744
4782
|
} catch (i) {
|
|
4745
4783
|
console.error("Error starting identity verification:", i);
|
|
4746
4784
|
}
|
|
4747
|
-
},
|
|
4785
|
+
}, Ee = async () => {
|
|
4748
4786
|
try {
|
|
4749
4787
|
w(null), L(!1), D(null), console.log("[Identity] Restarting verification..."), await S(), H(!0);
|
|
4750
4788
|
} catch (i) {
|
|
@@ -4761,7 +4799,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4761
4799
|
"Error: ",
|
|
4762
4800
|
C.message
|
|
4763
4801
|
] }) }) });
|
|
4764
|
-
if (N && (W ||
|
|
4802
|
+
if (N && (W || z))
|
|
4765
4803
|
return /* @__PURE__ */ o(j, { children: [
|
|
4766
4804
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4767
4805
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -4785,7 +4823,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4785
4823
|
}
|
|
4786
4824
|
),
|
|
4787
4825
|
/* @__PURE__ */ o("div", { children: [
|
|
4788
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4826
|
+
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: z ? "Session Expired" : "Verification Error" }),
|
|
4789
4827
|
/* @__PURE__ */ r("p", { className: "text-red-800 dark:text-red-200 text-sm", children: W || "Your verification session has expired and needs to be restarted." })
|
|
4790
4828
|
] })
|
|
4791
4829
|
] }) }),
|
|
@@ -4800,7 +4838,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4800
4838
|
] }),
|
|
4801
4839
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4802
4840
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4803
|
-
/* @__PURE__ */ r(Q, { type: "button", onClick:
|
|
4841
|
+
/* @__PURE__ */ r(Q, { type: "button", onClick: Ee, disabled: v, children: v ? "Restarting..." : "Restart Verification" })
|
|
4804
4842
|
] })
|
|
4805
4843
|
] });
|
|
4806
4844
|
if (N && u) {
|
|
@@ -4817,7 +4855,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4817
4855
|
type: "button",
|
|
4818
4856
|
variant: "outline",
|
|
4819
4857
|
size: "sm",
|
|
4820
|
-
onClick:
|
|
4858
|
+
onClick: Ee,
|
|
4821
4859
|
disabled: v,
|
|
4822
4860
|
children: "Restart"
|
|
4823
4861
|
}
|
|
@@ -4835,13 +4873,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4835
4873
|
className: "w-full h-full border-0 rounded-lg",
|
|
4836
4874
|
allow: "camera; microphone; geolocation",
|
|
4837
4875
|
title: "Identity Verification",
|
|
4838
|
-
onLoad: (
|
|
4876
|
+
onLoad: (y) => {
|
|
4839
4877
|
var x, d, p;
|
|
4840
4878
|
console.log("[Identity] Iframe loaded");
|
|
4841
4879
|
try {
|
|
4842
|
-
const
|
|
4843
|
-
if (
|
|
4844
|
-
const _ = ((p = (d =
|
|
4880
|
+
const A = y.target, B = A.contentDocument || ((x = A.contentWindow) == null ? void 0 : x.document);
|
|
4881
|
+
if (B) {
|
|
4882
|
+
const _ = ((p = (d = B.body) == null ? void 0 : d.textContent) == null ? void 0 : p.toLowerCase()) || "";
|
|
4845
4883
|
(_.includes("expired") || _.includes("invalid") || _.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), L(!0), w("Your verification link has expired."));
|
|
4846
4884
|
}
|
|
4847
4885
|
} catch {
|
|
@@ -4871,15 +4909,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4871
4909
|
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(Q, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4872
4910
|
] });
|
|
4873
4911
|
}
|
|
4874
|
-
const Pe = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), pe = (i = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[i] || "col-span-4", Oe = (i,
|
|
4875
|
-
if (!
|
|
4912
|
+
const Pe = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), pe = (i = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[i] || "col-span-4", Oe = (i, y) => {
|
|
4913
|
+
if (!y && y !== 0) return "—";
|
|
4876
4914
|
if (Pe.has(i) && i !== "mobileCountryCode") {
|
|
4877
|
-
const x = $.find((d) => d.value ===
|
|
4878
|
-
return x ? x.label : String(
|
|
4915
|
+
const x = $.find((d) => d.value === y);
|
|
4916
|
+
return x ? x.label : String(y);
|
|
4879
4917
|
}
|
|
4880
|
-
return String(
|
|
4918
|
+
return String(y);
|
|
4881
4919
|
}, Xe = ({ helpText: i }) => {
|
|
4882
|
-
const [
|
|
4920
|
+
const [y, x] = k(!1), d = ee(null), [, p] = k({ top: 0, left: 0 });
|
|
4883
4921
|
return /* @__PURE__ */ o(Qe, { children: [
|
|
4884
4922
|
/* @__PURE__ */ r(
|
|
4885
4923
|
"button",
|
|
@@ -4888,8 +4926,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4888
4926
|
ref: d,
|
|
4889
4927
|
onClick: () => {
|
|
4890
4928
|
if (d.current) {
|
|
4891
|
-
const
|
|
4892
|
-
p({ top:
|
|
4929
|
+
const B = d.current.getBoundingClientRect();
|
|
4930
|
+
p({ top: B.bottom + window.scrollY + 6, left: B.left + window.scrollX });
|
|
4893
4931
|
}
|
|
4894
4932
|
x(!0);
|
|
4895
4933
|
},
|
|
@@ -4912,7 +4950,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4912
4950
|
children: "?"
|
|
4913
4951
|
}
|
|
4914
4952
|
),
|
|
4915
|
-
|
|
4953
|
+
y && Ct.createPortal(
|
|
4916
4954
|
/* @__PURE__ */ r(
|
|
4917
4955
|
"div",
|
|
4918
4956
|
{
|
|
@@ -4929,7 +4967,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4929
4967
|
children: /* @__PURE__ */ o(
|
|
4930
4968
|
"div",
|
|
4931
4969
|
{
|
|
4932
|
-
onClick: (
|
|
4970
|
+
onClick: (B) => B.stopPropagation(),
|
|
4933
4971
|
style: {
|
|
4934
4972
|
background: "var(--metakyc-surface, #fff)",
|
|
4935
4973
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -4967,11 +5005,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4967
5005
|
document.body
|
|
4968
5006
|
)
|
|
4969
5007
|
] });
|
|
4970
|
-
}, xe = (i,
|
|
5008
|
+
}, xe = (i, y) => y ? /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
|
|
4971
5009
|
/* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: i }),
|
|
4972
|
-
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText:
|
|
4973
|
-
] }) : i, et = (i,
|
|
4974
|
-
const x = `cf-${
|
|
5010
|
+
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText: y }) })
|
|
5011
|
+
] }) : i, et = (i, y) => {
|
|
5012
|
+
const x = `cf-${y}`, d = i.paramName ?? "", p = U[d];
|
|
4975
5013
|
if (i.customType === "br")
|
|
4976
5014
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), style: { minHeight: "0.5rem" } }, x);
|
|
4977
5015
|
if (i.customType === "paragraph")
|
|
@@ -5008,15 +5046,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5008
5046
|
i.helpText
|
|
5009
5047
|
) }, x);
|
|
5010
5048
|
if (i.customType === "checkbox" || i.customType === "link_checkbox") {
|
|
5011
|
-
const
|
|
5049
|
+
const A = p === "true" || p === !0;
|
|
5012
5050
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5013
5051
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5014
5052
|
/* @__PURE__ */ r(
|
|
5015
5053
|
"input",
|
|
5016
5054
|
{
|
|
5017
5055
|
type: "checkbox",
|
|
5018
|
-
checked: !!
|
|
5019
|
-
onChange: (
|
|
5056
|
+
checked: !!A,
|
|
5057
|
+
onChange: (B) => te((_) => ({ ..._, [d]: String(B.target.checked) })),
|
|
5020
5058
|
style: {
|
|
5021
5059
|
width: 16,
|
|
5022
5060
|
height: 16,
|
|
@@ -5035,10 +5073,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5035
5073
|
) }, x);
|
|
5036
5074
|
}
|
|
5037
5075
|
if (i.customType === "group_checkbox") {
|
|
5038
|
-
const
|
|
5039
|
-
i.singleSelect ? te((
|
|
5040
|
-
...
|
|
5041
|
-
[d]:
|
|
5076
|
+
const A = Array.isArray(p) ? p : p ? [p] : [], B = (_) => {
|
|
5077
|
+
i.singleSelect ? te((g) => ({ ...g, [d]: A[0] === _ ? [] : [_] })) : te((g) => ({
|
|
5078
|
+
...g,
|
|
5079
|
+
[d]: A.includes(_) ? A.filter((ae) => ae !== _) : [...A, _]
|
|
5042
5080
|
}));
|
|
5043
5081
|
};
|
|
5044
5082
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5049,8 +5087,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5049
5087
|
"input",
|
|
5050
5088
|
{
|
|
5051
5089
|
type: "checkbox",
|
|
5052
|
-
checked:
|
|
5053
|
-
onChange: () =>
|
|
5090
|
+
checked: A.includes(_.value),
|
|
5091
|
+
onChange: () => B(_.value),
|
|
5054
5092
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5055
5093
|
}
|
|
5056
5094
|
),
|
|
@@ -5063,20 +5101,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5063
5101
|
return i.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5064
5102
|
/* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
5065
5103
|
i.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i.displayText || i.label }),
|
|
5066
|
-
(i.options || []).map((
|
|
5104
|
+
(i.options || []).map((A) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5067
5105
|
/* @__PURE__ */ r(
|
|
5068
5106
|
"input",
|
|
5069
5107
|
{
|
|
5070
5108
|
type: "radio",
|
|
5071
5109
|
name: `rg-${d}`,
|
|
5072
|
-
value:
|
|
5073
|
-
checked: p ===
|
|
5074
|
-
onChange: () => te((
|
|
5110
|
+
value: A.value,
|
|
5111
|
+
checked: p === A.value,
|
|
5112
|
+
onChange: () => te((B) => ({ ...B, [d]: A.value })),
|
|
5075
5113
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5076
5114
|
}
|
|
5077
5115
|
),
|
|
5078
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5079
|
-
] },
|
|
5116
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: A.label })
|
|
5117
|
+
] }, A.value))
|
|
5080
5118
|
] }),
|
|
5081
5119
|
i.helpText
|
|
5082
5120
|
) }, x) : /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5085,65 +5123,65 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5085
5123
|
{
|
|
5086
5124
|
label: i.displayText || i.label || d,
|
|
5087
5125
|
value: String(p ?? ""),
|
|
5088
|
-
onChange: (
|
|
5126
|
+
onChange: (A) => te((B) => ({ ...B, [d]: A.target.value }))
|
|
5089
5127
|
}
|
|
5090
5128
|
),
|
|
5091
5129
|
i.helpText
|
|
5092
5130
|
) }, x);
|
|
5093
|
-
}, tt = (i,
|
|
5094
|
-
if (i.isCustom) return et(i,
|
|
5095
|
-
const x = i.name ?? "", d = Me[x], p = i.displayText || (d == null ? void 0 : d.label) || x,
|
|
5096
|
-
return i.editable ?
|
|
5131
|
+
}, tt = (i, y) => {
|
|
5132
|
+
if (i.isCustom) return et(i, y);
|
|
5133
|
+
const x = i.name ?? "", d = Me[x], p = i.displayText || (d == null ? void 0 : d.label) || x, A = G[x] ?? "", B = x === "mobileCountryCode", _ = !!(d != null && d.countriesType) && !B;
|
|
5134
|
+
return i.editable ? B ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5097
5135
|
/* @__PURE__ */ r(
|
|
5098
5136
|
Re,
|
|
5099
5137
|
{
|
|
5100
5138
|
label: p,
|
|
5101
|
-
value: String(
|
|
5102
|
-
onChange: (
|
|
5139
|
+
value: String(A),
|
|
5140
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5103
5141
|
options: [{ value: "", label: "Select country code…" }, ...T]
|
|
5104
5142
|
}
|
|
5105
5143
|
),
|
|
5106
5144
|
i.helpText
|
|
5107
|
-
) }, `epc-${
|
|
5145
|
+
) }, `epc-${y}`) : _ ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5108
5146
|
/* @__PURE__ */ r(
|
|
5109
5147
|
Re,
|
|
5110
5148
|
{
|
|
5111
5149
|
label: p,
|
|
5112
|
-
value: String(
|
|
5113
|
-
onChange: (
|
|
5150
|
+
value: String(A),
|
|
5151
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5114
5152
|
options: [{ value: "", label: `Select ${p.toLowerCase()}…` }, ...$]
|
|
5115
5153
|
}
|
|
5116
5154
|
),
|
|
5117
5155
|
i.helpText
|
|
5118
|
-
) }, `ec-${
|
|
5156
|
+
) }, `ec-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5119
5157
|
/* @__PURE__ */ r(
|
|
5120
5158
|
de,
|
|
5121
5159
|
{
|
|
5122
5160
|
label: p,
|
|
5123
5161
|
type: (d == null ? void 0 : d.type) === "date" ? "date" : (d == null ? void 0 : d.type) === "email" ? "email" : "text",
|
|
5124
|
-
value: String(
|
|
5125
|
-
onChange: (
|
|
5162
|
+
value: String(A),
|
|
5163
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g.target.value }))
|
|
5126
5164
|
}
|
|
5127
5165
|
),
|
|
5128
5166
|
i.helpText
|
|
5129
|
-
) }, `ei-${
|
|
5167
|
+
) }, `ei-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5130
5168
|
/* @__PURE__ */ o(Qe, { children: [
|
|
5131
5169
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p }),
|
|
5132
|
-
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(x,
|
|
5170
|
+
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(x, A) })
|
|
5133
5171
|
] }),
|
|
5134
5172
|
i.helpText
|
|
5135
|
-
) }, `ro-${
|
|
5173
|
+
) }, `ro-${y}`);
|
|
5136
5174
|
};
|
|
5137
|
-
if (
|
|
5138
|
-
const i =
|
|
5175
|
+
if (ge) {
|
|
5176
|
+
const i = ge.title || "Review Your Information", y = ge.subtitle || "Please review and confirm your information before starting identity verification";
|
|
5139
5177
|
return /* @__PURE__ */ r("form", { onSubmit: (x) => {
|
|
5140
5178
|
x.preventDefault(), ie();
|
|
5141
5179
|
}, children: /* @__PURE__ */ o(j, { children: [
|
|
5142
5180
|
/* @__PURE__ */ o(ue, { children: [
|
|
5143
5181
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i }),
|
|
5144
|
-
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children:
|
|
5182
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: y })
|
|
5145
5183
|
] }),
|
|
5146
|
-
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children:
|
|
5184
|
+
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: ge.fields.map((x, d) => tt(x, d)) }) }),
|
|
5147
5185
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
5148
5186
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
5149
5187
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: v, children: "Confirm and Start Verification" })
|
|
@@ -5160,9 +5198,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5160
5198
|
{ label: "Name", value: `${((_e = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : _e.firstName) || ""} ${((He = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : He.lastName) || ""}`.trim() },
|
|
5161
5199
|
{ label: "Email", value: (Ue = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : Ue.email },
|
|
5162
5200
|
{ label: "Date of Birth", value: ((je = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : je.dateOfBirth) || "Not provided" }
|
|
5163
|
-
].map(({ label: i, value:
|
|
5201
|
+
].map(({ label: i, value: y }) => /* @__PURE__ */ o("div", { children: [
|
|
5164
5202
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: i }),
|
|
5165
|
-
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5203
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: y })
|
|
5166
5204
|
] }, i)) }),
|
|
5167
5205
|
/* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
5168
5206
|
/* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
|
|
@@ -5306,7 +5344,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5306
5344
|
) }),
|
|
5307
5345
|
/* @__PURE__ */ r("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: u.title }),
|
|
5308
5346
|
/* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
|
|
5309
|
-
|
|
5347
|
+
Ae,
|
|
5310
5348
|
{
|
|
5311
5349
|
variant: u.type === "success" ? "success" : u.type === "error" ? "danger" : u.type === "pending" ? "warning" : "info",
|
|
5312
5350
|
children: e != null ? Le[e] : De[t]
|
|
@@ -5358,7 +5396,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5358
5396
|
u.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
5359
5397
|
] })
|
|
5360
5398
|
] });
|
|
5361
|
-
},
|
|
5399
|
+
}, Xr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
|
|
5362
5400
|
"img",
|
|
5363
5401
|
{
|
|
5364
5402
|
src: e.url,
|
|
@@ -5378,10 +5416,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5378
5416
|
subtitle: t,
|
|
5379
5417
|
className: n = ""
|
|
5380
5418
|
}) => {
|
|
5381
|
-
const { currentTheme: a } =
|
|
5419
|
+
const { currentTheme: a } = ye(), s = e || (a == null ? void 0 : a.title) || "", l = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!s;
|
|
5382
5420
|
return !l && !c ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${n}`, children: [
|
|
5383
5421
|
/* @__PURE__ */ o("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
|
|
5384
|
-
l && /* @__PURE__ */ r(
|
|
5422
|
+
l && /* @__PURE__ */ r(Xr, { config: a.logo }),
|
|
5385
5423
|
l && c && /* @__PURE__ */ r(
|
|
5386
5424
|
"span",
|
|
5387
5425
|
{
|
|
@@ -5525,41 +5563,41 @@ const qe = {
|
|
|
5525
5563
|
),
|
|
5526
5564
|
typeof document < "u" && s ? it(s, document.body) : null
|
|
5527
5565
|
] });
|
|
5528
|
-
},
|
|
5566
|
+
}, xn = ({
|
|
5529
5567
|
workflowKey: e,
|
|
5530
5568
|
externalRefId: t,
|
|
5531
5569
|
onSuccess: n,
|
|
5532
5570
|
onCancel: a
|
|
5533
5571
|
}) => {
|
|
5534
5572
|
var _e, He, Ue, je;
|
|
5535
|
-
const { config: s, baseInformationService: l, currentTheme: c } =
|
|
5573
|
+
const { config: s, baseInformationService: l, currentTheme: c } = ye(), { createApplicant: u, isLoading: h } = Cr(), m = e || ((_e = s.applicantForm) == null ? void 0 : _e.workflowKey);
|
|
5536
5574
|
if (!m)
|
|
5537
5575
|
throw new Error(
|
|
5538
5576
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
5539
5577
|
);
|
|
5540
|
-
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f =
|
|
5578
|
+
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f = Ie(
|
|
5541
5579
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
5542
5580
|
[c == null ? void 0 : c.applicantFormPages]
|
|
5543
|
-
), S =
|
|
5544
|
-
const i = new Set(Ve),
|
|
5545
|
-
if (
|
|
5581
|
+
), S = Ie(() => {
|
|
5582
|
+
const i = new Set(Ve), y = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
5583
|
+
if (y) for (const x of y) i.add(x);
|
|
5546
5584
|
if (f)
|
|
5547
5585
|
for (const x of f)
|
|
5548
5586
|
for (const d of x.fields)
|
|
5549
5587
|
!d.isCustom && d.name && d.required && i.add(d.name);
|
|
5550
5588
|
return Array.from(i);
|
|
5551
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b =
|
|
5589
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b = Ie(() => {
|
|
5552
5590
|
var x;
|
|
5553
5591
|
if (f) {
|
|
5554
|
-
const d = f.flatMap((
|
|
5555
|
-
for (const
|
|
5592
|
+
const d = f.flatMap((A) => A.fields).filter((A) => !A.isCustom && A.name).map((A) => A.name), p = new Set(d);
|
|
5593
|
+
for (const A of Ve) p.add(A);
|
|
5556
5594
|
return Array.from(p);
|
|
5557
5595
|
}
|
|
5558
5596
|
let i;
|
|
5559
|
-
(x = s.applicantForm) != null && x.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i =
|
|
5560
|
-
const
|
|
5561
|
-
for (const d of Ve)
|
|
5562
|
-
return Array.from(
|
|
5597
|
+
(x = s.applicantForm) != null && x.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i = Bt;
|
|
5598
|
+
const y = new Set(i);
|
|
5599
|
+
for (const d of Ve) y.add(d);
|
|
5600
|
+
return Array.from(y);
|
|
5563
5601
|
}, [(je = s.applicantForm) == null ? void 0 : je.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, f]), D = /* @__PURE__ */ new Set([
|
|
5564
5602
|
"country",
|
|
5565
5603
|
"nationality",
|
|
@@ -5567,13 +5605,13 @@ const qe = {
|
|
|
5567
5605
|
"countryOfBirth",
|
|
5568
5606
|
"mobileCountryCode",
|
|
5569
5607
|
"otherNationality"
|
|
5570
|
-
]), F =
|
|
5571
|
-
var
|
|
5608
|
+
]), F = Ie(() => {
|
|
5609
|
+
var y, x;
|
|
5572
5610
|
const i = /* @__PURE__ */ new Set();
|
|
5573
5611
|
if (f)
|
|
5574
5612
|
for (const d of f)
|
|
5575
5613
|
for (const p of d.fields)
|
|
5576
|
-
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((
|
|
5614
|
+
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((y = Me[p.name]) == null ? void 0 : y.countriesType));
|
|
5577
5615
|
else
|
|
5578
5616
|
for (const d of b)
|
|
5579
5617
|
D.has(d) && i.add((x = Me[d]) == null ? void 0 : x.countriesType);
|
|
@@ -5587,38 +5625,38 @@ const qe = {
|
|
|
5587
5625
|
});
|
|
5588
5626
|
if (i.length === 0) {
|
|
5589
5627
|
F.every((p) => {
|
|
5590
|
-
const
|
|
5591
|
-
return X.current.has(
|
|
5628
|
+
const A = p != null ? String(p) : "all";
|
|
5629
|
+
return X.current.has(A);
|
|
5592
5630
|
}) && T(!1);
|
|
5593
5631
|
return;
|
|
5594
5632
|
}
|
|
5595
5633
|
T(!0);
|
|
5596
|
-
const
|
|
5597
|
-
|
|
5634
|
+
const y = i.map((d) => d != null ? String(d) : "all");
|
|
5635
|
+
y.forEach((d) => Y.current.add(d)), (async () => {
|
|
5598
5636
|
try {
|
|
5599
5637
|
const d = await Promise.all(
|
|
5600
5638
|
i.map(async (p) => {
|
|
5601
|
-
const
|
|
5639
|
+
const A = p != null ? String(p) : "all", B = await l.getCountries("", s.locale || "en", p), _ = p === 40, g = /* @__PURE__ */ new Set(), ae = B.map((q) => _ && q.countryCode ? {
|
|
5602
5640
|
value: q.countryCode,
|
|
5603
5641
|
label: `${q.countryCode} – ${q.name}`
|
|
5604
|
-
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value ||
|
|
5605
|
-
return X.current.add(
|
|
5642
|
+
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value || g.has(q.value) ? !1 : (g.add(q.value), !0));
|
|
5643
|
+
return X.current.add(A), Y.current.delete(A), [A, ae];
|
|
5606
5644
|
})
|
|
5607
5645
|
);
|
|
5608
5646
|
$((p) => ({ ...p, ...Object.fromEntries(d) }));
|
|
5609
5647
|
} catch (d) {
|
|
5610
|
-
|
|
5648
|
+
y.forEach((p) => Y.current.delete(p)), console.error("Failed to load countries:", d);
|
|
5611
5649
|
} finally {
|
|
5612
5650
|
F.every((p) => {
|
|
5613
|
-
const
|
|
5614
|
-
return X.current.has(
|
|
5651
|
+
const A = p != null ? String(p) : "all";
|
|
5652
|
+
return X.current.has(A);
|
|
5615
5653
|
}) && T(!1);
|
|
5616
5654
|
}
|
|
5617
5655
|
})();
|
|
5618
5656
|
}, [F, c]);
|
|
5619
|
-
const
|
|
5657
|
+
const I = (i, y) => {
|
|
5620
5658
|
var p;
|
|
5621
|
-
const x =
|
|
5659
|
+
const x = y ?? ((p = Me[i]) == null ? void 0 : p.countriesType), d = x != null ? String(x) : "all";
|
|
5622
5660
|
return P[d] || [];
|
|
5623
5661
|
}, [N, H] = k({
|
|
5624
5662
|
workflowKey: m,
|
|
@@ -5645,48 +5683,48 @@ const qe = {
|
|
|
5645
5683
|
educationLevel: "",
|
|
5646
5684
|
occupation: "",
|
|
5647
5685
|
taxNumber: ""
|
|
5648
|
-
}), [W, w] = k({}), [
|
|
5686
|
+
}), [W, w] = k({}), [z, L] = k(0), [O, G] = k({}), [E, U] = k(null), [te, ge] = k(!1), se = (i, y) => H((x) => ({ ...x, [i]: y })), M = (i, y) => w((x) => ({ ...x, [i]: y })), Z = (i) => !i.conditionalOn || W[i.conditionalOn] === "true", ie = f && z < f.length - 1 ? z + 1 : -1, Ee = f && z > 0 ? z - 1 : -1, Pe = (i) => {
|
|
5649
5687
|
var x;
|
|
5650
|
-
const
|
|
5688
|
+
const y = {};
|
|
5651
5689
|
for (const d of i.fields)
|
|
5652
5690
|
if (d.isCustom) {
|
|
5653
5691
|
if (d.customType === "paragraph" || d.customType === "html" || d.customType === "br" || d.customType === "link") continue;
|
|
5654
5692
|
if (d.required && d.paramName) {
|
|
5655
|
-
const p = W[d.paramName],
|
|
5656
|
-
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (
|
|
5693
|
+
const p = W[d.paramName], A = d.displayText || d.label || d.paramName;
|
|
5694
|
+
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (y[d.paramName] = `${A} is required.`) : (!p || p.trim() === "") && (y[d.paramName] = `${A} is required.`);
|
|
5657
5695
|
}
|
|
5658
5696
|
} else if (d.name) {
|
|
5659
5697
|
const p = d.name;
|
|
5660
5698
|
if (S.includes(p) && Ye(N[p])) {
|
|
5661
|
-
const
|
|
5662
|
-
|
|
5699
|
+
const A = d.displayText || ((x = Me[p]) == null ? void 0 : x.label) || p;
|
|
5700
|
+
y[p] = `${A} is required.`;
|
|
5663
5701
|
}
|
|
5664
5702
|
}
|
|
5665
|
-
return
|
|
5703
|
+
return y;
|
|
5666
5704
|
}, pe = async () => {
|
|
5667
5705
|
if (!f) return;
|
|
5668
|
-
const i = f[
|
|
5706
|
+
const i = f[z];
|
|
5669
5707
|
if (i.conditionalOn && !Z(i)) {
|
|
5670
5708
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5671
5709
|
return;
|
|
5672
5710
|
}
|
|
5673
|
-
const
|
|
5674
|
-
if (Object.keys(
|
|
5675
|
-
G(
|
|
5711
|
+
const y = Pe(i);
|
|
5712
|
+
if (Object.keys(y).length > 0) {
|
|
5713
|
+
G(y);
|
|
5676
5714
|
return;
|
|
5677
5715
|
}
|
|
5678
5716
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5679
5717
|
}, Oe = async () => {
|
|
5680
5718
|
if (f) {
|
|
5681
5719
|
let i = {};
|
|
5682
|
-
for (const
|
|
5683
|
-
Z(
|
|
5720
|
+
for (const y of f)
|
|
5721
|
+
Z(y) && (i = { ...i, ...Pe(y) });
|
|
5684
5722
|
if (Object.keys(i).length > 0) {
|
|
5685
5723
|
G(i);
|
|
5686
5724
|
return;
|
|
5687
5725
|
}
|
|
5688
5726
|
}
|
|
5689
|
-
|
|
5727
|
+
ge(!0), U(null);
|
|
5690
5728
|
try {
|
|
5691
5729
|
if (!N.externalRefId || N.externalRefId.trim() === "") {
|
|
5692
5730
|
U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
@@ -5701,8 +5739,8 @@ const qe = {
|
|
|
5701
5739
|
if (Z(d)) {
|
|
5702
5740
|
for (const p of d.fields)
|
|
5703
5741
|
if (!p.isCustom && p.name) {
|
|
5704
|
-
const
|
|
5705
|
-
Ye(
|
|
5742
|
+
const A = p.name, B = N[A];
|
|
5743
|
+
Ye(B) || (i[A] = B);
|
|
5706
5744
|
}
|
|
5707
5745
|
}
|
|
5708
5746
|
for (const d of Ve)
|
|
@@ -5716,47 +5754,47 @@ const qe = {
|
|
|
5716
5754
|
const p = N[d];
|
|
5717
5755
|
Ye(p) || (i[d] = p);
|
|
5718
5756
|
});
|
|
5719
|
-
const
|
|
5757
|
+
const y = [];
|
|
5720
5758
|
if (f) {
|
|
5721
5759
|
for (const d of f)
|
|
5722
5760
|
if (Z(d))
|
|
5723
5761
|
for (const p of d.fields) {
|
|
5724
5762
|
if (!p.isCustom || !p.paramName || p.customType === "paragraph" || p.customType === "html" || p.customType === "br" || p.customType === "link") continue;
|
|
5725
|
-
const
|
|
5726
|
-
let
|
|
5763
|
+
const A = W[p.paramName] ?? "";
|
|
5764
|
+
let B;
|
|
5727
5765
|
if (p.customType === "checkbox" || p.customType === "link_checkbox")
|
|
5728
|
-
|
|
5729
|
-
else if (
|
|
5730
|
-
|
|
5766
|
+
B = A === "true" ? "yes" : "no";
|
|
5767
|
+
else if (B = A, !B && !p.required) continue;
|
|
5768
|
+
y.push({ paramName: p.paramName, value: B });
|
|
5731
5769
|
}
|
|
5732
5770
|
}
|
|
5733
|
-
|
|
5771
|
+
y.length > 0 && (i.applicantAdditionalDatas = y);
|
|
5734
5772
|
const x = await u(i);
|
|
5735
5773
|
n(x.applicantId);
|
|
5736
5774
|
} catch (i) {
|
|
5737
5775
|
console.error("Error creating applicant:", i), U(i.message || "Failed to create applicant");
|
|
5738
5776
|
} finally {
|
|
5739
|
-
|
|
5777
|
+
ge(!1);
|
|
5740
5778
|
}
|
|
5741
5779
|
}, Xe = async (i) => {
|
|
5742
|
-
var
|
|
5780
|
+
var y;
|
|
5743
5781
|
i.preventDefault();
|
|
5744
5782
|
for (const x of S)
|
|
5745
5783
|
if (Ye(N[x])) {
|
|
5746
|
-
const d = ((
|
|
5784
|
+
const d = ((y = Me[x]) == null ? void 0 : y.label) || x;
|
|
5747
5785
|
U(`${d} is required.`);
|
|
5748
5786
|
return;
|
|
5749
5787
|
}
|
|
5750
5788
|
await Oe();
|
|
5751
|
-
}, xe = (i,
|
|
5789
|
+
}, xe = (i, y, x, d) => {
|
|
5752
5790
|
var q;
|
|
5753
5791
|
const p = Me[i];
|
|
5754
5792
|
if (!p) return null;
|
|
5755
|
-
const
|
|
5793
|
+
const A = S.includes(i), B = O[i], _ = x || p.label, g = y ?? i, ae = { required: A };
|
|
5756
5794
|
switch (p.type) {
|
|
5757
5795
|
case "select":
|
|
5758
5796
|
if (i === "country" || i === "nationality" || i === "taxCountry" || i === "countryOfBirth" || i === "mobileCountryCode") {
|
|
5759
|
-
const le =
|
|
5797
|
+
const le = I(i, d);
|
|
5760
5798
|
return /* @__PURE__ */ r(
|
|
5761
5799
|
Re,
|
|
5762
5800
|
{
|
|
@@ -5766,9 +5804,9 @@ const qe = {
|
|
|
5766
5804
|
onChange: (Fe) => se(i, Fe),
|
|
5767
5805
|
options: [{ value: "", label: `Select ${_.toLowerCase()}...` }, ...le],
|
|
5768
5806
|
disabled: R,
|
|
5769
|
-
error:
|
|
5807
|
+
error: B
|
|
5770
5808
|
},
|
|
5771
|
-
|
|
5809
|
+
g
|
|
5772
5810
|
);
|
|
5773
5811
|
}
|
|
5774
5812
|
if (i === "salutation")
|
|
@@ -5785,9 +5823,9 @@ const qe = {
|
|
|
5785
5823
|
{ value: Ze.Female.toString(), label: "Female" },
|
|
5786
5824
|
{ value: Ze.Other.toString(), label: "Other" }
|
|
5787
5825
|
],
|
|
5788
|
-
error:
|
|
5826
|
+
error: B
|
|
5789
5827
|
},
|
|
5790
|
-
|
|
5828
|
+
g
|
|
5791
5829
|
);
|
|
5792
5830
|
if (i === "defaultLanguage") {
|
|
5793
5831
|
const le = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? lt.filter((Fe) => c.allowedLanguages.includes(Fe.value)) : lt;
|
|
@@ -5799,17 +5837,17 @@ const qe = {
|
|
|
5799
5837
|
value: N[i] || "",
|
|
5800
5838
|
onChange: (Fe) => se(i, Fe),
|
|
5801
5839
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5802
|
-
error:
|
|
5840
|
+
error: B
|
|
5803
5841
|
},
|
|
5804
|
-
|
|
5842
|
+
g
|
|
5805
5843
|
);
|
|
5806
5844
|
}
|
|
5807
5845
|
return null;
|
|
5808
5846
|
case "multiselect":
|
|
5809
5847
|
if (i === "otherNationality") {
|
|
5810
|
-
const le =
|
|
5848
|
+
const le = I(i, d);
|
|
5811
5849
|
return /* @__PURE__ */ r(
|
|
5812
|
-
|
|
5850
|
+
Er,
|
|
5813
5851
|
{
|
|
5814
5852
|
...ae,
|
|
5815
5853
|
label: _,
|
|
@@ -5819,7 +5857,7 @@ const qe = {
|
|
|
5819
5857
|
placeholder: "Select other nationalities...",
|
|
5820
5858
|
disabled: R
|
|
5821
5859
|
},
|
|
5822
|
-
|
|
5860
|
+
g
|
|
5823
5861
|
);
|
|
5824
5862
|
}
|
|
5825
5863
|
return null;
|
|
@@ -5832,9 +5870,9 @@ const qe = {
|
|
|
5832
5870
|
label: _,
|
|
5833
5871
|
value: N[i] || "",
|
|
5834
5872
|
onChange: (le) => se(i, le.target.value),
|
|
5835
|
-
error:
|
|
5873
|
+
error: B
|
|
5836
5874
|
},
|
|
5837
|
-
|
|
5875
|
+
g
|
|
5838
5876
|
);
|
|
5839
5877
|
case "email":
|
|
5840
5878
|
return /* @__PURE__ */ r(
|
|
@@ -5845,9 +5883,9 @@ const qe = {
|
|
|
5845
5883
|
label: _,
|
|
5846
5884
|
value: N[i] || "",
|
|
5847
5885
|
onChange: (le) => se(i, le.target.value),
|
|
5848
|
-
error:
|
|
5886
|
+
error: B
|
|
5849
5887
|
},
|
|
5850
|
-
|
|
5888
|
+
g
|
|
5851
5889
|
);
|
|
5852
5890
|
case "tel":
|
|
5853
5891
|
return /* @__PURE__ */ r(
|
|
@@ -5858,9 +5896,9 @@ const qe = {
|
|
|
5858
5896
|
label: _,
|
|
5859
5897
|
value: N[i] || "",
|
|
5860
5898
|
onChange: (le) => se(i, le.target.value),
|
|
5861
|
-
error:
|
|
5899
|
+
error: B
|
|
5862
5900
|
},
|
|
5863
|
-
|
|
5901
|
+
g
|
|
5864
5902
|
);
|
|
5865
5903
|
default:
|
|
5866
5904
|
return /* @__PURE__ */ r(
|
|
@@ -5871,12 +5909,12 @@ const qe = {
|
|
|
5871
5909
|
label: _,
|
|
5872
5910
|
value: N[i] || "",
|
|
5873
5911
|
onChange: (le) => se(i, le.target.value),
|
|
5874
|
-
error:
|
|
5912
|
+
error: B
|
|
5875
5913
|
},
|
|
5876
|
-
|
|
5914
|
+
g
|
|
5877
5915
|
);
|
|
5878
5916
|
}
|
|
5879
|
-
}, et = (i,
|
|
5917
|
+
}, et = (i, y) => {
|
|
5880
5918
|
if (i.customType === "paragraph") {
|
|
5881
5919
|
const p = i.displayText || i.label || "";
|
|
5882
5920
|
return /* @__PURE__ */ r(
|
|
@@ -5891,7 +5929,7 @@ const qe = {
|
|
|
5891
5929
|
},
|
|
5892
5930
|
dangerouslySetInnerHTML: { __html: p }
|
|
5893
5931
|
},
|
|
5894
|
-
`custom-${
|
|
5932
|
+
`custom-${y}`
|
|
5895
5933
|
);
|
|
5896
5934
|
}
|
|
5897
5935
|
if (i.customType === "html")
|
|
@@ -5900,10 +5938,10 @@ const qe = {
|
|
|
5900
5938
|
{
|
|
5901
5939
|
dangerouslySetInnerHTML: { __html: i.label || "" }
|
|
5902
5940
|
},
|
|
5903
|
-
`custom-${
|
|
5941
|
+
`custom-${y}`
|
|
5904
5942
|
);
|
|
5905
5943
|
if (i.customType === "br")
|
|
5906
|
-
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${
|
|
5944
|
+
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${y}`);
|
|
5907
5945
|
if (i.customType === "link") {
|
|
5908
5946
|
const p = i.displayText || i.label || i.linkText || i.linkUrl || "";
|
|
5909
5947
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ o(
|
|
@@ -5926,7 +5964,7 @@ const qe = {
|
|
|
5926
5964
|
/* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
5927
5965
|
]
|
|
5928
5966
|
}
|
|
5929
|
-
) }, `custom-${
|
|
5967
|
+
) }, `custom-${y}`);
|
|
5930
5968
|
}
|
|
5931
5969
|
if (!i.paramName) return null;
|
|
5932
5970
|
const x = O[i.paramName], d = i.displayText || i.label || i.paramName;
|
|
@@ -5963,7 +6001,7 @@ const qe = {
|
|
|
5963
6001
|
}
|
|
5964
6002
|
),
|
|
5965
6003
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
5966
|
-
] }, `custom-${
|
|
6004
|
+
] }, `custom-${y}`);
|
|
5967
6005
|
if (i.customType === "link_checkbox")
|
|
5968
6006
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
5969
6007
|
/* @__PURE__ */ o(
|
|
@@ -6010,7 +6048,7 @@ const qe = {
|
|
|
6010
6048
|
}
|
|
6011
6049
|
),
|
|
6012
6050
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
6013
|
-
] }, `custom-${
|
|
6051
|
+
] }, `custom-${y}`);
|
|
6014
6052
|
if (i.customType === "group_checkbox") {
|
|
6015
6053
|
const p = (W[i.paramName] || "").split(",").filter(Boolean);
|
|
6016
6054
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -6025,8 +6063,8 @@ const qe = {
|
|
|
6025
6063
|
]
|
|
6026
6064
|
}
|
|
6027
6065
|
),
|
|
6028
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((
|
|
6029
|
-
const
|
|
6066
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((A) => {
|
|
6067
|
+
const B = i.singleSelect ? W[i.paramName] === A.value : p.includes(A.value);
|
|
6030
6068
|
return /* @__PURE__ */ o(
|
|
6031
6069
|
"label",
|
|
6032
6070
|
{
|
|
@@ -6037,13 +6075,13 @@ const qe = {
|
|
|
6037
6075
|
"input",
|
|
6038
6076
|
{
|
|
6039
6077
|
type: "checkbox",
|
|
6040
|
-
checked:
|
|
6078
|
+
checked: B,
|
|
6041
6079
|
onChange: (_) => {
|
|
6042
6080
|
if (i.singleSelect)
|
|
6043
|
-
M(i.paramName, _.target.checked ?
|
|
6081
|
+
M(i.paramName, _.target.checked ? A.value : "");
|
|
6044
6082
|
else {
|
|
6045
|
-
const
|
|
6046
|
-
M(i.paramName,
|
|
6083
|
+
const g = _.target.checked ? [...p, A.value] : p.filter((ae) => ae !== A.value);
|
|
6084
|
+
M(i.paramName, g.join(","));
|
|
6047
6085
|
}
|
|
6048
6086
|
},
|
|
6049
6087
|
className: "metakyc-option-input",
|
|
@@ -6055,16 +6093,16 @@ const qe = {
|
|
|
6055
6093
|
{
|
|
6056
6094
|
className: "metakyc-option-text",
|
|
6057
6095
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
6058
|
-
children:
|
|
6096
|
+
children: A.label
|
|
6059
6097
|
}
|
|
6060
6098
|
)
|
|
6061
6099
|
]
|
|
6062
6100
|
},
|
|
6063
|
-
|
|
6101
|
+
A.value
|
|
6064
6102
|
);
|
|
6065
6103
|
}) }),
|
|
6066
6104
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6067
|
-
] }, `custom-${
|
|
6105
|
+
] }, `custom-${y}`);
|
|
6068
6106
|
}
|
|
6069
6107
|
return i.customType === "radio_group" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
6070
6108
|
/* @__PURE__ */ o(
|
|
@@ -6090,7 +6128,7 @@ const qe = {
|
|
|
6090
6128
|
type: "radio",
|
|
6091
6129
|
checked: W[i.paramName] === p.value,
|
|
6092
6130
|
onChange: () => M(i.paramName, p.value),
|
|
6093
|
-
name: `radio-group-${i.paramName}-${
|
|
6131
|
+
name: `radio-group-${i.paramName}-${y}`,
|
|
6094
6132
|
className: "metakyc-option-input",
|
|
6095
6133
|
style: qe
|
|
6096
6134
|
}
|
|
@@ -6108,7 +6146,7 @@ const qe = {
|
|
|
6108
6146
|
p.value
|
|
6109
6147
|
)) }),
|
|
6110
6148
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6111
|
-
] }, `custom-${
|
|
6149
|
+
] }, `custom-${y}`) : /* @__PURE__ */ r(
|
|
6112
6150
|
de,
|
|
6113
6151
|
{
|
|
6114
6152
|
type: "text",
|
|
@@ -6118,9 +6156,9 @@ const qe = {
|
|
|
6118
6156
|
required: i.required,
|
|
6119
6157
|
error: x
|
|
6120
6158
|
},
|
|
6121
|
-
`custom-${
|
|
6159
|
+
`custom-${y}`
|
|
6122
6160
|
);
|
|
6123
|
-
}, tt = (i,
|
|
6161
|
+
}, tt = (i, y) => {
|
|
6124
6162
|
const x = Z(i);
|
|
6125
6163
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
6126
6164
|
i.conditionalOn && /* @__PURE__ */ r(pt, { helpText: i.conditionalHelpText, children: /* @__PURE__ */ o(
|
|
@@ -6151,8 +6189,8 @@ const qe = {
|
|
|
6151
6189
|
}
|
|
6152
6190
|
) }),
|
|
6153
6191
|
x && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: i.fields.map((d, p) => {
|
|
6154
|
-
const
|
|
6155
|
-
return /* @__PURE__ */ r("div", { className:
|
|
6192
|
+
const A = d.colSpan === 1 ? "col-span-1" : d.colSpan === 2 ? "col-span-2" : d.colSpan === 3 ? "col-span-3" : "col-span-4", B = d.isCustom ? `custom-${p}-${d.paramName}` : `builtin-${d.name}-${p}`;
|
|
6193
|
+
return /* @__PURE__ */ r("div", { className: A, children: /* @__PURE__ */ r(pt, { helpText: d.helpText, children: d.isCustom ? et(d, p) : xe(d.name, B, d.displayText, d.countriesType) }) }, B);
|
|
6156
6194
|
}) })
|
|
6157
6195
|
] });
|
|
6158
6196
|
};
|
|
@@ -6162,7 +6200,7 @@ const qe = {
|
|
|
6162
6200
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
6163
6201
|
] }) }) });
|
|
6164
6202
|
if (f) {
|
|
6165
|
-
const i = f[
|
|
6203
|
+
const i = f[z] ?? f[0], y = Ee === -1, x = ie === -1, d = f.length, p = Z(i), A = Object.values(O);
|
|
6166
6204
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(j, { children: [
|
|
6167
6205
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6168
6206
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -6192,25 +6230,25 @@ const qe = {
|
|
|
6192
6230
|
}
|
|
6193
6231
|
)
|
|
6194
6232
|
] }),
|
|
6195
|
-
(
|
|
6196
|
-
|
|
6233
|
+
(E || A.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
6234
|
+
E && /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6197
6235
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6198
6236
|
" ",
|
|
6199
|
-
|
|
6237
|
+
E
|
|
6200
6238
|
] }),
|
|
6201
|
-
|
|
6239
|
+
A.map((B, _) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: B }, _))
|
|
6202
6240
|
] }),
|
|
6203
6241
|
d > 1 && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
6204
|
-
f.map((
|
|
6242
|
+
f.map((B, _) => /* @__PURE__ */ r(
|
|
6205
6243
|
"div",
|
|
6206
6244
|
{
|
|
6207
|
-
className: `h-1.5 rounded-full transition-all ${_ ===
|
|
6208
|
-
style: _ ===
|
|
6245
|
+
className: `h-1.5 rounded-full transition-all ${_ === z ? "flex-1" : "w-8"}`,
|
|
6246
|
+
style: _ === z ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : _ < z ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
|
|
6209
6247
|
},
|
|
6210
6248
|
_
|
|
6211
6249
|
)),
|
|
6212
6250
|
/* @__PURE__ */ o("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
6213
|
-
|
|
6251
|
+
z + 1,
|
|
6214
6252
|
" / ",
|
|
6215
6253
|
d
|
|
6216
6254
|
] })
|
|
@@ -6219,19 +6257,19 @@ const qe = {
|
|
|
6219
6257
|
] }),
|
|
6220
6258
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
6221
6259
|
/* @__PURE__ */ o("div", { children: [
|
|
6222
|
-
!
|
|
6260
|
+
!y && /* @__PURE__ */ r(
|
|
6223
6261
|
Q,
|
|
6224
6262
|
{
|
|
6225
6263
|
type: "button",
|
|
6226
6264
|
variant: "outline",
|
|
6227
6265
|
onClick: () => {
|
|
6228
|
-
L(
|
|
6266
|
+
L(Ee), G({});
|
|
6229
6267
|
},
|
|
6230
6268
|
disabled: te || h,
|
|
6231
6269
|
children: "Previous"
|
|
6232
6270
|
}
|
|
6233
6271
|
),
|
|
6234
|
-
|
|
6272
|
+
y && a && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: a, disabled: te || h, children: "Cancel" })
|
|
6235
6273
|
] }),
|
|
6236
6274
|
/* @__PURE__ */ r(
|
|
6237
6275
|
Q,
|
|
@@ -6248,10 +6286,10 @@ const qe = {
|
|
|
6248
6286
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Xe, children: /* @__PURE__ */ o(j, { children: [
|
|
6249
6287
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6250
6288
|
/* @__PURE__ */ o(K, { children: [
|
|
6251
|
-
|
|
6289
|
+
E && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6252
6290
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6253
6291
|
" ",
|
|
6254
|
-
|
|
6292
|
+
E
|
|
6255
6293
|
] }) }),
|
|
6256
6294
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: b.map((i) => /* @__PURE__ */ r("div", { className: "col-span-4", children: xe(i) }, i)) })
|
|
6257
6295
|
] }),
|
|
@@ -6260,7 +6298,7 @@ const qe = {
|
|
|
6260
6298
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: te || h, children: "Create Applicant" })
|
|
6261
6299
|
] })
|
|
6262
6300
|
] }) }) });
|
|
6263
|
-
},
|
|
6301
|
+
}, vn = ({
|
|
6264
6302
|
applicantId: e,
|
|
6265
6303
|
onComplete: t,
|
|
6266
6304
|
onError: n,
|
|
@@ -6278,7 +6316,7 @@ const qe = {
|
|
|
6278
6316
|
error: f,
|
|
6279
6317
|
moveBack: S,
|
|
6280
6318
|
refreshProgress: b
|
|
6281
|
-
} =
|
|
6319
|
+
} = xr(e), [D, F] = be.useState(!1);
|
|
6282
6320
|
if (be.useEffect(() => {
|
|
6283
6321
|
f && n && n(f);
|
|
6284
6322
|
}, [f, n]), be.useEffect(() => {
|
|
@@ -6368,15 +6406,15 @@ const qe = {
|
|
|
6368
6406
|
return "";
|
|
6369
6407
|
}
|
|
6370
6408
|
}, $ = () => {
|
|
6371
|
-
const T = u.filter((N) => N.visibility !== !1), Y = T.findIndex((N) => N.order === c.order), X = Y >= 0 ? Y + 1 : 1,
|
|
6409
|
+
const T = u.filter((N) => N.visibility !== !1), Y = T.findIndex((N) => N.order === c.order), X = Y >= 0 ? Y + 1 : 1, I = T.length;
|
|
6372
6410
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
6373
6411
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
6374
6412
|
/* @__PURE__ */ r(at, {}),
|
|
6375
|
-
/* @__PURE__ */ o(
|
|
6413
|
+
/* @__PURE__ */ o(Ae, { variant: l.status === 1 ? "info" : "success", children: [
|
|
6376
6414
|
"Step ",
|
|
6377
6415
|
X,
|
|
6378
6416
|
" of ",
|
|
6379
|
-
|
|
6417
|
+
I
|
|
6380
6418
|
] })
|
|
6381
6419
|
] }),
|
|
6382
6420
|
/* @__PURE__ */ r("div", { className: "flex items-center", children: T.map((N, H) => {
|
|
@@ -6420,20 +6458,20 @@ const qe = {
|
|
|
6420
6458
|
};
|
|
6421
6459
|
switch (c.action) {
|
|
6422
6460
|
case J.Questionaries:
|
|
6423
|
-
return /* @__PURE__ */ r($r, { ...T });
|
|
6424
|
-
case J.UploadDocument:
|
|
6425
6461
|
return /* @__PURE__ */ r(Br, { ...T });
|
|
6426
|
-
case J.
|
|
6462
|
+
case J.UploadDocument:
|
|
6427
6463
|
return /* @__PURE__ */ r(_r, { ...T });
|
|
6464
|
+
case J.Overview:
|
|
6465
|
+
return /* @__PURE__ */ r(Hr, { ...T });
|
|
6428
6466
|
case J.IdentitySdk:
|
|
6429
|
-
return /* @__PURE__ */ r(
|
|
6467
|
+
return /* @__PURE__ */ r(Zr, { ...T });
|
|
6430
6468
|
case J.RiskScoring:
|
|
6431
|
-
return /* @__PURE__ */ r(
|
|
6469
|
+
return /* @__PURE__ */ r(Qr, { ...T });
|
|
6432
6470
|
case J.AdditionalData:
|
|
6433
6471
|
case J.InvestorCategorization:
|
|
6434
|
-
return /* @__PURE__ */ r(Gr, { ...T });
|
|
6435
|
-
case J.AppropriatenessTest:
|
|
6436
6472
|
return /* @__PURE__ */ r(Vr, { ...T });
|
|
6473
|
+
case J.AppropriatenessTest:
|
|
6474
|
+
return /* @__PURE__ */ r(Jr, { ...T });
|
|
6437
6475
|
case J.ManualReview:
|
|
6438
6476
|
return /* @__PURE__ */ r(
|
|
6439
6477
|
mt,
|
|
@@ -6463,12 +6501,12 @@ const qe = {
|
|
|
6463
6501
|
R()
|
|
6464
6502
|
] });
|
|
6465
6503
|
};
|
|
6466
|
-
function
|
|
6504
|
+
function kn(e) {
|
|
6467
6505
|
return Ce.object({
|
|
6468
6506
|
questionResults: Ce.any()
|
|
6469
6507
|
}).passthrough();
|
|
6470
6508
|
}
|
|
6471
|
-
function
|
|
6509
|
+
function en(e) {
|
|
6472
6510
|
let t = Ce.array(Ce.instanceof(File));
|
|
6473
6511
|
if (e.isRequired ? t = t.min(
|
|
6474
6512
|
1,
|
|
@@ -6490,37 +6528,37 @@ function Xr(e) {
|
|
|
6490
6528
|
}
|
|
6491
6529
|
return t;
|
|
6492
6530
|
}
|
|
6493
|
-
function
|
|
6531
|
+
function wn(e) {
|
|
6494
6532
|
const t = {};
|
|
6495
6533
|
return e.uploadDocumentFiles.forEach((n) => {
|
|
6496
6534
|
const a = `file_${n.id}`;
|
|
6497
|
-
t[a] =
|
|
6535
|
+
t[a] = en(n);
|
|
6498
6536
|
}), Ce.object(t);
|
|
6499
6537
|
}
|
|
6500
|
-
function
|
|
6538
|
+
function Nn(e) {
|
|
6501
6539
|
return Ce.any();
|
|
6502
6540
|
}
|
|
6503
|
-
function
|
|
6541
|
+
function tn(e) {
|
|
6504
6542
|
return Ce.string().min(1, "This question is required");
|
|
6505
6543
|
}
|
|
6506
|
-
function
|
|
6544
|
+
function Sn(e) {
|
|
6507
6545
|
const t = {};
|
|
6508
6546
|
return e.appropriatenessQuestions.forEach((n) => {
|
|
6509
6547
|
const a = `question_${n.id}`;
|
|
6510
|
-
t[a] =
|
|
6548
|
+
t[a] = tn();
|
|
6511
6549
|
}), Ce.object(t);
|
|
6512
6550
|
}
|
|
6513
|
-
const
|
|
6551
|
+
const Cn = Ce.any();
|
|
6514
6552
|
export {
|
|
6515
6553
|
lt as ALLOWED_LANGUAGES,
|
|
6516
|
-
|
|
6554
|
+
At as ApplicantProgressOnHoldReason,
|
|
6517
6555
|
ke as ApplicantProgressStatus,
|
|
6518
6556
|
Ut as ApplicantService,
|
|
6519
6557
|
Rt as ApplicantStatus,
|
|
6520
6558
|
Dt as AppropriatenessQuestionType,
|
|
6521
6559
|
Wt as AppropriatenessTestService,
|
|
6522
|
-
|
|
6523
|
-
|
|
6560
|
+
Jr as AppropriatenessTestStep,
|
|
6561
|
+
Ae as Badge,
|
|
6524
6562
|
Gt as BaseInformationService,
|
|
6525
6563
|
Q as Button,
|
|
6526
6564
|
j as Card,
|
|
@@ -6528,9 +6566,9 @@ export {
|
|
|
6528
6566
|
me as CardFooter,
|
|
6529
6567
|
ue as CardHeader,
|
|
6530
6568
|
$e as CountriesType,
|
|
6531
|
-
|
|
6569
|
+
xn as CreateApplicantForm,
|
|
6532
6570
|
Ot as CriteriaBuiltInType,
|
|
6533
|
-
|
|
6571
|
+
Bt as DEFAULT_VISIBLE_FIELDS,
|
|
6534
6572
|
Lt as DocumentReviewStatus,
|
|
6535
6573
|
_t as EndpointBuilder,
|
|
6536
6574
|
Ke as ErrorHandler,
|
|
@@ -6541,90 +6579,90 @@ export {
|
|
|
6541
6579
|
Ze as GenderType,
|
|
6542
6580
|
at as Header,
|
|
6543
6581
|
Ht as HttpClient,
|
|
6544
|
-
|
|
6582
|
+
Be as IdentityProviderManager,
|
|
6545
6583
|
Qt as IdentityService,
|
|
6546
6584
|
ve as IdentityVerificationProvider,
|
|
6547
|
-
|
|
6585
|
+
Zr as IdentityVerificationStep,
|
|
6548
6586
|
de as Input,
|
|
6549
6587
|
Vt as InvestorCategorizationService,
|
|
6550
|
-
|
|
6588
|
+
Vr as InvestorCategorizationStep,
|
|
6551
6589
|
fe as InvestorCategorizationType,
|
|
6552
6590
|
$t as InvestorCategoryType,
|
|
6553
6591
|
Pt as KycProcessStatus,
|
|
6554
6592
|
Le as KycStatus,
|
|
6555
6593
|
mt as KycStatusDisplay,
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6594
|
+
vn as KycWorkflow,
|
|
6595
|
+
Xr as Logo,
|
|
6596
|
+
yt as MetaKYCContext,
|
|
6559
6597
|
Ne as MetaKYCError,
|
|
6560
|
-
|
|
6561
|
-
|
|
6598
|
+
mn as MetaKYCProvider,
|
|
6599
|
+
Er as MultiSelect,
|
|
6562
6600
|
cr as OnfidoProvider,
|
|
6563
6601
|
Yt as OverviewService,
|
|
6564
|
-
|
|
6602
|
+
Hr as OverviewStep,
|
|
6565
6603
|
Ir as PhoneInput,
|
|
6566
6604
|
jt as QuestionnaireService,
|
|
6567
|
-
|
|
6605
|
+
Br as QuestionnaireStep,
|
|
6568
6606
|
De as ReviewStatus,
|
|
6569
6607
|
Mt as RiskCriteriaType,
|
|
6570
|
-
|
|
6608
|
+
It as RiskLevel,
|
|
6571
6609
|
qt as RiskScoringService,
|
|
6572
|
-
|
|
6610
|
+
Qr as RiskScoringStep,
|
|
6573
6611
|
dr as SardinAIProvider,
|
|
6574
6612
|
Re as SearchableSelect,
|
|
6575
6613
|
st as Select,
|
|
6576
6614
|
we as Spinner,
|
|
6577
6615
|
sr as StepRouter,
|
|
6578
6616
|
lr as SumsubProvider,
|
|
6579
|
-
|
|
6617
|
+
mr as ThemeManager,
|
|
6580
6618
|
ce as ThemePreset,
|
|
6581
6619
|
nr as ThemeService,
|
|
6582
6620
|
Kt as UploadDocumentService,
|
|
6583
|
-
|
|
6621
|
+
_r as UploadDocumentStep,
|
|
6584
6622
|
Ft as UserType,
|
|
6585
6623
|
Se as ValueDataType,
|
|
6586
6624
|
or as WorkflowOrchestrator,
|
|
6587
6625
|
Je as WorkflowResultType,
|
|
6588
6626
|
ir as WorkflowState,
|
|
6589
6627
|
J as WorkflowStepAction,
|
|
6590
|
-
|
|
6591
|
-
|
|
6628
|
+
Cn as appropriatenessTestSchema,
|
|
6629
|
+
fn as clearAllStorage,
|
|
6592
6630
|
gr as clearApplicantId,
|
|
6593
|
-
|
|
6631
|
+
br as clearWorkflowState,
|
|
6594
6632
|
oe as cn,
|
|
6595
6633
|
Jt as corporateTheme,
|
|
6596
|
-
|
|
6634
|
+
zt as defaultConfig,
|
|
6597
6635
|
he as defaultTheme,
|
|
6598
|
-
|
|
6636
|
+
pr as fileToBase64,
|
|
6599
6637
|
Zt as fintechTheme,
|
|
6600
6638
|
rt as formatFileSize,
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6639
|
+
Sn as generateAppropriatenessSchema,
|
|
6640
|
+
kn as generateQuestionnaireSchema,
|
|
6641
|
+
Nn as generateRiskScoringSchema,
|
|
6642
|
+
wn as generateUploadDocumentSchema,
|
|
6643
|
+
yn as getAcceptString,
|
|
6644
|
+
yr as getApplicantId,
|
|
6607
6645
|
We as getThemePreset,
|
|
6608
6646
|
gn as getWorkflowState,
|
|
6609
6647
|
Xt as healthcareTheme,
|
|
6610
|
-
|
|
6648
|
+
dn as isScriptLoaded,
|
|
6611
6649
|
ht as loadScript,
|
|
6612
6650
|
tr as minimalTheme,
|
|
6613
6651
|
er as modernTheme,
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6652
|
+
un as removeScript,
|
|
6653
|
+
hr as saveApplicantId,
|
|
6654
|
+
fr as saveWorkflowState,
|
|
6617
6655
|
rr as themePresets,
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6656
|
+
Cr as useApplicant,
|
|
6657
|
+
bn as useAppropriatenessTest,
|
|
6658
|
+
Nr as useIdentityVerification,
|
|
6659
|
+
xr as useKycWorkflow,
|
|
6660
|
+
ye as useMetaKYC,
|
|
6661
|
+
wr as useOverview,
|
|
6662
|
+
vr as useQuestionnaire,
|
|
6663
|
+
Sr as useRiskScoring,
|
|
6664
|
+
kr as useUploadDocument,
|
|
6665
|
+
pn as validateFileSize,
|
|
6666
|
+
hn as validateFileType
|
|
6629
6667
|
};
|
|
6630
6668
|
//# sourceMappingURL=index.js.map
|