@ekyc_qoobiss/qbs-ect-cmp 3.6.12 → 3.6.14

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.
@@ -594,7 +594,7 @@ class ApiCall {
594
594
  state.requestId = jsonResp.requestId;
595
595
  }
596
596
  state.hasIdBack = jsonResp.hasIdBack;
597
- state.hasSelfieGesture = jsonResp.hasIdTilt;
597
+ state.hasIdTilt = jsonResp.hasIdTilt;
598
598
  state.hasSelfieGesture = jsonResp.hasSelfieGesture;
599
599
  state.agreementsValidation = jsonResp.agreementsValidation;
600
600
  state.phoneValidation = jsonResp.phoneValidation;
@@ -5239,11 +5239,10 @@ class Stream {
5239
5239
  this.recordedChunks.push(event.data);
5240
5240
  };
5241
5241
  this.mediaRecorder.onstop = _e => {
5242
- var resp = {
5243
- RecordingChunks: this.recordedChunks,
5244
- MimeType: options.mimeType,
5245
- };
5246
- this.callbackRecordingReady(resp);
5242
+ var rec = new Blob(this.recordedChunks, {
5243
+ type: options.mimeType.split(';')[0],
5244
+ });
5245
+ this.callbackRecordingReady(rec);
5247
5246
  };
5248
5247
  this.mediaRecorder.start(); // Start recording, and dump data every second
5249
5248
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-79f82518.js');
6
- const Stream = require('./Stream-f03c722d.js');
6
+ const Stream = require('./Stream-097bd1e9.js');
7
7
 
8
8
  const agreementCheckCss = "";
9
9
 
@@ -896,7 +896,7 @@ function v4(options, buf, offset) {
896
896
  }
897
897
 
898
898
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
899
- const version$1 = "3.6.12";
899
+ const version$1 = "3.6.14";
900
900
  const description = "Person Identification Component";
901
901
  const main = "./dist/index.cjs.js";
902
902
  const module$1 = "./dist/index.js";
@@ -4304,6 +4304,10 @@ var CaptureUploadTypes;
4304
4304
  CaptureUploadTypes["IdFront"] = "IdFront";
4305
4305
  CaptureUploadTypes["IdBack"] = "IdBack";
4306
4306
  CaptureUploadTypes["IdFrontVideo"] = "IdFrontVideo";
4307
+ CaptureUploadTypes["IdBackVideo"] = "IdBackVideo";
4308
+ CaptureUploadTypes["SelfieVideo"] = "SelfieVideo";
4309
+ CaptureUploadTypes["SelfieGestureVideo"] = "SelfieGestureVideo";
4310
+ CaptureUploadTypes["TiltVideo"] = "TiltVideo";
4307
4311
  CaptureUploadTypes["None"] = "None";
4308
4312
  })(CaptureUploadTypes || (CaptureUploadTypes = {}));
4309
4313
  var CaptureFlowStatus;
@@ -4337,23 +4341,21 @@ const ProcessId = class {
4337
4341
  photoDone: false,
4338
4342
  recordingDone: false,
4339
4343
  fileName: 'idImage.png',
4340
- file: null,
4341
- recoding: null,
4342
- uploadType: CaptureUploadTypes.IdFront,
4344
+ recName: 'idVideo.',
4345
+ photoType: CaptureUploadTypes.IdFront,
4346
+ recType: CaptureUploadTypes.IdFrontVideo,
4343
4347
  },
4344
4348
  back: null,
4345
4349
  tilt: null,
4346
- recordingData: [],
4347
- mimeType: '',
4348
4350
  };
4349
4351
  if (Stream.state.hasIdBack) {
4350
4352
  this.flow.back = {
4351
4353
  photoDone: false,
4352
4354
  recordingDone: false,
4353
4355
  fileName: 'idBackImage.png',
4354
- file: null,
4355
- recoding: null,
4356
- uploadType: CaptureUploadTypes.IdBack,
4356
+ recName: 'idBackVideo.',
4357
+ photoType: CaptureUploadTypes.IdBack,
4358
+ recType: CaptureUploadTypes.IdBackVideo,
4357
4359
  };
4358
4360
  }
