@vpdev2/metakyc 1.0.44 → 1.0.45

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
@@ -6794,7 +6794,7 @@ function G(e, t) {
6794
6794
  const r = Sr.exec(a);
6795
6795
  return r ? t(r[1]) : e;
6796
6796
  }
6797
- const ii = "1.0.44", ri = Xt(null), qt = `metakyc-translations-${ii}-`, Cr = ({
6797
+ const ii = "1.0.45", ri = Xt(null), qt = `metakyc-translations-${ii}-`, Cr = ({
6798
6798
  locale: e,
6799
6799
  fetchTranslations: t,
6800
6800
  children: a
@@ -6819,8 +6819,8 @@ const ii = "1.0.44", ri = Xt(null), qt = `metakyc-translations-${ii}-`, Cr = ({
6819
6819
  return;
6820
6820
  }
6821
6821
  console.debug("[MetaKYC i18n] Remote overrides loaded for locale:", r, d);
6822
- const y = At(r), w = Ot(y, d);
6823
- o(w);
6822
+ const y = At(r), h = Ot(y, d);
6823
+ o(h);
6824
6824
  try {
6825
6825
  localStorage.setItem(qt + r, JSON.stringify(d));
6826
6826
  } catch {
@@ -6860,7 +6860,7 @@ function Tr() {
6860
6860
  const Wt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
6861
6861
  Tr();
6862
6862
  const [a, r] = S(null), n = Ne.useRef(!1), l = Ne.useRef(!1), o = Fe(() => {
6863
- const d = new Li(e), y = new Ei(d), w = new Pi(d), z = new Di(d), L = new Mi(d), C = new ji(d), q = new Fi(d), T = new Oi(d), P = new Vi(d), B = new Bi(d), O = new $i(d), U = new _i(d), H = new ar();
6863
+ const d = new Li(e), y = new Ei(d), h = new Pi(d), z = new Di(d), L = new Mi(d), C = new ji(d), q = new Fi(d), T = new Oi(d), P = new Vi(d), B = new Bi(d), O = new $i(d), U = new _i(d), H = new ar();
6864
6864
  if (typeof document < "u")
6865
6865
  if (e.theme)
6866
6866
  H.applyTheme(e.theme);
@@ -6874,7 +6874,7 @@ const Wt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
6874
6874
  return {
6875
6875
  httpClient: d,
6876
6876
  applicantService: y,
6877
- questionnaireService: w,
6877
+ questionnaireService: h,
6878
6878
  uploadDocumentService: z,
6879
6879
  appropriatenessTestService: L,
6880
6880
  overviewService: C,
@@ -7067,7 +7067,7 @@ function Pr(e) {
7067
7067
  nextWorkflowKey: a.nextWorkflowKey
7068
7068
  }));
7069
7069
  }, [a, d]);
7070
- const y = ue(!1), w = ue(!1), z = ie(async () => {
7070
+ const y = ue(!1), h = ue(!1), z = ie(async () => {
7071
7071
  if (!(!d || !m.current)) {
7072
7072
  if (y.current) {
7073
7073
  console.log("[Workflow] Load already in progress, skipping...");
@@ -7076,7 +7076,7 @@ function Pr(e) {
7076
7076
  y.current = !0, l(!0), p(null);
7077
7077
  try {
7078
7078
  const O = await m.current.initialize(d);
7079
- r(O), w.current = !0;
7079
+ r(O), h.current = !0;
7080
7080
  } catch (O) {
7081
7081
  p(O);
7082
7082
  } finally {
@@ -7085,7 +7085,7 @@ function Pr(e) {
7085
7085
  }
7086
7086
  }, [d]);
7087
7087
  be(() => {
7088
- d && !w.current && z();
7088
+ d && !h.current && z();
7089
7089
  }, [d, z]);
7090
7090
  const L = ie(async () => {
7091
7091
  if (m.current) {
@@ -7163,7 +7163,7 @@ function Pr(e) {
7163
7163
  };
7164
7164
  }
7165
7165
  function Dr(e) {
7166
- const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [w, z] = S(null), L = ue(!1), C = ue(null), q = ie(async () => {
7166
+ const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [h, z] = S(null), L = ue(!1), C = ue(null), q = ie(async () => {
7167
7167
  var P, B;
7168
7168
  if (e) {
7169
7169
  if (L.current) {
@@ -7178,12 +7178,12 @@ function Dr(e) {
7178
7178
  ]);
7179
7179
  if (n(O), (P = U == null ? void 0 : U.questionnaireResults) != null && P.length && O) {
7180
7180
  const H = /* @__PURE__ */ new Map();
7181
- for (const h of U.questionnaireResults)
7182
- h.question && ((B = h.answers) != null && B.length) && H.set(h.question.trim().toLowerCase(), h.answers);
7183
- const J = {}, re = O.questionGroups.flatMap((h) => h.questions ?? []);
7184
- for (const h of re) {
7185
- const R = h.text.trim().toLowerCase();
7186
- H.has(R) && (J[h.id] = H.get(R));
7181
+ for (const b of U.questionnaireResults)
7182
+ b.question && ((B = b.answers) != null && B.length) && H.set(b.question.trim().toLowerCase(), b.answers);
7183
+ const J = {}, re = O.questionGroups.flatMap((b) => b.questions ?? []);
7184
+ for (const b of re) {
7185
+ const R = b.text.trim().toLowerCase();
7186
+ H.has(R) && (J[b.id] = H.get(R));
7187
7187
  }
7188
7188
  o(J);
7189
7189
  }
@@ -7216,24 +7216,24 @@ function Dr(e) {
7216
7216
  initialAnswers: l,
7217
7217
  isLoading: p,
7218
7218
  isSubmitting: d,
7219
- error: w,
7219
+ error: h,
7220
7220
  load: q,
7221
7221
  submit: T
7222
7222
  };
7223
7223
  }
7224
7224
  function Mr(e) {
7225
- const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(0), [y, w] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7225
+ const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(0), [y, h] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7226
7226
  if (e) {
7227
7227
  if (z.current) {
7228
7228
  console.log("[UploadDocument] Load already in progress, skipping...");
7229
7229
  return;
7230
7230
  }
7231
- z.current = !0, l(!0), w(null);
7231
+ z.current = !0, l(!0), h(null);
7232
7232
  try {
7233
7233
  const T = await t.getUploadDocument(e);
7234
7234
  r(T), L.current = e;
7235
7235
  } catch (T) {
7236
- w(T);
7236
+ h(T);
7237
7237
  } finally {
7238
7238
  l(!1), z.current = !1;
7239
7239
  }
@@ -7244,11 +7244,11 @@ function Mr(e) {
7244
7244
  }, [e]);
7245
7245
  const q = ie(
7246
7246
  async (T) => {
7247
- p(!0), d(0), w(null);
7247
+ p(!0), d(0), h(null);
7248
7248
  try {
7249
7249
  await t.fillUploadDocument(T), d(100);
7250
7250
  } catch (P) {
7251
- throw w(P), P;
7251
+ throw h(P), P;
7252
7252
  } finally {
7253
7253
  p(!1);
7254
7254
  }
@@ -7266,7 +7266,7 @@ function Mr(e) {
7266
7266
  };
7267
7267
  }
7268
7268
  function Ba(e) {
7269
- const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), [y, w] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7269
+ const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), [y, h] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
7270
7270
  if (e) {
7271
7271
  if (z.current) {
7272
7272
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
@@ -7291,7 +7291,7 @@ function Ba(e) {
7291
7291
  p(!0), d(null);
7292
7292
  try {
7293
7293
  const P = await t.fillAppropriatenessTest(T);
7294
- return w(P), P;
7294
+ return h(P), P;
7295
7295
  } catch (P) {
7296
7296
  throw d(P), P;
7297
7297
  } finally {
@@ -7311,7 +7311,7 @@ function Ba(e) {
7311
7311
  };
7312
7312
  }
7313
7313
  function jr(e) {
7314
- const { overviewService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), y = ue(!1), w = ue(null), z = ie(async () => {
7314
+ const { overviewService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), y = ue(!1), h = ue(null), z = ie(async () => {
7315
7315
  if (e) {
7316
7316
  if (y.current) {
7317
7317
  console.log("[Overview] Load already in progress, skipping...");
@@ -7320,7 +7320,7 @@ function jr(e) {
7320
7320
  y.current = !0, l(!0), d(null);
7321
7321
  try {
7322
7322
  const C = await t.getOverviewData(e);
7323
- r(C), w.current = e;
7323
+ r(C), h.current = e;
7324
7324
  } catch (C) {
7325
7325
  d(C);
7326
7326
  } finally {
@@ -7329,7 +7329,7 @@ function jr(e) {
7329
7329
  }
7330
7330
  }, [e, t]);
7331
7331
  be(() => {
7332
- e && w.current !== e && z();
7332
+ e && h.current !== e && z();
7333
7333
  }, [e]);
7334
7334
  const L = ie(async () => {
7335
7335
  if (e) {
@@ -7402,7 +7402,7 @@ function Fr(e) {
7402
7402
  }
7403
7403
  },
7404
7404
  [e, t]
7405
- ), w = ie(async () => {
7405
+ ), h = ie(async () => {
7406
7406
  if (e) {
7407
7407
  if (m.current) {
7408
7408
  console.log("[Identity] Restart already in progress, skipping...");
@@ -7435,11 +7435,11 @@ function Fr(e) {
7435
7435
  error: o,
7436
7436
  requestIdentity: d,
7437
7437
  requestCompanyIdentity: y,
7438
- restartIdentity: w
7438
+ restartIdentity: h
7439
7439
  };
7440
7440
  }
7441
7441
  function Or(e) {
7442
- const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [w, z] = S(null), [L, C] = S(null), q = ue(!1), T = ue(null), P = ie(async () => {
7442
+ const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [h, z] = S(null), [L, C] = S(null), q = ue(!1), T = ue(null), P = ie(async () => {
7443
7443
  var O;
7444
7444
  if (e) {
7445
7445
  if (q.current) {
@@ -7454,12 +7454,12 @@ function Or(e) {
7454
7454
  ]);
7455
7455
  if (n(U), (O = H == null ? void 0 : H.riskScoringResults) != null && O.length) {
7456
7456
  const J = H.riskScoringResults[0], re = {};
7457
- for (const h of J.riskCriteriaResults ?? [])
7458
- if (h.riskCriteriaId != null && h.answer != null && h.answer !== "") {
7457
+ for (const b of J.riskCriteriaResults ?? [])
7458
+ if (b.riskCriteriaId != null && b.answer != null && b.answer !== "") {
7459
7459
  const R = [...new Set(
7460
- h.answer.split(",").map((V) => V.trim()).filter((V) => V !== "")
7460
+ b.answer.split(",").map((V) => V.trim()).filter((V) => V !== "")
7461
7461
  )];
7462
- R.length > 0 && (re[h.riskCriteriaId] = R);
7462
+ R.length > 0 && (re[b.riskCriteriaId] = R);
7463
7463
  }
7464
7464
  o(re);
7465
7465
  }
@@ -7494,7 +7494,7 @@ function Or(e) {
7494
7494
  result: L,
7495
7495
  isLoading: p,
7496
7496
  isSubmitting: d,
7497
- error: w,
7497
+ error: h,
7498
7498
  load: P,
7499
7499
  submit: B
7500
7500
  };
@@ -7537,7 +7537,7 @@ function ni() {
7537
7537
  }
7538
7538
  },
7539
7539
  [e]
7540
- ), w = ie(
7540
+ ), h = ie(
7541
7541
  async (L) => {
7542
7542
  if (p.current)
7543
7543
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
@@ -7569,7 +7569,7 @@ function ni() {
7569
7569
  error: n,
7570
7570
  createApplicant: d,
7571
7571
  createCompanyApplicant: y,
7572
- getApplicantData: w,
7572
+ getApplicantData: h,
7573
7573
  stopProgress: z
7574
7574
  };
7575
7575
  }
@@ -7984,7 +7984,7 @@ const Kt = 280, Ur = ({
7984
7984
  readOnly: o = !1,
7985
7985
  required: p = !1
7986
7986
  }) => {
7987
- const { t: m } = Ie(), d = n ?? m("common.select"), y = l || o, [w, z] = S(!1), [L, C] = S(""), [q, T] = S(null), [P, B] = S({
7987
+ const { t: m } = Ie(), d = n ?? m("common.select"), y = l || o, [h, z] = S(!1), [L, C] = S(""), [q, T] = S(null), [P, B] = S({
7988
7988
  bg: "#ffffff",
7989
7989
  borderColor: "#d1d5db",
7990
7990
  textPrimary: "#111827",
@@ -8007,7 +8007,7 @@ const Kt = 280, Ur = ({
8007
8007
  primaryLight: E("--metakyc-primary-light", "#eff6ff"),
8008
8008
  hoverBg: E("--metakyc-surface", F)
8009
8009
  });
8010
- }, []), h = ie(() => {
8010
+ }, []), b = ie(() => {
8011
8011
  if (y) return;
8012
8012
  re();
8013
8013
  const M = J();
@@ -8016,15 +8016,15 @@ const Kt = 280, Ur = ({
8016
8016
  z(!1), C("");
8017
8017
  }, []);
8018
8018
  be(() => {
8019
- if (!w) return;
8019
+ if (!h) return;
8020
8020
  const M = (E) => {
8021
8021
  var xe, de;
8022
8022
  const F = E.target;
8023
8023
  !((xe = O.current) != null && xe.contains(F)) && !((de = H.current) != null && de.contains(F)) && R();
8024
8024
  };
8025
8025
  return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
8026
- }, [w, R]), be(() => {
8027
- if (!w) return;
8026
+ }, [h, R]), be(() => {
8027
+ if (!h) return;
8028
8028
  const M = () => {
8029
8029
  const E = J();
8030
8030
  E && T(E);
@@ -8032,7 +8032,7 @@ const Kt = 280, Ur = ({
8032
8032
  return window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), () => {
8033
8033
  window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M);
8034
8034
  };
8035
- }, [w, J]);
8035
+ }, [h, J]);
8036
8036
  const V = r.filter(
8037
8037
  (M) => M.label.toLowerCase().includes(L.toLowerCase())
8038
8038
  ), Q = (M) => {
@@ -8042,7 +8042,7 @@ const Kt = 280, Ur = ({
8042
8042
  }, W = (M) => {
8043
8043
  var E;
8044
8044
  return ((E = r.find((F) => F.value === M)) == null ? void 0 : E.label) || M;
8045
- }, { bg: X, borderColor: ce, textPrimary: Y, textSecondary: je, primaryColor: ye, primaryLight: fe, hoverBg: Se } = P, pe = w && q && /* @__PURE__ */ s(
8045
+ }, { bg: X, borderColor: ce, textPrimary: Y, textSecondary: je, primaryColor: ye, primaryLight: fe, hoverBg: Se } = P, pe = h && q && /* @__PURE__ */ s(
8046
8046
  "div",
8047
8047
  {
8048
8048
  ref: H,
@@ -8166,7 +8166,7 @@ const Kt = 280, Ur = ({
8166
8166
  "div",
8167
8167
  {
8168
8168
  ref: U,
8169
- onClick: () => w ? R() : h(),
8169
+ onClick: () => h ? R() : b(),
8170
8170
  className: Me(
8171
8171
  "metakyc-multiselect-trigger",
8172
8172
  "w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
@@ -8175,8 +8175,8 @@ const Kt = 280, Ur = ({
8175
8175
  style: {
8176
8176
  minHeight: "38px",
8177
8177
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
8178
- borderColor: w ? "var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
8179
- outline: w ? "2px solid var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "none",
8178
+ borderColor: h ? "var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
8179
+ outline: h ? "2px solid var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))" : "none",
8180
8180
  outlineOffset: "-1px"
8181
8181
  },
8182
8182
  children: [
@@ -8234,7 +8234,7 @@ const Kt = 280, Ur = ({
8234
8234
  {
8235
8235
  className: "metakyc-multiselect-arrow absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-xs",
8236
8236
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
8237
- children: w ? "▲" : "▼"
8237
+ children: h ? "▲" : "▼"
8238
8238
  }
8239
8239
  )
8240
8240
  ]
@@ -8256,7 +8256,7 @@ const Kt = 280, Ur = ({
8256
8256
  className: y
8257
8257
  }) => {
8258
8258
  var de;
8259
- const { t: w } = Ie(), z = n ?? w("common.select"), L = p || m, [C, q] = S(!1), [T, P] = S(""), [B, O] = S(null), [U, H] = S({
8259
+ const { t: h } = Ie(), z = n ?? h("common.select"), L = p || m, [C, q] = S(!1), [T, P] = S(""), [B, O] = S(null), [U, H] = S({
8260
8260
  bg: "#ffffff",
8261
8261
  border: "#d1d5db",
8262
8262
  text: "#111827",
@@ -8275,9 +8275,9 @@ const Kt = 280, Ur = ({
8275
8275
  primaryLight: _("--metakyc-primary-light", "#eff6ff"),
8276
8276
  hoverBg: _("--metakyc-surface", ge)
8277
8277
  });
8278
- }, []), re = ue(null), h = ue(null), R = ue(null), V = ue(null), Q = ie(() => {
8279
- if (!h.current) return null;
8280
- const D = h.current.getBoundingClientRect(), ge = window.innerHeight - D.bottom < Yt && D.top > Yt;
8278
+ }, []), re = ue(null), b = ue(null), R = ue(null), V = ue(null), Q = ie(() => {
8279
+ if (!b.current) return null;
8280
+ const D = b.current.getBoundingClientRect(), ge = window.innerHeight - D.bottom < Yt && D.top > Yt;
8281
8281
  return {
8282
8282
  top: ge ? D.top : D.bottom + 4,
8283
8283
  left: D.left,
@@ -8345,7 +8345,7 @@ const Kt = 280, Ur = ({
8345
8345
  type: "text",
8346
8346
  value: T,
8347
8347
  onChange: (D) => P(D.target.value),
8348
- placeholder: w("common.search"),
8348
+ placeholder: h("common.search"),
8349
8349
  onClick: (D) => D.stopPropagation(),
8350
8350
  className: "metakyc-searchable-select-search w-full",
8351
8351
  style: {
@@ -8379,7 +8379,7 @@ const Kt = 280, Ur = ({
8379
8379
  maxHeight: "208px",
8380
8380
  overflowY: "auto"
8381
8381
  },
8382
- children: ce.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: pe }, children: w("common.noResults") }) : ce.map((D) => {
8382
+ children: ce.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: pe }, children: h("common.noResults") }) : ce.map((D) => {
8383
8383
  const _ = D.value === l;
8384
8384
  return /* @__PURE__ */ i(
8385
8385
  "li",
@@ -8431,7 +8431,7 @@ const Kt = 280, Ur = ({
8431
8431
  /* @__PURE__ */ s(
8432
8432
  "div",
8433
8433
  {
8434
- ref: h,
8434
+ ref: b,
8435
8435
  role: "button",
8436
8436
  tabIndex: L ? -1 : 0,
8437
8437
  onClick: X,
@@ -8490,27 +8490,27 @@ const Kr = ({
8490
8490
  value: m = [],
8491
8491
  className: d
8492
8492
  }) => {
8493
- const { t: y } = Ie(), [w, z] = S(!1), [L, C] = S(null), q = ue(null), T = ie((h) => {
8494
- if (!h) return;
8493
+ const { t: y } = Ie(), [h, z] = S(!1), [L, C] = S(null), q = ue(null), T = ie((b) => {
8494
+ if (!b) return;
8495
8495
  C(null);
8496
- const R = Array.from(h);
8496
+ const R = Array.from(b);
8497
8497
  if (l && R.filter((Q) => Q.size > l).length > 0) {
8498
8498
  C(`File exceeds the maximum size of ${Ct(l)}`);
8499
8499
  return;
8500
8500
  }
8501
8501
  p == null || p(n ? [...m, ...R] : [R[0]]);
8502
- }, [l, n, p, m]), P = ie((h) => {
8503
- h.preventDefault(), h.stopPropagation(), z(!0);
8504
- }, []), B = ie((h) => {
8505
- h.preventDefault(), h.stopPropagation(), z(!1);
8506
- }, []), O = ie((h) => {
8507
- h.preventDefault(), h.stopPropagation(), z(!1), T(h.dataTransfer.files);
8502
+ }, [l, n, p, m]), P = ie((b) => {
8503
+ b.preventDefault(), b.stopPropagation(), z(!0);
8504
+ }, []), B = ie((b) => {
8505
+ b.preventDefault(), b.stopPropagation(), z(!1);
8506
+ }, []), O = ie((b) => {
8507
+ b.preventDefault(), b.stopPropagation(), z(!1), T(b.dataTransfer.files);
8508
8508
  }, [T]), U = () => {
8509
- var h;
8510
- (h = q.current) == null || h.click();
8511
- }, H = (h) => {
8509
+ var b;
8510
+ (b = q.current) == null || b.click();
8511
+ }, H = (b) => {
8512
8512
  C(null);
8513
- const R = m.filter((V, Q) => Q !== h);
8513
+ const R = m.filter((V, Q) => Q !== b);
8514
8514
  p == null || p(R);
8515
8515
  }, J = a || L, re = m.length > 0;
8516
8516
  return /* @__PURE__ */ s("div", { className: Me("metakyc-file-upload", d), style: { width: "100%" }, children: [
@@ -8541,13 +8541,13 @@ const Kr = ({
8541
8541
  onDragLeave: B,
8542
8542
  onDrop: O,
8543
8543
  style: {
8544
- border: `2px dashed ${J ? "var(--metakyc-danger, #ef4444)" : w ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
8544
+ border: `2px dashed ${J ? "var(--metakyc-danger, #ef4444)" : h ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
8545
8545
  borderRadius: "12px",
8546
8546
  padding: re ? "20px" : "32px 20px",
8547
8547
  textAlign: "center",
8548
8548
  cursor: "pointer",
8549
8549
  transition: "all 0.2s ease",
8550
- backgroundColor: w ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)"
8550
+ backgroundColor: h ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)"
8551
8551
  },
8552
8552
  children: [
8553
8553
  /* @__PURE__ */ i(
@@ -8558,8 +8558,8 @@ const Kr = ({
8558
8558
  style: { display: "none" },
8559
8559
  accept: r,
8560
8560
  multiple: n,
8561
- onChange: (h) => {
8562
- T(h.target.files), h.target.value = "";
8561
+ onChange: (b) => {
8562
+ T(b.target.files), b.target.value = "";
8563
8563
  }
8564
8564
  }
8565
8565
  ),
@@ -8574,7 +8574,7 @@ const Kr = ({
8574
8574
  display: "flex",
8575
8575
  alignItems: "center",
8576
8576
  justifyContent: "center",
8577
- backgroundColor: w ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
8577
+ backgroundColor: h ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
8578
8578
  transition: "background-color 0.2s ease"
8579
8579
  },
8580
8580
  children: /* @__PURE__ */ s(
@@ -8584,7 +8584,7 @@ const Kr = ({
8584
8584
  height: "24",
8585
8585
  viewBox: "0 0 24 24",
8586
8586
  fill: "none",
8587
- stroke: w ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
8587
+ stroke: h ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
8588
8588
  strokeWidth: "2",
8589
8589
  strokeLinecap: "round",
8590
8590
  strokeLinejoin: "round",
@@ -8614,8 +8614,8 @@ const Kr = ({
8614
8614
  ]
8615
8615
  }
8616
8616
  ),
8617
- re && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: m.map((h, R) => {
8618
- const V = Wr(h), Q = V === "image", ee = Q ? URL.createObjectURL(h) : null;
8617
+ re && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: m.map((b, R) => {
8618
+ const V = Wr(b), Q = V === "image", ee = Q ? URL.createObjectURL(b) : null;
8619
8619
  return /* @__PURE__ */ s(
8620
8620
  "div",
8621
8621
  {
@@ -8649,7 +8649,7 @@ const Kr = ({
8649
8649
  "img",
8650
8650
  {
8651
8651
  src: ee,
8652
- alt: h.name,
8652
+ alt: b.name,
8653
8653
  style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
8654
8654
  }
8655
8655
  ) : V === "pdf" ? /* @__PURE__ */ s("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -8673,8 +8673,8 @@ const Kr = ({
8673
8673
  overflow: "hidden",
8674
8674
  textOverflow: "ellipsis",
8675
8675
  whiteSpace: "nowrap"
8676
- }, children: h.name }),
8677
- /* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: Ct(h.size) })
8676
+ }, children: b.name }),
8677
+ /* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: Ct(b.size) })
8678
8678
  ] }),
8679
8679
  /* @__PURE__ */ i(
8680
8680
  "button",
@@ -8712,7 +8712,7 @@ const Kr = ({
8712
8712
  )
8713
8713
  ]
8714
8714
  },
8715
- `${h.name}-${R}`
8715
+ `${b.name}-${R}`
8716
8716
  );
8717
8717
  }) }),
8718
8718
  J && /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: J })
@@ -8942,33 +8942,33 @@ const ta = ({
8942
8942
  onComplete: t,
8943
8943
  onBack: a
8944
8944
  }) => {
8945
- const { t: r } = Ie(), { questionnaire: n, initialAnswers: l, isLoading: o, isSubmitting: p, error: m, submit: d } = Dr(e), [y, w] = S({}), [z, L] = S({}), [C, q] = S(0);
8945
+ const { t: r } = Ie(), { questionnaire: n, initialAnswers: l, isLoading: o, isSubmitting: p, error: m, submit: d } = Dr(e), [y, h] = S({}), [z, L] = S({}), [C, q] = S(0);
8946
8946
  Ne.useEffect(() => {
8947
- l && Object.keys(l).length > 0 && Object.keys(y).length === 0 && w(l);
8947
+ l && Object.keys(l).length > 0 && Object.keys(y).length === 0 && h(l);
8948
8948
  }, [l]);
8949
8949
  const T = Fe(
8950
8950
  () => n ? ea(n.questionGroups) : [],
8951
8951
  [n]
8952
- ), P = C === T.length - 1, B = T[C] ?? [], O = ie((h, R) => {
8953
- w((V) => ({ ...V, [h]: R })), L((V) => {
8952
+ ), P = C === T.length - 1, B = T[C] ?? [], O = ie((b, R) => {
8953
+ h((V) => ({ ...V, [b]: R })), L((V) => {
8954
8954
  const Q = { ...V };
8955
- return delete Q[h], Q;
8955
+ return delete Q[b], Q;
8956
8956
  });
8957
8957
  }, []), U = ie(() => {
8958
- const h = {};
8958
+ const b = {};
8959
8959
  for (const { question: R } of B) {
8960
8960
  const V = Jr(R, y[R.id] ?? []);
8961
- V && (h[R.id] = V);
8961
+ V && (b[R.id] = V);
8962
8962
  }
8963
- return L((R) => ({ ...R, ...h })), Object.keys(h).length === 0;
8963
+ return L((R) => ({ ...R, ...b })), Object.keys(b).length === 0;
8964
8964
  }, [B, y]), H = () => {
8965
- U() && q((h) => h + 1);
8965
+ U() && q((b) => b + 1);
8966
8966
  }, J = () => {
8967
- C > 0 ? q((h) => h - 1) : a == null || a();
8967
+ C > 0 ? q((b) => b - 1) : a == null || a();
8968
8968
  }, re = async () => {
8969
8969
  if (!(!U() || !n))
8970
8970
  try {
8971
- const h = n.questionGroups.flatMap(
8971
+ const b = n.questionGroups.flatMap(
8972
8972
  (V) => (V.questions ?? []).map((Q) => ({
8973
8973
  questionId: Q.id,
8974
8974
  values: y[Q.id] ?? []
@@ -8976,11 +8976,11 @@ const ta = ({
8976
8976
  ), R = {
8977
8977
  applicantId: e,
8978
8978
  questionnarieId: n.id,
8979
- questionResults: h
8979
+ questionResults: b
8980
8980
  };
8981
8981
  await d(R), t == null || t();
8982
- } catch (h) {
8983
- console.error("Questionnaire submit error:", h);
8982
+ } catch (b) {
8983
+ console.error("Questionnaire submit error:", b);
8984
8984
  }
8985
8985
  };
8986
8986
  return o ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : m ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
@@ -8993,7 +8993,7 @@ const ta = ({
8993
8993
  n.subtitle && /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.subtitle }),
8994
8994
  T.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
8995
8995
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: C + 1, total: T.length }) }),
8996
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: T.map((h, R) => /* @__PURE__ */ i(
8996
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: T.map((b, R) => /* @__PURE__ */ i(
8997
8997
  "div",
8998
8998
  {
8999
8999
  className: "rounded-full transition-all duration-200",
@@ -9007,15 +9007,15 @@ const ta = ({
9007
9007
  )) })
9008
9008
  ] })
9009
9009
  ] }),
9010
- /* @__PURE__ */ i(oe, { className: "space-y-6", children: B.map(({ question: h }) => /* @__PURE__ */ i(
9010
+ /* @__PURE__ */ i(oe, { className: "space-y-6", children: B.map(({ question: b }) => /* @__PURE__ */ i(
9011
9011
  ia,
9012
9012
  {
9013
- question: h,
9014
- value: y[h.id] ?? [],
9015
- error: z[h.id],
9016
- onChange: (R) => O(h.id, R)
9013
+ question: b,
9014
+ value: y[b.id] ?? [],
9015
+ error: z[b.id],
9016
+ onChange: (R) => O(b.id, R)
9017
9017
  },
9018
- h.id
9018
+ b.id
9019
9019
  )) }),
9020
9020
  /* @__PURE__ */ s(Re, { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
9021
9021
  /* @__PURE__ */ s(
@@ -9090,10 +9090,11 @@ const ta = ({
9090
9090
  ),
9091
9091
  o === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
9092
9092
  (e.defaultAnswers ?? []).map((m) => /* @__PURE__ */ s(
9093
- "label",
9093
+ "div",
9094
9094
  {
9095
9095
  className: "metakyc-option-label",
9096
- style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
9096
+ onClick: () => r([m]),
9097
+ style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
9097
9098
  children: [
9098
9099
  /* @__PURE__ */ i(
9099
9100
  "input",
@@ -9101,6 +9102,7 @@ const ta = ({
9101
9102
  type: "radio",
9102
9103
  checked: t[0] === m,
9103
9104
  onChange: () => r([m]),
9105
+ onClick: (d) => d.stopPropagation(),
9104
9106
  className: "metakyc-option-input",
9105
9107
  style: {
9106
9108
  width: "16px",
@@ -9125,26 +9127,24 @@ const ta = ({
9125
9127
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
9126
9128
  ] }),
9127
9129
  (o === "checkbox" || o === "multi-select") && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
9128
- (e.defaultAnswers ?? []).map((m) => /* @__PURE__ */ s(
9129
- "label",
9130
- {
9131
- className: "metakyc-option-label",
9132
- style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
9133
- children: [
9134
- /* @__PURE__ */ i(
9135
- We,
9136
- {
9137
- checked: t.includes(m),
9138
- onChange: (d) => {
9139
- r(d ? [...t, m] : t.filter((y) => y !== m));
9140
- }
9141
- }
9142
- ),
9143
- /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: m })
9144
- ]
9145
- },
9146
- m
9147
- )),
9130
+ (e.defaultAnswers ?? []).map((m) => {
9131
+ const d = t.includes(m), y = () => {
9132
+ r(d ? t.filter((h) => h !== m) : [...t, m]);
9133
+ };
9134
+ return /* @__PURE__ */ s(
9135
+ "div",
9136
+ {
9137
+ className: "metakyc-option-label",
9138
+ onClick: y,
9139
+ style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
9140
+ children: [
9141
+ /* @__PURE__ */ i(We, { checked: d, onChange: () => y() }),
9142
+ /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: m })
9143
+ ]
9144
+ },
9145
+ m
9146
+ );
9147
+ }),
9148
9148
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
9149
9149
  ] }),
9150
9150
  a && o === "text" && null
@@ -9163,7 +9163,7 @@ const aa = ({
9163
9163
  onComplete: t,
9164
9164
  onBack: a
9165
9165
  }) => {
9166
- const { t: r } = Ie(), { uploadDocument: n, isLoading: l, isSubmitting: o, error: p, submit: m } = Mr(e), [d, y] = S({}), [w, z] = S(null), [L, C] = S(0), [q, T] = S({}), P = Fe(
9166
+ const { t: r } = Ie(), { uploadDocument: n, isLoading: l, isSubmitting: o, error: p, submit: m } = Mr(e), [d, y] = S({}), [h, z] = S(null), [L, C] = S(0), [q, T] = S({}), P = Fe(
9167
9167
  () => n ? ra(n.uploadDocumentFiles) : [],
9168
9168
  [n]
9169
9169
  ), B = P[L] ?? [], O = L === P.length - 1, U = P.length, H = ie(() => {
@@ -9175,7 +9175,7 @@ const aa = ({
9175
9175
  H() && (C((R) => R + 1), T({}));
9176
9176
  }, re = () => {
9177
9177
  L > 0 ? (C((R) => R - 1), T({})) : a == null || a();
9178
- }, h = async () => {
9178
+ }, b = async () => {
9179
9179
  if (!(!H() || !n)) {
9180
9180
  z(null);
9181
9181
  try {
@@ -9320,7 +9320,7 @@ const aa = ({
9320
9320
  },
9321
9321
  R.id
9322
9322
  )) }) }),
9323
- w && /* @__PURE__ */ s("div", { style: {
9323
+ h && /* @__PURE__ */ s("div", { style: {
9324
9324
  margin: "0 24px",
9325
9325
  padding: "10px 14px",
9326
9326
  borderRadius: "8px",
@@ -9335,7 +9335,7 @@ const aa = ({
9335
9335
  /* @__PURE__ */ i("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
9336
9336
  /* @__PURE__ */ i("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
9337
9337
  ] }),
9338
- /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: w })
9338
+ /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: h })
9339
9339
  ] }),
9340
9340
  /* @__PURE__ */ i(Re, { children: /* @__PURE__ */ s("div", { style: {
9341
9341
  display: "flex",
@@ -9357,7 +9357,7 @@ const aa = ({
9357
9357
  {
9358
9358
  type: "button",
9359
9359
  isLoading: o,
9360
- onClick: h,
9360
+ onClick: b,
9361
9361
  children: r(o ? "uploadDocument.uploading" : "common.continue")
9362
9362
  }
9363
9363
  ) : /* @__PURE__ */ i(
@@ -9383,7 +9383,7 @@ const aa = ({
9383
9383
  /* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.title || r("overview.title") }),
9384
9384
  n.description && /* @__PURE__ */ i("p", { className: "mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.description })
9385
9385
  ] }),
9386
- /* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((y, w) => y.order - w.order).map((y) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
9386
+ /* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((y, h) => y.order - h.order).map((y) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
9387
9387
  /* @__PURE__ */ i("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ i(
9388
9388
  "div",
9389
9389
  {
@@ -9481,7 +9481,7 @@ const ua = ({
9481
9481
  onComplete: t,
9482
9482
  onBack: a
9483
9483
  }) => {
9484
- const { t: r } = Ie(), { config: n } = Oe(), l = n.locale ?? "en", { criteria: o, initialAnswers: p, isLoading: m, isSubmitting: d, error: y, submit: w } = Or(e), [z, L] = S({}), [C, q] = S({}), [T, P] = S(0), [B, O] = S(!1);
9484
+ const { t: r } = Ie(), { config: n } = Oe(), l = n.locale ?? "en", { criteria: o, initialAnswers: p, isLoading: m, isSubmitting: d, error: y, submit: h } = Or(e), [z, L] = S({}), [C, q] = S({}), [T, P] = S(0), [B, O] = S(!1);
9485
9485
  Ne.useEffect(() => {
9486
9486
  p && Object.keys(p).length > 0 && Object.keys(z).length === 0 && L(p);
9487
9487
  }, [p]);
@@ -9490,14 +9490,14 @@ const ua = ({
9490
9490
  [o]
9491
9491
  ), H = T === U.length - 1, J = U[T] ?? [];
9492
9492
  Ne.useEffect(() => {
9493
- !m && o && o.length === 0 && !B && !d && (O(!0), w({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
9494
- }, [m, o, B, d, w, e, t]);
9493
+ !m && o && o.length === 0 && !B && !d && (O(!0), h({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
9494
+ }, [m, o, B, d, h, e, t]);
9495
9495
  const re = ie((ee, W) => {
9496
9496
  L((X) => ({ ...X, [ee]: W })), q((X) => {
9497
9497
  const ce = { ...X };
9498
9498
  return delete ce[ee], ce;
9499
9499
  });
9500
- }, []), h = ie(() => {
9500
+ }, []), b = ie(() => {
9501
9501
  const ee = {};
9502
9502
  for (const { criterion: W } of J) {
9503
9503
  const X = ca(W, z[W.id] ?? []);
@@ -9505,17 +9505,17 @@ const ua = ({
9505
9505
  }
9506
9506
  return q((W) => ({ ...W, ...ee })), Object.keys(ee).length === 0;
9507
9507
  }, [J, z]), R = () => {
9508
- h() && P((ee) => ee + 1);
9508
+ b() && P((ee) => ee + 1);
9509
9509
  }, V = () => {
9510
9510
  T > 0 ? P((ee) => ee - 1) : a == null || a();
9511
9511
  }, Q = async () => {
9512
- if (!(!h() || !o))
9512
+ if (!(!b() || !o))
9513
9513
  try {
9514
9514
  const ee = o.map((X) => {
9515
9515
  const ce = (z[X.id] ?? []).filter((Y) => Y && Y.trim());
9516
9516
  return ce.length > 0 ? { riskCriteriaId: X.id, values: ce } : null;
9517
9517
  }).filter((X) => X !== null);
9518
- await w({ applicantId: e, criteriaValueInputs: ee }), t == null || t();
9518
+ await h({ applicantId: e, criteriaValueInputs: ee }), t == null || t();
9519
9519
  } catch (ee) {
9520
9520
  console.error("Risk scoring submit error:", ee);
9521
9521
  }
@@ -9620,10 +9620,11 @@ const ua = ({
9620
9620
  ),
9621
9621
  o === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
9622
9622
  (e.defaultValues ?? []).map((y) => /* @__PURE__ */ s(
9623
- "label",
9623
+ "div",
9624
9624
  {
9625
9625
  className: "metakyc-option-label",
9626
- style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
9626
+ onClick: () => n([y]),
9627
+ style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
9627
9628
  children: [
9628
9629
  /* @__PURE__ */ i(
9629
9630
  "input",
@@ -9631,6 +9632,7 @@ const ua = ({
9631
9632
  type: "radio",
9632
9633
  checked: t[0] === y,
9633
9634
  onChange: () => n([y]),
9635
+ onClick: (h) => h.stopPropagation(),
9634
9636
  className: "metakyc-option-input",
9635
9637
  style: {
9636
9638
  width: "16px",
@@ -9655,26 +9657,24 @@ const ua = ({
9655
9657
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
9656
9658
  ] }),
9657
9659
  o === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
9658
- (e.defaultValues ?? []).map((y) => /* @__PURE__ */ s(
9659
- "label",
9660
- {
9661
- className: "metakyc-option-label",
9662
- style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
9663
- children: [
9664
- /* @__PURE__ */ i(
9665
- We,
9666
- {
9667
- checked: t.includes(y),
9668
- onChange: (w) => {
9669
- n(w ? [...t, y] : t.filter((z) => z !== y));
9670
- }
9671
- }
9672
- ),
9673
- /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: d(y) })
9674
- ]
9675
- },
9676
- y
9677
- )),
9660
+ (e.defaultValues ?? []).map((y) => {
9661
+ const h = t.includes(y), z = () => {
9662
+ n(h ? t.filter((L) => L !== y) : [...t, y]);
9663
+ };
9664
+ return /* @__PURE__ */ s(
9665
+ "div",
9666
+ {
9667
+ className: "metakyc-option-label",
9668
+ onClick: z,
9669
+ style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
9670
+ children: [
9671
+ /* @__PURE__ */ i(We, { checked: h, onChange: () => z() }),
9672
+ /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: d(y) })
9673
+ ]
9674
+ },
9675
+ y
9676
+ );
9677
+ }),
9678
9678
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
9679
9679
  ] }),
9680
9680
  o === "country" && /* @__PURE__ */ i(
@@ -9841,7 +9841,7 @@ const ya = ({
9841
9841
  onComplete: t,
9842
9842
  onBack: a
9843
9843
  }) => {
9844
- const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [l, o] = S(null), [p, m] = S(!0), [d, y] = S(!1), [w, z] = S(null), [L, C] = S({}), [q, T] = S(0), [P, B] = S(!1), [O, U] = S(!1), [H, J] = S(0), [re, h] = S(0), [R, V] = S(null);
9844
+ const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [l, o] = S(null), [p, m] = S(!0), [d, y] = S(!1), [h, z] = S(null), [L, C] = S({}), [q, T] = S(0), [P, B] = S(!1), [O, U] = S(!1), [H, J] = S(0), [re, b] = S(0), [R, V] = S(null);
9845
9845
  be(() => {
9846
9846
  (async () => {
9847
9847
  try {
@@ -9873,7 +9873,7 @@ const ya = ({
9873
9873
  O && !d && X();
9874
9874
  }, [O]);
9875
9875
  const Q = () => {
9876
- l && (B(!0), T(l.testDurationSec), h(0), C({}), z(null));
9876
+ l && (B(!0), T(l.testDurationSec), b(0), C({}), z(null));
9877
9877
  }, ee = (E, F) => {
9878
9878
  C((xe) => ({ ...xe, [E]: F }));
9879
9879
  }, W = ie(async () => {
@@ -9919,7 +9919,7 @@ const ya = ({
9919
9919
  }
9920
9920
  }
9921
9921
  }, ce = () => {
9922
- B(!1), U(!1), C({}), h(0);
9922
+ B(!1), U(!1), C({}), b(0);
9923
9923
  };
9924
9924
  if (p)
9925
9925
  return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
@@ -9929,7 +9929,7 @@ const ya = ({
9929
9929
  if (!l)
9930
9930
  return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
9931
9931
  /* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: r("appropriatenessTest.noTestData") }),
9932
- w && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: w })
9932
+ h && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: h })
9933
9933
  ] }) }) });
9934
9934
  const Y = l.testAllowedMaxTry - l.totalFailedTries, je = l.appropriatenessQuestions.length, ye = Object.keys(L).length;
9935
9935
  if (H > 0)
@@ -9953,13 +9953,13 @@ const ya = ({
9953
9953
  }, children: Nt(H) }) }),
9954
9954
  /* @__PURE__ */ i("p", { style: { fontSize: "15px", fontWeight: 500, color: "var(--metakyc-text-primary, #111827)" }, children: r("appropriatenessTest.waitBeforeRetrying") }),
9955
9955
  /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: r("appropriatenessTest.waitTimerMessage") }),
9956
- w && /* @__PURE__ */ i("div", { style: {
9956
+ h && /* @__PURE__ */ i("div", { style: {
9957
9957
  marginTop: "20px",
9958
9958
  padding: "12px 16px",
9959
9959
  borderRadius: "10px",
9960
9960
  backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
9961
9961
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
9962
- }, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: w }) })
9962
+ }, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: h }) })
9963
9963
  ] }) })
9964
9964
  ] });
9965
9965
  if (R) {
@@ -10072,7 +10072,7 @@ const ya = ({
10072
10072
  }
10073
10073
  )
10074
10074
  ] }),
10075
- w && /* @__PURE__ */ s("div", { style: {
10075
+ h && /* @__PURE__ */ s("div", { style: {
10076
10076
  marginBottom: "16px",
10077
10077
  padding: "12px 14px",
10078
10078
  borderRadius: "10px",
@@ -10089,7 +10089,7 @@ const ya = ({
10089
10089
  /* @__PURE__ */ s("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0, lineHeight: 1.5 }, children: [
10090
10090
  /* @__PURE__ */ i("strong", { children: r("appropriatenessTest.previousAttempt") }),
10091
10091
  " ",
10092
- w
10092
+ h
10093
10093
  ] })
10094
10094
  ] }),
10095
10095
  Y <= 0 && /* @__PURE__ */ i("div", { style: {
@@ -10199,7 +10199,7 @@ const ya = ({
10199
10199
  "button",
10200
10200
  {
10201
10201
  type: "button",
10202
- onClick: () => h(F),
10202
+ onClick: () => b(F),
10203
10203
  style: {
10204
10204
  width: "28px",
10205
10205
  height: "28px",
@@ -10236,13 +10236,13 @@ const ya = ({
10236
10236
  ] }),
10237
10237
  /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "#b45309", margin: 0, fontWeight: 500 }, children: r("appropriatenessTest.timesUp") })
10238
10238
  ] }),
10239
- w && !O && /* @__PURE__ */ i("div", { style: {
10239
+ h && !O && /* @__PURE__ */ i("div", { style: {
10240
10240
  marginTop: "16px",
10241
10241
  padding: "12px 14px",
10242
10242
  borderRadius: "10px",
10243
10243
  backgroundColor: "color-mix(in srgb, var(--metakyc-danger, #ef4444) 8%, transparent)",
10244
10244
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
10245
- }, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: w }) })
10245
+ }, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: h }) })
10246
10246
  ] }),
10247
10247
  /* @__PURE__ */ i(Re, { children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
10248
10248
  /* @__PURE__ */ i(
@@ -10251,7 +10251,7 @@ const ya = ({
10251
10251
  type: "button",
10252
10252
  variant: "outline",
10253
10253
  onClick: () => {
10254
- re > 0 ? h((E) => E - 1) : a == null || a();
10254
+ re > 0 ? b((E) => E - 1) : a == null || a();
10255
10255
  },
10256
10256
  disabled: d,
10257
10257
  children: re > 0 ? r("common.previous") : r("common.cancel")
@@ -10262,7 +10262,7 @@ const ya = ({
10262
10262
  Z,
10263
10263
  {
10264
10264
  type: "button",
10265
- onClick: () => h((E) => E + 1),
10265
+ onClick: () => b((E) => E + 1),
10266
10266
  children: r("common.next")
10267
10267
  }
10268
10268
  ),
@@ -10412,7 +10412,7 @@ const ya = ({
10412
10412
  onBack: a
10413
10413
  }) => {
10414
10414
  var at, He, dt, Je;
10415
- const { t: r } = Ie(), { applicantService: n, baseInformationService: l, identityService: o, config: p, currentTheme: m } = Oe(), { identityData: d, provider: y, token: w, isLoading: z, error: L, requestIdentity: C, restartIdentity: q } = Fr(e), [T, P] = S(null), [B, O] = S(null), [U, H] = S([]), [J, re] = S([]), [h, R] = S(!0), [V, Q] = S(!1), [ee, W] = S(null), [X, ce] = S(!1), Y = Ne.useRef(!1), [je, ye] = S({}), [fe, Se] = S({}), pe = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, M = !!(m != null && m.reviewPageDisabled), E = ue(!1);
10415
+ const { t: r } = Ie(), { applicantService: n, baseInformationService: l, identityService: o, config: p, currentTheme: m } = Oe(), { identityData: d, provider: y, token: h, isLoading: z, error: L, requestIdentity: C, restartIdentity: q } = Fr(e), [T, P] = S(null), [B, O] = S(null), [U, H] = S([]), [J, re] = S([]), [b, R] = S(!0), [V, Q] = S(!1), [ee, W] = S(null), [X, ce] = S(!1), Y = Ne.useRef(!1), [je, ye] = S({}), [fe, Se] = S({}), pe = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, M = !!(m != null && m.reviewPageDisabled), E = ue(!1);
10416
10416
  E.current = M;
10417
10417
  const F = yi({
10418
10418
  defaultValues: {
@@ -10441,8 +10441,8 @@ const ya = ({
10441
10441
  O(j);
10442
10442
  const te = /* @__PURE__ */ new Set(), g = $.map((f) => ({ value: f.abbreviation3 || f.abbreviation, label: f.name })).filter((f) => !f.value || te.has(f.value) ? !1 : (te.add(f.value), !0));
10443
10443
  H(g);
10444
- const I = /* @__PURE__ */ new Set(), b = K.filter((f) => f.countryCode).map((f) => ({ value: f.countryCode, label: `${f.countryCode} – ${f.name}` })).filter((f) => I.has(f.value) ? !1 : (I.add(f.value), !0));
10445
- re(b);
10444
+ const I = /* @__PURE__ */ new Set(), x = K.filter((f) => f.countryCode).map((f) => ({ value: f.countryCode, label: `${f.countryCode} – ${f.name}` })).filter((f) => I.has(f.value) ? !1 : (I.add(f.value), !0));
10445
+ re(x);
10446
10446
  const u = j.applicantRequestData;
10447
10447
  if (ye({
10448
10448
  firstName: (u == null ? void 0 : u.firstName) || "",
@@ -10491,17 +10491,17 @@ const ya = ({
10491
10491
  }, [e]), be(() => {
10492
10492
  d && !V && E.current && (console.log("[Identity] Review page disabled — showing cached provider"), Q(!0));
10493
10493
  }, [d, V]), be(() => {
10494
- if (w) {
10495
- if (w.expiresAt) {
10496
- const k = new Date(w.expiresAt).getTime();
10494
+ if (h) {
10495
+ if (h.expiresAt) {
10496
+ const k = new Date(h.expiresAt).getTime();
10497
10497
  if (Date.now() >= k) {
10498
10498
  console.warn("[Identity] Token has expired (expiresAt)"), ce(!0), W(r("identity.sessionExpired"));
10499
10499
  return;
10500
10500
  }
10501
10501
  }
10502
- if (w.url)
10502
+ if (h.url)
10503
10503
  try {
10504
- const j = new URL(w.url).toString().toLowerCase();
10504
+ const j = new URL(h.url).toString().toLowerCase();
10505
10505
  if (j.includes("expired") || j.includes("invalid") || j.includes("error")) {
10506
10506
  console.warn("[Identity] Token URL indicates expiration"), ce(!0), W(r("identity.linkExpired"));
10507
10507
  return;
@@ -10509,20 +10509,20 @@ const ya = ({
10509
10509
  } catch {
10510
10510
  console.error("[Identity] Invalid token URL");
10511
10511
  }
10512
- if (w.status === "expired" || w.error === "expired" || w.expired === !0) {
10512
+ if (h.status === "expired" || h.error === "expired" || h.expired === !0) {
10513
10513
  console.warn("[Identity] Token object indicates expiration"), ce(!0), W(r("identity.sessionExpired"));
10514
10514
  return;
10515
10515
  }
10516
10516
  }
10517
- }, [w]);
10517
+ }, [h]);
10518
10518
  const xe = y !== null && y === qe.Sumsub;
10519
10519
  be(() => {
10520
- if (y !== null && w && !T && V && !X) {
10520
+ if (y !== null && h && !T && V && !X) {
10521
10521
  const k = y;
10522
10522
  if (xe) {
10523
10523
  console.log("[Sumsub] Fetching access token for Web SDK…"), W(null), (async () => {
10524
10524
  try {
10525
- const j = await o.refreshSumsubToken(e), $ = tt.parseProviderConfig(y, w, p);
10525
+ const j = await o.refreshSumsubToken(e), $ = tt.parseProviderConfig(y, h, p);
10526
10526
  $.accessToken = j, $.onTokenRefresh = () => o.refreshSumsubToken(e);
10527
10527
  const K = tt.createProvider(y, $);
10528
10528
  K.onComplete((te) => {
@@ -10536,19 +10536,19 @@ const ya = ({
10536
10536
  })();
10537
10537
  return;
10538
10538
  }
10539
- if (w.url) {
10540
- console.log("[Identity] Loading provider URL for user verification:", w.url), W(null);
10539
+ if (h.url) {
10540
+ console.log("[Identity] Loading provider URL for user verification:", h.url), W(null);
10541
10541
  try {
10542
- if (new URL(w.url), k === qe.SardinAI) {
10542
+ if (new URL(h.url), k === qe.SardinAI) {
10543
10543
  console.log("[SardinAI] Initializing Risk SDK in background...");
10544
10544
  try {
10545
- const j = tt.parseProviderConfig(y, w, p);
10545
+ const j = tt.parseProviderConfig(y, h, p);
10546
10546
  tt.createProvider(y, j).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch((K) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", K));
10547
10547
  } catch (j) {
10548
10548
  console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", j);
10549
10549
  }
10550
10550
  }
10551
- P({ type: "url", url: w.url });
10551
+ P({ type: "url", url: h.url });
10552
10552
  } catch (j) {
10553
10553
  console.error("[Identity] Invalid URL:", j), W(r("identity.invalidUrl")), ce(!0);
10554
10554
  }
@@ -10557,7 +10557,7 @@ const ya = ({
10557
10557
  if (k === qe.SardinAI) {
10558
10558
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), W(null);
10559
10559
  try {
10560
- const j = tt.parseProviderConfig(y, w, p), $ = tt.createProvider(y, j);
10560
+ const j = tt.parseProviderConfig(y, h, p), $ = tt.createProvider(y, j);
10561
10561
  $.initialize().then(() => {
10562
10562
  console.log("[SardinAI] Risk SDK initialized successfully"), P($), setTimeout(() => t == null ? void 0 : t(), 2e3);
10563
10563
  }).catch((K) => {
@@ -10573,7 +10573,7 @@ const ya = ({
10573
10573
  }
10574
10574
  try {
10575
10575
  W(null);
10576
- const j = tt.parseProviderConfig(y, w, p), $ = tt.createProvider(y, j);
10576
+ const j = tt.parseProviderConfig(y, h, p), $ = tt.createProvider(y, j);
10577
10577
  k === qe.Onfido && $.initialize("identity-container").catch((K) => {
10578
10578
  console.error("[Onfido] Initialization error:", K), W(r("identity.failedToInitialize", { message: K.message }));
10579
10579
  }), P($);
@@ -10589,7 +10589,7 @@ const ya = ({
10589
10589
  console.error("[Identity] Error destroying provider:", k);
10590
10590
  }
10591
10591
  };
10592
- }, [y, w, T, V, t, X, xe, e, p, o]);
10592
+ }, [y, h, T, V, t, X, xe, e, p, o]);
10593
10593
  const de = async () => {
10594
10594
  try {
10595
10595
  W(null), ce(!1), await C(), Q(!0);
@@ -10603,7 +10603,7 @@ const ya = ({
10603
10603
  console.error("Error restarting identity verification:", k), W(k.message || r("identity.failedToRestart"));
10604
10604
  }
10605
10605
  };
10606
- if (h || z)
10606
+ if (b || z)
10607
10607
  return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
10608
10608
  /* @__PURE__ */ i(Be, { className: "my-8" }),
10609
10609
  /* @__PURE__ */ i("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: r("identity.loadingIdentity") })
@@ -10728,7 +10728,7 @@ const ya = ({
10728
10728
  padding: "16px 24px",
10729
10729
  borderTop: "1px solid var(--metakyc-border, #e5e7eb)"
10730
10730
  }, children: /* @__PURE__ */ i(Z, { variant: "outline", onClick: _, children: r("common.back") }) })
10731
- ] }) : w != null && w.url ? /* @__PURE__ */ s(ne, { children: [
10731
+ ] }) : h != null && h.url ? /* @__PURE__ */ s(ne, { children: [
10732
10732
  /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
10733
10733
  /* @__PURE__ */ s("div", { children: [
10734
10734
  /* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.title") }),
@@ -10754,7 +10754,7 @@ const ya = ({
10754
10754
  /* @__PURE__ */ i("div", { className: "w-full", style: { height: "600px", maxHeight: "70vh" }, children: /* @__PURE__ */ i(
10755
10755
  "iframe",
10756
10756
  {
10757
- src: w.url,
10757
+ src: h.url,
10758
10758
  className: "w-full h-full border-0 rounded-lg",
10759
10759
  allow: "camera; microphone; geolocation",
10760
10760
  title: "Identity Verification",
@@ -10764,8 +10764,8 @@ const ya = ({
10764
10764
  try {
10765
10765
  const g = j.target, I = g.contentDocument || (($ = g.contentWindow) == null ? void 0 : $.document);
10766
10766
  if (I) {
10767
- const b = ((te = (K = I.body) == null ? void 0 : K.textContent) == null ? void 0 : te.toLowerCase()) || "";
10768
- (b.includes("expired") || b.includes("invalid") || b.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), ce(!0), W(r("identity.linkExpired")));
10767
+ const x = ((te = (K = I.body) == null ? void 0 : K.textContent) == null ? void 0 : te.toLowerCase()) || "";
10768
+ (x.includes("expired") || x.includes("invalid") || x.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), ce(!0), W(r("identity.linkExpired")));
10769
10769
  }
10770
10770
  } catch {
10771
10771
  console.log("[Identity] Cannot check iframe content (CORS)");
@@ -10946,7 +10946,7 @@ const ya = ({
10946
10946
  We,
10947
10947
  {
10948
10948
  checked: !!g,
10949
- onChange: (I) => Se((b) => ({ ...b, [K]: String(I) })),
10949
+ onChange: (I) => Se((x) => ({ ...x, [K]: String(I) })),
10950
10950
  style: { marginTop: 2 }
10951
10951
  }
10952
10952
  ),
@@ -10959,26 +10959,26 @@ const ya = ({
10959
10959
  ) }, $);
10960
10960
  }
10961
10961
  if (k.customType === "group_checkbox") {
10962
- const g = Array.isArray(te) ? te : te ? [te] : [], I = (b) => {
10963
- k.singleSelect ? Se((u) => ({ ...u, [K]: g[0] === b ? [] : [b] })) : Se((u) => ({
10962
+ const g = Array.isArray(te) ? te : te ? [te] : [], I = (x) => {
10963
+ k.singleSelect ? Se((u) => ({ ...u, [K]: g[0] === x ? [] : [x] })) : Se((u) => ({
10964
10964
  ...u,
10965
- [K]: g.includes(b) ? g.filter((c) => c !== b) : [...g, b]
10965
+ [K]: g.includes(x) ? g.filter((c) => c !== x) : [...g, x]
10966
10966
  }));
10967
10967
  };
10968
10968
  return /* @__PURE__ */ i("div", { style: le(k.colSpan), children: Ae(
10969
10969
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
10970
10970
  k.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: G(k.displayText, r) || G(k.label, r) }),
10971
- (k.options || []).map((b) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
10971
+ (k.options || []).map((x) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
10972
10972
  /* @__PURE__ */ i(
10973
10973
  We,
10974
10974
  {
10975
- checked: g.includes(b.value),
10976
- onChange: () => I(b.value),
10975
+ checked: g.includes(x.value),
10976
+ onChange: () => I(x.value),
10977
10977
  style: { marginTop: 2 }
10978
10978
  }
10979
10979
  ),
10980
- /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: b.label })
10981
- ] }, b.value))
10980
+ /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: x.label })
10981
+ ] }, x.value))
10982
10982
  ] }),
10983
10983
  k.helpText
10984
10984
  ) }, $);
@@ -11015,7 +11015,7 @@ const ya = ({
11015
11015
  ) }, $);
11016
11016
  }, ct = (k, j) => {
11017
11017
  if (k.isCustom) return Ye(k, j);
11018
- const $ = k.name ?? "", K = lt[$], te = G(k.displayText, r) || (K != null && K.translationKey ? r(`fields.${K.translationKey}`) : void 0) || (K == null ? void 0 : K.label) || $, g = je[$] ?? "", I = $ === "mobileCountryCode", b = !!(K != null && K.countriesType) && !I;
11018
+ const $ = k.name ?? "", K = lt[$], te = G(k.displayText, r) || (K != null && K.translationKey ? r(`fields.${K.translationKey}`) : void 0) || (K == null ? void 0 : K.label) || $, g = je[$] ?? "", I = $ === "mobileCountryCode", x = !!(K != null && K.countriesType) && !I;
11019
11019
  return k.editable ? I ? /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
11020
11020
  /* @__PURE__ */ i(
11021
11021
  Xe,
@@ -11027,7 +11027,7 @@ const ya = ({
11027
11027
  }
11028
11028
  ),
11029
11029
  k.helpText
11030
- ) }, `epc-${j}`) : b ? /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
11030
+ ) }, `epc-${j}`) : x ? /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
11031
11031
  /* @__PURE__ */ i(
11032
11032
  Xe,
11033
11033
  {
@@ -11448,13 +11448,13 @@ const xa = {
11448
11448
  onSuccess: a,
11449
11449
  onCancel: r
11450
11450
  }) => {
11451
- var $, K, te, g, I, b, u;
11451
+ var $, K, te, g, I, x, u;
11452
11452
  const { config: n, baseInformationService: l, currentTheme: o } = Oe(), { createApplicant: p, isLoading: m } = ni(), { t: d } = Ie(), y = e || (($ = n.applicantForm) == null ? void 0 : $.workflowKey);
11453
11453
  if (!y)
11454
11454
  throw new Error(
11455
11455
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
11456
11456
  );
11457
- const w = t || ((K = n.applicantForm) == null ? void 0 : K.externalRefId) || "", z = ((te = n.applicantForm) == null ? void 0 : te.email) || "", L = ((g = n.applicantForm) == null ? void 0 : g.hiddenValues) || {}, C = ((I = n.applicantForm) == null ? void 0 : I.initialValues) || {}, T = (((b = n.applicantForm) == null ? void 0 : b.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", P = Fe(
11457
+ const h = t || ((K = n.applicantForm) == null ? void 0 : K.externalRefId) || "", z = ((te = n.applicantForm) == null ? void 0 : te.email) || "", L = ((g = n.applicantForm) == null ? void 0 : g.hiddenValues) || {}, C = ((I = n.applicantForm) == null ? void 0 : I.initialValues) || {}, T = (((x = n.applicantForm) == null ? void 0 : x.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", P = Fe(
11458
11458
  () => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
11459
11459
  [o == null ? void 0 : o.applicantFormPages]
11460
11460
  ), B = Fe(() => {
@@ -11468,8 +11468,8 @@ const xa = {
11468
11468
  }, [o == null ? void 0 : o.applicantFormRequiredFields, P]), O = Fe(() => {
11469
11469
  var v;
11470
11470
  if (P) {
11471
- const A = P.flatMap((x) => x.fields).filter((x) => !x.isCustom && x.name).map((x) => x.name), N = new Set(A);
11472
- for (const x of bt) N.add(x);
11471
+ const A = P.flatMap((w) => w.fields).filter((w) => !w.isCustom && w.name).map((w) => w.name), N = new Set(A);
11472
+ for (const w of bt) N.add(w);
11473
11473
  return Array.from(N);
11474
11474
  }
11475
11475
  let c;
@@ -11495,7 +11495,7 @@ const xa = {
11495
11495
  for (const A of O)
11496
11496
  U.has(A) && c.add((v = lt[A]) == null ? void 0 : v.countriesType);
11497
11497
  return c.size === 0 && c.add(void 0), Array.from(c);
11498
- }, [O, P]), [J, re] = S({}), [h, R] = S(!0), V = ue(/* @__PURE__ */ new Set()), Q = ue(/* @__PURE__ */ new Set());
11498
+ }, [O, P]), [J, re] = S({}), [b, R] = S(!0), V = ue(/* @__PURE__ */ new Set()), Q = ue(/* @__PURE__ */ new Set());
11499
11499
  be(() => {
11500
11500
  if (!o) return;
11501
11501
  const c = H.filter((A) => {
@@ -11504,8 +11504,8 @@ const xa = {
11504
11504
  });
11505
11505
  if (c.length === 0) {
11506
11506
  H.every((N) => {
11507
- const x = N != null ? String(N) : "all";
11508
- return Q.current.has(x);
11507
+ const w = N != null ? String(N) : "all";
11508
+ return Q.current.has(w);
11509
11509
  }) && R(!1);
11510
11510
  return;
11511
11511
  }
@@ -11515,11 +11515,11 @@ const xa = {
11515
11515
  try {
11516
11516
  const A = await Promise.all(
11517
11517
  c.map(async (N) => {
11518
- const x = N != null ? String(N) : "all", ae = await l.getCountries("", n.locale || "en", N), se = N === 40, we = /* @__PURE__ */ new Set(), ke = ae.map((ve) => se && ve.countryCode ? {
11518
+ const w = N != null ? String(N) : "all", ae = await l.getCountries("", n.locale || "en", N), se = N === 40, we = /* @__PURE__ */ new Set(), ke = ae.map((ve) => se && ve.countryCode ? {
11519
11519
  value: ve.countryCode,
11520
11520
  label: `${ve.countryCode} – ${ve.name}`
11521
11521
  } : { value: ve.abbreviation3 || ve.abbreviation, label: ve.name }).filter((ve) => !ve.value || we.has(ve.value) ? !1 : (we.add(ve.value), !0));
11522
- return Q.current.add(x), V.current.delete(x), [x, ke];
11522
+ return Q.current.add(w), V.current.delete(w), [w, ke];
11523
11523
  })
11524
11524
  );
11525
11525
  re((N) => ({ ...N, ...Object.fromEntries(A) }));
@@ -11527,8 +11527,8 @@ const xa = {
11527
11527
  f.forEach((N) => V.current.delete(N)), console.error("Failed to load countries:", A);
11528
11528
  } finally {
11529
11529
  H.every((N) => {
11530
- const x = N != null ? String(N) : "all";
11531
- return Q.current.has(x);
11530
+ const w = N != null ? String(N) : "all";
11531
+ return Q.current.has(w);
11532
11532
  }) && R(!1);
11533
11533
  }
11534
11534
  })();
@@ -11572,7 +11572,7 @@ const xa = {
11572
11572
  email: z,
11573
11573
  dateOfBirth: "",
11574
11574
  phonenumber: "",
11575
- externalRefId: w,
11575
+ externalRefId: h,
11576
11576
  mobileCountryCode: "",
11577
11577
  street: "",
11578
11578
  streetNumber: "",
@@ -11599,7 +11599,7 @@ const xa = {
11599
11599
  if (!v.isCustom || !v.paramName || !((f = v.blockingValues) != null && f.length)) continue;
11600
11600
  const A = fe[v.paramName] ?? "";
11601
11601
  if (v.customType === "group_checkbox") {
11602
- if (A.split(",").filter(Boolean).some((x) => v.blockingValues.includes(x))) return !0;
11602
+ if (A.split(",").filter(Boolean).some((w) => v.blockingValues.includes(w))) return !0;
11603
11603
  } else if (v.customType === "radio_group" && v.blockingValues.includes(A))
11604
11604
  return !0;
11605
11605
  }
@@ -11616,8 +11616,8 @@ const xa = {
11616
11616
  } else if (v.name) {
11617
11617
  const A = v.name;
11618
11618
  if (B.includes(A) && ut(Y[A])) {
11619
- const N = lt[A], x = G(v.displayText, d) || (N != null && N.translationKey ? d(`fields.${N.translationKey}`) : void 0) || (N == null ? void 0 : N.label) || A;
11620
- f[A] = d("validation.fieldRequired", { field: x });
11619
+ const N = lt[A], w = G(v.displayText, d) || (N != null && N.translationKey ? d(`fields.${N.translationKey}`) : void 0) || (N == null ? void 0 : N.label) || A;
11620
+ f[A] = d("validation.fieldRequired", { field: w });
11621
11621
  }
11622
11622
  }
11623
11623
  return f;
@@ -11658,42 +11658,42 @@ const xa = {
11658
11658
  if (P) {
11659
11659
  for (const N of P)
11660
11660
  if (ze(N)) {
11661
- for (const x of N.fields)
11662
- if (!x.isCustom && x.name) {
11663
- const ae = x.name, se = Y[ae];
11661
+ for (const w of N.fields)
11662
+ if (!w.isCustom && w.name) {
11663
+ const ae = w.name, se = Y[ae];
11664
11664
  ut(se) || (c[ae] = se);
11665
11665
  }
11666
11666
  }
11667
11667
  for (const N of bt)
11668
11668
  if (c[N] === void 0) {
11669
- const x = Y[N];
11670
- ut(x) || (c[N] = x);
11669
+ const w = Y[N];
11670
+ ut(w) || (c[N] = w);
11671
11671
  }
11672
11672
  } else
11673
11673
  O.forEach((N) => {
11674
11674
  if (N === "externalRefId") return;
11675
- const x = Y[N];
11676
- ut(x) || (c[N] = x);
11675
+ const w = Y[N];
11676
+ ut(w) || (c[N] = w);
11677
11677
  });
11678
11678
  const f = [];
11679
11679
  if (P) {
11680
11680
  for (const N of P)
11681
11681
  if (ze(N))
11682
- for (const x of N.fields) {
11683
- if (!x.isCustom || !x.paramName || x.customType === "paragraph" || x.customType === "html" || x.customType === "br" || x.customType === "link") continue;
11684
- const ae = fe[x.paramName] ?? "";
11682
+ for (const w of N.fields) {
11683
+ if (!w.isCustom || !w.paramName || w.customType === "paragraph" || w.customType === "html" || w.customType === "br" || w.customType === "link") continue;
11684
+ const ae = fe[w.paramName] ?? "";
11685
11685
  let se;
11686
- if (x.customType === "checkbox" || x.customType === "link_checkbox")
11686
+ if (w.customType === "checkbox" || w.customType === "link_checkbox")
11687
11687
  se = ae === "true" ? "yes" : "no";
11688
- else if (se = ae, !se && !x.required) continue;
11689
- f.push({ paramName: x.paramName, value: se });
11688
+ else if (se = ae, !se && !w.required) continue;
11689
+ f.push({ paramName: w.paramName, value: se });
11690
11690
  }
11691
11691
  }
11692
- for (const [N, x] of Object.entries(X))
11693
- c[N] === void 0 && !ut(x) && (c[N] = x);
11692
+ for (const [N, w] of Object.entries(X))
11693
+ c[N] === void 0 && !ut(w) && (c[N] = w);
11694
11694
  const v = new Set(f.map((N) => N.paramName));
11695
- for (const [N, x] of Object.entries(ye))
11696
- !v.has(N) && x && f.push({ paramName: N, value: x });
11695
+ for (const [N, w] of Object.entries(ye))
11696
+ !v.has(N) && w && f.push({ paramName: N, value: w });
11697
11697
  f.length > 0 && (c.applicantAdditionalDatas = f);
11698
11698
  const A = await p(c);
11699
11699
  a(A.applicantId);
@@ -11713,10 +11713,10 @@ const xa = {
11713
11713
  await He();
11714
11714
  }, Je = (c, f, v, A, N) => {
11715
11715
  var Dt;
11716
- const x = lt[c];
11717
- if (!x) return null;
11718
- const ae = B.includes(c), se = E[c], we = G(v, d) || (x.translationKey ? d(`fields.${x.translationKey}`) : void 0) || x.label, ke = c in ce, ve = f ?? c, Ve = { required: ae }, $e = N ? N !== "placeholder" : T, et = $e ? we : void 0;
11719
- switch (x.type) {
11716
+ const w = lt[c];
11717
+ if (!w) return null;
11718
+ const ae = B.includes(c), se = E[c], we = G(v, d) || (w.translationKey ? d(`fields.${w.translationKey}`) : void 0) || w.label, ke = c in ce, ve = f ?? c, Ve = { required: ae }, $e = N ? N !== "placeholder" : T, et = $e ? we : void 0;
11719
+ switch (w.type) {
11720
11720
  case "select":
11721
11721
  if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
11722
11722
  const Le = ee(c, A);
@@ -11728,7 +11728,7 @@ const xa = {
11728
11728
  value: Y[c] || "",
11729
11729
  onChange: (nt) => ge(c, nt),
11730
11730
  options: [{ value: "", label: $e ? d("placeholders.selectCountry") : we }, ...Le],
11731
- disabled: h,
11731
+ disabled: b,
11732
11732
  readOnly: ke,
11733
11733
  error: se
11734
11734
  },
@@ -11783,7 +11783,7 @@ const xa = {
11783
11783
  onChange: (nt) => ge(c, nt),
11784
11784
  options: Le,
11785
11785
  placeholder: $e ? d("placeholders.selectOtherNationalities") : we,
11786
- disabled: h,
11786
+ disabled: b,
11787
11787
  readOnly: ke
11788
11788
  },
11789
11789
  ve
@@ -11854,7 +11854,7 @@ const xa = {
11854
11854
  }, k = (c, f) => {
11855
11855
  const v = c.labelMode ? c.labelMode !== "placeholder" : T;
11856
11856
  if (c.customType === "paragraph") {
11857
- const x = G(c.displayText, d) || G(c.label, d) || "";
11857
+ const w = G(c.displayText, d) || G(c.label, d) || "";
11858
11858
  return /* @__PURE__ */ i(
11859
11859
  "p",
11860
11860
  {
@@ -11865,7 +11865,7 @@ const xa = {
11865
11865
  margin: 0,
11866
11866
  color: "var(--metakyc-text-secondary, #6b7280)"
11867
11867
  },
11868
- dangerouslySetInnerHTML: { __html: x }
11868
+ dangerouslySetInnerHTML: { __html: w }
11869
11869
  },
11870
11870
  `custom-${f}`
11871
11871
  );
@@ -11881,7 +11881,7 @@ const xa = {
11881
11881
  if (c.customType === "br")
11882
11882
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${f}`);
11883
11883
  if (c.customType === "link") {
11884
- const x = G(c.displayText, d) || G(c.label, d) || c.linkText || c.linkUrl || "";
11884
+ const w = G(c.displayText, d) || G(c.label, d) || c.linkText || c.linkUrl || "";
11885
11885
  return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
11886
11886
  "a",
11887
11887
  {
@@ -11898,7 +11898,7 @@ const xa = {
11898
11898
  cursor: "pointer"
11899
11899
  },
11900
11900
  children: [
11901
- x,
11901
+ w,
11902
11902
  /* @__PURE__ */ i("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
11903
11903
  ]
11904
11904
  }
@@ -11907,21 +11907,21 @@ const xa = {
11907
11907
  if (!c.paramName) return null;
11908
11908
  const A = E[c.paramName], N = G(c.displayText, d) || G(c.label, d) || c.paramName;
11909
11909
  if (c.customType === "checkbox") {
11910
- const x = fe[c.paramName] === "true";
11910
+ const w = fe[c.paramName] === "true";
11911
11911
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
11912
11912
  /* @__PURE__ */ s(
11913
11913
  "div",
11914
11914
  {
11915
11915
  className: "metakyc-option-label",
11916
11916
  role: "checkbox",
11917
- "aria-checked": x,
11918
- onClick: () => le(c.paramName, x ? "false" : "true"),
11917
+ "aria-checked": w,
11918
+ onClick: () => le(c.paramName, w ? "false" : "true"),
11919
11919
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
11920
11920
  children: [
11921
11921
  /* @__PURE__ */ i(
11922
11922
  We,
11923
11923
  {
11924
- checked: x,
11924
+ checked: w,
11925
11925
  onChange: (ae) => le(c.paramName, ae ? "true" : "false")
11926
11926
  }
11927
11927
  ),
@@ -11943,21 +11943,21 @@ const xa = {
11943
11943
  ] }, `custom-${f}`);
11944
11944
  }
11945
11945
  if (c.customType === "link_checkbox") {
11946
- const x = fe[c.paramName] === "true";
11946
+ const w = fe[c.paramName] === "true";
11947
11947
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
11948
11948
  /* @__PURE__ */ s(
11949
11949
  "div",
11950
11950
  {
11951
11951
  className: "metakyc-option-label",
11952
11952
  role: "checkbox",
11953
- "aria-checked": x,
11954
- onClick: () => le(c.paramName, x ? "false" : "true"),
11953
+ "aria-checked": w,
11954
+ onClick: () => le(c.paramName, w ? "false" : "true"),
11955
11955
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
11956
11956
  children: [
11957
11957
  /* @__PURE__ */ i(
11958
11958
  We,
11959
11959
  {
11960
- checked: x,
11960
+ checked: w,
11961
11961
  onChange: (ae) => le(c.paramName, ae ? "true" : "false")
11962
11962
  }
11963
11963
  ),
@@ -11992,7 +11992,7 @@ const xa = {
11992
11992
  ] }, `custom-${f}`);
11993
11993
  }
11994
11994
  if (c.customType === "group_checkbox") {
11995
- const x = (fe[c.paramName] || "").split(",").filter(Boolean);
11995
+ const w = (fe[c.paramName] || "").split(",").filter(Boolean);
11996
11996
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
11997
11997
  v && /* @__PURE__ */ s(
11998
11998
  "div",
@@ -12006,11 +12006,11 @@ const xa = {
12006
12006
  }
12007
12007
  ),
12008
12008
  /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((ae) => {
12009
- const se = c.singleSelect ? fe[c.paramName] === ae.value : x.includes(ae.value), we = () => {
12009
+ const se = c.singleSelect ? fe[c.paramName] === ae.value : w.includes(ae.value), we = () => {
12010
12010
  if (c.singleSelect)
12011
12011
  le(c.paramName, se ? "" : ae.value);
12012
12012
  else {
12013
- const ke = se ? x.filter((ve) => ve !== ae.value) : [...x, ae.value];
12013
+ const ke = se ? w.filter((ve) => ve !== ae.value) : [...w, ae.value];
12014
12014
  le(c.paramName, ke.join(","));
12015
12015
  }
12016
12016
  };
@@ -12050,19 +12050,19 @@ const xa = {
12050
12050
  ]
12051
12051
  }
12052
12052
  ),
12053
- /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((x) => /* @__PURE__ */ s(
12053
+ /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((w) => /* @__PURE__ */ s(
12054
12054
  "div",
12055
12055
  {
12056
12056
  className: "metakyc-option-label",
12057
- onClick: () => le(c.paramName, x.value),
12057
+ onClick: () => le(c.paramName, w.value),
12058
12058
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12059
12059
  children: [
12060
12060
  /* @__PURE__ */ i(
12061
12061
  "input",
12062
12062
  {
12063
12063
  type: "radio",
12064
- checked: fe[c.paramName] === x.value,
12065
- onChange: () => le(c.paramName, x.value),
12064
+ checked: fe[c.paramName] === w.value,
12065
+ onChange: () => le(c.paramName, w.value),
12066
12066
  name: `radio-group-${c.paramName}-${f}`,
12067
12067
  className: "metakyc-option-input",
12068
12068
  onClick: (ae) => ae.stopPropagation(),
@@ -12074,12 +12074,12 @@ const xa = {
12074
12074
  {
12075
12075
  className: "metakyc-option-text",
12076
12076
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
12077
- children: x.label
12077
+ children: w.label
12078
12078
  }
12079
12079
  )
12080
12080
  ]
12081
12081
  },
12082
- x.value
12082
+ w.value
12083
12083
  )) }),
12084
12084
  A && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A })
12085
12085
  ] }, `custom-${f}`) : /* @__PURE__ */ i(
@@ -12089,7 +12089,7 @@ const xa = {
12089
12089
  label: v ? `${N}${c.required ? " *" : ""}` : void 0,
12090
12090
  placeholder: v ? void 0 : N,
12091
12091
  value: fe[c.paramName] || "",
12092
- onChange: (x) => le(c.paramName, x.target.value),
12092
+ onChange: (w) => le(c.paramName, w.target.value),
12093
12093
  required: c.required,
12094
12094
  error: A
12095
12095
  },
@@ -12126,20 +12126,20 @@ const xa = {
12126
12126
  }
12127
12127
  ) }),
12128
12128
  v && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: c.fields.map((A, N) => {
12129
- const x = Math.min(4, Math.max(1, Number(A.colSpan) || 4)), ae = A.isCustom ? `custom-${N}-${A.paramName}` : `builtin-${A.name}-${N}`;
12130
- return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${x} / span ${x}` }, children: /* @__PURE__ */ i(Gt, { helpText: A.helpText, children: A.isCustom ? k(A, N) : Je(A.name, ae, A.displayText, A.countriesType, A.labelMode) }) }, ae);
12129
+ const w = Math.min(4, Math.max(1, Number(A.colSpan) || 4)), ae = A.isCustom ? `custom-${N}-${A.paramName}` : `builtin-${A.name}-${N}`;
12130
+ return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ i(Gt, { helpText: A.helpText, children: A.isCustom ? k(A, N) : Je(A.name, ae, A.displayText, A.countriesType, A.labelMode) }) }, ae);
12131
12131
  }) })
12132
12132
  ] });
12133
12133
  };
12134
- if (!o || h)
12134
+ if (!o || b)
12135
12135
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
12136
12136
  /* @__PURE__ */ i(Be, { className: "my-8" }),
12137
12137
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
12138
12138
  ] }) }) });
12139
12139
  if (P) {
12140
- const c = P[pe] ?? P[0], f = Ye === -1, v = Ae === -1, A = P.length, N = ze(c), x = rt(c), ae = Object.values(E), se = !N && !!c.conditionalOn && c.conditionalMode === "block", we = D || m || se || x;
12140
+ const c = P[pe] ?? P[0], f = Ye === -1, v = Ae === -1, A = P.length, N = ze(c), w = rt(c), ae = Object.values(E), se = !N && !!c.conditionalOn && c.conditionalMode === "block", we = D || m || se || w;
12141
12141
  let ke;
12142
- return se || x ? ke = d("common.blocked") : v ? ke = c.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = c.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12142
+ return se || w ? ke = d("common.blocked") : v ? ke = c.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = c.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12143
12143
  /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createApplicant.title") }) }),
12144
12144
  /* @__PURE__ */ s(oe, { children: [
12145
12145
  (c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
@@ -12263,27 +12263,27 @@ const Ua = ({
12263
12263
  throw new Error(
12264
12264
  "workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
12265
12265
  );
12266
- const w = t || ((k = n.applicantForm) == null ? void 0 : k.externalRefId) || "", z = ((j = n.applicantForm) == null ? void 0 : j.email) || "", L = (($ = n.applicantForm) == null ? void 0 : $.initialValues) || {}, q = (((K = n.applicantForm) == null ? void 0 : K.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", T = Fe(
12266
+ const h = t || ((k = n.applicantForm) == null ? void 0 : k.externalRefId) || "", z = ((j = n.applicantForm) == null ? void 0 : j.email) || "", L = (($ = n.applicantForm) == null ? void 0 : $.initialValues) || {}, q = (((K = n.applicantForm) == null ? void 0 : K.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", T = Fe(
12267
12267
  () => o != null && o.companyFormPages && o.companyFormPages.length > 0 ? o.companyFormPages : null,
12268
12268
  [o == null ? void 0 : o.companyFormPages]
12269
12269
  ), P = Fe(() => {
12270
12270
  const g = new Set(Qt), I = o == null ? void 0 : o.companyFormRequiredFields;
12271
- if (I) for (const b of I) g.add(b);
12271
+ if (I) for (const x of I) g.add(x);
12272
12272
  if (T)
12273
- for (const b of T)
12274
- for (const u of b.fields)
12273
+ for (const x of T)
12274
+ for (const u of x.fields)
12275
12275
  !u.isCustom && u.name && u.required && g.add(u.name);
12276
12276
  return Array.from(g);
12277
12277
  }, [o == null ? void 0 : o.companyFormRequiredFields, T]), B = Fe(() => {
12278
12278
  var g;
12279
12279
  if (T) {
12280
- const I = T.flatMap((u) => u.fields).filter((u) => !u.isCustom && u.name).map((u) => u.name), b = new Set(I);
12281
- for (const u of Qt) b.add(u);
12282
- return Array.from(b);
12280
+ const I = T.flatMap((u) => u.fields).filter((u) => !u.isCustom && u.name).map((u) => u.name), x = new Set(I);
12281
+ for (const u of Qt) x.add(u);
12282
+ return Array.from(x);
12283
12283
  }
12284
12284
  return (g = n.applicantForm) != null && g.visibleFields ? n.applicantForm.visibleFields : o != null && o.companyFormVisibleFields && o.companyFormVisibleFields.length > 0 ? o.companyFormVisibleFields : Ri;
12285
12285
  }, [(te = n.applicantForm) == null ? void 0 : te.visibleFields, o == null ? void 0 : o.companyFormVisibleFields, T]), O = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), U = Fe(() => {
12286
- var I, b;
12286
+ var I, x;
12287
12287
  const g = /* @__PURE__ */ new Set();
12288
12288
  if (T)
12289
12289
  for (const u of T)
@@ -12291,9 +12291,9 @@ const Ua = ({
12291
12291
  !c.isCustom && c.name && O.has(c.name) && g.add(c.countriesType ?? ((I = mt[c.name]) == null ? void 0 : I.countriesType));
12292
12292
  else
12293
12293
  for (const u of B)
12294
- O.has(u) && g.add((b = mt[u]) == null ? void 0 : b.countriesType);
12294
+ O.has(u) && g.add((x = mt[u]) == null ? void 0 : x.countriesType);
12295
12295
  return g.size === 0 && g.add(void 0), Array.from(g);
12296
- }, [B, T]), [H, J] = S({}), [re, h] = S(!0), R = ue(/* @__PURE__ */ new Set()), V = ue(/* @__PURE__ */ new Set());
12296
+ }, [B, T]), [H, J] = S({}), [re, b] = S(!0), R = ue(/* @__PURE__ */ new Set()), V = ue(/* @__PURE__ */ new Set());
12297
12297
  be(() => {
12298
12298
  if (!o) return;
12299
12299
  const g = U.filter((u) => {
@@ -12301,16 +12301,16 @@ const Ua = ({
12301
12301
  return !V.current.has(c) && !R.current.has(c);
12302
12302
  });
12303
12303
  if (g.length === 0) {
12304
- U.every((c) => V.current.has(c != null ? String(c) : "all")) && h(!1);
12304
+ U.every((c) => V.current.has(c != null ? String(c) : "all")) && b(!1);
12305
12305
  return;
12306
12306
  }
12307
- h(!0);
12307
+ b(!0);
12308
12308
  const I = g.map((u) => u != null ? String(u) : "all");
12309
12309
  I.forEach((u) => R.current.add(u)), (async () => {
12310
12310
  try {
12311
12311
  const u = await Promise.all(
12312
12312
  g.map(async (c) => {
12313
- const f = c != null ? String(c) : "all", v = await l.getCountries("", n.locale || "en", c), A = /* @__PURE__ */ new Set(), N = v.map((x) => ({ value: x.abbreviation3 || x.abbreviation, label: x.name })).filter((x) => !x.value || A.has(x.value) ? !1 : (A.add(x.value), !0));
12313
+ const f = c != null ? String(c) : "all", v = await l.getCountries("", n.locale || "en", c), A = /* @__PURE__ */ new Set(), N = v.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || A.has(w.value) ? !1 : (A.add(w.value), !0));
12314
12314
  return V.current.add(f), R.current.delete(f), [f, N];
12315
12315
  })
12316
12316
  );
@@ -12318,13 +12318,13 @@ const Ua = ({
12318
12318
  } catch (u) {
12319
12319
  I.forEach((c) => R.current.delete(c)), console.error("Failed to load countries:", u);
12320
12320
  } finally {
12321
- U.every((c) => V.current.has(c != null ? String(c) : "all")) && h(!1);
12321
+ U.every((c) => V.current.has(c != null ? String(c) : "all")) && b(!1);
12322
12322
  }
12323
12323
  })();
12324
12324
  }, [U, o]);
12325
12325
  const Q = (g, I) => {
12326
12326
  var c;
12327
- const b = I ?? ((c = mt[g]) == null ? void 0 : c.countriesType), u = b != null ? String(b) : "all";
12327
+ const x = I ?? ((c = mt[g]) == null ? void 0 : c.countriesType), u = x != null ? String(x) : "all";
12328
12328
  return H[u] || [];
12329
12329
  }, ee = {
12330
12330
  companyName: 1,
@@ -12369,32 +12369,32 @@ const Ua = ({
12369
12369
  postalCode: "",
12370
12370
  addressCountry: "",
12371
12371
  lei: "",
12372
- externalRefId: w,
12372
+ externalRefId: h,
12373
12373
  ...W
12374
- }), [Y, je] = S({}), [ye, fe] = S(0), [Se, pe] = S({}), [M, E] = S(null), [F, xe] = S(!1), de = (g, I) => ce((b) => ({ ...b, [g]: I })), D = (g, I) => je((b) => ({ ...b, [g]: I })), _ = (g) => !g.conditionalOn || Y[g.conditionalOn] === "true", ge = (g) => {
12374
+ }), [Y, je] = S({}), [ye, fe] = S(0), [Se, pe] = S({}), [M, E] = S(null), [F, xe] = S(!1), de = (g, I) => ce((x) => ({ ...x, [g]: I })), D = (g, I) => je((x) => ({ ...x, [g]: I })), _ = (g) => !g.conditionalOn || Y[g.conditionalOn] === "true", ge = (g) => {
12375
12375
  var I;
12376
- for (const b of g.fields) {
12377
- if (!b.isCustom || !b.paramName || !((I = b.blockingValues) != null && I.length)) continue;
12378
- const u = Y[b.paramName] ?? "";
12379
- if (b.customType === "group_checkbox") {
12380
- if (u.split(",").filter(Boolean).some((f) => b.blockingValues.includes(f))) return !0;
12381
- } else if (b.customType === "radio_group" && b.blockingValues.includes(u))
12376
+ for (const x of g.fields) {
12377
+ if (!x.isCustom || !x.paramName || !((I = x.blockingValues) != null && I.length)) continue;
12378
+ const u = Y[x.paramName] ?? "";
12379
+ if (x.customType === "group_checkbox") {
12380
+ if (u.split(",").filter(Boolean).some((f) => x.blockingValues.includes(f))) return !0;
12381
+ } else if (x.customType === "radio_group" && x.blockingValues.includes(u))
12382
12382
  return !0;
12383
12383
  }
12384
12384
  return !1;
12385
12385
  }, le = T && ye < T.length - 1 ? ye + 1 : -1, ze = T && ye > 0 ? ye - 1 : -1, rt = (g) => {
12386
12386
  const I = {};
12387
- for (const b of g.fields)
12388
- if (b.isCustom) {
12389
- if (b.customType === "paragraph" || b.customType === "html" || b.customType === "br" || b.customType === "link") continue;
12390
- if (b.required && b.paramName) {
12391
- const u = Y[b.paramName], c = G(b.displayText, d) || G(b.label, d) || b.paramName;
12392
- b.customType === "checkbox" || b.customType === "link_checkbox" ? u !== "true" && (I[b.paramName] = d("validation.fieldRequired", { field: c })) : (!u || u.trim() === "") && (I[b.paramName] = d("validation.fieldRequired", { field: c }));
12387
+ for (const x of g.fields)
12388
+ if (x.isCustom) {
12389
+ if (x.customType === "paragraph" || x.customType === "html" || x.customType === "br" || x.customType === "link") continue;
12390
+ if (x.required && x.paramName) {
12391
+ const u = Y[x.paramName], c = G(x.displayText, d) || G(x.label, d) || x.paramName;
12392
+ x.customType === "checkbox" || x.customType === "link_checkbox" ? u !== "true" && (I[x.paramName] = d("validation.fieldRequired", { field: c })) : (!u || u.trim() === "") && (I[x.paramName] = d("validation.fieldRequired", { field: c }));
12393
12393
  }
12394
- } else if (b.name) {
12395
- const u = b.name;
12394
+ } else if (x.name) {
12395
+ const u = x.name;
12396
12396
  if (P.includes(u) && Rt(X[u])) {
12397
- const c = mt[u], f = G(b.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
12397
+ const c = mt[u], f = G(x.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
12398
12398
  I[u] = d("validation.fieldRequired", { field: f });
12399
12399
  }
12400
12400
  }
@@ -12417,8 +12417,8 @@ const Ua = ({
12417
12417
  var g;
12418
12418
  if (T) {
12419
12419
  let I = {};
12420
- for (const b of T)
12421
- _(b) && (I = { ...I, ...rt(b) });
12420
+ for (const x of T)
12421
+ _(x) && (I = { ...I, ...rt(x) });
12422
12422
  if (Object.keys(I).length > 0) {
12423
12423
  pe(I);
12424
12424
  return;
@@ -12429,8 +12429,8 @@ const Ua = ({
12429
12429
  const I = {
12430
12430
  workflowKey: X.workflowKey,
12431
12431
  externalRefId: ((g = X.externalRefId) == null ? void 0 : g.trim()) || void 0
12432
- }, b = T ? T.filter((f) => _(f)).flatMap((f) => f.fields).filter((f) => !f.isCustom && f.name).map((f) => f.name) : B;
12433
- for (const f of b) {
12432
+ }, x = T ? T.filter((f) => _(f)).flatMap((f) => f.fields).filter((f) => !f.isCustom && f.name).map((f) => f.name) : B;
12433
+ for (const f of x) {
12434
12434
  const v = X[f];
12435
12435
  if (!Rt(v))
12436
12436
  switch (f) {
@@ -12489,15 +12489,15 @@ const Ua = ({
12489
12489
  g.preventDefault();
12490
12490
  for (const I of P)
12491
12491
  if (Rt(X[I])) {
12492
- const b = mt[I], u = (b != null && b.translationKey ? d(`fields.${b.translationKey}`) : void 0) || (b == null ? void 0 : b.label) || I;
12492
+ const x = mt[I], u = (x != null && x.translationKey ? d(`fields.${x.translationKey}`) : void 0) || (x == null ? void 0 : x.label) || I;
12493
12493
  E(d("validation.fieldRequired", { field: u }));
12494
12494
  return;
12495
12495
  }
12496
12496
  await Ye();
12497
- }, at = (g, I, b, u, c) => {
12497
+ }, at = (g, I, x, u, c) => {
12498
12498
  const f = mt[g];
12499
12499
  if (!f) return null;
12500
- const v = P.includes(g), A = Se[g], N = G(b, d) || (f.translationKey ? d(`fields.${f.translationKey}`) : void 0) || f.label, x = g in W, ae = I ?? g, se = c ? c !== "placeholder" : q, we = se ? N : void 0;
12500
+ const v = P.includes(g), A = Se[g], N = G(x, d) || (f.translationKey ? d(`fields.${f.translationKey}`) : void 0) || f.label, w = g in W, ae = I ?? g, se = c ? c !== "placeholder" : q, we = se ? N : void 0;
12501
12501
  switch (f.type) {
12502
12502
  case "select":
12503
12503
  if (g === "countryResidence" || g === "addressCountry") {
@@ -12511,7 +12511,7 @@ const Ua = ({
12511
12511
  onChange: (ve) => de(g, ve),
12512
12512
  options: [{ value: "", label: se ? d("placeholders.selectCountry") : N }, ...ke],
12513
12513
  disabled: re,
12514
- readOnly: x,
12514
+ readOnly: w,
12515
12515
  error: A
12516
12516
  },
12517
12517
  ae
@@ -12528,7 +12528,7 @@ const Ua = ({
12528
12528
  placeholder: se ? void 0 : N,
12529
12529
  value: X[g] || "",
12530
12530
  onChange: (ke) => de(g, ke.target.value),
12531
- readOnly: x,
12531
+ readOnly: w,
12532
12532
  error: A
12533
12533
  },
12534
12534
  ae
@@ -12543,7 +12543,7 @@ const Ua = ({
12543
12543
  placeholder: se ? void 0 : N,
12544
12544
  value: X[g] || "",
12545
12545
  onChange: (ke) => de(g, ke.target.value),
12546
- readOnly: x,
12546
+ readOnly: w,
12547
12547
  error: A
12548
12548
  },
12549
12549
  ae
@@ -12558,7 +12558,7 @@ const Ua = ({
12558
12558
  placeholder: se ? void 0 : N,
12559
12559
  value: X[g] || "",
12560
12560
  onChange: (ke) => de(g, ke.target.value),
12561
- readOnly: x,
12561
+ readOnly: w,
12562
12562
  error: A
12563
12563
  },
12564
12564
  ae
@@ -12573,7 +12573,7 @@ const Ua = ({
12573
12573
  placeholder: se ? void 0 : N,
12574
12574
  value: X[g] || "",
12575
12575
  onChange: (ke) => de(g, ke.target.value),
12576
- readOnly: x,
12576
+ readOnly: w,
12577
12577
  error: A
12578
12578
  },
12579
12579
  ae
@@ -12605,7 +12605,7 @@ const Ua = ({
12605
12605
  }
12606
12606
  ) }, `custom-${I}`);
12607
12607
  if (!g.paramName) return null;
12608
- const b = Se[g.paramName], u = G(g.displayText, d) || G(g.label, d) || g.paramName, c = g.labelMode ? g.labelMode !== "placeholder" : q;
12608
+ const x = Se[g.paramName], u = G(g.displayText, d) || G(g.label, d) || g.paramName, c = g.labelMode ? g.labelMode !== "placeholder" : q;
12609
12609
  if (g.customType === "checkbox") {
12610
12610
  const f = Y[g.paramName] === "true";
12611
12611
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
@@ -12631,7 +12631,7 @@ const Ua = ({
12631
12631
  ]
12632
12632
  }
12633
12633
  ),
12634
- b && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: b })
12634
+ x && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: x })
12635
12635
  ] }, `custom-${I}`);
12636
12636
  }
12637
12637
  return /* @__PURE__ */ i(
@@ -12643,7 +12643,7 @@ const Ua = ({
12643
12643
  value: Y[g.paramName] || "",
12644
12644
  onChange: (f) => D(g.paramName, f.target.value),
12645
12645
  required: g.required,
12646
- error: b
12646
+ error: x
12647
12647
  },
12648
12648
  `custom-${I}`
12649
12649
  );
@@ -12662,16 +12662,16 @@ const Ua = ({
12662
12662
  We,
12663
12663
  {
12664
12664
  checked: I,
12665
- onChange: (b) => D(g.conditionalOn, b ? "true" : "false")
12665
+ onChange: (x) => D(g.conditionalOn, x ? "true" : "false")
12666
12666
  }
12667
12667
  ),
12668
12668
  /* @__PURE__ */ i("span", { style: { fontSize: "14px", fontWeight: 500 }, children: G(g.conditionalLabel, d) || g.conditionalOn })
12669
12669
  ]
12670
12670
  }
12671
12671
  ),
12672
- I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: g.fields.map((b, u) => {
12673
- const c = Math.min(4, Math.max(1, Number(b.colSpan) || 4)), f = b.isCustom ? `custom-${u}-${b.paramName}` : `builtin-${b.name}-${u}`;
12674
- return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${c} / span ${c}` }, children: b.isCustom ? He(b, u) : at(b.name, f, b.displayText, b.countriesType, b.labelMode) }, f);
12672
+ I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: g.fields.map((x, u) => {
12673
+ const c = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), f = x.isCustom ? `custom-${u}-${x.paramName}` : `builtin-${x.name}-${u}`;
12674
+ return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${c} / span ${c}` }, children: x.isCustom ? He(x, u) : at(x.name, f, x.displayText, x.countriesType, x.labelMode) }, f);
12675
12675
  }) })
12676
12676
  ] });
12677
12677
  };
@@ -12681,9 +12681,9 @@ const Ua = ({
12681
12681
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
12682
12682
  ] }) }) });
12683
12683
  if (T) {
12684
- const g = T[ye] ?? T[0], I = ze === -1, b = le === -1, u = T.length, c = _(g), f = ge(g), v = Object.values(Se), A = !c && !!g.conditionalOn && g.conditionalMode === "block", N = F || m || A || f;
12685
- let x;
12686
- return A || f ? x = d("common.blocked") : b ? x = g.conditionalOn && !c ? d("common.skipAndSubmit") : d("common.submit") : x = g.conditionalOn && !c ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12684
+ const g = T[ye] ?? T[0], I = ze === -1, x = le === -1, u = T.length, c = _(g), f = ge(g), v = Object.values(Se), A = !c && !!g.conditionalOn && g.conditionalMode === "block", N = F || m || A || f;
12685
+ let w;
12686
+ return A || f ? w = d("common.blocked") : x ? w = g.conditionalOn && !c ? d("common.skipAndSubmit") : d("common.submit") : w = g.conditionalOn && !c ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12687
12687
  /* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createCompany.title") }) }),
12688
12688
  /* @__PURE__ */ s(oe, { children: [
12689
12689
  (g.title || g.subtitle) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
@@ -12738,7 +12738,7 @@ const Ua = ({
12738
12738
  ),
12739
12739
  I && r && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: r, disabled: F || m, children: "Cancel" })
12740
12740
  ] }),
12741
- /* @__PURE__ */ i(Z, { type: "button", isLoading: F || m, disabled: N, onClick: b ? Ye : Ae, children: x })
12741
+ /* @__PURE__ */ i(Z, { type: "button", isLoading: F || m, disabled: N, onClick: x ? Ye : Ae, children: w })
12742
12742
  ] })
12743
12743
  ] }) });
12744
12744
  }
@@ -12773,7 +12773,7 @@ const Ua = ({
12773
12773
  workflowKey: m,
12774
12774
  nextWorkflowKey: d,
12775
12775
  hasWorkflowChanged: y,
12776
- isLoading: w,
12776
+ isLoading: h,
12777
12777
  error: z,
12778
12778
  moveBack: L,
12779
12779
  refreshProgress: C
@@ -12784,7 +12784,7 @@ const Ua = ({
12784
12784
  l != null && l.workflowResult && t && t(l.workflowResult);
12785
12785
  }, [l == null ? void 0 : l.workflowResult, t]), Ne.useEffect(() => {
12786
12786
  y && T(!1);
12787
- }, [y]), w || !l)
12787
+ }, [y]), h || !l)
12788
12788
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
12789
12789
  /* @__PURE__ */ i(Be, { className: "my-8" }),
12790
12790
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n("workflow.loadingWorkflow") })
@@ -12866,7 +12866,7 @@ const Ua = ({
12866
12866
  return "";
12867
12867
  }
12868
12868
  }, O = () => {
12869
- const H = p.filter((V) => V.visibility !== !1), J = H.findIndex((V) => V.order === o.order), re = J >= 0 ? J + 1 : 1, h = H.length, R = h > 1 ? (J + 1) / h * 100 : 100;
12869
+ const H = p.filter((V) => V.visibility !== !1), J = H.findIndex((V) => V.order === o.order), re = J >= 0 ? J + 1 : 1, b = H.length, R = b > 1 ? (J + 1) / b * 100 : 100;
12870
12870
  return /* @__PURE__ */ s("div", { className: "metakyc-progress-wrapper", style: {
12871
12871
  marginBottom: "24px",
12872
12872
  backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
@@ -12877,7 +12877,7 @@ const Ua = ({
12877
12877
  }, children: [
12878
12878
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
12879
12879
  /* @__PURE__ */ i(kt, {}),
12880
- /* @__PURE__ */ i(oi, { variant: l.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: re, total: h }) })
12880
+ /* @__PURE__ */ i(oi, { variant: l.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: re, total: b }) })
12881
12881
  ] }),
12882
12882
  /* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
12883
12883
  /* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
@@ -12903,7 +12903,7 @@ const Ua = ({
12903
12903
  )
12904
12904
  ] });
12905
12905
  }, U = () => {
12906
- const re = p.filter((R) => R.visibility !== !1).findIndex((R) => R.order === o.order) <= 0, h = {
12906
+ const re = p.filter((R) => R.visibility !== !1).findIndex((R) => R.order === o.order) <= 0, b = {
12907
12907
  applicantId: e,
12908
12908
  onComplete: async () => {
12909
12909
  await C();
@@ -12912,20 +12912,20 @@ const Ua = ({
12912
12912
  };
12913
12913
  switch (o.action) {
12914
12914
  case me.Questionaries:
12915
- return /* @__PURE__ */ i(ta, { ...h });
12915
+ return /* @__PURE__ */ i(ta, { ...b });
12916
12916
  case me.UploadDocument:
12917
- return /* @__PURE__ */ i(aa, { ...h });
12917
+ return /* @__PURE__ */ i(aa, { ...b });
12918
12918
  case me.Overview:
12919
- return /* @__PURE__ */ i(na, { ...h });
12919
+ return /* @__PURE__ */ i(na, { ...b });
12920
12920
  case me.IdentitySdk:
12921
- return /* @__PURE__ */ i(va, { ...h });
12921
+ return /* @__PURE__ */ i(va, { ...b });
12922
12922
  case me.RiskScoring:
12923
- return /* @__PURE__ */ i(ua, { ...h });
12923
+ return /* @__PURE__ */ i(ua, { ...b });
12924
12924
  case me.AdditionalData:
12925
12925
  case me.InvestorCategorization:
12926
- return /* @__PURE__ */ i(ga, { ...h });
12926
+ return /* @__PURE__ */ i(ga, { ...b });
12927
12927
  case me.AppropriatenessTest:
12928
- return /* @__PURE__ */ i(ya, { ...h });
12928
+ return /* @__PURE__ */ i(ya, { ...b });
12929
12929
  case me.ManualReview:
12930
12930
  return /* @__PURE__ */ i(
12931
12931
  _t,
@@ -12982,7 +12982,7 @@ const Ua = ({
12982
12982
  gap: "0"
12983
12983
  },
12984
12984
  children: e.map((o, p) => {
12985
- const m = p < t, d = p === t, y = m || d, w = o.displayName || o.name || a(o.action) || `Step ${p + 1}`;
12985
+ const m = p < t, d = p === t, y = m || d, h = o.displayName || o.name || a(o.action) || `Step ${p + 1}`;
12986
12986
  return /* @__PURE__ */ s(Ne.Fragment, { children: [
12987
12987
  /* @__PURE__ */ s(
12988
12988
  "div",
@@ -13022,7 +13022,7 @@ const Ua = ({
13022
13022
  fontWeight: d ? 600 : 400,
13023
13023
  color: d ? "var(--metakyc-text-primary, #111827)" : m ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
13024
13024
  transition: "color 0.2s ease"
13025
- }, children: w })
13025
+ }, children: h })
13026
13026
  ]
13027
13027
  }
13028
13028
  ),