idmission-web-sdk 2.3.5 → 2.3.7
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/SelfieProgressPreview.d.ts +3 -3
- package/dist/components/common/SelfieProgressPreview.d.ts.map +1 -1
- package/dist/components/common/overlay.d.ts +10 -4
- package/dist/components/common/overlay.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 +3 -5
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/fallback_flows/SelfieCapture.d.ts +1 -1
- package/dist/components/fallback_flows/SelfieCapture.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/IdCapture.d.ts +1 -1
- package/dist/components/id_capture/IdCapture.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.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/IdCaptureOrUploadScreen.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/read_text_prompt/ReadTextPrompt.d.ts +2 -2
- package/dist/components/read_text_prompt/ReadTextPrompt.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCapture.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/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +6 -5
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts +10 -7
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +5 -4
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +5 -4
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/lib/locales/render.d.ts +3 -0
- package/dist/lib/locales/render.d.ts.map +1 -0
- 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/sdk2.cjs.development.js +339 -206
- 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 +339 -206
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +339 -206
- 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 +3 -3
|
@@ -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.7';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -494,7 +494,7 @@
|
|
|
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$
|
|
497
|
+
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$4 || (templateObject_9$4 = __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
498
|
var LoadingOverlayHeader = styled.div(templateObject_10$2 || (templateObject_10$2 = __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';
|
|
@@ -503,17 +503,23 @@
|
|
|
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 templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$
|
|
522
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$4, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20;
|
|
517
523
|
|
|
518
524
|
function _extends() {
|
|
519
525
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -8377,19 +8383,23 @@
|
|
|
8377
8383
|
videoRef = _a.videoRef,
|
|
8378
8384
|
_d = _a.shouldLoadModels,
|
|
8379
8385
|
shouldLoadModels = _d === void 0 ? true : _d;
|
|
8380
|
-
var _e = React.useState(
|
|
8381
|
-
|
|
8382
|
-
|
|
8386
|
+
var _e = React.useState('not-started'),
|
|
8387
|
+
modelLoadState = _e[0],
|
|
8388
|
+
setModelLoadState = _e[1];
|
|
8383
8389
|
var _f = React.useState(0),
|
|
8384
8390
|
modelDownloadProgress = _f[0],
|
|
8385
8391
|
setModelDownloadProgress = _f[1];
|
|
8386
8392
|
var _g = React.useState(null),
|
|
8387
|
-
|
|
8388
|
-
|
|
8393
|
+
modelWarmingStartedAt = _g[0],
|
|
8394
|
+
setModelWarmingStartedAt = _g[1];
|
|
8395
|
+
var _h = React.useState(null),
|
|
8396
|
+
modelError = _h[0],
|
|
8397
|
+
setModelError = _h[1];
|
|
8389
8398
|
React.useEffect(function loadModel() {
|
|
8390
8399
|
var _this = this;
|
|
8391
8400
|
if (!shouldLoadModels) return;
|
|
8392
|
-
|
|
8401
|
+
setModelLoadState('downloading');
|
|
8402
|
+
setModelWarmingStartedAt(null);
|
|
8393
8403
|
function handleDownloadProgress(event) {
|
|
8394
8404
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
8395
8405
|
}
|
|
@@ -8406,6 +8416,8 @@
|
|
|
8406
8416
|
case 0:
|
|
8407
8417
|
setModelDownloadProgress(100);
|
|
8408
8418
|
clearTimeout(modelLoadTimeout);
|
|
8419
|
+
setModelLoadState('warming');
|
|
8420
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
8409
8421
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8410
8422
|
cancelled = false;
|
|
8411
8423
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8418,7 +8430,7 @@
|
|
|
8418
8430
|
setTimeout(function () {
|
|
8419
8431
|
if (cancelled) return;
|
|
8420
8432
|
loadedModel.classifyForVideo(videoRef.current, performance.now());
|
|
8421
|
-
|
|
8433
|
+
setModelLoadState('ready');
|
|
8422
8434
|
}, 500);
|
|
8423
8435
|
return [2 /*return*/];
|
|
8424
8436
|
}
|
|
@@ -8426,6 +8438,7 @@
|
|
|
8426
8438
|
});
|
|
8427
8439
|
})["catch"](function (e) {
|
|
8428
8440
|
setModelError(e);
|
|
8441
|
+
setModelLoadState('error');
|
|
8429
8442
|
})["finally"](function () {
|
|
8430
8443
|
clearTimeout(modelLoadTimeout);
|
|
8431
8444
|
});
|
|
@@ -8440,11 +8453,15 @@
|
|
|
8440
8453
|
React.useEffect(function handleModelError() {
|
|
8441
8454
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
8442
8455
|
}, [modelError, onModelError]);
|
|
8443
|
-
return {
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8456
|
+
return React.useMemo(function () {
|
|
8457
|
+
return {
|
|
8458
|
+
ready: modelLoadState === 'ready',
|
|
8459
|
+
modelLoadState: modelLoadState,
|
|
8460
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
8461
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
8462
|
+
modelError: modelError
|
|
8463
|
+
};
|
|
8464
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
8448
8465
|
}
|
|
8449
8466
|
var lastFocusPredictionAt = 0;
|
|
8450
8467
|
var lastFocusPredictionTime = 0;
|
|
@@ -8536,18 +8553,22 @@
|
|
|
8536
8553
|
_b = _a.modelLoadTimeoutMs,
|
|
8537
8554
|
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b,
|
|
8538
8555
|
videoRef = _a.videoRef;
|
|
8539
|
-
var _c = React.useState(
|
|
8540
|
-
|
|
8541
|
-
|
|
8556
|
+
var _c = React.useState('not-started'),
|
|
8557
|
+
modelLoadState = _c[0],
|
|
8558
|
+
setModelLoadState = _c[1];
|
|
8542
8559
|
var _d = React.useState(0),
|
|
8543
8560
|
modelDownloadProgress = _d[0],
|
|
8544
8561
|
setModelDownloadProgress = _d[1];
|
|
8545
8562
|
var _e = React.useState(null),
|
|
8546
|
-
|
|
8547
|
-
|
|
8563
|
+
modelWarmingStartedAt = _e[0],
|
|
8564
|
+
setModelWarmingStartedAt = _e[1];
|
|
8565
|
+
var _f = React.useState(null),
|
|
8566
|
+
modelError = _f[0],
|
|
8567
|
+
setModelError = _f[1];
|
|
8548
8568
|
React.useEffect(function loadModel() {
|
|
8549
8569
|
var _this = this;
|
|
8550
|
-
|
|
8570
|
+
setModelLoadState('downloading');
|
|
8571
|
+
setModelWarmingStartedAt(null);
|
|
8551
8572
|
var modelLoadTimeout = setTimeout(function () {
|
|
8552
8573
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
8553
8574
|
}, modelLoadTimeoutMs);
|
|
@@ -8564,6 +8585,8 @@
|
|
|
8564
8585
|
case 0:
|
|
8565
8586
|
setModelDownloadProgress(100);
|
|
8566
8587
|
clearTimeout(modelLoadTimeout);
|
|
8588
|
+
setModelLoadState('warming');
|
|
8589
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
8567
8590
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8568
8591
|
cancelled = false;
|
|
8569
8592
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8575,13 +8598,14 @@
|
|
|
8575
8598
|
_b.sent();
|
|
8576
8599
|
if (cancelled) return [2 /*return*/];
|
|
8577
8600
|
model.detectForVideo(videoRef.current, performance.now());
|
|
8578
|
-
|
|
8601
|
+
setModelLoadState('ready');
|
|
8579
8602
|
return [2 /*return*/];
|
|
8580
8603
|
}
|
|
8581
8604
|
});
|
|
8582
8605
|
});
|
|
8583
8606
|
})["catch"](function (e) {
|
|
8584
8607
|
setModelError(e);
|
|
8608
|
+
setModelLoadState('error');
|
|
8585
8609
|
})["finally"](function () {
|
|
8586
8610
|
clearTimeout(modelLoadTimeout);
|
|
8587
8611
|
});
|
|
@@ -8596,11 +8620,15 @@
|
|
|
8596
8620
|
React.useEffect(function handleModelError() {
|
|
8597
8621
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
8598
8622
|
}, [modelError, onModelError]);
|
|
8599
|
-
return {
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8623
|
+
return React.useMemo(function () {
|
|
8624
|
+
return {
|
|
8625
|
+
ready: modelLoadState === 'ready',
|
|
8626
|
+
modelLoadState: modelLoadState,
|
|
8627
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
8628
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
8629
|
+
modelError: modelError
|
|
8630
|
+
};
|
|
8631
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
8604
8632
|
}
|
|
8605
8633
|
var lastFaceDetectionAt = 0;
|
|
8606
8634
|
var lastFaceDetectionTime = 0;
|
|
@@ -9042,19 +9070,23 @@
|
|
|
9042
9070
|
scoreThreshold = _e === void 0 ? defaultDocumentDetectionScoreThreshold : _e,
|
|
9043
9071
|
onModelError = _a.onModelError,
|
|
9044
9072
|
videoRef = _a.videoRef;
|
|
9045
|
-
var _f = React.useState(
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
var _g = React.useState(
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
var _h = React.useState(
|
|
9052
|
-
|
|
9053
|
-
|
|
9073
|
+
var _f = React.useState('not-started'),
|
|
9074
|
+
modelLoadState = _f[0],
|
|
9075
|
+
setModelLoadState = _f[1];
|
|
9076
|
+
var _g = React.useState(null),
|
|
9077
|
+
modelWarmingStartedAt = _g[0],
|
|
9078
|
+
setModelWarmingStartedAt = _g[1];
|
|
9079
|
+
var _h = React.useState(0),
|
|
9080
|
+
modelDownloadProgress = _h[0],
|
|
9081
|
+
setModelDownloadProgress = _h[1];
|
|
9082
|
+
var _j = React.useState(null),
|
|
9083
|
+
modelError = _j[0],
|
|
9084
|
+
setModelError = _j[1];
|
|
9054
9085
|
React.useEffect(function loadModel() {
|
|
9055
9086
|
var _this = this;
|
|
9056
9087
|
if (!shouldLoadModels) return;
|
|
9057
|
-
|
|
9088
|
+
setModelLoadState('downloading');
|
|
9089
|
+
setModelWarmingStartedAt(null);
|
|
9058
9090
|
function handleDownloadProgress(event) {
|
|
9059
9091
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
9060
9092
|
}
|
|
@@ -9070,6 +9102,8 @@
|
|
|
9070
9102
|
switch (_b.label) {
|
|
9071
9103
|
case 0:
|
|
9072
9104
|
setModelDownloadProgress(100);
|
|
9105
|
+
setModelLoadState('warming');
|
|
9106
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
9073
9107
|
clearTimeout(modelLoadTimeout);
|
|
9074
9108
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
9075
9109
|
cancelled = false;
|
|
@@ -9083,7 +9117,7 @@
|
|
|
9083
9117
|
setTimeout(function () {
|
|
9084
9118
|
if (cancelled) return;
|
|
9085
9119
|
model.detectForVideo(videoRef.current, performance.now());
|
|
9086
|
-
|
|
9120
|
+
setModelLoadState('ready');
|
|
9087
9121
|
}, 500);
|
|
9088
9122
|
return [2 /*return*/];
|
|
9089
9123
|
}
|
|
@@ -9091,6 +9125,7 @@
|
|
|
9091
9125
|
});
|
|
9092
9126
|
})["catch"](function (e) {
|
|
9093
9127
|
setModelError(e);
|
|
9128
|
+
setModelLoadState('error');
|
|
9094
9129
|
})["finally"](function () {
|
|
9095
9130
|
clearTimeout(modelLoadTimeout);
|
|
9096
9131
|
});
|
|
@@ -9105,12 +9140,16 @@
|
|
|
9105
9140
|
React.useEffect(function handleModelError() {
|
|
9106
9141
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
9107
9142
|
}, [modelError, onModelError]);
|
|
9108
|
-
return {
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9143
|
+
return React.useMemo(function () {
|
|
9144
|
+
return {
|
|
9145
|
+
ready: modelLoadState === 'ready',
|
|
9146
|
+
modelLoadState: modelLoadState,
|
|
9147
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
9148
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
9149
|
+
modelError: modelError,
|
|
9150
|
+
setModelError: setModelError
|
|
9151
|
+
};
|
|
9152
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
9114
9153
|
}
|
|
9115
9154
|
function makeDocumentDetectorPrediction(frame) {
|
|
9116
9155
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -13372,6 +13411,12 @@
|
|
|
13372
13411
|
"We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": '很抱歉,看起來相機被篡改了。請檢查您的設備並重新載入頁面。'
|
|
13373
13412
|
};
|
|
13374
13413
|
|
|
13414
|
+
function renderVerbiage(verbiage) {
|
|
13415
|
+
if (typeof verbiage === 'string') return /*#__PURE__*/React.createElement(React.Fragment, null, verbiage);
|
|
13416
|
+
var Verbiage = verbiage;
|
|
13417
|
+
return /*#__PURE__*/React.createElement(Verbiage, null);
|
|
13418
|
+
}
|
|
13419
|
+
|
|
13375
13420
|
var resources = {
|
|
13376
13421
|
en: {
|
|
13377
13422
|
translation: en
|
|
@@ -13426,11 +13471,12 @@
|
|
|
13426
13471
|
};
|
|
13427
13472
|
function evaluateVerbiage(t, currentLanguage, verbiage, fallback) {
|
|
13428
13473
|
if (typeof verbiage === 'string') return verbiage;
|
|
13474
|
+
if (typeof verbiage === 'function') return renderVerbiage(verbiage);
|
|
13429
13475
|
if (typeof verbiage === 'object') {
|
|
13430
13476
|
var translations = verbiage;
|
|
13431
|
-
if (translations[currentLanguage]) return translations[currentLanguage];
|
|
13477
|
+
if (translations[currentLanguage]) return renderVerbiage(translations[currentLanguage]);
|
|
13432
13478
|
var nonLocaleLang = currentLanguage.split('-')[0];
|
|
13433
|
-
if (translations[nonLocaleLang]) return translations[nonLocaleLang];
|
|
13479
|
+
if (translations[nonLocaleLang]) return renderVerbiage(translations[nonLocaleLang]);
|
|
13434
13480
|
}
|
|
13435
13481
|
return t(fallback);
|
|
13436
13482
|
}
|
|
@@ -13922,8 +13968,9 @@
|
|
|
13922
13968
|
loadDocumentDetectionModel: function loadDocumentDetectionModel() {
|
|
13923
13969
|
return null;
|
|
13924
13970
|
},
|
|
13925
|
-
|
|
13971
|
+
documentDetectionModelState: 'not-started',
|
|
13926
13972
|
documentDetectionModelDownloadProgress: 0,
|
|
13973
|
+
documentDetectionModelWarmingStartedAt: null,
|
|
13927
13974
|
documentDetectionModelError: null,
|
|
13928
13975
|
onDocumentDetected: function onDocumentDetected() {
|
|
13929
13976
|
return null;
|
|
@@ -13996,7 +14043,9 @@
|
|
|
13996
14043
|
shouldLoadModels: shouldLoadModels
|
|
13997
14044
|
}),
|
|
13998
14045
|
ready = _q.ready,
|
|
14046
|
+
modelLoadState = _q.modelLoadState,
|
|
13999
14047
|
modelDownloadProgress = _q.modelDownloadProgress,
|
|
14048
|
+
modelWarmingStartedAt = _q.modelWarmingStartedAt,
|
|
14000
14049
|
modelError = _q.modelError,
|
|
14001
14050
|
setModelError = _q.setModelError;
|
|
14002
14051
|
var _r = useFrameLoop(React.useCallback(function (frameId, timeRunning) {
|
|
@@ -14063,7 +14112,8 @@
|
|
|
14063
14112
|
startDocumentDetection: start,
|
|
14064
14113
|
stopDocumentDetection: stop,
|
|
14065
14114
|
loadDocumentDetectionModel: load,
|
|
14066
|
-
|
|
14115
|
+
documentDetectionModelState: modelLoadState,
|
|
14116
|
+
documentDetectionModelWarmingStartedAt: modelWarmingStartedAt,
|
|
14067
14117
|
documentDetectionModelError: modelError,
|
|
14068
14118
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
14069
14119
|
onDocumentDetected: onDocumentDetected,
|
|
@@ -14075,7 +14125,7 @@
|
|
|
14075
14125
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
14076
14126
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
14077
14127
|
};
|
|
14078
|
-
}, [start, stop, load,
|
|
14128
|
+
}, [start, stop, load, modelLoadState, modelWarmingStartedAt, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
14079
14129
|
return /*#__PURE__*/React__namespace.createElement(DocumentDetectionModelContext.Provider, {
|
|
14080
14130
|
value: value
|
|
14081
14131
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -14088,8 +14138,9 @@
|
|
|
14088
14138
|
loadFocusModel: function loadFocusModel() {
|
|
14089
14139
|
return null;
|
|
14090
14140
|
},
|
|
14091
|
-
|
|
14141
|
+
focusModelState: 'not-started',
|
|
14092
14142
|
focusModelDownloadProgress: 0,
|
|
14143
|
+
focusModelWarmingStartedAt: null,
|
|
14093
14144
|
focusModelError: null,
|
|
14094
14145
|
focusThresholds: {},
|
|
14095
14146
|
setFocusThresholds: function setFocusThresholds() {
|
|
@@ -14131,7 +14182,9 @@
|
|
|
14131
14182
|
shouldLoadModels: shouldLoadModels
|
|
14132
14183
|
}),
|
|
14133
14184
|
ready = _h.ready,
|
|
14185
|
+
modelLoadState = _h.modelLoadState,
|
|
14134
14186
|
modelDownloadProgress = _h.modelDownloadProgress,
|
|
14187
|
+
modelWarmingStartedAt = _h.modelWarmingStartedAt,
|
|
14135
14188
|
modelError = _h.modelError;
|
|
14136
14189
|
var makeFocusPrediction = React.useCallback(function (imageData, box) {
|
|
14137
14190
|
if (!ready) return null;
|
|
@@ -14143,15 +14196,16 @@
|
|
|
14143
14196
|
var value = React.useMemo(function () {
|
|
14144
14197
|
return {
|
|
14145
14198
|
loadFocusModel: load,
|
|
14146
|
-
|
|
14199
|
+
focusModelState: modelLoadState,
|
|
14147
14200
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
14201
|
+
focusModelWarmingStartedAt: modelWarmingStartedAt,
|
|
14148
14202
|
focusModelError: modelError,
|
|
14149
14203
|
makeFocusPrediction: makeFocusPrediction,
|
|
14150
14204
|
focusPredictionTime: lastFocusPredictionTime,
|
|
14151
14205
|
focusThresholds: focusThresholds,
|
|
14152
14206
|
setFocusThresholds: setFocusThresholds
|
|
14153
14207
|
};
|
|
14154
|
-
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError,
|
|
14208
|
+
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError, modelLoadState, modelWarmingStartedAt]);
|
|
14155
14209
|
return /*#__PURE__*/React.createElement(FocusModelContext.Provider, {
|
|
14156
14210
|
value: value
|
|
14157
14211
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -14216,6 +14270,8 @@
|
|
|
14216
14270
|
return null;
|
|
14217
14271
|
},
|
|
14218
14272
|
modelDownloadProgress: 0,
|
|
14273
|
+
modelLoadState: 'not-started',
|
|
14274
|
+
modelWarmingStartedAt: null,
|
|
14219
14275
|
modelError: null,
|
|
14220
14276
|
thresholds: defaultIdCaptureThresholds,
|
|
14221
14277
|
setThresholds: function setThresholds() {
|
|
@@ -14250,8 +14306,9 @@
|
|
|
14250
14306
|
_b = _a.allowSinglePageIdCapture,
|
|
14251
14307
|
allowSinglePageIdCapture = _b === void 0 ? false : _b;
|
|
14252
14308
|
var _c = React.useContext(DocumentDetectionModelContext),
|
|
14253
|
-
|
|
14309
|
+
documentDetectionModelState = _c.documentDetectionModelState,
|
|
14254
14310
|
documentDetectionModelDownloadProgress = _c.documentDetectionModelDownloadProgress,
|
|
14311
|
+
documentDetectionModelWarmingStartedAt = _c.documentDetectionModelWarmingStartedAt,
|
|
14255
14312
|
startDocumentDetection = _c.startDocumentDetection,
|
|
14256
14313
|
stopDocumentDetection = _c.stopDocumentDetection,
|
|
14257
14314
|
loadDocumentDetectionModel = _c.loadDocumentDetectionModel,
|
|
@@ -14266,8 +14323,9 @@
|
|
|
14266
14323
|
documentDetectionModelError = _c.documentDetectionModelError;
|
|
14267
14324
|
var _d = React.useContext(FocusModelContext),
|
|
14268
14325
|
loadFocusModel = _d.loadFocusModel,
|
|
14269
|
-
|
|
14326
|
+
focusModelState = _d.focusModelState,
|
|
14270
14327
|
focusModelDownloadProgress = _d.focusModelDownloadProgress,
|
|
14328
|
+
focusModelWarmingStartedAt = _d.focusModelWarmingStartedAt,
|
|
14271
14329
|
makeFocusPrediction = _d.makeFocusPrediction,
|
|
14272
14330
|
focusThresholds = _d.focusThresholds,
|
|
14273
14331
|
setFocusThresholds = _d.setFocusThresholds,
|
|
@@ -14375,10 +14433,17 @@
|
|
|
14375
14433
|
loadDocumentDetectionModel();
|
|
14376
14434
|
loadFocusModel();
|
|
14377
14435
|
}, [loadDocumentDetectionModel, loadFocusModel]);
|
|
14436
|
+
var ready = documentDetectionModelState === 'ready' && focusModelState === 'ready';
|
|
14437
|
+
var modelLoadState = ready ? 'ready' : documentDetectionModelState === 'warming' || focusModelState === 'warming' ? 'warming' : focusModelState === 'downloading' || documentDetectionModelState === 'downloading' ? 'downloading' : 'not-started';
|
|
14438
|
+
var modelWarmingStartedAt = !documentDetectionModelWarmingStartedAt && !focusModelWarmingStartedAt ? null : Math.min.apply(Math, [documentDetectionModelWarmingStartedAt, focusModelWarmingStartedAt].filter(function (v) {
|
|
14439
|
+
return v !== null;
|
|
14440
|
+
}));
|
|
14378
14441
|
var value = React.useMemo(function () {
|
|
14379
14442
|
return {
|
|
14380
|
-
ready:
|
|
14443
|
+
ready: ready,
|
|
14381
14444
|
modelDownloadProgress: (documentDetectionModelDownloadProgress + focusModelDownloadProgress) / 2,
|
|
14445
|
+
modelLoadState: modelLoadState,
|
|
14446
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
14382
14447
|
modelError: modelError,
|
|
14383
14448
|
start: startDocumentDetection,
|
|
14384
14449
|
stop: stopDocumentDetection,
|
|
@@ -14396,7 +14461,7 @@
|
|
|
14396
14461
|
requiredDocumentType: requiredDocumentType,
|
|
14397
14462
|
setRequiredDocumentType: setRequiredDocumentType
|
|
14398
14463
|
};
|
|
14399
|
-
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress,
|
|
14464
|
+
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress, focusModelDownloadProgress, focusPredictionTime, getBestFrame, load, modelLoadState, modelError, modelWarmingStartedAt, onPredictionMade, ready, requiredDocumentType, resetBestFrame, setDocumentDetectionBoundaries, setThresholds, startDocumentDetection, stopDocumentDetection, thresholds]);
|
|
14400
14465
|
return /*#__PURE__*/React.createElement(IdCaptureModelsContext.Provider, {
|
|
14401
14466
|
value: value
|
|
14402
14467
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -16417,7 +16482,10 @@
|
|
|
16417
16482
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
16418
16483
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
16419
16484
|
var _b, _c, _d, _e, _f, _g;
|
|
16420
|
-
var
|
|
16485
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
16486
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16487
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16488
|
+
onDismissed = _a.onDismissed,
|
|
16421
16489
|
onUserCancel = _a.onUserCancel,
|
|
16422
16490
|
instructions = _a.instructions,
|
|
16423
16491
|
_h = _a.rotateImage,
|
|
@@ -16435,7 +16503,9 @@
|
|
|
16435
16503
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
16436
16504
|
var _o = useIdCaptureModelsContext(),
|
|
16437
16505
|
modelsReady = _o.ready,
|
|
16438
|
-
|
|
16506
|
+
modelLoadState = _o.modelLoadState,
|
|
16507
|
+
modelDownloadProgress = _o.modelDownloadProgress,
|
|
16508
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt;
|
|
16439
16509
|
var _p = useCameraStore(),
|
|
16440
16510
|
cameraReady = _p.cameraReady,
|
|
16441
16511
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -16458,11 +16528,27 @@
|
|
|
16458
16528
|
pleaseWaitText: 'Please wait...',
|
|
16459
16529
|
sessionCheckingText: 'Authenticating...'
|
|
16460
16530
|
});
|
|
16531
|
+
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
16532
|
+
React.useEffect(function () {
|
|
16533
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
16534
|
+
}, [onLoadingStarted]);
|
|
16535
|
+
var onLoadingProgressRef = React.useRef(onLoadingProgress);
|
|
16536
|
+
React.useEffect(function () {
|
|
16537
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
16538
|
+
}, [onLoadingProgress]);
|
|
16539
|
+
var onLoadingCompletedRef = React.useRef(onLoadingCompleted);
|
|
16540
|
+
React.useEffect(function () {
|
|
16541
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
16542
|
+
}, [onLoadingCompleted]);
|
|
16461
16543
|
var ready = sessionReady && modelsReady && cameraReady;
|
|
16462
16544
|
React.useEffect(function () {
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16545
|
+
var _a;
|
|
16546
|
+
if (ready) {
|
|
16547
|
+
(_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
16548
|
+
return function () {
|
|
16549
|
+
return null;
|
|
16550
|
+
};
|
|
16551
|
+
}
|
|
16466
16552
|
var t = setTimeout(function () {
|
|
16467
16553
|
return setDismissed(false);
|
|
16468
16554
|
}, 500);
|
|
@@ -16471,6 +16557,19 @@
|
|
|
16471
16557
|
};
|
|
16472
16558
|
}, [ready]);
|
|
16473
16559
|
var imageRef = React.useRef(null);
|
|
16560
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
16561
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
16562
|
+
var modelLoadProgress = modelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
16563
|
+
React.useEffect(function () {
|
|
16564
|
+
var _a;
|
|
16565
|
+
(_a = onLoadingStartedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingStartedRef);
|
|
16566
|
+
}, []);
|
|
16567
|
+
React.useEffect(function () {
|
|
16568
|
+
var _a;
|
|
16569
|
+
if (modelLoadProgress > 0) {
|
|
16570
|
+
(_a = onLoadingProgressRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingProgressRef, modelLoadProgress);
|
|
16571
|
+
}
|
|
16572
|
+
}, [modelLoadProgress]);
|
|
16474
16573
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
16475
16574
|
if (cameraAccessDenied) {
|
|
16476
16575
|
return /*#__PURE__*/React.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -16530,7 +16629,7 @@
|
|
|
16530
16629
|
}, /*#__PURE__*/React.createElement(ProgressBarBackground$1, {
|
|
16531
16630
|
className: classNames.progressBackground
|
|
16532
16631
|
}), /*#__PURE__*/React.createElement(LoadingOverlayProgressBar, {
|
|
16533
|
-
"$progress":
|
|
16632
|
+
"$progress": modelLoadProgress,
|
|
16534
16633
|
className: classNames.progressBar
|
|
16535
16634
|
}, /*#__PURE__*/React.createElement(ProgressIndicator$1, {
|
|
16536
16635
|
className: classNames.progressIndicator
|
|
@@ -16548,7 +16647,7 @@
|
|
|
16548
16647
|
}, /*#__PURE__*/React.createElement(LoadingListItemIndicator, {
|
|
16549
16648
|
className: classNames.loadingListItemIndicator,
|
|
16550
16649
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
16551
|
-
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText :
|
|
16650
|
+
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelLoadState === 'downloading' ? "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)") : modelLoadState === 'warming' ? verbiage.modelsWarmingUpText : verbiage.modelsReadyText))), /*#__PURE__*/React.createElement(ContinueButtonContainer$1, {
|
|
16552
16651
|
className: classNames.continueBtnContainer
|
|
16553
16652
|
}, (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, {
|
|
16554
16653
|
autoFocus: true,
|
|
@@ -16587,9 +16686,12 @@
|
|
|
16587
16686
|
var _a, _b, _c, _d;
|
|
16588
16687
|
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;
|
|
16589
16688
|
});
|
|
16590
|
-
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation)
|
|
16689
|
+
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n background: ", ";\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n background: ", ";\n"])), progressBarAnimation, function (props) {
|
|
16690
|
+
var _a, _b, _c, _d;
|
|
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.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-primary-500)';
|
|
16692
|
+
});
|
|
16591
16693
|
var CustomLoadingGraphic$1 = styled.img(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
16592
|
-
var ContinueButtonContainer$1 = styled.div(templateObject_9$
|
|
16694
|
+
var ContinueButtonContainer$1 = styled.div(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
16593
16695
|
var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObject_10$1 = __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) {
|
|
16594
16696
|
var _a, _b, _c, _d, _e, _f;
|
|
16595
16697
|
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, ";") : '';
|
|
@@ -16609,7 +16711,7 @@
|
|
|
16609
16711
|
var _a, _b, _c, _d;
|
|
16610
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.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
16611
16713
|
});
|
|
16612
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$
|
|
16714
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$1;
|
|
16613
16715
|
|
|
16614
16716
|
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"])));
|
|
16615
16717
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -17475,7 +17577,7 @@
|
|
|
17475
17577
|
"$maskColor": maskColor,
|
|
17476
17578
|
"$minHeight": padding,
|
|
17477
17579
|
className: regionClsx(classNames, 'Top')
|
|
17478
|
-
}, instruction
|
|
17580
|
+
}, !!instruction && ( /*#__PURE__*/React.createElement(GuideText, {
|
|
17479
17581
|
className: classNames.guideText
|
|
17480
17582
|
}, instruction))), /*#__PURE__*/React.createElement(GuideCenterRow, {
|
|
17481
17583
|
className: classNames.centerRow
|
|
@@ -17526,7 +17628,7 @@
|
|
|
17526
17628
|
"$maskColor": maskColor,
|
|
17527
17629
|
"$minHeight": padding,
|
|
17528
17630
|
className: regionClsx(classNames, 'Bottom')
|
|
17529
|
-
}, instruction
|
|
17631
|
+
}, !!instruction && ( /*#__PURE__*/React.createElement(GuideText, {
|
|
17530
17632
|
style: {
|
|
17531
17633
|
opacity: 0
|
|
17532
17634
|
}
|
|
@@ -17564,8 +17666,8 @@
|
|
|
17564
17666
|
return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
|
|
17565
17667
|
});
|
|
17566
17668
|
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"])));
|
|
17567
|
-
var GuideCenterInner = styled.div(templateObject_9$
|
|
17568
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$
|
|
17669
|
+
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"])));
|
|
17670
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$2;
|
|
17569
17671
|
|
|
17570
17672
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
17571
17673
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -19079,7 +19181,7 @@
|
|
|
19079
19181
|
var DashedSeparator = styled.div(templateObject_6$4 || (templateObject_6$4 = __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"])));
|
|
19080
19182
|
var OrWrapper = styled.div(templateObject_7$3 || (templateObject_7$3 = __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"])));
|
|
19081
19183
|
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"])));
|
|
19082
|
-
var Button = styled(WideBorderButton)(templateObject_9 || (templateObject_9 = __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"])));
|
|
19184
|
+
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"])));
|
|
19083
19185
|
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"])));
|
|
19084
19186
|
var Dialog = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"], ["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"])), function (props) {
|
|
19085
19187
|
var _a;
|
|
@@ -19357,17 +19459,20 @@
|
|
|
19357
19459
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
19358
19460
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
19359
19461
|
}
|
|
19360
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19462
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19361
19463
|
|
|
19362
19464
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
19363
19465
|
var _b, _c, _d, _e, _f;
|
|
19364
|
-
var
|
|
19466
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
19467
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
19468
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
19469
|
+
onSuccess = _a.onSuccess,
|
|
19365
19470
|
onExitCapture = _a.onExitCapture,
|
|
19366
19471
|
onUserCancel = _a.onUserCancel,
|
|
19472
|
+
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
19367
19473
|
_g = _a.loadingOverlayMode,
|
|
19368
19474
|
loadingOverlayMode = _g === void 0 ? 'default' : _g,
|
|
19369
19475
|
customOverlayContent = _a.customOverlayContent,
|
|
19370
|
-
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
19371
19476
|
precapturedDocuments = _a.precapturedDocuments,
|
|
19372
19477
|
_h = _a.captureRequirement,
|
|
19373
19478
|
captureRequirement = _h === void 0 ? 'idCardOrPassport' : _h,
|
|
@@ -19713,6 +19818,9 @@
|
|
|
19713
19818
|
colors: colors.loadingOverlay,
|
|
19714
19819
|
verbiage: verbiage.loadingOverlay,
|
|
19715
19820
|
onUserCancel: onUserCancel,
|
|
19821
|
+
onLoadingStarted: onLoadingStarted,
|
|
19822
|
+
onLoadingProgress: onLoadingProgress,
|
|
19823
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
19716
19824
|
onDismissed: function onDismissed() {
|
|
19717
19825
|
setOverlayDismissed(true);
|
|
19718
19826
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -20370,6 +20478,8 @@
|
|
|
20370
20478
|
},
|
|
20371
20479
|
ready: false,
|
|
20372
20480
|
error: null,
|
|
20481
|
+
modelLoadState: 'not-started',
|
|
20482
|
+
modelWarmingStartedAt: null,
|
|
20373
20483
|
modelDownloadProgress: 0
|
|
20374
20484
|
});
|
|
20375
20485
|
function SelfieGuidanceModelsProvider(_a) {
|
|
@@ -20401,7 +20511,9 @@
|
|
|
20401
20511
|
videoRef: videoRef
|
|
20402
20512
|
}),
|
|
20403
20513
|
ready = _f.ready,
|
|
20514
|
+
modelLoadState = _f.modelLoadState,
|
|
20404
20515
|
modelDownloadProgress = _f.modelDownloadProgress,
|
|
20516
|
+
modelWarmingStartedAt = _f.modelWarmingStartedAt,
|
|
20405
20517
|
modelError = _f.modelError;
|
|
20406
20518
|
var _g = useFrameLoop(React.useCallback(function () {
|
|
20407
20519
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -20463,9 +20575,11 @@
|
|
|
20463
20575
|
canvasRef: canvasRef,
|
|
20464
20576
|
onPredictionMade: onPredictionMade,
|
|
20465
20577
|
error: modelError,
|
|
20466
|
-
modelDownloadProgress: modelDownloadProgress
|
|
20578
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
20579
|
+
modelLoadState: modelLoadState,
|
|
20580
|
+
modelWarmingStartedAt: modelWarmingStartedAt
|
|
20467
20581
|
};
|
|
20468
|
-
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress]);
|
|
20582
|
+
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress, modelLoadState, modelWarmingStartedAt]);
|
|
20469
20583
|
return /*#__PURE__*/React__namespace.createElement(SelfieGuidanceModelsContext.Provider, {
|
|
20470
20584
|
value: value
|
|
20471
20585
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -20830,7 +20944,7 @@
|
|
|
20830
20944
|
}), /*#__PURE__*/React.createElement(GuidesComponent, {
|
|
20831
20945
|
classNames: classNames.guides,
|
|
20832
20946
|
status: satisfied ? 'processing' : 'ready'
|
|
20833
|
-
}), guidanceMessage
|
|
20947
|
+
}), !!guidanceMessage && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
20834
20948
|
className: classNames.guidanceMessageContainer
|
|
20835
20949
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
20836
20950
|
"$variant": satisfied ? 'positive' : 'negative',
|
|
@@ -21171,7 +21285,7 @@
|
|
|
21171
21285
|
guidesComponent: guidesByRequestState,
|
|
21172
21286
|
classNames: classNames,
|
|
21173
21287
|
colors: colors,
|
|
21174
|
-
verbiage:
|
|
21288
|
+
verbiage: rawVerbiage,
|
|
21175
21289
|
debugMode: debugMode
|
|
21176
21290
|
}), debugMode && !disableCapturePreview && imageUrl && ( /*#__PURE__*/React.createElement(SelfieProgressPreview, {
|
|
21177
21291
|
classNames: classNames.imagePreview,
|
|
@@ -23436,8 +23550,6 @@
|
|
|
23436
23550
|
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
23437
23551
|
_d = _a.minSignaturePadPoints,
|
|
23438
23552
|
minSignaturePadPoints = _d === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _d,
|
|
23439
|
-
signaturePadEmptyContent = _a.signaturePadEmptyContent,
|
|
23440
|
-
headTrackingUnsatisfiedContent = _a.headTrackingUnsatisfiedContent,
|
|
23441
23553
|
_e = _a.headTrackingSatisfied,
|
|
23442
23554
|
headTrackingSatisfied = _e === void 0 ? true : _e,
|
|
23443
23555
|
_f = _a.classNames,
|
|
@@ -23458,6 +23570,8 @@
|
|
|
23458
23570
|
signatureValid = _l[0],
|
|
23459
23571
|
setSignatureValid = _l[1];
|
|
23460
23572
|
var verbiage = useTranslations(rawVerbiage, {
|
|
23573
|
+
signaturePadEmptyText: '',
|
|
23574
|
+
headTrackingUnsatisfiedText: '',
|
|
23461
23575
|
clearSignatureBtnText: 'Clear',
|
|
23462
23576
|
acceptSignatureBtnText: 'Accept'
|
|
23463
23577
|
});
|
|
@@ -23471,9 +23585,13 @@
|
|
|
23471
23585
|
var isSigning = requestedAction === 'CAPTURE_SIGNATURE';
|
|
23472
23586
|
var canClear = isSigning && !signaturePadEmpty;
|
|
23473
23587
|
var canSubmit = isSigning && signatureValid && headTrackingSatisfied;
|
|
23474
|
-
var
|
|
23475
|
-
|
|
23476
|
-
|
|
23588
|
+
var _m = React.useState(false),
|
|
23589
|
+
emptyContentDismissed = _m[0],
|
|
23590
|
+
setEmptyContentDismissed = _m[1];
|
|
23591
|
+
var displayEmptyState = requestedAction === 'CAPTURE_SIGNATURE' && signaturePadEmpty && !emptyContentDismissed;
|
|
23592
|
+
React.useEffect(function () {
|
|
23593
|
+
if (signaturePadEmpty) setEmptyContentDismissed(false);
|
|
23594
|
+
}, [signaturePadEmpty]);
|
|
23477
23595
|
return /*#__PURE__*/React.createElement(Container$3, {
|
|
23478
23596
|
className: classNames.container
|
|
23479
23597
|
}, /*#__PURE__*/React.createElement(Inner$1, {
|
|
@@ -23509,11 +23627,18 @@
|
|
|
23509
23627
|
});
|
|
23510
23628
|
setSignatureValid(points.length >= minSignaturePadPoints);
|
|
23511
23629
|
}
|
|
23512
|
-
}), !headTrackingSatisfied &&
|
|
23513
|
-
className: classNames.
|
|
23514
|
-
},
|
|
23515
|
-
className: classNames.
|
|
23516
|
-
},
|
|
23630
|
+
}), !headTrackingSatisfied && !!verbiage.headTrackingUnsatisfiedText ? ( /*#__PURE__*/React.createElement(SignaturePadContentContainer, {
|
|
23631
|
+
className: classNames.headTrackingUnsatisfiedContentContainer
|
|
23632
|
+
}, /*#__PURE__*/React.createElement(SignaturePadContentInner, {
|
|
23633
|
+
className: classNames.headTrackingUnsatisfiedContentInner
|
|
23634
|
+
}, verbiage.headTrackingUnsatisfiedText))) : displayEmptyState && !!verbiage.signaturePadEmptyText && ( /*#__PURE__*/React.createElement(SignaturePadContentContainer, {
|
|
23635
|
+
className: classNames.emptyContentContainer,
|
|
23636
|
+
onClick: function onClick() {
|
|
23637
|
+
return setEmptyContentDismissed(true);
|
|
23638
|
+
}
|
|
23639
|
+
}, /*#__PURE__*/React.createElement(SignaturePadContentInner, {
|
|
23640
|
+
className: classNames.emptyContentInner
|
|
23641
|
+
}, verbiage.signaturePadEmptyText)))), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
|
|
23517
23642
|
className: classNames.signatureButtonsRow
|
|
23518
23643
|
}, /*#__PURE__*/React.createElement(LoaderButton, {
|
|
23519
23644
|
variant: "secondary",
|
|
@@ -23549,13 +23674,15 @@
|
|
|
23549
23674
|
return props.$headTrackingUnsatisfied ? 'pointer-events: none;' : '';
|
|
23550
23675
|
});
|
|
23551
23676
|
var AcceptBtn = styled(LoaderButton)(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
|
|
23552
|
-
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n
|
|
23677
|
+
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __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"])));
|
|
23678
|
+
var SignaturePadContentInner = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"])), function (props) {
|
|
23553
23679
|
var _a, _b, _c;
|
|
23554
23680
|
return (_c = (_b = (_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.canvas) === null || _b === void 0 ? void 0 : _b.emptyTextColor) !== null && _c !== void 0 ? _c : 'black';
|
|
23555
23681
|
});
|
|
23556
|
-
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8;
|
|
23682
|
+
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8, templateObject_9;
|
|
23557
23683
|
|
|
23558
23684
|
var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
|
|
23685
|
+
var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
|
|
23559
23686
|
var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
23560
23687
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
23561
23688
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
@@ -23565,38 +23692,38 @@
|
|
|
23565
23692
|
guidesComponent = _a.guidesComponent,
|
|
23566
23693
|
_c = _a.minSignaturePadPoints,
|
|
23567
23694
|
minSignaturePadPoints = _c === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _c,
|
|
23568
|
-
|
|
23569
|
-
|
|
23570
|
-
|
|
23571
|
-
classNames =
|
|
23572
|
-
|
|
23573
|
-
colors =
|
|
23574
|
-
|
|
23575
|
-
rawVerbiage =
|
|
23576
|
-
|
|
23577
|
-
debugMode =
|
|
23578
|
-
var
|
|
23695
|
+
_d = _a.headTrackingBoundaryPercentage,
|
|
23696
|
+
headTrackingBoundaryPercentage = _d === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _d,
|
|
23697
|
+
_e = _a.classNames,
|
|
23698
|
+
classNames = _e === void 0 ? {} : _e,
|
|
23699
|
+
_f = _a.colors,
|
|
23700
|
+
colors = _f === void 0 ? {} : _f,
|
|
23701
|
+
_g = _a.verbiage,
|
|
23702
|
+
rawVerbiage = _g === void 0 ? {} : _g,
|
|
23703
|
+
_h = _a.debugMode,
|
|
23704
|
+
debugMode = _h === void 0 ? false : _h;
|
|
23705
|
+
var _j = useCameraStore(useShallow(function (state) {
|
|
23579
23706
|
return {
|
|
23580
23707
|
camera: state.camera,
|
|
23581
23708
|
videoWidth: state.videoWidth,
|
|
23582
23709
|
videoHeight: state.videoHeight
|
|
23583
23710
|
};
|
|
23584
23711
|
})),
|
|
23585
|
-
camera =
|
|
23586
|
-
videoWidth =
|
|
23587
|
-
videoHeight =
|
|
23588
|
-
var
|
|
23589
|
-
onPredictionMade =
|
|
23590
|
-
start =
|
|
23591
|
-
stop =
|
|
23592
|
-
var
|
|
23593
|
-
signatureData =
|
|
23594
|
-
signatureDataUrl =
|
|
23595
|
-
signatureVideoData =
|
|
23596
|
-
startRecording =
|
|
23597
|
-
stopRecording =
|
|
23598
|
-
clearRecordedData =
|
|
23599
|
-
isRecording =
|
|
23712
|
+
camera = _j.camera,
|
|
23713
|
+
videoWidth = _j.videoWidth,
|
|
23714
|
+
videoHeight = _j.videoHeight;
|
|
23715
|
+
var _k = useSelfieGuidanceModelsContext(),
|
|
23716
|
+
onPredictionMade = _k.onPredictionMade,
|
|
23717
|
+
start = _k.start,
|
|
23718
|
+
stop = _k.stop;
|
|
23719
|
+
var _l = useVideoSignatureContext(),
|
|
23720
|
+
signatureData = _l.signatureData,
|
|
23721
|
+
signatureDataUrl = _l.signatureDataUrl,
|
|
23722
|
+
signatureVideoData = _l.signatureVideoData,
|
|
23723
|
+
startRecording = _l.startRecording,
|
|
23724
|
+
stopRecording = _l.stopRecording,
|
|
23725
|
+
clearRecordedData = _l.clearRecordedData,
|
|
23726
|
+
isRecording = _l.isRecording;
|
|
23600
23727
|
React.useEffect(function () {
|
|
23601
23728
|
startRecording();
|
|
23602
23729
|
return stopRecording;
|
|
@@ -23615,31 +23742,31 @@
|
|
|
23615
23742
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
23616
23743
|
}
|
|
23617
23744
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
23618
|
-
var
|
|
23619
|
-
headTrackingSatisfied =
|
|
23620
|
-
setHeadTrackingSatisfied =
|
|
23621
|
-
var
|
|
23622
|
-
lastFace =
|
|
23623
|
-
setLastFace =
|
|
23624
|
-
var
|
|
23625
|
-
numFramesWithoutFaces =
|
|
23626
|
-
setNumFramesWithoutFaces =
|
|
23627
|
-
onPredictionMade(f(function (_a) {
|
|
23745
|
+
var _m = React.useState(true),
|
|
23746
|
+
headTrackingSatisfied = _m[0],
|
|
23747
|
+
setHeadTrackingSatisfied = _m[1];
|
|
23748
|
+
var _o = React.useState(null),
|
|
23749
|
+
lastFace = _o[0],
|
|
23750
|
+
setLastFace = _o[1];
|
|
23751
|
+
var _p = React.useState(0),
|
|
23752
|
+
numFramesWithoutFaces = _p[0],
|
|
23753
|
+
setNumFramesWithoutFaces = _p[1];
|
|
23754
|
+
onPredictionMade(f(React.useCallback(function (_a) {
|
|
23628
23755
|
var face = _a.face;
|
|
23629
23756
|
if (!camera) return;
|
|
23630
|
-
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth *
|
|
23757
|
+
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.xMax) > videoWidth * (1 - headTrackingBoundaryPercentage) || (face === null || face === void 0 ? void 0 : face.box.yMin) < videoHeight * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.yMax) > videoHeight * (1 - headTrackingBoundaryPercentage);
|
|
23631
23758
|
setLastFace(face);
|
|
23632
23759
|
setHeadTrackingSatisfied(!!face && !nearBoundary);
|
|
23633
23760
|
setNumFramesWithoutFaces(face ? 0 : function (n) {
|
|
23634
23761
|
return n + 1;
|
|
23635
23762
|
});
|
|
23636
|
-
}, 16));
|
|
23637
|
-
var
|
|
23638
|
-
ref =
|
|
23639
|
-
|
|
23640
|
-
width =
|
|
23641
|
-
|
|
23642
|
-
height =
|
|
23763
|
+
}, [camera, headTrackingBoundaryPercentage, videoHeight, videoWidth]), 16));
|
|
23764
|
+
var _q = useResizeObserver(),
|
|
23765
|
+
ref = _q.ref,
|
|
23766
|
+
_r = _q.width,
|
|
23767
|
+
width = _r === void 0 ? 1 : _r,
|
|
23768
|
+
_s = _q.height,
|
|
23769
|
+
height = _s === void 0 ? 1 : _s;
|
|
23643
23770
|
var debugScalingDetails = useDebugScalingDetails({
|
|
23644
23771
|
enabled: debugMode,
|
|
23645
23772
|
pageWidth: width,
|
|
@@ -23654,7 +23781,7 @@
|
|
|
23654
23781
|
return /*#__PURE__*/React.createElement(Container$2, {
|
|
23655
23782
|
ref: ref,
|
|
23656
23783
|
className: classNames.container
|
|
23657
|
-
}, verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23784
|
+
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23658
23785
|
"$top": "10%",
|
|
23659
23786
|
className: classNames.guidanceMessageContainer
|
|
23660
23787
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
@@ -23664,11 +23791,10 @@
|
|
|
23664
23791
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React.createElement(GuidesComponent, {
|
|
23665
23792
|
status: "success",
|
|
23666
23793
|
key: "video-signature-guides-".concat(headTrackingSatisfied ? 'satisfied' : 'unsatisfied'),
|
|
23667
|
-
classNames: classNames.videoSignatureGuidesClassNames,
|
|
23668
23794
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
23669
|
-
signaturePadEmptyContent: signaturePadEmptyContent,
|
|
23670
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
23671
23795
|
headTrackingSatisfied: headTrackingSatisfied,
|
|
23796
|
+
classNames: classNames.guides,
|
|
23797
|
+
verbiage: rawVerbiage.guides,
|
|
23672
23798
|
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
23673
23799
|
return setTimeout(clearRecordedData, 100);
|
|
23674
23800
|
} : undefined
|
|
@@ -23756,43 +23882,43 @@
|
|
|
23756
23882
|
captureAudio = _d === void 0 ? false : _d,
|
|
23757
23883
|
_e = _a.minSignaturePadPoints,
|
|
23758
23884
|
minSignaturePadPoints = _e === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _e,
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
23763
|
-
|
|
23764
|
-
restartVideoOnSignaturePadCleared =
|
|
23885
|
+
_f = _a.headTrackingBoundaryPercentage,
|
|
23886
|
+
headTrackingBoundaryPercentage = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _f,
|
|
23887
|
+
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
23888
|
+
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
23889
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
23890
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
23765
23891
|
faceLivenessProps = _a.faceLivenessProps,
|
|
23766
|
-
|
|
23767
|
-
assets =
|
|
23768
|
-
|
|
23769
|
-
classNames =
|
|
23770
|
-
|
|
23771
|
-
colors =
|
|
23772
|
-
|
|
23773
|
-
verbiage =
|
|
23774
|
-
|
|
23775
|
-
debugMode =
|
|
23776
|
-
var
|
|
23777
|
-
selfieImage =
|
|
23778
|
-
setSelfieImage =
|
|
23779
|
-
setSignatureData =
|
|
23780
|
-
setSignatureVideoUrl =
|
|
23781
|
-
logSelfieCaptureAttempt =
|
|
23892
|
+
_j = _a.assets,
|
|
23893
|
+
assets = _j === void 0 ? {} : _j,
|
|
23894
|
+
_k = _a.classNames,
|
|
23895
|
+
classNames = _k === void 0 ? {} : _k,
|
|
23896
|
+
_l = _a.colors,
|
|
23897
|
+
colors = _l === void 0 ? {} : _l,
|
|
23898
|
+
_m = _a.verbiage,
|
|
23899
|
+
verbiage = _m === void 0 ? {} : _m,
|
|
23900
|
+
_o = _a.debugMode,
|
|
23901
|
+
debugMode = _o === void 0 ? false : _o;
|
|
23902
|
+
var _p = React.useContext(SubmissionContext),
|
|
23903
|
+
selfieImage = _p.selfieImage,
|
|
23904
|
+
setSelfieImage = _p.setSelfieImage,
|
|
23905
|
+
setSignatureData = _p.setSignatureData,
|
|
23906
|
+
setSignatureVideoUrl = _p.setSignatureVideoUrl,
|
|
23907
|
+
logSelfieCaptureAttempt = _p.logSelfieCaptureAttempt;
|
|
23782
23908
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
23783
23909
|
return {
|
|
23784
23910
|
cameraAccessDenied: state.cameraAccessDenied
|
|
23785
23911
|
};
|
|
23786
23912
|
})).cameraAccessDenied;
|
|
23787
|
-
var
|
|
23788
|
-
captureState =
|
|
23789
|
-
setCaptureState =
|
|
23913
|
+
var _q = React.useState('CHECKING_LIVENESS'),
|
|
23914
|
+
captureState = _q[0],
|
|
23915
|
+
setCaptureState = _q[1];
|
|
23790
23916
|
var operationStartedAt = React.useRef();
|
|
23791
23917
|
var captureStartedAt = React.useRef();
|
|
23792
23918
|
var captureEndedAt = React.useRef();
|
|
23793
|
-
var
|
|
23794
|
-
start =
|
|
23795
|
-
stop =
|
|
23919
|
+
var _r = useSelfieGuidanceModelsContext(),
|
|
23920
|
+
start = _r.start,
|
|
23921
|
+
stop = _r.stop;
|
|
23796
23922
|
React.useEffect(function () {
|
|
23797
23923
|
operationStartedAt.current = new Date();
|
|
23798
23924
|
}, []);
|
|
@@ -23828,9 +23954,9 @@
|
|
|
23828
23954
|
setSelfieImage(selfieFromRequest);
|
|
23829
23955
|
}
|
|
23830
23956
|
}, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
|
|
23831
|
-
var
|
|
23832
|
-
signatureImageUrl =
|
|
23833
|
-
setSignatureImageUrl =
|
|
23957
|
+
var _s = React.useState(null),
|
|
23958
|
+
signatureImageUrl = _s[0],
|
|
23959
|
+
setSignatureImageUrl = _s[1];
|
|
23834
23960
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
23835
23961
|
setSignatureData(signatureData);
|
|
23836
23962
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -23838,16 +23964,16 @@
|
|
|
23838
23964
|
setCaptureState('SUCCESS');
|
|
23839
23965
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
23840
23966
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
23841
|
-
var
|
|
23842
|
-
showLoadingOverlay =
|
|
23843
|
-
setShowLoadingOverlay =
|
|
23967
|
+
var _t = React.useState(true),
|
|
23968
|
+
showLoadingOverlay = _t[0],
|
|
23969
|
+
setShowLoadingOverlay = _t[1];
|
|
23844
23970
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
23845
23971
|
setShowLoadingOverlay(false);
|
|
23846
23972
|
setCaptureState('CHECKING_LIVENESS');
|
|
23847
23973
|
}, []);
|
|
23848
|
-
var
|
|
23849
|
-
attempt =
|
|
23850
|
-
setAttempt =
|
|
23974
|
+
var _u = React.useState(0),
|
|
23975
|
+
attempt = _u[0],
|
|
23976
|
+
setAttempt = _u[1];
|
|
23851
23977
|
var onRetry = React.useCallback(function () {
|
|
23852
23978
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
23853
23979
|
setAttempt(function (n) {
|
|
@@ -23866,11 +23992,11 @@
|
|
|
23866
23992
|
}, [cameraAccessDenied]);
|
|
23867
23993
|
var guidesComponent = React.useCallback(function (props) {
|
|
23868
23994
|
return /*#__PURE__*/React.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
23869
|
-
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
23870
|
-
|
|
23871
|
-
|
|
23995
|
+
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.guides,
|
|
23996
|
+
verbiage: verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides,
|
|
23997
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
23872
23998
|
}));
|
|
23873
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
23999
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.guides, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
|
|
23874
24000
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
23875
24001
|
var onExitAfterFailure = React.useCallback(function (resp, req) {
|
|
23876
24002
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -23915,8 +24041,7 @@
|
|
|
23915
24041
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
23916
24042
|
onExit: onExitCapture,
|
|
23917
24043
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
23918
|
-
|
|
23919
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
24044
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
23920
24045
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
23921
24046
|
guidesComponent: guidesComponent,
|
|
23922
24047
|
classNames: classNames,
|
|
@@ -24115,8 +24240,7 @@
|
|
|
24115
24240
|
var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$2, templateObject_5$2, templateObject_6$1, templateObject_7;
|
|
24116
24241
|
|
|
24117
24242
|
var ReadTextPrompt = function ReadTextPrompt(_a) {
|
|
24118
|
-
var
|
|
24119
|
-
onComplete = _a.onComplete,
|
|
24243
|
+
var onComplete = _a.onComplete,
|
|
24120
24244
|
_b = _a.durationMs,
|
|
24121
24245
|
durationMs = _b === void 0 ? 15000 : _b,
|
|
24122
24246
|
_c = _a.minReadingMs,
|
|
@@ -24125,13 +24249,13 @@
|
|
|
24125
24249
|
classNames = _d === void 0 ? {} : _d,
|
|
24126
24250
|
_e = _a.verbiage,
|
|
24127
24251
|
rawVerbiage = _e === void 0 ? {} : _e;
|
|
24128
|
-
text = useVerbiage(text, '');
|
|
24129
24252
|
var countdownTimeoutRef = React.useRef(undefined);
|
|
24130
24253
|
var _f = React.useState(durationMs / 1000),
|
|
24131
24254
|
countdownRemaining = _f[0],
|
|
24132
24255
|
setCountdownRemaining = _f[1];
|
|
24133
24256
|
var verbiage = useTranslations(rawVerbiage, {
|
|
24134
24257
|
headingText: 'Please read the following text aloud',
|
|
24258
|
+
promptText: '',
|
|
24135
24259
|
doneBtnText: 'Done'
|
|
24136
24260
|
});
|
|
24137
24261
|
var manualCountdown = React.useCallback(function (remainingTime) {
|
|
@@ -24169,7 +24293,7 @@
|
|
|
24169
24293
|
className: classNames.heading
|
|
24170
24294
|
}, verbiage.headingText), /*#__PURE__*/React.createElement(ReadTextPromptText, {
|
|
24171
24295
|
className: classNames.prompt
|
|
24172
|
-
},
|
|
24296
|
+
}, verbiage.promptText), /*#__PURE__*/React.createElement(ReadTextPromptButtonsRow, {
|
|
24173
24297
|
className: classNames.buttonsRow
|
|
24174
24298
|
}, /*#__PURE__*/React.createElement(ReadTextPromptTimeRemaining, {
|
|
24175
24299
|
className: classNames.timeRemaining
|
|
@@ -24610,18 +24734,22 @@
|
|
|
24610
24734
|
});
|
|
24611
24735
|
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
24612
24736
|
var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
|
|
24737
|
+
var readTextPromptVerbiage = React.useMemo(function () {
|
|
24738
|
+
return _assign({
|
|
24739
|
+
promptText: readTextPrompt
|
|
24740
|
+
}, rawVerbiage.readTextPrompt);
|
|
24741
|
+
}, [rawVerbiage.readTextPrompt, readTextPrompt]);
|
|
24613
24742
|
return /*#__PURE__*/React.createElement(Container, {
|
|
24614
24743
|
ref: ref,
|
|
24615
24744
|
className: classNames.container
|
|
24616
24745
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
24617
24746
|
ref: photoCanvas
|
|
24618
24747
|
}), requestedAction === 'READ_TEXT' ? ( /*#__PURE__*/React.createElement(ReadTextPrompt, {
|
|
24619
|
-
text: readTextPrompt,
|
|
24620
24748
|
startedAt: timeoutStartedAt || undefined,
|
|
24621
24749
|
durationMs: readTextTimeoutDurationMs,
|
|
24622
24750
|
minReadingMs: readTextMinReadingMs,
|
|
24623
24751
|
classNames: classNames.readTextPrompt,
|
|
24624
|
-
verbiage:
|
|
24752
|
+
verbiage: readTextPromptVerbiage,
|
|
24625
24753
|
onComplete: stopRecording
|
|
24626
24754
|
})) : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdVideoCaptureGuides, {
|
|
24627
24755
|
classNames: classNames.guides,
|
|
@@ -25615,6 +25743,9 @@
|
|
|
25615
25743
|
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
25616
25744
|
_u = _a.allowUploadingDocumentsFromStorage,
|
|
25617
25745
|
allowUploadingDocumentsFromStorage = _u === void 0 ? false : _u,
|
|
25746
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
25747
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
25748
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
25618
25749
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
25619
25750
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
25620
25751
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -25656,6 +25787,9 @@
|
|
|
25656
25787
|
useDebugLogging(debugMode);
|
|
25657
25788
|
var idCaptureProps = React.useMemo(function () {
|
|
25658
25789
|
return {
|
|
25790
|
+
onLoadingStarted: onLoadingStarted,
|
|
25791
|
+
onLoadingProgress: onLoadingProgress,
|
|
25792
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
25659
25793
|
onExitCapture: onExitCapture,
|
|
25660
25794
|
onUserCancel: onUserCancel,
|
|
25661
25795
|
onModelError: onModelError,
|
|
@@ -25685,7 +25819,7 @@
|
|
|
25685
25819
|
verbiage: verbiage,
|
|
25686
25820
|
debugMode: debugMode
|
|
25687
25821
|
};
|
|
25688
|
-
}, [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]);
|
|
25822
|
+
}, [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]);
|
|
25689
25823
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
25690
25824
|
return {
|
|
25691
25825
|
documents: captureAdditionalDocuments,
|
|
@@ -27639,24 +27773,24 @@
|
|
|
27639
27773
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
27640
27774
|
_f = _a.minSignaturePadPoints,
|
|
27641
27775
|
minSignaturePadPoints = _f === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _f,
|
|
27642
|
-
|
|
27643
|
-
|
|
27644
|
-
|
|
27645
|
-
modelLoadTimeoutMs =
|
|
27646
|
-
|
|
27647
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
27648
|
-
|
|
27649
|
-
restartVideoOnSignaturePadCleared =
|
|
27776
|
+
_g = _a.headTrackingBoundaryPercentage,
|
|
27777
|
+
headTrackingBoundaryPercentage = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _g,
|
|
27778
|
+
_h = _a.modelLoadTimeoutMs,
|
|
27779
|
+
modelLoadTimeoutMs = _h === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _h,
|
|
27780
|
+
_j = _a.allowSignatureAfterLivenessCheckFailure,
|
|
27781
|
+
allowSignatureAfterLivenessCheckFailure = _j === void 0 ? false : _j,
|
|
27782
|
+
_k = _a.restartVideoOnSignaturePadCleared,
|
|
27783
|
+
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
27650
27784
|
faceLivenessProps = _a.faceLivenessProps,
|
|
27651
|
-
|
|
27652
|
-
theme =
|
|
27785
|
+
_l = _a.theme,
|
|
27786
|
+
theme = _l === void 0 ? 'default' : _l,
|
|
27653
27787
|
classNames = _a.classNames,
|
|
27654
27788
|
colors = _a.colors,
|
|
27655
27789
|
verbiage = _a.verbiage,
|
|
27656
27790
|
geolocationEnabled = _a.geolocationEnabled,
|
|
27657
27791
|
geolocationRequired = _a.geolocationRequired,
|
|
27658
|
-
|
|
27659
|
-
debugMode =
|
|
27792
|
+
_m = _a.debugMode,
|
|
27793
|
+
debugMode = _m === void 0 ? false : _m;
|
|
27660
27794
|
useLanguage(lang);
|
|
27661
27795
|
useDebugLogging(debugMode);
|
|
27662
27796
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -27701,8 +27835,7 @@
|
|
|
27701
27835
|
skipSuccessScreen: skipSuccessScreen,
|
|
27702
27836
|
captureAudio: captureAudio,
|
|
27703
27837
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
27704
|
-
|
|
27705
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
27838
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
27706
27839
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
27707
27840
|
faceLivenessProps: faceLivenessProps,
|
|
27708
27841
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
@@ -27714,7 +27847,7 @@
|
|
|
27714
27847
|
onModelError: onModelError,
|
|
27715
27848
|
onUserCancel: onUserCancel
|
|
27716
27849
|
};
|
|
27717
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints,
|
|
27850
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27718
27851
|
})))));
|
|
27719
27852
|
};
|
|
27720
27853
|
|