@vpdev2/metakyc-sdk 1.0.32 → 1.0.33

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
@@ -1,14 +1,14 @@
1
- var Xe = Object.defineProperty;
2
- var et = (t, e, r) => e in t ? Xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var U = (t, e, r) => et(t, typeof e != "symbol" ? e + "" : e, r);
4
- import tt from "axios";
1
+ var et = Object.defineProperty;
2
+ var tt = (t, e, r) => e in t ? et(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var U = (t, e, r) => tt(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import rt from "axios";
5
5
  import * as Me from "react";
6
- import re, { createContext as rt, useState as S, useMemo as Re, useEffect as Q, useContext as nt, useRef as Y, useCallback as V, forwardRef as Le } from "react";
7
- import { jsx as n, jsxs as o, Fragment as at } from "react/jsx-runtime";
8
- import { get as Fe, set as Ee, appendErrors as je, useForm as Te, Controller as te } from "react-hook-form";
6
+ import re, { createContext as nt, useState as S, useMemo as Re, useEffect as Q, useContext as at, useRef as Y, useCallback as V, forwardRef as Le } from "react";
7
+ import { jsx as n, jsxs as o, Fragment as st } from "react/jsx-runtime";
8
+ import { get as Fe, set as Ee, appendErrors as Ue, useForm as Te, Controller as te } from "react-hook-form";
9
9
  import { z as me } from "zod";
10
- var z = /* @__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))(z || {}), 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 || {}), it = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(it || {}), ye = /* @__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))(ye || {}), fe = /* @__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))(fe || {}), ot = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(ot || {}), lt = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(lt || {}), le = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(le || {}), ct = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(ct || {}), Se = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Se || {}), dt = /* @__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))(dt || {}), ut = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(ut || {}), mt = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(mt || {}), De = /* @__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))(De || {}), ht = /* @__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))(ht || {}), pt = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(pt || {}), ae = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(ae || {}), gt = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(gt || {});
11
- const yt = [
10
+ var $ = /* @__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))($ || {}), 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 || {}), it = /* @__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))(it || {}), ot = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(ot || {}), ye = /* @__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))(ye || {}), fe = /* @__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))(fe || {}), lt = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(lt || {}), ct = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(ct || {}), le = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(le || {}), dt = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(dt || {}), Se = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Se || {}), ut = /* @__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))(ut || {}), mt = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(mt || {}), ht = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(ht || {}), De = /* @__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))(De || {}), pt = /* @__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))(pt || {}), gt = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(gt || {}), ae = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(ae || {}), yt = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(yt || {});
11
+ const Oe = [
12
12
  { value: "EN", label: "English" },
13
13
  { value: "DE", label: "German" },
14
14
  { value: "FR", label: "French" },
@@ -64,7 +64,7 @@ const yt = [
64
64
  "occupation",
65
65
  "taxNumber",
66
66
  "externalRefId"
67
- ], Oe = {
67
+ ], Be = {
68
68
  firstName: { label: "First Name", type: "text" },
69
69
  lastName: { label: "Last Name", type: "text" },
70
70
  title: { label: "Title", type: "text" },
@@ -200,7 +200,7 @@ class xt {
200
200
  U(this, "axiosInstance");
201
201
  U(this, "endpointBuilder");
202
202
  U(this, "config");
203
- this.config = { ...bt, ...e }, this.endpointBuilder = new vt(this.config.endpoints), this.axiosInstance = tt.create({
203
+ this.config = { ...bt, ...e }, this.endpointBuilder = new vt(this.config.endpoints), this.axiosInstance = rt.create({
204
204
  baseURL: this.config.baseUrl,
205
205
  timeout: this.config.timeout,
206
206
  headers: {
@@ -930,7 +930,7 @@ class Ot {
930
930
  ...(e = a.darkMode) == null ? void 0 : e.colors,
931
931
  ...r.result.darkMode.colors
932
932
  }
933
- }), r.result.applicantFormVisibleFields && r.result.applicantFormVisibleFields.length > 0 && (a.applicantFormVisibleFields = r.result.applicantFormVisibleFields), r.result.applicantFormRequiredFields && r.result.applicantFormRequiredFields.length > 0 && (a.applicantFormRequiredFields = r.result.applicantFormRequiredFields), a;
933
+ }), r.result.applicantFormVisibleFields && r.result.applicantFormVisibleFields.length > 0 && (a.applicantFormVisibleFields = r.result.applicantFormVisibleFields), r.result.applicantFormRequiredFields && r.result.applicantFormRequiredFields.length > 0 && (a.applicantFormRequiredFields = r.result.applicantFormRequiredFields), r.result.allowedLanguages && r.result.allowedLanguages.length > 0 && (a.allowedLanguages = r.result.allowedLanguages), a;
934
934
  } catch (r) {
935
935
  return console.warn("[ThemeService] Failed to fetch theme configuration:", r), we(Z.Default);
936
936
  }
@@ -1182,7 +1182,7 @@ class $t {
1182
1182
  async loadStepData(e, r) {
1183
1183
  const a = this.getHandler(e);
1184
1184
  if (!a)
1185
- throw new Error(`No handler registered for step action: ${z[e]}`);
1185
+ throw new Error(`No handler registered for step action: ${$[e]}`);
1186
1186
  return a.loadData(r);
1187
1187
  }
1188
1188
  /**
@@ -1191,7 +1191,7 @@ class $t {
1191
1191
  async submitStepData(e, r) {
1192
1192
  const a = this.getHandler(e);
1193
1193
  if (!a)
1194
- throw new Error(`No handler registered for step action: ${z[e]}`);
1194
+ throw new Error(`No handler registered for step action: ${$[e]}`);
1195
1195
  return a.submitData(r);
1196
1196
  }
1197
1197
  }
@@ -1205,47 +1205,47 @@ class qt {
1205
1205
  * Register all step handlers
1206
1206
  */
1207
1207
  registerStepHandlers() {
1208
- this.stepRouter.registerHandler(z.Questionaries, {
1208
+ this.stepRouter.registerHandler($.Questionaries, {
1209
1209
  loadData: (e) => this.questionnaireService.getQuestionnaire(e),
1210
1210
  submitData: async (e) => {
1211
1211
  await this.questionnaireService.fillQuestionnaire(e);
1212
1212
  }
1213
- }), this.stepRouter.registerHandler(z.UploadDocument, {
1213
+ }), this.stepRouter.registerHandler($.UploadDocument, {
1214
1214
  loadData: (e) => this.uploadDocumentService.getUploadDocument(e),
1215
1215
  submitData: (e) => this.uploadDocumentService.fillUploadDocument(e)
1216
- }), this.stepRouter.registerHandler(z.AppropriatenessTest, {
1216
+ }), this.stepRouter.registerHandler($.AppropriatenessTest, {
1217
1217
  loadData: (e) => this.appropriatenessTestService.getAppropriatenessTest(e),
1218
1218
  submitData: async (e) => {
1219
1219
  await this.appropriatenessTestService.fillAppropriatenessTest(e);
1220
1220
  }
1221
- }), this.stepRouter.registerHandler(z.Overview, {
1221
+ }), this.stepRouter.registerHandler($.Overview, {
1222
1222
  loadData: (e) => this.overviewService.getOverviewData(e),
1223
1223
  submitData: (e) => this.overviewService.passOverview(e.applicantId)
1224
- }), this.stepRouter.registerHandler(z.RiskScoring, {
1224
+ }), this.stepRouter.registerHandler($.RiskScoring, {
1225
1225
  loadData: (e) => this.riskScoringService.getRiskCriterias(e),
1226
1226
  submitData: async (e) => {
1227
1227
  await this.riskScoringService.submitRiskScoring(e);
1228
1228
  }
1229
- }), this.stepRouter.registerHandler(z.IdentitySdk, {
1229
+ }), this.stepRouter.registerHandler($.IdentitySdk, {
1230
1230
  loadData: async (e) => ({
1231
1231
  applicantId: e,
1232
1232
  message: "Identity verification required"
1233
1233
  }),
1234
1234
  submitData: async () => {
1235
1235
  }
1236
- }), this.stepRouter.registerHandler(z.InvestorCategorization, {
1236
+ }), this.stepRouter.registerHandler($.InvestorCategorization, {
1237
1237
  loadData: (e) => this.investorCategorizationService.getInvestorCategorization(e),
1238
1238
  submitData: async (e) => {
1239
1239
  await this.investorCategorizationService.setInvestorCategorization(e);
1240
1240
  }
1241
- }), this.stepRouter.registerHandler(z.ManualReview, {
1241
+ }), this.stepRouter.registerHandler($.ManualReview, {
1242
1242
  loadData: async (e) => ({
1243
1243
  applicantId: e,
1244
1244
  message: "Your application is under manual review"
1245
1245
  }),
1246
1246
  submitData: async () => {
1247
1247
  }
1248
- }), this.stepRouter.registerHandler(z.AdditionalData, {
1248
+ }), this.stepRouter.registerHandler($.AdditionalData, {
1249
1249
  loadData: async (e) => ({
1250
1250
  applicantId: e,
1251
1251
  message: "Additional data required"
@@ -1339,7 +1339,7 @@ class qt {
1339
1339
  return this.stepRouter;
1340
1340
  }
1341
1341
  }
1342
- function Ue(t, e) {
1342
+ function Ke(t, e) {
1343
1343
  return new Promise((r, a) => {
1344
1344
  if (e && document.getElementById(e)) {
1345
1345
  r();
@@ -1366,7 +1366,7 @@ class _t {
1366
1366
  * Load Sumsub SDK
1367
1367
  */
1368
1368
  async loadSDK() {
1369
- await Ue(
1369
+ await Ke(
1370
1370
  "https://cdn.sumsub.com/websdk/v2/production/websdk.js",
1371
1371
  "sumsub-sdk"
1372
1372
  );
@@ -1421,7 +1421,7 @@ class jt {
1421
1421
  * Load Onfido SDK
1422
1422
  */
1423
1423
  async loadSDK() {
1424
- await Ue(
1424
+ await Ke(
1425
1425
  "https://sdk.onfido.com/v12.0.0/onfido.min.js",
1426
1426
  "onfido-sdk"
1427
1427
  );
@@ -1767,7 +1767,8 @@ class Kt {
1767
1767
  }
1768
1768
  } : ee.darkMode,
1769
1769
  applicantFormVisibleFields: e.applicantFormVisibleFields,
1770
- applicantFormRequiredFields: e.applicantFormRequiredFields
1770
+ applicantFormRequiredFields: e.applicantFormRequiredFields,
1771
+ allowedLanguages: e.allowedLanguages
1771
1772
  };
1772
1773
  }
1773
1774
  /**
@@ -1795,7 +1796,7 @@ class Kt {
1795
1796
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1796
1797
  }
1797
1798
  }
1798
- const Ke = rt(null), $r = ({ config: t, children: e }) => {
1799
+ const He = nt(null), $r = ({ config: t, children: e }) => {
1799
1800
  const [r, a] = S(null), s = re.useRef(!1), i = re.useRef(!1), l = Re(() => {
1800
1801
  const d = new xt(t), u = new wt(d), y = new kt(d), v = new Nt(d), g = new St(d), w = new Ct(d), h = new At(d), x = new Et(d), p = new It(d), m = new Rt(d), A = new Ot(d), C = new Kt();
1801
1802
  return {
@@ -1848,10 +1849,10 @@ const Ke = rt(null), $r = ({ config: t, children: e }) => {
1848
1849
  }
1849
1850
  })(), () => {
1850
1851
  l.themeManager.cleanup();
1851
- }), []), /* @__PURE__ */ n(Ke.Provider, { value: c, children: e });
1852
+ }), []), /* @__PURE__ */ n(He.Provider, { value: c, children: e });
1852
1853
  };
1853
1854
  function oe() {
1854
- const t = nt(Ke);
1855
+ const t = at(He);
1855
1856
  if (!t)
1856
1857
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
1857
1858
  return t;
@@ -2975,7 +2976,7 @@ const ar = ({
2975
2976
  ] })
2976
2977
  );
2977
2978
  ir.displayName = "PhoneInput";
2978
- const Be = (t, e, r) => {
2979
+ const ze = (t, e, r) => {
2979
2980
  if (t && "reportValidity" in t) {
2980
2981
  const a = Fe(r, e);
2981
2982
  t.setCustomValidity(a && a.message || ""), t.reportValidity();
@@ -2983,9 +2984,9 @@ const Be = (t, e, r) => {
2983
2984
  }, Pe = (t, e) => {
2984
2985
  for (const r in e.fields) {
2985
2986
  const a = e.fields[r];
2986
- a && a.ref && "reportValidity" in a.ref ? Be(a.ref, r, t) : a && a.refs && a.refs.forEach((s) => Be(s, r, t));
2987
+ a && a.ref && "reportValidity" in a.ref ? ze(a.ref, r, t) : a && a.refs && a.refs.forEach((s) => ze(s, r, t));
2987
2988
  }
2988
- }, ze = (t, e) => {
2989
+ }, $e = (t, e) => {
2989
2990
  e.shouldUseNativeValidation && Pe(t, e);
2990
2991
  const r = {};
2991
2992
  for (const a in t) {
@@ -2997,13 +2998,13 @@ const Be = (t, e, r) => {
2997
2998
  }
2998
2999
  return r;
2999
3000
  }, or = (t, e) => {
3000
- const r = $e(e);
3001
- return t.some((a) => $e(a).match(`^${r}\\.\\d+`));
3001
+ const r = qe(e);
3002
+ return t.some((a) => qe(a).match(`^${r}\\.\\d+`));
3002
3003
  };
3003
- function $e(t) {
3004
+ function qe(t) {
3004
3005
  return t.replace(/\]|\[/g, "");
3005
3006
  }
3006
- function He(t, e, r) {
3007
+ function Ve(t, e, r) {
3007
3008
  function a(c, d) {
3008
3009
  var u;
3009
3010
  Object.defineProperty(c, "_zod", {
@@ -3039,18 +3040,18 @@ class lr extends Error {
3039
3040
  }
3040
3041
  }
3041
3042
  const cr = {};
3042
- function Ve(t) {
3043
+ function Ye(t) {
3043
3044
  return cr;
3044
3045
  }
3045
3046
  function dr(t, e) {
3046
3047
  return typeof e == "bigint" ? e.toString() : e;
3047
3048
  }
3048
- const Ye = Error.captureStackTrace ? Error.captureStackTrace : (...t) => {
3049
+ const We = Error.captureStackTrace ? Error.captureStackTrace : (...t) => {
3049
3050
  };
3050
3051
  function ke(t) {
3051
3052
  return typeof t == "string" ? t : t == null ? void 0 : t.message;
3052
3053
  }
3053
- function We(t, e, r) {
3054
+ function Qe(t, e, r) {
3054
3055
  var s, i, l, c, d, u;
3055
3056
  const a = { ...t, path: t.path ?? [] };
3056
3057
  if (!t.message) {
@@ -3059,7 +3060,7 @@ function We(t, e, r) {
3059
3060
  }
3060
3061
  return delete a.inst, delete a.continue, e != null && e.reportInput || delete a.input, a;
3061
3062
  }
3062
- const Qe = (t, e) => {
3063
+ const Ge = (t, e) => {
3063
3064
  t.name = "$ZodError", Object.defineProperty(t, "_zod", {
3064
3065
  value: t._zod,
3065
3066
  enumerable: !1
@@ -3076,25 +3077,25 @@ const Qe = (t, e) => {
3076
3077
  value: () => t.message,
3077
3078
  enumerable: !1
3078
3079
  });
3079
- }, ur = He("$ZodError", Qe), Ge = He("$ZodError", Qe, { Parent: Error }), mr = (t) => (e, r, a, s) => {
3080
+ }, ur = Ve("$ZodError", Ge), Ze = Ve("$ZodError", Ge, { Parent: Error }), mr = (t) => (e, r, a, s) => {
3080
3081
  const i = a ? Object.assign(a, { async: !1 }) : { async: !1 }, l = e._zod.run({ value: r, issues: [] }, i);
3081
3082
  if (l instanceof Promise)
3082
3083
  throw new lr();
3083
3084
  if (l.issues.length) {
3084
- const c = new ((s == null ? void 0 : s.Err) ?? t)(l.issues.map((d) => We(d, i, Ve())));
3085
- throw Ye(c, s == null ? void 0 : s.callee), c;
3085
+ const c = new ((s == null ? void 0 : s.Err) ?? t)(l.issues.map((d) => Qe(d, i, Ye())));
3086
+ throw We(c, s == null ? void 0 : s.callee), c;
3086
3087
  }
3087
3088
  return l.value;
3088
- }, hr = /* @__PURE__ */ mr(Ge), pr = (t) => async (e, r, a, s) => {
3089
+ }, hr = /* @__PURE__ */ mr(Ze), pr = (t) => async (e, r, a, s) => {
3089
3090
  const i = a ? Object.assign(a, { async: !0 }) : { async: !0 };
3090
3091
  let l = e._zod.run({ value: r, issues: [] }, i);
3091
3092
  if (l instanceof Promise && (l = await l), l.issues.length) {
3092
- const c = new ((s == null ? void 0 : s.Err) ?? t)(l.issues.map((d) => We(d, i, Ve())));
3093
- throw Ye(c, s == null ? void 0 : s.callee), c;
3093
+ const c = new ((s == null ? void 0 : s.Err) ?? t)(l.issues.map((d) => Qe(d, i, Ye())));
3094
+ throw We(c, s == null ? void 0 : s.callee), c;
3094
3095
  }
3095
3096
  return l.value;
3096
- }, gr = /* @__PURE__ */ pr(Ge);
3097
- function qe(t, e) {
3097
+ }, gr = /* @__PURE__ */ pr(Ze);
3098
+ function _e(t, e) {
3098
3099
  try {
3099
3100
  var r = t();
3100
3101
  } catch (a) {
@@ -3115,7 +3116,7 @@ function yr(t, e) {
3115
3116
  });
3116
3117
  }), e) {
3117
3118
  var d = r[l].types, u = d && d[a.code];
3118
- r[l] = je(l, e, r, s, u ? [].concat(u, a.message) : a.message);
3119
+ r[l] = Ue(l, e, r, s, u ? [].concat(u, a.message) : a.message);
3119
3120
  }
3120
3121
  t.shift();
3121
3122
  }
@@ -3134,25 +3135,25 @@ function fr(t, e) {
3134
3135
  });
3135
3136
  }), e) {
3136
3137
  var d = r[l].types, u = d && d[a.code];
3137
- r[l] = je(l, e, r, s, u ? [].concat(u, a.message) : a.message);
3138
+ r[l] = Ue(l, e, r, s, u ? [].concat(u, a.message) : a.message);
3138
3139
  }
3139
3140
  t.shift();
3140
3141
  }
3141
3142
  return r;
3142
3143
  }
3143
- function Ze(t, e, r) {
3144
+ function Je(t, e, r) {
3144
3145
  if (r === void 0 && (r = {}), function(a) {
3145
3146
  return "_def" in a && typeof a._def == "object" && "typeName" in a._def;
3146
3147
  }(t)) return function(a, s, i) {
3147
3148
  try {
3148
- return Promise.resolve(qe(function() {
3149
+ return Promise.resolve(_e(function() {
3149
3150
  return Promise.resolve(t[r.mode === "sync" ? "parse" : "parseAsync"](a, e)).then(function(l) {
3150
3151
  return i.shouldUseNativeValidation && Pe({}, i), { errors: {}, values: r.raw ? Object.assign({}, a) : l };
3151
3152
  });
3152
3153
  }, function(l) {
3153
3154
  if (function(c) {
3154
3155
  return Array.isArray(c == null ? void 0 : c.issues);
3155
- }(l)) return { values: {}, errors: ze(yr(l.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
3156
+ }(l)) return { values: {}, errors: $e(yr(l.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
3156
3157
  throw l;
3157
3158
  }));
3158
3159
  } catch (l) {
@@ -3163,14 +3164,14 @@ function Ze(t, e, r) {
3163
3164
  return "_zod" in a && typeof a._zod == "object";
3164
3165
  }(t)) return function(a, s, i) {
3165
3166
  try {
3166
- return Promise.resolve(qe(function() {
3167
+ return Promise.resolve(_e(function() {
3167
3168
  return Promise.resolve((r.mode === "sync" ? hr : gr)(t, a, e)).then(function(l) {
3168
3169
  return i.shouldUseNativeValidation && Pe({}, i), { errors: {}, values: r.raw ? Object.assign({}, a) : l };
3169
3170
  });
3170
3171
  }, function(l) {
3171
3172
  if (function(c) {
3172
3173
  return c instanceof ur;
3173
- }(l)) return { values: {}, errors: ze(fr(l.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
3174
+ }(l)) return { values: {}, errors: $e(fr(l.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
3174
3175
  throw l;
3175
3176
  }));
3176
3177
  } catch (l) {
@@ -3241,7 +3242,7 @@ const Wr = me.any(), kr = ({
3241
3242
  handleSubmit: v,
3242
3243
  formState: { errors: g }
3243
3244
  } = Te({
3244
- resolver: u ? Ze(u) : void 0,
3245
+ resolver: u ? Je(u) : void 0,
3245
3246
  defaultValues: d
3246
3247
  }), w = async (h) => {
3247
3248
  if (a)
@@ -3489,7 +3490,7 @@ const Wr = me.any(), kr = ({
3489
3490
  handleSubmit: w,
3490
3491
  formState: { errors: h }
3491
3492
  } = Te({
3492
- resolver: v ? Ze(v) : void 0,
3493
+ resolver: v ? Je(v) : void 0,
3493
3494
  defaultValues: y
3494
3495
  });
3495
3496
  re.useEffect(() => {
@@ -4080,7 +4081,7 @@ Failed to reload test data. Please refresh the page.`);
4080
4081
  onComplete: e,
4081
4082
  onBack: r
4082
4083
  }) => {
4083
- var H, b, P, $;
4084
+ var H, b, P, q;
4084
4085
  const { applicantService: a, baseInformationService: s, config: i } = oe(), { identityData: l, provider: c, token: d, isLoading: u, error: y, requestIdentity: v, restartIdentity: g } = tr(t), [w, h] = S(null), [x, p] = S(null), [m, A] = S([]), [C, N] = S(!0), [B, L] = S(!1), [F, k] = S(null), [T, D] = S(!1), G = re.useRef(!1), K = Te({
4085
4086
  defaultValues: {
4086
4087
  street: "",
@@ -4095,25 +4096,25 @@ Failed to reload test data. Please refresh the page.`);
4095
4096
  Q(() => {
4096
4097
  (async () => {
4097
4098
  try {
4098
- const [f, _] = await Promise.all([
4099
+ const [f, z] = await Promise.all([
4099
4100
  a.getApplicantData(t),
4100
4101
  s.getCountries("", "en")
4101
4102
  ]);
4102
4103
  p(f);
4103
- const W = /* @__PURE__ */ new Set(), X = _.filter((he) => {
4104
+ const W = /* @__PURE__ */ new Set(), X = z.filter((he) => {
4104
4105
  const Ae = he.abbreviation3 || he.abbreviation;
4105
4106
  return !Ae || W.has(Ae) ? !1 : (W.add(Ae), !0);
4106
4107
  });
4107
4108
  A(X);
4108
- const q = f.applicantRequestData;
4109
+ const _ = f.applicantRequestData;
4109
4110
  if (K.reset({
4110
- street: (q == null ? void 0 : q.street) || "",
4111
- streetNumber: (q == null ? void 0 : q.streetNumber) || "",
4112
- city: (q == null ? void 0 : q.city) || "",
4113
- zip: (q == null ? void 0 : q.zip) || "",
4114
- country: (q == null ? void 0 : q.country) || "",
4115
- nationality: (q == null ? void 0 : q.nationality) || "",
4116
- phonenumber: (q == null ? void 0 : q.phonenumber) || ""
4111
+ street: (_ == null ? void 0 : _.street) || "",
4112
+ streetNumber: (_ == null ? void 0 : _.streetNumber) || "",
4113
+ city: (_ == null ? void 0 : _.city) || "",
4114
+ zip: (_ == null ? void 0 : _.zip) || "",
4115
+ country: (_ == null ? void 0 : _.country) || "",
4116
+ nationality: (_ == null ? void 0 : _.nationality) || "",
4117
+ phonenumber: (_ == null ? void 0 : _.phonenumber) || ""
4117
4118
  }), f.kycRecords && f.kycRecords.length > 0 && f.kycRecords[0].providerTokenObject !== null && !G.current) {
4118
4119
  console.log("[Identity] Found existing identity verification, auto-requesting..."), G.current = !0;
4119
4120
  try {
@@ -4182,15 +4183,15 @@ Failed to reload test data. Please refresh the page.`);
4182
4183
  if (I === le.SardinAI) {
4183
4184
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), k(null);
4184
4185
  try {
4185
- const f = be.parseProviderConfig(c, d, i), _ = be.createProvider(c, f);
4186
- _.initialize().then(() => {
4187
- console.log("[SardinAI] Risk SDK initialized successfully"), h(_), setTimeout(() => {
4186
+ const f = be.parseProviderConfig(c, d, i), z = be.createProvider(c, f);
4187
+ z.initialize().then(() => {
4188
+ console.log("[SardinAI] Risk SDK initialized successfully"), h(z), setTimeout(() => {
4188
4189
  e == null || e();
4189
4190
  }, 2e3);
4190
4191
  }).catch((W) => {
4191
- var q;
4192
+ var _;
4192
4193
  console.error("[SardinAI] Failed to initialize:", W);
4193
- const X = ((q = W.message) == null ? void 0 : q.toLowerCase()) || "";
4194
+ const X = ((_ = W.message) == null ? void 0 : _.toLowerCase()) || "";
4194
4195
  X.includes("expired") || X.includes("invalid") || X.includes("401") || X.includes("400") ? (D(!0), k("Session expired or invalid. Please restart verification.")) : k(`Failed to initialize: ${W.message}`);
4195
4196
  });
4196
4197
  } catch (f) {
@@ -4200,15 +4201,15 @@ Failed to reload test data. Please refresh the page.`);
4200
4201
  }
4201
4202
  try {
4202
4203
  k(null);
4203
- const f = be.parseProviderConfig(c, d, i), _ = be.createProvider(c, f);
4204
- I === le.Sumsub ? (_.initialize("identity-container").catch((W) => {
4204
+ const f = be.parseProviderConfig(c, d, i), z = be.createProvider(c, f);
4205
+ I === le.Sumsub ? (z.initialize("identity-container").catch((W) => {
4205
4206
  var X;
4206
4207
  console.error("[Sumsub] Initialization error:", W), k(`Failed to initialize: ${W.message}`), (X = W.message) != null && X.toLowerCase().includes("expired") && D(!0);
4207
- }), _.onComplete && _.onComplete(() => {
4208
+ }), z.onComplete && z.onComplete(() => {
4208
4209
  e == null || e();
4209
- })) : I === le.Onfido && _.initialize("identity-container").catch((W) => {
4210
+ })) : I === le.Onfido && z.initialize("identity-container").catch((W) => {
4210
4211
  console.error("[Onfido] Initialization error:", W), k(`Failed to initialize: ${W.message}`);
4211
- }), h(_);
4212
+ }), h(z);
4212
4213
  } catch (f) {
4213
4214
  console.error("[Identity] Provider setup error:", f), k(`Setup error: ${f.message}`);
4214
4215
  }
@@ -4320,10 +4321,10 @@ Failed to reload test data. Please refresh the page.`);
4320
4321
  allow: "camera; microphone; geolocation",
4321
4322
  title: "Identity Verification",
4322
4323
  onLoad: (f) => {
4323
- var _, W, X;
4324
+ var z, W, X;
4324
4325
  console.log("[Identity] Iframe loaded");
4325
4326
  try {
4326
- const q = f.target, Ce = q.contentDocument || ((_ = q.contentWindow) == null ? void 0 : _.document);
4327
+ const _ = f.target, Ce = _.contentDocument || ((z = _.contentWindow) == null ? void 0 : z.document);
4327
4328
  if (Ce) {
4328
4329
  const he = ((X = (W = Ce.body) == null ? void 0 : W.textContent) == null ? void 0 : X.toLowerCase()) || "";
4329
4330
  (he.includes("expired") || he.includes("invalid") || he.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), D(!0), k("Your verification link has expired."));
@@ -4376,7 +4377,7 @@ Failed to reload test data. Please refresh the page.`);
4376
4377
  ] }),
4377
4378
  /* @__PURE__ */ o("div", { children: [
4378
4379
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4379
- /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: (($ = x == null ? void 0 : x.applicantRequestData) == null ? void 0 : $.dateOfBirth) || "Not provided" })
4380
+ /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: ((q = x == null ? void 0 : x.applicantRequestData) == null ? void 0 : q.dateOfBirth) || "Not provided" })
4380
4381
  ] })
4381
4382
  ] }),
4382
4383
  /* @__PURE__ */ o("div", { className: "space-y-4", children: [
@@ -4476,7 +4477,7 @@ Failed to reload test data. Please refresh the page.`);
4476
4477
  /* @__PURE__ */ n(j, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
4477
4478
  ] })
4478
4479
  ] }) });
4479
- }, _e = ({
4480
+ }, je = ({
4480
4481
  kycStatus: t,
4481
4482
  reviewStatus: e,
4482
4483
  workflowResult: r,
@@ -4611,7 +4612,7 @@ Failed to reload test data. Please refresh the page.`);
4611
4612
  ] }),
4612
4613
  /* @__PURE__ */ o(ie, { className: "flex justify-center gap-4", children: [
4613
4614
  c.type === "success" && s && /* @__PURE__ */ n(j, { onClick: s, size: "lg", children: "Continue" }),
4614
- c.type === "error" && /* @__PURE__ */ o(at, { children: [
4615
+ c.type === "error" && /* @__PURE__ */ o(st, { children: [
4615
4616
  i && /* @__PURE__ */ n(j, { variant: "outline", onClick: i, children: "Contact Support" }),
4616
4617
  s && /* @__PURE__ */ n(j, { onClick: s, children: "Try Again" })
4617
4618
  ] }),
@@ -4633,7 +4634,7 @@ Failed to reload test data. Please refresh the page.`);
4633
4634
  console.warn("[Logo] Failed to load logo:", t.url), r.target.style.display = "none";
4634
4635
  }
4635
4636
  }
4636
- ) }), Je = ({
4637
+ ) }), Xe = ({
4637
4638
  title: t,
4638
4639
  subtitle: e,
4639
4640
  className: r = ""
@@ -4669,13 +4670,13 @@ Failed to reload test data. Please refresh the page.`);
4669
4670
  const N = e || ((E = s.applicantForm) == null ? void 0 : E.externalRefId) || "", B = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"], L = re.useMemo(() => {
4670
4671
  const b = new Set(B), P = l == null ? void 0 : l.applicantFormRequiredFields;
4671
4672
  if (P && P.length > 0)
4672
- for (const $ of P)
4673
- b.add($);
4673
+ for (const q of P)
4674
+ b.add(q);
4674
4675
  return Array.from(b);
4675
4676
  }, [l == null ? void 0 : l.applicantFormRequiredFields]), F = re.useMemo(() => {
4676
- var $;
4677
+ var q;
4677
4678
  let b;
4678
- ($ = s.applicantForm) != null && $.visibleFields ? b = s.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? b = l.applicantFormVisibleFields : b = ft;
4679
+ (q = s.applicantForm) != null && q.visibleFields ? b = s.applicantForm.visibleFields : l != null && l.applicantFormVisibleFields && l.applicantFormVisibleFields.length > 0 ? b = l.applicantFormVisibleFields : b = ft;
4679
4680
  const P = new Set(b);
4680
4681
  for (const I of B)
4681
4682
  P.add(I);
@@ -4715,10 +4716,10 @@ Failed to reload test data. Please refresh the page.`);
4715
4716
  }
4716
4717
  m.current = !0, g(!0);
4717
4718
  try {
4718
- const P = await i.getCountries("", s.locale || "en"), $ = /* @__PURE__ */ new Set(), I = P.map((f) => ({
4719
+ const P = await i.getCountries("", s.locale || "en"), q = /* @__PURE__ */ new Set(), I = P.map((f) => ({
4719
4720
  value: f.abbreviation3 || f.abbreviation,
4720
4721
  label: f.name
4721
- })).filter((f) => !f.value || $.has(f.value) ? !1 : ($.add(f.value), !0));
4722
+ })).filter((f) => !f.value || q.has(f.value) ? !1 : (q.add(f.value), !0));
4722
4723
  y(I), A.current = !0;
4723
4724
  } catch (P) {
4724
4725
  console.error("Failed to load countries:", P);
@@ -4728,7 +4729,7 @@ Failed to reload test data. Please refresh the page.`);
4728
4729
  })();
4729
4730
  }, []);
4730
4731
  const D = (b, P) => {
4731
- T(($) => ({ ...$, [b]: P }));
4732
+ T((q) => ({ ...q, [b]: P }));
4732
4733
  }, G = async (b) => {
4733
4734
  var P;
4734
4735
  b.preventDefault(), h(!0), p(null);
@@ -4738,80 +4739,88 @@ Failed to reload test data. Please refresh the page.`);
4738
4739
  return;
4739
4740
  }
4740
4741
  for (const f of L) {
4741
- const _ = k[f];
4742
- if (_ == null || _ === "" || Array.isArray(_) && _.length === 0) {
4743
- const X = ((P = Oe[f]) == null ? void 0 : P.label) || f;
4742
+ const z = k[f];
4743
+ if (z == null || z === "" || Array.isArray(z) && z.length === 0) {
4744
+ const X = ((P = Be[f]) == null ? void 0 : P.label) || f;
4744
4745
  p(`${X} is required.`), h(!1);
4745
4746
  return;
4746
4747
  }
4747
4748
  }
4748
- const $ = {
4749
+ const q = {
4749
4750
  workflowKey: k.workflowKey,
4750
4751
  externalRefId: k.externalRefId.trim()
4751
4752
  // Always include, never empty
4752
4753
  };
4753
4754
  F.forEach((f) => {
4754
4755
  if (f === "externalRefId") return;
4755
- const _ = k[f];
4756
- _ != null && _ !== "" && !(Array.isArray(_) && _.length === 0) && ($[f] = _);
4757
- }), console.log("Creating applicant with data:", $);
4756
+ const z = k[f];
4757
+ z != null && z !== "" && !(Array.isArray(z) && z.length === 0) && (q[f] = z);
4758
+ }), console.log("Creating applicant with data:", q);
4758
4759
  const I = await c(
4759
- $
4760
+ q
4760
4761
  );
4761
4762
  console.log("Applicant created:", I), r(I.applicantId);
4762
- } catch ($) {
4763
- console.error("Error creating applicant:", $), p($.message || "Failed to create applicant");
4763
+ } catch (q) {
4764
+ console.error("Error creating applicant:", q), p(q.message || "Failed to create applicant");
4764
4765
  } finally {
4765
4766
  h(!1);
4766
4767
  }
4767
4768
  }, K = (b) => {
4768
4769
  var I;
4769
- const P = Oe[b], $ = L.includes(b);
4770
+ const P = Be[b], q = L.includes(b);
4770
4771
  switch (P.type) {
4771
4772
  case "select":
4772
- return b === "country" || b === "nationality" || b === "taxCountry" || b === "countryOfBirth" ? /* @__PURE__ */ n(
4773
- ge,
4774
- {
4775
- label: P.label,
4776
- value: k[b] || "",
4777
- onChange: (f) => D(b, f.target.value),
4778
- options: [
4779
- { value: "", label: `Select ${P.label.toLowerCase()}...` },
4780
- ...u
4781
- ],
4782
- disabled: v,
4783
- required: $
4784
- },
4785
- b
4786
- ) : b === "salutation" ? /* @__PURE__ */ n(
4787
- ge,
4788
- {
4789
- label: P.label,
4790
- value: ((I = k[b]) == null ? void 0 : I.toString()) || "",
4791
- onChange: (f) => D(b, f.target.value ? Number(f.target.value) : null),
4792
- options: [
4793
- { value: "", label: "Select salutation..." },
4794
- { value: Se.Male.toString(), label: "Male" },
4795
- { value: Se.Female.toString(), label: "Female" },
4796
- { value: Se.Other.toString(), label: "Other" }
4797
- ],
4798
- required: $
4799
- },
4800
- b
4801
- ) : b === "defaultLanguage" ? /* @__PURE__ */ n(
4802
- ge,
4803
- {
4804
- label: P.label,
4805
- value: k[b] || "",
4806
- onChange: (f) => D(b, f.target.value),
4807
- options: [
4808
- { value: "", label: "Select language..." },
4809
- ...yt
4810
- ],
4811
- required: $
4812
- },
4813
- b
4814
- ) : null;
4773
+ if (b === "country" || b === "nationality" || b === "taxCountry" || b === "countryOfBirth")
4774
+ return /* @__PURE__ */ n(
4775
+ ge,
4776
+ {
4777
+ label: P.label,
4778
+ value: k[b] || "",
4779
+ onChange: (f) => D(b, f.target.value),
4780
+ options: [
4781
+ { value: "", label: `Select ${P.label.toLowerCase()}...` },
4782
+ ...u
4783
+ ],
4784
+ disabled: v,
4785
+ required: q
4786
+ },
4787
+ b
4788
+ );
4789
+ if (b === "salutation")
4790
+ return /* @__PURE__ */ n(
4791
+ ge,
4792
+ {
4793
+ label: P.label,
4794
+ value: ((I = k[b]) == null ? void 0 : I.toString()) || "",
4795
+ onChange: (f) => D(b, f.target.value ? Number(f.target.value) : null),
4796
+ options: [
4797
+ { value: "", label: "Select salutation..." },
4798
+ { value: Se.Male.toString(), label: "Male" },
4799
+ { value: Se.Female.toString(), label: "Female" },
4800
+ { value: Se.Other.toString(), label: "Other" }
4801
+ ],
4802
+ required: q
4803
+ },
4804
+ b
4805
+ );
4806
+ if (b === "defaultLanguage") {
4807
+ const f = l != null && l.allowedLanguages && l.allowedLanguages.length > 0 ? Oe.filter((z) => l.allowedLanguages.includes(z.value)) : Oe;
4808
+ return /* @__PURE__ */ n(
4809
+ ge,
4810
+ {
4811
+ label: P.label,
4812
+ value: k[b] || "",
4813
+ onChange: (z) => D(b, z.target.value),
4814
+ options: [
4815
+ { value: "", label: "Select language..." },
4816
+ ...f
4817
+ ],
4818
+ required: q
4819
+ },
4820
+ b
4821
+ );
4822
+ }
4823
+ return null;
4815
4824
  case "multiselect":
4816
4825
  return b === "otherNationality" ? /* @__PURE__ */ n(
4817
4826
  ar,
@@ -4822,7 +4831,7 @@ Failed to reload test data. Please refresh the page.`);
4822
4831
  options: u,
4823
4832
  placeholder: "Select other nationalities...",
4824
4833
  disabled: v,
4825
- required: $
4834
+ required: q
4826
4835
  },
4827
4836
  b
4828
4837
  ) : null;
@@ -4834,7 +4843,7 @@ Failed to reload test data. Please refresh the page.`);
4834
4843
  label: P.label,
4835
4844
  value: k[b] || "",
4836
4845
  onChange: (f) => D(b, f.target.value),
4837
- required: $
4846
+ required: q
4838
4847
  },
4839
4848
  b
4840
4849
  );
@@ -4846,7 +4855,7 @@ Failed to reload test data. Please refresh the page.`);
4846
4855
  label: P.label,
4847
4856
  value: k[b] || "",
4848
4857
  onChange: (f) => D(b, f.target.value),
4849
- required: $
4858
+ required: q
4850
4859
  },
4851
4860
  b
4852
4861
  );
@@ -4858,7 +4867,7 @@ Failed to reload test data. Please refresh the page.`);
4858
4867
  label: P.label,
4859
4868
  value: k[b] || "",
4860
4869
  onChange: (f) => D(b, f.target.value),
4861
- required: $
4870
+ required: q
4862
4871
  },
4863
4872
  b
4864
4873
  );
@@ -4871,7 +4880,7 @@ Failed to reload test data. Please refresh the page.`);
4871
4880
  label: P.label,
4872
4881
  value: k[b] || "",
4873
4882
  onChange: (f) => D(b, f.target.value),
4874
- required: $
4883
+ required: q
4875
4884
  },
4876
4885
  b
4877
4886
  );
@@ -4882,7 +4891,7 @@ Failed to reload test data. Please refresh the page.`);
4882
4891
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
4883
4892
  ] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: G, children: /* @__PURE__ */ o(M, { children: [
4884
4893
  /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
4885
- Je,
4894
+ Xe,
4886
4895
  {
4887
4896
  title: "Create Applicant",
4888
4897
  subtitle: "Please fill in the required information to begin the KYC verification process."
@@ -4968,7 +4977,7 @@ Failed to reload test data. Please refresh the page.`);
4968
4977
  ] }) }) }) });
4969
4978
  if (i.status === ce.Finished || i.status === ce.OnHold)
4970
4979
  return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ n(
4971
- _e,
4980
+ je,
4972
4981
  {
4973
4982
  kycStatus: i.kycStatus,
4974
4983
  reviewStatus: i.reviewStatus,
@@ -4987,23 +4996,23 @@ Failed to reload test data. Please refresh the page.`);
4987
4996
  ] }) }) });
4988
4997
  const m = (N) => {
4989
4998
  switch (N) {
4990
- case z.Overview:
4999
+ case $.Overview:
4991
5000
  return "Overview";
4992
- case z.Questionaries:
5001
+ case $.Questionaries:
4993
5002
  return "Questionnaire";
4994
- case z.UploadDocument:
5003
+ case $.UploadDocument:
4995
5004
  return "Documents";
4996
- case z.IdentitySdk:
5005
+ case $.IdentitySdk:
4997
5006
  return "Identity";
4998
- case z.RiskScoring:
5007
+ case $.RiskScoring:
4999
5008
  return "Risk Assessment";
5000
- case z.InvestorCategorization:
5009
+ case $.InvestorCategorization:
5001
5010
  return "Investor Categorization";
5002
- case z.AppropriatenessTest:
5011
+ case $.AppropriatenessTest:
5003
5012
  return "Appropriateness Test";
5004
- case z.AdditionalData:
5013
+ case $.AdditionalData:
5005
5014
  return "Additional Data";
5006
- case z.ManualReview:
5015
+ case $.ManualReview:
5007
5016
  return "Review";
5008
5017
  default:
5009
5018
  return "";
@@ -5012,7 +5021,7 @@ Failed to reload test data. Please refresh the page.`);
5012
5021
  const N = c.filter((k) => k.visibility !== !1), B = N.findIndex((k) => k.order === l.order), L = B >= 0 ? B + 1 : 1, F = N.length;
5013
5022
  return /* @__PURE__ */ o("div", { className: "mb-6", children: [
5014
5023
  /* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
5015
- /* @__PURE__ */ n(Je, {}),
5024
+ /* @__PURE__ */ n(Xe, {}),
5016
5025
  /* @__PURE__ */ o(pe, { variant: i.status === 1 ? "info" : "success", children: [
5017
5026
  "Step ",
5018
5027
  L,
@@ -5060,24 +5069,24 @@ Failed to reload test data. Please refresh the page.`);
5060
5069
  onBack: l.order > 0 ? w : void 0
5061
5070
  };
5062
5071
  switch (l.action) {
5063
- case z.Questionaries:
5072
+ case $.Questionaries:
5064
5073
  return /* @__PURE__ */ n(kr, { ...N });
5065
- case z.UploadDocument:
5074
+ case $.UploadDocument:
5066
5075
  return /* @__PURE__ */ n(Nr, { ...N });
5067
- case z.Overview:
5076
+ case $.Overview:
5068
5077
  return /* @__PURE__ */ n(Sr, { ...N });
5069
- case z.IdentitySdk:
5078
+ case $.IdentitySdk:
5070
5079
  return /* @__PURE__ */ n(Ir, { ...N });
5071
- case z.RiskScoring:
5080
+ case $.RiskScoring:
5072
5081
  return /* @__PURE__ */ n(Cr, { ...N });
5073
- case z.AdditionalData:
5074
- case z.InvestorCategorization:
5082
+ case $.AdditionalData:
5083
+ case $.InvestorCategorization:
5075
5084
  return /* @__PURE__ */ n(Ar, { ...N });
5076
- case z.AppropriatenessTest:
5085
+ case $.AppropriatenessTest:
5077
5086
  return /* @__PURE__ */ n(Er, { ...N });
5078
- case z.ManualReview:
5087
+ case $.ManualReview:
5079
5088
  return /* @__PURE__ */ n(
5080
- _e,
5089
+ je,
5081
5090
  {
5082
5091
  kycStatus: i.kycStatus,
5083
5092
  reviewStatus: i.reviewStatus,
@@ -5094,7 +5103,7 @@ Failed to reload test data. Please refresh the page.`);
5094
5103
  ] }),
5095
5104
  /* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
5096
5105
  "Action type: ",
5097
- z[l.action]
5106
+ $[l.action]
5098
5107
  ] })
5099
5108
  ] }) });
5100
5109
  }
@@ -5105,13 +5114,13 @@ Failed to reload test data. Please refresh the page.`);
5105
5114
  ] });
5106
5115
  };
5107
5116
  export {
5108
- yt as ALLOWED_LANGUAGES,
5117
+ Oe as ALLOWED_LANGUAGES,
5109
5118
  Or as ALL_APPLICANT_FIELDS,
5110
- st as ApplicantProgressOnHoldReason,
5119
+ it as ApplicantProgressOnHoldReason,
5111
5120
  ce as ApplicantProgressStatus,
5112
5121
  wt as ApplicantService,
5113
- ot as ApplicantStatus,
5114
- mt as AppropriatenessQuestionType,
5122
+ lt as ApplicantStatus,
5123
+ ht as AppropriatenessQuestionType,
5115
5124
  St as AppropriatenessTestService,
5116
5125
  Er as AppropriatenessTestStep,
5117
5126
  pe as Badge,
@@ -5122,17 +5131,17 @@ export {
5122
5131
  ie as CardFooter,
5123
5132
  ne as CardHeader,
5124
5133
  Qr as CreateApplicantForm,
5125
- pt as CriteriaBuiltInType,
5134
+ gt as CriteriaBuiltInType,
5126
5135
  ft as DEFAULT_VISIBLE_FIELDS,
5127
- ut as DocumentReviewStatus,
5136
+ mt as DocumentReviewStatus,
5128
5137
  vt as EndpointBuilder,
5129
5138
  xe as ErrorHandler,
5130
5139
  Bt as EventEmitter,
5131
- Oe as FIELD_METADATA,
5132
- dt as FileType,
5140
+ Be as FIELD_METADATA,
5141
+ ut as FileType,
5133
5142
  sr as FileUpload,
5134
5143
  Se as GenderType,
5135
- Je as Header,
5144
+ Xe as Header,
5136
5145
  xt as HttpClient,
5137
5146
  be as IdentityProviderManager,
5138
5147
  Et as IdentityService,
@@ -5142,13 +5151,13 @@ export {
5142
5151
  Rt as InvestorCategorizationService,
5143
5152
  Ar as InvestorCategorizationStep,
5144
5153
  ae as InvestorCategorizationType,
5145
- gt as InvestorCategoryType,
5146
- lt as KycProcessStatus,
5154
+ yt as InvestorCategoryType,
5155
+ ct as KycProcessStatus,
5147
5156
  ye as KycStatus,
5148
- _e as KycStatusDisplay,
5157
+ je as KycStatusDisplay,
5149
5158
  Gr as KycWorkflow,
5150
5159
  Rr as Logo,
5151
- Ke as MetaKYCContext,
5160
+ He as MetaKYCContext,
5152
5161
  ue as MetaKYCError,
5153
5162
  $r as MetaKYCProvider,
5154
5163
  ar as MultiSelect,
@@ -5159,8 +5168,8 @@ export {
5159
5168
  kt as QuestionnaireService,
5160
5169
  kr as QuestionnaireStep,
5161
5170
  fe as ReviewStatus,
5162
- ht as RiskCriteriaType,
5163
- it as RiskLevel,
5171
+ pt as RiskCriteriaType,
5172
+ ot as RiskLevel,
5164
5173
  At as RiskScoringService,
5165
5174
  Cr as RiskScoringStep,
5166
5175
  Ut as SardinAIProvider,
@@ -5173,12 +5182,12 @@ export {
5173
5182
  Ot as ThemeService,
5174
5183
  Nt as UploadDocumentService,
5175
5184
  Nr as UploadDocumentStep,
5176
- ct as UserType,
5185
+ dt as UserType,
5177
5186
  De as ValueDataType,
5178
5187
  qt as WorkflowOrchestrator,
5179
5188
  Ne as WorkflowResultType,
5180
5189
  zt as WorkflowState,
5181
- z as WorkflowStepAction,
5190
+ $ as WorkflowStepAction,
5182
5191
  Wr as appropriatenessTestSchema,
5183
5192
  Kr as clearAllStorage,
5184
5193
  Wt as clearApplicantId,
@@ -5200,7 +5209,7 @@ export {
5200
5209
  Ur as getWorkflowState,
5201
5210
  Pt as healthcareTheme,
5202
5211
  Br as isScriptLoaded,
5203
- Ue as loadScript,
5212
+ Ke as loadScript,
5204
5213
  Tt as minimalTheme,
5205
5214
  Lt as modernTheme,
5206
5215
  zr as removeScript,