@incodetech/web 0.0.0-dev-20260416-64c00e5 → 0.0.0-dev-20260416-8fd0b75
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
CHANGED
|
@@ -5,7 +5,7 @@ import { c as o, r as s } from "../loadingIcon-ahC-hZN7.js";
|
|
|
5
5
|
import { t as c } from "../spinner-BAVCJLTE.js";
|
|
6
6
|
import "../spinner-B-jf992b.js";
|
|
7
7
|
import { t as l } from "../incodeModule-Di2OUZ5_.js";
|
|
8
|
-
import { a as u, c as d, i as f, n as p, o as m, r as h, s as g, t as _, u as v } from "../useModuleLoader-
|
|
8
|
+
import { a as u, c as d, i as f, n as p, o as m, r as h, s as g, t as _, u as v } from "../useModuleLoader-DPGKFaMr.js";
|
|
9
9
|
import { getRequiredWasmPipelines as y } from "@incodetech/core/flow";
|
|
10
10
|
//#region src/modules/flow/preloadFlow.ts
|
|
11
11
|
var b = /* @__PURE__ */ new Map();
|
|
@@ -57,7 +57,7 @@ function S(e) {
|
|
|
57
57
|
o.unsubscribe = a.subscribe((t) => {
|
|
58
58
|
if (t.status === "ready") {
|
|
59
59
|
let n = t;
|
|
60
|
-
|
|
60
|
+
v(n, e.wasmConfig), d(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
|
|
61
61
|
} else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
|
|
62
62
|
}), await t;
|
|
63
63
|
} catch (e) {
|
|
@@ -162,7 +162,7 @@ var E = ({ config: n, onFinish: r, onError: a }) => {
|
|
|
162
162
|
if (p(d?.status === "ready" ? d.steps : [], d?.status === "ready" ? d.currentStepIndex : -1, f), t(() => {
|
|
163
163
|
n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
|
|
164
164
|
}, [n.lang, l]), t(() => {
|
|
165
|
-
if (d?.status === "ready"
|
|
165
|
+
if (d?.status === "ready") {
|
|
166
166
|
let e = d, t = y(e.flow);
|
|
167
167
|
t.length > 0 && (n.onWasmWarmup?.(t), v(e, n.wasmConfig));
|
|
168
168
|
}
|
|
@@ -2,12 +2,12 @@ import { _ as e, l as t, p as n, v as r } from "./vendor-preact-D6SntenC.js";
|
|
|
2
2
|
import { t as i } from "./uiConfig-CwpQ-IM6.js";
|
|
3
3
|
import { t as a } from "./setup-IE6CqyVs.js";
|
|
4
4
|
import { t as o } from "./button-BlHmZn6D.js";
|
|
5
|
-
import {
|
|
6
|
-
import { getDeviceClass as
|
|
7
|
-
import { createOrchestratedFlowManager as
|
|
8
|
-
import { api as
|
|
5
|
+
import { initializeWasmUtil as s, resolveWasmConfig as c, setWasmConfig as l, warmupWasm as u } from "@incodetech/core/wasm";
|
|
6
|
+
import { getDeviceClass as d } from "@incodetech/core/device";
|
|
7
|
+
import { createOrchestratedFlowManager as f, getFlow as p, getRequiredWasmPipelines as m } from "@incodetech/core/flow";
|
|
8
|
+
import { api as h } from "@incodetech/core/http";
|
|
9
9
|
//#region src/styles/generatePalette.ts
|
|
10
|
-
function
|
|
10
|
+
function g(e) {
|
|
11
11
|
let t = e.replace("#", "");
|
|
12
12
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
13
13
|
let n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
@@ -33,7 +33,7 @@ function m(e) {
|
|
|
33
33
|
l: u * 100
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function _(e, t, n) {
|
|
37
37
|
let r = e / 360, i = t / 100, a = n / 100, o, s, c;
|
|
38
38
|
if (i === 0) o = s = c = a;
|
|
39
39
|
else {
|
|
@@ -46,24 +46,24 @@ function h(e, t, n) {
|
|
|
46
46
|
};
|
|
47
47
|
return `#${l(o)}${l(s)}${l(c)}`;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let t =
|
|
49
|
+
function v(e) {
|
|
50
|
+
let t = g(e);
|
|
51
51
|
if (!t) throw Error(`Invalid color format: ${e}`);
|
|
52
52
|
return {
|
|
53
|
-
50:
|
|
54
|
-
200:
|
|
55
|
-
300:
|
|
56
|
-
400:
|
|
53
|
+
50: _(t.h, t.s, 95),
|
|
54
|
+
200: _(t.h, t.s, 80),
|
|
55
|
+
300: _(t.h, t.s, 65),
|
|
56
|
+
400: _(t.h, t.s, Math.min(100, t.l + 10)),
|
|
57
57
|
500: e,
|
|
58
|
-
600:
|
|
59
|
-
900:
|
|
58
|
+
600: _(t.h, t.s, Math.max(0, t.l - 10)),
|
|
59
|
+
900: _(t.h, t.s, 20)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/styles/applyTheme.ts
|
|
64
|
-
function
|
|
64
|
+
function y(e, t) {
|
|
65
65
|
if (typeof document > "u") return;
|
|
66
|
-
let n =
|
|
66
|
+
let n = v(e), r = document.getElementById("incode-theme");
|
|
67
67
|
r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
|
|
68
68
|
let i = t || "#ffffff", a = `
|
|
69
69
|
:root,
|
|
@@ -82,43 +82,43 @@ function _(e, t) {
|
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/styles/fetchTheme.ts
|
|
85
|
-
async function
|
|
86
|
-
return (await
|
|
85
|
+
async function b() {
|
|
86
|
+
return (await h.get("/omni/asset/fetch-all")).data;
|
|
87
87
|
}
|
|
88
|
-
var
|
|
89
|
-
async function
|
|
88
|
+
var x = /* @__PURE__ */ new Map();
|
|
89
|
+
async function S(e) {
|
|
90
90
|
if (e.startsWith("data:")) return e;
|
|
91
|
-
let t =
|
|
91
|
+
let t = x.get(e);
|
|
92
92
|
if (t) return t;
|
|
93
93
|
let n = await (await fetch(e)).blob(), r = await new Promise((e, t) => {
|
|
94
94
|
let r = new FileReader();
|
|
95
95
|
r.onloadend = () => e(r.result), r.onerror = t, r.readAsDataURL(n);
|
|
96
96
|
});
|
|
97
|
-
return
|
|
97
|
+
return x.set(e, r), r;
|
|
98
98
|
}
|
|
99
|
-
async function
|
|
100
|
-
let e = await
|
|
99
|
+
async function C() {
|
|
100
|
+
let e = await b();
|
|
101
101
|
if (!e.theme) throw Error("Theme URL not found in assets response");
|
|
102
102
|
let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
|
|
103
103
|
if (n) {
|
|
104
104
|
let e = await fetch(t);
|
|
105
105
|
if (!e.ok) throw Error(`Failed to fetch theme: ${e.statusText}`);
|
|
106
106
|
r = await e.json();
|
|
107
|
-
} else r = (await
|
|
107
|
+
} else r = (await h.get(t)).data;
|
|
108
108
|
let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
|
|
109
|
-
return i && (a = await
|
|
109
|
+
return i && (a = await S(i)), {
|
|
110
110
|
...r,
|
|
111
111
|
logo: a
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
async function
|
|
115
|
-
let e = await
|
|
116
|
-
return e.main &&
|
|
114
|
+
async function w() {
|
|
115
|
+
let e = await C();
|
|
116
|
+
return e.main && y(e.main, e.buttonColor), e;
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region src/modules/flow/flowInit.ts
|
|
120
|
-
var
|
|
121
|
-
function
|
|
120
|
+
var T = () => import("./id/id.es.js").then((e) => e.Id), E = "HOME";
|
|
121
|
+
function D(e) {
|
|
122
122
|
if (e === "HOME") return () => import("@incodetech/core/home").then((e) => e.homeMachine);
|
|
123
123
|
if (e === "REDIRECT_TO_MOBILE") return () => import("@incodetech/core/redirect-to-mobile").then((e) => e.redirectToMobileMachine);
|
|
124
124
|
if (e === "PHONE") return () => import("@incodetech/core/phone").then((e) => e.phoneMachine);
|
|
@@ -141,27 +141,27 @@ function T(e) {
|
|
|
141
141
|
if (e === "AE_SIGNATURE") return () => import("@incodetech/core/ae-signature").then((e) => e.aeSignatureMachine);
|
|
142
142
|
if (e === "QE_SIGNATURE") return () => import("@incodetech/core/qe-signature").then((e) => e.qeSignatureMachine);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function O(e) {
|
|
145
145
|
let t = {};
|
|
146
146
|
for (let n of e) {
|
|
147
147
|
let e = n.key;
|
|
148
148
|
if (t[e]) continue;
|
|
149
|
-
let r =
|
|
149
|
+
let r = D(e);
|
|
150
150
|
r && (t[e] = r);
|
|
151
151
|
}
|
|
152
152
|
return t;
|
|
153
153
|
}
|
|
154
|
-
var
|
|
155
|
-
[
|
|
154
|
+
var k = {
|
|
155
|
+
[E]: () => import("./home/home.es.js").then((e) => e.Home),
|
|
156
156
|
REDIRECT_TO_MOBILE: () => import("./redirectToMobile-CYt-uhqB.js").then((e) => e.RedirectToMobile),
|
|
157
157
|
PHONE: () => import("./phone/phone.es.js").then((e) => e.Phone),
|
|
158
158
|
EMAIL: () => import("./email/email.es.js").then((e) => e.Email),
|
|
159
159
|
SELFIE: () => import("./selfie/selfie.es.js").then((e) => e.Selfie),
|
|
160
160
|
AUTHENTICATION: () => import("./authentication/authentication.es.js").then((e) => e.Authentication),
|
|
161
|
-
ID:
|
|
162
|
-
ID_CAPTURE:
|
|
163
|
-
TUTORIAL_ID:
|
|
164
|
-
SECOND_ID:
|
|
161
|
+
ID: T,
|
|
162
|
+
ID_CAPTURE: T,
|
|
163
|
+
TUTORIAL_ID: T,
|
|
164
|
+
SECOND_ID: T,
|
|
165
165
|
FACE_MATCH: () => import("./faceMatch-CFxHH3ic.js").then((e) => e.FaceMatch),
|
|
166
166
|
CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
|
|
167
167
|
GOVT_VALIDATION_PROVISIONING: () => import("./governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
|
|
@@ -179,21 +179,21 @@ var D = {
|
|
|
179
179
|
QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((e) => e.QeSignature),
|
|
180
180
|
CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((e) => e.CrossDocumentDataMatch)
|
|
181
181
|
};
|
|
182
|
-
function
|
|
183
|
-
let t = {}, n = e.isDesktop ??
|
|
184
|
-
return
|
|
182
|
+
function A(e = {}) {
|
|
183
|
+
let t = {}, n = e.isDesktop ?? d() === "desktop";
|
|
184
|
+
return f({
|
|
185
185
|
getFlow: async (r) => {
|
|
186
|
-
let i = await
|
|
186
|
+
let i = await p(r, {
|
|
187
187
|
...e,
|
|
188
188
|
isDesktop: n
|
|
189
|
-
}), a =
|
|
189
|
+
}), a = O(i.flowModules ?? []);
|
|
190
190
|
for (let e of Object.keys(t)) delete t[e];
|
|
191
191
|
return Object.assign(t, a), i;
|
|
192
192
|
},
|
|
193
193
|
lazyModules: t
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function j(e) {
|
|
197
197
|
await a({
|
|
198
198
|
apiURL: e.apiURL,
|
|
199
199
|
token: e.token,
|
|
@@ -201,17 +201,17 @@ async function k(e) {
|
|
|
201
201
|
i18n: { lang: e.lang ?? "en" }
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
async function
|
|
204
|
+
async function M(e) {
|
|
205
205
|
let { apiURL: t, token: n, lang: r, flowManager: i } = e;
|
|
206
|
-
await
|
|
206
|
+
await j({
|
|
207
207
|
apiURL: t,
|
|
208
208
|
token: n,
|
|
209
209
|
lang: r
|
|
210
210
|
}), i.load();
|
|
211
211
|
}
|
|
212
|
-
async function
|
|
212
|
+
async function N() {
|
|
213
213
|
try {
|
|
214
|
-
let e = await
|
|
214
|
+
let e = await w(), t = {
|
|
215
215
|
logoSrc: e.logo,
|
|
216
216
|
subtitle: e.subtitle,
|
|
217
217
|
hideFooterBranding: e.hideFooterBranding
|
|
@@ -224,25 +224,31 @@ async function j() {
|
|
|
224
224
|
return {};
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
let n =
|
|
229
|
-
n.length > 0
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
function P(e, t) {
|
|
228
|
+
let n = m(e.flow);
|
|
229
|
+
if (n.length > 0) {
|
|
230
|
+
let e = c({
|
|
231
|
+
...t ?? {},
|
|
232
|
+
pipelines: n
|
|
233
|
+
}), r = {
|
|
234
|
+
...e,
|
|
235
|
+
pipelines: e.pipelines ? [...e.pipelines] : void 0
|
|
236
|
+
};
|
|
237
|
+
l(r), u(e).then(() => s(r)).catch((e) => {
|
|
238
|
+
console.error("WASM warmup failed:", e);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
235
241
|
}
|
|
236
|
-
function
|
|
242
|
+
function F(e) {
|
|
237
243
|
let t = e.currentStep;
|
|
238
244
|
if (t) {
|
|
239
|
-
let e =
|
|
245
|
+
let e = k[t];
|
|
240
246
|
e && e().catch(() => {});
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
249
|
//#endregion
|
|
244
250
|
//#region src/modules/flow/unsupportedModule.tsx
|
|
245
|
-
var
|
|
251
|
+
var I = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
|
|
246
252
|
class: "IncodeUnsupportedModule",
|
|
247
253
|
"aria-live": "polite",
|
|
248
254
|
children: /* @__PURE__ */ r("div", {
|
|
@@ -271,7 +277,7 @@ var P = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
|
|
|
271
277
|
});
|
|
272
278
|
//#endregion
|
|
273
279
|
//#region src/modules/flow/useModuleLoader.ts
|
|
274
|
-
function
|
|
280
|
+
function L(t) {
|
|
275
281
|
let { moduleKey: r, modules: i, onModuleLoading: a, onModuleLoaded: o, onError: s } = t, [c, l] = n({ status: "idle" });
|
|
276
282
|
return e(() => {
|
|
277
283
|
if (!r) {
|
|
@@ -317,7 +323,7 @@ function F(t) {
|
|
|
317
323
|
s
|
|
318
324
|
]), c;
|
|
319
325
|
}
|
|
320
|
-
function
|
|
326
|
+
function R(n, r, i) {
|
|
321
327
|
let a = t(/* @__PURE__ */ new Set());
|
|
322
328
|
e(() => {
|
|
323
329
|
if (r < n.length - 1) {
|
|
@@ -337,4 +343,4 @@ function I(n, r, i) {
|
|
|
337
343
|
]);
|
|
338
344
|
}
|
|
339
345
|
//#endregion
|
|
340
|
-
export {
|
|
346
|
+
export { A as a, F as c, w as d, k as i, j as l, R as n, N as o, I as r, M as s, L as t, P as u };
|
|
@@ -5,7 +5,7 @@ import { c as o, r as s } from "../loadingIcon-ahC-hZN7.js";
|
|
|
5
5
|
import { t as c } from "../spinner-BAVCJLTE.js";
|
|
6
6
|
import "../spinner-B-jf992b.js";
|
|
7
7
|
import { t as l } from "../incodeModule-Di2OUZ5_.js";
|
|
8
|
-
import { d as u, i as d, l as f, r as p, t as m } from "../useModuleLoader-
|
|
8
|
+
import { d as u, i as d, l as f, r as p, t as m } from "../useModuleLoader-DPGKFaMr.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-20260416-
|
|
3
|
+
"version": "0.0.0-dev-20260416-8fd0b75",
|
|
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-20260416-
|
|
186
|
+
"@incodetech/core": "0.0.0-dev-20260416-8fd0b75"
|
|
187
187
|
},
|
|
188
188
|
"devDependencies": {
|
|
189
189
|
"@microsoft/api-extractor": "^7.53.3",
|