idmission-web-sdk 2.1.49 → 2.1.51
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/CompositeWizard.d.ts +2 -11
- package/dist/{contexts/GuideOrientationContext.d.ts → components/GuideOrientationContextProvider.d.ts} +6 -2
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +3 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -0
- package/dist/components/customer_flows/IdValidation.d.ts +3 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts +3 -0
- package/dist/components/guide_images/backToFront.d.ts +2 -0
- package/dist/components/guide_images/byUrl.d.ts +4 -0
- package/dist/components/guide_images/defaults.d.ts +36 -0
- package/dist/components/guide_images/index.d.ts +6 -0
- package/dist/components/guide_images/merge.d.ts +2 -0
- package/dist/components/guide_images/orientation.d.ts +1 -0
- package/dist/components/guide_images/types.d.ts +14 -0
- package/dist/components/guide_images/useGuideImages.d.ts +2 -0
- package/dist/components/id_capture/FlipIdPrompt.d.ts +3 -8
- package/dist/components/id_capture/IdCapture.d.ts +1 -6
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +4 -4
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +4 -14
- package/dist/components/id_capture/IdCaptureGuides.d.ts +4 -6
- package/dist/components/id_capture/IdCaptureWizard.d.ts +5 -7
- package/dist/components/video_id/IdVideoCapture.d.ts +4 -6
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -3
- package/dist/sdk2.cjs.development.js +590 -538
- 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 +590 -538
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +590 -538
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/GuideOrientationProvider.d.ts +0 -4
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
var webSdkVersion = '2.1.
|
|
218
|
+
var webSdkVersion = '2.1.51';
|
|
219
219
|
|
|
220
220
|
function getPlatform() {
|
|
221
221
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -15745,8 +15745,6 @@
|
|
|
15745
15745
|
});
|
|
15746
15746
|
var templateObject_1$C, templateObject_2$u;
|
|
15747
15747
|
|
|
15748
|
-
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
15749
|
-
|
|
15750
15748
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
15751
15749
|
var _b = _a.classNames,
|
|
15752
15750
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -15799,32 +15797,30 @@
|
|
|
15799
15797
|
guidanceMessage = _a.guidanceMessage,
|
|
15800
15798
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
15801
15799
|
onCapture = _a.onCapture,
|
|
15802
|
-
_l = _a.
|
|
15803
|
-
|
|
15804
|
-
_m = _a.
|
|
15805
|
-
|
|
15806
|
-
_o = _a.
|
|
15807
|
-
|
|
15808
|
-
_p = _a.
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
_s =
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
state = _u[0],
|
|
15820
|
-
dispatch = _u[1];
|
|
15800
|
+
_l = _a.classNames,
|
|
15801
|
+
classNames = _l === void 0 ? {} : _l,
|
|
15802
|
+
_m = _a.colors,
|
|
15803
|
+
colors = _m === void 0 ? {} : _m,
|
|
15804
|
+
_o = _a.verbiage,
|
|
15805
|
+
rawVerbiage = _o === void 0 ? {} : _o,
|
|
15806
|
+
_p = _a.debugMode,
|
|
15807
|
+
debugMode = _p === void 0 ? false : _p;
|
|
15808
|
+
var _q = useResizeObserver(),
|
|
15809
|
+
ref = _q.ref,
|
|
15810
|
+
_r = _q.width,
|
|
15811
|
+
width = _r === void 0 ? 1 : _r,
|
|
15812
|
+
_s = _q.height,
|
|
15813
|
+
height = _s === void 0 ? 1 : _s;
|
|
15814
|
+
var _t = useIdCaptureState(),
|
|
15815
|
+
state = _t[0],
|
|
15816
|
+
dispatch = _t[1];
|
|
15821
15817
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
15822
|
-
var
|
|
15823
|
-
modelsReady =
|
|
15824
|
-
setThresholds =
|
|
15825
|
-
detectionTime =
|
|
15826
|
-
focusPredictionTime =
|
|
15827
|
-
getBestFrame =
|
|
15818
|
+
var _u = React.useContext(IdCaptureModelsContext),
|
|
15819
|
+
modelsReady = _u.ready,
|
|
15820
|
+
setThresholds = _u.setThresholds,
|
|
15821
|
+
detectionTime = _u.detectionTime,
|
|
15822
|
+
focusPredictionTime = _u.focusPredictionTime,
|
|
15823
|
+
getBestFrame = _u.getBestFrame;
|
|
15828
15824
|
React.useEffect(function () {
|
|
15829
15825
|
setThresholds(thresholds);
|
|
15830
15826
|
}, [thresholds, setThresholds]);
|
|
@@ -15889,8 +15885,6 @@
|
|
|
15889
15885
|
});
|
|
15890
15886
|
}, 0);
|
|
15891
15887
|
}, [dispatch, getBestFrame, onCapture, shouldCapture, state.captureStartedAt, state.requestedDocumentType]);
|
|
15892
|
-
assets.portraitGuidesImageUrl || (assets.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
15893
|
-
assets.landscapeGuidesImageUrl || (assets.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
15894
15888
|
var theme = styled.useTheme();
|
|
15895
15889
|
colors.guideBoxUnsatisfiedColor || (colors.guideBoxUnsatisfiedColor = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.unsatisfiedColor) !== null && _d !== void 0 ? _d : 'white');
|
|
15896
15890
|
colors.guideBoxSatisfiedColor || (colors.guideBoxSatisfiedColor = (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.satisfiedColor) !== null && _g !== void 0 ? _g : 'green');
|
|
@@ -15948,6 +15942,8 @@
|
|
|
15948
15942
|
return Math.abs(new Date().getTime() - t.getTime());
|
|
15949
15943
|
};
|
|
15950
15944
|
|
|
15945
|
+
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
15946
|
+
|
|
15951
15947
|
var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
|
|
15952
15948
|
var _b;
|
|
15953
15949
|
var _c = _a.assets,
|
|
@@ -17049,21 +17045,6 @@
|
|
|
17049
17045
|
canvas.style.height = '0';
|
|
17050
17046
|
}
|
|
17051
17047
|
|
|
17052
|
-
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17053
|
-
orientation: 'landscape',
|
|
17054
|
-
wrapperWidth: 1,
|
|
17055
|
-
wrapperHeight: 1,
|
|
17056
|
-
wrapperAspectRatio: 0,
|
|
17057
|
-
imageAspectRatio: 0,
|
|
17058
|
-
wrapperRef: null,
|
|
17059
|
-
setDimensions: function setDimensions() {
|
|
17060
|
-
return null;
|
|
17061
|
-
},
|
|
17062
|
-
onImageLoaded: function onImageLoaded() {
|
|
17063
|
-
return null;
|
|
17064
|
-
}
|
|
17065
|
-
});
|
|
17066
|
-
|
|
17067
17048
|
var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
|
|
17068
17049
|
return props.$isVisible ? '' : 'opacity: 0;';
|
|
17069
17050
|
});
|
|
@@ -17190,16 +17171,16 @@
|
|
|
17190
17171
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
17191
17172
|
x: "0",
|
|
17192
17173
|
y: "0",
|
|
17193
|
-
width:
|
|
17194
|
-
height:
|
|
17174
|
+
width: props.width || '100%',
|
|
17175
|
+
height: props.height || '100%',
|
|
17195
17176
|
rx: borderRadius,
|
|
17196
17177
|
ry: borderRadius
|
|
17197
17178
|
}))), /*#__PURE__*/React.createElement(IdCardBorderRect, {
|
|
17198
17179
|
ref: rectRef,
|
|
17199
17180
|
x: "0",
|
|
17200
17181
|
y: "0",
|
|
17201
|
-
width:
|
|
17202
|
-
height:
|
|
17182
|
+
width: props.width || '100%',
|
|
17183
|
+
height: props.height || '100%',
|
|
17203
17184
|
rx: borderRadius,
|
|
17204
17185
|
ry: borderRadius,
|
|
17205
17186
|
clipPath: "url(#round-corner)",
|
|
@@ -17213,7 +17194,7 @@
|
|
|
17213
17194
|
}
|
|
17214
17195
|
var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n\n @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"], ["\n & > .pulse {\n position: absolute;\n animation: glow-grow 2s ease-out infinite;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n\n @keyframes glow-grow {\n 0% {\n opacity: 0;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n"])));
|
|
17215
17196
|
var SvgOverlay = styled.svg(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
|
|
17216
|
-
var IdCardBorderRect = styled.rect(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"], ["\n &.progress {\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"])), function (props) {
|
|
17197
|
+
var IdCardBorderRect = styled.rect(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n &.progress {\n width: 100%;\n height: 100%;\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"], ["\n &.progress {\n width: 100%;\n height: 100%;\n animation: dash ", "\n ", ";\n }\n\n &.paused {\n animation-play-state: paused;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n"])), function (props) {
|
|
17217
17198
|
var _a;
|
|
17218
17199
|
return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
|
|
17219
17200
|
}, function (props) {
|
|
@@ -17222,10 +17203,114 @@
|
|
|
17222
17203
|
});
|
|
17223
17204
|
var templateObject_1$u, templateObject_2$o, templateObject_3$k, templateObject_4$e, templateObject_5$9;
|
|
17224
17205
|
|
|
17206
|
+
var defaultIdCaptureGuideImages = {
|
|
17207
|
+
portrait: {
|
|
17208
|
+
SHOW_ID_FRONT: {
|
|
17209
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"),
|
|
17210
|
+
width: 386,
|
|
17211
|
+
height: 573
|
|
17212
|
+
},
|
|
17213
|
+
SHOW_ID_BACK: {
|
|
17214
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"),
|
|
17215
|
+
width: 386,
|
|
17216
|
+
height: 573
|
|
17217
|
+
},
|
|
17218
|
+
SHOW_PASSPORT: {
|
|
17219
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-Borderless.svg"),
|
|
17220
|
+
width: 386,
|
|
17221
|
+
height: 573
|
|
17222
|
+
}
|
|
17223
|
+
},
|
|
17224
|
+
landscape: {
|
|
17225
|
+
SHOW_ID_FRONT: {
|
|
17226
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"),
|
|
17227
|
+
width: 573,
|
|
17228
|
+
height: 386
|
|
17229
|
+
},
|
|
17230
|
+
SHOW_ID_BACK: {
|
|
17231
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"),
|
|
17232
|
+
width: 573,
|
|
17233
|
+
height: 386
|
|
17234
|
+
},
|
|
17235
|
+
SHOW_PASSPORT: {
|
|
17236
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-Borderless.svg"),
|
|
17237
|
+
width: 573,
|
|
17238
|
+
height: 386
|
|
17239
|
+
}
|
|
17240
|
+
}
|
|
17241
|
+
};
|
|
17242
|
+
|
|
17243
|
+
function isObject(item) {
|
|
17244
|
+
return !!item && typeof item === 'object' && !Array.isArray(item);
|
|
17245
|
+
}
|
|
17246
|
+
function mergeDeep(target, source) {
|
|
17247
|
+
var output = Object.assign({}, target);
|
|
17248
|
+
if (isObject(target) && isObject(source)) {
|
|
17249
|
+
Object.keys(source).forEach(function (key) {
|
|
17250
|
+
var _a, _b;
|
|
17251
|
+
var keyT = key;
|
|
17252
|
+
if (isObject(source[keyT])) {
|
|
17253
|
+
if (!(keyT in target)) Object.assign(output, (_a = {}, _a[keyT] = source[keyT], _a));else {
|
|
17254
|
+
// @ts-expect-error TS2345
|
|
17255
|
+
output[keyT] = mergeDeep(target[keyT], source[keyT]);
|
|
17256
|
+
}
|
|
17257
|
+
} else {
|
|
17258
|
+
Object.assign(output, (_b = {}, _b[keyT] = source[keyT], _b));
|
|
17259
|
+
}
|
|
17260
|
+
});
|
|
17261
|
+
}
|
|
17262
|
+
return output;
|
|
17263
|
+
}
|
|
17264
|
+
|
|
17265
|
+
function useGuideImagesByUrl(images) {
|
|
17266
|
+
return React.useMemo(function () {
|
|
17267
|
+
return Object.fromEntries(Object.values(images).flatMap(function (v) {
|
|
17268
|
+
return Object.values(v);
|
|
17269
|
+
}).map(function (v) {
|
|
17270
|
+
return [v.url, v];
|
|
17271
|
+
}));
|
|
17272
|
+
}, [images]);
|
|
17273
|
+
}
|
|
17274
|
+
|
|
17275
|
+
function useGuideImages(userSuppliedImages) {
|
|
17276
|
+
return React.useMemo(function () {
|
|
17277
|
+
warnAboutImagesMissingDimensions(userSuppliedImages);
|
|
17278
|
+
return mergeDeep(defaultIdCaptureGuideImages, userSuppliedImages);
|
|
17279
|
+
}, [userSuppliedImages]);
|
|
17280
|
+
}
|
|
17281
|
+
function warnAboutImagesMissingDimensions(userSuppliedImages) {
|
|
17282
|
+
Object.values(userSuppliedImages).forEach(function (images) {
|
|
17283
|
+
Object.values(images).forEach(function (image) {
|
|
17284
|
+
if (image.url && (!image.width || !image.height)) {
|
|
17285
|
+
warn("The image ".concat(image.url, " is missing width and/or height. This will cause the image scaling issues in Safari. Please provide the width and height of the image."));
|
|
17286
|
+
}
|
|
17287
|
+
});
|
|
17288
|
+
});
|
|
17289
|
+
}
|
|
17290
|
+
|
|
17291
|
+
function useImagesWithBackToFront(userSuppliedImages, isBackToFront) {
|
|
17292
|
+
var images = useGuideImages(userSuppliedImages);
|
|
17293
|
+
return React.useMemo(function () {
|
|
17294
|
+
if (!isBackToFront) return images;
|
|
17295
|
+
var _images = structuredClone(images);
|
|
17296
|
+
var temp = _images.portrait.SHOW_ID_FRONT;
|
|
17297
|
+
_images.portrait.SHOW_ID_FRONT = _images.portrait.SHOW_ID_BACK;
|
|
17298
|
+
_images.portrait.SHOW_ID_BACK = temp;
|
|
17299
|
+
var temp2 = _images.landscape.SHOW_ID_FRONT;
|
|
17300
|
+
_images.landscape.SHOW_ID_FRONT = _images.landscape.SHOW_ID_BACK;
|
|
17301
|
+
_images.landscape.SHOW_ID_BACK = temp2;
|
|
17302
|
+
return _images;
|
|
17303
|
+
}, [images, isBackToFront]);
|
|
17304
|
+
}
|
|
17305
|
+
|
|
17306
|
+
function getOrientation(allowPortraitOnMobile) {
|
|
17307
|
+
return allowPortraitOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
17308
|
+
}
|
|
17309
|
+
|
|
17225
17310
|
var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
17226
17311
|
var _b;
|
|
17227
|
-
var _c = _a.
|
|
17228
|
-
|
|
17312
|
+
var _c = _a.idCaptureGuideImages,
|
|
17313
|
+
idCaptureGuideImages = _c === void 0 ? defaultIdCaptureGuideImages : _c,
|
|
17229
17314
|
_d = _a.classNames,
|
|
17230
17315
|
classNames = _d === void 0 ? {} : _d,
|
|
17231
17316
|
borderWidth = _a.borderWidth,
|
|
@@ -17233,8 +17318,6 @@
|
|
|
17233
17318
|
borderRadius = _a.borderRadius,
|
|
17234
17319
|
imageStyle = _a.imageStyle;
|
|
17235
17320
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
17236
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
17237
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
17238
17321
|
var isMirrored = !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing);
|
|
17239
17322
|
var _e = React.useState(1),
|
|
17240
17323
|
transitionTime = _e[0],
|
|
@@ -17273,7 +17356,7 @@
|
|
|
17273
17356
|
"$transitionTime": transitionTime,
|
|
17274
17357
|
"$isVisible": true
|
|
17275
17358
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17276
|
-
src:
|
|
17359
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
17277
17360
|
className: classNames.frontImage,
|
|
17278
17361
|
alt: "",
|
|
17279
17362
|
style: imageStyle
|
|
@@ -17287,7 +17370,7 @@
|
|
|
17287
17370
|
"$transitionTime": transitionTime,
|
|
17288
17371
|
"$isVisible": true
|
|
17289
17372
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17290
|
-
src:
|
|
17373
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_BACK.url,
|
|
17291
17374
|
className: classNames.backImage,
|
|
17292
17375
|
alt: "",
|
|
17293
17376
|
style: imageStyle
|
|
@@ -17300,43 +17383,84 @@
|
|
|
17300
17383
|
});
|
|
17301
17384
|
var templateObject_1$t;
|
|
17302
17385
|
|
|
17386
|
+
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17387
|
+
orientation: 'landscape',
|
|
17388
|
+
wrapperWidth: 1,
|
|
17389
|
+
wrapperHeight: 1,
|
|
17390
|
+
wrapperAspectRatio: 0,
|
|
17391
|
+
imageAspectRatio: 0,
|
|
17392
|
+
wrapperRef: null,
|
|
17393
|
+
setDimensions: function setDimensions() {
|
|
17394
|
+
return null;
|
|
17395
|
+
},
|
|
17396
|
+
onImageLoaded: function onImageLoaded() {
|
|
17397
|
+
return null;
|
|
17398
|
+
}
|
|
17399
|
+
});
|
|
17400
|
+
function GuideOrientationContextProvider(_a) {
|
|
17401
|
+
var children = _a.children;
|
|
17402
|
+
var setDimensions = React.useState({
|
|
17403
|
+
width: 1,
|
|
17404
|
+
height: 1
|
|
17405
|
+
})[1];
|
|
17406
|
+
var _b = React.useState(1),
|
|
17407
|
+
imageAspectRatio = _b[0],
|
|
17408
|
+
setImageAspectRatio = _b[1];
|
|
17409
|
+
var _c = useResizeObserver(),
|
|
17410
|
+
wrapperRef = _c.ref,
|
|
17411
|
+
_d = _c.width,
|
|
17412
|
+
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
17413
|
+
_e = _c.height,
|
|
17414
|
+
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
17415
|
+
var wrapperAspectRatio = React.useMemo(function () {
|
|
17416
|
+
return wrapperWidth / wrapperHeight;
|
|
17417
|
+
}, [wrapperHeight, wrapperWidth]);
|
|
17418
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
17419
|
+
var img = e.target;
|
|
17420
|
+
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
17421
|
+
}, []);
|
|
17422
|
+
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
17423
|
+
var value = React.useMemo(function () {
|
|
17424
|
+
return {
|
|
17425
|
+
orientation: orientation,
|
|
17426
|
+
wrapperWidth: wrapperWidth,
|
|
17427
|
+
wrapperHeight: wrapperHeight,
|
|
17428
|
+
wrapperAspectRatio: wrapperAspectRatio,
|
|
17429
|
+
imageAspectRatio: imageAspectRatio,
|
|
17430
|
+
setDimensions: setDimensions,
|
|
17431
|
+
wrapperRef: wrapperRef,
|
|
17432
|
+
onImageLoaded: onImageLoaded
|
|
17433
|
+
};
|
|
17434
|
+
}, [imageAspectRatio, onImageLoaded, setDimensions, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
17435
|
+
return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
|
|
17436
|
+
value: value
|
|
17437
|
+
}, children);
|
|
17438
|
+
}
|
|
17439
|
+
function useGuideOrientationContext() {
|
|
17440
|
+
var ctx = React.useContext(GuideOrientationContext);
|
|
17441
|
+
if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
|
|
17442
|
+
return ctx;
|
|
17443
|
+
}
|
|
17444
|
+
|
|
17303
17445
|
var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
17304
|
-
|
|
17305
|
-
|
|
17306
|
-
// padding: userSuppliedPadding,
|
|
17307
|
-
// imagePadding: userSuppliedImagePadding,
|
|
17446
|
+
var _b = _a.images,
|
|
17447
|
+
images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
|
|
17308
17448
|
width = _a.width,
|
|
17309
17449
|
height = _a.height,
|
|
17310
|
-
|
|
17311
|
-
borderWidth =
|
|
17312
|
-
|
|
17313
|
-
borderColor =
|
|
17314
|
-
|
|
17315
|
-
borderRadius =
|
|
17316
|
-
|
|
17317
|
-
isMirrored =
|
|
17318
|
-
|
|
17319
|
-
portraitGuidesOnMobile =
|
|
17320
|
-
_g = _a.assets,
|
|
17321
|
-
assets = _g === void 0 ? {} : _g,
|
|
17450
|
+
_c = _a.borderWidth,
|
|
17451
|
+
borderWidth = _c === void 0 ? 20 : _c,
|
|
17452
|
+
_d = _a.borderColor,
|
|
17453
|
+
borderColor = _d === void 0 ? 'white' : _d,
|
|
17454
|
+
_e = _a.borderRadius,
|
|
17455
|
+
borderRadius = _e === void 0 ? 25 : _e,
|
|
17456
|
+
_f = _a.isMirrored,
|
|
17457
|
+
isMirrored = _f === void 0 ? false : _f,
|
|
17458
|
+
_g = _a.portraitGuidesOnMobile,
|
|
17459
|
+
portraitGuidesOnMobile = _g === void 0 ? true : _g,
|
|
17322
17460
|
_h = _a.classNames,
|
|
17323
17461
|
classNames = _h === void 0 ? {} : _h;
|
|
17324
|
-
|
|
17325
|
-
|
|
17326
|
-
assets.idCardBackPortraitImageUrl || (assets.idCardBackPortraitImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
17327
|
-
assets.idCardBackLandscapeImageUrl || (assets.idCardBackLandscapeImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
17328
|
-
// const instruction = useVerbiage(
|
|
17329
|
-
// verbiage.instructionText,
|
|
17330
|
-
// 'Please flip your ID card...',
|
|
17331
|
-
// )
|
|
17332
|
-
// const padding =
|
|
17333
|
-
// (userSuppliedPadding ?? isMobile())
|
|
17334
|
-
// ? (theme.idCapture?.guideBox?.mobilePadding ?? 0)
|
|
17335
|
-
// : (theme.idCapture?.guideBox?.desktopPadding ?? 50)
|
|
17336
|
-
var onImageLoaded = React.useContext(GuideOrientationContext).onImageLoaded;
|
|
17337
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
17338
|
-
// const imagePadding =
|
|
17339
|
-
// userSuppliedImagePadding ?? theme.idCapture?.guideBox?.imagePadding ?? 0
|
|
17462
|
+
var onImageLoaded = useGuideOrientationContext().onImageLoaded;
|
|
17463
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
17340
17464
|
var _j = React.useState(1),
|
|
17341
17465
|
transitionTime = _j[0],
|
|
17342
17466
|
setTransitionTime = _j[1];
|
|
@@ -17374,10 +17498,9 @@
|
|
|
17374
17498
|
"$transitionTime": transitionTime,
|
|
17375
17499
|
"$isVisible": true
|
|
17376
17500
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17377
|
-
src: orientation === 'portrait' ? assets.idCardFrontPortraitImageUrl : assets.idCardFrontLandscapeImageUrl,
|
|
17378
17501
|
alt: "",
|
|
17502
|
+
src: images[orientation].SHOW_ID_FRONT.url,
|
|
17379
17503
|
className: classNames.frontImage,
|
|
17380
|
-
// $padding={imagePadding}
|
|
17381
17504
|
onLoad: onImageLoaded,
|
|
17382
17505
|
width: width,
|
|
17383
17506
|
height: height
|
|
@@ -17391,10 +17514,9 @@
|
|
|
17391
17514
|
"$transitionTime": transitionTime,
|
|
17392
17515
|
"$isVisible": true
|
|
17393
17516
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17394
|
-
src: orientation === 'portrait' ? assets.idCardBackPortraitImageUrl : assets.idCardBackLandscapeImageUrl,
|
|
17395
17517
|
alt: "",
|
|
17518
|
+
src: images[orientation].SHOW_ID_BACK.url,
|
|
17396
17519
|
className: classNames.backImage,
|
|
17397
|
-
// $padding={imagePadding}
|
|
17398
17520
|
width: width,
|
|
17399
17521
|
height: height
|
|
17400
17522
|
})));
|
|
@@ -17402,108 +17524,80 @@
|
|
|
17402
17524
|
|
|
17403
17525
|
var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
17404
17526
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
17405
|
-
var _p
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
classNames = _u === void 0 ? {} : _u,
|
|
17410
|
-
_v = _a.width,
|
|
17411
|
-
width = _v === void 0 ? 0 : _v,
|
|
17412
|
-
_w = _a.height,
|
|
17413
|
-
height = _w === void 0 ? 0 : _w,
|
|
17527
|
+
var _p = _a.classNames,
|
|
17528
|
+
classNames = _p === void 0 ? {} : _p,
|
|
17529
|
+
_q = _a.images,
|
|
17530
|
+
userSuppliedImages = _q === void 0 ? defaultIdCaptureGuideImages : _q,
|
|
17414
17531
|
userSuppliedPadding = _a.padding,
|
|
17415
17532
|
userSuppliedImagePadding = _a.imagePadding,
|
|
17416
|
-
|
|
17417
|
-
imageVisible =
|
|
17533
|
+
_r = _a.imageVisible,
|
|
17534
|
+
imageVisible = _r === void 0 ? true : _r,
|
|
17418
17535
|
borderWidth = _a.borderWidth,
|
|
17419
17536
|
borderColor = _a.borderColor,
|
|
17420
|
-
|
|
17421
|
-
idCardBorderWidth =
|
|
17422
|
-
|
|
17423
|
-
idCardBorderColor =
|
|
17537
|
+
_s = _a.idCardBorderWidth,
|
|
17538
|
+
idCardBorderWidth = _s === void 0 ? '2.5%' : _s,
|
|
17539
|
+
_t = _a.idCardBorderColor,
|
|
17540
|
+
idCardBorderColor = _t === void 0 ? 'white' : _t,
|
|
17424
17541
|
maskColor = _a.maskColor,
|
|
17425
|
-
|
|
17426
|
-
isMirrored =
|
|
17427
|
-
|
|
17428
|
-
isBackToFront =
|
|
17429
|
-
|
|
17430
|
-
portraitGuidesOnMobile =
|
|
17431
|
-
|
|
17432
|
-
instruction =
|
|
17433
|
-
|
|
17434
|
-
requestedAction =
|
|
17435
|
-
|
|
17436
|
-
progress =
|
|
17437
|
-
|
|
17438
|
-
status =
|
|
17542
|
+
_u = _a.isMirrored,
|
|
17543
|
+
isMirrored = _u === void 0 ? false : _u,
|
|
17544
|
+
_v = _a.isBackToFront,
|
|
17545
|
+
isBackToFront = _v === void 0 ? false : _v,
|
|
17546
|
+
_w = _a.portraitGuidesOnMobile,
|
|
17547
|
+
portraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
17548
|
+
_x = _a.instruction,
|
|
17549
|
+
instruction = _x === void 0 ? '' : _x,
|
|
17550
|
+
_y = _a.requestedAction,
|
|
17551
|
+
requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
|
|
17552
|
+
_z = _a.progress,
|
|
17553
|
+
progress = _z === void 0 ? 0 : _z,
|
|
17554
|
+
_0 = _a.status,
|
|
17555
|
+
status = _0 === void 0 ? 'ready' : _0,
|
|
17439
17556
|
onClick = _a.onClick;
|
|
17440
|
-
var
|
|
17441
|
-
wrapperRef =
|
|
17442
|
-
wrapperWidth =
|
|
17443
|
-
wrapperHeight =
|
|
17444
|
-
imageAspectRatio =
|
|
17445
|
-
wrapperAspectRatio =
|
|
17446
|
-
guideOrientationOnImageLoaded =
|
|
17447
|
-
setDimensions =
|
|
17448
|
-
var
|
|
17449
|
-
state =
|
|
17450
|
-
dispatch =
|
|
17451
|
-
function onImageLoaded(e) {
|
|
17452
|
-
guideOrientationOnImageLoaded(e);
|
|
17453
|
-
var img = e.target;
|
|
17454
|
-
dispatch({
|
|
17455
|
-
type: 'guideImageLoaded',
|
|
17456
|
-
payload: {
|
|
17457
|
-
width: img.naturalWidth,
|
|
17458
|
-
height: img.naturalHeight
|
|
17459
|
-
}
|
|
17460
|
-
});
|
|
17461
|
-
}
|
|
17557
|
+
var _1 = useGuideOrientationContext(),
|
|
17558
|
+
wrapperRef = _1.wrapperRef,
|
|
17559
|
+
wrapperWidth = _1.wrapperWidth,
|
|
17560
|
+
wrapperHeight = _1.wrapperHeight,
|
|
17561
|
+
imageAspectRatio = _1.imageAspectRatio,
|
|
17562
|
+
wrapperAspectRatio = _1.wrapperAspectRatio,
|
|
17563
|
+
guideOrientationOnImageLoaded = _1.onImageLoaded,
|
|
17564
|
+
setDimensions = _1.setDimensions;
|
|
17565
|
+
var _2 = useIdCaptureState(),
|
|
17566
|
+
state = _2[0],
|
|
17567
|
+
dispatch = _2[1];
|
|
17462
17568
|
var theme = styled.useTheme();
|
|
17463
17569
|
if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
17464
|
-
if (width == 0) width = wrapperWidth;
|
|
17465
|
-
if (height == 0) height = wrapperHeight;
|
|
17466
17570
|
React.useEffect(function () {
|
|
17467
17571
|
setDimensions({
|
|
17468
|
-
width:
|
|
17469
|
-
height:
|
|
17572
|
+
width: wrapperWidth,
|
|
17573
|
+
height: wrapperHeight
|
|
17470
17574
|
});
|
|
17471
|
-
}, [
|
|
17575
|
+
}, [setDimensions, wrapperHeight, wrapperWidth]);
|
|
17472
17576
|
var padding = userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile() ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.mobilePadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.desktopPadding) !== null && _k !== void 0 ? _k : 50;
|
|
17473
17577
|
var paddingAndBorderPx = padding * 2 + borderWidth * 2;
|
|
17474
|
-
var images =
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
SHOW_ID_BACK: assets.idCardBackPortraitImageUrl,
|
|
17479
|
-
SHOW_PASSPORT: assets.passportPortraitImageUrl
|
|
17480
|
-
},
|
|
17481
|
-
landscape: {
|
|
17482
|
-
SHOW_ID_FRONT: assets.idCardFrontLandscapeImageUrl,
|
|
17483
|
-
FLIP_ID: assets.idCardFrontLandscapeImageUrl,
|
|
17484
|
-
SHOW_ID_BACK: assets.idCardBackLandscapeImageUrl,
|
|
17485
|
-
SHOW_PASSPORT: assets.passportLandscapeImageUrl
|
|
17486
|
-
}
|
|
17487
|
-
};
|
|
17488
|
-
if (isBackToFront) {
|
|
17489
|
-
var temp = images.portrait.SHOW_ID_FRONT;
|
|
17490
|
-
images.portrait.SHOW_ID_FRONT = images.portrait.SHOW_ID_BACK;
|
|
17491
|
-
images.portrait.SHOW_ID_BACK = temp;
|
|
17492
|
-
var temp2 = images.landscape.SHOW_ID_FRONT;
|
|
17493
|
-
images.landscape.SHOW_ID_FRONT = images.landscape.SHOW_ID_BACK;
|
|
17494
|
-
images.landscape.SHOW_ID_BACK = temp2;
|
|
17495
|
-
}
|
|
17496
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
17497
|
-
var imgSrc = images[orientation][requestedAction];
|
|
17498
|
-
assets.flipIdPrompt || (assets.flipIdPrompt = {});
|
|
17499
|
-
(_p = assets.flipIdPrompt).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = images.portrait.SHOW_ID_FRONT);
|
|
17500
|
-
(_q = assets.flipIdPrompt).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = images.landscape.SHOW_ID_FRONT);
|
|
17501
|
-
(_r = assets.flipIdPrompt).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = images.portrait.SHOW_ID_BACK);
|
|
17502
|
-
(_s = assets.flipIdPrompt).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = images.landscape.SHOW_ID_BACK);
|
|
17578
|
+
var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
|
|
17579
|
+
var imagesByUrl = useGuideImagesByUrl(images);
|
|
17580
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
17581
|
+
var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
|
|
17503
17582
|
var imagePadding = (_o = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.imagePadding) !== null && _o !== void 0 ? _o : 50;
|
|
17504
17583
|
var imageWidth = state.guideRectWidth - imagePadding * 2;
|
|
17505
17584
|
var imageHeight = state.guideRectHeight - imagePadding * 2;
|
|
17506
17585
|
var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
|
|
17586
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
17587
|
+
var _a, _b;
|
|
17588
|
+
guideOrientationOnImageLoaded(e);
|
|
17589
|
+
var img = e.currentTarget;
|
|
17590
|
+
var imageByUrl = imagesByUrl[img.src];
|
|
17591
|
+
var width = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth;
|
|
17592
|
+
var height = (_b = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _b !== void 0 ? _b : img.naturalHeight;
|
|
17593
|
+
dispatch({
|
|
17594
|
+
type: 'guideImageLoaded',
|
|
17595
|
+
payload: {
|
|
17596
|
+
width: width,
|
|
17597
|
+
height: height
|
|
17598
|
+
}
|
|
17599
|
+
});
|
|
17600
|
+
}, [dispatch, guideOrientationOnImageLoaded, imagesByUrl]);
|
|
17507
17601
|
return /*#__PURE__*/React.createElement(StyledPageContainer, {
|
|
17508
17602
|
ref: wrapperRef,
|
|
17509
17603
|
onClick: onClick,
|
|
@@ -17540,8 +17634,8 @@
|
|
|
17540
17634
|
borderColor: idCardBorderColor,
|
|
17541
17635
|
"$isVisible": requestedAction !== 'FLIP_ID'
|
|
17542
17636
|
}, /*#__PURE__*/React.createElement(IdCardGuideImage, {
|
|
17543
|
-
src: imgSrc,
|
|
17544
17637
|
alt: "",
|
|
17638
|
+
src: currentImage.url,
|
|
17545
17639
|
onLoad: onImageLoaded,
|
|
17546
17640
|
className: classNames.image,
|
|
17547
17641
|
"$isInvisible": !imageVisible,
|
|
@@ -17549,11 +17643,11 @@
|
|
|
17549
17643
|
width: imageWidth,
|
|
17550
17644
|
height: imageHeight
|
|
17551
17645
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React.createElement(FlipIdPrompt, {
|
|
17646
|
+
images: images,
|
|
17552
17647
|
borderWidth: idCardBorderWidth,
|
|
17553
17648
|
borderColor: idCardBorderColor,
|
|
17554
17649
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
17555
17650
|
isMirrored: isMirrored,
|
|
17556
|
-
assets: assets.flipIdPrompt,
|
|
17557
17651
|
classNames: classNames.flipIdPrompt,
|
|
17558
17652
|
width: imageWidth,
|
|
17559
17653
|
height: imageHeight
|
|
@@ -17591,7 +17685,7 @@
|
|
|
17591
17685
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
17592
17686
|
});
|
|
17593
17687
|
var Spacer = styled(GuideRegion)(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
17594
|
-
var GuideCenterRegion = styled.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n
|
|
17688
|
+
var GuideCenterRegion = styled.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
17595
17689
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
17596
17690
|
}, function (props) {
|
|
17597
17691
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
@@ -17629,8 +17723,8 @@
|
|
|
17629
17723
|
status = _u === void 0 ? 'ready' : _u,
|
|
17630
17724
|
_v = _a.progress,
|
|
17631
17725
|
progress = _v === void 0 ? 0 : _v,
|
|
17632
|
-
_w = _a.
|
|
17633
|
-
|
|
17726
|
+
_w = _a.images,
|
|
17727
|
+
images = _w === void 0 ? defaultIdCaptureGuideImages : _w,
|
|
17634
17728
|
_x = _a.classNames,
|
|
17635
17729
|
classNames = _x === void 0 ? {} : _x;
|
|
17636
17730
|
var _y = useIdCaptureState(),
|
|
@@ -17739,7 +17833,7 @@
|
|
|
17739
17833
|
isBackToFront: isBackToFront,
|
|
17740
17834
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
17741
17835
|
instruction: instruction,
|
|
17742
|
-
|
|
17836
|
+
images: images,
|
|
17743
17837
|
classNames: classNames,
|
|
17744
17838
|
imageVisible: imageVisible,
|
|
17745
17839
|
requestedAction: requestedAction,
|
|
@@ -17767,8 +17861,8 @@
|
|
|
17767
17861
|
requestedAction = _h === void 0 ? 'SHOW_ID_FRONT' : _h,
|
|
17768
17862
|
_j = _a.isBackToFront,
|
|
17769
17863
|
isBackToFront = _j === void 0 ? false : _j,
|
|
17770
|
-
_k = _a.
|
|
17771
|
-
|
|
17864
|
+
_k = _a.images,
|
|
17865
|
+
images = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
17772
17866
|
_l = _a.classNames,
|
|
17773
17867
|
classNames = _l === void 0 ? {} : _l,
|
|
17774
17868
|
_m = _a.colors,
|
|
@@ -17783,10 +17877,8 @@
|
|
|
17783
17877
|
captureFailedText: 'Capture failed!'
|
|
17784
17878
|
});
|
|
17785
17879
|
return /*#__PURE__*/React.createElement(React.Fragment, null, guideType === 'overlay' && ( /*#__PURE__*/React.createElement(IdCaptureGuideOverlay, {
|
|
17786
|
-
|
|
17880
|
+
images: images,
|
|
17787
17881
|
classNames: classNames,
|
|
17788
|
-
width: state.pageWidth,
|
|
17789
|
-
height: state.pageHeight,
|
|
17790
17882
|
status: status,
|
|
17791
17883
|
progress: progress,
|
|
17792
17884
|
instruction: state.captureFailed ? verbiage.captureFailedText : state.capturing ? verbiage === null || verbiage === void 0 ? void 0 : verbiage.capturingText : verbiage.instructionText,
|
|
@@ -17794,7 +17886,7 @@
|
|
|
17794
17886
|
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
|
|
17795
17887
|
imageVisible: requestedAction === 'FLIP_ID' || !state.idCardFrontDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
|
|
17796
17888
|
})), guideType === 'fit' && ( /*#__PURE__*/React.createElement(IdCaptureFitGuide, {
|
|
17797
|
-
|
|
17889
|
+
images: images,
|
|
17798
17890
|
classNames: classNames,
|
|
17799
17891
|
requestedAction: requestedAction,
|
|
17800
17892
|
status: status,
|
|
@@ -18764,76 +18856,77 @@
|
|
|
18764
18856
|
|
|
18765
18857
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
18766
18858
|
var _b, _c, _d, _e, _f, _g;
|
|
18767
|
-
var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
18768
18859
|
var onSuccess = _a.onSuccess,
|
|
18769
18860
|
onExitCapture = _a.onExitCapture,
|
|
18770
18861
|
onUserCancel = _a.onUserCancel,
|
|
18771
|
-
|
|
18772
|
-
loadingOverlayMode =
|
|
18862
|
+
_h = _a.loadingOverlayMode,
|
|
18863
|
+
loadingOverlayMode = _h === void 0 ? 'default' : _h,
|
|
18773
18864
|
customOverlayContent = _a.customOverlayContent,
|
|
18774
18865
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
18775
18866
|
precapturedDocuments = _a.precapturedDocuments,
|
|
18776
|
-
|
|
18777
|
-
captureRequirement =
|
|
18778
|
-
|
|
18779
|
-
separateIdCardCaptureSequence =
|
|
18780
|
-
|
|
18781
|
-
thresholds =
|
|
18782
|
-
|
|
18783
|
-
skipSuccessScreen =
|
|
18867
|
+
_j = _a.captureRequirement,
|
|
18868
|
+
captureRequirement = _j === void 0 ? 'idCardOrPassport' : _j,
|
|
18869
|
+
_k = _a.separateIdCardCaptureSequence,
|
|
18870
|
+
separateIdCardCaptureSequence = _k === void 0 ? false : _k,
|
|
18871
|
+
_l = _a.thresholds,
|
|
18872
|
+
thresholds = _l === void 0 ? defaultIdCaptureThresholds : _l,
|
|
18873
|
+
_m = _a.skipSuccessScreen,
|
|
18874
|
+
skipSuccessScreen = _m === void 0 ? false : _m,
|
|
18784
18875
|
instructions = _a.instructions,
|
|
18785
|
-
|
|
18786
|
-
releaseCameraAccessOnExit =
|
|
18787
|
-
|
|
18788
|
-
guideType =
|
|
18789
|
-
|
|
18790
|
-
portraitGuidesOnMobile =
|
|
18791
|
-
|
|
18792
|
-
rotateLoadingOverlayImageWhenPortrait =
|
|
18793
|
-
|
|
18794
|
-
silentFallback =
|
|
18795
|
-
|
|
18796
|
-
forceFallbackMode =
|
|
18797
|
-
|
|
18798
|
-
allowIdCardBackToFrontCapture =
|
|
18799
|
-
|
|
18800
|
-
enableOverrideWrongDocumentTypeDialog =
|
|
18801
|
-
|
|
18802
|
-
allowOverrideWrongDocumentTypeAfterMs =
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18876
|
+
_o = _a.releaseCameraAccessOnExit,
|
|
18877
|
+
releaseCameraAccessOnExit = _o === void 0 ? true : _o,
|
|
18878
|
+
_p = _a.guideType,
|
|
18879
|
+
guideType = _p === void 0 ? 'fit' : _p,
|
|
18880
|
+
_q = _a.portraitGuidesOnMobile,
|
|
18881
|
+
portraitGuidesOnMobile = _q === void 0 ? true : _q,
|
|
18882
|
+
_r = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
18883
|
+
rotateLoadingOverlayImageWhenPortrait = _r === void 0 ? true : _r,
|
|
18884
|
+
_s = _a.silentFallback,
|
|
18885
|
+
silentFallback = _s === void 0 ? false : _s,
|
|
18886
|
+
_t = _a.forceFallbackMode,
|
|
18887
|
+
forceFallbackMode = _t === void 0 ? false : _t,
|
|
18888
|
+
_u = _a.allowIdCardBackToFrontCapture,
|
|
18889
|
+
allowIdCardBackToFrontCapture = _u === void 0 ? false : _u,
|
|
18890
|
+
_v = _a.enableOverrideWrongDocumentTypeDialog,
|
|
18891
|
+
enableOverrideWrongDocumentTypeDialog = _v === void 0 ? false : _v,
|
|
18892
|
+
_w = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
18893
|
+
allowOverrideWrongDocumentTypeAfterMs = _w === void 0 ? 8000 : _w,
|
|
18894
|
+
_x = _a.guideImages,
|
|
18895
|
+
guideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
|
|
18896
|
+
_y = _a.assets,
|
|
18897
|
+
assets = _y === void 0 ? {} : _y,
|
|
18898
|
+
_z = _a.classNames,
|
|
18899
|
+
classNames = _z === void 0 ? {} : _z,
|
|
18900
|
+
_0 = _a.colors,
|
|
18901
|
+
colors = _0 === void 0 ? {} : _0,
|
|
18902
|
+
_1 = _a.verbiage,
|
|
18903
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
18904
|
+
_2 = _a.debugMode,
|
|
18905
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
18906
|
+
var _3 = useIdCaptureState(),
|
|
18907
|
+
state = _3[0],
|
|
18908
|
+
dispatch = _3[1];
|
|
18909
|
+
var _4 = React.useContext(CameraStateContext),
|
|
18910
|
+
cameraAccessDenied = _4.cameraAccessDenied,
|
|
18911
|
+
requestCameraAccess = _4.requestCameraAccess,
|
|
18912
|
+
releaseCameraAccess = _4.releaseCameraAccess;
|
|
18913
|
+
var _5 = React.useState(false),
|
|
18914
|
+
overlayDismissed = _5[0],
|
|
18915
|
+
setOverlayDismissed = _5[1];
|
|
18916
|
+
var _6 = React.useContext(SubmissionContext),
|
|
18917
|
+
submissionStatus = _6.submissionStatus,
|
|
18918
|
+
setIdFrontImage = _6.setIdFrontImage,
|
|
18919
|
+
setIdBackImage = _6.setIdBackImage,
|
|
18920
|
+
setPassportImage = _6.setPassportImage,
|
|
18921
|
+
logIdFrontCaptureAttempt = _6.logIdFrontCaptureAttempt,
|
|
18922
|
+
logIdBackCaptureAttempt = _6.logIdBackCaptureAttempt;
|
|
18923
|
+
var _7 = React.useContext(IdCaptureModelsContext),
|
|
18924
|
+
start = _7.start,
|
|
18925
|
+
stop = _7.stop,
|
|
18926
|
+
onPredictionMade = _7.onPredictionMade,
|
|
18927
|
+
setRequiredDocumentType = _7.setRequiredDocumentType,
|
|
18928
|
+
modelError = _7.modelError,
|
|
18929
|
+
resetBestFrame = _7.resetBestFrame;
|
|
18837
18930
|
React.useEffect(function () {
|
|
18838
18931
|
dispatch({
|
|
18839
18932
|
type: 'configureWizard',
|
|
@@ -18925,9 +19018,9 @@
|
|
|
18925
19018
|
type: 'resetWizard'
|
|
18926
19019
|
});
|
|
18927
19020
|
}, [dispatch]);
|
|
18928
|
-
var
|
|
18929
|
-
attempt =
|
|
18930
|
-
setAttempt =
|
|
19021
|
+
var _8 = React.useState(0),
|
|
19022
|
+
attempt = _8[0],
|
|
19023
|
+
setAttempt = _8[1];
|
|
18931
19024
|
var onExit = React.useCallback(function () {
|
|
18932
19025
|
releaseCameraAccess();
|
|
18933
19026
|
setOverlayDismissed(false);
|
|
@@ -18953,27 +19046,6 @@
|
|
|
18953
19046
|
});
|
|
18954
19047
|
}
|
|
18955
19048
|
}, [cameraAccessDenied]);
|
|
18956
|
-
assets.idCardFront || (assets.idCardFront = {});
|
|
18957
|
-
(_h = assets.idCardFront).portraitGuidesImageUrl || (_h.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
18958
|
-
(_j = assets.idCardFront).landscapeGuidesImageUrl || (_j.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
18959
|
-
assets.idCardBack || (assets.idCardBack = {});
|
|
18960
|
-
(_k = assets.idCardBack).portraitGuidesImageUrl || (_k.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
18961
|
-
(_l = assets.idCardBack).landscapeGuidesImageUrl || (_l.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
18962
|
-
assets.passport || (assets.passport = {});
|
|
18963
|
-
(_m = assets.passport).portraitGuidesImageUrl || (_m.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
|
|
18964
|
-
(_o = assets.passport).landscapeGuidesImageUrl || (_o.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
|
|
18965
|
-
assets.guides || (assets.guides = {});
|
|
18966
|
-
(_p = assets.guides).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
18967
|
-
(_q = assets.guides).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
18968
|
-
(_r = assets.guides).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
18969
|
-
(_s = assets.guides).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
18970
|
-
(_t = assets.guides).passportPortraitImageUrl || (_t.passportPortraitImageUrl = assets.passport.portraitGuidesImageUrl);
|
|
18971
|
-
(_u = assets.guides).passportLandscapeImageUrl || (_u.passportLandscapeImageUrl = assets.passport.landscapeGuidesImageUrl);
|
|
18972
|
-
(_v = assets.guides).flipIdPrompt || (_v.flipIdPrompt = {});
|
|
18973
|
-
(_w = assets.guides.flipIdPrompt).idCardFrontPortraitImageUrl || (_w.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
18974
|
-
(_x = assets.guides.flipIdPrompt).idCardFrontLandscapeImageUrl || (_x.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
18975
|
-
(_y = assets.guides.flipIdPrompt).idCardBackPortraitImageUrl || (_y.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
18976
|
-
(_z = assets.guides.flipIdPrompt).idCardBackLandscapeImageUrl || (_z.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
18977
19049
|
var idCaptureVerbiages = {
|
|
18978
19050
|
idCardFront: useTranslations(verbiage.idCardFront, {
|
|
18979
19051
|
instructionText: 'Scan the front of ID',
|
|
@@ -18987,7 +19059,6 @@
|
|
|
18987
19059
|
})
|
|
18988
19060
|
};
|
|
18989
19061
|
var theme = styled.useTheme();
|
|
18990
|
-
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
18991
19062
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
18992
19063
|
React.useEffect(function () {
|
|
18993
19064
|
if (separateIdCardCaptureSequence) return;
|
|
@@ -19040,9 +19111,9 @@
|
|
|
19040
19111
|
});
|
|
19041
19112
|
});
|
|
19042
19113
|
}, [dispatch]);
|
|
19043
|
-
var
|
|
19044
|
-
progressStarted =
|
|
19045
|
-
setProgressStarted =
|
|
19114
|
+
var _9 = React.useState(false),
|
|
19115
|
+
progressStarted = _9[0],
|
|
19116
|
+
setProgressStarted = _9[1];
|
|
19046
19117
|
React.useEffect(function () {
|
|
19047
19118
|
if (state.captureState === 'capturing') {
|
|
19048
19119
|
setProgressStarted(false);
|
|
@@ -19072,7 +19143,6 @@
|
|
|
19072
19143
|
requiredDocumentType: state.requestedDocumentType,
|
|
19073
19144
|
thresholds: thresholds,
|
|
19074
19145
|
onCapture: onCapture,
|
|
19075
|
-
assets: idCaptureAssets,
|
|
19076
19146
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
|
|
19077
19147
|
colors: colors,
|
|
19078
19148
|
verbiage: idCaptureVerbiage,
|
|
@@ -19084,7 +19154,7 @@
|
|
|
19084
19154
|
progress: progressStarted && state.captureState === 'capturing' ? 1 : 0,
|
|
19085
19155
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
19086
19156
|
requestedAction: requestedAction,
|
|
19087
|
-
|
|
19157
|
+
images: guideImages,
|
|
19088
19158
|
classNames: classNames.guides,
|
|
19089
19159
|
colors: colors,
|
|
19090
19160
|
verbiage: idCaptureVerbiage,
|
|
@@ -21245,42 +21315,6 @@
|
|
|
21245
21315
|
}));
|
|
21246
21316
|
};
|
|
21247
21317
|
|
|
21248
|
-
var GuideOrientationProvider = function GuideOrientationProvider(_a) {
|
|
21249
|
-
var children = _a.children;
|
|
21250
|
-
var setDimensions = React.useState({
|
|
21251
|
-
width: 1,
|
|
21252
|
-
height: 1
|
|
21253
|
-
})[1];
|
|
21254
|
-
var _b = React.useState(1),
|
|
21255
|
-
imageAspectRatio = _b[0],
|
|
21256
|
-
setImageAspectRatio = _b[1];
|
|
21257
|
-
var _c = useResizeObserver(),
|
|
21258
|
-
wrapperRef = _c.ref,
|
|
21259
|
-
_d = _c.width,
|
|
21260
|
-
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
21261
|
-
_e = _c.height,
|
|
21262
|
-
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
21263
|
-
var wrapperAspectRatio = wrapperWidth / wrapperHeight;
|
|
21264
|
-
var onImageLoaded = React.useCallback(function (e) {
|
|
21265
|
-
var img = e.target;
|
|
21266
|
-
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
21267
|
-
}, []);
|
|
21268
|
-
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
21269
|
-
var value = {
|
|
21270
|
-
orientation: orientation,
|
|
21271
|
-
wrapperWidth: wrapperWidth,
|
|
21272
|
-
wrapperHeight: wrapperHeight,
|
|
21273
|
-
wrapperAspectRatio: wrapperAspectRatio,
|
|
21274
|
-
imageAspectRatio: imageAspectRatio,
|
|
21275
|
-
setDimensions: setDimensions,
|
|
21276
|
-
wrapperRef: wrapperRef,
|
|
21277
|
-
onImageLoaded: onImageLoaded
|
|
21278
|
-
};
|
|
21279
|
-
return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
|
|
21280
|
-
value: value
|
|
21281
|
-
}, children);
|
|
21282
|
-
};
|
|
21283
|
-
|
|
21284
21318
|
var SubmissionSuccess = function SubmissionSuccess() {
|
|
21285
21319
|
var _a = React.useContext(SubmissionContext),
|
|
21286
21320
|
submissionRequest = _a.submissionRequest,
|
|
@@ -23148,15 +23182,13 @@
|
|
|
23148
23182
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
23149
23183
|
_2 = _a.idCardCaptureProgress,
|
|
23150
23184
|
idCardCaptureProgress = _2 === void 0 ? 0 : _2,
|
|
23151
|
-
_3 = _a.
|
|
23152
|
-
|
|
23185
|
+
_3 = _a.idCardCaptureGuideImages,
|
|
23186
|
+
userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
|
|
23153
23187
|
_4 = _a.classNames,
|
|
23154
23188
|
classNames = _4 === void 0 ? {} : _4,
|
|
23155
23189
|
_5 = _a.verbiage,
|
|
23156
23190
|
rawVerbiage = _5 === void 0 ? {} : _5;
|
|
23157
23191
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
23158
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
23159
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
23160
23192
|
var verbiage = useTranslations(rawVerbiage, {
|
|
23161
23193
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
23162
23194
|
idBackInstructionText: 'Display the back of your ID card...',
|
|
@@ -23175,14 +23207,19 @@
|
|
|
23175
23207
|
idCardGuideWidth = _7 === void 0 ? 0 : _7,
|
|
23176
23208
|
_8 = _6.height,
|
|
23177
23209
|
idCardGuideHeight = _8 === void 0 ? 0 : _8;
|
|
23210
|
+
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
23211
|
+
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
23178
23212
|
var _9 = React.useState(undefined),
|
|
23179
23213
|
aspectRatio = _9[0],
|
|
23180
23214
|
setAspectRatio = _9[1];
|
|
23181
|
-
|
|
23182
|
-
var _a;
|
|
23215
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
23216
|
+
var _a, _b, _c, _d;
|
|
23183
23217
|
var img = e.currentTarget;
|
|
23184
|
-
|
|
23185
|
-
|
|
23218
|
+
var imageByUrl = idCaptureGuideImagesByUrl[img.src];
|
|
23219
|
+
var naturalWidth = (_b = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth) !== null && _b !== void 0 ? _b : 0;
|
|
23220
|
+
var naturalHeight = (_d = (_c = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _c !== void 0 ? _c : img.naturalHeight) !== null && _d !== void 0 ? _d : 0;
|
|
23221
|
+
setAspectRatio(naturalHeight > 0 ? naturalWidth / naturalHeight : undefined);
|
|
23222
|
+
}, [idCaptureGuideImagesByUrl]);
|
|
23186
23223
|
var idCardImageStyle = React.useMemo(function () {
|
|
23187
23224
|
return {
|
|
23188
23225
|
maxWidth: idCardGuideWidth > 0 ? idCardGuideWidth : undefined,
|
|
@@ -23222,10 +23259,10 @@
|
|
|
23222
23259
|
className: classNames.idCardGuideImage,
|
|
23223
23260
|
"$isMirrored": !((_t = cameraRef.current) === null || _t === void 0 ? void 0 : _t.isRearFacing),
|
|
23224
23261
|
style: idCardImageStyle,
|
|
23225
|
-
src: requestedAction === 'SHOW_ID_BACK' ?
|
|
23262
|
+
src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
23226
23263
|
onLoad: onImageLoaded
|
|
23227
23264
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
23228
|
-
|
|
23265
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
23229
23266
|
classNames: classNames.flipIdPrompt,
|
|
23230
23267
|
borderWidth: idCardGuideBorderWidth,
|
|
23231
23268
|
borderColor: idCardGuideBorderColor,
|
|
@@ -23388,27 +23425,27 @@
|
|
|
23388
23425
|
onExitCapture = _a.onExitCapture,
|
|
23389
23426
|
_y = _a.idCaptureModelsEnabled,
|
|
23390
23427
|
idCaptureModelsEnabled = _y === void 0 ? true : _y,
|
|
23391
|
-
_z = _a.
|
|
23392
|
-
|
|
23393
|
-
_0 = _a.
|
|
23394
|
-
|
|
23395
|
-
_1 = _a.
|
|
23396
|
-
|
|
23397
|
-
_2 = _a.
|
|
23398
|
-
|
|
23428
|
+
_z = _a.idCardCaptureGuideImages,
|
|
23429
|
+
idCardCaptureGuideImages = _z === void 0 ? defaultIdCaptureGuideImages : _z,
|
|
23430
|
+
_0 = _a.idCardFrontDelay,
|
|
23431
|
+
idCardFrontDelay = _0 === void 0 ? 1000 : _0,
|
|
23432
|
+
_1 = _a.videoIdCaptureThresholds,
|
|
23433
|
+
videoIdCaptureThresholds = _1 === void 0 ? defaultVideoIdCaptureThresholds : _1,
|
|
23434
|
+
_2 = _a.skipShowIdCardBack,
|
|
23435
|
+
skipShowIdCardBack = _2 === void 0 ? false : _2,
|
|
23436
|
+
_3 = _a.captureCountdownSeconds,
|
|
23437
|
+
captureCountdownSeconds = _3 === void 0 ? 3 : _3,
|
|
23399
23438
|
readTextPrompt = _a.readTextPrompt,
|
|
23400
|
-
|
|
23401
|
-
readTextTimeoutDurationMs =
|
|
23402
|
-
|
|
23403
|
-
readTextMinReadingMs =
|
|
23404
|
-
|
|
23405
|
-
disableFaceDetectionWhileAudioCapture =
|
|
23406
|
-
|
|
23407
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
23408
|
-
|
|
23409
|
-
mergeAVStreams =
|
|
23410
|
-
_8 = _a.assets,
|
|
23411
|
-
assets = _8 === void 0 ? {} : _8,
|
|
23439
|
+
_4 = _a.readTextTimeoutDurationMs,
|
|
23440
|
+
readTextTimeoutDurationMs = _4 === void 0 ? 15000 : _4,
|
|
23441
|
+
_5 = _a.readTextMinReadingMs,
|
|
23442
|
+
readTextMinReadingMs = _5 === void 0 ? 10000 : _5,
|
|
23443
|
+
_6 = _a.disableFaceDetectionWhileAudioCapture,
|
|
23444
|
+
disableFaceDetectionWhileAudioCapture = _6 === void 0 ? false : _6,
|
|
23445
|
+
_7 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
23446
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _7 === void 0 ? 2000 : _7,
|
|
23447
|
+
_8 = _a.mergeAVStreams,
|
|
23448
|
+
mergeAVStreams = _8 === void 0 ? false : _8,
|
|
23412
23449
|
_9 = _a.classNames,
|
|
23413
23450
|
classNames = _9 === void 0 ? {} : _9,
|
|
23414
23451
|
_10 = _a.colors,
|
|
@@ -23727,13 +23764,13 @@
|
|
|
23727
23764
|
verbiage: rawVerbiage.readTextPrompt,
|
|
23728
23765
|
onComplete: stopRecording
|
|
23729
23766
|
})) : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdVideoCaptureGuides, {
|
|
23730
|
-
assets: assets.guides,
|
|
23731
23767
|
classNames: classNames.guides,
|
|
23732
23768
|
verbiage: rawVerbiage.guides,
|
|
23733
23769
|
requestedAction: requestedAction,
|
|
23734
23770
|
satisfied: satisfied,
|
|
23735
23771
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
23736
23772
|
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
23773
|
+
idCardCaptureGuideImages: idCardCaptureGuideImages,
|
|
23737
23774
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
23738
23775
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
23739
23776
|
}), debugMode && capturingId && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ObjectDetectionDebugOverlayDiv, {
|
|
@@ -23903,7 +23940,7 @@
|
|
|
23903
23940
|
var templateObject_1$4, templateObject_2$4, templateObject_3$4;
|
|
23904
23941
|
|
|
23905
23942
|
var VideoIdWizard = function VideoIdWizard(_a) {
|
|
23906
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
23943
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
23907
23944
|
var onComplete = _a.onComplete,
|
|
23908
23945
|
onExitCapture = _a.onExitCapture,
|
|
23909
23946
|
onExitAfterFailure = _a.onExitAfterFailure,
|
|
@@ -23911,29 +23948,31 @@
|
|
|
23911
23948
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
23912
23949
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
23913
23950
|
onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
|
|
23914
|
-
|
|
23915
|
-
idCaptureProps =
|
|
23916
|
-
|
|
23917
|
-
faceLivenessProps =
|
|
23918
|
-
|
|
23919
|
-
idCaptureModelsEnabled =
|
|
23920
|
-
|
|
23921
|
-
videoIdCaptureThresholds =
|
|
23951
|
+
_l = _a.idCaptureProps,
|
|
23952
|
+
idCaptureProps = _l === void 0 ? {} : _l,
|
|
23953
|
+
_m = _a.faceLivenessProps,
|
|
23954
|
+
faceLivenessProps = _m === void 0 ? {} : _m,
|
|
23955
|
+
_o = _a.idCaptureModelsEnabled,
|
|
23956
|
+
idCaptureModelsEnabled = _o === void 0 ? true : _o,
|
|
23957
|
+
_p = _a.videoIdCaptureThresholds,
|
|
23958
|
+
videoIdCaptureThresholds = _p === void 0 ? defaultVideoIdCaptureThresholds : _p,
|
|
23922
23959
|
readTextPrompt = _a.readTextPrompt,
|
|
23923
23960
|
readTextTimeoutDurationMs = _a.readTextTimeoutDurationMs,
|
|
23924
23961
|
readTextMinReadingMs = _a.readTextMinReadingMs,
|
|
23925
|
-
|
|
23926
|
-
skipIdCapture =
|
|
23927
|
-
|
|
23928
|
-
skipShowIdCardBack =
|
|
23929
|
-
|
|
23930
|
-
skipSuccessScreen =
|
|
23931
|
-
|
|
23932
|
-
idCaptureLoadingOverlayMode =
|
|
23962
|
+
_q = _a.skipIdCapture,
|
|
23963
|
+
skipIdCapture = _q === void 0 ? false : _q,
|
|
23964
|
+
_r = _a.skipShowIdCardBack,
|
|
23965
|
+
skipShowIdCardBack = _r === void 0 ? false : _r,
|
|
23966
|
+
_s = _a.skipSuccessScreen,
|
|
23967
|
+
skipSuccessScreen = _s === void 0 ? false : _s,
|
|
23968
|
+
_t = _a.idCaptureLoadingOverlayMode,
|
|
23969
|
+
idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
|
|
23933
23970
|
customOverlayContent = _a.customOverlayContent,
|
|
23934
23971
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
23935
|
-
|
|
23936
|
-
idCaptureGuideType =
|
|
23972
|
+
_u = _a.idCaptureGuideType,
|
|
23973
|
+
idCaptureGuideType = _u === void 0 ? 'fit' : _u,
|
|
23974
|
+
_v = _a.idCaptureGuideImages,
|
|
23975
|
+
idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
|
|
23937
23976
|
_w = _a.idCapturePortraitGuidesOnMobile,
|
|
23938
23977
|
idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
23939
23978
|
_x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
@@ -24037,18 +24076,18 @@
|
|
|
24037
24076
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
24038
24077
|
}, [onExitCapture]);
|
|
24039
24078
|
var faceLivenessGuides = React.useCallback(function (_a) {
|
|
24040
|
-
var _b, _c, _d, _e
|
|
24079
|
+
var _b, _c, _d, _e;
|
|
24041
24080
|
var status = _a.status;
|
|
24042
24081
|
return /*#__PURE__*/React.createElement(IdVideoCaptureGuides, {
|
|
24043
|
-
|
|
24044
|
-
classNames: (
|
|
24045
|
-
verbiage: (
|
|
24082
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
24083
|
+
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
24084
|
+
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
24046
24085
|
requestedAction: "VERIFY_LIVENESS",
|
|
24047
24086
|
faceGuideStatus: status,
|
|
24048
|
-
faceGuideBorderColor: status === 'success' ? (
|
|
24087
|
+
faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
|
|
24049
24088
|
idCardGuideStatus: "disabled"
|
|
24050
24089
|
});
|
|
24051
|
-
}, [(_b =
|
|
24090
|
+
}, [(_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides, (_c = colors.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guidesSatisfiedColor, (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesUnsatisfiedColor, idCaptureGuideImages, (_e = verbiage.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guides]);
|
|
24052
24091
|
if (submissionStatus === SubmissionStatus.SUBMITTING) {
|
|
24053
24092
|
return /*#__PURE__*/React.createElement(PageContainer, {
|
|
24054
24093
|
className: "flex"
|
|
@@ -24066,8 +24105,8 @@
|
|
|
24066
24105
|
debugMode: debugMode
|
|
24067
24106
|
}, /*#__PURE__*/React.createElement(IdCaptureModelsProvider, {
|
|
24068
24107
|
autoStart: false,
|
|
24069
|
-
documentDetectionModelUrl: (
|
|
24070
|
-
focusModelUrl: (
|
|
24108
|
+
documentDetectionModelUrl: (_g = (_f = idCaptureProps.assets) === null || _f === void 0 ? void 0 : _f.documentDetectionModelUrl) !== null && _g !== void 0 ? _g : '',
|
|
24109
|
+
focusModelUrl: (_j = (_h = idCaptureProps.assets) === null || _h === void 0 ? void 0 : _h.focusModelUrl) !== null && _j !== void 0 ? _j : '',
|
|
24071
24110
|
onModelError: onIdCaptureModelError,
|
|
24072
24111
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
24073
24112
|
}, /*#__PURE__*/React.createElement(SelfieGuidanceModelsProvider, {
|
|
@@ -24075,18 +24114,19 @@
|
|
|
24075
24114
|
onModelError: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onModelError,
|
|
24076
24115
|
modelLoadTimeoutMs: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.modelLoadTimeoutMs
|
|
24077
24116
|
}, /*#__PURE__*/React.createElement(PageContainer, {
|
|
24078
|
-
className: "flex ".concat((
|
|
24117
|
+
className: "flex ".concat((_k = classNames.container) !== null && _k !== void 0 ? _k : '')
|
|
24079
24118
|
}, ['CHECKING_LIVENESS', 'CAPTURING_VIDEO'].includes(captureState) && /*#__PURE__*/React.createElement(CameraVideoTag, {
|
|
24080
24119
|
className: classNames.cameraFeed
|
|
24081
24120
|
}), function () {
|
|
24082
24121
|
switch (captureState) {
|
|
24083
24122
|
case 'CAPTURING_ID':
|
|
24084
|
-
return /*#__PURE__*/React.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React.createElement(
|
|
24123
|
+
return /*#__PURE__*/React.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React.createElement(IdCaptureWizard, _assign({
|
|
24085
24124
|
key: "id-capture-".concat(attempt),
|
|
24086
24125
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
24087
24126
|
customOverlayContent: customOverlayContent,
|
|
24088
24127
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
24089
|
-
silentFallback: silentFallback
|
|
24128
|
+
silentFallback: silentFallback,
|
|
24129
|
+
guideImages: idCaptureGuideImages
|
|
24090
24130
|
}, idCaptureProps, {
|
|
24091
24131
|
assets: assets.idCapture,
|
|
24092
24132
|
classNames: classNames.idCapture,
|
|
@@ -24136,6 +24176,7 @@
|
|
|
24136
24176
|
onRecordingFailed: onRecordingFailed,
|
|
24137
24177
|
onExitCapture: handleExitCapture,
|
|
24138
24178
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
24179
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
24139
24180
|
videoIdCaptureThresholds: videoIdCaptureThresholds,
|
|
24140
24181
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
24141
24182
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
@@ -24144,7 +24185,6 @@
|
|
|
24144
24185
|
readTextTimeoutDurationMs: readTextTimeoutDurationMs,
|
|
24145
24186
|
readTextMinReadingMs: readTextMinReadingMs,
|
|
24146
24187
|
mergeAVStreams: mergeAVStreams,
|
|
24147
|
-
assets: assets.idVideoCapture,
|
|
24148
24188
|
classNames: classNames.idVideoCapture,
|
|
24149
24189
|
colors: colors.idVideoCapture,
|
|
24150
24190
|
verbiage: verbiage.idVideoCapture,
|
|
@@ -24168,7 +24208,7 @@
|
|
|
24168
24208
|
}()))));
|
|
24169
24209
|
};
|
|
24170
24210
|
|
|
24171
|
-
|
|
24211
|
+
function CompositeWizard(_a) {
|
|
24172
24212
|
var _b, _c, _d, _e, _f;
|
|
24173
24213
|
var userChecks = _a.checks,
|
|
24174
24214
|
_g = _a.idCaptureProps,
|
|
@@ -24324,7 +24364,7 @@
|
|
|
24324
24364
|
focusModelUrl: (_f = (_e = idCaptureProps.assets) === null || _e === void 0 ? void 0 : _e.focusModelUrl) !== null && _f !== void 0 ? _f : '',
|
|
24325
24365
|
onModelError: idCaptureProps.onModelError,
|
|
24326
24366
|
modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs
|
|
24327
|
-
}, /*#__PURE__*/React.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React.createElement(
|
|
24367
|
+
}, /*#__PURE__*/React.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React.createElement(IdCaptureWizard, _assign({}, idCaptureProps, {
|
|
24328
24368
|
onSuccess: onIdCaptureSuccess
|
|
24329
24369
|
}))))));
|
|
24330
24370
|
case 'VideoIdCapture':
|
|
@@ -24379,7 +24419,7 @@
|
|
|
24379
24419
|
default:
|
|
24380
24420
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
24381
24421
|
}
|
|
24382
|
-
}
|
|
24422
|
+
}
|
|
24383
24423
|
|
|
24384
24424
|
var noneTheme = {};
|
|
24385
24425
|
var defaultTheme = {
|
|
@@ -24646,20 +24686,22 @@
|
|
|
24646
24686
|
instructions = _a.instructions,
|
|
24647
24687
|
_h = _a.guideType,
|
|
24648
24688
|
guideType = _h === void 0 ? 'fit' : _h,
|
|
24649
|
-
_j = _a.
|
|
24650
|
-
|
|
24651
|
-
_k = _a.
|
|
24652
|
-
|
|
24653
|
-
_l = _a.
|
|
24654
|
-
|
|
24655
|
-
_m = _a.
|
|
24656
|
-
|
|
24657
|
-
_o = _a.
|
|
24658
|
-
|
|
24659
|
-
_p = _a.
|
|
24660
|
-
|
|
24661
|
-
_q = _a.
|
|
24662
|
-
|
|
24689
|
+
_j = _a.guideImages,
|
|
24690
|
+
guideImages = _j === void 0 ? defaultIdCaptureGuideImages : _j,
|
|
24691
|
+
_k = _a.portraitGuidesOnMobile,
|
|
24692
|
+
portraitGuidesOnMobile = _k === void 0 ? true : _k,
|
|
24693
|
+
_l = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
24694
|
+
rotateLoadingOverlayImageWhenPortrait = _l === void 0 ? true : _l,
|
|
24695
|
+
_m = _a.modelLoadTimeoutMs,
|
|
24696
|
+
modelLoadTimeoutMs = _m === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _m,
|
|
24697
|
+
_o = _a.forceFallbackMode,
|
|
24698
|
+
forceFallbackMode = _o === void 0 ? false : _o,
|
|
24699
|
+
_p = _a.allowIdCardBackToFrontCapture,
|
|
24700
|
+
allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
|
|
24701
|
+
_q = _a.enableOverrideWrongDocumentTypeDialog,
|
|
24702
|
+
enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
|
|
24703
|
+
_r = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
24704
|
+
allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
|
|
24663
24705
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
24664
24706
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
24665
24707
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -24673,28 +24715,28 @@
|
|
|
24673
24715
|
onUserCancel = _a.onUserCancel,
|
|
24674
24716
|
onModelError = _a.onModelError,
|
|
24675
24717
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
24676
|
-
|
|
24677
|
-
theme =
|
|
24678
|
-
|
|
24679
|
-
assets =
|
|
24680
|
-
|
|
24681
|
-
classNames =
|
|
24682
|
-
|
|
24683
|
-
colors =
|
|
24684
|
-
|
|
24685
|
-
verbiage =
|
|
24686
|
-
|
|
24687
|
-
captureSignature =
|
|
24688
|
-
|
|
24689
|
-
captureSignatureVideo =
|
|
24690
|
-
|
|
24691
|
-
captureAdditionalDocuments =
|
|
24692
|
-
|
|
24693
|
-
geolocationEnabled =
|
|
24694
|
-
|
|
24695
|
-
geolocationRequired =
|
|
24696
|
-
|
|
24697
|
-
debugMode =
|
|
24718
|
+
_s = _a.theme,
|
|
24719
|
+
theme = _s === void 0 ? 'default' : _s,
|
|
24720
|
+
_t = _a.assets,
|
|
24721
|
+
assets = _t === void 0 ? {} : _t,
|
|
24722
|
+
_u = _a.classNames,
|
|
24723
|
+
classNames = _u === void 0 ? {} : _u,
|
|
24724
|
+
_v = _a.colors,
|
|
24725
|
+
colors = _v === void 0 ? {} : _v,
|
|
24726
|
+
_w = _a.verbiage,
|
|
24727
|
+
verbiage = _w === void 0 ? {} : _w,
|
|
24728
|
+
_x = _a.captureSignature,
|
|
24729
|
+
captureSignature = _x === void 0 ? false : _x,
|
|
24730
|
+
_y = _a.captureSignatureVideo,
|
|
24731
|
+
captureSignatureVideo = _y === void 0 ? false : _y,
|
|
24732
|
+
_z = _a.captureAdditionalDocuments,
|
|
24733
|
+
captureAdditionalDocuments = _z === void 0 ? [] : _z,
|
|
24734
|
+
_0 = _a.geolocationEnabled,
|
|
24735
|
+
geolocationEnabled = _0 === void 0 ? true : _0,
|
|
24736
|
+
_1 = _a.geolocationRequired,
|
|
24737
|
+
geolocationRequired = _1 === void 0 ? false : _1,
|
|
24738
|
+
_2 = _a.debugMode,
|
|
24739
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
24698
24740
|
useLanguage(lang);
|
|
24699
24741
|
useDebugLogging(debugMode);
|
|
24700
24742
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -24714,6 +24756,7 @@
|
|
|
24714
24756
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
24715
24757
|
instructions: instructions,
|
|
24716
24758
|
guideType: guideType,
|
|
24759
|
+
guideImages: guideImages,
|
|
24717
24760
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
24718
24761
|
rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
|
|
24719
24762
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
@@ -24725,7 +24768,7 @@
|
|
|
24725
24768
|
verbiage: verbiage,
|
|
24726
24769
|
debugMode: debugMode
|
|
24727
24770
|
};
|
|
24728
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
24771
|
+
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
24729
24772
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
24730
24773
|
return {
|
|
24731
24774
|
documents: captureAdditionalDocuments,
|
|
@@ -24795,7 +24838,7 @@
|
|
|
24795
24838
|
onResponseReceived: onResponseReceived,
|
|
24796
24839
|
geolocationEnabled: geolocationEnabled,
|
|
24797
24840
|
geolocationRequired: geolocationRequired
|
|
24798
|
-
}, /*#__PURE__*/React.createElement(
|
|
24841
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
24799
24842
|
checks: React.useMemo(function () {
|
|
24800
24843
|
return ['IdCapture'];
|
|
24801
24844
|
}, []),
|
|
@@ -24907,7 +24950,7 @@
|
|
|
24907
24950
|
onBeforeLivenessCheck: onBeforeSubmit,
|
|
24908
24951
|
geolocationEnabled: geolocationEnabled,
|
|
24909
24952
|
geolocationRequired: geolocationRequired
|
|
24910
|
-
}, /*#__PURE__*/React.createElement(
|
|
24953
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
24911
24954
|
checks: React.useMemo(function () {
|
|
24912
24955
|
return ['FaceLiveness'];
|
|
24913
24956
|
}, []),
|
|
@@ -24961,20 +25004,22 @@
|
|
|
24961
25004
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
24962
25005
|
_j = _a.idCaptureGuideType,
|
|
24963
25006
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
24964
|
-
_k = _a.
|
|
24965
|
-
|
|
24966
|
-
_l = _a.
|
|
24967
|
-
|
|
24968
|
-
_m = _a.
|
|
24969
|
-
|
|
24970
|
-
_o = _a.
|
|
24971
|
-
|
|
24972
|
-
_p = _a.
|
|
24973
|
-
|
|
24974
|
-
_q = _a.
|
|
24975
|
-
|
|
24976
|
-
_r = _a.
|
|
24977
|
-
|
|
25007
|
+
_k = _a.idCaptureGuideImages,
|
|
25008
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
25009
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
25010
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
25011
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
25012
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
25013
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
25014
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
25015
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
25016
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
25017
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
25018
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
25019
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
25020
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
25021
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
25022
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
24978
25023
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
24979
25024
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
24980
25025
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -24991,28 +25036,28 @@
|
|
|
24991
25036
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
24992
25037
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
24993
25038
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
24994
|
-
|
|
24995
|
-
captureSignature =
|
|
24996
|
-
|
|
24997
|
-
captureSignatureVideo =
|
|
24998
|
-
|
|
24999
|
-
captureAdditionalDocuments =
|
|
25000
|
-
|
|
25001
|
-
theme =
|
|
25002
|
-
|
|
25003
|
-
assets =
|
|
25004
|
-
|
|
25005
|
-
classNames =
|
|
25006
|
-
|
|
25007
|
-
colors =
|
|
25008
|
-
|
|
25009
|
-
verbiage =
|
|
25010
|
-
|
|
25011
|
-
geolocationEnabled =
|
|
25012
|
-
|
|
25013
|
-
geolocationRequired =
|
|
25014
|
-
|
|
25015
|
-
debugMode =
|
|
25039
|
+
_t = _a.captureSignature,
|
|
25040
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
25041
|
+
_u = _a.captureSignatureVideo,
|
|
25042
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
25043
|
+
_v = _a.captureAdditionalDocuments,
|
|
25044
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
25045
|
+
_w = _a.theme,
|
|
25046
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
25047
|
+
_x = _a.assets,
|
|
25048
|
+
assets = _x === void 0 ? {} : _x,
|
|
25049
|
+
_y = _a.classNames,
|
|
25050
|
+
classNames = _y === void 0 ? {} : _y,
|
|
25051
|
+
_z = _a.colors,
|
|
25052
|
+
colors = _z === void 0 ? {} : _z,
|
|
25053
|
+
_0 = _a.verbiage,
|
|
25054
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
25055
|
+
_1 = _a.geolocationEnabled,
|
|
25056
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
25057
|
+
_2 = _a.geolocationRequired,
|
|
25058
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
25059
|
+
_3 = _a.debugMode,
|
|
25060
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
25016
25061
|
useLanguage(lang);
|
|
25017
25062
|
useDebugLogging(debugMode);
|
|
25018
25063
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -25030,6 +25075,7 @@
|
|
|
25030
25075
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
25031
25076
|
instructions: idCaptureInstructions,
|
|
25032
25077
|
guideType: idCaptureGuideType,
|
|
25078
|
+
guideImages: idCaptureGuideImages,
|
|
25033
25079
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
25034
25080
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
25035
25081
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -25039,7 +25085,7 @@
|
|
|
25039
25085
|
skipSuccessScreen: skipSuccessScreen,
|
|
25040
25086
|
debugMode: debugMode
|
|
25041
25087
|
};
|
|
25042
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
25088
|
+
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
25043
25089
|
var faceLivenessProps = React.useMemo(function () {
|
|
25044
25090
|
return {
|
|
25045
25091
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -25131,7 +25177,7 @@
|
|
|
25131
25177
|
onResponseReceived: onResponseReceived,
|
|
25132
25178
|
geolocationEnabled: geolocationEnabled,
|
|
25133
25179
|
geolocationRequired: geolocationRequired
|
|
25134
|
-
}, /*#__PURE__*/React.createElement(
|
|
25180
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
25135
25181
|
checks: checks,
|
|
25136
25182
|
idCaptureProps: idCaptureProps,
|
|
25137
25183
|
faceLivenessProps: faceLivenessProps,
|
|
@@ -25192,20 +25238,22 @@
|
|
|
25192
25238
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
25193
25239
|
_j = _a.idCaptureGuideType,
|
|
25194
25240
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
25195
|
-
_k = _a.
|
|
25196
|
-
|
|
25197
|
-
_l = _a.
|
|
25198
|
-
|
|
25199
|
-
_m = _a.
|
|
25200
|
-
|
|
25201
|
-
_o = _a.
|
|
25202
|
-
|
|
25203
|
-
_p = _a.
|
|
25204
|
-
|
|
25205
|
-
_q = _a.
|
|
25206
|
-
|
|
25207
|
-
_r = _a.
|
|
25208
|
-
|
|
25241
|
+
_k = _a.idCaptureGuideImages,
|
|
25242
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
25243
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
25244
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
25245
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
25246
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
25247
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
25248
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
25249
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
25250
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
25251
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
25252
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
25253
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
25254
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
25255
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
25256
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
25209
25257
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
25210
25258
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
25211
25259
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -25221,28 +25269,28 @@
|
|
|
25221
25269
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
25222
25270
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
25223
25271
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
25224
|
-
|
|
25225
|
-
captureSignature =
|
|
25226
|
-
|
|
25227
|
-
captureSignatureVideo =
|
|
25228
|
-
|
|
25229
|
-
captureAdditionalDocuments =
|
|
25230
|
-
|
|
25231
|
-
theme =
|
|
25232
|
-
|
|
25233
|
-
assets =
|
|
25234
|
-
|
|
25235
|
-
classNames =
|
|
25236
|
-
|
|
25237
|
-
colors =
|
|
25238
|
-
|
|
25239
|
-
verbiage =
|
|
25240
|
-
|
|
25241
|
-
geolocationEnabled =
|
|
25242
|
-
|
|
25243
|
-
geolocationRequired =
|
|
25244
|
-
|
|
25245
|
-
debugMode =
|
|
25272
|
+
_t = _a.captureSignature,
|
|
25273
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
25274
|
+
_u = _a.captureSignatureVideo,
|
|
25275
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
25276
|
+
_v = _a.captureAdditionalDocuments,
|
|
25277
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
25278
|
+
_w = _a.theme,
|
|
25279
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
25280
|
+
_x = _a.assets,
|
|
25281
|
+
assets = _x === void 0 ? {} : _x,
|
|
25282
|
+
_y = _a.classNames,
|
|
25283
|
+
classNames = _y === void 0 ? {} : _y,
|
|
25284
|
+
_z = _a.colors,
|
|
25285
|
+
colors = _z === void 0 ? {} : _z,
|
|
25286
|
+
_0 = _a.verbiage,
|
|
25287
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
25288
|
+
_1 = _a.geolocationEnabled,
|
|
25289
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
25290
|
+
_2 = _a.geolocationRequired,
|
|
25291
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
25292
|
+
_3 = _a.debugMode,
|
|
25293
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
25246
25294
|
useLanguage(lang);
|
|
25247
25295
|
useDebugLogging(debugMode);
|
|
25248
25296
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -25256,6 +25304,7 @@
|
|
|
25256
25304
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
25257
25305
|
instructions: idCaptureInstructions,
|
|
25258
25306
|
guideType: idCaptureGuideType,
|
|
25307
|
+
guideImages: idCaptureGuideImages,
|
|
25259
25308
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
25260
25309
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
25261
25310
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -25268,7 +25317,7 @@
|
|
|
25268
25317
|
skipSuccessScreen: skipSuccessScreen,
|
|
25269
25318
|
debugMode: debugMode
|
|
25270
25319
|
};
|
|
25271
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
25320
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
25272
25321
|
var faceLivenessProps = React.useMemo(function () {
|
|
25273
25322
|
return {
|
|
25274
25323
|
onExitCapture: onExitCapture,
|
|
@@ -25358,7 +25407,7 @@
|
|
|
25358
25407
|
onResponseReceived: onResponseReceived,
|
|
25359
25408
|
geolocationEnabled: geolocationEnabled,
|
|
25360
25409
|
geolocationRequired: geolocationRequired
|
|
25361
|
-
}, /*#__PURE__*/React.createElement(
|
|
25410
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
25362
25411
|
checks: React.useMemo(function () {
|
|
25363
25412
|
return ['IdCapture', 'FaceLiveness'];
|
|
25364
25413
|
}, []),
|
|
@@ -26552,7 +26601,7 @@
|
|
|
26552
26601
|
onResponseReceived: onComplete,
|
|
26553
26602
|
geolocationEnabled: geolocationEnabled,
|
|
26554
26603
|
geolocationRequired: geolocationRequired
|
|
26555
|
-
}, /*#__PURE__*/React.createElement(
|
|
26604
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
26556
26605
|
checks: React.useMemo(function () {
|
|
26557
26606
|
return ['VideoSignatureCapture'];
|
|
26558
26607
|
}, []),
|
|
@@ -26639,43 +26688,45 @@
|
|
|
26639
26688
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
26640
26689
|
_l = _a.idCaptureGuideType,
|
|
26641
26690
|
idCaptureGuideType = _l === void 0 ? 'fit' : _l,
|
|
26642
|
-
_m = _a.
|
|
26643
|
-
|
|
26644
|
-
_o = _a.
|
|
26645
|
-
|
|
26691
|
+
_m = _a.idCaptureGuideImages,
|
|
26692
|
+
idCaptureGuideImages = _m === void 0 ? defaultIdCaptureGuideImages : _m,
|
|
26693
|
+
_o = _a.idCapturePortraitGuidesOnMobile,
|
|
26694
|
+
idCapturePortraitGuidesOnMobile = _o === void 0 ? true : _o,
|
|
26695
|
+
_p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
26696
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
|
|
26646
26697
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
26647
|
-
|
|
26648
|
-
faceLivenessLoadingOverlayMode =
|
|
26649
|
-
|
|
26650
|
-
disableFaceDetectionWhileAudioCapture =
|
|
26651
|
-
|
|
26652
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
26653
|
-
|
|
26654
|
-
silentFallback =
|
|
26655
|
-
|
|
26656
|
-
mergeAVStreams =
|
|
26657
|
-
|
|
26658
|
-
theme =
|
|
26659
|
-
|
|
26660
|
-
assets =
|
|
26661
|
-
|
|
26662
|
-
classNames =
|
|
26663
|
-
|
|
26664
|
-
colors =
|
|
26665
|
-
|
|
26666
|
-
verbiage =
|
|
26667
|
-
|
|
26668
|
-
captureSignature =
|
|
26669
|
-
|
|
26670
|
-
captureSignatureVideo =
|
|
26671
|
-
|
|
26672
|
-
captureAdditionalDocuments =
|
|
26673
|
-
|
|
26674
|
-
geolocationEnabled =
|
|
26675
|
-
|
|
26676
|
-
geolocationRequired =
|
|
26677
|
-
|
|
26678
|
-
debugMode =
|
|
26698
|
+
_q = _a.faceLivenessLoadingOverlayMode,
|
|
26699
|
+
faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
|
|
26700
|
+
_r = _a.disableFaceDetectionWhileAudioCapture,
|
|
26701
|
+
disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
|
|
26702
|
+
_s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
26703
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
|
|
26704
|
+
_t = _a.silentFallback,
|
|
26705
|
+
silentFallback = _t === void 0 ? false : _t,
|
|
26706
|
+
_u = _a.mergeAVStreams,
|
|
26707
|
+
mergeAVStreams = _u === void 0 ? false : _u,
|
|
26708
|
+
_v = _a.theme,
|
|
26709
|
+
theme = _v === void 0 ? 'default' : _v,
|
|
26710
|
+
_w = _a.assets,
|
|
26711
|
+
assets = _w === void 0 ? {} : _w,
|
|
26712
|
+
_x = _a.classNames,
|
|
26713
|
+
classNames = _x === void 0 ? {} : _x,
|
|
26714
|
+
_y = _a.colors,
|
|
26715
|
+
colors = _y === void 0 ? {} : _y,
|
|
26716
|
+
_z = _a.verbiage,
|
|
26717
|
+
verbiage = _z === void 0 ? {} : _z,
|
|
26718
|
+
_0 = _a.captureSignature,
|
|
26719
|
+
captureSignature = _0 === void 0 ? false : _0,
|
|
26720
|
+
_1 = _a.captureSignatureVideo,
|
|
26721
|
+
captureSignatureVideo = _1 === void 0 ? false : _1,
|
|
26722
|
+
_2 = _a.captureAdditionalDocuments,
|
|
26723
|
+
captureAdditionalDocuments = _2 === void 0 ? [] : _2,
|
|
26724
|
+
_3 = _a.geolocationEnabled,
|
|
26725
|
+
geolocationEnabled = _3 === void 0 ? true : _3,
|
|
26726
|
+
_4 = _a.geolocationRequired,
|
|
26727
|
+
geolocationRequired = _4 === void 0 ? false : _4,
|
|
26728
|
+
_5 = _a.debugMode,
|
|
26729
|
+
debugMode = _5 === void 0 ? false : _5;
|
|
26679
26730
|
useLanguage(lang);
|
|
26680
26731
|
useDebugLogging(debugMode);
|
|
26681
26732
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
@@ -26697,6 +26748,7 @@
|
|
|
26697
26748
|
customOverlayContent: customOverlayContent,
|
|
26698
26749
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
26699
26750
|
idCaptureGuideType: idCaptureGuideType,
|
|
26751
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
26700
26752
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
26701
26753
|
idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
26702
26754
|
faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -26710,7 +26762,7 @@
|
|
|
26710
26762
|
verbiage: verbiage,
|
|
26711
26763
|
debugMode: debugMode
|
|
26712
26764
|
};
|
|
26713
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
26765
|
+
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
26714
26766
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26715
26767
|
return {
|
|
26716
26768
|
documents: captureAdditionalDocuments,
|
|
@@ -26773,7 +26825,7 @@
|
|
|
26773
26825
|
onResponseReceived: onComplete,
|
|
26774
26826
|
geolocationEnabled: geolocationEnabled,
|
|
26775
26827
|
geolocationRequired: geolocationRequired
|
|
26776
|
-
}, /*#__PURE__*/React.createElement(
|
|
26828
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
26777
26829
|
checks: React.useMemo(function () {
|
|
26778
26830
|
return ['VideoIdCapture'];
|
|
26779
26831
|
}, []),
|
|
@@ -26932,7 +26984,7 @@
|
|
|
26932
26984
|
onResponseReceived: onResponseReceived,
|
|
26933
26985
|
geolocationEnabled: geolocationEnabled,
|
|
26934
26986
|
geolocationRequired: geolocationRequired
|
|
26935
|
-
}, /*#__PURE__*/React.createElement(
|
|
26987
|
+
}, /*#__PURE__*/React.createElement(CompositeWizard, {
|
|
26936
26988
|
checks: React.useMemo(function () {
|
|
26937
26989
|
return ['FaceLiveness'];
|
|
26938
26990
|
}, []),
|