idmission-web-sdk 1.0.141 → 1.0.143

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.
@@ -53,11 +53,10 @@ export type IdCaptureProps = {
53
53
  onPrediction?: (prediction: IdCapturePrediction) => void;
54
54
  onBarcodeScanned?: (result: PDF417DetectionResult) => void;
55
55
  onCapture?: (frame: string, width: number, height: number, metadata: CaptureAttemptMetadata) => void;
56
- onExit?: () => void;
57
56
  assets?: IdCaptureAssets;
58
57
  classNames?: IdCaptureClassNames;
59
58
  colors?: IdCaptureColors;
60
59
  verbiage?: IdCaptureVerbiage;
61
60
  debugMode?: boolean;
62
61
  };
63
- export declare const IdCapture: ({ requiredDocumentType, autoCaptureEnabled, autoCaptureScoreThreshold, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, mrzDetectionScoreThreshold, passportPageDetectionThreshold, pdf417DetectionThreshold, focusScoreThreshold, barcodeScanningEnabled, maxBarcodeScanAttempts, guidanceMessage, guidanceSatisfied, onPrediction, onBarcodeScanned, onCapture, onExit, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdCaptureProps) => React.ReactElement;
62
+ export declare const IdCapture: ({ requiredDocumentType, autoCaptureEnabled, autoCaptureScoreThreshold, autoCaptureGoodFramesRequired, autoCaptureBarcodeRequired, mrzDetectionScoreThreshold, passportPageDetectionThreshold, pdf417DetectionThreshold, focusScoreThreshold, barcodeScanningEnabled, maxBarcodeScanAttempts, guidanceMessage, guidanceSatisfied, onPrediction, onBarcodeScanned, onCapture, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdCaptureProps) => React.ReactElement;
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { SignatureKYC, SignatureKYCProps } from './components/customer_flows/Sig
8
8
  import { VideoIdValidation, VideoIdValidationProps } from './components/customer_flows/VideoIdValidation';
9
9
  import { preloadModels } from './lib/models/preloadModels';
10
10
  import { CustomerBiometricsEnrollment } from './components/customer_flows/CustomerBiometricsEnrollment';
11
- import { themes } from './themes';
11
+ import { Theme, themes } from './themes';
12
12
  import { SubmissionRequest, SubmissionResponse } from './contexts/SubmissionContext';
13
13
  import { DocumentCapture, DocumentCaptureProps } from './components/customer_flows/DocumentCapture';
14
14
  import { CapturedDocumentImg } from './components/common/CapturedDocumentImg';
@@ -42,4 +42,4 @@ export type IDmissionSDK = {
42
42
  declare global {
43
43
  var IDmissionSDK: IDmissionSDK;
44
44
  }
45
- export { preloadModels, themes, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
45
+ export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
@@ -47,7 +47,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
47
47
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
48
48
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
49
49
 
50
- var webSdkVersion = '1.0.141';
50
+ var webSdkVersion = '1.0.143';
51
51
 
52
52
  function getPlatform() {
53
53
  if (typeof window === 'undefined') return;
@@ -9549,53 +9549,7 @@ function SelfieCaptureFaceKeypoint(_a) {
9549
9549
  }
9550
9550
  var templateObject_1$w, templateObject_2$l, templateObject_3$e, templateObject_4$a;
9551
9551
 
9552
- var ExitCaptureStyledButton = styled__default['default'].button(templateObject_1$v || (templateObject_1$v = tslib.__makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
9553
- var ExitCaptureButton = function ExitCaptureButton(_a) {
9554
- var onClick = _a.onClick,
9555
- className = _a.className;
9556
- return /*#__PURE__*/React__default['default'].createElement(ExitCaptureStyledButton, {
9557
- onClick: onClick,
9558
- className: className
9559
- }, /*#__PURE__*/React__default['default'].createElement("svg", {
9560
- version: "1.1",
9561
- xmlns: "http://www.w3.org/2000/svg",
9562
- x: "0px",
9563
- y: "0px",
9564
- viewBox: "19.3 19.3 25.499999999999996 25.499999999999996",
9565
- enableBackground: "new 0 0 64 64",
9566
- width: 16,
9567
- height: 16
9568
- }, /*#__PURE__*/React__default['default'].createElement("g", {
9569
- id: "close-outline-bot_x5F_s1g1_x5F_s2g2_x5F_s3g1_x5F_s4g1"
9570
- }, /*#__PURE__*/React__default['default'].createElement("line", {
9571
- fill: "none",
9572
- stroke: "#000000",
9573
- strokeWidth: "1",
9574
- strokeLinecap: "round",
9575
- strokeLinejoin: "round",
9576
- strokeMiterlimit: "10",
9577
- x1: "19.75",
9578
- y1: "44.25",
9579
- x2: "44.25",
9580
- y2: "19.75"
9581
- })), /*#__PURE__*/React__default['default'].createElement("g", {
9582
- id: "close-outline-top_x5F_s1g1_x5F_s2g2_x5F_s3g1_x5F_s4g1"
9583
- }, /*#__PURE__*/React__default['default'].createElement("line", {
9584
- fill: "none",
9585
- stroke: "#000000",
9586
- strokeWidth: "1",
9587
- strokeLinecap: "round",
9588
- strokeLinejoin: "round",
9589
- strokeMiterlimit: "10",
9590
- x1: "44.25",
9591
- y1: "44.25",
9592
- x2: "19.75",
9593
- y2: "19.75"
9594
- }))));
9595
- };
9596
- var templateObject_1$v;
9597
-
9598
- var Spinner = styled__default['default'].div(templateObject_1$u || (templateObject_1$u = tslib.__makeTemplateObject(["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n box-sizing: content-box;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n box-sizing: content-box;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])), function (_a) {
9552
+ var Spinner = styled__default['default'].div(templateObject_1$v || (templateObject_1$v = tslib.__makeTemplateObject(["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n box-sizing: content-box;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: ", "px;\n height: ", "px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: ", "px;\n height: ", "px;\n margin: 8px;\n border-radius: 50%;\n border: ", "px solid\n ", ";\n border-color: ", " transparent\n ", " transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n box-sizing: content-box;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])), function (_a) {
9599
9553
  var $size = _a.$size;
9600
9554
  return $size !== null && $size !== void 0 ? $size : 80;
9601
9555
  }, function (_a) {
@@ -9620,7 +9574,7 @@ var Spinner = styled__default['default'].div(templateObject_1$u || (templateObje
9620
9574
  var $color = _a.$color;
9621
9575
  return $color !== null && $color !== void 0 ? $color : '#888';
9622
9576
  });
9623
- var templateObject_1$u;
9577
+ var templateObject_1$v;
9624
9578
 
9625
9579
  var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
9626
9580
  var _b = _a.classNames,
@@ -9661,11 +9615,11 @@ var SelfieProgressPreview = function SelfieProgressPreview(_a) {
9661
9615
  className: classNames.image
9662
9616
  })));
9663
9617
  };
9664
- var StyledSpinner = styled__default['default'](Spinner)(templateObject_1$t || (templateObject_1$t = tslib.__makeTemplateObject(["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"], ["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"])));
9618
+ var StyledSpinner = styled__default['default'](Spinner)(templateObject_1$u || (templateObject_1$u = tslib.__makeTemplateObject(["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"], ["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"])));
9665
9619
  var ImagePreviewWrapper = styled__default['default'].div(templateObject_2$k || (templateObject_2$k = tslib.__makeTemplateObject(["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"], ["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"])));
9666
9620
  var ImagePreviewText = styled__default['default'].div(templateObject_3$d || (templateObject_3$d = tslib.__makeTemplateObject(["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"], ["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"])));
9667
9621
  var ImagePreviewImageWrapper = styled__default['default'].div(templateObject_4$9 || (templateObject_4$9 = tslib.__makeTemplateObject(["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"], ["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"])));
9668
- var templateObject_1$t, templateObject_2$k, templateObject_3$d, templateObject_4$9;
9622
+ var templateObject_1$u, templateObject_2$k, templateObject_3$d, templateObject_4$9;
9669
9623
 
9670
9624
  var enTranslation = {};
9671
9625
 
@@ -9790,7 +9744,7 @@ function useTranslations(verbiage, fallbacks) {
9790
9744
  }, [fallbacks, i18n.language, t, verbiage]);
9791
9745
  }
9792
9746
 
9793
- var GuidanceMessageContainer = styled__default['default'].div(templateObject_1$s || (templateObject_1$s = tslib.__makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
9747
+ var GuidanceMessageContainer = styled__default['default'].div(templateObject_1$t || (templateObject_1$t = tslib.__makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
9794
9748
  var $top = _a.$top;
9795
9749
  return $top !== null && $top !== void 0 ? $top : '10vh';
9796
9750
  });
@@ -9801,7 +9755,7 @@ var GuidanceMessage = styled__default['default'].div(templateObject_2$j || (temp
9801
9755
  var _a, _b, _c, _d, _e, _f;
9802
9756
  return (_f = (_a = props.$textColor) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.textColor) !== null && _f !== void 0 ? _f : 'black';
9803
9757
  });
9804
- var templateObject_1$s, templateObject_2$j;
9758
+ var templateObject_1$t, templateObject_2$j;
9805
9759
 
9806
9760
  var IdCapture = function IdCapture(_a) {
9807
9761
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -9831,7 +9785,6 @@ var IdCapture = function IdCapture(_a) {
9831
9785
  onPrediction = _a.onPrediction,
9832
9786
  onBarcodeScanned = _a.onBarcodeScanned,
9833
9787
  onCapture = _a.onCapture,
9834
- onExit = _a.onExit,
9835
9788
  _y = _a.assets,
9836
9789
  assets = _y === void 0 ? {} : _y,
9837
9790
  _z = _a.classNames,
@@ -10113,10 +10066,7 @@ var IdCapture = function IdCapture(_a) {
10113
10066
  scaling: debugScalingDetails,
10114
10067
  flipX: !((_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.isRearFacing)
10115
10068
  });
10116
- }))), debugMode && ( /*#__PURE__*/React__default['default'].createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default['default'].createElement("br", null), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React__default['default'].createElement("br", null), modelsReady ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, state.documentDetectionThresholdMet ? '✅' : '❌', " Document Score: ", state.documentDetectionScore, " (", state.documentType, ")", /*#__PURE__*/React__default['default'].createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React__default['default'].createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore, /*#__PURE__*/React__default['default'].createElement("br", null), state.goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', state.goodFramesCount, "/", state.goodFramesThreshold, barcodeScanningEnabled && state.autoCaptureBarcodeRequired ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("br", null), state.barcodeResult ? '✅' : '❌', " Barcode Scanned (", supportsNativeBarcodeScanning() ? 'Native' : 'ZXing', ",", ' ', state.barcodeScanFailedAttempts, "/", state.maxBarcodeScanAttempts, " failed attempts)")) : null)) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u274C Models not ready")))), /*#__PURE__*/React__default['default'].createElement(ExitCaptureButton, {
10117
- onClick: onExit,
10118
- className: classNames.exitCaptureBtn
10119
- }));
10069
+ }))), debugMode && ( /*#__PURE__*/React__default['default'].createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default['default'].createElement("br", null), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React__default['default'].createElement("br", null), modelsReady ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, state.documentDetectionThresholdMet ? '✅' : '❌', " Document Score: ", state.documentDetectionScore, " (", state.documentType, ")", /*#__PURE__*/React__default['default'].createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React__default['default'].createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore, /*#__PURE__*/React__default['default'].createElement("br", null), state.goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', state.goodFramesCount, "/", state.goodFramesThreshold, barcodeScanningEnabled && state.autoCaptureBarcodeRequired ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("br", null), state.barcodeResult ? '✅' : '❌', " Barcode Scanned (", supportsNativeBarcodeScanning() ? 'Native' : 'ZXing', ",", ' ', state.barcodeScanFailedAttempts, "/", state.maxBarcodeScanAttempts, " failed attempts)")) : null)) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u274C Models not ready")))));
10120
10070
  };
10121
10071
  var timeSince = function timeSince(t) {
10122
10072
  if (!t) return 0;
@@ -10162,11 +10112,57 @@ var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
10162
10112
  finished: true
10163
10113
  }, verbiage.retryBtnText)));
