idmission-web-sdk 2.2.51 → 2.2.52

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.
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.2.51';
237
+ var webSdkVersion = '2.2.52';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -4916,6 +4916,7 @@ var esTranslation = {
4916
4916
  'Performing facial recognition, please hold still...': 'Realizando el reconocimiento facial, por favor no te muevas',
4917
4917
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
4918
4918
  'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
4919
+ 'Display the ID page of your passport...': 'Hay que mostrar el página de datos del pasaporte...',
4919
4920
  'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
4920
4921
  'Searching for ID card...': 'Localizando la identificación...',
4921
4922
  'Please read the following text aloud': 'Hay que leer el siguiente texto en voz alta',
@@ -11747,7 +11748,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
11747
11748
  idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
11748
11749
  idCardGuideBorderColor = _a.idCardGuideBorderColor,
11749
11750
  idCardCaptureProgress = _a.idCardCaptureProgress,
11750
- _3 = _a.idCardCaptureGuideImages,
11751
+ _3 = _a.idCaptureGuideImages,
11751
11752
  userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
11752
11753
  _4 = _a.classNames,
11753
11754
  classNames = _4 === void 0 ? {} : _4,
@@ -11759,10 +11760,11 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
11759
11760
  var verbiage = useTranslations(rawVerbiage, {
11760
11761
  idFrontInstructionText: 'Display the front of your ID card...',
11761
11762
  idBackInstructionText: 'Display the back of your ID card...',
11763
+ passportInstructionText: 'Display the ID page of your passport...',
11762
11764
  flipIdInstructionText: 'Please flip your ID card...',
11763
11765
  verifyLivenessInstructionText: 'Performing facial recognition, please hold still...'
11764
11766
  });
11765
- var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
11767
+ var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_PASSPORT' ? verbiage.passportInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
11766
11768
  var theme = styled.useTheme();
11767
11769
  if (faceGuideBorderWidth === undefined) faceGuideBorderWidth = (_d = (_c = (_b = theme.idVideoCapture) === null || _b === void 0 ? void 0 : _b.faceGuides) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 5;
11768
11770
  if (faceGuideBorderColor === undefined) faceGuideBorderColor = (_j = satisfied ? (_f = (_e = theme.idVideoCapture) === null || _e === void 0 ? void 0 : _e.faceGuides) === null || _f === void 0 ? void 0 : _f.satisfiedColor : (_h = (_g = theme.idVideoCapture) === null || _g === void 0 ? void 0 : _g.faceGuides) === null || _h === void 0 ? void 0 : _h.unsatisfiedColor) !== null && _j !== void 0 ? _j : '#D6DCE7';
@@ -11827,7 +11829,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
11827
11829
  className: classNames.idCardGuideImage,
11828
11830
  "$isMirrored": !isRearFacing,
11829
11831
  style: idCardImageStyle,
11830
- src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
11832
+ src: requestedAction === 'SHOW_PASSPORT' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
11831
11833
  onLoad: onImageLoaded
11832
11834
  })), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureFlipIdPrompt, {
11833
11835
  idCaptureGuideImages: idCaptureGuideImages,
@@ -11962,7 +11964,7 @@ var defaultVideoIdCaptureThresholds = {
11962
11964
  detection: {
11963
11965
  idCardFront: 0.4,
11964
11966
  idCardBack: 0.5,
11965
- passport: 1
11967
+ passport: 0.3
11966
11968
  },
11967
11969
  focus: {
11968
11970
  idCardFront: {
@@ -11980,7 +11982,8 @@ var defaultVideoIdCaptureThresholds = {
11980
11982
  },
11981
11983
  goodFrames: {
11982
11984
  idCardFront: 1,
11983
- idCardBack: 1
11985
+ idCardBack: 1,
11986
+ passport: 1
11984
11987
  },
11985
11988
  flipShortcutThreshold: 0.7
11986
11989
  };
@@ -11994,91 +11997,93 @@ var IdVideoCapture = function IdVideoCapture(_a) {
11994
11997
  onExitCapture = _a.onExitCapture,
11995
11998
  _w = _a.idCaptureModelsEnabled,
11996
11999
  idCaptureModelsEnabled = _w === void 0 ? true : _w,
11997
- _x = _a.idCardCaptureGuideImages,
11998
- idCardCaptureGuideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
11999
- _y = _a.idCardFrontDelay,
12000
- idCardFrontDelay = _y === void 0 ? 1000 : _y,
12001
- _z = _a.videoIdCaptureThresholds,
12002
- videoIdCaptureThresholds = _z === void 0 ? defaultVideoIdCaptureThresholds : _z,
12003
- _0 = _a.skipShowIdCardBack,
12004
- skipShowIdCardBack = _0 === void 0 ? false : _0,
12005
- _1 = _a.captureCountdownSeconds,
12006
- captureCountdownSeconds = _1 === void 0 ? 3 : _1,
12000
+ _x = _a.idDocumentType,
12001
+ idDocumentType = _x === void 0 ? 'idCard' : _x,
12002
+ _y = _a.idCaptureGuideImages,
12003
+ idCaptureGuideImages = _y === void 0 ? defaultIdCaptureGuideImages : _y,
12004
+ _z = _a.idCardFrontDelay,
12005
+ idCardFrontDelay = _z === void 0 ? 1000 : _z,
12006
+ _0 = _a.videoIdCaptureThresholds,
12007
+ videoIdCaptureThresholds = _0 === void 0 ? defaultVideoIdCaptureThresholds : _0,
12008
+ _1 = _a.skipShowIdCardBack,
12009
+ skipShowIdCardBack = _1 === void 0 ? false : _1,
12010
+ _2 = _a.captureCountdownSeconds,
12011
+ captureCountdownSeconds = _2 === void 0 ? 3 : _2,
12007
12012
  readTextPrompt = _a.readTextPrompt,
12008
- _2 = _a.readTextTimeoutDurationMs,
12009
- readTextTimeoutDurationMs = _2 === void 0 ? 15000 : _2,
12010
- _3 = _a.readTextMinReadingMs,
12011
- readTextMinReadingMs = _3 === void 0 ? 10000 : _3,
12012
- _4 = _a.disableFaceDetectionWhileAudioCapture,
12013
- disableFaceDetectionWhileAudioCapture = _4 === void 0 ? false : _4,
12014
- _5 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12015
- disableFaceDetectionWhileAudioCaptureMsDelay = _5 === void 0 ? 2000 : _5,
12016
- _6 = _a.mergeAVStreams,
12017
- mergeAVStreams = _6 === void 0 ? false : _6,
12018
- _7 = _a.classNames,
12019
- classNames = _7 === void 0 ? {} : _7,
12020
- _8 = _a.colors,
12021
- colors = _8 === void 0 ? {} : _8,
12022
- _9 = _a.verbiage,
12023
- rawVerbiage = _9 === void 0 ? {} : _9,
12024
- _10 = _a.debugMode,
12025
- debugMode = _10 === void 0 ? false : _10;
12026
- var _11 = useResizeObserver__default.default(),
12027
- ref = _11.ref,
12028
- _12 = _11.width,
12029
- width = _12 === void 0 ? 1 : _12,
12030
- _13 = _11.height,
12031
- height = _13 === void 0 ? 1 : _13;
12032
- var _14 = useCameraStore(),
12033
- camera = _14.camera,
12034
- videoRef = _14.videoRef,
12035
- videoLoaded = _14.videoLoaded,
12036
- cameraReady = _14.cameraReady,
12037
- microphoneReady = _14.microphoneReady,
12038
- audioStream = _14.audioStream,
12039
- isRearFacing = _14.isRearFacing,
12040
- releaseCameraAccess = _14.releaseCameraAccess;
12041
- var _15 = React.useState([]),
12042
- detectedObjects = _15[0],
12043
- setDetectedObjects = _15[1];
12044
- var _16 = React.useState(null),
12045
- face = _16[0],
12046
- setFace = _16[1];
12047
- var _17 = React.useContext(IdCaptureModelsContext),
12048
- idModelsReady = _17.ready,
12049
- startIdModels = _17.start,
12050
- stopIdModels = _17.stop,
12051
- onIdPredictionMade = _17.onPredictionMade,
12052
- setThresholds = _17.setThresholds,
12053
- setDocumentDetectionBoundaries = _17.setDocumentDetectionBoundaries,
12054
- bestFrameDetails = _17.bestFrameDetails,
12055
- resetBestFrame = _17.resetBestFrame,
12056
- idModelError = _17.modelError;
12057
- var _18 = React.useState(null),
12058
- videoStartsAt = _18[0],
12059
- setVideoStartsAt = _18[1];
12060
- var _19 = React.useContext(SubmissionContext),
12061
- setIdCaptureVideoAudioStartsAt = _19.setIdCaptureVideoAudioStartsAt,
12062
- setExpectedAudioText = _19.setExpectedAudioText;
12063
- var _20 = React.useContext(SelfieGuidanceModelsContext),
12064
- startSelfieGuidance = _20.start,
12065
- stopSelfieGuidance = _20.stop,
12066
- onSelfiePredictionMade = _20.onPredictionMade,
12067
- selfieModelError = _20.error;
12068
- var _21 = useVideoRecorder(camera, audioStream, mergeAVStreams),
12069
- isRecordingVideo = _21.isRecordingVideo,
12070
- startRecordingVideo = _21.startRecordingVideo,
12071
- startRecordingAudio = _21.startRecordingAudio,
12072
- stopRecordingVideo = _21.stopRecordingVideo,
12073
- stopRecordingAudio = _21.stopRecordingAudio,
12074
- videoRecordingUnintentionallyStopped = _21.videoRecordingUnintentionallyStopped,
12075
- audioRecordingUnintentionallyStopped = _21.audioRecordingUnintentionallyStopped,
12076
- videoUrl = _21.videoUrl,
12077
- audioUrl = _21.audioUrl;
12013
+ _3 = _a.readTextTimeoutDurationMs,
12014
+ readTextTimeoutDurationMs = _3 === void 0 ? 15000 : _3,
12015
+ _4 = _a.readTextMinReadingMs,
12016
+ readTextMinReadingMs = _4 === void 0 ? 10000 : _4,
12017
+ _5 = _a.disableFaceDetectionWhileAudioCapture,
12018
+ disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
12019
+ _6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12020
+ disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
12021
+ _7 = _a.mergeAVStreams,
12022
+ mergeAVStreams = _7 === void 0 ? false : _7,
12023
+ _8 = _a.classNames,
12024
+ classNames = _8 === void 0 ? {} : _8,
12025
+ _9 = _a.colors,
12026
+ colors = _9 === void 0 ? {} : _9,
12027
+ _10 = _a.verbiage,
12028
+ rawVerbiage = _10 === void 0 ? {} : _10,
12029
+ _11 = _a.debugMode,
12030
+ debugMode = _11 === void 0 ? false : _11;
12031
+ var _12 = useResizeObserver__default.default(),
12032
+ ref = _12.ref,
12033
+ _13 = _12.width,
12034
+ width = _13 === void 0 ? 1 : _13,
12035
+ _14 = _12.height,
12036
+ height = _14 === void 0 ? 1 : _14;
12037
+ var _15 = useCameraStore(),
12038
+ camera = _15.camera,
12039
+ videoRef = _15.videoRef,
12040
+ videoLoaded = _15.videoLoaded,
12041
+ cameraReady = _15.cameraReady,
12042
+ microphoneReady = _15.microphoneReady,
12043
+ audioStream = _15.audioStream,
12044
+ isRearFacing = _15.isRearFacing,
12045
+ releaseCameraAccess = _15.releaseCameraAccess;
12046
+ var _16 = React.useState([]),
12047
+ detectedObjects = _16[0],
12048
+ setDetectedObjects = _16[1];
12049
+ var _17 = React.useState(null),
12050
+ face = _17[0],
12051
+ setFace = _17[1];
12052
+ var _18 = React.useContext(IdCaptureModelsContext),
12053
+ idModelsReady = _18.ready,
12054
+ startIdModels = _18.start,
12055
+ stopIdModels = _18.stop,
12056
+ onIdPredictionMade = _18.onPredictionMade,
12057
+ setThresholds = _18.setThresholds,
12058
+ setDocumentDetectionBoundaries = _18.setDocumentDetectionBoundaries,
12059
+ bestFrameDetails = _18.bestFrameDetails,
12060
+ resetBestFrame = _18.resetBestFrame,
12061
+ idModelError = _18.modelError;
12062
+ var _19 = React.useState(null),
12063
+ videoStartsAt = _19[0],
12064
+ setVideoStartsAt = _19[1];
12065
+ var _20 = React.useContext(SubmissionContext),
12066
+ setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
12067
+ setExpectedAudioText = _20.setExpectedAudioText;
12068
+ var _21 = React.useContext(SelfieGuidanceModelsContext),
12069
+ startSelfieGuidance = _21.start,
12070
+ stopSelfieGuidance = _21.stop,
12071
+ onSelfiePredictionMade = _21.onPredictionMade,
12072
+ selfieModelError = _21.error;
12073
+ var _22 = useVideoRecorder(camera, audioStream, mergeAVStreams),
12074
+ isRecordingVideo = _22.isRecordingVideo,
12075
+ startRecordingVideo = _22.startRecordingVideo,
12076
+ startRecordingAudio = _22.startRecordingAudio,
12077
+ stopRecordingVideo = _22.stopRecordingVideo,
12078
+ stopRecordingAudio = _22.stopRecordingAudio,
12079
+ videoRecordingUnintentionallyStopped = _22.videoRecordingUnintentionallyStopped,
12080
+ audioRecordingUnintentionallyStopped = _22.audioRecordingUnintentionallyStopped,
12081
+ videoUrl = _22.videoUrl,
12082
+ audioUrl = _22.audioUrl;
12078
12083
  var countdownTimeoutRef = React.useRef(undefined);
12079
- var _22 = React.useState(-1),
12080
- countdownRemaining = _22[0],
12081
- setCountdownRemaining = _22[1];
12084
+ var _23 = React.useState(-1),
12085
+ countdownRemaining = _23[0],
12086
+ setCountdownRemaining = _23[1];
12082
12087
  React.useEffect(function () {
12083
12088
  if (!isRecordingVideo && !videoUrl) {
12084
12089
  startRecordingVideo();
@@ -12098,9 +12103,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12098
12103
  onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
12099
12104
  }
12100
12105
  }, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
12101
- var _23 = React.useState('SHOW_ID_FRONT'),
12102
- requestedAction = _23[0],
12103
- setRequestedAction = _23[1];
12106
+ var _24 = React.useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
12107
+ requestedAction = _24[0],
12108
+ setRequestedAction = _24[1];
12104
12109
  var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
12105
12110
  React.useEffect(function startModelsWhenCapturing() {
12106
12111
  if (!shouldRunIdModels) return;
@@ -12109,9 +12114,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12109
12114
  return stopIdModels();
12110
12115
  };
12111
12116
  }, [shouldRunIdModels, startIdModels, stopIdModels]);
12117
+ var adjustedThresholds = React.useMemo(function () {
12118
+ if (idDocumentType === 'idCard') {
12119
+ return _assign(_assign({}, videoIdCaptureThresholds), {
12120
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
12121
+ passport: 1
12122
+ })
12123
+ });
12124
+ } else {
12125
+ return _assign(_assign({}, videoIdCaptureThresholds), {
12126
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
12127
+ idCardFront: 1,
12128
+ idCardBack: 1
12129
+ })
12130
+ });
12131
+ }
12132
+ }, [idDocumentType, videoIdCaptureThresholds]);
12112
12133
  React.useEffect(function () {
12113
- setThresholds(videoIdCaptureThresholds);
12114
- }, [requestedAction, setThresholds, videoIdCaptureThresholds]);
12134
+ setThresholds(adjustedThresholds);
12135
+ }, [requestedAction, setThresholds, adjustedThresholds]);
12115
12136
  React.useEffect(function () {
12116
12137
  setDocumentDetectionBoundaries({
12117
12138
  top: 20,
@@ -12120,19 +12141,19 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12120
12141
  bottom: 0
12121
12142
  });
12122
12143
  }, [setDocumentDetectionBoundaries]);
