@incodetech/web 0.0.0-dev-20260309-dec7ce7 → 0.0.0-dev-20260309-7c6c9b5
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/flow/flow.es.js +139 -116
- package/package.json +2 -2
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { u as a, B as
|
|
2
|
-
import { createOrchestratedFlowManager as
|
|
3
|
-
import { A as
|
|
4
|
-
import { api as
|
|
1
|
+
import { u as a, B as $, r as k, I as V, b as H, a as z } from "../incodeModule-DAveRAyZ.js";
|
|
2
|
+
import { createOrchestratedFlowManager as G, getRequiredWasmPipelines as O } from "@incodetech/core/flow";
|
|
3
|
+
import { A as F, d as U, y as g } from "../vendor-preact-DP-hbKuj.js";
|
|
4
|
+
import { api as N, warmupWasm as B } from "@incodetech/core";
|
|
5
5
|
import { s as b } from "../uiConfig-B8PUPgHY.js";
|
|
6
6
|
import { S as C } from "../spinner-IY4lPK0V.js";
|
|
7
|
-
import { ekybMachine as
|
|
8
|
-
import { ekycMachine as
|
|
9
|
-
import { emailMachine as
|
|
10
|
-
import { faceMatchMachine as
|
|
11
|
-
import { geolocationMachine as
|
|
12
|
-
import { documentCaptureMachine as
|
|
7
|
+
import { ekybMachine as K } from "@incodetech/core/ekyb";
|
|
8
|
+
import { ekycMachine as W } from "@incodetech/core/ekyc";
|
|
9
|
+
import { emailMachine as j } from "@incodetech/core/email";
|
|
10
|
+
import { faceMatchMachine as Y } from "@incodetech/core/face-match";
|
|
11
|
+
import { geolocationMachine as X } from "@incodetech/core/geolocation";
|
|
12
|
+
import { documentCaptureMachine as S } from "@incodetech/core/document-capture";
|
|
13
13
|
import { documentUploadMachine as q } from "@incodetech/core/document-upload";
|
|
14
14
|
import { idCaptureMachine as E } from "@incodetech/core/id";
|
|
15
15
|
import { phoneMachine as Z } from "@incodetech/core/phone";
|
|
@@ -23,33 +23,33 @@ function oe(e) {
|
|
|
23
23
|
t.length === 3 && (t = t.split("").map((i) => i + i).join(""));
|
|
24
24
|
const o = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
25
25
|
if (!o) return null;
|
|
26
|
-
const
|
|
26
|
+
const c = Number.parseInt(o[1], 16) / 255, u = Number.parseInt(o[2], 16) / 255, n = Number.parseInt(o[3], 16) / 255, r = Math.max(c, u, n), p = Math.min(c, u, n);
|
|
27
27
|
let s = 0, f = 0;
|
|
28
28
|
const d = (r + p) / 2;
|
|
29
29
|
if (r !== p) {
|
|
30
30
|
const i = r - p;
|
|
31
31
|
switch (f = d > 0.5 ? i / (2 - r - p) : i / (r + p), r) {
|
|
32
|
-
case
|
|
32
|
+
case c:
|
|
33
33
|
s = ((u - n) / i + (u < n ? 6 : 0)) / 6;
|
|
34
34
|
break;
|
|
35
35
|
case u:
|
|
36
|
-
s = ((n -
|
|
36
|
+
s = ((n - c) / i + 2) / 6;
|
|
37
37
|
break;
|
|
38
38
|
case n:
|
|
39
|
-
s = ((
|
|
39
|
+
s = ((c - u) / i + 4) / 6;
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
return { h: s * 360, s: f * 100, l: d * 100 };
|
|
44
44
|
}
|
|
45
45
|
function w(e, t, o) {
|
|
46
|
-
const
|
|
46
|
+
const c = e / 360, u = t / 100, n = o / 100;
|
|
47
47
|
let r, p, s;
|
|
48
48
|
if (u === 0)
|
|
49
49
|
r = p = s = n;
|
|
50
50
|
else {
|
|
51
|
-
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), i = n < 0.5 ? n * (1 + u) : n + u - n * u,
|
|
52
|
-
r = d(
|
|
51
|
+
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), i = n < 0.5 ? n * (1 + u) : n + u - n * u, l = 2 * n - i;
|
|
52
|
+
r = d(l, i, c + 1 / 3), p = d(l, i, c), s = d(l, i, c - 1 / 3);
|
|
53
53
|
}
|
|
54
54
|
const f = (d) => {
|
|
55
55
|
const i = Math.round(d * 255).toString(16);
|
|
@@ -75,10 +75,10 @@ function ie(e, t) {
|
|
|
75
75
|
if (typeof document > "u")
|
|
76
76
|
return;
|
|
77
77
|
const o = re(e);
|
|
78
|
-
let
|
|
78
|
+
let c = document.getElementById(
|
|
79
79
|
"incode-theme"
|
|
80
80
|
);
|
|
81
|
-
|
|
81
|
+
c || (c = document.createElement("style"), c.id = "incode-theme", document.head.appendChild(c));
|
|
82
82
|
const u = t || "#ffffff", n = `
|
|
83
83
|
:root,
|
|
84
84
|
:host {
|
|
@@ -92,10 +92,10 @@ function ie(e, t) {
|
|
|
92
92
|
--button-primary-text-default: ${u};
|
|
93
93
|
}
|
|
94
94
|
`;
|
|
95
|
-
|
|
95
|
+
c.textContent = n;
|
|
96
96
|
}
|
|
97
97
|
async function ae() {
|
|
98
|
-
return (await
|
|
98
|
+
return (await N.get("/omni/asset/fetch-all")).data;
|
|
99
99
|
}
|
|
100
100
|
const A = /* @__PURE__ */ new Map();
|
|
101
101
|
async function se(e) {
|
|
@@ -104,9 +104,9 @@ async function se(e) {
|
|
|
104
104
|
const t = A.get(e);
|
|
105
105
|
if (t)
|
|
106
106
|
return t;
|
|
107
|
-
const
|
|
107
|
+
const c = await (await fetch(e)).blob(), u = await new Promise((n, r) => {
|
|
108
108
|
const p = new FileReader();
|
|
109
|
-
p.onloadend = () => n(p.result), p.onerror = r, p.readAsDataURL(
|
|
109
|
+
p.onloadend = () => n(p.result), p.onerror = r, p.readAsDataURL(c);
|
|
110
110
|
});
|
|
111
111
|
return A.set(e, u), u;
|
|
112
112
|
}
|
|
@@ -115,18 +115,18 @@ async function le() {
|
|
|
115
115
|
if (!e.theme)
|
|
116
116
|
throw new Error("Theme URL not found in assets response");
|
|
117
117
|
const t = e.theme, o = t.startsWith("http://") || t.startsWith("https://");
|
|
118
|
-
let
|
|
118
|
+
let c;
|
|
119
119
|
if (o) {
|
|
120
120
|
const r = await fetch(t);
|
|
121
121
|
if (!r.ok)
|
|
122
122
|
throw new Error(`Failed to fetch theme: ${r.statusText}`);
|
|
123
|
-
|
|
123
|
+
c = await r.json();
|
|
124
124
|
} else
|
|
125
|
-
|
|
126
|
-
const u = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] ||
|
|
125
|
+
c = (await N.get(t)).data;
|
|
126
|
+
const u = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || c.logo;
|
|
127
127
|
let n = u;
|
|
128
128
|
return u && (n = await se(u)), {
|
|
129
|
-
...
|
|
129
|
+
...c,
|
|
130
130
|
logo: n
|
|
131
131
|
};
|
|
132
132
|
}
|
|
@@ -134,7 +134,7 @@ async function ce() {
|
|
|
134
134
|
const e = await le();
|
|
135
135
|
return e.main && ie(e.main, e.buttonColor), e;
|
|
136
136
|
}
|
|
137
|
-
const T = () => import("../id/id.es.js").then((e) => e.Id),
|
|
137
|
+
const T = () => import("../id/id.es.js").then((e) => e.Id), y = {
|
|
138
138
|
PHONE: () => import("../phone/phone.es.js").then((e) => e.Phone),
|
|
139
139
|
EMAIL: () => import("../email/email.es.js").then((e) => e.Email),
|
|
140
140
|
SELFIE: () => import("../selfie/selfie.es.js").then((e) => e.Selfie),
|
|
@@ -153,37 +153,41 @@ const T = () => import("../id/id.es.js").then((e) => e.Id), F = {
|
|
|
153
153
|
EKYB: () => import("../ekybModule-DwH-VPQb.js").then((e) => e.EkybModule),
|
|
154
154
|
DOCUMENT_CAPTURE: () => import("../documentCapture-C3vAq9ev.js").then(
|
|
155
155
|
(e) => e.DocumentCapture
|
|
156
|
+
),
|
|
157
|
+
ADDRESS: () => import("../documentCapture-C3vAq9ev.js").then(
|
|
158
|
+
(e) => e.DocumentCapture
|
|
156
159
|
)
|
|
157
160
|
};
|
|
158
|
-
function
|
|
159
|
-
return
|
|
161
|
+
function L() {
|
|
162
|
+
return G({
|
|
160
163
|
modules: {
|
|
161
164
|
PHONE: Z,
|
|
162
|
-
EMAIL:
|
|
165
|
+
EMAIL: j,
|
|
163
166
|
SELFIE: J,
|
|
164
167
|
AUTHENTICATION: Q,
|
|
165
168
|
ID: E,
|
|
166
169
|
TUTORIAL_ID: E,
|
|
167
170
|
SECOND_ID: E,
|
|
168
171
|
THIRD_ID: q,
|
|
169
|
-
FACE_MATCH:
|
|
172
|
+
FACE_MATCH: Y,
|
|
170
173
|
CURP_VALIDATION: ee,
|
|
171
174
|
GOVT_VALIDATION_PROVISIONING: te,
|
|
172
|
-
GEOLOCATION:
|
|
173
|
-
EXTERNAL_VERIFICATION:
|
|
174
|
-
EKYB:
|
|
175
|
-
DOCUMENT_CAPTURE:
|
|
175
|
+
GEOLOCATION: X,
|
|
176
|
+
EXTERNAL_VERIFICATION: W,
|
|
177
|
+
EKYB: K,
|
|
178
|
+
DOCUMENT_CAPTURE: S,
|
|
179
|
+
ADDRESS: S
|
|
176
180
|
}
|
|
177
181
|
});
|
|
178
182
|
}
|
|
179
|
-
async function
|
|
183
|
+
async function P(e) {
|
|
180
184
|
await ne({
|
|
181
185
|
apiURL: e.apiURL,
|
|
182
186
|
token: e.token,
|
|
183
187
|
i18n: { lang: e.lang ?? "en" }
|
|
184
188
|
});
|
|
185
189
|
}
|
|
186
|
-
async function
|
|
190
|
+
async function x() {
|
|
187
191
|
try {
|
|
188
192
|
const e = await ce(), t = {
|
|
189
193
|
logoSrc: e.logo,
|
|
@@ -194,19 +198,19 @@ async function P() {
|
|
|
194
198
|
return {};
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
|
-
function
|
|
198
|
-
const o =
|
|
199
|
-
o.length > 0 &&
|
|
201
|
+
function _(e, t) {
|
|
202
|
+
const o = O(e.flow);
|
|
203
|
+
o.length > 0 && B({
|
|
200
204
|
...t,
|
|
201
205
|
pipelines: o
|
|
202
|
-
}).catch((
|
|
203
|
-
console.error("WASM warmup failed:",
|
|
206
|
+
}).catch((c) => {
|
|
207
|
+
console.error("WASM warmup failed:", c);
|
|
204
208
|
});
|
|
205
209
|
}
|
|
206
210
|
function de(e) {
|
|
207
211
|
const t = e.currentStep;
|
|
208
212
|
if (t) {
|
|
209
|
-
const o =
|
|
213
|
+
const o = y[t];
|
|
210
214
|
o && o().catch(() => {
|
|
211
215
|
});
|
|
212
216
|
}
|
|
@@ -222,7 +226,7 @@ const ue = ({
|
|
|
222
226
|
'" module is not yet supported in this version.'
|
|
223
227
|
] }),
|
|
224
228
|
/* @__PURE__ */ a(
|
|
225
|
-
|
|
229
|
+
$,
|
|
226
230
|
{
|
|
227
231
|
onClick: t,
|
|
228
232
|
class: "IncodeUnsupportedModuleButton",
|
|
@@ -231,7 +235,7 @@ const ue = ({
|
|
|
231
235
|
}
|
|
232
236
|
)
|
|
233
237
|
] }) }), I = /* @__PURE__ */ new Map();
|
|
234
|
-
function
|
|
238
|
+
function D(e) {
|
|
235
239
|
const t = I.get(e);
|
|
236
240
|
if (!t)
|
|
237
241
|
throw new Error("Preload state not found");
|
|
@@ -257,31 +261,31 @@ function S(e) {
|
|
|
257
261
|
function _e(e) {
|
|
258
262
|
const { token: t } = e;
|
|
259
263
|
if (I.has(t))
|
|
260
|
-
return
|
|
261
|
-
let o,
|
|
264
|
+
return D(t);
|
|
265
|
+
let o, c;
|
|
262
266
|
const u = new Promise((s, f) => {
|
|
263
|
-
o = s,
|
|
264
|
-
}), n =
|
|
267
|
+
o = s, c = f;
|
|
268
|
+
}), n = L(), r = {
|
|
265
269
|
status: "loading",
|
|
266
270
|
flowManager: n,
|
|
267
271
|
config: e,
|
|
268
272
|
readyPromise: u,
|
|
269
273
|
readyResolve: o,
|
|
270
|
-
readyReject:
|
|
274
|
+
readyReject: c
|
|
271
275
|
};
|
|
272
276
|
return I.set(t, r), (async () => {
|
|
273
277
|
try {
|
|
274
|
-
await
|
|
278
|
+
await P({
|
|
275
279
|
apiURL: e.apiURL,
|
|
276
280
|
token: e.token,
|
|
277
281
|
lang: e.lang
|
|
278
282
|
});
|
|
279
|
-
const s = e.disableDashboardTheme ? Promise.resolve({}) :
|
|
283
|
+
const s = e.disableDashboardTheme ? Promise.resolve({}) : x().then((d) => {
|
|
280
284
|
r.theme = d.theme, r.uiConfig = d.uiConfig;
|
|
281
285
|
}), f = n.subscribe((d) => {
|
|
282
286
|
if (d.status === "ready") {
|
|
283
287
|
const i = d;
|
|
284
|
-
e.wasmConfig &&
|
|
288
|
+
e.wasmConfig && _(i, e.wasmConfig), de(i), r.unsubscribe?.(), r.unsubscribe = void 0, r.status = "ready", r.readyResolve();
|
|
285
289
|
} else d.status === "error" && (r.unsubscribe?.(), r.unsubscribe = void 0, r.status = "error", r.error = d.error, r.readyReject(new Error(d.error)));
|
|
286
290
|
});
|
|
287
291
|
r.unsubscribe = f, n.load(), await s;
|
|
@@ -290,40 +294,40 @@ function _e(e) {
|
|
|
290
294
|
s instanceof Error ? s : new Error("Failed to preload")
|
|
291
295
|
), I.delete(t);
|
|
292
296
|
}
|
|
293
|
-
})(),
|
|
297
|
+
})(), D(t);
|
|
294
298
|
}
|
|
295
|
-
function
|
|
299
|
+
function v(e) {
|
|
296
300
|
return I.get(e) ?? null;
|
|
297
301
|
}
|
|
298
|
-
function
|
|
299
|
-
const t =
|
|
302
|
+
function R(e) {
|
|
303
|
+
const t = v(e);
|
|
300
304
|
return t && I.delete(e), t;
|
|
301
305
|
}
|
|
302
306
|
function fe(e) {
|
|
303
|
-
const { apiURL: t, token: o, lang:
|
|
304
|
-
const d =
|
|
307
|
+
const { apiURL: t, token: o, lang: c, disableDashboardTheme: u, onError: n } = e, r = F(null), [p, s] = U(() => {
|
|
308
|
+
const d = v(o);
|
|
305
309
|
if (d?.status === "ready") {
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
-
return r.current =
|
|
310
|
+
const l = R(o);
|
|
311
|
+
if (l)
|
|
312
|
+
return r.current = l.flowManager, l.uiConfig && b(l.uiConfig), { status: "ready", flowManager: l.flowManager };
|
|
309
313
|
}
|
|
310
|
-
const i =
|
|
314
|
+
const i = L();
|
|
311
315
|
return r.current = i, d?.status === "error" ? {
|
|
312
316
|
status: "error",
|
|
313
317
|
error: d.error ?? "Preload failed",
|
|
314
318
|
flowManager: i
|
|
315
319
|
} : { status: "initializing", flowManager: i };
|
|
316
|
-
}), f =
|
|
320
|
+
}), f = F(!1);
|
|
317
321
|
return g(() => {
|
|
318
322
|
if (p.status !== "initializing")
|
|
319
323
|
return;
|
|
320
|
-
const d =
|
|
324
|
+
const d = v(o);
|
|
321
325
|
if (d?.status === "loading") {
|
|
322
326
|
d.readyPromise.then(() => {
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
}).catch((
|
|
326
|
-
const h =
|
|
327
|
+
const l = R(o);
|
|
328
|
+
l && (r.current = l.flowManager, l.uiConfig && b(l.uiConfig), s({ status: "ready", flowManager: l.flowManager }));
|
|
329
|
+
}).catch((l) => {
|
|
330
|
+
const h = l instanceof Error ? l.message : "Preload failed";
|
|
327
331
|
s({
|
|
328
332
|
status: "error",
|
|
329
333
|
error: h,
|
|
@@ -336,13 +340,13 @@ function fe(e) {
|
|
|
336
340
|
return;
|
|
337
341
|
f.current = !0, (async () => {
|
|
338
342
|
try {
|
|
339
|
-
await
|
|
340
|
-
const
|
|
343
|
+
await P({ apiURL: t, token: o, lang: c });
|
|
344
|
+
const l = u ? Promise.resolve() : x().then((h) => {
|
|
341
345
|
h.uiConfig && b(h.uiConfig);
|
|
342
346
|
});
|
|
343
|
-
p.flowManager.load(), await
|
|
344
|
-
} catch (
|
|
345
|
-
const h =
|
|
347
|
+
p.flowManager.load(), await l, s({ status: "ready", flowManager: p.flowManager });
|
|
348
|
+
} catch (l) {
|
|
349
|
+
const h = l instanceof Error ? l.message : "Failed to initialize SDK";
|
|
346
350
|
s({
|
|
347
351
|
status: "error",
|
|
348
352
|
error: h,
|
|
@@ -350,16 +354,16 @@ function fe(e) {
|
|
|
350
354
|
}), n?.(h);
|
|
351
355
|
}
|
|
352
356
|
})();
|
|
353
|
-
}, [t, o,
|
|
357
|
+
}, [t, o, c, u, n, p]), p;
|
|
354
358
|
}
|
|
355
359
|
function pe(e) {
|
|
356
|
-
const { moduleKey: t, onModuleLoading: o, onModuleLoaded:
|
|
360
|
+
const { moduleKey: t, onModuleLoading: o, onModuleLoaded: c, onError: u } = e, [n, r] = U({ status: "idle" });
|
|
357
361
|
return g(() => {
|
|
358
362
|
if (!t) {
|
|
359
363
|
r({ status: "idle" });
|
|
360
364
|
return;
|
|
361
365
|
}
|
|
362
|
-
const p =
|
|
366
|
+
const p = y[t];
|
|
363
367
|
if (!p) {
|
|
364
368
|
r({ status: "unsupported", moduleKey: t });
|
|
365
369
|
return;
|
|
@@ -367,7 +371,7 @@ function pe(e) {
|
|
|
367
371
|
r({ status: "loading", moduleKey: t }), o?.(t);
|
|
368
372
|
let s = !1;
|
|
369
373
|
return p().then((f) => {
|
|
370
|
-
s || (r({ status: "loaded", moduleKey: t, Component: f }),
|
|
374
|
+
s || (r({ status: "loaded", moduleKey: t, Component: f }), c?.(t));
|
|
371
375
|
}).catch((f) => {
|
|
372
376
|
if (!s) {
|
|
373
377
|
const d = f instanceof Error ? f.message : "Failed to load module";
|
|
@@ -376,18 +380,18 @@ function pe(e) {
|
|
|
376
380
|
}), () => {
|
|
377
381
|
s = !0;
|
|
378
382
|
};
|
|
379
|
-
}, [t, o,
|
|
383
|
+
}, [t, o, c, u]), n;
|
|
380
384
|
}
|
|
381
385
|
function he(e, t) {
|
|
382
|
-
const o =
|
|
386
|
+
const o = F(/* @__PURE__ */ new Set());
|
|
383
387
|
g(() => {
|
|
384
388
|
if (t < e.length - 1) {
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
o.current.add(
|
|
388
|
-
const u =
|
|
389
|
+
const c = e[t + 1];
|
|
390
|
+
if (c && !o.current.has(c)) {
|
|
391
|
+
o.current.add(c);
|
|
392
|
+
const u = y[c];
|
|
389
393
|
u && u().catch(() => {
|
|
390
|
-
o.current.delete(
|
|
394
|
+
o.current.delete(c);
|
|
391
395
|
});
|
|
392
396
|
}
|
|
393
397
|
}
|
|
@@ -398,13 +402,13 @@ const me = ({
|
|
|
398
402
|
onFinish: t,
|
|
399
403
|
onError: o
|
|
400
404
|
}) => {
|
|
401
|
-
const { t:
|
|
405
|
+
const { t: c } = H(), u = fe({
|
|
402
406
|
apiURL: e.apiURL,
|
|
403
407
|
token: e.token,
|
|
404
408
|
lang: e.lang,
|
|
405
409
|
disableDashboardTheme: e.disableDashboardTheme,
|
|
406
410
|
onError: o
|
|
407
|
-
}), [n, r] =
|
|
411
|
+
}), [n, r] = z(() => u.flowManager, {
|
|
408
412
|
autoLoad: !1
|
|
409
413
|
}), p = pe({
|
|
410
414
|
moduleKey: n?.status === "ready" ? n.currentStep : void 0,
|
|
@@ -417,8 +421,8 @@ const me = ({
|
|
|
417
421
|
n?.status === "ready" ? n.currentStepIndex : -1
|
|
418
422
|
), g(() => {
|
|
419
423
|
if (n?.status === "ready" && e.wasmConfig) {
|
|
420
|
-
const s = n, f =
|
|
421
|
-
f.length > 0 && (e.onWasmWarmup?.(f),
|
|
424
|
+
const s = n, f = O(s.flow);
|
|
425
|
+
f.length > 0 && (e.onWasmWarmup?.(f), _(s, e.wasmConfig));
|
|
422
426
|
}
|
|
423
427
|
}, [n, e]), g(() => {
|
|
424
428
|
n?.status === "finished" && t(n.finishStatus);
|
|
@@ -464,8 +468,8 @@ const me = ({
|
|
|
464
468
|
return /* @__PURE__ */ a("div", { class: "IncodeFlow", children: /* @__PURE__ */ a(
|
|
465
469
|
C,
|
|
466
470
|
{
|
|
467
|
-
title: e.spinnerConfig?.title ??
|
|
468
|
-
subtitle: e.spinnerConfig?.subtitle ??
|
|
471
|
+
title: e.spinnerConfig?.title ?? c("loadingCircle.hangOn"),
|
|
472
|
+
subtitle: e.spinnerConfig?.subtitle ?? c("loadingCircle.validating"),
|
|
469
473
|
size: e.spinnerConfig?.size,
|
|
470
474
|
fullScreen: !0
|
|
471
475
|
}
|
|
@@ -482,8 +486,8 @@ const me = ({
|
|
|
482
486
|
return /* @__PURE__ */ a("div", { class: "IncodeFlow", children: /* @__PURE__ */ a(
|
|
483
487
|
C,
|
|
484
488
|
{
|
|
485
|
-
title: e.spinnerConfig?.title ??
|
|
486
|
-
subtitle: e.spinnerConfig?.subtitle ??
|
|
489
|
+
title: e.spinnerConfig?.title ?? c("loadingCircle.hangOn"),
|
|
490
|
+
subtitle: e.spinnerConfig?.subtitle ?? c("loadingCircle.validating"),
|
|
487
491
|
size: e.spinnerConfig?.size,
|
|
488
492
|
fullScreen: !0
|
|
489
493
|
}
|
|
@@ -495,8 +499,8 @@ const me = ({
|
|
|
495
499
|
{
|
|
496
500
|
config: f,
|
|
497
501
|
onFinish: () => r.completeModule(),
|
|
498
|
-
onError: (
|
|
499
|
-
o?.(
|
|
502
|
+
onError: (l) => {
|
|
503
|
+
o?.(l ?? "Selfie verification error");
|
|
500
504
|
}
|
|
501
505
|
},
|
|
502
506
|
`selfie-${n.currentStepIndex}`
|
|
@@ -507,8 +511,8 @@ const me = ({
|
|
|
507
511
|
{
|
|
508
512
|
config: { ...f, authHint: e.authHint },
|
|
509
513
|
onFinish: () => r.completeModule(),
|
|
510
|
-
onError: (
|
|
511
|
-
o?.(
|
|
514
|
+
onError: (l) => {
|
|
515
|
+
o?.(l ?? "Authentication error");
|
|
512
516
|
}
|
|
513
517
|
},
|
|
514
518
|
`authentication-${n.currentStepIndex}`
|
|
@@ -519,8 +523,8 @@ const me = ({
|
|
|
519
523
|
{
|
|
520
524
|
config: f,
|
|
521
525
|
onFinish: () => r.completeModule(),
|
|
522
|
-
onError: (
|
|
523
|
-
o?.(
|
|
526
|
+
onError: (l) => {
|
|
527
|
+
o?.(l ?? "Phone verification error");
|
|
524
528
|
}
|
|
525
529
|
},
|
|
526
530
|
`phone-${n.currentStepIndex}`
|
|
@@ -535,8 +539,8 @@ const me = ({
|
|
|
535
539
|
prefill: i.prefill ?? !1
|
|
536
540
|
},
|
|
537
541
|
onFinish: () => r.completeModule(),
|
|
538
|
-
onError: (
|
|
539
|
-
o?.(
|
|
542
|
+
onError: (l) => {
|
|
543
|
+
o?.(l ?? "Email verification error");
|
|
540
544
|
}
|
|
541
545
|
},
|
|
542
546
|
`email-${n.currentStepIndex}`
|
|
@@ -548,8 +552,8 @@ const me = ({
|
|
|
548
552
|
{
|
|
549
553
|
config: f,
|
|
550
554
|
onFinish: () => r.completeModule(),
|
|
551
|
-
onError: (
|
|
552
|
-
o?.(
|
|
555
|
+
onError: (l) => {
|
|
556
|
+
o?.(l ?? "Document upload error");
|
|
553
557
|
}
|
|
554
558
|
},
|
|
555
559
|
`document-upload-${n.currentStepIndex}`
|
|
@@ -570,14 +574,14 @@ const me = ({
|
|
|
570
574
|
) });
|
|
571
575
|
}
|
|
572
576
|
if (s === "FACE_MATCH") {
|
|
573
|
-
const i = f,
|
|
577
|
+
const i = f, l = {
|
|
574
578
|
variant: i.matchingType,
|
|
575
579
|
disableFaceMatchAnimation: i.disableFaceMatchAnimation ?? !1
|
|
576
580
|
};
|
|
577
581
|
return /* @__PURE__ */ a("div", { class: "IncodeFlow", children: /* @__PURE__ */ a(
|
|
578
582
|
d,
|
|
579
583
|
{
|
|
580
|
-
config:
|
|
584
|
+
config: l,
|
|
581
585
|
onFinish: () => r.completeModule(),
|
|
582
586
|
onError: (h) => {
|
|
583
587
|
o?.(h ?? "Face match error");
|
|
@@ -592,8 +596,8 @@ const me = ({
|
|
|
592
596
|
{
|
|
593
597
|
config: f,
|
|
594
598
|
onFinish: () => r.completeModule(),
|
|
595
|
-
onError: (
|
|
596
|
-
o?.(
|
|
599
|
+
onError: (l) => {
|
|
600
|
+
o?.(l ?? "CURP validation error");
|
|
597
601
|
}
|
|
598
602
|
},
|
|
599
603
|
`curp-validation-${n.currentStepIndex}`
|
|
@@ -604,8 +608,8 @@ const me = ({
|
|
|
604
608
|
{
|
|
605
609
|
config: f,
|
|
606
610
|
onFinish: () => r.completeModule(),
|
|
607
|
-
onError: (
|
|
608
|
-
o?.(
|
|
611
|
+
onError: (l) => {
|
|
612
|
+
o?.(l ?? "Government validation error");
|
|
609
613
|
}
|
|
610
614
|
},
|
|
611
615
|
`govt-validation-${n.currentStepIndex}`
|
|
@@ -616,8 +620,8 @@ const me = ({
|
|
|
616
620
|
{
|
|
617
621
|
config: { allowSkip: f.allowUserToSkipGeolocation },
|
|
618
622
|
onFinish: () => r.completeModule(),
|
|
619
|
-
onError: (
|
|
620
|
-
o?.(
|
|
623
|
+
onError: (l) => {
|
|
624
|
+
o?.(l ?? "Geolocation error");
|
|
621
625
|
}
|
|
622
626
|
},
|
|
623
627
|
`geolocation-${n.currentStepIndex}`
|
|
@@ -646,14 +650,33 @@ const me = ({
|
|
|
646
650
|
},
|
|
647
651
|
`document-capture-${n.currentStepIndex}`
|
|
648
652
|
) });
|
|
653
|
+
if (s === "ADDRESS") {
|
|
654
|
+
const i = f, l = {
|
|
655
|
+
processingType: "addressStatement",
|
|
656
|
+
allowSkipDocumentCapture: !i.disableSkipPoa,
|
|
657
|
+
title: i.title,
|
|
658
|
+
text: i.text
|
|
659
|
+
};
|
|
660
|
+
return /* @__PURE__ */ a("div", { class: "IncodeFlow", children: /* @__PURE__ */ a(
|
|
661
|
+
d,
|
|
662
|
+
{
|
|
663
|
+
config: l,
|
|
664
|
+
onFinish: () => r.completeModule(),
|
|
665
|
+
onError: (h) => {
|
|
666
|
+
o?.(h ?? "Address capture error");
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
`address-${n.currentStepIndex}`
|
|
670
|
+
) });
|
|
671
|
+
}
|
|
649
672
|
if (s === "EKYB")
|
|
650
673
|
return /* @__PURE__ */ a("div", { class: "IncodeFlow", children: /* @__PURE__ */ a(
|
|
651
674
|
d,
|
|
652
675
|
{
|
|
653
676
|
config: f,
|
|
654
677
|
onFinish: () => r.completeModule(),
|
|
655
|
-
onError: (
|
|
656
|
-
o?.(
|
|
678
|
+
onError: (l) => {
|
|
679
|
+
o?.(l ?? "eKYB verification error");
|
|
657
680
|
}
|
|
658
681
|
},
|
|
659
682
|
`ekyb-${n.currentStepIndex}`
|
|
@@ -673,7 +696,7 @@ const me = ({
|
|
|
673
696
|
onError: o
|
|
674
697
|
}
|
|
675
698
|
) : null });
|
|
676
|
-
|
|
699
|
+
k(ge, "incode-flow");
|
|
677
700
|
export {
|
|
678
701
|
ge as IncodeFlow,
|
|
679
702
|
_e as preloadIncodeFlow
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-20260309-
|
|
3
|
+
"version": "0.0.0-dev-20260309-7c6c9b5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"libphonenumber-js": "^1.11.0",
|
|
108
108
|
"preact-custom-element": "^4.6.0",
|
|
109
109
|
"tailwindcss": "^4.1.17",
|
|
110
|
-
"@incodetech/core": "0.0.0-dev-20260309-
|
|
110
|
+
"@incodetech/core": "0.0.0-dev-20260309-7c6c9b5"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@microsoft/api-extractor": "^7.53.3",
|