@vpdev2/metakyc-sdk 1.0.50 → 1.0.52

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.js CHANGED
@@ -3,11 +3,11 @@ var ft = (e, t, n) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var te = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import xt from "axios";
5
5
  import * as tt from "react";
6
- import fe, { createContext as bt, useState as b, useMemo as Ae, useEffect as re, useContext as vt, useRef as X, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
- import { jsx as r, jsxs as i, Fragment as wt } from "react/jsx-runtime";
6
+ import fe, { createContext as bt, useState as v, useMemo as Ae, useEffect as re, useContext as vt, useRef as X, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
+ import { jsx as r, jsxs as i, Fragment as kt } from "react/jsx-runtime";
8
8
  import { createPortal as ot } from "react-dom";
9
- import { useForm as kt, Controller as Re } from "react-hook-form";
10
- import { z as ke } from "zod";
9
+ import { useForm as wt, Controller as Re } from "react-hook-form";
10
+ import { z as Ne } from "zod";
11
11
  var G = /* @__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))(G || {}), qe = /* @__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))(qe || {}), be = /* @__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))(be || {}), Nt = /* @__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))(Nt || {}), St = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(St || {}), Pe = /* @__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))(Pe || {}), 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 || {}), Ct = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(At || {}), xe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(xe || {}), Et = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Et || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), It = /* @__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))(It || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Rt || {}), Pt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Pt || {}), Ee = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ee || {}), Dt = /* @__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))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Ft || {}), ge = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(ge || {}), Lt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Lt || {});
12
12
  const Fe = {
13
13
  Nationality: 10,
@@ -119,7 +119,7 @@ class we extends Error {
119
119
  this.code = a, this.details = s, this.validationErrors = o, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, we.prototype);
120
120
  }
121
121
  }
122
- class ze {
122
+ class $e {
123
123
  /**
124
124
  * Process an error from the API response
125
125
  */
@@ -169,7 +169,7 @@ class ze {
169
169
  return t instanceof we;
170
170
  }
171
171
  }
172
- class zt {
172
+ class $t {
173
173
  constructor(t) {
174
174
  te(this, "axiosInstance");
175
175
  te(this, "endpointBuilder");
@@ -210,7 +210,7 @@ class zt {
210
210
  });
211
211
  return this.handleResponse(o);
212
212
  } catch (s) {
213
- throw ze.handleAxiosError(s);
213
+ throw $e.handleAxiosError(s);
214
214
  }
215
215
  }
216
216
  /**
@@ -221,7 +221,7 @@ class zt {
221
221
  const s = this.buildEndpoint(t, n), o = await this.axiosInstance.post(s, a);
222
222
  return this.handleResponse(o);
223
223
  } catch (s) {
224
- throw ze.handleAxiosError(s);
224
+ throw $e.handleAxiosError(s);
225
225
  }
226
226
  }
227
227
  /**
@@ -232,7 +232,7 @@ class zt {
232
232
  const s = this.buildEndpoint(t, n), o = await this.axiosInstance.put(s, a);
233
233
  return this.handleResponse(o);
234
234
  } catch (s) {
235
- throw ze.handleAxiosError(s);
235
+ throw $e.handleAxiosError(s);
236
236
  }
237
237
  }
238
238
  /**
@@ -245,7 +245,7 @@ class zt {
245
245
  });
246
246
  return this.handleResponse(o);
247
247
  } catch (s) {
248
- throw ze.handleAxiosError(s);
248
+ throw $e.handleAxiosError(s);
249
249
  }
250
250
  }
251
251
  /**
@@ -254,7 +254,7 @@ class zt {
254
254
  handleResponse(t) {
255
255
  const n = t.data;
256
256
  if (!n.success && n.error)
257
- throw ze.handleApiError(n.error);
257
+ throw $e.handleApiError(n.error);
258
258
  return n;
259
259
  }
260
260
  /**
@@ -264,7 +264,7 @@ class zt {
264
264
  return this.axiosInstance;
265
265
  }
266
266
  }
267
- class Bt {
267
+ class zt {
268
268
  constructor(t) {
269
269
  this.httpClient = t;
270
270
  }
@@ -383,7 +383,7 @@ class Bt {
383
383
  )).result;
384
384
  }
385
385
  }
386
- class $t {
386
+ class Bt {
387
387
  constructor(t) {
388
388
  this.httpClient = t;
389
389
  }
@@ -879,7 +879,7 @@ const ue = {
879
879
  [ce.Modern]: Vt,
880
880
  [ce.Minimal]: Zt
881
881
  };
882
- function Be(e) {
882
+ function ze(e) {
883
883
  return Jt[e] || ue;
884
884
  }
885
885
  class Xt {
@@ -897,8 +897,8 @@ class Xt {
897
897
  "GetThemeConfiguration"
898
898
  );
899
899
  if (!n.result.isEnabled)
900
- return Be(ce.Default);
901
- let a = n.result.preset ? Be(n.result.preset) : Be(ce.Default);
900
+ return ze(ce.Default);
901
+ let a = n.result.preset ? ze(n.result.preset) : ze(ce.Default);
902
902
  if (n.result.title && (a.title = n.result.title), n.result.logo && (a.logo = { ...a.logo, ...n.result.logo }), n.result.colors && (a.colors = { ...a.colors, ...n.result.colors }), n.result.typography && (a.typography = { ...a.typography, ...n.result.typography }), n.result.spacing && (a.spacing = { ...a.spacing, ...n.result.spacing }), n.result.customCSS && (a.customCSS = n.result.customCSS), n.result.darkMode && (a.darkMode = {
903
903
  colors: {
904
904
  ...(t = a.darkMode) == null ? void 0 : t.colors,
@@ -907,12 +907,21 @@ class Xt {
907
907
  }), n.result.applicantFormVisibleFields && n.result.applicantFormVisibleFields.length > 0 && (a.applicantFormVisibleFields = n.result.applicantFormVisibleFields), n.result.applicantFormRequiredFields && n.result.applicantFormRequiredFields.length > 0 && (a.applicantFormRequiredFields = n.result.applicantFormRequiredFields), n.result.allowedLanguages && n.result.allowedLanguages.length > 0 && (a.allowedLanguages = n.result.allowedLanguages), n.result.applicantFormPages)
908
908
  try {
909
909
  const s = typeof n.result.applicantFormPages == "string" ? JSON.parse(n.result.applicantFormPages) : n.result.applicantFormPages;
910
- Array.isArray(s) && s.length > 0 && (a.applicantFormPages = s);
910
+ Array.isArray(s) && s.length > 0 && (a.applicantFormPages = s.map((o) => {
911
+ const l = !o._v || o._v < 4;
912
+ return {
913
+ ...o,
914
+ fields: (o.fields || []).map((c) => ({
915
+ ...c,
916
+ colSpan: l ? c.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, c.colSpan ?? 4))
917
+ }))
918
+ };
919
+ }));
911
920
  } catch {
912
921
  }
913
922
  return a;
914
923
  } catch (n) {
915
- return console.warn("[ThemeService] Failed to fetch theme configuration:", n), Be(ce.Default);
924
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", n), ze(ce.Default);
916
925
  }
917
926
  }
918
927
  /**
@@ -938,7 +947,7 @@ class Xt {
938
947
  * Preview theme (doesn't save)
939
948
  */
940
949
  getPreviewTheme(t, n) {
941
- const a = Be(t);
950
+ const a = ze(t);
942
951
  return n ? {
943
952
  ...a,
944
953
  ...n,
@@ -1778,8 +1787,8 @@ class or {
1778
1787
  }
1779
1788
  }
1780
1789
  const ct = bt(null), nn = ({ config: e, children: t }) => {
1781
- const [n, a] = b(null), s = fe.useRef(!1), o = fe.useRef(!1), l = Ae(() => {
1782
- const u = new zt(e), m = new Bt(u), x = new $t(u), p = new _t(u), y = new Ut(u), g = new Ht(u), h = new qt(u), S = new Kt(u), F = new jt(u), w = new Wt(u), M = new Xt(u), A = new or();
1790
+ const [n, a] = v(null), s = fe.useRef(!1), o = fe.useRef(!1), l = Ae(() => {
1791
+ const u = new $t(e), m = new zt(u), x = new Bt(u), p = new _t(u), y = new Ut(u), g = new Ht(u), h = new qt(u), C = new Kt(u), F = new jt(u), k = new Wt(u), O = new Xt(u), E = new or();
1783
1792
  return {
1784
1793
  httpClient: u,
1785
1794
  applicantService: m,
@@ -1788,11 +1797,11 @@ const ct = bt(null), nn = ({ config: e, children: t }) => {
1788
1797
  appropriatenessTestService: y,
1789
1798
  overviewService: g,
1790
1799
  riskScoringService: h,
1791
- identityService: S,
1800
+ identityService: C,
1792
1801
  baseInformationService: F,
1793
- investorCategorizationService: w,
1794
- themeService: M,
1795
- themeManager: A
1802
+ investorCategorizationService: k,
1803
+ themeService: O,
1804
+ themeManager: E
1796
1805
  };
1797
1806
  }, [e]), c = Ae(() => ({
1798
1807
  config: e,
@@ -1922,14 +1931,14 @@ function cn() {
1922
1931
  ur(), pr();
1923
1932
  }
1924
1933
  function hr(e) {
1925
- const { createOrchestrator: t } = ye(), [n, a] = b(null), [s, o] = b(!1), [l, c] = b(null), u = X(null), m = e || dr();
1934
+ const { createOrchestrator: t } = ye(), [n, a] = v(null), [s, o] = v(!1), [l, c] = v(null), u = X(null), m = e || dr();
1926
1935
  re(() => {
1927
1936
  u.current || (u.current = t());
1928
1937
  }, [t]), re(() => {
1929
- var A;
1938
+ var E;
1930
1939
  n && m && (cr(m), mr({
1931
1940
  applicantId: m,
1932
- currentStepOrder: (A = n.currentStep) == null ? void 0 : A.order,
1941
+ currentStepOrder: (E = n.currentStep) == null ? void 0 : E.order,
1933
1942
  status: n.status,
1934
1943
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
1935
1944
  workflowKey: n.workFlowKey,
@@ -1944,10 +1953,10 @@ function hr(e) {
1944
1953
  }
1945
1954
  x.current = !0, o(!0), c(null);
1946
1955
  try {
1947
- const A = await u.current.initialize(m);
1948
- a(A), p.current = !0;
1949
- } catch (A) {
1950
- c(A);
1956
+ const E = await u.current.initialize(m);
1957
+ a(E), p.current = !0;
1958
+ } catch (E) {
1959
+ c(E);
1951
1960
  } finally {
1952
1961
  o(!1), x.current = !1;
1953
1962
  }
@@ -1964,10 +1973,10 @@ function hr(e) {
1964
1973
  }
1965
1974
  x.current = !0, o(!0), c(null);
1966
1975
  try {
1967
- const A = await u.current.refreshProgress();
1968
- a(A);
1969
- } catch (A) {
1970
- c(A);
1976
+ const E = await u.current.refreshProgress();
1977
+ a(E);
1978
+ } catch (E) {
1979
+ c(E);
1971
1980
  } finally {
1972
1981
  o(!1), x.current = !1;
1973
1982
  }
@@ -1976,64 +1985,64 @@ function hr(e) {
1976
1985
  if (u.current) {
1977
1986
  o(!0), c(null);
1978
1987
  try {
1979
- const A = await u.current.moveToNextStep();
1980
- a(A);
1981
- } catch (A) {
1982
- c(A);
1988
+ const E = await u.current.moveToNextStep();
1989
+ a(E);
1990
+ } catch (E) {
1991
+ c(E);
1983
1992
  } finally {
1984
1993
  o(!1);
1985
1994
  }
1986
1995
  }
1987
- }, []), S = Q(async () => {
1996
+ }, []), C = Q(async () => {
1988
1997
  if (u.current) {
1989
1998
  o(!0), c(null);
1990
1999
  try {
1991
- const A = await u.current.moveToPreviousStep();
1992
- a(A);
1993
- } catch (A) {
1994
- c(A);
2000
+ const E = await u.current.moveToPreviousStep();
2001
+ a(E);
2002
+ } catch (E) {
2003
+ c(E);
1995
2004
  } finally {
1996
2005
  o(!1);
1997
2006
  }
1998
2007
  }
1999
- }, []), F = Q(async (A) => {
2008
+ }, []), F = Q(async (E) => {
2000
2009
  if (u.current) {
2001
2010
  o(!0), c(null);
2002
2011
  try {
2003
- await u.current.submitCurrentStep(A);
2004
- const I = await u.current.refreshProgress();
2005
- a(I);
2006
- } catch (I) {
2007
- throw c(I), I;
2012
+ await u.current.submitCurrentStep(E);
2013
+ const R = await u.current.refreshProgress();
2014
+ a(R);
2015
+ } catch (R) {
2016
+ throw c(R), R;
2008
2017
  } finally {
2009
2018
  o(!1);
2010
2019
  }
2011
2020
  }
2012
- }, []), w = tt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((A, I) => A.order - I.order) : [], [n == null ? void 0 : n.stepInfoList]), M = tt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2021
+ }, []), k = tt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((E, R) => E.order - R.order) : [], [n == null ? void 0 : n.stepInfoList]), O = tt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2013
2022
  return {
2014
2023
  progress: n,
2015
2024
  applicantId: m,
2016
2025
  currentStep: (n == null ? void 0 : n.currentStep) || null,
2017
- steps: w,
2026
+ steps: k,
2018
2027
  status: (n == null ? void 0 : n.status) || be.None,
2019
2028
  workflowResult: (n == null ? void 0 : n.workflowResult) || null,
2020
2029
  workflowKey: n == null ? void 0 : n.workFlowKey,
2021
2030
  nextWorkflowKey: n == null ? void 0 : n.nextWorkflowKey,
2022
- hasWorkflowChanged: M,
2031
+ hasWorkflowChanged: O,
2023
2032
  isLoading: s,
2024
2033
  error: l,
2025
2034
  isComplete: (n == null ? void 0 : n.status) === be.Finished,
2026
2035
  isOnHold: (n == null ? void 0 : n.status) === be.OnHold,
2027
2036
  refreshProgress: g,
2028
2037
  moveToNext: h,
2029
- moveBack: S,
2038
+ moveBack: C,
2030
2039
  submitCurrentStep: F,
2031
2040
  orchestrator: u.current
2032
2041
  };
2033
2042
  }
2034
2043
  function gr(e) {
2035
- const { questionnaireService: t, applicantService: n } = ye(), [a, s] = b(null), [o, l] = b({}), [c, u] = b(!1), [m, x] = b(!1), [p, y] = b(null), g = X(!1), h = X(null), S = Q(async () => {
2036
- var w, M;
2044
+ const { questionnaireService: t, applicantService: n } = ye(), [a, s] = v(null), [o, l] = v({}), [c, u] = v(!1), [m, x] = v(!1), [p, y] = v(null), g = X(!1), h = X(null), C = Q(async () => {
2045
+ var k, O;
2037
2046
  if (e) {
2038
2047
  if (g.current) {
2039
2048
  console.log("[Questionnaire] Load already in progress, skipping...");
@@ -2041,39 +2050,39 @@ function gr(e) {
2041
2050
  }
2042
2051
  g.current = !0, u(!0), y(null);
2043
2052
  try {
2044
- const [A, I] = await Promise.all([
2053
+ const [E, R] = await Promise.all([
2045
2054
  t.getQuestionnaire(e),
2046
2055
  n.getApplicantData(e).catch(() => null)
2047
2056
  ]);
2048
- if (s(A), (w = I == null ? void 0 : I.questionnaireResults) != null && w.length && A) {
2057
+ if (s(E), (k = R == null ? void 0 : R.questionnaireResults) != null && k.length && E) {
2049
2058
  const H = /* @__PURE__ */ new Map();
2050
- for (const k of I.questionnaireResults)
2051
- k.question && ((M = k.answers) != null && M.length) && H.set(k.question.trim().toLowerCase(), k.answers);
2052
- const J = {}, f = A.questionGroups.flatMap((k) => k.questions ?? []);
2053
- for (const k of f) {
2054
- const E = k.text.trim().toLowerCase();
2055
- H.has(E) && (J[k.id] = H.get(E));
2059
+ for (const w of R.questionnaireResults)
2060
+ w.question && ((O = w.answers) != null && O.length) && H.set(w.question.trim().toLowerCase(), w.answers);
2061
+ const J = {}, f = E.questionGroups.flatMap((w) => w.questions ?? []);
2062
+ for (const w of f) {
2063
+ const I = w.text.trim().toLowerCase();
2064
+ H.has(I) && (J[w.id] = H.get(I));
2056
2065
  }
2057
2066
  l(J);
2058
2067
  }
2059
2068
  h.current = e;
2060
- } catch (A) {
2061
- y(A);
2069
+ } catch (E) {
2070
+ y(E);
2062
2071
  } finally {
2063
2072
  u(!1), g.current = !1;
2064
2073
  }
2065
2074
  }
2066
2075
  }, [e, t, n]);
2067
2076
  re(() => {
2068
- e && h.current !== e && S();
2077
+ e && h.current !== e && C();
2069
2078
  }, [e]);
2070
2079
  const F = Q(
2071
- async (w) => {
2080
+ async (k) => {
2072
2081
  x(!0), y(null);
2073
2082
  try {
2074
- return await t.fillQuestionnaire(w);
2075
- } catch (M) {
2076
- throw y(M), M;
2083
+ return await t.fillQuestionnaire(k);
2084
+ } catch (O) {
2085
+ throw y(O), O;
2077
2086
  } finally {
2078
2087
  x(!1);
2079
2088
  }
@@ -2086,12 +2095,12 @@ function gr(e) {
2086
2095
  isLoading: c,
2087
2096
  isSubmitting: m,
2088
2097
  error: p,
2089
- load: S,
2098
+ load: C,
2090
2099
  submit: F
2091
2100
  };
2092
2101
  }
2093
2102
  function yr(e) {
2094
- const { uploadDocumentService: t } = ye(), [n, a] = b(null), [s, o] = b(!1), [l, c] = b(!1), [u, m] = b(0), [x, p] = b(null), y = X(!1), g = X(null), h = Q(async () => {
2103
+ const { uploadDocumentService: t } = ye(), [n, a] = v(null), [s, o] = v(!1), [l, c] = v(!1), [u, m] = v(0), [x, p] = v(null), y = X(!1), g = X(null), h = Q(async () => {
2095
2104
  if (e) {
2096
2105
  if (y.current) {
2097
2106
  console.log("[UploadDocument] Load already in progress, skipping...");
@@ -2111,13 +2120,13 @@ function yr(e) {
2111
2120
  re(() => {
2112
2121
  e && g.current !== e && h();
2113
2122
  }, [e]);
2114
- const S = Q(
2123
+ const C = Q(
2115
2124
  async (F) => {
2116
2125
  c(!0), m(0), p(null);
2117
2126
  try {
2118
2127
  await t.fillUploadDocument(F), m(100);
2119
- } catch (w) {
2120
- throw p(w), w;
2128
+ } catch (k) {
2129
+ throw p(k), k;
2121
2130
  } finally {
2122
2131
  c(!1);
2123
2132
  }
@@ -2131,11 +2140,11 @@ function yr(e) {
2131
2140
  uploadProgress: u,
2132
2141
  error: x,
2133
2142
  load: h,
2134
- submit: S
2143
+ submit: C
2135
2144
  };
2136
2145
  }
2137
2146
  function dn(e) {
2138
- const { appropriatenessTestService: t } = ye(), [n, a] = b(null), [s, o] = b(!1), [l, c] = b(!1), [u, m] = b(null), [x, p] = b(null), y = X(!1), g = X(null), h = Q(async () => {
2147
+ const { appropriatenessTestService: t } = ye(), [n, a] = v(null), [s, o] = v(!1), [l, c] = v(!1), [u, m] = v(null), [x, p] = v(null), y = X(!1), g = X(null), h = Q(async () => {
2139
2148
  if (e) {
2140
2149
  if (y.current) {
2141
2150
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
@@ -2155,14 +2164,14 @@ function dn(e) {
2155
2164
  re(() => {
2156
2165
  e && g.current !== e && h();
2157
2166
  }, [e]);
2158
- const S = Q(
2167
+ const C = Q(
2159
2168
  async (F) => {
2160
2169
  c(!0), m(null);
2161
2170
  try {
2162
- const w = await t.fillAppropriatenessTest(F);
2163
- return p(w), w;
2164
- } catch (w) {
2165
- throw m(w), w;
2171
+ const k = await t.fillAppropriatenessTest(F);
2172
+ return p(k), k;
2173
+ } catch (k) {
2174
+ throw m(k), k;
2166
2175
  } finally {
2167
2176
  c(!1);
2168
2177
  }
@@ -2176,11 +2185,11 @@ function dn(e) {
2176
2185
  isSubmitting: l,
2177
2186
  error: u,
2178
2187
  load: h,
2179
- submit: S
2188
+ submit: C
2180
2189
  };
2181
2190
  }
2182
2191
  function fr(e) {
2183
- const { overviewService: t } = ye(), [n, a] = b(null), [s, o] = b(!1), [l, c] = b(!1), [u, m] = b(null), x = X(!1), p = X(null), y = Q(async () => {
2192
+ const { overviewService: t } = ye(), [n, a] = v(null), [s, o] = v(!1), [l, c] = v(!1), [u, m] = v(null), x = X(!1), p = X(null), y = Q(async () => {
2184
2193
  if (e) {
2185
2194
  if (x.current) {
2186
2195
  console.log("[Overview] Load already in progress, skipping...");
@@ -2222,9 +2231,9 @@ function fr(e) {
2222
2231
  };
2223
2232
  }
2224
2233
  function xr(e) {
2225
- const { identityService: t } = ye(), [n, a] = b(
2234
+ const { identityService: t } = ye(), [n, a] = v(
2226
2235
  null
2227
- ), [s, o] = b(!1), [l, c] = b(null), u = X(!1), m = Q(
2236
+ ), [s, o] = v(!1), [l, c] = v(null), u = X(!1), m = Q(
2228
2237
  async (y, g) => {
2229
2238
  if (e) {
2230
2239
  if (u.current) {
@@ -2241,8 +2250,8 @@ function xr(e) {
2241
2250
  // Default: 7 days
2242
2251
  };
2243
2252
  console.log("Identity request input:", h);
2244
- const S = await t.identityRequest(h);
2245
- return console.log("Identity request result:", S), a(S), S;
2253
+ const C = await t.identityRequest(h);
2254
+ return console.log("Identity request result:", C), a(C), C;
2246
2255
  } catch (h) {
2247
2256
  throw c(h), h;
2248
2257
  } finally {
@@ -2261,8 +2270,8 @@ function xr(e) {
2261
2270
  restart: !1,
2262
2271
  redirectUrl: y,
2263
2272
  ttl: g
2264
- }, S = await t.identityCompanyRequest(h);
2265
- return a(S), S;
2273
+ }, C = await t.identityCompanyRequest(h);
2274
+ return a(C), C;
2266
2275
  } catch (h) {
2267
2276
  throw c(h), h;
2268
2277
  } finally {
@@ -2308,49 +2317,49 @@ function xr(e) {
2308
2317
  };
2309
2318
  }
2310
2319
  function br(e) {
2311
- const { riskScoringService: t, applicantService: n } = ye(), [a, s] = b(null), [o, l] = b({}), [c, u] = b(!1), [m, x] = b(!1), [p, y] = b(null), [g, h] = b(null), S = X(!1), F = X(null), w = Q(async () => {
2312
- var A;
2320
+ const { riskScoringService: t, applicantService: n } = ye(), [a, s] = v(null), [o, l] = v({}), [c, u] = v(!1), [m, x] = v(!1), [p, y] = v(null), [g, h] = v(null), C = X(!1), F = X(null), k = Q(async () => {
2321
+ var E;
2313
2322
  if (e) {
2314
- if (S.current) {
2323
+ if (C.current) {
2315
2324
  console.log("[RiskScoring] Load already in progress, skipping...");
2316
2325
  return;
2317
2326
  }
2318
- S.current = !0, u(!0), y(null);
2327
+ C.current = !0, u(!0), y(null);
2319
2328
  try {
2320
- const [I, H] = await Promise.all([
2329
+ const [R, H] = await Promise.all([
2321
2330
  t.getRiskCriterias(e),
2322
2331
  n.getApplicantData(e).catch(() => null)
2323
2332
  ]);
2324
- if (s(I), (A = H == null ? void 0 : H.riskScoringResults) != null && A.length) {
2333
+ if (s(R), (E = H == null ? void 0 : H.riskScoringResults) != null && E.length) {
2325
2334
  const J = H.riskScoringResults[0], f = {};
2326
- for (const k of J.riskCriteriaResults ?? [])
2327
- if (k.riskCriteriaId != null && k.answer != null && k.answer !== "") {
2328
- const E = [...new Set(
2329
- k.answer.split(",").map((O) => O.trim()).filter((O) => O !== "")
2335
+ for (const w of J.riskCriteriaResults ?? [])
2336
+ if (w.riskCriteriaId != null && w.answer != null && w.answer !== "") {
2337
+ const I = [...new Set(
2338
+ w.answer.split(",").map(($) => $.trim()).filter(($) => $ !== "")
2330
2339
  )];
2331
- E.length > 0 && (f[k.riskCriteriaId] = E);
2340
+ I.length > 0 && (f[w.riskCriteriaId] = I);
2332
2341
  }
2333
2342
  l(f);
2334
2343
  }
2335
2344
  F.current = e;
2336
- } catch (I) {
2337
- y(I);
2345
+ } catch (R) {
2346
+ y(R);
2338
2347
  } finally {
2339
- u(!1), S.current = !1;
2348
+ u(!1), C.current = !1;
2340
2349
  }
2341
2350
  }
2342
2351
  }, [e, t, n]);
2343
2352
  re(() => {
2344
- e && F.current !== e && w();
2353
+ e && F.current !== e && k();
2345
2354
  }, [e]);
2346
- const M = Q(
2347
- async (A) => {
2355
+ const O = Q(
2356
+ async (E) => {
2348
2357
  x(!0), y(null);
2349
2358
  try {
2350
- const I = await t.submitRiskScoring(A);
2351
- return h(I), I;
2352
- } catch (I) {
2353
- throw y(I), I;
2359
+ const R = await t.submitRiskScoring(E);
2360
+ return h(R), R;
2361
+ } catch (R) {
2362
+ throw y(R), R;
2354
2363
  } finally {
2355
2364
  x(!1);
2356
2365
  }
@@ -2364,12 +2373,12 @@ function br(e) {
2364
2373
  isLoading: c,
2365
2374
  isSubmitting: m,
2366
2375
  error: p,
2367
- load: w,
2368
- submit: M
2376
+ load: k,
2377
+ submit: O
2369
2378
  };
2370
2379
  }
2371
2380
  function vr() {
2372
- const { applicantService: e, config: t } = ye(), [n, a] = b(!1), [s, o] = b(null), l = X(!1), c = X(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(g) {
2381
+ const { applicantService: e, config: t } = ye(), [n, a] = v(!1), [s, o] = v(null), l = X(!1), c = X(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(g) {
2373
2382
  const h = Math.random() * 16 | 0;
2374
2383
  return (g === "x" ? h : h & 3 | 8).toString(16);
2375
2384
  }), m = Q(
@@ -2387,8 +2396,8 @@ function vr() {
2387
2396
  });
2388
2397
  }
2389
2398
  return await e.createApplicant(g);
2390
- } catch (S) {
2391
- throw o(S), S;
2399
+ } catch (C) {
2400
+ throw o(C), C;
2392
2401
  } finally {
2393
2402
  a(!1), l.current = !1;
2394
2403
  }
@@ -2535,7 +2544,7 @@ const V = ({
2535
2544
  ] })
2536
2545
  );
2537
2546
  me.displayName = "Input";
2538
- const q = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2547
+ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2539
2548
  "div",
2540
2549
  {
2541
2550
  className: oe(
@@ -2559,7 +2568,7 @@ const q = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2559
2568
  ...n,
2560
2569
  children: e
2561
2570
  }
2562
- ), K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: oe("px-6 py-4", t), ...n, children: e }), pe = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2571
+ ), j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r("div", { className: oe("px-6 py-4", t), ...n, children: e }), pe = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2563
2572
  "div",
2564
2573
  {
2565
2574
  className: oe("px-6 py-4 border-t", t),
@@ -2689,7 +2698,7 @@ const q = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2689
2698
  ] })
2690
2699
  );
2691
2700
  _e.displayName = "Select";
2692
- const nt = 280, wr = ({
2701
+ const nt = 280, kr = ({
2693
2702
  label: e,
2694
2703
  value: t,
2695
2704
  onChange: n,
@@ -2698,15 +2707,15 @@ const nt = 280, wr = ({
2698
2707
  disabled: o = !1,
2699
2708
  required: l = !1
2700
2709
  }) => {
2701
- const [c, u] = b(!1), [m, x] = b(""), [p, y] = b(null), g = X(null), h = X(null), S = X(null), F = Q(() => {
2710
+ const [c, u] = v(!1), [m, x] = v(""), [p, y] = v(null), g = X(null), h = X(null), C = X(null), F = Q(() => {
2702
2711
  if (!h.current) return null;
2703
2712
  const N = h.current.getBoundingClientRect(), ne = window.innerHeight - N.bottom < nt && N.top > nt;
2704
2713
  return { top: ne ? N.top : N.bottom + 4, left: N.left, width: N.width, openUp: ne };
2705
- }, []), w = Q(() => {
2714
+ }, []), k = Q(() => {
2706
2715
  if (o) return;
2707
2716
  const N = F();
2708
2717
  N && y(N), u(!0);
2709
- }, [o, F]), M = Q(() => {
2718
+ }, [o, F]), O = Q(() => {
2710
2719
  u(!1), x("");
2711
2720
  }, []);
2712
2721
  re(() => {
@@ -2714,10 +2723,10 @@ const nt = 280, wr = ({
2714
2723
  const N = (_) => {
2715
2724
  var B, D;
2716
2725
  const ne = _.target;
2717
- !((B = g.current) != null && B.contains(ne)) && !((D = S.current) != null && D.contains(ne)) && M();
2726
+ !((B = g.current) != null && B.contains(ne)) && !((D = C.current) != null && D.contains(ne)) && O();
2718
2727
  };
2719
2728
  return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
2720
- }, [c, M]), re(() => {
2729
+ }, [c, O]), re(() => {
2721
2730
  if (!c) return;
2722
2731
  const N = () => {
2723
2732
  const _ = F();
@@ -2727,19 +2736,19 @@ const nt = 280, wr = ({
2727
2736
  window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
2728
2737
  };
2729
2738
  }, [c, F]);
2730
- const A = a.filter(
2739
+ const E = a.filter(
2731
2740
  (N) => N.label.toLowerCase().includes(m.toLowerCase())
2732
- ), I = (N) => {
2741
+ ), R = (N) => {
2733
2742
  o || n(t.includes(N) ? t.filter((_) => _ !== N) : [...t, N]);
2734
2743
  }, H = (N, _) => {
2735
2744
  _.stopPropagation(), o || n(t.filter((ne) => ne !== N));
2736
2745
  }, J = (N) => {
2737
2746
  var _;
2738
2747
  return ((_ = a.find((ne) => ne.value === N)) == null ? void 0 : _.label) || N;
2739
- }, f = h.current ? getComputedStyle(h.current) : null, k = (f == null ? void 0 : f.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", E = (f == null ? void 0 : f.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", O = (f == null ? void 0 : f.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", P = (f == null ? void 0 : f.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", W = (f == null ? void 0 : f.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", z = (f == null ? void 0 : f.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", L = (f == null ? void 0 : f.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", Z = c && p && /* @__PURE__ */ i(
2748
+ }, f = h.current ? getComputedStyle(h.current) : null, w = (f == null ? void 0 : f.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", I = (f == null ? void 0 : f.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", $ = (f == null ? void 0 : f.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", P = (f == null ? void 0 : f.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", Y = (f == null ? void 0 : f.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", z = (f == null ? void 0 : f.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", L = (f == null ? void 0 : f.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", Z = c && p && /* @__PURE__ */ i(
2740
2749
  "div",
2741
2750
  {
2742
- ref: S,
2751
+ ref: C,
2743
2752
  className: "metakyc-multiselect-dropdown",
2744
2753
  style: {
2745
2754
  position: "fixed",
@@ -2750,12 +2759,12 @@ const nt = 280, wr = ({
2750
2759
  zIndex: 99999,
2751
2760
  borderRadius: "8px",
2752
2761
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
2753
- border: `1px solid ${E}`,
2754
- backgroundColor: k,
2762
+ border: `1px solid ${I}`,
2763
+ backgroundColor: w,
2755
2764
  overflow: "hidden"
2756
2765
  },
2757
2766
  children: [
2758
- /* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${E}` }, children: /* @__PURE__ */ r(
2767
+ /* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${I}` }, children: /* @__PURE__ */ r(
2759
2768
  "input",
2760
2769
  {
2761
2770
  type: "text",
@@ -2771,20 +2780,20 @@ const nt = 280, wr = ({
2771
2780
  padding: "6px 8px",
2772
2781
  fontSize: "13px",
2773
2782
  borderRadius: "6px",
2774
- border: `1px solid ${E}`,
2775
- backgroundColor: k,
2776
- color: O,
2783
+ border: `1px solid ${I}`,
2784
+ backgroundColor: w,
2785
+ color: $,
2777
2786
  outline: "none",
2778
2787
  boxSizing: "border-box"
2779
2788
  }
2780
2789
  }
2781
2790
  ) }),
2782
- /* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: A.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: P }, children: "No results" }) : A.map((N) => {
2791
+ /* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: E.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: P }, children: "No results" }) : E.map((N) => {
2783
2792
  const _ = t.includes(N.value);
2784
2793
  return /* @__PURE__ */ i(
2785
2794
  "li",
2786
2795
  {
2787
- onClick: () => I(N.value),
2796
+ onClick: () => R(N.value),
2788
2797
  className: "metakyc-multiselect-option",
2789
2798
  style: {
2790
2799
  display: "flex",
@@ -2794,7 +2803,7 @@ const nt = 280, wr = ({
2794
2803
  fontSize: "13px",
2795
2804
  cursor: "pointer",
2796
2805
  backgroundColor: _ ? z : "transparent",
2797
- color: _ ? W : O,
2806
+ color: _ ? Y : $,
2798
2807
  userSelect: "none"
2799
2808
  },
2800
2809
  onMouseEnter: (ne) => {
@@ -2810,7 +2819,7 @@ const nt = 280, wr = ({
2810
2819
  type: "checkbox",
2811
2820
  checked: _,
2812
2821
  readOnly: !0,
2813
- style: { accentColor: W, pointerEvents: "none", flexShrink: 0 }
2822
+ style: { accentColor: Y, pointerEvents: "none", flexShrink: 0 }
2814
2823
  }
2815
2824
  ),
2816
2825
  /* @__PURE__ */ r("span", { children: N.label })
@@ -2819,7 +2828,7 @@ const nt = 280, wr = ({
2819
2828
  N.value
2820
2829
  );
2821
2830
  }) }),
2822
- t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${E}` }, children: /* @__PURE__ */ i(
2831
+ t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${I}` }, children: /* @__PURE__ */ i(
2823
2832
  "button",
2824
2833
  {
2825
2834
  type: "button",
@@ -2853,7 +2862,7 @@ const nt = 280, wr = ({
2853
2862
  "div",
2854
2863
  {
2855
2864
  ref: h,
2856
- onClick: () => c ? M() : w(),
2865
+ onClick: () => c ? O() : k(),
2857
2866
  className: oe(
2858
2867
  "metakyc-multiselect-trigger",
2859
2868
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
@@ -2941,53 +2950,53 @@ const nt = 280, wr = ({
2941
2950
  className: m
2942
2951
  }) => {
2943
2952
  var D;
2944
- const [x, p] = b(!1), [y, g] = b(""), [h, S] = b(null), F = X(null), w = X(null), M = X(null), A = X(null), I = Q(() => {
2945
- if (!w.current) return null;
2946
- const C = w.current.getBoundingClientRect(), ee = window.innerHeight - C.bottom < at && C.top > at;
2953
+ const [x, p] = v(!1), [y, g] = v(""), [h, C] = v(null), F = X(null), k = X(null), O = X(null), E = X(null), R = Q(() => {
2954
+ if (!k.current) return null;
2955
+ const A = k.current.getBoundingClientRect(), ee = window.innerHeight - A.bottom < at && A.top > at;
2947
2956
  return {
2948
- top: ee ? C.top : C.bottom + 4,
2949
- left: C.left,
2950
- width: C.width,
2957
+ top: ee ? A.top : A.bottom + 4,
2958
+ left: A.left,
2959
+ width: A.width,
2951
2960
  openUp: ee
2952
2961
  };
2953
2962
  }, []), H = Q(() => {
2954
2963
  if (c) return;
2955
- const C = I();
2956
- C && S(C), p(!0);
2957
- }, [c, I]), J = Q(() => {
2964
+ const A = R();
2965
+ A && C(A), p(!0);
2966
+ }, [c, R]), J = Q(() => {
2958
2967
  p(!1), g("");
2959
2968
  }, []), f = () => x ? J() : H();
2960
2969
  re(() => {
2961
2970
  if (!x) return;
2962
- const C = (U) => {
2963
- var j, Ne;
2971
+ const A = (U) => {
2972
+ var W, Se;
2964
2973
  const ee = U.target;
2965
- !((j = F.current) != null && j.contains(ee)) && !((Ne = M.current) != null && Ne.contains(ee)) && J();
2974
+ !((W = F.current) != null && W.contains(ee)) && !((Se = O.current) != null && Se.contains(ee)) && J();
2966
2975
  };
2967
- return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
2976
+ return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
2968
2977
  }, [x, J]), re(() => {
2969
2978
  if (!x) return;
2970
- const C = () => {
2971
- const U = I();
2972
- U && S(U);
2979
+ const A = () => {
2980
+ const U = R();
2981
+ U && C(U);
2973
2982
  };
2974
- return window.addEventListener("scroll", C, !0), window.addEventListener("resize", C), () => {
2975
- window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
2983
+ return window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
2984
+ window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
2976
2985
  };
2977
- }, [x, I]), re(() => {
2978
- x && A.current && setTimeout(() => {
2979
- var C;
2980
- return (C = A.current) == null ? void 0 : C.focus();
2986
+ }, [x, R]), re(() => {
2987
+ x && E.current && setTimeout(() => {
2988
+ var A;
2989
+ return (A = E.current) == null ? void 0 : A.focus();
2981
2990
  }, 0);
2982
2991
  }, [x]);
2983
- const k = a.filter(
2984
- (C) => C.label.toLowerCase().includes(y.toLowerCase()) || C.value.toLowerCase().includes(y.toLowerCase())
2985
- ), E = (D = a.find((C) => C.value === o)) == null ? void 0 : D.label, O = (C, U) => {
2986
- c || U || (l(C), J());
2987
- }, P = w.current ? getComputedStyle(w.current) : null, W = (P == null ? void 0 : P.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", z = (P == null ? void 0 : P.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", L = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", N = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", _ = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", ne = (P == null ? void 0 : P.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ i(
2992
+ const w = a.filter(
2993
+ (A) => A.label.toLowerCase().includes(y.toLowerCase()) || A.value.toLowerCase().includes(y.toLowerCase())
2994
+ ), I = (D = a.find((A) => A.value === o)) == null ? void 0 : D.label, $ = (A, U) => {
2995
+ c || U || (l(A), J());
2996
+ }, P = k.current ? getComputedStyle(k.current) : null, Y = (P == null ? void 0 : P.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", z = (P == null ? void 0 : P.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", L = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (P == null ? void 0 : P.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", N = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", _ = (P == null ? void 0 : P.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", ne = (P == null ? void 0 : P.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ i(
2988
2997
  "div",
2989
2998
  {
2990
- ref: M,
2999
+ ref: O,
2991
3000
  className: "metakyc-searchable-select-dropdown",
2992
3001
  style: {
2993
3002
  position: "fixed",
@@ -2999,19 +3008,19 @@ const nt = 280, wr = ({
2999
3008
  borderRadius: "8px",
3000
3009
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
3001
3010
  border: `1px solid ${z}`,
3002
- backgroundColor: W,
3011
+ backgroundColor: Y,
3003
3012
  overflow: "hidden"
3004
3013
  },
3005
3014
  children: [
3006
3015
  /* @__PURE__ */ r("div", { style: { padding: "8px", borderBottom: `1px solid ${z}` }, children: /* @__PURE__ */ r(
3007
3016
  "input",
3008
3017
  {
3009
- ref: A,
3018
+ ref: E,
3010
3019
  type: "text",
3011
3020
  value: y,
3012
- onChange: (C) => g(C.target.value),
3021
+ onChange: (A) => g(A.target.value),
3013
3022
  placeholder: "Search...",
3014
- onClick: (C) => C.stopPropagation(),
3023
+ onClick: (A) => A.stopPropagation(),
3015
3024
  className: "metakyc-searchable-select-search w-full",
3016
3025
  style: {
3017
3026
  display: "block",
@@ -3020,7 +3029,7 @@ const nt = 280, wr = ({
3020
3029
  fontSize: "13px",
3021
3030
  borderRadius: "6px",
3022
3031
  border: `1px solid ${z}`,
3023
- backgroundColor: W,
3032
+ backgroundColor: Y,
3024
3033
  color: L,
3025
3034
  outline: "none",
3026
3035
  boxSizing: "border-box"
@@ -3037,31 +3046,31 @@ const nt = 280, wr = ({
3037
3046
  maxHeight: "208px",
3038
3047
  overflowY: "auto"
3039
3048
  },
3040
- children: k.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: Z }, children: "No results" }) : k.map((C) => {
3041
- const U = C.value === o;
3049
+ children: w.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: Z }, children: "No results" }) : w.map((A) => {
3050
+ const U = A.value === o;
3042
3051
  return /* @__PURE__ */ r(
3043
3052
  "li",
3044
3053
  {
3045
3054
  className: "metakyc-searchable-select-option",
3046
- onClick: () => O(C.value, C.disabled),
3055
+ onClick: () => $(A.value, A.disabled),
3047
3056
  style: {
3048
3057
  padding: "8px 12px",
3049
3058
  fontSize: "13px",
3050
- cursor: C.disabled ? "not-allowed" : "pointer",
3051
- opacity: C.disabled ? 0.4 : 1,
3059
+ cursor: A.disabled ? "not-allowed" : "pointer",
3060
+ opacity: A.disabled ? 0.4 : 1,
3052
3061
  backgroundColor: U ? _ : "transparent",
3053
3062
  color: U ? N : L,
3054
3063
  userSelect: "none"
3055
3064
  },
3056
3065
  onMouseEnter: (ee) => {
3057
- !U && !C.disabled && (ee.currentTarget.style.backgroundColor = ne);
3066
+ !U && !A.disabled && (ee.currentTarget.style.backgroundColor = ne);
3058
3067
  },
3059
3068
  onMouseLeave: (ee) => {
3060
3069
  U || (ee.currentTarget.style.backgroundColor = "transparent");
3061
3070
  },
3062
- children: C.label
3071
+ children: A.label
3063
3072
  },
3064
- C.value
3073
+ A.value
3065
3074
  );
3066
3075
  })
3067
3076
  }
@@ -3089,12 +3098,12 @@ const nt = 280, wr = ({
3089
3098
  /* @__PURE__ */ i(
3090
3099
  "div",
3091
3100
  {
3092
- ref: w,
3101
+ ref: k,
3093
3102
  role: "button",
3094
3103
  tabIndex: c ? -1 : 0,
3095
3104
  onClick: f,
3096
- onKeyDown: (C) => {
3097
- (C.key === "Enter" || C.key === " ") && (C.preventDefault(), f()), C.key === "Escape" && J();
3105
+ onKeyDown: (A) => {
3106
+ (A.key === "Enter" || A.key === " ") && (A.preventDefault(), f()), A.key === "Escape" && J();
3098
3107
  },
3099
3108
  className: oe(
3100
3109
  "metakyc-searchable-select-trigger",
@@ -3105,14 +3114,14 @@ const nt = 280, wr = ({
3105
3114
  ),
3106
3115
  style: {
3107
3116
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
3108
- color: E ? "var(--metakyc-text-primary, #111827)" : "var(--metakyc-text-secondary, #9ca3af)",
3117
+ color: I ? "var(--metakyc-text-primary, #111827)" : "var(--metakyc-text-secondary, #9ca3af)",
3109
3118
  borderColor: t ? "var(--metakyc-error, #ef4444)" : x ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)",
3110
3119
  minHeight: "42px",
3111
3120
  outline: x ? "2px solid var(--metakyc-primary, #2563eb)" : "none",
3112
3121
  outlineOffset: "-1px"
3113
3122
  },
3114
3123
  children: [
3115
- /* @__PURE__ */ r("span", { className: "truncate flex-1", children: E || s }),
3124
+ /* @__PURE__ */ r("span", { className: "truncate flex-1", children: I || s }),
3116
3125
  /* @__PURE__ */ r(
3117
3126
  "span",
3118
3127
  {
@@ -3132,7 +3141,7 @@ const nt = 280, wr = ({
3132
3141
  );
3133
3142
  };
3134
3143
  je.displayName = "SearchableSelect";
3135
- const kr = ({
3144
+ const wr = ({
3136
3145
  label: e,
3137
3146
  error: t,
3138
3147
  accept: n,
@@ -3142,27 +3151,27 @@ const kr = ({
3142
3151
  value: l = [],
3143
3152
  className: c
3144
3153
  }) => {
3145
- const [u, m] = b(!1), x = X(null), p = (w) => {
3146
- if (!w) return;
3147
- const M = Array.from(w);
3148
- if (s && M.filter((I) => I.size > s).length > 0) {
3149
- const I = We(s);
3150
- alert(`Some files exceed the maximum size of ${I}`);
3154
+ const [u, m] = v(!1), x = X(null), p = (k) => {
3155
+ if (!k) return;
3156
+ const O = Array.from(k);
3157
+ if (s && O.filter((R) => R.size > s).length > 0) {
3158
+ const R = We(s);
3159
+ alert(`Some files exceed the maximum size of ${R}`);
3151
3160
  return;
3152
3161
  }
3153
- o == null || o(a ? [...l, ...M] : [M[0]]);
3154
- }, y = (w) => {
3155
- w.preventDefault(), m(!0);
3162
+ o == null || o(a ? [...l, ...O] : [O[0]]);
3163
+ }, y = (k) => {
3164
+ k.preventDefault(), m(!0);
3156
3165
  }, g = () => {
3157
3166
  m(!1);
3158
- }, h = (w) => {
3159
- w.preventDefault(), m(!1), p(w.dataTransfer.files);
3160
- }, S = () => {
3161
- var w;
3162
- (w = x.current) == null || w.click();
3163
- }, F = (w) => {
3164
- const M = l.filter((A, I) => I !== w);
3165
- o == null || o(M);
3167
+ }, h = (k) => {
3168
+ k.preventDefault(), m(!1), p(k.dataTransfer.files);
3169
+ }, C = () => {
3170
+ var k;
3171
+ (k = x.current) == null || k.click();
3172
+ }, F = (k) => {
3173
+ const O = l.filter((E, R) => R !== k);
3174
+ o == null || o(O);
3166
3175
  };
3167
3176
  return /* @__PURE__ */ i("div", { className: oe("w-full", c), children: [
3168
3177
  e && /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: e }),
@@ -3177,7 +3186,7 @@ const kr = ({
3177
3186
  onDragOver: y,
3178
3187
  onDragLeave: g,
3179
3188
  onDrop: h,
3180
- onClick: S,
3189
+ onClick: C,
3181
3190
  children: [
3182
3191
  /* @__PURE__ */ r(
3183
3192
  "input",
@@ -3187,7 +3196,7 @@ const kr = ({
3187
3196
  className: "hidden",
3188
3197
  accept: n,
3189
3198
  multiple: a,
3190
- onChange: (w) => p(w.target.files)
3199
+ onChange: (k) => p(k.target.files)
3191
3200
  }
3192
3201
  ),
3193
3202
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
@@ -3221,7 +3230,7 @@ const kr = ({
3221
3230
  ]
3222
3231
  }
3223
3232
  ),
3224
- l.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: l.map((w, M) => /* @__PURE__ */ i(
3233
+ l.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: l.map((k, O) => /* @__PURE__ */ i(
3225
3234
  "div",
3226
3235
  {
3227
3236
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -3243,10 +3252,10 @@ const kr = ({
3243
3252
  )
3244
3253
  }
3245
3254
  ),
3246
- /* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: w.name }),
3255
+ /* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: k.name }),
3247
3256
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-500", children: [
3248
3257
  "(",
3249
- We(w.size),
3258
+ We(k.size),
3250
3259
  ")"
3251
3260
  ] })
3252
3261
  ] }),
@@ -3254,8 +3263,8 @@ const kr = ({
3254
3263
  "button",
3255
3264
  {
3256
3265
  type: "button",
3257
- onClick: (A) => {
3258
- A.stopPropagation(), F(M);
3266
+ onClick: (E) => {
3267
+ E.stopPropagation(), F(O);
3259
3268
  },
3260
3269
  className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
3261
3270
  children: /* @__PURE__ */ r("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ r(
@@ -3270,7 +3279,7 @@ const kr = ({
3270
3279
  )
3271
3280
  ]
3272
3281
  },
3273
- M
3282
+ O
3274
3283
  )) }),
3275
3284
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
3276
3285
  ] });
@@ -3487,82 +3496,82 @@ const Lr = ({
3487
3496
  onComplete: t,
3488
3497
  onBack: n
3489
3498
  }) => {
3490
- const { questionnaire: a, initialAnswers: s, isLoading: o, isSubmitting: l, error: c, submit: u } = gr(e), [m, x] = b({}), [p, y] = b({}), [g, h] = b(0);
3499
+ const { questionnaire: a, initialAnswers: s, isLoading: o, isSubmitting: l, error: c, submit: u } = gr(e), [m, x] = v({}), [p, y] = v({}), [g, h] = v(0);
3491
3500
  fe.useEffect(() => {
3492
3501
  s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && x(s);
3493
3502
  }, [s]);
3494
- const S = Ae(
3503
+ const C = Ae(
3495
3504
  () => a ? Fr(a.questionGroups) : [],
3496
3505
  [a]
3497
- ), F = g === S.length - 1, w = S[g] ?? [], M = Q((f, k) => {
3498
- x((E) => ({ ...E, [f]: k })), y((E) => {
3499
- const O = { ...E };
3500
- return delete O[f], O;
3506
+ ), F = g === C.length - 1, k = C[g] ?? [], O = Q((f, w) => {
3507
+ x((I) => ({ ...I, [f]: w })), y((I) => {
3508
+ const $ = { ...I };
3509
+ return delete $[f], $;
3501
3510
  });
3502
- }, []), A = Q(() => {
3511
+ }, []), E = Q(() => {
3503
3512
  const f = {};
3504
- for (const { question: k } of w) {
3505
- const E = Dr(k, m[k.id] ?? []);
3506
- E && (f[k.id] = E);
3513
+ for (const { question: w } of k) {
3514
+ const I = Dr(w, m[w.id] ?? []);
3515
+ I && (f[w.id] = I);
3507
3516
  }
3508
- return y((k) => ({ ...k, ...f })), Object.keys(f).length === 0;
3509
- }, [w, m]), I = () => {
3510
- A() && h((f) => f + 1);
3517
+ return y((w) => ({ ...w, ...f })), Object.keys(f).length === 0;
3518
+ }, [k, m]), R = () => {
3519
+ E() && h((f) => f + 1);
3511
3520
  }, H = () => {
3512
3521
  g > 0 ? h((f) => f - 1) : n == null || n();
3513
3522
  }, J = async () => {
3514
- if (!(!A() || !a))
3523
+ if (!(!E() || !a))
3515
3524
  try {
3516
3525
  const f = a.questionGroups.flatMap(
3517
- (E) => (E.questions ?? []).map((O) => ({
3518
- questionId: O.id,
3519
- values: m[O.id] ?? []
3526
+ (I) => (I.questions ?? []).map(($) => ({
3527
+ questionId: $.id,
3528
+ values: m[$.id] ?? []
3520
3529
  }))
3521
- ), k = {
3530
+ ), w = {
3522
3531
  applicantId: e,
3523
3532
  questionnarieId: a.id,
3524
3533
  questionResults: f
3525
3534
  };
3526
- await u(k), t == null || t();
3535
+ await u(w), t == null || t();
3527
3536
  } catch (f) {
3528
3537
  console.error("Questionnaire submit error:", f);
3529
3538
  }
3530
3539
  };
3531
- return o ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3540
+ return o ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3532
3541
  "Error loading questionnaire: ",
3533
3542
  c.message
3534
- ] }) }) }) : a ? /* @__PURE__ */ i(q, { children: [
3543
+ ] }) }) }) : a ? /* @__PURE__ */ i(K, { children: [
3535
3544
  /* @__PURE__ */ i(de, { children: [
3536
3545
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3537
3546
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a.subtitle }),
3538
- S.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3547
+ C.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3539
3548
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3540
3549
  "Page ",
3541
3550
  g + 1,
3542
3551
  " of ",
3543
- S.length
3552
+ C.length
3544
3553
  ] }),
3545
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: S.map((f, k) => /* @__PURE__ */ r(
3554
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: C.map((f, w) => /* @__PURE__ */ r(
3546
3555
  "div",
3547
3556
  {
3548
3557
  className: "rounded-full transition-all duration-200",
3549
3558
  style: {
3550
3559
  height: "6px",
3551
- width: k === g ? "20px" : "6px",
3552
- backgroundColor: k <= g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
3560
+ width: w === g ? "20px" : "6px",
3561
+ backgroundColor: w <= g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
3553
3562
  }
3554
3563
  },
3555
- k
3564
+ w
3556
3565
  )) })
3557
3566
  ] })
3558
3567
  ] }),
3559
- /* @__PURE__ */ r(K, { className: "space-y-6", children: w.map(({ question: f }) => /* @__PURE__ */ r(
3568
+ /* @__PURE__ */ r(j, { className: "space-y-6", children: k.map(({ question: f }) => /* @__PURE__ */ r(
3560
3569
  Tr,
3561
3570
  {
3562
3571
  question: f,
3563
3572
  value: m[f.id] ?? [],
3564
3573
  error: p[f.id],
3565
- onChange: (k) => M(f.id, k)
3574
+ onChange: (w) => O(f.id, w)
3566
3575
  },
3567
3576
  f.id
3568
3577
  )) }),
@@ -3592,7 +3601,7 @@ const Lr = ({
3592
3601
  V,
3593
3602
  {
3594
3603
  type: "button",
3595
- onClick: I,
3604
+ onClick: R,
3596
3605
  style: { display: "flex", alignItems: "center", gap: "4px" },
3597
3606
  children: [
3598
3607
  "Next",
@@ -3715,14 +3724,14 @@ const Lr = ({
3715
3724
  onComplete: t,
3716
3725
  onBack: n
3717
3726
  }) => {
3718
- const { uploadDocument: a, isLoading: s, isSubmitting: o, error: l, submit: c } = yr(e), [u, m] = b({}), x = async (p) => {
3727
+ const { uploadDocument: a, isLoading: s, isSubmitting: o, error: l, submit: c } = yr(e), [u, m] = v({}), x = async (p) => {
3719
3728
  if (p.preventDefault(), !a) return;
3720
3729
  const y = await Promise.all(
3721
3730
  a.uploadDocumentFiles.map(async (h) => {
3722
- const S = u[h.id] || [], F = await Promise.all(
3723
- S.map(async (w) => ({
3724
- fileName: w.name,
3725
- fileData: await lr(w)
3731
+ const C = u[h.id] || [], F = await Promise.all(
3732
+ C.map(async (k) => ({
3733
+ fileName: k.name,
3734
+ fileData: await lr(k)
3726
3735
  }))
3727
3736
  );
3728
3737
  return {
@@ -3737,16 +3746,16 @@ const Lr = ({
3737
3746
  };
3738
3747
  await c(g), t == null || t();
3739
3748
  };
3740
- return s ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3749
+ return s ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3741
3750
  "Error loading document requirements: ",
3742
3751
  l.message
3743
- ] }) }) }) : a ? /* @__PURE__ */ r("form", { onSubmit: x, children: /* @__PURE__ */ i(q, { children: [
3752
+ ] }) }) }) : a ? /* @__PURE__ */ r("form", { onSubmit: x, children: /* @__PURE__ */ i(K, { children: [
3744
3753
  /* @__PURE__ */ i(de, { children: [
3745
3754
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.displayName }),
3746
3755
  a.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
3747
3756
  ] }),
3748
- /* @__PURE__ */ r(K, { className: "space-y-6", children: a.uploadDocumentFiles.map((p) => /* @__PURE__ */ r(
3749
- kr,
3757
+ /* @__PURE__ */ r(j, { className: "space-y-6", children: a.uploadDocumentFiles.map((p) => /* @__PURE__ */ r(
3758
+ wr,
3750
3759
  {
3751
3760
  label: p.displayName,
3752
3761
  accept: p.allowedTypes,
@@ -3768,15 +3777,15 @@ const Lr = ({
3768
3777
  const { overview: a, isLoading: s, isSubmitting: o, error: l, passOverview: c } = fr(e), u = async () => {
3769
3778
  await c(), t == null || t();
3770
3779
  };
3771
- return s ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3780
+ return s ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(ve, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3772
3781
  "Error loading overview: ",
3773
3782
  l.message
3774
- ] }) }) }) : a ? /* @__PURE__ */ i(q, { children: [
3783
+ ] }) }) }) : a ? /* @__PURE__ */ i(K, { children: [
3775
3784
  /* @__PURE__ */ i(de, { children: [
3776
3785
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: a.title || "Overview" }),
3777
3786
  a.description && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.description })
3778
3787
  ] }),
3779
- /* @__PURE__ */ r(K, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((m, x) => m.order - x.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3788
+ /* @__PURE__ */ r(j, { className: "space-y-8", children: a.steps && a.steps.length > 0 ? a.steps.sort((m, x) => m.order - x.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3780
3789
  /* @__PURE__ */ r("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ r("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: m.order + 1 }) }),
3781
3790
  /* @__PURE__ */ i(
3782
3791
  "div",
@@ -3801,7 +3810,7 @@ const Lr = ({
3801
3810
  ] })
3802
3811
  ] }) : null;
3803
3812
  };
3804
- function zr(e, t) {
3813
+ function $r(e, t) {
3805
3814
  const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
3806
3815
  if (e.isRequired && n)
3807
3816
  return e.errorMessage || `${e.displayName} is required`;
@@ -3831,14 +3840,14 @@ function zr(e, t) {
3831
3840
  }
3832
3841
  return null;
3833
3842
  }
3834
- function Br(e) {
3843
+ function zr(e) {
3835
3844
  const t = /* @__PURE__ */ new Map();
3836
3845
  return e.forEach((n, a) => {
3837
3846
  const s = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
3838
3847
  t.has(s) || t.set(s, []), t.get(s).push({ criterion: n, idx: a });
3839
3848
  }), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
3840
3849
  }
3841
- function $r(e) {
3850
+ function Br(e) {
3842
3851
  return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
3843
3852
  }
3844
3853
  const _r = ({
@@ -3846,88 +3855,88 @@ const _r = ({
3846
3855
  onComplete: t,
3847
3856
  onBack: n
3848
3857
  }) => {
3849
- const { criteria: a, initialAnswers: s, isLoading: o, isSubmitting: l, error: c, submit: u } = br(e), [m, x] = b({}), [p, y] = b({}), [g, h] = b(0), [S, F] = b(!1);
3858
+ const { criteria: a, initialAnswers: s, isLoading: o, isSubmitting: l, error: c, submit: u } = br(e), [m, x] = v({}), [p, y] = v({}), [g, h] = v(0), [C, F] = v(!1);
3850
3859
  fe.useEffect(() => {
3851
3860
  s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && x(s);
3852
3861
  }, [s]);
3853
- const w = Ae(
3854
- () => a && a.length > 0 ? Br(a) : [],
3862
+ const k = Ae(
3863
+ () => a && a.length > 0 ? zr(a) : [],
3855
3864
  [a]
3856
- ), M = g === w.length - 1, A = w[g] ?? [];
3865
+ ), O = g === k.length - 1, E = k[g] ?? [];
3857
3866
  fe.useEffect(() => {
3858
- !o && a && a.length === 0 && !S && !l && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3859
- }, [o, a, S, l, u, e, t]);
3860
- const I = Q((E, O) => {
3861
- x((P) => ({ ...P, [E]: O })), y((P) => {
3862
- const W = { ...P };
3863
- return delete W[E], W;
3867
+ !o && a && a.length === 0 && !C && !l && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3868
+ }, [o, a, C, l, u, e, t]);
3869
+ const R = Q((I, $) => {
3870
+ x((P) => ({ ...P, [I]: $ })), y((P) => {
3871
+ const Y = { ...P };
3872
+ return delete Y[I], Y;
3864
3873
  });
3865
3874
  }, []), H = Q(() => {
3866
- const E = {};
3867
- for (const { criterion: O } of A) {
3868
- const P = zr(O, m[O.id] ?? []);
3869
- P && (E[O.id] = P);
3875
+ const I = {};
3876
+ for (const { criterion: $ } of E) {
3877
+ const P = $r($, m[$.id] ?? []);
3878
+ P && (I[$.id] = P);
3870
3879
  }
3871
- return y((O) => ({ ...O, ...E })), Object.keys(E).length === 0;
3872
- }, [A, m]), J = () => {
3873
- H() && h((E) => E + 1);
3880
+ return y(($) => ({ ...$, ...I })), Object.keys(I).length === 0;
3881
+ }, [E, m]), J = () => {
3882
+ H() && h((I) => I + 1);
3874
3883
  }, f = () => {
3875
- g > 0 ? h((E) => E - 1) : n == null || n();
3876
- }, k = async () => {
3884
+ g > 0 ? h((I) => I - 1) : n == null || n();
3885
+ }, w = async () => {
3877
3886
  if (!(!H() || !a))
3878
3887
  try {
3879
- const E = a.map((P) => {
3880
- const W = (m[P.id] ?? []).filter((z) => z && z.trim());
3881
- return W.length > 0 ? { riskCriteriaId: P.id, values: W } : null;
3888
+ const I = a.map((P) => {
3889
+ const Y = (m[P.id] ?? []).filter((z) => z && z.trim());
3890
+ return Y.length > 0 ? { riskCriteriaId: P.id, values: Y } : null;
3882
3891
  }).filter((P) => P !== null);
3883
- await u({ applicantId: e, criteriaValueInputs: E }), t == null || t();
3884
- } catch (E) {
3885
- console.error("Risk scoring submit error:", E);
3892
+ await u({ applicantId: e, criteriaValueInputs: I }), t == null || t();
3893
+ } catch (I) {
3894
+ console.error("Risk scoring submit error:", I);
3886
3895
  }
3887
3896
  };
3888
- return o ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
3897
+ return o ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
3889
3898
  /* @__PURE__ */ r(ve, { className: "my-8" }),
3890
3899
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
3891
- ] }) }) : !o && a && a.length === 0 ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
3900
+ ] }) }) : !o && a && a.length === 0 ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
3892
3901
  /* @__PURE__ */ r(ve, { className: "my-8" }),
3893
3902
  /* @__PURE__ */ r("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
3894
- ] }) }) : c ? /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3903
+ ] }) }) : c ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3895
3904
  "Error loading criteria: ",
3896
3905
  c.message
3897
- ] }) }) }) : a ? /* @__PURE__ */ i(q, { children: [
3906
+ ] }) }) }) : a ? /* @__PURE__ */ i(K, { children: [
3898
3907
  /* @__PURE__ */ i(de, { children: [
3899
3908
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3900
3909
  /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
3901
- w.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3910
+ k.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3902
3911
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3903
3912
  "Page ",
3904
3913
  g + 1,
3905
3914
  " of ",
3906
- w.length
3915
+ k.length
3907
3916
  ] }),
3908
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: w.map((E, O) => /* @__PURE__ */ r(
3917
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: k.map((I, $) => /* @__PURE__ */ r(
3909
3918
  "div",
3910
3919
  {
3911
3920
  className: "rounded-full transition-all duration-200",
3912
3921
  style: {
3913
3922
  height: "6px",
3914
- width: O === g ? "20px" : "6px",
3915
- backgroundColor: O <= g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
3923
+ width: $ === g ? "20px" : "6px",
3924
+ backgroundColor: $ <= g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
3916
3925
  }
3917
3926
  },
3918
- O
3927
+ $
3919
3928
  )) })
3920
3929
  ] })
3921
3930
  ] }),
3922
- /* @__PURE__ */ r(K, { className: "space-y-6", children: A.map(({ criterion: E }) => /* @__PURE__ */ r(
3931
+ /* @__PURE__ */ r(j, { className: "space-y-6", children: E.map(({ criterion: I }) => /* @__PURE__ */ r(
3923
3932
  Ur,
3924
3933
  {
3925
- criterion: E,
3926
- value: m[E.id] ?? [],
3927
- error: p[E.id],
3928
- onChange: (O) => I(E.id, O)
3934
+ criterion: I,
3935
+ value: m[I.id] ?? [],
3936
+ error: p[I.id],
3937
+ onChange: ($) => R(I.id, $)
3929
3938
  },
3930
- E.id
3939
+ I.id
3931
3940
  )) }),
3932
3941
  /* @__PURE__ */ i(pe, { className: "flex items-center justify-between", children: [
3933
3942
  /* @__PURE__ */ i(
@@ -3943,7 +3952,7 @@ const _r = ({
3943
3952
  ]
3944
3953
  }
3945
3954
  ),
3946
- M ? /* @__PURE__ */ r(V, { type: "button", isLoading: l, onClick: k, children: "Continue" }) : /* @__PURE__ */ i(
3955
+ O ? /* @__PURE__ */ r(V, { type: "button", isLoading: l, onClick: w, children: "Continue" }) : /* @__PURE__ */ i(
3947
3956
  V,
3948
3957
  {
3949
3958
  type: "button",
@@ -3959,7 +3968,7 @@ const _r = ({
3959
3968
  c && /* @__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: c.message }) })
3960
3969
  ] }) : null;
3961
3970
  }, Ur = ({ criterion: e, value: t, error: n, onChange: a }) => {
3962
- const s = $r(e), o = e.valueDataType === Ee.Integer || e.valueDataType === Ee.Decimal || e.valueDataType === Ee.DigitOnly;
3971
+ const s = Br(e), o = e.valueDataType === Ee.Integer || e.valueDataType === Ee.Decimal || e.valueDataType === Ee.DigitOnly;
3963
3972
  return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
3964
3973
  /* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3965
3974
  e.displayName,
@@ -4080,7 +4089,7 @@ const _r = ({
4080
4089
  onComplete: t,
4081
4090
  onBack: n
4082
4091
  }) => {
4083
- const { investorCategorizationService: a } = ye(), [s, o] = b(null), [l, c] = b(!1), [u, m] = b(null);
4092
+ const { investorCategorizationService: a } = ye(), [s, o] = v(null), [l, c] = v(!1), [u, m] = v(null);
4084
4093
  return /* @__PURE__ */ r("form", { onSubmit: async (p) => {
4085
4094
  if (p.preventDefault(), s === null) {
4086
4095
  m("Please select an investor type");
@@ -4100,12 +4109,12 @@ const _r = ({
4100
4109
  } finally {
4101
4110
  c(!1);
4102
4111
  }
4103
- }, children: /* @__PURE__ */ i(q, { children: [
4112
+ }, children: /* @__PURE__ */ i(K, { children: [
4104
4113
  /* @__PURE__ */ i(de, { children: [
4105
4114
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: "Which statement best describes you?" }),
4106
4115
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: "All Tokenise clients are treated as Retail Investors under EU regulation, which gives you the highest level of investor protection. For our internal purposes, we ask you to select the description that best matches your situation" })
4107
4116
  ] }),
4108
- /* @__PURE__ */ i(K, { className: "space-y-4", children: [
4117
+ /* @__PURE__ */ i(j, { className: "space-y-4", children: [
4109
4118
  /* @__PURE__ */ r("p", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: "Choose one" }),
4110
4119
  /* @__PURE__ */ r(
4111
4120
  "label",
@@ -4218,7 +4227,7 @@ const _r = ({
4218
4227
  onComplete: t,
4219
4228
  onBack: n
4220
4229
  }) => {
4221
- const { appropriatenessTestService: a } = ye(), [s, o] = b(null), [l, c] = b(!0), [u, m] = b(!1), [x, p] = b(null), [y, g] = b({}), [h, S] = b(0), [F, w] = b(!1), [M, A] = b(!1), [I, H] = b(0);
4230
+ const { appropriatenessTestService: a } = ye(), [s, o] = v(null), [l, c] = v(!0), [u, m] = v(!1), [x, p] = v(null), [y, g] = v({}), [h, C] = v(0), [F, k] = v(!1), [O, E] = v(!1), [R, H] = v(0);
4222
4231
  re(() => {
4223
4232
  (async () => {
4224
4233
  try {
@@ -4249,28 +4258,28 @@ const _r = ({
4249
4258
  re(() => {
4250
4259
  if (!F || h <= 0) return;
4251
4260
  const z = setInterval(() => {
4252
- S((L) => L <= 1 ? (A(!0), 0) : L - 1);
4261
+ C((L) => L <= 1 ? (E(!0), 0) : L - 1);
4253
4262
  }, 1e3);
4254
4263
  return () => clearInterval(z);
4255
4264
  }, [F, h]), re(() => {
4256
- if (I <= 0) return;
4265
+ if (R <= 0) return;
4257
4266
  const z = setInterval(() => {
4258
4267
  H((L) => L <= 1 ? 0 : L - 1);
4259
4268
  }, 1e3);
4260
4269
  return () => clearInterval(z);
4261
- }, [I]), re(() => {
4262
- M && !u && O();
4263
- }, [M]);
4264
- const k = () => {
4265
- s && (w(!0), S(s.testDurationSec));
4266
- }, E = (z, L) => {
4270
+ }, [R]), re(() => {
4271
+ O && !u && $();
4272
+ }, [O]);
4273
+ const w = () => {
4274
+ s && (k(!0), C(s.testDurationSec));
4275
+ }, I = (z, L) => {
4267
4276
  g((Z) => ({
4268
4277
  ...Z,
4269
4278
  [z]: L
4270
4279
  }));
4271
- }, O = async (z) => {
4280
+ }, $ = async (z) => {
4272
4281
  if (z && z.preventDefault(), !!s) {
4273
- if (!M) {
4282
+ if (!O) {
4274
4283
  const L = s.appropriatenessQuestions.length - Object.keys(y).length;
4275
4284
  if (L > 0) {
4276
4285
  p(`Please answer all questions. ${L} question(s) remaining.`);
@@ -4293,16 +4302,16 @@ const _r = ({
4293
4302
  console.log("Submitting appropriateness test:", Z);
4294
4303
  try {
4295
4304
  const N = await a.fillAppropriatenessTest(Z);
4296
- console.log("Appropriateness test result:", N), N.message && (N.message.toLowerCase().includes("pass") || N.message.toLowerCase().includes("success") || N.message.toLowerCase().includes("congratulations")) ? t == null || t() : (p(N.message || "Test completed. Please check the result."), w(!1), A(!1), g({}), setTimeout(() => P(), 1e3));
4305
+ console.log("Appropriateness test result:", N), N.message && (N.message.toLowerCase().includes("pass") || N.message.toLowerCase().includes("success") || N.message.toLowerCase().includes("congratulations")) ? t == null || t() : (p(N.message || "Test completed. Please check the result."), k(!1), E(!1), g({}), setTimeout(() => P(), 1e3));
4297
4306
  } catch (N) {
4298
4307
  if (N.code === 400 && N.message) {
4299
4308
  const _ = N.message;
4300
- console.log("Test failed:", _), p(_), w(!1), A(!1), g({}), setTimeout(() => P(), 1500);
4309
+ console.log("Test failed:", _), p(_), k(!1), E(!1), g({}), setTimeout(() => P(), 1500);
4301
4310
  } else
4302
4311
  throw N;
4303
4312
  }
4304
4313
  } catch (L) {
4305
- console.error("Error submitting appropriateness test:", L), p(L.message || "Failed to submit test. Please try again."), w(!1), A(!1), g({});
4314
+ console.error("Error submitting appropriateness test:", L), p(L.message || "Failed to submit test. Please try again."), k(!1), E(!1), g({});
4306
4315
  } finally {
4307
4316
  m(!1);
4308
4317
  }
@@ -4321,31 +4330,31 @@ Failed to reload test data. Please refresh the page.`);
4321
4330
  }
4322
4331
  };
4323
4332
  if (l)
4324
- return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
4333
+ return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
4325
4334
  /* @__PURE__ */ r(ve, { className: "my-8" }),
4326
4335
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
4327
4336
  ] }) });
4328
4337
  if (!s)
4329
- return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { className: "py-12 text-center", children: [
4338
+ return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { className: "py-12 text-center", children: [
4330
4339
  /* @__PURE__ */ r("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
4331
4340
  x && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: x })
4332
4341
  ] }) });
4333
- if (I > 0)
4334
- return /* @__PURE__ */ i(q, { children: [
4342
+ if (R > 0)
4343
+ return /* @__PURE__ */ i(K, { children: [
4335
4344
  /* @__PURE__ */ i(de, { children: [
4336
4345
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
4337
4346
  s.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: s.subtitle })
4338
4347
  ] }),
4339
- /* @__PURE__ */ i(K, { className: "py-12 text-center", children: [
4348
+ /* @__PURE__ */ i(j, { className: "py-12 text-center", children: [
4340
4349
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
4341
- /* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: f(I) }),
4350
+ /* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: f(R) }),
4342
4351
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
4343
4352
  ] }),
4344
4353
  x && /* @__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: x }) })
4345
4354
  ] })
4346
4355
  ] });
4347
- const W = s.testAllowedMaxTry - s.totalFailedTries;
4348
- return F ? /* @__PURE__ */ r("form", { onSubmit: O, children: /* @__PURE__ */ i(q, { children: [
4356
+ const Y = s.testAllowedMaxTry - s.totalFailedTries;
4357
+ return F ? /* @__PURE__ */ r("form", { onSubmit: $, children: /* @__PURE__ */ i(K, { children: [
4349
4358
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4350
4359
  /* @__PURE__ */ i("div", { children: [
4351
4360
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
@@ -4362,7 +4371,7 @@ Failed to reload test data. Please refresh the page.`);
4362
4371
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
4363
4372
  ] })
4364
4373
  ] }) }),
4365
- /* @__PURE__ */ i(K, { className: "space-y-6", children: [
4374
+ /* @__PURE__ */ i(j, { className: "space-y-6", children: [
4366
4375
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
4367
4376
  /* @__PURE__ */ i(Ce, { variant: "info", children: [
4368
4377
  "Question ",
@@ -4370,10 +4379,10 @@ Failed to reload test data. Please refresh the page.`);
4370
4379
  " of ",
4371
4380
  s.totalQuestionCount
4372
4381
  ] }),
4373
- /* @__PURE__ */ i(Ce, { variant: W > 1 ? "success" : "warning", children: [
4374
- W,
4382
+ /* @__PURE__ */ i(Ce, { variant: Y > 1 ? "success" : "warning", children: [
4383
+ Y,
4375
4384
  " attempt",
4376
- W !== 1 ? "s" : "",
4385
+ Y !== 1 ? "s" : "",
4377
4386
  " remaining"
4378
4387
  ] })
4379
4388
  ] }),
@@ -4405,7 +4414,7 @@ Failed to reload test data. Please refresh the page.`);
4405
4414
  name: `question-${z.id}`,
4406
4415
  value: Z,
4407
4416
  checked: y[z.id] === Z,
4408
- onChange: (_) => E(z.id, _.target.value),
4417
+ onChange: (_) => I(z.id, _.target.value),
4409
4418
  className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
4410
4419
  disabled: u
4411
4420
  }
@@ -4419,12 +4428,12 @@ Failed to reload test data. Please refresh the page.`);
4419
4428
  },
4420
4429
  z.id
4421
4430
  )),
4422
- x && !M && /* @__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__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
4431
+ x && !O && /* @__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__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
4423
4432
  /* @__PURE__ */ r("strong", { children: "Error:" }),
4424
4433
  " ",
4425
4434
  x
4426
4435
  ] }) }),
4427
- M && /* @__PURE__ */ r("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
4436
+ O && /* @__PURE__ */ r("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
4428
4437
  /* @__PURE__ */ r("strong", { children: "Time's up!" }),
4429
4438
  " Your answers are being submitted automatically."
4430
4439
  ] }) })
@@ -4446,16 +4455,16 @@ Failed to reload test data. Please refresh the page.`);
4446
4455
  type: "submit",
4447
4456
  isLoading: u,
4448
4457
  disabled: Object.keys(y).length < s.totalQuestionCount,
4449
- children: M ? "Submitting..." : "Submit Test"
4458
+ children: O ? "Submitting..." : "Submit Test"
4450
4459
  }
4451
4460
  )
4452
4461
  ] })
4453
- ] }) }) : /* @__PURE__ */ i(q, { children: [
4462
+ ] }) }) : /* @__PURE__ */ i(K, { children: [
4454
4463
  /* @__PURE__ */ i(de, { children: [
4455
4464
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: s.displayName }),
4456
4465
  s.subtitle && /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: s.subtitle })
4457
4466
  ] }),
4458
- /* @__PURE__ */ i(K, { children: [
4467
+ /* @__PURE__ */ i(j, { children: [
4459
4468
  s.description && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg", children: /* @__PURE__ */ r("p", { className: "text-gray-700 dark:text-gray-300", children: s.description }) }),
4460
4469
  /* @__PURE__ */ i("div", { className: "space-y-4 mb-6", children: [
4461
4470
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
@@ -4472,7 +4481,7 @@ Failed to reload test data. Please refresh the page.`);
4472
4481
  ] }),
4473
4482
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4474
4483
  /* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
4475
- /* @__PURE__ */ r(Ce, { variant: W > 1 ? "success" : "warning", children: W })
4484
+ /* @__PURE__ */ r(Ce, { variant: Y > 1 ? "success" : "warning", children: Y })
4476
4485
  ] })
4477
4486
  ] }),
4478
4487
  x && /* @__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__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
@@ -4480,7 +4489,7 @@ Failed to reload test data. Please refresh the page.`);
4480
4489
  " ",
4481
4490
  x
4482
4491
  ] }) }),
4483
- W <= 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." }) })
4492
+ Y <= 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." }) })
4484
4493
  ] }),
4485
4494
  /* @__PURE__ */ i(pe, { className: "flex justify-between", children: [
4486
4495
  n && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: n, children: "Back" }),
@@ -4488,8 +4497,8 @@ Failed to reload test data. Please refresh the page.`);
4488
4497
  V,
4489
4498
  {
4490
4499
  type: "button",
4491
- onClick: k,
4492
- disabled: W <= 0,
4500
+ onClick: w,
4501
+ disabled: Y <= 0,
4493
4502
  children: "Start Test"
4494
4503
  }
4495
4504
  )
@@ -4501,7 +4510,7 @@ Failed to reload test data. Please refresh the page.`);
4501
4510
  onBack: n
4502
4511
  }) => {
4503
4512
  var Z, N, _, ne;
4504
- const { applicantService: a, baseInformationService: s, config: o } = ye(), { identityData: l, provider: c, token: u, isLoading: m, error: x, requestIdentity: p, restartIdentity: y } = xr(e), [g, h] = b(null), [S, F] = b(null), [w, M] = b([]), [A, I] = b(!0), [H, J] = b(!1), [f, k] = b(null), [E, O] = b(!1), P = fe.useRef(!1), W = kt({
4513
+ const { applicantService: a, baseInformationService: s, config: o } = ye(), { identityData: l, provider: c, token: u, isLoading: m, error: x, requestIdentity: p, restartIdentity: y } = xr(e), [g, h] = v(null), [C, F] = v(null), [k, O] = v([]), [E, R] = v(!0), [H, J] = v(!1), [f, w] = v(null), [I, $] = v(!1), P = fe.useRef(!1), Y = wt({
4505
4514
  defaultValues: {
4506
4515
  street: "",
4507
4516
  streetNumber: "",
@@ -4515,25 +4524,25 @@ Failed to reload test data. Please refresh the page.`);
4515
4524
  re(() => {
4516
4525
  (async () => {
4517
4526
  try {
4518
- const [D, C] = await Promise.all([
4527
+ const [D, A] = await Promise.all([
4519
4528
  a.getApplicantData(e),
4520
4529
  s.getCountries("", "en")
4521
4530
  ]);
4522
4531
  F(D);
4523
- const U = /* @__PURE__ */ new Set(), ee = C.filter((he) => {
4532
+ const U = /* @__PURE__ */ new Set(), ee = A.filter((he) => {
4524
4533
  const Oe = he.abbreviation3 || he.abbreviation;
4525
4534
  return !Oe || U.has(Oe) ? !1 : (U.add(Oe), !0);
4526
4535
  });
4527
- M(ee);
4528
- const j = D.applicantRequestData;
4529
- if (W.reset({
4530
- street: (j == null ? void 0 : j.street) || "",
4531
- streetNumber: (j == null ? void 0 : j.streetNumber) || "",
4532
- city: (j == null ? void 0 : j.city) || "",
4533
- zip: (j == null ? void 0 : j.zip) || "",
4534
- country: (j == null ? void 0 : j.country) || "",
4535
- nationality: (j == null ? void 0 : j.nationality) || "",
4536
- phonenumber: (j == null ? void 0 : j.phonenumber) || ""
4536
+ O(ee);
4537
+ const W = D.applicantRequestData;
4538
+ if (Y.reset({
4539
+ street: (W == null ? void 0 : W.street) || "",
4540
+ streetNumber: (W == null ? void 0 : W.streetNumber) || "",
4541
+ city: (W == null ? void 0 : W.city) || "",
4542
+ zip: (W == null ? void 0 : W.zip) || "",
4543
+ country: (W == null ? void 0 : W.country) || "",
4544
+ nationality: (W == null ? void 0 : W.nationality) || "",
4545
+ phonenumber: (W == null ? void 0 : W.phonenumber) || ""
4537
4546
  }), D.kycRecords && D.kycRecords.length > 0 && D.kycRecords[0].providerTokenObject !== null && !P.current) {
4538
4547
  console.log("[Identity] Found existing identity verification, auto-requesting..."), P.current = !0;
4539
4548
  try {
@@ -4545,7 +4554,7 @@ Failed to reload test data. Please refresh the page.`);
4545
4554
  } catch (D) {
4546
4555
  console.error("Error loading applicant data:", D);
4547
4556
  } finally {
4548
- I(!1);
4557
+ R(!1);
4549
4558
  }
4550
4559
  })();
4551
4560
  }, [e]), re(() => {
@@ -4555,7 +4564,7 @@ Failed to reload test data. Please refresh the page.`);
4555
4564
  if (u.expiresAt) {
4556
4565
  const B = new Date(u.expiresAt).getTime();
4557
4566
  if (Date.now() >= B) {
4558
- console.warn("[Identity] Token has expired (expiresAt)"), O(!0), k("Your verification session has expired. Please restart.");
4567
+ console.warn("[Identity] Token has expired (expiresAt)"), $(!0), w("Your verification session has expired. Please restart.");
4559
4568
  return;
4560
4569
  }
4561
4570
  }
@@ -4563,22 +4572,22 @@ Failed to reload test data. Please refresh the page.`);
4563
4572
  try {
4564
4573
  const D = new URL(u.url).toString().toLowerCase();
4565
4574
  if (D.includes("expired") || D.includes("invalid") || D.includes("error")) {
4566
- console.warn("[Identity] Token URL indicates expiration"), O(!0), k("Your verification link has expired. Please restart.");
4575
+ console.warn("[Identity] Token URL indicates expiration"), $(!0), w("Your verification link has expired. Please restart.");
4567
4576
  return;
4568
4577
  }
4569
4578
  } catch {
4570
4579
  console.error("[Identity] Invalid token URL");
4571
4580
  }
4572
4581
  if (u.status === "expired" || u.error === "expired" || u.expired === !0) {
4573
- console.warn("[Identity] Token object indicates expiration"), O(!0), k("Your verification session has expired. Please restart.");
4582
+ console.warn("[Identity] Token object indicates expiration"), $(!0), w("Your verification session has expired. Please restart.");
4574
4583
  return;
4575
4584
  }
4576
4585
  }
4577
4586
  }, [u]), re(() => {
4578
- if (c !== null && u && !g && H && !E) {
4587
+ if (c !== null && u && !g && H && !I) {
4579
4588
  const B = c;
4580
4589
  if (u.url) {
4581
- console.log("[Identity] Loading provider URL for user verification:", u.url), k(null);
4590
+ console.log("[Identity] Loading provider URL for user verification:", u.url), w(null);
4582
4591
  try {
4583
4592
  if (new URL(u.url), B === xe.SardinAI) {
4584
4593
  console.log("[SardinAI] Initializing Risk SDK in background...");
@@ -4595,42 +4604,42 @@ Failed to reload test data. Please refresh the page.`);
4595
4604
  }
4596
4605
  h({ type: "url", url: u.url });
4597
4606
  } catch (D) {
4598
- console.error("[Identity] Invalid URL:", D), k("Invalid verification URL. Please restart."), O(!0);
4607
+ console.error("[Identity] Invalid URL:", D), w("Invalid verification URL. Please restart."), $(!0);
4599
4608
  }
4600
4609
  return;
4601
4610
  }
4602
4611
  if (B === xe.SardinAI) {
4603
- console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), k(null);
4612
+ console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), w(null);
4604
4613
  try {
4605
- const D = Te.parseProviderConfig(c, u, o), C = Te.createProvider(c, D);
4606
- C.initialize().then(() => {
4607
- console.log("[SardinAI] Risk SDK initialized successfully"), h(C), setTimeout(() => {
4614
+ const D = Te.parseProviderConfig(c, u, o), A = Te.createProvider(c, D);
4615
+ A.initialize().then(() => {
4616
+ console.log("[SardinAI] Risk SDK initialized successfully"), h(A), setTimeout(() => {
4608
4617
  t == null || t();
4609
4618
  }, 2e3);
4610
4619
  }).catch((U) => {
4611
- var j;
4620
+ var W;
4612
4621
  console.error("[SardinAI] Failed to initialize:", U);
4613
- const ee = ((j = U.message) == null ? void 0 : j.toLowerCase()) || "";
4614
- ee.includes("expired") || ee.includes("invalid") || ee.includes("401") || ee.includes("400") ? (O(!0), k("Session expired or invalid. Please restart verification.")) : k(`Failed to initialize: ${U.message}`);
4622
+ const ee = ((W = U.message) == null ? void 0 : W.toLowerCase()) || "";
4623
+ ee.includes("expired") || ee.includes("invalid") || ee.includes("401") || ee.includes("400") ? ($(!0), w("Session expired or invalid. Please restart verification.")) : w(`Failed to initialize: ${U.message}`);
4615
4624
  });
4616
4625
  } catch (D) {
4617
- console.error("[SardinAI] Error creating provider:", D), k(`Configuration error: ${D.message}`);
4626
+ console.error("[SardinAI] Error creating provider:", D), w(`Configuration error: ${D.message}`);
4618
4627
  }
4619
4628
  return;
4620
4629
  }
4621
4630
  try {
4622
- k(null);
4623
- const D = Te.parseProviderConfig(c, u, o), C = Te.createProvider(c, D);
4624
- B === xe.Sumsub ? (C.initialize("identity-container").catch((U) => {
4631
+ w(null);
4632
+ const D = Te.parseProviderConfig(c, u, o), A = Te.createProvider(c, D);
4633
+ B === xe.Sumsub ? (A.initialize("identity-container").catch((U) => {
4625
4634
  var ee;
4626
- console.error("[Sumsub] Initialization error:", U), k(`Failed to initialize: ${U.message}`), (ee = U.message) != null && ee.toLowerCase().includes("expired") && O(!0);
4627
- }), C.onComplete && C.onComplete(() => {
4635
+ console.error("[Sumsub] Initialization error:", U), w(`Failed to initialize: ${U.message}`), (ee = U.message) != null && ee.toLowerCase().includes("expired") && $(!0);
4636
+ }), A.onComplete && A.onComplete(() => {
4628
4637
  t == null || t();
4629
- })) : B === xe.Onfido && C.initialize("identity-container").catch((U) => {
4630
- console.error("[Onfido] Initialization error:", U), k(`Failed to initialize: ${U.message}`);
4631
- }), h(C);
4638
+ })) : B === xe.Onfido && A.initialize("identity-container").catch((U) => {
4639
+ console.error("[Onfido] Initialization error:", U), w(`Failed to initialize: ${U.message}`);
4640
+ }), h(A);
4632
4641
  } catch (D) {
4633
- console.error("[Identity] Provider setup error:", D), k(`Setup error: ${D.message}`);
4642
+ console.error("[Identity] Provider setup error:", D), w(`Setup error: ${D.message}`);
4634
4643
  }
4635
4644
  }
4636
4645
  return () => {
@@ -4641,34 +4650,34 @@ Failed to reload test data. Please refresh the page.`);
4641
4650
  console.error("[Identity] Error destroying provider:", B);
4642
4651
  }
4643
4652
  };
4644
- }, [c, u, g, H, t, E]);
4653
+ }, [c, u, g, H, t, I]);
4645
4654
  const z = async () => {
4646
4655
  try {
4647
- k(null), O(!1), await p(), J(!0);
4656
+ w(null), $(!1), await p(), J(!0);
4648
4657
  } catch (B) {
4649
4658
  console.error("Error starting identity verification:", B);
4650
4659
  }
4651
4660
  }, L = async () => {
4652
4661
  try {
4653
- k(null), O(!1), h(null), console.log("[Identity] Restarting verification..."), await y(), J(!0);
4662
+ w(null), $(!1), h(null), console.log("[Identity] Restarting verification..."), await y(), J(!0);
4654
4663
  } catch (B) {
4655
- console.error("Error restarting identity verification:", B), k(B.message || "Failed to restart verification");
4664
+ console.error("Error restarting identity verification:", B), w(B.message || "Failed to restart verification");
4656
4665
  }
4657
4666
  };
4658
- if (A || m)
4659
- return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
4667
+ if (E || m)
4668
+ return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
4660
4669
  /* @__PURE__ */ r(ve, { className: "my-8" }),
4661
4670
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
4662
4671
  ] }) });
4663
4672
  if (x)
4664
- return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4673
+ return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
4665
4674
  "Error: ",
4666
4675
  x.message
4667
4676
  ] }) }) });
4668
- if (H && (f || E))
4669
- return /* @__PURE__ */ i(q, { children: [
4677
+ if (H && (f || I))
4678
+ return /* @__PURE__ */ i(K, { children: [
4670
4679
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4671
- /* @__PURE__ */ i(K, { children: [
4680
+ /* @__PURE__ */ i(j, { children: [
4672
4681
  /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg mb-6", children: /* @__PURE__ */ i("div", { className: "flex items-start", children: [
4673
4682
  /* @__PURE__ */ r(
4674
4683
  "svg",
@@ -4689,7 +4698,7 @@ Failed to reload test data. Please refresh the page.`);
4689
4698
  }
4690
4699
  ),
4691
4700
  /* @__PURE__ */ i("div", { children: [
4692
- /* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: E ? "Session Expired" : "Verification Error" }),
4701
+ /* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: I ? "Session Expired" : "Verification Error" }),
4693
4702
  /* @__PURE__ */ r("p", { className: "text-red-800 dark:text-red-200 text-sm", children: f || "Your verification session has expired and needs to be restarted." })
4694
4703
  ] })
4695
4704
  ] }) }),
@@ -4709,7 +4718,7 @@ Failed to reload test data. Please refresh the page.`);
4709
4718
  ] });
4710
4719
  if (H && l) {
4711
4720
  const B = c;
4712
- return u != null && u.url ? /* @__PURE__ */ i(q, { children: [
4721
+ return u != null && u.url ? /* @__PURE__ */ i(K, { children: [
4713
4722
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4714
4723
  /* @__PURE__ */ i("div", { children: [
4715
4724
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
@@ -4727,7 +4736,7 @@ Failed to reload test data. Please refresh the page.`);
4727
4736
  }
4728
4737
  )
4729
4738
  ] }) }),
4730
- /* @__PURE__ */ i(K, { children: [
4739
+ /* @__PURE__ */ i(j, { children: [
4731
4740
  /* @__PURE__ */ r("div", { className: "mb-4 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-yellow-800 dark:text-yellow-200 text-sm", children: [
4732
4741
  /* @__PURE__ */ r("strong", { children: "Important:" }),
4733
4742
  ' If you see an "expired" or "invalid link" message below, click the "Restart" button above to generate a new verification session.'
@@ -4740,13 +4749,13 @@ Failed to reload test data. Please refresh the page.`);
4740
4749
  allow: "camera; microphone; geolocation",
4741
4750
  title: "Identity Verification",
4742
4751
  onLoad: (D) => {
4743
- var C, U, ee;
4752
+ var A, U, ee;
4744
4753
  console.log("[Identity] Iframe loaded");
4745
4754
  try {
4746
- const j = D.target, Ne = j.contentDocument || ((C = j.contentWindow) == null ? void 0 : C.document);
4747
- if (Ne) {
4748
- const he = ((ee = (U = Ne.body) == null ? void 0 : U.textContent) == null ? void 0 : ee.toLowerCase()) || "";
4749
- (he.includes("expired") || he.includes("invalid") || he.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), O(!0), k("Your verification link has expired."));
4755
+ const W = D.target, Se = W.contentDocument || ((A = W.contentWindow) == null ? void 0 : A.document);
4756
+ if (Se) {
4757
+ const he = ((ee = (U = Se.body) == null ? void 0 : U.textContent) == null ? void 0 : ee.toLowerCase()) || "";
4758
+ (he.includes("expired") || he.includes("invalid") || he.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), $(!0), w("Your verification link has expired."));
4750
4759
  }
4751
4760
  } catch {
4752
4761
  console.log("[Identity] Cannot check iframe content (CORS)");
@@ -4756,47 +4765,47 @@ Failed to reload test data. Please refresh the page.`);
4756
4765
  ) })
4757
4766
  ] }),
4758
4767
  n && /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(V, { variant: "outline", onClick: n, children: "Back" }) })
4759
- ] }) : B === xe.SardinAI ? /* @__PURE__ */ i(q, { children: [
4768
+ ] }) : B === xe.SardinAI ? /* @__PURE__ */ i(K, { children: [
4760
4769
  /* @__PURE__ */ i(de, { children: [
4761
4770
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4762
4771
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4763
4772
  ] }),
4764
- /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
4773
+ /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
4765
4774
  /* @__PURE__ */ r(ve, { className: "mb-4" }),
4766
4775
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4767
4776
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
4768
4777
  ] }) })
4769
- ] }) : /* @__PURE__ */ i(q, { children: [
4778
+ ] }) : /* @__PURE__ */ i(K, { children: [
4770
4779
  /* @__PURE__ */ i(de, { children: [
4771
4780
  /* @__PURE__ */ r("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
4772
4781
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4773
4782
  ] }),
4774
- /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4783
+ /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4775
4784
  n && /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(V, { variant: "outline", onClick: n, children: "Back" }) })
4776
4785
  ] });
4777
4786
  }
4778
- return /* @__PURE__ */ r("form", { onSubmit: W.handleSubmit(z), children: /* @__PURE__ */ i(q, { children: [
4787
+ return /* @__PURE__ */ r("form", { onSubmit: Y.handleSubmit(z), children: /* @__PURE__ */ i(K, { children: [
4779
4788
  /* @__PURE__ */ i(de, { children: [
4780
4789
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Review Your Information" }),
4781
4790
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
4782
4791
  ] }),
4783
- /* @__PURE__ */ i(K, { className: "space-y-6", children: [
4792
+ /* @__PURE__ */ i(j, { className: "space-y-6", children: [
4784
4793
  /* @__PURE__ */ i("div", { className: "space-y-4 pb-4 border-b border-gray-200 dark:border-gray-700", children: [
4785
4794
  /* @__PURE__ */ i("div", { children: [
4786
4795
  /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
4787
4796
  /* @__PURE__ */ i("p", { className: "mt-1 text-base", children: [
4788
- (Z = S == null ? void 0 : S.applicantRequestData) == null ? void 0 : Z.firstName,
4797
+ (Z = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : Z.firstName,
4789
4798
  " ",
4790
- (N = S == null ? void 0 : S.applicantRequestData) == null ? void 0 : N.lastName
4799
+ (N = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : N.lastName
4791
4800
  ] })
4792
4801
  ] }),
4793
4802
  /* @__PURE__ */ i("div", { children: [
4794
4803
  /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Email" }),
4795
- /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: (_ = S == null ? void 0 : S.applicantRequestData) == null ? void 0 : _.email })
4804
+ /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: (_ = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : _.email })
4796
4805
  ] }),
4797
4806
  /* @__PURE__ */ i("div", { children: [
4798
4807
  /* @__PURE__ */ r("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4799
- /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((ne = S == null ? void 0 : S.applicantRequestData) == null ? void 0 : ne.dateOfBirth) || "Not provided" })
4808
+ /* @__PURE__ */ r("p", { className: "mt-1 text-base", children: ((ne = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : ne.dateOfBirth) || "Not provided" })
4800
4809
  ] })
4801
4810
  ] }),
4802
4811
  /* @__PURE__ */ i("div", { className: "space-y-4", children: [
@@ -4805,7 +4814,7 @@ Failed to reload test data. Please refresh the page.`);
4805
4814
  /* @__PURE__ */ r(
4806
4815
  Re,
4807
4816
  {
4808
- control: W.control,
4817
+ control: Y.control,
4809
4818
  name: "country",
4810
4819
  render: ({ field: B }) => /* @__PURE__ */ r(
4811
4820
  _e,
@@ -4814,7 +4823,7 @@ Failed to reload test data. Please refresh the page.`);
4814
4823
  label: "Country",
4815
4824
  options: [
4816
4825
  { value: "", label: "Select country..." },
4817
- ...w.map((D) => ({
4826
+ ...k.map((D) => ({
4818
4827
  value: D.abbreviation3 || D.abbreviation,
4819
4828
  label: D.name
4820
4829
  }))
@@ -4826,7 +4835,7 @@ Failed to reload test data. Please refresh the page.`);
4826
4835
  /* @__PURE__ */ r(
4827
4836
  Re,
4828
4837
  {
4829
- control: W.control,
4838
+ control: Y.control,
4830
4839
  name: "nationality",
4831
4840
  render: ({ field: B }) => /* @__PURE__ */ r(
4832
4841
  _e,
@@ -4835,7 +4844,7 @@ Failed to reload test data. Please refresh the page.`);
4835
4844
  label: "Nationality",
4836
4845
  options: [
4837
4846
  { value: "", label: "Select nationality..." },
4838
- ...w.map((D) => ({
4847
+ ...k.map((D) => ({
4839
4848
  value: D.abbreviation3 || D.abbreviation,
4840
4849
  label: D.name
4841
4850
  }))
@@ -4849,7 +4858,7 @@ Failed to reload test data. Please refresh the page.`);
4849
4858
  /* @__PURE__ */ r(
4850
4859
  Re,
4851
4860
  {
4852
- control: W.control,
4861
+ control: Y.control,
4853
4862
  name: "street",
4854
4863
  render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Street" })
4855
4864
  }
@@ -4857,7 +4866,7 @@ Failed to reload test data. Please refresh the page.`);
4857
4866
  /* @__PURE__ */ r(
4858
4867
  Re,
4859
4868
  {
4860
- control: W.control,
4869
+ control: Y.control,
4861
4870
  name: "streetNumber",
4862
4871
  render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Street Number" })
4863
4872
  }
@@ -4867,7 +4876,7 @@ Failed to reload test data. Please refresh the page.`);
4867
4876
  /* @__PURE__ */ r(
4868
4877
  Re,
4869
4878
  {
4870
- control: W.control,
4879
+ control: Y.control,
4871
4880
  name: "city",
4872
4881
  render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "City" })
4873
4882
  }
@@ -4875,7 +4884,7 @@ Failed to reload test data. Please refresh the page.`);
4875
4884
  /* @__PURE__ */ r(
4876
4885
  Re,
4877
4886
  {
4878
- control: W.control,
4887
+ control: Y.control,
4879
4888
  name: "zip",
4880
4889
  render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "ZIP/Postal Code" })
4881
4890
  }
@@ -4884,7 +4893,7 @@ Failed to reload test data. Please refresh the page.`);
4884
4893
  /* @__PURE__ */ r(
4885
4894
  Re,
4886
4895
  {
4887
- control: W.control,
4896
+ control: Y.control,
4888
4897
  name: "phonenumber",
4889
4898
  render: ({ field: B }) => /* @__PURE__ */ r(me, { ...B, label: "Phone Number", type: "tel" })
4890
4899
  }
@@ -4975,8 +4984,8 @@ Failed to reload test data. Please refresh the page.`);
4975
4984
  iconColor: "text-blue-600 dark:text-blue-400",
4976
4985
  message: "Your application is being reviewed."
4977
4986
  };
4978
- return /* @__PURE__ */ i(q, { children: [
4979
- /* @__PURE__ */ i(K, { className: "py-12", children: [
4987
+ return /* @__PURE__ */ i(K, { children: [
4988
+ /* @__PURE__ */ i(j, { className: "py-12", children: [
4980
4989
  /* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
4981
4990
  "div",
4982
4991
  {
@@ -5031,7 +5040,7 @@ Failed to reload test data. Please refresh the page.`);
5031
5040
  ] }),
5032
5041
  /* @__PURE__ */ i(pe, { className: "flex justify-center gap-4", children: [
5033
5042
  c.type === "success" && s && /* @__PURE__ */ r(V, { onClick: s, size: "lg", children: "Continue" }),
5034
- c.type === "error" && /* @__PURE__ */ i(wt, { children: [
5043
+ c.type === "error" && /* @__PURE__ */ i(kt, { children: [
5035
5044
  o && /* @__PURE__ */ r(V, { variant: "outline", onClick: o, children: "Contact Support" }),
5036
5045
  s && /* @__PURE__ */ r(V, { onClick: s, children: "Try Again" })
5037
5046
  ] }),
@@ -5078,7 +5087,7 @@ Failed to reload test data. Please refresh the page.`);
5078
5087
  function He(e) {
5079
5088
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
5080
5089
  }
5081
- const $e = {
5090
+ const Be = {
5082
5091
  width: "16px",
5083
5092
  height: "16px",
5084
5093
  minWidth: "16px",
@@ -5106,25 +5115,25 @@ const $e = {
5106
5115
  () => l != null && l.applicantFormPages && l.applicantFormPages.length > 0 ? l.applicantFormPages : null,
5107
5116
  [l == null ? void 0 : l.applicantFormPages]
5108
5117
  ), y = Ae(() => {
5109
- const d = new Set(Ye), $ = l == null ? void 0 : l.applicantFormRequiredFields;
5110
- if ($) for (const T of $) d.add(T);
5118
+ const d = new Set(Ye), M = l == null ? void 0 : l.applicantFormRequiredFields;
5119
+ if (M) for (const T of M) d.add(T);
5111
5120
  if (p)
5112
5121
  for (const T of p)
5113
- for (const v of T.fields)
5114
- !v.isCustom && v.name && v.required && d.add(v.name);
5122
+ for (const b of T.fields)
5123
+ !b.isCustom && b.name && b.required && d.add(b.name);
5115
5124
  return Array.from(d);
5116
5125
  }, [l == null ? void 0 : l.applicantFormRequiredFields, p]), g = Ae(() => {
5117
5126
  var T;
5118
5127
  if (p) {
5119
- const v = p.flatMap((Y) => Y.fields).filter((Y) => !Y.isCustom && Y.name).map((Y) => Y.name), R = new Set(v);
5120
- for (const Y of Ye) R.add(Y);
5121
- return Array.from(R);
5128
+ const b = p.flatMap((q) => q.fields).filter((q) => !q.isCustom && q.name).map((q) => q.name), S = new Set(b);
5129
+ for (const q of Ye) S.add(q);
5130
+ return Array.from(S);
5122
5131
  }
5123
5132
  let d;
5124
5133
  (T = s.applicantForm) != null && T.visibleFields ? d = s.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? d = l.applicantFormVisibleFields : d = Tt;
5125
- const $ = new Set(d);
5126
- for (const v of Ye) $.add(v);
5127
- return Array.from($);
5134
+ const M = new Set(d);
5135
+ for (const b of Ye) M.add(b);
5136
+ return Array.from(M);
5128
5137
  }, [(Xe = s.applicantForm) == null ? void 0 : Xe.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, p]), h = /* @__PURE__ */ new Set([
5129
5138
  "country",
5130
5139
  "nationality",
@@ -5132,49 +5141,49 @@ const $e = {
5132
5141
  "countryOfBirth",
5133
5142
  "mobileCountryCode",
5134
5143
  "otherNationality"
5135
- ]), S = Ae(() => {
5136
- var $, T;
5144
+ ]), C = Ae(() => {
5145
+ var M, T;
5137
5146
  const d = /* @__PURE__ */ new Set();
5138
5147
  if (p)
5139
- for (const v of p)
5140
- for (const R of v.fields)
5141
- !R.isCustom && R.name && h.has(R.name) && d.add(R.countriesType ?? (($ = Le[R.name]) == null ? void 0 : $.countriesType));
5148
+ for (const b of p)
5149
+ for (const S of b.fields)
5150
+ !S.isCustom && S.name && h.has(S.name) && d.add(S.countriesType ?? ((M = Le[S.name]) == null ? void 0 : M.countriesType));
5142
5151
  else
5143
- for (const v of g)
5144
- h.has(v) && d.add((T = Le[v]) == null ? void 0 : T.countriesType);
5152
+ for (const b of g)
5153
+ h.has(b) && d.add((T = Le[b]) == null ? void 0 : T.countriesType);
5145
5154
  return d.size === 0 && d.add(void 0), Array.from(d);
5146
- }, [g, p]), [F, w] = b({}), [M, A] = b(!0), I = X(!1), H = X(/* @__PURE__ */ new Set());
5155
+ }, [g, p]), [F, k] = v({}), [O, E] = v(!0), R = X(!1), H = X(/* @__PURE__ */ new Set());
5147
5156
  re(() => {
5148
- if (I.current || S.length === 0) return;
5149
- const d = S.filter((T) => {
5150
- const v = T != null ? String(T) : "all";
5151
- return !H.current.has(v);
5157
+ if (R.current || C.length === 0) return;
5158
+ const d = C.filter((T) => {
5159
+ const b = T != null ? String(T) : "all";
5160
+ return !H.current.has(b);
5152
5161
  });
5153
5162
  if (d.length === 0) {
5154
- A(!1);
5163
+ E(!1);
5155
5164
  return;
5156
5165
  }
5157
- I.current = !0, A(!0), (async () => {
5166
+ R.current = !0, E(!0), (async () => {
5158
5167
  try {
5159
5168
  const T = await Promise.all(
5160
- d.map(async (v) => {
5161
- const R = v != null ? String(v) : "all", Y = await o.getCountries("", s.locale || "en", v), ae = /* @__PURE__ */ new Set(), se = Y.map((ie) => ({ value: ie.abbreviation3 || ie.abbreviation, label: ie.name })).filter((ie) => !ie.value || ae.has(ie.value) ? !1 : (ae.add(ie.value), !0));
5162
- return H.current.add(R), [R, se];
5169
+ d.map(async (b) => {
5170
+ const S = b != null ? String(b) : "all", q = await o.getCountries("", s.locale || "en", b), ae = /* @__PURE__ */ new Set(), se = q.map((ie) => ({ value: ie.abbreviation3 || ie.abbreviation, label: ie.name })).filter((ie) => !ie.value || ae.has(ie.value) ? !1 : (ae.add(ie.value), !0));
5171
+ return H.current.add(S), [S, se];
5163
5172
  })
5164
5173
  );
5165
- w((v) => ({ ...v, ...Object.fromEntries(T) }));
5174
+ k((b) => ({ ...b, ...Object.fromEntries(T) }));
5166
5175
  } catch (T) {
5167
5176
  console.error("Failed to load countries:", T);
5168
5177
  } finally {
5169
- A(!1), I.current = !1;
5178
+ E(!1), R.current = !1;
5170
5179
  }
5171
5180
  })();
5172
- }, [S]);
5173
- const J = (d, $) => {
5174
- var R;
5175
- const T = $ ?? ((R = Le[d]) == null ? void 0 : R.countriesType), v = T != null ? String(T) : "all";
5176
- return F[v] || [];
5177
- }, [f, k] = b({
5181
+ }, [C]);
5182
+ const J = (d, M) => {
5183
+ var S;
5184
+ const T = M ?? ((S = Le[d]) == null ? void 0 : S.countriesType), b = T != null ? String(T) : "all";
5185
+ return F[b] || [];
5186
+ }, [f, w] = v({
5178
5187
  workflowKey: m,
5179
5188
  firstName: "",
5180
5189
  lastName: "",
@@ -5199,41 +5208,42 @@ const $e = {
5199
5208
  educationLevel: "",
5200
5209
  occupation: "",
5201
5210
  taxNumber: ""
5202
- }), [E, O] = b({}), [P, W] = b(0), [z, L] = b({}), [Z, N] = b(null), [_, ne] = b(!1), B = (d, $) => k((T) => ({ ...T, [d]: $ })), D = (d, $) => O((T) => ({ ...T, [d]: $ })), C = (d) => !d.conditionalOn || E[d.conditionalOn] === "true", U = p && P < p.length - 1 ? P + 1 : -1, ee = p && P > 0 ? P - 1 : -1, j = (d) => {
5211
+ }), [I, $] = v({}), [P, Y] = v(0), [z, L] = v({}), [Z, N] = v(null), [_, ne] = v(!1), B = (d, M) => w((T) => ({ ...T, [d]: M })), D = (d, M) => $((T) => ({ ...T, [d]: M })), A = (d) => !d.conditionalOn || I[d.conditionalOn] === "true", U = p && P < p.length - 1 ? P + 1 : -1, ee = p && P > 0 ? P - 1 : -1, W = (d) => {
5203
5212
  var T;
5204
- const $ = {};
5205
- for (const v of d.fields)
5206
- if (v.isCustom) {
5207
- if (v.required && v.paramName) {
5208
- const R = E[v.paramName], Y = v.displayText || v.label || v.paramName;
5209
- v.customType === "checkbox" || v.customType === "link_checkbox" ? R !== "true" && ($[v.paramName] = `${Y} is required.`) : (!R || R.trim() === "") && ($[v.paramName] = `${Y} is required.`);
5213
+ const M = {};
5214
+ for (const b of d.fields)
5215
+ if (b.isCustom) {
5216
+ if (b.customType === "paragraph" || b.customType === "br") continue;
5217
+ if (b.required && b.paramName) {
5218
+ const S = I[b.paramName], q = b.displayText || b.label || b.paramName;
5219
+ b.customType === "checkbox" || b.customType === "link_checkbox" ? S !== "true" && (M[b.paramName] = `${q} is required.`) : (!S || S.trim() === "") && (M[b.paramName] = `${q} is required.`);
5210
5220
  }
5211
- } else if (v.name) {
5212
- const R = v.name;
5213
- if (y.includes(R) && He(f[R])) {
5214
- const Y = v.displayText || ((T = Le[R]) == null ? void 0 : T.label) || R;
5215
- $[R] = `${Y} is required.`;
5221
+ } else if (b.name) {
5222
+ const S = b.name;
5223
+ if (y.includes(S) && He(f[S])) {
5224
+ const q = b.displayText || ((T = Le[S]) == null ? void 0 : T.label) || S;
5225
+ M[S] = `${q} is required.`;
5216
5226
  }
5217
5227
  }
5218
- return $;
5219
- }, Ne = async () => {
5228
+ return M;
5229
+ }, Se = async () => {
5220
5230
  if (!p) return;
5221
5231
  const d = p[P];
5222
- if (d.conditionalOn && !C(d)) {
5223
- L({}), U >= 0 ? W(U) : await he();
5232
+ if (d.conditionalOn && !A(d)) {
5233
+ L({}), U >= 0 ? Y(U) : await he();
5224
5234
  return;
5225
5235
  }
5226
- const $ = j(d);
5227
- if (Object.keys($).length > 0) {
5228
- L($);
5236
+ const M = W(d);
5237
+ if (Object.keys(M).length > 0) {
5238
+ L(M);
5229
5239
  return;
5230
5240
  }
5231
- L({}), U >= 0 ? W(U) : await he();
5241
+ L({}), U >= 0 ? Y(U) : await he();
5232
5242
  }, he = async () => {
5233
5243
  if (p) {
5234
5244
  let d = {};
5235
- for (const $ of p)
5236
- C($) && (d = { ...d, ...j($) });
5245
+ for (const M of p)
5246
+ A(M) && (d = { ...d, ...W(M) });
5237
5247
  if (Object.keys(d).length > 0) {
5238
5248
  L(d);
5239
5249
  return;
@@ -5250,32 +5260,32 @@ const $e = {
5250
5260
  externalRefId: f.externalRefId.trim()
5251
5261
  };
5252
5262
  if (p) {
5253
- for (const v of p)
5254
- if (C(v)) {
5255
- for (const R of v.fields)
5256
- if (!R.isCustom && R.name) {
5257
- const Y = R.name, ae = f[Y];
5258
- He(ae) || (d[Y] = ae);
5263
+ for (const b of p)
5264
+ if (A(b)) {
5265
+ for (const S of b.fields)
5266
+ if (!S.isCustom && S.name) {
5267
+ const q = S.name, ae = f[q];
5268
+ He(ae) || (d[q] = ae);
5259
5269
  }
5260
5270
  }
5261
5271
  } else
5262
- g.forEach((v) => {
5263
- if (v === "externalRefId") return;
5264
- const R = f[v];
5265
- He(R) || (d[v] = R);
5272
+ g.forEach((b) => {
5273
+ if (b === "externalRefId") return;
5274
+ const S = f[b];
5275
+ He(S) || (d[b] = S);
5266
5276
  });
5267
- const $ = [];
5277
+ const M = [];
5268
5278
  if (p) {
5269
- for (const v of p)
5270
- if (C(v)) {
5271
- for (const R of v.fields)
5272
- if (R.isCustom && R.paramName) {
5273
- const Y = E[R.paramName] ?? "";
5274
- $.push({ paramName: R.paramName, paramValue: Y });
5279
+ for (const b of p)
5280
+ if (A(b)) {
5281
+ for (const S of b.fields)
5282
+ if (S.isCustom && S.paramName && S.customType !== "paragraph" && S.customType !== "br") {
5283
+ const q = I[S.paramName] ?? "";
5284
+ M.push({ paramName: S.paramName, paramValue: q });
5275
5285
  }
5276
5286
  }
5277
5287
  }
5278
- $.length > 0 && (d.applicantAdditionalDatas = $);
5288
+ M.length > 0 && (d.applicantAdditionalDatas = M);
5279
5289
  const T = await c(d);
5280
5290
  n(T.applicantId);
5281
5291
  } catch (d) {
@@ -5284,33 +5294,33 @@ const $e = {
5284
5294
  ne(!1);
5285
5295
  }
5286
5296
  }, Oe = async (d) => {
5287
- var $;
5297
+ var M;
5288
5298
  d.preventDefault();
5289
5299
  for (const T of y)
5290
5300
  if (He(f[T])) {
5291
- const v = (($ = Le[T]) == null ? void 0 : $.label) || T;
5292
- N(`${v} is required.`);
5301
+ const b = ((M = Le[T]) == null ? void 0 : M.label) || T;
5302
+ N(`${b} is required.`);
5293
5303
  return;
5294
5304
  }
5295
5305
  await he();
5296
- }, Ve = (d, $, T, v) => {
5306
+ }, Ve = (d, M, T, b) => {
5297
5307
  var et;
5298
- const R = Le[d];
5299
- if (!R) return null;
5300
- const Y = y.includes(d), ae = z[d], se = T || R.label, ie = $ ?? d, Se = { required: Y };
5301
- switch (R.type) {
5308
+ const S = Le[d];
5309
+ if (!S) return null;
5310
+ const q = y.includes(d), ae = z[d], se = T || S.label, ie = M ?? d, ke = { required: q };
5311
+ switch (S.type) {
5302
5312
  case "select":
5303
5313
  if (d === "country" || d === "nationality" || d === "taxCountry" || d === "countryOfBirth" || d === "mobileCountryCode") {
5304
- const le = J(d, v);
5314
+ const le = J(d, b);
5305
5315
  return /* @__PURE__ */ r(
5306
5316
  je,
5307
5317
  {
5308
- ...Se,
5318
+ ...ke,
5309
5319
  label: se,
5310
5320
  value: f[d] || "",
5311
5321
  onChange: (Ie) => B(d, Ie),
5312
5322
  options: [{ value: "", label: `Select ${se.toLowerCase()}...` }, ...le],
5313
- disabled: M,
5323
+ disabled: O,
5314
5324
  error: ae
5315
5325
  },
5316
5326
  ie
@@ -5320,7 +5330,7 @@ const $e = {
5320
5330
  return /* @__PURE__ */ r(
5321
5331
  je,
5322
5332
  {
5323
- ...Se,
5333
+ ...ke,
5324
5334
  label: se,
5325
5335
  value: ((et = f[d]) == null ? void 0 : et.toString()) || "",
5326
5336
  onChange: (le) => B(d, le ? Number(le) : null),
@@ -5339,7 +5349,7 @@ const $e = {
5339
5349
  return /* @__PURE__ */ r(
5340
5350
  je,
5341
5351
  {
5342
- ...Se,
5352
+ ...ke,
5343
5353
  label: se,
5344
5354
  value: f[d] || "",
5345
5355
  onChange: (Ie) => B(d, Ie),
@@ -5352,17 +5362,17 @@ const $e = {
5352
5362
  return null;
5353
5363
  case "multiselect":
5354
5364
  if (d === "otherNationality") {
5355
- const le = J(d, v);
5365
+ const le = J(d, b);
5356
5366
  return /* @__PURE__ */ r(
5357
- wr,
5367
+ kr,
5358
5368
  {
5359
- ...Se,
5369
+ ...ke,
5360
5370
  label: se,
5361
5371
  value: f[d] || [],
5362
5372
  onChange: (Ie) => B(d, Ie),
5363
5373
  options: le,
5364
5374
  placeholder: "Select other nationalities...",
5365
- disabled: M
5375
+ disabled: O
5366
5376
  },
5367
5377
  ie
5368
5378
  );
@@ -5372,7 +5382,7 @@ const $e = {
5372
5382
  return /* @__PURE__ */ r(
5373
5383
  me,
5374
5384
  {
5375
- ...Se,
5385
+ ...ke,
5376
5386
  type: "date",
5377
5387
  label: se,
5378
5388
  value: f[d] || "",
@@ -5385,7 +5395,7 @@ const $e = {
5385
5395
  return /* @__PURE__ */ r(
5386
5396
  me,
5387
5397
  {
5388
- ...Se,
5398
+ ...ke,
5389
5399
  type: "email",
5390
5400
  label: se,
5391
5401
  value: f[d] || "",
@@ -5398,7 +5408,7 @@ const $e = {
5398
5408
  return /* @__PURE__ */ r(
5399
5409
  me,
5400
5410
  {
5401
- ...Se,
5411
+ ...ke,
5402
5412
  type: "tel",
5403
5413
  label: se,
5404
5414
  value: f[d] || "",
@@ -5411,7 +5421,7 @@ const $e = {
5411
5421
  return /* @__PURE__ */ r(
5412
5422
  me,
5413
5423
  {
5414
- ...Se,
5424
+ ...ke,
5415
5425
  type: "text",
5416
5426
  label: se,
5417
5427
  value: f[d] || "",
@@ -5421,9 +5431,28 @@ const $e = {
5421
5431
  ie
5422
5432
  );
5423
5433
  }
5424
- }, ht = (d, $) => {
5434
+ }, ht = (d, M) => {
5435
+ if (d.customType === "paragraph") {
5436
+ const S = d.displayText || d.label || "";
5437
+ return /* @__PURE__ */ r(
5438
+ "p",
5439
+ {
5440
+ className: "metakyc-paragraph",
5441
+ style: {
5442
+ fontSize: "14px",
5443
+ lineHeight: "1.7",
5444
+ margin: 0,
5445
+ color: "var(--metakyc-text-secondary, #6b7280)"
5446
+ },
5447
+ dangerouslySetInnerHTML: { __html: S }
5448
+ },
5449
+ `custom-${M}`
5450
+ );
5451
+ }
5452
+ if (d.customType === "br")
5453
+ return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${M}`);
5425
5454
  if (!d.paramName) return null;
5426
- const T = z[d.paramName], v = d.displayText || d.label || d.paramName;
5455
+ const T = z[d.paramName], b = d.displayText || d.label || d.paramName;
5427
5456
  if (d.customType === "checkbox")
5428
5457
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5429
5458
  /* @__PURE__ */ i(
@@ -5436,10 +5465,10 @@ const $e = {
5436
5465
  "input",
5437
5466
  {
5438
5467
  type: "checkbox",
5439
- checked: E[d.paramName] === "true",
5440
- onChange: (R) => D(d.paramName, R.target.checked ? "true" : "false"),
5468
+ checked: I[d.paramName] === "true",
5469
+ onChange: (S) => D(d.paramName, S.target.checked ? "true" : "false"),
5441
5470
  className: "metakyc-option-input",
5442
- style: $e
5471
+ style: Be
5443
5472
  }
5444
5473
  ),
5445
5474
  /* @__PURE__ */ i(
@@ -5448,7 +5477,7 @@ const $e = {
5448
5477
  className: "metakyc-option-text",
5449
5478
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5450
5479
  children: [
5451
- v,
5480
+ b,
5452
5481
  d.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5453
5482
  ]
5454
5483
  }
@@ -5457,7 +5486,7 @@ const $e = {
5457
5486
  }
5458
5487
  ),
5459
5488
  T && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: T })
5460
- ] }, `custom-${$}`);
5489
+ ] }, `custom-${M}`);
5461
5490
  if (d.customType === "link_checkbox")
5462
5491
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5463
5492
  /* @__PURE__ */ i(
@@ -5470,10 +5499,10 @@ const $e = {
5470
5499
  "input",
5471
5500
  {
5472
5501
  type: "checkbox",
5473
- checked: E[d.paramName] === "true",
5474
- onChange: (R) => D(d.paramName, R.target.checked ? "true" : "false"),
5502
+ checked: I[d.paramName] === "true",
5503
+ onChange: (S) => D(d.paramName, S.target.checked ? "true" : "false"),
5475
5504
  className: "metakyc-option-input",
5476
- style: { ...$e, alignSelf: "flex-start", marginTop: "2px" }
5505
+ style: { ...Be, alignSelf: "flex-start", marginTop: "2px" }
5477
5506
  }
5478
5507
  ),
5479
5508
  /* @__PURE__ */ i(
@@ -5482,7 +5511,7 @@ const $e = {
5482
5511
  className: "metakyc-option-text",
5483
5512
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5484
5513
  children: [
5485
- v,
5514
+ b,
5486
5515
  " ",
5487
5516
  d.linkUrl && /* @__PURE__ */ r(
5488
5517
  "a",
@@ -5492,7 +5521,7 @@ const $e = {
5492
5521
  rel: "noopener noreferrer",
5493
5522
  className: "underline",
5494
5523
  style: { color: "var(--metakyc-primary, #2563eb)" },
5495
- onClick: (R) => R.stopPropagation(),
5524
+ onClick: (S) => S.stopPropagation(),
5496
5525
  children: d.linkText || d.linkUrl
5497
5526
  }
5498
5527
  ),
@@ -5504,9 +5533,9 @@ const $e = {
5504
5533
  }
5505
5534
  ),
5506
5535
  T && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: T })
5507
- ] }, `custom-${$}`);
5536
+ ] }, `custom-${M}`);
5508
5537
  if (d.customType === "group_checkbox") {
5509
- const R = (E[d.paramName] || "").split(",").filter(Boolean);
5538
+ const S = (I[d.paramName] || "").split(",").filter(Boolean);
5510
5539
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5511
5540
  /* @__PURE__ */ i(
5512
5541
  "div",
@@ -5514,44 +5543,51 @@ const $e = {
5514
5543
  className: "text-sm font-medium",
5515
5544
  style: { color: "var(--metakyc-text-primary, #111827)" },
5516
5545
  children: [
5517
- v,
5546
+ b,
5518
5547
  d.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5519
5548
  ]
5520
5549
  }
5521
5550
  ),
5522
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((Y) => /* @__PURE__ */ i(
5523
- "label",
5524
- {
5525
- className: "metakyc-option-label",
5526
- style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
5527
- children: [
5528
- /* @__PURE__ */ r(
5529
- "input",
5530
- {
5531
- type: "checkbox",
5532
- checked: R.includes(Y.value),
5533
- onChange: (ae) => {
5534
- const se = ae.target.checked ? [...R, Y.value] : R.filter((ie) => ie !== Y.value);
5535
- D(d.paramName, se.join(","));
5536
- },
5537
- className: "metakyc-option-input",
5538
- style: $e
5539
- }
5540
- ),
5541
- /* @__PURE__ */ r(
5542
- "span",
5543
- {
5544
- className: "metakyc-option-text",
5545
- style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5546
- children: Y.label
5547
- }
5548
- )
5549
- ]
5550
- },
5551
- Y.value
5552
- )) }),
5551
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((q) => {
5552
+ const ae = d.singleSelect ? I[d.paramName] === q.value : S.includes(q.value);
5553
+ return /* @__PURE__ */ i(
5554
+ "label",
5555
+ {
5556
+ className: "metakyc-option-label",
5557
+ style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
5558
+ children: [
5559
+ /* @__PURE__ */ r(
5560
+ "input",
5561
+ {
5562
+ type: "checkbox",
5563
+ checked: ae,
5564
+ onChange: (se) => {
5565
+ if (d.singleSelect)
5566
+ D(d.paramName, se.target.checked ? q.value : "");
5567
+ else {
5568
+ const ie = se.target.checked ? [...S, q.value] : S.filter((ke) => ke !== q.value);
5569
+ D(d.paramName, ie.join(","));
5570
+ }
5571
+ },
5572
+ className: "metakyc-option-input",
5573
+ style: Be
5574
+ }
5575
+ ),
5576
+ /* @__PURE__ */ r(
5577
+ "span",
5578
+ {
5579
+ className: "metakyc-option-text",
5580
+ style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5581
+ children: q.label
5582
+ }
5583
+ )
5584
+ ]
5585
+ },
5586
+ q.value
5587
+ );
5588
+ }) }),
5553
5589
  T && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: T })
5554
- ] }, `custom-${$}`);
5590
+ ] }, `custom-${M}`);
5555
5591
  }
5556
5592
  return d.customType === "radio_group" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5557
5593
  /* @__PURE__ */ i(
@@ -5560,12 +5596,12 @@ const $e = {
5560
5596
  className: "text-sm font-medium",
5561
5597
  style: { color: "var(--metakyc-text-primary, #111827)" },
5562
5598
  children: [
5563
- v,
5599
+ b,
5564
5600
  d.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
5565
5601
  ]
5566
5602
  }
5567
5603
  ),
5568
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((R) => /* @__PURE__ */ i(
5604
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((S) => /* @__PURE__ */ i(
5569
5605
  "label",
5570
5606
  {
5571
5607
  className: "metakyc-option-label",
@@ -5575,11 +5611,11 @@ const $e = {
5575
5611
  "input",
5576
5612
  {
5577
5613
  type: "radio",
5578
- checked: E[d.paramName] === R.value,
5579
- onChange: () => D(d.paramName, R.value),
5580
- name: `radio-group-${d.paramName}-${$}`,
5614
+ checked: I[d.paramName] === S.value,
5615
+ onChange: () => D(d.paramName, S.value),
5616
+ name: `radio-group-${d.paramName}-${M}`,
5581
5617
  className: "metakyc-option-input",
5582
- style: $e
5618
+ style: Be
5583
5619
  }
5584
5620
  ),
5585
5621
  /* @__PURE__ */ r(
@@ -5587,28 +5623,28 @@ const $e = {
5587
5623
  {
5588
5624
  className: "metakyc-option-text",
5589
5625
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5590
- children: R.label
5626
+ children: S.label
5591
5627
  }
5592
5628
  )
5593
5629
  ]
5594
5630
  },
5595
- R.value
5631
+ S.value
5596
5632
  )) }),
5597
5633
  T && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: T })
5598
- ] }, `custom-${$}`) : /* @__PURE__ */ r(
5634
+ ] }, `custom-${M}`) : /* @__PURE__ */ r(
5599
5635
  me,
5600
5636
  {
5601
5637
  type: "text",
5602
- label: `${v}${d.required ? " *" : ""}`,
5603
- value: E[d.paramName] || "",
5604
- onChange: (R) => D(d.paramName, R.target.value),
5638
+ label: `${b}${d.required ? " *" : ""}`,
5639
+ value: I[d.paramName] || "",
5640
+ onChange: (S) => D(d.paramName, S.target.value),
5605
5641
  required: d.required,
5606
5642
  error: T
5607
5643
  },
5608
- `custom-${$}`
5644
+ `custom-${M}`
5609
5645
  );
5610
- }, gt = (d, $) => {
5611
- const T = C(d);
5646
+ }, gt = (d, M) => {
5647
+ const T = A(d);
5612
5648
  return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
5613
5649
  d.conditionalOn && /* @__PURE__ */ i(
5614
5650
  "label",
@@ -5621,9 +5657,9 @@ const $e = {
5621
5657
  {
5622
5658
  type: "checkbox",
5623
5659
  checked: T,
5624
- onChange: (v) => D(d.conditionalOn, v.target.checked ? "true" : "false"),
5660
+ onChange: (b) => D(d.conditionalOn, b.target.checked ? "true" : "false"),
5625
5661
  className: "metakyc-option-input",
5626
- style: $e
5662
+ style: Be
5627
5663
  }
5628
5664
  ),
5629
5665
  /* @__PURE__ */ r(
@@ -5637,22 +5673,22 @@ const $e = {
5637
5673
  ]
5638
5674
  }
5639
5675
  ),
5640
- T && /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-4", children: d.fields.map((v, R) => {
5641
- const Y = v.colSpan === 1 ? "col-span-1" : "col-span-2", ae = v.isCustom ? `custom-${R}-${v.paramName}` : `builtin-${v.name}-${R}`;
5642
- return /* @__PURE__ */ r("div", { className: Y, children: v.isCustom ? ht(v, R) : Ve(v.name, ae, v.displayText, v.countriesType) }, ae);
5676
+ T && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: d.fields.map((b, S) => {
5677
+ const q = b.colSpan === 1 ? "col-span-1" : b.colSpan === 2 ? "col-span-2" : b.colSpan === 3 ? "col-span-3" : "col-span-4", ae = b.isCustom ? `custom-${S}-${b.paramName}` : `builtin-${b.name}-${S}`;
5678
+ return /* @__PURE__ */ r("div", { className: q, children: b.isCustom ? ht(b, S) : Ve(b.name, ae, b.displayText, b.countriesType) }, ae);
5643
5679
  }) })
5644
5680
  ] });
5645
5681
  };
5646
- if (M)
5647
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
5682
+ if (O)
5683
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
5648
5684
  /* @__PURE__ */ r(ve, { className: "my-8" }),
5649
5685
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5650
5686
  ] }) }) });
5651
5687
  if (p) {
5652
- const d = p[P] ?? p[0], $ = ee === -1, T = U === -1, v = p.length, R = C(d), Y = Object.values(z);
5653
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(q, { children: [
5688
+ const d = p[P] ?? p[0], M = ee === -1, T = U === -1, b = p.length, S = A(d), q = Object.values(z);
5689
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(K, { children: [
5654
5690
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5655
- /* @__PURE__ */ i(K, { children: [
5691
+ /* @__PURE__ */ i(j, { children: [
5656
5692
  (d.title || d.subtitle || d.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
5657
5693
  d.title && /* @__PURE__ */ r(
5658
5694
  "h3",
@@ -5679,15 +5715,15 @@ const $e = {
5679
5715
  }
5680
5716
  )
5681
5717
  ] }),
5682
- (Z || Y.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5718
+ (Z || q.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5683
5719
  Z && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5684
5720
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5685
5721
  " ",
5686
5722
  Z
5687
5723
  ] }),
5688
- Y.map((ae, se) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ae }, se))
5724
+ q.map((ae, se) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ae }, se))
5689
5725
  ] }),
5690
- v > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
5726
+ b > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
5691
5727
  p.map((ae, se) => /* @__PURE__ */ r(
5692
5728
  "div",
5693
5729
  {
@@ -5699,48 +5735,48 @@ const $e = {
5699
5735
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
5700
5736
  P + 1,
5701
5737
  " / ",
5702
- v
5738
+ b
5703
5739
  ] })
5704
5740
  ] }),
5705
5741
  gt(d)
5706
5742
  ] }),
5707
5743
  /* @__PURE__ */ i(pe, { className: "flex justify-between", children: [
5708
5744
  /* @__PURE__ */ i("div", { children: [
5709
- !$ && /* @__PURE__ */ r(
5745
+ !M && /* @__PURE__ */ r(
5710
5746
  V,
5711
5747
  {
5712
5748
  type: "button",
5713
5749
  variant: "outline",
5714
5750
  onClick: () => {
5715
- W(ee), L({});
5751
+ Y(ee), L({});
5716
5752
  },
5717
5753
  disabled: _ || u,
5718
5754
  children: "Previous"
5719
5755
  }
5720
5756
  ),
5721
- $ && a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: _ || u, children: "Cancel" })
5757
+ M && a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: _ || u, children: "Cancel" })
5722
5758
  ] }),
5723
5759
  /* @__PURE__ */ r(
5724
5760
  V,
5725
5761
  {
5726
5762
  type: "button",
5727
5763
  isLoading: _ || u,
5728
- onClick: T ? he : Ne,
5729
- children: T ? d.conditionalOn && !R ? "Skip & Submit" : "Submit" : d.conditionalOn && !R ? "Skip" : "Next"
5764
+ onClick: T ? he : Se,
5765
+ children: T ? d.conditionalOn && !S ? "Skip & Submit" : "Submit" : d.conditionalOn && !S ? "Skip" : "Next"
5730
5766
  }
5731
5767
  )
5732
5768
  ] })
5733
5769
  ] }) });
5734
5770
  }
5735
- return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Oe, children: /* @__PURE__ */ i(q, { children: [
5771
+ return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Oe, children: /* @__PURE__ */ i(K, { children: [
5736
5772
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5737
- /* @__PURE__ */ i(K, { children: [
5773
+ /* @__PURE__ */ i(j, { children: [
5738
5774
  Z && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5739
5775
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5740
5776
  " ",
5741
5777
  Z
5742
5778
  ] }) }),
5743
- /* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: g.map((d) => Ve(d)) })
5779
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: g.map((d) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ve(d) }, d)) })
5744
5780
  ] }),
5745
5781
  /* @__PURE__ */ i(pe, { className: "flex justify-between", children: [
5746
5782
  a && /* @__PURE__ */ r(V, { type: "button", variant: "outline", onClick: a, disabled: _ || u, children: "Cancel" }),
@@ -5765,7 +5801,7 @@ const $e = {
5765
5801
  error: y,
5766
5802
  moveBack: g,
5767
5803
  refreshProgress: h
5768
- } = hr(e), [S, F] = fe.useState(!1);
5804
+ } = hr(e), [C, F] = fe.useState(!1);
5769
5805
  if (fe.useEffect(() => {
5770
5806
  y && n && n(y);
5771
5807
  }, [y, n]), fe.useEffect(() => {
@@ -5775,17 +5811,17 @@ const $e = {
5775
5811
  }, [a]), fe.useEffect(() => {
5776
5812
  x && F(!1);
5777
5813
  }, [x]), p || !o)
5778
- return /* @__PURE__ */ r("div", { className: s, children: /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
5814
+ return /* @__PURE__ */ r("div", { className: s, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
5779
5815
  /* @__PURE__ */ r(ve, { className: "my-8" }),
5780
5816
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
5781
5817
  ] }) }) });
5782
5818
  if (y)
5783
- return /* @__PURE__ */ r("div", { className: s, children: /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5819
+ return /* @__PURE__ */ r("div", { className: s, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5784
5820
  /* @__PURE__ */ r("p", { className: "text-danger-500 text-lg mb-4", children: "An error occurred" }),
5785
5821
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: y.message })
5786
5822
  ] }) }) }) });
5787
- if (x && !S)
5788
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5823
+ if (x && !C)
5824
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ i("div", { className: "text-center py-8", children: [
5789
5825
  /* @__PURE__ */ r("div", { className: "mb-6", children: /* @__PURE__ */ r("div", { className: "inline-flex items-center justify-center w-16 h-16 rounded-full bg-blue-100 dark:bg-blue-900 mb-4", children: /* @__PURE__ */ r("svg", { className: "w-8 h-8 text-blue-600 dark:text-blue-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }) }),
5790
5826
  /* @__PURE__ */ r("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white mb-2", children: "Workflow Transition" }),
5791
5827
  /* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400 mb-6", children: "Your application workflow has been updated based on your progress." }),
@@ -5827,12 +5863,12 @@ const $e = {
5827
5863
  }
5828
5864
  ) });
5829
5865
  if (!l)
5830
- return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { children: [
5866
+ return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { children: [
5831
5867
  /* @__PURE__ */ r(ve, { className: "my-8" }),
5832
5868
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === be.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
5833
5869
  ] }) }) });
5834
- const w = (I) => {
5835
- switch (I) {
5870
+ const k = (R) => {
5871
+ switch (R) {
5836
5872
  case G.Overview:
5837
5873
  return "Overview";
5838
5874
  case G.Questionaries:
@@ -5854,8 +5890,8 @@ const $e = {
5854
5890
  default:
5855
5891
  return "";
5856
5892
  }
5857
- }, M = () => {
5858
- const I = c.filter((k) => k.visibility !== !1), H = I.findIndex((k) => k.order === l.order), J = H >= 0 ? H + 1 : 1, f = I.length;
5893
+ }, O = () => {
5894
+ const R = c.filter((w) => w.visibility !== !1), H = R.findIndex((w) => w.order === l.order), J = H >= 0 ? H + 1 : 1, f = R.length;
5859
5895
  return /* @__PURE__ */ i("div", { className: "mb-6", children: [
5860
5896
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between mb-4", children: [
5861
5897
  /* @__PURE__ */ r(Ge, {}),
@@ -5866,8 +5902,8 @@ const $e = {
5866
5902
  f
5867
5903
  ] })
5868
5904
  ] }),
5869
- /* @__PURE__ */ r("div", { className: "flex items-center", children: I.map((k, E) => {
5870
- const O = E < H, P = k.order === l.order;
5905
+ /* @__PURE__ */ r("div", { className: "flex items-center", children: R.map((w, I) => {
5906
+ const $ = I < H, P = w.order === l.order;
5871
5907
  return /* @__PURE__ */ i(fe.Fragment, { children: [
5872
5908
  /* @__PURE__ */ i("div", { className: "flex items-center", children: [
5873
5909
  /* @__PURE__ */ r(
@@ -5875,30 +5911,30 @@ const $e = {
5875
5911
  {
5876
5912
  className: `
5877
5913
  w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
5878
- ${O || P ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
5914
+ ${$ || P ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
5879
5915
  `,
5880
- children: E + 1
5916
+ children: I + 1
5881
5917
  }
5882
5918
  ),
5883
5919
  /* @__PURE__ */ r(
5884
5920
  "span",
5885
5921
  {
5886
5922
  className: `ml-2 text-sm ${P ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
5887
- children: k.displayName || k.name || w(k.action) || `Step ${E + 1}`
5923
+ children: w.displayName || w.name || k(w.action) || `Step ${I + 1}`
5888
5924
  }
5889
5925
  )
5890
5926
  ] }),
5891
- E < I.length - 1 && /* @__PURE__ */ r(
5927
+ I < R.length - 1 && /* @__PURE__ */ r(
5892
5928
  "div",
5893
5929
  {
5894
- className: `flex-1 h-0.5 mx-4 ${O ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
5930
+ className: `flex-1 h-0.5 mx-4 ${$ ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
5895
5931
  }
5896
5932
  )
5897
- ] }, k.order);
5933
+ ] }, w.order);
5898
5934
  }) })
5899
5935
  ] });
5900
- }, A = () => {
5901
- const I = {
5936
+ }, E = () => {
5937
+ const R = {
5902
5938
  applicantId: e,
5903
5939
  onComplete: async () => {
5904
5940
  await h();
@@ -5907,20 +5943,20 @@ const $e = {
5907
5943
  };
5908
5944
  switch (l.action) {
5909
5945
  case G.Questionaries:
5910
- return /* @__PURE__ */ r(Lr, { ...I });
5946
+ return /* @__PURE__ */ r(Lr, { ...R });
5911
5947
  case G.UploadDocument:
5912
- return /* @__PURE__ */ r(Mr, { ...I });
5948
+ return /* @__PURE__ */ r(Mr, { ...R });
5913
5949
  case G.Overview:
5914
- return /* @__PURE__ */ r(Or, { ...I });
5950
+ return /* @__PURE__ */ r(Or, { ...R });
5915
5951
  case G.IdentitySdk:
5916
- return /* @__PURE__ */ r(Kr, { ...I });
5952
+ return /* @__PURE__ */ r(Kr, { ...R });
5917
5953
  case G.RiskScoring:
5918
- return /* @__PURE__ */ r(_r, { ...I });
5954
+ return /* @__PURE__ */ r(_r, { ...R });
5919
5955
  case G.AdditionalData:
5920
5956
  case G.InvestorCategorization:
5921
- return /* @__PURE__ */ r(Hr, { ...I });
5957
+ return /* @__PURE__ */ r(Hr, { ...R });
5922
5958
  case G.AppropriatenessTest:
5923
- return /* @__PURE__ */ r(qr, { ...I });
5959
+ return /* @__PURE__ */ r(qr, { ...R });
5924
5960
  case G.ManualReview:
5925
5961
  return /* @__PURE__ */ r(
5926
5962
  it,
@@ -5932,7 +5968,7 @@ const $e = {
5932
5968
  }
5933
5969
  );
5934
5970
  default:
5935
- return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ i(K, { className: "py-12 text-center", children: [
5971
+ return /* @__PURE__ */ r(K, { children: /* @__PURE__ */ i(j, { className: "py-12 text-center", children: [
5936
5972
  /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(ve, {}) }),
5937
5973
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
5938
5974
  "Processing step: ",
@@ -5946,17 +5982,17 @@ const $e = {
5946
5982
  }
5947
5983
  };
5948
5984
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${s || ""}`, children: [
5949
- M(),
5950
- A()
5985
+ O(),
5986
+ E()
5951
5987
  ] });
5952
5988
  };
5953
5989
  function pn(e) {
5954
- return ke.object({
5955
- questionResults: ke.any()
5990
+ return Ne.object({
5991
+ questionResults: Ne.any()
5956
5992
  }).passthrough();
5957
5993
  }
5958
5994
  function Wr(e) {
5959
- let t = ke.array(ke.instanceof(File));
5995
+ let t = Ne.array(Ne.instanceof(File));
5960
5996
  if (e.isRequired ? t = t.min(
5961
5997
  1,
5962
5998
  `${e.displayName} is required`
@@ -5982,27 +6018,27 @@ function hn(e) {
5982
6018
  return e.uploadDocumentFiles.forEach((n) => {
5983
6019
  const a = `file_${n.id}`;
5984
6020
  t[a] = Wr(n);
5985
- }), ke.object(t);
6021
+ }), Ne.object(t);
5986
6022
  }
5987
6023
  function gn(e) {
5988
- return ke.any();
6024
+ return Ne.any();
5989
6025
  }
5990
6026
  function Yr(e) {
5991
- return ke.string().min(1, "This question is required");
6027
+ return Ne.string().min(1, "This question is required");
5992
6028
  }
5993
6029
  function yn(e) {
5994
6030
  const t = {};
5995
6031
  return e.appropriatenessQuestions.forEach((n) => {
5996
6032
  const a = `question_${n.id}`;
5997
6033
  t[a] = Yr();
5998
- }), ke.object(t);
6034
+ }), Ne.object(t);
5999
6035
  }
6000
- const fn = ke.any();
6036
+ const fn = Ne.any();
6001
6037
  export {
6002
6038
  rt as ALLOWED_LANGUAGES,
6003
6039
  Nt as ApplicantProgressOnHoldReason,
6004
6040
  be as ApplicantProgressStatus,
6005
- Bt as ApplicantService,
6041
+ zt as ApplicantService,
6006
6042
  Ct as ApplicantStatus,
6007
6043
  Pt as AppropriatenessQuestionType,
6008
6044
  Ut as AppropriatenessTestService,
@@ -6010,8 +6046,8 @@ export {
6010
6046
  Ce as Badge,
6011
6047
  jt as BaseInformationService,
6012
6048
  V as Button,
6013
- q as Card,
6014
- K as CardContent,
6049
+ K as Card,
6050
+ j as CardContent,
6015
6051
  pe as CardFooter,
6016
6052
  de as CardHeader,
6017
6053
  Fe as CountriesType,
@@ -6020,14 +6056,14 @@ export {
6020
6056
  Tt as DEFAULT_VISIBLE_FIELDS,
6021
6057
  Rt as DocumentReviewStatus,
6022
6058
  Ot as EndpointBuilder,
6023
- ze as ErrorHandler,
6059
+ $e as ErrorHandler,
6024
6060
  er as EventEmitter,
6025
6061
  Le as FIELD_METADATA,
6026
6062
  It as FileType,
6027
- kr as FileUpload,
6063
+ wr as FileUpload,
6028
6064
  Ke as GenderType,
6029
6065
  Ge as Header,
6030
- zt as HttpClient,
6066
+ $t as HttpClient,
6031
6067
  Te as IdentityProviderManager,
6032
6068
  Kt as IdentityService,
6033
6069
  xe as IdentityVerificationProvider,
@@ -6045,12 +6081,12 @@ export {
6045
6081
  ct as MetaKYCContext,
6046
6082
  we as MetaKYCError,
6047
6083
  nn as MetaKYCProvider,
6048
- wr as MultiSelect,
6084
+ kr as MultiSelect,
6049
6085
  sr as OnfidoProvider,
6050
6086
  Ht as OverviewService,
6051
6087
  Or as OverviewStep,
6052
6088
  Nr as PhoneInput,
6053
- $t as QuestionnaireService,
6089
+ Bt as QuestionnaireService,
6054
6090
  Lr as QuestionnaireStep,
6055
6091
  De as ReviewStatus,
6056
6092
  Dt as RiskCriteriaType,
@@ -6091,7 +6127,7 @@ export {
6091
6127
  hn as generateUploadDocumentSchema,
6092
6128
  on as getAcceptString,
6093
6129
  dr as getApplicantId,
6094
- Be as getThemePreset,
6130
+ ze as getThemePreset,
6095
6131
  ln as getWorkflowState,
6096
6132
  Gt as healthcareTheme,
6097
6133
  tn as isScriptLoaded,