12123
- var _24 = React.useState(0),
12124
- currentDetectionScore = _24[0],
12125
- setCurrentDetectionScore = _24[1];
12126
- var _25 = React.useState('none'),
12127
- currentDetectedDocumentType = _25[0],
12128
- setCurrentDetectedDocumentType = _25[1];
12129
- var _26 = React.useState(0),
12130
- currentFocusScore = _26[0],
12131
- setCurrentFocusScore = _26[1];
12144
+ var _25 = React.useState(0),
12145
+ currentDetectionScore = _25[0],
12146
+ setCurrentDetectionScore = _25[1];
12147
+ var _26 = React.useState('none'),
12148
+ currentDetectedDocumentType = _26[0],
12149
+ setCurrentDetectedDocumentType = _26[1];
12132
12150
  var _27 = React.useState(0),
12133
- goodFramesCount = _27[0],
12134
- setGoodFramesCount = _27[1];
12135
- var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? videoIdCaptureThresholds.goodFrames.idCardFront : videoIdCaptureThresholds.goodFrames.idCardBack;
12151
+ currentFocusScore = _27[0],
12152
+ setCurrentFocusScore = _27[1];
12153
+ var _28 = React.useState(0),
12154
+ goodFramesCount = _28[0],
12155
+ setGoodFramesCount = _28[1];
12156
+ var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
12136
12157
  var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
