idmission-web-sdk 2.3.6 → 2.3.8
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/overlay.d.ts +12 -4
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +6 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +6 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +4 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +4 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts +3 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts +3 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +3 -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/SelfieGuidanceModelsProvider.d.ts +3 -0
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +4 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/DocumentDetection.d.ts +3 -0
- package/dist/lib/models/DocumentDetection.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts +3 -0
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/Focus.d.ts +3 -0
- package/dist/lib/models/Focus.d.ts.map +1 -1
- package/dist/lib/models/helpers.d.ts +1 -0
- package/dist/lib/models/helpers.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +10 -0
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -0
- package/dist/sdk2.cjs.development.js +349 -117
- 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 +349 -117
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +349 -117
- 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
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.8';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -482,8 +482,8 @@
|
|
|
482
482
|
var OverlayImageContainer = styled.div(templateObject_3$r || (templateObject_3$r = __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"])));
|
|
483
483
|
var OverlayImageRow = styled.div(templateObject_4$l || (templateObject_4$l = __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"])));
|
|
484
484
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
485
|
-
var ButtonsColumn = styled.div(templateObject_6$
|
|
486
|
-
var WideButton = styled(LoaderButton)(templateObject_7$
|
|
485
|
+
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"])));
|
|
486
|
+
var WideButton = styled(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
|
|
487
487
|
var WideBorderButton = styled(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
488
488
|
var _a, _b;
|
|
489
489
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.textColor) !== null && _b !== void 0 ? _b : 'black';
|
|
@@ -494,8 +494,8 @@
|
|
|
494
494
|
var _a, _b;
|
|
495
495
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.borderColor) !== null && _b !== void 0 ? _b : 'var(--idm-color-secondary-500)';
|
|
496
496
|
});
|
|
497
|
-
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$
|
|
498
|
-
var LoadingOverlayHeader = styled.div(templateObject_10$
|
|
497
|
+
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"])));
|
|
498
|
+
var LoadingOverlayHeader = styled.div(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"])), function (props) {
|
|
499
499
|
var _a;
|
|
500
500
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
501
501
|
}, function (props) {
|
|
@@ -503,17 +503,25 @@
|
|
|
503
503
|
});
|
|
504
504
|
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 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 padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\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"])));
|
|
505
505
|
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"])));
|
|
506
|
-
var LoadingOverlayProgressBarBackground = styled.div(
|
|
507
|
-
|
|
506
|
+
var LoadingOverlayProgressBarBackground = styled.div.attrs({
|
|
507
|
+
className: 'loading-overlay-progress-bar-background'
|
|
508
|
+
})(templateObject_13$1 || (templateObject_13$1 = __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"])));
|
|
509
|
+
var LoadingOverlayProgressBar = styled.span.attrs({
|
|
510
|
+
className: 'loading-overlay-progress-bar'
|
|
511
|
+
})(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"])), function (props) {
|
|
508
512
|
return props.$progress;
|
|
509
513
|
});
|
|
510
|
-
var LoadingOverlayProgressIndicator = styled.span(
|
|
514
|
+
var LoadingOverlayProgressIndicator = styled.span.attrs({
|
|
515
|
+
className: 'loading-overlay-progress-indicator'
|
|
516
|
+
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation);
|
|
511
517
|
var LoadingOverlayButtonsRow = styled(ButtonsRow$2)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"])));
|
|
512
518
|
var LoadingOverlayLoadingListContainer = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n position: relative;\n z-index: 2;\n"], ["\n display: flex;\n position: relative;\n z-index: 2;\n"])));
|
|
513
519
|
var LoadingOverlayLoadingList = styled.ul(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"], ["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"])));
|
|
514
520
|
var LoadingOverlayLoadingListItem = styled.li(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"], ["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"])));
|
|
515
521
|
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"])));
|
|
516
|
-
var
|
|
522
|
+
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
523
|
+
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
524
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$9, templateObject_7$6, templateObject_8$4, templateObject_9$3, 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;
|
|
517
525
|
|
|
518
526
|
function _extends() {
|
|
519
527
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -8377,19 +8385,23 @@
|
|
|
8377
8385
|
videoRef = _a.videoRef,
|
|
8378
8386
|
_d = _a.shouldLoadModels,
|
|
8379
8387
|
shouldLoadModels = _d === void 0 ? true : _d;
|
|
8380
|
-
var _e = React.useState(
|
|
8381
|
-
|
|
8382
|
-
|
|
8388
|
+
var _e = React.useState('not-started'),
|
|
8389
|
+
modelLoadState = _e[0],
|
|
8390
|
+
setModelLoadState = _e[1];
|
|
8383
8391
|
var _f = React.useState(0),
|
|
8384
8392
|
modelDownloadProgress = _f[0],
|
|
8385
8393
|
setModelDownloadProgress = _f[1];
|
|
8386
8394
|
var _g = React.useState(null),
|
|
8387
|
-
|
|
8388
|
-
|
|
8395
|
+
modelWarmingStartedAt = _g[0],
|
|
8396
|
+
setModelWarmingStartedAt = _g[1];
|
|
8397
|
+
var _h = React.useState(null),
|
|
8398
|
+
modelError = _h[0],
|
|
8399
|
+
setModelError = _h[1];
|
|
8389
8400
|
React.useEffect(function loadModel() {
|
|
8390
8401
|
var _this = this;
|
|
8391
8402
|
if (!shouldLoadModels) return;
|
|
8392
|
-
|
|
8403
|
+
setModelLoadState('downloading');
|
|
8404
|
+
setModelWarmingStartedAt(null);
|
|
8393
8405
|
function handleDownloadProgress(event) {
|
|
8394
8406
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
8395
8407
|
}
|
|
@@ -8406,6 +8418,8 @@
|
|
|
8406
8418
|
case 0:
|
|
8407
8419
|
setModelDownloadProgress(100);
|
|
8408
8420
|
clearTimeout(modelLoadTimeout);
|
|
8421
|
+
setModelLoadState('warming');
|
|
8422
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
8409
8423
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8410
8424
|
cancelled = false;
|
|
8411
8425
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8418,7 +8432,7 @@
|
|
|
8418
8432
|
setTimeout(function () {
|
|
8419
8433
|
if (cancelled) return;
|
|
8420
8434
|
loadedModel.classifyForVideo(videoRef.current, performance.now());
|
|
8421
|
-
|
|
8435
|
+
setModelLoadState('ready');
|
|
8422
8436
|
}, 500);
|
|
8423
8437
|
return [2 /*return*/];
|
|
8424
8438
|
}
|
|
@@ -8426,6 +8440,7 @@
|
|
|
8426
8440
|
});
|
|
8427
8441
|
})["catch"](function (e) {
|
|
8428
8442
|
setModelError(e);
|
|
8443
|
+
setModelLoadState('error');
|
|
8429
8444
|
})["finally"](function () {
|
|
8430
8445
|
clearTimeout(modelLoadTimeout);
|
|
8431
8446
|
});
|
|
@@ -8440,11 +8455,15 @@
|
|
|
8440
8455
|
React.useEffect(function handleModelError() {
|
|
8441
8456
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
8442
8457
|
}, [modelError, onModelError]);
|
|
8443
|
-
return {
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8458
|
+
return React.useMemo(function () {
|
|
8459
|
+
return {
|
|
8460
|
+
ready: modelLoadState === 'ready',
|
|
8461
|
+
modelLoadState: modelLoadState,
|
|
8462
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
8463
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
8464
|
+
modelError: modelError
|
|
8465
|
+
};
|
|
8466
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
8448
8467
|
}
|
|
8449
8468
|
var lastFocusPredictionAt = 0;
|
|
8450
8469
|
var lastFocusPredictionTime = 0;
|
|
@@ -8536,18 +8555,22 @@
|
|
|
8536
8555
|
_b = _a.modelLoadTimeoutMs,
|
|
8537
8556
|
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b,
|
|
8538
8557
|
videoRef = _a.videoRef;
|
|
8539
|
-
var _c = React.useState(
|
|
8540
|
-
|
|
8541
|
-
|
|
8558
|
+
var _c = React.useState('not-started'),
|
|
8559
|
+
modelLoadState = _c[0],
|
|
8560
|
+
setModelLoadState = _c[1];
|
|
8542
8561
|
var _d = React.useState(0),
|
|
8543
8562
|
modelDownloadProgress = _d[0],
|
|
8544
8563
|
setModelDownloadProgress = _d[1];
|
|
8545
8564
|
var _e = React.useState(null),
|
|
8546
|
-
|
|
8547
|
-
|
|
8565
|
+
modelWarmingStartedAt = _e[0],
|
|
8566
|
+
setModelWarmingStartedAt = _e[1];
|
|
8567
|
+
var _f = React.useState(null),
|
|
8568
|
+
modelError = _f[0],
|
|
8569
|
+
setModelError = _f[1];
|
|
8548
8570
|
React.useEffect(function loadModel() {
|
|
8549
8571
|
var _this = this;
|
|
8550
|
-
|
|
8572
|
+
setModelLoadState('downloading');
|
|
8573
|
+
setModelWarmingStartedAt(null);
|
|
8551
8574
|
var modelLoadTimeout = setTimeout(function () {
|
|
8552
8575
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
8553
8576
|
}, modelLoadTimeoutMs);
|
|
@@ -8564,6 +8587,8 @@
|
|
|
8564
8587
|
case 0:
|
|
8565
8588
|
setModelDownloadProgress(100);
|
|
8566
8589
|
clearTimeout(modelLoadTimeout);
|
|
8590
|
+
setModelLoadState('warming');
|
|
8591
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
8567
8592
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8568
8593
|
cancelled = false;
|
|
8569
8594
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8575,13 +8600,14 @@
|
|
|
8575
8600
|
_b.sent();
|
|
8576
8601
|
if (cancelled) return [2 /*return*/];
|
|
8577
8602
|
model.detectForVideo(videoRef.current, performance.now());
|
|
8578
|
-
|
|
8603
|
+
setModelLoadState('ready');
|
|
8579
8604
|
return [2 /*return*/];
|
|
8580
8605
|
}
|
|
8581
8606
|
});
|
|
8582
8607
|
});
|
|
8583
8608
|
})["catch"](function (e) {
|
|
8584
8609
|
setModelError(e);
|
|
8610
|
+
setModelLoadState('error');
|
|
8585
8611
|
})["finally"](function () {
|
|
8586
8612
|
clearTimeout(modelLoadTimeout);
|
|
8587
8613
|
});
|
|
@@ -8596,11 +8622,15 @@
|
|
|
8596
8622
|
React.useEffect(function handleModelError() {
|
|
8597
8623
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
8598
8624
|
}, [modelError, onModelError]);
|
|
8599
|
-
return {
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8625
|
+
return React.useMemo(function () {
|
|
8626
|
+
return {
|
|
8627
|
+
ready: modelLoadState === 'ready',
|
|
8628
|
+
modelLoadState: modelLoadState,
|
|
8629
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
8630
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
8631
|
+
modelError: modelError
|
|
8632
|
+
};
|
|
8633
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
8604
8634
|
}
|
|
8605
8635
|
var lastFaceDetectionAt = 0;
|
|
8606
8636
|
var lastFaceDetectionTime = 0;
|
|
@@ -9042,19 +9072,23 @@
|
|
|
9042
9072
|
scoreThreshold = _e === void 0 ? defaultDocumentDetectionScoreThreshold : _e,
|
|
9043
9073
|
onModelError = _a.onModelError,
|
|
9044
9074
|
videoRef = _a.videoRef;
|
|
9045
|
-
var _f = React.useState(
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
var _g = React.useState(
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
var _h = React.useState(
|
|
9052
|
-
|
|
9053
|
-
|
|
9075
|
+
var _f = React.useState('not-started'),
|
|
9076
|
+
modelLoadState = _f[0],
|
|
9077
|
+
setModelLoadState = _f[1];
|
|
9078
|
+
var _g = React.useState(null),
|
|
9079
|
+
modelWarmingStartedAt = _g[0],
|
|
9080
|
+
setModelWarmingStartedAt = _g[1];
|
|
9081
|
+
var _h = React.useState(0),
|
|
9082
|
+
modelDownloadProgress = _h[0],
|
|
9083
|
+
setModelDownloadProgress = _h[1];
|
|
9084
|
+
var _j = React.useState(null),
|
|
9085
|
+
modelError = _j[0],
|
|
9086
|
+
setModelError = _j[1];
|
|
9054
9087
|
React.useEffect(function loadModel() {
|
|
9055
9088
|
var _this = this;
|
|
9056
9089
|
if (!shouldLoadModels) return;
|
|
9057
|
-
|
|
9090
|
+
setModelLoadState('downloading');
|
|
9091
|
+
setModelWarmingStartedAt(null);
|
|
9058
9092
|
function handleDownloadProgress(event) {
|
|
9059
9093
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
9060
9094
|
}
|
|
@@ -9070,6 +9104,8 @@
|
|
|
9070
9104
|
switch (_b.label) {
|
|
9071
9105
|
case 0:
|
|
9072
9106
|
setModelDownloadProgress(100);
|
|
9107
|
+
setModelLoadState('warming');
|
|
9108
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
9073
9109
|
clearTimeout(modelLoadTimeout);
|
|
9074
9110
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
9075
9111
|
cancelled = false;
|
|
@@ -9083,7 +9119,7 @@
|
|
|
9083
9119
|
setTimeout(function () {
|
|
9084
9120
|
if (cancelled) return;
|
|
9085
9121
|
model.detectForVideo(videoRef.current, performance.now());
|
|
9086
|
-
|
|
9122
|
+
setModelLoadState('ready');
|
|
9087
9123
|
}, 500);
|
|
9088
9124
|
return [2 /*return*/];
|
|
9089
9125
|
}
|
|
@@ -9091,6 +9127,7 @@
|
|
|
9091
9127
|
});
|
|
9092
9128
|
})["catch"](function (e) {
|
|
9093
9129
|
setModelError(e);
|
|
9130
|
+
setModelLoadState('error');
|
|
9094
9131
|
})["finally"](function () {
|
|
9095
9132
|
clearTimeout(modelLoadTimeout);
|
|
9096
9133
|
});
|
|
@@ -9105,12 +9142,16 @@
|
|
|
9105
9142
|
React.useEffect(function handleModelError() {
|
|
9106
9143
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
9107
9144
|
}, [modelError, onModelError]);
|
|
9108
|
-
return {
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9145
|
+
return React.useMemo(function () {
|
|
9146
|
+
return {
|
|
9147
|
+
ready: modelLoadState === 'ready',
|
|
9148
|
+
modelLoadState: modelLoadState,
|
|
9149
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
9150
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
9151
|
+
modelError: modelError,
|
|
9152
|
+
setModelError: setModelError
|
|
9153
|
+
};
|
|
9154
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
9114
9155
|
}
|
|
9115
9156
|
function makeDocumentDetectorPrediction(frame) {
|
|
9116
9157
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -13929,8 +13970,9 @@
|
|
|
13929
13970
|
loadDocumentDetectionModel: function loadDocumentDetectionModel() {
|
|
13930
13971
|
return null;
|
|
13931
13972
|
},
|
|
13932
|
-
|
|
13973
|
+
documentDetectionModelState: 'not-started',
|
|
13933
13974
|
documentDetectionModelDownloadProgress: 0,
|
|
13975
|
+
documentDetectionModelWarmingStartedAt: null,
|
|
13934
13976
|
documentDetectionModelError: null,
|
|
13935
13977
|
onDocumentDetected: function onDocumentDetected() {
|
|
13936
13978
|
return null;
|
|
@@ -14003,7 +14045,9 @@
|
|
|
14003
14045
|
shouldLoadModels: shouldLoadModels
|
|
14004
14046
|
}),
|
|
14005
14047
|
ready = _q.ready,
|
|
14048
|
+
modelLoadState = _q.modelLoadState,
|
|
14006
14049
|
modelDownloadProgress = _q.modelDownloadProgress,
|
|
14050
|
+
modelWarmingStartedAt = _q.modelWarmingStartedAt,
|
|
14007
14051
|
modelError = _q.modelError,
|
|
14008
14052
|
setModelError = _q.setModelError;
|
|
14009
14053
|
var _r = useFrameLoop(React.useCallback(function (frameId, timeRunning) {
|
|
@@ -14070,7 +14114,8 @@
|
|
|
14070
14114
|
startDocumentDetection: start,
|
|
14071
14115
|
stopDocumentDetection: stop,
|
|
14072
14116
|
loadDocumentDetectionModel: load,
|
|
14073
|
-
|
|
14117
|
+
documentDetectionModelState: modelLoadState,
|
|
14118
|
+
documentDetectionModelWarmingStartedAt: modelWarmingStartedAt,
|
|
14074
14119
|
documentDetectionModelError: modelError,
|
|
14075
14120
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
14076
14121
|
onDocumentDetected: onDocumentDetected,
|
|
@@ -14082,7 +14127,7 @@
|
|
|
14082
14127
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
14083
14128
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
14084
14129
|
};
|
|
14085
|
-
}, [start, stop, load,
|
|
14130
|
+
}, [start, stop, load, modelLoadState, modelWarmingStartedAt, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
14086
14131
|
return /*#__PURE__*/React__namespace.createElement(DocumentDetectionModelContext.Provider, {
|
|
14087
14132
|
value: value
|
|
14088
14133
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -14095,8 +14140,9 @@
|
|
|
14095
14140
|
loadFocusModel: function loadFocusModel() {
|
|
14096
14141
|
return null;
|
|
14097
14142
|
},
|
|
14098
|
-
|
|
14143
|
+
focusModelState: 'not-started',
|
|
14099
14144
|
focusModelDownloadProgress: 0,
|
|
14145
|
+
focusModelWarmingStartedAt: null,
|
|
14100
14146
|
focusModelError: null,
|
|
14101
14147
|
focusThresholds: {},
|
|
14102
14148
|
setFocusThresholds: function setFocusThresholds() {
|
|
@@ -14138,7 +14184,9 @@
|
|
|
14138
14184
|
shouldLoadModels: shouldLoadModels
|
|
14139
14185
|
}),
|
|
14140
14186
|
ready = _h.ready,
|
|
14187
|
+
modelLoadState = _h.modelLoadState,
|
|
14141
14188
|
modelDownloadProgress = _h.modelDownloadProgress,
|
|
14189
|
+
modelWarmingStartedAt = _h.modelWarmingStartedAt,
|
|
14142
14190
|
modelError = _h.modelError;
|
|
14143
14191
|
var makeFocusPrediction = React.useCallback(function (imageData, box) {
|
|
14144
14192
|
if (!ready) return null;
|
|
@@ -14150,15 +14198,16 @@
|
|
|
14150
14198
|
var value = React.useMemo(function () {
|
|
14151
14199
|
return {
|
|
14152
14200
|
loadFocusModel: load,
|
|
14153
|
-
|
|
14201
|
+
focusModelState: modelLoadState,
|
|
14154
14202
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
14203
|
+
focusModelWarmingStartedAt: modelWarmingStartedAt,
|
|
14155
14204
|
focusModelError: modelError,
|
|
14156
14205
|
makeFocusPrediction: makeFocusPrediction,
|
|
14157
14206
|
focusPredictionTime: lastFocusPredictionTime,
|
|
14158
14207
|
focusThresholds: focusThresholds,
|
|
14159
14208
|
setFocusThresholds: setFocusThresholds
|
|
14160
14209
|
};
|
|
14161
|
-
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError,
|
|
14210
|
+
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError, modelLoadState, modelWarmingStartedAt]);
|
|
14162
14211
|
return /*#__PURE__*/React.createElement(FocusModelContext.Provider, {
|
|
14163
14212
|
value: value
|
|
14164
14213
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -14223,6 +14272,8 @@
|
|
|
14223
14272
|
return null;
|
|
14224
14273
|
},
|
|
14225
14274
|
modelDownloadProgress: 0,
|
|
14275
|
+
modelLoadState: 'not-started',
|
|
14276
|
+
modelWarmingStartedAt: null,
|
|
14226
14277
|
modelError: null,
|
|
14227
14278
|
thresholds: defaultIdCaptureThresholds,
|
|
14228
14279
|
setThresholds: function setThresholds() {
|
|
@@ -14257,8 +14308,9 @@
|
|
|
14257
14308
|
_b = _a.allowSinglePageIdCapture,
|
|
14258
14309
|
allowSinglePageIdCapture = _b === void 0 ? false : _b;
|
|
14259
14310
|
var _c = React.useContext(DocumentDetectionModelContext),
|
|
14260
|
-
|
|
14311
|
+
documentDetectionModelState = _c.documentDetectionModelState,
|
|
14261
14312
|
documentDetectionModelDownloadProgress = _c.documentDetectionModelDownloadProgress,
|
|
14313
|
+
documentDetectionModelWarmingStartedAt = _c.documentDetectionModelWarmingStartedAt,
|
|
14262
14314
|
startDocumentDetection = _c.startDocumentDetection,
|
|
14263
14315
|
stopDocumentDetection = _c.stopDocumentDetection,
|
|
14264
14316
|
loadDocumentDetectionModel = _c.loadDocumentDetectionModel,
|
|
@@ -14273,8 +14325,9 @@
|
|
|
14273
14325
|
documentDetectionModelError = _c.documentDetectionModelError;
|
|
14274
14326
|
var _d = React.useContext(FocusModelContext),
|
|
14275
14327
|
loadFocusModel = _d.loadFocusModel,
|
|
14276
|
-
|
|
14328
|
+
focusModelState = _d.focusModelState,
|
|
14277
14329
|
focusModelDownloadProgress = _d.focusModelDownloadProgress,
|
|
14330
|
+
focusModelWarmingStartedAt = _d.focusModelWarmingStartedAt,
|
|
14278
14331
|
makeFocusPrediction = _d.makeFocusPrediction,
|
|
14279
14332
|
focusThresholds = _d.focusThresholds,
|
|
14280
14333
|
setFocusThresholds = _d.setFocusThresholds,
|
|
@@ -14382,10 +14435,17 @@
|
|
|
14382
14435
|
loadDocumentDetectionModel();
|
|
14383
14436
|
loadFocusModel();
|
|
14384
14437
|
}, [loadDocumentDetectionModel, loadFocusModel]);
|
|
14438
|
+
var ready = documentDetectionModelState === 'ready' && focusModelState === 'ready';
|
|
14439
|
+
var modelLoadState = ready ? 'ready' : documentDetectionModelState === 'warming' || focusModelState === 'warming' ? 'warming' : focusModelState === 'downloading' || documentDetectionModelState === 'downloading' ? 'downloading' : 'not-started';
|
|
14440
|
+
var modelWarmingStartedAt = !documentDetectionModelWarmingStartedAt && !focusModelWarmingStartedAt ? null : Math.min.apply(Math, [documentDetectionModelWarmingStartedAt, focusModelWarmingStartedAt].filter(function (v) {
|
|
14441
|
+
return v !== null;
|
|
14442
|
+
}));
|
|
14385
14443
|
var value = React.useMemo(function () {
|
|
14386
14444
|
return {
|
|
14387
|
-
ready:
|
|
14445
|
+
ready: ready,
|
|
14388
14446
|
modelDownloadProgress: (documentDetectionModelDownloadProgress + focusModelDownloadProgress) / 2,
|
|
14447
|
+
modelLoadState: modelLoadState,
|
|
14448
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
14389
14449
|
modelError: modelError,
|
|
14390
14450
|
start: startDocumentDetection,
|
|
14391
14451
|
stop: stopDocumentDetection,
|
|
@@ -14403,7 +14463,7 @@
|
|
|
14403
14463
|
requiredDocumentType: requiredDocumentType,
|
|
14404
14464
|
setRequiredDocumentType: setRequiredDocumentType
|
|
14405
14465
|
};
|
|
14406
|
-
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress,
|
|
14466
|
+
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress, focusModelDownloadProgress, focusPredictionTime, getBestFrame, load, modelLoadState, modelError, modelWarmingStartedAt, onPredictionMade, ready, requiredDocumentType, resetBestFrame, setDocumentDetectionBoundaries, setThresholds, startDocumentDetection, stopDocumentDetection, thresholds]);
|
|
14407
14467
|
return /*#__PURE__*/React.createElement(IdCaptureModelsContext.Provider, {
|
|
14408
14468
|
value: value
|
|
14409
14469
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -16421,10 +16481,49 @@
|
|
|
16421
16481
|
}))))));
|
|
16422
16482
|
}
|
|
16423
16483
|
|
|
16484
|
+
function useLoadProgressHooks(_a) {
|
|
16485
|
+
var ready = _a.ready,
|
|
16486
|
+
modelLoadState = _a.modelLoadState,
|
|
16487
|
+
modelLoadProgress = _a.modelLoadProgress,
|
|
16488
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16489
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16490
|
+
onLoadingCompleted = _a.onLoadingCompleted;
|
|
16491
|
+
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
16492
|
+
React.useEffect(function () {
|
|
16493
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
16494
|
+
}, [onLoadingStarted]);
|
|
16495
|
+
var onLoadingProgressRef = React.useRef(onLoadingProgress);
|
|
16496
|
+
React.useEffect(function () {
|
|
16497
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
16498
|
+
}, [onLoadingProgress]);
|
|
16499
|
+
var onLoadingCompletedRef = React.useRef(onLoadingCompleted);
|
|
16500
|
+
React.useEffect(function () {
|
|
16501
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
16502
|
+
}, [onLoadingCompleted]);
|
|
16503
|
+
var loadingStarted = modelLoadState !== 'not-started';
|
|
16504
|
+
React.useEffect(function () {
|
|
16505
|
+
var _a;
|
|
16506
|
+
if (loadingStarted) (_a = onLoadingStartedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingStartedRef);
|
|
16507
|
+
}, [loadingStarted]);
|
|
16508
|
+
React.useEffect(function () {
|
|
16509
|
+
var _a;
|
|
16510
|
+
if (modelLoadProgress > 0) {
|
|
16511
|
+
(_a = onLoadingProgressRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingProgressRef, modelLoadProgress);
|
|
16512
|
+
}
|
|
16513
|
+
}, [modelLoadProgress]);
|
|
16514
|
+
React.useEffect(function () {
|
|
16515
|
+
var _a;
|
|
16516
|
+
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
16517
|
+
}, [ready]);
|
|
16518
|
+
}
|
|
16519
|
+
|
|
16424
16520
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
16425
16521
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
16426
16522
|
var _b, _c, _d, _e, _f, _g;
|
|
16427
|
-
var
|
|
16523
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
16524
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16525
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16526
|
+
onDismissed = _a.onDismissed,
|
|
16428
16527
|
onUserCancel = _a.onUserCancel,
|
|
16429
16528
|
instructions = _a.instructions,
|
|
16430
16529
|
_h = _a.rotateImage,
|
|
@@ -16442,7 +16541,9 @@
|
|
|
16442
16541
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
16443
16542
|
var _o = useIdCaptureModelsContext(),
|
|
16444
16543
|
modelsReady = _o.ready,
|
|
16445
|
-
|
|
16544
|
+
modelLoadState = _o.modelLoadState,
|
|
16545
|
+
modelDownloadProgress = _o.modelDownloadProgress,
|
|
16546
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt;
|
|
16446
16547
|
var _p = useCameraStore(),
|
|
16447
16548
|
cameraReady = _p.cameraReady,
|
|
16448
16549
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -16453,6 +16554,7 @@
|
|
|
16453
16554
|
setDismissed = _q[1];
|
|
16454
16555
|
var theme = styled.useTheme();
|
|
16455
16556
|
assets.instructionImageUrl || (assets.instructionImageUrl = legacyInstructionImageUrl$1);
|
|
16557
|
+
var hasCustomInstructionGraphic = assets.instructionImageUrl !== legacyInstructionImageUrl$1;
|
|
16456
16558
|
var verbiage = useTranslations(rawVerbiage, {
|
|
16457
16559
|
headingText: 'Use your device camera to capture your ID',
|
|
16458
16560
|
useContinuityCameraText: 'Use your iPhone as a webcam',
|
|
@@ -16478,6 +16580,17 @@
|
|
|
16478
16580
|
};
|
|
16479
16581
|
}, [ready]);
|
|
16480
16582
|
var imageRef = React.useRef(null);
|
|
16583
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
16584
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
16585
|
+
var modelLoadProgress = modelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
16586
|
+
useLoadProgressHooks({
|
|
16587
|
+
ready: ready,
|
|
16588
|
+
modelLoadState: modelLoadState,
|
|
16589
|
+
modelLoadProgress: modelLoadProgress,
|
|
16590
|
+
onLoadingStarted: onLoadingStarted,
|
|
16591
|
+
onLoadingProgress: onLoadingProgress,
|
|
16592
|
+
onLoadingCompleted: onLoadingCompleted
|
|
16593
|
+
});
|
|
16481
16594
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
16482
16595
|
if (cameraAccessDenied) {
|
|
16483
16596
|
return /*#__PURE__*/React.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -16507,7 +16620,7 @@
|
|
|
16507
16620
|
className: classNames.heading
|
|
16508
16621
|
}, verbiage.headingText)), /*#__PURE__*/React.createElement(LoadingOverlayImageContainer, {
|
|
16509
16622
|
className: classNames.imageContainer
|
|
16510
|
-
},
|
|
16623
|
+
}, hasCustomInstructionGraphic ? ( /*#__PURE__*/React.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
16511
16624
|
ref: imageRef,
|
|
16512
16625
|
alt: verbiage.headingText,
|
|
16513
16626
|
src: assets.instructionImageUrl,
|
|
@@ -16537,7 +16650,7 @@
|
|
|
16537
16650
|
}, /*#__PURE__*/React.createElement(ProgressBarBackground$1, {
|
|
16538
16651
|
className: classNames.progressBackground
|
|
16539
16652
|
}), /*#__PURE__*/React.createElement(LoadingOverlayProgressBar, {
|
|
16540
|
-
"$progress":
|
|
16653
|
+
"$progress": modelLoadProgress,
|
|
16541
16654
|
className: classNames.progressBar
|
|
16542
16655
|
}, /*#__PURE__*/React.createElement(ProgressIndicator$1, {
|
|
16543
16656
|
className: classNames.progressIndicator
|
|
@@ -16555,7 +16668,7 @@
|
|
|
16555
16668
|
}, /*#__PURE__*/React.createElement(LoadingListItemIndicator, {
|
|
16556
16669
|
className: classNames.loadingListItemIndicator,
|
|
16557
16670
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
16558
|
-
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText :
|
|
16671
|
+
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelLoadState === 'downloading' ? "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)") : modelLoadState === 'warming' ? verbiage.modelsWarmingUpText : verbiage.modelsReadyText))), /*#__PURE__*/React.createElement(LoadingOverlayContinueButtonContainer, {
|
|
16559
16672
|
className: classNames.continueBtnContainer
|
|
16560
16673
|
}, (ready || ((_g = (_f = theme.idCapture) === null || _f === void 0 ? void 0 : _f.loadingOverlay) === null || _g === void 0 ? void 0 : _g.displayDisabledContinueBtn)) && ( /*#__PURE__*/React.createElement(ContinueButton$1, {
|
|
16561
16674
|
autoFocus: true,
|
|
@@ -16578,8 +16691,8 @@
|
|
|
16578
16691
|
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';
|
|
16579
16692
|
});
|
|
16580
16693
|
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$x || (templateObject_2$x = __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"])));
|
|
16581
|
-
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\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 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"])));
|
|
16582
|
-
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin
|
|
16694
|
+
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __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"])));
|
|
16695
|
+
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
16583
16696
|
var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
16584
16697
|
var _a, _b, _c, _d;
|
|
16585
16698
|
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.progressBarTextColor) !== null && _d !== void 0 ? _d : 'white';
|
|
@@ -16587,17 +16700,18 @@
|
|
|
16587
16700
|
var _a, _b, _c, _d, _e, _f;
|
|
16588
16701
|
return ((_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.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
16589
16702
|
});
|
|
16590
|
-
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$
|
|
16703
|
+
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
16591
16704
|
var _a, _b, _c, _d;
|
|
16592
16705
|
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.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
16593
16706
|
}, function (props) {
|
|
16594
16707
|
var _a, _b, _c, _d;
|
|
16595
16708
|
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.progressBarBackgroundOpacity) !== null && _d !== void 0 ? _d : 0.75;
|
|
16596
16709
|
});
|
|
16597
|
-
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$
|
|
16598
|
-
|
|
16599
|
-
|
|
16600
|
-
|
|
16710
|
+
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), function (props) {
|
|
16711
|
+
var _a, _b, _c, _d;
|
|
16712
|
+
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.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-primary-500)';
|
|
16713
|
+
});
|
|
16714
|
+
var ContinueButton$1 = styled(LoaderButton)(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"])), function (props) {
|
|
16601
16715
|
var _a, _b, _c, _d, _e, _f;
|
|
16602
16716
|
return ((_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.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
16603
16717
|
}, function (props) {
|
|
@@ -16616,7 +16730,7 @@
|
|
|
16616
16730
|
var _a, _b, _c, _d;
|
|
16617
16731
|
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';
|
|
16618
16732
|
});
|
|
16619
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$
|
|
16733
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$8, templateObject_7$5, templateObject_8$3;
|
|
16620
16734
|
|
|
16621
16735
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
16622
16736
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -16867,8 +16981,8 @@
|
|
|
16867
16981
|
var ImageRow = styled(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __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"])));
|
|
16868
16982
|
var ImageCol$1 = styled.div(templateObject_4$f || (templateObject_4$f = __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"])));
|
|
16869
16983
|
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"])));
|
|
16870
|
-
var DebugPre = styled.pre(templateObject_6$
|
|
16871
|
-
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$
|
|
16984
|
+
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"])));
|
|
16985
|
+
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$7;
|
|
16872
16986
|
|
|
16873
16987
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
16874
16988
|
var _this = this;
|
|
@@ -17559,12 +17673,12 @@
|
|
|
17559
17673
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
17560
17674
|
});
|
|
17561
17675
|
var Spacer = styled(GuideRegion)(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
17562
|
-
var GuideCenterRegion = styled.div(templateObject_6$
|
|
17676
|
+
var GuideCenterRegion = styled.div(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
17563
17677
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
17564
17678
|
}, function (props) {
|
|
17565
17679
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
17566
17680
|
});
|
|
17567
|
-
var GuideCenterBorder = styled.div(templateObject_7$
|
|
17681
|
+
var GuideCenterBorder = styled.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"])), function (props) {
|
|
17568
17682
|
var _a, _b;
|
|
17569
17683
|
return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
|
|
17570
17684
|
}, function (props) {
|
|
@@ -17572,7 +17686,7 @@
|
|
|
17572
17686
|
});
|
|
17573
17687
|
var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
|
|
17574
17688
|
var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
|
|
17575
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$
|
|
17689
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$6, templateObject_7$4, templateObject_8$2, templateObject_9$2;
|
|
17576
17690
|
|
|
17577
17691
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
17578
17692
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -18444,9 +18558,9 @@
|
|
|
18444
18558
|
var _a, _b, _c;
|
|
18445
18559
|
return (_c = (_b = (_a = props.theme.documentCapture) === null || _a === void 0 ? void 0 : _a.instructions) === null || _b === void 0 ? void 0 : _b.maxHeight) !== null && _c !== void 0 ? _c : '8rem';
|
|
18446
18560
|
});
|
|
18447
|
-
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$
|
|
18448
|
-
var PreviewImage = styled.img(templateObject_7$
|
|
18449
|
-
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$
|
|
18561
|
+
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
18562
|
+
var PreviewImage = styled.img(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
18563
|
+
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$5, templateObject_7$3;
|
|
18450
18564
|
|
|
18451
18565
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
18452
18566
|
var onSuccess = _a.onSuccess,
|
|
@@ -18722,8 +18836,8 @@
|
|
|
18722
18836
|
var Description$3 = styled.p(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
18723
18837
|
var Instruction = styled.p(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
18724
18838
|
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"])));
|
|
18725
|
-
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$
|
|
18726
|
-
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$
|
|
18839
|
+
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
18840
|
+
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$4;
|
|
18727
18841
|
|
|
18728
18842
|
function ScalingCameraFeed() {
|
|
18729
18843
|
var _a = useIdCaptureStore(),
|
|
@@ -19083,8 +19197,8 @@
|
|
|
19083
19197
|
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$f || (templateObject_3$f = __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"])));
|
|
19084
19198
|
var ScreenPanelHeading = styled.h3(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
19085
19199
|
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"])));
|
|
19086
|
-
var DashedSeparator = styled.div(templateObject_6$
|
|
19087
|
-
var OrWrapper = styled.div(templateObject_7$
|
|
19200
|
+
var DashedSeparator = styled.div(templateObject_6$3 || (templateObject_6$3 = __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"])));
|
|
19201
|
+
var OrWrapper = styled.div(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
19088
19202
|
var UploadIdBackHelpText = styled.p(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"], ["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"])));
|
|
19089
19203
|
var Button = styled(WideBorderButton)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
19090
19204
|
var Modal = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
|
|
@@ -19364,17 +19478,20 @@
|
|
|
19364
19478
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
19365
19479
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
19366
19480
|
}
|
|
19367
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$
|
|
19481
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$3, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19368
19482
|
|
|
19369
19483
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
19370
19484
|
var _b, _c, _d, _e, _f;
|
|
19371
|
-
var
|
|
19485
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
19486
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
19487
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
19488
|
+
onSuccess = _a.onSuccess,
|
|
19372
19489
|
onExitCapture = _a.onExitCapture,
|
|
19373
19490
|
onUserCancel = _a.onUserCancel,
|
|
19491
|
+
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
19374
19492
|
_g = _a.loadingOverlayMode,
|
|
19375
19493
|
loadingOverlayMode = _g === void 0 ? 'default' : _g,
|
|
19376
19494
|
customOverlayContent = _a.customOverlayContent,
|
|
19377
|
-
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
19378
19495
|
precapturedDocuments = _a.precapturedDocuments,
|
|
19379
19496
|
_h = _a.captureRequirement,
|
|
19380
19497
|
captureRequirement = _h === void 0 ? 'idCardOrPassport' : _h,
|
|
@@ -19720,6 +19837,9 @@
|
|
|
19720
19837
|
colors: colors.loadingOverlay,
|
|
19721
19838
|
verbiage: verbiage.loadingOverlay,
|
|
19722
19839
|
onUserCancel: onUserCancel,
|
|
19840
|
+
onLoadingStarted: onLoadingStarted,
|
|
19841
|
+
onLoadingProgress: onLoadingProgress,
|
|
19842
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
19723
19843
|
onDismissed: function onDismissed() {
|
|
19724
19844
|
setOverlayDismissed(true);
|
|
19725
19845
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -20377,6 +20497,8 @@
|
|
|
20377
20497
|
},
|
|
20378
20498
|
ready: false,
|
|
20379
20499
|
error: null,
|
|
20500
|
+
modelLoadState: 'not-started',
|
|
20501
|
+
modelWarmingStartedAt: null,
|
|
20380
20502
|
modelDownloadProgress: 0
|
|
20381
20503
|
});
|
|
20382
20504
|
function SelfieGuidanceModelsProvider(_a) {
|
|
@@ -20408,7 +20530,9 @@
|
|
|
20408
20530
|
videoRef: videoRef
|
|
20409
20531
|
}),
|
|
20410
20532
|
ready = _f.ready,
|
|
20533
|
+
modelLoadState = _f.modelLoadState,
|
|
20411
20534
|
modelDownloadProgress = _f.modelDownloadProgress,
|
|
20535
|
+
modelWarmingStartedAt = _f.modelWarmingStartedAt,
|
|
20412
20536
|
modelError = _f.modelError;
|
|
20413
20537
|
var _g = useFrameLoop(React.useCallback(function () {
|
|
20414
20538
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -20470,9 +20594,11 @@
|
|
|
20470
20594
|
canvasRef: canvasRef,
|
|
20471
20595
|
onPredictionMade: onPredictionMade,
|
|
20472
20596
|
error: modelError,
|
|
20473
|
-
modelDownloadProgress: modelDownloadProgress
|
|
20597
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
20598
|
+
modelLoadState: modelLoadState,
|
|
20599
|
+
modelWarmingStartedAt: modelWarmingStartedAt
|
|
20474
20600
|
};
|
|
20475
|
-
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress]);
|
|
20601
|
+
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress, modelLoadState, modelWarmingStartedAt]);
|
|
20476
20602
|
return /*#__PURE__*/React__namespace.createElement(SelfieGuidanceModelsContext.Provider, {
|
|
20477
20603
|
value: value
|
|
20478
20604
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -21439,7 +21565,10 @@
|
|
|
21439
21565
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
21440
21566
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
21441
21567
|
var _b, _c;
|
|
21442
|
-
var
|
|
21568
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
21569
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
21570
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21571
|
+
onDismissed = _a.onDismissed,
|
|
21443
21572
|
onUserCancel = _a.onUserCancel,
|
|
21444
21573
|
customOverlayContent = _a.customOverlayContent,
|
|
21445
21574
|
_d = _a.waitForIdCaptureModels,
|
|
@@ -21465,8 +21594,9 @@
|
|
|
21465
21594
|
cameraAccessDenied = _j.cameraAccessDenied,
|
|
21466
21595
|
microphoneAccessDenied = _j.microphoneAccessDenied;
|
|
21467
21596
|
var _k = useSelfieGuidanceModelsContext(),
|
|
21468
|
-
|
|
21469
|
-
modelDownloadProgress = _k.modelDownloadProgress
|
|
21597
|
+
modelLoadState = _k.modelLoadState,
|
|
21598
|
+
modelDownloadProgress = _k.modelDownloadProgress,
|
|
21599
|
+
modelWarmingStartedAt = _k.modelWarmingStartedAt;
|
|
21470
21600
|
var idCaptureModelsContext = React.useContext(IdCaptureModelsContext);
|
|
21471
21601
|
var theme = styled.useTheme();
|
|
21472
21602
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -21493,6 +21623,19 @@
|
|
|
21493
21623
|
});
|
|
21494
21624
|
}, 3000);
|
|
21495
21625
|
}, []);
|
|
21626
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
21627
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
21628
|
+
var allModelsReady = modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
21629
|
+
var ready = sessionReady && allModelsReady && cameraReady;
|
|
21630
|
+
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
21631
|
+
useLoadProgressHooks({
|
|
21632
|
+
ready: ready,
|
|
21633
|
+
modelLoadState: modelLoadState,
|
|
21634
|
+
modelLoadProgress: modelLoadProgress,
|
|
21635
|
+
onLoadingStarted: onLoadingStarted,
|
|
21636
|
+
onLoadingProgress: onLoadingProgress,
|
|
21637
|
+
onLoadingCompleted: onLoadingCompleted
|
|
21638
|
+
});
|
|
21496
21639
|
var _m = React.useState(false),
|
|
21497
21640
|
dismissed = _m[0],
|
|
21498
21641
|
setDismissed = _m[1];
|
|
@@ -21513,8 +21656,6 @@
|
|
|
21513
21656
|
verbiage: rawVerbiage.microphoneAccessDenied
|
|
21514
21657
|
});
|
|
21515
21658
|
}
|
|
21516
|
-
var allModelsReady = modelsReady && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
21517
|
-
var ready = sessionReady && allModelsReady && cameraReady;
|
|
21518
21659
|
return /*#__PURE__*/React.createElement(OverlayContainer, {
|
|
21519
21660
|
className: classNames.container
|
|
21520
21661
|
}, /*#__PURE__*/React.createElement(OverlayInner, {
|
|
@@ -21528,7 +21669,7 @@
|
|
|
21528
21669
|
className: classNames.heading
|
|
21529
21670
|
}, headingText)), /*#__PURE__*/React.createElement(LoadingOverlayImageContainer, {
|
|
21530
21671
|
className: classNames.imageContainer
|
|
21531
|
-
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React.createElement(
|
|
21672
|
+
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
21532
21673
|
className: classNames.image,
|
|
21533
21674
|
alt: verbiage.headingText,
|
|
21534
21675
|
src: assets.instructionImageUrl
|
|
@@ -21541,7 +21682,7 @@
|
|
|
21541
21682
|
}, /*#__PURE__*/React.createElement(ProgressBarBackground, {
|
|
21542
21683
|
className: classNames.progressBackground
|
|
21543
21684
|
}), /*#__PURE__*/React.createElement(LoadingOverlayProgressBar, {
|
|
21544
|
-
"$progress":
|
|
21685
|
+
"$progress": modelLoadProgress,
|
|
21545
21686
|
className: classNames.progressBar
|
|
21546
21687
|
}, /*#__PURE__*/React.createElement(ProgressIndicator, {
|
|
21547
21688
|
className: classNames.progressIndicator
|
|
@@ -21559,7 +21700,7 @@
|
|
|
21559
21700
|
}, /*#__PURE__*/React.createElement(LoadingListItemIndicator, {
|
|
21560
21701
|
className: classNames.loadingListItemIndicator,
|
|
21561
21702
|
state: sessionReady && allModelsReady ? 'done' : 'running'
|
|
21562
|
-
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React.createElement(
|
|
21703
|
+
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React.createElement(LoadingOverlayContinueButtonContainer, {
|
|
21563
21704
|
className: classNames.continueBtnContainer
|
|
21564
21705
|
}, (ready || ((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.displayDisabledContinueBtn)) && ( /*#__PURE__*/React.createElement(ContinueButton, {
|
|
21565
21706
|
autoFocus: true,
|
|
@@ -21599,9 +21740,7 @@
|
|
|
21599
21740
|
var _a, _b, _c, _d;
|
|
21600
21741
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
21601
21742
|
});
|
|
21602
|
-
var
|
|
21603
|
-
var ContinueButtonContainer = styled.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
21604
|
-
var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
21743
|
+
var ContinueButton = styled(LoaderButton)(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
21605
21744
|
var _a, _b, _c, _d, _e, _f;
|
|
21606
21745
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
21607
21746
|
}, function (props) {
|
|
@@ -21620,7 +21759,7 @@
|
|
|
21620
21759
|
var _a, _b, _c, _d;
|
|
21621
21760
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
21622
21761
|
});
|
|
21623
|
-
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4
|
|
21762
|
+
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4;
|
|
21624
21763
|
|
|
21625
21764
|
var components = {
|
|
21626
21765
|
"default": SelfieCaptureLoadingOverlayDefault,
|
|
@@ -21637,7 +21776,10 @@
|
|
|
21637
21776
|
|
|
21638
21777
|
var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
21639
21778
|
var _b;
|
|
21640
|
-
var
|
|
21779
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
21780
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
21781
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21782
|
+
onComplete = _a.onComplete,
|
|
21641
21783
|
onSuccess = _a.onSuccess,
|
|
21642
21784
|
onFailure = _a.onFailure,
|
|
21643
21785
|
onTimeout = _a.onTimeout,
|
|
@@ -21904,6 +22046,9 @@
|
|
|
21904
22046
|
classNames: classNames.loadingOverlay,
|
|
21905
22047
|
colors: colors.loadingOverlay,
|
|
21906
22048
|
verbiage: verbiage.loadingOverlay,
|
|
22049
|
+
onLoadingStarted: onLoadingStarted,
|
|
22050
|
+
onLoadingProgress: onLoadingProgress,
|
|
22051
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
21907
22052
|
onUserCancel: onUserCancel,
|
|
21908
22053
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
21909
22054
|
waitForIdCaptureModels: waitForIdCaptureModels
|
|
@@ -23760,7 +23905,10 @@
|
|
|
23760
23905
|
var templateObject_1$9;
|
|
23761
23906
|
|
|
23762
23907
|
var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
23763
|
-
var
|
|
23908
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
23909
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
23910
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
23911
|
+
onComplete = _a.onComplete,
|
|
23764
23912
|
onVideoCaptured = _a.onVideoCaptured,
|
|
23765
23913
|
onRetryClicked = _a.onRetryClicked,
|
|
23766
23914
|
onExitCapture = _a.onExitCapture,
|
|
@@ -23912,6 +24060,9 @@
|
|
|
23912
24060
|
return /*#__PURE__*/React.createElement(FaceLivenessWizard, _assign({
|
|
23913
24061
|
key: "face-liveness-".concat(attempt)
|
|
23914
24062
|
}, faceLivenessProps, {
|
|
24063
|
+
onLoadingStarted: onLoadingStarted,
|
|
24064
|
+
onLoadingProgress: onLoadingProgress,
|
|
24065
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
23915
24066
|
onSuccess: onFaceCaptureSuccess,
|
|
23916
24067
|
onExitCapture: onExitCapture,
|
|
23917
24068
|
onUserCancel: onUserCancel,
|
|
@@ -24857,6 +25008,9 @@
|
|
|
24857
25008
|
_s = _a.idCaptureLoadingOverlayMode,
|
|
24858
25009
|
idCaptureLoadingOverlayMode = _s === void 0 ? 'default' : _s,
|
|
24859
25010
|
customOverlayContent = _a.customOverlayContent,
|
|
25011
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
25012
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
25013
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
24860
25014
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
24861
25015
|
_t = _a.idDocumentType,
|
|
24862
25016
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -25014,6 +25168,9 @@
|
|
|
25014
25168
|
key: "id-capture-".concat(attempt),
|
|
25015
25169
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
25016
25170
|
customOverlayContent: customOverlayContent,
|
|
25171
|
+
onLoadingStarted: onLoadingStarted,
|
|
25172
|
+
onLoadingProgress: onLoadingProgress,
|
|
25173
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
25017
25174
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25018
25175
|
silentFallback: silentFallback,
|
|
25019
25176
|
guideImages: idCaptureGuideImages
|
|
@@ -25038,6 +25195,9 @@
|
|
|
25038
25195
|
key: "face-liveness-".concat(attempt),
|
|
25039
25196
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
25040
25197
|
customOverlayContent: customOverlayContent,
|
|
25198
|
+
onLoadingStarted: onLoadingStarted,
|
|
25199
|
+
onLoadingProgress: onLoadingProgress,
|
|
25200
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
25041
25201
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25042
25202
|
silentFallback: silentFallback
|
|
25043
25203
|
}, faceLivenessProps, {
|
|
@@ -25636,6 +25796,9 @@
|
|
|
25636
25796
|
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
25637
25797
|
_u = _a.allowUploadingDocumentsFromStorage,
|
|
25638
25798
|
allowUploadingDocumentsFromStorage = _u === void 0 ? false : _u,
|
|
25799
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
25800
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
25801
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
25639
25802
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
25640
25803
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
25641
25804
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -25677,6 +25840,9 @@
|
|
|
25677
25840
|
useDebugLogging(debugMode);
|
|
25678
25841
|
var idCaptureProps = React.useMemo(function () {
|
|
25679
25842
|
return {
|
|
25843
|
+
onLoadingStarted: onLoadingStarted,
|
|
25844
|
+
onLoadingProgress: onLoadingProgress,
|
|
25845
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
25680
25846
|
onExitCapture: onExitCapture,
|
|
25681
25847
|
onUserCancel: onUserCancel,
|
|
25682
25848
|
onModelError: onModelError,
|
|
@@ -25706,7 +25872,7 @@
|
|
|
25706
25872
|
verbiage: verbiage,
|
|
25707
25873
|
debugMode: debugMode
|
|
25708
25874
|
};
|
|
25709
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
25875
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
25710
25876
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
25711
25877
|
return {
|
|
25712
25878
|
documents: captureAdditionalDocuments,
|
|
@@ -25835,6 +26001,9 @@
|
|
|
25835
26001
|
_h = _a.skipSuccessScreen,
|
|
25836
26002
|
skipSuccessScreen = _h === void 0 ? false : _h,
|
|
25837
26003
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
26004
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
26005
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
26006
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
25838
26007
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
25839
26008
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
25840
26009
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -25871,6 +26040,9 @@
|
|
|
25871
26040
|
timeoutDurationMs: timeoutDurationMs,
|
|
25872
26041
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
25873
26042
|
skipSuccessScreen: skipSuccessScreen,
|
|
26043
|
+
onLoadingStarted: onLoadingStarted,
|
|
26044
|
+
onLoadingProgress: onLoadingProgress,
|
|
26045
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
25874
26046
|
onComplete: onComplete,
|
|
25875
26047
|
onSuccess: onApproved,
|
|
25876
26048
|
onDenied: onDenied,
|
|
@@ -25884,7 +26056,7 @@
|
|
|
25884
26056
|
verbiage: verbiage,
|
|
25885
26057
|
debugMode: debugMode
|
|
25886
26058
|
};
|
|
25887
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
26059
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
25888
26060
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
25889
26061
|
sessionId: sessionId,
|
|
25890
26062
|
authUrl: authUrl
|
|
@@ -26007,6 +26179,9 @@
|
|
|
26007
26179
|
enableOverrideWrongDocumentTypeDialog = _w === void 0 ? false : _w,
|
|
26008
26180
|
_x = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
26009
26181
|
allowOverrideWrongDocumentTypeAfterMs = _x === void 0 ? 8000 : _x,
|
|
26182
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
26183
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
26184
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26010
26185
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26011
26186
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
26012
26187
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -26051,6 +26226,9 @@
|
|
|
26051
26226
|
useDebugLogging(debugMode);
|
|
26052
26227
|
var idCaptureProps = React.useMemo(function () {
|
|
26053
26228
|
return {
|
|
26229
|
+
onLoadingStarted: onLoadingStarted,
|
|
26230
|
+
onLoadingProgress: onLoadingProgress,
|
|
26231
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
26054
26232
|
onExitCapture: onExitCapture,
|
|
26055
26233
|
onUserCancel: onUserCancel,
|
|
26056
26234
|
onModelError: onIdCaptureModelError,
|
|
@@ -26078,9 +26256,12 @@
|
|
|
26078
26256
|
skipSuccessScreen: skipSuccessScreen,
|
|
26079
26257
|
debugMode: debugMode
|
|
26080
26258
|
};
|
|
26081
|
-
}, [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]);
|
|
26259
|
+
}, [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]);
|
|
26082
26260
|
var faceLivenessProps = React.useMemo(function () {
|
|
26083
26261
|
return {
|
|
26262
|
+
onLoadingStarted: onLoadingStarted,
|
|
26263
|
+
onLoadingProgress: onLoadingProgress,
|
|
26264
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
26084
26265
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
26085
26266
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
26086
26267
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -26098,7 +26279,7 @@
|
|
|
26098
26279
|
verbiage: verbiage.faceLiveness,
|
|
26099
26280
|
debugMode: debugMode
|
|
26100
26281
|
};
|
|
26101
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26282
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26102
26283
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26103
26284
|
return {
|
|
26104
26285
|
documents: captureAdditionalDocuments,
|
|
@@ -26274,6 +26455,9 @@
|
|
|
26274
26455
|
allowUploadingDocumentsFromStorage = _w === void 0 ? false : _w,
|
|
26275
26456
|
_x = _a.separateIdCardCaptureSequence,
|
|
26276
26457
|
separateIdCardCaptureSequence = _x === void 0 ? false : _x,
|
|
26458
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
26459
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
26460
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26277
26461
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26278
26462
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
26279
26463
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -26320,6 +26504,9 @@
|
|
|
26320
26504
|
useDebugLogging(debugMode);
|
|
26321
26505
|
var idCaptureProps = React.useMemo(function () {
|
|
26322
26506
|
return {
|
|
26507
|
+
onLoadingStarted: onLoadingStarted,
|
|
26508
|
+
onLoadingProgress: onLoadingProgress,
|
|
26509
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
26323
26510
|
assets: assets.idCapture,
|
|
26324
26511
|
classNames: classNames.idCapture,
|
|
26325
26512
|
colors: colors.idCapture,
|
|
@@ -26347,9 +26534,12 @@
|
|
|
26347
26534
|
skipSuccessScreen: skipSuccessScreen,
|
|
26348
26535
|
debugMode: debugMode
|
|
26349
26536
|
};
|
|
26350
|
-
}, [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]);
|
|
26537
|
+
}, [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]);
|
|
26351
26538
|
var faceLivenessProps = React.useMemo(function () {
|
|
26352
26539
|
return {
|
|
26540
|
+
onLoadingStarted: onLoadingStarted,
|
|
26541
|
+
onLoadingProgress: onLoadingProgress,
|
|
26542
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
26353
26543
|
onExitCapture: onExitCapture,
|
|
26354
26544
|
onExitAfterFailure: onExitAfterFailure,
|
|
26355
26545
|
onUserCancel: onUserCancel,
|
|
@@ -26366,7 +26556,7 @@
|
|
|
26366
26556
|
verbiage: verbiage.faceLiveness,
|
|
26367
26557
|
debugMode: debugMode
|
|
26368
26558
|
};
|
|
26369
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26559
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26370
26560
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
26371
26561
|
return _assign({
|
|
26372
26562
|
onExitCapture: onExitCapture,
|
|
@@ -26781,7 +26971,10 @@
|
|
|
26781
26971
|
|
|
26782
26972
|
var ALLOWED_RETRIES$2 = 2;
|
|
26783
26973
|
var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
26784
|
-
var
|
|
26974
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
26975
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
26976
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26977
|
+
onComplete = _a.onComplete,
|
|
26785
26978
|
onCustomerMatched = _a.onCustomerMatched,
|
|
26786
26979
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
26787
26980
|
onExitCapture = _a.onExitCapture,
|
|
@@ -26911,7 +27104,7 @@
|
|
|
26911
27104
|
onExitAfterFailure === null || onExitAfterFailure === void 0 ? void 0 : onExitAfterFailure();
|
|
26912
27105
|
},
|
|
26913
27106
|
onRetryClick: function onRetryClick() {
|
|
26914
|
-
setAttempt(function (n) {
|
|
27107
|
+
return setAttempt(function (n) {
|
|
26915
27108
|
return n + 1;
|
|
26916
27109
|
});
|
|
26917
27110
|
}
|
|
@@ -26926,9 +27119,12 @@
|
|
|
26926
27119
|
classNames: classNames.loadingOverlay,
|
|
26927
27120
|
colors: colors.loadingOverlay,
|
|
26928
27121
|
verbiage: verbiage.loadingOverlay,
|
|
27122
|
+
onLoadingStarted: onLoadingStarted,
|
|
27123
|
+
onLoadingProgress: onLoadingProgress,
|
|
27124
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
26929
27125
|
onUserCancel: onUserCancel,
|
|
26930
27126
|
onDismissed: function onDismissed() {
|
|
26931
|
-
setCaptureState('CAPTURING');
|
|
27127
|
+
return setCaptureState('CAPTURING');
|
|
26932
27128
|
}
|
|
26933
27129
|
}));
|
|
26934
27130
|
};
|
|
@@ -26970,6 +27166,9 @@
|
|
|
26970
27166
|
classNames = _a.classNames,
|
|
26971
27167
|
colors = _a.colors,
|
|
26972
27168
|
verbiage = _a.verbiage,
|
|
27169
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
27170
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
27171
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26973
27172
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26974
27173
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
26975
27174
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -27038,6 +27237,9 @@
|
|
|
27038
27237
|
}, /*#__PURE__*/React.createElement(SdkPage, {
|
|
27039
27238
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
27040
27239
|
}, /*#__PURE__*/React.createElement(CustomerVerificationWizard, {
|
|
27240
|
+
onLoadingStarted: onLoadingStarted,
|
|
27241
|
+
onLoadingProgress: onLoadingProgress,
|
|
27242
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
27041
27243
|
onComplete: onComplete,
|
|
27042
27244
|
onCustomerMatched: onCustomerMatched,
|
|
27043
27245
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -27351,7 +27553,10 @@
|
|
|
27351
27553
|
|
|
27352
27554
|
var ALLOWED_RETRIES = 2;
|
|
27353
27555
|
var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
27354
|
-
var
|
|
27556
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
27557
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
27558
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27559
|
+
onComplete = _a.onComplete,
|
|
27355
27560
|
onCustomerMatched = _a.onCustomerMatched,
|
|
27356
27561
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
27357
27562
|
onExitCapture = _a.onExitCapture,
|
|
@@ -27496,6 +27701,9 @@
|
|
|
27496
27701
|
classNames: classNames.loadingOverlay,
|
|
27497
27702
|
colors: colors.loadingOverlay,
|
|
27498
27703
|
verbiage: verbiage.loadingOverlay,
|
|
27704
|
+
onLoadingStarted: onLoadingStarted,
|
|
27705
|
+
onLoadingProgress: onLoadingProgress,
|
|
27706
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
27499
27707
|
onUserCancel: onUserCancel,
|
|
27500
27708
|
onDismissed: function onDismissed() {
|
|
27501
27709
|
setCaptureState('CAPTURING');
|
|
@@ -27533,6 +27741,9 @@
|
|
|
27533
27741
|
modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
|
|
27534
27742
|
_f = _a.skipSuccessScreen,
|
|
27535
27743
|
skipSuccessScreen = _f === void 0 ? false : _f,
|
|
27744
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
27745
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
27746
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27536
27747
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
27537
27748
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
27538
27749
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -27606,6 +27817,9 @@
|
|
|
27606
27817
|
}, /*#__PURE__*/React.createElement(SdkPage, {
|
|
27607
27818
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
27608
27819
|
}, /*#__PURE__*/React.createElement(CustomerIdentificationWizard, {
|
|
27820
|
+
onLoadingStarted: onLoadingStarted,
|
|
27821
|
+
onLoadingProgress: onLoadingProgress,
|
|
27822
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
27609
27823
|
onComplete: onComplete,
|
|
27610
27824
|
onCustomerMatched: onCustomerMatched,
|
|
27611
27825
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -27637,6 +27851,9 @@
|
|
|
27637
27851
|
documentServiceUrl = _a.documentServiceUrl,
|
|
27638
27852
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
27639
27853
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
27854
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
27855
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
27856
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27640
27857
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
27641
27858
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
27642
27859
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -27716,6 +27933,9 @@
|
|
|
27716
27933
|
onCameraTamperingDetected: onCameraTamperingDetected,
|
|
27717
27934
|
videoSignatureCaptureProps: React.useMemo(function () {
|
|
27718
27935
|
return {
|
|
27936
|
+
onLoadingStarted: onLoadingStarted,
|
|
27937
|
+
onLoadingProgress: onLoadingProgress,
|
|
27938
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
27719
27939
|
customOverlayContent: customOverlayContent,
|
|
27720
27940
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
27721
27941
|
loadingOverlayMode: loadingOverlayMode,
|
|
@@ -27734,7 +27954,7 @@
|
|
|
27734
27954
|
onModelError: onModelError,
|
|
27735
27955
|
onUserCancel: onUserCancel
|
|
27736
27956
|
};
|
|
27737
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27957
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27738
27958
|
})))));
|
|
27739
27959
|
};
|
|
27740
27960
|
|
|
@@ -27772,6 +27992,9 @@
|
|
|
27772
27992
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
27773
27993
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
27774
27994
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
27995
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
27996
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
27997
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27775
27998
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
27776
27999
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
27777
28000
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -27856,6 +28079,9 @@
|
|
|
27856
28079
|
useDebugLogging(debugMode);
|
|
27857
28080
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
27858
28081
|
return {
|
|
28082
|
+
onLoadingStarted: onLoadingStarted,
|
|
28083
|
+
onLoadingProgress: onLoadingProgress,
|
|
28084
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
27859
28085
|
idCaptureProps: idCaptureProps,
|
|
27860
28086
|
faceLivenessProps: faceLivenessProps,
|
|
27861
28087
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -27888,7 +28114,7 @@
|
|
|
27888
28114
|
verbiage: verbiage,
|
|
27889
28115
|
debugMode: debugMode
|
|
27890
28116
|
};
|
|
27891
|
-
}, [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]);
|
|
28117
|
+
}, [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]);
|
|
27892
28118
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
27893
28119
|
return {
|
|
27894
28120
|
documents: captureAdditionalDocuments,
|
|
@@ -28011,6 +28237,9 @@
|
|
|
28011
28237
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
28012
28238
|
_g = _a.skipSuccessScreen,
|
|
28013
28239
|
skipSuccessScreen = _g === void 0 ? false : _g,
|
|
28240
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
28241
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
28242
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28014
28243
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28015
28244
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
28016
28245
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -28053,6 +28282,9 @@
|
|
|
28053
28282
|
useDebugLogging(debugMode);
|
|
28054
28283
|
var faceLivenessProps = React.useMemo(function () {
|
|
28055
28284
|
return {
|
|
28285
|
+
onLoadingStarted: onLoadingStarted,
|
|
28286
|
+
onLoadingProgress: onLoadingProgress,
|
|
28287
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
28056
28288
|
onExitCapture: onExitCapture,
|
|
28057
28289
|
onUserCancel: onUserCancel,
|
|
28058
28290
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -28068,7 +28300,7 @@
|
|
|
28068
28300
|
verbiage: verbiage.faceLiveness,
|
|
28069
28301
|
debugMode: debugMode
|
|
28070
28302
|
};
|
|
28071
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28303
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28072
28304
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
28073
28305
|
return {
|
|
28074
28306
|
documents: captureAdditionalDocuments,
|