@vpdev2/metakyc-sdk 1.0.26 → 1.0.27

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