12137
12158
  React.useEffect(function () {
12138
12159
  if (!idCaptureModelsEnabled || idModelError) return;
@@ -12141,9 +12162,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12141
12162
  setCurrentDetectionScore(prediction.detectionScore);
12142
12163
  setCurrentDetectedDocumentType(prediction.detectedDocumentType);
12143
12164
  setCurrentFocusScore(prediction.focusScore);
12144
- var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
12165
+ var detectionThresholdMet = requestedAction === 'SHOW_PASSPORT' ? prediction.passportDetectionThresholdMet : requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
12145
12166
  var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
12146
- var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
12167
+ var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= adjustedThresholds.flipShortcutThreshold;
12147
12168
  if (shouldShortcutFlipAnimation) {
12148
12169
  return setRequestedAction('SHOW_ID_BACK');
12149
12170
  }
@@ -12151,16 +12172,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12151
12172
  return n + 1;
12152
12173
  } : 0);
12153
12174
  });
12154
- }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
12155
- var _28 = React.useState(null),
12156
- idFrontCaptureStartedAt = _28[0],
12157
- setFirstGoodFrameTime = _28[1];
12175
+ }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
12176
+ var _29 = React.useState(null),
12177
+ idFrontCaptureStartedAt = _29[0],
12178
+ setFirstGoodFrameTime = _29[1];
12158
12179
  React.useEffect(function () {
12159
12180
  if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
12160
12181
  }, [goodFramesCount]);
