@vpdev2/metakyc-sdk 1.0.26 → 1.0.28

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 W, useContext as rt, useRef as H, useCallback as q, forwardRef as Le } from "react";
6
+ import se, { 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";
7
7
  import { jsx as n, jsxs as o, Fragment as nt } from "react/jsx-runtime";
8
- import { get as De, set as Ee, appendErrors as _e, useForm as Te, Controller as J } from "react-hook-form";
9
- import { z as ue } from "zod";
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 || {});
8
+ import { get as De, set as Ee, appendErrors as je, useForm as Te, Controller as J } from "react-hook-form";
9
+ import { z as me } from "zod";
10
+ var O = /* @__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))(O || {}), 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 || {}), ce = /* @__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))(ce || {}), 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 || {}), ge = /* @__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))(ge || {}), ye = /* @__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))(ye || {}), 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 || {}), le = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(le || {}), 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 || {}), ne = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(ne || {}), 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 Q = /* @__PURE__ */ ((t) => (t.Default = "default", t.Corporate = "corporate", t.Fintech = "fintech", t.Healthcare = "healthcare", t.Modern = "modern", t.Minimal = "minimal", t))(Q || {});
74
+ var G = /* @__PURE__ */ ((t) => (t.Default = "default", t.Corporate = "corporate", t.Fintech = "fintech", t.Healthcare = "healthcare", t.Modern = "modern", t.Minimal = "minimal", t))(G || {});
75
75
  const ft = {
76
76
  timeout: 3e4,
77
77
  retries: 3,
@@ -120,19 +120,19 @@ class bt {
120
120
  }[e] || e;
121
121
  }
122
122
  }
123
- class de extends Error {
123
+ class ue extends Error {
124
124
  constructor(r, s, a, i, l) {
125
125
  super(r);
126
126
  K(this, "response");
127
- this.code = s, this.details = a, this.validationErrors = i, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, de.prototype);
127
+ this.code = s, this.details = a, this.validationErrors = i, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, ue.prototype);
128
128
  }
129
129
  }
