@ekyc_qoobiss/qbs-ect-cmp 3.6.7 → 3.6.11
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/cjs/Stream-7793cdf8.js +5352 -0
- package/dist/cjs/agreement-check_18.cjs.entry.js +763 -6009
- package/dist/cjs/id-double-side.cjs.entry.js +208 -0
- package/dist/cjs/id-single-side.cjs.entry.js +147 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +4 -19
- package/dist/collection/components/common/id-capture/id-capture.js +4 -19
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/collection/components/common/id-tilt/id-tilt.js +194 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -3
- package/dist/collection/components/controls/camera/camera.js +3 -1
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/collection/components/flow/process-id/process-id.js +375 -0
- package/dist/collection/components/identification-component/identification-component.js +2 -5
- package/dist/collection/helpers/ApiCall.js +2 -0
- package/dist/collection/helpers/Stream.js +10 -8
- package/dist/collection/helpers/store.js +2 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +12 -12
- package/dist/collection/models/CaptureFlow.js +16 -0
- package/dist/collection/models/FlowSteps.js +1 -0
- package/dist/collection/models/IRecordingCallback.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/esm/Stream-b0b71a36.js +5328 -0
- package/dist/esm/agreement-check_18.entry.js +446 -5692
- package/dist/esm/id-double-side.entry.js +204 -0
- package/dist/esm/id-single-side.entry.js +143 -0
- package/dist/esm/{index-9d69e511.js → index-5d6f9123.js} +1 -1
- package/dist/esm/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qbs-ect-cmp.js +3 -3
- package/dist/qbs-ect-cmp/{p-4c8e922b.entry.js → p-7c33dd41.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-06e42b28.js → p-aacd7024.js} +1 -1
- package/dist/qbs-ect-cmp/{p-3083aa5e.entry.js → p-acd71227.js} +26 -26
- package/dist/qbs-ect-cmp/p-bbc70bcf.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-c429f75a.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-f6c2922f.entry.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/id-tilt/id-tilt.d.ts +26 -0
- package/dist/types/components/controls/camera/camera.d.ts +3 -2
- package/dist/types/components/flow/process-id/process-id.d.ts +28 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/helpers/Stream.d.ts +5 -2
- package/dist/types/libs/IDML5Detector/IDML5Detector.d.ts +4 -3
- package/dist/types/models/CaptureFlow.d.ts +29 -0
- package/dist/types/models/FlowSteps.d.ts +1 -0
- package/dist/types/models/IAddRequest.d.ts +2 -0
- package/dist/types/models/IEctStore.d.ts +2 -0
- package/dist/types/models/IRecordingCallback.d.ts +4 -0
- package/dist/types/models/IVerificationMode.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ML5 } from '../../helpers/ML5';
|
|
2
|
-
import { IDPose } from './IDPose';
|
|
3
|
-
import { GlobalValues } from '../../helpers/textValues';
|
|
4
2
|
// @ts-ignore
|
|
5
3
|
import id_white_svg from '../../assets/canvas-masks/id_white.svg';
|
|
6
4
|
// @ts-ignore
|
|
7
5
|
import id_green_svg from '../../assets/canvas-masks/id_green.svg';
|
|
8
6
|
import { delay } from '../../utils/utils';
|
|
7
|
+
import { VerificationMode } from '../../models/IVerificationMode';
|
|
9
8
|
export class IDML5Detector {
|
|
10
9
|
static getInstance(stream, isMobile) {
|
|
11
10
|
if (!IDML5Detector.instance) {
|
|
@@ -16,8 +15,7 @@ export class IDML5Detector {
|
|
|
16
15
|
constructor(stream, _isMobile) {
|
|
17
16
|
this.MAX_DETECTION = 1000 * 25;
|
|
18
17
|
this.initTime = null;
|
|
19
|
-
this.
|
|
20
|
-
this.tilted = 0;
|
|
18
|
+
this.checked = false;
|
|
21
19
|
this.start = null;
|
|
22
20
|
this.stream = stream;
|
|
23
21
|
this.ml5 = ML5.getInstance();
|
|
@@ -27,16 +25,20 @@ export class IDML5Detector {
|
|
|
27
25
|
this.canvasElement = canvasElement;
|
|
28
26
|
// this.component = component;
|
|
29
27
|
}
|
|
30
|
-
initDetector() {
|
|
28
|
+
initDetector(mode) {
|
|
31
29
|
this.initTime = Date.now();
|
|
32
30
|
this.continue = true;
|
|
31
|
+
if (mode == VerificationMode.Full)
|
|
32
|
+
this.targetedLabel = 'full';
|
|
33
|
+
else
|
|
34
|
+
this.targetedLabel = 'tilted';
|
|
33
35
|
// this.width = this.videoElement.videoWidth;
|
|
34
36
|
// this.height = this.videoElement.videoHeight;
|
|
35
37
|
this.drawFrame('white');
|
|
36
38
|
delay(2000).then(() => this.classifyVideo());
|
|
37
39
|
}
|
|
38
40
|
classifyVideo() {
|
|
39
|
-
if (this.
|
|
41
|
+
if (this.checked) {
|
|
40
42
|
if (this.start == null)
|
|
41
43
|
this.start = Date.now();
|
|
42
44
|
if (Date.now() > this.start + 500) {
|
|
@@ -57,15 +59,13 @@ export class IDML5Detector {
|
|
|
57
59
|
this.stream.timeElapsed();
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
60
|
-
if (results[0].label ==
|
|
61
|
-
this.
|
|
62
|
+
if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
|
|
63
|
+
this.checked = true;
|
|
62
64
|
this.stream.autoCapturing();
|
|
63
65
|
await this.drawFrame('green');
|
|
64
|
-
this.stream.changeIDPose(IDPose.Tilted);
|
|
65
|
-
await delay(GlobalValues.VideoLenght);
|
|
66
66
|
}
|
|
67
|
-
if (results[0].label ==
|
|
68
|
-
this.
|
|
67
|
+
if (results[0].label == this.targetedLabel && results[0].confidence > 0.8 && !this.checked) {
|
|
68
|
+
this.checked = true;
|
|
69
69
|
await this.drawFrame('green');
|
|
70
70
|
}
|
|
71
71
|
this.classifyVideo();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var CaptureUploadTypes;
|
|
2
|
+
(function (CaptureUploadTypes) {
|
|
3
|
+
CaptureUploadTypes["IdFront"] = "IdFront";
|
|
4
|
+
CaptureUploadTypes["IdBack"] = "IdBack";
|
|
5
|
+
CaptureUploadTypes["IdFrontVideo"] = "IdFrontVideo";
|
|
6
|
+
CaptureUploadTypes["None"] = "None";
|
|
7
|
+
})(CaptureUploadTypes || (CaptureUploadTypes = {}));
|
|
8
|
+
export var CaptureFlowStatus;
|
|
9
|
+
(function (CaptureFlowStatus) {
|
|
10
|
+
CaptureFlowStatus[CaptureFlowStatus["HowToFront"] = 0] = "HowToFront";
|
|
11
|
+
CaptureFlowStatus[CaptureFlowStatus["IdFront"] = 1] = "IdFront";
|
|
12
|
+
CaptureFlowStatus[CaptureFlowStatus["HowToBack"] = 2] = "HowToBack";
|
|
13
|
+
CaptureFlowStatus[CaptureFlowStatus["IdBack"] = 3] = "IdBack";
|
|
14
|
+
CaptureFlowStatus[CaptureFlowStatus["Tilt"] = 4] = "Tilt";
|
|
15
|
+
CaptureFlowStatus[CaptureFlowStatus["End"] = 5] = "End";
|
|
16
|
+
})(CaptureFlowStatus || (CaptureFlowStatus = {}));
|
|
@@ -16,6 +16,7 @@ export var FlowSteps;
|
|
|
16
16
|
FlowSteps[FlowSteps["CiBackHoldAnimation"] = 'ci-back-hold-animation'] = "CiBackHoldAnimation";
|
|
17
17
|
FlowSteps[FlowSteps["CiBackTiltAnimation"] = 'ci-back-tilt-animation'] = "CiBackTiltAnimation";
|
|
18
18
|
FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
|
|
19
|
+
FlowSteps[FlowSteps["CiTilt"] = 'ci-tilt'] = "CiTilt";
|
|
19
20
|
FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
|
|
20
21
|
FlowSteps[FlowSteps["SelfieHoldAnimation"] = 'selfie-hold-animation'] = "SelfieHoldAnimation";
|
|
21
22
|
FlowSteps[FlowSteps["SelfieTiltAnimation"] = 'selfie-tilt-animation'] = "SelfieTiltAnimation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|