12161
- var delaySatisfied = requestedAction !== 'SHOW_ID_FRONT' || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
12182
+ var delaySatisfied = !['SHOW_ID_FRONT', 'SHOW_PASSPORT'].includes(requestedAction) || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
12162
12183
  var translatedText = useVerbiage(readTextPrompt, '');
12163
- var onIdBackCaptureComplete = React.useCallback(function () {
12184
+ var onIdCaptureComplete = React.useCallback(function () {
12164
12185
  var _a;
12165
12186
  if (translatedText) {
12166
12187
  setRequestedAction('READ_TEXT');
@@ -12175,16 +12196,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12175
12196
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
12176
12197
  var faceBox = face === null || face === void 0 ? void 0 : face.box;
12177
12198
  var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
12178
- var _29 = React.useState(),
12179
- countdownStartedAt = _29[0],
12180
- setCountdownStartedAt = _29[1];
12199
+ var _30 = React.useState(),
12200
+ countdownStartedAt = _30[0],
12201
+ setCountdownStartedAt = _30[1];
12181
12202
  var photoCanvas = React.useRef(null);
12182
12203
  var frameLock = React.useRef(false);
12183
12204
  var captureFrame = React.useCallback(function () {
12184
12205
  return __awaiter(void 0, void 0, void 0, function () {
12185
- var frameBase64;
12186
- return __generator(this, function (_a) {
12187
- switch (_a.label) {
12206
+ var frameBase64, _a;
12207
+ return __generator(this, function (_b) {
12208
+ switch (_b.label) {
12188
12209
  case 0:
12189
12210
  if (frameLock.current) return [2 /*return*/];
12190
12211
  frameLock.current = true;
@@ -12194,23 +12215,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12194
12215
  frameLock.current = false;
12195
12216
  return [2 /*return*/];
12196
12217
  }
12197
- _a.label = 1;
12218
+ _b.label = 1;
12198
12219
  case 1:
12199
- _a.trys.push([1,, 7, 8]);
12220
+ _b.trys.push([1,, 7, 8]);
12200
12221
  if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 5];
12201
12222
  if (onIdFrontImageCaptured) {
12202
12223
  onIdFrontImageCaptured(frameBase64);
12203
12224
  }
12204
12225
  if (!skipShowIdCardBack) return [3 /*break*/, 4];
12205
- if (!(skipShowIdCardBack === true)) return [3 /*break*/, 2];
12206
- return [2 /*return*/, onIdBackCaptureComplete()];
12207
- case 2:
12226
+ _a = skipShowIdCardBack === true;
12227
+ if (_a) return [3 /*break*/, 3];
12208
12228
  return [4 /*yield*/, skipShowIdCardBack()];
12229
+ case 2:
12230
+ _a = _b.sent();
12231
+ _b.label = 3;
12209
12232
  case 3:
12210
- if (_a.sent()) {
12211
- return [2 /*return*/, onIdBackCaptureComplete()];
12233
+ if (_a) {
12234
+ return [2 /*return*/, onIdCaptureComplete()];
12212
12235
  }
12213
- _a.label = 4;
12236
+ _b.label = 4;
12214
12237
  case 4:
12215
12238
  setRequestedAction('FLIP_ID');
12216
12239
  return [3 /*break*/, 6];
@@ -12219,9 +12242,14 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12219
12242
  if (onIdBackImageCaptured) {
12220
12243
  onIdBackImageCaptured(frameBase64);
12221
12244
  }
12222
- onIdBackCaptureComplete();
12245
+ onIdCaptureComplete();
12246
+ } else if (requestedAction == 'SHOW_PASSPORT') {
12247
+ if (onIdFrontImageCaptured) {
12248
+ onIdFrontImageCaptured(frameBase64);
12249
+ }
12250
+ onIdCaptureComplete();
12223
12251
  }
12224
- _a.label = 6;
12252
+ _b.label = 6;
12225
12253
  case 6:
12226
12254
  return [3 /*break*/, 8];
12227
12255
  case 7:
@@ -12241,7 +12269,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12241
12269
  }
12242
12270
  });
12243
12271
  });
12244
- }, [onIdBackCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
12272
+ }, [onIdCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
12245
12273
  var isFlipping = requestedAction === 'FLIP_ID';
12246
12274
  React.useEffect(function () {
12247
12275
  if (!isFlipping) return;
@@ -12300,9 +12328,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12300
12328
  stopSelfieGuidance();
12301
12329
  };
12302
12330
  }, [startSelfieGuidance, stopSelfieGuidance]);
12303
- var _30 = React.useState(0),
12304
- numFramesWithoutFaces = _30[0],
12305
- setNumFramesWithoutFaces = _30[1];
12331
+ var _31 = React.useState(0),
12332
+ numFramesWithoutFaces = _31[0],
12333
+ setNumFramesWithoutFaces = _31[1];
12306
12334
  onSelfiePredictionMade(useDebounce.useThrottledCallback(React.useCallback(function (_a) {
12307
12335
  var face = _a.face;
12308
12336
  if (selfieModelError) return;
@@ -12318,12 +12346,12 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12318
12346
  }
12319
12347
  }, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
12320
12348
  var theme = styled.useTheme();
12321
- var _31 = useTranslations(rawVerbiage, {
12349
+ var _32 = useTranslations(rawVerbiage, {
12322
12350
  faceNotCenteredText: 'Please move your face to the center...',
12323
12351
  captureBtnText: 'Capture'
12324
12352
  }),
12325
- captureBtnText = _31.captureBtnText,
12326
- faceNotCenteredText = _31.faceNotCenteredText;
12353
+ captureBtnText = _32.captureBtnText,
12354
+ faceNotCenteredText = _32.faceNotCenteredText;
12327
12355
  var debugScalingDetails = useDebugScalingDetails({
12328
12356
  enabled: debugMode,
12329
12357
  pageWidth: width,
@@ -12331,7 +12359,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12331
12359
  videoWidth: (_g = (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.videoWidth) !== null && _g !== void 0 ? _g : 0,
12332
12360
  videoHeight: (_j = (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.videoHeight) !== null && _j !== void 0 ? _j : 0
12333
12361
  });
12334
- var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction);
12362
+ var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
12335
12363
  var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
12336
12364
  return /*#__PURE__*/React__namespace.default.createElement(PageContainer, {
12337
12365
  ref: ref,
@@ -12352,8 +12380,8 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12352
12380
  requestedAction: requestedAction,
12353
12381
  satisfied: satisfied,
12354
12382
  idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
12355
- idCardCaptureProgress: !!countdownStartedAt ? 1 : 0,
12356
- idCardCaptureGuideImages: idCardCaptureGuideImages,
12383
+ idCardCaptureProgress: countdownStartedAt ? 1 : 0,
12384
+ idCaptureGuideImages: idCaptureGuideImages,
12357
12385
  faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
12358
12386
  idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
12359
12387
  }), debugMode && capturingId && ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(ObjectDetectionDebugOverlayDiv, {
@@ -12548,49 +12576,51 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12548
12576
  idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
12549
12577
  customOverlayContent = _a.customOverlayContent,
12550
12578
  onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
12551
- _u = _a.idCaptureGuideType,
12552
- idCaptureGuideType = _u === void 0 ? 'fit' : _u,
12553
- _v = _a.idCaptureGuideImages,
12554
- idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
12555
- _w = _a.idCapturePortraitGuidesOnMobile,
12556
- idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
12557
- _x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
12558
- idCaptureRotateLoadingOverlayImageWhenPortrait = _x === void 0 ? true : _x,
12559
- _y = _a.idCaptureModelLoadTimeoutMs,
12560
- idCaptureModelLoadTimeoutMs = _y === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _y,
12561
- _z = _a.faceLivenessLoadingOverlayMode,
12562
- faceLivenessLoadingOverlayMode = _z === void 0 ? 'default' : _z,
12563
- _0 = _a.disableFaceDetectionWhileAudioCapture,
12564
- disableFaceDetectionWhileAudioCapture = _0 === void 0 ? true : _0,
12565
- _1 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12566
- disableFaceDetectionWhileAudioCaptureMsDelay = _1 === void 0 ? 2000 : _1,
12567
- _2 = _a.silentFallback,
12568
- silentFallback = _2 === void 0 ? false : _2,
12569
- _3 = _a.mergeAVStreams,
12570
- mergeAVStreams = _3 === void 0 ? false : _3,
12571
- _4 = _a.assets,
12572
- assets = _4 === void 0 ? {} : _4,
12573
- _5 = _a.classNames,
12574
- classNames = _5 === void 0 ? {} : _5,
12575
- _6 = _a.colors,
12576
- colors = _6 === void 0 ? {} : _6,
12577
- _7 = _a.verbiage,
12578
- verbiage = _7 === void 0 ? {} : _7,
12579
- _8 = _a.debugMode,
12580
- debugMode = _8 === void 0 ? false : _8;
12581
- var _9 = React.useContext(SubmissionContext),
12582
- submissionStatus = _9.submissionStatus,
12583
- idCaptureVideoUrl = _9.idCaptureVideoUrl,
12584
- idCaptureVideoAudioUrl = _9.idCaptureVideoAudioUrl,
12585
- idCaptureVideoIdFrontImage = _9.idCaptureVideoIdFrontImage,
12586
- idCaptureVideoIdBackImage = _9.idCaptureVideoIdBackImage,
12587
- setIdCaptureVideoUrl = _9.setIdCaptureVideoUrl,
12588
- setIdCaptureVideoIdFrontImage = _9.setIdCaptureVideoIdFrontImage,
12589
- setIdCaptureVideoIdBackImage = _9.setIdCaptureVideoIdBackImage,
12590
- setIdCaptureVideoAudioUrl = _9.setIdCaptureVideoAudioUrl;
12591
- var _10 = React.useState('CAPTURING_ID'),
12592
- captureState = _10[0],
12593
- setCaptureState = _10[1];
12579
+ _u = _a.idDocumentType,
12580
+ idDocumentType = _u === void 0 ? 'idCard' : _u,
12581
+ _v = _a.idCaptureGuideType,
12582
+ idCaptureGuideType = _v === void 0 ? 'fit' : _v,
12583
+ _w = _a.idCaptureGuideImages,
12584
+ idCaptureGuideImages = _w === void 0 ? defaultIdCaptureGuideImages : _w,
12585
+ _x = _a.idCapturePortraitGuidesOnMobile,
12586
+ idCapturePortraitGuidesOnMobile = _x === void 0 ? true : _x,
12587
+ _y = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
12588
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _y === void 0 ? true : _y,
12589
+ _z = _a.idCaptureModelLoadTimeoutMs,
12590
+ idCaptureModelLoadTimeoutMs = _z === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _z,
12591
+ _0 = _a.faceLivenessLoadingOverlayMode,
12592
+ faceLivenessLoadingOverlayMode = _0 === void 0 ? 'default' : _0,
12593
+ _1 = _a.disableFaceDetectionWhileAudioCapture,
12594
+ disableFaceDetectionWhileAudioCapture = _1 === void 0 ? true : _1,
12595
+ _2 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12596
+ disableFaceDetectionWhileAudioCaptureMsDelay = _2 === void 0 ? 2000 : _2,
12597
+ _3 = _a.silentFallback,
12598
+ silentFallback = _3 === void 0 ? false : _3,
12599
+ _4 = _a.mergeAVStreams,
12600
+ mergeAVStreams = _4 === void 0 ? false : _4,
12601
+ _5 = _a.assets,
12602
+ assets = _5 === void 0 ? {} : _5,
12603
+ _6 = _a.classNames,
12604
+ classNames = _6 === void 0 ? {} : _6,
12605
+ _7 = _a.colors,
12606
+ colors = _7 === void 0 ? {} : _7,
12607
+ _8 = _a.verbiage,
12608
+ verbiage = _8 === void 0 ? {} : _8,
12609
+ _9 = _a.debugMode,
12610
+ debugMode = _9 === void 0 ? false : _9;
12611
+ var _10 = React.useContext(SubmissionContext),
12612
+ submissionStatus = _10.submissionStatus,
12613
+ idCaptureVideoUrl = _10.idCaptureVideoUrl,
12614
+ idCaptureVideoAudioUrl = _10.idCaptureVideoAudioUrl,
12615
+ idCaptureVideoIdFrontImage = _10.idCaptureVideoIdFrontImage,
12616
+ idCaptureVideoIdBackImage = _10.idCaptureVideoIdBackImage,
12617
+ setIdCaptureVideoUrl = _10.setIdCaptureVideoUrl,
12618
+ setIdCaptureVideoIdFrontImage = _10.setIdCaptureVideoIdFrontImage,
12619
+ setIdCaptureVideoIdBackImage = _10.setIdCaptureVideoIdBackImage,
12620
+ setIdCaptureVideoAudioUrl = _10.setIdCaptureVideoAudioUrl;
12621
+ var _11 = React.useState('CAPTURING_ID'),
12622
+ captureState = _11[0],
12623
+ setCaptureState = _11[1];
12594
12624
  React.useEffect(function () {
12595
12625
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
12596
12626
  }, [captureState, skipIdCapture]);
@@ -12621,9 +12651,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12621
12651
  var onVideoCaptureFaceNotDetected = React.useCallback(function () {
12622
12652
  setCaptureState('CHECKING_LIVENESS');
12623
12653
  }, []);
12624
- var _11 = React.useState(0),
12625
- attempt = _11[0],
12626
- setAttempt = _11[1];
12654
+ var _12 = React.useState(0),
12655
+ attempt = _12[0],
12656
+ setAttempt = _12[1];
12627
12657
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
12628
12658
  var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
12629
12659
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -12658,7 +12688,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12658
12688
  var _b, _c, _d, _e;
12659
12689
  var status = _a.status;
12660
12690
  return /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureGuides, {
12661
- idCardCaptureGuideImages: idCaptureGuideImages,
12691
+ idCaptureGuideImages: idCaptureGuideImages,
12662
12692
  classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
12663
12693
  verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
12664
12694
  requestedAction: "VERIFY_LIVENESS",
@@ -12718,6 +12748,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12718
12748
  guideType: idCaptureGuideType,
12719
12749
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
12720
12750
  rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
12751
+ captureRequirement: idDocumentType,
12721
12752
  debugMode: debugMode
12722
12753
  }))));
12723
12754
  case 'CHECKING_LIVENESS':
@@ -12754,7 +12785,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12754
12785
  onRecordingFailed: onRecordingFailed,
12755
12786
  onExitCapture: handleExitCapture,
12756
12787
  idCaptureModelsEnabled: idCaptureModelsEnabled,
12757
- idCardCaptureGuideImages: idCaptureGuideImages,
12788
+ idCaptureGuideImages: idCaptureGuideImages,
12789
+ idDocumentType: idDocumentType,
12758
12790
  videoIdCaptureThresholds: videoIdCaptureThresholds,
12759
12791
  skipShowIdCardBack: skipShowIdCardBack,
12760
12792
  disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
@@ -15295,40 +15327,42 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15295
15327
  _p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
15296
15328
  idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
15297
15329
  idCardForFaceMatch = _a.idCardForFaceMatch,
15298
- _q = _a.faceLivenessLoadingOverlayMode,
15299
- faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
15300
- _r = _a.disableFaceDetectionWhileAudioCapture,
15301
- disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
15302
- _s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
15303
- disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
15304
- _t = _a.silentFallback,
15305
- silentFallback = _t === void 0 ? false : _t,
15306
- _u = _a.mergeAVStreams,
15307
- mergeAVStreams = _u === void 0 ? false : _u,
15308
- _v = _a.matchOnly,
15309
- matchOnly = _v === void 0 ? false : _v,
15310
- _w = _a.theme,
15311
- theme = _w === void 0 ? 'default' : _w,
15312
- _x = _a.assets,
15313
- assets = _x === void 0 ? {} : _x,
15314
- _y = _a.classNames,
15315
- classNames = _y === void 0 ? {} : _y,
15316
- _z = _a.colors,
15317
- colors = _z === void 0 ? {} : _z,
15318
- _0 = _a.verbiage,
15319
- verbiage = _0 === void 0 ? {} : _0,
15320
- _1 = _a.captureSignature,
15321
- captureSignature = _1 === void 0 ? false : _1,
15322
- _2 = _a.captureSignatureVideo,
15323
- captureSignatureVideo = _2 === void 0 ? false : _2,
15324
- _3 = _a.captureAdditionalDocuments,
15325
- captureAdditionalDocuments = _3 === void 0 ? [] : _3,
15326
- _4 = _a.geolocationEnabled,
15327
- geolocationEnabled = _4 === void 0 ? true : _4,
15328
- _5 = _a.geolocationRequired,
15329
- geolocationRequired = _5 === void 0 ? false : _5,
15330
- _6 = _a.debugMode,
15331
- debugMode = _6 === void 0 ? false : _6;
15330
+ _q = _a.idDocumentType,
15331
+ idDocumentType = _q === void 0 ? 'idCard' : _q,
15332
+ _r = _a.faceLivenessLoadingOverlayMode,
15333
+ faceLivenessLoadingOverlayMode = _r === void 0 ? 'default' : _r,
15334
+ _s = _a.disableFaceDetectionWhileAudioCapture,
15335
+ disableFaceDetectionWhileAudioCapture = _s === void 0 ? false : _s,
15336
+ _t = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
15337
+ disableFaceDetectionWhileAudioCaptureMsDelay = _t === void 0 ? 2000 : _t,
15338
+ _u = _a.silentFallback,
15339
+ silentFallback = _u === void 0 ? false : _u,
15340
+ _v = _a.mergeAVStreams,
15341
+ mergeAVStreams = _v === void 0 ? false : _v,
15342
+ _w = _a.matchOnly,
15343
+ matchOnly = _w === void 0 ? false : _w,
15344
+ _x = _a.theme,
15345
+ theme = _x === void 0 ? 'default' : _x,
15346
+ _y = _a.assets,
15347
+ assets = _y === void 0 ? {} : _y,
15348
+ _z = _a.classNames,
15349
+ classNames = _z === void 0 ? {} : _z,
15350
+ _0 = _a.colors,
15351
+ colors = _0 === void 0 ? {} : _0,
15352
+ _1 = _a.verbiage,
15353
+ verbiage = _1 === void 0 ? {} : _1,
15354
+ _2 = _a.captureSignature,
15355
+ captureSignature = _2 === void 0 ? false : _2,
15356
+ _3 = _a.captureSignatureVideo,
15357
+ captureSignatureVideo = _3 === void 0 ? false : _3,
15358
+ _4 = _a.captureAdditionalDocuments,
15359
+ captureAdditionalDocuments = _4 === void 0 ? [] : _4,
15360
+ _5 = _a.geolocationEnabled,
15361
+ geolocationEnabled = _5 === void 0 ? true : _5,
15362
+ _6 = _a.geolocationRequired,
15363
+ geolocationRequired = _6 === void 0 ? false : _6,
15364
+ _7 = _a.debugMode,
15365
+ debugMode = _7 === void 0 ? false : _7;
15332
15366
  useLanguage(lang);
15333
15367
  useDebugLogging(debugMode);
15334
15368
  var videoIdCaptureProps = React.useMemo(function () {
@@ -15349,6 +15383,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15349
15383
  idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
15350
15384
  customOverlayContent: customOverlayContent,
15351
15385
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
15386
+ idDocumentType: idDocumentType,
15352
15387
  idCaptureGuideType: idCaptureGuideType,
15353
15388
  idCaptureGuideImages: idCaptureGuideImages,
15354
15389
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
@@ -15364,7 +15399,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15364
15399
  verbiage: verbiage,
15365
15400
  debugMode: debugMode
15366
15401
  };
15367
- }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
15402
+ }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
15368
15403
  var additionalDocumentCaptureProps = React.useMemo(function () {
15369
15404
  return {
15370
15405
  documents: captureAdditionalDocuments,