@incodetech/core 0.0.0-dev-20260218-e020e1c → 0.0.0-dev-20260219-dfbf2ff
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/StateMachine-DKxvdEuI.d.ts +2 -0
- package/dist/authentication.d.ts +4 -3
- package/dist/authentication.esm.js +6 -6
- package/dist/backCameraStream-DhKbn3gt.esm.js +337 -0
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{deepsightLoader-Bf15_5Gk.esm.js → deepsightLoader-DRQJKHl8.esm.js} +3 -3
- package/dist/{deepsightService-B3FfuHt1.d.ts → deepsightService-BLejzhoL.d.ts} +1 -79
- package/dist/{deepsightService-jsdRuf0u.esm.js → deepsightService-CZC8YaHN.esm.js} +2 -2
- package/dist/email.esm.js +2 -2
- package/dist/{events-BvAMgEuE.esm.js → events-mFVnFpqq.esm.js} +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-1AAwvEWC.d.ts → faceCaptureManagerFactory-BqvUNJXR.d.ts} +4 -2
- package/dist/{faceCaptureSetup-Cz44Uo-J.esm.js → faceCaptureSetup-Bxot-Bxs.esm.js} +8 -7
- package/dist/flow.d.ts +3 -2
- package/dist/flow.esm.js +1 -1
- package/dist/government-validation.esm.js +1 -1
- package/dist/{id-DtrUp5nz.esm.js → id-DHFXeDku.esm.js} +23 -263
- package/dist/id.d.ts +5 -5
- package/dist/id.esm.js +8 -8
- package/dist/{index-DDMN1YD_.d.ts → index-D0Zj8bRR.d.ts} +4 -60
- package/dist/index.d.ts +6 -5
- package/dist/index.esm.js +8 -8
- package/dist/phone.esm.js +2 -2
- package/dist/selfie.d.ts +82 -4
- package/dist/selfie.esm.js +6 -6
- package/dist/{stats-Bv2CLzQ0.esm.js → stats-C0Z_4KzW.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{StateMachine-CvjqRbSg.d.ts → warmup-oXQm8EFM.d.ts} +1 -4
- package/package.json +1 -1
- package/dist/streamingEvents-Bl2HRhLD.esm.js +0 -104
- /package/dist/{api-CmRbOLxk.esm.js → api-Cqrn4bGi.esm.js} +0 -0
- /package/dist/{types-DFgUJtIJ.d.ts → types-DeUPfNsF.d.ts} +0 -0
package/dist/authentication.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "./types-Dl8aaniO.js";
|
|
2
|
-
import
|
|
3
|
-
import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
2
|
+
import "./warmup-oXQm8EFM.js";
|
|
3
|
+
import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BqvUNJXR.js";
|
|
4
4
|
import { t as Manager } from "./Manager-DZLpIRan.js";
|
|
5
5
|
import { t as ActorRefFrom } from "./Actor-DniIAF8X.js";
|
|
6
|
-
import {
|
|
6
|
+
import { t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
|
|
7
|
+
import { r as FlowModuleConfig } from "./types-DeUPfNsF.js";
|
|
7
8
|
|
|
8
9
|
//#region src/modules/authentication/authenticationStateMachine.d.ts
|
|
9
10
|
declare const _authenticationMachine: AnyStateMachine;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-mFVnFpqq.esm.js";
|
|
2
|
+
import { l as getDeviceClass } from "./backCameraStream-DhKbn3gt.esm.js";
|
|
2
3
|
import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-CKB3MNL0.esm.js";
|
|
3
4
|
import { a as fromPromise, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-Cz44Uo-J.esm.js";
|
|
5
|
+
import "./deepsightService-CZC8YaHN.esm.js";
|
|
6
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
7
|
+
import "./stats-C0Z_4KzW.esm.js";
|
|
8
|
+
import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-Bxot-Bxs.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
11
11
|
const AUTH_ERROR_MAP = {
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { A as getUserAgent, C as enumerateVideoDevices, F as isSafari, N as isIOS, O as getDeviceInfo, P as isIPhone14OrHigher, S as applyTrackConstraints, T as stopCameraStream, j as isAndroid, l as MotionSensorProvider, w as requestCameraAccess, y as queryCameraPermission } from "./src-CKB3MNL0.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
3
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region ../infra/src/capabilities/ITimerCapability.ts
|
|
6
|
+
function sleep(ms) {
|
|
7
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/internal/device/getBrowser.ts
|
|
12
|
+
function getBrowser() {
|
|
13
|
+
const userAgent = getUserAgent();
|
|
14
|
+
if (!userAgent) return "other";
|
|
15
|
+
const ua = userAgent.toLowerCase();
|
|
16
|
+
if (ua.includes("edg/")) return "edge";
|
|
17
|
+
if (ua.includes("chrome") && !ua.includes("edg/")) return "chrome";
|
|
18
|
+
if (ua.includes("firefox")) return "firefox";
|
|
19
|
+
if (ua.includes("safari") && !ua.includes("chrome")) return "safari";
|
|
20
|
+
return "other";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/internal/device/getDeviceClass.ts
|
|
25
|
+
function getDeviceClass() {
|
|
26
|
+
const { userAgent, platform, maxTouchPoints } = getDeviceInfo();
|
|
27
|
+
if (!userAgent) return "desktop";
|
|
28
|
+
const ua = userAgent.toLowerCase();
|
|
29
|
+
if (/iphone|ipad|ipod/.test(ua) || platform === "MacIntel" && maxTouchPoints > 1) return "ios";
|
|
30
|
+
if (/android/.test(ua)) return "android";
|
|
31
|
+
return "desktop";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/internal/permissions/permissionServices.ts
|
|
36
|
+
/**
|
|
37
|
+
* Checks the current camera permission state without prompting the user.
|
|
38
|
+
*/
|
|
39
|
+
async function checkPermission() {
|
|
40
|
+
return queryCameraPermission();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Requests motion sensor permission. Must be called during a user gesture on iOS.
|
|
44
|
+
* Returns the permission result.
|
|
45
|
+
*/
|
|
46
|
+
async function requestMotionPermission() {
|
|
47
|
+
return new MotionSensorProvider().requestPermission();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Requests camera permission by attempting to access the camera, then immediately
|
|
51
|
+
* stops the obtained stream. Also requests motion sensor permission (required on iOS
|
|
52
|
+
* to be called during a user gesture). This function does not keep or return the stream.
|
|
53
|
+
*/
|
|
54
|
+
async function requestPermission() {
|
|
55
|
+
try {
|
|
56
|
+
await requestMotionPermission();
|
|
57
|
+
stopCameraStream(await requestCameraAccess({ video: true }));
|
|
58
|
+
return "granted";
|
|
59
|
+
} catch (error) {
|
|
60
|
+
const name = error instanceof Error ? error.name : void 0;
|
|
61
|
+
if (name === "NotAllowedError" || name === "PermissionDeniedError") return "denied";
|
|
62
|
+
return "prompt";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/internal/recordings/recordingsRepository.ts
|
|
68
|
+
async function createRecordingSession(type) {
|
|
69
|
+
return (await api.post(endpoints.recordingCreateSessionV2, { type })).data;
|
|
70
|
+
}
|
|
71
|
+
async function startRecording(params) {
|
|
72
|
+
return (await api.post(endpoints.recordingStartV2, {
|
|
73
|
+
videoRecordingId: params.videoRecordingId,
|
|
74
|
+
frameRate: 30,
|
|
75
|
+
outputMode: "COMPOSED",
|
|
76
|
+
resolution: params.resolution,
|
|
77
|
+
type: params.type,
|
|
78
|
+
hasAudio: params.hasAudio ?? false
|
|
79
|
+
})).data;
|
|
80
|
+
}
|
|
81
|
+
async function stopRecording(videoRecordingId) {
|
|
82
|
+
return (await api.post(endpoints.recordingStopV2, { videoRecordingId })).data;
|
|
83
|
+
}
|
|
84
|
+
async function uploadDeepsightVideo(encryptedVideo, token) {
|
|
85
|
+
try {
|
|
86
|
+
return (await api.post(endpoints.deepsightVideoImport, {
|
|
87
|
+
video: encryptedVideo,
|
|
88
|
+
type: "selfie"
|
|
89
|
+
}, { headers: { "X-Incode-Hardware-Id": token } })).data.recordingId ?? "";
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error("Error uploading deepsight video:", error);
|
|
92
|
+
return "";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/internal/recordings/streamingEvents.ts
|
|
98
|
+
const streamingEvents = {
|
|
99
|
+
strSessionDidConnect: "strSessionDidConnect",
|
|
100
|
+
strSessionDidDisconnect: "strSessionDidDisconnect",
|
|
101
|
+
strSessionDidFailWithError: "strSessionDidFailWithError",
|
|
102
|
+
strStreamVideoCaptureStart: "strStreamVideoCaptureStart",
|
|
103
|
+
strStreamVideoCaptureStop: "strStreamVideoCaptureStop",
|
|
104
|
+
strStreamPublisherCreated: "strStreamPublisherCreated",
|
|
105
|
+
strStreamPublisherDestroyed: "strStreamPublisherDestroyed",
|
|
106
|
+
strStreamPublisherDidFailWithError: "strStreamPublisherDidFailWithError"
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/internal/camera/backCameraStream.ts
|
|
111
|
+
const BACK_CAMERA_KEYWORDS = [
|
|
112
|
+
"rear",
|
|
113
|
+
"back",
|
|
114
|
+
"rück",
|
|
115
|
+
"arrière",
|
|
116
|
+
"trasera",
|
|
117
|
+
"trás",
|
|
118
|
+
"traseira",
|
|
119
|
+
"posteriore",
|
|
120
|
+
"后面",
|
|
121
|
+
"後面",
|
|
122
|
+
"背面",
|
|
123
|
+
"后置",
|
|
124
|
+
"後置",
|
|
125
|
+
"背置",
|
|
126
|
+
"задней",
|
|
127
|
+
"الخلفية",
|
|
128
|
+
"후",
|
|
129
|
+
"arka",
|
|
130
|
+
"achterzijde",
|
|
131
|
+
"หลัง",
|
|
132
|
+
"baksidan",
|
|
133
|
+
"bagside",
|
|
134
|
+
"sau",
|
|
135
|
+
"bak",
|
|
136
|
+
"tylny",
|
|
137
|
+
"takakamera",
|
|
138
|
+
"belakang",
|
|
139
|
+
"אחורית",
|
|
140
|
+
"πίσω",
|
|
141
|
+
"spate",
|
|
142
|
+
"hátsó",
|
|
143
|
+
"zadní",
|
|
144
|
+
"darrere",
|
|
145
|
+
"zadná",
|
|
146
|
+
"задня",
|
|
147
|
+
"stražnja",
|
|
148
|
+
"बैक"
|
|
149
|
+
];
|
|
150
|
+
function isBackCameraLabel(label) {
|
|
151
|
+
const lowercaseLabel = label.toLowerCase();
|
|
152
|
+
return BACK_CAMERA_KEYWORDS.some((keyword) => lowercaseLabel.includes(keyword));
|
|
153
|
+
}
|
|
154
|
+
function classifyCamera(device, index, totalDevices) {
|
|
155
|
+
let cameraType;
|
|
156
|
+
if (device.label === "") cameraType = totalDevices === 1 || index + 1 <= totalDevices / 2 ? "front" : "back";
|
|
157
|
+
else cameraType = isBackCameraLabel(device.label) ? "back" : "front";
|
|
158
|
+
return {
|
|
159
|
+
deviceId: device.deviceId,
|
|
160
|
+
label: device.label,
|
|
161
|
+
cameraType
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
async function getCameras() {
|
|
165
|
+
const videoDevices = await enumerateVideoDevices();
|
|
166
|
+
const cameras = videoDevices.map((d, i) => classifyCamera(d, i, videoDevices.length));
|
|
167
|
+
if (cameras.length > 1 && !cameras.some((c) => c.cameraType === "back")) {
|
|
168
|
+
const resolutions = cameras.map((c) => {
|
|
169
|
+
const match = c.label.match(/\b([0-9]+)MP?\b/i);
|
|
170
|
+
return match ? parseInt(match[1], 10) : NaN;
|
|
171
|
+
});
|
|
172
|
+
let backCameraIndex = cameras.length - 1;
|
|
173
|
+
if (!resolutions.some(isNaN)) backCameraIndex = resolutions.lastIndexOf(Math.max(...resolutions));
|
|
174
|
+
cameras[backCameraIndex].cameraType = "back";
|
|
175
|
+
}
|
|
176
|
+
return cameras;
|
|
177
|
+
}
|
|
178
|
+
function selectMainCameraFromStream(track, cameras) {
|
|
179
|
+
const settings = track.getSettings();
|
|
180
|
+
const activeCamera = cameras.find((c) => c.deviceId === settings.deviceId || c.label !== "" && c.label === track.label);
|
|
181
|
+
if (!activeCamera) return void 0;
|
|
182
|
+
if ((settings.facingMode === "environment" || isBackCameraLabel(track.label)) && cameras.length > 1) {
|
|
183
|
+
cameras.forEach((camera) => {
|
|
184
|
+
if (camera.deviceId === activeCamera.deviceId) camera.cameraType = "back";
|
|
185
|
+
else if (!isBackCameraLabel(camera.label)) camera.cameraType = "front";
|
|
186
|
+
});
|
|
187
|
+
return cameras.filter((c) => c.cameraType === "back").sort((a, b) => a.label.localeCompare(b.label))[0];
|
|
188
|
+
}
|
|
189
|
+
if (cameras.length === 1) return activeCamera;
|
|
190
|
+
}
|
|
191
|
+
function getAndroidVideoConstraints(level) {
|
|
192
|
+
const base = {
|
|
193
|
+
resizeMode: "none",
|
|
194
|
+
facingMode: "environment"
|
|
195
|
+
};
|
|
196
|
+
switch (level) {
|
|
197
|
+
case 0: return {
|
|
198
|
+
...base,
|
|
199
|
+
height: { ideal: 720 },
|
|
200
|
+
aspectRatio: { ideal: 19.5 / 9 }
|
|
201
|
+
};
|
|
202
|
+
case 1: return {
|
|
203
|
+
...base,
|
|
204
|
+
width: {
|
|
205
|
+
min: 3200,
|
|
206
|
+
ideal: 3840,
|
|
207
|
+
max: 4096
|
|
208
|
+
},
|
|
209
|
+
height: {
|
|
210
|
+
min: 1800,
|
|
211
|
+
ideal: 2160,
|
|
212
|
+
max: 2400
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
case 2: return {
|
|
216
|
+
...base,
|
|
217
|
+
width: {
|
|
218
|
+
min: 1400,
|
|
219
|
+
ideal: 1920,
|
|
220
|
+
max: 2160
|
|
221
|
+
},
|
|
222
|
+
height: {
|
|
223
|
+
min: 900,
|
|
224
|
+
ideal: 1080,
|
|
225
|
+
max: 1440
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
case 3: return {
|
|
229
|
+
...base,
|
|
230
|
+
width: {
|
|
231
|
+
min: 640,
|
|
232
|
+
ideal: 640,
|
|
233
|
+
max: 800
|
|
234
|
+
},
|
|
235
|
+
height: {
|
|
236
|
+
min: 480,
|
|
237
|
+
ideal: 480,
|
|
238
|
+
max: 600
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
case 4: return {
|
|
242
|
+
...base,
|
|
243
|
+
width: {
|
|
244
|
+
min: 640,
|
|
245
|
+
ideal: 800,
|
|
246
|
+
max: 960
|
|
247
|
+
},
|
|
248
|
+
height: {
|
|
249
|
+
min: 480,
|
|
250
|
+
ideal: 480,
|
|
251
|
+
max: 480
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
default: return {};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
258
|
+
if (fallbackLevel > 4) throw new Error("Failed to get camera after all fallback attempts");
|
|
259
|
+
try {
|
|
260
|
+
const initialStream = await requestCameraAccess({ video: getAndroidVideoConstraints(fallbackLevel) });
|
|
261
|
+
const track = initialStream.getVideoTracks()[0];
|
|
262
|
+
const mainCamera = selectMainCameraFromStream(track, await getCameras());
|
|
263
|
+
stopCameraStream(initialStream);
|
|
264
|
+
if (!mainCamera) throw new Error("Could not identify main camera");
|
|
265
|
+
let idealWidth = 1280;
|
|
266
|
+
let idealHeight = 720;
|
|
267
|
+
if (fallbackLevel > 1) {
|
|
268
|
+
const constraints = getAndroidVideoConstraints(fallbackLevel);
|
|
269
|
+
const width = constraints.width;
|
|
270
|
+
const height = constraints.height;
|
|
271
|
+
idealWidth = width?.ideal ?? 1280;
|
|
272
|
+
idealHeight = height?.ideal ?? 720;
|
|
273
|
+
}
|
|
274
|
+
return await requestCameraAccess({ video: {
|
|
275
|
+
deviceId: { exact: mainCamera.deviceId },
|
|
276
|
+
width: { ideal: idealWidth },
|
|
277
|
+
height: { ideal: idealHeight }
|
|
278
|
+
} });
|
|
279
|
+
} catch (error) {
|
|
280
|
+
const errorName = error instanceof Error ? error.name : "UnknownError";
|
|
281
|
+
const nextLevel = Math.min(fallbackLevel + 1, 4);
|
|
282
|
+
if (errorName === "NotReadableError") {
|
|
283
|
+
await sleep(300);
|
|
284
|
+
return getAndroidBackCameraStream(nextLevel);
|
|
285
|
+
}
|
|
286
|
+
if (errorName === "AbortError") {
|
|
287
|
+
await sleep(300);
|
|
288
|
+
return getAndroidBackCameraStream(fallbackLevel);
|
|
289
|
+
}
|
|
290
|
+
return getAndroidBackCameraStream(nextLevel);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async function applyIOSFocusHack(stream) {
|
|
294
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
295
|
+
try {
|
|
296
|
+
await applyTrackConstraints(videoTrack, { advanced: [{ focusDistance: 1 }] });
|
|
297
|
+
} catch {}
|
|
298
|
+
}
|
|
299
|
+
function getIOSConstraints() {
|
|
300
|
+
return {
|
|
301
|
+
audio: false,
|
|
302
|
+
video: {
|
|
303
|
+
resizeMode: "none",
|
|
304
|
+
facingMode: "environment",
|
|
305
|
+
height: { ideal: isIPhone14OrHigher() ? 1080 : 720 },
|
|
306
|
+
aspectRatio: { ideal: 19.5 / 9 }
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
async function getIOSCameraStream() {
|
|
311
|
+
const stream = await requestCameraAccess(getIOSConstraints());
|
|
312
|
+
await applyIOSFocusHack(stream);
|
|
313
|
+
return stream;
|
|
314
|
+
}
|
|
315
|
+
function getDesktopConstraints(options) {
|
|
316
|
+
const { deviceId } = options;
|
|
317
|
+
return {
|
|
318
|
+
audio: isSafari(),
|
|
319
|
+
video: {
|
|
320
|
+
facingMode: "user",
|
|
321
|
+
deviceId: deviceId ? { exact: deviceId } : void 0,
|
|
322
|
+
height: { ideal: 1080 },
|
|
323
|
+
width: { ideal: 1920 }
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
async function getDesktopCameraStream(options) {
|
|
328
|
+
return requestCameraAccess(getDesktopConstraints(options));
|
|
329
|
+
}
|
|
330
|
+
async function getBackCameraStream(deviceId) {
|
|
331
|
+
if (isIOS()) return getIOSCameraStream();
|
|
332
|
+
if (isAndroid()) return getAndroidBackCameraStream(0);
|
|
333
|
+
return getDesktopCameraStream({ deviceId });
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
//#endregion
|
|
337
|
+
export { stopRecording as a, requestPermission as c, startRecording as i, getDeviceClass as l, streamingEvents as n, uploadDeepsightVideo as o, createRecordingSession as r, checkPermission as s, getBackCameraStream as t, getBrowser as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-DZLpIRan.js";
|
|
2
|
-
import { r as FlowModuleConfig } from "./types-
|
|
2
|
+
import { r as FlowModuleConfig } from "./types-DeUPfNsF.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/curp-validation/types.d.ts
|
|
5
5
|
type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, r as eventScreenNames, u as screenOpened } from "./events-
|
|
1
|
+
import { n as eventModuleNames, r as eventScreenNames, u as screenOpened } from "./events-mFVnFpqq.esm.js";
|
|
2
2
|
import { E as createManager } from "./src-CKB3MNL0.esm.js";
|
|
3
3
|
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
4
|
-
import { t as api } from "./api-
|
|
4
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/curp-validation/curpValidationUtils.ts
|
|
7
7
|
const CURP_PATTERN = /^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-CKB3MNL0.esm.js";
|
|
2
|
-
import { t as createDeepsightService } from "./deepsightService-
|
|
3
|
-
import "./api-
|
|
4
|
-
import "./stats-
|
|
2
|
+
import { t as createDeepsightService } from "./deepsightService-CZC8YaHN.esm.js";
|
|
3
|
+
import "./api-Cqrn4bGi.esm.js";
|
|
4
|
+
import "./stats-C0Z_4KzW.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/deepsight/deepsightLoader.ts
|
|
7
7
|
const SDK_VERSION = "2.0.0";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { r as CameraStream } from "./types-Dl8aaniO.js";
|
|
2
|
-
import { r as WasmPipeline } from "./StateMachine-CvjqRbSg.js";
|
|
3
2
|
|
|
4
3
|
//#region ../infra/src/media/canvas.d.ts
|
|
5
4
|
/**
|
|
@@ -163,83 +162,6 @@ declare class StreamCanvasCapture {
|
|
|
163
162
|
private tick;
|
|
164
163
|
}
|
|
165
164
|
//#endregion
|
|
166
|
-
//#region ../infra/src/wasm/WasmPipelineType.d.ts
|
|
167
|
-
declare enum WasmPipelineType {
|
|
168
|
-
IdBlurGlarePipeline = 0,
|
|
169
|
-
IdBarcodeAndTextQualityPipeline = 1,
|
|
170
|
-
IdVideoSelfiePipeline = 2,
|
|
171
|
-
SelfieWithAggregationMetrics = 3,
|
|
172
|
-
SelfieWithQualityMetrics = 4,
|
|
173
|
-
IdFaceDetectionPipeline = 5,
|
|
174
|
-
}
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region ../infra/src/providers/wasm/BaseWasmProvider.d.ts
|
|
177
|
-
/**
|
|
178
|
-
* Base configuration for WASM providers
|
|
179
|
-
*/
|
|
180
|
-
interface BaseWasmConfig {
|
|
181
|
-
/** Path to the WASM binary */
|
|
182
|
-
wasmPath?: string;
|
|
183
|
-
/** Path to the SIMD-optimized WASM binary (optional) */
|
|
184
|
-
wasmSimdPath?: string;
|
|
185
|
-
/** Path to the WASM glue code */
|
|
186
|
-
glueCodePath?: string;
|
|
187
|
-
/** Whether to use SIMD optimizations (default: true) */
|
|
188
|
-
useSimd?: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Base path for ML model files. Models will be loaded from `${modelsBasePath}/${modelFileName}`.
|
|
191
|
-
* If not provided, models are expected in a 'models' subdirectory relative to the WASM binary.
|
|
192
|
-
*/
|
|
193
|
-
modelsBasePath?: string;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Base provider class that abstracts common WASM functionality.
|
|
197
|
-
* This serves as a foundation for specific ML capability providers
|
|
198
|
-
* like FaceDetectionProvider and IdCaptureProvider.
|
|
199
|
-
*/
|
|
200
|
-
declare abstract class BaseWasmProvider {
|
|
201
|
-
private _isInitialized;
|
|
202
|
-
protected pipelineType: WasmPipelineType | undefined;
|
|
203
|
-
/**
|
|
204
|
-
* Creates a new BaseWasmProvider
|
|
205
|
-
* @param pipelineType - The WASM pipeline type this provider uses
|
|
206
|
-
*/
|
|
207
|
-
constructor(pipelineType?: WasmPipelineType);
|
|
208
|
-
/**
|
|
209
|
-
* Returns whether this provider has been initialized.
|
|
210
|
-
*/
|
|
211
|
-
get initialized(): boolean;
|
|
212
|
-
protected getPipelineType(): WasmPipelineType;
|
|
213
|
-
/**
|
|
214
|
-
* Initializes the provider by ensuring WASM is loaded
|
|
215
|
-
* @param config - Provider configuration
|
|
216
|
-
* @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
|
|
217
|
-
*/
|
|
218
|
-
protected initializeBase(config: BaseWasmConfig, pipeline: WasmPipeline): Promise<void>;
|
|
219
|
-
/**
|
|
220
|
-
* Ensures the provider is initialized before performing operations.
|
|
221
|
-
* @throws Error if not initialized
|
|
222
|
-
*/
|
|
223
|
-
protected ensureInitialized(): void;
|
|
224
|
-
/**
|
|
225
|
-
* Processes a frame through the WASM pipeline
|
|
226
|
-
* @param image - Image data to process
|
|
227
|
-
* @returns The pipeline result (type depends on pipeline - WASM returns any)
|
|
228
|
-
*/
|
|
229
|
-
protected processFrameWasm(image: ImageData): Promise<any>;
|
|
230
|
-
abstract processFrame(image: ImageData): Promise<void>;
|
|
231
|
-
/**
|
|
232
|
-
* Resets the pipeline to its initial state.
|
|
233
|
-
* Safe to call even if not initialized (no-op in that case).
|
|
234
|
-
*/
|
|
235
|
-
reset(): void;
|
|
236
|
-
/**
|
|
237
|
-
* Disposes of resources and resets initialization state.
|
|
238
|
-
* Safe to call even if not initialized.
|
|
239
|
-
*/
|
|
240
|
-
dispose(): Promise<void>;
|
|
241
|
-
}
|
|
242
|
-
//#endregion
|
|
243
165
|
//#region src/internal/deepsight/metadataService.d.ts
|
|
244
166
|
type MetadataService = {
|
|
245
167
|
initialize(sdkVersion: string, disableIpify?: boolean): Promise<void>;
|
|
@@ -300,4 +222,4 @@ type DeepsightPrcCheckParams = {
|
|
|
300
222
|
constraints: MediaStreamConstraints;
|
|
301
223
|
};
|
|
302
224
|
//#endregion
|
|
303
|
-
export { IncodeCanvas as
|
|
225
|
+
export { IncodeCanvas as i, StreamCanvasCapture as n, IMotionSensorCapability as r, DeepsightService as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, b as createHiddenVideoElement, w as requestCameraAccess, x as IncodeCanvas } from "./src-CKB3MNL0.esm.js";
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { t as addDeviceStats } from "./stats-
|
|
2
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
3
|
+
import { t as addDeviceStats } from "./stats-C0Z_4KzW.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/internal/device/browserSimulation.ts
|
|
6
6
|
const AUTOMATION_MARKERS = {
|
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-mFVnFpqq.esm.js";
|
|
2
2
|
import { E as createManager, p as BrowserTimerProvider } from "./src-CKB3MNL0.esm.js";
|
|
3
3
|
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
4
|
-
import { t as api } from "./api-
|
|
4
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/email/emailServices.ts
|
|
7
7
|
async function fetchEmail(signal) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
2
|
-
import { i as isApiConfigured, r as getToken, t as api } from "./api-
|
|
2
|
+
import { i as isApiConfigured, r as getToken, t as api } from "./api-Cqrn4bGi.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/capabilities/IBrowserEnvironmentCapability.ts
|
|
5
5
|
function getTimestamp() {
|
package/dist/face-match.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-mFVnFpqq.esm.js";
|
|
2
2
|
import { E as createManager } from "./src-CKB3MNL0.esm.js";
|
|
3
3
|
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
4
|
-
import { t as api } from "./api-
|
|
4
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/face-match/faceMatchServices.ts
|
|
7
7
|
/**
|
package/dist/{faceCaptureManagerFactory-1AAwvEWC.d.ts → faceCaptureManagerFactory-BqvUNJXR.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-Dl8aaniO.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as WasmPipeline } from "./warmup-oXQm8EFM.js";
|
|
3
3
|
import { t as Manager } from "./Manager-DZLpIRan.js";
|
|
4
|
-
import { t as Flow } from "./types-
|
|
4
|
+
import { t as Flow } from "./types-DeUPfNsF.js";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
|
|
7
7
|
type WasmUtilConfig = MLProviderConfig & {
|
|
@@ -150,6 +150,8 @@ type FaceCaptureCaptureState = {
|
|
|
150
150
|
attemptsRemaining: number;
|
|
151
151
|
/** Error message from failed upload */
|
|
152
152
|
uploadError: string | undefined;
|
|
153
|
+
/** Whether assisted onboarding mode is active (back camera, no mirror) */
|
|
154
|
+
assistedOnboarding: boolean;
|
|
153
155
|
};
|
|
154
156
|
/** Processing the captured face */
|
|
155
157
|
type FaceCaptureProcessingState = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-mFVnFpqq.esm.js";
|
|
2
|
+
import { a as stopRecording$1, c as requestPermission, i as startRecording, l as getDeviceClass, n as streamingEvents, o as uploadDeepsightVideo, r as createRecordingSession, s as checkPermission, t as getBackCameraStream } from "./backCameraStream-DhKbn3gt.esm.js";
|
|
2
3
|
import { E as createManager, T as stopCameraStream, _ as StreamCanvasProcessingSession, a as FaceDetectionProvider, c as OpenViduRecordingProvider, u as LocalRecordingProvider, v as StreamCanvasCapture, w as requestCameraAccess } from "./src-CKB3MNL0.esm.js";
|
|
3
4
|
import { a as fromPromise, i as fromCallback, n as setup, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as addDeviceStats } from "./stats-Bv2CLzQ0.esm.js";
|
|
5
|
+
import { r as getToken, t as api } from "./api-Cqrn4bGi.esm.js";
|
|
6
|
+
import { t as addDeviceStats } from "./stats-C0Z_4KzW.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/internal/faceCapture/faceCaptureManagerFactory.ts
|
|
9
9
|
function getPermissionStatus(snapshot) {
|
|
@@ -46,7 +46,8 @@ function mapState(snapshot) {
|
|
|
46
46
|
detectionStatus: context.detectionStatus ?? "idle",
|
|
47
47
|
debugFrame: context.debugFrame,
|
|
48
48
|
attemptsRemaining: context.attemptsRemaining ?? 0,
|
|
49
|
-
uploadError: context.uploadError
|
|
49
|
+
uploadError: context.uploadError,
|
|
50
|
+
assistedOnboarding: context.config?.assistedOnboarding ?? false
|
|
50
51
|
};
|
|
51
52
|
if (snapshot.matches("processing")) return { status: "processing" };
|
|
52
53
|
if (snapshot.matches("finished")) return {
|
|
@@ -214,7 +215,7 @@ async function initializeCamera(params) {
|
|
|
214
215
|
});
|
|
215
216
|
await params.deepsightService.performPrcCheck({ constraints: { video: CAMERA_CONSTRAINTS.video } });
|
|
216
217
|
return {
|
|
217
|
-
stream: await requestCameraAccess({
|
|
218
|
+
stream: config.assistedOnboarding ? await getBackCameraStream() : await requestCameraAccess({
|
|
218
219
|
video: CAMERA_CONSTRAINTS.video,
|
|
219
220
|
audio: false
|
|
220
221
|
}),
|
|
@@ -444,7 +445,7 @@ function stopRecording(session) {
|
|
|
444
445
|
})();
|
|
445
446
|
}
|
|
446
447
|
async function initializeDeepsightSession(options) {
|
|
447
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
448
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DRQJKHl8.esm.js");
|
|
448
449
|
return loadDeepsightSession({
|
|
449
450
|
ds: options.ds,
|
|
450
451
|
storage: options.storage
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as WasmPipeline } from "./warmup-oXQm8EFM.js";
|
|
2
2
|
import { t as Manager } from "./Manager-DZLpIRan.js";
|
|
3
|
-
import {
|
|
3
|
+
import { t as AnyStateMachine } from "./StateMachine-DKxvdEuI.js";
|
|
4
|
+
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-DeUPfNsF.js";
|
|
4
5
|
|
|
5
6
|
//#region src/modules/flow/flowUtils.d.ts
|
|
6
7
|
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as createManager } from "./src-CKB3MNL0.esm.js";
|
|
2
2
|
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
3
|
-
import { t as api } from "./api-
|
|
3
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowUtils.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as createManager, p as BrowserTimerProvider } from "./src-CKB3MNL0.esm.js";
|
|
2
2
|
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CAXIQnl3.esm.js";
|
|
3
|
-
import { t as api } from "./api-
|
|
3
|
+
import { t as api } from "./api-Cqrn4bGi.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
6
6
|
async function processGovernmentValidation(signal) {
|