@incodetech/web 0.0.0-dev-20260302-ad37d43 → 0.0.0-dev-20260302-e38ab90

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.
Files changed (41) hide show
  1. package/dist/{Trans-Bdg0o_Cr.js → Trans-BHurUlNG.js} +3 -3
  2. package/dist/authentication/authentication.es.js +5 -5
  3. package/dist/base.css +41 -1
  4. package/dist/{baseTutorial-BgA1dpRi.js → baseTutorial-Bbadb04i.js} +5 -5
  5. package/dist/{chevronDown-C5Kn1woB.js → chevronDown-CIyU9-x9.js} +1 -1
  6. package/dist/countries-DDCxQhGs.js +3206 -0
  7. package/dist/curp-validation/curp-validation.es.js +182 -797
  8. package/dist/curp-validation/styles.css +4 -1
  9. package/dist/dateInputComposed-BwjWmZFc.js +172 -0
  10. package/dist/{documentUpload-h5GfSa2m.js → documentUpload-BnXvLmkL.js} +4 -4
  11. package/dist/dropdownComposed-vWK3dHjS.js +461 -0
  12. package/dist/ekyb/styles.css +107 -0
  13. package/dist/ekybModule-Dm04An2k.js +243 -0
  14. package/dist/ekyc/styles.css +274 -0
  15. package/dist/ekycModule-DQO4I6h1.js +451 -0
  16. package/dist/email/email.es.js +4 -4
  17. package/dist/{errorIcon-BT7Rf4z7.js → errorIcon-hyIEsKoP.js} +1 -1
  18. package/dist/{faceMatch-DL5ICOMJ.js → faceMatch-CTYWaJ2M.js} +4 -4
  19. package/dist/flow/flow.es.js +191 -161
  20. package/dist/flow/styles.css +536 -1
  21. package/dist/geolocation/geolocation.es.js +5 -5
  22. package/dist/governmentValidation/governmentValidation.es.js +8 -8
  23. package/dist/id/id.es.js +7 -7
  24. package/dist/{incodeComponent-BUltqUSz.js → incodeComponent-DSqGVqSo.js} +3 -3
  25. package/dist/{incodeModule-BwGymwZT.js → incodeModule-_kfNnq5z.js} +1 -1
  26. package/dist/index.es.js +2 -2
  27. package/dist/{otpInput-B7TR21xE.js → otpInput-Bx16y6dR.js} +2 -2
  28. package/dist/phone/phone.es.js +133 -3332
  29. package/dist/{processing-B7fzlPZl.js → processing-BuaxyhmY.js} +3 -3
  30. package/dist/selfie/selfie.es.js +6 -6
  31. package/dist/{setup-CFo1IZlN.js → setup-B6jZts5S.js} +2 -2
  32. package/dist/{spinner-BiENeSCl.js → spinner-Ogo-u91P.js} +2 -2
  33. package/dist/{successIcon-CTA9p_2h.js → successIcon-Ci24t3I5.js} +1 -1
  34. package/dist/{tutorial-DGo0fw3f.js → tutorial-637lvO4s.js} +7 -7
  35. package/dist/types/ekyb/styles.d.ts +1 -0
  36. package/dist/types/ekyc/styles.d.ts +1 -0
  37. package/dist/{uiConfig-BG6lJ_HG.js → uiConfig-CbMyDWix.js} +1 -1
  38. package/dist/{useTranslation-Cm51-Wm-.js → useTranslation-B1jrtqlW.js} +1 -1
  39. package/dist/{vendor-preact-CM6KQyKc.js → vendor-preact-BDue3y7V.js} +1 -0
  40. package/dist/verificationResult-BMHBsZ8s.js +106 -0
  41. package/package.json +17 -3
@@ -1,63 +1,65 @@
1
- import { u as l, B as $, r as _, a as H } from "../incodeModule-BwGymwZT.js";
2
- import { createOrchestratedFlowManager as V, getRequiredWasmPipelines as O } from "@incodetech/core/flow";
3
- import { A as y, d as U, y as g } from "../vendor-preact-CM6KQyKc.js";
4
- import { api as L, warmupWasm as z } from "@incodetech/core";
1
+ import { u as s, B as $, r as _, a as V } from "../incodeModule-_kfNnq5z.js";
2
+ import { createOrchestratedFlowManager as k, getRequiredWasmPipelines as R } from "@incodetech/core/flow";
3
+ import { A as E, d as L, y as g } from "../vendor-preact-BDue3y7V.js";
4
+ import { api as N, warmupWasm as H } from "@incodetech/core";
5
5
  import "../instance-B-q0ZREN.js";