4359
4361
  if (Stream.state.hasIdTilt) {
@@ -4361,9 +4363,9 @@ const ProcessId = class {
4361
4363
  photoDone: true,
4362
4364
  recordingDone: false,
4363
4365
  fileName: 'idTiltImage.png',
4364
- file: null,
4365
- recoding: null,
4366
- uploadType: CaptureUploadTypes.None,
4366
+ recName: 'idTiltVideo.',
4367
+ photoType: CaptureUploadTypes.None,
4368
+ recType: CaptureUploadTypes.TiltVideo,
4367
4369
  };
4368
4370
  }
4369
4371
  this.captureStep = CaptureFlowStatus.HowToFront;
@@ -4395,8 +4397,8 @@ const ProcessId = class {
4395
4397
  return;
4396
4398
  }
4397
4399
  try {
4398
- this.flow.front.file = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
4399
- this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.uploadType, this.flow.front.file);
4400
+ let frontCapture = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
4401
+ this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.photoType, frontCapture);
4400
4402
  await this.endFlow();
4401
4403
  }
4402
4404
  catch (e) {
@@ -4411,8 +4413,8 @@ const ProcessId = class {
4411
4413
  return;
4412
4414
  }
4413
4415
  try {
4414
- this.flow.back.file = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
4415
- this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.uploadType, this.flow.back.file);
4416
+ let backCapture = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
4417
+ this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.photoType, backCapture);
4416
4418
  await this.endFlow();
4417
4419
  }
4418
4420
  catch (e) {
@@ -4420,56 +4422,32 @@ const ProcessId = class {
4420
4422
  }
4421
4423
  }
4422
4424
  async capturedIdRecording(event) {
4423
- var recResults = event.detail;
4424
- if (recResults.RecordingChunks.length == 0 && this.recordingResultCount == 0) {
4425
+ let idRecording = event.detail;
4426
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
4425
4427
  this.recordingResultCount++;
4426
4428
  return;
4427
4429
  }
4428
- if (recResults.RecordingChunks.length == 0) {
4429
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording for ' + this.captureStep, blobData: recResults.RecordingChunks }, Stream.getLogMessage());
4430
- this.triggerErrorFlow();
4430
+ if (idRecording.size == 0) {
4431
+ await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, Stream.getLogMessage());
4432
+ this.showTimeout = true;
4431
4433
  return;
4432
4434
  }
4433
- this.flow.mimeType = event.detail.MimeType;
4435
+ let mimeType = idRecording.type == Stream.Stream.mp4MimeType.type ? Stream.Stream.mp4MimeType : Stream.Stream.webmMimeType;
4434
4436
  if (this.captureStep == CaptureFlowStatus.IdFront) {
4435
- this.flow.front.recoding = recResults.RecordingChunks;
4436
- this.flow.front.recordingDone = true;
4437
+ let frontRec = new File([idRecording], this.flow.front.recName + mimeType.extension, { type: mimeType.type });
4438
+ this.flow.front.recordingDone = await this.uploadRecording(this.flow.front.recType, frontRec);
4437
4439
  }
4438
4440
  if (this.captureStep == CaptureFlowStatus.IdBack) {
4439
- this.flow.back.recoding = recResults.RecordingChunks;
4440
- this.flow.back.recordingDone = true;
4441
+ let backRec = new File([idRecording], this.flow.back.recName + mimeType.extension, { type: mimeType.type });
4442
+ this.flow.back.recordingDone = await this.uploadRecording(this.flow.back.recType, backRec);
4441
4443
  }
4442
4444
  if (this.captureStep == CaptureFlowStatus.Tilt) {
4443
- this.flow.tilt.recoding = recResults.RecordingChunks;
4444
- this.flow.tilt.recordingDone = true;
4445
+ let tiltRec = new File([idRecording], this.flow.tilt.recName + mimeType.extension, { type: mimeType.type });
4446
+ this.flow.tilt.recordingDone = await this.uploadRecording(this.flow.tilt.recType, tiltRec);
4445
4447
  }
4446
4448
  await this.endFlow();
4447
4449
  this.recordingResultCount = 0;
4448
4450
  }