10164
10114
  };
10165
- var StyledOverlayInner$2 = styled__default['default'](OverlayInner)(templateObject_1$r || (templateObject_1$r = tslib.__makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
10115
+ var StyledOverlayInner$2 = styled__default['default'](OverlayInner)(templateObject_1$s || (templateObject_1$s = tslib.__makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
10166
10116
  var StyledOverlayImageContainer = styled__default['default'](OverlayImageContainer)(templateObject_2$i || (templateObject_2$i = tslib.__makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
10167
10117
  var Description$3 = styled__default['default'].p(templateObject_3$c || (templateObject_3$c = tslib.__makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
10168
10118
  var RetryButton = styled__default['default'](LoaderButton)(templateObject_4$8 || (templateObject_4$8 = tslib.__makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
10169
- var templateObject_1$r, templateObject_2$i, templateObject_3$c, templateObject_4$8;
10119
+ var templateObject_1$s, templateObject_2$i, templateObject_3$c, templateObject_4$8;
10120
+
10121
+ var ExitCaptureStyledButton = styled__default['default'].button(templateObject_1$r || (templateObject_1$r = tslib.__makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 1002;\n border: none;\n border-radius: 4px;\n background: #ccc;\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
10122
+ var ExitCaptureButton = function ExitCaptureButton(_a) {
10123
+ var onClick = _a.onClick,
10124
+ className = _a.className;
10125
+ return /*#__PURE__*/React__default['default'].createElement(ExitCaptureStyledButton, {
10126
+ onClick: onClick,
10127
+ className: className
10128
+ }, /*#__PURE__*/React__default['default'].createElement("svg", {
10129
+ version: "1.1",
10130
+ xmlns: "http://www.w3.org/2000/svg",
10131
+ x: "0px",
10132
+ y: "0px",
10133
+ viewBox: "19.3 19.3 25.499999999999996 25.499999999999996",
10134
+ enableBackground: "new 0 0 64 64",
10135
+ width: 16,
10136
+ height: 16
10137
+ }, /*#__PURE__*/React__default['default'].createElement("g", {
10138
+ id: "close-outline-bot_x5F_s1g1_x5F_s2g2_x5F_s3g1_x5F_s4g1"
10139
+ }, /*#__PURE__*/React__default['default'].createElement("line", {
10140
+ fill: "none",
10141
+ stroke: "#000000",
10142
+ strokeWidth: "1",
10143
+ strokeLinecap: "round",
10144
+ strokeLinejoin: "round",
10145
+ strokeMiterlimit: "10",
10146
+ x1: "19.75",
10147
+ y1: "44.25",
10148
+ x2: "44.25",
10149
+ y2: "19.75"
10150
+ })), /*#__PURE__*/React__default['default'].createElement("g", {
10151
+ id: "close-outline-top_x5F_s1g1_x5F_s2g2_x5F_s3g1_x5F_s4g1"
10152
+ }, /*#__PURE__*/React__default['default'].createElement("line", {
10153
+ fill: "none",
10154
+ stroke: "#000000",
10155
+ strokeWidth: "1",
10156
+ strokeLinecap: "round",
10157
+ strokeLinejoin: "round",
10158
+ strokeMiterlimit: "10",
10159
+ x1: "44.25",
10160
+ y1: "44.25",
10161
+ x2: "19.75",
10162
+ y2: "19.75"
10163
+ }))));
10164
+ };
10165
+ var templateObject_1$r;
10170
10166
 
10171
10167
  var ContinuityCameraCheckboxContainer = styled__default['default'].div(templateObject_1$q || (templateObject_1$q = tslib.__makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
10172
10168
  var ContinuityCameraCheckbox = styled__default['default'].input(templateObject_2$h || (templateObject_2$h = tslib.__makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
@@ -10423,7 +10419,7 @@ var CameraVideoTag = function CameraVideoTag(_a) {
10423
10419
  "$isRearFacing": (_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing
10424
10420
  });
10425
10421
  };
10426
- var FullscreenVideoTag = styled__default['default'].video(templateObject_1$n || (templateObject_1$n = tslib.__makeTemplateObject(["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: cover;\n background: black;\n"], ["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: cover;\n background: black;\n"])), function (props) {
10422
+ var FullscreenVideoTag = styled__default['default'].video(templateObject_1$n || (templateObject_1$n = tslib.__makeTemplateObject(["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: cover;\n background: black;\n z-index: -2;\n"], ["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: cover;\n background: black;\n z-index: -2;\n"])), function (props) {
10427
10423
  return props.$isRearFacing ? '' : 'scaleX(-1)';
10428
10424
  });
10429
10425
  var templateObject_1$n;
@@ -10942,7 +10938,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
10942
10938
  aspectRatio = guideImageWidth / guideImageHeight;
10943
10939
  }
10944
10940
  if (maskColor === undefined) {
10945
- maskColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideOverlay) === null || _m === void 0 ? void 0 : _m.backgroundColor) !== null && _o !== void 0 ? _o : '#888';
10941
+ maskColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideOverlay) === null || _m === void 0 ? void 0 : _m.backgroundColor) !== null && _o !== void 0 ? _o : '#708090';
10946
10942
  }
10947
10943
  React.useEffect(function () {
10948
10944
  var canvas = canvasRef.current;
@@ -11034,7 +11030,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
11034
11030
  classNames: classNames
11035
11031
  })));
11036
11032
  };
11037
- var CanvasWrapper$1 = styled__default['default'].div(templateObject_1$i || (templateObject_1$i = tslib.__makeTemplateObject(["\n position: relative;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"], ["\n position: relative;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"])), function (props) {
11033
+ var CanvasWrapper$1 = styled__default['default'].div(templateObject_1$i || (templateObject_1$i = tslib.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
11038
11034
  return props.$maskColor;
11039
11035
  });
11040
11036
  var Canvas$1 = styled__default['default'].canvas(templateObject_2$c || (templateObject_2$c = tslib.__makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
@@ -11204,63 +11200,63 @@ var reducer$4 = function reducer(state, action) {
11204
11200
  }
11205
11201
  };
11206
11202
  var IdCaptureWizard = function IdCaptureWizard(_a) {
11207
- var _b;
11208
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11203
+ var _b, _c, _d, _e;
11204
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
11209
11205
  var onSuccess = _a.onSuccess,
11210
11206
  onExitCapture = _a.onExitCapture,
11211
11207
  onUserCancel = _a.onUserCancel,
11212
11208
  precapturedDocuments = _a.precapturedDocuments,
11213
- _o = _a.captureRequirement,
11214
- captureRequirement = _o === void 0 ? 'idCardOrPassport' : _o,
11215
- _p = _a.autoCaptureEnabled,
11216
- autoCaptureEnabled = _p === void 0 ? true : _p,
11217
- _q = _a.autoCaptureGoodFramesRequired,
11218
- autoCaptureGoodFramesRequired = _q === void 0 ? 3 : _q,
11219
- _r = _a.autoCaptureBarcodeRequired,
11220
- autoCaptureBarcodeRequired = _r === void 0 ? 'mobile' : _r,
11221
- _s = _a.barcodeScanningEnabled,
11222
- barcodeScanningEnabled = _s === void 0 ? false : _s,
11223
- _t = _a.idCardAutoCaptureScoreThreshold,
11224
- idCardAutoCaptureScoreThreshold = _t === void 0 ? 0.8 : _t,
11225
- _u = _a.passportAutoCaptureScoreThreshold,
11226
- passportAutoCaptureScoreThreshold = _u === void 0 ? 0.75 : _u,
11227
- _v = _a.mrzDetectionScoreThreshold,
11228
- mrzDetectionScoreThreshold = _v === void 0 ? 0.25 : _v,
11229
- _w = _a.idCardFocusScoreThreshold,
11230
- idCardFocusScoreThreshold = _w === void 0 ? 0.3 : _w,
11231
- _x = _a.passportFocusScoreThreshold,
11232
- passportFocusScoreThreshold = _x === void 0 ? 0.3 : _x,
11233
- _y = _a.skipSuccessScreen,
11234
- skipSuccessScreen = _y === void 0 ? false : _y,
11209
+ _r = _a.captureRequirement,
11210
+ captureRequirement = _r === void 0 ? 'idCardOrPassport' : _r,
11211
+ _s = _a.autoCaptureEnabled,
11212
+ autoCaptureEnabled = _s === void 0 ? true : _s,
11213
+ _t = _a.autoCaptureGoodFramesRequired,
11214
+ autoCaptureGoodFramesRequired = _t === void 0 ? 3 : _t,
11215
+ _u = _a.autoCaptureBarcodeRequired,
11216
+ autoCaptureBarcodeRequired = _u === void 0 ? 'mobile' : _u,
11217
+ _v = _a.barcodeScanningEnabled,
11218
+ barcodeScanningEnabled = _v === void 0 ? false : _v,
11219
+ _w = _a.idCardAutoCaptureScoreThreshold,
11220
+ idCardAutoCaptureScoreThreshold = _w === void 0 ? 0.8 : _w,
11221
+ _x = _a.passportAutoCaptureScoreThreshold,
11222
+ passportAutoCaptureScoreThreshold = _x === void 0 ? 0.75 : _x,
11223
+ _y = _a.mrzDetectionScoreThreshold,
11224
+ mrzDetectionScoreThreshold = _y === void 0 ? 0.25 : _y,
11225
+ _z = _a.idCardFocusScoreThreshold,
11226
+ idCardFocusScoreThreshold = _z === void 0 ? 0.3 : _z,
11227
+ _0 = _a.passportFocusScoreThreshold,
11228
+ passportFocusScoreThreshold = _0 === void 0 ? 0.3 : _0,
11229
+ _1 = _a.skipSuccessScreen,
11230
+ skipSuccessScreen = _1 === void 0 ? false : _1,
11235
11231
  instructions = _a.instructions,
11236
- _z = _a.releaseCameraAccessOnExit,
11237
- releaseCameraAccessOnExit = _z === void 0 ? true : _z,
11238
- _0 = _a.guideType,
11239
- guideType = _0 === void 0 ? 'fit' : _0,
11240
- _1 = _a.assets,
11241
- assets = _1 === void 0 ? {} : _1,
11242
- _2 = _a.classNames,
11243
- classNames = _2 === void 0 ? {} : _2,
11244
- _3 = _a.colors,
11245
- colors = _3 === void 0 ? {} : _3,
11246
- _4 = _a.verbiage,
11247
- verbiage = _4 === void 0 ? {} : _4,
11248
- _5 = _a.debugMode,
11249
- debugMode = _5 === void 0 ? false : _5;
11250
- var _6 = React.useReducer(reducer$4, initialState$4),
11251
- state = _6[0],
11252
- dispatch = _6[1];
11232
+ _2 = _a.releaseCameraAccessOnExit,
11233
+ releaseCameraAccessOnExit = _2 === void 0 ? true : _2,
11234
+ _3 = _a.guideType,
11235
+ guideType = _3 === void 0 ? 'fit' : _3,
11236
+ _4 = _a.assets,
11237
+ assets = _4 === void 0 ? {} : _4,
11238
+ _5 = _a.classNames,
11239
+ classNames = _5 === void 0 ? {} : _5,
11240
+ _6 = _a.colors,
11241
+ colors = _6 === void 0 ? {} : _6,
11242
+ _7 = _a.verbiage,
11243
+ verbiage = _7 === void 0 ? {} : _7,
11244
+ _8 = _a.debugMode,
11245
+ debugMode = _8 === void 0 ? false : _8;
11246
+ var _9 = React.useReducer(reducer$4, initialState$4),
11247
+ state = _9[0],
11248
+ dispatch = _9[1];
11253
11249
  var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
11254
- var _7 = React.useState(false),
11255
- overlayDismissed = _7[0],
11256
- setOverlayDismissed = _7[1];
11257
- var _8 = React.useContext(SubmissionContext),
11258
- submissionStatus = _8.submissionStatus,
11259
- setIdFrontImage = _8.setIdFrontImage,
11260
- setIdBackImage = _8.setIdBackImage,
11261
- setPassportImage = _8.setPassportImage,
11262
- logIdFrontCaptureAttempt = _8.logIdFrontCaptureAttempt,
11263
- logIdBackCaptureAttempt = _8.logIdBackCaptureAttempt;
11250
+ var _10 = React.useState(false),
11251
+ overlayDismissed = _10[0],
11252
+ setOverlayDismissed = _10[1];
11253
+ var _11 = React.useContext(SubmissionContext),
11254
+ submissionStatus = _11.submissionStatus,
11255
+ setIdFrontImage = _11.setIdFrontImage,
11256
+ setIdBackImage = _11.setIdBackImage,
11257
+ setPassportImage = _11.setPassportImage,
11258
+ logIdFrontCaptureAttempt = _11.logIdFrontCaptureAttempt,
11259
+ logIdBackCaptureAttempt = _11.logIdBackCaptureAttempt;
11264
11260
  var modelsError = React.useContext(IdCaptureModelsContext).error;
11265
11261
  var operationStartedAt = React.useRef();
11266
11262
  React.useEffect(function () {
@@ -11333,9 +11329,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11333
11329
  type: 'reset'
11334
11330
  });
11335
11331
  }, []);
11336
- var _9 = React.useState(0),
11337
- attempt = _9[0],
11338
- setAttempt = _9[1];
11332
+ var _12 = React.useState(0),
11333
+ attempt = _12[0],
11334
+ setAttempt = _12[1];
11339
11335
  var onExit = React.useCallback(function () {
11340
11336
  setOverlayDismissed(false);
11341
11337
  setAttempt(function (n) {
@@ -11352,19 +11348,19 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11352
11348
  }
11353
11349
  }, [releaseCameraAccess, releaseCameraAccessOnExit, submissionStatus]);
11354
11350
  assets.idCardFront || (assets.idCardFront = {});
11355
- (_c = assets.idCardFront).portraitGuidesImageUrl || (_c.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg"));
11356
- (_d = assets.idCardFront).landscapeGuidesImageUrl || (_d.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
11351
+ (_f = assets.idCardFront).portraitGuidesImageUrl || (_f.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg"));
11352
+ (_g = assets.idCardFront).landscapeGuidesImageUrl || (_g.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
11357
11353
  assets.idCardBack || (assets.idCardBack = {});
11358
- (_e = assets.idCardBack).portraitGuidesImageUrl || (_e.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg"));
11359
- (_f = assets.idCardBack).landscapeGuidesImageUrl || (_f.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
11354
+ (_h = assets.idCardBack).portraitGuidesImageUrl || (_h.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg"));
11355
+ (_j = assets.idCardBack).landscapeGuidesImageUrl || (_j.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
11360
11356
  assets.passport || (assets.passport = {});
11361
- (_g = assets.passport).portraitGuidesImageUrl || (_g.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
11362
- (_h = assets.passport).landscapeGuidesImageUrl || (_h.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
11357
+ (_k = assets.passport).portraitGuidesImageUrl || (_k.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
11358
+ (_l = assets.passport).landscapeGuidesImageUrl || (_l.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
11363
11359
  assets.flipIdPrompt || (assets.flipIdPrompt = {});
11364
- (_j = assets.flipIdPrompt).frontPortraitGuidesImageUrl || (_j.frontPortraitGuidesImageUrl = assets.idCardFront.portraitGuidesImageUrl);
11365
- (_k = assets.flipIdPrompt).frontLandscapeGuidesImageUrl || (_k.frontLandscapeGuidesImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
11366
- (_l = assets.flipIdPrompt).backPortraitGuidesImageUrl || (_l.backPortraitGuidesImageUrl = assets.idCardBack.portraitGuidesImageUrl);
11367
- (_m = assets.flipIdPrompt).backLandscapeGuidesImageUrl || (_m.backLandscapeGuidesImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
11360
+ (_m = assets.flipIdPrompt).frontPortraitGuidesImageUrl || (_m.frontPortraitGuidesImageUrl = assets.idCardFront.portraitGuidesImageUrl);
11361
+ (_o = assets.flipIdPrompt).frontLandscapeGuidesImageUrl || (_o.frontLandscapeGuidesImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
11362
+ (_p = assets.flipIdPrompt).backPortraitGuidesImageUrl || (_p.backPortraitGuidesImageUrl = assets.idCardBack.portraitGuidesImageUrl);
11363
+ (_q = assets.flipIdPrompt).backLandscapeGuidesImageUrl || (_q.backLandscapeGuidesImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
11368
11364
  var idCaptureVerbiages = {
11369
11365
  idCardFront: useTranslations(verbiage.idCardFront, {
11370
11366
  instructionText: 'Scan the front of ID',
@@ -11377,11 +11373,11 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11377
11373
  instructionText: 'Scan the ID page of passport'
11378
11374
  })
11379
11375
  };
11380
- var _10 = useIdCaptureState()[0],
11381
- guideRectX = _10.guideRectX,
11382
- guideRectY = _10.guideRectY,
11383
- guideRectWidth = _10.guideRectWidth,
11384
- guideRectHeight = _10.guideRectHeight;
11376
+ var _13 = useIdCaptureState()[0],
11377
+ guideRectX = _13.guideRectX,
11378
+ guideRectY = _13.guideRectY,
11379
+ guideRectWidth = _13.guideRectWidth,
11380
+ guideRectHeight = _13.guideRectHeight;
11385
11381
  var idCaptureAssets = assets[state.requestedDocumentType];
11386
11382
  var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
11387
11383
  React.useEffect(function () {
@@ -11436,7 +11432,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11436
11432
  focusScoreThreshold: idCardFocusScoreThreshold,
11437
11433
  onPrediction: onPrediction,
11438
11434
  onCapture: onCapture,
11439
- onExit: onExit,
11440
11435
  assets: idCaptureAssets,
11441
11436
  classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
11442
11437
  colors: colors,
@@ -11457,7 +11452,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11457
11452
  onPrediction: onPrediction,
11458
11453
  onBarcodeScanned: onBarcodeScanned,
11459
11454
  onCapture: onCapture,
11460
- onExit: onExit,
11461
11455
  assets: idCaptureAssets,
11462
11456
  classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
11463
11457
  colors: colors,
@@ -11478,7 +11472,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11478
11472
  onPrediction: onPrediction,
11479
11473
  onBarcodeScanned: onBarcodeScanned,
11480
11474
  onCapture: onCapture,
11481
- onExit: onExit,
11482
11475
  assets: idCaptureAssets,
11483
11476
  classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
11484
11477
  colors: colors,
@@ -11491,12 +11484,15 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
11491
11484
  }(), /*#__PURE__*/React__default['default'].createElement(IdCaptureGuides, {
11492
11485
  guideType: guideType,
11493
11486
  requestingFlip: state.captureState === 'requestingFlip',
11494
- frontImageUrl: assets === null || assets === void 0 ? void 0 : assets.idCardFront.landscapeGuidesImageUrl,
11495
- backImageUrl: assets === null || assets === void 0 ? void 0 : assets.idCardBack.landscapeGuidesImageUrl,
11487
+ frontImageUrl: (_c = assets === null || assets === void 0 ? void 0 : assets.flipIdPrompt) === null || _c === void 0 ? void 0 : _c.frontLandscapeGuidesImageUrl,
11488
+ backImageUrl: (_d = assets === null || assets === void 0 ? void 0 : assets.flipIdPrompt) === null || _d === void 0 ? void 0 : _d.backLandscapeGuidesImageUrl,
11496
11489
  classNames: classNames,
11497
11490
  assets: idCaptureAssets,
11498
11491
  colors: colors,
11499
11492
  verbiage: idCaptureVerbiage
11493
+ }), /*#__PURE__*/React__default['default'].createElement(ExitCaptureButton, {
11494
+ onClick: onExit,
11495
+ className: (_e = classNames.capture) === null || _e === void 0 ? void 0 : _e.exitCaptureBtn
11500
11496
  }), !overlayDismissed && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureLoadingOverlay, {
11501
11497
  key: attempt,
11502
11498
  instructions: instructions,
@@ -14688,7 +14684,7 @@ var defaultTheme = {
14688
14684
  },
14689
14685
  idCapture: {
14690
14686
  guideOverlay: {
14691
- backgroundColor: 'rgba(0,0,0,0.5)',
14687
+ backgroundColor: '#708090',
14692
14688
  textColor: 'white'
14693
14689
  },
14694
14690
  guideBox: {