@vpdev2/metakyc-sdk 1.0.15 → 1.0.17

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