4449
- async getRecordingFile() {
4450
- let idRecording = new Blob(this.flow.recordingData, {
4451
- type: this.flow.mimeType,
4452
- });
4453
- if (idRecording.size == 0) {
4454
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, Stream.getLogMessage());
4455
- this.triggerErrorFlow(true);
4456
- return;
4457
- }
4458
- let mimeType = idRecording.type == Stream.Stream.mp4MimeType.type ? Stream.Stream.mp4MimeType : Stream.Stream.webmMimeType;
4459
- try {
4460
- var file = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
4461
- var uploadResult = this.uploadRecording('IdFrontVideo', file);
4462
- if (uploadResult) {
4463
- return true;
4464
- }
4465
- else {
4466
- this.triggerErrorFlow(true);
4467
- }
4468
- }
4469
- catch (e) {
4470
- this.triggerErrorFlow(true);
4471
- }
4472
- }
4473
4451
  async componentDidLoad() {
4474
4452
  await this.baseComponent.initialize();
4475
4453
  }
@@ -4505,21 +4483,16 @@ const ProcessId = class {
4505
4483
  this.captureStep = CaptureFlowStatus.IdFront;
4506
4484
  }
4507
4485
  if (this.captureStep == CaptureFlowStatus.IdFront || restart) {
4508
- this.flow.front.file = null;
4509
4486
  this.flow.front.photoDone = false;
4510
4487
  this.flow.front.recordingDone = false;
4511
- this.flow.front.recoding = null;
4512
4488
  }
4513
4489
  if (this.captureStep == CaptureFlowStatus.IdBack || restart) {
4514
- this.flow.back.file = null;
4515
4490
  this.flow.back.photoDone = false;
4516
4491
  this.flow.back.recordingDone = false;
4517
- this.flow.back.recoding = null;
4518
4492
  }
4519
4493
  if (this.captureStep == CaptureFlowStatus.Tilt || restart) {
4520
4494
  this.flow.tilt.photoDone = true;
4521
4495
  this.flow.tilt.recordingDone = false;
4522
- this.flow.tilt.recoding = null;
4523
4496
  }
4524
4497
  this.showInvalid = true;
4525
4498
  }
@@ -4555,10 +4528,6 @@ const ProcessId = class {
4555
4528
  }
4556
4529
  if (this.captureStep == CaptureFlowStatus.Tilt && Stream.state.hasIdTilt) {
4557
4530
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
4558
- this.flow.recordingData.push(...this.flow.front.recoding);
4559
- this.flow.recordingData.push(...this.flow.back.recoding);
4560
- this.flow.recordingData.push(...this.flow.tilt.recoding);
4561
- await this.getRecordingFile();
4562
4531
  this.captureStep = CaptureFlowStatus.End;
4563
4532
  }
4564
4533
  else {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-79f82518.js');
6
- const Stream = require('./Stream-f03c722d.js');
6
+ const Stream = require('./Stream-097bd1e9.js');
7
7
 
8
8
  const idDoubleSideCss = "";
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-79f82518.js');
6
- const Stream = require('./Stream-f03c722d.js');
6
+ const Stream = require('./Stream-097bd1e9.js');
7
7
 
8
8
  const idSingleSideCss = "";
9
9
 
@@ -24,23 +24,21 @@ export class ProcessId {
24
24
  photoDone: false,
25
25
  recordingDone: false,
26
26
  fileName: 'idImage.png',
27
- file: null,
28
- recoding: null,
29
- uploadType: CaptureUploadTypes.IdFront,
27
+ recName: 'idVideo.',
28
+ photoType: CaptureUploadTypes.IdFront,
29
+ recType: CaptureUploadTypes.IdFrontVideo,
30
30
  },
31
31
  back: null,
32
32
  tilt: null,
33
- recordingData: [],
34
- mimeType: '',
35
33
  };
