@vpdev2/metakyc-sdk 1.0.2 → 1.0.4

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 Qe = Object.defineProperty;
2
- var Ge = (t, e, r) => e in t ? Qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var U = (t, e, r) => Ge(t, typeof e != "symbol" ? e + "" : e, r);
4
- import Ze from "axios";
1
+ var Ge = Object.defineProperty;
2
+ var Ze = (t, e, r) => e in t ? Ge(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var K = (t, e, r) => Ze(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import Je from "axios";
5
5
  import * as Pe from "react";
6
- import ce, { createContext as Je, useMemo as Oe, useEffect as V, useContext as Xe, useState as v, useRef as ze, useCallback as q, forwardRef as Re } from "react";
7
- import { jsx as n, jsxs as o, Fragment as et } from "react/jsx-runtime";
8
- import { get as Ae, set as Se, appendErrors as _e, useForm as De, Controller as Q } from "react-hook-form";
6
+ import ce, { createContext as Xe, useMemo as Oe, useEffect as V, useContext as et, useState as v, useRef as ze, useCallback as q, forwardRef as Re } from "react";
7
+ import { jsx as n, jsxs as o, Fragment as tt } from "react/jsx-runtime";
8
+ import { get as Ae, set as Se, appendErrors as $e, useForm as De, Controller as Q } from "react-hook-form";
9
9
  import { z as de } from "zod";
10
- var K = /* @__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))(K || {}), ke = /* @__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))(ke || {}), ae = /* @__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))(ae || {}), tt = /* @__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))(tt || {}), rt = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(rt || {}), 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 || {}), nt = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(nt || {}), at = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(at || {}), ne = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(ne || {}), st = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(st || {}), Ne = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Ne || {}), it = /* @__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))(it || {}), ot = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(ot || {}), lt = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(lt || {}), Ee = /* @__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))(Ee || {}), ct = /* @__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))(ct || {}), dt = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(dt || {}), X = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(X || {}), ut = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(ut || {});
11
- const mt = [
10
+ var U = /* @__PURE__ */ ((t) => (t[t.IdentitySdk = 0] = "IdentitySdk", t[t.RiskScoring = 1] = "RiskScoring", t[t.Questionaries = 2] = "Questionaries", t[t.AdditionalData = 3] = "AdditionalData", t[t.AppropriatenessTest = 4] = "AppropriatenessTest", t[t.UploadDocument = 5] = "UploadDocument", t[t.ManualReview = 6] = "ManualReview", t[t.Overview = 7] = "Overview", t[t.InvestorCategorization = 8] = "InvestorCategorization", t))(U || {}), ke = /* @__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))(ke || {}), se = /* @__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))(se || {}), rt = /* @__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))(rt || {}), nt = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(nt || {}), 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 || {}), at = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(at || {}), st = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(st || {}), ae = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(ae || {}), it = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(it || {}), Ne = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Ne || {}), ot = /* @__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))(ot || {}), lt = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(lt || {}), ct = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(ct || {}), Ee = /* @__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))(Ee || {}), dt = /* @__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))(dt || {}), ut = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(ut || {}), X = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(X || {}), mt = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(mt || {});
11
+ const ht = [
12
12
  "firstName",
13
13
  "lastName",
14
14
  "email",
@@ -22,7 +22,7 @@ const mt = [
22
22
  "nationality",
23
23
  "taxCountry",
24
24
  "taxNumber"
25
- ], Dr = [
25
+ ], Fr = [
26
26
  "firstName",
27
27
  "lastName",
28
28
  "title",
@@ -46,7 +46,7 @@ const mt = [
46
46
  "occupation",
47
47
  "taxNumber",
48
48
  "externalRefId"
49
- ], ht = {
49
+ ], pt = {
50
50
  firstName: { label: "First Name", type: "text" },
51
51
  lastName: { label: "Last Name", type: "text" },
52
52
  title: { label: "Title", type: "text" },
@@ -72,7 +72,7 @@ const mt = [
72
72
  externalRefId: { label: "External Reference ID", type: "text" }
73
73
  };
74
74
  var Y = /* @__PURE__ */ ((t) => (t.Default = "default", t.Corporate = "corporate", t.Fintech = "fintech", t.Healthcare = "healthcare", t.Modern = "modern", t.Minimal = "minimal", t))(Y || {});
75
- const pt = {
75
+ const gt = {
76
76
  timeout: 3e4,
77
77
  retries: 3,
78
78
  locale: "en",
@@ -80,7 +80,7 @@ const pt = {
80
80
  pattern: "host-controller"
81
81
  }
82
82
  };
83
- class gt {
83
+ class yt {
84
84
  constructor(e) {
85
85
  this.config = e;
86
86
  }
@@ -123,7 +123,7 @@ class gt {
123
123
  class le extends Error {
124
124
  constructor(r, a, s, i, c) {
125
125
  super(r);
126
- U(this, "response");
126
+ K(this, "response");
127
127
  this.code = a, this.details = s, this.validationErrors = i, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this, le.prototype);
128
128
  }
129
129
  }
@@ -177,12 +177,12 @@ class xe {
177
177
  return e instanceof le;
178
178
  }
179
179
  }
180
- class yt {
180
+ class ft {
181
181
  constructor(e) {
182
- U(this, "axiosInstance");
183
- U(this, "endpointBuilder");
184
- U(this, "config");
185
- this.config = { ...pt, ...e }, this.endpointBuilder = new gt(this.config.endpoints), this.axiosInstance = Ze.create({
182
+ K(this, "axiosInstance");
183
+ K(this, "endpointBuilder");
184
+ K(this, "config");
185
+ this.config = { ...gt, ...e }, this.endpointBuilder = new yt(this.config.endpoints), this.axiosInstance = Je.create({
186
186
  baseURL: this.config.baseUrl,
187
187
  timeout: this.config.timeout,
188
188
  headers: {
@@ -272,7 +272,7 @@ class yt {
272
272
  return this.axiosInstance;
273
273
  }
274
274
  }
275
- class ft {
275
+ class bt {
276
276
  constructor(e) {
277
277
  this.httpClient = e;
278
278
  }
@@ -391,7 +391,7 @@ class ft {
391
391
  )).result;
392
392
  }
393
393
  }
394
- class bt {
394
+ class xt {
395
395
  constructor(e) {
396
396
  this.httpClient = e;
397
397
  }
@@ -418,7 +418,7 @@ class bt {
418
418
  )).result;
419
419
  }
420
420
  }
421
- class xt {
421
+ class vt {
422
422
  constructor(e) {
423
423
  this.httpClient = e;
424
424
  }
@@ -446,7 +446,7 @@ class xt {
446
446
  await this.httpClient.post("UploadDocument", "ReviewUploadDocument", e);
447
447
  }
448
448
  }
449
- class vt {
449
+ class wt {
450
450
  constructor(e) {
451
451
  this.httpClient = e;
452
452
  }
@@ -472,7 +472,7 @@ class vt {
472
472
  )).result;
473
473
  }
474
474
  }
475
- class wt {
475
+ class kt {
476
476
  constructor(e) {
477
477
  this.httpClient = e;
478
478
  }
@@ -494,7 +494,7 @@ class wt {
494
494
  await this.httpClient.get("Applicant", "PassOverview", { applicantId: e });
495
495
  }
496
496
  }
497
- class kt {
497
+ class Nt {
498
498
  constructor(e) {
499
499
  this.httpClient = e;
500
500
  }
@@ -529,7 +529,7 @@ class kt {
529
529
  )).result;
530
530
  }
531
531
  }
532
- class Nt {
532
+ class St {
533
533
  constructor(e) {
534
534
  this.httpClient = e;
535
535
  }
@@ -584,7 +584,7 @@ class Nt {
584
584
  return this.identityCompanyRequest(r);
585
585
  }
586
586
  }
587
- class St {
587
+ class Ct {
588
588
  constructor(e) {
589
589
  this.httpClient = e;
590
590
  }
@@ -620,7 +620,7 @@ class St {
620
620
  )).result;
621
621
  }
622
622
  }
623
- class Ct {
623
+ class At {
624
624
  constructor(e) {
625
625
  this.httpClient = e;
626
626
  }
@@ -648,6 +648,7 @@ class Ct {
648
648
  }
649
649
  const ee = {
650
650
  name: "Default",
651
+ title: "KYC Verification",
651
652
  logo: {
652
653
  url: "",
653
654
  height: "40px",
@@ -704,7 +705,7 @@ const ee = {
704
705
  textMuted: "#9ca3af"
705
706
  }
706
707
  }
707
- }, At = {
708
+ }, Et = {
708
709
  name: "Corporate",
709
710
  logo: {
710
711
  url: "",
@@ -737,7 +738,7 @@ const ee = {
737
738
  cardPadding: "1.5rem",
738
739
  inputHeight: "2.5rem"
739
740
  }
740
- }, Et = {
741
+ }, It = {
741
742
  name: "Fintech",
742
743
  logo: {
743
744
  url: "",
@@ -770,7 +771,7 @@ const ee = {
770
771
  cardPadding: "2rem",
771
772
  inputHeight: "3rem"
772
773
  }
773
- }, It = {
774
+ }, Rt = {
774
775
  name: "Healthcare",
775
776
  logo: {
776
777
  url: "",
@@ -812,7 +813,7 @@ const ee = {
812
813
  textSecondary: "#CBD5E1"
813
814
  }
814
815
  }
815
- }, Rt = {
816
+ }, Dt = {
816
817
  name: "Modern",
817
818
  logo: {
818
819
  url: "",
@@ -845,7 +846,7 @@ const ee = {
845
846
  cardPadding: "2rem",
846
847
  inputHeight: "3rem"
847
848
  }
848
- }, Dt = {
849
+ }, Pt = {
849
850
  name: "Minimal",
850
851
  logo: {
851
852
  url: "",
@@ -878,18 +879,18 @@ const ee = {
878
879
  cardPadding: "1.25rem",
879
880
  inputHeight: "2.25rem"
880
881
  }
881
- }, Pt = {
882
+ }, Ft = {
882
883
  [Y.Default]: ee,
883
- [Y.Corporate]: At,
884
- [Y.Fintech]: Et,
885
- [Y.Healthcare]: It,
886
- [Y.Modern]: Rt,
887
- [Y.Minimal]: Dt
884
+ [Y.Corporate]: Et,
885
+ [Y.Fintech]: It,
886
+ [Y.Healthcare]: Rt,
887
+ [Y.Modern]: Dt,
888
+ [Y.Minimal]: Pt
888
889
  };
889
890
  function ve(t) {
890
- return Pt[t] || ee;
891
+ return Ft[t] || ee;
891
892
  }
892
- class Ft {
893
+ class Lt {
893
894
  constructor(e) {
894
895
  this.httpClient = e;
895
896
  }
@@ -906,7 +907,7 @@ class Ft {
906
907
  if (!r.result.isEnabled)
907
908
  return ve(Y.Default);
908
909
  let a = r.result.preset ? ve(r.result.preset) : ve(Y.Default);
909
- return r.result.logo && (a.logo = { ...a.logo, ...r.result.logo }), r.result.colors && (a.colors = { ...a.colors, ...r.result.colors }), r.result.typography && (a.typography = { ...a.typography, ...r.result.typography }), r.result.spacing && (a.spacing = { ...a.spacing, ...r.result.spacing }), r.result.customCSS && (a.customCSS = r.result.customCSS), r.result.darkMode && (a.darkMode = {
910
+ return r.result.title && (a.title = r.result.title), r.result.logo && (a.logo = { ...a.logo, ...r.result.logo }), r.result.colors && (a.colors = { ...a.colors, ...r.result.colors }), r.result.typography && (a.typography = { ...a.typography, ...r.result.typography }), r.result.spacing && (a.spacing = { ...a.spacing, ...r.result.spacing }), r.result.customCSS && (a.customCSS = r.result.customCSS), r.result.darkMode && (a.darkMode = {
910
911
  colors: {
911
912
  ...(e = a.darkMode) == null ? void 0 : e.colors,
912
913
  ...r.result.darkMode.colors
@@ -950,9 +951,9 @@ class Ft {
950
951
  } : a;
951
952
  }
952
953
  }
953
- class Lt {
954
+ class Tt {
954
955
  constructor() {
955
- U(this, "listeners", /* @__PURE__ */ new Map());
956
+ K(this, "listeners", /* @__PURE__ */ new Map());
956
957
  }
957
958
  /**
958
959
  * Subscribe to an event
@@ -995,12 +996,12 @@ class Lt {
995
996
  this.listeners.delete(e);
996
997
  }
997
998
  }
998
- class Tt {
999
+ class Mt {
999
1000
  constructor() {
1000
- U(this, "events", new Lt());
1001
- U(this, "_applicantId", null);
1002
- U(this, "_progress", null);
1003
- U(this, "_error", null);
1001
+ K(this, "events", new Tt());
1002
+ K(this, "_applicantId", null);
1003
+ K(this, "_progress", null);
1004
+ K(this, "_error", null);
1004
1005
  }
1005
1006
  /**
1006
1007
  * Get current applicant ID
@@ -1033,7 +1034,7 @@ class Tt {
1033
1034
  */
1034
1035
  get status() {
1035
1036
  var e;
1036
- return ((e = this._progress) == null ? void 0 : e.status) || ae.None;
1037
+ return ((e = this._progress) == null ? void 0 : e.status) || se.None;
1037
1038
  }
1038
1039
  /**
1039
1040
  * Get workflow result
@@ -1052,19 +1053,19 @@ class Tt {
1052
1053
  * Check if workflow is complete
1053
1054
  */
1054
1055
  get isComplete() {
1055
- return this.status === ae.Finished;
1056
+ return this.status === se.Finished;
1056
1057
  }
1057
1058
  /**
1058
1059
  * Check if workflow is on hold
1059
1060
  */
1060
1061
  get isOnHold() {
1061
- return this.status === ae.OnHold;
1062
+ return this.status === se.OnHold;
1062
1063
  }
1063
1064
  /**
1064
1065
  * Check if workflow is in progress
1065
1066
  */
1066
1067
  get isInProgress() {
1067
- return this.status === ae.InProgress;
1068
+ return this.status === se.InProgress;
1068
1069
  }
1069
1070
  /**
1070
1071
  * Set applicant ID
@@ -1078,7 +1079,7 @@ class Tt {
1078
1079
  updateProgress(e) {
1079
1080
  var a, s;
1080
1081
  const r = (a = this._progress) == null ? void 0 : a.currentStep;
1081
- this._progress = e, this._applicantId = e.applicantId, this._error = null, this.events.emit("progressUpdated", e), (r == null ? void 0 : r.order) !== ((s = e.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status === ae.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) !== ((s = e.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status === se.Finished && e.workflowResult && this.events.emit("completed", e.workflowResult);
1082
1083
  }
1083
1084
  /**
1084
1085
  * Set error
@@ -1135,9 +1136,9 @@ class Tt {
1135
1136
  this.events.clear();
1136
1137
  }
1137
1138
  }
1138
- class Mt {
1139
+ class Bt {
1139
1140
  constructor() {
1140
- U(this, "handlers", /* @__PURE__ */ new Map());
1141
+ K(this, "handlers", /* @__PURE__ */ new Map());
1141
1142
  }
1142
1143
  /**
1143
1144
  * Register a step handler
@@ -1163,7 +1164,7 @@ class Mt {
1163
1164
  async loadStepData(e, r) {
1164
1165
  const a = this.getHandler(e);
1165
1166
  if (!a)
1166
- throw new Error(`No handler registered for step action: ${K[e]}`);
1167
+ throw new Error(`No handler registered for step action: ${U[e]}`);
1167
1168
  return a.loadData(r);
1168
1169
  }
1169
1170
  /**
@@ -1172,61 +1173,61 @@ class Mt {
1172
1173
  async submitStepData(e, r) {
1173
1174
  const a = this.getHandler(e);
1174
1175
  if (!a)
1175
- throw new Error(`No handler registered for step action: ${K[e]}`);
1176
+ throw new Error(`No handler registered for step action: ${U[e]}`);
1176
1177
  return a.submitData(r);
1177
1178
  }
1178
1179
  }
1179
- class Bt {
1180
+ class Ot {
1180
1181
  constructor(e, r, a, s, i, c, l, d) {
1181
- U(this, "state");
1182
- U(this, "stepRouter");
1183
- this.applicantService = e, this.questionnaireService = r, this.uploadDocumentService = a, this.appropriatenessTestService = s, this.overviewService = i, this.riskScoringService = c, this.investorCategorizationService = d, this.state = new Tt(), this.stepRouter = new Mt(), this.registerStepHandlers();
1182
+ K(this, "state");
1183
+ K(this, "stepRouter");
1184
+ this.applicantService = e, this.questionnaireService = r, this.uploadDocumentService = a, this.appropriatenessTestService = s, this.overviewService = i, this.riskScoringService = c, this.investorCategorizationService = d, this.state = new Mt(), this.stepRouter = new Bt(), this.registerStepHandlers();
1184
1185
  }
1185
1186
  /**
1186
1187
  * Register all step handlers
1187
1188
  */
1188
1189
  registerStepHandlers() {
1189
- this.stepRouter.registerHandler(K.Questionaries, {
1190
+ this.stepRouter.registerHandler(U.Questionaries, {
1190
1191
  loadData: (e) => this.questionnaireService.getQuestionnaire(e),
1191
1192
  submitData: async (e) => {
1192
1193
  await this.questionnaireService.fillQuestionnaire(e);
1193
1194
  }
1194
- }), this.stepRouter.registerHandler(K.UploadDocument, {
1195
+ }), this.stepRouter.registerHandler(U.UploadDocument, {
1195
1196
  loadData: (e) => this.uploadDocumentService.getUploadDocument(e),
1196
1197
  submitData: (e) => this.uploadDocumentService.fillUploadDocument(e)
1197
- }), this.stepRouter.registerHandler(K.AppropriatenessTest, {
1198
+ }), this.stepRouter.registerHandler(U.AppropriatenessTest, {
1198
1199
  loadData: (e) => this.appropriatenessTestService.getAppropriatenessTest(e),
1199
1200
  submitData: async (e) => {
1200
1201
  await this.appropriatenessTestService.fillAppropriatenessTest(e);
1201
1202
  }
1202
- }), this.stepRouter.registerHandler(K.Overview, {
1203
+ }), this.stepRouter.registerHandler(U.Overview, {
1203
1204
  loadData: (e) => this.overviewService.getOverviewData(e),
1204
1205
  submitData: (e) => this.overviewService.passOverview(e.applicantId)
1205
- }), this.stepRouter.registerHandler(K.RiskScoring, {
1206
+ }), this.stepRouter.registerHandler(U.RiskScoring, {
1206
1207
  loadData: (e) => this.riskScoringService.getRiskCriterias(e),
1207
1208
  submitData: async (e) => {
1208
1209
  await this.riskScoringService.submitRiskScoring(e);
1209
1210
  }
1210
- }), this.stepRouter.registerHandler(K.IdentitySdk, {
1211
+ }), this.stepRouter.registerHandler(U.IdentitySdk, {
1211
1212
  loadData: async (e) => ({
1212
1213
  applicantId: e,
1213
1214
  message: "Identity verification required"
1214
1215
  }),
1215
1216
  submitData: async () => {
1216
1217
  }
1217
- }), this.stepRouter.registerHandler(K.InvestorCategorization, {
1218
+ }), this.stepRouter.registerHandler(U.InvestorCategorization, {
1218
1219
  loadData: (e) => this.investorCategorizationService.getInvestorCategorization(e),
1219
1220
  submitData: async (e) => {
1220
1221
  await this.investorCategorizationService.setInvestorCategorization(e);
1221
1222
  }
1222
- }), this.stepRouter.registerHandler(K.ManualReview, {
1223
+ }), this.stepRouter.registerHandler(U.ManualReview, {
1223
1224
  loadData: async (e) => ({
1224
1225
  applicantId: e,
1225
1226
  message: "Your application is under manual review"
1226
1227
  }),
1227
1228
  submitData: async () => {
1228
1229
  }
1229
- }), this.stepRouter.registerHandler(K.AdditionalData, {
1230
+ }), this.stepRouter.registerHandler(U.AdditionalData, {
1230
1231
  loadData: async (e) => ({
1231
1232
  applicantId: e,
1232
1233
  message: "Additional data required"
@@ -1320,7 +1321,7 @@ class Bt {
1320
1321
  return this.stepRouter;
1321
1322
  }
1322
1323
  }
1323
- function je(t, e) {
1324
+ function _e(t, e) {
1324
1325
  return new Promise((r, a) => {
1325
1326
  if (e && document.getElementById(e)) {
1326
1327
  r();
@@ -1330,24 +1331,24 @@ function je(t, e) {
1330
1331
  s.src = t, e && (s.id = e), s.async = !0, s.onload = () => r(), s.onerror = () => a(new Error(`Failed to load script: ${t}`)), document.head.appendChild(s);
1331
1332
  });
1332
1333
  }
1333
- function Pr(t) {
1334
+ function Lr(t) {
1334
1335
  return !!document.getElementById(t);
1335
1336
  }
1336
- function Fr(t) {
1337
+ function Tr(t) {
1337
1338
  const e = document.getElementById(t);
1338
1339
  e && e.remove();
1339
1340
  }
1340
- class Ot {
1341
+ class zt {
1341
1342
  constructor(e) {
1342
- U(this, "sdk", null);
1343
- U(this, "config");
1343
+ K(this, "sdk", null);
1344
+ K(this, "config");
1344
1345
  this.config = e;
1345
1346
  }
1346
1347
  /**
1347
1348
  * Load Sumsub SDK
1348
1349
  */
1349
1350
  async loadSDK() {
1350
- await je(
1351
+ await _e(
1351
1352
  "https://cdn.sumsub.com/websdk/v2/production/websdk.js",
1352
1353
  "sumsub-sdk"
1353
1354
  );
@@ -1392,17 +1393,17 @@ class Ot {
1392
1393
  this.sdk && this.sdk.on("idCheck.onError", e);
1393
1394
  }
1394
1395
  }
1395
- class zt {
1396
+ class $t {
1396
1397
  constructor(e) {
1397
- U(this, "sdk", null);
1398
- U(this, "config");
1398
+ K(this, "sdk", null);
1399
+ K(this, "config");
1399
1400
  this.config = e;
1400
1401
  }
1401
1402
  /**
1402
1403
  * Load Onfido SDK
1403
1404
  */
1404
1405
  async loadSDK() {
1405
- await je(
1406
+ await _e(
1406
1407
  "https://sdk.onfido.com/v12.0.0/onfido.min.js",
1407
1408
  "onfido-sdk"
1408
1409
  );
@@ -1460,9 +1461,9 @@ class zt {
1460
1461
  }
1461
1462
  class _t {
1462
1463
  constructor(e) {
1463
- U(this, "sardineContext", null);
1464
- U(this, "config");
1465
- U(this, "sessionKey");
1464
+ K(this, "sardineContext", null);
1465
+ K(this, "config");
1466
+ K(this, "sessionKey");
1466
1467
  this.config = e, this.sessionKey = e.sessionKey || this.generateSessionKey();
1467
1468
  }
1468
1469
  /**
@@ -1608,11 +1609,11 @@ class fe {
1608
1609
  */
1609
1610
  static createProvider(e, r) {
1610
1611
  switch (e) {
1611
- case ne.Sumsub:
1612
- return new Ot(r);
1613
- case ne.Onfido:
1612
+ case ae.Sumsub:
1614
1613
  return new zt(r);
1615
- case ne.SardinAI:
1614
+ case ae.Onfido:
1615
+ return new $t(r);
1616
+ case ae.SardinAI:
1616
1617
  return new _t(r);
1617
1618
  default:
1618
1619
  throw new Error(`Unsupported identity provider: ${e}`);
@@ -1624,7 +1625,7 @@ class fe {
1624
1625
  static parseProviderConfig(e, r, a) {
1625
1626
  var s;
1626
1627
  switch (e) {
1627
- case ne.Sumsub:
1628
+ case ae.Sumsub:
1628
1629
  return {
1629
1630
  accessToken: r.accessToken || r.token,
1630
1631
  applicantEmail: r.email,
@@ -1632,11 +1633,11 @@ class fe {
1632
1633
  externalUserId: r.externalUserId,
1633
1634
  lang: r.lang || "en"
1634
1635
  };
1635
- case ne.Onfido:
1636
+ case ae.Onfido:
1636
1637
  return {
1637
1638
  token: r.token || r.sdkToken
1638
1639
  };
1639
- case ne.SardinAI:
1640
+ case ae.SardinAI:
1640
1641
  const i = ((s = a == null ? void 0 : a.identityProviders) == null ? void 0 : s.sardinai) || {};
1641
1642
  return {
1642
1643
  clientId: i.clientId || r.clientId,
@@ -1654,9 +1655,9 @@ class fe {
1654
1655
  }
1655
1656
  class jt {
1656
1657
  constructor(e) {
1657
- U(this, "currentTheme", ee);
1658
- U(this, "customStyleElement", null);
1659
- U(this, "container");
1658
+ K(this, "currentTheme", ee);
1659
+ K(this, "customStyleElement", null);
1660
+ K(this, "container");
1660
1661
  this.container = e || document.documentElement;
1661
1662
  }
1662
1663
  /**
@@ -1773,9 +1774,9 @@ class jt {
1773
1774
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1774
1775
  }
1775
1776
  }
1776
- const $e = Je(null), Lr = ({ config: t, children: e }) => {
1777
+ const je = Xe(null), Mr = ({ config: t, children: e }) => {
1777
1778
  const r = Oe(() => {
1778
- const a = new yt(t), s = new ft(a), i = new bt(a), c = new xt(a), l = new vt(a), d = new wt(a), u = new kt(a), g = new Nt(a), p = new St(a), m = new Ct(a), b = new Ft(a), y = new jt();
1779
+ const a = new ft(t), s = new bt(a), i = new xt(a), c = new vt(a), l = new wt(a), d = new kt(a), u = new Nt(a), g = new St(a), p = new Ct(a), m = new At(a), b = new Lt(a), y = new jt();
1779
1780
  return {
1780
1781
  config: t,
1781
1782
  httpClient: a,
@@ -1790,7 +1791,7 @@ const $e = Je(null), Lr = ({ config: t, children: e }) => {
1790
1791
  investorCategorizationService: m,
1791
1792
  themeService: b,
1792
1793
  themeManager: y,
1793
- createOrchestrator: () => new Bt(
1794
+ createOrchestrator: () => new Ot(
1794
1795
  s,
1795
1796
  i,
1796
1797
  c,
@@ -1816,15 +1817,15 @@ const $e = Je(null), Lr = ({ config: t, children: e }) => {
1816
1817
  }
1817
1818
  })(), () => {
1818
1819
  r.themeManager.cleanup();
1819
- }), [t.theme, r.themeService, r.themeManager]), /* @__PURE__ */ n($e.Provider, { value: r, children: e });
1820
+ }), [t.theme, r.themeService, r.themeManager]), /* @__PURE__ */ n(je.Provider, { value: r, children: e });
1820
1821
  };
1821
- function ie() {
1822
- const t = Xe($e);
1822
+ function re() {
1823
+ const t = et(je);
1823
1824
  if (!t)
1824
1825
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
1825
1826
  return t;
1826
1827
  }
1827
- async function $t(t) {
1828
+ async function Kt(t) {
1828
1829
  return new Promise((e, r) => {
1829
1830
  const a = new FileReader();
1830
1831
  a.readAsDataURL(t), a.onload = () => {
@@ -1833,10 +1834,10 @@ async function $t(t) {
1833
1834
  }, a.onerror = (s) => r(s);
1834
1835
  });
1835
1836
  }
1836
- function Tr(t, e) {
1837
+ function Br(t, e) {
1837
1838
  return t.size <= e;
1838
1839
  }
1839
- function Mr(t, e) {
1840
+ function Or(t, e) {
1840
1841
  return e.split(",").map((a) => a.trim()).some((a) => {
1841
1842
  if (a.endsWith("/*")) {
1842
1843
  const s = a.slice(0, -2);
@@ -1850,7 +1851,7 @@ function Ce(t) {
1850
1851
  const e = 1024, r = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(t) / Math.log(e));
1851
1852
  return Math.round(t / Math.pow(e, a) * 100) / 100 + " " + r[a];
1852
1853
  }
1853
- function Br(t) {
1854
+ function zr(t) {
1854
1855
  return t;
1855
1856
  }
1856
1857
  function J(...t) {
@@ -1867,7 +1868,7 @@ function Ut(t) {
1867
1868
  console.warn("Failed to save applicant ID to storage:", e);
1868
1869
  }
1869
1870
  }
1870
- function Kt() {
1871
+ function qt() {
1871
1872
  try {
1872
1873
  const t = localStorage.getItem(be.APPLICANT_ID);
1873
1874
  return t ? parseInt(t, 10) : null;
@@ -1875,21 +1876,21 @@ function Kt() {
1875
1876
  return console.warn("Failed to retrieve applicant ID from storage:", t), null;
1876
1877
  }
1877
1878
  }
1878
- function qt() {
1879
+ function Ht() {
1879
1880
  try {
1880
1881
  localStorage.removeItem(be.APPLICANT_ID);
1881
1882
  } catch (t) {
1882
1883
  console.warn("Failed to clear applicant ID from storage:", t);
1883
1884
  }
1884
1885
  }
1885
- function Ht(t) {
1886
+ function Vt(t) {
1886
1887
  try {
1887
1888
  localStorage.setItem(be.WORKFLOW_STATE, JSON.stringify(t));
1888
1889
  } catch (e) {
1889
1890
  console.warn("Failed to save workflow state to storage:", e);
1890
1891
  }
1891
1892
  }
1892
- function Or() {
1893
+ function $r() {
1893
1894
  try {
1894
1895
  const t = localStorage.getItem(be.WORKFLOW_STATE);
1895
1896
  return t ? JSON.parse(t) : null;
@@ -1897,23 +1898,23 @@ function Or() {
1897
1898
  return console.warn("Failed to retrieve workflow state from storage:", t), null;
1898
1899
  }
1899
1900
  }
1900
- function Vt() {
1901
+ function Yt() {
1901
1902
  try {
1902
1903
  localStorage.removeItem(be.WORKFLOW_STATE);
1903
1904
  } catch (t) {
1904
1905
  console.warn("Failed to clear workflow state from storage:", t);
1905
1906
  }
1906
1907
  }
1907
- function zr() {
1908
- qt(), Vt();
1908
+ function _r() {
1909
+ Ht(), Yt();
1909
1910
  }
1910
- function Yt(t) {
1911
- const { createOrchestrator: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(null), d = ze(null), u = t || Kt();
1911
+ function Wt(t) {
1912
+ const { createOrchestrator: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(null), d = ze(null), u = t || qt();
1912
1913
  V(() => {
1913
1914
  d.current || (d.current = e());
1914
1915
  }, [e]), V(() => {
1915
1916
  var h;
1916
- r && u && (Ut(u), Ht({
1917
+ r && u && (Ut(u), Vt({
1917
1918
  applicantId: u,
1918
1919
  currentStepOrder: (h = r.currentStep) == null ? void 0 : h.order,
1919
1920
  status: r.status,
@@ -1993,15 +1994,15 @@ function Yt(t) {
1993
1994
  applicantId: u,
1994
1995
  currentStep: (r == null ? void 0 : r.currentStep) || null,
1995
1996
  steps: x,
1996
- status: (r == null ? void 0 : r.status) || ae.None,
1997
+ status: (r == null ? void 0 : r.status) || se.None,
1997
1998
  workflowResult: (r == null ? void 0 : r.workflowResult) || null,
1998
1999
  workflowKey: r == null ? void 0 : r.workFlowKey,
1999
2000
  nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
2000
2001
  hasWorkflowChanged: R,
2001
2002
  isLoading: s,
2002
2003
  error: c,
2003
- isComplete: (r == null ? void 0 : r.status) === ae.Finished,
2004
- isOnHold: (r == null ? void 0 : r.status) === ae.OnHold,
2004
+ isComplete: (r == null ? void 0 : r.status) === se.Finished,
2005
+ isOnHold: (r == null ? void 0 : r.status) === se.OnHold,
2005
2006
  refreshProgress: p,
2006
2007
  moveToNext: m,
2007
2008
  moveBack: b,
@@ -2009,8 +2010,8 @@ function Yt(t) {
2009
2010
  orchestrator: d.current
2010
2011
  };
2011
2012
  }
2012
- function Wt(t) {
2013
- const { questionnaireService: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), g = q(async () => {
2013
+ function Qt(t) {
2014
+ const { questionnaireService: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), g = q(async () => {
2014
2015
  if (t) {
2015
2016
  i(!0), u(null);
2016
2017
  try {
@@ -2048,8 +2049,8 @@ function Wt(t) {
2048
2049
  submit: p
2049
2050
  };
2050
2051
  }
2051
- function Qt(t) {
2052
- const { uploadDocumentService: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(0), [g, p] = v(null), m = q(async () => {
2052
+ function Gt(t) {
2053
+ const { uploadDocumentService: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(0), [g, p] = v(null), m = q(async () => {
2053
2054
  if (t) {
2054
2055
  i(!0), p(null);
2055
2056
  try {
@@ -2088,8 +2089,8 @@ function Qt(t) {
2088
2089
  submit: b
2089
2090
  };
2090
2091
  }
2091
- function _r(t) {
2092
- const { appropriatenessTestService: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), [g, p] = v(null), m = q(async () => {
2092
+ function jr(t) {
2093
+ const { appropriatenessTestService: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), [g, p] = v(null), m = q(async () => {
2093
2094
  if (t) {
2094
2095
  i(!0), u(null);
2095
2096
  try {
@@ -2129,8 +2130,8 @@ function _r(t) {
2129
2130
  submit: b
2130
2131
  };
2131
2132
  }
2132
- function Gt(t) {
2133
- const { overviewService: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), g = q(async () => {
2133
+ function Zt(t) {
2134
+ const { overviewService: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), g = q(async () => {
2134
2135
  if (t) {
2135
2136
  i(!0), u(null);
2136
2137
  try {
@@ -2167,8 +2168,8 @@ function Gt(t) {
2167
2168
  passOverview: p
2168
2169
  };
2169
2170
  }
2170
- function Zt(t) {
2171
- const { identityService: e } = ie(), [r, a] = v(
2171
+ function Jt(t) {
2172
+ const { identityService: e } = re(), [r, a] = v(
2172
2173
  null
2173
2174
  ), [s, i] = v(!1), [c, l] = v(null), d = q(
2174
2175
  async (p, m) => {
@@ -2245,8 +2246,8 @@ function Zt(t) {
2245
2246
  restartIdentity: g
2246
2247
  };
2247
2248
  }
2248
- function Jt(t) {
2249
- const { riskScoringService: e } = ie(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), [g, p] = v(null), m = q(async () => {
2249
+ function Xt(t) {
2250
+ const { riskScoringService: e } = re(), [r, a] = v(null), [s, i] = v(!1), [c, l] = v(!1), [d, u] = v(null), [g, p] = v(null), m = q(async () => {
2250
2251
  if (t) {
2251
2252
  i(!0), u(null);
2252
2253
  try {
@@ -2286,8 +2287,8 @@ function Jt(t) {
2286
2287
  submit: b
2287
2288
  };
2288
2289
  }
2289
- function Xt() {
2290
- const { applicantService: t, config: e } = ie(), [r, a] = v(!1), [s, i] = v(null), c = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(p) {
2290
+ function er() {
2291
+ const { applicantService: t, config: e } = re(), [r, a] = v(!1), [s, i] = v(null), c = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(p) {
2291
2292
  const m = Math.random() * 16 | 0;
2292
2293
  return (p === "x" ? m : m & 3 | 8).toString(16);
2293
2294
  }), l = q(
@@ -2356,7 +2357,7 @@ function Xt() {
2356
2357
  stopProgress: g
2357
2358
  };
2358
2359
  }
2359
- const j = ({
2360
+ const _ = ({
2360
2361
  children: t,
2361
2362
  variant: e = "primary",
2362
2363
  size: r = "md",
@@ -2476,7 +2477,7 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2476
2477
  ...a,
2477
2478
  children: t
2478
2479
  }
2479
- ), se = ({ size: t = "md", className: e, ...r }) => {
2480
+ ), ie = ({ size: t = "md", className: e, ...r }) => {
2480
2481
  const a = {
2481
2482
  sm: "h-4 w-4",
2482
2483
  md: "h-8 w-8",
@@ -2550,7 +2551,7 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
2550
2551
  ] })
2551
2552
  );
2552
2553
  ye.displayName = "Select";
2553
- const er = ({
2554
+ const tr = ({
2554
2555
  label: t,
2555
2556
  error: e,
2556
2557
  accept: r,
@@ -2692,7 +2693,7 @@ const er = ({
2692
2693
  )) }),
2693
2694
  e && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-danger-500", children: e })
2694
2695
  ] });
2695
- }, tr = Re(
2696
+ }, rr = Re(
2696
2697
  ({ countryCode: t = "+1", onCountryCodeChange: e, className: r, ...a }, s) => /* @__PURE__ */ o("div", { className: "w-full", children: [
2697
2698
  a.label && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2698
2699
  a.label,
@@ -2727,7 +2728,7 @@ const er = ({
2727
2728
  a.error && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-danger-500", children: a.error })
2728
2729
  ] })
2729
2730
  );
2730
- tr.displayName = "PhoneInput";
2731
+ rr.displayName = "PhoneInput";
2731
2732
  const Fe = (t, e, r) => {
2732
2733
  if (t && "reportValidity" in t) {
2733
2734
  const a = Ae(r, e);
@@ -2743,20 +2744,20 @@ const Fe = (t, e, r) => {
2743
2744
  const r = {};
2744
2745
  for (const a in t) {
2745
2746
  const s = Ae(e.fields, a), i = Object.assign(t[a] || {}, { ref: s && s.ref });
2746
- if (rr(e.names || Object.keys(t), a)) {
2747
+ if (nr(e.names || Object.keys(t), a)) {
2747
2748
  const c = Object.assign({}, Ae(r, a));
2748
2749
  Se(c, "root", i), Se(r, a, c);
2749
2750
  } else Se(r, a, i);
2750
2751
  }
2751
2752
  return r;
2752
- }, rr = (t, e) => {
2753
+ }, nr = (t, e) => {
2753
2754
  const r = Te(e);
2754
2755
  return t.some((a) => Te(a).match(`^${r}\\.\\d+`));
2755
2756
  };
2756
2757
  function Te(t) {
2757
2758
  return t.replace(/\]|\[/g, "");
2758
2759
  }
2759
- function Ue(t, e, r) {
2760
+ function Ke(t, e, r) {
2760
2761
  function a(l, d) {
2761
2762
  var u;
2762
2763
  Object.defineProperty(l, "_zod", {
@@ -2786,16 +2787,16 @@ function Ue(t, e, r) {
2786
2787
  }
2787
2788
  }), Object.defineProperty(c, "name", { value: t }), c;
2788
2789
  }
2789
- class nr extends Error {
2790
+ class ar extends Error {
2790
2791
  constructor() {
2791
2792
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
2792
2793
  }
2793
2794
  }
2794
- const ar = {};
2795
- function Ke(t) {
2796
- return ar;
2795
+ const sr = {};
2796
+ function Ue(t) {
2797
+ return sr;
2797
2798
  }
2798
- function sr(t, e) {
2799
+ function ir(t, e) {
2799
2800
  return typeof e == "bigint" ? e.toString() : e;
2800
2801
  }
2801
2802
  const qe = Error.captureStackTrace ? Error.captureStackTrace : (...t) => {
@@ -2821,7 +2822,7 @@ const Ve = (t, e) => {
2821
2822
  enumerable: !1
2822
2823
  }), Object.defineProperty(t, "message", {
2823
2824
  get() {
2824
- return JSON.stringify(e, sr, 2);
2825
+ return JSON.stringify(e, ir, 2);
2825
2826
  },
2826
2827
  enumerable: !0
2827
2828
  // configurable: false,
@@ -2829,24 +2830,24 @@ const Ve = (t, e) => {
2829
2830
  value: () => t.message,
2830
2831
  enumerable: !1
2831
2832
  });
2832
- }, ir = Ue("$ZodError", Ve), Ye = Ue("$ZodError", Ve, { Parent: Error }), or = (t) => (e, r, a, s) => {
2833
+ }, or = Ke("$ZodError", Ve), Ye = Ke("$ZodError", Ve, { Parent: Error }), lr = (t) => (e, r, a, s) => {
2833
2834
  const i = a ? Object.assign(a, { async: !1 }) : { async: !1 }, c = e._zod.run({ value: r, issues: [] }, i);
2834
2835
  if (c instanceof Promise)
2835
- throw new nr();
2836
+ throw new ar();
2836
2837
  if (c.issues.length) {
2837
- const l = new ((s == null ? void 0 : s.Err) ?? t)(c.issues.map((d) => He(d, i, Ke())));
2838
+ const l = new ((s == null ? void 0 : s.Err) ?? t)(c.issues.map((d) => He(d, i, Ue())));
2838
2839
  throw qe(l, s == null ? void 0 : s.callee), l;
2839
2840
  }
2840
2841
  return c.value;
2841
- }, lr = /* @__PURE__ */ or(Ye), cr = (t) => async (e, r, a, s) => {
2842
+ }, cr = /* @__PURE__ */ lr(Ye), dr = (t) => async (e, r, a, s) => {
2842
2843
  const i = a ? Object.assign(a, { async: !0 }) : { async: !0 };
2843
2844
  let c = e._zod.run({ value: r, issues: [] }, i);
2844
2845
  if (c instanceof Promise && (c = await c), c.issues.length) {
2845
- const l = new ((s == null ? void 0 : s.Err) ?? t)(c.issues.map((d) => He(d, i, Ke())));
2846
+ const l = new ((s == null ? void 0 : s.Err) ?? t)(c.issues.map((d) => He(d, i, Ue())));
2846
2847
  throw qe(l, s == null ? void 0 : s.callee), l;
2847
2848
  }
2848
2849
  return c.value;
2849
- }, dr = /* @__PURE__ */ cr(Ye);
2850
+ }, ur = /* @__PURE__ */ dr(Ye);
2850
2851
  function Me(t, e) {
2851
2852
  try {
2852
2853
  var r = t();
@@ -2855,7 +2856,7 @@ function Me(t, e) {
2855
2856
  }
2856
2857
  return r && r.then ? r.then(void 0, e) : r;
2857
2858
  }
2858
- function ur(t, e) {
2859
+ function mr(t, e) {
2859
2860
  for (var r = {}; t.length; ) {
2860
2861
  var a = t[0], s = a.code, i = a.message, c = a.path.join(".");
2861
2862
  if (!r[c]) if ("unionErrors" in a) {
@@ -2868,13 +2869,13 @@ function ur(t, e) {
2868
2869
  });
2869
2870
  }), e) {
2870
2871
  var d = r[c].types, u = d && d[a.code];
2871
- r[c] = _e(c, e, r, s, u ? [].concat(u, a.message) : a.message);
2872
+ r[c] = $e(c, e, r, s, u ? [].concat(u, a.message) : a.message);
2872
2873
  }
2873
2874
  t.shift();
2874
2875
  }
2875
2876
  return r;
2876
2877
  }
2877
- function mr(t, e) {
2878
+ function hr(t, e) {
2878
2879
  for (var r = {}; t.length; ) {
2879
2880
  var a = t[0], s = a.code, i = a.message, c = a.path.join(".");
2880
2881
  if (!r[c]) if (a.code === "invalid_union" && a.errors.length > 0) {
@@ -2887,7 +2888,7 @@ function mr(t, e) {
2887
2888
  });
2888
2889
  }), e) {
2889
2890
  var d = r[c].types, u = d && d[a.code];
2890
- r[c] = _e(c, e, r, s, u ? [].concat(u, a.message) : a.message);
2891
+ r[c] = $e(c, e, r, s, u ? [].concat(u, a.message) : a.message);
2891
2892
  }
2892
2893
  t.shift();
2893
2894
  }
@@ -2905,7 +2906,7 @@ function We(t, e, r) {
2905
2906
  }, function(c) {
2906
2907
  if (function(l) {
2907
2908
  return Array.isArray(l == null ? void 0 : l.issues);
2908
- }(c)) return { values: {}, errors: Le(ur(c.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
2909
+ }(c)) return { values: {}, errors: Le(mr(c.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
2909
2910
  throw c;
2910
2911
  }));
2911
2912
  } catch (c) {
@@ -2917,13 +2918,13 @@ function We(t, e, r) {
2917
2918
  }(t)) return function(a, s, i) {
2918
2919
  try {
2919
2920
  return Promise.resolve(Me(function() {
2920
- return Promise.resolve((r.mode === "sync" ? lr : dr)(t, a, e)).then(function(c) {
2921
+ return Promise.resolve((r.mode === "sync" ? cr : ur)(t, a, e)).then(function(c) {
2921
2922
  return i.shouldUseNativeValidation && Ie({}, i), { errors: {}, values: r.raw ? Object.assign({}, a) : c };
2922
2923
  });
2923
2924
  }, function(c) {
2924
2925
  if (function(l) {
2925
- return l instanceof ir;
2926
- }(c)) return { values: {}, errors: Le(mr(c.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
2926
+ return l instanceof or;
2927
+ }(c)) return { values: {}, errors: Le(hr(c.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
2927
2928
  throw c;
2928
2929
  }));
2929
2930
  } catch (c) {
@@ -2932,12 +2933,12 @@ function We(t, e, r) {
2932
2933
  };
2933
2934
  throw new Error("Invalid input: not a Zod schema");
2934
2935
  }
2935
- function hr(t) {
2936
+ function pr(t) {
2936
2937
  return de.object({
2937
2938
  questionResults: de.any()
2938
2939
  }).passthrough();
2939
2940
  }
2940
- function pr(t) {
2941
+ function gr(t) {
2941
2942
  let e = de.array(de.instanceof(File));
2942
2943
  if (t.isRequired ? e = e.min(
2943
2944
  1,
@@ -2959,37 +2960,37 @@ function pr(t) {
2959
2960
  }
2960
2961
  return e;
2961
2962
  }
2962
- function jr(t) {
2963
+ function Kr(t) {
2963
2964
  const e = {};
2964
2965
  return t.uploadDocumentFiles.forEach((r) => {
2965
2966
  const a = `file_${r.id}`;
2966
- e[a] = pr(r);
2967
+ e[a] = gr(r);
2967
2968
  }), de.object(e);
2968
2969
  }
2969
- function gr(t) {
2970
+ function yr(t) {
2970
2971
  return de.any();
2971
2972
  }
2972
- function yr(t) {
2973
+ function fr(t) {
2973
2974
  return de.string().min(1, "This question is required");
2974
2975
  }
2975
- function $r(t) {
2976
+ function Ur(t) {
2976
2977
  const e = {};
2977
2978
  return t.appropriatenessQuestions.forEach((r) => {
2978
2979
  const a = `question_${r.id}`;
2979
- e[a] = yr();
2980
+ e[a] = fr();
2980
2981
  }), de.object(e);
2981
2982
  }
2982
- const Ur = de.any(), fr = ({
2983
+ const qr = de.any(), br = ({
2983
2984
  applicantId: t,
2984
2985
  onComplete: e,
2985
2986
  onBack: r
2986
2987
  }) => {
2987
- const { questionnaire: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Wt(t), d = Oe(() => a ? { questionResults: a.questionGroups.map(
2988
+ const { questionnaire: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Qt(t), d = Oe(() => a ? { questionResults: a.questionGroups.map(
2988
2989
  (x) => x.questions.map((R) => ({
2989
2990
  questionId: R.id,
2990
2991
  values: []
2991
2992
  }))
2992
- ) } : { questionResults: [] }, [a]), u = a ? hr() : null, {
2993
+ ) } : { questionResults: [] }, [a]), u = a ? pr() : null, {
2993
2994
  control: g,
2994
2995
  handleSubmit: p,
2995
2996
  formState: { errors: m }
@@ -3020,7 +3021,7 @@ const Ur = de.any(), fr = ({
3020
3021
  console.error("Error submitting questionnaire:", x);
3021
3022
  }
3022
3023
  };
3023
- return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(se, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3024
+ return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ie, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3024
3025
  "Error loading questionnaire: ",
3025
3026
  c.message
3026
3027
  ] }) }) }) : a ? /* @__PURE__ */ n("form", { onSubmit: p(b), children: /* @__PURE__ */ o(L, { children: [
@@ -3118,9 +3119,9 @@ const Ur = de.any(), fr = ({
3118
3119
  })
3119
3120
  ) }),
3120
3121
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3121
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3122
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3122
3123
  /* @__PURE__ */ n(
3123
- j,
3124
+ _,
3124
3125
  {
3125
3126
  type: "submit",
3126
3127
  isLoading: i,
@@ -3136,19 +3137,19 @@ const Ur = de.any(), fr = ({
3136
3137
  c.message
3137
3138
  ] }) })
3138
3139
  ] }) }) : null;
3139
- }, br = ({
3140
+ }, xr = ({
3140
3141
  applicantId: t,
3141
3142
  onComplete: e,
3142
3143
  onBack: r
3143
3144
  }) => {
3144
- const { uploadDocument: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Qt(t), [d, u] = v({}), g = async (p) => {
3145
+ const { uploadDocument: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Gt(t), [d, u] = v({}), g = async (p) => {
3145
3146
  if (p.preventDefault(), !a) return;
3146
3147
  const m = await Promise.all(
3147
3148
  a.uploadDocumentFiles.map(async (y) => {
3148
3149
  const x = d[y.id] || [], R = await Promise.all(
3149
3150
  x.map(async (h) => ({
3150
3151
  fileName: h.name,
3151
- fileData: await $t(h)
3152
+ fileData: await Kt(h)
3152
3153
  }))
3153
3154
  );
3154
3155
  return {
@@ -3163,7 +3164,7 @@ const Ur = de.any(), fr = ({
3163
3164
  };
3164
3165
  await l(b), e == null || e();
3165
3166
  };
3166
- return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(se, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3167
+ return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ie, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3167
3168
  "Error loading document requirements: ",
3168
3169
  c.message
3169
3170
  ] }) }) }) : a ? /* @__PURE__ */ n("form", { onSubmit: g, children: /* @__PURE__ */ o(L, { children: [
@@ -3172,7 +3173,7 @@ const Ur = de.any(), fr = ({
3172
3173
  a.subtitle && /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: a.subtitle })
3173
3174
  ] }),
3174
3175
  /* @__PURE__ */ n(T, { className: "space-y-6", children: a.uploadDocumentFiles.map((p) => /* @__PURE__ */ n(
3175
- er,
3176
+ tr,
3176
3177
  {
3177
3178
  label: p.displayName,
3178
3179
  accept: p.allowedTypes,
@@ -3186,15 +3187,15 @@ const Ur = de.any(), fr = ({
3186
3187
  p.id
3187
3188
  )) }),
3188
3189
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3189
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3190
- /* @__PURE__ */ n(j, { type: "submit", isLoading: i, children: "Continue" })
3190
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3191
+ /* @__PURE__ */ n(_, { type: "submit", isLoading: i, children: "Continue" })
3191
3192
  ] })
3192
3193
  ] }) }) : null;
3193
- }, xr = ({ applicantId: t, onComplete: e, onBack: r }) => {
3194
- const { overview: a, isLoading: s, isSubmitting: i, error: c, passOverview: l } = Gt(t), d = async () => {
3194
+ }, vr = ({ applicantId: t, onComplete: e, onBack: r }) => {
3195
+ const { overview: a, isLoading: s, isSubmitting: i, error: c, passOverview: l } = Zt(t), d = async () => {
3195
3196
  await l(), e == null || e();
3196
3197
  };
3197
- return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(se, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3198
+ return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ie, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3198
3199
  "Error loading overview: ",
3199
3200
  c.message
3200
3201
  ] }) }) }) : a ? /* @__PURE__ */ o(L, { children: [
@@ -3223,22 +3224,22 @@ const Ur = de.any(), fr = ({
3223
3224
  ] }) })
3224
3225
  ] }),
3225
3226
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3226
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3227
- /* @__PURE__ */ n(j, { onClick: d, isLoading: i, children: "Confirm and Continue" })
3227
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3228
+ /* @__PURE__ */ n(_, { onClick: d, isLoading: i, children: "Confirm and Continue" })
3228
3229
  ] })
3229
3230
  ] }) : null;
3230
- }, vr = ({
3231
+ }, wr = ({
3231
3232
  applicantId: t,
3232
3233
  onComplete: e,
3233
3234
  onBack: r
3234
3235
  }) => {
3235
- const { criteria: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Jt(t), [d, u] = ce.useState(!1), g = ce.useMemo(() => !a || a.length === 0 ? { criteriaValueInputs: [] } : {
3236
+ const { criteria: a, isLoading: s, isSubmitting: i, error: c, submit: l } = Xt(t), [d, u] = ce.useState(!1), g = ce.useMemo(() => !a || a.length === 0 ? { criteriaValueInputs: [] } : {
3236
3237
  criteriaValueInputs: a.map((h) => ({
3237
3238
  riskCriteriaId: h.id,
3238
3239
  values: [""]
3239
3240
  // Initialize with empty string to prevent uncontrolled input warning
3240
3241
  }))
3241
- }, [a]), p = a && a.length > 0 ? gr() : null, {
3242
+ }, [a]), p = a && a.length > 0 ? yr() : null, {
3242
3243
  control: m,
3243
3244
  handleSubmit: b,
3244
3245
  formState: { errors: y }
@@ -3271,13 +3272,13 @@ const Ur = de.any(), fr = ({
3271
3272
  }
3272
3273
  }, R = (h) => h.builtInType === 1 ? "country" : !h.defaultValues || h.defaultValues.length === 0 ? "text" : h.multipleValue ? "checkbox" : "radio";
3273
3274
  return s ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
3274
- /* @__PURE__ */ n(se, { className: "my-8" }),
3275
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
3275
3276
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading risk scoring criteria..." })
3276
3277
  ] }) }) : c ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
3277
3278
  "Error loading criteria: ",
3278
3279
  c.message
3279
3280
  ] }) }) }) : !s && a && a.length === 0 ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
3280
- /* @__PURE__ */ n(se, { className: "my-8" }),
3281
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
3281
3282
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400", children: "No risk scoring criteria required. Moving to next step..." })
3282
3283
  ] }) }) : a ? /* @__PURE__ */ n("form", { onSubmit: b(x), children: /* @__PURE__ */ o(L, { children: [
3283
3284
  /* @__PURE__ */ o(Z, { children: [
@@ -3391,9 +3392,9 @@ const Ur = de.any(), fr = ({
3391
3392
  ] }, h.id);
3392
3393
  }) }),
3393
3394
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3394
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3395
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3395
3396
  /* @__PURE__ */ n(
3396
- j,
3397
+ _,
3397
3398
  {
3398
3399
  type: "submit",
3399
3400
  isLoading: i,
@@ -3409,12 +3410,12 @@ const Ur = de.any(), fr = ({
3409
3410
  c.message
3410
3411
  ] }) })
3411
3412
  ] }) }) : null;
3412
- }, wr = ({
3413
+ }, kr = ({
3413
3414
  applicantId: t,
3414
3415
  onComplete: e,
3415
3416
  onBack: r
3416
3417
  }) => {
3417
- const { investorCategorizationService: a } = ie(), [s, i] = v(null), [c, l] = v(!1), [d, u] = v(null);
3418
+ const { investorCategorizationService: a } = re(), [s, i] = v(null), [c, l] = v(!1), [d, u] = v(null);
3418
3419
  return /* @__PURE__ */ n("form", { onSubmit: async (p) => {
3419
3420
  if (p.preventDefault(), s === null) {
3420
3421
  u("Please select an investor type");
@@ -3535,9 +3536,9 @@ const Ur = de.any(), fr = ({
3535
3536
  ] }) })
3536
3537
  ] }),
3537
3538
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3538
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3539
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3539
3540
  /* @__PURE__ */ n(
3540
- j,
3541
+ _,
3541
3542
  {
3542
3543
  type: "submit",
3543
3544
  isLoading: c,
@@ -3547,12 +3548,12 @@ const Ur = de.any(), fr = ({
3547
3548
  )
3548
3549
  ] })
3549
3550
  ] }) });
3550
- }, kr = ({
3551
+ }, Nr = ({
3551
3552
  applicantId: t,
3552
3553
  onComplete: e,
3553
3554
  onBack: r
3554
3555
  }) => {
3555
- const { appropriatenessTestService: a } = ie(), [s, i] = v(null), [c, l] = v(!0), [d, u] = v(!1), [g, p] = v(null), [m, b] = v({}), [y, x] = v(0), [R, h] = v(!1), [N, w] = v(!1), [E, F] = v(0);
3556
+ const { appropriatenessTestService: a } = re(), [s, i] = v(null), [c, l] = v(!0), [d, u] = v(!1), [g, p] = v(null), [m, b] = v({}), [y, x] = v(0), [R, h] = v(!1), [N, w] = v(!1), [E, F] = v(0);
3556
3557
  V(() => {
3557
3558
  (async () => {
3558
3559
  try {
@@ -3572,8 +3573,8 @@ const Ur = de.any(), fr = ({
3572
3573
  const M = (C) => {
3573
3574
  const k = C.split(":").map(Number);
3574
3575
  if (k.length === 3) {
3575
- const [S, $, oe] = k;
3576
- return S * 3600 + $ * 60 + oe;
3576
+ const [S, j, oe] = k;
3577
+ return S * 3600 + j * 60 + oe;
3577
3578
  }
3578
3579
  return 0;
3579
3580
  }, I = (C) => {
@@ -3614,9 +3615,9 @@ const Ur = de.any(), fr = ({
3614
3615
  u(!0), p(null);
3615
3616
  try {
3616
3617
  const k = s.appropriatenessQuestions.map(
3617
- ($) => ({
3618
- appropriatenessQuestionId: $.id,
3619
- value: m[$.id] || ""
3618
+ (j) => ({
3619
+ appropriatenessQuestionId: j.id,
3620
+ value: m[j.id] || ""
3620
3621
  // Empty string if not answered
3621
3622
  })
3622
3623
  ), S = {
@@ -3626,14 +3627,14 @@ const Ur = de.any(), fr = ({
3626
3627
  };
3627
3628
  console.log("Submitting appropriateness test:", S);
3628
3629
  try {
3629
- const $ = await a.fillAppropriatenessTest(S);
3630
- console.log("Appropriateness test result:", $), $.message && ($.message.toLowerCase().includes("pass") || $.message.toLowerCase().includes("success") || $.message.toLowerCase().includes("congratulations")) ? e == null || e() : (p($.message || "Test completed. Please check the result."), h(!1), w(!1), b({}), setTimeout(() => f(), 1e3));
3631
- } catch ($) {
3632
- if ($.code === 400 && $.message) {
3633
- const oe = $.message;
3630
+ const j = await a.fillAppropriatenessTest(S);
3631
+ console.log("Appropriateness test result:", j), j.message && (j.message.toLowerCase().includes("pass") || j.message.toLowerCase().includes("success") || j.message.toLowerCase().includes("congratulations")) ? e == null || e() : (p(j.message || "Test completed. Please check the result."), h(!1), w(!1), b({}), setTimeout(() => f(), 1e3));
3632
+ } catch (j) {
3633
+ if (j.code === 400 && j.message) {
3634
+ const oe = j.message;
3634
3635
  console.log("Test failed:", oe), p(oe), h(!1), w(!1), b({}), setTimeout(() => f(), 1500);
3635
3636
  } else
3636
- throw $;
3637
+ throw j;
3637
3638
  }
3638
3639
  } catch (k) {
3639
3640
  console.error("Error submitting appropriateness test:", k), p(k.message || "Failed to submit test. Please try again."), h(!1), w(!1), b({});
@@ -3656,7 +3657,7 @@ Failed to reload test data. Please refresh the page.`);
3656
3657
  };
3657
3658
  if (c)
3658
3659
  return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
3659
- /* @__PURE__ */ n(se, { className: "my-8" }),
3660
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
3660
3661
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
3661
3662
  ] }) });
3662
3663
  if (!s)
@@ -3724,7 +3725,7 @@ Failed to reload test data. Please refresh the page.`);
3724
3725
  C.groupName && /* @__PURE__ */ n("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: C.groupName }),
3725
3726
  /* @__PURE__ */ n("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: C.question })
3726
3727
  ] }),
3727
- /* @__PURE__ */ n("div", { className: "space-y-2", children: C.answers.map((S, $) => /* @__PURE__ */ o(
3728
+ /* @__PURE__ */ n("div", { className: "space-y-2", children: C.answers.map((S, j) => /* @__PURE__ */ o(
3728
3729
  "label",
3729
3730
  {
3730
3731
  className: `
@@ -3747,7 +3748,7 @@ Failed to reload test data. Please refresh the page.`);
3747
3748
  /* @__PURE__ */ n("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: S })
3748
3749
  ]
3749
3750
  },
3750
- $
3751
+ j
3751
3752
  )) })
3752
3753
  ]
3753
3754
  },
@@ -3765,7 +3766,7 @@ Failed to reload test data. Please refresh the page.`);
3765
3766
  ] }),
3766
3767
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3767
3768
  /* @__PURE__ */ n(
3768
- j,
3769
+ _,
3769
3770
  {
3770
3771
  type: "button",
3771
3772
  variant: "outline",
@@ -3775,7 +3776,7 @@ Failed to reload test data. Please refresh the page.`);
3775
3776
  }
3776
3777
  ),
3777
3778
  /* @__PURE__ */ n(
3778
- j,
3779
+ _,
3779
3780
  {
3780
3781
  type: "submit",
3781
3782
  isLoading: d,
@@ -3817,9 +3818,9 @@ Failed to reload test data. Please refresh the page.`);
3817
3818
  D <= 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." }) })
3818
3819
  ] }),
3819
3820
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
3820
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3821
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3821
3822
  /* @__PURE__ */ n(
3822
- j,
3823
+ _,
3823
3824
  {
3824
3825
  type: "button",
3825
3826
  onClick: A,
@@ -3829,13 +3830,13 @@ Failed to reload test data. Please refresh the page.`);
3829
3830
  )
3830
3831
  ] })
3831
3832
  ] });
3832
- }, Nr = ({
3833
+ }, Sr = ({
3833
3834
  applicantId: t,
3834
3835
  onComplete: e,
3835
3836
  onBack: r
3836
3837
  }) => {
3837
- var k, S, $, oe;
3838
- const { applicantService: a, baseInformationService: s, config: i } = ie(), { identityData: c, provider: l, token: d, isLoading: u, error: g, requestIdentity: p, restartIdentity: m } = Zt(t), [b, y] = v(null), [x, R] = v(null), [h, N] = v([]), [w, E] = v(!0), [F, M] = v(!1), [I, A] = v(null), [B, z] = v(!1), f = De({
3838
+ var k, S, j, oe;
3839
+ const { applicantService: a, baseInformationService: s, config: i } = re(), { identityData: c, provider: l, token: d, isLoading: u, error: g, requestIdentity: p, restartIdentity: m } = Jt(t), [b, y] = v(null), [x, R] = v(null), [h, N] = v([]), [w, E] = v(!0), [F, M] = v(!1), [I, A] = v(null), [B, z] = v(!1), f = De({
3839
3840
  defaultValues: {
3840
3841
  street: "",
3841
3842
  streetNumber: "",
@@ -3854,20 +3855,20 @@ Failed to reload test data. Please refresh the page.`);
3854
3855
  s.getCountries("", "en")
3855
3856
  ]);
3856
3857
  R(P);
3857
- const H = /* @__PURE__ */ new Set(), re = W.filter((me) => {
3858
+ const H = /* @__PURE__ */ new Set(), ne = W.filter((me) => {
3858
3859
  const he = me.abbreviation3 || me.abbreviation;
3859
3860
  return !he || H.has(he) ? !1 : (H.add(he), !0);
3860
3861
  });
3861
- N(re);
3862
- const _ = P.applicantRequestData;
3862
+ N(ne);
3863
+ const $ = P.applicantRequestData;
3863
3864
  if (f.reset({
3864
- street: (_ == null ? void 0 : _.street) || "",
3865
- streetNumber: (_ == null ? void 0 : _.streetNumber) || "",
3866
- city: (_ == null ? void 0 : _.city) || "",
3867
- zip: (_ == null ? void 0 : _.zip) || "",
3868
- country: (_ == null ? void 0 : _.country) || "",
3869
- nationality: (_ == null ? void 0 : _.nationality) || "",
3870
- phonenumber: (_ == null ? void 0 : _.phonenumber) || ""
3865
+ street: ($ == null ? void 0 : $.street) || "",
3866
+ streetNumber: ($ == null ? void 0 : $.streetNumber) || "",
3867
+ city: ($ == null ? void 0 : $.city) || "",
3868
+ zip: ($ == null ? void 0 : $.zip) || "",
3869
+ country: ($ == null ? void 0 : $.country) || "",
3870
+ nationality: ($ == null ? void 0 : $.nationality) || "",
3871
+ phonenumber: ($ == null ? void 0 : $.phonenumber) || ""
3871
3872
  }), !c && !u) {
3872
3873
  console.log("[Identity] Auto-requesting identity verification for IdentityPending status");
3873
3874
  try {
@@ -3912,7 +3913,7 @@ Failed to reload test data. Please refresh the page.`);
3912
3913
  if (d.url) {
3913
3914
  console.log("[Identity] Loading provider URL for user verification:", d.url), A(null);
3914
3915
  try {
3915
- if (new URL(d.url), O === ne.SardinAI) {
3916
+ if (new URL(d.url), O === ae.SardinAI) {
3916
3917
  console.log("[SardinAI] Initializing Risk SDK in background...");
3917
3918
  try {
3918
3919
  const P = fe.parseProviderConfig(l, d, i);
@@ -3931,7 +3932,7 @@ Failed to reload test data. Please refresh the page.`);
3931
3932
  }
3932
3933
  return;
3933
3934
  }
3934
- if (O === ne.SardinAI) {
3935
+ if (O === ae.SardinAI) {
3935
3936
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), A(null);
3936
3937
  try {
3937
3938
  const P = fe.parseProviderConfig(l, d, i), W = fe.createProvider(l, P);
@@ -3940,10 +3941,10 @@ Failed to reload test data. Please refresh the page.`);
3940
3941
  e == null || e();
3941
3942
  }, 2e3);
3942
3943
  }).catch((H) => {
3943
- var _;
3944
+ var $;
3944
3945
  console.error("[SardinAI] Failed to initialize:", H);
3945
- const re = ((_ = H.message) == null ? void 0 : _.toLowerCase()) || "";
3946
- re.includes("expired") || re.includes("invalid") || re.includes("401") || re.includes("400") ? (z(!0), A("Session expired or invalid. Please restart verification.")) : A(`Failed to initialize: ${H.message}`);
3946
+ const ne = (($ = H.message) == null ? void 0 : $.toLowerCase()) || "";
3947
+ ne.includes("expired") || ne.includes("invalid") || ne.includes("401") || ne.includes("400") ? (z(!0), A("Session expired or invalid. Please restart verification.")) : A(`Failed to initialize: ${H.message}`);
3947
3948
  });
3948
3949
  } catch (P) {
3949
3950
  console.error("[SardinAI] Error creating provider:", P), A(`Configuration error: ${P.message}`);
@@ -3953,12 +3954,12 @@ Failed to reload test data. Please refresh the page.`);
3953
3954
  try {
3954
3955
  A(null);
3955
3956
  const P = fe.parseProviderConfig(l, d, i), W = fe.createProvider(l, P);
3956
- O === ne.Sumsub ? (W.initialize("identity-container").catch((H) => {
3957
- var re;
3958
- console.error("[Sumsub] Initialization error:", H), A(`Failed to initialize: ${H.message}`), (re = H.message) != null && re.toLowerCase().includes("expired") && z(!0);
3957
+ O === ae.Sumsub ? (W.initialize("identity-container").catch((H) => {
3958
+ var ne;
3959
+ console.error("[Sumsub] Initialization error:", H), A(`Failed to initialize: ${H.message}`), (ne = H.message) != null && ne.toLowerCase().includes("expired") && z(!0);
3959
3960
  }), W.onComplete && W.onComplete(() => {
3960
3961
  e == null || e();
3961
- })) : O === ne.Onfido && W.initialize("identity-container").catch((H) => {
3962
+ })) : O === ae.Onfido && W.initialize("identity-container").catch((H) => {
3962
3963
  console.error("[Onfido] Initialization error:", H), A(`Failed to initialize: ${H.message}`);
3963
3964
  }), y(W);
3964
3965
  } catch (P) {
@@ -3989,7 +3990,7 @@ Failed to reload test data. Please refresh the page.`);
3989
3990
  };
3990
3991
  if (w || u)
3991
3992
  return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
3992
- /* @__PURE__ */ n(se, { className: "my-8" }),
3993
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
3993
3994
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
3994
3995
  ] }) });
3995
3996
  if (g)
@@ -4035,8 +4036,8 @@ Failed to reload test data. Please refresh the page.`);
4035
4036
  ] })
4036
4037
  ] }),
4037
4038
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
4038
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4039
- /* @__PURE__ */ n(j, { type: "button", onClick: C, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
4039
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4040
+ /* @__PURE__ */ n(_, { type: "button", onClick: C, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
4040
4041
  ] })
4041
4042
  ] });
4042
4043
  if (F && c) {
@@ -4048,7 +4049,7 @@ Failed to reload test data. Please refresh the page.`);
4048
4049
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4049
4050
  ] }),
4050
4051
  /* @__PURE__ */ n(
4051
- j,
4052
+ _,
4052
4053
  {
4053
4054
  type: "button",
4054
4055
  variant: "outline",
@@ -4072,12 +4073,12 @@ Failed to reload test data. Please refresh the page.`);
4072
4073
  allow: "camera; microphone; geolocation",
4073
4074
  title: "Identity Verification",
4074
4075
  onLoad: (P) => {
4075
- var W, H, re;
4076
+ var W, H, ne;
4076
4077
  console.log("[Identity] Iframe loaded");
4077
4078
  try {
4078
- const _ = P.target, me = _.contentDocument || ((W = _.contentWindow) == null ? void 0 : W.document);
4079
+ const $ = P.target, me = $.contentDocument || ((W = $.contentWindow) == null ? void 0 : W.document);
4079
4080
  if (me) {
4080
- const he = ((re = (H = me.body) == null ? void 0 : H.textContent) == null ? void 0 : re.toLowerCase()) || "";
4081
+ const he = ((ne = (H = me.body) == null ? void 0 : H.textContent) == null ? void 0 : ne.toLowerCase()) || "";
4081
4082
  (he.includes("expired") || he.includes("invalid") || he.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), z(!0), A("Your verification link has expired."));
4082
4083
  }
4083
4084
  } catch {
@@ -4087,14 +4088,14 @@ Failed to reload test data. Please refresh the page.`);
4087
4088
  }
4088
4089
  ) })
4089
4090
  ] }),
4090
- r && /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(j, { variant: "outline", onClick: r, children: "Back" }) })
4091
- ] }) : O === ne.SardinAI ? /* @__PURE__ */ o(L, { children: [
4091
+ r && /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4092
+ ] }) : O === ae.SardinAI ? /* @__PURE__ */ o(L, { children: [
4092
4093
  /* @__PURE__ */ o(Z, { children: [
4093
4094
  /* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4094
4095
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4095
4096
  ] }),
4096
4097
  /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("div", { className: "text-center py-12", children: [
4097
- /* @__PURE__ */ n(se, { className: "mb-4" }),
4098
+ /* @__PURE__ */ n(ie, { className: "mb-4" }),
4098
4099
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4099
4100
  /* @__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" })
4100
4101
  ] }) })
@@ -4104,7 +4105,7 @@ Failed to reload test data. Please refresh the page.`);
4104
4105
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4105
4106
  ] }),
4106
4107
  /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4107
- r && /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(j, { variant: "outline", onClick: r, children: "Back" }) })
4108
+ r && /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(_, { variant: "outline", onClick: r, children: "Back" }) })
4108
4109
  ] });
4109
4110
  }
4110
4111
  return /* @__PURE__ */ n("form", { onSubmit: f.handleSubmit(D), children: /* @__PURE__ */ o(L, { children: [
@@ -4124,7 +4125,7 @@ Failed to reload test data. Please refresh the page.`);
4124
4125
  ] }),
4125
4126
  /* @__PURE__ */ o("div", { children: [
4126
4127
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Email" }),
4127
- /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: ($ = x == null ? void 0 : x.applicantRequestData) == null ? void 0 : $.email })
4128
+ /* @__PURE__ */ n("p", { className: "mt-1 text-base", children: (j = x == null ? void 0 : x.applicantRequestData) == null ? void 0 : j.email })
4128
4129
  ] }),
4129
4130
  /* @__PURE__ */ o("div", { children: [
4130
4131
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
@@ -4224,8 +4225,8 @@ Failed to reload test data. Please refresh the page.`);
4224
4225
  ] })
4225
4226
  ] }),
4226
4227
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
4227
- r && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4228
- /* @__PURE__ */ n(j, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
4228
+ r && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4229
+ /* @__PURE__ */ n(_, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
4229
4230
  ] })
4230
4231
  ] }) });
4231
4232
  }, Be = ({
@@ -4362,15 +4363,15 @@ Failed to reload test data. Please refresh the page.`);
4362
4363
  ] }) })
4363
4364
  ] }),
4364
4365
  /* @__PURE__ */ o(te, { className: "flex justify-center gap-4", children: [
4365
- l.type === "success" && s && /* @__PURE__ */ n(j, { onClick: s, size: "lg", children: "Continue" }),
4366
- l.type === "error" && /* @__PURE__ */ o(et, { children: [
4367
- i && /* @__PURE__ */ n(j, { variant: "outline", onClick: i, children: "Contact Support" }),
4368
- s && /* @__PURE__ */ n(j, { onClick: s, children: "Try Again" })
4366
+ l.type === "success" && s && /* @__PURE__ */ n(_, { onClick: s, size: "lg", children: "Continue" }),
4367
+ l.type === "error" && /* @__PURE__ */ o(tt, { children: [
4368
+ i && /* @__PURE__ */ n(_, { variant: "outline", onClick: i, children: "Contact Support" }),
4369
+ s && /* @__PURE__ */ n(_, { onClick: s, children: "Try Again" })
4369
4370
  ] }),
4370
4371
  l.type === "pending" && /* @__PURE__ */ n("div", { className: "text-center", children: /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
4371
4372
  ] })
4372
4373
  ] });
4373
- }, Kr = ({ config: t, className: e = "" }) => !(t != null && t.visible) || !(t != null && t.url) ? null : /* @__PURE__ */ n("div", { className: `metakyc-logo ${e}`, children: /* @__PURE__ */ n(
4374
+ }, Cr = ({ config: t, className: e = "" }) => !(t != null && t.visible) || !(t != null && t.url) ? null : /* @__PURE__ */ n("div", { className: `metakyc-logo ${e}`, children: /* @__PURE__ */ n(
4374
4375
  "img",
4375
4376
  {
4376
4377
  src: t.url,
@@ -4385,19 +4386,32 @@ Failed to reload test data. Please refresh the page.`);
4385
4386
  console.warn("[Logo] Failed to load logo:", t.url), r.target.style.display = "none";
4386
4387
  }
4387
4388
  }
4388
- ) }), qr = ({
4389
+ ) }), Qe = ({
4390
+ title: t,
4391
+ subtitle: e,
4392
+ className: r = ""
4393
+ }) => {
4394
+ const { themeManager: a } = re(), s = a.getCurrentTheme(), i = t || s.title || "KYC Verification";
4395
+ return /* @__PURE__ */ o("div", { className: `metakyc-header ${r}`, children: [
4396
+ s.logo && s.logo.visible && /* @__PURE__ */ n("div", { className: "mb-3", children: /* @__PURE__ */ n(Cr, { config: s.logo }) }),
4397
+ /* @__PURE__ */ o("div", { children: [
4398
+ /* @__PURE__ */ n("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: i }),
4399
+ e && /* @__PURE__ */ n("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: e })
4400
+ ] })
4401
+ ] });
4402
+ }, Hr = ({
4389
4403
  workflowKey: t,
4390
4404
  externalRefId: e,
4391
4405
  onSuccess: r,
4392
4406
  onCancel: a
4393
4407
  }) => {
4394
4408
  var A, B, z;
4395
- const { config: s, baseInformationService: i } = ie(), { createApplicant: c, isLoading: l } = Xt(), [d, u] = v([]), [g, p] = v(!0), [m, b] = v(!1), [y, x] = v(null), R = t || ((A = s.applicantForm) == null ? void 0 : A.workflowKey);
4409
+ const { config: s, baseInformationService: i } = re(), { createApplicant: c, isLoading: l } = er(), [d, u] = v([]), [g, p] = v(!0), [m, b] = v(!1), [y, x] = v(null), R = t || ((A = s.applicantForm) == null ? void 0 : A.workflowKey);
4396
4410
  if (!R)
4397
4411
  throw new Error(
4398
4412
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
4399
4413
  );
4400
- const h = e || ((B = s.applicantForm) == null ? void 0 : B.externalRefId) || "", N = ((z = s.applicantForm) == null ? void 0 : z.visibleFields) || mt, [w, E] = v({
4414
+ const h = e || ((B = s.applicantForm) == null ? void 0 : B.externalRefId) || "", N = ((z = s.applicantForm) == null ? void 0 : z.visibleFields) || ht, [w, E] = v({
4401
4415
  workflowKey: R,
4402
4416
  firstName: "",
4403
4417
  lastName: "",
@@ -4470,7 +4484,7 @@ Failed to reload test data. Please refresh the page.`);
4470
4484
  }
4471
4485
  }, I = (f) => {
4472
4486
  var C, k;
4473
- const D = ht[f];
4487
+ const D = pt[f];
4474
4488
  switch (D.type) {
4475
4489
  case "select":
4476
4490
  return f === "country" || f === "nationality" || f === "taxCountry" || f === "countryOfBirth" ? /* @__PURE__ */ n(
@@ -4509,8 +4523,8 @@ Failed to reload test data. Please refresh the page.`);
4509
4523
  label: D.label,
4510
4524
  value: ((k = w[f]) == null ? void 0 : k.join(", ")) || "",
4511
4525
  onChange: (S) => {
4512
- const $ = S.target.value.split(",").map((oe) => oe.trim()).filter(Boolean);
4513
- F(f, $);
4526
+ const j = S.target.value.split(",").map((oe) => oe.trim()).filter(Boolean);
4527
+ F(f, j);
4514
4528
  },
4515
4529
  placeholder: "Enter countries separated by commas"
4516
4530
  },
@@ -4566,14 +4580,17 @@ Failed to reload test data. Please refresh the page.`);
4566
4580
  );
4567
4581
  }
4568
4582
  };
4569
- return g ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
4570
- /* @__PURE__ */ n(se, { className: "my-8" }),
4583
+ return g ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
4584
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
4571
4585
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
4572
- ] }) }) : /* @__PURE__ */ n("form", { onSubmit: M, children: /* @__PURE__ */ o(L, { children: [
4573
- /* @__PURE__ */ o(Z, { children: [
4574
- /* @__PURE__ */ n("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Create Applicant" }),
4575
- /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-2", children: "Please fill in the required information to begin the KYC verification process." })
4576
- ] }),
4586
+ ] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: M, children: /* @__PURE__ */ o(L, { children: [
4587
+ /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(
4588
+ Qe,
4589
+ {
4590
+ title: "Create Applicant",
4591
+ subtitle: "Please fill in the required information to begin the KYC verification process."
4592
+ }
4593
+ ) }),
4577
4594
  /* @__PURE__ */ o(T, { children: [
4578
4595
  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: [
4579
4596
  /* @__PURE__ */ n("strong", { children: "Error:" }),
@@ -4583,11 +4600,11 @@ Failed to reload test data. Please refresh the page.`);
4583
4600
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: N.map((f) => I(f)) })
4584
4601
  ] }),
4585
4602
  /* @__PURE__ */ o(te, { className: "flex justify-between", children: [
4586
- a && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: a, disabled: m || l, children: "Cancel" }),
4587
- /* @__PURE__ */ n(j, { type: "submit", isLoading: m || l, children: "Create Applicant" })
4603
+ a && /* @__PURE__ */ n(_, { type: "button", variant: "outline", onClick: a, disabled: m || l, children: "Cancel" }),
4604
+ /* @__PURE__ */ n(_, { type: "submit", isLoading: m || l, children: "Create Applicant" })
4588
4605
  ] })
4589
- ] }) });
4590
- }, Hr = ({
4606
+ ] }) }) });
4607
+ }, Vr = ({
4591
4608
  applicantId: t,
4592
4609
  onComplete: e,
4593
4610
  onError: r,
@@ -4605,7 +4622,7 @@ Failed to reload test data. Please refresh the page.`);
4605
4622
  error: m,
4606
4623
  moveBack: b,
4607
4624
  refreshProgress: y
4608
- } = Yt(t), [x, R] = ce.useState(!1);
4625
+ } = Wt(t), [x, R] = ce.useState(!1);
4609
4626
  if (ce.useEffect(() => {
4610
4627
  m && r && r(m);
4611
4628
  }, [m, r]), ce.useEffect(() => {
@@ -4616,7 +4633,7 @@ Failed to reload test data. Please refresh the page.`);
4616
4633
  g && R(!1);
4617
4634
  }, [g]), p || !i)
4618
4635
  return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
4619
- /* @__PURE__ */ n(se, { className: "my-8" }),
4636
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
4620
4637
  /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
4621
4638
  ] }) }) });
4622
4639
  if (m)
@@ -4625,7 +4642,7 @@ Failed to reload test data. Please refresh the page.`);
4625
4642
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: m.message })
4626
4643
  ] }) }) }) });
4627
4644
  if (g && !x)
4628
- return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("div", { className: "text-center py-8", children: [
4645
+ return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("div", { className: "text-center py-8", children: [
4629
4646
  /* @__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" }) }) }) }),
4630
4647
  /* @__PURE__ */ n("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white mb-2", children: "Workflow Transition" }),
4631
4648
  /* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mb-6", children: "Your application workflow has been updated based on your progress." }),
@@ -4652,8 +4669,8 @@ Failed to reload test data. Please refresh the page.`);
4652
4669
  }
4653
4670
  )
4654
4671
  ] }) }) }) });
4655
- if (i.status === ae.Finished || i.status === ae.OnHold)
4656
- return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(
4672
+ if (i.status === se.Finished || i.status === se.OnHold)
4673
+ return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ n(
4657
4674
  Be,
4658
4675
  {
4659
4676
  kycStatus: i.kycStatus,
@@ -4667,15 +4684,15 @@ Failed to reload test data. Please refresh the page.`);
4667
4684
  }
4668
4685
  ) });
4669
4686
  if (!c)
4670
- return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
4671
- /* @__PURE__ */ n(se, { className: "my-8" }),
4672
- /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === ae.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
4687
+ return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
4688
+ /* @__PURE__ */ n(ie, { className: "my-8" }),
4689
+ /* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === se.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
4673
4690
  ] }) }) });
4674
4691
  const h = () => {
4675
4692
  const w = l.filter((I) => I.visibility !== !1), E = w.findIndex((I) => I.order === c.order), F = E >= 0 ? E + 1 : 1, M = w.length;
4676
4693
  return /* @__PURE__ */ o("div", { className: "mb-6", children: [
4677
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
4678
- /* @__PURE__ */ n("h1", { className: "text-2xl font-bold", children: "KYC Verification" }),
4694
+ /* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
4695
+ /* @__PURE__ */ n(Qe, {}),
4679
4696
  /* @__PURE__ */ o(ue, { variant: i.status === 1 ? "info" : "success", children: [
4680
4697
  "Step ",
4681
4698
  F,
@@ -4723,22 +4740,22 @@ Failed to reload test data. Please refresh the page.`);
4723
4740
  onBack: c.order > 0 ? b : void 0
4724
4741
  };
4725
4742
  switch (c.action) {
4726
- case K.Questionaries:
4727
- return /* @__PURE__ */ n(fr, { ...w });
4728
- case K.UploadDocument:
4743
+ case U.Questionaries:
4729
4744
  return /* @__PURE__ */ n(br, { ...w });
4730
- case K.Overview:
4745
+ case U.UploadDocument:
4731
4746
  return /* @__PURE__ */ n(xr, { ...w });
4732
- case K.IdentitySdk:
4733
- return /* @__PURE__ */ n(Nr, { ...w });
4734
- case K.RiskScoring:
4747
+ case U.Overview:
4735
4748
  return /* @__PURE__ */ n(vr, { ...w });
4736
- case K.AdditionalData:
4737
- case K.InvestorCategorization:
4749
+ case U.IdentitySdk:
4750
+ return /* @__PURE__ */ n(Sr, { ...w });
4751
+ case U.RiskScoring:
4738
4752
  return /* @__PURE__ */ n(wr, { ...w });
4739
- case K.AppropriatenessTest:
4753
+ case U.AdditionalData:
4754
+ case U.InvestorCategorization:
4740
4755
  return /* @__PURE__ */ n(kr, { ...w });
4741
- case K.ManualReview:
4756
+ case U.AppropriatenessTest:
4757
+ return /* @__PURE__ */ n(Nr, { ...w });
4758
+ case U.ManualReview:
4742
4759
  return /* @__PURE__ */ n(
4743
4760
  Be,
4744
4761
  {
@@ -4750,133 +4767,134 @@ Failed to reload test data. Please refresh the page.`);
4750
4767
  );
4751
4768
  default:
4752
4769
  return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { className: "py-12 text-center", children: [
4753
- /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(se, {}) }),
4770
+ /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(ie, {}) }),
4754
4771
  /* @__PURE__ */ o("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
4755
4772
  "Processing step: ",
4756
4773
  c.title || c.name
4757
4774
  ] }),
4758
4775
  /* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
4759
4776
  "Action type: ",
4760
- K[c.action]
4777
+ U[c.action]
4761
4778
  ] })
4762
4779
  ] }) });
4763
4780
  }
4764
4781
  };
4765
- return /* @__PURE__ */ o("div", { className: s, children: [
4782
+ return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${s || ""}`, children: [
4766
4783
  h(),
4767
4784
  N()
4768
4785
  ] });
4769
4786
  };
4770
4787
  export {
4771
- Dr as ALL_APPLICANT_FIELDS,
4772
- tt as ApplicantProgressOnHoldReason,
4773
- ae as ApplicantProgressStatus,
4774
- ft as ApplicantService,
4775
- nt as ApplicantStatus,
4776
- lt as AppropriatenessQuestionType,
4777
- vt as AppropriatenessTestService,
4778
- kr as AppropriatenessTestStep,
4788
+ Fr as ALL_APPLICANT_FIELDS,
4789
+ rt as ApplicantProgressOnHoldReason,
4790
+ se as ApplicantProgressStatus,
4791
+ bt as ApplicantService,
4792
+ at as ApplicantStatus,
4793
+ ct as AppropriatenessQuestionType,
4794
+ wt as AppropriatenessTestService,
4795
+ Nr as AppropriatenessTestStep,
4779
4796
  ue as Badge,
4780
- St as BaseInformationService,
4781
- j as Button,
4797
+ Ct as BaseInformationService,
4798
+ _ as Button,
4782
4799
  L as Card,
4783
4800
  T as CardContent,
4784
4801
  te as CardFooter,
4785
4802
  Z as CardHeader,
4786
- qr as CreateApplicantForm,
4787
- dt as CriteriaBuiltInType,
4788
- mt as DEFAULT_VISIBLE_FIELDS,
4789
- ot as DocumentReviewStatus,
4790
- gt as EndpointBuilder,
4803
+ Hr as CreateApplicantForm,
4804
+ ut as CriteriaBuiltInType,
4805
+ ht as DEFAULT_VISIBLE_FIELDS,
4806
+ lt as DocumentReviewStatus,
4807
+ yt as EndpointBuilder,
4791
4808
  xe as ErrorHandler,
4792
- Lt as EventEmitter,
4793
- ht as FIELD_METADATA,
4794
- it as FileType,
4795
- er as FileUpload,
4809
+ Tt as EventEmitter,
4810
+ pt as FIELD_METADATA,
4811
+ ot as FileType,
4812
+ tr as FileUpload,
4796
4813
  Ne as GenderType,
4797
- yt as HttpClient,
4814
+ Qe as Header,
4815
+ ft as HttpClient,
4798
4816
  fe as IdentityProviderManager,
4799
- Nt as IdentityService,
4800
- ne as IdentityVerificationProvider,
4801
- Nr as IdentityVerificationStep,
4817
+ St as IdentityService,
4818
+ ae as IdentityVerificationProvider,
4819
+ Sr as IdentityVerificationStep,
4802
4820
  G as Input,
4803
- Ct as InvestorCategorizationService,
4804
- wr as InvestorCategorizationStep,
4821
+ At as InvestorCategorizationService,
4822
+ kr as InvestorCategorizationStep,
4805
4823
  X as InvestorCategorizationType,
4806
- ut as InvestorCategoryType,
4807
- at as KycProcessStatus,
4824
+ mt as InvestorCategoryType,
4825
+ st as KycProcessStatus,
4808
4826
  pe as KycStatus,
4809
4827
  Be as KycStatusDisplay,
4810
- Hr as KycWorkflow,
4811
- Kr as Logo,
4812
- $e as MetaKYCContext,
4828
+ Vr as KycWorkflow,
4829
+ Cr as Logo,
4830
+ je as MetaKYCContext,
4813
4831
  le as MetaKYCError,
4814
- Lr as MetaKYCProvider,
4815
- zt as OnfidoProvider,
4816
- wt as OverviewService,
4817
- xr as OverviewStep,
4818
- tr as PhoneInput,
4819
- bt as QuestionnaireService,
4820
- fr as QuestionnaireStep,
4832
+ Mr as MetaKYCProvider,
4833
+ $t as OnfidoProvider,
4834
+ kt as OverviewService,
4835
+ vr as OverviewStep,
4836
+ rr as PhoneInput,
4837
+ xt as QuestionnaireService,
4838
+ br as QuestionnaireStep,
4821
4839
  ge as ReviewStatus,
4822
- ct as RiskCriteriaType,
4823
- rt as RiskLevel,
4824
- kt as RiskScoringService,
4825
- vr as RiskScoringStep,
4840
+ dt as RiskCriteriaType,
4841
+ nt as RiskLevel,
4842
+ Nt as RiskScoringService,
4843
+ wr as RiskScoringStep,
4826
4844
  _t as SardinAIProvider,
4827
4845
  ye as Select,
4828
- se as Spinner,
4829
- Mt as StepRouter,
4830
- Ot as SumsubProvider,
4846
+ ie as Spinner,
4847
+ Bt as StepRouter,
4848
+ zt as SumsubProvider,
4831
4849
  jt as ThemeManager,
4832
4850
  Y as ThemePreset,
4833
- Ft as ThemeService,
4834
- xt as UploadDocumentService,
4835
- br as UploadDocumentStep,
4836
- st as UserType,
4851
+ Lt as ThemeService,
4852
+ vt as UploadDocumentService,
4853
+ xr as UploadDocumentStep,
4854
+ it as UserType,
4837
4855
  Ee as ValueDataType,
4838
- Bt as WorkflowOrchestrator,
4856
+ Ot as WorkflowOrchestrator,
4839
4857
  ke as WorkflowResultType,
4840
- Tt as WorkflowState,
4841
- K as WorkflowStepAction,
4842
- Ur as appropriatenessTestSchema,
4843
- zr as clearAllStorage,
4844
- qt as clearApplicantId,
4845
- Vt as clearWorkflowState,
4858
+ Mt as WorkflowState,
4859
+ U as WorkflowStepAction,
4860
+ qr as appropriatenessTestSchema,
4861
+ _r as clearAllStorage,
4862
+ Ht as clearApplicantId,
4863
+ Yt as clearWorkflowState,
4846
4864
  J as cn,
4847
- At as corporateTheme,
4848
- pt as defaultConfig,
4865
+ Et as corporateTheme,
4866
+ gt as defaultConfig,
4849
4867
  ee as defaultTheme,
4850
- $t as fileToBase64,
4851
- Et as fintechTheme,
4868
+ Kt as fileToBase64,
4869
+ It as fintechTheme,
4852
4870
  Ce as formatFileSize,
4853
- $r as generateAppropriatenessSchema,
4854
- hr as generateQuestionnaireSchema,
4855
- gr as generateRiskScoringSchema,
4856
- jr as generateUploadDocumentSchema,
4857
- Br as getAcceptString,
4858
- Kt as getApplicantId,
4871
+ Ur as generateAppropriatenessSchema,
4872
+ pr as generateQuestionnaireSchema,
4873
+ yr as generateRiskScoringSchema,
4874
+ Kr as generateUploadDocumentSchema,
4875
+ zr as getAcceptString,
4876
+ qt as getApplicantId,
4859
4877
  ve as getThemePreset,
4860
- Or as getWorkflowState,
4861
- It as healthcareTheme,
4862
- Pr as isScriptLoaded,
4863
- je as loadScript,
4864
- Dt as minimalTheme,
4865
- Rt as modernTheme,
4866
- Fr as removeScript,
4878
+ $r as getWorkflowState,
4879
+ Rt as healthcareTheme,
4880
+ Lr as isScriptLoaded,
4881
+ _e as loadScript,
4882
+ Pt as minimalTheme,
4883
+ Dt as modernTheme,
4884
+ Tr as removeScript,
4867
4885
  Ut as saveApplicantId,
4868
- Ht as saveWorkflowState,
4869
- Pt as themePresets,
4870
- Xt as useApplicant,
4871
- _r as useAppropriatenessTest,
4872
- Zt as useIdentityVerification,
4873
- Yt as useKycWorkflow,
4874
- ie as useMetaKYC,
4875
- Gt as useOverview,
4876
- Wt as useQuestionnaire,
4877
- Jt as useRiskScoring,
4878
- Qt as useUploadDocument,
4879
- Tr as validateFileSize,
4880
- Mr as validateFileType
4886
+ Vt as saveWorkflowState,
4887
+ Ft as themePresets,
4888
+ er as useApplicant,
4889
+ jr as useAppropriatenessTest,
4890
+ Jt as useIdentityVerification,
4891
+ Wt as useKycWorkflow,
4892
+ re as useMetaKYC,
4893
+ Zt as useOverview,
4894
+ Qt as useQuestionnaire,
4895
+ Xt as useRiskScoring,
4896
+ Gt as useUploadDocument,
4897
+ Br as validateFileSize,
4898
+ Or as validateFileType
4881
4899
  };
4882
4900
  //# sourceMappingURL=index.js.map