@ekyc_qoobiss/qbs-ect-cmp 3.6.63 → 3.6.65
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/{TranslationUtils-fbb2c39c.js → TranslationUtils-eeb71e60.js} +15 -10
- package/dist/cjs/agreement-check_17.cjs.entry.js +135 -73
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/components/common/how-to-info/how-to-info.js +3 -17
- package/dist/collection/components/flow/process-id/process-id.js +50 -42
- package/dist/collection/components/flow/user-liveness/user-liveness.js +47 -38
- package/dist/collection/components/identification-component/identification-component.js +48 -4
- package/dist/collection/models/FlowStatus.js +15 -11
- package/dist/esm/{TranslationUtils-32c06882.js → TranslationUtils-21a568f6.js} +15 -10
- package/dist/esm/agreement-check_17.entry.js +135 -73
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/p-2735b5f4.js +1 -0
- package/dist/qbs-ect-cmp/{p-deb65af1.entry.js → p-3695074a.entry.js} +2 -2
- package/dist/qbs-ect-cmp/{p-fc771dd3.entry.js → p-4fef4884.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +1 -2
- package/dist/types/components/flow/process-id/process-id.d.ts +3 -1
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +3 -2
- package/dist/types/components.d.ts +0 -1
- package/dist/types/models/CaptureFlow.d.ts +0 -1
- package/dist/types/models/FlowStatus.d.ts +15 -10
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/p-601c9197.js +0 -1
|
@@ -210,16 +210,21 @@ exports.FlowStatus = void 0;
|
|
|
210
210
|
FlowStatus[FlowStatus["PHONE"] = 3] = "PHONE";
|
|
211
211
|
FlowStatus[FlowStatus["CODE"] = 4] = "CODE";
|
|
212
212
|
FlowStatus[FlowStatus["CODEERROR"] = 5] = "CODEERROR";
|
|
213
|
-
FlowStatus[FlowStatus["
|
|
214
|
-
FlowStatus[FlowStatus["
|
|
215
|
-
FlowStatus[FlowStatus["
|
|
216
|
-
FlowStatus[FlowStatus["
|
|
217
|
-
FlowStatus[FlowStatus["
|
|
218
|
-
FlowStatus[FlowStatus["
|
|
219
|
-
FlowStatus[FlowStatus["
|
|
220
|
-
FlowStatus[FlowStatus["
|
|
221
|
-
FlowStatus[FlowStatus["
|
|
222
|
-
FlowStatus[FlowStatus["
|
|
213
|
+
FlowStatus[FlowStatus["IDFRONTHOWTO"] = 6] = "IDFRONTHOWTO";
|
|
214
|
+
FlowStatus[FlowStatus["IDFRONT"] = 7] = "IDFRONT";
|
|
215
|
+
FlowStatus[FlowStatus["IDBACKHOWTO"] = 8] = "IDBACKHOWTO";
|
|
216
|
+
FlowStatus[FlowStatus["IDBACK"] = 9] = "IDBACK";
|
|
217
|
+
FlowStatus[FlowStatus["IDTILTHOWTO"] = 10] = "IDTILTHOWTO";
|
|
218
|
+
FlowStatus[FlowStatus["IDTILT"] = 11] = "IDTILT";
|
|
219
|
+
FlowStatus[FlowStatus["LIVENESSHOWTO"] = 12] = "LIVENESSHOWTO";
|
|
220
|
+
FlowStatus[FlowStatus["LIVENESS"] = 13] = "LIVENESS";
|
|
221
|
+
FlowStatus[FlowStatus["LIVENESSGESTUREHOWTO"] = 14] = "LIVENESSGESTUREHOWTO";
|
|
222
|
+
FlowStatus[FlowStatus["LIVENESSGESTURE"] = 15] = "LIVENESSGESTURE";
|
|
223
|
+
FlowStatus[FlowStatus["COMPLETE"] = 16] = "COMPLETE";
|
|
224
|
+
FlowStatus[FlowStatus["ERROREND"] = 17] = "ERROREND";
|
|
225
|
+
FlowStatus[FlowStatus["CAMERAERROR"] = 18] = "CAMERAERROR";
|
|
226
|
+
FlowStatus[FlowStatus["ABORTED"] = 19] = "ABORTED";
|
|
227
|
+
FlowStatus[FlowStatus["NONE"] = 20] = "NONE";
|
|
223
228
|
})(exports.FlowStatus || (exports.FlowStatus = {}));
|
|
224
229
|
|
|
225
230
|
class IdCaptureValues {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41696e0e.js');
|
|
6
|
-
const TranslationUtils = require('./TranslationUtils-
|
|
6
|
+
const TranslationUtils = require('./TranslationUtils-eeb71e60.js');
|
|
7
7
|
|
|
8
8
|
const agreementCheckCss = "";
|
|
9
9
|
|
|
@@ -4798,16 +4798,16 @@ ErrorEnd.style = errorEndCss;
|
|
|
4798
4798
|
const howToInfoCss = "";
|
|
4799
4799
|
|
|
4800
4800
|
const HowToInfo = class {
|
|
4801
|
-
constructor(hostRef) { index.registerInstance(this, hostRef); this.
|
|
4801
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
4802
4802
|
async componentDidLoad() {
|
|
4803
4803
|
await BaseComponent.initialize(this.currentStep);
|
|
4804
4804
|
}
|
|
4805
4805
|
async disconnectedCallback() {
|
|
4806
4806
|
await BaseComponent.finalize(this.currentStep);
|
|
4807
4807
|
}
|
|
4808
|
-
buttonClick() {
|
|
4808
|
+
async buttonClick() {
|
|
4809
4809
|
this.buttonEnabled = false;
|
|
4810
|
-
|
|
4810
|
+
TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.GetNextFlowState();
|
|
4811
4811
|
}
|
|
4812
4812
|
async componentWillLoad() {
|
|
4813
4813
|
this.translations = await TranslationUtils.Translations.getValues();
|
|
@@ -5208,7 +5208,7 @@ function v4(options, buf, offset) {
|
|
|
5208
5208
|
}
|
|
5209
5209
|
|
|
5210
5210
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5211
|
-
const version$1 = "3.6.
|
|
5211
|
+
const version$1 = "3.6.65";
|
|
5212
5212
|
const description = "Person Identification Component";
|
|
5213
5213
|
const main = "./dist/index.cjs.js";
|
|
5214
5214
|
const module$1 = "./dist/index.js";
|
|
@@ -5538,11 +5538,55 @@ const IdentificationComponent = class {
|
|
|
5538
5538
|
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
|
|
5539
5539
|
currentBlock = index.h("sms-code-validation", null);
|
|
5540
5540
|
}
|
|
5541
|
-
else if (
|
|
5542
|
-
|
|
5541
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONTHOWTO) {
|
|
5542
|
+
if (TranslationUtils.state.debug)
|
|
5543
|
+
console.log('identification-component | render | IDFRONTHOWTO');
|
|
5544
|
+
currentBlock = index.h("how-to-info", null);
|
|
5545
|
+
}
|
|
5546
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
|
|
5547
|
+
if (TranslationUtils.state.debug)
|
|
5548
|
+
console.log('identification-component | render | IDFRONT');
|
|
5549
|
+
currentBlock = index.h("process-id", { id: "processIdFront", mode: "front" });
|
|
5550
|
+
}
|
|
5551
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACKHOWTO) {
|
|
5552
|
+
if (TranslationUtils.state.debug)
|
|
5553
|
+
console.log('identification-component | render | IDBACKHOWTO');
|
|
5554
|
+
currentBlock = index.h("how-to-info", null);
|
|
5555
|
+
}
|
|
5556
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
|
|
5557
|
+
if (TranslationUtils.state.debug)
|
|
5558
|
+
console.log('identification-component | render | IDBACK');
|
|
5559
|
+
currentBlock = index.h("process-id", { id: "processIdBack", mode: "back" });
|
|
5560
|
+
}
|
|
5561
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILTHOWTO) {
|
|
5562
|
+
if (TranslationUtils.state.debug)
|
|
5563
|
+
console.log('identification-component | render | IDTILTHOWTO');
|
|
5564
|
+
currentBlock = index.h("how-to-info", null);
|
|
5565
|
+
}
|
|
5566
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILT) {
|
|
5567
|
+
if (TranslationUtils.state.debug)
|
|
5568
|
+
console.log('identification-component | render | TILT');
|
|
5569
|
+
currentBlock = index.h("process-id", { id: "processIdTilt", mode: "tilt" });
|
|
5570
|
+
}
|
|
5571
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSHOWTO) {
|
|
5572
|
+
if (TranslationUtils.state.debug)
|
|
5573
|
+
console.log('identification-component | render | LIVENESSHOWTO');
|
|
5574
|
+
currentBlock = index.h("how-to-info", null);
|
|
5575
|
+
}
|
|
5576
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
|
|
5577
|
+
if (TranslationUtils.state.debug)
|
|
5578
|
+
console.log('identification-component | render | LIVENESS');
|
|
5579
|
+
currentBlock = index.h("user-liveness", { id: "userLiveness", mode: "selfie" });
|
|
5580
|
+
}
|
|
5581
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTUREHOWTO) {
|
|
5582
|
+
if (TranslationUtils.state.debug)
|
|
5583
|
+
console.log('identification-component | render | LIVENESSGESTUREHOWTO');
|
|
5584
|
+
currentBlock = index.h("how-to-info", null);
|
|
5543
5585
|
}
|
|
5544
|
-
else if (
|
|
5545
|
-
|
|
5586
|
+
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTURE) {
|
|
5587
|
+
if (TranslationUtils.state.debug)
|
|
5588
|
+
console.log('identification-component | render | LIVENESSGESTURE');
|
|
5589
|
+
currentBlock = index.h("user-liveness", { id: "userLivenessGesture", mode: "selfieGesture" });
|
|
5546
5590
|
}
|
|
5547
5591
|
else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.COMPLETE) {
|
|
5548
5592
|
if (TranslationUtils.state.debug)
|
|
@@ -8627,45 +8671,33 @@ const ProcessId = class {
|
|
|
8627
8671
|
if (this.mode == 'front') {
|
|
8628
8672
|
this.currentStep = TranslationUtils.FlowSteps.CiFront;
|
|
8629
8673
|
this.flow = {
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
recType: CaptureUploadTypes.IdFrontVideo,
|
|
8635
|
-
},
|
|
8636
|
-
howToDone: false,
|
|
8674
|
+
fileName: 'idImage.png',
|
|
8675
|
+
recName: 'idVideo.',
|
|
8676
|
+
photoType: CaptureUploadTypes.IdFront,
|
|
8677
|
+
recType: CaptureUploadTypes.IdFrontVideo,
|
|
8637
8678
|
};
|
|
8638
8679
|
}
|
|
8639
8680
|
else if (this.mode == 'back') {
|
|
8640
8681
|
this.currentStep = TranslationUtils.FlowSteps.CiBack;
|
|
8641
8682
|
this.flow = {
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
recType: CaptureUploadTypes.IdBackVideo,
|
|
8647
|
-
},
|
|
8648
|
-
howToDone: false,
|
|
8683
|
+
fileName: 'idBackImage.png',
|
|
8684
|
+
recName: 'idBackVideo.',
|
|
8685
|
+
photoType: CaptureUploadTypes.IdBack,
|
|
8686
|
+
recType: CaptureUploadTypes.IdBackVideo,
|
|
8649
8687
|
};
|
|
8650
8688
|
}
|
|
8651
8689
|
else if (this.mode == 'tilt') {
|
|
8652
8690
|
this.currentStep = TranslationUtils.FlowSteps.CiTilt;
|
|
8653
8691
|
this.flow = {
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
recType: CaptureUploadTypes.TiltVideo,
|
|
8659
|
-
},
|
|
8660
|
-
howToDone: false,
|
|
8692
|
+
fileName: 'idTiltImage.png',
|
|
8693
|
+
recName: 'idTiltVideo.',
|
|
8694
|
+
photoType: CaptureUploadTypes.None,
|
|
8695
|
+
recType: CaptureUploadTypes.TiltVideo,
|
|
8661
8696
|
};
|
|
8662
8697
|
}
|
|
8663
8698
|
if (TranslationUtils.state.debug)
|
|
8664
8699
|
console.log('process-id | initFlow');
|
|
8665
8700
|
}
|
|
8666
|
-
howToDone() {
|
|
8667
|
-
this.flow.howToDone = true;
|
|
8668
|
-
}
|
|
8669
8701
|
timeElapsed() {
|
|
8670
8702
|
this.errorReason = 'Timeout';
|
|
8671
8703
|
this.showTimeout = true;
|
|
@@ -8692,8 +8724,8 @@ const ProcessId = class {
|
|
|
8692
8724
|
return;
|
|
8693
8725
|
}
|
|
8694
8726
|
try {
|
|
8695
|
-
let frontCapture = new File([idPhoto], this.flow.
|
|
8696
|
-
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.
|
|
8727
|
+
let frontCapture = new File([idPhoto], this.flow.fileName, { type: 'image/png' });
|
|
8728
|
+
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.photoType, frontCapture);
|
|
8697
8729
|
if (TranslationUtils.state.debug)
|
|
8698
8730
|
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
8699
8731
|
if (uploadResult.isValid) {
|
|
@@ -8724,8 +8756,8 @@ const ProcessId = class {
|
|
|
8724
8756
|
return;
|
|
8725
8757
|
}
|
|
8726
8758
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
8727
|
-
let captureRec = new File([idRecording], this.flow.
|
|
8728
|
-
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.
|
|
8759
|
+
let captureRec = new File([idRecording], this.flow.recName + mimeType.extension, { type: mimeType.type });
|
|
8760
|
+
var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.recType, captureRec);
|
|
8729
8761
|
if (TranslationUtils.state.debug)
|
|
8730
8762
|
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
8731
8763
|
if (uploadResult.saved) {
|
|
@@ -8736,6 +8768,32 @@ const ProcessId = class {
|
|
|
8736
8768
|
}
|
|
8737
8769
|
this.recordingResultCount = 0;
|
|
8738
8770
|
}
|
|
8771
|
+
async verificationFinished() {
|
|
8772
|
+
if (TranslationUtils.state.debug)
|
|
8773
|
+
console.log('process-id | verificationFinished');
|
|
8774
|
+
this.verificationReceived = Date.now();
|
|
8775
|
+
let initialStatus = TranslationUtils.state.flowStatus;
|
|
8776
|
+
let statusChanged = false;
|
|
8777
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
8778
|
+
await delay(2000);
|
|
8779
|
+
statusChanged = initialStatus != TranslationUtils.state.flowStatus;
|
|
8780
|
+
}
|
|
8781
|
+
if (!statusChanged) {
|
|
8782
|
+
let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
|
|
8783
|
+
if (currentStatus != TranslationUtils.state.flowStatus) {
|
|
8784
|
+
TranslationUtils.state.flowStatus = currentStatus;
|
|
8785
|
+
}
|
|
8786
|
+
else {
|
|
8787
|
+
this.triggerUploadFailedFlow();
|
|
8788
|
+
}
|
|
8789
|
+
}
|
|
8790
|
+
if (TranslationUtils.state.debug)
|
|
8791
|
+
console.log('process-id | verificationFinished | waitingFinished ');
|
|
8792
|
+
}
|
|
8793
|
+
triggerUploadFailedFlow() {
|
|
8794
|
+
this.errorReason = 'Upload Failed';
|
|
8795
|
+
this.showInvalid = true;
|
|
8796
|
+
}
|
|
8739
8797
|
async componentDidLoad() {
|
|
8740
8798
|
if (TranslationUtils.state.debug)
|
|
8741
8799
|
console.log('process-id | componentDidLoad');
|
|
@@ -8764,16 +8822,10 @@ const ProcessId = class {
|
|
|
8764
8822
|
render() {
|
|
8765
8823
|
let error = index.h("capture-error", { type: "ID", reason: this.errorReason });
|
|
8766
8824
|
let capture = index.h("id-capture", null);
|
|
8767
|
-
let howTo = index.h("how-to-info", null);
|
|
8768
8825
|
if (this.showInvalid || this.showTimeout) {
|
|
8769
8826
|
return error;
|
|
8770
8827
|
}
|
|
8771
|
-
|
|
8772
|
-
return howTo;
|
|
8773
|
-
}
|
|
8774
|
-
else {
|
|
8775
|
-
return capture;
|
|
8776
|
-
}
|
|
8828
|
+
return capture;
|
|
8777
8829
|
}
|
|
8778
8830
|
};
|
|
8779
8831
|
ProcessId.style = processIdCss;
|
|
@@ -9003,38 +9055,28 @@ const UserLiveness = class {
|
|
|
9003
9055
|
this.showError = undefined;
|
|
9004
9056
|
this.showTimeout = undefined;
|
|
9005
9057
|
this.flow = undefined;
|
|
9006
|
-
this.howToDone = false;
|
|
9007
9058
|
}
|
|
9008
9059
|
async componentDidLoad() { }
|
|
9009
9060
|
componentWillLoad() {
|
|
9010
9061
|
if (this.mode == 'selfie') {
|
|
9011
9062
|
this.currentStep = TranslationUtils.FlowSteps.Selfie;
|
|
9012
9063
|
this.flow = {
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
recType: CaptureUploadTypes.SelfieVideo,
|
|
9018
|
-
},
|
|
9019
|
-
howToDone: false,
|
|
9064
|
+
fileName: 'selfie.png',
|
|
9065
|
+
recName: 'selfieVideo.',
|
|
9066
|
+
photoType: CaptureUploadTypes.Selfie,
|
|
9067
|
+
recType: CaptureUploadTypes.SelfieVideo,
|
|
9020
9068
|
};
|
|
9021
9069
|
}
|
|
9022
9070
|
else if (this.mode == 'selfieGesture') {
|
|
9023
9071
|
this.currentStep = TranslationUtils.FlowSteps.SelfieTilt;
|
|
9024
9072
|
this.flow = {
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
recType: CaptureUploadTypes.SelfieGestureVideo,
|
|
9030
|
-
},
|
|
9031
|
-
howToDone: false,
|
|
9073
|
+
fileName: '',
|
|
9074
|
+
recName: 'selfieTiltVideo.',
|
|
9075
|
+
photoType: CaptureUploadTypes.None,
|
|
9076
|
+
recType: CaptureUploadTypes.SelfieGestureVideo,
|
|
9032
9077
|
};
|
|
9033
9078
|
}
|
|
9034
9079
|
}
|
|
9035
|
-
howToDoneEvent() {
|
|
9036
|
-
this.howToDone = true;
|
|
9037
|
-
}
|
|
9038
9080
|
timeElapsed() {
|
|
9039
9081
|
this.errorReason = 'Timeout';
|
|
9040
9082
|
this.showTimeout = true;
|
|
@@ -9057,8 +9099,8 @@ const UserLiveness = class {
|
|
|
9057
9099
|
return;
|
|
9058
9100
|
}
|
|
9059
9101
|
try {
|
|
9060
|
-
var uploadPhoto = new File([selfiePhoto], this.flow.
|
|
9061
|
-
let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.
|
|
9102
|
+
var uploadPhoto = new File([selfiePhoto], this.flow.fileName, { type: 'image/png' });
|
|
9103
|
+
let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.photoType, uploadPhoto);
|
|
9062
9104
|
if (photoUploaded.isValid) {
|
|
9063
9105
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[photoUploaded.state];
|
|
9064
9106
|
}
|
|
@@ -9084,8 +9126,8 @@ const UserLiveness = class {
|
|
|
9084
9126
|
}
|
|
9085
9127
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9086
9128
|
try {
|
|
9087
|
-
let uploadRec = new File([selfieRecording], this.flow.
|
|
9088
|
-
let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.
|
|
9129
|
+
let uploadRec = new File([selfieRecording], this.flow.recName + mimeType.extension, { type: mimeType.type });
|
|
9130
|
+
let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.recType, uploadRec);
|
|
9089
9131
|
if (uplodDone.saved) {
|
|
9090
9132
|
TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[uplodDone.state];
|
|
9091
9133
|
}
|
|
@@ -9103,6 +9145,32 @@ const UserLiveness = class {
|
|
|
9103
9145
|
}
|
|
9104
9146
|
}
|
|
9105
9147
|
}
|
|
9148
|
+
async verificationFinished() {
|
|
9149
|
+
if (TranslationUtils.state.debug)
|
|
9150
|
+
console.log('user-liveness | verificationFinished');
|
|
9151
|
+
this.verificationReceived = Date.now();
|
|
9152
|
+
let initialStatus = TranslationUtils.state.flowStatus;
|
|
9153
|
+
let statusChanged = false;
|
|
9154
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
9155
|
+
await delay(2000);
|
|
9156
|
+
statusChanged = initialStatus != TranslationUtils.state.flowStatus;
|
|
9157
|
+
}
|
|
9158
|
+
if (!statusChanged) {
|
|
9159
|
+
let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
|
|
9160
|
+
if (currentStatus != TranslationUtils.state.flowStatus) {
|
|
9161
|
+
TranslationUtils.state.flowStatus = currentStatus;
|
|
9162
|
+
}
|
|
9163
|
+
else {
|
|
9164
|
+
this.triggerUploadFailedFlow();
|
|
9165
|
+
}
|
|
9166
|
+
}
|
|
9167
|
+
if (TranslationUtils.state.debug)
|
|
9168
|
+
console.log('user-liveness | verificationFinished | waitingFinished ');
|
|
9169
|
+
}
|
|
9170
|
+
triggerUploadFailedFlow() {
|
|
9171
|
+
this.errorReason = 'Upload Failed';
|
|
9172
|
+
this.showError = true;
|
|
9173
|
+
}
|
|
9106
9174
|
async disconnectedCallback() {
|
|
9107
9175
|
await BaseComponent.finalize(this.currentStep);
|
|
9108
9176
|
}
|
|
@@ -9111,18 +9179,12 @@ const UserLiveness = class {
|
|
|
9111
9179
|
this.showError = true;
|
|
9112
9180
|
}
|
|
9113
9181
|
render() {
|
|
9114
|
-
let howTo = index.h("how-to-info", null);
|
|
9115
9182
|
let capture = index.h("selfie-capture", null);
|
|
9116
9183
|
let error = index.h("capture-error", { type: "LIVENESS", reason: this.errorReason });
|
|
9117
9184
|
if (this.showError || this.showTimeout) {
|
|
9118
9185
|
return error;
|
|
9119
9186
|
}
|
|
9120
|
-
|
|
9121
|
-
return capture;
|
|
9122
|
-
}
|
|
9123
|
-
else {
|
|
9124
|
-
return howTo;
|
|
9125
|
-
}
|
|
9187
|
+
return capture;
|
|
9126
9188
|
}
|
|
9127
9189
|
};
|
|
9128
9190
|
UserLiveness.style = userLivenessCss;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"
|
|
17
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32]},[[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32]},[[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"how-to-info",{"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41696e0e.js');
|
|
6
|
-
const TranslationUtils = require('./TranslationUtils-
|
|
6
|
+
const TranslationUtils = require('./TranslationUtils-eeb71e60.js');
|
|
7
7
|
|
|
8
8
|
const randomActionsCss = "";
|
|
9
9
|
|
|
@@ -4,6 +4,7 @@ import { FlowStatus } from '../../../models/FlowStatus';
|
|
|
4
4
|
import { BaseComponent } from '../../base-component';
|
|
5
5
|
import { FlowSteps } from '../../../models/FlowSteps';
|
|
6
6
|
import { Translations } from '../../../helpers/TranslationUtils';
|
|
7
|
+
import { ApiCall } from '../../../helpers/ApiCall';
|
|
7
8
|
export class HowToInfo {
|
|
8
9
|
constructor() { this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
|
|
9
10
|
async componentDidLoad() {
|
|
@@ -12,9 +13,9 @@ export class HowToInfo {
|
|
|
12
13
|
async disconnectedCallback() {
|
|
13
14
|
await BaseComponent.finalize(this.currentStep);
|
|
14
15
|
}
|
|
15
|
-
buttonClick() {
|
|
16
|
+
async buttonClick() {
|
|
16
17
|
this.buttonEnabled = false;
|
|
17
|
-
|
|
18
|
+
store.flowStatus = await ApiCall.instance.GetNextFlowState();
|
|
18
19
|
}
|
|
19
20
|
async componentWillLoad() {
|
|
20
21
|
this.translations = await Translations.getValues();
|
|
@@ -65,21 +66,6 @@ export class HowToInfo {
|
|
|
65
66
|
}
|
|
66
67
|
static get events() {
|
|
67
68
|
return [{
|
|
68
|
-
"method": "eventHowToInfoDone",
|
|
69
|
-
"name": "howToInfoDone",
|
|
70
|
-
"bubbles": true,
|
|
71
|
-
"cancelable": true,
|
|
72
|
-
"composed": true,
|
|
73
|
-
"docs": {
|
|
74
|
-
"tags": [],
|
|
75
|
-
"text": ""
|
|
76
|
-
},
|
|
77
|
-
"complexType": {
|
|
78
|
-
"original": "any",
|
|
79
|
-
"resolved": "any",
|
|
80
|
-
"references": {}
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
69
|
"method": "apiErrorEvent",
|
|
84
70
|
"name": "apiError",
|
|
85
71
|
"bubbles": true,
|
|
@@ -3,7 +3,7 @@ import store from '../../../helpers/store';
|
|
|
3
3
|
import { Stream } from '../../../helpers/Stream';
|
|
4
4
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
5
|
import { FlowSteps } from '../../../models/FlowSteps';
|
|
6
|
-
import { getLogMessage } from '../../../utils/utils';
|
|
6
|
+
import { delay, getLogMessage } from '../../../utils/utils';
|
|
7
7
|
import { BaseComponent } from '../../base-component';
|
|
8
8
|
import { CaptureUploadTypes } from '../../../models/CaptureFlow';
|
|
9
9
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
@@ -25,45 +25,33 @@ export class ProcessId {
|
|
|
25
25
|
if (this.mode == 'front') {
|
|
26
26
|
this.currentStep = FlowSteps.CiFront;
|
|
27
27
|
this.flow = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
recType: CaptureUploadTypes.IdFrontVideo,
|
|
33
|
-
},
|
|
34
|
-
howToDone: false,
|
|
28
|
+
fileName: 'idImage.png',
|
|
29
|
+
recName: 'idVideo.',
|
|
30
|
+
photoType: CaptureUploadTypes.IdFront,
|
|
31
|
+
recType: CaptureUploadTypes.IdFrontVideo,
|
|
35
32
|
};
|
|
36
33
|
}
|
|
37
34
|
else if (this.mode == 'back') {
|
|
38
35
|
this.currentStep = FlowSteps.CiBack;
|
|
39
36
|
this.flow = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
recType: CaptureUploadTypes.IdBackVideo,
|
|
45
|
-
},
|
|
46
|
-
howToDone: false,
|
|
37
|
+
fileName: 'idBackImage.png',
|
|
38
|
+
recName: 'idBackVideo.',
|
|
39
|
+
photoType: CaptureUploadTypes.IdBack,
|
|
40
|
+
recType: CaptureUploadTypes.IdBackVideo,
|
|
47
41
|
};
|
|
48
42
|
}
|
|
49
43
|
else if (this.mode == 'tilt') {
|
|
50
44
|
this.currentStep = FlowSteps.CiTilt;
|
|
51
45
|
this.flow = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
recType: CaptureUploadTypes.TiltVideo,
|
|
57
|
-
},
|
|
58
|
-
howToDone: false,
|
|
46
|
+
fileName: 'idTiltImage.png',
|
|
47
|
+
recName: 'idTiltVideo.',
|
|
48
|
+
photoType: CaptureUploadTypes.None,
|
|
49
|
+
recType: CaptureUploadTypes.TiltVideo,
|
|
59
50
|
};
|
|
60
51
|
}
|
|
61
52
|
if (store.debug)
|
|
62
53
|
console.log('process-id | initFlow');
|
|
63
54
|
}
|
|
64
|
-
howToDone() {
|
|
65
|
-
this.flow.howToDone = true;
|
|
66
|
-
}
|
|
67
55
|
timeElapsed() {
|
|
68
56
|
this.errorReason = 'Timeout';
|
|
69
57
|
this.showTimeout = true;
|
|
@@ -90,8 +78,8 @@ export class ProcessId {
|
|
|
90
78
|
return;
|
|
91
79
|
}
|
|
92
80
|
try {
|
|
93
|
-
let frontCapture = new File([idPhoto], this.flow.
|
|
94
|
-
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.
|
|
81
|
+
let frontCapture = new File([idPhoto], this.flow.fileName, { type: 'image/png' });
|
|
82
|
+
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.photoType, frontCapture);
|
|
95
83
|
if (store.debug)
|
|
96
84
|
console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
|
|
97
85
|
if (uploadResult.isValid) {
|
|
@@ -122,8 +110,8 @@ export class ProcessId {
|
|
|
122
110
|
return;
|
|
123
111
|
}
|
|
124
112
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
125
|
-
let captureRec = new File([idRecording], this.flow.
|
|
126
|
-
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.
|
|
113
|
+
let captureRec = new File([idRecording], this.flow.recName + mimeType.extension, { type: mimeType.type });
|
|
114
|
+
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(store.requestId, this.flow.recType, captureRec);
|
|
127
115
|
if (store.debug)
|
|
128
116
|
console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
|
|
129
117
|
if (uploadResult.saved) {
|
|
@@ -134,6 +122,32 @@ export class ProcessId {
|
|
|
134
122
|
}
|
|
135
123
|
this.recordingResultCount = 0;
|
|
136
124
|
}
|
|
125
|
+
async verificationFinished() {
|
|
126
|
+
if (store.debug)
|
|
127
|
+
console.log('process-id | verificationFinished');
|
|
128
|
+
this.verificationReceived = Date.now();
|
|
129
|
+
let initialStatus = store.flowStatus;
|
|
130
|
+
let statusChanged = false;
|
|
131
|
+
while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
|
|
132
|
+
await delay(2000);
|
|
133
|
+
statusChanged = initialStatus != store.flowStatus;
|
|
134
|
+
}
|
|
135
|
+
if (!statusChanged) {
|
|
136
|
+
let currentStatus = await ApiCall.instance.GetFlowState();
|
|
137
|
+
if (currentStatus != store.flowStatus) {
|
|
138
|
+
store.flowStatus = currentStatus;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.triggerUploadFailedFlow();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (store.debug)
|
|
145
|
+
console.log('process-id | verificationFinished | waitingFinished ');
|
|
146
|
+
}
|
|
147
|
+
triggerUploadFailedFlow() {
|
|
148
|
+
this.errorReason = 'Upload Failed';
|
|
149
|
+
this.showInvalid = true;
|
|
150
|
+
}
|
|
137
151
|
async componentDidLoad() {
|
|
138
152
|
if (store.debug)
|
|
139
153
|
console.log('process-id | componentDidLoad');
|
|
@@ -162,16 +176,10 @@ export class ProcessId {
|
|
|
162
176
|
render() {
|
|
163
177
|
let error = h("capture-error", { type: "ID", reason: this.errorReason });
|
|
164
178
|
let capture = h("id-capture", null);
|
|
165
|
-
let howTo = h("how-to-info", null);
|
|
166
179
|
if (this.showInvalid || this.showTimeout) {
|
|
167
180
|
return error;
|
|
168
181
|
}
|
|
169
|
-
|
|
170
|
-
return howTo;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
return capture;
|
|
174
|
-
}
|
|
182
|
+
return capture;
|
|
175
183
|
}
|
|
176
184
|
static get is() { return "process-id"; }
|
|
177
185
|
static get originalStyleUrls() {
|
|
@@ -232,12 +240,6 @@ export class ProcessId {
|
|
|
232
240
|
}
|
|
233
241
|
static get listeners() {
|
|
234
242
|
return [{
|
|
235
|
-
"name": "howToInfoDone",
|
|
236
|
-
"method": "howToDone",
|
|
237
|
-
"target": undefined,
|
|
238
|
-
"capture": false,
|
|
239
|
-
"passive": false
|
|
240
|
-
}, {
|
|
241
243
|
"name": "timeElapsed",
|
|
242
244
|
"method": "timeElapsed",
|
|
243
245
|
"target": undefined,
|
|
@@ -261,6 +263,12 @@ export class ProcessId {
|
|
|
261
263
|
"target": undefined,
|
|
262
264
|
"capture": false,
|
|
263
265
|
"passive": false
|
|
266
|
+
}, {
|
|
267
|
+
"name": "verificationFinished",
|
|
268
|
+
"method": "verificationFinished",
|
|
269
|
+
"target": undefined,
|
|
270
|
+
"capture": false,
|
|
271
|
+
"passive": false
|
|
264
272
|
}];
|
|
265
273
|
}
|
|
266
274
|
}
|