@incodetech/core 0.0.0-dev-20260129-938ff95 → 0.0.0-dev-20260130-5bb04b9
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/OpenViduLogger-Cu0BjUgP.esm.js +3 -0
- package/dist/{deepsightLoader-Ct3HSIhk.esm.js → deepsightLoader-CGdK3U_s.esm.js} +7 -8
- package/dist/{deepsightService-B8c8aZje.esm.js → deepsightService-BqN04Xvz.esm.js} +53 -5
- package/dist/{types-CRVSv38Q.d.ts → deepsightService-C-8SR9TZ.d.ts} +91 -2
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +3 -3
- package/dist/{endpoints-BUsSVoJV.esm.js → endpoints-CmGlc9UG.esm.js} +7 -1
- package/dist/{events-B8ZkhAZo.esm.js → events-CLVaKe2J.esm.js} +1 -1
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +3 -3
- package/dist/id-DE76bgjS.esm.js +2498 -0
- package/dist/id.d.ts +5 -5
- package/dist/id.esm.js +7 -6
- package/dist/{index-CJMK8K5u.d.ts → index-aadmCg5s.d.ts} +84 -62
- package/dist/index.d.ts +78 -6
- package/dist/index.esm.js +12 -46
- package/dist/{lib-CbAibJlt.esm.js → lib-Cmee0CBZ.esm.js} +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +3 -3
- package/dist/selfie.d.ts +8 -87
- package/dist/selfie.esm.js +39 -19
- package/dist/{src-XSoNGEQW.esm.js → src-BEaVRVtC.esm.js} +6 -2
- package/dist/stats.d.ts +4 -0
- package/dist/stats.esm.js +1 -1
- package/dist/{streamingEvents-J6ffKmJL.esm.js → streamingEvents-EcGvh3bl.esm.js} +13 -4
- package/package.json +1 -1
- package/dist/OpenViduLogger-DyqID_-7.esm.js +0 -3
- package/dist/getDeviceClass-DkfbtsIJ.esm.js +0 -41
- package/dist/id-GPFS1Wo_.esm.js +0 -1827
- /package/dist/{Manager-Co-PsiG9.d.ts → Manager-WTb99jnh.d.ts} +0 -0
- /package/dist/{OpenViduLogger-BLxxXoyF.esm.js → OpenViduLogger-XKcjntVs.esm.js} +0 -0
- /package/dist/{stats-DnU4uUFv.esm.js → stats-onWUN0tY.esm.js} +0 -0
- /package/dist/{types-CMR6NkxW.d.ts → types-CflhN94Q.d.ts} +0 -0
package/dist/selfie.esm.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
2
|
-
import { C as createManager, S as stopCameraStream, a as FaceDetectionProvider, c as OpenViduRecordingProvider, f as BrowserStorageProvider, h as StreamCanvasCapture, m as StreamCanvasProcessingSession, r as WasmUtilProvider, u as LocalRecordingProvider, x as requestCameraAccess } from "./src-
|
|
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 { a as uploadDeepsightVideo, c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-CLVaKe2J.esm.js";
|
|
2
|
+
import { C as createManager, S as stopCameraStream, a as FaceDetectionProvider, c as OpenViduRecordingProvider, f as BrowserStorageProvider, h as StreamCanvasCapture, m as StreamCanvasProcessingSession, r as WasmUtilProvider, u as LocalRecordingProvider, x as requestCameraAccess } from "./src-BEaVRVtC.esm.js";
|
|
3
|
+
import "./deepsightService-BqN04Xvz.esm.js";
|
|
4
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-CmGlc9UG.esm.js";
|
|
5
|
+
import { a as uploadDeepsightVideo, c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-EcGvh3bl.esm.js";
|
|
6
6
|
import { r as getToken, t as api } from "./api-DfRLAneb.esm.js";
|
|
7
|
-
import "./
|
|
8
|
-
import { t as addDeviceStats } from "./stats-DnU4uUFv.esm.js";
|
|
7
|
+
import { t as addDeviceStats } from "./stats-onWUN0tY.esm.js";
|
|
9
8
|
|
|
10
9
|
//#region src/modules/selfie/types.ts
|
|
11
10
|
const FACE_ERROR_CODES = {
|
|
@@ -127,7 +126,7 @@ function stopStream(stream) {
|
|
|
127
126
|
stopCameraStream(stream);
|
|
128
127
|
}
|
|
129
128
|
async function initializeCamera(params) {
|
|
130
|
-
const { config
|
|
129
|
+
const { config } = params;
|
|
131
130
|
const provider = new FaceDetectionProvider();
|
|
132
131
|
await provider.initialize({ autocaptureInterval: config.autoCaptureTimeout * 1e3 });
|
|
133
132
|
provider.setChecksEnabled({
|
|
@@ -140,11 +139,7 @@ async function initializeCamera(params) {
|
|
|
140
139
|
console.log("performPrcCheck init");
|
|
141
140
|
const timerName = `performPrcCheck ${Math.random()}`;
|
|
142
141
|
console.time(timerName);
|
|
143
|
-
await params.deepsightService.performPrcCheck({
|
|
144
|
-
constraints: { video: CAMERA_CONSTRAINTS.video },
|
|
145
|
-
ds: config.ds,
|
|
146
|
-
storage: dependencies.storage
|
|
147
|
-
});
|
|
142
|
+
await params.deepsightService.performPrcCheck({ constraints: { video: CAMERA_CONSTRAINTS.video } });
|
|
148
143
|
console.timeEnd(timerName);
|
|
149
144
|
console.log("performPrcCheck end");
|
|
150
145
|
return {
|
|
@@ -377,9 +372,12 @@ function stopRecording(session) {
|
|
|
377
372
|
}
|
|
378
373
|
})();
|
|
379
374
|
}
|
|
380
|
-
async function initializeDeepsightSession() {
|
|
381
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
382
|
-
return loadDeepsightSession(
|
|
375
|
+
async function initializeDeepsightSession(options) {
|
|
376
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-CGdK3U_s.esm.js");
|
|
377
|
+
return loadDeepsightSession({
|
|
378
|
+
ds: options.ds,
|
|
379
|
+
storage: options.storage
|
|
380
|
+
});
|
|
383
381
|
}
|
|
384
382
|
|
|
385
383
|
//#endregion
|
|
@@ -461,7 +459,6 @@ const _selfieMachine = setup({
|
|
|
461
459
|
initializeCamera: fromPromise(async ({ input }) => {
|
|
462
460
|
return initializeCamera({
|
|
463
461
|
config: input.config,
|
|
464
|
-
dependencies: input.dependencies,
|
|
465
462
|
deepsightService: input.deepsightService
|
|
466
463
|
});
|
|
467
464
|
}),
|
|
@@ -497,8 +494,11 @@ const _selfieMachine = setup({
|
|
|
497
494
|
});
|
|
498
495
|
return cleanup;
|
|
499
496
|
}),
|
|
500
|
-
initializeDeepsightSession: fromPromise(async () => {
|
|
501
|
-
return await initializeDeepsightSession(
|
|
497
|
+
initializeDeepsightSession: fromPromise(async ({ input }) => {
|
|
498
|
+
return await initializeDeepsightSession({
|
|
499
|
+
ds: input.ds,
|
|
500
|
+
storage: input.storage
|
|
501
|
+
});
|
|
502
502
|
}),
|
|
503
503
|
startRecording: fromPromise(async ({ input }) => {
|
|
504
504
|
if (!input.stream) return input.recordingService;
|
|
@@ -695,6 +695,10 @@ const _selfieMachine = setup({
|
|
|
695
695
|
}, {
|
|
696
696
|
id: "loadingInitDeepsight",
|
|
697
697
|
src: "initializeDeepsightSession",
|
|
698
|
+
input: ({ context }) => ({
|
|
699
|
+
ds: context.config.ds,
|
|
700
|
+
storage: context.dependencies.storage
|
|
701
|
+
}),
|
|
698
702
|
onDone: { actions: assign({ deepsightService: ({ event }) => event.output }) },
|
|
699
703
|
onError: { actions: () => void 0 }
|
|
700
704
|
}] },
|
|
@@ -723,6 +727,10 @@ const _selfieMachine = setup({
|
|
|
723
727
|
initializingDeepsight: { invoke: {
|
|
724
728
|
id: "tutorialInitDeepsight",
|
|
725
729
|
src: "initializeDeepsightSession",
|
|
730
|
+
input: ({ context }) => ({
|
|
731
|
+
ds: context.config.ds,
|
|
732
|
+
storage: context.dependencies.storage
|
|
733
|
+
}),
|
|
726
734
|
onDone: {
|
|
727
735
|
target: "initializingStream",
|
|
728
736
|
actions: assign({ deepsightService: ({ event }) => event.output })
|
|
@@ -776,6 +784,10 @@ const _selfieMachine = setup({
|
|
|
776
784
|
initializingDeepsight: { invoke: {
|
|
777
785
|
id: "initializeDeepsightTutorial",
|
|
778
786
|
src: "initializeDeepsightSession",
|
|
787
|
+
input: ({ context }) => ({
|
|
788
|
+
ds: context.config.ds,
|
|
789
|
+
storage: context.dependencies.storage
|
|
790
|
+
}),
|
|
779
791
|
onDone: {
|
|
780
792
|
target: "readyForNext",
|
|
781
793
|
actions: assign({ deepsightService: ({ event }) => event.output })
|
|
@@ -812,6 +824,10 @@ const _selfieMachine = setup({
|
|
|
812
824
|
initializingDeepsight: { invoke: {
|
|
813
825
|
id: "initializeDeepsightPerms",
|
|
814
826
|
src: "initializeDeepsightSession",
|
|
827
|
+
input: ({ context }) => ({
|
|
828
|
+
ds: context.config.ds,
|
|
829
|
+
storage: context.dependencies.storage
|
|
830
|
+
}),
|
|
815
831
|
onDone: {
|
|
816
832
|
target: "idle",
|
|
817
833
|
actions: assign({ deepsightService: ({ event }) => event.output })
|
|
@@ -880,6 +896,10 @@ const _selfieMachine = setup({
|
|
|
880
896
|
initializingDeepsight: { invoke: {
|
|
881
897
|
id: "initializeDeepsightCapture",
|
|
882
898
|
src: "initializeDeepsightSession",
|
|
899
|
+
input: ({ context }) => ({
|
|
900
|
+
ds: context.config.ds,
|
|
901
|
+
storage: context.dependencies.storage
|
|
902
|
+
}),
|
|
883
903
|
onDone: {
|
|
884
904
|
target: "checkingStream",
|
|
885
905
|
actions: [assign({ deepsightService: ({ event }) => event.output })]
|
|
@@ -1476,13 +1476,13 @@ var MotionSensorProvider = class {
|
|
|
1476
1476
|
//#region ../infra/src/providers/browser/openviduLazy.ts
|
|
1477
1477
|
let openViduImport;
|
|
1478
1478
|
async function enableProdModeBeforeLoad() {
|
|
1479
|
-
const { OpenViduLogger } = await import("./OpenViduLogger-
|
|
1479
|
+
const { OpenViduLogger } = await import("./OpenViduLogger-Cu0BjUgP.esm.js").then(__toDynamicImportESM(1));
|
|
1480
1480
|
OpenViduLogger.getInstance().enableProdMode();
|
|
1481
1481
|
}
|
|
1482
1482
|
async function loadOpenVidu() {
|
|
1483
1483
|
if (openViduImport) return openViduImport;
|
|
1484
1484
|
await enableProdModeBeforeLoad();
|
|
1485
|
-
openViduImport = import("./lib-
|
|
1485
|
+
openViduImport = import("./lib-Cmee0CBZ.esm.js").then(__toDynamicImportESM(1));
|
|
1486
1486
|
return openViduImport;
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
@@ -2727,6 +2727,10 @@ var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
|
|
|
2727
2727
|
this.ensureInitialized();
|
|
2728
2728
|
return mlWasmJSApi_default.getCheck();
|
|
2729
2729
|
}
|
|
2730
|
+
getPipelineState() {
|
|
2731
|
+
this.ensureInitialized();
|
|
2732
|
+
return mlWasmJSApi_default.getPipelineState();
|
|
2733
|
+
}
|
|
2730
2734
|
estimatePerformance() {
|
|
2731
2735
|
this.ensureInitialized();
|
|
2732
2736
|
return mlWasmJSApi_default.estimatePerformance();
|
package/dist/stats.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ type LabelInspectionStatus = 'FAIL' | 'PASS';
|
|
|
3
3
|
type DeviceStats = {
|
|
4
4
|
cameraLabelInspectionStatus?: LabelInspectionStatus;
|
|
5
5
|
virtualCameraDetected?: boolean;
|
|
6
|
+
frontIdStatsAnalysisStatus?: string;
|
|
7
|
+
backIdStatsAnalysisStatus?: string;
|
|
8
|
+
selfieStatsAnalysisStatus?: string;
|
|
9
|
+
motionStatus?: string;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
8
12
|
* Sends device stats to the backend.
|
package/dist/stats.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as stopCameraStream, g as queryCameraPermission, x as requestCameraAccess } from "./src-
|
|
2
|
-
import {
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
1
|
+
import { S as stopCameraStream, g as queryCameraPermission, l as MotionSensorProvider, x as requestCameraAccess } from "./src-BEaVRVtC.esm.js";
|
|
2
|
+
import { i as getUserAgent, n as getDeviceInfo } from "./deepsightService-BqN04Xvz.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CmGlc9UG.esm.js";
|
|
4
4
|
import { t as api } from "./api-DfRLAneb.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/device/getBrowser.ts
|
|
@@ -35,11 +35,20 @@ async function checkPermission() {
|
|
|
35
35
|
return queryCameraPermission();
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
+
* Requests motion sensor permission. Must be called during a user gesture on iOS.
|
|
39
|
+
* Returns the permission result.
|
|
40
|
+
*/
|
|
41
|
+
async function requestMotionPermission() {
|
|
42
|
+
return new MotionSensorProvider().requestPermission();
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
38
45
|
* Requests camera permission by attempting to access the camera, then immediately
|
|
39
|
-
* stops the obtained stream.
|
|
46
|
+
* stops the obtained stream. Also requests motion sensor permission (required on iOS
|
|
47
|
+
* to be called during a user gesture). This function does not keep or return the stream.
|
|
40
48
|
*/
|
|
41
49
|
async function requestPermission() {
|
|
42
50
|
try {
|
|
51
|
+
await requestMotionPermission();
|
|
43
52
|
stopCameraStream(await requestCameraAccess({ video: true }));
|
|
44
53
|
return "granted";
|
|
45
54
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//#region ../infra/src/device/getBrowser.ts
|
|
2
|
-
function getUserAgent() {
|
|
3
|
-
if (typeof navigator === "undefined") return "";
|
|
4
|
-
return navigator.userAgent;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region ../infra/src/device/getDeviceClass.ts
|
|
9
|
-
function getDeviceInfo() {
|
|
10
|
-
if (typeof navigator === "undefined") return {
|
|
11
|
-
userAgent: "",
|
|
12
|
-
platform: "",
|
|
13
|
-
maxTouchPoints: 0
|
|
14
|
-
};
|
|
15
|
-
return {
|
|
16
|
-
userAgent: navigator.userAgent,
|
|
17
|
-
platform: navigator.platform,
|
|
18
|
-
maxTouchPoints: navigator.maxTouchPoints
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Gets the current window dimensions.
|
|
23
|
-
* Returns default values (1280x720) in non-browser environments.
|
|
24
|
-
*/
|
|
25
|
-
function getWindowDimensions(defaultWidth = 1280, defaultHeight = 720) {
|
|
26
|
-
if (typeof window === "undefined") return {
|
|
27
|
-
outerWidth: defaultWidth,
|
|
28
|
-
outerHeight: defaultHeight,
|
|
29
|
-
innerWidth: defaultWidth,
|
|
30
|
-
innerHeight: defaultHeight
|
|
31
|
-
};
|
|
32
|
-
return {
|
|
33
|
-
outerWidth: window.outerWidth,
|
|
34
|
-
outerHeight: window.outerHeight,
|
|
35
|
-
innerWidth: window.innerWidth,
|
|
36
|
-
innerHeight: window.innerHeight
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
export { getWindowDimensions as n, getUserAgent as r, getDeviceInfo as t };
|