36
34
  if (store.hasIdBack) {
37
35
  this.flow.back = {
38
36
  photoDone: false,
39
37
  recordingDone: false,
40
38
  fileName: 'idBackImage.png',
41
- file: null,
42
- recoding: null,
43
- uploadType: CaptureUploadTypes.IdBack,
39
+ recName: 'idBackVideo.',
40
+ photoType: CaptureUploadTypes.IdBack,
41
+ recType: CaptureUploadTypes.IdBackVideo,
44
42
  };
45
43
  }
46
44
  if (store.hasIdTilt) {
@@ -48,9 +46,9 @@ export class ProcessId {
48
46
  photoDone: true,
49
47
  recordingDone: false,
50
48
  fileName: 'idTiltImage.png',
51
- file: null,
52
- recoding: null,
53
- uploadType: CaptureUploadTypes.None,
49
+ recName: 'idTiltVideo.',
50
+ photoType: CaptureUploadTypes.None,
51
+ recType: CaptureUploadTypes.TiltVideo,
54
52
  };
55
53
  }
56
54
  this.captureStep = CaptureFlowStatus.HowToFront;
@@ -82,8 +80,8 @@ export class ProcessId {
82
80
  return;
83
81
  }
84
82
  try {
85
- this.flow.front.file = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
86
- this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.uploadType, this.flow.front.file);
83
+ let frontCapture = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
84
+ this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.photoType, frontCapture);
87
85
  await this.endFlow();
88
86
  }
89
87
  catch (e) {
@@ -98,8 +96,8 @@ export class ProcessId {
98
96
  return;
99
97
  }
100
98
  try {
101
- this.flow.back.file = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
102
- this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.uploadType, this.flow.back.file);
99
+ let backCapture = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
100
+ this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.photoType, backCapture);
103
101
  await this.endFlow();
104
102
  }
105
103
  catch (e) {
@@ -107,56 +105,32 @@ export class ProcessId {
107
105
  }
108
106
  }
109
107
  async capturedIdRecording(event) {
110
- var recResults = event.detail;
111
- if (recResults.RecordingChunks.length == 0 && this.recordingResultCount == 0) {
108
+ let idRecording = event.detail;
109
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
112
110
  this.recordingResultCount++;
113
111
  return;
114
112
  }
115
- if (recResults.RecordingChunks.length == 0) {
116
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording for ' + this.captureStep, blobData: recResults.RecordingChunks }, getLogMessage());
117
- this.triggerErrorFlow();
113
+ if (idRecording.size == 0) {
114
+ await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
115
+ this.showTimeout = true;
118
116
  return;
119
117
  }
120
- this.flow.mimeType = event.detail.MimeType;
118
+ let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
121
119
  if (this.captureStep == CaptureFlowStatus.IdFront) {
122
- this.flow.front.recoding = recResults.RecordingChunks;
123
- this.flow.front.recordingDone = true;
120
+ let frontRec = new File([idRecording], this.flow.front.recName + mimeType.extension, { type: mimeType.type });
121
+ this.flow.front.recordingDone = await this.uploadRecording(this.flow.front.recType, frontRec);
124
122
  }
125
123
  if (this.captureStep == CaptureFlowStatus.IdBack) {
126
- this.flow.back.recoding = recResults.RecordingChunks;
127
- this.flow.back.recordingDone = true;
124
+ let backRec = new File([idRecording], this.flow.back.recName + mimeType.extension, { type: mimeType.type });
125
+ this.flow.back.recordingDone = await this.uploadRecording(this.flow.back.recType, backRec);
128
126
  }
129
127
  if (this.captureStep == CaptureFlowStatus.Tilt) {
130
- this.flow.tilt.recoding = recResults.RecordingChunks;
131
- this.flow.tilt.recordingDone = true;
128
+ let tiltRec = new File([idRecording], this.flow.tilt.recName + mimeType.extension, { type: mimeType.type });
129
+ this.flow.tilt.recordingDone = await this.uploadRecording(this.flow.tilt.recType, tiltRec);
132
130
  }
133
131
  await this.endFlow();
134
132
  this.recordingResultCount = 0;
135
133
  }
136
- async getRecordingFile() {
137
- let idRecording = new Blob(this.flow.recordingData, {
138
- type: this.flow.mimeType,
139
- });
140
- if (idRecording.size == 0) {
141
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
142
- this.triggerErrorFlow(true);
143
- return;
144
- }
145
- let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
146
- try {
147
- var file = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
148
- var uploadResult = this.uploadRecording('IdFrontVideo', file);
149
- if (uploadResult) {
150
- return true;
151
- }
152
- else {
153
- this.triggerErrorFlow(true);
154
- }
155
- }
156
- catch (e) {
157
- this.triggerErrorFlow(true);
158
- }
159
- }
160
134
  async componentDidLoad() {
161
135
  await this.baseComponent.initialize();
162
136
  }
@@ -192,21 +166,16 @@ export class ProcessId {
192
166
  this.captureStep = CaptureFlowStatus.IdFront;
193
167
  }
194
168
  if (this.captureStep == CaptureFlowStatus.IdFront || restart) {
195
- this.flow.front.file = null;
196
169
  this.flow.front.photoDone = false;
197
170
  this.flow.front.recordingDone = false;
198
- this.flow.front.recoding = null;
199
171
  }
200
172
  if (this.captureStep == CaptureFlowStatus.IdBack || restart) {
201
- this.flow.back.file = null;
202
173
  this.flow.back.photoDone = false;
203
174
  this.flow.back.recordingDone = false;
204
- this.flow.back.recoding = null;
205
175
  }
206
176
  if (this.captureStep == CaptureFlowStatus.Tilt || restart) {
207
177
  this.flow.tilt.photoDone = true;
208
178
  this.flow.tilt.recordingDone = false;
209
- this.flow.tilt.recoding = null;
210
179
  }
211
180
  this.showInvalid = true;
212
181
  }
