@incodetech/core 0.0.0-dev-20260219-dfbf2ff → 0.0.0-dev-20260220-bec1051
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/authentication.d.ts +7 -7
- package/dist/authentication.esm.js +8 -8
- package/dist/{backCameraStream-DhKbn3gt.esm.js → backCameraStream-BqrHT6k4.esm.js} +4 -3
- package/dist/curp-validation.d.ts +2 -2
- package/dist/curp-validation.esm.js +4 -4
- package/dist/{deepsightLoader-DRQJKHl8.esm.js → deepsightLoader-DAQ9UMIL.esm.js} +4 -4
- package/dist/{deepsightService-BLejzhoL.d.ts → deepsightService-Un1ZwAHH.d.ts} +1 -1
- package/dist/{deepsightService-CZC8YaHN.esm.js → deepsightService-fjzbldgJ.esm.js} +3 -3
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +4 -4
- package/dist/{endpoints-CAXIQnl3.esm.js → endpoints-DXp63GM6.esm.js} +2 -1
- package/dist/{events-mFVnFpqq.esm.js → events-h8K9H3OM.esm.js} +4 -3
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +4 -4
- package/dist/{faceCaptureManagerFactory-BqvUNJXR.d.ts → faceCaptureManagerFactory-CWGzTGlG.d.ts} +4 -4
- package/dist/{faceCaptureSetup-Bxot-Bxs.esm.js → faceCaptureSetup-0Vja8-lC.esm.js} +7 -7
- package/dist/flow.d.ts +4 -4
- package/dist/flow.esm.js +3 -3
- package/dist/geolocation.d.ts +125 -0
- package/dist/geolocation.esm.js +185 -0
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +3 -3
- package/dist/{id-DHFXeDku.esm.js → id-I83WBHKh.esm.js} +10 -12
- package/dist/id.d.ts +7 -7
- package/dist/id.esm.js +8 -8
- package/dist/{index-D0Zj8bRR.d.ts → index-CODMcUEs.d.ts} +6 -6
- package/dist/index.d.ts +10 -9
- package/dist/index.esm.js +8 -8
- package/dist/{lib-BpjRxd4I.esm.js → lib-DtNtprlI.esm.js} +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +4 -4
- package/dist/selfie.d.ts +7 -7
- package/dist/selfie.esm.js +8 -8
- package/dist/{src-CKB3MNL0.esm.js → src-m2UksnQC.esm.js} +16 -3
- package/dist/{stats-C0Z_4KzW.esm.js → stats-GJMiTm5k.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/package.json +5 -1
- /package/dist/{Actor-DniIAF8X.d.ts → Actor-Chvt8rE9.d.ts} +0 -0
- /package/dist/{Manager-DZLpIRan.d.ts → Manager-DM1NlCX4.d.ts} +0 -0
- /package/dist/{StateMachine-DKxvdEuI.d.ts → StateMachine-B7tKroZs.d.ts} +0 -0
- /package/dist/{api-Cqrn4bGi.esm.js → api-DlSxxyGw.esm.js} +0 -0
- /package/dist/{chunk-BYFjCiHC.esm.js → chunk-BcpNb8MJ.esm.js} +0 -0
- /package/dist/{types-DeUPfNsF.d.ts → types-c0XgGLsM.d.ts} +0 -0
- /package/dist/{types-Dl8aaniO.d.ts → types-ee3LkWku.d.ts} +0 -0
- /package/dist/{warmup-oXQm8EFM.d.ts → warmup-BUv67ifS.d.ts} +0 -0
package/dist/authentication.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import "./warmup-
|
|
3
|
-
import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
4
|
-
import { t as Manager } from "./Manager-
|
|
5
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
6
|
-
import { t as AnyStateMachine } from "./StateMachine-
|
|
7
|
-
import { r as FlowModuleConfig } from "./types-
|
|
1
|
+
import "./types-ee3LkWku.js";
|
|
2
|
+
import "./warmup-BUv67ifS.js";
|
|
3
|
+
import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CWGzTGlG.js";
|
|
4
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
5
|
+
import { t as ActorRefFrom } from "./Actor-Chvt8rE9.js";
|
|
6
|
+
import { t as AnyStateMachine } from "./StateMachine-B7tKroZs.js";
|
|
7
|
+
import { r as FlowModuleConfig } from "./types-c0XgGLsM.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/authentication/authenticationStateMachine.d.ts
|
|
10
10
|
declare const _authenticationMachine: AnyStateMachine;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
2
|
-
import { l as getDeviceClass } from "./backCameraStream-
|
|
3
|
-
import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-
|
|
4
|
-
import { a as fromPromise, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
5
|
-
import "./deepsightService-
|
|
6
|
-
import { t as api } from "./api-
|
|
7
|
-
import "./stats-
|
|
8
|
-
import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { l as getDeviceClass } from "./backCameraStream-BqrHT6k4.esm.js";
|
|
3
|
+
import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-m2UksnQC.esm.js";
|
|
4
|
+
import { a as fromPromise, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import "./deepsightService-fjzbldgJ.esm.js";
|
|
6
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
7
|
+
import "./stats-GJMiTm5k.esm.js";
|
|
8
|
+
import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-0Vja8-lC.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
11
11
|
const AUTH_ERROR_MAP = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as api } from "./api-
|
|
1
|
+
import { C as applyTrackConstraints, E as stopCameraStream, F as isIPhone14OrHigher, I as isSafari, M as isAndroid, P as isIOS, T as requestCameraAccess, b as queryCameraPermission, j as getUserAgent, k as getDeviceInfo, l as MotionSensorProvider, w as enumerateVideoDevices } from "./src-m2UksnQC.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
3
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region ../infra/src/capabilities/ITimerCapability.ts
|
|
6
6
|
function sleep(ms) {
|
|
@@ -14,6 +14,7 @@ function getBrowser() {
|
|
|
14
14
|
if (!userAgent) return "other";
|
|
15
15
|
const ua = userAgent.toLowerCase();
|
|
16
16
|
if (ua.includes("edg/")) return "edge";
|
|
17
|
+
if (ua.includes("opr/") || ua.includes("opera")) return "opera";
|
|
17
18
|
if (ua.includes("chrome") && !ua.includes("edg/")) return "chrome";
|
|
18
19
|
if (ua.includes("firefox")) return "firefox";
|
|
19
20
|
if (ua.includes("safari") && !ua.includes("chrome")) return "safari";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { r as FlowModuleConfig } from "./types-
|
|
1
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
2
|
+
import { r as FlowModuleConfig } from "./types-c0XgGLsM.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-
|
|
2
|
-
import {
|
|
3
|
-
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { n as eventModuleNames, r as eventScreenNames, u as screenOpened } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { D as createManager } from "./src-m2UksnQC.esm.js";
|
|
3
|
+
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
4
|
+
import { t as api } from "./api-DlSxxyGw.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
|
-
import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-
|
|
2
|
-
import { t as createDeepsightService } from "./deepsightService-
|
|
3
|
-
import "./api-
|
|
4
|
-
import "./stats-
|
|
1
|
+
import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-m2UksnQC.esm.js";
|
|
2
|
+
import { t as createDeepsightService } from "./deepsightService-fjzbldgJ.esm.js";
|
|
3
|
+
import "./api-DlSxxyGw.esm.js";
|
|
4
|
+
import "./stats-GJMiTm5k.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/deepsight/deepsightLoader.ts
|
|
7
7
|
const SDK_VERSION = "2.0.0";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { E as stopCameraStream, S as IncodeCanvas, T as requestCameraAccess, j as getUserAgent, k as getDeviceInfo, x as createHiddenVideoElement } from "./src-m2UksnQC.esm.js";
|
|
2
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
3
|
+
import { t as addDeviceStats } from "./stats-GJMiTm5k.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/internal/device/browserSimulation.ts
|
|
6
6
|
const AUTOMATION_MARKERS = {
|
package/dist/email.d.ts
CHANGED
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
2
|
-
import {
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { D as createManager, p as BrowserTimerProvider } from "./src-m2UksnQC.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
4
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/email/emailServices.ts
|
|
7
7
|
async function fetchEmail(signal) {
|
|
@@ -3297,7 +3297,8 @@ const endpoints = {
|
|
|
3297
3297
|
deviceRiskClientId: "/omni/device-risk-client-id",
|
|
3298
3298
|
ocrData: "/omni/get/ocr-data",
|
|
3299
3299
|
addCurp: "/omni/add/curp",
|
|
3300
|
-
addCurpV2: "/omni/add/curp/v2"
|
|
3300
|
+
addCurpV2: "/omni/add/curp/v2",
|
|
3301
|
+
addGeolocation: "/omni/add/geolocation"
|
|
3301
3302
|
};
|
|
3302
3303
|
|
|
3303
3304
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as endpoints } from "./endpoints-
|
|
2
|
-
import { i as isApiConfigured, r as getToken, t as api } from "./api-
|
|
1
|
+
import { t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
2
|
+
import { i as isApiConfigured, r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/capabilities/IBrowserEnvironmentCapability.ts
|
|
5
5
|
function getTimestamp() {
|
|
@@ -149,7 +149,8 @@ const eventModuleNames = {
|
|
|
149
149
|
instantVerifyEmail: "INSTANT_VERIFY_EMAIL",
|
|
150
150
|
instantVerifyConsent: "INSTANT_VERIFY_CONSENT",
|
|
151
151
|
forms: "FORMS",
|
|
152
|
-
customModule: "CUSTOM_MODULE"
|
|
152
|
+
customModule: "CUSTOM_MODULE",
|
|
153
|
+
geolocation: "GEOLOCATION"
|
|
153
154
|
};
|
|
154
155
|
const eventScreenNames = {
|
|
155
156
|
faceMatch: "FACE_MATCH",
|
package/dist/face-match.d.ts
CHANGED
package/dist/face-match.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
2
|
-
import {
|
|
3
|
-
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { D as createManager } from "./src-m2UksnQC.esm.js";
|
|
3
|
+
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
4
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/face-match/faceMatchServices.ts
|
|
7
7
|
/**
|
package/dist/{faceCaptureManagerFactory-BqvUNJXR.d.ts → faceCaptureManagerFactory-CWGzTGlG.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-
|
|
2
|
-
import { t as WasmPipeline } from "./warmup-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
4
|
-
import { t as Flow } from "./types-
|
|
1
|
+
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-ee3LkWku.js";
|
|
2
|
+
import { t as WasmPipeline } from "./warmup-BUv67ifS.js";
|
|
3
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
4
|
+
import { t as Flow } from "./types-c0XgGLsM.js";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
|
|
7
7
|
type WasmUtilConfig = MLProviderConfig & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
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-
|
|
3
|
-
import {
|
|
4
|
-
import { a as fromPromise, i as fromCallback, n as setup, r as assign, t as endpoints } from "./endpoints-
|
|
5
|
-
import { r as getToken, t as api } from "./api-
|
|
6
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-h8K9H3OM.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-BqrHT6k4.esm.js";
|
|
3
|
+
import { D as createManager, E as stopCameraStream, T as requestCameraAccess, a as FaceDetectionProvider, c as OpenViduRecordingProvider, u as LocalRecordingProvider, v as StreamCanvasProcessingSession, y as StreamCanvasCapture } from "./src-m2UksnQC.esm.js";
|
|
4
|
+
import { a as fromPromise, i as fromCallback, n as setup, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import { r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
|
|
6
|
+
import { t as addDeviceStats } from "./stats-GJMiTm5k.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/internal/faceCapture/faceCaptureManagerFactory.ts
|
|
9
9
|
function getPermissionStatus(snapshot) {
|
|
@@ -445,7 +445,7 @@ function stopRecording(session) {
|
|
|
445
445
|
})();
|
|
446
446
|
}
|
|
447
447
|
async function initializeDeepsightSession(options) {
|
|
448
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
448
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DAQ9UMIL.esm.js");
|
|
449
449
|
return loadDeepsightSession({
|
|
450
450
|
ds: options.ds,
|
|
451
451
|
storage: options.storage
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import { t as AnyStateMachine } from "./StateMachine-
|
|
4
|
-
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-
|
|
1
|
+
import { t as WasmPipeline } from "./warmup-BUv67ifS.js";
|
|
2
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
3
|
+
import { t as AnyStateMachine } from "./StateMachine-B7tKroZs.js";
|
|
4
|
+
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-c0XgGLsM.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/flow/flowUtils.d.ts
|
|
7
7
|
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as api } from "./api-
|
|
1
|
+
import { D as createManager } from "./src-m2UksnQC.esm.js";
|
|
2
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
3
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowUtils.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
2
|
+
|
|
3
|
+
//#region ../infra/src/capabilities/IGeolocationCapability.d.ts
|
|
4
|
+
type GeolocationCoords = {
|
|
5
|
+
latitude: number;
|
|
6
|
+
longitude: number;
|
|
7
|
+
};
|
|
8
|
+
type IGeolocationCapability = {
|
|
9
|
+
getCurrentPosition(): Promise<GeolocationCoords>;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/modules/geolocation/types.d.ts
|
|
13
|
+
/**
|
|
14
|
+
* Configuration options for the Geolocation module.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const config: GeolocationConfig = {
|
|
19
|
+
* allowSkip: true,
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
type GeolocationConfig = {
|
|
24
|
+
/**
|
|
25
|
+
* Whether the user is allowed to skip geolocation capture.
|
|
26
|
+
* When true, a skip button is shown on the permission-denied screen.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
allowSkip?: boolean;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/modules/geolocation/geolocationStateMachine.d.ts
|
|
33
|
+
type GeolocationDeviceType = 'ios' | 'android' | 'desktop';
|
|
34
|
+
declare const geolocationMachine: any;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/modules/geolocation/geolocationActor.d.ts
|
|
37
|
+
type CreateGeolocationActorOptions = {
|
|
38
|
+
config: GeolocationConfig;
|
|
39
|
+
geolocation?: IGeolocationCapability;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/modules/geolocation/geolocationManager.d.ts
|
|
43
|
+
/** Geolocation manager is in initial state, waiting for `request()` to be called */
|
|
44
|
+
type GeolocationIdleState = {
|
|
45
|
+
status: 'idle';
|
|
46
|
+
};
|
|
47
|
+
/** Browser geolocation permission prompt is active */
|
|
48
|
+
type GeolocationRequestingState = {
|
|
49
|
+
status: 'requestingLocation';
|
|
50
|
+
};
|
|
51
|
+
/** Coordinates are being submitted to the backend */
|
|
52
|
+
type GeolocationSubmittingState = {
|
|
53
|
+
status: 'submitting';
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Location successfully acquired — call `continue()` to proceed
|
|
57
|
+
* @property location - Location name returned from backend, or 'Unknown'
|
|
58
|
+
*/
|
|
59
|
+
type GeolocationAcquiredState = {
|
|
60
|
+
status: 'locationAcquired';
|
|
61
|
+
location: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* User denied geolocation permission — shows device-specific instructions
|
|
65
|
+
* @property deviceType - Used by UI to render the correct instruction panel
|
|
66
|
+
* @property canSkip - Whether the skip button should be shown
|
|
67
|
+
*/
|
|
68
|
+
type GeolocationPermissionDeniedState = {
|
|
69
|
+
status: 'permissionDenied';
|
|
70
|
+
deviceType: GeolocationDeviceType;
|
|
71
|
+
canSkip: boolean;
|
|
72
|
+
};
|
|
73
|
+
/** Geolocation flow completed successfully */
|
|
74
|
+
type GeolocationFinishedState = {
|
|
75
|
+
status: 'finished';
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Union of all possible geolocation manager states.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const state = geolocationManager.getState();
|
|
83
|
+
* if (state.status === 'locationAcquired') {
|
|
84
|
+
* console.log(state.location);
|
|
85
|
+
* }
|
|
86
|
+
* if (state.status === 'permissionDenied') {
|
|
87
|
+
* console.log(state.deviceType); // 'ios' | 'android' | 'desktop'
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
type GeolocationState = GeolocationIdleState | GeolocationRequestingState | GeolocationSubmittingState | GeolocationAcquiredState | GeolocationPermissionDeniedState | GeolocationFinishedState;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a geolocation manager for headless or UI-driven usage.
|
|
94
|
+
*
|
|
95
|
+
* @example Headless usage
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const manager = createGeolocationManager({ config: { allowSkip: true } });
|
|
98
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
99
|
+
* manager.request();
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
declare function createGeolocationManager(options: CreateGeolocationActorOptions): Manager<GeolocationState> & {
|
|
103
|
+
/**
|
|
104
|
+
* Initiates the browser geolocation permission request.
|
|
105
|
+
* Transitions from 'idle' to 'requestingLocation'.
|
|
106
|
+
*/
|
|
107
|
+
request(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Confirms the acquired location and completes the module.
|
|
110
|
+
* Should be called when state is 'locationAcquired'.
|
|
111
|
+
*/
|
|
112
|
+
continue(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Skips geolocation when the user has denied permission.
|
|
115
|
+
* Only works when `config.allowSkip` is true.
|
|
116
|
+
*/
|
|
117
|
+
skip(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Resets the manager back to initial state.
|
|
120
|
+
*/
|
|
121
|
+
reset(): void;
|
|
122
|
+
};
|
|
123
|
+
type GeolocationManager = ReturnType<typeof createGeolocationManager>;
|
|
124
|
+
//#endregion
|
|
125
|
+
export { type GeolocationConfig, type GeolocationManager, type GeolocationState, createGeolocationManager, geolocationMachine };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { D as createManager, M as isAndroid, P as isIOS, _ as BrowserGeolocationProvider } from "./src-m2UksnQC.esm.js";
|
|
3
|
+
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
4
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
5
|
+
|
|
6
|
+
//#region src/modules/geolocation/geolocationServices.ts
|
|
7
|
+
async function addGeolocation(params, signal) {
|
|
8
|
+
const res = await api.post(endpoints.addGeolocation, {
|
|
9
|
+
latitude: params.latitude,
|
|
10
|
+
longitude: params.longitude
|
|
11
|
+
}, { signal });
|
|
12
|
+
if (!res.ok) throw new Error(`POST ${endpoints.addGeolocation} failed: ${res.status} ${res.statusText}`);
|
|
13
|
+
return res.data;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/modules/geolocation/geolocationStateMachine.ts
|
|
18
|
+
function detectDeviceType() {
|
|
19
|
+
if (isIOS()) return "ios";
|
|
20
|
+
if (isAndroid()) return "android";
|
|
21
|
+
return "desktop";
|
|
22
|
+
}
|
|
23
|
+
const geolocationMachine = setup({
|
|
24
|
+
types: {
|
|
25
|
+
context: {},
|
|
26
|
+
events: {},
|
|
27
|
+
input: {}
|
|
28
|
+
},
|
|
29
|
+
actors: {
|
|
30
|
+
requestPosition: fromPromise(async ({ input }) => {
|
|
31
|
+
return input.geolocation.getCurrentPosition();
|
|
32
|
+
}),
|
|
33
|
+
submitPosition: fromPromise(async ({ input, signal }) => {
|
|
34
|
+
try {
|
|
35
|
+
return await addGeolocation(input, signal);
|
|
36
|
+
} catch {
|
|
37
|
+
return { location: "Unknown" };
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
actions: {
|
|
42
|
+
setCoords: assign(({ event }) => ({ coords: event.output })),
|
|
43
|
+
setLocation: assign(({ event }) => ({ location: event.output.location })),
|
|
44
|
+
setDeviceType: assign({ deviceType: () => detectDeviceType() }),
|
|
45
|
+
resetContext: assign(({ context }) => ({
|
|
46
|
+
config: context.config,
|
|
47
|
+
geolocation: context.geolocation,
|
|
48
|
+
coords: void 0,
|
|
49
|
+
location: void 0,
|
|
50
|
+
deviceType: detectDeviceType()
|
|
51
|
+
})),
|
|
52
|
+
trackComplete: () => {
|
|
53
|
+
addEvent({
|
|
54
|
+
code: "complete",
|
|
55
|
+
module: eventModuleNames.geolocation
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
trackSkip: () => {
|
|
59
|
+
addEvent({
|
|
60
|
+
code: "skip",
|
|
61
|
+
module: eventModuleNames.geolocation
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
guards: { canSkip: ({ context }) => context.config.allowSkip === true }
|
|
66
|
+
}).createMachine({
|
|
67
|
+
id: "geolocation",
|
|
68
|
+
initial: "idle",
|
|
69
|
+
context: ({ input }) => ({
|
|
70
|
+
config: input.config,
|
|
71
|
+
geolocation: input.geolocation,
|
|
72
|
+
coords: void 0,
|
|
73
|
+
location: void 0,
|
|
74
|
+
deviceType: detectDeviceType()
|
|
75
|
+
}),
|
|
76
|
+
states: {
|
|
77
|
+
idle: { on: { REQUEST: { target: "requestingLocation" } } },
|
|
78
|
+
requestingLocation: { invoke: {
|
|
79
|
+
id: "requestPosition",
|
|
80
|
+
src: "requestPosition",
|
|
81
|
+
input: ({ context }) => ({ geolocation: context.geolocation }),
|
|
82
|
+
onDone: {
|
|
83
|
+
target: "submitting",
|
|
84
|
+
actions: "setCoords"
|
|
85
|
+
},
|
|
86
|
+
onError: {
|
|
87
|
+
target: "permissionDenied",
|
|
88
|
+
actions: "setDeviceType"
|
|
89
|
+
}
|
|
90
|
+
} },
|
|
91
|
+
submitting: { invoke: {
|
|
92
|
+
id: "submitPosition",
|
|
93
|
+
src: "submitPosition",
|
|
94
|
+
input: ({ context }) => ({
|
|
95
|
+
latitude: context.coords?.latitude ?? 0,
|
|
96
|
+
longitude: context.coords?.longitude ?? 0
|
|
97
|
+
}),
|
|
98
|
+
onDone: {
|
|
99
|
+
target: "locationAcquired",
|
|
100
|
+
actions: "setLocation"
|
|
101
|
+
},
|
|
102
|
+
onError: {
|
|
103
|
+
target: "locationAcquired",
|
|
104
|
+
actions: assign({ location: () => "Unknown" })
|
|
105
|
+
}
|
|
106
|
+
} },
|
|
107
|
+
locationAcquired: { on: { CONTINUE: {
|
|
108
|
+
target: "finished",
|
|
109
|
+
actions: "trackComplete"
|
|
110
|
+
} } },
|
|
111
|
+
permissionDenied: { on: { SKIP: {
|
|
112
|
+
target: "finished",
|
|
113
|
+
guard: "canSkip",
|
|
114
|
+
actions: "trackSkip"
|
|
115
|
+
} } },
|
|
116
|
+
finished: { type: "final" }
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/modules/geolocation/geolocationActor.ts
|
|
122
|
+
function createGeolocationActor(options) {
|
|
123
|
+
const geolocation = options.geolocation ?? new BrowserGeolocationProvider();
|
|
124
|
+
return createActor(geolocationMachine, { input: {
|
|
125
|
+
config: options.config,
|
|
126
|
+
geolocation
|
|
127
|
+
} }).start();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/modules/geolocation/geolocationManager.ts
|
|
132
|
+
function mapState(snapshot) {
|
|
133
|
+
const typedSnapshot = snapshot;
|
|
134
|
+
const { context } = typedSnapshot;
|
|
135
|
+
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
136
|
+
if (typedSnapshot.matches("requestingLocation")) return { status: "requestingLocation" };
|
|
137
|
+
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
138
|
+
if (typedSnapshot.matches("locationAcquired")) return {
|
|
139
|
+
status: "locationAcquired",
|
|
140
|
+
location: context.location ?? "Unknown"
|
|
141
|
+
};
|
|
142
|
+
if (typedSnapshot.matches("permissionDenied")) return {
|
|
143
|
+
status: "permissionDenied",
|
|
144
|
+
deviceType: context.deviceType,
|
|
145
|
+
canSkip: context.config.allowSkip === true
|
|
146
|
+
};
|
|
147
|
+
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
148
|
+
return { status: "idle" };
|
|
149
|
+
}
|
|
150
|
+
function createApi({ actor }) {
|
|
151
|
+
return {
|
|
152
|
+
request() {
|
|
153
|
+
actor.send({ type: "REQUEST" });
|
|
154
|
+
},
|
|
155
|
+
continue() {
|
|
156
|
+
actor.send({ type: "CONTINUE" });
|
|
157
|
+
},
|
|
158
|
+
skip() {
|
|
159
|
+
actor.send({ type: "SKIP" });
|
|
160
|
+
},
|
|
161
|
+
reset() {
|
|
162
|
+
actor.send({ type: "RESET" });
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates a geolocation manager for headless or UI-driven usage.
|
|
168
|
+
*
|
|
169
|
+
* @example Headless usage
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const manager = createGeolocationManager({ config: { allowSkip: true } });
|
|
172
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
173
|
+
* manager.request();
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
function createGeolocationManager(options) {
|
|
177
|
+
return createManager({
|
|
178
|
+
actor: createGeolocationActor(options),
|
|
179
|
+
mapState,
|
|
180
|
+
createApi
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
//#endregion
|
|
185
|
+
export { createGeolocationManager, geolocationMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as api } from "./api-
|
|
1
|
+
import { D as createManager, p as BrowserTimerProvider } from "./src-m2UksnQC.esm.js";
|
|
2
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
3
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
6
6
|
async function processGovernmentValidation(signal) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-
|
|
2
|
-
import { a as stopRecording$1, c as requestPermission, i as startRecording, l as getDeviceClass, n as streamingEvents, r as createRecordingSession, s as checkPermission, t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import {
|
|
4
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
5
|
-
import { n as isBrowserSimulation } from "./deepsightService-
|
|
6
|
-
import { n as getApi, r as getToken, t as api } from "./api-
|
|
7
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { a as stopRecording$1, c as requestPermission, i as startRecording, l as getDeviceClass, n as streamingEvents, r as createRecordingSession, s as checkPermission, t as getBackCameraStream } from "./backCameraStream-BqrHT6k4.esm.js";
|
|
3
|
+
import { A as getWindowDimensions, D as createManager, N as isDesktop, S as IncodeCanvas, c as OpenViduRecordingProvider, d as IpifyProvider, f as FingerprintProvider, g as BrowserEnvironmentProvider, h as BrowserInfoProvider, i as IdCaptureProvider, m as BrowserStorageProvider, n as DEFAULT_ID_CAPTURE_THRESHOLDS, p as BrowserTimerProvider, t as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as StreamCanvasProcessingSession, y as StreamCanvasCapture } from "./src-m2UksnQC.esm.js";
|
|
4
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import { n as isBrowserSimulation } from "./deepsightService-fjzbldgJ.esm.js";
|
|
6
|
+
import { n as getApi, r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
|
|
7
|
+
import { t as addDeviceStats } from "./stats-GJMiTm5k.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/internal/session/sessionService.ts
|
|
10
10
|
/**
|
|
@@ -898,7 +898,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
|
|
|
898
898
|
});
|
|
899
899
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
900
900
|
if (!input.dependencies) return;
|
|
901
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
901
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DAQ9UMIL.esm.js");
|
|
902
902
|
return loadDeepsightSession({
|
|
903
903
|
ds: input.ds,
|
|
904
904
|
storage: input.dependencies.storage,
|
|
@@ -1166,11 +1166,9 @@ const hasUploadValidationErrorGuard = ({ context }) => {
|
|
|
1166
1166
|
const isFrontModeGuard = ({ context }) => context.currentMode === "front" || context.currentMode === "passport";
|
|
1167
1167
|
const isOnlyFrontGuard = ({ context }) => context.config.onlyFront;
|
|
1168
1168
|
const shouldContinueToBackGuard = ({ context }) => {
|
|
1169
|
-
if (context.currentMode
|
|
1170
|
-
if (context.currentMode !== "front") return false;
|
|
1169
|
+
if (context.currentMode !== "front" && context.currentMode !== "passport") return false;
|
|
1171
1170
|
if (context.config.onlyFront) return false;
|
|
1172
1171
|
if (context.config.onlyBack) return false;
|
|
1173
|
-
if (!context.config.enableId && context.config.enablePassport) return false;
|
|
1174
1172
|
if (context.uploadResponse?.skipBackIdCapture) return false;
|
|
1175
1173
|
return true;
|
|
1176
1174
|
};
|
|
@@ -2047,7 +2045,7 @@ function mapState(snapshot) {
|
|
|
2047
2045
|
}
|
|
2048
2046
|
if (snapshot.matches("capture")) {
|
|
2049
2047
|
const captureStatus = getCaptureStatus(snapshot);
|
|
2050
|
-
const needsBackCapture = context.currentMode === "front" && !context.config.onlyFront && !context.config.onlyBack;
|
|
2048
|
+
const needsBackCapture = (context.currentMode === "front" || context.currentMode === "passport") && !context.config.onlyFront && !context.config.onlyBack && !context.uploadResponse?.skipBackIdCapture;
|
|
2051
2049
|
return {
|
|
2052
2050
|
status: "capture",
|
|
2053
2051
|
captureStatus: captureStatus ?? "initializing",
|
package/dist/id.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-
|
|
2
|
-
import "./deepsightService-
|
|
3
|
-
import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-
|
|
4
|
-
import "./Manager-
|
|
5
|
-
import "./Actor-
|
|
6
|
-
import "./StateMachine-
|
|
7
|
-
import "./types-
|
|
1
|
+
import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-CODMcUEs.js";
|
|
2
|
+
import "./deepsightService-Un1ZwAHH.js";
|
|
3
|
+
import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-ee3LkWku.js";
|
|
4
|
+
import "./Manager-DM1NlCX4.js";
|
|
5
|
+
import "./Actor-Chvt8rE9.js";
|
|
6
|
+
import "./StateMachine-B7tKroZs.js";
|
|
7
|
+
import "./types-c0XgGLsM.js";
|
|
8
8
|
export { CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
package/dist/id.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./events-
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import "./src-
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import "./deepsightService-
|
|
6
|
-
import "./api-
|
|
7
|
-
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
8
|
-
import "./stats-
|
|
1
|
+
import "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import "./backCameraStream-BqrHT6k4.esm.js";
|
|
3
|
+
import "./src-m2UksnQC.esm.js";
|
|
4
|
+
import "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import "./deepsightService-fjzbldgJ.esm.js";
|
|
6
|
+
import "./api-DlSxxyGw.esm.js";
|
|
7
|
+
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-I83WBHKh.esm.js";
|
|
8
|
+
import "./stats-GJMiTm5k.esm.js";
|
|
9
9
|
|
|
10
10
|
export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as IncodeCanvas, n as StreamCanvasCapture, r as IMotionSensorCapability, t as DeepsightService } from "./deepsightService-
|
|
2
|
-
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, o as RecordingConnection, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
4
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
5
|
-
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-
|
|
6
|
-
import { i as TutorialIdConfig, t as Flow } from "./types-
|
|
1
|
+
import { i as IncodeCanvas, n as StreamCanvasCapture, r as IMotionSensorCapability, t as DeepsightService } from "./deepsightService-Un1ZwAHH.js";
|
|
2
|
+
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, o as RecordingConnection, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-ee3LkWku.js";
|
|
3
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
4
|
+
import { t as ActorRefFrom } from "./Actor-Chvt8rE9.js";
|
|
5
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-B7tKroZs.js";
|
|
6
|
+
import { i as TutorialIdConfig, t as Flow } from "./types-c0XgGLsM.js";
|
|
7
7
|
|
|
8
8
|
//#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
|
|
9
9
|
interface IAnalyticsCapability {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-
|
|
2
|
-
import "./deepsightService-
|
|
3
|
-
import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-
|
|
4
|
-
import { n as warmupWasm, t as WasmPipeline } from "./warmup-
|
|
5
|
-
import "./Manager-
|
|
6
|
-
import "./Actor-
|
|
7
|
-
import "./StateMachine-
|
|
8
|
-
import "./types-
|
|
1
|
+
import { A as IdCaptureGeometry, B as DetectionOrientation, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, V as IdCaptureSettings, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-CODMcUEs.js";
|
|
2
|
+
import "./deepsightService-Un1ZwAHH.js";
|
|
3
|
+
import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-ee3LkWku.js";
|
|
4
|
+
import { n as warmupWasm, t as WasmPipeline } from "./warmup-BUv67ifS.js";
|
|
5
|
+
import "./Manager-DM1NlCX4.js";
|
|
6
|
+
import "./Actor-Chvt8rE9.js";
|
|
7
|
+
import "./StateMachine-B7tKroZs.js";
|
|
8
|
+
import "./types-c0XgGLsM.js";
|
|
9
9
|
|
|
10
10
|
//#region ../infra/src/http/types.d.ts
|
|
11
11
|
type CreateApiConfig = {
|
|
@@ -53,7 +53,7 @@ type HttpClient = {
|
|
|
53
53
|
declare const createApi: (config: CreateApiConfig) => HttpClient;
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/internal/device/getBrowser.d.ts
|
|
56
|
-
type Browser = 'chrome' | 'firefox' | 'safari' | 'edge' | 'other';
|
|
56
|
+
type Browser = 'chrome' | 'firefox' | 'safari' | 'edge' | 'opera' | 'other';
|
|
57
57
|
declare function getBrowser(): Browser;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/internal/device/getDeviceClass.d.ts
|
|
@@ -342,6 +342,7 @@ declare const eventModuleNames: {
|
|
|
342
342
|
readonly instantVerifyConsent: "INSTANT_VERIFY_CONSENT";
|
|
343
343
|
readonly forms: "FORMS";
|
|
344
344
|
readonly customModule: "CUSTOM_MODULE";
|
|
345
|
+
readonly geolocation: "GEOLOCATION";
|
|
345
346
|
};
|
|
346
347
|
declare const eventScreenNames: {
|
|
347
348
|
readonly faceMatch: "FACE_MATCH";
|
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as videoSelfieEvents, c as screenClosed, d as addEvent, f as flushEventQueue, i as tutorialScreenNamesMapper, l as screenEvent, n as eventModuleNames, o as moduleClosed, p as subscribeEvent, r as eventScreenNames, s as moduleOpened, t as cameraScreenNamesMapper, u as screenOpened } from "./events-
|
|
2
|
-
import { c as requestPermission, l as getDeviceClass, s as checkPermission, u as getBrowser } from "./backCameraStream-
|
|
3
|
-
import {
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import "./deepsightService-
|
|
6
|
-
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-
|
|
7
|
-
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
8
|
-
import "./stats-
|
|
1
|
+
import { a as videoSelfieEvents, c as screenClosed, d as addEvent, f as flushEventQueue, i as tutorialScreenNamesMapper, l as screenEvent, n as eventModuleNames, o as moduleClosed, p as subscribeEvent, r as eventScreenNames, s as moduleOpened, t as cameraScreenNamesMapper, u as screenOpened } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { c as requestPermission, l as getDeviceClass, s as checkPermission, u as getBrowser } from "./backCameraStream-BqrHT6k4.esm.js";
|
|
3
|
+
import { O as createApi_default, o as warmupWasm, r as WasmUtilProvider } from "./src-m2UksnQC.esm.js";
|
|
4
|
+
import "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import "./deepsightService-fjzbldgJ.esm.js";
|
|
6
|
+
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-DlSxxyGw.esm.js";
|
|
7
|
+
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-I83WBHKh.esm.js";
|
|
8
|
+
import "./stats-GJMiTm5k.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/setup.ts
|
|
11
11
|
let wasmConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-
|
|
1
|
+
import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-BcpNb8MJ.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js
|
|
4
4
|
var require_jsnlog = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js": ((exports) => {
|
package/dist/phone.d.ts
CHANGED
package/dist/phone.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
2
|
-
import {
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import { D as createManager, p as BrowserTimerProvider } from "./src-m2UksnQC.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DXp63GM6.esm.js";
|
|
4
|
+
import { t as api } from "./api-DlSxxyGw.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/phone/phoneServices.ts
|
|
7
7
|
async function fetchPhone(signal) {
|
package/dist/selfie.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as IncodeCanvas, n as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-
|
|
2
|
-
import { c as MLProviderConfig, n as PermissionStatus, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-
|
|
3
|
-
import { t as WasmPipeline } from "./warmup-
|
|
4
|
-
import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
5
|
-
import { t as Manager } from "./Manager-
|
|
6
|
-
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-
|
|
7
|
-
import { r as FlowModuleConfig } from "./types-
|
|
1
|
+
import { i as IncodeCanvas, n as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-Un1ZwAHH.js";
|
|
2
|
+
import { c as MLProviderConfig, n as PermissionStatus, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-ee3LkWku.js";
|
|
3
|
+
import { t as WasmPipeline } from "./warmup-BUv67ifS.js";
|
|
4
|
+
import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CWGzTGlG.js";
|
|
5
|
+
import { t as Manager } from "./Manager-DM1NlCX4.js";
|
|
6
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-B7tKroZs.js";
|
|
7
|
+
import { r as FlowModuleConfig } from "./types-c0XgGLsM.js";
|
|
8
8
|
|
|
9
9
|
//#region ../infra/src/capabilities/IFaceDetectionCapability.d.ts
|
|
10
10
|
/**
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-
|
|
4
|
-
import { a as fromPromise, o as createActor, r as assign } from "./endpoints-
|
|
5
|
-
import "./deepsightService-
|
|
6
|
-
import "./api-
|
|
7
|
-
import "./stats-
|
|
8
|
-
import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-h8K9H3OM.esm.js";
|
|
2
|
+
import "./backCameraStream-BqrHT6k4.esm.js";
|
|
3
|
+
import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-m2UksnQC.esm.js";
|
|
4
|
+
import { a as fromPromise, o as createActor, r as assign } from "./endpoints-DXp63GM6.esm.js";
|
|
5
|
+
import "./deepsightService-fjzbldgJ.esm.js";
|
|
6
|
+
import "./api-DlSxxyGw.esm.js";
|
|
7
|
+
import "./stats-GJMiTm5k.esm.js";
|
|
8
|
+
import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-0Vja8-lC.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/selfie/selfieErrorUtils.ts
|
|
11
11
|
const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __toDynamicImportESM } from "./chunk-
|
|
1
|
+
import { a as __toDynamicImportESM } from "./chunk-BcpNb8MJ.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../infra/src/capabilities/platform.ts
|
|
4
4
|
/**
|
|
@@ -2571,6 +2571,19 @@ async function trimLastNSeconds(videoBlob, seconds) {
|
|
|
2571
2571
|
return await trimLastNSecondsUsingPlayback(videoBlob, seconds);
|
|
2572
2572
|
}
|
|
2573
2573
|
|
|
2574
|
+
//#endregion
|
|
2575
|
+
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
2576
|
+
var BrowserGeolocationProvider = class {
|
|
2577
|
+
getCurrentPosition() {
|
|
2578
|
+
return new Promise((resolve, reject) => {
|
|
2579
|
+
navigator.geolocation.getCurrentPosition((pos) => resolve({
|
|
2580
|
+
latitude: pos.coords.latitude,
|
|
2581
|
+
longitude: pos.coords.longitude
|
|
2582
|
+
}), reject);
|
|
2583
|
+
});
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
|
|
2574
2587
|
//#endregion
|
|
2575
2588
|
//#region ../infra/src/providers/browser/BrowserEnvironmentProvider.ts
|
|
2576
2589
|
var BrowserEnvironmentProvider = class {
|
|
@@ -4404,7 +4417,7 @@ var MotionSensorProvider = class {
|
|
|
4404
4417
|
let openViduImport;
|
|
4405
4418
|
async function loadOpenVidu() {
|
|
4406
4419
|
if (openViduImport) return openViduImport;
|
|
4407
|
-
openViduImport = import("./lib-
|
|
4420
|
+
openViduImport = import("./lib-DtNtprlI.esm.js").then(__toDynamicImportESM(1));
|
|
4408
4421
|
return openViduImport;
|
|
4409
4422
|
}
|
|
4410
4423
|
|
|
@@ -5703,4 +5716,4 @@ const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
|
5703
5716
|
const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
|
|
5704
5717
|
|
|
5705
5718
|
//#endregion
|
|
5706
|
-
export {
|
|
5719
|
+
export { getWindowDimensions as A, applyTrackConstraints as C, createManager as D, stopCameraStream as E, isIPhone14OrHigher as F, isSafari as I, isAndroid as M, isDesktop as N, createApi_default as O, isIOS as P, IncodeCanvas as S, requestCameraAccess as T, BrowserGeolocationProvider as _, FaceDetectionProvider as a, queryCameraPermission as b, OpenViduRecordingProvider as c, IpifyProvider as d, FingerprintProvider as f, BrowserEnvironmentProvider as g, BrowserInfoProvider as h, IdCaptureProvider as i, getUserAgent as j, getDeviceInfo as k, MotionSensorProvider as l, BrowserStorageProvider as m, DEFAULT_ID_CAPTURE_THRESHOLDS as n, warmupWasm as o, BrowserTimerProvider as p, WasmUtilProvider as r, VisibilityProvider as s, DEFAULT_ID_CAPTURE_MODEL_VERSION as t, LocalRecordingProvider as u, StreamCanvasProcessingSession as v, enumerateVideoDevices as w, createHiddenVideoElement as x, StreamCanvasCapture as y };
|
package/dist/stats.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260220-bec1051",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"./camera": {
|
|
49
49
|
"types": "./dist/camera.d.ts",
|
|
50
50
|
"import": "./dist/camera.esm.js"
|
|
51
|
+
},
|
|
52
|
+
"./geolocation": {
|
|
53
|
+
"types": "./dist/geolocation.d.ts",
|
|
54
|
+
"import": "./dist/geolocation.esm.js"
|
|
51
55
|
}
|
|
52
56
|
},
|
|
53
57
|
"files": [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|