130
- class ve {
130
+ class xe {
131
131
  /**
132
132
  * Process an error from the API response
133
133
  */
134
134
  static handleApiError(e) {
135
- return new de(
135
+ return new ue(
136
136
  e.message || "An unknown error occurred",
137
137
  e.code,
138
138
  e.details || void 0,
@@ -145,36 +145,36 @@ class ve {
145
145
  static handleAxiosError(e) {
146
146
  if (e.response) {
147
147
  const r = e.response.data;
148
- return r && r.error ? new de(
148
+ return r && r.error ? new ue(
149
149
  r.error.message || "An unknown error occurred",
150
150
  r.error.code,
151
151
  r.error.details || void 0,
152
152
  r.error.validationErrors || void 0,
153
153
  e.response
154
- ) : r && r.result && r.result.message ? new de(
154
+ ) : r && r.result && r.result.message ? new ue(
155
155
  r.result.message,
156
156
  e.response.status,
157
157
  `HTTP ${e.response.status}: ${e.response.statusText}`,
158
158
  void 0,
159
159
  e.response
160
- ) : new de(
160
+ ) : new ue(
161
161
  (r == null ? void 0 : r.message) || e.message || "Request failed",
162
162
  e.response.status,
163
163
  `HTTP ${e.response.status}: ${e.response.statusText}`,
164
164
  void 0,
165
165
  e.response
166
166
  );
167
- } else return e.request ? new de(
167
+ } else return e.request ? new ue(
168
168
  "No response from server",
169
169
  0,
170
170
  "The request was made but no response was received. Please check your network connection."
171
- ) : new de(e.message || "An unexpected error occurred", 0, e.toString());
171
+ ) : new ue(e.message || "An unexpected error occurred", 0, e.toString());
172
172
  }
173
173
  /**
174
174
  * Check if an error is a MetaKYCError
175
175
  */
176
176
  static isMetaKYCError(e) {
177
- return e instanceof de;
177
+ return e instanceof ue;
178
178
  }
179
179
  }
180
180
  class vt {
@@ -218,7 +218,7 @@ class vt {
218
218
  });
219
219
  return this.handleResponse(i);
220
220
  } catch (a) {
221
- throw ve.handleAxiosError(a);
221
+ throw xe.handleAxiosError(a);
222
222
  }
223
223
  }
224
224
  /**
@@ -229,7 +229,7 @@ class vt {
229
229
  const a = this.buildEndpoint(e, r), i = await this.axiosInstance.post(a, s);
230
230
  return this.handleResponse(i);
231
231
  } catch (a) {
232
- throw ve.handleAxiosError(a);
232
+ throw xe.handleAxiosError(a);
233
233
  }
234
234
  }
235
235
  /**
@@ -240,7 +240,7 @@ class vt {
240
240
  const a = this.buildEndpoint(e, r), i = await this.axiosInstance.put(a, s);
241
241
  return this.handleResponse(i);
242
242
  } catch (a) {
243
- throw ve.handleAxiosError(a);
243
+ throw xe.handleAxiosError(a);
244
244
  }
245
245
  }
246
246
  /**
@@ -253,7 +253,7 @@ class vt {
253
253
  });
254
254
  return this.handleResponse(i);
255
255
  } catch (a) {
256
- throw ve.handleAxiosError(a);
256
+ throw xe.handleAxiosError(a);
257
257
  }
258
258
  }
259
259
  /**
@@ -262,7 +262,7 @@ class vt {
262
262
  handleResponse(e) {
263
263
  const r = e.data;
264
264
  if (!r.success && r.error)
265
- throw ve.handleApiError(r.error);
265
+ throw xe.handleApiError(r.error);
266
266
  return r;
267
267
  }
268
268
  /**
@@ -880,14 +880,14 @@ const Z = {
880
880
  inputHeight: "2.25rem"
881
881
  }
882
882
  }, Tt = {
883
- [Q.Default]: Z,
884
- [Q.Corporate]: Rt,
885
- [Q.Fintech]: Dt,
886
- [Q.Healthcare]: Pt,
887
- [Q.Modern]: Ft,
888
- [Q.Minimal]: Lt
883
+ [G.Default]: Z,
884
+ [G.Corporate]: Rt,
885
+ [G.Fintech]: Dt,
886
+ [G.Healthcare]: Pt,
887
+ [G.Modern]: Ft,
888
+ [G.Minimal]: Lt
889
889
  };
890
- function xe(t) {
890
+ function we(t) {
891
891
  return Tt[t] || Z;
892
892
  }
893
893
  class Mt {
@@ -905,16 +905,16 @@ class Mt {
905
905
  "GetThemeConfiguration"
906
906
  );
907
907
  if (!r.result.isEnabled)
908
- return xe(Q.Default);
909
- let s = r.result.preset ? xe(r.result.preset) : xe(Q.Default);
908
+ return we(G.Default);
909
+ let s = r.result.preset ? we(r.result.preset) : we(G.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,
913
913
  ...r.result.darkMode.colors
914
914
  }
915
- }), s;
915
+ }), r.result.applicantFormVisibleFields && r.result.applicantFormVisibleFields.length > 0 && (s.applicantFormVisibleFields = r.result.applicantFormVisibleFields), s;
916
916
  } catch (r) {
917
- return console.warn("[ThemeService] Failed to fetch theme configuration:", r), xe(Q.Default);
917
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", r), we(G.Default);
918
918
  }
919
919
  }
920
920
  /**
@@ -928,19 +928,19 @@ class Mt {
928
928
  */
929
929
  getAvailablePresets() {
930
930
  return [
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" }
931
+ { id: G.Default, name: "Default" },
932
+ { id: G.Corporate, name: "Corporate" },
933
+ { id: G.Fintech, name: "Fintech" },
934
+ { id: G.Healthcare, name: "Healthcare" },
935
+ { id: G.Modern, name: "Modern" },
936
+ { id: G.Minimal, name: "Minimal" }
937
937
  ];
938
938
  }
939
939
  /**
940
940
  * Preview theme (doesn't save)
941
941
  */
942
942
  getPreviewTheme(e, r) {
943
- const s = xe(e);
943
+ const s = we(e);
944
944
  return r ? {
945
945
  ...s,
946
946
  ...r,
@@ -1034,7 +1034,7 @@ class Ot {
1034
1034
  */
1035
1035
  get status() {
1036
1036
  var e;
1037
- return ((e = this._progress) == null ? void 0 : e.status) || le.None;
1037
+ return ((e = this._progress) == null ? void 0 : e.status) || ce.None;
1038
1038
  }
1039
1039
  /**
1040
1040
  * Get workflow result
@@ -1053,19 +1053,19 @@ class Ot {
1053
1053
  * Check if workflow is complete
1054
1054
  */
1055
1055
  get isComplete() {
1056
- return this.status === le.Finished;
1056
+ return this.status === ce.Finished;
1057
1057
  }
1058
1058
  /**
1059
1059
  * Check if workflow is on hold
1060
1060
  */
1061
1061
  get isOnHold() {
1062
- return this.status === le.OnHold;
1062
+ return this.status === ce.OnHold;
1063
1063
  }
1064
1064
  /**
1065
1065
  * Check if workflow is in progress
1066
1066
  */
1067
1067
  get isInProgress() {
1068
- return this.status === le.InProgress;
1068
+ return this.status === ce.InProgress;
1069
1069
  }
1070
1070
  /**
1071
1071
  * Set applicant ID
@@ -1079,7 +1079,7 @@ class Ot {
1079
1079
  updateProgress(e) {
1080
1080
  var s, a;
1081
1081
  const r = (s = this._progress) == null ? void 0 : s.currentStep;
1082
- this._progress = e, this._applicantId = e.applicantId, this._error = null, this.events.emit("progressUpdated", e), (r == null ? void 0 : r.order) !== ((a = e.currentStep) == null ? void 0 : a.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status === le.Finished && e.workflowResult && this.events.emit("completed", e.workflowResult);
1082
+ this._progress = e, this._applicantId = e.applicantId, this._error = null, this.events.emit("progressUpdated", e), (r == null ? void 0 : r.order) !== ((a = e.currentStep) == null ? void 0 : a.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status === ce.Finished && e.workflowResult && this.events.emit("completed", e.workflowResult);
1083
1083
  }
1084
1084
  /**
1085
1085
  * Set error
@@ -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: ${B[e]}`);
1167
+ throw new Error(`No handler registered for step action: ${O[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: ${B[e]}`);
1176
+ throw new Error(`No handler registered for step action: ${O[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(B.Questionaries, {
1190
+ this.stepRouter.registerHandler(O.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(B.UploadDocument, {
1195
+ }), this.stepRouter.registerHandler(O.UploadDocument, {
1196
1196
  loadData: (e) => this.uploadDocumentService.getUploadDocument(e),
1197
1197
  submitData: (e) => this.uploadDocumentService.fillUploadDocument(e)
1198
- }), this.stepRouter.registerHandler(B.AppropriatenessTest, {
1198
+ }), this.stepRouter.registerHandler(O.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(B.Overview, {
1203
+ }), this.stepRouter.registerHandler(O.Overview, {
1204
1204
  loadData: (e) => this.overviewService.getOverviewData(e),
1205
1205
  submitData: (e) => this.overviewService.passOverview(e.applicantId)
1206
- }), this.stepRouter.registerHandler(B.RiskScoring, {
1206
+ }), this.stepRouter.registerHandler(O.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(B.IdentitySdk, {
1211
+ }), this.stepRouter.registerHandler(O.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(B.InvestorCategorization, {
1218
+ }), this.stepRouter.registerHandler(O.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(B.ManualReview, {
1223
+ }), this.stepRouter.registerHandler(O.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(B.AdditionalData, {
1230
+ }), this.stepRouter.registerHandler(O.AdditionalData, {
1231
1231
  loadData: async (e) => ({
1232
1232
  applicantId: e,
1233
1233
  message: "Additional data required"
@@ -1338,7 +1338,7 @@ function Br(t) {
1338
1338
  const e = document.getElementById(t);
1339
1339
  e && e.remove();
1340
1340
  }
1341
- class jt {
1341
+ class _t {
1342
1342
  constructor(e) {
1343
1343
  K(this, "sdk", null);
1344
1344
  K(this, "config");
@@ -1393,7 +1393,7 @@ class jt {
1393
1393
  this.sdk && this.sdk.on("idCheck.onError", e);
1394
1394
  }
1395
1395
  }
1396
- class _t {
1396
+ class jt {
1397
1397
  constructor(e) {
1398
1398
  K(this, "sdk", null);
1399
1399
  K(this, "config");
@@ -1603,17 +1603,17 @@ class Ut {
1603
1603
  this.sardineContext && (this.sardineContext = null);
1604
1604
  }
1605
1605
  }
1606
- class fe {
1606
+ class be {
1607
1607
  /**
1608
1608
  * Create a provider instance
1609
1609
  */
1610
1610
  static createProvider(e, r) {
1611
1611
  switch (e) {
1612
- case oe.Sumsub:
1613
- return new jt(r);
1614
- case oe.Onfido:
1612
+ case le.Sumsub:
1615
1613
  return new _t(r);
1616
- case oe.SardinAI:
1614
+ case le.Onfido:
1615
+ return new jt(r);
1616
+ case le.SardinAI:
1617
1617
  return new Ut(r);
1618
1618
  default:
1619
1619
  throw new Error(`Unsupported identity provider: ${e}`);
@@ -1625,7 +1625,7 @@ class fe {
1625
1625
  static parseProviderConfig(e, r, s) {
1626
1626
  var a;
1627
1627
  switch (e) {
1628
- case oe.Sumsub:
1628
+ case le.Sumsub:
1629
1629
  return {
1630
1630
  accessToken: r.accessToken || r.token,
1631
1631
  applicantEmail: r.email,
@@ -1633,11 +1633,11 @@ class fe {
1633
1633
  externalUserId: r.externalUserId,
1634
1634
  lang: r.lang || "en"
1635
1635
  };
1636
- case oe.Onfido:
1636
+ case le.Onfido:
1637
1637
  return {
1638
1638
  token: r.token || r.sdkToken
1639
1639
  };
1640
- case oe.SardinAI:
1640
+ case le.SardinAI:
1641
1641
  const i = ((a = s == null ? void 0 : s.identityProviders) == null ? void 0 : a.sardinai) || {};
1642
1642
  return {
1643
1643
  clientId: i.clientId || r.clientId,
@@ -1747,7 +1747,8 @@ class Kt {
1747
1747
  ...(r = Z.darkMode) == null ? void 0 : r.colors,
1748
1748
  ...e.darkMode.colors
1749
1749
  }
1750
- } : Z.darkMode
1750
+ } : Z.darkMode,
1751
+ applicantFormVisibleFields: e.applicantFormVisibleFields
1751
1752
  };
1752
1753
  }
1753
1754
  /**
@@ -1776,20 +1777,20 @@ class Kt {
1776
1777
  }
1777
1778
  }
1778
1779
  const Ke = tt(null), Or = ({ config: t, children: e }) => {
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), 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();
1780
+ const [r, s] = N(null), a = se.useRef(!1), i = se.useRef(!1), l = Re(() => {
1781
+ const d = new vt(t), u = new xt(d), g = new wt(d), v = new kt(d), p = new Nt(d), f = new St(d), m = new Ct(d), y = new At(d), k = new Et(d), h = new It(d), I = new Mt(d), S = new Kt();
1781
1782
  return {
1782
1783
  httpClient: d,
1783
1784
  applicantService: u,
1784
- questionnaireService: y,
1785
+ questionnaireService: g,
1785
1786
  uploadDocumentService: v,
1786
- appropriatenessTestService: g,
1787
- overviewService: b,
1787
+ appropriatenessTestService: p,
1788
+ overviewService: f,
1788
1789
  riskScoringService: m,
1789
- identityService: f,
1790
+ identityService: y,
1790
1791
  baseInformationService: k,
1791
1792
  investorCategorizationService: h,
1792
- themeService: A,
1793
+ themeService: I,
1793
1794
  themeManager: S
1794
1795
  };
1795
1796
  }, [t]), c = Re(() => ({
@@ -1807,7 +1808,7 @@ const Ke = tt(null), Or = ({ config: t, children: e }) => {
1807
1808
  l.investorCategorizationService
1808
1809
  )
1809
1810
  }), [t, l, r]);
1810
- return W(() => ((async () => {
1811
+ return Y(() => ((async () => {
1811
1812
  if (a.current || i.current) {
1812
1813
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
1813
1814
  return;
@@ -1830,7 +1831,7 @@ const Ke = tt(null), Or = ({ config: t, children: e }) => {
1830
1831
  l.themeManager.cleanup();
1831
1832
  }), []), /* @__PURE__ */ n(Ke.Provider, { value: c, children: e });
1832
1833
  };
1833
- function se() {
1834
+ function ie() {
1834
1835
  const t = rt(Ke);
1835
1836
  if (!t)
1836
1837
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
@@ -1862,26 +1863,26 @@ function Ie(t) {
1862
1863
  const e = 1024, r = ["Bytes", "KB", "MB", "GB"], s = Math.floor(Math.log(t) / Math.log(e));
1863
1864
  return Math.round(t / Math.pow(e, s) * 100) / 100 + " " + r[s];
1864
1865
  }
1865
- function jr(t) {
1866
+ function _r(t) {
1866
1867
  return t;
1867
1868
  }
1868
1869
  function te(...t) {
1869
1870
  return t.filter(Boolean).join(" ");
1870
1871
  }
1871
- const be = {
1872
+ const ve = {
1872
1873
  APPLICANT_ID: "metakyc_applicant_id",
1873
1874
  WORKFLOW_STATE: "metakyc_workflow_state"
1874
1875
  };
1875
1876
  function Ht(t) {
1876
1877
  try {
1877
- localStorage.setItem(be.APPLICANT_ID, t.toString());
1878
+ localStorage.setItem(ve.APPLICANT_ID, t.toString());
1878
1879
  } catch (e) {
1879
1880
  console.warn("Failed to save applicant ID to storage:", e);
1880
1881
  }
1881
1882
  }
1882
1883
  function Vt() {
1883
1884
  try {
1884
- const t = localStorage.getItem(be.APPLICANT_ID);
1885
+ const t = localStorage.getItem(ve.APPLICANT_ID);
1885
1886
  return t ? parseInt(t, 10) : null;
1886
1887
  } catch (t) {
1887
1888
  return console.warn("Failed to retrieve applicant ID from storage:", t), null;
@@ -1889,21 +1890,21 @@ function Vt() {
1889
1890
  }
1890
1891
  function Yt() {
1891
1892
  try {
1892
- localStorage.removeItem(be.APPLICANT_ID);
1893
+ localStorage.removeItem(ve.APPLICANT_ID);
1893
1894
  } catch (t) {
1894
1895
  console.warn("Failed to clear applicant ID from storage:", t);
1895
1896
  }
1896
1897
  }
1897
1898
  function Wt(t) {
1898
1899
  try {
1899
- localStorage.setItem(be.WORKFLOW_STATE, JSON.stringify(t));
1900
+ localStorage.setItem(ve.WORKFLOW_STATE, JSON.stringify(t));
1900
1901
  } catch (e) {
1901
1902
  console.warn("Failed to save workflow state to storage:", e);
1902
1903
  }
1903
1904
  }
1904
- function _r() {
1905
+ function jr() {
1905
1906
  try {
1906
- const t = localStorage.getItem(be.WORKFLOW_STATE);
1907
+ const t = localStorage.getItem(ve.WORKFLOW_STATE);
1907
1908
  return t ? JSON.parse(t) : null;
1908
1909
  } catch (t) {
1909
1910
  return console.warn("Failed to retrieve workflow state from storage:", t), null;
@@ -1911,7 +1912,7 @@ function _r() {
1911
1912
  }
1912
1913
  function Qt() {
1913
1914
  try {
1914
- localStorage.removeItem(be.WORKFLOW_STATE);
1915
+ localStorage.removeItem(ve.WORKFLOW_STATE);
1915
1916
  } catch (t) {
1916
1917
  console.warn("Failed to clear workflow state from storage:", t);
1917
1918
  }
@@ -1920,10 +1921,10 @@ function Ur() {
1920
1921
  Yt(), Qt();
1921
1922
  }
1922
1923
  function Gt(t) {
1923
- const { createOrchestrator: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(null), d = H(null), u = t || Vt();
1924
- W(() => {
1924
+ const { createOrchestrator: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(null), d = H(null), u = t || Vt();
1925
+ Y(() => {
1925
1926
  d.current || (d.current = e());
1926
- }, [e]), W(() => {
1927
+ }, [e]), Y(() => {
1927
1928
  var S;
1928
1929
  r && u && (Ht(u), Wt({
1929
1930
  applicantId: u,
@@ -1934,40 +1935,40 @@ function Gt(t) {
1934
1935
  nextWorkflowKey: r.nextWorkflowKey
1935
1936
  }));
1936
1937
  }, [r, u]);
1937
- const y = H(!1), v = H(!1), g = q(async () => {
1938
+ const g = H(!1), v = H(!1), p = q(async () => {
1938
1939
  if (!(!u || !d.current)) {
1939
- if (y.current) {
1940
+ if (g.current) {
1940
1941
  console.log("[Workflow] Load already in progress, skipping...");
1941
1942
  return;
1942
1943
  }
1943
- y.current = !0, i(!0), c(null);
1944
+ g.current = !0, i(!0), c(null);
1944
1945
  try {
1945
1946
  const S = await d.current.initialize(u);
1946
1947
  s(S), v.current = !0;
1947
1948
  } catch (S) {
1948
1949
  c(S);
1949
1950
  } finally {
1950
- i(!1), y.current = !1;
1951
+ i(!1), g.current = !1;
1951
1952
  }
1952
1953
  }
1953
1954
  }, [u]);
1954
- W(() => {
1955
- u && !v.current && g();
1956
- }, [u, g]);
1957
- const b = q(async () => {
1955
+ Y(() => {
1956
+ u && !v.current && p();
1957
+ }, [u, p]);
1958
+ const f = q(async () => {
1958
1959
  if (d.current) {
1959
- if (y.current) {
1960
+ if (g.current) {
1960
1961
  console.log("[Workflow] Refresh already in progress, skipping...");
1961
1962
  return;
1962
1963
  }
1963
- y.current = !0, i(!0), c(null);
1964
+ g.current = !0, i(!0), c(null);
1964
1965
  try {
1965
1966
  const S = await d.current.refreshProgress();
1966
1967
  s(S);
1967
1968
  } catch (S) {
1968
1969
  c(S);
1969
1970
  } finally {
1970
- i(!1), y.current = !1;
1971
+ i(!1), g.current = !1;
1971
1972
  }
1972
1973
  }
1973
1974
  }, []), m = q(async () => {
@@ -1982,7 +1983,7 @@ function Gt(t) {
1982
1983
  i(!1);
1983
1984
  }
1984
1985
  }
1985
- }, []), f = q(async () => {
1986
+ }, []), y = q(async () => {
1986
1987
  if (d.current) {
1987
1988
  i(!0), c(null);
1988
1989
  try {
@@ -2007,56 +2008,56 @@ function Gt(t) {
2007
2008
  i(!1);
2008
2009
  }
2009
2010
  }
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
+ }, []), h = Me.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((S, w) => S.order - w.order) : [], [r == null ? void 0 : r.stepInfoList]), I = Me.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
2011
2012
  return {
2012
2013
  progress: r,
2013
2014
  applicantId: u,
2014
2015
  currentStep: (r == null ? void 0 : r.currentStep) || null,
2015
2016
  steps: h,
2016
- status: (r == null ? void 0 : r.status) || le.None,
2017
+ status: (r == null ? void 0 : r.status) || ce.None,
2017
2018
  workflowResult: (r == null ? void 0 : r.workflowResult) || null,
2018
2019
  workflowKey: r == null ? void 0 : r.workFlowKey,
2019
2020
  nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
2020
- hasWorkflowChanged: A,
2021
+ hasWorkflowChanged: I,
2021
2022
  isLoading: a,
2022
2023
  error: l,
2023
- isComplete: (r == null ? void 0 : r.status) === le.Finished,
2024
- isOnHold: (r == null ? void 0 : r.status) === le.OnHold,
2025
- refreshProgress: b,
2024
+ isComplete: (r == null ? void 0 : r.status) === ce.Finished,
2025
+ isOnHold: (r == null ? void 0 : r.status) === ce.OnHold,
2026
+ refreshProgress: f,
2026
2027
  moveToNext: m,
2027
- moveBack: f,
2028
+ moveBack: y,
2028
2029
  submitCurrentStep: k,
2029
2030
  orchestrator: d.current
2030
2031
  };
2031
2032
  }
2032
2033
  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), v = H(null), g = q(async () => {
2034
+ const { questionnaireService: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), g = H(!1), v = H(null), p = q(async () => {
2034
2035
  if (t) {
2035
- if (y.current) {
2036
+ if (g.current) {
2036
2037
  console.log("[Questionnaire] Load already in progress, skipping...");
2037
2038
  return;
2038
2039
  }
2039
- y.current = !0, i(!0), u(null);
2040
+ g.current = !0, i(!0), u(null);
2040
2041
  try {
2041
2042
  const m = await e.getQuestionnaire(t);
2042
2043
  s(m), v.current = t;
2043
2044
  } catch (m) {
2044
2045
  u(m);
2045
2046
  } finally {
2046
- i(!1), y.current = !1;
2047
+ i(!1), g.current = !1;
2047
2048
  }
2048
2049
  }
2049
2050
  }, [t, e]);
2050
- W(() => {
2051
- t && v.current !== t && g();
2051
+ Y(() => {
2052
+ t && v.current !== t && p();
2052
2053
  }, [t]);
2053
- const b = q(
2054
+ const f = q(
2054
2055
  async (m) => {
2055
2056
  c(!0), u(null);
2056
2057
  try {
2057
2058
  return await e.fillQuestionnaire(m);
2058
- } catch (f) {
2059
- throw u(f), f;
2059
+ } catch (y) {
2060
+ throw u(y), y;
2060
2061
  } finally {
2061
2062
  c(!1);
2062
2063
  }
@@ -2068,32 +2069,32 @@ function Zt(t) {
2068
2069
  isLoading: a,
2069
2070
  isSubmitting: l,
2070
2071
  error: d,
2071
- load: g,
2072
- submit: b
2072
+ load: p,
2073
+ submit: f
2073
2074
  };
2074
2075
  }
2075
2076
  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, v] = N(null), g = H(!1), b = H(null), m = q(async () => {
2077
+ const { uploadDocumentService: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(0), [g, v] = N(null), p = H(!1), f = H(null), m = q(async () => {
2077
2078
  if (t) {
2078
- if (g.current) {
2079
+ if (p.current) {
2079
2080
  console.log("[UploadDocument] Load already in progress, skipping...");
2080
2081
  return;
2081
2082
  }
2082
- g.current = !0, i(!0), v(null);
2083
+ p.current = !0, i(!0), v(null);
2083
2084
  try {
2084
2085
  const k = await e.getUploadDocument(t);
2085
- s(k), b.current = t;
2086
+ s(k), f.current = t;
2086
2087
  } catch (k) {
2087
2088
  v(k);
2088
2089
  } finally {
2089
- i(!1), g.current = !1;
2090
+ i(!1), p.current = !1;
2090
2091
  }
2091
2092
  }
2092
2093
  }, [t, e]);
2093
- W(() => {
2094
- t && b.current !== t && m();
2094
+ Y(() => {
2095
+ t && f.current !== t && m();
2095
2096
  }, [t]);
2096
- const f = q(
2097
+ const y = q(
2097
2098
  async (k) => {
2098
2099
  c(!0), u(0), v(null);
2099
2100
  try {
@@ -2111,33 +2112,33 @@ function Jt(t) {
2111
2112
  isLoading: a,
2112
2113
  isSubmitting: l,
2113
2114
  uploadProgress: d,
2114
- error: y,
2115
+ error: g,
2115
2116
  load: m,
2116
- submit: f
2117
+ submit: y
2117
2118
  };
2118
2119
  }
2119
2120
  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
+ const { appropriatenessTestService: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [g, v] = N(null), p = H(!1), f = H(null), m = q(async () => {
2121
2122
  if (t) {
2122
- if (g.current) {
2123
+ if (p.current) {
2123
2124
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
2124
2125
  return;
2125
2126
  }
2126
- g.current = !0, i(!0), u(null);
2127
+ p.current = !0, i(!0), u(null);
2127
2128
  try {
2128
2129
  const k = await e.getAppropriatenessTest(t);
2129
- s(k), b.current = t;
2130
+ s(k), f.current = t;
2130
2131
  } catch (k) {
2131
2132
  u(k);
2132
2133
  } finally {
2133
- i(!1), g.current = !1;
2134
+ i(!1), p.current = !1;
2134
2135
  }
2135
2136
  }
2136
2137
  }, [t, e]);
2137
- W(() => {
2138
- t && b.current !== t && m();
2138
+ Y(() => {
2139
+ t && f.current !== t && m();
2139
2140
  }, [t]);
2140
- const f = q(
2141
+ const y = q(
2141
2142
  async (k) => {
2142
2143
  c(!0), u(null);
2143
2144
  try {
@@ -2153,36 +2154,36 @@ function Kr(t) {
2153
2154
  );
2154
2155
  return {
2155
2156
  test: r,
2156
- result: y,
2157
+ result: g,
2157
2158
  isLoading: a,
2158
2159
  isSubmitting: l,
2159
2160
  error: d,
2160
2161
  load: m,
2161
- submit: f
2162
+ submit: y
2162
2163
  };
2163
2164
  }
2164
2165
  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), v = H(null), g = q(async () => {
2166
+ const { overviewService: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), g = H(!1), v = H(null), p = q(async () => {
2166
2167
  if (t) {
2167
- if (y.current) {
2168
+ if (g.current) {
2168
2169
  console.log("[Overview] Load already in progress, skipping...");
2169
2170
  return;
2170
2171
  }
2171
- y.current = !0, i(!0), u(null);
2172
+ g.current = !0, i(!0), u(null);
2172
2173
  try {
2173
2174
  const m = await e.getOverviewData(t);
2174
2175
  s(m), v.current = t;
2175
2176
  } catch (m) {
2176
2177
  u(m);
2177
2178
  } finally {
2178
- i(!1), y.current = !1;
2179
+ i(!1), g.current = !1;
2179
2180
  }
2180
2181
  }
2181
2182
  }, [t, e]);
2182
- W(() => {
2183
- t && v.current !== t && g();
2183
+ Y(() => {
2184
+ t && v.current !== t && p();
2184
2185
  }, [t]);
2185
- const b = q(async () => {
2186
+ const f = q(async () => {
2186
2187
  if (t) {
2187
2188
  c(!0), u(null);
2188
2189
  try {
@@ -2199,15 +2200,15 @@ function Xt(t) {
2199
2200
  isLoading: a,
2200
2201
  isSubmitting: l,
2201
2202
  error: d,
2202
- load: g,
2203
- passOverview: b
2203
+ load: p,
2204
+ passOverview: f
2204
2205
  };
2205
2206
  }
2206
2207
  function er(t) {
2207
- const { identityService: e } = se(), [r, s] = N(
2208
+ const { identityService: e } = ie(), [r, s] = N(
2208
2209
  null
2209
2210
  ), [a, i] = N(!1), [l, c] = N(null), d = H(!1), u = q(
2210
- async (g, b) => {
2211
+ async (p, f) => {
2211
2212
  if (t) {
2212
2213
  if (d.current) {
2213
2214
  console.log("[Identity] Request already in progress, skipping...");
@@ -2218,13 +2219,13 @@ function er(t) {
2218
2219
  const m = {
2219
2220
  applicantId: t,
2220
2221
  restart: !1,
2221
- redirectUrl: g || "",
2222
- ttl: b || 604800
2222
+ redirectUrl: p || "",
2223
+ ttl: f || 604800
2223
2224
  // Default: 7 days
2224
2225
  };
2225
2226
  console.log("Identity request input:", m);
2226
- const f = await e.identityRequest(m);
2227
- return console.log("Identity request result:", f), s(f), f;
2227
+ const y = await e.identityRequest(m);
2228
+ return console.log("Identity request result:", y), s(y), y;
2228
2229
  } catch (m) {
2229
2230
  throw c(m), m;
2230
2231
  } finally {
@@ -2233,18 +2234,18 @@ function er(t) {
2233
2234
  }
2234
2235
  },
2235
2236
  [t, e]
2236
- ), y = q(
2237
- async (g, b) => {
2237
+ ), g = q(
2238
+ async (p, f) => {
2238
2239
  if (t) {
2239
2240
  i(!0), c(null);
2240
2241
  try {
2241
2242
  const m = {
2242
2243
  applicantId: t,
2243
2244
  restart: !1,
2244
- redirectUrl: g,
2245
- ttl: b
2246
- }, f = await e.identityCompanyRequest(m);
2247
- return s(f), f;
2245
+ redirectUrl: p,
2246
+ ttl: f
2247
+ }, y = await e.identityCompanyRequest(m);
2248
+ return s(y), y;
2248
2249
  } catch (m) {
2249
2250
  throw c(m), m;
2250
2251
  } finally {
@@ -2261,18 +2262,18 @@ function er(t) {
2261
2262
  }
2262
2263
  d.current = !0, i(!0), c(null);
2263
2264
  try {
2264
- const g = {
2265
+ const p = {
2265
2266
  applicantId: t,
2266
2267
  restart: !0,
2267
2268
  redirectUrl: "",
2268
2269
  ttl: 604800
2269
2270
  // 7 days
2270
2271
  };
2271
- console.log("Restarting identity with input:", g);
2272
- const b = await e.identityRequest(g);
2273
- return console.log("Restart identity result:", b), s(b), b;
2274
- } catch (g) {
2275
- throw c(g), g;
2272
+ console.log("Restarting identity with input:", p);
2273
+ const f = await e.identityRequest(p);
2274
+ return console.log("Restart identity result:", f), s(f), f;
2275
+ } catch (p) {
2276
+ throw c(p), p;
2276
2277
  } finally {
2277
2278
  i(!1), d.current = !1;
2278
2279
  }
@@ -2285,32 +2286,32 @@ function er(t) {
2285
2286
  isLoading: a,
2286
2287
  error: l,
2287
2288
  requestIdentity: u,
2288
- requestCompanyIdentity: y,
2289
+ requestCompanyIdentity: g,
2289
2290
  restartIdentity: v
2290
2291
  };
2291
2292
  }
2292
2293
  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, v] = N(null), g = H(!1), b = H(null), m = q(async () => {
2294
+ const { riskScoringService: e } = ie(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [g, v] = N(null), p = H(!1), f = H(null), m = q(async () => {
2294
2295
  if (t) {
2295
- if (g.current) {
2296
+ if (p.current) {
2296
2297
  console.log("[RiskScoring] Load already in progress, skipping...");
2297
2298
  return;
2298
2299
  }
2299
- g.current = !0, i(!0), u(null);
2300
+ p.current = !0, i(!0), u(null);
2300
2301
  try {
2301
2302
  const k = await e.getRiskCriterias(t);
2302
- s(k), b.current = t;
2303
+ s(k), f.current = t;
2303
2304
  } catch (k) {
2304
2305
  u(k);
2305
2306
  } finally {
2306
- i(!1), g.current = !1;
2307
+ i(!1), p.current = !1;
2307
2308
  }
2308
2309
  }
2309
2310
  }, [t, e]);
2310
- W(() => {
2311
- t && b.current !== t && m();
2311
+ Y(() => {
2312
+ t && f.current !== t && m();
2312
2313
  }, [t]);
2313
- const f = q(
2314
+ const y = q(
2314
2315
  async (k) => {
2315
2316
  c(!0), u(null);
2316
2317
  try {
@@ -2326,45 +2327,45 @@ function tr(t) {
2326
2327
  );
2327
2328
  return {
2328
2329
  criteria: r,
2329
- result: y,
2330
+ result: g,
2330
2331
  isLoading: a,
2331
2332
  isSubmitting: l,
2332
2333
  error: d,
2333
2334
  load: m,
2334
- submit: f
2335
+ submit: y
2335
2336
  };
2336
2337
  }
2337
2338
  function rr() {
2338
- const { applicantService: t, config: e } = se(), [r, s] = N(!1), [a, i] = N(null), l = H(!1), c = H(!1), d = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(b) {
2339
+ const { applicantService: t, config: e } = ie(), [r, s] = N(!1), [a, i] = N(null), l = H(!1), c = H(!1), d = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(f) {
2339
2340
  const m = Math.random() * 16 | 0;
2340
- return (b === "x" ? m : m & 3 | 8).toString(16);
2341
+ return (f === "x" ? m : m & 3 | 8).toString(16);
2341
2342
  }), u = q(
2342
- async (b) => {
2343
+ async (f) => {
2343
2344
  var m;
2344
2345
  if (l.current)
2345
2346
  throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
2346
2347
  l.current = !0, s(!0), i(null);
2347
2348
  try {
2348
- if (b.applicantAdditionalDatas || (b.applicantAdditionalDatas = []), (m = e.identityProviders) != null && m.sardinai) {
2349
+ if (f.applicantAdditionalDatas || (f.applicantAdditionalDatas = []), (m = e.identityProviders) != null && m.sardinai) {
2349
2350
  const k = d();
2350
- console.log("[SardinAI] Generated session key:", k), b.applicantAdditionalDatas.push({
2351
+ console.log("[SardinAI] Generated session key:", k), f.applicantAdditionalDatas.push({
2351
2352
  paramName: "sessionKey",
2352
2353
  value: k
2353
2354
  });
2354
2355
  }
2355
- return await t.createApplicant(b);
2356
- } catch (f) {
2357
- throw i(f), f;
2356
+ return await t.createApplicant(f);
2357
+ } catch (y) {
2358
+ throw i(y), y;
2358
2359
  } finally {
2359
2360
  s(!1), l.current = !1;
2360
2361
  }
2361
2362
  },
2362
2363
  [t, e]
2363
- ), y = q(
2364
- async (b) => {
2364
+ ), g = q(
2365
+ async (f) => {
2365
2366
  s(!0), i(null);
2366
2367
  try {
2367
- return await t.createCompanyApplicant(b);
2368
+ return await t.createCompanyApplicant(f);
2368
2369
  } catch (m) {
2369
2370
  throw i(m), m;
2370
2371
  } finally {
@@ -2373,12 +2374,12 @@ function rr() {
2373
2374
  },
2374
2375
  [t]
2375
2376
  ), v = q(
2376
- async (b) => {
2377
+ async (f) => {
2377
2378
  if (c.current)
2378
2379
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
2379
2380
  c.current = !0, s(!0), i(null);
2380
2381
  try {
2381
- return await t.getApplicantData(b);
2382
+ return await t.getApplicantData(f);
2382
2383
  } catch (m) {
2383
2384
  throw i(m), m;
2384
2385
  } finally {
@@ -2386,11 +2387,11 @@ function rr() {
2386
2387
  }
2387
2388
  },
2388
2389
  [t]
2389
- ), g = q(
2390
- async (b) => {
2390
+ ), p = q(
2391
+ async (f) => {
2391
2392
  s(!0), i(null);
2392
2393
  try {
2393
- await t.stopProgress(b);
2394
+ await t.stopProgress(f);
2394
2395
  } catch (m) {
2395
2396
  throw i(m), m;
2396
2397
  } finally {
@@ -2403,9 +2404,9 @@ function rr() {
2403
2404
  isLoading: r,
2404
2405
  error: a,
2405
2406
  createApplicant: u,
2406
- createCompanyApplicant: y,
2407
+ createCompanyApplicant: g,
2407
2408
  getApplicantData: v,
2408
- stopProgress: g
2409
+ stopProgress: p
2409
2410
  };
2410
2411
  }
2411
2412
  const _ = ({
@@ -2525,7 +2526,7 @@ const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2525
2526
  ...r,
2526
2527
  children: t
2527
2528
  }
2528
- ), M = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n("div", { className: te("px-6 py-4", e), ...r, children: t }), ne = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2529
+ ), M = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n("div", { className: te("px-6 py-4", e), ...r, children: t }), ae = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2529
2530
  "div",
2530
2531
  {
2531
2532
  className: te("px-6 py-4 border-t", e),
@@ -2535,7 +2536,7 @@ const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2535
2536
  ...r,
2536
2537
  children: t
2537
2538
  }
2538
- ), he = ({ children: t, variant: e = "default", className: r, ...s }) => /* @__PURE__ */ n(
2539
+ ), pe = ({ children: t, variant: e = "default", className: r, ...s }) => /* @__PURE__ */ n(
2539
2540
  "span",
2540
2541
  {
2541
2542
  className: te(
@@ -2552,7 +2553,7 @@ const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2552
2553
  ...s,
2553
2554
  children: t
2554
2555
  }
2555
- ), ce = ({ size: t = "md", className: e, ...r }) => {
2556
+ ), de = ({ size: t = "md", className: e, ...r }) => {
2556
2557
  const s = {
2557
2558
  sm: "h-4 w-4",
2558
2559
  md: "h-8 w-8",
@@ -2588,7 +2589,7 @@ const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2588
2589
  ]
2589
2590
  }
2590
2591
  ) });
2591
- }, ye = Le(
2592
+ }, fe = Le(
2592
2593
  ({ label: t, error: e, helperText: r, options: s, placeholder: a, className: i, ...l }, c) => /* @__PURE__ */ o("div", { className: "w-full", children: [
2593
2594
  t && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2594
2595
  t,
@@ -2625,7 +2626,7 @@ const T = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2625
2626
  !e && r && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-gray-500", children: r })
2626
2627
  ] })
2627
2628
  );
2628
- ye.displayName = "Select";
2629
+ fe.displayName = "Select";
2629
2630
  const nr = ({
2630
2631
  label: t,
2631
2632
  error: e,
@@ -2636,27 +2637,27 @@ const nr = ({
2636
2637
  value: l = [],
2637
2638
  className: c
2638
2639
  }) => {
2639
- const [d, u] = N(!1), y = H(null), v = (h) => {
2640
+ const [d, u] = N(!1), g = H(null), v = (h) => {
2640
2641
  if (!h) return;
2641
- const A = Array.from(h);
2642
- if (a && A.filter((w) => w.size > a).length > 0) {
2642
+ const I = Array.from(h);
2643
+ if (a && I.filter((w) => w.size > a).length > 0) {
2643
2644
  const w = Ie(a);
2644
2645
  alert(`Some files exceed the maximum size of ${w}`);
2645
2646
  return;
2646
2647
  }
2647
- i == null || i(s ? [...l, ...A] : [A[0]]);
2648
- }, g = (h) => {
2648
+ i == null || i(s ? [...l, ...I] : [I[0]]);
2649
+ }, p = (h) => {
2649
2650
  h.preventDefault(), u(!0);
2650
- }, b = () => {
2651
+ }, f = () => {
2651
2652
  u(!1);
2652
2653
  }, m = (h) => {
2653
2654
  h.preventDefault(), u(!1), v(h.dataTransfer.files);
2654
- }, f = () => {
2655
+ }, y = () => {
2655
2656
  var h;
2656
- (h = y.current) == null || h.click();
2657
+ (h = g.current) == null || h.click();
2657
2658
  }, k = (h) => {
2658
- const A = l.filter((S, w) => w !== h);
2659
- i == null || i(A);
2659
+ const I = l.filter((S, w) => w !== h);
2660
+ i == null || i(I);
2660
2661
  };
2661
2662
  return /* @__PURE__ */ o("div", { className: te("w-full", c), children: [
2662
2663
  t && /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: t }),
@@ -2668,15 +2669,15 @@ const nr = ({
2668
2669
  d ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-300 dark:border-gray-600 hover:border-primary-500",
2669
2670
  e && "border-danger-500"
2670
2671
  ),
2671
- onDragOver: g,
2672
- onDragLeave: b,
2672
+ onDragOver: p,
2673
+ onDragLeave: f,
2673
2674
  onDrop: m,
2674
- onClick: f,
2675
+ onClick: y,
2675
2676
  children: [
2676
2677
  /* @__PURE__ */ n(
2677
2678
  "input",
2678
2679
  {
2679
- ref: y,
2680
+ ref: g,
2680
2681
  type: "file",
2681
2682
  className: "hidden",
2682
2683
  accept: r,
@@ -2715,7 +2716,7 @@ const nr = ({
2715
2716
  ]
2716
2717
  }
2717
2718
  ),
2718
- l.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2", children: l.map((h, A) => /* @__PURE__ */ o(
2719
+ l.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2", children: l.map((h, I) => /* @__PURE__ */ o(
2719
2720
  "div",
2720
2721
  {
2721
2722
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -2749,7 +2750,7 @@ const nr = ({
2749
2750
  {
2750
2751
  type: "button",
2751
2752
  onClick: (S) => {
2752
- S.stopPropagation(), k(A);
2753
+ S.stopPropagation(), k(I);
2753
2754
  },
2754
2755
  className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
2755
2756
  children: /* @__PURE__ */ n("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
@@ -2764,7 +2765,7 @@ const nr = ({
2764
2765
  )
2765
2766
  ]
2766
2767
  },
2767
- A
2768
+ I
2768
2769
  )) }),
2769
2770
  e && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-danger-500", children: e })
2770
2771
  ] });
@@ -2839,8 +2840,8 @@ function qe(t, e, r) {
2839
2840
  value: c._zod ?? {},
2840
2841
  enumerable: !1
2841
2842
  }), (u = c._zod).traits ?? (u.traits = /* @__PURE__ */ new Set()), c._zod.traits.add(t), e(c, d);
2842
- for (const y in l.prototype)
2843
- y in c || Object.defineProperty(c, y, { value: l.prototype[y].bind(c) });
2843
+ for (const g in l.prototype)
2844
+ g in c || Object.defineProperty(c, g, { value: l.prototype[g].bind(c) });
2844
2845
  c._zod.constr = l, c._zod.def = d;
2845
2846
  }
2846
2847
  const a = (r == null ? void 0 : r.Parent) ?? Object;
@@ -2851,8 +2852,8 @@ function qe(t, e, r) {
2851
2852
  var d;
2852
2853
  const u = r != null && r.Parent ? new i() : this;
2853
2854
  s(u, c), (d = u._zod).deferred ?? (d.deferred = []);
2854
- for (const y of u._zod.deferred)
2855
- y();
2855
+ for (const g of u._zod.deferred)
2856
+ g();
2856
2857
  return u;
2857
2858
  }
2858
2859
  return Object.defineProperty(l, "init", { value: s }), Object.defineProperty(l, Symbol.hasInstance, {
@@ -2883,8 +2884,8 @@ function Ye(t, e, r) {
2883
2884
  var a, i, l, c, d, u;
2884
2885
  const s = { ...t, path: t.path ?? [] };
2885
2886
  if (!t.message) {
2886
- const y = ke((l = (i = (a = t.inst) == null ? void 0 : a._zod.def) == null ? void 0 : i.error) == null ? void 0 : l.call(i, t)) ?? ke((c = e == null ? void 0 : e.error) == null ? void 0 : c.call(e, t)) ?? ke((d = r.customError) == null ? void 0 : d.call(r, t)) ?? ke((u = r.localeError) == null ? void 0 : u.call(r, t)) ?? "Invalid input";
2887
- s.message = y;
2887
+ const g = ke((l = (i = (a = t.inst) == null ? void 0 : a._zod.def) == null ? void 0 : i.error) == null ? void 0 : l.call(i, t)) ?? ke((c = e == null ? void 0 : e.error) == null ? void 0 : c.call(e, t)) ?? ke((d = r.customError) == null ? void 0 : d.call(r, t)) ?? ke((u = r.localeError) == null ? void 0 : u.call(r, t)) ?? "Invalid input";
2888
+ s.message = g;
2888
2889
  }
2889
2890
  return delete s.inst, delete s.continue, e != null && e.reportInput || delete s.input, s;
2890
2891
  }
@@ -2938,13 +2939,13 @@ function pr(t, e) {
2938
2939
  var c = s.unionErrors[0].errors[0];
2939
2940
  r[l] = { message: c.message, type: c.code };
2940
2941
  } else r[l] = { message: i, type: a };
2941
- if ("unionErrors" in s && s.unionErrors.forEach(function(y) {
2942
- return y.errors.forEach(function(v) {
2942
+ if ("unionErrors" in s && s.unionErrors.forEach(function(g) {
2943
+ return g.errors.forEach(function(v) {
2943
2944
  return t.push(v);
2944
2945
  });
2945
2946
  }), e) {
2946
2947
  var d = r[l].types, u = d && d[s.code];
2947
- r[l] = _e(l, e, r, a, u ? [].concat(u, s.message) : s.message);
2948
+ r[l] = je(l, e, r, a, u ? [].concat(u, s.message) : s.message);
2948
2949
  }
2949
2950
  t.shift();
2950
2951
  }
@@ -2957,13 +2958,13 @@ function gr(t, e) {
2957
2958
  var c = s.errors[0][0];
2958
2959
  r[l] = { message: c.message, type: c.code };
2959
2960
  } else r[l] = { message: i, type: a };
2960
- if (s.code === "invalid_union" && s.errors.forEach(function(y) {
2961
- return y.forEach(function(v) {
2961
+ if (s.code === "invalid_union" && s.errors.forEach(function(g) {
2962
+ return g.forEach(function(v) {
2962
2963
  return t.push(v);
2963
2964
  });
2964
2965
  }), e) {
2965
2966
  var d = r[l].types, u = d && d[s.code];
2966
- r[l] = _e(l, e, r, a, u ? [].concat(u, s.message) : s.message);
2967
+ r[l] = je(l, e, r, a, u ? [].concat(u, s.message) : s.message);
2967
2968
  }
2968
2969
  t.shift();
2969
2970
  }
@@ -3009,12 +3010,12 @@ function Ge(t, e, r) {
3009
3010
  throw new Error("Invalid input: not a Zod schema");
3010
3011
  }
3011
3012
  function yr(t) {
3012
- return ue.object({
3013
- questionResults: ue.any()
3013
+ return me.object({
3014
+ questionResults: me.any()
3014
3015
  }).passthrough();
3015
3016
  }
3016
3017
  function fr(t) {
3017
- let e = ue.array(ue.instanceof(File));
3018
+ let e = me.array(me.instanceof(File));
3018
3019
  if (t.isRequired ? e = e.min(
3019
3020
  1,
3020
3021
  `${t.displayName} is required`
@@ -3040,72 +3041,72 @@ function qr(t) {
3040
3041
  return t.uploadDocumentFiles.forEach((r) => {
3041
3042
  const s = `file_${r.id}`;
3042
3043
  e[s] = fr(r);
3043
- }), ue.object(e);
3044
+ }), me.object(e);
3044
3045
  }
3045
3046
  function br(t) {
3046
- return ue.any();
3047
+ return me.any();
3047
3048
  }
3048
3049
  function vr(t) {
3049
- return ue.string().min(1, "This question is required");
3050
+ return me.string().min(1, "This question is required");
3050
3051
  }
3051
3052
  function Hr(t) {
3052
3053
  const e = {};
3053
3054
  return t.appropriatenessQuestions.forEach((r) => {
3054
3055
  const s = `question_${r.id}`;
3055
3056
  e[s] = vr();
3056
- }), ue.object(e);
3057
+ }), me.object(e);
3057
3058
  }
3058
- const Vr = ue.any(), xr = ({
3059
+ const Vr = me.any(), xr = ({
3059
3060
  applicantId: t,
3060
3061
  onComplete: e,
3061
3062
  onBack: r
3062
3063
  }) => {
3063
3064
  const { questionnaire: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Zt(t), d = Re(() => s ? { questionResults: s.questionGroups.map(
3064
- (f) => f.questions.map((k) => ({
3065
+ (y) => y.questions.map((k) => ({
3065
3066
  questionId: k.id,
3066
3067
  values: []
3067
3068
  }))
3068
3069
  ) } : { questionResults: [] }, [s]), u = s ? yr() : null, {
3069
- control: y,
3070
+ control: g,
3070
3071
  handleSubmit: v,
3071
- formState: { errors: g }
3072
+ formState: { errors: p }
3072
3073
  } = Te({
3073
3074
  resolver: u ? Ge(u) : void 0,
3074
3075
  defaultValues: d
3075
- }), b = async (m) => {
3076
+ }), f = async (m) => {
3076
3077
  if (s)
3077
3078
  try {
3078
3079
  console.log("Form submitted with data:", m);
3079
- const f = s.questionGroups.flatMap(
3080
- (h, A) => h.questions.map((S, w) => {
3081
- var E, P, I;
3080
+ const y = s.questionGroups.flatMap(
3081
+ (h, I) => h.questions.map((S, w) => {
3082
+ var B, L, A;
3082
3083
  return {
3083
3084
  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
+ values: ((A = (L = (B = m.questionResults) == null ? void 0 : B[I]) == null ? void 0 : L[w]) == null ? void 0 : A.values) || []
3085
3086
  };
3086
3087
  })
3087
3088
  );
3088
- console.log("Question results to submit:", f);
3089
+ console.log("Question results to submit:", y);
3089
3090
  const k = {
3090
3091
  applicantId: t,
3091
3092
  questionnarieId: s.id,
3092
- questionResults: f
3093
+ questionResults: y
3093
3094
  };
3094
3095
  console.log("Final input:", k), await c(k), e == null || e();
3095
- } catch (f) {
3096
- console.error("Error submitting questionnaire:", f);
3096
+ } catch (y) {
3097
+ console.error("Error submitting questionnaire:", y);
3097
3098
  }
3098
3099
  };
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
+ return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(de, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3100
3101
  "Error loading questionnaire: ",
3101
3102
  l.message
3102
- ] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: v(b), children: /* @__PURE__ */ o(T, { children: [
3103
+ ] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: v(f), children: /* @__PURE__ */ o(T, { children: [
3103
3104
  /* @__PURE__ */ o(ee, { children: [
3104
3105
  /* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.displayName }),
3105
3106
  s.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.subtitle })
3106
3107
  ] }),
3107
3108
  /* @__PURE__ */ n(M, { className: "space-y-8", children: s.questionGroups.flatMap(
3108
- (m, f) => m.questions.map((k, h) => {
3109
+ (m, y) => m.questions.map((k, h) => {
3109
3110
  const S = k.defaultAnswers && k.defaultAnswers.length > 0 ? k.showAsDropdown ? k.canMultipleAnswer ? "multi-select" : "single-select" : k.canMultipleAnswer ? "checkbox" : "radio" : "text";
3110
3111
  return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
3111
3112
  /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: [
@@ -3115,10 +3116,10 @@ const Vr = ue.any(), xr = ({
3115
3116
  S === "text" && /* @__PURE__ */ n(
3116
3117
  J,
3117
3118
  {
3118
- control: y,
3119
- name: `questionResults.${f}.${h}.values.0`,
3119
+ control: g,
3120
+ name: `questionResults.${y}.${h}.values.0`,
3120
3121
  render: ({ field: w }) => {
3121
- var E, P, I, C;
3122
+ var B, L, A, C;
3122
3123
  return /* @__PURE__ */ n(
3123
3124
  X,
3124
3125
  {
@@ -3127,7 +3128,7 @@ const Vr = ue.any(), xr = ({
3127
3128
  onBlur: w.onBlur,
3128
3129
  name: w.name,
3129
3130
  placeholder: "Enter your answer...",
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
+ error: (C = (A = (L = (B = p.questionResults) == null ? void 0 : B[y]) == null ? void 0 : L[h]) == null ? void 0 : A.values) == null ? void 0 : C.message
3131
3132
  }
3132
3133
  );
3133
3134
  }
@@ -3136,23 +3137,23 @@ const Vr = ue.any(), xr = ({
3136
3137
  (S === "single-select" || S === "radio") && /* @__PURE__ */ n(
3137
3138
  J,
3138
3139
  {
3139
- control: y,
3140
- name: `questionResults.${f}.${h}.values.0`,
3140
+ control: g,
3141
+ name: `questionResults.${y}.${h}.values.0`,
3141
3142
  render: ({ field: w }) => {
3142
- var E, P, I, C;
3143
+ var B, L, A, C;
3143
3144
  return /* @__PURE__ */ n(
3144
- ye,
3145
+ fe,
3145
3146
  {
3146
3147
  value: w.value || "",
3147
3148
  onChange: w.onChange,
3148
3149
  onBlur: w.onBlur,
3149
3150
  name: w.name,
3150
- options: k.defaultAnswers.map((F) => ({
3151
- value: F,
3152
- label: F
3151
+ options: k.defaultAnswers.map((D) => ({
3152
+ value: D,
3153
+ label: D
3153
3154
  })),
3154
3155
  placeholder: "Select an option...",
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
+ error: (C = (A = (L = (B = p.questionResults) == null ? void 0 : B[y]) == null ? void 0 : L[h]) == null ? void 0 : A.values) == null ? void 0 : C.message
3156
3157
  }
3157
3158
  );
3158
3159
  }
@@ -3163,9 +3164,9 @@ const Vr = ue.any(), xr = ({
3163
3164
  /* @__PURE__ */ n(
3164
3165
  J,
3165
3166
  {
3166
- control: y,
3167
- name: `questionResults.${f}.${h}.values`,
3168
- render: ({ field: { value: w = [], onChange: E } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: k.defaultAnswers.map((P, I) => /* @__PURE__ */ o(
3167
+ control: g,
3168
+ name: `questionResults.${y}.${h}.values`,
3169
+ render: ({ field: { value: w = [], onChange: B } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: k.defaultAnswers.map((L, A) => /* @__PURE__ */ o(
3169
3170
  "label",
3170
3171
  {
3171
3172
  className: "flex items-center space-x-2 cursor-pointer",
@@ -3174,18 +3175,18 @@ const Vr = ue.any(), xr = ({
3174
3175
  "input",
3175
3176
  {
3176
3177
  type: "checkbox",
3177
- checked: Array.isArray(w) && w.includes(P),
3178
+ checked: Array.isArray(w) && w.includes(L),
3178
3179
  onChange: (C) => {
3179
- const F = Array.isArray(w) ? w : [], O = C.target.checked ? [...F, P] : F.filter((V) => V !== P);
3180
- E(O);
3180
+ const D = Array.isArray(w) ? w : [], z = C.target.checked ? [...D, L] : D.filter((W) => W !== L);
3181
+ B(z);
3181
3182
  },
3182
3183
  className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
3183
3184
  }
3184
3185
  ),
3185
- /* @__PURE__ */ n("span", { className: "text-sm", children: P })
3186
+ /* @__PURE__ */ n("span", { className: "text-sm", children: L })
3186
3187
  ]
3187
3188
  },
3188
- `answer-${f}-${h}-${I}`
3189
+ `answer-${y}-${h}-${A}`
3189
3190
  )) })
3190
3191
  }
3191
3192
  )
@@ -3193,7 +3194,7 @@ const Vr = ue.any(), xr = ({
3193
3194
  ] }, k.id);
3194
3195
  })
3195
3196
  ) }),
3196
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3197
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3197
3198
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3198
3199
  /* @__PURE__ */ n(
3199
3200
  _,
@@ -3201,7 +3202,7 @@ const Vr = ue.any(), xr = ({
3201
3202
  type: "submit",
3202
3203
  isLoading: i,
3203
3204
  onClick: () => {
3204
- console.log("Continue button clicked"), console.log("Form errors:", g);
3205
+ console.log("Continue button clicked"), console.log("Form errors:", p);
3205
3206
  },
3206
3207
  children: "Continue"
3207
3208
  }
@@ -3217,12 +3218,12 @@ const Vr = ue.any(), xr = ({
3217
3218
  onComplete: e,
3218
3219
  onBack: r
3219
3220
  }) => {
3220
- const { uploadDocument: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Jt(t), [d, u] = N({}), y = async (v) => {
3221
+ const { uploadDocument: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Jt(t), [d, u] = N({}), g = async (v) => {
3221
3222
  if (v.preventDefault(), !s) return;
3222
- const g = await Promise.all(
3223
+ const p = await Promise.all(
3223
3224
  s.uploadDocumentFiles.map(async (m) => {
3224
- const f = d[m.id] || [], k = await Promise.all(
3225
- f.map(async (h) => ({
3225
+ const y = d[m.id] || [], k = await Promise.all(
3226
+ y.map(async (h) => ({
3226
3227
  fileName: h.name,
3227
3228
  fileData: await qt(h)
3228
3229
  }))
@@ -3232,17 +3233,17 @@ const Vr = ue.any(), xr = ({
3232
3233
  valueList: k
3233
3234
  };
3234
3235
  })
3235
- ), b = {
3236
+ ), f = {
3236
3237
  applicantId: t,
3237
3238
  uploadDocumentId: s.id,
3238
- uploadDocumentResults: g
3239
+ uploadDocumentResults: p
3239
3240
  };
3240
- await c(b), e == null || e();
3241
+ await c(f), e == null || e();
3241
3242
  };
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
+ return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(de, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3243
3244
  "Error loading document requirements: ",
3244
3245
  l.message
3245
- ] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: y, children: /* @__PURE__ */ o(T, { children: [
3246
+ ] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: g, children: /* @__PURE__ */ o(T, { children: [
3246
3247
  /* @__PURE__ */ o(ee, { children: [
3247
3248
  /* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.displayName }),
3248
3249
  s.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.subtitle })
@@ -3255,13 +3256,13 @@ const Vr = ue.any(), xr = ({
3255
3256
  multiple: v.multipleFile,
3256
3257
  maxSize: v.maxEachFileSizeByte,
3257
3258
  value: d[v.id] || [],
3258
- onChange: (g) => {
3259
- u((b) => ({ ...b, [v.id]: g }));
3259
+ onChange: (p) => {
3260
+ u((f) => ({ ...f, [v.id]: p }));
3260
3261
  }
3261
3262
  },
3262
3263
  v.id
3263
3264
  )) }),
3264
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3265
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3265
3266
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3266
3267
  /* @__PURE__ */ n(_, { type: "submit", isLoading: i, children: "Continue" })
3267
3268
  ] })
@@ -3270,7 +3271,7 @@ const Vr = ue.any(), xr = ({
3270
3271
  const { overview: s, isLoading: a, isSubmitting: i, error: l, passOverview: c } = Xt(t), d = async () => {
3271
3272
  await c(), e == null || e();
3272
3273
  };
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
+ return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(de, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3274
3275
  "Error loading overview: ",
3275
3276
  l.message
3276
3277
  ] }) }) }) : s ? /* @__PURE__ */ o(T, { children: [
@@ -3278,7 +3279,7 @@ const Vr = ue.any(), xr = ({
3278
3279
  /* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: s.title || "Overview" }),
3279
3280
  s.description && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: s.description })
3280
3281
  ] }),
3281
- /* @__PURE__ */ n(M, { className: "space-y-8", children: s.steps && s.steps.length > 0 ? s.steps.sort((u, y) => u.order - y.order).map((u) => /* @__PURE__ */ o("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3282
+ /* @__PURE__ */ n(M, { className: "space-y-8", children: s.steps && s.steps.length > 0 ? s.steps.sort((u, g) => u.order - g.order).map((u) => /* @__PURE__ */ o("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3282
3283
  /* @__PURE__ */ n("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ n("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: u.order + 1 }) }),
3283
3284
  /* @__PURE__ */ o(
3284
3285
  "div",
@@ -3297,7 +3298,7 @@ const Vr = ue.any(), xr = ({
3297
3298
  }
3298
3299
  )
3299
3300
  ] }, u.order)) : /* @__PURE__ */ n("div", { className: "text-center py-8", children: /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Loading overview data..." }) }) }),
3300
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3301
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3301
3302
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3302
3303
  /* @__PURE__ */ n(_, { onClick: d, isLoading: i, children: "Continue" })
3303
3304
  ] })
@@ -3307,60 +3308,60 @@ const Vr = ue.any(), xr = ({
3307
3308
  onComplete: e,
3308
3309
  onBack: r
3309
3310
  }) => {
3310
- const { criteria: s, isLoading: a, isSubmitting: i, error: l, submit: c } = tr(t), [d, u] = ie.useState(!1), y = ie.useMemo(() => !s || s.length === 0 ? { criteriaValueInputs: [] } : {
3311
+ const { criteria: s, isLoading: a, isSubmitting: i, error: l, submit: c } = tr(t), [d, u] = se.useState(!1), g = se.useMemo(() => !s || s.length === 0 ? { criteriaValueInputs: [] } : {
3311
3312
  criteriaValueInputs: s.map((h) => ({
3312
3313
  riskCriteriaId: h.id,
3313
3314
  values: [""]
3314
3315
  // Initialize with empty string to prevent uncontrolled input warning
3315
3316
  }))
3316
3317
  }, [s]), v = s && s.length > 0 ? br() : null, {
3317
- control: g,
3318
- handleSubmit: b,
3318
+ control: p,
3319
+ handleSubmit: f,
3319
3320
  formState: { errors: m }
3320
3321
  } = Te({
3321
3322
  resolver: v ? Ge(v) : void 0,
3322
- defaultValues: y
3323
+ defaultValues: g
3323
3324
  });
3324
- ie.useEffect(() => {
3325
+ se.useEffect(() => {
3325
3326
  !a && s && s.length === 0 && !d && !i && (u(!0), c({ applicantId: t, criteriaValueInputs: [] }).then(() => e == null ? void 0 : e()).catch(console.error));
3326
3327
  }, [a, s, d, i, c, t, e]);
3327
- const f = async (h) => {
3328
+ const y = async (h) => {
3328
3329
  if (s)
3329
3330
  try {
3330
3331
  console.log("Risk scoring form submitted:", h), console.log("Criteria metadata:", s);
3331
- const A = h.criteriaValueInputs.map((w, E) => {
3332
- const P = w.values || [], I = Array.isArray(P) ? P.filter((C) => C && C.trim()) : P && P.toString().trim() ? [P.toString()] : [];
3333
- return I.length === 0 ? null : {
3334
- riskCriteriaId: s[E].id,
3335
- values: I
3332
+ const I = h.criteriaValueInputs.map((w, B) => {
3333
+ const L = w.values || [], A = Array.isArray(L) ? L.filter((C) => C && C.trim()) : L && L.toString().trim() ? [L.toString()] : [];
3334
+ return A.length === 0 ? null : {
3335
+ riskCriteriaId: s[B].id,
3336
+ values: A
3336
3337
  };
3337
3338
  }).filter((w) => w !== null);
3338
- console.log("Risk scoring criteriaValueInputs to submit:", A);
3339
+ console.log("Risk scoring criteriaValueInputs to submit:", I);
3339
3340
  const S = {
3340
3341
  applicantId: t,
3341
- criteriaValueInputs: A
3342
+ criteriaValueInputs: I
3342
3343
  };
3343
3344
  console.log("Final risk scoring input:", S), await c(S), console.log("Risk scoring submitted successfully!"), e == null || e();
3344
- } catch (A) {
3345
- throw console.error("Error submitting risk scoring:", A), A;
3345
+ } catch (I) {
3346
+ throw console.error("Error submitting risk scoring:", I), I;
3346
3347
  }
3347
3348
  }, k = (h) => h.builtInType === 1 ? "country" : !h.defaultValues || h.defaultValues.length === 0 ? "text" : h.multipleValue ? "checkbox" : "radio";
3348
3349
  return a ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
3349
- /* @__PURE__ */ n(ce, { className: "my-8" }),
3350
+ /* @__PURE__ */ n(de, { className: "my-8" }),
3350
3351
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading risk scoring criteria..." })
3351
3352
  ] }) }) : l ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3352
3353
  "Error loading criteria: ",
3353
3354
  l.message
3354
3355
  ] }) }) }) : !a && s && s.length === 0 ? /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
3355
- /* @__PURE__ */ n(ce, { className: "my-8" }),
3356
+ /* @__PURE__ */ n(de, { className: "my-8" }),
3356
3357
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400", children: "No risk scoring criteria required. Moving to next step..." })
3357
- ] }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: b(f), children: /* @__PURE__ */ o(T, { children: [
3358
+ ] }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: f(y), children: /* @__PURE__ */ o(T, { children: [
3358
3359
  /* @__PURE__ */ o(ee, { children: [
3359
3360
  /* @__PURE__ */ n("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3360
3361
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please answer the following questions for risk evaluation" })
3361
3362
  ] }),
3362
- /* @__PURE__ */ n(M, { className: "space-y-8", children: s.map((h, A) => {
3363
- var w, E, P;
3363
+ /* @__PURE__ */ n(M, { className: "space-y-8", children: s.map((h, I) => {
3364
+ var w, B, L;
3364
3365
  const S = k(h);
3365
3366
  return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
3366
3367
  /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: [
@@ -3371,20 +3372,20 @@ const Vr = ue.any(), xr = ({
3371
3372
  S === "text" && /* @__PURE__ */ n(
3372
3373
  J,
3373
3374
  {
3374
- control: g,
3375
- name: `criteriaValueInputs.${A}.values.0`,
3376
- render: ({ field: I }) => {
3377
- var C, F, O;
3375
+ control: p,
3376
+ name: `criteriaValueInputs.${I}.values.0`,
3377
+ render: ({ field: A }) => {
3378
+ var C, D, z;
3378
3379
  return /* @__PURE__ */ n(
3379
3380
  X,
3380
3381
  {
3381
- ...I,
3382
- value: I.value || "",
3382
+ ...A,
3383
+ value: A.value || "",
3383
3384
  type: h.valueDataType === Pe.DigitOnly ? "number" : "text",
3384
3385
  placeholder: "Enter your answer...",
3385
- error: (O = (F = (C = m.criteriaValueInputs) == null ? void 0 : C[A]) == null ? void 0 : F.values) == null ? void 0 : O.message,
3386
- onKeyDown: (V) => {
3387
- h.valueDataType === Pe.DigitOnly && ["e", "E", "+", "-", "."].includes(V.key) && V.preventDefault();
3386
+ error: (z = (D = (C = m.criteriaValueInputs) == null ? void 0 : C[I]) == null ? void 0 : D.values) == null ? void 0 : z.message,
3387
+ onKeyDown: (W) => {
3388
+ h.valueDataType === Pe.DigitOnly && ["e", "E", "+", "-", "."].includes(W.key) && W.preventDefault();
3388
3389
  }
3389
3390
  }
3390
3391
  );
@@ -3396,20 +3397,20 @@ const Vr = ue.any(), xr = ({
3396
3397
  /* @__PURE__ */ n(
3397
3398
  J,
3398
3399
  {
3399
- control: g,
3400
- name: `criteriaValueInputs.${A}.values.0`,
3401
- 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: [
3400
+ control: p,
3401
+ name: `criteriaValueInputs.${I}.values.0`,
3402
+ render: ({ field: { value: A, onChange: C } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((D, z) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
3402
3403
  /* @__PURE__ */ n(
3403
3404
  "input",
3404
3405
  {
3405
3406
  type: "radio",
3406
- checked: I === F,
3407
- onChange: () => C(F),
3407
+ checked: A === D,
3408
+ onChange: () => C(D),
3408
3409
  className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
3409
3410
  }
3410
3411
  ),
3411
- /* @__PURE__ */ n("span", { className: "text-sm", children: F })
3412
- ] }, `${A}-${O}`)) })
3412
+ /* @__PURE__ */ n("span", { className: "text-sm", children: D })
3413
+ ] }, `${I}-${z}`)) })
3413
3414
  }
3414
3415
  )
3415
3416
  ] }),
@@ -3418,37 +3419,37 @@ const Vr = ue.any(), xr = ({
3418
3419
  /* @__PURE__ */ n(
3419
3420
  J,
3420
3421
  {
3421
- control: g,
3422
- name: `criteriaValueInputs.${A}.values`,
3423
- 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: [
3422
+ control: p,
3423
+ name: `criteriaValueInputs.${I}.values`,
3424
+ render: ({ field: { value: A = [], onChange: C } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((D, z) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
3424
3425
  /* @__PURE__ */ n(
3425
3426
  "input",
3426
3427
  {
3427
3428
  type: "checkbox",
3428
- checked: Array.isArray(I) && I.includes(F),
3429
- onChange: (V) => {
3430
- const U = Array.isArray(I) ? I : [], p = V.target.checked ? [...U, F] : U.filter((x) => x !== F);
3431
- C(p);
3429
+ checked: Array.isArray(A) && A.includes(D),
3430
+ onChange: (W) => {
3431
+ const j = Array.isArray(A) ? A : [], F = W.target.checked ? [...j, D] : j.filter((R) => R !== D);
3432
+ C(F);
3432
3433
  },
3433
3434
  className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
3434
3435
  }
3435
3436
  ),
3436
- /* @__PURE__ */ n("span", { className: "text-sm", children: F })
3437
- ] }, `${A}-${O}`)) })
3437
+ /* @__PURE__ */ n("span", { className: "text-sm", children: D })
3438
+ ] }, `${I}-${z}`)) })
3438
3439
  }
3439
3440
  )
3440
3441
  ] }),
3441
3442
  S === "country" && /* @__PURE__ */ n(
3442
3443
  J,
3443
3444
  {
3444
- control: g,
3445
- name: `criteriaValueInputs.${A}.values.0`,
3446
- render: ({ field: I }) => {
3447
- var C, F, O;
3445
+ control: p,
3446
+ name: `criteriaValueInputs.${I}.values.0`,
3447
+ render: ({ field: A }) => {
3448
+ var C, D, z;
3448
3449
  return /* @__PURE__ */ n(
3449
- ye,
3450
+ fe,
3450
3451
  {
3451
- ...I,
3452
+ ...A,
3452
3453
  options: [
3453
3454
  { value: "US", label: "United States" },
3454
3455
  { value: "GB", label: "United Kingdom" },
@@ -3456,16 +3457,16 @@ const Vr = ue.any(), xr = ({
3456
3457
  // TODO: Load from base information service
3457
3458
  ],
3458
3459
  placeholder: "Select a country...",
3459
- error: (O = (F = (C = m.criteriaValueInputs) == null ? void 0 : C[A]) == null ? void 0 : F.values) == null ? void 0 : O.message
3460
+ error: (z = (D = (C = m.criteriaValueInputs) == null ? void 0 : C[I]) == null ? void 0 : D.values) == null ? void 0 : z.message
3460
3461
  }
3461
3462
  );
3462
3463
  }
3463
3464
  }
3464
3465
  ),
3465
- ((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 })
3466
+ ((L = (B = (w = m.criteriaValueInputs) == null ? void 0 : w[I]) == null ? void 0 : B.values) == null ? void 0 : L.message) && /* @__PURE__ */ n("p", { className: "text-sm text-danger-500 mt-1", children: m.criteriaValueInputs[I].values.message })
3466
3467
  ] }, h.id);
3467
3468
  }) }),
3468
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3469
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3469
3470
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3470
3471
  /* @__PURE__ */ n(
3471
3472
  _,
@@ -3489,7 +3490,7 @@ const Vr = ue.any(), xr = ({
3489
3490
  onComplete: e,
3490
3491
  onBack: r
3491
3492
  }) => {
3492
- const { investorCategorizationService: s } = se(), [a, i] = N(null), [l, c] = N(!1), [d, u] = N(null);
3493
+ const { investorCategorizationService: s } = ie(), [a, i] = N(null), [l, c] = N(!1), [d, u] = N(null);
3493
3494
  return /* @__PURE__ */ n("form", { onSubmit: async (v) => {
3494
3495
  if (v.preventDefault(), a === null) {
3495
3496
  u("Please select an investor type");
@@ -3497,15 +3498,15 @@ const Vr = ue.any(), xr = ({
3497
3498
  }
3498
3499
  c(!0), u(null);
3499
3500
  try {
3500
- const g = {
3501
+ const p = {
3501
3502
  applicantId: t,
3502
3503
  investorType: a
3503
3504
  };
3504
- console.log("Submitting investor categorization:", g);
3505
- const b = await s.setInvestorCategorization(g);
3506
- console.log("Investor categorization result:", b), e == null || e();
3507
- } catch (g) {
3508
- console.error("Error submitting investor categorization:", g), u(g.message || "Failed to submit investor categorization");
3505
+ console.log("Submitting investor categorization:", p);
3506
+ const f = await s.setInvestorCategorization(p);
3507
+ console.log("Investor categorization result:", f), e == null || e();
3508
+ } catch (p) {
3509
+ console.error("Error submitting investor categorization:", p), u(p.message || "Failed to submit investor categorization");
3509
3510
  } finally {
3510
3511
  c(!1);
3511
3512
  }
@@ -3521,7 +3522,7 @@ const Vr = ue.any(), xr = ({
3521
3522
  {
3522
3523
  className: `
3523
3524
  block p-4 border-2 rounded-lg cursor-pointer transition-all
3524
- ${a === re.Individual ? "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"}
3525
+ ${a === ne.Individual ? "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"}
3525
3526
  `,
3526
3527
  children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
3527
3528
  /* @__PURE__ */ n(
@@ -3529,9 +3530,9 @@ const Vr = ue.any(), xr = ({
3529
3530
  {
3530
3531
  type: "radio",
3531
3532
  name: "investorType",
3532
- value: re.Individual,
3533
- checked: a === re.Individual,
3534
- onChange: () => i(re.Individual),
3533
+ value: ne.Individual,
3534
+ checked: a === ne.Individual,
3535
+ onChange: () => i(ne.Individual),
3535
3536
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
3536
3537
  }
3537
3538
  ),
@@ -3547,7 +3548,7 @@ const Vr = ue.any(), xr = ({
3547
3548
  {
3548
3549
  className: `
3549
3550
  block p-4 border-2 rounded-lg cursor-pointer transition-all
3550
- ${a === re.Sophisticated ? "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"}
3551
+ ${a === ne.Sophisticated ? "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"}
3551
3552
  `,
3552
3553
  children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
3553
3554
  /* @__PURE__ */ n(
@@ -3555,9 +3556,9 @@ const Vr = ue.any(), xr = ({
3555
3556
  {
3556
3557
  type: "radio",
3557
3558
  name: "investorType",
3558
- value: re.Sophisticated,
3559
- checked: a === re.Sophisticated,
3560
- onChange: () => i(re.Sophisticated),
3559
+ value: ne.Sophisticated,
3560
+ checked: a === ne.Sophisticated,
3561
+ onChange: () => i(ne.Sophisticated),
3561
3562
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
3562
3563
  }
3563
3564
  ),
@@ -3578,7 +3579,7 @@ const Vr = ue.any(), xr = ({
3578
3579
  {
3579
3580
  className: `
3580
3581
  block p-4 border-2 rounded-lg cursor-pointer transition-all
3581
- ${a === re.HighNetWorth ? "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"}
3582
+ ${a === ne.HighNetWorth ? "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"}
3582
3583
  `,
3583
3584
  children: /* @__PURE__ */ o("div", { className: "flex items-start", children: [
3584
3585
  /* @__PURE__ */ n(
@@ -3586,9 +3587,9 @@ const Vr = ue.any(), xr = ({
3586
3587
  {
3587
3588
  type: "radio",
3588
3589
  name: "investorType",
3589
- value: re.HighNetWorth,
3590
- checked: a === re.HighNetWorth,
3591
- onChange: () => i(re.HighNetWorth),
3590
+ value: ne.HighNetWorth,
3591
+ checked: a === ne.HighNetWorth,
3592
+ onChange: () => i(ne.HighNetWorth),
3592
3593
  className: "mt-1 h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
3593
3594
  }
3594
3595
  ),
@@ -3609,7 +3610,7 @@ const Vr = ue.any(), xr = ({
3609
3610
  d
3610
3611
  ] }) })
3611
3612
  ] }),
3612
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3613
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3613
3614
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3614
3615
  /* @__PURE__ */ n(
3615
3616
  _,
@@ -3627,117 +3628,117 @@ const Vr = ue.any(), xr = ({
3627
3628
  onComplete: e,
3628
3629
  onBack: r
3629
3630
  }) => {
3630
- 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);
3631
- W(() => {
3631
+ const { appropriatenessTestService: s } = ie(), [a, i] = N(null), [l, c] = N(!0), [d, u] = N(!1), [g, v] = N(null), [p, f] = N({}), [m, y] = N(0), [k, h] = N(!1), [I, S] = N(!1), [w, B] = N(0);
3632
+ Y(() => {
3632
3633
  (async () => {
3633
3634
  try {
3634
3635
  c(!0), v(null), console.log("Loading appropriateness test for applicant:", t);
3635
- const x = await s.getAppropriatenessTest(t);
3636
- if (console.log("Appropriateness test data:", x), i(x), x.waitTimeSpanForNextTry && x.waitTimeSpanForNextTry !== "00:00:00") {
3637
- const z = P(x.waitTimeSpanForNextTry);
3638
- z > 0 && E(z);
3636
+ const R = await s.getAppropriatenessTest(t);
3637
+ if (console.log("Appropriateness test data:", R), i(R), R.waitTimeSpanForNextTry && R.waitTimeSpanForNextTry !== "00:00:00") {
3638
+ const b = L(R.waitTimeSpanForNextTry);
3639
+ b > 0 && B(b);
3639
3640
  }
3640
- } catch (x) {
3641
- console.error("Error loading appropriateness test:", x), v(x.message || "Failed to load appropriateness test");
3641
+ } catch (R) {
3642
+ console.error("Error loading appropriateness test:", R), v(R.message || "Failed to load appropriateness test");
3642
3643
  } finally {
3643
3644
  c(!1);
3644
3645
  }
3645
3646
  })();
3646
3647
  }, [t, s]);
3647
- const P = (p) => {
3648
- const x = p.split(":").map(Number);
3649
- if (x.length === 3) {
3650
- const [z, $, R] = x;
3651
- return z * 3600 + $ * 60 + R;
3648
+ const L = (F) => {
3649
+ const R = F.split(":").map(Number);
3650
+ if (R.length === 3) {
3651
+ const [b, E, U] = R;
3652
+ return b * 3600 + E * 60 + U;
3652
3653
  }
3653
3654
  return 0;
3654
- }, I = (p) => {
3655
- const x = Math.floor(p / 60), z = p % 60;
3656
- return `${x.toString().padStart(2, "0")}:${z.toString().padStart(2, "0")}`;
3655
+ }, A = (F) => {
3656
+ const R = Math.floor(F / 60), b = F % 60;
3657
+ return `${R.toString().padStart(2, "0")}:${b.toString().padStart(2, "0")}`;
3657
3658
  };
3658
- W(() => {
3659
+ Y(() => {
3659
3660
  if (!k || m <= 0) return;
3660
- const p = setInterval(() => {
3661
- f((x) => x <= 1 ? (S(!0), 0) : x - 1);
3661
+ const F = setInterval(() => {
3662
+ y((R) => R <= 1 ? (S(!0), 0) : R - 1);
3662
3663
  }, 1e3);
3663
- return () => clearInterval(p);
3664
- }, [k, m]), W(() => {
3664
+ return () => clearInterval(F);
3665
+ }, [k, m]), Y(() => {
3665
3666
  if (w <= 0) return;
3666
- const p = setInterval(() => {
3667
- E((x) => x <= 1 ? 0 : x - 1);
3667
+ const F = setInterval(() => {
3668
+ B((R) => R <= 1 ? 0 : R - 1);
3668
3669
  }, 1e3);
3669
- return () => clearInterval(p);
3670
- }, [w]), W(() => {
3671
- A && !d && O();
3672
- }, [A]);
3670
+ return () => clearInterval(F);
3671
+ }, [w]), Y(() => {
3672
+ I && !d && z();
3673
+ }, [I]);
3673
3674
  const C = () => {
3674
- a && (h(!0), f(a.testDurationSec));
3675
- }, F = (p, x) => {
3676
- b((z) => ({
3677
- ...z,
3678
- [p]: x
3675
+ a && (h(!0), y(a.testDurationSec));
3676
+ }, D = (F, R) => {
3677
+ f((b) => ({
3678
+ ...b,
3679
+ [F]: R
3679
3680
  }));
3680
- }, O = async (p) => {
3681
- if (p && p.preventDefault(), !!a) {
3682
- if (!A) {
3683
- const x = a.appropriatenessQuestions.length - Object.keys(g).length;
3684
- if (x > 0) {
3685
- v(`Please answer all questions. ${x} question(s) remaining.`);
3681
+ }, z = async (F) => {
3682
+ if (F && F.preventDefault(), !!a) {
3683
+ if (!I) {
3684
+ const R = a.appropriatenessQuestions.length - Object.keys(p).length;
3685
+ if (R > 0) {
3686
+ v(`Please answer all questions. ${R} question(s) remaining.`);
3686
3687
  return;
3687
3688
  }
3688
3689
  }
3689
3690
  u(!0), v(null);
3690
3691
  try {
3691
- const x = a.appropriatenessQuestions.map(
3692
- ($) => ({
3693
- appropriatenessQuestionId: $.id,
3694
- value: g[$.id] || ""
3692
+ const R = a.appropriatenessQuestions.map(
3693
+ (E) => ({
3694
+ appropriatenessQuestionId: E.id,
3695
+ value: p[E.id] || ""
3695
3696
  // Empty string if not answered
3696
3697
  })
3697
- ), z = {
3698
+ ), b = {
3698
3699
  applicantId: t,
3699
3700
  appropriatenessTestId: a.id,
3700
- appropriatenessQuestionResults: x
3701
+ appropriatenessQuestionResults: R
3701
3702
  };
3702
- console.log("Submitting appropriateness test:", z);
3703
+ console.log("Submitting appropriateness test:", b);
3703
3704
  try {
3704
- const $ = await s.fillAppropriatenessTest(z);
3705
- 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));
3706
- } catch ($) {
3707
- if ($.code === 400 && $.message) {
3708
- const R = $.message;
3709
- console.log("Test failed:", R), v(R), h(!1), S(!1), b({}), setTimeout(() => V(), 1500);
3705
+ const E = await s.fillAppropriatenessTest(b);
3706
+ console.log("Appropriateness test result:", E), E.message && (E.message.toLowerCase().includes("pass") || E.message.toLowerCase().includes("success") || E.message.toLowerCase().includes("congratulations")) ? e == null || e() : (v(E.message || "Test completed. Please check the result."), h(!1), S(!1), f({}), setTimeout(() => W(), 1e3));
3707
+ } catch (E) {
3708
+ if (E.code === 400 && E.message) {
3709
+ const U = E.message;
3710
+ console.log("Test failed:", U), v(U), h(!1), S(!1), f({}), setTimeout(() => W(), 1500);
3710
3711
  } else
3711
- throw $;
3712
+ throw E;
3712
3713
  }
3713
- } catch (x) {
3714
- console.error("Error submitting appropriateness test:", x), v(x.message || "Failed to submit test. Please try again."), h(!1), S(!1), b({});
3714
+ } catch (R) {
3715
+ console.error("Error submitting appropriateness test:", R), v(R.message || "Failed to submit test. Please try again."), h(!1), S(!1), f({});
3715
3716
  } finally {
3716
3717
  u(!1);
3717
3718
  }
3718
3719
  }
3719
- }, V = async () => {
3720
+ }, W = async () => {
3720
3721
  try {
3721
- const p = await s.getAppropriatenessTest(t);
3722
- if (console.log("Reloaded test data:", p), i(p), p.waitTimeSpanForNextTry && p.waitTimeSpanForNextTry !== "00:00:00") {
3723
- const x = P(p.waitTimeSpanForNextTry);
3724
- x > 0 && E(x);
3722
+ const F = await s.getAppropriatenessTest(t);
3723
+ if (console.log("Reloaded test data:", F), i(F), F.waitTimeSpanForNextTry && F.waitTimeSpanForNextTry !== "00:00:00") {
3724
+ const R = L(F.waitTimeSpanForNextTry);
3725
+ R > 0 && B(R);
3725
3726
  }
3726
- } catch (p) {
3727
- console.error("Error reloading test data:", p), v((x) => x + `
3727
+ } catch (F) {
3728
+ console.error("Error reloading test data:", F), v((R) => R + `
3728
3729
 
3729
3730
  Failed to reload test data. Please refresh the page.`);
3730
3731
  }
3731
3732
  };
3732
3733
  if (l)
3733
3734
  return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
3734
- /* @__PURE__ */ n(ce, { className: "my-8" }),
3735
+ /* @__PURE__ */ n(de, { className: "my-8" }),
3735
3736
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
3736
3737
  ] }) });
3737
3738
  if (!a)
3738
3739
  return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
3739
3740
  /* @__PURE__ */ n("p", { className: "text-danger-500 text-lg mb-4", children: "No test data available" }),
3740
- y && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: y })
3741
+ g && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: g })
3741
3742
  ] }) });
3742
3743
  if (w > 0)
3743
3744
  return /* @__PURE__ */ o(T, { children: [
@@ -3747,14 +3748,14 @@ Failed to reload test data. Please refresh the page.`);
3747
3748
  ] }),
3748
3749
  /* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
3749
3750
  /* @__PURE__ */ o("div", { className: "mb-6", children: [
3750
- /* @__PURE__ */ n("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: I(w) }),
3751
+ /* @__PURE__ */ n("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: A(w) }),
3751
3752
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
3752
3753
  ] }),
3753
- 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 }) })
3754
+ g && /* @__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: g }) })
3754
3755
  ] })
3755
3756
  ] });
3756
- const U = a.testAllowedMaxTry - a.totalFailedTries;
3757
- return k ? /* @__PURE__ */ n("form", { onSubmit: O, children: /* @__PURE__ */ o(T, { children: [
3757
+ const j = a.testAllowedMaxTry - a.totalFailedTries;
3758
+ return k ? /* @__PURE__ */ n("form", { onSubmit: z, children: /* @__PURE__ */ o(T, { children: [
3758
3759
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
3759
3760
  /* @__PURE__ */ o("div", { children: [
3760
3761
  /* @__PURE__ */ n("h2", { className: "text-lg font-bold text-gray-900 dark:text-white", children: a.displayName }),
@@ -3765,7 +3766,7 @@ Failed to reload test data. Please refresh the page.`);
3765
3766
  "div",
3766
3767
  {
3767
3768
  className: `text-3xl font-bold ${m <= 60 ? "text-danger-500" : "text-primary-500"}`,
3768
- children: I(m)
3769
+ children: A(m)
3769
3770
  }
3770
3771
  ),
3771
3772
  /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
@@ -3773,20 +3774,20 @@ Failed to reload test data. Please refresh the page.`);
3773
3774
  ] }) }),
3774
3775
  /* @__PURE__ */ o(M, { className: "space-y-6", children: [
3775
3776
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
3776
- /* @__PURE__ */ o(he, { variant: "info", children: [
3777
+ /* @__PURE__ */ o(pe, { variant: "info", children: [
3777
3778
  "Question ",
3778
- Object.keys(g).length,
3779
+ Object.keys(p).length,
3779
3780
  " of ",
3780
3781
  a.totalQuestionCount
3781
3782
  ] }),
3782
- /* @__PURE__ */ o(he, { variant: U > 1 ? "success" : "warning", children: [
3783
- U,
3783
+ /* @__PURE__ */ o(pe, { variant: j > 1 ? "success" : "warning", children: [
3784
+ j,
3784
3785
  " attempt",
3785
- U !== 1 ? "s" : "",
3786
+ j !== 1 ? "s" : "",
3786
3787
  " remaining"
3787
3788
  ] })
3788
3789
  ] }),
3789
- a.appropriatenessQuestions.map((p, x) => /* @__PURE__ */ o(
3790
+ a.appropriatenessQuestions.map((F, R) => /* @__PURE__ */ o(
3790
3791
  "div",
3791
3792
  {
3792
3793
  className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
@@ -3794,51 +3795,51 @@ Failed to reload test data. Please refresh the page.`);
3794
3795
  /* @__PURE__ */ o("div", { className: "mb-4", children: [
3795
3796
  /* @__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: [
3796
3797
  "Question ",
3797
- x + 1
3798
+ R + 1
3798
3799
  ] }),
3799
- p.groupName && /* @__PURE__ */ n("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: p.groupName }),
3800
- /* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: p.question })
3800
+ F.groupName && /* @__PURE__ */ n("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: F.groupName }),
3801
+ /* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: F.question })
3801
3802
  ] }),
3802
- /* @__PURE__ */ n("div", { className: "space-y-2", children: p.answers.map((z, $) => /* @__PURE__ */ o(
3803
+ /* @__PURE__ */ n("div", { className: "space-y-2", children: F.answers.map((b, E) => /* @__PURE__ */ o(
3803
3804
  "label",
3804
3805
  {
3805
3806
  className: `
3806
3807
  flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
3807
- ${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"}
3808
+ ${p[F.id] === b ? "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"}
3808
3809
  `,
3809
3810
  children: [
3810
3811
  /* @__PURE__ */ n(
3811
3812
  "input",
3812
3813
  {
3813
3814
  type: "radio",
3814
- name: `question-${p.id}`,
3815
- value: z,
3816
- checked: g[p.id] === z,
3817
- onChange: (R) => F(p.id, R.target.value),
3815
+ name: `question-${F.id}`,
3816
+ value: b,
3817
+ checked: p[F.id] === b,
3818
+ onChange: (U) => D(F.id, U.target.value),
3818
3819
  className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
3819
3820
  disabled: d
3820
3821
  }
3821
3822
  ),
3822
- /* @__PURE__ */ n("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: z })
3823
+ /* @__PURE__ */ n("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: b })
3823
3824
  ]
3824
3825
  },
3825
- $
3826
+ E
3826
3827
  )) })
3827
3828
  ]
3828
3829
  },
3829
- p.id
3830
+ F.id
3830
3831
  )),
3831
- 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: [
3832
+ g && !I && /* @__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: [
3832
3833
  /* @__PURE__ */ n("strong", { children: "Error:" }),
3833
3834
  " ",
3834
- y
3835
+ g
3835
3836
  ] }) }),
3836
- 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: [
3837
+ I && /* @__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: [
3837
3838
  /* @__PURE__ */ n("strong", { children: "Time's up!" }),
3838
3839
  " Your answers are being submitted automatically."
3839
3840
  ] }) })
3840
3841
  ] }),
3841
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3842
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3842
3843
  /* @__PURE__ */ n(
3843
3844
  _,
3844
3845
  {
@@ -3854,8 +3855,8 @@ Failed to reload test data. Please refresh the page.`);
3854
3855
  {
3855
3856
  type: "submit",
3856
3857
  isLoading: d,
3857
- disabled: Object.keys(g).length < a.totalQuestionCount,
3858
- children: A ? "Submitting..." : "Submit Test"
3858
+ disabled: Object.keys(p).length < a.totalQuestionCount,
3859
+ children: I ? "Submitting..." : "Submit Test"
3859
3860
  }
3860
3861
  )
3861
3862
  ] })
@@ -3869,36 +3870,36 @@ Failed to reload test data. Please refresh the page.`);
3869
3870
  /* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
3870
3871
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
3871
3872
  /* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
3872
- /* @__PURE__ */ n(he, { variant: "info", children: a.totalQuestionCount })
3873
+ /* @__PURE__ */ n(pe, { variant: "info", children: a.totalQuestionCount })
3873
3874
  ] }),
3874
3875
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
3875
3876
  /* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
3876
- /* @__PURE__ */ n(he, { variant: "info", children: I(a.testDurationSec) })
3877
+ /* @__PURE__ */ n(pe, { variant: "info", children: A(a.testDurationSec) })
3877
3878
  ] }),
3878
3879
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
3879
3880
  /* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
3880
- /* @__PURE__ */ n(he, { variant: "info", children: a.testCorrectAnswerPassLimit })
3881
+ /* @__PURE__ */ n(pe, { variant: "info", children: a.testCorrectAnswerPassLimit })
3881
3882
  ] }),
3882
3883
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
3883
3884
  /* @__PURE__ */ n("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
3884
- /* @__PURE__ */ n(he, { variant: U > 1 ? "success" : "warning", children: U })
3885
+ /* @__PURE__ */ n(pe, { variant: j > 1 ? "success" : "warning", children: j })
3885
3886
  ] })
3886
3887
  ] }),
3887
- 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: [
3888
+ g && /* @__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: [
3888
3889
  /* @__PURE__ */ n("strong", { children: "Previous Attempt:" }),
3889
3890
  " ",
3890
- y
3891
+ g
3891
3892
  ] }) }),
3892
- 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." }) })
3893
+ j <= 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." }) })
3893
3894
  ] }),
3894
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
3895
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
3895
3896
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3896
3897
  /* @__PURE__ */ n(
3897
3898
  _,
3898
3899
  {
3899
3900
  type: "button",
3900
3901
  onClick: C,
3901
- disabled: U <= 0,
3902
+ disabled: j <= 0,
3902
3903
  children: "Start Test"
3903
3904
  }
3904
3905
  )
@@ -3909,8 +3910,8 @@ Failed to reload test data. Please refresh the page.`);
3909
3910
  onComplete: e,
3910
3911
  onBack: r
3911
3912
  }) => {
3912
- var z, $, R, we;
3913
- 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({
3913
+ var b, E, U, re;
3914
+ const { applicantService: s, baseInformationService: a, config: i } = ie(), { identityData: l, provider: c, token: d, isLoading: u, error: g, requestIdentity: v, restartIdentity: p } = er(t), [f, m] = N(null), [y, k] = N(null), [h, I] = N([]), [S, w] = N(!0), [B, L] = N(!1), [A, C] = N(null), [D, z] = N(!1), W = se.useRef(!1), j = Te({
3914
3915
  defaultValues: {
3915
3916
  street: "",
3916
3917
  streetNumber: "",
@@ -3921,160 +3922,160 @@ Failed to reload test data. Please refresh the page.`);
3921
3922
  phonenumber: ""
3922
3923
  }
3923
3924
  });
3924
- W(() => {
3925
+ Y(() => {
3925
3926
  (async () => {
3926
3927
  try {
3927
- const [D, G] = await Promise.all([
3928
+ const [P, Q] = await Promise.all([
3928
3929
  s.getApplicantData(t),
3929
3930
  a.getCountries("", "en")
3930
3931
  ]);
3931
- k(D);
3932
- const Y = /* @__PURE__ */ new Set(), ae = G.filter((me) => {
3933
- const Ae = me.abbreviation3 || me.abbreviation;
3934
- return !Ae || Y.has(Ae) ? !1 : (Y.add(Ae), !0);
3932
+ k(P);
3933
+ const V = /* @__PURE__ */ new Set(), oe = Q.filter((he) => {
3934
+ const Ae = he.abbreviation3 || he.abbreviation;
3935
+ return !Ae || V.has(Ae) ? !1 : (V.add(Ae), !0);
3935
3936
  });
3936
- A(ae);
3937
- const j = D.applicantRequestData;
3938
- if (U.reset({
3939
- street: (j == null ? void 0 : j.street) || "",
3940
- streetNumber: (j == null ? void 0 : j.streetNumber) || "",
3941
- city: (j == null ? void 0 : j.city) || "",
3942
- zip: (j == null ? void 0 : j.zip) || "",
3943
- country: (j == null ? void 0 : j.country) || "",
3944
- nationality: (j == null ? void 0 : j.nationality) || "",
3945
- phonenumber: (j == null ? void 0 : j.phonenumber) || ""
3946
- }), D.kycRecords && D.kycRecords.length > 0 && D.kycRecords[0].providerTokenObject !== null && !V.current) {
3947
- console.log("[Identity] Found existing identity verification, auto-requesting..."), V.current = !0;
3937
+ I(oe);
3938
+ const $ = P.applicantRequestData;
3939
+ if (j.reset({
3940
+ street: ($ == null ? void 0 : $.street) || "",
3941
+ streetNumber: ($ == null ? void 0 : $.streetNumber) || "",
3942
+ city: ($ == null ? void 0 : $.city) || "",
3943
+ zip: ($ == null ? void 0 : $.zip) || "",
3944
+ country: ($ == null ? void 0 : $.country) || "",
3945
+ nationality: ($ == null ? void 0 : $.nationality) || "",
3946
+ phonenumber: ($ == null ? void 0 : $.phonenumber) || ""
3947
+ }), P.kycRecords && P.kycRecords.length > 0 && P.kycRecords[0].providerTokenObject !== null && !W.current) {
3948
+ console.log("[Identity] Found existing identity verification, auto-requesting..."), W.current = !0;
3948
3949
  try {
3949
- await v(), P(!0);
3950
- } catch (me) {
3951
- console.error("[Identity] Auto-request failed:", me);
3950
+ await v(), L(!0);
3951
+ } catch (he) {
3952
+ console.error("[Identity] Auto-request failed:", he);
3952
3953
  }
3953
3954
  }
3954
- } catch (D) {
3955
- console.error("Error loading applicant data:", D);
3955
+ } catch (P) {
3956
+ console.error("Error loading applicant data:", P);
3956
3957
  } finally {
3957
3958
  w(!1);
3958
3959
  }
3959
3960
  })();
3960
- }, [t]), W(() => {
3961
- l && !E && (console.log("[Identity] Identity data already loaded, showing provider"), P(!0));
3962
- }, [l, E]), W(() => {
3961
+ }, [t]), Y(() => {
3962
+ l && !B && (console.log("[Identity] Identity data already loaded, showing provider"), L(!0));
3963
+ }, [l, B]), Y(() => {
3963
3964
  if (d) {
3964
3965
  if (d.expiresAt) {
3965
- const L = new Date(d.expiresAt).getTime();
3966
- if (Date.now() >= L) {
3967
- console.warn("[Identity] Token has expired (expiresAt)"), O(!0), C("Your verification session has expired. Please restart.");
3966
+ const x = new Date(d.expiresAt).getTime();
3967
+ if (Date.now() >= x) {
3968
+ console.warn("[Identity] Token has expired (expiresAt)"), z(!0), C("Your verification session has expired. Please restart.");
3968
3969
  return;
3969
3970
  }
3970
3971
  }
3971
3972
  if (d.url)
3972
3973
  try {
3973
- const D = new URL(d.url).toString().toLowerCase();
3974
- if (D.includes("expired") || D.includes("invalid") || D.includes("error")) {
3975
- console.warn("[Identity] Token URL indicates expiration"), O(!0), C("Your verification link has expired. Please restart.");
3974
+ const P = new URL(d.url).toString().toLowerCase();
3975
+ if (P.includes("expired") || P.includes("invalid") || P.includes("error")) {
3976
+ console.warn("[Identity] Token URL indicates expiration"), z(!0), C("Your verification link has expired. Please restart.");
3976
3977
  return;
3977
3978
  }
3978
3979
  } catch {
3979
3980
  console.error("[Identity] Invalid token URL");
3980
3981
  }
3981
3982
  if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
3982
- console.warn("[Identity] Token object indicates expiration"), O(!0), C("Your verification session has expired. Please restart.");
3983
+ console.warn("[Identity] Token object indicates expiration"), z(!0), C("Your verification session has expired. Please restart.");
3983
3984
  return;
3984
3985
  }
3985
3986
  }
3986
- }, [d]), W(() => {
3987
- if (c !== null && d && !b && E && !F) {
3988
- const L = c;
3987
+ }, [d]), Y(() => {
3988
+ if (c !== null && d && !f && B && !D) {
3989
+ const x = c;
3989
3990
  if (d.url) {
3990
3991
  console.log("[Identity] Loading provider URL for user verification:", d.url), C(null);
3991
3992
  try {
3992
- if (new URL(d.url), L === oe.SardinAI) {
3993
+ if (new URL(d.url), x === le.SardinAI) {
3993
3994
  console.log("[SardinAI] Initializing Risk SDK in background...");
3994
3995
  try {
3995
- const D = fe.parseProviderConfig(c, d, i);
3996
- fe.createProvider(c, D).initialize().then(() => {
3996
+ const P = be.parseProviderConfig(c, d, i);
3997
+ be.createProvider(c, P).initialize().then(() => {
3997
3998
  console.log("[SardinAI] Risk SDK initialized successfully in background");
3998
- }).catch((Y) => {
3999
- console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", Y);
3999
+ }).catch((V) => {
4000
+ console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", V);
4000
4001
  });
4001
- } catch (D) {
4002
- console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", D);
4002
+ } catch (P) {
4003
+ console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", P);
4003
4004
  }
4004
4005
  }
4005
4006
  m({ type: "url", url: d.url });
4006
- } catch (D) {
4007
- console.error("[Identity] Invalid URL:", D), C("Invalid verification URL. Please restart."), O(!0);
4007
+ } catch (P) {
4008
+ console.error("[Identity] Invalid URL:", P), C("Invalid verification URL. Please restart."), z(!0);
4008
4009
  }
4009
4010
  return;
4010
4011
  }
4011
- if (L === oe.SardinAI) {
4012
+ if (x === le.SardinAI) {
4012
4013
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), C(null);
4013
4014
  try {
4014
- const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
4015
- G.initialize().then(() => {
4016
- console.log("[SardinAI] Risk SDK initialized successfully"), m(G), setTimeout(() => {
4015
+ const P = be.parseProviderConfig(c, d, i), Q = be.createProvider(c, P);
4016
+ Q.initialize().then(() => {
4017
+ console.log("[SardinAI] Risk SDK initialized successfully"), m(Q), setTimeout(() => {
4017
4018
  e == null || e();
4018
4019
  }, 2e3);
4019
- }).catch((Y) => {
4020
- var j;
4021
- console.error("[SardinAI] Failed to initialize:", Y);
4022
- const ae = ((j = Y.message) == null ? void 0 : j.toLowerCase()) || "";
4023
- 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}`);
4020
+ }).catch((V) => {
4021
+ var $;
4022
+ console.error("[SardinAI] Failed to initialize:", V);
4023
+ const oe = (($ = V.message) == null ? void 0 : $.toLowerCase()) || "";
4024
+ oe.includes("expired") || oe.includes("invalid") || oe.includes("401") || oe.includes("400") ? (z(!0), C("Session expired or invalid. Please restart verification.")) : C(`Failed to initialize: ${V.message}`);
4024
4025
  });
4025
- } catch (D) {
4026
- console.error("[SardinAI] Error creating provider:", D), C(`Configuration error: ${D.message}`);
4026
+ } catch (P) {
4027
+ console.error("[SardinAI] Error creating provider:", P), C(`Configuration error: ${P.message}`);
4027
4028
  }
4028
4029
  return;
4029
4030
  }
4030
4031
  try {
4031
4032
  C(null);
4032
- const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
4033
- L === oe.Sumsub ? (G.initialize("identity-container").catch((Y) => {
4034
- var ae;
4035
- console.error("[Sumsub] Initialization error:", Y), C(`Failed to initialize: ${Y.message}`), (ae = Y.message) != null && ae.toLowerCase().includes("expired") && O(!0);
4036
- }), G.onComplete && G.onComplete(() => {
4033
+ const P = be.parseProviderConfig(c, d, i), Q = be.createProvider(c, P);
4034
+ x === le.Sumsub ? (Q.initialize("identity-container").catch((V) => {
4035
+ var oe;
4036
+ console.error("[Sumsub] Initialization error:", V), C(`Failed to initialize: ${V.message}`), (oe = V.message) != null && oe.toLowerCase().includes("expired") && z(!0);
4037
+ }), Q.onComplete && Q.onComplete(() => {
4037
4038
  e == null || e();
4038
- })) : L === oe.Onfido && G.initialize("identity-container").catch((Y) => {
4039
- console.error("[Onfido] Initialization error:", Y), C(`Failed to initialize: ${Y.message}`);
4040
- }), m(G);
4041
- } catch (D) {
4042
- console.error("[Identity] Provider setup error:", D), C(`Setup error: ${D.message}`);
4039
+ })) : x === le.Onfido && Q.initialize("identity-container").catch((V) => {
4040
+ console.error("[Onfido] Initialization error:", V), C(`Failed to initialize: ${V.message}`);
4041
+ }), m(Q);
4042
+ } catch (P) {
4043
+ console.error("[Identity] Provider setup error:", P), C(`Setup error: ${P.message}`);
4043
4044
  }
4044
4045
  }
4045
4046
  return () => {
4046
- if (b && b.destroy)
4047
+ if (f && f.destroy)
4047
4048
  try {
4048
- b.destroy();
4049
- } catch (L) {
4050
- console.error("[Identity] Error destroying provider:", L);
4049
+ f.destroy();
4050
+ } catch (x) {
4051
+ console.error("[Identity] Error destroying provider:", x);
4051
4052
  }
4052
4053
  };
4053
- }, [c, d, b, E, e, F]);
4054
- const p = async () => {
4054
+ }, [c, d, f, B, e, D]);
4055
+ const F = async () => {
4055
4056
  try {
4056
- C(null), O(!1), await v(), P(!0);
4057
- } catch (L) {
4058
- console.error("Error starting identity verification:", L);
4057
+ C(null), z(!1), await v(), L(!0);
4058
+ } catch (x) {
4059
+ console.error("Error starting identity verification:", x);
4059
4060
  }
4060
- }, x = async () => {
4061
+ }, R = async () => {
4061
4062
  try {
4062
- C(null), O(!1), m(null), console.log("[Identity] Restarting verification..."), await g(), P(!0);
4063
- } catch (L) {
4064
- console.error("Error restarting identity verification:", L), C(L.message || "Failed to restart verification");
4063
+ C(null), z(!1), m(null), console.log("[Identity] Restarting verification..."), await p(), L(!0);
4064
+ } catch (x) {
4065
+ console.error("Error restarting identity verification:", x), C(x.message || "Failed to restart verification");
4065
4066
  }
4066
4067
  };
4067
4068
  if (S || u)
4068
4069
  return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
4069
- /* @__PURE__ */ n(ce, { className: "my-8" }),
4070
+ /* @__PURE__ */ n(de, { className: "my-8" }),
4070
4071
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
4071
4072
  ] }) });
4072
- if (y)
4073
+ if (g)
4073
4074
  return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
4074
4075
  "Error: ",
4075
- y.message
4076
+ g.message
4076
4077
  ] }) }) });
4077
- if (E && (I || F))
4078
+ if (B && (A || D))
4078
4079
  return /* @__PURE__ */ o(T, { children: [
4079
4080
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4080
4081
  /* @__PURE__ */ o(M, { children: [
@@ -4098,8 +4099,8 @@ Failed to reload test data. Please refresh the page.`);
4098
4099
  }
4099
4100
  ),
4100
4101
  /* @__PURE__ */ o("div", { children: [
4101
- /* @__PURE__ */ n("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: F ? "Session Expired" : "Verification Error" }),
4102
- /* @__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." })
4102
+ /* @__PURE__ */ n("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: D ? "Session Expired" : "Verification Error" }),
4103
+ /* @__PURE__ */ n("p", { className: "text-red-800 dark:text-red-200 text-sm", children: A || "Your verification session has expired and needs to be restarted." })
4103
4104
  ] })
4104
4105
  ] }) }),
4105
4106
  /* @__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: [
@@ -4111,13 +4112,13 @@ Failed to reload test data. Please refresh the page.`);
4111
4112
  ] })
4112
4113
  ] })
4113
4114
  ] }),
4114
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
4115
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
4115
4116
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4116
- /* @__PURE__ */ n(_, { type: "button", onClick: x, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
4117
+ /* @__PURE__ */ n(_, { type: "button", onClick: R, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
4117
4118
  ] })
4118
4119
  ] });
4119
- if (E && l) {
4120
- const L = c;
4120
+ if (B && l) {
4121
+ const x = c;
4121
4122
  return d != null && d.url ? /* @__PURE__ */ o(T, { children: [
4122
4123
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
4123
4124
  /* @__PURE__ */ o("div", { children: [
@@ -4130,7 +4131,7 @@ Failed to reload test data. Please refresh the page.`);
4130
4131
  type: "button",
4131
4132
  variant: "outline",
4132
4133
  size: "sm",
4133
- onClick: x,
4134
+ onClick: R,
4134
4135
  disabled: u,
4135
4136
  children: "Restart"
4136
4137
  }
@@ -4148,14 +4149,14 @@ Failed to reload test data. Please refresh the page.`);
4148
4149
  className: "w-full h-full border-0 rounded-lg",
4149
4150
  allow: "camera; microphone; geolocation",
4150
4151
  title: "Identity Verification",
4151
- onLoad: (D) => {
4152
- var G, Y, ae;
4152
+ onLoad: (P) => {
4153
+ var Q, V, oe;
4153
4154
  console.log("[Identity] Iframe loaded");
4154
4155
  try {
4155
- const j = D.target, Ce = j.contentDocument || ((G = j.contentWindow) == null ? void 0 : G.document);
4156
+ const $ = P.target, Ce = $.contentDocument || ((Q = $.contentWindow) == null ? void 0 : Q.document);
4156
4157
  if (Ce) {
4157
- const me = ((ae = (Y = Ce.body) == null ? void 0 : Y.textContent) == null ? void 0 : ae.toLowerCase()) || "";
4158
- (me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), O(!0), C("Your verification link has expired."));
4158
+ const he = ((oe = (V = Ce.body) == null ? void 0 : V.textContent) == null ? void 0 : oe.toLowerCase()) || "";
4159
+ (he.includes("expired") || he.includes("invalid") || he.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), z(!0), C("Your verification link has expired."));
4159
4160
  }
4160
4161
  } catch {
4161
4162
  console.log("[Identity] Cannot check iframe content (CORS)");
@@ -4164,14 +4165,14 @@ Failed to reload test data. Please refresh the page.`);
4164
4165
  }
4165
4166
  ) })
4166
4167
  ] }),
4167
- r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4168
- ] }) : L === oe.SardinAI ? /* @__PURE__ */ o(T, { children: [
4168
+ r && /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4169
+ ] }) : x === le.SardinAI ? /* @__PURE__ */ o(T, { children: [
4169
4170
  /* @__PURE__ */ o(ee, { children: [
4170
4171
  /* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4171
4172
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4172
4173
  ] }),
4173
4174
  /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("div", { className: "text-center py-12", children: [
4174
- /* @__PURE__ */ n(ce, { className: "mb-4" }),
4175
+ /* @__PURE__ */ n(de, { className: "mb-4" }),
4175
4176
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4176
4177
  /* @__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" })
4177
4178
  ] }) })
@@ -4181,10 +4182,10 @@ Failed to reload test data. Please refresh the page.`);
4181
4182
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4182
4183
  ] }),
4183
4184
  /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4184
- r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4185
+ r && /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4185
4186
  ] });
4186
4187
  }
4187
- return /* @__PURE__ */ n("form", { onSubmit: U.handleSubmit(p), children: /* @__PURE__ */ o(T, { children: [
4188
+ return /* @__PURE__ */ n("form", { onSubmit: j.handleSubmit(F), children: /* @__PURE__ */ o(T, { children: [
4188
4189
  /* @__PURE__ */ o(ee, { children: [
4189
4190
  /* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Review Your Information" }),
4190
4191
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
@@ -4194,18 +4195,18 @@ Failed to reload test data. Please refresh the page.`);
4194
4195
  /* @__PURE__ */ o("div", { children: [
4195
4196
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
4196
4197
  /* @__PURE__ */ o("p", { className: "mt-1 text-base", children: [
4197
- (z = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : z.firstName,
4198
+ (b = y == null ? void 0 : y.applicantRequestData) == null ? void 0 : b.firstName,
4198
4199
  " ",
4199
- ($ = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : $.lastName
4200
+ (E = y == null ? void 0 : y.applicantRequestData) == null ? void 0 : E.lastName
4200
4201
  ] })
4201
4202
  ] }),
4202
4203
  /* @__PURE__ */ o("div", { children: [
4203
4204
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Email" }),
4204
- /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: (R = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : R.email })
4205
+ /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: (U = y == null ? void 0 : y.applicantRequestData) == null ? void 0 : U.email })
4205
4206
  ] }),
4206
4207
  /* @__PURE__ */ o("div", { children: [
4207
4208
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4208
- /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: ((we = f == null ? void 0 : f.applicantRequestData) == null ? void 0 : we.dateOfBirth) || "Not provided" })
4209
+ /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: ((re = y == null ? void 0 : y.applicantRequestData) == null ? void 0 : re.dateOfBirth) || "Not provided" })
4209
4210
  ] })
4210
4211
  ] }),
4211
4212
  /* @__PURE__ */ o("div", { className: "space-y-4", children: [
@@ -4214,18 +4215,18 @@ Failed to reload test data. Please refresh the page.`);
4214
4215
  /* @__PURE__ */ n(
4215
4216
  J,
4216
4217
  {
4217
- control: U.control,
4218
+ control: j.control,
4218
4219
  name: "country",
4219
- render: ({ field: L }) => /* @__PURE__ */ n(
4220
- ye,
4220
+ render: ({ field: x }) => /* @__PURE__ */ n(
4221
+ fe,
4221
4222
  {
4222
- ...L,
4223
+ ...x,
4223
4224
  label: "Country",
4224
4225
  options: [
4225
4226
  { value: "", label: "Select country..." },
4226
- ...h.map((D) => ({
4227
- value: D.abbreviation3 || D.abbreviation,
4228
- label: D.name
4227
+ ...h.map((P) => ({
4228
+ value: P.abbreviation3 || P.abbreviation,
4229
+ label: P.name
4229
4230
  }))
4230
4231
  ]
4231
4232
  }
@@ -4235,18 +4236,18 @@ Failed to reload test data. Please refresh the page.`);
4235
4236
  /* @__PURE__ */ n(
4236
4237
  J,
4237
4238
  {
4238
- control: U.control,
4239
+ control: j.control,
4239
4240
  name: "nationality",
4240
- render: ({ field: L }) => /* @__PURE__ */ n(
4241
- ye,
4241
+ render: ({ field: x }) => /* @__PURE__ */ n(
4242
+ fe,
4242
4243
  {
4243
- ...L,
4244
+ ...x,
4244
4245
  label: "Nationality",
4245
4246
  options: [
4246
4247
  { value: "", label: "Select nationality..." },
4247
- ...h.map((D) => ({
4248
- value: D.abbreviation3 || D.abbreviation,
4249
- label: D.name
4248
+ ...h.map((P) => ({
4249
+ value: P.abbreviation3 || P.abbreviation,
4250
+ label: P.name
4250
4251
  }))
4251
4252
  ]
4252
4253
  }
@@ -4258,17 +4259,17 @@ Failed to reload test data. Please refresh the page.`);
4258
4259
  /* @__PURE__ */ n(
4259
4260
  J,
4260
4261
  {
4261
- control: U.control,
4262
+ control: j.control,
4262
4263
  name: "street",
4263
- render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Street" })
4264
+ render: ({ field: x }) => /* @__PURE__ */ n(X, { ...x, label: "Street" })
4264
4265
  }
4265
4266
  ),
4266
4267
  /* @__PURE__ */ n(
4267
4268
  J,
4268
4269
  {
4269
- control: U.control,
4270
+ control: j.control,
4270
4271
  name: "streetNumber",
4271
- render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Street Number" })
4272
+ render: ({ field: x }) => /* @__PURE__ */ n(X, { ...x, label: "Street Number" })
4272
4273
  }
4273
4274
  )
4274
4275
  ] }),
@@ -4276,36 +4277,36 @@ Failed to reload test data. Please refresh the page.`);
4276
4277
  /* @__PURE__ */ n(
4277
4278
  J,
4278
4279
  {
4279
- control: U.control,
4280
+ control: j.control,
4280
4281
  name: "city",
4281
- render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "City" })
4282
+ render: ({ field: x }) => /* @__PURE__ */ n(X, { ...x, label: "City" })
4282
4283
  }
4283
4284
  ),
4284
4285
  /* @__PURE__ */ n(
4285
4286
  J,
4286
4287
  {
4287
- control: U.control,
4288
+ control: j.control,
4288
4289
  name: "zip",
4289
- render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "ZIP/Postal Code" })
4290
+ render: ({ field: x }) => /* @__PURE__ */ n(X, { ...x, label: "ZIP/Postal Code" })
4290
4291
  }
4291
4292
  )
4292
4293
  ] }),
4293
4294
  /* @__PURE__ */ n(
4294
4295
  J,
4295
4296
  {
4296
- control: U.control,
4297
+ control: j.control,
4297
4298
  name: "phonenumber",
4298
- render: ({ field: L }) => /* @__PURE__ */ n(X, { ...L, label: "Phone Number", type: "tel" })
4299
+ render: ({ field: x }) => /* @__PURE__ */ n(X, { ...x, label: "Phone Number", type: "tel" })
4299
4300
  }
4300
4301
  )
4301
4302
  ] })
4302
4303
  ] }),
4303
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
4304
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
4304
4305
  r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4305
4306
  /* @__PURE__ */ n(_, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
4306
4307
  ] })
4307
4308
  ] }) });
4308
- }, je = ({
4309
+ }, _e = ({
4309
4310
  kycStatus: t,
4310
4311
  reviewStatus: e,
4311
4312
  workflowResult: r,
@@ -4313,42 +4314,42 @@ Failed to reload test data. Please refresh the page.`);
4313
4314
  onContinue: a,
4314
4315
  onContactSupport: i
4315
4316
  }) => {
4316
- const c = t === pe.Approved ? {
4317
+ const c = t === ge.Approved ? {
4317
4318
  type: "success",
4318
4319
  title: "Verification Approved",
4319
4320
  icon: "✓",
4320
4321
  iconBg: "bg-green-100 dark:bg-green-900/30",
4321
4322
  iconColor: "text-green-600 dark:text-green-400",
4322
4323
  message: "Your identity verification has been successfully approved."
4323
- } : t === pe.Rejected ? {
4324
+ } : t === ge.Rejected ? {
4324
4325
  type: "error",
4325
4326
  title: "Verification Rejected",
4326
4327
  icon: "✕",
4327
4328
  iconBg: "bg-red-100 dark:bg-red-900/30",
4328
4329
  iconColor: "text-red-600 dark:text-red-400",
4329
4330
  message: "Unfortunately, your identity verification was not approved."
4330
- } : t === pe.Pending || t === pe.InProgress ? {
4331
+ } : t === ge.Pending || t === ge.InProgress ? {
4331
4332
  type: "pending",
4332
4333
  title: "Verification Pending",
4333
4334
  icon: "⏱",
4334
4335
  iconBg: "bg-blue-100 dark:bg-blue-900/30",
4335
4336
  iconColor: "text-blue-600 dark:text-blue-400",
4336
4337
  message: "Your identity verification is currently being processed."
4337
- } : e === ge.Approved ? {
4338
+ } : e === ye.Approved ? {
4338
4339
  type: "success",
4339
4340
  title: "Application Approved",
4340
4341
  icon: "✓",
4341
4342
  iconBg: "bg-green-100 dark:bg-green-900/30",
4342
4343
  iconColor: "text-green-600 dark:text-green-400",
4343
4344
  message: "Your application has been approved."
4344
- } : e === ge.Reject ? {
4345
+ } : e === ye.Reject ? {
4345
4346
  type: "error",
4346
4347
  title: "Application Rejected",
4347
4348
  icon: "✕",
4348
4349
  iconBg: "bg-red-100 dark:bg-red-900/30",
4349
4350
  iconColor: "text-red-600 dark:text-red-400",
4350
4351
  message: "Your application has been rejected."
4351
- } : e === ge.UnderReview || e === ge.AdminReview ? {
4352
+ } : e === ye.UnderReview || e === ye.AdminReview ? {
4352
4353
  type: "pending",
4353
4354
  title: "Under Review",
4354
4355
  icon: "📋",
@@ -4395,10 +4396,10 @@ Failed to reload test data. Please refresh the page.`);
4395
4396
  ) }),
4396
4397
  /* @__PURE__ */ n("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: c.title }),
4397
4398
  /* @__PURE__ */ n("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ n(
4398
- he,
4399
+ pe,
4399
4400
  {
4400
4401
  variant: c.type === "success" ? "success" : c.type === "error" ? "danger" : c.type === "pending" ? "warning" : "info",
4401
- children: t != null ? pe[t] : ge[e]
4402
+ children: t != null ? ge[t] : ye[e]
4402
4403
  }
4403
4404
  ) }),
4404
4405
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: s || c.message }),
@@ -4430,15 +4431,15 @@ Failed to reload test data. Please refresh the page.`);
4430
4431
  /* @__PURE__ */ n("div", { className: "mt-6 pt-6 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
4431
4432
  /* @__PURE__ */ o("div", { children: [
4432
4433
  /* @__PURE__ */ n("span", { className: "text-gray-500 dark:text-gray-400", children: "KYC Status:" }),
4433
- /* @__PURE__ */ n("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: t != null ? pe[t] : "Not Available" })
4434
+ /* @__PURE__ */ n("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: t != null ? ge[t] : "Not Available" })
4434
4435
  ] }),
4435
4436
  /* @__PURE__ */ o("div", { children: [
4436
4437
  /* @__PURE__ */ n("span", { className: "text-gray-500 dark:text-gray-400", children: "Review Status:" }),
4437
- /* @__PURE__ */ n("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: ge[e] })
4438
+ /* @__PURE__ */ n("div", { className: "font-medium text-gray-900 dark:text-white mt-1", children: ye[e] })
4438
4439
  ] })
4439
4440
  ] }) })
4440
4441
  ] }),
4441
- /* @__PURE__ */ o(ne, { className: "flex justify-center gap-4", children: [
4442
+ /* @__PURE__ */ o(ae, { className: "flex justify-center gap-4", children: [
4442
4443
  c.type === "success" && a && /* @__PURE__ */ n(_, { onClick: a, size: "lg", children: "Continue" }),
4443
4444
  c.type === "error" && /* @__PURE__ */ o(nt, { children: [
4444
4445
  i && /* @__PURE__ */ n(_, { variant: "outline", onClick: i, children: "Contact Support" }),
@@ -4467,7 +4468,7 @@ Failed to reload test data. Please refresh the page.`);
4467
4468
  subtitle: e,
4468
4469
  className: r = ""
4469
4470
  }) => {
4470
- const { currentTheme: s } = se(), a = t || (s == null ? void 0 : s.title) || "", i = !!(s != null && s.logo && s.logo.visible && s.logo.url), l = !!a;
4471
+ const { currentTheme: s } = ie(), a = t || (s == null ? void 0 : s.title) || "", i = !!(s != null && s.logo && s.logo.visible && s.logo.url), l = !!a;
4471
4472
  return !i && !l ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${r}`, children: [
4472
4473
  /* @__PURE__ */ o("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
4473
4474
  i && /* @__PURE__ */ n(Er, { config: s.logo }),
@@ -4489,21 +4490,29 @@ Failed to reload test data. Please refresh the page.`);
4489
4490
  onSuccess: r,
4490
4491
  onCancel: s
4491
4492
  }) => {
4492
- var O, V, U;
4493
- 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);
4494
- if (!A)
4493
+ var j, F, R;
4494
+ const { config: a, baseInformationService: i, currentTheme: l } = ie(), { createApplicant: c, isLoading: d } = rr(), [u, g] = N([]), [v, p] = N(!0), [f, m] = N(!1), [y, k] = N(null), h = H(!1), I = H(!1), S = t || ((j = a.applicantForm) == null ? void 0 : j.workflowKey);
4495
+ if (!S)
4495
4496
  throw new Error(
4496
4497
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
4497
4498
  );
4498
- const S = e || ((V = a.applicantForm) == null ? void 0 : V.externalRefId) || "", w = ((U = a.applicantForm) == null ? void 0 : U.visibleFields) || gt, [E, P] = N({
4499
- workflowKey: A,
4499
+ const w = e || ((F = a.applicantForm) == null ? void 0 : F.externalRefId) || "", B = ["firstName", "lastName", "email", "phonenumber", "externalRefId"], L = se.useMemo(() => {
4500
+ var U;
4501
+ let b;
4502
+ (U = a.applicantForm) != null && U.visibleFields ? b = a.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? b = l.applicantFormVisibleFields : b = gt;
4503
+ const E = new Set(b);
4504
+ for (const re of B)
4505
+ E.add(re);
4506
+ return Array.from(E);
4507
+ }, [(R = a.applicantForm) == null ? void 0 : R.visibleFields, l == null ? void 0 : l.applicantFormVisibleFields]), [A, C] = N({
4508
+ workflowKey: S,
4500
4509
  firstName: "",
4501
4510
  lastName: "",
4502
4511
  title: "",
4503
4512
  email: "",
4504
4513
  dateOfBirth: "",
4505
4514
  phonenumber: "",
4506
- externalRefId: S,
4515
+ externalRefId: w,
4507
4516
  // Set from config or prop
4508
4517
  mobileCountryCode: "",
4509
4518
  street: "",
@@ -4522,78 +4531,78 @@ Failed to reload test data. Please refresh the page.`);
4522
4531
  occupation: "",
4523
4532
  taxNumber: ""
4524
4533
  });
4525
- W(() => {
4534
+ Y(() => {
4526
4535
  (async () => {
4527
- if (k.current || h.current) {
4536
+ if (h.current || I.current) {
4528
4537
  console.log("[CreateApplicant] Countries already loading or loaded, skipping...");
4529
4538
  return;
4530
4539
  }
4531
- k.current = !0, v(!0);
4540
+ h.current = !0, p(!0);
4532
4541
  try {
4533
- const x = await i.getCountries("", a.locale || "en"), z = /* @__PURE__ */ new Set(), $ = x.map((R) => ({
4534
- value: R.abbreviation3 || R.abbreviation,
4535
- label: R.name
4536
- })).filter((R) => !R.value || z.has(R.value) ? !1 : (z.add(R.value), !0));
4537
- u($), h.current = !0;
4538
- } catch (x) {
4539
- console.error("Failed to load countries:", x);
4542
+ const E = await i.getCountries("", a.locale || "en"), U = /* @__PURE__ */ new Set(), re = E.map((x) => ({
4543
+ value: x.abbreviation3 || x.abbreviation,
4544
+ label: x.name
4545
+ })).filter((x) => !x.value || U.has(x.value) ? !1 : (U.add(x.value), !0));
4546
+ g(re), I.current = !0;
4547
+ } catch (E) {
4548
+ console.error("Failed to load countries:", E);
4540
4549
  } finally {
4541
- v(!1), k.current = !1;
4550
+ p(!1), h.current = !1;
4542
4551
  }
4543
4552
  })();
4544
4553
  }, []);
4545
- const I = (p, x) => {
4546
- P((z) => ({ ...z, [p]: x }));
4547
- }, C = async (p) => {
4548
- p.preventDefault(), b(!0), f(null);
4554
+ const D = (b, E) => {
4555
+ C((U) => ({ ...U, [b]: E }));
4556
+ }, z = async (b) => {
4557
+ b.preventDefault(), m(!0), k(null);
4549
4558
  try {
4550
- if (!E.externalRefId || E.externalRefId.trim() === "") {
4551
- f("External Reference ID is required and cannot be empty"), b(!1);
4559
+ if (!A.externalRefId || A.externalRefId.trim() === "") {
4560
+ k("External Reference ID is required and cannot be empty"), m(!1);
4552
4561
  return;
4553
4562
  }
4554
- const x = {
4555
- workflowKey: E.workflowKey,
4556
- externalRefId: E.externalRefId.trim()
4563
+ const E = {
4564
+ workflowKey: A.workflowKey,
4565
+ externalRefId: A.externalRefId.trim()
4557
4566
  // Always include, never empty
4558
4567
  };
4559
- w.forEach(($) => {
4560
- if ($ === "externalRefId") return;
4561
- const R = E[$];
4562
- R != null && R !== "" && !(Array.isArray(R) && R.length === 0) && (x[$] = R);
4563
- }), console.log("Creating applicant with data:", x);
4564
- const z = await l(
4565
- x
4568
+ L.forEach((re) => {
4569
+ if (re === "externalRefId") return;
4570
+ const x = A[re];
4571
+ x != null && x !== "" && !(Array.isArray(x) && x.length === 0) && (E[re] = x);
4572
+ }), console.log("Creating applicant with data:", E);
4573
+ const U = await c(
4574
+ E
4566
4575
  );
4567
- console.log("Applicant created:", z), r(z.applicantId);
4568
- } catch (x) {
4569
- console.error("Error creating applicant:", x), f(x.message || "Failed to create applicant");
4576
+ console.log("Applicant created:", U), r(U.applicantId);
4577
+ } catch (E) {
4578
+ console.error("Error creating applicant:", E), k(E.message || "Failed to create applicant");
4570
4579
  } finally {
4571
- b(!1);
4580
+ m(!1);
4572
4581
  }
4573
- }, F = (p) => {
4574
- var z, $;
4575
- const x = yt[p];
4576
- switch (x.type) {
4582
+ }, W = (b) => {
4583
+ var U, re;
4584
+ const E = yt[b];
4585
+ switch (E.type) {
4577
4586
  case "select":
4578
- return p === "country" || p === "nationality" || p === "taxCountry" || p === "countryOfBirth" ? /* @__PURE__ */ n(
4579
- ye,
4587
+ return b === "country" || b === "nationality" || b === "taxCountry" || b === "countryOfBirth" ? /* @__PURE__ */ n(
4588
+ fe,
4580
4589
  {
4581
- label: x.label,
4582
- value: E[p] || "",
4583
- onChange: (R) => I(p, R.target.value),
4590
+ label: E.label,
4591
+ value: A[b] || "",
4592
+ onChange: (x) => D(b, x.target.value),
4584
4593
  options: [
4585
- { value: "", label: `Select ${x.label.toLowerCase()}...` },
4586
- ...d
4594
+ { value: "", label: `Select ${E.label.toLowerCase()}...` },
4595
+ ...u
4587
4596
  ],
4588
- disabled: y
4597
+ disabled: v
4589
4598
  },
4590
- p
4591
- ) : p === "salutation" ? /* @__PURE__ */ n(
4592
- ye,
4599
+ b
4600
+ ) : b === "salutation" ? /* @__PURE__ */ n(
4601
+ fe,
4593
4602
  {
4594
- label: x.label,
4595
- value: ((z = E[p]) == null ? void 0 : z.toString()) || "",
4596
- onChange: (R) => I(p, R.target.value ? Number(R.target.value) : null),
4603
+ label: E.label,
4604
+ value: ((U = A[b]) == null ? void 0 : U.toString()) || "",
4605
+ onChange: (x) => D(b, x.target.value ? Number(x.target.value) : null),
4597
4606
  options: [
4598
4607
  { value: "", label: "Select salutation..." },
4599
4608
  { value: Se.Male.toString(), label: "Male" },
@@ -4601,57 +4610,57 @@ Failed to reload test data. Please refresh the page.`);
4601
4610
  { value: Se.Other.toString(), label: "Other" }
4602
4611
  ]
4603
4612
  },
4604
- p
4613
+ b
4605
4614
  ) : null;
4606
4615
  case "multiselect":
4607
- return p === "otherNationality" ? /* @__PURE__ */ n(
4616
+ return b === "otherNationality" ? /* @__PURE__ */ n(
4608
4617
  X,
4609
4618
  {
4610
4619
  type: "text",
4611
- label: x.label,
4612
- value: (($ = E[p]) == null ? void 0 : $.join(", ")) || "",
4613
- onChange: (R) => {
4614
- const we = R.target.value.split(",").map((L) => L.trim()).filter(Boolean);
4615
- I(p, we);
4620
+ label: E.label,
4621
+ value: ((re = A[b]) == null ? void 0 : re.join(", ")) || "",
4622
+ onChange: (x) => {
4623
+ const P = x.target.value.split(",").map((Q) => Q.trim()).filter(Boolean);
4624
+ D(b, P);
4616
4625
  },
4617
4626
  placeholder: "Enter countries separated by commas"
4618
4627
  },
4619
- p
4628
+ b
4620
4629
  ) : null;
4621
4630
  case "date":
4622
4631
  return /* @__PURE__ */ n(
4623
4632
  X,
4624
4633
  {
4625
4634
  type: "date",
4626
- label: x.label,
4627
- value: E[p] || "",
4628
- onChange: (R) => I(p, R.target.value)
4635
+ label: E.label,
4636
+ value: A[b] || "",
4637
+ onChange: (x) => D(b, x.target.value)
4629
4638
  },
4630
- p
4639
+ b
4631
4640
  );
4632
4641
  case "email":
4633
4642
  return /* @__PURE__ */ n(
4634
4643
  X,
4635
4644
  {
4636
4645
  type: "email",
4637
- label: x.label,
4638
- value: E[p] || "",
4639
- onChange: (R) => I(p, R.target.value),
4640
- required: p === "email"
4646
+ label: E.label,
4647
+ value: A[b] || "",
4648
+ onChange: (x) => D(b, x.target.value),
4649
+ required: b === "email"
4641
4650
  },
4642
- p
4651
+ b
4643
4652
  );
4644
4653
  case "tel":
4645
4654
  return /* @__PURE__ */ n(
4646
4655
  X,
4647
4656
  {
4648
4657
  type: "tel",
4649
- label: x.label,
4650
- value: E[p] || "",
4651
- onChange: (R) => I(p, R.target.value),
4652
- required: p === "phonenumber"
4658
+ label: E.label,
4659
+ value: A[b] || "",
4660
+ onChange: (x) => D(b, x.target.value),
4661
+ required: b === "phonenumber"
4653
4662
  },
4654
- p
4663
+ b
4655
4664
  );
4656
4665
  case "text":
4657
4666
  default:
@@ -4659,19 +4668,19 @@ Failed to reload test data. Please refresh the page.`);
4659
4668
  X,
4660
4669
  {
4661
4670
  type: "text",
4662
- label: x.label,
4663
- value: E[p] || "",
4664
- onChange: (R) => I(p, R.target.value),
4665
- required: p === "firstName" || p === "lastName" || p === "externalRefId"
4671
+ label: E.label,
4672
+ value: A[b] || "",
4673
+ onChange: (x) => D(b, x.target.value),
4674
+ required: b === "firstName" || b === "lastName" || b === "externalRefId"
4666
4675
  },
4667
- p
4676
+ b
4668
4677
  );
4669
4678
  }
4670
4679
  };
4671
- return y ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
4672
- /* @__PURE__ */ n(ce, { className: "my-8" }),
4680
+ return v ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
4681
+ /* @__PURE__ */ n(de, { className: "my-8" }),
4673
4682
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
4674
- ] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: C, children: /* @__PURE__ */ o(T, { children: [
4683
+ ] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: z, children: /* @__PURE__ */ o(T, { children: [
4675
4684
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
4676
4685
  Ze,
4677
4686
  {
@@ -4680,16 +4689,16 @@ Failed to reload test data. Please refresh the page.`);
4680
4689
  }
4681
4690
  ) }),
4682
4691
  /* @__PURE__ */ o(M, { children: [
4683
- 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: [
4692
+ y && /* @__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: [
4684
4693
  /* @__PURE__ */ n("strong", { children: "Error:" }),
4685
4694
  " ",
4686
- m
4695
+ y
4687
4696
  ] }) }),
4688
- /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: w.map((p) => F(p)) })
4697
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: L.map((b) => W(b)) })
4689
4698
  ] }),
4690
- /* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
4691
- s && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: s, disabled: g || c, children: "Cancel" }),
4692
- /* @__PURE__ */ n(_, { type: "submit", isLoading: g || c, children: "Create Applicant" })
4699
+ /* @__PURE__ */ o(ae, { className: "flex justify-between", children: [
4700
+ s && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: s, disabled: f || d, children: "Cancel" }),
4701
+ /* @__PURE__ */ n(_, { type: "submit", isLoading: f || d, children: "Create Applicant" })
4693
4702
  ] })
4694
4703
  ] }) }) });
4695
4704
  }, Wr = ({
@@ -4705,31 +4714,31 @@ Failed to reload test data. Please refresh the page.`);
4705
4714
  steps: c,
4706
4715
  workflowKey: d,
4707
4716
  nextWorkflowKey: u,
4708
- hasWorkflowChanged: y,
4717
+ hasWorkflowChanged: g,
4709
4718
  isLoading: v,
4710
- error: g,
4711
- moveBack: b,
4719
+ error: p,
4720
+ moveBack: f,
4712
4721
  refreshProgress: m
4713
- } = Gt(t), [f, k] = ie.useState(!1);
4714
- if (ie.useEffect(() => {
4715
- g && r && r(g);
4716
- }, [g, r]), ie.useEffect(() => {
4722
+ } = Gt(t), [y, k] = se.useState(!1);
4723
+ if (se.useEffect(() => {
4724
+ p && r && r(p);
4725
+ }, [p, r]), se.useEffect(() => {
4717
4726
  i != null && i.workflowResult && e && e(i.workflowResult);
4718
- }, [i == null ? void 0 : i.workflowResult, e]), ie.useEffect(() => {
4727
+ }, [i == null ? void 0 : i.workflowResult, e]), se.useEffect(() => {
4719
4728
  s === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
4720
- }, [s]), ie.useEffect(() => {
4721
- y && k(!1);
4722
- }, [y]), v || !i)
4729
+ }, [s]), se.useEffect(() => {
4730
+ g && k(!1);
4731
+ }, [g]), v || !i)
4723
4732
  return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
4724
- /* @__PURE__ */ n(ce, { className: "my-8" }),
4733
+ /* @__PURE__ */ n(de, { className: "my-8" }),
4725
4734
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
4726
4735
  ] }) }) });
4727
- if (g)
4736
+ if (p)
4728
4737
  return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(M, { children: /* @__PURE__ */ o("div", { className: "text-center py-8", children: [
4729
4738
  /* @__PURE__ */ n("p", { className: "text-danger-500 text-lg mb-4", children: "An error occurred" }),
4730
- /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: g.message })
4739
+ /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: p.message })
4731
4740
  ] }) }) }) });
4732
- if (y && !f)
4741
+ if (g && !y)
4733
4742
  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: [
4734
4743
  /* @__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" }) }) }) }),
4735
4744
  /* @__PURE__ */ n("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white mb-2", children: "Workflow Transition" }),
@@ -4757,9 +4766,9 @@ Failed to reload test data. Please refresh the page.`);
4757
4766
  }
4758
4767
  )
4759
4768
  ] }) }) }) });
4760
- if (i.status === le.Finished || i.status === le.OnHold)
4769
+ if (i.status === ce.Finished || i.status === ce.OnHold)
4761
4770
  return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(
4762
- je,
4771
+ _e,
4763
4772
  {
4764
4773
  kycStatus: i.kycStatus,
4765
4774
  reviewStatus: i.reviewStatus,
@@ -4773,70 +4782,70 @@ Failed to reload test data. Please refresh the page.`);
4773
4782
  ) });
4774
4783
  if (!l)
4775
4784
  return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { children: [
4776
- /* @__PURE__ */ n(ce, { className: "my-8" }),
4777
- /* @__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..." })
4785
+ /* @__PURE__ */ n(de, { className: "my-8" }),
4786
+ /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === ce.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
4778
4787
  ] }) }) });
4779
4788
  const h = (w) => {
4780
4789
  switch (w) {
4781
- case B.Overview:
4790
+ case O.Overview:
4782
4791
  return "Overview";
4783
- case B.Questionaries:
4792
+ case O.Questionaries:
4784
4793
  return "Questionnaire";
4785
- case B.UploadDocument:
4794
+ case O.UploadDocument:
4786
4795
  return "Documents";
4787
- case B.IdentitySdk:
4796
+ case O.IdentitySdk:
4788
4797
  return "Identity";
4789
- case B.RiskScoring:
4798
+ case O.RiskScoring:
4790
4799
  return "Risk Assessment";
4791
- case B.InvestorCategorization:
4800
+ case O.InvestorCategorization:
4792
4801
  return "Investor Categorization";
4793
- case B.AppropriatenessTest:
4802
+ case O.AppropriatenessTest:
4794
4803
  return "Appropriateness Test";
4795
- case B.AdditionalData:
4804
+ case O.AdditionalData:
4796
4805
  return "Additional Data";
4797
- case B.ManualReview:
4806
+ case O.ManualReview:
4798
4807
  return "Review";
4799
4808
  default:
4800
4809
  return "";
4801
4810
  }
4802
- }, A = () => {
4803
- 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;
4811
+ }, I = () => {
4812
+ const w = c.filter((C) => C.visibility !== !1), B = w.findIndex((C) => C.order === l.order), L = B >= 0 ? B + 1 : 1, A = w.length;
4804
4813
  return /* @__PURE__ */ o("div", { className: "mb-6", children: [
4805
4814
  /* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
4806
4815
  /* @__PURE__ */ n(Ze, {}),
4807
- /* @__PURE__ */ o(he, { variant: i.status === 1 ? "info" : "success", children: [
4816
+ /* @__PURE__ */ o(pe, { variant: i.status === 1 ? "info" : "success", children: [
4808
4817
  "Step ",
4809
- P,
4818
+ L,
4810
4819
  " of ",
4811
- I
4820
+ A
4812
4821
  ] })
4813
4822
  ] }),
4814
- /* @__PURE__ */ n("div", { className: "flex items-center", children: w.map((C, F) => {
4815
- const O = F < E, V = C.order === l.order;
4816
- return /* @__PURE__ */ o(ie.Fragment, { children: [
4823
+ /* @__PURE__ */ n("div", { className: "flex items-center", children: w.map((C, D) => {
4824
+ const z = D < B, W = C.order === l.order;
4825
+ return /* @__PURE__ */ o(se.Fragment, { children: [
4817
4826
  /* @__PURE__ */ o("div", { className: "flex items-center", children: [
4818
4827
  /* @__PURE__ */ n(
4819
4828
  "div",
4820
4829
  {
4821
4830
  className: `
4822
4831
  w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
4823
- ${O || V ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
4832
+ ${z || W ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
4824
4833
  `,
4825
- children: F + 1
4834
+ children: D + 1
4826
4835
  }
4827
4836
  ),
4828
4837
  /* @__PURE__ */ n(
4829
4838
  "span",
4830
4839
  {
4831
- className: `ml-2 text-sm ${V ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
4832
- children: C.displayName || C.name || h(C.action) || `Step ${F + 1}`
4840
+ className: `ml-2 text-sm ${W ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
4841
+ children: C.displayName || C.name || h(C.action) || `Step ${D + 1}`
4833
4842
  }
4834
4843
  )
4835
4844
  ] }),
4836
- F < w.length - 1 && /* @__PURE__ */ n(
4845
+ D < w.length - 1 && /* @__PURE__ */ n(
4837
4846
  "div",
4838
4847
  {
4839
- className: `flex-1 h-0.5 mx-4 ${O ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
4848
+ className: `flex-1 h-0.5 mx-4 ${z ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
4840
4849
  }
4841
4850
  )
4842
4851
  ] }, C.order);
@@ -4848,27 +4857,27 @@ Failed to reload test data. Please refresh the page.`);
4848
4857
  onComplete: async () => {
4849
4858
  await m();
4850
4859
  },
4851
- onBack: l.order > 0 ? b : void 0
4860
+ onBack: l.order > 0 ? f : void 0
4852
4861
  };
4853
4862
  switch (l.action) {
4854
- case B.Questionaries:
4863
+ case O.Questionaries:
4855
4864
  return /* @__PURE__ */ n(xr, { ...w });
4856
- case B.UploadDocument:
4865
+ case O.UploadDocument:
4857
4866
  return /* @__PURE__ */ n(wr, { ...w });
4858
- case B.Overview:
4867
+ case O.Overview:
4859
4868
  return /* @__PURE__ */ n(kr, { ...w });
4860
- case B.IdentitySdk:
4869
+ case O.IdentitySdk:
4861
4870
  return /* @__PURE__ */ n(Ar, { ...w });
4862
- case B.RiskScoring:
4871
+ case O.RiskScoring:
4863
4872
  return /* @__PURE__ */ n(Nr, { ...w });
4864
- case B.AdditionalData:
4865
- case B.InvestorCategorization:
4873
+ case O.AdditionalData:
4874
+ case O.InvestorCategorization:
4866
4875
  return /* @__PURE__ */ n(Sr, { ...w });
4867
- case B.AppropriatenessTest:
4876
+ case O.AppropriatenessTest:
4868
4877
  return /* @__PURE__ */ n(Cr, { ...w });
4869
- case B.ManualReview:
4878
+ case O.ManualReview:
4870
4879
  return /* @__PURE__ */ n(
4871
- je,
4880
+ _e,
4872
4881
  {
4873
4882
  kycStatus: i.kycStatus,
4874
4883
  reviewStatus: i.reviewStatus,
@@ -4878,45 +4887,45 @@ Failed to reload test data. Please refresh the page.`);
4878
4887
  );
4879
4888
  default:
4880
4889
  return /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o(M, { className: "py-12 text-center", children: [
4881
- /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(ce, {}) }),
4890
+ /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(de, {}) }),
4882
4891
  /* @__PURE__ */ o("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
4883
4892
  "Processing step: ",
4884
4893
  l.title || l.name
4885
4894
  ] }),
4886
4895
  /* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
4887
4896
  "Action type: ",
4888
- B[l.action]
4897
+ O[l.action]
4889
4898
  ] })
4890
4899
  ] }) });
4891
4900
  }
4892
4901
  };
4893
4902
  return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${a || ""}`, children: [
4894
- A(),
4903
+ I(),
4895
4904
  S()
4896
4905
  ] });
4897
4906
  };
4898
4907
  export {
4899
4908
  Tr as ALL_APPLICANT_FIELDS,
4900
4909
  st as ApplicantProgressOnHoldReason,
4901
- le as ApplicantProgressStatus,
4910
+ ce as ApplicantProgressStatus,
4902
4911
  xt as ApplicantService,
4903
4912
  it as ApplicantStatus,
4904
4913
  ut as AppropriatenessQuestionType,
4905
4914
  Nt as AppropriatenessTestService,
4906
4915
  Cr as AppropriatenessTestStep,
4907
- he as Badge,
4916
+ pe as Badge,
4908
4917
  Et as BaseInformationService,
4909
4918
  _ as Button,
4910
4919
  T as Card,
4911
4920
  M as CardContent,
4912
- ne as CardFooter,
4921
+ ae as CardFooter,
4913
4922
  ee as CardHeader,
4914
4923
  Yr as CreateApplicantForm,
4915
4924
  ht as CriteriaBuiltInType,
4916
4925
  gt as DEFAULT_VISIBLE_FIELDS,
4917
4926
  dt as DocumentReviewStatus,
4918
4927
  bt as EndpointBuilder,
4919
- ve as ErrorHandler,
4928
+ xe as ErrorHandler,
4920
4929
  Bt as EventEmitter,
4921
4930
  yt as FIELD_METADATA,
4922
4931
  ct as FileType,
@@ -4924,41 +4933,41 @@ export {
4924
4933
  Se as GenderType,
4925
4934
  Ze as Header,
4926
4935
  vt as HttpClient,
4927
- fe as IdentityProviderManager,
4936
+ be as IdentityProviderManager,
4928
4937
  At as IdentityService,
4929
- oe as IdentityVerificationProvider,
4938
+ le as IdentityVerificationProvider,
4930
4939
  Ar as IdentityVerificationStep,
4931
4940
  X as Input,
4932
4941
  It as InvestorCategorizationService,
4933
4942
  Sr as InvestorCategorizationStep,
4934
- re as InvestorCategorizationType,
4943
+ ne as InvestorCategorizationType,
4935
4944
  pt as InvestorCategoryType,
4936
4945
  ot as KycProcessStatus,
4937
- pe as KycStatus,
4938
- je as KycStatusDisplay,
4946
+ ge as KycStatus,
4947
+ _e as KycStatusDisplay,
4939
4948
  Wr as KycWorkflow,
4940
4949
  Er as Logo,
4941
4950
  Ke as MetaKYCContext,
4942
- de as MetaKYCError,
4951
+ ue as MetaKYCError,
4943
4952
  Or as MetaKYCProvider,
4944
- _t as OnfidoProvider,
4953
+ jt as OnfidoProvider,
4945
4954
  St as OverviewService,
4946
4955
  kr as OverviewStep,
4947
4956
  sr as PhoneInput,
4948
4957
  wt as QuestionnaireService,
4949
4958
  xr as QuestionnaireStep,
4950
- ge as ReviewStatus,
4959
+ ye as ReviewStatus,
4951
4960
  mt as RiskCriteriaType,
4952
4961
  at as RiskLevel,
4953
4962
  Ct as RiskScoringService,
4954
4963
  Nr as RiskScoringStep,
4955
4964
  Ut as SardinAIProvider,
4956
- ye as Select,
4957
- ce as Spinner,
4965
+ fe as Select,
4966
+ de as Spinner,
4958
4967
  zt as StepRouter,
4959
- jt as SumsubProvider,
4968
+ _t as SumsubProvider,
4960
4969
  Kt as ThemeManager,
4961
- Q as ThemePreset,
4970
+ G as ThemePreset,
4962
4971
  Mt as ThemeService,
4963
4972
  kt as UploadDocumentService,
4964
4973
  wr as UploadDocumentStep,
@@ -4967,7 +4976,7 @@ export {
4967
4976
  $t as WorkflowOrchestrator,
4968
4977
  Ne as WorkflowResultType,
4969
4978
  Ot as WorkflowState,
4970
- B as WorkflowStepAction,
4979
+ O as WorkflowStepAction,
4971
4980
  Vr as appropriatenessTestSchema,
4972
4981
  Ur as clearAllStorage,
4973
4982
  Yt as clearApplicantId,
@@ -4983,10 +4992,10 @@ export {
4983
4992
  yr as generateQuestionnaireSchema,
4984
4993
  br as generateRiskScoringSchema,
4985
4994
  qr as generateUploadDocumentSchema,
4986
- jr as getAcceptString,
4995
+ _r as getAcceptString,
4987
4996
  Vt as getApplicantId,
4988
- xe as getThemePreset,
4989
- _r as getWorkflowState,
4997
+ we as getThemePreset,
4998
+ jr as getWorkflowState,
4990
4999
  Pt as healthcareTheme,
4991
5000
  Mr as isScriptLoaded,
4992
5001
  Ue as loadScript,
@@ -5000,7 +5009,7 @@ export {
5000
5009
  Kr as useAppropriatenessTest,
5001
5010
  er as useIdentityVerification,
5002
5011
  Gt as useKycWorkflow,
5003
- se as useMetaKYC,
5012
+ ie as useMetaKYC,
5004
5013
  Xt as useOverview,
5005
5014
  Zt as useQuestionnaire,
5006
5015
  tr as useRiskScoring,