@@ -242,10 +211,6 @@ export class ProcessId {
242
211
  }
243
212
  if (this.captureStep == CaptureFlowStatus.Tilt && store.hasIdTilt) {
244
213
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
245
- this.flow.recordingData.push(...this.flow.front.recoding);
246
- this.flow.recordingData.push(...this.flow.back.recoding);
247
- this.flow.recordingData.push(...this.flow.tilt.recoding);
248
- await this.getRecordingFile();
249
214
  this.captureStep = CaptureFlowStatus.End;
250
215
  }
251
216
  else {
@@ -156,7 +156,7 @@ export class ApiCall {
156
156
  store.requestId = jsonResp.requestId;
157
157
  }
158
158
  store.hasIdBack = jsonResp.hasIdBack;
159
- store.hasSelfieGesture = jsonResp.hasIdTilt;
159
+ store.hasIdTilt = jsonResp.hasIdTilt;
160
160
  store.hasSelfieGesture = jsonResp.hasSelfieGesture;
161
161
  store.agreementsValidation = jsonResp.agreementsValidation;
162
162
  store.phoneValidation = jsonResp.phoneValidation;
@@ -135,11 +135,10 @@ export class Stream {
135
135
  this.recordedChunks.push(event.data);
136
136
  };
137
137
  this.mediaRecorder.onstop = _e => {
138
- var resp = {
139
- RecordingChunks: this.recordedChunks,
140
- MimeType: options.mimeType,
141
- };
142
- this.callbackRecordingReady(resp);
138
+ var rec = new Blob(this.recordedChunks, {
139
+ type: options.mimeType.split(';')[0],
140
+ });
141
+ this.callbackRecordingReady(rec);
143
142
  };
144
143
  this.mediaRecorder.start(); // Start recording, and dump data every second
145
144
  }
@@ -3,6 +3,10 @@ export var CaptureUploadTypes;
3
3
  CaptureUploadTypes["IdFront"] = "IdFront";
4
4
  CaptureUploadTypes["IdBack"] = "IdBack";
5
5
  CaptureUploadTypes["IdFrontVideo"] = "IdFrontVideo";
6
+ CaptureUploadTypes["IdBackVideo"] = "IdBackVideo";
7
+ CaptureUploadTypes["SelfieVideo"] = "SelfieVideo";
8
+ CaptureUploadTypes["SelfieGestureVideo"] = "SelfieGestureVideo";
9
+ CaptureUploadTypes["TiltVideo"] = "TiltVideo";
6
10
  CaptureUploadTypes["None"] = "None";
