@incodetech/web 0.0.0-dev-20260417-f366ac3 → 0.0.0-dev-20260417-d5a60c8

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.
@@ -5,25 +5,26 @@ import { o as c, t as l } from "../incodeComponent-CutyB4AE.js";
5
5
  import { t as u } from "../spinner-l6dvYqCg.js";
6
6
  import "../spinner-CFvndzMU.js";
7
7
  import { t as d } from "../incodeModule-D_r2n18O.js";
8
- import { a as f, c as p, f as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "../useModuleLoader-D2b8kAsh.js";
9
- import { getRequiredWasmPipelines as C } from "@incodetech/core/flow";
10
- import { createSession as w } from "@incodetech/core/session";
8
+ import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C } from "../useModuleLoader-CjYPWq6s.js";
9
+ import { getDeviceClass as w } from "@incodetech/core/device";
10
+ import { getRequiredWasmPipelines as T } from "@incodetech/core/flow";
11
+ import { createSession as E } from "@incodetech/core/session";
11
12
  //#region src/modules/flow/createFlowSession.ts
12
- function T(e) {
13
+ function D(e) {
13
14
  return Array.from(new Uint8Array(e), (e) => e.toString(16).padStart(2, "0")).join("");
14
15
  }
15
- async function E(e) {
16
+ async function O(e) {
16
17
  let t = globalThis.crypto?.subtle;
17
18
  if (!t) throw Error("SHA-1 is not available in this environment");
18
- return T(await t.digest("SHA-1", new TextEncoder().encode(e)));
19
+ return D(await t.digest("SHA-1", new TextEncoder().encode(e)));
19
20
  }
20
- async function D(e) {
21
+ async function k(e) {
21
22
  if (typeof e.apiKey == "string") return e.apiKey;
22
- if (typeof e.clientId == "string") return E(e.clientId);
23
+ if (typeof e.clientId == "string") return O(e.clientId);
23
24
  throw Error("Flow self-loading mode requires apiKey or clientId");
24
25
  }
25
- async function O(e, t) {
26
- return w(await D(e), {
26
+ async function A(e, t) {
27
+ return E(await k(e), {
27
28
  configurationId: e.configurationId,
28
29
  externalId: e.externalId,
29
30
  externalCustomerId: e.externalCustomerId,
@@ -35,18 +36,18 @@ async function O(e, t) {
35
36
  }
36
37
  //#endregion
37
38
  //#region src/modules/flow/flowConfig.ts
38
- function k(e) {
39
+ function j(e) {
39
40
  return typeof e.token == "string";
40
41
  }
41
- function A(e) {
42
+ function M(e) {
42
43
  let t = e;
43
44
  return typeof t.configurationId == "string" && (typeof t.apiKey == "string" || typeof t.clientId == "string");
44
45
  }
45
46
  //#endregion
46
47
  //#region src/modules/flow/preloadFlow.ts
47
- var j = /* @__PURE__ */ new Map();
48
- function M(e) {
49
- let t = j.get(e);
48
+ var N = /* @__PURE__ */ new Map();
49
+ function P(e) {
50
+ let t = N.get(e);
50
51
  if (!t) throw Error("Preload state not found");
51
52
  return {
52
53
  get isReady() {
@@ -62,17 +63,17 @@ function M(e) {
62
63
  }
63
64
  },
64
65
  cancel() {
65
- t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), j.delete(e));
66
+ t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), N.delete(e));
66
67
  }
67
68
  };
68
69
  }
69
- function N(e) {
70
+ function F(e) {
70
71
  let { token: t } = e;
71
- if (j.has(t)) return M(t);
72
+ if (N.has(t)) return P(t);
72
73
  let n, r, i = new Promise((e, t) => {
73
74
  n = e, r = t;
74
75
  }), a = v(e);
75
- a.getState().presentation.shouldPrefetchHome && S();
76
+ a.getState().presentation.shouldPrefetchHome && C();
76
77
  let o = {
77
78
  status: "loading",
78
79
  flowManager: a,
@@ -81,7 +82,7 @@ function N(e) {
81
82
  readyResolve: n,
82
83
  readyReject: r
83
84
  };
84
- return j.set(t, o), (async () => {
85
+ return N.set(t, o), (async () => {
85
86
  try {
86
87
  await p({
87
88
  apiURL: e.apiURL,
@@ -89,44 +90,47 @@ function N(e) {
89
90
  lang: e.lang,
90
91
  flowManager: a
91
92
  });
92
- let t = e.disableDashboardTheme ? Promise.resolve({}) : b().then((e) => {
93
+ let t = e.disableDashboardTheme ? Promise.resolve({}) : x().then((e) => {
93
94
  o.theme = e.theme, o.uiConfig = e.uiConfig;
94
95
  });
95
96
  o.unsubscribe = a.subscribe((t) => {
96
97
  if (t.status === "ready") {
97
98
  let n = t;
98
- m(n, e.wasmConfig), g(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
99
+ y(n, e.wasmConfig), g(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
99
100
  } else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
100
101
  }), await t;
101
102
  } catch (e) {
102
- o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), j.delete(t);
103
+ o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), N.delete(t);
103
104
  }
104
- })(), M(t);
105
+ })(), P(t);
105
106
  }
106
- function P(e) {
107
- return j.get(e) ?? null;
107
+ function I(e) {
108
+ return N.get(e) ?? null;
108
109
  }
109
- function F(e) {
110
- let t = P(e);
111
- return t && j.delete(e), t;
110
+ function L(e) {
111
+ let t = I(e);
112
+ return t && N.delete(e), t;
112
113
  }
113
114
  //#endregion
114
115
  //#region src/modules/flow/useFlowInitialization.ts
115
- function I(e) {
116
- e.getState().presentation.shouldPrefetchHome && S();
116
+ function R(e) {
117
+ e.getState().presentation.shouldPrefetchHome && C();
117
118
  }
118
- function L(e) {
119
- let { apiURL: n, lang: i, disableDashboardTheme: o, enableHome: c, onError: l } = e, u = k(e) ? e.token : void 0, d = r(null), [f, m] = a(() => {
120
- let t = u ? P(u) : null;
119
+ function z() {
120
+ w() === "desktop" && m();
121
+ }
122
+ function B(e) {
123
+ let { apiURL: n, lang: i, disableDashboardTheme: o, enableHome: c, onError: l } = e, u = j(e) ? e.token : void 0, d = r(null), [f, m] = a(() => {
124
+ let t = u ? I(u) : null;
121
125
  if (u && t?.status === "ready") {
122
- let e = F(u);
123
- if (e) return d.current = e.flowManager, I(e.flowManager), e.uiConfig && s(e.uiConfig), {
126
+ let e = L(u);
127
+ if (e) return d.current = e.flowManager, R(e.flowManager), z(), e.uiConfig && s(e.uiConfig), {
124
128
  status: "ready",
125
129
  flowManager: e.flowManager
126
130
  };
127
131
  }
128
132
  let n = v(e);
129
- return d.current = n, I(n), t?.status === "error" ? {
133
+ return d.current = n, R(n), z(), t?.status === "error" ? {
130
134
  status: "error",
131
135
  error: t.error ?? "Preload failed",
132
136
  flowManager: n
@@ -137,11 +141,11 @@ function L(e) {
137
141
  }), h = r(!1);
138
142
  return t(() => {
139
143
  if (f.status !== "initializing") return;
140
- let t = u ? P(u) : null;
144
+ let t = u ? I(u) : null;
141
145
  if (u && t?.status === "loading") {
142
146
  t.readyPromise.then(() => {
143
- let e = F(u);
144
- e && (d.current = e.flowManager, I(e.flowManager), e.uiConfig && s(e.uiConfig), m({
147
+ let e = L(u);
148
+ e && (d.current = e.flowManager, R(e.flowManager), z(), e.uiConfig && s(e.uiConfig), m({
145
149
  status: "ready",
146
150
  flowManager: e.flowManager
147
151
  }));
@@ -158,15 +162,15 @@ function L(e) {
158
162
  h.current || (h.current = !0, (async () => {
159
163
  try {
160
164
  let t;
161
- if (k(e)) t = e.token;
162
- else if (A(e)) t = (await O(e)).token;
165
+ if (j(e)) t = e.token;
166
+ else if (M(e)) t = (await A(e)).token;
163
167
  else throw Error("Flow requires token, or configurationId with apiKey or clientId");
164
168
  await p({
165
169
  apiURL: n,
166
170
  token: t,
167
171
  lang: i,
168
172
  flowManager: f.flowManager
169
- }), await (o ? Promise.resolve() : b().then((e) => {
173
+ }), await (o ? Promise.resolve() : x().then((e) => {
170
174
  e.uiConfig && s(e.uiConfig);
171
175
  })), m({
172
176
  status: "ready",
@@ -194,31 +198,30 @@ function L(e) {
194
198
  }
195
199
  //#endregion
196
200
  //#region src/modules/flow/flow.tsx
197
- var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.HomeScreen }))), z = ({ config: n, onFinish: r, onError: a }) => {
198
- let { t: s, i18n: l } = e(), d = L({
201
+ var V = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.HomeScreen }))), H = ({ config: n, onFinish: r, onError: a }) => {
202
+ let { t: s, i18n: l } = e(), d = B({
199
203
  ...n,
200
204
  onError: a
201
- }), [p, g] = c(() => d.flowManager, { autoLoad: !1 }), v = p.presentation.lazyModuleKey, b = p.status === "ready" ? p.currentStep : void 0, w = x({
202
- moduleKey: v,
205
+ }), [p, m] = c(() => d.flowManager, { autoLoad: !1 }), g = p.presentation.lazyModuleKey, v = p.status === "ready" ? p.currentStep : void 0, x = S({
206
+ moduleKey: g,
203
207
  modules: f,
204
208
  onModuleLoading: n.onModuleLoading,
205
209
  onModuleLoaded: n.onModuleLoaded,
206
210
  onError: a
207
- }), T = _({
208
- moduleKey: p.status === "ready" && p.homeScreen.visible ? b : void 0,
211
+ }), w = _({
212
+ moduleKey: p.status === "ready" && p.homeScreen.visible ? v : void 0,
209
213
  modules: f
210
- }), E = w.status === "loaded";
211
- E === !1 && p.homeScreen.visible && (E = T);
212
- let D = n.enableHome === !0 && p.status === "ready" && p.currentStepIndex === 0 && p.homeScreen.visible === !1 && w.status === "loading";
213
- if (y(p?.status === "ready" ? p.steps : [], p?.status === "ready" ? p.currentStepIndex : -1, f, E), t(() => {
214
- p.presentation.shouldPrefetchHome && S();
214
+ }), E = x.status === "loaded";
215
+ E === !1 && p.homeScreen.visible && (E = w);
216
+ let D = n.enableHome === !0 && p.status === "ready" && p.currentStepIndex === 0 && p.homeScreen.visible === !1 && x.status === "loading";
217
+ if (b(p?.status === "ready" ? p.steps : [], p?.status === "ready" ? p.currentStepIndex : -1, f, E), t(() => {
218
+ p.presentation.shouldPrefetchHome && C();
215
219
  }, [p.presentation.shouldPrefetchHome]), t(() => {
216
220
  n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
217
221
  }, [n.lang, l]), t(() => {
218
- if (p?.status === "ready") {
219
- let e = p, t = C(e.flow);
220
- t.length > 0 && (n.onWasmWarmup?.(t), m(e, n.wasmConfig));
221
- }
222
+ if (p?.status !== "ready" || p.currentStep === "REDIRECT_TO_MOBILE") return;
223
+ let e = p, t = T(e.flow);
224
+ t.length > 0 && (n.onWasmWarmup?.(t), y(e, n.wasmConfig));
222
225
  }, [p, n]), t(() => {
223
226
  p?.status === "finished" && r(p.finishStatus);
224
227
  }, [
@@ -232,8 +235,8 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
232
235
  a,
233
236
  p
234
237
  ]), t(() => {
235
- p?.status === "ready" && p.currentStep === "ID" && p.steps.includes("TUTORIAL_ID") && g.completeModule();
236
- }, [p, g]), d.status === "error") return /* @__PURE__ */ o("div", {
238
+ p?.status === "ready" && p.currentStep === "ID" && p.steps.includes("TUTORIAL_ID") && m.completeModule();
239
+ }, [p, m]), d.status === "error") return /* @__PURE__ */ o("div", {
237
240
  class: "IncodeFlow",
238
241
  children: /* @__PURE__ */ o("div", { children: ["Error: ", d.error] })
239
242
  });
@@ -241,9 +244,9 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
241
244
  class: "IncodeFlow",
242
245
  children: /* @__PURE__ */ o(i, {
243
246
  fallback: null,
244
- children: /* @__PURE__ */ o(R, {
247
+ children: /* @__PURE__ */ o(V, {
245
248
  isContinueLoading: p.homeScreen.isContinueLoading || D,
246
- onContinue: () => g.continueFromHome()
249
+ onContinue: () => m.continueFromHome()
247
250
  })
248
251
  })
249
252
  });
@@ -272,14 +275,14 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
272
275
  fullScreen: !0
273
276
  })
274
277
  });
275
- if (w.status === "unsupported") return /* @__PURE__ */ o("div", {
278
+ if (x.status === "unsupported") return /* @__PURE__ */ o("div", {
276
279
  class: "IncodeFlow",
277
280
  children: /* @__PURE__ */ o(h, {
278
281
  moduleKey: e,
279
- onNext: () => g.completeModule()
282
+ onNext: () => m.completeModule()
280
283
  })
281
284
  });
282
- if (w.status === "idle" || w.status === "loading" || w.status === "error") return /* @__PURE__ */ o("div", {
285
+ if (x.status === "idle" || x.status === "loading" || x.status === "error") return /* @__PURE__ */ o("div", {
283
286
  class: "IncodeFlow",
284
287
  children: /* @__PURE__ */ o(u, {
285
288
  title: n.spinnerConfig?.title,
@@ -288,13 +291,13 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
288
291
  fullScreen: !0
289
292
  })
290
293
  });
291
- let { Component: i } = w;
294
+ let { Component: i } = x;
292
295
  if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ o("div", {
293
296
  class: "IncodeFlow",
294
297
  children: /* @__PURE__ */ o(i, {
295
298
  config: t,
296
- onFinish: () => g.completeFlow(),
297
- onContinue: () => g.completeModule(),
299
+ onFinish: () => m.completeFlow(),
300
+ onContinue: () => m.completeModule(),
298
301
  onError: a
299
302
  }, `redirect-to-mobile-${p.currentStepIndex}`)
300
303
  });
@@ -302,7 +305,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
302
305
  class: "IncodeFlow",
303
306
  children: /* @__PURE__ */ o(i, {
304
307
  config: t,
305
- onFinish: () => g.completeModule(),
308
+ onFinish: () => m.completeModule(),
306
309
  onError: (e) => {
307
310
  a?.(e ?? "Selfie verification error");
308
311
  }
@@ -315,7 +318,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
315
318
  ...t,
316
319
  authHint: n.authHint
317
320
  },
318
- onFinish: () => g.completeModule(),
321
+ onFinish: () => m.completeModule(),
319
322
  onError: (e) => {
320
323
  a?.(e ?? "Authentication error");
321
324
  }
@@ -325,7 +328,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
325
328
  class: "IncodeFlow",
326
329
  children: /* @__PURE__ */ o(i, {
327
330
  config: t,
328
- onFinish: () => g.completeModule(),
331
+ onFinish: () => m.completeModule(),
329
332
  onError: (e) => {
330
333
  a?.(e ?? "Phone verification error");
331
334
  }
@@ -340,7 +343,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
340
343
  class: "IncodeFlow",
341
344
  children: /* @__PURE__ */ o(i, {
342
345
  config: e,
343
- onFinish: () => g.completeModule(),
346
+ onFinish: () => m.completeModule(),
344
347
  onError: (e) => {
345
348
  a?.(e ?? "Email verification error");
346
349
  }
@@ -356,7 +359,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
356
359
  ...n,
357
360
  isSecondId: !0
358
361
  } : n,
359
- onFinish: () => g.completeModule(),
362
+ onFinish: () => m.completeModule(),
360
363
  onError: (e) => {
361
364
  a?.(e ?? "ID capture error");
362
365
  }
@@ -367,7 +370,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
367
370
  class: "IncodeFlow",
368
371
  children: /* @__PURE__ */ o(i, {
369
372
  config: t,
370
- onFinish: () => g.completeModule(),
373
+ onFinish: () => m.completeModule(),
371
374
  onError: (e) => {
372
375
  a?.(e ?? "Face match error");
373
376
  }
@@ -377,7 +380,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
377
380
  class: "IncodeFlow",
378
381
  children: /* @__PURE__ */ o(i, {
379
382
  config: t,
380
- onFinish: () => g.completeModule(),
383
+ onFinish: () => m.completeModule(),
381
384
  onError: (e) => {
382
385
  a?.(e ?? "CURP validation error");
383
386
  }
@@ -387,7 +390,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
387
390
  class: "IncodeFlow",
388
391
  children: /* @__PURE__ */ o(i, {
389
392
  config: t,
390
- onFinish: () => g.completeModule(),
393
+ onFinish: () => m.completeModule(),
391
394
  onError: (e) => {
392
395
  a?.(e ?? "Government validation error");
393
396
  }
@@ -397,7 +400,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
397
400
  class: "IncodeFlow",
398
401
  children: /* @__PURE__ */ o(i, {
399
402
  config: t,
400
- onFinish: () => g.completeModule(),
403
+ onFinish: () => m.completeModule(),
401
404
  onError: (e) => {
402
405
  a?.(e ?? "Geolocation error");
403
406
  }
@@ -407,7 +410,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
407
410
  class: "IncodeFlow",
408
411
  children: /* @__PURE__ */ o(i, {
409
412
  config: { flowId: p.flow.flowId },
410
- onFinish: () => g.completeModule(),
413
+ onFinish: () => m.completeModule(),
411
414
  onError: (e) => {
412
415
  a?.(e ?? "External verification error");
413
416
  }
@@ -417,7 +420,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
417
420
  class: "IncodeFlow",
418
421
  children: /* @__PURE__ */ o(i, {
419
422
  config: t,
420
- onFinish: () => g.completeModule(),
423
+ onFinish: () => m.completeModule(),
421
424
  onError: (e) => {
422
425
  a?.(e ?? "Document capture error");
423
426
  }
@@ -430,7 +433,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
430
433
  ...t,
431
434
  processingType: "addressStatement"
432
435
  },
433
- onFinish: () => g.completeModule(),
436
+ onFinish: () => m.completeModule(),
434
437
  onError: (e) => {
435
438
  a?.(e ?? "Address capture error");
436
439
  }
@@ -440,7 +443,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
440
443
  class: "IncodeFlow",
441
444
  children: /* @__PURE__ */ o(i, {
442
445
  config: t,
443
- onFinish: () => g.completeModule(),
446
+ onFinish: () => m.completeModule(),
444
447
  onError: (e) => {
445
448
  a?.(e ?? "Signature capture error");
446
449
  }
@@ -458,7 +461,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
458
461
  checkTaxId: e.checkTaxId,
459
462
  checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
460
463
  },
461
- onFinish: () => g.completeModule(),
464
+ onFinish: () => m.completeModule(),
462
465
  onError: (e) => {
463
466
  a?.(e ?? "eKYB verification error");
464
467
  }
@@ -469,7 +472,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
469
472
  class: "IncodeFlow",
470
473
  children: /* @__PURE__ */ o(i, {
471
474
  config: t,
472
- onFinish: () => g.completeModule(),
475
+ onFinish: () => m.completeModule(),
473
476
  onError: (e) => {
474
477
  a?.(e ?? "Combined consent error");
475
478
  }
@@ -479,7 +482,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
479
482
  class: "IncodeFlow",
480
483
  children: /* @__PURE__ */ o(i, {
481
484
  config: t,
482
- onFinish: () => g.completeModule(),
485
+ onFinish: () => m.completeModule(),
483
486
  onError: (e) => {
484
487
  a?.(e ?? "Mandatory consent error");
485
488
  }
@@ -494,7 +497,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
494
497
  uploadDocument: n.uploadDocument,
495
498
  downloadDocument: n.downloadDocument
496
499
  },
497
- onFinish: () => g.completeModule(),
500
+ onFinish: () => m.completeModule(),
498
501
  onError: (e) => {
499
502
  a?.(e ?? `${r.toUpperCase()} Signature error`);
500
503
  }
@@ -504,7 +507,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
504
507
  if (e === "ANTIFRAUD") return /* @__PURE__ */ o("div", {
505
508
  class: "IncodeFlow",
506
509
  children: /* @__PURE__ */ o(i, {
507
- onFinish: () => g.completeModule(),
510
+ onFinish: () => m.completeModule(),
508
511
  onError: (e) => {
509
512
  a?.(e ?? "Antifraud check error");
510
513
  }
@@ -513,7 +516,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
513
516
  if (e === "WATCHLIST") return /* @__PURE__ */ o("div", {
514
517
  class: "IncodeFlow",
515
518
  children: /* @__PURE__ */ o(i, {
516
- onFinish: () => g.completeModule(),
519
+ onFinish: () => m.completeModule(),
517
520
  onError: (e) => {
518
521
  a?.(e ?? "Watchlist check error");
519
522
  }
@@ -522,7 +525,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
522
525
  if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */ o("div", {
523
526
  class: "IncodeFlow",
524
527
  children: /* @__PURE__ */ o(i, {
525
- onFinish: () => g.completeModule(),
528
+ onFinish: () => m.completeModule(),
526
529
  onError: (e) => {
527
530
  a?.(e ?? "Cross document data match error");
528
531
  }
@@ -530,11 +533,11 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
530
533
  });
531
534
  }
532
535
  return null;
533
- }, B = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(z, {
536
+ }, U = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(H, {
534
537
  config: e,
535
538
  onFinish: t,
536
539
  onError: n
537
540
  }) : null });
538
- d(B, "incode-flow");
541
+ d(U, "incode-flow");
539
542
  //#endregion
540
- export { B as IncodeFlow, N as preloadIncodeFlow };
543
+ export { U as IncodeFlow, F as preloadIncodeFlow };
@@ -185,7 +185,15 @@ function M() {
185
185
  D = void 0;
186
186
  }));
187
187
  }
188
- function N(e = {}) {
188
+ var N;
189
+ function P() {
190
+ if (N) return;
191
+ let e = A.REDIRECT_TO_MOBILE, t = O("REDIRECT_TO_MOBILE"), n = [];
192
+ e && n.push(e()), t && n.push(t()), N = Promise.all(n), N.catch(() => {
193
+ N = void 0;
194
+ });
195
+ }
196
+ function F(e = {}) {
189
197
  let t = {}, n = e.isDesktop ?? d() === "desktop", { enableHome: r, ...i } = e;
190
198
  return f({
191
199
  enableHome: r,
@@ -200,7 +208,7 @@ function N(e = {}) {
200
208
  lazyModules: t
201
209
  });
202
210
  }
203
- async function P(e) {
211
+ async function I(e) {
204
212
  await a({
205
213
  apiURL: e.apiURL,
206
214
  token: e.token,
@@ -208,15 +216,15 @@ async function P(e) {
208
216
  i18n: e.lang ? { lang: e.lang } : void 0
209
217
  });
210
218
  }
211
- async function F(e) {
219
+ async function L(e) {
212
220
  let { apiURL: t, token: n, lang: r, flowManager: i } = e;
213
- await P({
221
+ await I({
214
222
  apiURL: t,
215
223
  token: n,
216
224
  lang: r
217
225
  }), i.load();
218
226
  }
219
- async function I() {
227
+ async function R() {
220
228
  try {
221
229
  let e = await w(), t = {
222
230
  logoSrc: e.logo,
@@ -231,7 +239,8 @@ async function I() {
231
239
  return {};
232
240
  }
233
241
  }
234
- function L(e, t) {
242
+ function z(e, t) {
243
+ if (e.currentStep === "REDIRECT_TO_MOBILE") return;
235
244
  let n = m(e.flow);
236
245
  if (n.length > 0) {
237
246
  let e = c({
@@ -246,7 +255,7 @@ function L(e, t) {
246
255
  });
247
256
  }
248
257
  }
249
- function R(e) {
258
+ function B(e) {
250
259
  let t = e.currentStep;
251
260
  if (t) {
252
261
  let e = A[t];
@@ -255,7 +264,7 @@ function R(e) {
255
264
  }
256
265
  //#endregion
257
266
  //#region src/modules/flow/unsupportedModule.tsx
258
- var z = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
267
+ var V = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
259
268
  class: "IncodeUnsupportedModule",
260
269
  "aria-live": "polite",
261
270
  children: /* @__PURE__ */ r("div", {
@@ -284,10 +293,10 @@ var z = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
284
293
  });
285
294
  //#endregion
286
295
  //#region src/modules/flow/useModuleLoader.ts
287
- function B(e, t) {
296
+ function H(e, t) {
288
297
  return e instanceof Error ? e.message : t;
289
298
  }
290
- function V(r) {
299
+ function U(r) {
291
300
  let { loader: i, onLoading: a, onLoaded: o, onError: s } = r, [c, l] = n({ status: "idle" }), u = t(a), d = t(o), f = t(s);
292
301
  return e(() => {
293
302
  u.current = a, d.current = o, f.current = s;
@@ -309,7 +318,7 @@ function V(r) {
309
318
  }), d.current?.());
310
319
  }).catch((t) => {
311
320
  if (!e) {
312
- let e = B(t, "Failed to load component");
321
+ let e = H(t, "Failed to load component");
313
322
  l({
314
323
  status: "error",
315
324
  error: e
@@ -320,8 +329,8 @@ function V(r) {
320
329
  };
321
330
  }, [i]), c;
322
331
  }
323
- function H(t) {
324
- let { moduleKey: r, modules: i, onModuleLoading: a, onModuleLoaded: o, onError: s } = t, [c, l] = n(void 0), u = r ? i[r] : void 0, d = V({
332
+ function W(t) {
333
+ let { moduleKey: r, modules: i, onModuleLoading: a, onModuleLoaded: o, onError: s } = t, [c, l] = n(void 0), u = r ? i[r] : void 0, d = U({
325
334
  loader: u,
326
335
  onLoading: r ? () => a?.(r) : void 0,
327
336
  onLoaded: r ? () => o?.(r) : void 0,
@@ -349,16 +358,16 @@ function H(t) {
349
358
  Component: d.Component
350
359
  } : { status: "idle" };
351
360
  }
352
- function U(e) {
353
- let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = V({ loader: r });
361
+ function G(e) {
362
+ let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = U({ loader: r });
354
363
  return r != null && i.status === "loaded";
355
364
  }
356
- function W(e) {
365
+ function K(e) {
357
366
  typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
358
367
  e();
359
368
  }) : setTimeout(e, 0);
360
369
  }
361
- function G(n, r, i, a) {
370
+ function q(n, r, i, a) {
362
371
  let o = t(/* @__PURE__ */ new Set());
363
372
  e(() => {
364
373
  if (a && r < n.length - 1) {
@@ -366,7 +375,7 @@ function G(n, r, i, a) {
366
375
  if (e && !o.current.has(e)) {
367
376
  o.current.add(e);
368
377
  let t = i[e];
369
- t && W(() => {
378
+ t && K(() => {
370
379
  t().catch(() => {
371
380
  o.current.delete(e);
372
381
  });
@@ -381,4 +390,4 @@ function G(n, r, i, a) {
381
390
  ]);
382
391
  }
383
392
  //#endregion
384
- export { A as a, F as c, P as d, L as f, z as i, R as l, U as n, N as o, w as p, G as r, I as s, H as t, M as u };
393
+ export { A as a, L as c, P as d, I as f, V as i, B as l, w as m, G as n, F as o, z as p, q as r, R as s, W as t, M as u };
@@ -5,7 +5,7 @@ import { o, t as s } from "../incodeComponent-CutyB4AE.js";
5
5
  import { t as c } from "../spinner-l6dvYqCg.js";
6
6
  import "../spinner-CFvndzMU.js";
7
7
  import { t as l } from "../incodeModule-D_r2n18O.js";
8
- import { a as u, d, i as f, p, t as m } from "../useModuleLoader-D2b8kAsh.js";
8
+ import { a as u, f as d, i as f, m as p, t as m } from "../useModuleLoader-CjYPWq6s.js";
9
9
  import { resolveWasmConfig as h, warmupWasm as g } from "@incodetech/core/wasm";
10
10
  import { createWorkflowManager as _ } from "@incodetech/core/workflow";
11
11
  //#region src/modules/workflow/workflowInit.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260417-f366ac3",
3
+ "version": "0.0.0-dev-20260417-d5a60c8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -183,7 +183,7 @@
183
183
  "qrcode": "^1.5.4",
184
184
  "signature_pad": "^5.1.3",
185
185
  "tailwindcss": "^4.1.17",
186
- "@incodetech/core": "0.0.0-dev-20260417-f366ac3"
186
+ "@incodetech/core": "0.0.0-dev-20260417-d5a60c8"
187
187
  },
188
188
  "devDependencies": {
189
189
  "@microsoft/api-extractor": "^7.53.3",