6
- import { u as G } from "../useTranslation-Cm51-Wm-.js";
7
- import { S as C } from "../spinner-BiENeSCl.js";
8
- import { emailMachine as k } from "@incodetech/core/email";
6
+ import { u as z } from "../useTranslation-B1jrtqlW.js";
7
+ import { S as C } from "../spinner-Ogo-u91P.js";
8
+ import { ekybMachine as G } from "@incodetech/core/ekyb";
9
+ import { ekycMachine as B } from "@incodetech/core/ekyc";
10
+ import { emailMachine as K } from "@incodetech/core/email";
9
11
  import { faceMatchMachine as W } from "@incodetech/core/face-match";
10
12
  import { geolocationMachine as j } from "@incodetech/core/geolocation";
11
- import { documentUploadMachine as B } from "@incodetech/core/document-upload";
13
+ import { documentUploadMachine as Y } from "@incodetech/core/document-upload";
12
14
  import { idCaptureMachine as v } from "@incodetech/core/id";
13
- import { phoneMachine as K } from "@incodetech/core/phone";
15
+ import { phoneMachine as X } from "@incodetech/core/phone";
14
16
  import { selfieMachine as q } from "@incodetech/core/selfie";
15
- import { authenticationMachine as Y } from "@incodetech/core/authentication";
16
- import { curpValidationMachine as Z } from "@incodetech/core/curp-validation";
17
- import { governmentValidationMachine as J } from "@incodetech/core/government-validation";
18
- import { s as Q } from "../setup-CFo1IZlN.js";
19
- import { s as b } from "../uiConfig-BG6lJ_HG.js";
20
- function X(e) {
17
+ import { authenticationMachine as Z } from "@incodetech/core/authentication";
18
+ import { curpValidationMachine as J } from "@incodetech/core/curp-validation";
19
+ import { governmentValidationMachine as Q } from "@incodetech/core/government-validation";
20
+ import { s as ee } from "../setup-B6jZts5S.js";
21
+ import { s as b } from "../uiConfig-CbMyDWix.js";
22
+ function te(e) {
21
23
  let t = e.replace("#", "");
22
- t.length === 3 && (t = t.split("").map((s) => s + s).join(""));
24
+ t.length === 3 && (t = t.split("").map((a) => a + a).join(""));
23
25
  const o = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
24
26
  if (!o) return null;
25
- const a = Number.parseInt(o[1], 16) / 255, u = Number.parseInt(o[2], 16) / 255, n = Number.parseInt(o[3], 16) / 255, r = Math.max(a, u, n), p = Math.min(a, u, n);
27
+ const l = Number.parseInt(o[1], 16) / 255, u = Number.parseInt(o[2], 16) / 255, n = Number.parseInt(o[3], 16) / 255, r = Math.max(l, u, n), p = Math.min(l, u, n);
26
28
  let i = 0, f = 0;
27
29
  const d = (r + p) / 2;
28
30
  if (r !== p) {
29
- const s = r - p;
30
- switch (f = d > 0.5 ? s / (2 - r - p) : s / (r + p), r) {
31
- case a:
32
- i = ((u - n) / s + (u < n ? 6 : 0)) / 6;
31
+ const a = r - p;
32
+ switch (f = d > 0.5 ? a / (2 - r - p) : a / (r + p), r) {
33
+ case l:
34
+ i = ((u - n) / a + (u < n ? 6 : 0)) / 6;
33
35
  break;
34
36
  case u:
35
- i = ((n - a) / s + 2) / 6;
37
+ i = ((n - l) / a + 2) / 6;
36
38
  break;
37
39
  case n:
38
- i = ((a - u) / s + 4) / 6;
40
+ i = ((l - u) / a + 4) / 6;
39
41
  break;
40
42
  }
41
43
  }
42
44
  return { h: i * 360, s: f * 100, l: d * 100 };
43
45
  }
44
46
  function w(e, t, o) {
45
- const a = e / 360, u = t / 100, n = o / 100;
47
+ const l = e / 360, u = t / 100, n = o / 100;
46
48
  let r, p, i;
47
49
  if (u === 0)
48
50
  r = p = i = n;
49
51
  else {
50
- const d = (h, M, m) => (m < 0 && (m += 1), m > 1 && (m -= 1), m < 0.16666666666666666 ? h + (M - h) * 6 * m : m < 0.5 ? M : m < 0.6666666666666666 ? h + (M - h) * (0.6666666666666666 - m) * 6 : h), s = n < 0.5 ? n * (1 + u) : n + u - n * u, c = 2 * n - s;
51
- r = d(c, s, a + 1 / 3), p = d(c, s, a), i = d(c, s, a - 1 / 3);
52
+ const d = (h, M, m) => (m < 0 && (m += 1), m > 1 && (m -= 1), m < 0.16666666666666666 ? h + (M - h) * 6 * m : m < 0.5 ? M : m < 0.6666666666666666 ? h + (M - h) * (0.6666666666666666 - m) * 6 : h), a = n < 0.5 ? n * (1 + u) : n + u - n * u, c = 2 * n - a;
53
+ r = d(c, a, l + 1 / 3), p = d(c, a, l), i = d(c, a, l - 1 / 3);
52
54
  }
53
55
  const f = (d) => {
54
- const s = Math.round(d * 255).toString(16);
55
- return s.length === 1 ? `0${s}` : s;
56
+ const a = Math.round(d * 255).toString(16);
57
+ return a.length === 1 ? `0${a}` : a;
56
58
  };
57
59
  return `#${f(r)}${f(p)}${f(i)}`;
58
60
  }
59
- function ee(e) {
60
- const t = X(e);
61
+ function ne(e) {
62
+ const t = te(e);
61
63
  if (!t)
62
64
  throw new Error(`Invalid color format: ${e}`);
63
65
  return {
@@ -70,14 +72,14 @@ function ee(e) {
70
72
  900: w(t.h, t.s, 20)
71
73
  };
72
74
  }
73
- function te(e, t) {
75
+ function oe(e, t) {
74
76
  if (typeof document > "u")
75
77
  return;
76
- const o = ee(e);
77
- let a = document.getElementById(
78
+ const o = ne(e);
79
+ let l = document.getElementById(
78
80
  "incode-theme"
79
81
  );
80
- a || (a = document.createElement("style"), a.id = "incode-theme", document.head.appendChild(a));
82
+ l || (l = document.createElement("style"), l.id = "incode-theme", document.head.appendChild(l));
81
83
  const u = t || "#ffffff", n = `
82
84
  :root,
83
85
  :host {
@@ -91,84 +93,88 @@ function te(e, t) {
91
93
  --button-primary-text-default: ${u};
92
94
  }
93
95
  `;
94
- a.textContent = n;
96
+ l.textContent = n;
95
97
  }
96
- async function ne() {
97
- return (await L.get("/omni/asset/fetch-all")).data;
98
+ async function re() {
99
+ return (await N.get("/omni/asset/fetch-all")).data;
98
100
  }
99
101
  const A = /* @__PURE__ */ new Map();
100
- async function oe(e) {
102
+ async function ie(e) {
101
103
  if (e.startsWith("data:"))
102
104
  return e;
103
105
  const t = A.get(e);
104
106
  if (t)
105
107
  return t;
106
- const a = await (await fetch(e)).blob(), u = await new Promise((n, r) => {
108
+ const l = await (await fetch(e)).blob(), u = await new Promise((n, r) => {
107
109
  const p = new FileReader();
108
- p.onloadend = () => n(p.result), p.onerror = r, p.readAsDataURL(a);
110
+ p.onloadend = () => n(p.result), p.onerror = r, p.readAsDataURL(l);
109
111
  });
110
112
  return A.set(e, u), u;
111
113
  }
112
- async function re() {
113
- const e = await ne();
114
+ async function ae() {
115
+ const e = await re();
114
116
  if (!e.theme)
115
117
  throw new Error("Theme URL not found in assets response");
116
118
  const t = e.theme, o = t.startsWith("http://") || t.startsWith("https://");
117
- let a;
119
+ let l;
118
120
  if (o) {
119
121
  const r = await fetch(t);
120
122
  if (!r.ok)
121
123
  throw new Error(`Failed to fetch theme: ${r.statusText}`);
122
- a = await r.json();
124
+ l = await r.json();
123
125
  } else
124
- a = (await L.get(t)).data;
125
- const u = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || a.logo;
126
+ l = (await N.get(t)).data;
127
+ const u = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || l.logo;
126
128
  let n = u;
127
- return u && (n = await oe(u)), {
128
- ...a,
129
+ return u && (n = await ie(u)), {
130
+ ...l,
129
131
  logo: n
130
132
  };
131
133
  }
132
- async function ie() {
133
- const e = await re();
134
- return e.main && te(e.main, e.buttonColor), e;
134
+ async function se() {
135
+ const e = await ae();
136
+ return e.main && oe(e.main, e.buttonColor), e;
135
137
  }
136
- const T = () => import("../id/id.es.js").then((e) => e.Id), S = {
138
+ const y = () => import("../id/id.es.js").then((e) => e.Id), F = {
137
139
  PHONE: () => import("../phone/phone.es.js").then((e) => e.Phone),
138
140
  EMAIL: () => import("../email/email.es.js").then((e) => e.Email),
139
141
  SELFIE: () => import("../selfie/selfie.es.js").then((e) => e.Selfie),
140
142
  AUTHENTICATION: () => import("../authentication/authentication.es.js").then((e) => e.Authentication),
141
- ID: T,
142
- TUTORIAL_ID: T,
143
- SECOND_ID: T,
144
- THIRD_ID: () => import("../documentUpload-h5GfSa2m.js").then((e) => e.DocumentUpload),
145
- FACE_MATCH: () => import("../faceMatch-DL5ICOMJ.js").then((e) => e.FaceMatch),
143
+ ID: y,
144
+ TUTORIAL_ID: y,
145
+ SECOND_ID: y,
146
+ THIRD_ID: () => import("../documentUpload-BnXvLmkL.js").then((e) => e.DocumentUpload),
147
+ FACE_MATCH: () => import("../faceMatch-CTYWaJ2M.js").then((e) => e.FaceMatch),
146
148
  CURP_VALIDATION: () => import("../curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
147
149
  GOVT_VALIDATION_PROVISIONING: () => import("../governmentValidation/governmentValidation.es.js").then(
148
150
  (e) => e.GovernmentValidation
149
151
  ),
150
- GEOLOCATION: () => import("../geolocation/geolocation.es.js").then((e) => e.Geolocation)
152
+ GEOLOCATION: () => import("../geolocation/geolocation.es.js").then((e) => e.Geolocation),
153
+ EXTERNAL_VERIFICATION: () => import("../ekycModule-DQO4I6h1.js").then((e) => e.EkycModule),
154
+ EKYB: () => import("../ekybModule-Dm04An2k.js").then((e) => e.EkybModule)
151
155
  };
152
- function R() {
153
- return V({
156
+ function D() {
157
+ return k({
154
158
  modules: {
155
- PHONE: K,
156
- EMAIL: k,
159
+ PHONE: X,
160
+ EMAIL: K,
157
161
  SELFIE: q,
158
- AUTHENTICATION: Y,
162
+ AUTHENTICATION: Z,
159
163
  ID: v,
160
164
  TUTORIAL_ID: v,
161
165
  SECOND_ID: v,
162
- THIRD_ID: B,
166
+ THIRD_ID: Y,
163
167
  FACE_MATCH: W,
164
- CURP_VALIDATION: Z,
165
- GOVT_VALIDATION_PROVISIONING: J,
166
- GEOLOCATION: j
168
+ CURP_VALIDATION: J,
169
+ GOVT_VALIDATION_PROVISIONING: Q,
170
+ GEOLOCATION: j,
171
+ EXTERNAL_VERIFICATION: B,
172
+ EKYB: G
167
173
  }
168
174
  });
169
175
  }
170
- async function N(e) {
171
- await Q({
176
+ async function U(e) {
177
+ await ee({
172
178
  apiURL: e.apiURL,
173
179
  token: e.token,
174
180
  i18n: { lang: e.lang ?? "en" }
@@ -176,7 +182,7 @@ async function N(e) {
176
182
  }
177
183
  async function P() {
178
184
  try {
179
- const e = await ie(), t = {
185
+ const e = await se(), t = {
180
186
  logoSrc: e.logo,
181
187
  hideFooterBranding: e.hideFooterBranding
182
188
  };
@@ -186,33 +192,33 @@ async function P() {
186
192
  }
187
193
  }
188
194
  function x(e, t) {
189
- const o = O(e.flow);
190
- o.length > 0 && z({
195
+ const o = R(e.flow);
196
+ o.length > 0 && H({
191
197
  ...t,
192
198
  pipelines: o
193
- }).catch((a) => {
194
- console.error("WASM warmup failed:", a);
199
+ }).catch((l) => {
200
+ console.error("WASM warmup failed:", l);
195
201
  });
196
202
  }
197
- function ae(e) {
203
+ function le(e) {
198
204
  const t = e.currentStep;
199
205
  if (t) {
200
- const o = S[t];
206
+ const o = F[t];
201
207
  o && o().catch(() => {
202
208
  });
203
209
  }
204
210
  }
205
- const se = ({
211
+ const ce = ({
206
212
  moduleKey: e,
207
213
  onNext: t
208
- }) => /* @__PURE__ */ l("section", { class: "IncodeUnsupportedModule", "aria-live": "polite", children: /* @__PURE__ */ l("div", { class: "IncodeUnsupportedModuleContent", children: [
209
- /* @__PURE__ */ l("h2", { class: "IncodeUnsupportedModuleTitle", children: "Module not available" }),
210
- /* @__PURE__ */ l("p", { class: "IncodeUnsupportedModuleMessage", children: [
214
+ }) => /* @__PURE__ */ s("section", { class: "IncodeUnsupportedModule", "aria-live": "polite", children: /* @__PURE__ */ s("div", { class: "IncodeUnsupportedModuleContent", children: [
215
+ /* @__PURE__ */ s("h2", { class: "IncodeUnsupportedModuleTitle", children: "Module not available" }),
216
+ /* @__PURE__ */ s("p", { class: "IncodeUnsupportedModuleMessage", children: [
211
217
  'The "',
212
218
  e,
213
219
  '" module is not yet supported in this version.'
214
220
  ] }),
215
- /* @__PURE__ */ l(
221
+ /* @__PURE__ */ s(
216
222
  $,
217
223
  {
218
224
  onClick: t,
@@ -222,7 +228,7 @@ const se = ({
222
228
  }
223
229
  )
224
230
  ] }) }), I = /* @__PURE__ */ new Map();
225
- function E(e) {
231
+ function S(e) {
226
232
  const t = I.get(e);
227
233
  if (!t)
228
234
  throw new Error("Preload state not found");
@@ -245,24 +251,24 @@ function E(e) {
245
251
  }
246
252
  };
247
253
  }
248
- function Le(e) {
254
+ function xe(e) {
249
255
  const { token: t } = e;
250
256
  if (I.has(t))
251
- return E(t);
252
- let o, a;
257
+ return S(t);
258
+ let o, l;
253
259
  const u = new Promise((i, f) => {
254
- o = i, a = f;
255
- }), n = R(), r = {
260
+ o = i, l = f;
261
+ }), n = D(), r = {
256
262
  status: "loading",
257
263
  flowManager: n,
258
264
  config: e,
259
265
  readyPromise: u,
260
266
  readyResolve: o,
261
- readyReject: a
267
+ readyReject: l
262
268
  };
263
269
  return I.set(t, r), (async () => {
264
270
  try {
265
- await N({
271
+ await U({
266
272
  apiURL: e.apiURL,
267
273
  token: e.token,
268
274
  lang: e.lang
@@ -271,8 +277,8 @@ function Le(e) {
271
277
  r.theme = d.theme, r.uiConfig = d.uiConfig;
272
278
  }), f = n.subscribe((d) => {
273
279
  if (d.status === "ready") {
274
- const s = d;
275
- e.wasmConfig && x(s, e.wasmConfig), ae(s), r.unsubscribe?.(), r.unsubscribe = void 0, r.status = "ready", r.readyResolve();
280
+ const a = d;
281
+ e.wasmConfig && x(a, e.wasmConfig), le(a), r.unsubscribe?.(), r.unsubscribe = void 0, r.status = "ready", r.readyResolve();
276
282
  } else d.status === "error" && (r.unsubscribe?.(), r.unsubscribe = void 0, r.status = "error", r.error = d.error, r.readyReject(new Error(d.error)));
277
283
  });
278
284
  r.unsubscribe = f, n.load(), await i;
@@ -281,37 +287,37 @@ function Le(e) {
281
287
  i instanceof Error ? i : new Error("Failed to preload")
282
288
  ), I.delete(t);
283
289
  }
284
- })(), E(t);
290
+ })(), S(t);
285
291
  }
286
- function F(e) {
292
+ function T(e) {
287
293
  return I.get(e) ?? null;
288
294
  }
289
- function D(e) {
290
- const t = F(e);
295
+ function O(e) {
296
+ const t = T(e);
291
297
  return t && I.delete(e), t;
292
298
  }
293
- function le(e) {
294
- const { apiURL: t, token: o, lang: a, disableDashboardTheme: u, onError: n } = e, r = y(null), [p, i] = U(() => {
295
- const d = F(o);
299
+ function de(e) {
300
+ const { apiURL: t, token: o, lang: l, disableDashboardTheme: u, onError: n } = e, r = E(null), [p, i] = L(() => {
301
+ const d = T(o);
296
302
  if (d?.status === "ready") {
297
- const c = D(o);
303
+ const c = O(o);
298
304
  if (c)
299
305
  return r.current = c.flowManager, c.uiConfig && b(c.uiConfig), { status: "ready", flowManager: c.flowManager };
300
306
  }
301
- const s = R();
302
- return r.current = s, d?.status === "error" ? {
307
+ const a = D();
308
+ return r.current = a, d?.status === "error" ? {
303
309
  status: "error",
304
310
  error: d.error ?? "Preload failed",
305
- flowManager: s
306
- } : { status: "initializing", flowManager: s };
307
- }), f = y(!1);
311
+ flowManager: a
312
+ } : { status: "initializing", flowManager: a };
313
+ }), f = E(!1);
308
314
  return g(() => {
309
315
  if (p.status !== "initializing")
310
316
  return;
311
- const d = F(o);
317
+ const d = T(o);
312
318
  if (d?.status === "loading") {
313
319
  d.readyPromise.then(() => {
314
- const c = D(o);
320
+ const c = O(o);
315
321
  c && (r.current = c.flowManager, c.uiConfig && b(c.uiConfig), i({ status: "ready", flowManager: c.flowManager }));
316
322
  }).catch((c) => {
317
323
  const h = c instanceof Error ? c.message : "Preload failed";
@@ -327,7 +333,7 @@ function le(e) {
327
333
  return;
328
334
  f.current = !0, (async () => {
329
335
  try {
330
- await N({ apiURL: t, token: o, lang: a });
336
+ await U({ apiURL: t, token: o, lang: l });
331
337
  const c = u ? Promise.resolve() : P().then((h) => {
332
338
  h.uiConfig && b(h.uiConfig);
333
339
  });
@@ -341,16 +347,16 @@ function le(e) {
341
347
  }), n?.(h);
342
348
  }
343
349
  })();
344
- }, [t, o, a, u, n, p]), p;
350
+ }, [t, o, l, u, n, p]), p;
345
351
  }
346
- function ce(e) {
347
- const { moduleKey: t, onModuleLoading: o, onModuleLoaded: a, onError: u } = e, [n, r] = U({ status: "idle" });
352
+ function ue(e) {
353
+ const { moduleKey: t, onModuleLoading: o, onModuleLoaded: l, onError: u } = e, [n, r] = L({ status: "idle" });
348
354
  return g(() => {
349
355
  if (!t) {
350
356
  r({ status: "idle" });
351
357
  return;
352
358
  }
353
- const p = S[t];
359
+ const p = F[t];
354
360
  if (!p) {
355
361
  r({ status: "unsupported", moduleKey: t });
356
362
  return;
@@ -358,7 +364,7 @@ function ce(e) {
358
364
  r({ status: "loading", moduleKey: t }), o?.(t);
359
365
  let i = !1;
360
366
  return p().then((f) => {
361
- i || (r({ status: "loaded", moduleKey: t, Component: f }), a?.(t));
367
+ i || (r({ status: "loaded", moduleKey: t, Component: f }), l?.(t));
362
368
  }).catch((f) => {
363
369
  if (!i) {
364
370
  const d = f instanceof Error ? f.message : "Failed to load module";
@@ -367,48 +373,48 @@ function ce(e) {
367
373
  }), () => {
368
374
  i = !0;
369
375
  };
370
- }, [t, o, a, u]), n;
376
+ }, [t, o, l, u]), n;
371
377
  }
372
- function de(e, t) {
373
- const o = y(/* @__PURE__ */ new Set());
378
+ function fe(e, t) {
379
+ const o = E(/* @__PURE__ */ new Set());
374
380
  g(() => {
375
381
  if (t < e.length - 1) {
376
- const a = e[t + 1];
377
- if (a && !o.current.has(a)) {
378
- o.current.add(a);
379
- const u = S[a];
382
+ const l = e[t + 1];
383
+ if (l && !o.current.has(l)) {
384
+ o.current.add(l);
385
+ const u = F[l];
380
386
  u && u().catch(() => {
381
- o.current.delete(a);
387
+ o.current.delete(l);
382
388
  });
383
389
  }
384
390
  }
385
391
  }, [e, t]);
386
392
  }
387
- const ue = ({
393
+ const pe = ({
388
394
  config: e,
389
395
  onFinish: t,
390
396
  onError: o
391
397
  }) => {
392
- const { t: a } = G(), u = le({
398
+ const { t: l } = z(), u = de({
393
399
  apiURL: e.apiURL,
394
400
  token: e.token,
395
401
  lang: e.lang,
396
402
  disableDashboardTheme: e.disableDashboardTheme,
397
403
  onError: o
398
- }), [n, r] = H(() => u.flowManager, {
404
+ }), [n, r] = V(() => u.flowManager, {
399
405
  autoLoad: !1
400
- }), p = ce({
406
+ }), p = ue({
401
407
  moduleKey: n?.status === "ready" ? n.currentStep : void 0,
402
408
  onModuleLoading: e.onModuleLoading,
403
409
  onModuleLoaded: e.onModuleLoaded,
404
410
  onError: o
405
411
  });
406
- if (de(
412
+ if (fe(
407
413
  n?.status === "ready" ? n.steps : [],
408
414
  n?.status === "ready" ? n.currentStepIndex : -1
409
415
  ), g(() => {
410
416
  if (n?.status === "ready" && e.wasmConfig) {
411
- const i = n, f = O(i.flow);
417
+ const i = n, f = R(i.flow);
412
418
  f.length > 0 && (e.onWasmWarmup?.(f), x(i, e.wasmConfig));
413
419
  }
414
420
  }, [n, e]), g(() => {
@@ -418,12 +424,12 @@ const ue = ({
418
424
  }, [n?.status, o, n]), g(() => {
419
425
  n?.status === "ready" && n.currentStep === "ID" && n.steps.includes("TUTORIAL_ID") && r.completeModule();
420
426
  }, [n, r]), u.status === "error")
421
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l("div", { children: [
427
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s("div", { children: [
422
428
  "Error: ",
423
429
  u.error
424
430
  ] }) });
425
431
  if (u.status === "initializing")
426
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
432
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
427
433
  C,
428
434
  {
429
435
  title: e.spinnerConfig?.title,
@@ -433,7 +439,7 @@ const ue = ({
433
439
  }
434
440
  ) });
435
441
  if (!n || n.status === "idle" || n.status === "loading")
436
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
442
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
437
443
  C,
438
444
  {
439
445
  title: e.spinnerConfig?.title,
@@ -443,7 +449,7 @@ const ue = ({
443
449
  }
444
450
  ) });
445
451
  if (n.status === "error")
446
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l("div", { children: [
452
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s("div", { children: [
447
453
  "Error: ",
448
454
  n.error
449
455
  ] }) });
@@ -452,36 +458,36 @@ const ue = ({
452
458
  if (n.status === "ready") {
453
459
  const { currentStep: i, config: f } = n;
454
460
  if (!i || !f)
455
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
461
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
456
462
  C,
457
463
  {
458
- title: e.spinnerConfig?.title ?? a("loadingCircle.hangOn"),
459
- subtitle: e.spinnerConfig?.subtitle ?? a("loadingCircle.validating"),
464
+ title: e.spinnerConfig?.title ?? l("loadingCircle.hangOn"),
465
+ subtitle: e.spinnerConfig?.subtitle ?? l("loadingCircle.validating"),
460
466
  size: e.spinnerConfig?.size,
461
467
  fullScreen: !0
462
468
  }
463
469
  ) });
464
470
  if (p.status === "unsupported")
465
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
466
- se,
471
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
472
+ ce,
467
473
  {
468
474
  moduleKey: i,
469
475
  onNext: () => r.completeModule()
470
476
  }
471
477
  ) });
472
478
  if (p.status === "idle" || p.status === "loading" || p.status === "error")
473
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
479
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
474
480
  C,
475
481
  {
476
- title: e.spinnerConfig?.title ?? a("loadingCircle.hangOn"),
477
- subtitle: e.spinnerConfig?.subtitle ?? a("loadingCircle.validating"),
482
+ title: e.spinnerConfig?.title ?? l("loadingCircle.hangOn"),
483
+ subtitle: e.spinnerConfig?.subtitle ?? l("loadingCircle.validating"),
478
484
  size: e.spinnerConfig?.size,
479
485
  fullScreen: !0
480
486
  }
481
487
  ) });
482
488
  const { Component: d } = p;
483
489
  if (i === "SELFIE")
484
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
490
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
485
491
  d,
486
492
  {
487
493
  config: f,
@@ -493,7 +499,7 @@ const ue = ({
493
499
  `selfie-${n.currentStepIndex}`
494
500
  ) });
495
501
  if (i === "AUTHENTICATION")
496
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
502
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
497
503
  d,
498
504
  {
499
505
  config: { ...f, authHint: e.authHint },
@@ -505,7 +511,7 @@ const ue = ({
505
511
  `authentication-${n.currentStepIndex}`
506
512
  ) });
507
513
  if (i === "PHONE")
508
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
514
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
509
515
  d,
510
516
  {
511
517
  config: f,
@@ -517,13 +523,13 @@ const ue = ({
517
523
  `phone-${n.currentStepIndex}`
518
524
  ) });
519
525
  if (i === "EMAIL") {
520
- const s = f;
521
- return !s || typeof s.otpVerification != "boolean" || typeof s.otpExpirationInMinutes != "number" ? /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l("div", { children: "Error: Invalid email configuration" }) }) : /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
526
+ const a = f;
527
+ return !a || typeof a.otpVerification != "boolean" || typeof a.otpExpirationInMinutes != "number" ? /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s("div", { children: "Error: Invalid email configuration" }) }) : /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
522
528
  d,
523
529
  {
524
530
  config: {
525
- ...s,
526
- prefill: s.prefill ?? !1
531
+ ...a,
532
+ prefill: a.prefill ?? !1
527
533
  },
528
534
  onFinish: () => r.completeModule(),
529
535
  onError: (c) => {
@@ -534,7 +540,7 @@ const ue = ({
534
540
  ) });
535
541
  }
536
542
  if (i === "THIRD_ID")
537
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
543
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
538
544
  d,
539
545
  {
540
546
  config: f,
@@ -547,8 +553,8 @@ const ue = ({
547
553
  ) });
548
554
  if (i === "TUTORIAL_ID" || i === "SECOND_ID" || // Only render ID if TUTORIAL_ID doesn't exist (otherwise useEffect will skip it)
549
555
  i === "ID" && !n.steps.includes("TUTORIAL_ID")) {
550
- const s = f, h = i === "SECOND_ID" ? { ...s, isSecondId: !0 } : s;
551
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
556
+ const a = f, h = i === "SECOND_ID" ? { ...a, isSecondId: !0 } : a;
557
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
552
558
  d,
553
559
  {
554
560
  config: h,
@@ -561,11 +567,11 @@ const ue = ({
561
567
  ) });
562
568
  }
563
569
  if (i === "FACE_MATCH") {
564
- const s = f, c = {
565
- variant: s.matchingType,
566
- disableFaceMatchAnimation: s.disableFaceMatchAnimation ?? !1
570
+ const a = f, c = {
571
+ variant: a.matchingType,
572
+ disableFaceMatchAnimation: a.disableFaceMatchAnimation ?? !1
567
573
  };
568
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
574
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
569
575
  d,
570
576
  {
571
577
  config: c,
@@ -578,7 +584,7 @@ const ue = ({
578
584
  ) });
579
585
  }
580
586
  if (i === "CURP_VALIDATION")
581
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
587
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
582
588
  d,
583
589
  {
584
590
  config: f,
@@ -590,7 +596,7 @@ const ue = ({
590
596
  `curp-validation-${n.currentStepIndex}`
591
597
  ) });
592
598
  if (i === "GOVT_VALIDATION_PROVISIONING")
593
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
599
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
594
600
  d,
595
601
  {
596
602
  config: f,
@@ -602,7 +608,7 @@ const ue = ({
602
608
  `govt-validation-${n.currentStepIndex}`
603
609
  ) });
604
610
  if (i === "GEOLOCATION")
605
- return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
611
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
606
612
  d,
607
613
  {
608
614
  config: { allowSkip: f.allowUserToSkipGeolocation },
@@ -613,23 +619,47 @@ const ue = ({
613
619
  },
614
620
  `geolocation-${n.currentStepIndex}`
615
621
  ) });
622
+ if (i === "EXTERNAL_VERIFICATION")
623
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
624
+ d,
625
+ {
626
+ config: { flowId: n.flow.flowId },
627
+ onFinish: () => r.completeModule(),
628
+ onError: (a) => {
629
+ o?.(a ?? "External verification error");
630
+ }
631
+ },
632
+ `ekyc-${n.currentStepIndex}`
633
+ ) });
634
+ if (i === "EKYB")
635
+ return /* @__PURE__ */ s("div", { class: "IncodeFlow", children: /* @__PURE__ */ s(
636
+ d,
637
+ {
638
+ config: f,
639
+ onFinish: () => r.completeModule(),
640
+ onError: (c) => {
641
+ o?.(c ?? "eKYB verification error");
642
+ }
643
+ },
644
+ `ekyb-${n.currentStepIndex}`
645
+ ) });
616
646
  }
617
647
  return null;
618
- }, fe = ({
648
+ }, he = ({
619
649
  config: e,
620
650
  onFinish: t = () => {
621
651
  },
622
652
  onError: o
623
- }) => /* @__PURE__ */ l("div", { class: "IncodeComponent", children: e ? /* @__PURE__ */ l(
624
- ue,
653
+ }) => /* @__PURE__ */ s("div", { class: "IncodeComponent", children: e ? /* @__PURE__ */ s(
654
+ pe,
625
655
  {
626
656
  config: e,
627
657
  onFinish: t,
628
658
  onError: o
629
659
  }
630
660
  ) : null });
631
- _(fe, "incode-flow");
661
+ _(he, "incode-flow");
632
662
  export {
633
- fe as IncodeFlow,
634
- Le as preloadIncodeFlow
663
+ he as IncodeFlow,
664
+ xe as preloadIncodeFlow
635
665
  };