7
11
  })(CaptureUploadTypes || (CaptureUploadTypes = {}));
8
12
  export var CaptureFlowStatus;
@@ -592,7 +592,7 @@ class ApiCall {
592
592
  state.requestId = jsonResp.requestId;
593
593
  }
594
594
  state.hasIdBack = jsonResp.hasIdBack;
595
- state.hasSelfieGesture = jsonResp.hasIdTilt;
595
+ state.hasIdTilt = jsonResp.hasIdTilt;
596
596
  state.hasSelfieGesture = jsonResp.hasSelfieGesture;
597
597
  state.agreementsValidation = jsonResp.agreementsValidation;
598
598
  state.phoneValidation = jsonResp.phoneValidation;
@@ -5237,11 +5237,10 @@ class Stream {
5237
5237
  this.recordedChunks.push(event.data);
5238
5238
  };
5239
5239
  this.mediaRecorder.onstop = _e => {
5240
- var resp = {
5241
- RecordingChunks: this.recordedChunks,
5242
- MimeType: options.mimeType,
5243
- };
5244
- this.callbackRecordingReady(resp);
5240
+ var rec = new Blob(this.recordedChunks, {
5241
+ type: options.mimeType.split(';')[0],
5242
+ });
5243
+ this.callbackRecordingReady(rec);
5245
5244
  };
5246
5245
  this.mediaRecorder.start(); // Start recording, and dump data every second
5247
5246
  }
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5d6f9123.js';
2
- import { A as ApiCall, a as AgreementCheckValues, b as AgreementInfoValues, B as BaseComponent, F as FlowSteps, s as state, c as FlowStatus, S as Stream, V as VerificationMode, C as CameraErrorValues, M as MobileOS, d as SessionKeys, I as IdCaptureValues, e as SelfieCaptureValues, f as delay, E as Events, g as CompleteValues, H as HowToValues, h as Browser, i as FlowMoments, j as IDML5Detector, k as FaceML5Detector, l as getLogMessage, m as ML5, L as LandingValues, n as createCommonjsModule, o as MobileRedirectValues, O as OrderStatuses, p as FacePose, P as PhoneValidationValues, q as CodeValidationValues } from './Stream-9d2f3b4a.js';
2
+ import { A as ApiCall, a as AgreementCheckValues, b as AgreementInfoValues, B as BaseComponent, F as FlowSteps, s as state, c as FlowStatus, S as Stream, V as VerificationMode, C as CameraErrorValues, M as MobileOS, d as SessionKeys, I as IdCaptureValues, e as SelfieCaptureValues, f as delay, E as Events, g as CompleteValues, H as HowToValues, h as Browser, i as FlowMoments, j as IDML5Detector, k as FaceML5Detector, l as getLogMessage, m as ML5, L as LandingValues, n as createCommonjsModule, o as MobileRedirectValues, O as OrderStatuses, p as FacePose, P as PhoneValidationValues, q as CodeValidationValues } from './Stream-d1fb2210.js';
3
3
 
4
4
  const agreementCheckCss = "";
5
5
 
@@ -892,7 +892,7 @@ function v4(options, buf, offset) {
892
892
  }
893
893
 
894
894
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
895
- const version$1 = "3.6.12";
895
+ const version$1 = "3.6.14";
896
896
  const description = "Person Identification Component";
897
897
  const main = "./dist/index.cjs.js";
898
898
  const module = "./dist/index.js";
@@ -4300,6 +4300,10 @@ var CaptureUploadTypes;
4300
4300
  CaptureUploadTypes["IdFront"] = "IdFront";
4301
4301
  CaptureUploadTypes["IdBack"] = "IdBack";
4302
4302
  CaptureUploadTypes["IdFrontVideo"] = "IdFrontVideo";
4303
+ CaptureUploadTypes["IdBackVideo"] = "IdBackVideo";
4304
+ CaptureUploadTypes["SelfieVideo"] = "SelfieVideo";
4305
+ CaptureUploadTypes["SelfieGestureVideo"] = "SelfieGestureVideo";
4306
+ CaptureUploadTypes["TiltVideo"] = "TiltVideo";
4303
4307
  CaptureUploadTypes["None"] = "None";
