@vpdev2/metakyc-sdk 1.0.54 → 1.0.55

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,12 +3,12 @@ var vt = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var re = (e, t, n) => vt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import kt from "axios";
5
5
  import * as rt from "react";
6
- import ge, { createContext as wt, useState as b, useMemo as Ee, useEffect as ne, useContext as Nt, useRef as ee, useCallback as Q, forwardRef as He, createElement as Qe } from "react";
6
+ import ge, { createContext as wt, useState as b, useMemo as Ee, useEffect as ne, useContext as Nt, useRef as ee, useCallback as Q, forwardRef as Ue, createElement as Qe } from "react";
7
7
  import { jsx as r, jsxs as s, Fragment as lt } from "react/jsx-runtime";
8
8
  import { createPortal as ct } from "react-dom";
9
9
  import { useForm as St, Controller as Pe } from "react-hook-form";
10
10
  import { z as Se } from "zod";
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 || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), Ct = /* @__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))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(At || {}), De = /* @__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))(De || {}), Fe = /* @__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))(Fe || {}), Et = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Et || {}), It = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(It || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Rt || {}), je = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(je || {}), Pt = /* @__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))(Pt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Ft || {}), Ie = /* @__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))(Ie || {}), Lt = /* @__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))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Tt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Mt || {});
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 || {}), je = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(je || {}), xe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(xe || {}), Ct = /* @__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))(Ct || {}), At = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(At || {}), De = /* @__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))(De || {}), Fe = /* @__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))(Fe || {}), Et = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Et || {}), It = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(It || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), Rt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Rt || {}), Ke = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ke || {}), Pt = /* @__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))(Pt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Dt || {}), Ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Ft || {}), Ie = /* @__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))(Ie || {}), Lt = /* @__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))(Lt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Tt || {}), he = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(he || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Mt || {});
12
12
  const Le = {
13
13
  Nationality: 10,
14
14
  Address: 20,
@@ -1788,7 +1788,7 @@ class cr {
1788
1788
  }
1789
1789
  const ut = wt(null), on = ({ config: e, children: t }) => {
1790
1790
  const [n, a] = b(null), i = ge.useRef(!1), o = ge.useRef(!1), l = Ee(() => {
1791
- const u = new Bt(e), p = new _t(u), x = new Ht(u), N = new Ut(u), m = new qt(u), y = new jt(u), h = new Kt(u), C = new Wt(u), F = new Yt(u), v = new Qt(u), $ = new tr(u), A = new cr();
1791
+ const u = new Bt(e), p = new _t(u), x = new Ht(u), N = new Ut(u), m = new qt(u), y = new jt(u), h = new Kt(u), C = new Wt(u), F = new Yt(u), k = new Qt(u), $ = new tr(u), A = new cr();
1792
1792
  return {
1793
1793
  httpClient: u,
1794
1794
  applicantService: p,
@@ -1799,7 +1799,7 @@ const ut = wt(null), on = ({ config: e, children: t }) => {
1799
1799
  riskScoringService: h,
1800
1800
  identityService: C,
1801
1801
  baseInformationService: F,
1802
- investorCategorizationService: v,
1802
+ investorCategorizationService: k,
1803
1803
  themeService: $,
1804
1804
  themeManager: A
1805
1805
  };
@@ -1868,7 +1868,7 @@ function cn(e, t) {
1868
1868
  return e.type === a;
1869
1869
  });
1870
1870
  }
1871
- function We(e) {
1871
+ function Ye(e) {
1872
1872
  if (e === 0) return "0 Bytes";
1873
1873
  const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
1874
1874
  return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
@@ -2018,12 +2018,12 @@ function yr(e) {
2018
2018
  o(!1);
2019
2019
  }
2020
2020
  }
2021
- }, []), v = rt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((A, I) => A.order - I.order) : [], [n == null ? void 0 : n.stepInfoList]), $ = rt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2021
+ }, []), k = rt.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((A, I) => A.order - I.order) : [], [n == null ? void 0 : n.stepInfoList]), $ = rt.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
2022
2022
  return {
2023
2023
  progress: n,
2024
2024
  applicantId: p,
2025
2025
  currentStep: (n == null ? void 0 : n.currentStep) || null,
2026
- steps: v,
2026
+ steps: k,
2027
2027
  status: (n == null ? void 0 : n.status) || xe.None,
2028
2028
  workflowResult: (n == null ? void 0 : n.workflowResult) || null,
2029
2029
  workflowKey: n == null ? void 0 : n.workFlowKey,
@@ -2042,7 +2042,7 @@ function yr(e) {
2042
2042
  }
2043
2043
  function fr(e) {
2044
2044
  const { questionnaireService: t, applicantService: n } = ye(), [a, i] = b(null), [o, l] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), y = ee(!1), h = ee(null), C = Q(async () => {
2045
- var v, $;
2045
+ var k, $;
2046
2046
  if (e) {
2047
2047
  if (y.current) {
2048
2048
  console.log("[Questionnaire] Load already in progress, skipping...");
@@ -2054,7 +2054,7 @@ function fr(e) {
2054
2054
  t.getQuestionnaire(e),
2055
2055
  n.getApplicantData(e).catch(() => null)
2056
2056
  ]);
2057
- if (i(A), (v = I == null ? void 0 : I.questionnaireResults) != null && v.length && A) {
2057
+ if (i(A), (k = I == null ? void 0 : I.questionnaireResults) != null && k.length && A) {
2058
2058
  const q = /* @__PURE__ */ new Map();
2059
2059
  for (const g of I.questionnaireResults)
2060
2060
  g.question && (($ = g.answers) != null && $.length) && q.set(g.question.trim().toLowerCase(), g.answers);
@@ -2077,10 +2077,10 @@ function fr(e) {
2077
2077
  e && h.current !== e && C();
2078
2078
  }, [e]);
