idmission-web-sdk 2.3.59 → 2.3.61
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/components/common/GuidanceMessage.d.ts.map +1 -1
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +4 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +2 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationCapture.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +2 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +2 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +3 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +5 -2
- package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +2 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureWizard.d.ts +3 -1
- package/dist/components/selfie_capture/SelfieCaptureWizard.d.ts.map +1 -1
- package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/components/submission/types.d.ts +2 -0
- package/dist/components/submission/types.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +3 -1
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -1
- package/dist/lib/utils/cropping.d.ts +1 -1
- package/dist/lib/utils/cropping.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +448 -318
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +448 -318
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +448 -318
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -205,7 +205,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
205
205
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
206
206
|
};
|
|
207
207
|
|
|
208
|
-
var webSdkVersion = '2.3.
|
|
208
|
+
var webSdkVersion = '2.3.61';
|
|
209
209
|
|
|
210
210
|
function getPlatform() {
|
|
211
211
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -453,7 +453,7 @@ var templateObject_1$S;
|
|
|
453
453
|
var ButtonsRow$2 = styled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"])));
|
|
454
454
|
var templateObject_1$R;
|
|
455
455
|
|
|
456
|
-
var GuidanceMessageContainerDiv = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
456
|
+
var GuidanceMessageContainerDiv = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"])), function (_a) {
|
|
457
457
|
var $top = _a.$top;
|
|
458
458
|
return $top !== null && $top !== void 0 ? $top : '10%';
|
|
459
459
|
}, function (_a) {
|
|
@@ -466,33 +466,33 @@ var GuidanceMessageContainer = function GuidanceMessageContainer(props) {
|
|
|
466
466
|
if (!portalLocation) return element;
|
|
467
467
|
return /*#__PURE__*/createPortal(element, portalLocation);
|
|
468
468
|
};
|
|
469
|
-
var GuidanceMessage = styled.div(templateObject_2$
|
|
469
|
+
var GuidanceMessage = styled.div(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])), function (props) {
|
|
470
470
|
var _a, _b, _c, _d, _e, _f;
|
|
471
|
-
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : '
|
|
471
|
+
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : 'white';
|
|
472
472
|
}, function (props) {
|
|
473
473
|
var _a, _b, _c, _d, _e, _f;
|
|
474
474
|
return (_f = (_a = props.$textColor) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.textColor) !== null && _f !== void 0 ? _f : 'black';
|
|
475
475
|
});
|
|
476
|
-
var templateObject_1$Q, templateObject_2$
|
|
476
|
+
var templateObject_1$Q, templateObject_2$I;
|
|
477
477
|
|
|
478
478
|
var wavesAnimation = keyframes(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"])));
|
|
479
|
-
var progressBarAnimation = keyframes(templateObject_2$
|
|
480
|
-
var dualRingSpinnerAnimation = keyframes(templateObject_3$
|
|
479
|
+
var progressBarAnimation = keyframes(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"], ["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"])));
|
|
480
|
+
var dualRingSpinnerAnimation = keyframes(templateObject_3$u || (templateObject_3$u = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
481
481
|
var progressBorderAnimation = keyframes(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n to {\n stroke-dashoffset: 0;\n }\n"], ["\n to {\n stroke-dashoffset: 0;\n }\n"])));
|
|
482
|
-
var templateObject_1$P, templateObject_2$
|
|
482
|
+
var templateObject_1$P, templateObject_2$H, templateObject_3$u, templateObject_4$n;
|
|
483
483
|
|
|
484
484
|
var OverlayContainer = styled.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"])), function (props) {
|
|
485
485
|
return props.theme.background ? "".concat(props.theme.background) : "white";
|
|
486
486
|
}, function (props) {
|
|
487
487
|
return props.theme.textColor ? "color: ".concat(props.theme.textColor, ";") : "";
|
|
488
488
|
});
|
|
489
|
-
var OverlayInner$2 = styled.div(templateObject_2$
|
|
489
|
+
var OverlayInner$2 = styled.div(templateObject_2$G || (templateObject_2$G = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"])), function (props) {
|
|
490
490
|
var _a;
|
|
491
491
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
492
492
|
}, function (props) {
|
|
493
493
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
494
494
|
});
|
|
495
|
-
var OverlayImageContainer = styled.div(templateObject_3$
|
|
495
|
+
var OverlayImageContainer = styled.div(templateObject_3$t || (templateObject_3$t = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
|
|
496
496
|
var OverlayImageRow = styled.div(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
|
|
497
497
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
498
498
|
var ButtonsColumn = styled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
@@ -514,7 +514,7 @@ var LoadingOverlayHeader = styled.div(templateObject_10$1 || (templateObject_10$
|
|
|
514
514
|
}, function (props) {
|
|
515
515
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
516
516
|
});
|
|
517
|
-
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n
|
|
517
|
+
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"], ["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"])));
|
|
518
518
|
var LoadingOverlayImageContainer = styled(OverlayImageContainer)(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"], ["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"])));
|
|
519
519
|
var LoadingOverlayProgressBarBackground = styled.div.attrs({
|
|
520
520
|
className: 'loading-overlay-progress-bar-background'
|
|
@@ -534,7 +534,7 @@ var LoadingOverlayLoadingListItem = styled.li(templateObject_19 || (templateObje
|
|
|
534
534
|
var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
535
535
|
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
536
536
|
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
537
|
-
var templateObject_1$O, templateObject_2$
|
|
537
|
+
var templateObject_1$O, templateObject_2$G, templateObject_3$t, templateObject_4$m, templateObject_5$e, templateObject_6$9, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
538
538
|
|
|
539
539
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
540
540
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -1565,6 +1565,9 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1565
1565
|
if (clientRequestID) {
|
|
1566
1566
|
submissionRequest.additionalData.clientRequestID = clientRequestID;
|
|
1567
1567
|
}
|
|
1568
|
+
if (jobId) {
|
|
1569
|
+
submissionRequest.additionalData.jobID = jobId;
|
|
1570
|
+
}
|
|
1568
1571
|
if (documents.idFrontImage) {
|
|
1569
1572
|
submissionRequest.customerData.idData.idImageFront = documents.idFrontImage;
|
|
1570
1573
|
}
|
|
@@ -1662,7 +1665,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1662
1665
|
}
|
|
1663
1666
|
});
|
|
1664
1667
|
});
|
|
1665
|
-
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackUvImage, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
1668
|
+
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackUvImage, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, jobId, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
1666
1669
|
var defaultOnSubmit = useCallback(function () {
|
|
1667
1670
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1668
1671
|
var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
|
|
@@ -1806,6 +1809,9 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1806
1809
|
if (clientRequestID) {
|
|
1807
1810
|
request.additionalData.clientRequestID = clientRequestID;
|
|
1808
1811
|
}
|
|
1812
|
+
if (jobId) {
|
|
1813
|
+
request.additionalData.jobID = jobId;
|
|
1814
|
+
}
|
|
1809
1815
|
if (idCardForFaceMatch) {
|
|
1810
1816
|
request.customerData.idData = {
|
|
1811
1817
|
idImageFront: idCardForFaceMatch
|
|
@@ -1833,7 +1839,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1833
1839
|
}
|
|
1834
1840
|
});
|
|
1835
1841
|
});
|
|
1836
|
-
}, [clientRequestID, documentServiceUrl, estimateAge, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, predictGender, selfieCaptureAttempts, uploadDocument, useDocumentServiceForLivenessChecks, webhooksStripSpecialCharacters]);
|
|
1842
|
+
}, [clientRequestID, documentServiceUrl, estimateAge, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, jobId, predictGender, selfieCaptureAttempts, uploadDocument, useDocumentServiceForLivenessChecks, webhooksStripSpecialCharacters]);
|
|
1837
1843
|
var checkLiveness = useCallback(function (imageDataUrl) {
|
|
1838
1844
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1839
1845
|
var request, host, endpoint, response, statusMessage, submissionResponse_3, e_2, err;
|
|
@@ -2202,6 +2208,7 @@ function clearCanvas(canvas) {
|
|
|
2202
2208
|
var templateObject_1$N;
|
|
2203
2209
|
|
|
2204
2210
|
function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quality, maxHeight) {
|
|
2211
|
+
var _a;
|
|
2205
2212
|
if (quality === void 0) {
|
|
2206
2213
|
quality = 0.92;
|
|
2207
2214
|
}
|
|
@@ -2218,10 +2225,14 @@ function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quali
|
|
|
2218
2225
|
cropCanvas.height = frame.height;
|
|
2219
2226
|
cropCtx.drawImage(rawCanvas, 0, 0, cropCanvas.width, cropCanvas.height);
|
|
2220
2227
|
} else {
|
|
2221
|
-
var _a = face.box
|
|
2222
|
-
|
|
2223
|
-
|
|
2228
|
+
var _b = (_a = face === null || face === void 0 ? void 0 : face.box) !== null && _a !== void 0 ? _a : {
|
|
2229
|
+
xMin: 0,
|
|
2230
|
+
width: frame.width
|
|
2231
|
+
},
|
|
2232
|
+
xMin = _b.xMin,
|
|
2233
|
+
width = _b.width;
|
|
2224
2234
|
var desiredWidth = frame.height * 0.6;
|
|
2235
|
+
alert("this side! ".concat(desiredWidth, "x").concat(frame.height));
|
|
2225
2236
|
var faceCenterX = xMin + width / 2;
|
|
2226
2237
|
var xPos = Math.max(0, faceCenterX - desiredWidth / 2);
|
|
2227
2238
|
cropCanvas.width = desiredWidth;
|
|
@@ -2720,6 +2731,9 @@ function useLoadFaceDetector(_a) {
|
|
|
2720
2731
|
clearTimeout(modelLoadTimeout);
|
|
2721
2732
|
setModelLoadState('warming');
|
|
2722
2733
|
setModelWarmingStartedAt(new Date().getTime());
|
|
2734
|
+
return [4 /*yield*/, testFaceDetectionAgainstKnownImage(model)];
|
|
2735
|
+
case 1:
|
|
2736
|
+
_b.sent();
|
|
2723
2737
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2724
2738
|
cancelled = false;
|
|
2725
2739
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2727,7 +2741,7 @@ function useLoadFaceDetector(_a) {
|
|
|
2727
2741
|
cancel();
|
|
2728
2742
|
};
|
|
2729
2743
|
return [4 /*yield*/, videoReady];
|
|
2730
|
-
case
|
|
2744
|
+
case 2:
|
|
2731
2745
|
_b.sent();
|
|
2732
2746
|
if (cancelled) return [2 /*return*/];
|
|
2733
2747
|
model.detectForVideo(videoRef.current, performance.now());
|
|
@@ -2879,6 +2893,26 @@ function processFaceDetectorPrediction(_a) {
|
|
|
2879
2893
|
faceIsStable: faceIsStable
|
|
2880
2894
|
};
|
|
2881
2895
|
}
|
|
2896
|
+
function testFaceDetectionAgainstKnownImage(detector) {
|
|
2897
|
+
return new Promise(function (resolve, reject) {
|
|
2898
|
+
var img = new Image();
|
|
2899
|
+
img.crossOrigin = 'anonymous';
|
|
2900
|
+
img.onload = function () {
|
|
2901
|
+
var prediction = detector.detectForVideo(img, performance.now());
|
|
2902
|
+
if (prediction.detections.length > 0) {
|
|
2903
|
+
debug('face detection test result', prediction.detections);
|
|
2904
|
+
resolve(void 0);
|
|
2905
|
+
} else {
|
|
2906
|
+
warn('face detection test failed');
|
|
2907
|
+
reject(new Error('testFaceDetectionAgainstKnownImage failed to predict'));
|
|
2908
|
+
}
|
|
2909
|
+
};
|
|
2910
|
+
img.onerror = function () {
|
|
2911
|
+
return reject(new Error('testFaceDetectionAgainstKnownImage failed to load image'));
|
|
2912
|
+
};
|
|
2913
|
+
img.src = "".concat(DEFAULT_CDN_URL, "/head-test.jpg");
|
|
2914
|
+
});
|
|
2915
|
+
}
|
|
2882
2916
|
|
|
2883
2917
|
var preloadModels = function preloadModels(_a) {
|
|
2884
2918
|
return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -5249,13 +5283,13 @@ function CameraTamperSeal(_a) {
|
|
|
5249
5283
|
}, messageText)));
|
|
5250
5284
|
}
|
|
5251
5285
|
var StyledOverlayInner$4 = styled(OverlayInner$2)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
5252
|
-
var StyledOverlayHeading = styled.h3(templateObject_2$
|
|
5286
|
+
var StyledOverlayHeading = styled.h3(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
5253
5287
|
function useCameraStore(selector) {
|
|
5254
5288
|
var store = useContext(CameraStoreContext);
|
|
5255
5289
|
if (!store) throw new Error('useCameraStore cannot be used without Provider');
|
|
5256
5290
|
return useStore(store, selector);
|
|
5257
5291
|
}
|
|
5258
|
-
var templateObject_1$M, templateObject_2$
|
|
5292
|
+
var templateObject_1$M, templateObject_2$F;
|
|
5259
5293
|
|
|
5260
5294
|
var DocumentDetectionModelContext = /*#__PURE__*/createContext({
|
|
5261
5295
|
startDocumentDetection: function startDocumentDetection() {
|
|
@@ -6240,11 +6274,11 @@ function DebugStatsPane(_a) {
|
|
|
6240
6274
|
return /*#__PURE__*/createPortal(element, portalLocation);
|
|
6241
6275
|
}
|
|
6242
6276
|
var DebugStatsPaneDiv = styled.span(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"])));
|
|
6243
|
-
var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$
|
|
6277
|
+
var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$E || (templateObject_2$E = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
6244
6278
|
var $flipX = _a.$flipX;
|
|
6245
6279
|
return $flipX ? 'transform: scaleX(-1);' : '';
|
|
6246
6280
|
});
|
|
6247
|
-
var ObjectDetectionDebugBox = styled.div(templateObject_3$
|
|
6281
|
+
var ObjectDetectionDebugBox = styled.div(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"], ["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
6248
6282
|
var $color = _a.$color;
|
|
6249
6283
|
return $color !== null && $color !== void 0 ? $color : 'green';
|
|
6250
6284
|
}, function (_a) {
|
|
@@ -6451,7 +6485,7 @@ function SelfieCaptureFaceKeypoint(_a) {
|
|
|
6451
6485
|
}
|
|
6452
6486
|
});
|
|
6453
6487
|
}
|
|
6454
|
-
var templateObject_1$L, templateObject_2$
|
|
6488
|
+
var templateObject_1$L, templateObject_2$E, templateObject_3$s, templateObject_4$l;
|
|
6455
6489
|
|
|
6456
6490
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
6457
6491
|
var _b = _a.classNames,
|
|
@@ -6491,11 +6525,11 @@ var Container$7 = styled.div(templateObject_1$K || (templateObject_1$K = __makeT
|
|
|
6491
6525
|
var _a, _b, _c;
|
|
6492
6526
|
return (_c = (_b = (_a = props.theme.idCapture) === null || _a === void 0 ? void 0 : _a.overrideWrongDocumentTypeGuidance) === null || _b === void 0 ? void 0 : _b.textColor) !== null && _c !== void 0 ? _c : 'black';
|
|
6493
6527
|
});
|
|
6494
|
-
var InnerContainer = styled.div(templateObject_2$
|
|
6495
|
-
var Message = styled.span(templateObject_3$
|
|
6528
|
+
var InnerContainer = styled.div(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"])));
|
|
6529
|
+
var Message = styled.span(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n display: block;\n margin: auto 12px auto 0;\n"], ["\n display: block;\n margin: auto 12px auto 0;\n"])));
|
|
6496
6530
|
var ButtonContainer = styled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
|
|
6497
6531
|
var Button$1 = styled(LoaderButton)(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n white-space: nowrap;\n margin: auto;\n"], ["\n white-space: nowrap;\n margin: auto;\n"])));
|
|
6498
|
-
var templateObject_1$K, templateObject_2$
|
|
6532
|
+
var templateObject_1$K, templateObject_2$D, templateObject_3$r, templateObject_4$k, templateObject_5$d;
|
|
6499
6533
|
|
|
6500
6534
|
// This is a simplified version of https://github.com/ZeeCoder/use-resize-observer.
|
|
6501
6535
|
// We have removed all options and made it compliant with React Compiler/React 19.
|
|
@@ -6809,12 +6843,12 @@ var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
|
|
|
6809
6843
|
}, verbiage.retryBtnText)));
|
|
6810
6844
|
};
|
|
6811
6845
|
var StyledOverlayInner$3 = styled(OverlayInner$2)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
|
|
6812
|
-
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$
|
|
6813
|
-
var Description$4 = styled.p(templateObject_3$
|
|
6846
|
+
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$C || (templateObject_2$C = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
|
|
6847
|
+
var Description$4 = styled.p(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
|
|
6814
6848
|
var RetryButton$1 = styled(LoaderButton)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
|
|
6815
|
-
var templateObject_1$J, templateObject_2$
|
|
6849
|
+
var templateObject_1$J, templateObject_2$C, templateObject_3$q, templateObject_4$j;
|
|
6816
6850
|
|
|
6817
|
-
var ExitCaptureStyledButton = styled.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index:
|
|
6851
|
+
var ExitCaptureStyledButton = styled.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
|
|
6818
6852
|
var ExitCaptureButton = function ExitCaptureButton(_a) {
|
|
6819
6853
|
var onClick = _a.onClick,
|
|
6820
6854
|
className = _a.className;
|
|
@@ -7334,20 +7368,20 @@ function IdCaptureLoadingGraphicMobile(_a) {
|
|
|
7334
7368
|
}))));
|
|
7335
7369
|
}
|
|
7336
7370
|
var LoadingGraphicWrapper = styled.div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n width: 100%;\n height: 100%;\n"])));
|
|
7337
|
-
var LoadingGraphicSvg = styled.svg(templateObject_2$
|
|
7371
|
+
var LoadingGraphicSvg = styled.svg(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"], ["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"])), function (props) {
|
|
7338
7372
|
return props.$frame > 1 ? 1 : props.$frame === 1 ? 1.25 : 0.75;
|
|
7339
7373
|
}, function (props) {
|
|
7340
7374
|
return props.$frame >= 5 ? 10 : 0;
|
|
7341
7375
|
}, function (props) {
|
|
7342
7376
|
return props.$borderColor;
|
|
7343
7377
|
});
|
|
7344
|
-
var LoadingGraphicCardGroup = styled.g(templateObject_3$
|
|
7378
|
+
var LoadingGraphicCardGroup = styled.g(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
7345
7379
|
return props.$offScreen ? '-500px' : '0';
|
|
7346
7380
|
});
|
|
7347
7381
|
var LoadingGraphicPhoneGroup = styled.g(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
7348
7382
|
return props.$offScreen ? '40px' : '0';
|
|
7349
7383
|
});
|
|
7350
|
-
var templateObject_1$H, templateObject_2$
|
|
7384
|
+
var templateObject_1$H, templateObject_2$B, templateObject_3$p, templateObject_4$i;
|
|
7351
7385
|
|
|
7352
7386
|
function LoadingListItemIndicator(_a) {
|
|
7353
7387
|
var _b = _a.state,
|
|
@@ -7402,9 +7436,11 @@ function useLoadProgressHooks(_a) {
|
|
|
7402
7436
|
var ready = _a.ready,
|
|
7403
7437
|
modelLoadState = _a.modelLoadState,
|
|
7404
7438
|
modelLoadProgress = _a.modelLoadProgress,
|
|
7439
|
+
modelError = _a.modelError,
|
|
7405
7440
|
onLoadingStarted = _a.onLoadingStarted,
|
|
7406
7441
|
onLoadingProgress = _a.onLoadingProgress,
|
|
7407
|
-
onLoadingCompleted = _a.onLoadingCompleted
|
|
7442
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7443
|
+
onLoadingFailed = _a.onLoadingFailed;
|
|
7408
7444
|
var onLoadingStartedRef = useRef(onLoadingStarted);
|
|
7409
7445
|
useEffect(function () {
|
|
7410
7446
|
onLoadingStartedRef.current = onLoadingStarted;
|
|
@@ -7417,6 +7453,10 @@ function useLoadProgressHooks(_a) {
|
|
|
7417
7453
|
useEffect(function () {
|
|
7418
7454
|
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
7419
7455
|
}, [onLoadingCompleted]);
|
|
7456
|
+
var onLoadingFailedRef = useRef(onLoadingFailed);
|
|
7457
|
+
useEffect(function () {
|
|
7458
|
+
onLoadingFailedRef.current = onLoadingFailed;
|
|
7459
|
+
}, [onLoadingFailed]);
|
|
7420
7460
|
var loadingStarted = modelLoadState !== 'not-started';
|
|
7421
7461
|
useEffect(function () {
|
|
7422
7462
|
var _a;
|
|
@@ -7432,6 +7472,12 @@ function useLoadProgressHooks(_a) {
|
|
|
7432
7472
|
var _a;
|
|
7433
7473
|
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
7434
7474
|
}, [ready]);
|
|
7475
|
+
useEffect(function () {
|
|
7476
|
+
var _a;
|
|
7477
|
+
if (modelLoadState === 'error') {
|
|
7478
|
+
(_a = onLoadingFailedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingFailedRef, modelError !== null && modelError !== void 0 ? modelError : undefined);
|
|
7479
|
+
}
|
|
7480
|
+
}, [modelLoadState, modelError]);
|
|
7435
7481
|
}
|
|
7436
7482
|
|
|
7437
7483
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
@@ -7440,6 +7486,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7440
7486
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
7441
7487
|
onLoadingProgress = _a.onLoadingProgress,
|
|
7442
7488
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7489
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
7443
7490
|
onDismissed = _a.onDismissed,
|
|
7444
7491
|
onUserCancel = _a.onUserCancel,
|
|
7445
7492
|
instructions = _a.instructions,
|
|
@@ -7460,7 +7507,8 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7460
7507
|
modelsReady = _o.ready,
|
|
7461
7508
|
modelLoadState = _o.modelLoadState,
|
|
7462
7509
|
modelDownloadProgress = _o.modelDownloadProgress,
|
|
7463
|
-
modelWarmingStartedAt = _o.modelWarmingStartedAt
|
|
7510
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt,
|
|
7511
|
+
modelError = _o.modelError;
|
|
7464
7512
|
var _p = useCameraStore(),
|
|
7465
7513
|
cameraReady = _p.cameraReady,
|
|
7466
7514
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -7504,9 +7552,11 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7504
7552
|
ready: ready,
|
|
7505
7553
|
modelLoadState: modelLoadState,
|
|
7506
7554
|
modelLoadProgress: modelLoadProgress,
|
|
7555
|
+
modelError: modelError,
|
|
7507
7556
|
onLoadingStarted: onLoadingStarted,
|
|
7508
7557
|
onLoadingProgress: onLoadingProgress,
|
|
7509
|
-
onLoadingCompleted: onLoadingCompleted
|
|
7558
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
7559
|
+
onLoadingFailed: onLoadingFailed
|
|
7510
7560
|
});
|
|
7511
7561
|
if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
7512
7562
|
if (cameraAccessDenied) {
|
|
@@ -7607,8 +7657,8 @@ var OverlayInner$1 = styled(LoadingOverlayInner)(templateObject_1$G || (template
|
|
|
7607
7657
|
var _a, _b, _c, _d;
|
|
7608
7658
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.textColor) !== null && _d !== void 0 ? _d : 'black';
|
|
7609
7659
|
});
|
|
7610
|
-
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$
|
|
7611
|
-
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$
|
|
7660
|
+
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"])));
|
|
7661
|
+
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])));
|
|
7612
7662
|
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
7613
7663
|
var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
7614
7664
|
var _a, _b, _c, _d;
|
|
@@ -7647,10 +7697,10 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_8$3 || (templateObjec
|
|
|
7647
7697
|
var _a, _b, _c, _d;
|
|
7648
7698
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
7649
7699
|
});
|
|
7650
|
-
var templateObject_1$G, templateObject_2$
|
|
7700
|
+
var templateObject_1$G, templateObject_2$A, templateObject_3$o, templateObject_4$h, templateObject_5$c, templateObject_6$8, templateObject_7$4, templateObject_8$3;
|
|
7651
7701
|
|
|
7652
7702
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
7653
|
-
var ContinuityCameraCheckbox = styled.input(templateObject_2$
|
|
7703
|
+
var ContinuityCameraCheckbox = styled.input(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
7654
7704
|
var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
7655
7705
|
var _b, _c, _d, _e;
|
|
7656
7706
|
var onDismissed = _a.onDismissed,
|
|
@@ -7771,7 +7821,7 @@ var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
|
7771
7821
|
}
|
|
7772
7822
|
}, ready ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
|
|
7773
7823
|
};
|
|
7774
|
-
var templateObject_1$F, templateObject_2$
|
|
7824
|
+
var templateObject_1$F, templateObject_2$z;
|
|
7775
7825
|
|
|
7776
7826
|
var components$1 = {
|
|
7777
7827
|
"default": IdCaptureLoadingOverlayDefault,
|
|
@@ -7830,8 +7880,8 @@ var CapturedDocumentImg = function CapturedDocumentImg(_a) {
|
|
|
7830
7880
|
};
|
|
7831
7881
|
|
|
7832
7882
|
var Card = styled.div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"], ["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"])));
|
|
7833
|
-
var FlexCard = styled(Card)(templateObject_2$
|
|
7834
|
-
var templateObject_1$E, templateObject_2$
|
|
7883
|
+
var FlexCard = styled(Card)(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
7884
|
+
var templateObject_1$E, templateObject_2$y;
|
|
7835
7885
|
|
|
7836
7886
|
var imageDisplayOrder = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage'];
|
|
7837
7887
|
var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
@@ -7894,12 +7944,12 @@ var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
|
7894
7944
|
}, verbiage.retryText)))));
|
|
7895
7945
|
};
|
|
7896
7946
|
var Heading$a = styled.h1(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"], ["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"])));
|
|
7897
|
-
var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$
|
|
7898
|
-
var ImageRow = styled(OverlayImageRow)(templateObject_3$
|
|
7947
|
+
var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"], ["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"])));
|
|
7948
|
+
var ImageRow = styled(OverlayImageRow)(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
|
|
7899
7949
|
var ImageCol$1 = styled.div(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
|
|
7900
7950
|
var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
7901
7951
|
var DebugPre = styled.pre(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
7902
|
-
var templateObject_1$D, templateObject_2$
|
|
7952
|
+
var templateObject_1$D, templateObject_2$x, templateObject_3$n, templateObject_4$g, templateObject_5$b, templateObject_6$7;
|
|
7903
7953
|
|
|
7904
7954
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
7905
7955
|
var _this = this;
|
|
@@ -7956,7 +8006,7 @@ var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$C || (temp
|
|
|
7956
8006
|
}, function (props) {
|
|
7957
8007
|
return props.$isMobile ? props.$isLandscape ? 'height: 100%;' : 'width: 80%;' : props.$isLandscape ? 'height: 70%;' : 'width: 82%;';
|
|
7958
8008
|
});
|
|
7959
|
-
var IdCardGuideImage = styled.img(templateObject_2$
|
|
8009
|
+
var IdCardGuideImage = styled.img(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
|
|
7960
8010
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
7961
8011
|
}, function (props) {
|
|
7962
8012
|
return props.$isInvisible ? 'opacity: 0;' : '';
|
|
@@ -8106,7 +8156,7 @@ function IdCardBorderSvg(_a) {
|
|
|
8106
8156
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
8107
8157
|
}));
|
|
8108
8158
|
}
|
|
8109
|
-
var IdCardBorderContainer = styled.div(templateObject_3$
|
|
8159
|
+
var IdCardBorderContainer = styled.div(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
|
|
8110
8160
|
var IdCardBorderInner = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"], ["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"])));
|
|
8111
8161
|
var SvgOverlay = styled.svg(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
|
|
8112
8162
|
var IdCardBorderRect = styled.rect(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
|
|
@@ -8116,7 +8166,7 @@ var IdCardBorderRect = styled.rect(templateObject_6$6 || (templateObject_6$6 = _
|
|
|
8116
8166
|
var _a;
|
|
8117
8167
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
8118
8168
|
});
|
|
8119
|
-
var templateObject_1$C, templateObject_2$
|
|
8169
|
+
var templateObject_1$C, templateObject_2$w, templateObject_3$m, templateObject_4$f, templateObject_5$a, templateObject_6$6;
|
|
8120
8170
|
|
|
8121
8171
|
var defaultIdCaptureGuideImages = {
|
|
8122
8172
|
portrait: {
|
|
@@ -8308,12 +8358,12 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8308
8358
|
var Wrapper$1 = styled.div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (props) {
|
|
8309
8359
|
return props.$isLandscape ? 'height: 100%;' : 'height: 100%;';
|
|
8310
8360
|
});
|
|
8311
|
-
var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_2$
|
|
8361
|
+
var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"], ["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"])), function (props) {
|
|
8312
8362
|
return props.$transitionTime;
|
|
8313
8363
|
}, function (props) {
|
|
8314
8364
|
return props.$transforms;
|
|
8315
8365
|
});
|
|
8316
|
-
var templateObject_1$B, templateObject_2$
|
|
8366
|
+
var templateObject_1$B, templateObject_2$v;
|
|
8317
8367
|
|
|
8318
8368
|
var GuideOrientationContext = /*#__PURE__*/createContext({
|
|
8319
8369
|
orientation: 'landscape',
|
|
@@ -8602,8 +8652,8 @@ var regionClsx = function regionClsx(classNames, which) {
|
|
|
8602
8652
|
}).join(' ');
|
|
8603
8653
|
};
|
|
8604
8654
|
var StyledPageContainer = styled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"], ["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"])));
|
|
8605
|
-
var GuidesContainer = styled.div(templateObject_2$
|
|
8606
|
-
var GuideCenterRow = styled.div(templateObject_3$
|
|
8655
|
+
var GuidesContainer = styled.div(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"])));
|
|
8656
|
+
var GuideCenterRow = styled.div(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"], ["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"])));
|
|
8607
8657
|
var GuideRegion = styled.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"])), function (props) {
|
|
8608
8658
|
var _a, _b, _c, _d, _e;
|
|
8609
8659
|
return (_e = (_a = props.$maskColor) !== null && _a !== void 0 ? _a : (_d = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.idCapture) === null || _c === void 0 ? void 0 : _c.guideOverlay) === null || _d === void 0 ? void 0 : _d.backgroundColor) !== null && _e !== void 0 ? _e : 'rgba(0, 0, 0, 0.5)';
|
|
@@ -8631,7 +8681,7 @@ var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTe
|
|
|
8631
8681
|
var GuideCenterInner = styled.div(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
|
|
8632
8682
|
return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
|
|
8633
8683
|
});
|
|
8634
|
-
var templateObject_1$z, templateObject_2$
|
|
8684
|
+
var templateObject_1$z, templateObject_2$u, templateObject_3$l, templateObject_4$e, templateObject_5$9, templateObject_6$5, templateObject_7$3, templateObject_8$2, templateObject_9$1;
|
|
8635
8685
|
|
|
8636
8686
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
8637
8687
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -8775,8 +8825,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8775
8825
|
var CanvasWrapper$1 = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
|
|
8776
8826
|
return props.$maskColor;
|
|
8777
8827
|
});
|
|
8778
|
-
var Canvas$1 = styled.canvas(templateObject_2$
|
|
8779
|
-
var templateObject_1$y, templateObject_2$
|
|
8828
|
+
var Canvas$1 = styled.canvas(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
8829
|
+
var templateObject_1$y, templateObject_2$t;
|
|
8780
8830
|
|
|
8781
8831
|
function IdCaptureGuides(_a) {
|
|
8782
8832
|
var _b = _a.guideType,
|
|
@@ -8857,11 +8907,11 @@ var Spinner = styled.div(templateObject_1$x || (templateObject_1$x = __makeTempl
|
|
|
8857
8907
|
var $color = _a.$color;
|
|
8858
8908
|
return $color !== null && $color !== void 0 ? $color : '#888';
|
|
8859
8909
|
}, dualRingSpinnerAnimation);
|
|
8860
|
-
var SpinnerPageContainer = styled.div(templateObject_2$
|
|
8910
|
+
var SpinnerPageContainer = styled.div(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
8861
8911
|
function SpinnerPage() {
|
|
8862
8912
|
return /*#__PURE__*/React__default.createElement(SpinnerPageContainer, null, /*#__PURE__*/React__default.createElement(Spinner, null));
|
|
8863
8913
|
}
|
|
8864
|
-
var templateObject_1$x, templateObject_2$
|
|
8914
|
+
var templateObject_1$x, templateObject_2$s;
|
|
8865
8915
|
|
|
8866
8916
|
var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
|
|
8867
8917
|
var _b = _a.classNames,
|
|
@@ -8949,10 +8999,10 @@ var SelfieProgressPreview = function SelfieProgressPreview(_a) {
|
|
|
8949
8999
|
})));
|
|
8950
9000
|
};
|
|
8951
9001
|
var StyledSpinner = styled(Spinner)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"], ["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"])));
|
|
8952
|
-
var ImagePreviewWrapper = styled.div(templateObject_2$
|
|
8953
|
-
var ImagePreviewText = styled.div(templateObject_3$
|
|
9002
|
+
var ImagePreviewWrapper = styled.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"], ["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"])));
|
|
9003
|
+
var ImagePreviewText = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"], ["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"])));
|
|
8954
9004
|
var ImagePreviewImageWrapper = styled.div(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"], ["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"])));
|
|
8955
|
-
var templateObject_1$w, templateObject_2$
|
|
9005
|
+
var templateObject_1$w, templateObject_2$r, templateObject_3$k, templateObject_4$d;
|
|
8956
9006
|
|
|
8957
9007
|
var documentCaptureInitialState = {
|
|
8958
9008
|
documents: [],
|
|
@@ -9301,8 +9351,8 @@ var DocumentCaptureGuideOverlay = function DocumentCaptureGuideOverlay(_a) {
|
|
|
9301
9351
|
var CanvasWrapper = styled.div(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"], ["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"])), function (props) {
|
|
9302
9352
|
return props.$maskColor;
|
|
9303
9353
|
});
|
|
9304
|
-
var Canvas = styled.canvas(templateObject_2$
|
|
9305
|
-
var templateObject_1$v, templateObject_2$
|
|
9354
|
+
var Canvas = styled.canvas(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
9355
|
+
var templateObject_1$v, templateObject_2$q;
|
|
9306
9356
|
|
|
9307
9357
|
var CameraFeedWrapper = styled.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
9308
9358
|
return props.$mode === 'snapToGuides' ? "display: flex;\n position: absolute;\n left: ".concat(props.$x, "px;\n top: ").concat(props.$y, "px;\n width: ").concat(props.$w, "px;\n height: ").concat(props.$h, "px;") : "";
|
|
@@ -9488,10 +9538,10 @@ var DocumentCaptureScreen = function DocumentCaptureScreen(_a) {
|
|
|
9488
9538
|
}, !cameraReady ? verbiage.loadingBtnText : capturing ? verbiage.capturingBtnText : verbiage.captureBtnText))))));
|
|
9489
9539
|
};
|
|
9490
9540
|
var CaptureContainer = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
9491
|
-
var HeadingRow = styled.div(templateObject_2$
|
|
9541
|
+
var HeadingRow = styled.div(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n background: ", ";\n text-align: center;\n color: white;\n"], ["\n background: ", ";\n text-align: center;\n color: white;\n"])), function (props) {
|
|
9492
9542
|
return props.$maskColor;
|
|
9493
9543
|
});
|
|
9494
|
-
var Heading$9 = styled.h1(templateObject_3$
|
|
9544
|
+
var Heading$9 = styled.h1(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n font-size: 22px;\n"], ["\n font-size: 22px;\n"])));
|
|
9495
9545
|
var FooterRow = styled.div(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"], ["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"])), function (props) {
|
|
9496
9546
|
return props.$maskColor;
|
|
9497
9547
|
});
|
|
@@ -9501,7 +9551,7 @@ var Instructions = styled.div(templateObject_5$8 || (templateObject_5$8 = __make
|
|
|
9501
9551
|
});
|
|
9502
9552
|
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
9503
9553
|
var PreviewImage = styled.img(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
9504
|
-
var templateObject_1$s, templateObject_2$
|
|
9554
|
+
var templateObject_1$s, templateObject_2$p, templateObject_3$j, templateObject_4$c, templateObject_5$8, templateObject_6$4, templateObject_7$2;
|
|
9505
9555
|
|
|
9506
9556
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
9507
9557
|
var onSuccess = _a.onSuccess,
|
|
@@ -9773,12 +9823,12 @@ var IdCaptureFallback = function IdCaptureFallback(_a) {
|
|
|
9773
9823
|
}, verbiage.doneBtnText))))));
|
|
9774
9824
|
};
|
|
9775
9825
|
var StyledOverlayInner$2 = styled(OverlayInner$2)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
9776
|
-
var Heading$8 = styled.h3(templateObject_2$
|
|
9777
|
-
var Description$3 = styled.p(templateObject_3$
|
|
9826
|
+
var Heading$8 = styled.h3(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9827
|
+
var Description$3 = styled.p(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9778
9828
|
var Instruction = styled.p(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
9779
9829
|
var ImageCol = styled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"])));
|
|
9780
9830
|
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
9781
|
-
var templateObject_1$r, templateObject_2$
|
|
9831
|
+
var templateObject_1$r, templateObject_2$o, templateObject_3$i, templateObject_4$b, templateObject_5$7, templateObject_6$3;
|
|
9782
9832
|
|
|
9783
9833
|
function ScalingCameraFeed() {
|
|
9784
9834
|
var _a = useIdCaptureStore(),
|
|
@@ -10134,8 +10184,8 @@ var ScreenContainer = styled.div(templateObject_1$q || (templateObject_1$q = __m
|
|
|
10134
10184
|
var _a;
|
|
10135
10185
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
10136
10186
|
});
|
|
10137
|
-
var ScreenPanel = styled.div(templateObject_2$
|
|
10138
|
-
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$
|
|
10187
|
+
var ScreenPanel = styled.div(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"])));
|
|
10188
|
+
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"], ["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"])));
|
|
10139
10189
|
var ScreenPanelHeading = styled.h3(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
10140
10190
|
var ScreenActionsBar = styled.div(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"])));
|
|
10141
10191
|
var DashedSeparator = styled.div(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
@@ -10419,13 +10469,14 @@ function humanFileSize(bytes, si, dp) {
|
|
|
10419
10469
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
10420
10470
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
10421
10471
|
}
|
|
10422
|
-
var templateObject_1$q, templateObject_2$
|
|
10472
|
+
var templateObject_1$q, templateObject_2$n, templateObject_3$h, templateObject_4$a, templateObject_5$6, templateObject_6$2, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10423
10473
|
|
|
10424
10474
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
10425
10475
|
var _b, _c, _d, _e, _f;
|
|
10426
10476
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
10427
10477
|
onLoadingProgress = _a.onLoadingProgress,
|
|
10428
10478
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
10479
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
10429
10480
|
onSuccess = _a.onSuccess,
|
|
10430
10481
|
onExitCapture = _a.onExitCapture,
|
|
10431
10482
|
onUserCancel = _a.onUserCancel,
|
|
@@ -10783,6 +10834,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10783
10834
|
onLoadingStarted: onLoadingStarted,
|
|
10784
10835
|
onLoadingProgress: onLoadingProgress,
|
|
10785
10836
|
onLoadingCompleted: onLoadingCompleted,
|
|
10837
|
+
onLoadingFailed: onLoadingFailed,
|
|
10786
10838
|
onDismissed: function onDismissed() {
|
|
10787
10839
|
setOverlayDismissed(true);
|
|
10788
10840
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -11197,8 +11249,8 @@ function HeadGuide(_a) {
|
|
|
11197
11249
|
height: parentHeight
|
|
11198
11250
|
})));
|
|
11199
11251
|
}
|
|
11200
|
-
var AbsoluteSvg = styled.svg(templateObject_2$
|
|
11201
|
-
var RelativeSvgContainer = styled.div(templateObject_3$
|
|
11252
|
+
var AbsoluteSvg = styled.svg(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"], ["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"])));
|
|
11253
|
+
var RelativeSvgContainer = styled.div(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"])), function (props) {
|
|
11202
11254
|
return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
|
|
11203
11255
|
});
|
|
11204
11256
|
function SelfieCaptureAnimatedMask(_a) {
|
|
@@ -11425,10 +11477,10 @@ function SelfieCaptureAnimatedMaskWithStatus(_a) {
|
|
|
11425
11477
|
status: status
|
|
11426
11478
|
}));
|
|
11427
11479
|
}
|
|
11428
|
-
var templateObject_1$p, templateObject_2$
|
|
11480
|
+
var templateObject_1$p, templateObject_2$m, templateObject_3$g;
|
|
11429
11481
|
|
|
11430
11482
|
var FaceCaptureGuideContainer = styled.div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"], ["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"])));
|
|
11431
|
-
var FaceCaptureGuideInner = styled.div(templateObject_2$
|
|
11483
|
+
var FaceCaptureGuideInner = styled.div(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n position: relative;\n height: 60%;\n"], ["\n position: relative;\n height: 60%;\n"])));
|
|
11432
11484
|
var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
11433
11485
|
var _b = _a.classNames,
|
|
11434
11486
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -11450,7 +11502,7 @@ var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
|
11450
11502
|
verticalAlign: "center"
|
|
11451
11503
|
})));
|
|
11452
11504
|
};
|
|
11453
|
-
var templateObject_1$o, templateObject_2$
|
|
11505
|
+
var templateObject_1$o, templateObject_2$l;
|
|
11454
11506
|
|
|
11455
11507
|
var SelfieGuidanceModelsContext = /*#__PURE__*/createContext({
|
|
11456
11508
|
start: function start() {
|
|
@@ -11779,11 +11831,11 @@ var SelfieCaptureFallback = function SelfieCaptureFallback(_a) {
|
|
|
11779
11831
|
}, !image ? invalidSelfie ? verbiage.retryButtonText : verbiage.captureBtnText : loading ? verbiage.doneBtnLoadingText : verbiage.doneBtnText)))));
|
|
11780
11832
|
};
|
|
11781
11833
|
var StyledOverlayInner$1 = styled(OverlayInner$2)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
11782
|
-
var Heading$7 = styled.h3(templateObject_2$
|
|
11783
|
-
var Description$2 = styled.p(templateObject_3$
|
|
11834
|
+
var Heading$7 = styled.h3(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
11835
|
+
var Description$2 = styled.p(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
11784
11836
|
var ImageContainer$6 = styled(OverlayImageContainer)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
11785
11837
|
var StyledButtonsRow$6 = styled(ButtonsRow$2)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
11786
|
-
var templateObject_1$n, templateObject_2$
|
|
11838
|
+
var templateObject_1$n, templateObject_2$k, templateObject_3$f, templateObject_4$9, templateObject_5$5;
|
|
11787
11839
|
|
|
11788
11840
|
var initialState$4 = {
|
|
11789
11841
|
busy: false,
|
|
@@ -11824,32 +11876,39 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11824
11876
|
guidanceMessage = _a.guidanceMessage,
|
|
11825
11877
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
11826
11878
|
guidesComponent = _a.guidesComponent,
|
|
11827
|
-
_d = _a.
|
|
11828
|
-
|
|
11829
|
-
_e = _a.
|
|
11830
|
-
|
|
11831
|
-
_f = _a.
|
|
11832
|
-
|
|
11833
|
-
_g = _a.
|
|
11834
|
-
|
|
11835
|
-
_h = _a.
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
_l =
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11879
|
+
_d = _a.allowManualSelfieCaptureOnLoadingError,
|
|
11880
|
+
allowManualSelfieCaptureOnLoadingError = _d === void 0 ? false : _d,
|
|
11881
|
+
_e = _a.shouldCapture,
|
|
11882
|
+
shouldCapture = _e === void 0 ? true : _e,
|
|
11883
|
+
_f = _a.classNames,
|
|
11884
|
+
classNames = _f === void 0 ? {} : _f,
|
|
11885
|
+
_g = _a.colors,
|
|
11886
|
+
colors = _g === void 0 ? {} : _g,
|
|
11887
|
+
_h = _a.verbiage,
|
|
11888
|
+
rawVerbiage = _h === void 0 ? {} : _h,
|
|
11889
|
+
_j = _a.debugMode,
|
|
11890
|
+
debugMode = _j === void 0 ? false : _j;
|
|
11891
|
+
var _k = useResizeObserver(),
|
|
11892
|
+
ref = _k.ref,
|
|
11893
|
+
_l = _k.width,
|
|
11894
|
+
width = _l === void 0 ? 1 : _l,
|
|
11895
|
+
_m = _k.height,
|
|
11896
|
+
height = _m === void 0 ? 1 : _m;
|
|
11897
|
+
var _o = useReducer(reducer$3, initialState$4),
|
|
11898
|
+
_p = _o[0],
|
|
11899
|
+
busy = _p.busy,
|
|
11900
|
+
prediction = _p.prediction,
|
|
11901
|
+
dispatch = _o[1];
|
|
11848
11902
|
var lastPredictionCanvas = useRef(null);
|
|
11849
|
-
var
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11903
|
+
var videoRef = useCameraStore(useShallow(function (state) {
|
|
11904
|
+
return {
|
|
11905
|
+
videoRef: state.videoRef
|
|
11906
|
+
};
|
|
11907
|
+
})).videoRef;
|
|
11908
|
+
var _q = useSelfieGuidanceModelsContext(),
|
|
11909
|
+
onPredictionMade = _q.onPredictionMade,
|
|
11910
|
+
canvasRef = _q.canvasRef,
|
|
11911
|
+
guidanceError = _q.error;
|
|
11853
11912
|
onPredictionMade(useThrottledCallback(useCallback(function (prediction) {
|
|
11854
11913
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
11855
11914
|
return __generator(this, function (_a) {
|
|
@@ -11872,31 +11931,33 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11872
11931
|
onGuidanceNotSatisfied === null || onGuidanceNotSatisfied === void 0 ? void 0 : onGuidanceNotSatisfied();
|
|
11873
11932
|
}
|
|
11874
11933
|
}, [onGuidanceNotSatisfied, onGuidanceSatisfied, prediction === null || prediction === void 0 ? void 0 : prediction.faceReady]);
|
|
11934
|
+
var doCapture = useCallback(function () {
|
|
11935
|
+
var _a;
|
|
11936
|
+
dispatch({
|
|
11937
|
+
type: 'captureStarted'
|
|
11938
|
+
});
|
|
11939
|
+
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
11940
|
+
var frame = lastPredictionCanvas.current;
|
|
11941
|
+
if (!frame) return;
|
|
11942
|
+
var ctx = frame.getContext('2d');
|
|
11943
|
+
if (!ctx) return;
|
|
11944
|
+
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
11945
|
+
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, (_a = prediction === null || prediction === void 0 ? void 0 : prediction.face) !== null && _a !== void 0 ? _a : undefined);
|
|
11946
|
+
clearCanvas(frame);
|
|
11947
|
+
dispatch({
|
|
11948
|
+
type: 'captureCompleted'
|
|
11949
|
+
});
|
|
11950
|
+
}, [onSelfieCaptureStarted, onSelfieCaptured, prediction]);
|
|
11875
11951
|
useEffect(function () {
|
|
11876
11952
|
if (!(prediction === null || prediction === void 0 ? void 0 : prediction.faceReady)) return;
|
|
11877
|
-
var timer = setTimeout(
|
|
11878
|
-
dispatch({
|
|
11879
|
-
type: 'captureStarted'
|
|
11880
|
-
});
|
|
11881
|
-
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
11882
|
-
var frame = lastPredictionCanvas.current;
|
|
11883
|
-
if (!frame) return;
|
|
11884
|
-
var ctx = frame.getContext('2d');
|
|
11885
|
-
if (!ctx) return;
|
|
11886
|
-
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
11887
|
-
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, prediction.face);
|
|
11888
|
-
clearCanvas(frame);
|
|
11889
|
-
dispatch({
|
|
11890
|
-
type: 'captureCompleted'
|
|
11891
|
-
});
|
|
11892
|
-
}, 100);
|
|
11953
|
+
var timer = setTimeout(doCapture, 100);
|
|
11893
11954
|
return function () {
|
|
11894
|
-
|
|
11955
|
+
return timer && clearTimeout(timer);
|
|
11895
11956
|
};
|
|
11896
|
-
}, [
|
|
11897
|
-
var
|
|
11898
|
-
timedOut =
|
|
11899
|
-
timeoutStartedAt =
|
|
11957
|
+
}, [doCapture, prediction]);
|
|
11958
|
+
var _r = useTimeout(timeoutDurationMs, onTimeout),
|
|
11959
|
+
timedOut = _r.timedOut,
|
|
11960
|
+
timeoutStartedAt = _r.timeoutStartedAt;
|
|
11900
11961
|
var debugScalingDetails = useDebugScalingDetails({
|
|
11901
11962
|
enabled: debugMode,
|
|
11902
11963
|
pageWidth: width,
|
|
@@ -11911,17 +11972,21 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11911
11972
|
guidanceMoveForwardText: 'Move forward...',
|
|
11912
11973
|
guidanceMoveToCenterText: 'Move to the center...',
|
|
11913
11974
|
guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
|
|
11914
|
-
guidanceNotStableText: 'Please hold still...'
|
|
11975
|
+
guidanceNotStableText: 'Please hold still...',
|
|
11976
|
+
guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
|
|
11977
|
+
manualCaptureBtnText: 'Capture'
|
|
11915
11978
|
});
|
|
11916
|
-
var
|
|
11979
|
+
var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
|
|
11980
|
+
var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
|
|
11917
11981
|
if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
|
|
11918
|
-
guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? verbiage.guidanceNotStableText : '');
|
|
11919
|
-
if (guidanceError) {
|
|
11982
|
+
guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? verbiage.guidanceNotStableText : '');
|
|
11983
|
+
if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
|
|
11920
11984
|
return /*#__PURE__*/React__default.createElement(SelfieCaptureFallback, {
|
|
11921
11985
|
classNames: classNames.fallback
|
|
11922
11986
|
});
|
|
11923
11987
|
}
|
|
11924
11988
|
var GuidesComponent = guidesComponent !== null && guidesComponent !== void 0 ? guidesComponent : FaceCaptureGuideOverlay;
|
|
11989
|
+
var guidanceVariant = allowManualCapture ? 'default' : satisfied ? 'positive' : 'negative';
|
|
11925
11990
|
return /*#__PURE__*/React__default.createElement(Container$6, {
|
|
11926
11991
|
ref: ref,
|
|
11927
11992
|
className: classNames.container
|
|
@@ -11931,28 +11996,40 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11931
11996
|
classNames: classNames.guides,
|
|
11932
11997
|
status: satisfied ? 'processing' : 'ready'
|
|
11933
11998
|
}), !!guidanceMessage && ( /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, {
|
|
11999
|
+
"$top": "12px",
|
|
11934
12000
|
className: classNames.guidanceMessageContainer
|
|
11935
12001
|
}, /*#__PURE__*/React__default.createElement(GuidanceMessage, {
|
|
11936
|
-
"$variant":
|
|
12002
|
+
"$variant": guidanceVariant,
|
|
11937
12003
|
className: classNames.guidanceMessage
|
|
11938
12004
|
}, guidanceMessage))), debugMode && (prediction === null || prediction === void 0 ? void 0 : prediction.face) && ( /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlayDiv, null, /*#__PURE__*/React__default.createElement(SelfieCaptureFaceDebugBox, {
|
|
11939
12005
|
face: prediction.face,
|
|
11940
12006
|
scaling: debugScalingDetails,
|
|
11941
12007
|
color: satisfied ? 'green' : 'red'
|
|
11942
|
-
}))), debugMode && ( /*#__PURE__*/React__default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React__default.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), /*#__PURE__*/React__default.createElement(
|
|
12008
|
+
}))), debugMode && ( /*#__PURE__*/React__default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React__default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React__default.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), allowManualCapture && ( /*#__PURE__*/React__default.createElement(CaptureButtonContainer$1, null, /*#__PURE__*/React__default.createElement(CaptureButton$1, {
|
|
12009
|
+
disabled: !videoRef.current,
|
|
12010
|
+
onClick: function onClick() {
|
|
12011
|
+
var _a;
|
|
12012
|
+
// draw the current frame from videoRef to the canvas
|
|
12013
|
+
if (!lastPredictionCanvas.current || !videoRef.current) return;
|
|
12014
|
+
lastPredictionCanvas.current.width = videoRef.current.videoWidth;
|
|
12015
|
+
lastPredictionCanvas.current.height = videoRef.current.videoHeight;
|
|
12016
|
+
var ctx = (_a = lastPredictionCanvas.current) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
12017
|
+
if (!ctx) return;
|
|
12018
|
+
ctx.drawImage(videoRef.current, 0, 0);
|
|
12019
|
+
doCapture();
|
|
12020
|
+
}
|
|
12021
|
+
}, verbiage.manualCaptureBtnText))), /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
|
|
11943
12022
|
onClick: onExit,
|
|
11944
12023
|
className: classNames.exitCaptureBtn
|
|
11945
12024
|
}));
|
|
11946
12025
|
};
|
|
11947
12026
|
var Container$6 = styled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
11948
|
-
var
|
|
12027
|
+
var CaptureButtonContainer$1 = styled.div(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"], ["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"])));
|
|
12028
|
+
var CaptureButton$1 = styled(LoaderButton)(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"], ["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"])));
|
|
12029
|
+
var templateObject_1$m, templateObject_2$j, templateObject_3$e;
|
|
11949
12030
|
|
|
11950
12031
|
var initialState$3 = {
|
|
11951
|
-
frame: null,
|
|
11952
|
-
face: null,
|
|
11953
12032
|
requestState: 'CAPTURING',
|
|
11954
|
-
requestError: null,
|
|
11955
|
-
imageUrl: null,
|
|
11956
12033
|
faceLive: false,
|
|
11957
12034
|
eyeCoveringDetected: false,
|
|
11958
12035
|
maskDetected: false,
|
|
@@ -11961,7 +12038,6 @@ var initialState$3 = {
|
|
|
11961
12038
|
timesLivenessCheckFailed: 0
|
|
11962
12039
|
};
|
|
11963
12040
|
var reducer$2 = function reducer(state, action) {
|
|
11964
|
-
var _a, _b;
|
|
11965
12041
|
switch (action.type) {
|
|
11966
12042
|
case 'resetLivenessCheck':
|
|
11967
12043
|
return _assign(_assign({}, initialState$3), {
|
|
@@ -11996,12 +12072,12 @@ var reducer$2 = function reducer(state, action) {
|
|
|
11996
12072
|
});
|
|
11997
12073
|
case 'livenessChecked':
|
|
11998
12074
|
{
|
|
11999
|
-
var
|
|
12000
|
-
|
|
12001
|
-
statusCode =
|
|
12002
|
-
statusMessage =
|
|
12003
|
-
errorData =
|
|
12004
|
-
resultData =
|
|
12075
|
+
var _a = action.payload.response,
|
|
12076
|
+
_b = _a.status,
|
|
12077
|
+
statusCode = _b.statusCode,
|
|
12078
|
+
statusMessage = _b.statusMessage,
|
|
12079
|
+
errorData = _b.errorData,
|
|
12080
|
+
resultData = _a.resultData;
|
|
12005
12081
|
if (statusCode !== '000') {
|
|
12006
12082
|
return _assign(_assign({}, state), {
|
|
12007
12083
|
requestState: 'ERROR',
|
|
@@ -12022,8 +12098,8 @@ var reducer$2 = function reducer(state, action) {
|
|
|
12022
12098
|
timesLivenessCheckFailed += 1;
|
|
12023
12099
|
}
|
|
12024
12100
|
return _assign(_assign({}, state), {
|
|
12025
|
-
frame:
|
|
12026
|
-
face:
|
|
12101
|
+
frame: action.payload.frame,
|
|
12102
|
+
face: action.payload.face,
|
|
12027
12103
|
imageUrl: action.payload.imageUrl,
|
|
12028
12104
|
requestState: requestState,
|
|
12029
12105
|
faceLive: faceLive,
|
|
@@ -12061,23 +12137,25 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12061
12137
|
silentFallback = _h === void 0 ? false : _h,
|
|
12062
12138
|
guidesComponent = _a.guidesComponent,
|
|
12063
12139
|
disableCapturePreview = _a.disableCapturePreview,
|
|
12064
|
-
_j = _a.
|
|
12065
|
-
|
|
12066
|
-
_k = _a.
|
|
12067
|
-
|
|
12068
|
-
_l = _a.
|
|
12069
|
-
|
|
12140
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12141
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
12142
|
+
_k = _a.classNames,
|
|
12143
|
+
classNames = _k === void 0 ? {} : _k,
|
|
12144
|
+
_l = _a.colors,
|
|
12145
|
+
colors = _l === void 0 ? {} : _l,
|
|
12146
|
+
_m = _a.verbiage,
|
|
12147
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
12070
12148
|
debugMode = _a.debugMode;
|
|
12071
|
-
var
|
|
12072
|
-
checkLiveness =
|
|
12073
|
-
submissionError =
|
|
12149
|
+
var _o = useContext(SubmissionContext),
|
|
12150
|
+
checkLiveness = _o.checkLiveness,
|
|
12151
|
+
submissionError = _o.submissionError;
|
|
12074
12152
|
var modelError = useSelfieGuidanceModelsContext().error;
|
|
12075
|
-
var
|
|
12076
|
-
state =
|
|
12077
|
-
dispatch =
|
|
12078
|
-
var
|
|
12079
|
-
imageUrl =
|
|
12080
|
-
setImageUrl =
|
|
12153
|
+
var _p = useReducer(reducer$2, initialState$3),
|
|
12154
|
+
state = _p[0],
|
|
12155
|
+
dispatch = _p[1];
|
|
12156
|
+
var _q = useState(null),
|
|
12157
|
+
imageUrl = _q[0],
|
|
12158
|
+
setImageUrl = _q[1];
|
|
12081
12159
|
var rawCanvas = useRef(null);
|
|
12082
12160
|
var cropCanvas = useRef(null);
|
|
12083
12161
|
var resizeCanvas = useRef(null);
|
|
@@ -12103,7 +12181,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12103
12181
|
var isPassed = state.requestState === 'PASSED';
|
|
12104
12182
|
useEffect(function checkLivenessIfPossible() {
|
|
12105
12183
|
var _this = this;
|
|
12106
|
-
if (!frame || !
|
|
12184
|
+
if (!frame || !isReady || submissionError) return;
|
|
12107
12185
|
dispatch({
|
|
12108
12186
|
type: 'livenessChecking'
|
|
12109
12187
|
});
|
|
@@ -12242,7 +12320,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12242
12320
|
});
|
|
12243
12321
|
}, []);
|
|
12244
12322
|
var initialDelayOver = useTimeout(initialCaptureDelayMs).timedOut;
|
|
12245
|
-
if (modelError) {
|
|
12323
|
+
if (modelError && !allowManualSelfieCaptureOnLoadingError) {
|
|
12246
12324
|
return /*#__PURE__*/React__default.createElement(SelfieCaptureFallback, {
|
|
12247
12325
|
key: state.timesLivenessCheckFailed,
|
|
12248
12326
|
onFinished: onFallbackImageCaptured,
|
|
@@ -12269,6 +12347,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12269
12347
|
onGuidanceSatisfied: onGuidanceSatisfied,
|
|
12270
12348
|
onGuidanceNotSatisfied: onGuidanceNotSatisfied,
|
|
12271
12349
|
guidesComponent: guidesByRequestState,
|
|
12350
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
12272
12351
|
classNames: classNames,
|
|
12273
12352
|
colors: colors,
|
|
12274
12353
|
verbiage: rawVerbiage,
|
|
@@ -12535,35 +12614,39 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12535
12614
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
12536
12615
|
onLoadingProgress = _a.onLoadingProgress,
|
|
12537
12616
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12617
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
12538
12618
|
onDismissed = _a.onDismissed,
|
|
12539
12619
|
onUserCancel = _a.onUserCancel,
|
|
12540
12620
|
customOverlayContent = _a.customOverlayContent,
|
|
12541
12621
|
_d = _a.waitForIdCaptureModels,
|
|
12542
12622
|
waitForIdCaptureModels = _d === void 0 ? false : _d,
|
|
12543
|
-
_e = _a.
|
|
12544
|
-
|
|
12545
|
-
_f = _a.
|
|
12546
|
-
|
|
12547
|
-
_g = _a.
|
|
12548
|
-
|
|
12549
|
-
_h = _a.
|
|
12550
|
-
|
|
12623
|
+
_e = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12624
|
+
allowManualSelfieCaptureOnLoadingError = _e === void 0 ? false : _e,
|
|
12625
|
+
_f = _a.assets,
|
|
12626
|
+
assets = _f === void 0 ? {} : _f,
|
|
12627
|
+
_g = _a.classNames,
|
|
12628
|
+
classNames = _g === void 0 ? {} : _g,
|
|
12629
|
+
_h = _a.colors,
|
|
12630
|
+
colors = _h === void 0 ? {} : _h,
|
|
12631
|
+
_j = _a.verbiage,
|
|
12632
|
+
rawVerbiage = _j === void 0 ? {} : _j;
|
|
12551
12633
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
12552
12634
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
12553
|
-
var
|
|
12635
|
+
var _k = useCameraStore(useShallow(function (state) {
|
|
12554
12636
|
return {
|
|
12555
12637
|
cameraReady: state.cameraReady,
|
|
12556
12638
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
12557
12639
|
microphoneAccessDenied: state.microphoneAccessDenied
|
|
12558
12640
|
};
|
|
12559
12641
|
})),
|
|
12560
|
-
cameraReady =
|
|
12561
|
-
cameraAccessDenied =
|
|
12562
|
-
microphoneAccessDenied =
|
|
12563
|
-
var
|
|
12564
|
-
modelLoadState =
|
|
12565
|
-
modelDownloadProgress =
|
|
12566
|
-
modelWarmingStartedAt =
|
|
12642
|
+
cameraReady = _k.cameraReady,
|
|
12643
|
+
cameraAccessDenied = _k.cameraAccessDenied,
|
|
12644
|
+
microphoneAccessDenied = _k.microphoneAccessDenied;
|
|
12645
|
+
var _l = useSelfieGuidanceModelsContext(),
|
|
12646
|
+
modelLoadState = _l.modelLoadState,
|
|
12647
|
+
modelDownloadProgress = _l.modelDownloadProgress,
|
|
12648
|
+
modelWarmingStartedAt = _l.modelWarmingStartedAt,
|
|
12649
|
+
modelError = _l.error;
|
|
12567
12650
|
var idCaptureModelsContext = useContext(IdCaptureModelsContext);
|
|
12568
12651
|
var theme = useTheme();
|
|
12569
12652
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -12579,9 +12662,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12579
12662
|
modelsReadyText: 'Guided capture experience ready',
|
|
12580
12663
|
sessionCheckingText: 'Authenticating...'
|
|
12581
12664
|
});
|
|
12582
|
-
var
|
|
12583
|
-
headingTextIndex =
|
|
12584
|
-
setHeadingTextIndex =
|
|
12665
|
+
var _m = useState(0),
|
|
12666
|
+
headingTextIndex = _m[0],
|
|
12667
|
+
setHeadingTextIndex = _m[1];
|
|
12585
12668
|
var headingText = [verbiage.headingText, verbiage.removeEyeCoveringsText, verbiage.avoidExcessiveBacklightingText][headingTextIndex];
|
|
12586
12669
|
useEffect(function () {
|
|
12587
12670
|
setInterval(function () {
|
|
@@ -12592,20 +12675,29 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12592
12675
|
}, []);
|
|
12593
12676
|
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
12594
12677
|
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
12595
|
-
var
|
|
12678
|
+
var _o = useState(false),
|
|
12679
|
+
overrideModelsReady = _o[0],
|
|
12680
|
+
setOverrideModelsReady = _o[1];
|
|
12681
|
+
var onLoadingFailedCallback = useCallback(function (error) {
|
|
12682
|
+
setOverrideModelsReady(allowManualSelfieCaptureOnLoadingError);
|
|
12683
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
12684
|
+
}, [onLoadingFailed, allowManualSelfieCaptureOnLoadingError]);
|
|
12685
|
+
var allModelsReady = overrideModelsReady || modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12596
12686
|
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12597
12687
|
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
12598
12688
|
useLoadProgressHooks({
|
|
12599
12689
|
ready: ready,
|
|
12600
12690
|
modelLoadState: modelLoadState,
|
|
12601
12691
|
modelLoadProgress: modelLoadProgress,
|
|
12692
|
+
modelError: modelError,
|
|
12602
12693
|
onLoadingStarted: onLoadingStarted,
|
|
12603
12694
|
onLoadingProgress: onLoadingProgress,
|
|
12604
|
-
onLoadingCompleted: onLoadingCompleted
|
|
12695
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
12696
|
+
onLoadingFailed: onLoadingFailedCallback
|
|
12605
12697
|
});
|
|
12606
|
-
var
|
|
12607
|
-
dismissed =
|
|
12608
|
-
setDismissed =
|
|
12698
|
+
var _p = useState(false),
|
|
12699
|
+
dismissed = _p[0],
|
|
12700
|
+
setDismissed = _p[1];
|
|
12609
12701
|
if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
12610
12702
|
if (cameraAccessDenied) {
|
|
12611
12703
|
return /*#__PURE__*/React__default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -12746,6 +12838,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12746
12838
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
12747
12839
|
onLoadingProgress = _a.onLoadingProgress,
|
|
12748
12840
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12841
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
12749
12842
|
onComplete = _a.onComplete,
|
|
12750
12843
|
onSuccess = _a.onSuccess,
|
|
12751
12844
|
onFailure = _a.onFailure,
|
|
@@ -12779,49 +12872,51 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12779
12872
|
waitForIdCaptureModels = _m === void 0 ? false : _m,
|
|
12780
12873
|
guidesComponent = _a.guidesComponent,
|
|
12781
12874
|
disableCapturePreview = _a.disableCapturePreview,
|
|
12782
|
-
_o = _a.
|
|
12783
|
-
|
|
12784
|
-
_p = _a.
|
|
12785
|
-
|
|
12786
|
-
_q = _a.
|
|
12787
|
-
|
|
12788
|
-
_r = _a.
|
|
12789
|
-
|
|
12790
|
-
_s = _a.
|
|
12791
|
-
|
|
12792
|
-
_t = _a.
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12875
|
+
_o = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12876
|
+
allowManualSelfieCaptureOnLoadingError = _o === void 0 ? false : _o,
|
|
12877
|
+
_p = _a.assets,
|
|
12878
|
+
assets = _p === void 0 ? {} : _p,
|
|
12879
|
+
_q = _a.classNames,
|
|
12880
|
+
classNames = _q === void 0 ? {} : _q,
|
|
12881
|
+
_r = _a.colors,
|
|
12882
|
+
colors = _r === void 0 ? {} : _r,
|
|
12883
|
+
_s = _a.verbiage,
|
|
12884
|
+
verbiage = _s === void 0 ? {} : _s,
|
|
12885
|
+
_t = _a.debugMode,
|
|
12886
|
+
debugMode = _t === void 0 ? false : _t,
|
|
12887
|
+
_u = _a.showLoadingOverlay,
|
|
12888
|
+
showLoadingOverlay = _u === void 0 ? true : _u;
|
|
12889
|
+
var _v = useSubmissionContext(),
|
|
12890
|
+
submissionResponse = _v.submissionResponse,
|
|
12891
|
+
livenessCheckRequest = _v.livenessCheckRequest,
|
|
12892
|
+
setSelfieImage = _v.setSelfieImage,
|
|
12893
|
+
logSelfieCaptureAttempt = _v.logSelfieCaptureAttempt;
|
|
12894
|
+
var _w = useCameraStore(useShallow(function (state) {
|
|
12800
12895
|
return {
|
|
12801
12896
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
12802
12897
|
requestCameraAccess: state.requestCameraAccess,
|
|
12803
12898
|
releaseCameraAccess: state.releaseCameraAccess
|
|
12804
12899
|
};
|
|
12805
12900
|
})),
|
|
12806
|
-
cameraAccessDenied =
|
|
12807
|
-
requestCameraAccess =
|
|
12808
|
-
releaseCameraAccess =
|
|
12809
|
-
var
|
|
12810
|
-
faceCropImageUrl =
|
|
12811
|
-
setFaceCropImageUrl =
|
|
12812
|
-
var
|
|
12813
|
-
retryCount =
|
|
12814
|
-
setRetryCount =
|
|
12815
|
-
var
|
|
12816
|
-
captureState =
|
|
12817
|
-
setCaptureState =
|
|
12901
|
+
cameraAccessDenied = _w.cameraAccessDenied,
|
|
12902
|
+
requestCameraAccess = _w.requestCameraAccess,
|
|
12903
|
+
releaseCameraAccess = _w.releaseCameraAccess;
|
|
12904
|
+
var _x = useState(''),
|
|
12905
|
+
faceCropImageUrl = _x[0],
|
|
12906
|
+
setFaceCropImageUrl = _x[1];
|
|
12907
|
+
var _y = useState(0),
|
|
12908
|
+
retryCount = _y[0],
|
|
12909
|
+
setRetryCount = _y[1];
|
|
12910
|
+
var _z = useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
12911
|
+
captureState = _z[0],
|
|
12912
|
+
setCaptureState = _z[1];
|
|
12818
12913
|
var captureStartedAt = useRef();
|
|
12819
12914
|
var operationStartedAt = useRef();
|
|
12820
12915
|
var livenessScore = useRef();
|
|
12821
|
-
var
|
|
12822
|
-
start =
|
|
12823
|
-
stop =
|
|
12824
|
-
selfieGuidanceCanvasRef =
|
|
12916
|
+
var _0 = useSelfieGuidanceModelsContext(),
|
|
12917
|
+
start = _0.start,
|
|
12918
|
+
stop = _0.stop,
|
|
12919
|
+
selfieGuidanceCanvasRef = _0.canvasRef;
|
|
12825
12920
|
useEffect(function () {
|
|
12826
12921
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
12827
12922
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -12904,9 +12999,9 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12904
12999
|
}
|
|
12905
13000
|
onDenied === null || onDenied === void 0 ? void 0 : onDenied(submissionResponse, livenessCheckRequest);
|
|
12906
13001
|
}, [allowLivenessFailure, onDenied, submissionResponse, livenessCheckRequest]);
|
|
12907
|
-
var
|
|
12908
|
-
attempt =
|
|
12909
|
-
setAttempt =
|
|
13002
|
+
var _1 = useState(0),
|
|
13003
|
+
attempt = _1[0],
|
|
13004
|
+
setAttempt = _1[1];
|
|
12910
13005
|
var onExitCallback = useCallback(function () {
|
|
12911
13006
|
setAttempt(function (n) {
|
|
12912
13007
|
return n + 1;
|
|
@@ -12974,6 +13069,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12974
13069
|
silentFallback: silentFallback,
|
|
12975
13070
|
guidesComponent: guidesComponent,
|
|
12976
13071
|
disableCapturePreview: disableCapturePreview,
|
|
13072
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
12977
13073
|
classNames: classNames.capture,
|
|
12978
13074
|
colors: colors,
|
|
12979
13075
|
verbiage: verbiage,
|
|
@@ -13016,9 +13112,11 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
13016
13112
|
onLoadingStarted: onLoadingStarted,
|
|
13017
13113
|
onLoadingProgress: onLoadingProgress,
|
|
13018
13114
|
onLoadingCompleted: onLoadingCompleted,
|
|
13115
|
+
onLoadingFailed: onLoadingFailed,
|
|
13019
13116
|
onUserCancel: onUserCancel,
|
|
13020
13117
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
13021
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
13118
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
13119
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
13022
13120
|
})));
|
|
13023
13121
|
};
|
|
13024
13122
|
function FaceLivenessWizardWithProviders(_a) {
|
|
@@ -13974,8 +14072,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13974
14072
|
setTimeout(startHeadTracking, 1);
|
|
13975
14073
|
return stopHeadTracking;
|
|
13976
14074
|
}, [startHeadTracking, stopHeadTracking]);
|
|
13977
|
-
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
13978
|
-
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
13979
14075
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13980
14076
|
guidanceMessageText: 'Please sign the box below'
|
|
13981
14077
|
});
|
|
@@ -14023,7 +14119,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
14023
14119
|
ref: ref,
|
|
14024
14120
|
className: classNames.container
|
|
14025
14121
|
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, {
|
|
14026
|
-
"$top": "
|
|
14122
|
+
"$top": "12px",
|
|
14027
14123
|
className: classNames.guidanceMessageContainer
|
|
14028
14124
|
}, /*#__PURE__*/React__default.createElement(GuidanceMessage, {
|
|
14029
14125
|
className: classNames.guidanceMessage,
|
|
@@ -14113,6 +14209,7 @@ function SelfieCaptureWizard(_a) {
|
|
|
14113
14209
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
14114
14210
|
onLoadingProgress = _a.onLoadingProgress,
|
|
14115
14211
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14212
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
14116
14213
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
14117
14214
|
onCapture = _a.onCapture,
|
|
14118
14215
|
onUserCancel = _a.onUserCancel,
|
|
@@ -14131,43 +14228,45 @@ function SelfieCaptureWizard(_a) {
|
|
|
14131
14228
|
initialCaptureDelayMs = _g === void 0 ? 1000 : _g,
|
|
14132
14229
|
_h = _a.silentFallback,
|
|
14133
14230
|
silentFallback = _h === void 0 ? false : _h,
|
|
14231
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
14232
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
14134
14233
|
guidanceMessage = _a.guidanceMessage,
|
|
14135
14234
|
guidesComponent = _a.guidesComponent,
|
|
14136
|
-
|
|
14137
|
-
assets =
|
|
14138
|
-
|
|
14139
|
-
classNames =
|
|
14140
|
-
|
|
14141
|
-
colors =
|
|
14142
|
-
|
|
14143
|
-
verbiage =
|
|
14144
|
-
|
|
14145
|
-
debugMode =
|
|
14146
|
-
var
|
|
14147
|
-
setSelfieImage =
|
|
14148
|
-
logSelfieCaptureAttempt =
|
|
14149
|
-
var
|
|
14235
|
+
_k = _a.assets,
|
|
14236
|
+
assets = _k === void 0 ? {} : _k,
|
|
14237
|
+
_l = _a.classNames,
|
|
14238
|
+
classNames = _l === void 0 ? {} : _l,
|
|
14239
|
+
_m = _a.colors,
|
|
14240
|
+
colors = _m === void 0 ? {} : _m,
|
|
14241
|
+
_o = _a.verbiage,
|
|
14242
|
+
verbiage = _o === void 0 ? {} : _o,
|
|
14243
|
+
_p = _a.debugMode,
|
|
14244
|
+
debugMode = _p === void 0 ? false : _p;
|
|
14245
|
+
var _q = useSubmissionContext(),
|
|
14246
|
+
setSelfieImage = _q.setSelfieImage,
|
|
14247
|
+
logSelfieCaptureAttempt = _q.logSelfieCaptureAttempt;
|
|
14248
|
+
var _r = useCameraStore(useShallow(function (state) {
|
|
14150
14249
|
return {
|
|
14151
14250
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
14152
14251
|
requestCameraAccess: state.requestCameraAccess,
|
|
14153
14252
|
releaseCameraAccess: state.releaseCameraAccess
|
|
14154
14253
|
};
|
|
14155
14254
|
})),
|
|
14156
|
-
cameraAccessDenied =
|
|
14157
|
-
requestCameraAccess =
|
|
14158
|
-
releaseCameraAccess =
|
|
14159
|
-
var
|
|
14160
|
-
captureState =
|
|
14161
|
-
setCaptureState =
|
|
14255
|
+
cameraAccessDenied = _r.cameraAccessDenied,
|
|
14256
|
+
requestCameraAccess = _r.requestCameraAccess,
|
|
14257
|
+
releaseCameraAccess = _r.releaseCameraAccess;
|
|
14258
|
+
var _s = useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
14259
|
+
captureState = _s[0],
|
|
14260
|
+
setCaptureState = _s[1];
|
|
14162
14261
|
var rawCanvas = useRef(null);
|
|
14163
14262
|
var cropCanvas = useRef(null);
|
|
14164
14263
|
var resizeCanvas = useRef(null);
|
|
14165
14264
|
var captureStartedAt = useRef();
|
|
14166
14265
|
var operationStartedAt = useRef();
|
|
14167
|
-
var
|
|
14168
|
-
start =
|
|
14169
|
-
stop =
|
|
14170
|
-
modelError =
|
|
14266
|
+
var _t = useSelfieGuidanceModelsContext(),
|
|
14267
|
+
start = _t.start,
|
|
14268
|
+
stop = _t.stop,
|
|
14269
|
+
modelError = _t.error;
|
|
14171
14270
|
useEffect(function () {
|
|
14172
14271
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
14173
14272
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -14215,9 +14314,9 @@ function SelfieCaptureWizard(_a) {
|
|
|
14215
14314
|
status: status
|
|
14216
14315
|
}));
|
|
14217
14316
|
}, [captureState, guidesComponent]);
|
|
14218
|
-
var
|
|
14219
|
-
attempt =
|
|
14220
|
-
setAttempt =
|
|
14317
|
+
var _u = useState(0),
|
|
14318
|
+
attempt = _u[0],
|
|
14319
|
+
setAttempt = _u[1];
|
|
14221
14320
|
var onExitCallback = useCallback(function () {
|
|
14222
14321
|
setAttempt(function (n) {
|
|
14223
14322
|
return n + 1;
|
|
@@ -14236,6 +14335,9 @@ function SelfieCaptureWizard(_a) {
|
|
|
14236
14335
|
}
|
|
14237
14336
|
}, [cameraAccessDenied]);
|
|
14238
14337
|
var initialDelayOver = useTimeout(initialCaptureDelayMs, undefined, undefined, undefined, captureState === 'CAPTURING').timedOut;
|
|
14338
|
+
var onLoadingFailedCallback = useCallback(function (error) {
|
|
14339
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
14340
|
+
}, [onLoadingFailed]);
|
|
14239
14341
|
if (modelError) {
|
|
14240
14342
|
return /*#__PURE__*/React__default.createElement(SelfieCaptureFallback, {
|
|
14241
14343
|
onFinished: onFallbackImageCaptured,
|
|
@@ -14260,6 +14362,7 @@ function SelfieCaptureWizard(_a) {
|
|
|
14260
14362
|
guidanceMessage: guidanceMessage,
|
|
14261
14363
|
guidanceSatisfied: guidanceMessage ? false : undefined,
|
|
14262
14364
|
guidesComponent: guidesByRequestState,
|
|
14365
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14263
14366
|
classNames: classNames.capture,
|
|
14264
14367
|
colors: colors.capture,
|
|
14265
14368
|
verbiage: verbiage.capture,
|
|
@@ -14275,9 +14378,11 @@ function SelfieCaptureWizard(_a) {
|
|
|
14275
14378
|
onLoadingStarted: onLoadingStarted,
|
|
14276
14379
|
onLoadingProgress: onLoadingProgress,
|
|
14277
14380
|
onLoadingCompleted: onLoadingCompleted,
|
|
14381
|
+
onLoadingFailed: onLoadingFailedCallback,
|
|
14278
14382
|
onUserCancel: onUserCancel,
|
|
14279
14383
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
14280
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
14384
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
14385
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
14281
14386
|
})));
|
|
14282
14387
|
}
|
|
14283
14388
|
|
|
@@ -14287,6 +14392,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14287
14392
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
14288
14393
|
onLoadingProgress = _a.onLoadingProgress,
|
|
14289
14394
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14395
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
14290
14396
|
onSelfieCaptured = _a.onSelfieCaptured,
|
|
14291
14397
|
onComplete = _a.onComplete,
|
|
14292
14398
|
onVideoCaptured = _a.onVideoCaptured,
|
|
@@ -14315,39 +14421,41 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14315
14421
|
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
14316
14422
|
_l = _a.skipLivenessValidation,
|
|
14317
14423
|
skipLivenessValidation = _l === void 0 ? false : _l,
|
|
14424
|
+
_m = _a.allowManualSelfieCaptureOnLoadingError,
|
|
14425
|
+
allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
|
|
14318
14426
|
faceLivenessProps = _a.faceLivenessProps,
|
|
14319
14427
|
guidesComponent = _a.guidesComponent,
|
|
14320
|
-
|
|
14321
|
-
assets =
|
|
14322
|
-
|
|
14323
|
-
classNames =
|
|
14324
|
-
|
|
14325
|
-
colors =
|
|
14326
|
-
|
|
14327
|
-
verbiage =
|
|
14328
|
-
|
|
14329
|
-
debugMode =
|
|
14330
|
-
var
|
|
14331
|
-
selfieImage =
|
|
14332
|
-
setSelfieImage =
|
|
14333
|
-
setSignatureData =
|
|
14334
|
-
setSignatureVideoUrl =
|
|
14335
|
-
logSelfieCaptureAttempt =
|
|
14336
|
-
uploadDocument =
|
|
14428
|
+
_o = _a.assets,
|
|
14429
|
+
assets = _o === void 0 ? {} : _o,
|
|
14430
|
+
_p = _a.classNames,
|
|
14431
|
+
classNames = _p === void 0 ? {} : _p,
|
|
14432
|
+
_q = _a.colors,
|
|
14433
|
+
colors = _q === void 0 ? {} : _q,
|
|
14434
|
+
_r = _a.verbiage,
|
|
14435
|
+
verbiage = _r === void 0 ? {} : _r,
|
|
14436
|
+
_s = _a.debugMode,
|
|
14437
|
+
debugMode = _s === void 0 ? false : _s;
|
|
14438
|
+
var _t = useSubmissionContext(),
|
|
14439
|
+
selfieImage = _t.selfieImage,
|
|
14440
|
+
setSelfieImage = _t.setSelfieImage,
|
|
14441
|
+
setSignatureData = _t.setSignatureData,
|
|
14442
|
+
setSignatureVideoUrl = _t.setSignatureVideoUrl,
|
|
14443
|
+
logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
|
|
14444
|
+
uploadDocument = _t.uploadDocument;
|
|
14337
14445
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
14338
14446
|
return {
|
|
14339
14447
|
cameraAccessDenied: state.cameraAccessDenied
|
|
14340
14448
|
};
|
|
14341
14449
|
})).cameraAccessDenied;
|
|
14342
|
-
var
|
|
14343
|
-
captureState =
|
|
14344
|
-
setCaptureState =
|
|
14450
|
+
var _u = useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
|
|
14451
|
+
captureState = _u[0],
|
|
14452
|
+
setCaptureState = _u[1];
|
|
14345
14453
|
var operationStartedAt = useRef();
|
|
14346
14454
|
var captureStartedAt = useRef();
|
|
14347
14455
|
var captureEndedAt = useRef();
|
|
14348
|
-
var
|
|
14349
|
-
start =
|
|
14350
|
-
stop =
|
|
14456
|
+
var _v = useSelfieGuidanceModelsContext(),
|
|
14457
|
+
start = _v.start,
|
|
14458
|
+
stop = _v.stop;
|
|
14351
14459
|
useEffect(function () {
|
|
14352
14460
|
operationStartedAt.current = new Date();
|
|
14353
14461
|
}, []);
|
|
@@ -14391,9 +14499,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14391
14499
|
filetype: 'image/jpeg'
|
|
14392
14500
|
}).then(onSelfieCaptured);
|
|
14393
14501
|
}, [logCaptureMetadata, onSelfieCaptured, setSelfieImage, uploadDocument]);
|
|
14394
|
-
var
|
|
14395
|
-
signatureImageUrl =
|
|
14396
|
-
setSignatureImageUrl =
|
|
14502
|
+
var _w = useState(null),
|
|
14503
|
+
signatureImageUrl = _w[0],
|
|
14504
|
+
setSignatureImageUrl = _w[1];
|
|
14397
14505
|
var onSignatureCaptureCompleted = useCallback(function (videoData, signatureData, signatureImageData) {
|
|
14398
14506
|
setSignatureData(signatureData);
|
|
14399
14507
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -14401,17 +14509,17 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14401
14509
|
setCaptureState('SUCCESS');
|
|
14402
14510
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
14403
14511
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
14404
|
-
var
|
|
14405
|
-
showLoadingOverlay =
|
|
14406
|
-
setShowLoadingOverlay =
|
|
14512
|
+
var _x = useState(true),
|
|
14513
|
+
showLoadingOverlay = _x[0],
|
|
14514
|
+
setShowLoadingOverlay = _x[1];
|
|
14407
14515
|
var onSignatureCaptureFacesNotDetected = useCallback(function () {
|
|
14408
14516
|
setShowLoadingOverlay(false);
|
|
14409
14517
|
setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
|
|
14410
14518
|
useVideoSignatureStore.getState().clearRecordedData();
|
|
14411
14519
|
}, [skipLivenessValidation]);
|
|
14412
|
-
var
|
|
14413
|
-
attempt =
|
|
14414
|
-
setAttempt =
|
|
14520
|
+
var _y = useState(0),
|
|
14521
|
+
attempt = _y[0],
|
|
14522
|
+
setAttempt = _y[1];
|
|
14415
14523
|
var onRetry = useCallback(function () {
|
|
14416
14524
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
14417
14525
|
setAttempt(function (n) {
|
|
@@ -14471,6 +14579,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14471
14579
|
onLoadingStarted: onLoadingStarted,
|
|
14472
14580
|
onLoadingProgress: onLoadingProgress,
|
|
14473
14581
|
onLoadingCompleted: onLoadingCompleted,
|
|
14582
|
+
onLoadingFailed: onLoadingFailed,
|
|
14474
14583
|
onSuccess: onFaceCaptureSuccess,
|
|
14475
14584
|
onExitCapture: onExitCapture,
|
|
14476
14585
|
onUserCancel: onUserCancel,
|
|
@@ -14479,6 +14588,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14479
14588
|
showLoadingOverlay: showLoadingOverlay,
|
|
14480
14589
|
customOverlayContent: customOverlayContent,
|
|
14481
14590
|
loadingOverlayMode: loadingOverlayMode,
|
|
14591
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14482
14592
|
guidesComponent: resolvedGuidesComponent,
|
|
14483
14593
|
assets: assets.faceLiveness,
|
|
14484
14594
|
classNames: classNames.faceLiveness,
|
|
@@ -14494,6 +14604,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14494
14604
|
onLoadingStarted: onLoadingStarted,
|
|
14495
14605
|
onLoadingProgress: onLoadingProgress,
|
|
14496
14606
|
onLoadingCompleted: onLoadingCompleted,
|
|
14607
|
+
onLoadingFailed: onLoadingFailed,
|
|
14497
14608
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
14498
14609
|
onCapture: onSelfieCapture,
|
|
14499
14610
|
onUserCancel: onUserCancel,
|
|
@@ -14501,6 +14612,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14501
14612
|
showLoadingOverlay: showLoadingOverlay,
|
|
14502
14613
|
customOverlayContent: customOverlayContent,
|
|
14503
14614
|
loadingOverlayMode: loadingOverlayMode,
|
|
14615
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14504
14616
|
guidesComponent: resolvedGuidesComponent,
|
|
14505
14617
|
assets: assets.faceLiveness,
|
|
14506
14618
|
classNames: classNames.faceLiveness,
|
|
@@ -15469,6 +15581,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15469
15581
|
onLoadingStarted = _a.onLoadingStarted,
|
|
15470
15582
|
onLoadingProgress = _a.onLoadingProgress,
|
|
15471
15583
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15584
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
15472
15585
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
15473
15586
|
_t = _a.idDocumentType,
|
|
15474
15587
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -15630,6 +15743,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15630
15743
|
onLoadingStarted: onLoadingStarted,
|
|
15631
15744
|
onLoadingProgress: onLoadingProgress,
|
|
15632
15745
|
onLoadingCompleted: onLoadingCompleted,
|
|
15746
|
+
onLoadingFailed: onLoadingFailed,
|
|
15633
15747
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15634
15748
|
silentFallback: silentFallback,
|
|
15635
15749
|
guideImages: idCaptureGuideImages
|
|
@@ -15657,6 +15771,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15657
15771
|
onLoadingStarted: onLoadingStarted,
|
|
15658
15772
|
onLoadingProgress: onLoadingProgress,
|
|
15659
15773
|
onLoadingCompleted: onLoadingCompleted,
|
|
15774
|
+
onLoadingFailed: onLoadingFailed,
|
|
15660
15775
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15661
15776
|
silentFallback: silentFallback
|
|
15662
15777
|
}, faceLivenessProps, {
|
|
@@ -16007,7 +16122,7 @@ var defaultTheme = {
|
|
|
16007
16122
|
},
|
|
16008
16123
|
guidanceMessages: {
|
|
16009
16124
|
"default": {
|
|
16010
|
-
backgroundColor: '
|
|
16125
|
+
backgroundColor: 'white',
|
|
16011
16126
|
textColor: 'black'
|
|
16012
16127
|
},
|
|
16013
16128
|
positive: {
|
|
@@ -16241,6 +16356,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16241
16356
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16242
16357
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16243
16358
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16359
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16244
16360
|
onAuthError = _a.onAuthError,
|
|
16245
16361
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
16246
16362
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
@@ -16287,6 +16403,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16287
16403
|
onLoadingStarted: onLoadingStarted,
|
|
16288
16404
|
onLoadingProgress: onLoadingProgress,
|
|
16289
16405
|
onLoadingCompleted: onLoadingCompleted,
|
|
16406
|
+
onLoadingFailed: onLoadingFailed,
|
|
16290
16407
|
onExitCapture: onExitCapture,
|
|
16291
16408
|
onUserCancel: onUserCancel,
|
|
16292
16409
|
onModelError: onModelError,
|
|
@@ -16318,7 +16435,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16318
16435
|
verbiage: verbiage,
|
|
16319
16436
|
debugMode: debugMode
|
|
16320
16437
|
};
|
|
16321
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
16438
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
16322
16439
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
16323
16440
|
return {
|
|
16324
16441
|
documents: captureAdditionalDocuments,
|
|
@@ -16451,6 +16568,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16451
16568
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16452
16569
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16453
16570
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16571
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16454
16572
|
onAuthError = _a.onAuthError,
|
|
16455
16573
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16456
16574
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16491,6 +16609,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16491
16609
|
onLoadingStarted: onLoadingStarted,
|
|
16492
16610
|
onLoadingProgress: onLoadingProgress,
|
|
16493
16611
|
onLoadingCompleted: onLoadingCompleted,
|
|
16612
|
+
onLoadingFailed: onLoadingFailed,
|
|
16494
16613
|
onComplete: onComplete,
|
|
16495
16614
|
onSuccess: onApproved,
|
|
16496
16615
|
onDenied: onDenied,
|
|
@@ -16504,7 +16623,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16504
16623
|
verbiage: verbiage,
|
|
16505
16624
|
debugMode: debugMode
|
|
16506
16625
|
};
|
|
16507
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16626
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16508
16627
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
16509
16628
|
sessionId: sessionId,
|
|
16510
16629
|
authUrl: authUrl,
|
|
@@ -16631,6 +16750,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16631
16750
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16632
16751
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16633
16752
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16753
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16634
16754
|
onAuthError = _a.onAuthError,
|
|
16635
16755
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16636
16756
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -16679,6 +16799,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16679
16799
|
onLoadingStarted: onLoadingStarted,
|
|
16680
16800
|
onLoadingProgress: onLoadingProgress,
|
|
16681
16801
|
onLoadingCompleted: onLoadingCompleted,
|
|
16802
|
+
onLoadingFailed: onLoadingFailed,
|
|
16682
16803
|
onExitCapture: onExitCapture,
|
|
16683
16804
|
onUserCancel: onUserCancel,
|
|
16684
16805
|
onModelError: onIdCaptureModelError,
|
|
@@ -16706,12 +16827,13 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16706
16827
|
skipSuccessScreen: skipSuccessScreen,
|
|
16707
16828
|
debugMode: debugMode
|
|
16708
16829
|
};
|
|
16709
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
16830
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
16710
16831
|
var faceLivenessProps = useMemo(function () {
|
|
16711
16832
|
return {
|
|
16712
16833
|
onLoadingStarted: onLoadingStarted,
|
|
16713
16834
|
onLoadingProgress: onLoadingProgress,
|
|
16714
16835
|
onLoadingCompleted: onLoadingCompleted,
|
|
16836
|
+
onLoadingFailed: onLoadingFailed,
|
|
16715
16837
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
16716
16838
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
16717
16839
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -16729,7 +16851,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16729
16851
|
verbiage: verbiage.faceLiveness,
|
|
16730
16852
|
debugMode: debugMode
|
|
16731
16853
|
};
|
|
16732
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16854
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16733
16855
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
16734
16856
|
return {
|
|
16735
16857
|
documents: captureAdditionalDocuments,
|
|
@@ -16909,6 +17031,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16909
17031
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16910
17032
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16911
17033
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17034
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16912
17035
|
onAuthError = _a.onAuthError,
|
|
16913
17036
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16914
17037
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16959,6 +17082,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16959
17082
|
onLoadingStarted: onLoadingStarted,
|
|
16960
17083
|
onLoadingProgress: onLoadingProgress,
|
|
16961
17084
|
onLoadingCompleted: onLoadingCompleted,
|
|
17085
|
+
onLoadingFailed: onLoadingFailed,
|
|
16962
17086
|
assets: assets.idCapture,
|
|
16963
17087
|
classNames: classNames.idCapture,
|
|
16964
17088
|
colors: colors.idCapture,
|
|
@@ -16986,12 +17110,13 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16986
17110
|
skipSuccessScreen: skipSuccessScreen,
|
|
16987
17111
|
debugMode: debugMode
|
|
16988
17112
|
};
|
|
16989
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
17113
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
16990
17114
|
var faceLivenessProps = useMemo(function () {
|
|
16991
17115
|
return {
|
|
16992
17116
|
onLoadingStarted: onLoadingStarted,
|
|
16993
17117
|
onLoadingProgress: onLoadingProgress,
|
|
16994
17118
|
onLoadingCompleted: onLoadingCompleted,
|
|
17119
|
+
onLoadingFailed: onLoadingFailed,
|
|
16995
17120
|
onExitCapture: onExitCapture,
|
|
16996
17121
|
onExitAfterFailure: onExitAfterFailure,
|
|
16997
17122
|
onUserCancel: onUserCancel,
|
|
@@ -17008,7 +17133,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
17008
17133
|
verbiage: verbiage.faceLiveness,
|
|
17009
17134
|
debugMode: debugMode
|
|
17010
17135
|
};
|
|
17011
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
17136
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
17012
17137
|
var videoIdCaptureProps = useMemo(function () {
|
|
17013
17138
|
return _assign({
|
|
17014
17139
|
onExitCapture: onExitCapture,
|
|
@@ -17128,11 +17253,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
17128
17253
|
|
|
17129
17254
|
var ALLOWED_RETRIES$3 = 0;
|
|
17130
17255
|
var initialState$1 = {
|
|
17131
|
-
frame: null,
|
|
17132
|
-
face: null,
|
|
17133
|
-
imageUrl: null,
|
|
17134
17256
|
requestState: 'CAPTURING',
|
|
17135
|
-
requestError: null,
|
|
17136
17257
|
unverifiedTimes: 0
|
|
17137
17258
|
};
|
|
17138
17259
|
var reducer$1 = function reducer(state, action) {
|
|
@@ -17223,7 +17344,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
|
|
|
17223
17344
|
submissionError = _j.submissionError,
|
|
17224
17345
|
selfieImage = _j.selfieImage,
|
|
17225
17346
|
setSelfieImage = _j.setSelfieImage;
|
|
17226
|
-
var _k = useState(
|
|
17347
|
+
var _k = useState(),
|
|
17227
17348
|
imageUrl = _k[0],
|
|
17228
17349
|
setImageUrl = _k[1];
|
|
17229
17350
|
var rawCanvas = useRef(null);
|
|
@@ -17243,9 +17364,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
|
|
|
17243
17364
|
if (!frame || !face || submissionError) return;
|
|
17244
17365
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
17245
17366
|
setImageUrl(imageUrl);
|
|
17246
|
-
dataUrlToBase64(imageUrl).then(
|
|
17247
|
-
setSelfieImage(img);
|
|
17248
|
-
});
|
|
17367
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
17249
17368
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
17250
17369
|
useEffect(function () {
|
|
17251
17370
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -17427,6 +17546,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17427
17546
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
17428
17547
|
onLoadingProgress = _a.onLoadingProgress,
|
|
17429
17548
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17549
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
17430
17550
|
onComplete = _a.onComplete,
|
|
17431
17551
|
onCustomerMatched = _a.onCustomerMatched,
|
|
17432
17552
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -17575,6 +17695,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17575
17695
|
onLoadingStarted: onLoadingStarted,
|
|
17576
17696
|
onLoadingProgress: onLoadingProgress,
|
|
17577
17697
|
onLoadingCompleted: onLoadingCompleted,
|
|
17698
|
+
onLoadingFailed: onLoadingFailed,
|
|
17578
17699
|
onUserCancel: onUserCancel,
|
|
17579
17700
|
onDismissed: function onDismissed() {
|
|
17580
17701
|
return setCaptureState('CAPTURING');
|
|
@@ -17622,6 +17743,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17622
17743
|
onLoadingStarted = _a.onLoadingStarted,
|
|
17623
17744
|
onLoadingProgress = _a.onLoadingProgress,
|
|
17624
17745
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17746
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
17625
17747
|
onAuthError = _a.onAuthError,
|
|
17626
17748
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17627
17749
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -17695,6 +17817,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17695
17817
|
onLoadingStarted: onLoadingStarted,
|
|
17696
17818
|
onLoadingProgress: onLoadingProgress,
|
|
17697
17819
|
onLoadingCompleted: onLoadingCompleted,
|
|
17820
|
+
onLoadingFailed: onLoadingFailed,
|
|
17698
17821
|
onComplete: onComplete,
|
|
17699
17822
|
onCustomerMatched: onCustomerMatched,
|
|
17700
17823
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17714,11 +17837,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17714
17837
|
|
|
17715
17838
|
var ALLOWED_RETRIES$1 = 0;
|
|
17716
17839
|
var initialState = {
|
|
17717
|
-
frame: null,
|
|
17718
|
-
face: null,
|
|
17719
|
-
imageUrl: null,
|
|
17720
17840
|
requestState: 'CAPTURING',
|
|
17721
|
-
requestError: null,
|
|
17722
17841
|
notFoundTimes: 0
|
|
17723
17842
|
};
|
|
17724
17843
|
var reducer = function reducer(state, action) {
|
|
@@ -17805,7 +17924,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
|
|
|
17805
17924
|
submissionError = _j.submissionError,
|
|
17806
17925
|
selfieImage = _j.selfieImage,
|
|
17807
17926
|
setSelfieImage = _j.setSelfieImage;
|
|
17808
|
-
var _k = useState(
|
|
17927
|
+
var _k = useState(),
|
|
17809
17928
|
imageUrl = _k[0],
|
|
17810
17929
|
setImageUrl = _k[1];
|
|
17811
17930
|
var rawCanvas = useRef(null);
|
|
@@ -17827,9 +17946,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
|
|
|
17827
17946
|
if (!frame || !face || submissionError) return;
|
|
17828
17947
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
17829
17948
|
setImageUrl(imageUrl);
|
|
17830
|
-
dataUrlToBase64(imageUrl).then(
|
|
17831
|
-
setSelfieImage(img);
|
|
17832
|
-
});
|
|
17949
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
17833
17950
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
17834
17951
|
useEffect(function () {
|
|
17835
17952
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -18011,6 +18128,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
18011
18128
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
18012
18129
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18013
18130
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18131
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18014
18132
|
onComplete = _a.onComplete,
|
|
18015
18133
|
onCustomerMatched = _a.onCustomerMatched,
|
|
18016
18134
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -18159,6 +18277,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
18159
18277
|
onLoadingStarted: onLoadingStarted,
|
|
18160
18278
|
onLoadingProgress: onLoadingProgress,
|
|
18161
18279
|
onLoadingCompleted: onLoadingCompleted,
|
|
18280
|
+
onLoadingFailed: onLoadingFailed,
|
|
18162
18281
|
onUserCancel: onUserCancel,
|
|
18163
18282
|
onDismissed: function onDismissed() {
|
|
18164
18283
|
setCaptureState('CAPTURING');
|
|
@@ -18199,6 +18318,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
18199
18318
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18200
18319
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18201
18320
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18321
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18202
18322
|
onAuthError = _a.onAuthError,
|
|
18203
18323
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18204
18324
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18277,6 +18397,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
18277
18397
|
onLoadingStarted: onLoadingStarted,
|
|
18278
18398
|
onLoadingProgress: onLoadingProgress,
|
|
18279
18399
|
onLoadingCompleted: onLoadingCompleted,
|
|
18400
|
+
onLoadingFailed: onLoadingFailed,
|
|
18280
18401
|
onComplete: onComplete,
|
|
18281
18402
|
onCustomerMatched: onCustomerMatched,
|
|
18282
18403
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -18311,6 +18432,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18311
18432
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18312
18433
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18313
18434
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18435
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18314
18436
|
onAuthError = _a.onAuthError,
|
|
18315
18437
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18316
18438
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18351,16 +18473,18 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18351
18473
|
faceLivenessProps = _a.faceLivenessProps,
|
|
18352
18474
|
_o = _a.skipLivenessValidation,
|
|
18353
18475
|
skipLivenessValidation = _o === void 0 ? false : _o,
|
|
18476
|
+
_p = _a.allowManualSelfieCaptureOnLoadingError,
|
|
18477
|
+
allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
|
|
18354
18478
|
guidesComponent = _a.guidesComponent,
|
|
18355
|
-
|
|
18356
|
-
theme =
|
|
18479
|
+
_q = _a.theme,
|
|
18480
|
+
theme = _q === void 0 ? 'default' : _q,
|
|
18357
18481
|
classNames = _a.classNames,
|
|
18358
18482
|
colors = _a.colors,
|
|
18359
18483
|
verbiage = _a.verbiage,
|
|
18360
18484
|
geolocationEnabled = _a.geolocationEnabled,
|
|
18361
18485
|
geolocationRequired = _a.geolocationRequired,
|
|
18362
|
-
|
|
18363
|
-
debugMode =
|
|
18486
|
+
_r = _a.debugMode,
|
|
18487
|
+
debugMode = _r === void 0 ? false : _r;
|
|
18364
18488
|
useLanguage(lang);
|
|
18365
18489
|
useDebugLogging(debugMode);
|
|
18366
18490
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
@@ -18403,6 +18527,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18403
18527
|
onLoadingStarted: onLoadingStarted,
|
|
18404
18528
|
onLoadingProgress: onLoadingProgress,
|
|
18405
18529
|
onLoadingCompleted: onLoadingCompleted,
|
|
18530
|
+
onLoadingFailed: onLoadingFailed,
|
|
18406
18531
|
onSelfieCaptured: onSelfieCaptured,
|
|
18407
18532
|
customOverlayContent: customOverlayContent,
|
|
18408
18533
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
@@ -18418,6 +18543,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18418
18543
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
18419
18544
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
18420
18545
|
skipLivenessValidation: skipLivenessValidation,
|
|
18546
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
18421
18547
|
guidesComponent: guidesComponent,
|
|
18422
18548
|
classNames: classNames,
|
|
18423
18549
|
colors: colors,
|
|
@@ -18426,7 +18552,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18426
18552
|
onModelError: onModelError,
|
|
18427
18553
|
onUserCancel: onUserCancel
|
|
18428
18554
|
};
|
|
18429
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18555
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18430
18556
|
})))));
|
|
18431
18557
|
};
|
|
18432
18558
|
|
|
@@ -18467,6 +18593,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18467
18593
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18468
18594
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18469
18595
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18596
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18470
18597
|
onAuthError = _a.onAuthError,
|
|
18471
18598
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18472
18599
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18555,6 +18682,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18555
18682
|
onLoadingStarted: onLoadingStarted,
|
|
18556
18683
|
onLoadingProgress: onLoadingProgress,
|
|
18557
18684
|
onLoadingCompleted: onLoadingCompleted,
|
|
18685
|
+
onLoadingFailed: onLoadingFailed,
|
|
18558
18686
|
idCaptureProps: idCaptureProps,
|
|
18559
18687
|
faceLivenessProps: faceLivenessProps,
|
|
18560
18688
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -18587,7 +18715,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18587
18715
|
verbiage: verbiage,
|
|
18588
18716
|
debugMode: debugMode
|
|
18589
18717
|
};
|
|
18590
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
18718
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
18591
18719
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
18592
18720
|
return {
|
|
18593
18721
|
documents: captureAdditionalDocuments,
|
|
@@ -18714,6 +18842,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18714
18842
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18715
18843
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18716
18844
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18845
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18717
18846
|
onAuthError = _a.onAuthError,
|
|
18718
18847
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18719
18848
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18760,6 +18889,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18760
18889
|
onLoadingStarted: onLoadingStarted,
|
|
18761
18890
|
onLoadingProgress: onLoadingProgress,
|
|
18762
18891
|
onLoadingCompleted: onLoadingCompleted,
|
|
18892
|
+
onLoadingFailed: onLoadingFailed,
|
|
18763
18893
|
onExitCapture: onExitCapture,
|
|
18764
18894
|
onUserCancel: onUserCancel,
|
|
18765
18895
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -18775,7 +18905,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18775
18905
|
verbiage: verbiage.faceLiveness,
|
|
18776
18906
|
debugMode: debugMode
|
|
18777
18907
|
};
|
|
18778
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18908
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18779
18909
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
18780
18910
|
return {
|
|
18781
18911
|
documents: captureAdditionalDocuments,
|