4304
4308
  })(CaptureUploadTypes || (CaptureUploadTypes = {}));
4305
4309
  var CaptureFlowStatus;
@@ -4333,23 +4337,21 @@ const ProcessId = class {
4333
4337
  photoDone: false,
4334
4338
  recordingDone: false,
4335
4339
  fileName: 'idImage.png',
4336
- file: null,
4337
- recoding: null,
4338
- uploadType: CaptureUploadTypes.IdFront,
4340
+ recName: 'idVideo.',
4341
+ photoType: CaptureUploadTypes.IdFront,
4342
+ recType: CaptureUploadTypes.IdFrontVideo,
4339
4343
  },
4340
4344
  back: null,
4341
4345
  tilt: null,
4342
- recordingData: [],
4343
- mimeType: '',
4344
4346
  };
4345
4347
  if (state.hasIdBack) {
4346
4348
  this.flow.back = {
4347
4349
  photoDone: false,
4348
4350
  recordingDone: false,
4349
4351
  fileName: 'idBackImage.png',
4350
- file: null,
4351
- recoding: null,
4352
- uploadType: CaptureUploadTypes.IdBack,
4352
+ recName: 'idBackVideo.',
4353
+ photoType: CaptureUploadTypes.IdBack,
4354
+ recType: CaptureUploadTypes.IdBackVideo,
4353
4355
  };
4354
4356
  }
4355
4357
  if (state.hasIdTilt) {
@@ -4357,9 +4359,9 @@ const ProcessId = class {
4357
4359
  photoDone: true,
4358
4360
  recordingDone: false,
4359
4361
  fileName: 'idTiltImage.png',
4360
- file: null,
4361
- recoding: null,
4362
- uploadType: CaptureUploadTypes.None,
4362
+ recName: 'idTiltVideo.',
4363
+ photoType: CaptureUploadTypes.None,
4364
+ recType: CaptureUploadTypes.TiltVideo,
4363
4365
  };
4364
4366
  }
4365
4367
  this.captureStep = CaptureFlowStatus.HowToFront;
@@ -4391,8 +4393,8 @@ const ProcessId = class {
4391
4393
  return;
4392
4394
  }
4393
4395
  try {
4394
- this.flow.front.file = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
4395
- this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.uploadType, this.flow.front.file);
4396
+ let frontCapture = new File([idPhoto], this.flow.front.fileName, { type: 'image/png' });
4397
+ this.flow.front.photoDone = await this.uploadPhotos(this.flow.front.photoType, frontCapture);
4396
4398
  await this.endFlow();
4397
4399
  }
4398
4400
  catch (e) {
@@ -4407,8 +4409,8 @@ const ProcessId = class {
4407
4409
  return;
4408
4410
  }
4409
4411
  try {
4410
- this.flow.back.file = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
4411
- this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.uploadType, this.flow.back.file);
4412
+ let backCapture = new File([idPhoto], this.flow.back.fileName, { type: 'image/png' });
4413
+ this.flow.back.photoDone = await this.uploadPhotos(this.flow.back.photoType, backCapture);
4412
4414
  await this.endFlow();
4413
4415
  }
4414
4416
  catch (e) {
@@ -4416,56 +4418,32 @@ const ProcessId = class {
4416
4418
  }
4417
4419
  }