2079
2079
  const F = Q(
2080
- async (v) => {
2080
+ async (k) => {
2081
2081
  x(!0), m(null);
2082
2082
  try {
2083
- return await t.fillQuestionnaire(v);
2083
+ return await t.fillQuestionnaire(k);
2084
2084
  } catch ($) {
2085
2085
  throw m($), $;
2086
2086
  } finally {
@@ -2125,8 +2125,8 @@ function xr(e) {
2125
2125
  d(!0), p(0), N(null);
2126
2126
  try {
2127
2127
  await t.fillUploadDocument(F), p(100);
2128
- } catch (v) {
2129
- throw N(v), v;
2128
+ } catch (k) {
2129
+ throw N(k), k;
2130
2130
  } finally {
2131
2131
  d(!1);
2132
2132
  }
@@ -2168,10 +2168,10 @@ function pn(e) {
2168
2168
  async (F) => {
2169
2169
  d(!0), p(null);
2170
2170
  try {
2171
- const v = await t.fillAppropriatenessTest(F);
2172
- return N(v), v;
2173
- } catch (v) {
2174
- throw p(v), v;
2171
+ const k = await t.fillAppropriatenessTest(F);
2172
+ return N(k), k;
2173
+ } catch (k) {
2174
+ throw p(k), k;
2175
2175
  } finally {
2176
2176
  d(!1);
2177
2177
  }
@@ -2317,7 +2317,7 @@ function vr(e) {
2317
2317
  };
2318
2318
  }
2319
2319
  function kr(e) {
2320
- const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o, l] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), [y, h] = b(null), C = ee(!1), F = ee(null), v = Q(async () => {
2320
+ const { riskScoringService: t, applicantService: n } = ye(), [a, i] = b(null), [o, l] = b({}), [d, u] = b(!1), [p, x] = b(!1), [N, m] = b(null), [y, h] = b(null), C = ee(!1), F = ee(null), k = Q(async () => {
2321
2321
  var A;
2322
2322
  if (e) {
2323
2323
  if (C.current) {
@@ -2350,7 +2350,7 @@ function kr(e) {
2350
2350
  }
2351
2351
  }, [e, t, n]);
2352
2352
  ne(() => {
2353
- e && F.current !== e && v();
2353
+ e && F.current !== e && k();
2354
2354
  }, [e]);
2355
2355
  const $ = Q(
2356
2356
  async (A) => {
@@ -2373,7 +2373,7 @@ function kr(e) {
2373
2373
  isLoading: d,
2374
2374
  isSubmitting: p,
2375
2375
  error: N,
2376
- load: v,
2376
+ load: k,
2377
2377
  submit: $
2378
2378
  };
2379
2379
  }
@@ -2512,7 +2512,7 @@ const V = ({
2512
2512
  ]
2513
2513
  }
2514
2514
  );
2515
- }, me = He(
2515
+ }, me = Ue(
2516
2516
  ({ label: e, error: t, helperText: n, leftIcon: a, rightIcon: i, className: o, ...l }, d) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2517
2517
  e && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2518
2518
  e,
@@ -2631,7 +2631,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2631
2631
  ]
2632
2632
  }
2633
2633
  ) });
2634
- }, _e = He(
2634
+ }, He = Ue(
2635
2635
  ({ label: e, error: t, helperText: n, options: a, placeholder: i, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
2636
2636
  e && /* @__PURE__ */ s(
2637
2637
  "label",
@@ -2697,7 +2697,7 @@ const K = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
2697
2697
  !t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
2698
2698
  ] })
2699
2699
  );
2700
- _e.displayName = "Select";
2700
+ He.displayName = "Select";
2701
2701
  const at = 280, Nr = ({
2702
2702
  label: e,
2703
2703
  value: t,
@@ -2709,42 +2709,42 @@ const at = 280, Nr = ({
2709
2709
  }) => {
2710
2710
  const [d, u] = b(!1), [p, x] = b(""), [N, m] = b(null), y = ee(null), h = ee(null), C = ee(null), F = Q(() => {
2711
2711
  if (!h.current) return null;
2712
- const k = h.current.getBoundingClientRect(), te = window.innerHeight - k.bottom < at && k.top > at;
2713
- return { top: te ? k.top : k.bottom + 4, left: k.left, width: k.width, openUp: te };
2714
- }, []), v = Q(() => {
2712
+ const w = h.current.getBoundingClientRect(), te = window.innerHeight - w.bottom < at && w.top > at;
2713
+ return { top: te ? w.top : w.bottom + 4, left: w.left, width: w.width, openUp: te };
2714
+ }, []), k = Q(() => {
2715
2715
  if (o) return;
2716
- const k = F();
2717
- k && m(k), u(!0);
2716
+ const w = F();
2717
+ w && m(w), u(!0);
2718
2718
  }, [o, F]), $ = Q(() => {
2719
2719
  u(!1), x("");
2720
2720
  }, []);
2721
2721
  ne(() => {
2722
2722
  if (!d) return;
2723
- const k = (U) => {
2723
+ const w = (U) => {
2724
2724
  var B, D;
2725
2725
  const te = U.target;
2726
2726
  !((B = y.current) != null && B.contains(te)) && !((D = C.current) != null && D.contains(te)) && $();
2727
2727
  };
2728
- return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
2728
+ return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
2729
2729
  }, [d, $]), ne(() => {
2730
2730
  if (!d) return;
2731
- const k = () => {
2731
+ const w = () => {
2732
2732
  const U = F();
2733
2733
  U && m(U);
2734
2734
  };
2735
- return window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
2736
- window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
2735
+ return window.addEventListener("scroll", w, !0), window.addEventListener("resize", w), () => {
2736
+ window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
2737
2737
  };
2738
2738
  }, [d, F]);
2739
2739
  const A = a.filter(
2740
- (k) => k.label.toLowerCase().includes(p.toLowerCase())
2741
- ), I = (k) => {
2742
- o || n(t.includes(k) ? t.filter((U) => U !== k) : [...t, k]);
2743
- }, q = (k, U) => {
2744
- U.stopPropagation(), o || n(t.filter((te) => te !== k));
2745
- }, J = (k) => {
2740
+ (w) => w.label.toLowerCase().includes(p.toLowerCase())
2741
+ ), I = (w) => {
2742
+ o || n(t.includes(w) ? t.filter((U) => U !== w) : [...t, w]);
2743
+ }, q = (w, U) => {
2744
+ U.stopPropagation(), o || n(t.filter((te) => te !== w));
2745
+ }, J = (w) => {
2746
2746
  var U;
2747
- return ((U = a.find((te) => te.value === k)) == null ? void 0 : U.label) || k;
2747
+ return ((U = a.find((te) => te.value === w)) == null ? void 0 : U.label) || w;
2748
2748
  }, E = h.current ? getComputedStyle(h.current) : null, g = (E == null ? void 0 : E.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", R = (E == null ? void 0 : E.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", P = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", z = (E == null ? void 0 : E.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", _ = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", O = (E == null ? void 0 : E.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", M = (E == null ? void 0 : E.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", Z = d && N && /* @__PURE__ */ s(
2749
2749
  "div",
2750
2750
  {
@@ -2769,10 +2769,10 @@ const at = 280, Nr = ({
2769
2769
  {
2770
2770
  type: "text",
2771
2771
  value: p,
2772
- onChange: (k) => x(k.target.value),
2772
+ onChange: (w) => x(w.target.value),
2773
2773
  placeholder: "Search...",
2774
2774
  autoFocus: !0,
2775
- onClick: (k) => k.stopPropagation(),
2775
+ onClick: (w) => w.stopPropagation(),
2776
2776
  className: "metakyc-multiselect-search w-full",
2777
2777
  style: {
2778
2778
  display: "block",
@@ -2788,12 +2788,12 @@ const at = 280, Nr = ({
2788
2788
  }
2789
2789
  }
2790
2790
  ) }),
2791
- /* @__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: z }, children: "No results" }) : A.map((k) => {
2792
- const U = t.includes(k.value);
2791
+ /* @__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: z }, children: "No results" }) : A.map((w) => {
2792
+ const U = t.includes(w.value);
2793
2793
  return /* @__PURE__ */ s(
2794
2794
  "li",
2795
2795
  {
2796
- onClick: () => I(k.value),
2796
+ onClick: () => I(w.value),
2797
2797
  className: "metakyc-multiselect-option",
2798
2798
  style: {
2799
2799
  display: "flex",
@@ -2822,10 +2822,10 @@ const at = 280, Nr = ({
2822
2822
  style: { accentColor: _, pointerEvents: "none", flexShrink: 0 }
2823
2823
  }
2824
2824
  ),
2825
- /* @__PURE__ */ r("span", { children: k.label })
2825
+ /* @__PURE__ */ r("span", { children: w.label })
2826
2826
  ]
2827
2827
  },
2828
- k.value
2828
+ w.value
2829
2829
  );
2830
2830
  }) }),
2831
2831
  t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${R}` }, children: /* @__PURE__ */ s(
@@ -2862,7 +2862,7 @@ const at = 280, Nr = ({
2862
2862
  "div",
2863
2863
  {
2864
2864
  ref: h,
2865
- onClick: () => d ? $() : v(),
2865
+ onClick: () => d ? $() : k(),
2866
2866
  className: oe(
2867
2867
  "metakyc-multiselect-trigger",
2868
2868
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
@@ -2882,7 +2882,7 @@ const at = 280, Nr = ({
2882
2882
  style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
2883
2883
  children: i
2884
2884
  }
2885
- ) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((k) => /* @__PURE__ */ s(
2885
+ ) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((w) => /* @__PURE__ */ s(
2886
2886
  "span",
2887
2887
  {
2888
2888
  className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
@@ -2891,12 +2891,12 @@ const at = 280, Nr = ({
2891
2891
  color: "var(--metakyc-primary, #2563eb)"
2892
2892
  },
2893
2893
  children: [
2894
- J(k),
2894
+ J(w),
2895
2895
  !o && /* @__PURE__ */ r(
2896
2896
  "button",
2897
2897
  {
2898
2898
  type: "button",
2899
- onClick: (U) => q(k, U),
2899
+ onClick: (U) => q(w, U),
2900
2900
  className: "metakyc-multiselect-chip-remove",
2901
2901
  style: {
2902
2902
  background: "transparent",
@@ -2922,7 +2922,7 @@ const at = 280, Nr = ({
2922
2922
  )
2923
2923
  ]
2924
2924
  },
2925
- k
2925
+ w
2926
2926
  )) }),
2927
2927
  /* @__PURE__ */ r(
2928
2928
  "span",
@@ -2937,7 +2937,7 @@ const at = 280, Nr = ({
2937
2937
  ),
2938
2938
  typeof document < "u" && Z ? ct(Z, document.body) : null
2939
2939
  ] });
2940
- }, it = 260, Ke = ({
2940
+ }, it = 260, We = ({
2941
2941
  label: e,
2942
2942
  error: t,
2943
2943
  helperText: n,
@@ -2950,9 +2950,9 @@ const at = 280, Nr = ({
2950
2950
  className: p
2951
2951
  }) => {
2952
2952
  var D;
2953
- const [x, N] = b(!1), [m, y] = b(""), [h, C] = b(null), F = ee(null), v = ee(null), $ = ee(null), A = ee(null), I = Q(() => {
2954
- if (!v.current) return null;
2955
- const S = v.current.getBoundingClientRect(), X = window.innerHeight - S.bottom < it && S.top > it;
2953
+ const [x, N] = b(!1), [m, y] = b(""), [h, C] = b(null), F = ee(null), k = ee(null), $ = ee(null), A = ee(null), I = Q(() => {
2954
+ if (!k.current) return null;
2955
+ const S = k.current.getBoundingClientRect(), X = window.innerHeight - S.bottom < it && S.top > it;
2956
2956
  return {
2957
2957
  top: X ? S.top : S.bottom + 4,
2958
2958
  left: S.left,
@@ -2993,7 +2993,7 @@ const at = 280, Nr = ({
2993
2993
  (S) => S.label.toLowerCase().includes(m.toLowerCase()) || S.value.toLowerCase().includes(m.toLowerCase())
2994
2994
  ), R = (D = a.find((S) => S.value === o)) == null ? void 0 : D.label, P = (S, H) => {
2995
2995
  d || H || (l(S), J());
2996
- }, z = v.current ? getComputedStyle(v.current) : null, _ = (z == null ? void 0 : z.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", O = (z == null ? void 0 : z.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", M = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", k = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (z == null ? void 0 : z.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ s(
2996
+ }, z = k.current ? getComputedStyle(k.current) : null, _ = (z == null ? void 0 : z.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", O = (z == null ? void 0 : z.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", M = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", Z = (z == null ? void 0 : z.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", w = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (z == null ? void 0 : z.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (z == null ? void 0 : z.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", B = x && h && /* @__PURE__ */ s(
2997
2997
  "div",
2998
2998
  {
2999
2999
  ref: $,
@@ -3059,7 +3059,7 @@ const at = 280, Nr = ({
3059
3059
  cursor: S.disabled ? "not-allowed" : "pointer",
3060
3060
  opacity: S.disabled ? 0.4 : 1,
3061
3061
  backgroundColor: H ? U : "transparent",
3062
- color: H ? k : M,
3062
+ color: H ? w : M,
3063
3063
  userSelect: "none"
3064
3064
  },
3065
3065
  onMouseEnter: (X) => {
@@ -3098,7 +3098,7 @@ const at = 280, Nr = ({
3098
3098
  /* @__PURE__ */ s(
3099
3099
  "div",
3100
3100
  {
3101
- ref: v,
3101
+ ref: k,
3102
3102
  role: "button",
3103
3103
  tabIndex: d ? -1 : 0,
3104
3104
  onClick: E,
@@ -3140,7 +3140,7 @@ const at = 280, Nr = ({
3140
3140
  }
3141
3141
  );
3142
3142
  };
3143
- Ke.displayName = "SearchableSelect";
3143
+ We.displayName = "SearchableSelect";
3144
3144
  const Sr = ({
3145
3145
  label: e,
3146
3146
  error: t,
@@ -3151,26 +3151,26 @@ const Sr = ({
3151
3151
  value: l = [],
3152
3152
  className: d
3153
3153
  }) => {
3154
- const [u, p] = b(!1), x = ee(null), N = (v) => {
3155
- if (!v) return;
3156
- const $ = Array.from(v);
3154
+ const [u, p] = b(!1), x = ee(null), N = (k) => {
3155
+ if (!k) return;
3156
+ const $ = Array.from(k);
3157
3157
  if (i && $.filter((I) => I.size > i).length > 0) {
3158
- const I = We(i);
3158
+ const I = Ye(i);
3159
3159
  alert(`Some files exceed the maximum size of ${I}`);
3160
3160
  return;
3161
3161
  }
3162
3162
  o == null || o(a ? [...l, ...$] : [$[0]]);
3163
- }, m = (v) => {
3164
- v.preventDefault(), p(!0);
3163
+ }, m = (k) => {
3164
+ k.preventDefault(), p(!0);
3165
3165
  }, y = () => {
3166
3166
  p(!1);
3167
- }, h = (v) => {
3168
- v.preventDefault(), p(!1), N(v.dataTransfer.files);
3167
+ }, h = (k) => {
3168
+ k.preventDefault(), p(!1), N(k.dataTransfer.files);
3169
3169
  }, C = () => {
3170
- var v;
3171
- (v = x.current) == null || v.click();
3172
- }, F = (v) => {
3173
- const $ = l.filter((A, I) => I !== v);
3170
+ var k;
3171
+ (k = x.current) == null || k.click();
3172
+ }, F = (k) => {
3173
+ const $ = l.filter((A, I) => I !== k);
3174
3174
  o == null || o($);
3175
3175
  };
3176
3176
  return /* @__PURE__ */ s("div", { className: oe("w-full", d), children: [
@@ -3196,7 +3196,7 @@ const Sr = ({
3196
3196
  className: "hidden",
3197
3197
  accept: n,
3198
3198
  multiple: a,
3199
- onChange: (v) => N(v.target.files)
3199
+ onChange: (k) => N(k.target.files)
3200
3200
  }
3201
3201
  ),
3202
3202
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
@@ -3224,13 +3224,13 @@ const Sr = ({
3224
3224
  ] }),
3225
3225
  i && /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: [
3226
3226
  "Maximum file size: ",
3227
- We(i)
3227
+ Ye(i)
3228
3228
  ] })
3229
3229
  ] })
3230
3230
  ]
3231
3231
  }
3232
3232
  ),
3233
- l.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: l.map((v, $) => /* @__PURE__ */ s(
3233
+ l.length > 0 && /* @__PURE__ */ r("div", { className: "mt-3 space-y-2", children: l.map((k, $) => /* @__PURE__ */ s(
3234
3234
  "div",
3235
3235
  {
3236
3236
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -3252,10 +3252,10 @@ const Sr = ({
3252
3252
  )
3253
3253
  }
3254
3254
  ),
3255
- /* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: v.name }),
3255
+ /* @__PURE__ */ r("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: k.name }),
3256
3256
  /* @__PURE__ */ s("span", { className: "text-xs text-gray-500", children: [
3257
3257
  "(",
3258
- We(v.size),
3258
+ Ye(k.size),
3259
3259
  ")"
3260
3260
  ] })
3261
3261
  ] }),
@@ -3283,7 +3283,7 @@ const Sr = ({
3283
3283
  )) }),
3284
3284
  t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: t })
3285
3285
  ] });
3286
- }, Cr = He(
3286
+ }, Cr = Ue(
3287
3287
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, i) => /* @__PURE__ */ s("div", { className: "w-full", children: [
3288
3288
  a.label && /* @__PURE__ */ s("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
3289
3289
  a.label,
@@ -3388,7 +3388,7 @@ const Rr = (e) => {
3388
3388
  * This source code is licensed under the ISC license.
3389
3389
  * See the LICENSE file in the root directory of this source tree.
3390
3390
  */
3391
- const Pr = He(
3391
+ const Pr = Ue(
3392
3392
  ({
3393
3393
  color: e = "currentColor",
3394
3394
  size: t = 24,
@@ -3424,7 +3424,7 @@ const Pr = He(
3424
3424
  * See the LICENSE file in the root directory of this source tree.
3425
3425
  */
3426
3426
  const pt = (e, t) => {
3427
- const n = He(
3427
+ const n = Ue(
3428
3428
  ({ className: a, ...i }, o) => Qe(Pr, {
3429
3429
  ref: o,
3430
3430
  iconNode: t,
@@ -3503,19 +3503,19 @@ const Mr = ({
3503
3503
  const C = Ee(
3504
3504
  () => a ? Tr(a.questionGroups) : [],
3505
3505
  [a]
3506
- ), F = y === C.length - 1, v = C[y] ?? [], $ = Q((E, g) => {
3506
+ ), F = y === C.length - 1, k = C[y] ?? [], $ = Q((E, g) => {
3507
3507
  x((R) => ({ ...R, [E]: g })), m((R) => {
3508
3508
  const P = { ...R };
3509
3509
  return delete P[E], P;
3510
3510
  });
3511
3511
  }, []), A = Q(() => {
3512
3512
  const E = {};
3513
- for (const { question: g } of v) {
3513
+ for (const { question: g } of k) {
3514
3514
  const R = Lr(g, p[g.id] ?? []);
3515
3515
  R && (E[g.id] = R);
3516
3516
  }
3517
3517
  return m((g) => ({ ...g, ...E })), Object.keys(E).length === 0;
3518
- }, [v, p]), I = () => {
3518
+ }, [k, p]), I = () => {
3519
3519
  A() && h((E) => E + 1);
3520
3520
  }, q = () => {
3521
3521
  y > 0 ? h((E) => E - 1) : n == null || n();
@@ -3565,7 +3565,7 @@ const Mr = ({
3565
3565
  )) })
3566
3566
  ] })
3567
3567
  ] }),
3568
- /* @__PURE__ */ r(W, { className: "space-y-6", children: v.map(({ question: E }) => /* @__PURE__ */ r(
3568
+ /* @__PURE__ */ r(W, { className: "space-y-6", children: k.map(({ question: E }) => /* @__PURE__ */ r(
3569
3569
  Or,
3570
3570
  {
3571
3571
  question: E,
@@ -3633,7 +3633,7 @@ const Mr = ({
3633
3633
  }
3634
3634
  ),
3635
3635
  o === "single-select" && /* @__PURE__ */ r(
3636
- _e,
3636
+ He,
3637
3637
  {
3638
3638
  value: t[0] ?? "",
3639
3639
  onChange: (d) => a([d.target.value]),
@@ -3729,9 +3729,9 @@ const Mr = ({
3729
3729
  const m = await Promise.all(
3730
3730
  a.uploadDocumentFiles.map(async (h) => {
3731
3731
  const C = u[h.id] || [], F = await Promise.all(
3732
- C.map(async (v) => ({
3733
- fileName: v.name,
3734
- fileData: await dr(v)
3732
+ C.map(async (k) => ({
3733
+ fileName: k.name,
3734
+ fileData: await dr(k)
3735
3735
  }))
3736
3736
  );
3737
3737
  return {
@@ -3859,10 +3859,10 @@ const Ur = ({
3859
3859
  ge.useEffect(() => {
3860
3860
  i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && x(i);
3861
3861
  }, [i]);
3862
- const v = Ee(
3862
+ const k = Ee(
3863
3863
  () => a && a.length > 0 ? _r(a) : [],
3864
3864
  [a]
3865
- ), $ = y === v.length - 1, A = v[y] ?? [];
3865
+ ), $ = y === k.length - 1, A = k[y] ?? [];
3866
3866
  ge.useEffect(() => {
3867
3867
  !o && a && a.length === 0 && !C && !l && (F(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3868
3868
  }, [o, a, C, l, u, e, t]);
@@ -3907,14 +3907,14 @@ const Ur = ({
3907
3907
  /* @__PURE__ */ s(de, { children: [
3908
3908
  /* @__PURE__ */ r("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3909
3909
  /* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
3910
- v.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
3910
+ k.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
3911
3911
  /* @__PURE__ */ s("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3912
3912
  "Page ",
3913
3913
  y + 1,
3914
3914
  " of ",
3915
- v.length
3915
+ k.length
3916
3916
  ] }),
3917
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: v.map((R, P) => /* @__PURE__ */ r(
3917
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: k.map((R, P) => /* @__PURE__ */ r(
3918
3918
  "div",
3919
3919
  {
3920
3920
  className: "rounded-full transition-all duration-200",
@@ -4067,7 +4067,7 @@ const Ur = ({
4067
4067
  n && /* @__PURE__ */ r("p", { className: "text-sm text-danger-500", children: n })
4068
4068
  ] }),
4069
4069
  i === "country" && /* @__PURE__ */ r(
4070
- _e,
4070
+ He,
4071
4071
  {
4072
4072
  value: t[0] ?? "",
4073
4073
  onChange: (l) => a([l.target.value]),
@@ -4227,7 +4227,7 @@ const Ur = ({
4227
4227
  onComplete: t,
4228
4228
  onBack: n
4229
4229
  }) => {
4230
- const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [l, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, v] = b(!1), [$, A] = b(!1), [I, q] = b(0);
4230
+ const { appropriatenessTestService: a } = ye(), [i, o] = b(null), [l, d] = b(!0), [u, p] = b(!1), [x, N] = b(null), [m, y] = b({}), [h, C] = b(0), [F, k] = b(!1), [$, A] = b(!1), [I, q] = b(0);
4231
4231
  ne(() => {
4232
4232
  (async () => {
4233
4233
  try {
@@ -4247,8 +4247,8 @@ const Ur = ({
4247
4247
  const J = (O) => {
4248
4248
  const M = O.split(":").map(Number);
4249
4249
  if (M.length === 3) {
4250
- const [Z, k, U] = M;
4251
- return Z * 3600 + k * 60 + U;
4250
+ const [Z, w, U] = M;
4251
+ return Z * 3600 + w * 60 + U;
4252
4252
  }
4253
4253
  return 0;
4254
4254
  }, E = (O) => {
@@ -4271,7 +4271,7 @@ const Ur = ({
4271
4271
  $ && !u && P();
4272
4272
  }, [$]);
4273
4273
  const g = () => {
4274
- i && (v(!0), C(i.testDurationSec));
4274
+ i && (k(!0), C(i.testDurationSec));
4275
4275
  }, R = (O, M) => {
4276
4276
  y((Z) => ({
4277
4277
  ...Z,
@@ -4289,9 +4289,9 @@ const Ur = ({
4289
4289
  p(!0), N(null);
4290
4290
  try {
4291
4291
  const M = i.appropriatenessQuestions.map(
4292
- (k) => ({
4293
- appropriatenessQuestionId: k.id,
4294
- value: m[k.id] || ""
4292
+ (w) => ({
4293
+ appropriatenessQuestionId: w.id,
4294
+ value: m[w.id] || ""
4295
4295
  // Empty string if not answered
4296
4296
  })
4297
4297
  ), Z = {
@@ -4301,17 +4301,17 @@ const Ur = ({
4301
4301
  };
4302
4302
  console.log("Submitting appropriateness test:", Z);
4303
4303
  try {
4304
- const k = await a.fillAppropriatenessTest(Z);
4305
- console.log("Appropriateness test result:", k), k.message && (k.message.toLowerCase().includes("pass") || k.message.toLowerCase().includes("success") || k.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(k.message || "Test completed. Please check the result."), v(!1), A(!1), y({}), setTimeout(() => z(), 1e3));
4306
- } catch (k) {
4307
- if (k.code === 400 && k.message) {
4308
- const U = k.message;
4309
- console.log("Test failed:", U), N(U), v(!1), A(!1), y({}), setTimeout(() => z(), 1500);
4304
+ const w = await a.fillAppropriatenessTest(Z);
4305
+ console.log("Appropriateness test result:", w), w.message && (w.message.toLowerCase().includes("pass") || w.message.toLowerCase().includes("success") || w.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(w.message || "Test completed. Please check the result."), k(!1), A(!1), y({}), setTimeout(() => z(), 1e3));
4306
+ } catch (w) {
4307
+ if (w.code === 400 && w.message) {
4308
+ const U = w.message;
4309
+ console.log("Test failed:", U), N(U), k(!1), A(!1), y({}), setTimeout(() => z(), 1500);
4310
4310
  } else
4311
- throw k;
4311
+ throw w;
4312
4312
  }
4313
4313
  } catch (M) {
4314
- console.error("Error submitting appropriateness test:", M), N(M.message || "Failed to submit test. Please try again."), v(!1), A(!1), y({});
4314
+ console.error("Error submitting appropriateness test:", M), N(M.message || "Failed to submit test. Please try again."), k(!1), A(!1), y({});
4315
4315
  } finally {
4316
4316
  p(!1);
4317
4317
  }
@@ -4399,7 +4399,7 @@ Failed to reload test data. Please refresh the page.`);
4399
4399
  O.groupName && /* @__PURE__ */ r("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: O.groupName }),
4400
4400
  /* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: O.question })
4401
4401
  ] }),
4402
- /* @__PURE__ */ r("div", { className: "space-y-2", children: O.answers.map((Z, k) => /* @__PURE__ */ s(
4402
+ /* @__PURE__ */ r("div", { className: "space-y-2", children: O.answers.map((Z, w) => /* @__PURE__ */ s(
4403
4403
  "label",
4404
4404
  {
4405
4405
  className: `
@@ -4422,7 +4422,7 @@ Failed to reload test data. Please refresh the page.`);
4422
4422
  /* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: Z })
4423
4423
  ]
4424
4424
  },
4425
- k
4425
+ w
4426
4426
  )) })
4427
4427
  ]
4428
4428
  },
@@ -4509,8 +4509,8 @@ Failed to reload test data. Please refresh the page.`);
4509
4509
  onComplete: t,
4510
4510
  onBack: n
4511
4511
  }) => {
4512
- var Z, k, U, te;
4513
- const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = vr(e), [y, h] = b(null), [C, F] = b(null), [v, $] = b([]), [A, I] = b(!0), [q, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = St({
4512
+ var Z, w, U, te;
4513
+ const { applicantService: a, baseInformationService: i, config: o } = ye(), { identityData: l, provider: d, token: u, isLoading: p, error: x, requestIdentity: N, restartIdentity: m } = vr(e), [y, h] = b(null), [C, F] = b(null), [k, $] = b([]), [A, I] = b(!0), [q, J] = b(!1), [E, g] = b(null), [R, P] = b(!1), z = ge.useRef(!1), _ = St({
4514
4514
  defaultValues: {
4515
4515
  street: "",
4516
4516
  streetNumber: "",
@@ -4796,7 +4796,7 @@ Failed to reload test data. Please refresh the page.`);
4796
4796
  /* @__PURE__ */ s("p", { className: "mt-1 text-base", children: [
4797
4797
  (Z = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : Z.firstName,
4798
4798
  " ",
4799
- (k = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : k.lastName
4799
+ (w = C == null ? void 0 : C.applicantRequestData) == null ? void 0 : w.lastName
4800
4800
  ] })
4801
4801
  ] }),
4802
4802
  /* @__PURE__ */ s("div", { children: [
@@ -4817,13 +4817,13 @@ Failed to reload test data. Please refresh the page.`);
4817
4817
  control: _.control,
4818
4818
  name: "country",
4819
4819
  render: ({ field: B }) => /* @__PURE__ */ r(
4820
- _e,
4820
+ He,
4821
4821
  {
4822
4822
  ...B,
4823
4823
  label: "Country",
4824
4824
  options: [
4825
4825
  { value: "", label: "Select country..." },
4826
- ...v.map((D) => ({
4826
+ ...k.map((D) => ({
4827
4827
  value: D.abbreviation3 || D.abbreviation,
4828
4828
  label: D.name
4829
4829
  }))
@@ -4838,13 +4838,13 @@ Failed to reload test data. Please refresh the page.`);
4838
4838
  control: _.control,
4839
4839
  name: "nationality",
4840
4840
  render: ({ field: B }) => /* @__PURE__ */ r(
4841
- _e,
4841
+ He,
4842
4842
  {
4843
4843
  ...B,
4844
4844
  label: "Nationality",
4845
4845
  options: [
4846
4846
  { value: "", label: "Select nationality..." },
4847
- ...v.map((D) => ({
4847
+ ...k.map((D) => ({
4848
4848
  value: D.abbreviation3 || D.abbreviation,
4849
4849
  label: D.name
4850
4850
  }))
@@ -4955,21 +4955,21 @@ Failed to reload test data. Please refresh the page.`);
4955
4955
  iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
4956
4956
  iconColor: "text-yellow-700 dark:text-yellow-400",
4957
4957
  message: "Your application is currently under manual review."
4958
- } : n === qe.Success ? {
4958
+ } : n === je.Success ? {
4959
4959
  type: "success",
4960
4960
  title: "Process Complete",
4961
4961
  icon: "✓",
4962
4962
  iconBg: "bg-green-100 dark:bg-green-900/30",
4963
4963
  iconColor: "text-green-600 dark:text-green-400",
4964
4964
  message: "Your verification process has been completed successfully."
4965
- } : n === qe.Failed ? {
4965
+ } : n === je.Failed ? {
4966
4966
  type: "error",
4967
4967
  title: "Process Failed",
4968
4968
  icon: "✕",
4969
4969
  iconBg: "bg-red-100 dark:bg-red-900/30",
4970
4970
  iconColor: "text-red-600 dark:text-red-400",
4971
4971
  message: "The verification process could not be completed."
4972
- } : n === qe.AdminReview ? {
4972
+ } : n === je.AdminReview ? {
4973
4973
  type: "pending",
4974
4974
  title: "Admin Review Required",
4975
4975
  icon: "📋",
@@ -5083,11 +5083,11 @@ Failed to reload test data. Please refresh the page.`);
5083
5083
  ] }),
5084
5084
  t && /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
5085
5085
  ] });
5086
- }, Ye = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5087
- function Ue(e) {
5086
+ }, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
5087
+ function Be(e) {
5088
5088
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
5089
5089
  }
5090
- const Be = {
5090
+ const _e = {
5091
5091
  width: "16px",
5092
5092
  height: "16px",
5093
5093
  minWidth: "16px",
@@ -5165,7 +5165,7 @@ const Be = {
5165
5165
  () => l != null && l.applicantFormPages && l.applicantFormPages.length > 0 ? l.applicantFormPages : null,
5166
5166
  [l == null ? void 0 : l.applicantFormPages]
5167
5167
  ), y = Ee(() => {
5168
- const c = new Set(Ye), T = l == null ? void 0 : l.applicantFormRequiredFields;
5168
+ const c = new Set(qe), T = l == null ? void 0 : l.applicantFormRequiredFields;
5169
5169
  if (T) for (const L of T) c.add(L);
5170
5170
  if (m)
5171
5171
  for (const L of m)
@@ -5175,14 +5175,14 @@ const Be = {
5175
5175
  }, [l == null ? void 0 : l.applicantFormRequiredFields, m]), h = Ee(() => {
5176
5176
  var L;
5177
5177
  if (m) {
5178
- const f = m.flatMap((j) => j.fields).filter((j) => !j.isCustom && j.name).map((j) => j.name), w = new Set(f);
5179
- for (const j of Ye) w.add(j);
5180
- return Array.from(w);
5178
+ const f = m.flatMap((j) => j.fields).filter((j) => !j.isCustom && j.name).map((j) => j.name), v = new Set(f);
5179
+ for (const j of qe) v.add(j);
5180
+ return Array.from(v);
5181
5181
  }
5182
5182
  let c;
5183
5183
  (L = i.applicantForm) != null && L.visibleFields ? c = i.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? c = l.applicantFormVisibleFields : c = Ot;
5184
5184
  const T = new Set(c);
5185
- for (const f of Ye) T.add(f);
5185
+ for (const f of qe) T.add(f);
5186
5186
  return Array.from(T);
5187
5187
  }, [(et = i.applicantForm) == null ? void 0 : et.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields, m]), C = /* @__PURE__ */ new Set([
5188
5188
  "country",
@@ -5196,13 +5196,13 @@ const Be = {
5196
5196
  const c = /* @__PURE__ */ new Set();
5197
5197
  if (m)
5198
5198
  for (const f of m)
5199
- for (const w of f.fields)
5200
- !w.isCustom && w.name && C.has(w.name) && c.add(w.countriesType ?? ((T = Te[w.name]) == null ? void 0 : T.countriesType));
5199
+ for (const v of f.fields)
5200
+ !v.isCustom && v.name && C.has(v.name) && c.add(v.countriesType ?? ((T = Te[v.name]) == null ? void 0 : T.countriesType));
5201
5201
  else
5202
5202
  for (const f of h)
5203
5203
  C.has(f) && c.add((L = Te[f]) == null ? void 0 : L.countriesType);
5204
5204
  return c.size === 0 && c.add(void 0), Array.from(c);
5205
- }, [h, m]), [v, $] = b({}), [A, I] = b(!0), q = ee(!1), J = ee(/* @__PURE__ */ new Set());
5205
+ }, [h, m]), [k, $] = b({}), [A, I] = b(!0), q = ee(!1), J = ee(/* @__PURE__ */ new Set());
5206
5206
  ne(() => {
5207
5207
  if (q.current || F.length === 0) return;
5208
5208
  const c = F.filter((L) => {
@@ -5217,8 +5217,8 @@ const Be = {
5217
5217
  try {
5218
5218
  const L = await Promise.all(
5219
5219
  c.map(async (f) => {
5220
- const w = f != null ? String(f) : "all", j = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = j.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5221
- return J.current.add(w), [w, ie];
5220
+ const v = f != null ? String(f) : "all", j = await o.getCountries("", i.locale || "en", f), ae = /* @__PURE__ */ new Set(), ie = j.map((se) => ({ value: se.abbreviation3 || se.abbreviation, label: se.name })).filter((se) => !se.value || ae.has(se.value) ? !1 : (ae.add(se.value), !0));
5221
+ return J.current.add(v), [v, ie];
5222
5222
  })
5223
5223
  );
5224
5224
  $((f) => ({ ...f, ...Object.fromEntries(L) }));
@@ -5230,9 +5230,9 @@ const Be = {
5230
5230
  })();
5231
5231
  }, [F]);
5232
5232
  const E = (c, T) => {
5233
- var w;
5234
- const L = T ?? ((w = Te[c]) == null ? void 0 : w.countriesType), f = L != null ? String(L) : "all";
5235
- return v[f] || [];
5233
+ var v;
5234
+ const L = T ?? ((v = Te[c]) == null ? void 0 : v.countriesType), f = L != null ? String(L) : "all";
5235
+ return k[f] || [];
5236
5236
  }, [g, R] = b({
5237
5237
  workflowKey: p,
5238
5238
  firstName: "",
@@ -5258,21 +5258,21 @@ const Be = {
5258
5258
  educationLevel: "",
5259
5259
  occupation: "",
5260
5260
  taxNumber: ""
5261
- }), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [k, U] = b(null), [te, B] = b(!1), D = (c, T) => R((L) => ({ ...L, [c]: T })), S = (c, T) => z((L) => ({ ...L, [c]: T })), H = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && _ < m.length - 1 ? _ + 1 : -1, Y = m && _ > 0 ? _ - 1 : -1, we = (c) => {
5261
+ }), [P, z] = b({}), [_, O] = b(0), [M, Z] = b({}), [w, U] = b(null), [te, B] = b(!1), D = (c, T) => R((L) => ({ ...L, [c]: T })), S = (c, T) => z((L) => ({ ...L, [c]: T })), H = (c) => !c.conditionalOn || P[c.conditionalOn] === "true", X = m && _ < m.length - 1 ? _ + 1 : -1, Y = m && _ > 0 ? _ - 1 : -1, we = (c) => {
5262
5262
  var L;
5263
5263
  const T = {};
5264
5264
  for (const f of c.fields)
5265
5265
  if (f.isCustom) {
5266
5266
  if (f.customType === "paragraph" || f.customType === "br" || f.customType === "link") continue;
5267
5267
  if (f.required && f.paramName) {
5268
- const w = P[f.paramName], j = f.displayText || f.label || f.paramName;
5269
- f.customType === "checkbox" || f.customType === "link_checkbox" ? w !== "true" && (T[f.paramName] = `${j} is required.`) : (!w || w.trim() === "") && (T[f.paramName] = `${j} is required.`);
5268
+ const v = P[f.paramName], j = f.displayText || f.label || f.paramName;
5269
+ f.customType === "checkbox" || f.customType === "link_checkbox" ? v !== "true" && (T[f.paramName] = `${j} is required.`) : (!v || v.trim() === "") && (T[f.paramName] = `${j} is required.`);
5270
5270
  }
5271
5271
  } else if (f.name) {
5272
- const w = f.name;
5273
- if (y.includes(w) && Ue(g[w])) {
5274
- const j = f.displayText || ((L = Te[w]) == null ? void 0 : L.label) || w;
5275
- T[w] = `${j} is required.`;
5272
+ const v = f.name;
5273
+ if (y.includes(v) && Be(g[v])) {
5274
+ const j = f.displayText || ((L = Te[v]) == null ? void 0 : L.label) || v;
5275
+ T[v] = `${j} is required.`;
5276
5276
  }
5277
5277
  }
5278
5278
  return T;
@@ -5312,26 +5312,31 @@ const Be = {
5312
5312
  if (m) {
5313
5313
  for (const f of m)
5314
5314
  if (H(f)) {
5315
- for (const w of f.fields)
5316
- if (!w.isCustom && w.name) {
5317
- const j = w.name, ae = g[j];
5318
- Ue(ae) || (c[j] = ae);
5315
+ for (const v of f.fields)
5316
+ if (!v.isCustom && v.name) {
5317
+ const j = v.name, ae = g[j];
5318
+ Be(ae) || (c[j] = ae);
5319
5319
  }
5320
5320
  }
5321
+ for (const f of qe)
5322
+ if (c[f] === void 0) {
5323
+ const v = g[f];
5324
+ Be(v) || (c[f] = v);
5325
+ }
5321
5326
  } else
5322
5327
  h.forEach((f) => {
5323
5328
  if (f === "externalRefId") return;
5324
- const w = g[f];
5325
- Ue(w) || (c[f] = w);
5329
+ const v = g[f];
5330
+ Be(v) || (c[f] = v);
5326
5331
  });
5327
5332
  const T = [];
5328
5333
  if (m) {
5329
5334
  for (const f of m)
5330
5335
  if (H(f)) {
5331
- for (const w of f.fields)
5332
- if (w.isCustom && w.paramName && w.customType !== "paragraph" && w.customType !== "br" && w.customType !== "link") {
5333
- const j = P[w.paramName] ?? "";
5334
- T.push({ paramName: w.paramName, paramValue: j });
5336
+ for (const v of f.fields)
5337
+ if (v.isCustom && v.paramName && v.customType !== "paragraph" && v.customType !== "br" && v.customType !== "link") {
5338
+ const j = P[v.paramName] ?? "";
5339
+ T.push({ paramName: v.paramName, paramValue: j });
5335
5340
  }
5336
5341
  }
5337
5342
  }
@@ -5347,7 +5352,7 @@ const Be = {
5347
5352
  var T;
5348
5353
  c.preventDefault();
5349
5354
  for (const L of y)
5350
- if (Ue(g[L])) {
5355
+ if (Be(g[L])) {
5351
5356
  const f = ((T = Te[L]) == null ? void 0 : T.label) || L;
5352
5357
  U(`${f} is required.`);
5353
5358
  return;
@@ -5355,15 +5360,15 @@ const Be = {
5355
5360
  await Ce();
5356
5361
  }, Ve = (c, T, L, f) => {
5357
5362
  var tt;
5358
- const w = Te[c];
5359
- if (!w) return null;
5360
- const j = y.includes(c), ae = M[c], ie = L || w.label, se = T ?? c, ke = { required: j };
5361
- switch (w.type) {
5363
+ const v = Te[c];
5364
+ if (!v) return null;
5365
+ const j = y.includes(c), ae = M[c], ie = L || v.label, se = T ?? c, ke = { required: j };
5366
+ switch (v.type) {
5362
5367
  case "select":
5363
5368
  if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
5364
5369
  const le = E(c, f);
5365
5370
  return /* @__PURE__ */ r(
5366
- Ke,
5371
+ We,
5367
5372
  {
5368
5373
  ...ke,
5369
5374
  label: ie,
@@ -5378,7 +5383,7 @@ const Be = {
5378
5383
  }
5379
5384
  if (c === "salutation")
5380
5385
  return /* @__PURE__ */ r(
5381
- Ke,
5386
+ We,
5382
5387
  {
5383
5388
  ...ke,
5384
5389
  label: ie,
@@ -5386,9 +5391,9 @@ const Be = {
5386
5391
  onChange: (le) => D(c, le ? Number(le) : null),
5387
5392
  options: [
5388
5393
  { value: "", label: "Select salutation..." },
5389
- { value: je.Male.toString(), label: "Male" },
5390
- { value: je.Female.toString(), label: "Female" },
5391
- { value: je.Other.toString(), label: "Other" }
5394
+ { value: Ke.Male.toString(), label: "Male" },
5395
+ { value: Ke.Female.toString(), label: "Female" },
5396
+ { value: Ke.Other.toString(), label: "Other" }
5392
5397
  ],
5393
5398
  error: ae
5394
5399
  },
@@ -5397,7 +5402,7 @@ const Be = {
5397
5402
  if (c === "defaultLanguage") {
5398
5403
  const le = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? nt.filter((Re) => l.allowedLanguages.includes(Re.value)) : nt;
5399
5404
  return /* @__PURE__ */ r(
5400
- Ke,
5405
+ We,
5401
5406
  {
5402
5407
  ...ke,
5403
5408
  label: ie,
@@ -5483,7 +5488,7 @@ const Be = {
5483
5488
  }
5484
5489
  }, ft = (c, T) => {
5485
5490
  if (c.customType === "paragraph") {
5486
- const w = c.displayText || c.label || "";
5491
+ const v = c.displayText || c.label || "";
5487
5492
  return /* @__PURE__ */ r(
5488
5493
  "p",
5489
5494
  {
@@ -5494,7 +5499,7 @@ const Be = {
5494
5499
  margin: 0,
5495
5500
  color: "var(--metakyc-text-secondary, #6b7280)"
5496
5501
  },
5497
- dangerouslySetInnerHTML: { __html: w }
5502
+ dangerouslySetInnerHTML: { __html: v }
5498
5503
  },
5499
5504
  `custom-${T}`
5500
5505
  );
@@ -5502,7 +5507,7 @@ const Be = {
5502
5507
  if (c.customType === "br")
5503
5508
  return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${T}`);
5504
5509
  if (c.customType === "link") {
5505
- const w = c.displayText || c.label || c.linkText || c.linkUrl || "";
5510
+ const v = c.displayText || c.label || c.linkText || c.linkUrl || "";
5506
5511
  return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
5507
5512
  "a",
5508
5513
  {
@@ -5519,7 +5524,7 @@ const Be = {
5519
5524
  cursor: "pointer"
5520
5525
  },
5521
5526
  children: [
5522
- w,
5527
+ v,
5523
5528
  /* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
5524
5529
  ]
5525
5530
  }
@@ -5540,9 +5545,9 @@ const Be = {
5540
5545
  {
5541
5546
  type: "checkbox",
5542
5547
  checked: P[c.paramName] === "true",
5543
- onChange: (w) => S(c.paramName, w.target.checked ? "true" : "false"),
5548
+ onChange: (v) => S(c.paramName, v.target.checked ? "true" : "false"),
5544
5549
  className: "metakyc-option-input",
5545
- style: Be
5550
+ style: _e
5546
5551
  }
5547
5552
  ),
5548
5553
  /* @__PURE__ */ s(
@@ -5574,9 +5579,9 @@ const Be = {
5574
5579
  {
5575
5580
  type: "checkbox",
5576
5581
  checked: P[c.paramName] === "true",
5577
- onChange: (w) => S(c.paramName, w.target.checked ? "true" : "false"),
5582
+ onChange: (v) => S(c.paramName, v.target.checked ? "true" : "false"),
5578
5583
  className: "metakyc-option-input",
5579
- style: { ...Be, alignSelf: "flex-start", marginTop: "2px" }
5584
+ style: { ..._e, alignSelf: "flex-start", marginTop: "2px" }
5580
5585
  }
5581
5586
  ),
5582
5587
  /* @__PURE__ */ s(
@@ -5595,7 +5600,7 @@ const Be = {
5595
5600
  rel: "noopener noreferrer",
5596
5601
  className: "underline",
5597
5602
  style: { color: "var(--metakyc-primary, #2563eb)" },
5598
- onClick: (w) => w.stopPropagation(),
5603
+ onClick: (v) => v.stopPropagation(),
5599
5604
  children: c.linkText || c.linkUrl
5600
5605
  }
5601
5606
  ),
@@ -5609,7 +5614,7 @@ const Be = {
5609
5614
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: L })
5610
5615
  ] }, `custom-${T}`);
5611
5616
  if (c.customType === "group_checkbox") {
5612
- const w = (P[c.paramName] || "").split(",").filter(Boolean);
5617
+ const v = (P[c.paramName] || "").split(",").filter(Boolean);
5613
5618
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
5614
5619
  /* @__PURE__ */ s(
5615
5620
  "div",
@@ -5623,7 +5628,7 @@ const Be = {
5623
5628
  }
5624
5629
  ),
5625
5630
  /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((j) => {
5626
- const ae = c.singleSelect ? P[c.paramName] === j.value : w.includes(j.value);
5631
+ const ae = c.singleSelect ? P[c.paramName] === j.value : v.includes(j.value);
5627
5632
  return /* @__PURE__ */ s(
5628
5633
  "label",
5629
5634
  {
@@ -5639,12 +5644,12 @@ const Be = {
5639
5644
  if (c.singleSelect)
5640
5645
  S(c.paramName, ie.target.checked ? j.value : "");
5641
5646
  else {
5642
- const se = ie.target.checked ? [...w, j.value] : w.filter((ke) => ke !== j.value);
5647
+ const se = ie.target.checked ? [...v, j.value] : v.filter((ke) => ke !== j.value);
5643
5648
  S(c.paramName, se.join(","));
5644
5649
  }
5645
5650
  },
5646
5651
  className: "metakyc-option-input",
5647
- style: Be
5652
+ style: _e
5648
5653
  }
5649
5654
  ),
5650
5655
  /* @__PURE__ */ r(
@@ -5675,7 +5680,7 @@ const Be = {
5675
5680
  ]
5676
5681
  }
5677
5682
  ),
5678
- /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((w) => /* @__PURE__ */ s(
5683
+ /* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((v) => /* @__PURE__ */ s(
5679
5684
  "label",
5680
5685
  {
5681
5686
  className: "metakyc-option-label",
@@ -5685,11 +5690,11 @@ const Be = {
5685
5690
  "input",
5686
5691
  {
5687
5692
  type: "radio",
5688
- checked: P[c.paramName] === w.value,
5689
- onChange: () => S(c.paramName, w.value),
5693
+ checked: P[c.paramName] === v.value,
5694
+ onChange: () => S(c.paramName, v.value),
5690
5695
  name: `radio-group-${c.paramName}-${T}`,
5691
5696
  className: "metakyc-option-input",
5692
- style: Be
5697
+ style: _e
5693
5698
  }
5694
5699
  ),
5695
5700
  /* @__PURE__ */ r(
@@ -5697,12 +5702,12 @@ const Be = {
5697
5702
  {
5698
5703
  className: "metakyc-option-text",
5699
5704
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5700
- children: w.label
5705
+ children: v.label
5701
5706
  }
5702
5707
  )
5703
5708
  ]
5704
5709
  },
5705
- w.value
5710
+ v.value
5706
5711
  )) }),
5707
5712
  L && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: L })
5708
5713
  ] }, `custom-${T}`) : /* @__PURE__ */ r(
@@ -5711,7 +5716,7 @@ const Be = {
5711
5716
  type: "text",
5712
5717
  label: `${f}${c.required ? " *" : ""}`,
5713
5718
  value: P[c.paramName] || "",
5714
- onChange: (w) => S(c.paramName, w.target.value),
5719
+ onChange: (v) => S(c.paramName, v.target.value),
5715
5720
  required: c.required,
5716
5721
  error: L
5717
5722
  },
@@ -5733,7 +5738,7 @@ const Be = {
5733
5738
  checked: L,
5734
5739
  onChange: (f) => S(c.conditionalOn, f.target.checked ? "true" : "false"),
5735
5740
  className: "metakyc-option-input",
5736
- style: Be
5741
+ style: _e
5737
5742
  }
5738
5743
  ),
5739
5744
  /* @__PURE__ */ r(
@@ -5747,9 +5752,9 @@ const Be = {
5747
5752
  ]
5748
5753
  }
5749
5754
  ),
5750
- L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((f, w) => {
5751
- const j = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${w}-${f.paramName}` : `builtin-${f.name}-${w}`;
5752
- return /* @__PURE__ */ r("div", { className: j, children: /* @__PURE__ */ r(Qr, { helpText: f.helpText, children: f.isCustom ? ft(f, w) : Ve(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5755
+ L && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: c.fields.map((f, v) => {
5756
+ const j = f.colSpan === 1 ? "col-span-1" : f.colSpan === 2 ? "col-span-2" : f.colSpan === 3 ? "col-span-3" : "col-span-4", ae = f.isCustom ? `custom-${v}-${f.paramName}` : `builtin-${f.name}-${v}`;
5757
+ return /* @__PURE__ */ r("div", { className: j, children: /* @__PURE__ */ r(Qr, { helpText: f.helpText, children: f.isCustom ? ft(f, v) : Ve(f.name, ae, f.displayText, f.countriesType) }) }, ae);
5753
5758
  }) })
5754
5759
  ] });
5755
5760
  };
@@ -5759,7 +5764,7 @@ const Be = {
5759
5764
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5760
5765
  ] }) }) });
5761
5766
  if (m) {
5762
- const c = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, w = H(c), j = Object.values(M);
5767
+ const c = m[_] ?? m[0], T = Y === -1, L = X === -1, f = m.length, v = H(c), j = Object.values(M);
5763
5768
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(K, { children: [
5764
5769
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5765
5770
  /* @__PURE__ */ s(W, { children: [
@@ -5789,11 +5794,11 @@ const Be = {
5789
5794
  }
5790
5795
  )
5791
5796
  ] }),
5792
- (k || j.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5793
- k && /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5797
+ (w || j.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5798
+ w && /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5794
5799
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5795
5800
  " ",
5796
- k
5801
+ w
5797
5802
  ] }),
5798
5803
  j.map((ae, ie) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: ae }, ie))
5799
5804
  ] }),
@@ -5836,7 +5841,7 @@ const Be = {
5836
5841
  type: "button",
5837
5842
  isLoading: te || u,
5838
5843
  onClick: L ? Ce : ve,
5839
- children: L ? c.conditionalOn && !w ? "Skip & Submit" : "Submit" : c.conditionalOn && !w ? "Skip" : "Next"
5844
+ children: L ? c.conditionalOn && !v ? "Skip & Submit" : "Submit" : c.conditionalOn && !v ? "Skip" : "Next"
5840
5845
  }
5841
5846
  )
5842
5847
  ] })
@@ -5845,10 +5850,10 @@ const Be = {
5845
5850
  return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: yt, children: /* @__PURE__ */ s(K, { children: [
5846
5851
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ge, { title: (l == null ? void 0 : l.title) || "Create Applicant" }) }),
5847
5852
  /* @__PURE__ */ s(W, { children: [
5848
- k && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5853
+ w && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ s("p", { className: "text-red-600 text-sm", children: [
5849
5854
  /* @__PURE__ */ r("strong", { children: "Error:" }),
5850
5855
  " ",
5851
- k
5856
+ w
5852
5857
  ] }) }),
5853
5858
  /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: h.map((c) => /* @__PURE__ */ r("div", { className: "col-span-4", children: Ve(c) }, c)) })
5854
5859
  ] }),
@@ -5941,7 +5946,7 @@ const Be = {
5941
5946
  /* @__PURE__ */ r(be, { className: "my-8" }),
5942
5947
  /* @__PURE__ */ r("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: o.status === xe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
5943
5948
  ] }) }) });
5944
- const v = (I) => {
5949
+ const k = (I) => {
5945
5950
  switch (I) {
5946
5951
  case G.Overview:
5947
5952
  return "Overview";
@@ -5994,7 +5999,7 @@ const Be = {
5994
5999
  "span",
5995
6000
  {
5996
6001
  className: `ml-2 text-sm ${z ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
5997
- children: g.displayName || g.name || v(g.action) || `Step ${R + 1}`
6002
+ children: g.displayName || g.name || k(g.action) || `Step ${R + 1}`
5998
6003
  }
5999
6004
  )
6000
6005
  ] }),
@@ -6135,7 +6140,7 @@ export {
6135
6140
  Te as FIELD_METADATA,
6136
6141
  Pt as FileType,
6137
6142
  Sr as FileUpload,
6138
- je as GenderType,
6143
+ Ke as GenderType,
6139
6144
  Ge as Header,
6140
6145
  Bt as HttpClient,
6141
6146
  Me as IdentityProviderManager,
@@ -6168,8 +6173,8 @@ export {
6168
6173
  Kt as RiskScoringService,
6169
6174
  Ur as RiskScoringStep,
6170
6175
  lr as SardinAIProvider,
6171
- Ke as SearchableSelect,
6172
- _e as Select,
6176
+ We as SearchableSelect,
6177
+ He as Select,
6173
6178
  be as Spinner,
6174
6179
  ar as StepRouter,
6175
6180
  sr as SumsubProvider,
@@ -6181,7 +6186,7 @@ export {
6181
6186
  Rt as UserType,
6182
6187
  Ie as ValueDataType,
6183
6188
  ir as WorkflowOrchestrator,
6184
- qe as WorkflowResultType,
6189
+ je as WorkflowResultType,
6185
6190
  nr as WorkflowState,
6186
6191
  G as WorkflowStepAction,
6187
6192
  vn as appropriatenessTestSchema,
@@ -6194,7 +6199,7 @@ export {
6194
6199
  ue as defaultTheme,
6195
6200
  dr as fileToBase64,
6196
6201
  Vt as fintechTheme,
6197
- We as formatFileSize,
6202
+ Ye as formatFileSize,
6198
6203
  bn as generateAppropriatenessSchema,
6199
6204
  yn as generateQuestionnaireSchema,
6200
6205
  xn as generateRiskScoringSchema,