idmission-web-sdk 1.0.96 → 1.0.97

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.
@@ -46,7 +46,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
46
46
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
47
47
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
48
48
 
49
- var webSdkVersion = '1.0.96';
49
+ var webSdkVersion = '1.0.97';
50
50
 
51
51
  function getPlatform() {
52
52
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9783,28 +9783,28 @@ var reducer$5 = function reducer(state, action) {
9783
9783
  }
9784
9784
  };
9785
9785
  var IdCapture = function IdCapture(_a) {
9786
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
9786
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9787
9787
  var requiredDocumentType = _a.requiredDocumentType,
9788
- _m = _a.autoCaptureEnabled,
9789
- autoCaptureEnabled = _m === void 0 ? true : _m,
9790
- _o = _a.autoCaptureScoreThreshold,
9791
- autoCaptureScoreThreshold = _o === void 0 ? 0.8 : _o,
9792
- _p = _a.autoCaptureGoodFramesRequired,
9793
- autoCaptureGoodFramesRequired = _p === void 0 ? 3 : _p,
9794
- _q = _a.autoCaptureBarcodeRequired,
9795
- autoCaptureBarcodeRequired = _q === void 0 ? 'mobile' : _q,
9796
- _r = _a.mrzDetectionScoreThreshold,
9797
- mrzDetectionScoreThreshold = _r === void 0 ? 0.25 : _r,
9798
- _s = _a.passportPageDetectionThreshold,
9799
- passportPageDetectionThreshold = _s === void 0 ? 0.6 : _s,
9800
- _t = _a.pdf417DetectionThreshold,
9801
- pdf417DetectionThreshold = _t === void 0 ? 0.15 : _t,
9802
- _u = _a.focusScoreThreshold,
9803
- focusScoreThreshold = _u === void 0 ? 0.3 : _u,
9804
- _v = _a.barcodeScanningEnabled,
9805
- barcodeScanningEnabled = _v === void 0 ? true : _v,
9806
- _w = _a.maxBarcodeScanAttempts,
9807
- maxBarcodeScanAttempts = _w === void 0 ? 10 : _w,
9788
+ _p = _a.autoCaptureEnabled,
9789
+ autoCaptureEnabled = _p === void 0 ? true : _p,
9790
+ _q = _a.autoCaptureScoreThreshold,
9791
+ autoCaptureScoreThreshold = _q === void 0 ? 0.8 : _q,
9792
+ _r = _a.autoCaptureGoodFramesRequired,
9793
+ autoCaptureGoodFramesRequired = _r === void 0 ? 3 : _r,
9794
+ _s = _a.autoCaptureBarcodeRequired,
9795
+ autoCaptureBarcodeRequired = _s === void 0 ? 'mobile' : _s,
9796
+ _t = _a.mrzDetectionScoreThreshold,
9797
+ mrzDetectionScoreThreshold = _t === void 0 ? 0.25 : _t,
9798
+ _u = _a.passportPageDetectionThreshold,
9799
+ passportPageDetectionThreshold = _u === void 0 ? 0.6 : _u,
9800
+ _v = _a.pdf417DetectionThreshold,
9801
+ pdf417DetectionThreshold = _v === void 0 ? 0.15 : _v,
9802
+ _w = _a.focusScoreThreshold,
9803
+ focusScoreThreshold = _w === void 0 ? 0.3 : _w,
9804
+ _x = _a.barcodeScanningEnabled,
9805
+ barcodeScanningEnabled = _x === void 0 ? true : _x,
9806
+ _y = _a.maxBarcodeScanAttempts,
9807
+ maxBarcodeScanAttempts = _y === void 0 ? 10 : _y,
9808
9808
  guidanceMessage = _a.guidanceMessage,
9809
9809
  guidanceSatisfied = _a.guidanceSatisfied,
9810
9810
  onPrediction = _a.onPrediction,
@@ -9812,50 +9812,50 @@ var IdCapture = function IdCapture(_a) {
9812
9812
  onCapture = _a.onCapture,
9813
9813
  onExit = _a.onExit,
9814
9814
  processingScreen = _a.processingScreen,
9815
- _x = _a.processingDelay,
9816
- processingDelay = _x === void 0 ? 0 : _x,
9817
- _y = _a.assets,
9818
- assets = _y === void 0 ? {} : _y,
9819
- _z = _a.classNames,
9820
- classNames = _z === void 0 ? {} : _z,
9821
- _0 = _a.colors,
9822
- colors = _0 === void 0 ? {} : _0,
9823
- _1 = _a.verbiage,
9824
- rawVerbiage = _1 === void 0 ? {} : _1,
9825
- _2 = _a.debugMode,
9826
- debugMode = _2 === void 0 ? false : _2;
9827
- var _3 = useResizeObserver__default['default'](),
9828
- ref = _3.ref,
9829
- _4 = _3.width,
9830
- width = _4 === void 0 ? 1 : _4,
9831
- _5 = _3.height,
9832
- height = _5 === void 0 ? 1 : _5;
9833
- var _6 = React.useReducer(reducer$5, initialState$5),
9834
- state = _6[0],
9835
- dispatch = _6[1];
9836
- var _7 = React.useState(''),
9837
- imageURL = _7[0],
9838
- setImageURL = _7[1];
9839
- var _8 = React.useState(false),
9840
- processingFrame = _8[0],
9841
- setProcessingFrame = _8[1];
9842
- var _9 = React.useContext(CameraStateContext),
9843
- cameraRef = _9.cameraRef,
9844
- cameraReady = _9.cameraReady,
9845
- takePhoto = _9.takePhoto,
9846
- videoRef = _9.videoRef,
9847
- videoLoaded = _9.videoLoaded;
9815
+ _z = _a.processingDelay,
9816
+ processingDelay = _z === void 0 ? 0 : _z,
9817
+ _0 = _a.assets,
9818
+ assets = _0 === void 0 ? {} : _0,
9819
+ _1 = _a.classNames,
9820
+ classNames = _1 === void 0 ? {} : _1,
9821
+ _2 = _a.colors,
9822
+ colors = _2 === void 0 ? {} : _2,
9823
+ _3 = _a.verbiage,
9824
+ rawVerbiage = _3 === void 0 ? {} : _3,
9825
+ _4 = _a.debugMode,
9826
+ debugMode = _4 === void 0 ? false : _4;
9827
+ var _5 = useResizeObserver__default['default'](),
9828
+ ref = _5.ref,
9829
+ _6 = _5.width,
9830
+ width = _6 === void 0 ? 1 : _6,
9831
+ _7 = _5.height,
9832
+ height = _7 === void 0 ? 1 : _7;
9833
+ var _8 = React.useReducer(reducer$5, initialState$5),
9834
+ state = _8[0],
9835
+ dispatch = _8[1];
9836
+ var _9 = React.useState(''),
9837
+ imageURL = _9[0],
9838
+ setImageURL = _9[1];
9839
+ var _10 = React.useState(false),
9840
+ processingFrame = _10[0],
9841
+ setProcessingFrame = _10[1];
9842
+ var _11 = React.useContext(CameraStateContext),
9843
+ cameraRef = _11.cameraRef,
9844
+ cameraReady = _11.cameraReady,
9845
+ takePhoto = _11.takePhoto,
9846
+ videoRef = _11.videoRef,
9847
+ videoLoaded = _11.videoLoaded;
9848
9848
  var captureStartedAt = React.useRef();
9849
- var _10 = React.useContext(IdCaptureModelsContext),
9850
- modelsReady = _10.ready,
9851
- modelsWorking = _10.working,
9852
- setThresholds = _10.setThresholds,
9853
- makePrediction = _10.makePrediction,
9854
- onPredictionMade = _10.onPredictionMade,
9855
- detectionTime = _10.detectionTime,
9856
- focusPredictionTime = _10.focusPredictionTime,
9857
- getBestFrame = _10.getBestFrame,
9858
- resetBestFrame = _10.resetBestFrame;
9849
+ var _12 = React.useContext(IdCaptureModelsContext),
9850
+ modelsReady = _12.ready,
9851
+ modelsWorking = _12.working,
9852
+ setThresholds = _12.setThresholds,
9853
+ makePrediction = _12.makePrediction,
9854
+ onPredictionMade = _12.onPredictionMade,
9855
+ detectionTime = _12.detectionTime,
9856
+ focusPredictionTime = _12.focusPredictionTime,
9857
+ getBestFrame = _12.getBestFrame,
9858
+ resetBestFrame = _12.resetBestFrame;
9859
9859
  React.useEffect(function () {
9860
9860
  captureStartedAt.current = new Date();
9861
9861
  }, []);
@@ -9884,9 +9884,9 @@ var IdCapture = function IdCapture(_a) {
9884
9884
  React.useEffect(function () {
9885
9885
  shouldCaptureFrames.current = videoLoaded && cameraReady && modelsReady && !state.capturing && !state.captured;
9886
9886
  }, [cameraReady, state.captured, state.capturing, modelsReady, videoLoaded]);
9887
- var _11 = React.useState(null),
9888
- lastFrame = _11[0],
9889
- setLastFrame = _11[1];
9887
+ var _13 = React.useState(null),
9888
+ lastFrame = _13[0],
9889
+ setLastFrame = _13[1];
9890
9890
  React.useEffect(function () {
9891
9891
  if (!modelsReady || !cameraReady || !videoLoaded) return;
9892
9892
  animationFrame.current = requestAnimationFrame(function runFrame() {
@@ -10060,7 +10060,7 @@ var IdCapture = function IdCapture(_a) {
10060
10060
  if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
10061
10061
  guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceSatisfiedText : !state.documentDetectionThresholdMet ? verbiage.guidanceNotDetectedText : !state.documentInBounds ? verbiage.guidanceNotCenteredText : !state.focusThresholdMet ? verbiage.guidanceTooBlurryText : '');
10062
10062
  if (processingFrame) {
10063
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, processingScreen, imageURL && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureImagePreview, {
10063
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, processingScreen, !((_k = (_j = theme.idCapture) === null || _j === void 0 ? void 0 : _j.capturePreview) === null || _k === void 0 ? void 0 : _k.disabled) && imageURL && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureImagePreview, {
10064
10064
  classNames: classNames.imagePreview,
10065
10065
  text: verbiage.processingIdCardText,
10066
10066
  imageUrl: imageURL
@@ -10078,7 +10078,7 @@ var IdCapture = function IdCapture(_a) {
10078
10078
  }
10079
10079
  return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
10080
10080
  ref: ref,
10081
- className: "flex ".concat((_j = classNames.container) !== null && _j !== void 0 ? _j : '')
10081
+ className: "flex ".concat((_l = classNames.container) !== null && _l !== void 0 ? _l : '')
10082
10082
  }, /*#__PURE__*/React__default['default'].createElement(DocumentCaptureGuideOverlay, {
10083
10083
  classNames: classNames.guides,
10084
10084
  width: width,
@@ -10086,7 +10086,7 @@ var IdCapture = function IdCapture(_a) {
10086
10086
  instruction: state.captureFailed ? verbiage.captureFailedText : state.capturing ? verbiage === null || verbiage === void 0 ? void 0 : verbiage.capturingText : verbiage.instructionText,
10087
10087
  portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
10088
10088
  landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
10089
- isMirrored: !((_k = cameraRef.current) === null || _k === void 0 ? void 0 : _k.isRearFacing),
10089
+ isMirrored: !((_m = cameraRef.current) === null || _m === void 0 ? void 0 : _m.isRearFacing),
10090
10090
  borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
10091
10091
  }), guidanceMessage !== '' && ( /*#__PURE__*/React__default['default'].createElement(GuidanceMessageContainer, {
10092
10092
  "$top": "82.5vh",
@@ -10095,7 +10095,7 @@ var IdCapture = function IdCapture(_a) {
10095
10095
  "$variant": satisfied ? 'positive' : 'default',
10096
10096
  className: classNames.guidanceMessage
10097
10097
  }, guidanceMessage))), debugMode && state.detectedObjects.length > 0 && ( /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlay, {
10098
- "$flipX": !((_l = cameraRef.current) === null || _l === void 0 ? void 0 : _l.isRearFacing)
10098
+ "$flipX": !((_o = cameraRef.current) === null || _o === void 0 ? void 0 : _o.isRearFacing)
10099
10099
  }, state.detectedObjects.map(function (obj, i) {
10100
10100
  var _a;
10101
10101
  return /*#__PURE__*/React__default['default'].createElement(IdCaptureDetectedObjectDebugBox, {
@@ -11806,32 +11806,33 @@ var reducer$2 = function reducer(state, action) {
11806
11806
  }
11807
11807
  };
11808
11808
  var FaceLivenessCapture = function FaceLivenessCapture(_a) {
11809
- var _b;
11809
+ var _b, _c, _d;
11810
11810
  var onCapture = _a.onCapture,
11811
11811
  onSuccess = _a.onSuccess,
11812
11812
  onTimeout = _a.onTimeout,
11813
11813
  onExit = _a.onExit,
11814
- _c = _a.timeoutDurationMs,
11815
- timeoutDurationMs = _c === void 0 ? 15000 : _c,
11816
- _d = _a.classNames,
11817
- classNames = _d === void 0 ? {} : _d,
11818
- _e = _a.colors,
11819
- colors = _e === void 0 ? {} : _e,
11820
- _f = _a.verbiage,
11821
- rawVerbiage = _f === void 0 ? {} : _f,
11814
+ _e = _a.timeoutDurationMs,
11815
+ timeoutDurationMs = _e === void 0 ? 15000 : _e,
11816
+ _f = _a.classNames,
11817
+ classNames = _f === void 0 ? {} : _f,
11818
+ _g = _a.colors,
11819
+ colors = _g === void 0 ? {} : _g,
11820
+ _h = _a.verbiage,
11821
+ rawVerbiage = _h === void 0 ? {} : _h,
11822
11822
  debugMode = _a.debugMode;
11823
- var _g = React.useContext(SubmissionContext),
11824
- checkLiveness = _g.checkLiveness,
11825
- submissionError = _g.submissionError;
11823
+ var _j = React.useContext(SubmissionContext),
11824
+ checkLiveness = _j.checkLiveness,
11825
+ submissionError = _j.submissionError;
11826
11826
  var modelsError = React.useContext(HighPerformanceSelfieGuidanceModelsContext).error;
11827
- var _h = React.useReducer(reducer$2, initialState$2),
11828
- state = _h[0],
11829
- dispatch = _h[1];
11830
- var _j = React.useState(null),
11831
- imageUrl = _j[0],
11832
- setImageUrl = _j[1];
11827
+ var _k = React.useReducer(reducer$2, initialState$2),
11828
+ state = _k[0],
11829
+ dispatch = _k[1];
11830
+ var _l = React.useState(null),
11831
+ imageUrl = _l[0],
11832
+ setImageUrl = _l[1];
11833
11833
  var rawCanvas = React.useRef(null);
11834
11834
  var cropCanvas = React.useRef(null);
11835
+ var theme = styled.useTheme();
11835
11836
  var onSelfieCaptured = React.useCallback(function (frame, face) {
11836
11837
  onCapture === null || onCapture === void 0 ? void 0 : onCapture();
11837
11838
  dispatch({
@@ -11969,10 +11970,10 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
11969
11970
  colors: colors,
11970
11971
  verbiage: verbiage,
11971
11972
  debugMode: debugMode
11972
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
11973
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
11973
11974
  classNames: classNames.imagePreview,
11974
11975
  imageUrl: imageUrl,
11975
- text: (_b = verbiage.progressPreviewText) !== null && _b !== void 0 ? _b : ''
11976
+ text: (_d = verbiage.progressPreviewText) !== null && _d !== void 0 ? _d : ''
11976
11977
  })));
11977
11978
  };
11978
11979
 
@@ -14943,34 +14944,35 @@ var reducer$1 = function reducer(state, action) {
14943
14944
  }
14944
14945
  };
14945
14946
  var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
14947
+ var _b, _c;
14946
14948
  var onCustomerMatched = _a.onCustomerMatched,
14947
14949
  onCustomerNotMatched = _a.onCustomerNotMatched,
14948
14950
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
14949
14951
  onExit = _a.onExit,
14950
14952
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
14951
- _b = _a.classNames,
14952
- classNames = _b === void 0 ? {} : _b,
14953
- _c = _a.colors,
14954
- colors = _c === void 0 ? {} : _c,
14955
- _d = _a.verbiage,
14956
- verbiage = _d === void 0 ? {} : _d,
14957
- _e = _a.debugMode,
14958
- debugMode = _e === void 0 ? false : _e;
14959
- var _f = React.useReducer(reducer$1, initialState$1),
14960
- state = _f[0],
14961
- dispatch = _f[1];
14953
+ _d = _a.classNames,
14954
+ classNames = _d === void 0 ? {} : _d,
14955
+ _e = _a.colors,
14956
+ colors = _e === void 0 ? {} : _e,
14957
+ _f = _a.verbiage,
14958
+ verbiage = _f === void 0 ? {} : _f,
14959
+ _g = _a.debugMode,
14960
+ debugMode = _g === void 0 ? false : _g;
14961
+ var _h = React.useReducer(reducer$1, initialState$1),
14962
+ state = _h[0],
14963
+ dispatch = _h[1];
14962
14964
  var frame = state.frame,
14963
14965
  face = state.face;
14964
- var _g = React.useContext(SubmissionContext),
14965
- submit = _g.submit,
14966
- submissionRequest = _g.submissionRequest,
14967
- submissionResponse = _g.submissionResponse,
14968
- submissionError = _g.submissionError,
14969
- selfieImage = _g.selfieImage,
14970
- setSelfieImage = _g.setSelfieImage;
14971
- var _h = React.useState(null),
14972
- imageUrl = _h[0],
14973
- setImageUrl = _h[1];
14966
+ var _j = React.useContext(SubmissionContext),
14967
+ submit = _j.submit,
14968
+ submissionRequest = _j.submissionRequest,
14969
+ submissionResponse = _j.submissionResponse,
14970
+ submissionError = _j.submissionError,
14971
+ selfieImage = _j.selfieImage,
14972
+ setSelfieImage = _j.setSelfieImage;
14973
+ var _k = React.useState(null),
14974
+ imageUrl = _k[0],
14975
+ setImageUrl = _k[1];
14974
14976
  var rawCanvas = React.useRef(null);
14975
14977
  var cropCanvas = React.useRef(null);
14976
14978
  var onSelfieCaptured = React.useCallback(function (frame, face) {
@@ -15043,6 +15045,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
15043
15045
  }, [onCustomerMatched, onCustomerNotMatched, state.requestState, submissionRequest, submissionResponse]);
15044
15046
  useTimeout(captureGuidanceTimeoutDurationMs, onCaptureGuidanceTimeout, ['VERIFIED', 'REJECTED'].includes(state.requestState), state.requestState === 'VERIFYING');
15045
15047
  var progressPreviewText = useVerbiage(verbiage.progressPreviewText, 'Processing...');
15048
+ var theme = styled.useTheme();
15046
15049
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
15047
15050
  ref: rawCanvas
15048
15051
  }), /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
@@ -15055,7 +15058,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
15055
15058
  colors: colors,
15056
15059
  verbiage: verbiage,
15057
15060
  debugMode: debugMode
15058
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15061
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15059
15062
  imageUrl: imageUrl,
15060
15063
  text: progressPreviewText,
15061
15064
  classNames: classNames.imagePreview
@@ -15435,32 +15438,33 @@ var reducer = function reducer(state, action) {
15435
15438
  }
15436
15439
  };
15437
15440
  var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15441
+ var _b, _c;
15438
15442
  var onCustomerMatched = _a.onCustomerMatched,
15439
15443
  onCustomerNotMatched = _a.onCustomerNotMatched,
15440
15444
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
15441
15445
  onExit = _a.onExit,
15442
15446
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
15443
- _b = _a.classNames,
15444
- classNames = _b === void 0 ? {} : _b,
15445
- _c = _a.colors,
15446
- colors = _c === void 0 ? {} : _c,
15447
- _d = _a.verbiage,
15448
- verbiage = _d === void 0 ? {} : _d,
15449
- _e = _a.debugMode,
15450
- debugMode = _e === void 0 ? false : _e;
15451
- var _f = React.useReducer(reducer, initialState),
15452
- state = _f[0],
15453
- dispatch = _f[1];
15454
- var _g = React.useContext(SubmissionContext),
15455
- submit = _g.submit,
15456
- submissionRequest = _g.submissionRequest,
15457
- submissionResponse = _g.submissionResponse,
15458
- submissionError = _g.submissionError,
15459
- selfieImage = _g.selfieImage,
15460
- setSelfieImage = _g.setSelfieImage;
15461
- var _h = React.useState(null),
15462
- imageUrl = _h[0],
15463
- setImageUrl = _h[1];
15447
+ _d = _a.classNames,
15448
+ classNames = _d === void 0 ? {} : _d,
15449
+ _e = _a.colors,
15450
+ colors = _e === void 0 ? {} : _e,
15451
+ _f = _a.verbiage,
15452
+ verbiage = _f === void 0 ? {} : _f,
15453
+ _g = _a.debugMode,
15454
+ debugMode = _g === void 0 ? false : _g;
15455
+ var _h = React.useReducer(reducer, initialState),
15456
+ state = _h[0],
15457
+ dispatch = _h[1];
15458
+ var _j = React.useContext(SubmissionContext),
15459
+ submit = _j.submit,
15460
+ submissionRequest = _j.submissionRequest,
15461
+ submissionResponse = _j.submissionResponse,
15462
+ submissionError = _j.submissionError,
15463
+ selfieImage = _j.selfieImage,
15464
+ setSelfieImage = _j.setSelfieImage;
15465
+ var _k = React.useState(null),
15466
+ imageUrl = _k[0],
15467
+ setImageUrl = _k[1];
15464
15468
  var rawCanvas = React.useRef(null);
15465
15469
  var cropCanvas = React.useRef(null);
15466
15470
  var onSelfieCaptured = React.useCallback(function (frame, face) {
@@ -15535,6 +15539,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15535
15539
  }, [onCustomerMatched, onCustomerNotMatched, state.requestState, submissionRequest, submissionResponse]);
15536
15540
  useTimeout(captureGuidanceTimeoutDurationMs, onCaptureGuidanceTimeout, ['FOUND', 'NOT_FOUND'].includes(state.requestState), state.requestState === 'IDENTIFYING');
15537
15541
  var progressPreviewText = useVerbiage(verbiage.progressPreviewText, 'Processing...');
15542
+ var theme = styled.useTheme();
15538
15543
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
15539
15544
  ref: rawCanvas
15540
15545
  }), /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
@@ -15547,7 +15552,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15547
15552
  colors: colors,
15548
15553
  verbiage: verbiage,
15549
15554
  debugMode: debugMode
15550
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15555
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15551
15556
  text: progressPreviewText,
15552
15557
  imageUrl: imageUrl,
15553
15558
  classNames: classNames.imagePreview