4418
4420
  async capturedIdRecording(event) {
4419
- var recResults = event.detail;
4420
- if (recResults.RecordingChunks.length == 0 && this.recordingResultCount == 0) {
4421
+ let idRecording = event.detail;
4422
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
4421
4423
  this.recordingResultCount++;
4422
4424
  return;
4423
4425
  }
4424
- if (recResults.RecordingChunks.length == 0) {
4425
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording for ' + this.captureStep, blobData: recResults.RecordingChunks }, getLogMessage());
4426
- this.triggerErrorFlow();
4426
+ if (idRecording.size == 0) {
4427
+ await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
4428
+ this.showTimeout = true;
4427
4429
  return;
4428
4430
  }
4429
- this.flow.mimeType = event.detail.MimeType;
4431
+ let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
4430
4432
  if (this.captureStep == CaptureFlowStatus.IdFront) {
4431
- this.flow.front.recoding = recResults.RecordingChunks;
4432
- this.flow.front.recordingDone = true;
4433
+ let frontRec = new File([idRecording], this.flow.front.recName + mimeType.extension, { type: mimeType.type });
4434
+ this.flow.front.recordingDone = await this.uploadRecording(this.flow.front.recType, frontRec);
4433
4435
  }
4434
4436
  if (this.captureStep == CaptureFlowStatus.IdBack) {
4435
- this.flow.back.recoding = recResults.RecordingChunks;
4436
- this.flow.back.recordingDone = true;
4437
+ let backRec = new File([idRecording], this.flow.back.recName + mimeType.extension, { type: mimeType.type });
4438
+ this.flow.back.recordingDone = await this.uploadRecording(this.flow.back.recType, backRec);
4437
4439
  }
4438
4440
  if (this.captureStep == CaptureFlowStatus.Tilt) {
4439
- this.flow.tilt.recoding = recResults.RecordingChunks;
4440
- this.flow.tilt.recordingDone = true;
4441
+ let tiltRec = new File([idRecording], this.flow.tilt.recName + mimeType.extension, { type: mimeType.type });
4442
+ this.flow.tilt.recordingDone = await this.uploadRecording(this.flow.tilt.recType, tiltRec);
4441
4443
  }
4442
4444
  await this.endFlow();
4443
4445
  this.recordingResultCount = 0;
4444
4446
  }
4445
- async getRecordingFile() {
4446
- let idRecording = new Blob(this.flow.recordingData, {
4447
- type: this.flow.mimeType,
4448
- });
4449
- if (idRecording.size == 0) {
4450
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
4451
- this.triggerErrorFlow(true);
4452
- return;
4453
- }
4454
- let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
4455
- try {
4456
- var file = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
4457
- var uploadResult = this.uploadRecording('IdFrontVideo', file);
4458
- if (uploadResult) {
4459
- return true;
4460
- }
4461
- else {
4462
- this.triggerErrorFlow(true);
4463
- }
4464
- }
4465
- catch (e) {
4466
- this.triggerErrorFlow(true);
4467
- }
4468
- }
4469
4447
  async componentDidLoad() {
4470
4448
  await this.baseComponent.initialize();
4471
4449
  }
@@ -4501,21 +4479,16 @@ const ProcessId = class {
4501
4479
  this.captureStep = CaptureFlowStatus.IdFront;
4502
4480
  }
4503
4481
  if (this.captureStep == CaptureFlowStatus.IdFront || restart) {
4504
- this.flow.front.file = null;
4505
4482
  this.flow.front.photoDone = false;
4506
4483
  this.flow.front.recordingDone = false;
4507
- this.flow.front.recoding = null;
4508
4484
  }
4509
4485
  if (this.captureStep == CaptureFlowStatus.IdBack || restart) {
4510
- this.flow.back.file = null;
4511
4486
  this.flow.back.photoDone = false;
4512
4487
  this.flow.back.recordingDone = false;
4513
- this.flow.back.recoding = null;
4514
4488
  }
4515
4489
  if (this.captureStep == CaptureFlowStatus.Tilt || restart) {
4516
4490
  this.flow.tilt.photoDone = true;
4517
4491
  this.flow.tilt.recordingDone = false;
4518
- this.flow.tilt.recoding = null;
4519
4492
  }
4520
4493
  this.showInvalid = true;
4521
4494
  }
@@ -4551,10 +4524,6 @@ const ProcessId = class {
4551
4524
  }
4552
4525
  if (this.captureStep == CaptureFlowStatus.Tilt && state.hasIdTilt) {
4553
4526
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
4554
- this.flow.recordingData.push(...this.flow.front.recoding);
4555
- this.flow.recordingData.push(...this.flow.back.recoding);
4556
- this.flow.recordingData.push(...this.flow.tilt.recoding);
4557
- await this.getRecordingFile();
4558
4527
  this.captureStep = CaptureFlowStatus.End;
4559
4528
  }
4560
4529
  else {