@ekyc_qoobiss/qbs-ect-cmp 1.10.18 → 1.10.20
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/agreement-check_17.cjs.entry.js +124 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/components/flow/id-double-side/id-double-side.js +4 -0
- package/dist/collection/components/flow/id-single-side/id-single-side.js +4 -0
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +10 -2
- package/dist/collection/components/flow/user-liveness/user-liveness.js +4 -0
- package/dist/collection/components/identification-component/identification-component.js +41 -2
- package/dist/collection/helpers/ApiCall.js +11 -3
- package/dist/collection/helpers/store.js +1 -0
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +5 -5
- package/dist/esm/agreement-check_17.entry.js +124 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/qbs-ect-cmp/{p-f2a06359.entry.js → p-0501548d.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/identification-component/identification-component.d.ts +2 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/helpers/ApiCall.d.ts +1 -1
- package/dist/types/helpers/store.d.ts +1 -0
- package/dist/types/models/IAddRequest.d.ts +1 -0
- package/package.json +3 -2
|
@@ -344,6 +344,7 @@ const { state, onChange } = createStore({
|
|
|
344
344
|
flowStatus: FlowStatus.LANDING,
|
|
345
345
|
environment: 'PROD',
|
|
346
346
|
requestId: '',
|
|
347
|
+
redirectId: '',
|
|
347
348
|
initialised: false,
|
|
348
349
|
token: '',
|
|
349
350
|
cameraIds: [],
|
|
@@ -409,9 +410,17 @@ class ApiCall {
|
|
|
409
410
|
let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
|
|
410
411
|
return jsonResp.valid;
|
|
411
412
|
}
|
|
412
|
-
async AddIdentificationRequest(
|
|
413
|
-
let data = {
|
|
413
|
+
async AddIdentificationRequest(deviceInfo) {
|
|
414
|
+
let data = {
|
|
415
|
+
requestId: state.requestId,
|
|
416
|
+
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
417
|
+
redirectId: state.redirectId,
|
|
418
|
+
};
|
|
414
419
|
let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
|
|
420
|
+
if (state.requestId == '') {
|
|
421
|
+
state.requestId = jsonResp.requestId;
|
|
422
|
+
sessionStorage.setItem(SessionKeys.RequestIdKey, jsonResp.requestId);
|
|
423
|
+
}
|
|
415
424
|
state.hasIdBack = jsonResp.hasIdBack;
|
|
416
425
|
state.agreementsValidation = jsonResp.agreementsValidation;
|
|
417
426
|
state.phoneValidation = jsonResp.phoneValidation;
|
|
@@ -2075,13 +2084,13 @@ class FaceML5Detector {
|
|
|
2075
2084
|
this.validFacePose = false;
|
|
2076
2085
|
this.validFaceFoundAgain = false;
|
|
2077
2086
|
this.MAX_NUMBER_FACES = 1;
|
|
2078
|
-
this.MIN_FACE_SCORE = 0.
|
|
2087
|
+
this.MIN_FACE_SCORE = 0.65;
|
|
2079
2088
|
// private readonly MIN_FACE_SIZE_FOR_MOBILE = 200;
|
|
2080
2089
|
// private readonly MIN_FACE_SIZE_FOR_DESKTOP = 350;
|
|
2081
|
-
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP =
|
|
2082
|
-
this.MIN_OCCUPIED_SPACE_FOR_MOBILE =
|
|
2083
|
-
this.X_OFFSET_FROM_FRAME =
|
|
2084
|
-
this.Y_OFFSET_FROM_FRAME =
|
|
2090
|
+
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP = 15;
|
|
2091
|
+
this.MIN_OCCUPIED_SPACE_FOR_MOBILE = 20;
|
|
2092
|
+
this.X_OFFSET_FROM_FRAME = 1;
|
|
2093
|
+
this.Y_OFFSET_FROM_FRAME = 1;
|
|
2085
2094
|
this.stream = stream;
|
|
2086
2095
|
this.ml5 = ML5.getInstance();
|
|
2087
2096
|
this.isMobile = isMobile;
|
|
@@ -5621,6 +5630,10 @@ const IdDoubleSide = class {
|
|
|
5621
5630
|
}
|
|
5622
5631
|
async capturedIdRecording(event) {
|
|
5623
5632
|
let idRecording = event.detail;
|
|
5633
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5634
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5635
|
+
return;
|
|
5636
|
+
}
|
|
5624
5637
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5625
5638
|
try {
|
|
5626
5639
|
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
@@ -5753,6 +5766,10 @@ const IdSingleSide = class {
|
|
|
5753
5766
|
}
|
|
5754
5767
|
async capturedIdRecording(event) {
|
|
5755
5768
|
let idRecording = event.detail;
|
|
5769
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5770
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5771
|
+
return;
|
|
5772
|
+
}
|
|
5756
5773
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5757
5774
|
if (state.flowStatus == FlowStatus.ID) {
|
|
5758
5775
|
try {
|
|
@@ -5858,6 +5875,71 @@ const initDevice = () => {
|
|
|
5858
5875
|
return device;
|
|
5859
5876
|
};
|
|
5860
5877
|
|
|
5878
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
5879
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
5880
|
+
// generators (like Math.random()).
|
|
5881
|
+
let getRandomValues;
|
|
5882
|
+
const rnds8 = new Uint8Array(16);
|
|
5883
|
+
function rng() {
|
|
5884
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
5885
|
+
if (!getRandomValues) {
|
|
5886
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
5887
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
5888
|
+
|
|
5889
|
+
if (!getRandomValues) {
|
|
5890
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
|
|
5894
|
+
return getRandomValues(rnds8);
|
|
5895
|
+
}
|
|
5896
|
+
|
|
5897
|
+
/**
|
|
5898
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
5899
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
5900
|
+
*/
|
|
5901
|
+
|
|
5902
|
+
const byteToHex = [];
|
|
5903
|
+
|
|
5904
|
+
for (let i = 0; i < 256; ++i) {
|
|
5905
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5908
|
+
function unsafeStringify(arr, offset = 0) {
|
|
5909
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
5910
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
5911
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5914
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
5915
|
+
const native = {
|
|
5916
|
+
randomUUID
|
|
5917
|
+
};
|
|
5918
|
+
|
|
5919
|
+
function v4(options, buf, offset) {
|
|
5920
|
+
if (native.randomUUID && !buf && !options) {
|
|
5921
|
+
return native.randomUUID();
|
|
5922
|
+
}
|
|
5923
|
+
|
|
5924
|
+
options = options || {};
|
|
5925
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
5926
|
+
|
|
5927
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
5928
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
5929
|
+
|
|
5930
|
+
if (buf) {
|
|
5931
|
+
offset = offset || 0;
|
|
5932
|
+
|
|
5933
|
+
for (let i = 0; i < 16; ++i) {
|
|
5934
|
+
buf[offset + i] = rnds[i];
|
|
5935
|
+
}
|
|
5936
|
+
|
|
5937
|
+
return buf;
|
|
5938
|
+
}
|
|
5939
|
+
|
|
5940
|
+
return unsafeStringify(rnds);
|
|
5941
|
+
}
|
|
5942
|
+
|
|
5861
5943
|
const identificationComponentCss = "@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-vietnamese-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-vietnamese-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-vietnamese-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{font-family:'Inter', sans-serif}h1{font-weight:900;letter-spacing:0.01em;color:#1f2024;font-size:3.2vh;margin:0;line-height:3.5vh}.row-validare h1{font-size:27px;line-height:29px}body{margin:0;padding:0;height:100vh;position:relative;}.container{width:100%;height:100%;background-color:#fff;max-width:991px;margin:auto;position:relative;overflow:hidden}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.main-text{font-weight:400;color:#71727a}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text{display:flex;align-items:center;margin-bottom:3vh}.img-text .bg-img img{width:100%;padding:2vh}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.img-text .bg-img{background:#e1e3e9;border-radius:30%;width:11vh;height:11vh;display:flex;align-items:center;justify-content:center;flex:none;margin-right:3vh}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.main-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;width:100%;padding:2vh;color:#fff;border:0;font-size:2vh}.main-button:disabled{color:#71727a}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-1{margin-bottom:1vh}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.row-validare .main-input{padding:14px 12px;border-radius:12px;font-weight:700;border:2px solid #464e58;font-size:19px}.main-input{width:100%;padding:22px 26px;border:3px solid #464e58;border-radius:20px;font-weight:600;font-size:2.3vh;font-family:'Inter', sans-serif}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.color-red{color:#b67171}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:60vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{position:fixed;width:calc(100% - 5vh);bottom:5vh}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.bg-black{background-color:#242426}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.dot-effect{position:fixed;bottom:13vh;width:calc(100% - 5vh);text-align:center;display:flex;align-items:center;justify-content:center}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll{margin:4px, 4px;padding:4px;height:70vh;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.dot-shuttle{position:relative;left:-15px;width:12px;height:12px;border-radius:6px;background-color:#1feaa6;color:transparent;margin:-1px 0;opacity:1}.dot-shuttle::before{opacity:0.5}.dot-shuttle::after{opacity:0.5}.dot-shuttle::before,.dot-shuttle::after{content:'';display:inline-block;position:absolute;top:0;width:12px;height:12px;border-radius:6px;background-color:#1feaa6;color:transparent}.dot-shuttle::before{left:0;animation:dotShuttle 2s infinite ease-out}.dot-shuttle::after{left:0;animation:dotShuttle 2s infinite ease-out;animation-delay:1s}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@keyframes dotShuttle{0%,50%,100%{transform:translateX(0);opacity:1}25%{transform:translateX(-30px);opacity:0.5}75%{transform:translateX(30px);opacity:0.5}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}.dot-effect{max-width:490px}}";
|
|
5862
5944
|
|
|
5863
5945
|
const IdentificationComponent = class {
|
|
@@ -5902,6 +5984,16 @@ const IdentificationComponent = class {
|
|
|
5902
5984
|
state.environment = newValue;
|
|
5903
5985
|
}
|
|
5904
5986
|
}
|
|
5987
|
+
async onRedirectIdChange(newValue, _oldValue) {
|
|
5988
|
+
if (state.redirectId != '') {
|
|
5989
|
+
newValue = state.redirectId;
|
|
5990
|
+
return;
|
|
5991
|
+
}
|
|
5992
|
+
if (state.redirectId !== newValue) {
|
|
5993
|
+
state.redirectId = newValue;
|
|
5994
|
+
}
|
|
5995
|
+
await this.initializeRequest();
|
|
5996
|
+
}
|
|
5905
5997
|
agreementAcceptanceEmitted(data) {
|
|
5906
5998
|
try {
|
|
5907
5999
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
@@ -5936,6 +6028,7 @@ const IdentificationComponent = class {
|
|
|
5936
6028
|
this.order_id = undefined;
|
|
5937
6029
|
this.api_url = undefined;
|
|
5938
6030
|
this.env = undefined;
|
|
6031
|
+
this.redirect_id = undefined;
|
|
5939
6032
|
this.idSide = '';
|
|
5940
6033
|
this.errorMessage = undefined;
|
|
5941
6034
|
ML5.getInstance();
|
|
@@ -5970,8 +6063,15 @@ const IdentificationComponent = class {
|
|
|
5970
6063
|
return;
|
|
5971
6064
|
}
|
|
5972
6065
|
try {
|
|
5973
|
-
if (
|
|
5974
|
-
state.
|
|
6066
|
+
if (!this.device.isMobile && state.redirectId == '') {
|
|
6067
|
+
state.redirectId = v4();
|
|
6068
|
+
this.redirect_id = state.redirectId;
|
|
6069
|
+
}
|
|
6070
|
+
if (state.token != '' && (state.requestId != '' || state.redirectId != '')) {
|
|
6071
|
+
state.initialised = await this.apiCall.AddIdentificationRequest(this.device);
|
|
6072
|
+
if (!this.order_id || this.order_id == '') {
|
|
6073
|
+
this.order_id = state.requestId;
|
|
6074
|
+
}
|
|
5975
6075
|
}
|
|
5976
6076
|
}
|
|
5977
6077
|
catch (e) {
|
|
@@ -6021,7 +6121,8 @@ const IdentificationComponent = class {
|
|
|
6021
6121
|
"token": ["onTokenChange"],
|
|
6022
6122
|
"order_id": ["onOrderIdChange"],
|
|
6023
6123
|
"api_url": ["onApiUrlChange"],
|
|
6024
|
-
"env": ["onEnvChange"]
|
|
6124
|
+
"env": ["onEnvChange"],
|
|
6125
|
+
"redirect_id": ["onRedirectIdChange"]
|
|
6025
6126
|
}; }
|
|
6026
6127
|
};
|
|
6027
6128
|
IdentificationComponent.style = identificationComponentCss;
|
|
@@ -8974,7 +9075,7 @@ const MobileRedirect = class {
|
|
|
8974
9075
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
8975
9076
|
let envUri = state.environment == 'PROD' ? 'ect' : 'test';
|
|
8976
9077
|
let baseUri = state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
8977
|
-
this.redirectLink = baseUri + envUri + '?
|
|
9078
|
+
this.redirectLink = baseUri + envUri + '?redirectId=' + state.redirectId;
|
|
8978
9079
|
var self = this;
|
|
8979
9080
|
browser.toDataURL(this.redirectLink, { type: 'image/png', errorCorrectionLevel: 'M', scale: 6 }, function (error, url) {
|
|
8980
9081
|
if (error)
|
|
@@ -9006,6 +9107,9 @@ const MobileRedirect = class {
|
|
|
9006
9107
|
}
|
|
9007
9108
|
}
|
|
9008
9109
|
async buttonClick() {
|
|
9110
|
+
if (this.contact == '' || this.contact.length != 10) {
|
|
9111
|
+
return;
|
|
9112
|
+
}
|
|
9009
9113
|
this.waitingMobile = true;
|
|
9010
9114
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
9011
9115
|
await this.apiCall.SendLink(this.redirectLink, this.contact);
|
|
@@ -9013,8 +9117,12 @@ const MobileRedirect = class {
|
|
|
9013
9117
|
handleChangeContact(ev) {
|
|
9014
9118
|
let value = ev.target ? ev.target.value : '';
|
|
9015
9119
|
this.contact = value.replace(/\D/g, '');
|
|
9016
|
-
if (this.contact.length > 10)
|
|
9120
|
+
if (this.contact.length > 10) {
|
|
9017
9121
|
this.contact = this.contact.substring(0, 10);
|
|
9122
|
+
}
|
|
9123
|
+
else if (this.contact.length == 10) {
|
|
9124
|
+
this.invalidValue = false;
|
|
9125
|
+
}
|
|
9018
9126
|
ev.target.value = this.contact;
|
|
9019
9127
|
}
|
|
9020
9128
|
render() {
|
|
@@ -9271,6 +9379,10 @@ const UserLiveness = class {
|
|
|
9271
9379
|
}
|
|
9272
9380
|
async capturedSelfieRecording(event) {
|
|
9273
9381
|
let selfieRecording = event.detail;
|
|
9382
|
+
if (selfieRecording.length == 0 || selfieRecording.size == 0) {
|
|
9383
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording });
|
|
9384
|
+
return;
|
|
9385
|
+
}
|
|
9274
9386
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9275
9387
|
try {
|
|
9276
9388
|
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + mimeType.extension, { type: mimeType.type });
|
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"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[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,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[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,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"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"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[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,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[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,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -74,6 +74,10 @@ export class IdDoubleSide {
|
|
|
74
74
|
}
|
|
75
75
|
async capturedIdRecording(event) {
|
|
76
76
|
let idRecording = event.detail;
|
|
77
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
78
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
77
81
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
78
82
|
try {
|
|
79
83
|
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
@@ -45,6 +45,10 @@ export class IdSingleSide {
|
|
|
45
45
|
}
|
|
46
46
|
async capturedIdRecording(event) {
|
|
47
47
|
let idRecording = event.detail;
|
|
48
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
49
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
48
52
|
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
49
53
|
if (store.flowStatus == FlowStatus.ID) {
|
|
50
54
|
try {
|
|
@@ -25,7 +25,7 @@ export class MobileRedirect {
|
|
|
25
25
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
26
26
|
let envUri = store.environment == 'PROD' ? 'ect' : 'test';
|
|
27
27
|
let baseUri = store.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
28
|
-
this.redirectLink = baseUri + envUri + '?
|
|
28
|
+
this.redirectLink = baseUri + envUri + '?redirectId=' + store.redirectId;
|
|
29
29
|
var self = this;
|
|
30
30
|
QRCode.toDataURL(this.redirectLink, { type: 'image/png', errorCorrectionLevel: 'M', scale: 6 }, function (error, url) {
|
|
31
31
|
if (error)
|
|
@@ -57,6 +57,10 @@ export class MobileRedirect {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
async buttonClick() {
|
|
60
|
+
if (this.contact == '' || this.contact.length != 10) {
|
|
61
|
+
this.invalidValue == true;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
60
64
|
this.waitingMobile = true;
|
|
61
65
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
62
66
|
await this.apiCall.SendLink(this.redirectLink, this.contact);
|
|
@@ -64,8 +68,12 @@ export class MobileRedirect {
|
|
|
64
68
|
handleChangeContact(ev) {
|
|
65
69
|
let value = ev.target ? ev.target.value : '';
|
|
66
70
|
this.contact = value.replace(/\D/g, '');
|
|
67
|
-
if (this.contact.length > 10)
|
|
71
|
+
if (this.contact.length > 10) {
|
|
68
72
|
this.contact = this.contact.substring(0, 10);
|
|
73
|
+
}
|
|
74
|
+
else if (this.contact.length == 10) {
|
|
75
|
+
this.invalidValue = false;
|
|
76
|
+
}
|
|
69
77
|
ev.target.value = this.contact;
|
|
70
78
|
}
|
|
71
79
|
render() {
|
|
@@ -41,6 +41,10 @@ export class UserLiveness {
|
|
|
41
41
|
}
|
|
42
42
|
async capturedSelfieRecording(event) {
|
|
43
43
|
let selfieRecording = event.detail;
|
|
44
|
+
if (selfieRecording.length == 0 || selfieRecording.size == 0) {
|
|
45
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording });
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
44
48
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
45
49
|
try {
|
|
46
50
|
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + mimeType.extension, { type: mimeType.type });
|
|
@@ -6,6 +6,7 @@ import store from '../../helpers/store';
|
|
|
6
6
|
import { ML5 } from '../../helpers/ML5';
|
|
7
7
|
import { FlowStatus } from '../../models/FlowStatus';
|
|
8
8
|
import Events from '../../helpers/Events';
|
|
9
|
+
import * as uuid from 'uuid';
|
|
9
10
|
export class IdentificationComponent {
|
|
10
11
|
async onTokenChange(newValue, _oldValue) {
|
|
11
12
|
if (newValue == '') {
|
|
@@ -48,6 +49,16 @@ export class IdentificationComponent {
|
|
|
48
49
|
store.environment = newValue;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
52
|
+
async onRedirectIdChange(newValue, _oldValue) {
|
|
53
|
+
if (store.redirectId != '') {
|
|
54
|
+
newValue = store.redirectId;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (store.redirectId !== newValue) {
|
|
58
|
+
store.redirectId = newValue;
|
|
59
|
+
}
|
|
60
|
+
await this.initializeRequest();
|
|
61
|
+
}
|
|
51
62
|
agreementAcceptanceEmitted(data) {
|
|
52
63
|
try {
|
|
53
64
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
@@ -81,6 +92,7 @@ export class IdentificationComponent {
|
|
|
81
92
|
this.order_id = undefined;
|
|
82
93
|
this.api_url = undefined;
|
|
83
94
|
this.env = undefined;
|
|
95
|
+
this.redirect_id = undefined;
|
|
84
96
|
this.idSide = '';
|
|
85
97
|
this.errorMessage = undefined;
|
|
86
98
|
ML5.getInstance();
|
|
@@ -115,8 +127,15 @@ export class IdentificationComponent {
|
|
|
115
127
|
return;
|
|
116
128
|
}
|
|
117
129
|
try {
|
|
118
|
-
if (
|
|
119
|
-
store.
|
|
130
|
+
if (!this.device.isMobile && store.redirectId == '') {
|
|
131
|
+
store.redirectId = uuid.v4();
|
|
132
|
+
this.redirect_id = store.redirectId;
|
|
133
|
+
}
|
|
134
|
+
if (store.token != '' && (store.requestId != '' || store.redirectId != '')) {
|
|
135
|
+
store.initialised = await this.apiCall.AddIdentificationRequest(this.device);
|
|
136
|
+
if (!this.order_id || this.order_id == '') {
|
|
137
|
+
this.order_id = store.requestId;
|
|
138
|
+
}
|
|
120
139
|
}
|
|
121
140
|
}
|
|
122
141
|
catch (e) {
|
|
@@ -243,6 +262,23 @@ export class IdentificationComponent {
|
|
|
243
262
|
},
|
|
244
263
|
"attribute": "env",
|
|
245
264
|
"reflect": true
|
|
265
|
+
},
|
|
266
|
+
"redirect_id": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"mutable": true,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "string",
|
|
271
|
+
"resolved": "string",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": ""
|
|
279
|
+
},
|
|
280
|
+
"attribute": "redirect_id",
|
|
281
|
+
"reflect": true
|
|
246
282
|
}
|
|
247
283
|
};
|
|
248
284
|
}
|
|
@@ -265,6 +301,9 @@ export class IdentificationComponent {
|
|
|
265
301
|
}, {
|
|
266
302
|
"propName": "env",
|
|
267
303
|
"methodName": "onEnvChange"
|
|
304
|
+
}, {
|
|
305
|
+
"propName": "redirect_id",
|
|
306
|
+
"methodName": "onRedirectIdChange"
|
|
268
307
|
}];
|
|
269
308
|
}
|
|
270
309
|
static get listeners() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OrderStatuses } from '../models/OrderStatuses';
|
|
2
2
|
import store from './store';
|
|
3
|
-
import { ApiUrls } from './textValues';
|
|
3
|
+
import { ApiUrls, SessionKeys } from './textValues';
|
|
4
4
|
import { FlowStatus } from '../models/FlowStatus';
|
|
5
5
|
export class ApiCall {
|
|
6
6
|
constructor() {
|
|
@@ -54,9 +54,17 @@ export class ApiCall {
|
|
|
54
54
|
let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
|
|
55
55
|
return jsonResp.valid;
|
|
56
56
|
}
|
|
57
|
-
async AddIdentificationRequest(
|
|
58
|
-
let data = {
|
|
57
|
+
async AddIdentificationRequest(deviceInfo) {
|
|
58
|
+
let data = {
|
|
59
|
+
requestId: store.requestId,
|
|
60
|
+
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
61
|
+
redirectId: store.redirectId,
|
|
62
|
+
};
|
|
59
63
|
let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
|
|
64
|
+
if (store.requestId == '') {
|
|
65
|
+
store.requestId = jsonResp.requestId;
|
|
66
|
+
sessionStorage.setItem(SessionKeys.RequestIdKey, jsonResp.requestId);
|
|
67
|
+
}
|
|
60
68
|
store.hasIdBack = jsonResp.hasIdBack;
|
|
61
69
|
store.agreementsValidation = jsonResp.agreementsValidation;
|
|
62
70
|
store.phoneValidation = jsonResp.phoneValidation;
|
|
@@ -25,13 +25,13 @@ export class FaceML5Detector {
|
|
|
25
25
|
this.validFacePose = false;
|
|
26
26
|
this.validFaceFoundAgain = false;
|
|
27
27
|
this.MAX_NUMBER_FACES = 1;
|
|
28
|
-
this.MIN_FACE_SCORE = 0.
|
|
28
|
+
this.MIN_FACE_SCORE = 0.65;
|
|
29
29
|
// private readonly MIN_FACE_SIZE_FOR_MOBILE = 200;
|
|
30
30
|
// private readonly MIN_FACE_SIZE_FOR_DESKTOP = 350;
|
|
31
|
-
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP =
|
|
32
|
-
this.MIN_OCCUPIED_SPACE_FOR_MOBILE =
|
|
33
|
-
this.X_OFFSET_FROM_FRAME =
|
|
34
|
-
this.Y_OFFSET_FROM_FRAME =
|
|
31
|
+
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP = 15;
|
|
32
|
+
this.MIN_OCCUPIED_SPACE_FOR_MOBILE = 20;
|
|
33
|
+
this.X_OFFSET_FROM_FRAME = 1;
|
|
34
|
+
this.Y_OFFSET_FROM_FRAME = 1;
|
|
35
35
|
this.stream = stream;
|
|
36
36
|
this.ml5 = ML5.getInstance();
|
|
37
37
|
this.isMobile = isMobile;
|