idmission-web-sdk 2.2.51 → 2.2.53

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.2.51';
214
+ var webSdkVersion = '2.2.53';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -11095,6 +11095,7 @@
11095
11095
  'Performing facial recognition, please hold still...': 'Realizando el reconocimiento facial, por favor no te muevas',
11096
11096
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
11097
11097
  'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
11098
+ 'Display the ID page of your passport...': 'Hay que mostrar el página de datos del pasaporte...',
11098
11099
  'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
11099
11100
  'Searching for ID card...': 'Localizando la identificación...',
11100
11101
  'Please read the following text aloud': 'Hay que leer el siguiente texto en voz alta',
@@ -21547,49 +21548,52 @@
21547
21548
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
21548
21549
  var _z = _a.requestedAction,
21549
21550
  requestedAction = _z === void 0 ? 'SHOW_ID_FRONT' : _z,
21550
- _0 = _a.satisfied,
21551
- satisfied = _0 === void 0 ? false : _0,
21552
- _1 = _a.faceGuideStatus,
21553
- faceGuideStatus = _1 === void 0 ? 'success' : _1,
21551
+ _0 = _a.idDocumentType,
21552
+ idDocumentType = _0 === void 0 ? 'idCard' : _0,
21553
+ _1 = _a.satisfied,
21554
+ satisfied = _1 === void 0 ? false : _1,
21555
+ _2 = _a.faceGuideStatus,
21556
+ faceGuideStatus = _2 === void 0 ? 'success' : _2,
21554
21557
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
21555
21558
  faceGuideBorderColor = _a.faceGuideBorderColor,
21556
- _2 = _a.idCardGuideStatus,
21557
- idCardGuideStatus = _2 === void 0 ? 'ready' : _2,
21559
+ _3 = _a.idCardGuideStatus,
21560
+ idCardGuideStatus = _3 === void 0 ? 'ready' : _3,
21558
21561
  idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
21559
21562
  idCardGuideBorderColor = _a.idCardGuideBorderColor,
21560
21563
  idCardCaptureProgress = _a.idCardCaptureProgress,
21561
- _3 = _a.idCardCaptureGuideImages,
21562
- userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
21563
- _4 = _a.classNames,
21564
- classNames = _4 === void 0 ? {} : _4,
21565
- _5 = _a.verbiage,
21566
- rawVerbiage = _5 === void 0 ? {} : _5;
21564
+ _4 = _a.idCaptureGuideImages,
21565
+ userSuppliedImages = _4 === void 0 ? defaultIdCaptureGuideImages : _4,
21566
+ _5 = _a.classNames,
21567
+ classNames = _5 === void 0 ? {} : _5,
21568
+ _6 = _a.verbiage,
21569
+ rawVerbiage = _6 === void 0 ? {} : _6;
21567
21570
  var isRearFacing = useCameraStore(function (state) {
21568
21571
  return state.isRearFacing;
21569
21572
  });
21570
21573
  var verbiage = useTranslations(rawVerbiage, {
21571
21574
  idFrontInstructionText: 'Display the front of your ID card...',
21572
21575
  idBackInstructionText: 'Display the back of your ID card...',
21576
+ passportInstructionText: 'Display the ID page of your passport...',
21573
21577
  flipIdInstructionText: 'Please flip your ID card...',
21574
21578
  verifyLivenessInstructionText: 'Performing facial recognition, please hold still...'
21575
21579
  });
21576
- var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
21580
+ 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;
21577
21581
  var theme = styled.useTheme();
21578
21582
  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;
21579
21583
  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';
21580
21584
  if (idCardGuideBorderWidth === undefined) idCardGuideBorderWidth = (_m = (_l = (_k = theme.idVideoCapture) === null || _k === void 0 ? void 0 : _k.idCardGuides) === null || _l === void 0 ? void 0 : _l.borderWidth) !== null && _m !== void 0 ? _m : 20;
21581
21585
  if (idCardGuideBorderColor === undefined) idCardGuideBorderColor = (_s = satisfied ? (_p = (_o = theme.idVideoCapture) === null || _o === void 0 ? void 0 : _o.idCardGuides) === null || _p === void 0 ? void 0 : _p.satisfiedColor : (_r = (_q = theme.idVideoCapture) === null || _q === void 0 ? void 0 : _q.idCardGuides) === null || _r === void 0 ? void 0 : _r.unsatisfiedColor) !== null && _s !== void 0 ? _s : '#D6DCE7';
21582
- var _6 = useResizeObserver(),
21583
- idCardGuideRef = _6.ref,
21584
- _7 = _6.width,
21585
- idCardGuideWidth = _7 === void 0 ? 0 : _7,
21586
- _8 = _6.height,
21587
- idCardGuideHeight = _8 === void 0 ? 0 : _8;
21586
+ var _7 = useResizeObserver(),
21587
+ idCardGuideRef = _7.ref,
21588
+ _8 = _7.width,
21589
+ idCardGuideWidth = _8 === void 0 ? 0 : _8,
21590
+ _9 = _7.height,
21591
+ idCardGuideHeight = _9 === void 0 ? 0 : _9;
21588
21592
  var idCaptureGuideImages = useGuideImages(userSuppliedImages);
21589
21593
  var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
21590
- var _9 = React.useState(undefined),
21591
- aspectRatio = _9[0],
21592
- setAspectRatio = _9[1];
21594
+ var _10 = React.useState(undefined),
21595
+ aspectRatio = _10[0],
21596
+ setAspectRatio = _10[1];
21593
21597
  var onImageLoaded = React.useCallback(function (e) {
21594
21598
  var _a, _b, _c, _d;
21595
21599
  var img = e.currentTarget;
@@ -21638,7 +21642,7 @@
21638
21642
  className: classNames.idCardGuideImage,
21639
21643
  "$isMirrored": !isRearFacing,
21640
21644
  style: idCardImageStyle,
21641
- src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
21645
+ src: idDocumentType === 'passport' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
21642
21646
  onLoad: onImageLoaded
21643
21647
  })), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React.createElement(IdVideoCaptureFlipIdPrompt, {
21644
21648
  idCaptureGuideImages: idCaptureGuideImages,
@@ -21773,7 +21777,7 @@
21773
21777
  detection: {
21774
21778
  idCardFront: 0.4,
21775
21779
  idCardBack: 0.5,
21776
- passport: 1
21780
+ passport: 0.3
21777
21781
  },
21778
21782
  focus: {
21779
21783
  idCardFront: {
@@ -21791,7 +21795,8 @@
21791
21795
  },
21792
21796
  goodFrames: {
21793
21797
  idCardFront: 1,
21794
- idCardBack: 1
21798
+ idCardBack: 1,
21799
+ passport: 1
21795
21800
  },
21796
21801
  flipShortcutThreshold: 0.7
21797
21802
  };
@@ -21805,91 +21810,93 @@
21805
21810
  onExitCapture = _a.onExitCapture,
21806
21811
  _w = _a.idCaptureModelsEnabled,
21807
21812
  idCaptureModelsEnabled = _w === void 0 ? true : _w,
21808
- _x = _a.idCardCaptureGuideImages,
21809
- idCardCaptureGuideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
21810
- _y = _a.idCardFrontDelay,
21811
- idCardFrontDelay = _y === void 0 ? 1000 : _y,
21812
- _z = _a.videoIdCaptureThresholds,
21813
- videoIdCaptureThresholds = _z === void 0 ? defaultVideoIdCaptureThresholds : _z,
21814
- _0 = _a.skipShowIdCardBack,
21815
- skipShowIdCardBack = _0 === void 0 ? false : _0,
21816
- _1 = _a.captureCountdownSeconds,
21817
- captureCountdownSeconds = _1 === void 0 ? 3 : _1,
21813
+ _x = _a.idDocumentType,
21814
+ idDocumentType = _x === void 0 ? 'idCard' : _x,
21815
+ _y = _a.idCaptureGuideImages,
21816
+ idCaptureGuideImages = _y === void 0 ? defaultIdCaptureGuideImages : _y,
21817
+ _z = _a.idCardFrontDelay,
21818
+ idCardFrontDelay = _z === void 0 ? 1000 : _z,
21819
+ _0 = _a.videoIdCaptureThresholds,
21820
+ videoIdCaptureThresholds = _0 === void 0 ? defaultVideoIdCaptureThresholds : _0,
21821
+ _1 = _a.skipShowIdCardBack,
21822
+ skipShowIdCardBack = _1 === void 0 ? false : _1,
21823
+ _2 = _a.captureCountdownSeconds,
21824
+ captureCountdownSeconds = _2 === void 0 ? 3 : _2,
21818
21825
  readTextPrompt = _a.readTextPrompt,
21819
- _2 = _a.readTextTimeoutDurationMs,
21820
- readTextTimeoutDurationMs = _2 === void 0 ? 15000 : _2,
21821
- _3 = _a.readTextMinReadingMs,
21822
- readTextMinReadingMs = _3 === void 0 ? 10000 : _3,
21823
- _4 = _a.disableFaceDetectionWhileAudioCapture,
21824
- disableFaceDetectionWhileAudioCapture = _4 === void 0 ? false : _4,
21825
- _5 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
21826
- disableFaceDetectionWhileAudioCaptureMsDelay = _5 === void 0 ? 2000 : _5,
21827
- _6 = _a.mergeAVStreams,
21828
- mergeAVStreams = _6 === void 0 ? false : _6,
21829
- _7 = _a.classNames,
21830
- classNames = _7 === void 0 ? {} : _7,
21831
- _8 = _a.colors,
21832
- colors = _8 === void 0 ? {} : _8,
21833
- _9 = _a.verbiage,
21834
- rawVerbiage = _9 === void 0 ? {} : _9,
21835
- _10 = _a.debugMode,
21836
- debugMode = _10 === void 0 ? false : _10;
21837
- var _11 = useResizeObserver(),
21838
- ref = _11.ref,
21839
- _12 = _11.width,
21840
- width = _12 === void 0 ? 1 : _12,
21841
- _13 = _11.height,
21842
- height = _13 === void 0 ? 1 : _13;
21843
- var _14 = useCameraStore(),
21844
- camera = _14.camera,
21845
- videoRef = _14.videoRef,
21846
- videoLoaded = _14.videoLoaded,
21847
- cameraReady = _14.cameraReady,
21848
- microphoneReady = _14.microphoneReady,
21849
- audioStream = _14.audioStream,
21850
- isRearFacing = _14.isRearFacing,
21851
- releaseCameraAccess = _14.releaseCameraAccess;
21852
- var _15 = React.useState([]),
21853
- detectedObjects = _15[0],
21854
- setDetectedObjects = _15[1];
21855
- var _16 = React.useState(null),
21856
- face = _16[0],
21857
- setFace = _16[1];
21858
- var _17 = React.useContext(IdCaptureModelsContext),
21859
- idModelsReady = _17.ready,
21860
- startIdModels = _17.start,
21861
- stopIdModels = _17.stop,
21862
- onIdPredictionMade = _17.onPredictionMade,
21863
- setThresholds = _17.setThresholds,
21864
- setDocumentDetectionBoundaries = _17.setDocumentDetectionBoundaries,
21865
- bestFrameDetails = _17.bestFrameDetails,
21866
- resetBestFrame = _17.resetBestFrame,
21867
- idModelError = _17.modelError;
21868
- var _18 = React.useState(null),
21869
- videoStartsAt = _18[0],
21870
- setVideoStartsAt = _18[1];
21871
- var _19 = React.useContext(SubmissionContext),
21872
- setIdCaptureVideoAudioStartsAt = _19.setIdCaptureVideoAudioStartsAt,
21873
- setExpectedAudioText = _19.setExpectedAudioText;
21874
- var _20 = React.useContext(SelfieGuidanceModelsContext),
21875
- startSelfieGuidance = _20.start,
21876
- stopSelfieGuidance = _20.stop,
21877
- onSelfiePredictionMade = _20.onPredictionMade,
21878
- selfieModelError = _20.error;
21879
- var _21 = useVideoRecorder(camera, audioStream, mergeAVStreams),
21880
- isRecordingVideo = _21.isRecordingVideo,
21881
- startRecordingVideo = _21.startRecordingVideo,
21882
- startRecordingAudio = _21.startRecordingAudio,
21883
- stopRecordingVideo = _21.stopRecordingVideo,
21884
- stopRecordingAudio = _21.stopRecordingAudio,
21885
- videoRecordingUnintentionallyStopped = _21.videoRecordingUnintentionallyStopped,
21886
- audioRecordingUnintentionallyStopped = _21.audioRecordingUnintentionallyStopped,
21887
- videoUrl = _21.videoUrl,
21888
- audioUrl = _21.audioUrl;
21826
+ _3 = _a.readTextTimeoutDurationMs,
21827
+ readTextTimeoutDurationMs = _3 === void 0 ? 15000 : _3,
21828
+ _4 = _a.readTextMinReadingMs,
21829
+ readTextMinReadingMs = _4 === void 0 ? 10000 : _4,
21830
+ _5 = _a.disableFaceDetectionWhileAudioCapture,
21831
+ disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
21832
+ _6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
21833
+ disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
21834
+ _7 = _a.mergeAVStreams,
21835
+ mergeAVStreams = _7 === void 0 ? false : _7,
21836
+ _8 = _a.classNames,
21837
+ classNames = _8 === void 0 ? {} : _8,
21838
+ _9 = _a.colors,
21839
+ colors = _9 === void 0 ? {} : _9,
21840
+ _10 = _a.verbiage,
21841
+ rawVerbiage = _10 === void 0 ? {} : _10,
21842
+ _11 = _a.debugMode,
21843
+ debugMode = _11 === void 0 ? false : _11;
21844
+ var _12 = useResizeObserver(),
21845
+ ref = _12.ref,
21846
+ _13 = _12.width,
21847
+ width = _13 === void 0 ? 1 : _13,
21848
+ _14 = _12.height,
21849
+ height = _14 === void 0 ? 1 : _14;
21850
+ var _15 = useCameraStore(),
21851
+ camera = _15.camera,
21852
+ videoRef = _15.videoRef,
21853
+ videoLoaded = _15.videoLoaded,
21854
+ cameraReady = _15.cameraReady,
21855
+ microphoneReady = _15.microphoneReady,
21856
+ audioStream = _15.audioStream,
21857
+ isRearFacing = _15.isRearFacing,
21858
+ releaseCameraAccess = _15.releaseCameraAccess;
21859
+ var _16 = React.useState([]),
21860
+ detectedObjects = _16[0],
21861
+ setDetectedObjects = _16[1];
21862
+ var _17 = React.useState(null),
21863
+ face = _17[0],
21864
+ setFace = _17[1];
21865
+ var _18 = React.useContext(IdCaptureModelsContext),
21866
+ idModelsReady = _18.ready,
21867
+ startIdModels = _18.start,
21868
+ stopIdModels = _18.stop,
21869
+ onIdPredictionMade = _18.onPredictionMade,
21870
+ setThresholds = _18.setThresholds,
21871
+ setDocumentDetectionBoundaries = _18.setDocumentDetectionBoundaries,
21872
+ bestFrameDetails = _18.bestFrameDetails,
21873
+ resetBestFrame = _18.resetBestFrame,
21874
+ idModelError = _18.modelError;
21875
+ var _19 = React.useState(null),
21876
+ videoStartsAt = _19[0],
21877
+ setVideoStartsAt = _19[1];
21878
+ var _20 = React.useContext(SubmissionContext),
21879
+ setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
21880
+ setExpectedAudioText = _20.setExpectedAudioText;
21881
+ var _21 = React.useContext(SelfieGuidanceModelsContext),
21882
+ startSelfieGuidance = _21.start,
21883
+ stopSelfieGuidance = _21.stop,
21884
+ onSelfiePredictionMade = _21.onPredictionMade,
21885
+ selfieModelError = _21.error;
21886
+ var _22 = useVideoRecorder(camera, audioStream, mergeAVStreams),
21887
+ isRecordingVideo = _22.isRecordingVideo,
21888
+ startRecordingVideo = _22.startRecordingVideo,
21889
+ startRecordingAudio = _22.startRecordingAudio,
21890
+ stopRecordingVideo = _22.stopRecordingVideo,
21891
+ stopRecordingAudio = _22.stopRecordingAudio,
21892
+ videoRecordingUnintentionallyStopped = _22.videoRecordingUnintentionallyStopped,
21893
+ audioRecordingUnintentionallyStopped = _22.audioRecordingUnintentionallyStopped,
21894
+ videoUrl = _22.videoUrl,
21895
+ audioUrl = _22.audioUrl;
21889
21896
  var countdownTimeoutRef = React.useRef(undefined);
21890
- var _22 = React.useState(-1),
21891
- countdownRemaining = _22[0],
21892
- setCountdownRemaining = _22[1];
21897
+ var _23 = React.useState(-1),
21898
+ countdownRemaining = _23[0],
21899
+ setCountdownRemaining = _23[1];
21893
21900
  React.useEffect(function () {
21894
21901
  if (!isRecordingVideo && !videoUrl) {
21895
21902
  startRecordingVideo();
@@ -21909,9 +21916,9 @@
21909
21916
  onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
21910
21917
  }
21911
21918
  }, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
21912
- var _23 = React.useState('SHOW_ID_FRONT'),
21913
- requestedAction = _23[0],
21914
- setRequestedAction = _23[1];
21919
+ var _24 = React.useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
21920
+ requestedAction = _24[0],
21921
+ setRequestedAction = _24[1];
21915
21922
  var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
21916
21923
  React.useEffect(function startModelsWhenCapturing() {
21917
21924
  if (!shouldRunIdModels) return;
@@ -21920,9 +21927,25 @@
21920
21927
  return stopIdModels();
21921
21928
  };
21922
21929
  }, [shouldRunIdModels, startIdModels, stopIdModels]);
21930
+ var adjustedThresholds = React.useMemo(function () {
21931
+ if (idDocumentType === 'idCard') {
21932
+ return _assign(_assign({}, videoIdCaptureThresholds), {
21933
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
21934
+ passport: 1
21935
+ })
21936
+ });
21937
+ } else {
21938
+ return _assign(_assign({}, videoIdCaptureThresholds), {
21939
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
21940
+ idCardFront: 1,
21941
+ idCardBack: 1
21942
+ })
21943
+ });
21944
+ }
21945
+ }, [idDocumentType, videoIdCaptureThresholds]);
21923
21946
  React.useEffect(function () {
21924
- setThresholds(videoIdCaptureThresholds);
21925
- }, [requestedAction, setThresholds, videoIdCaptureThresholds]);
21947
+ setThresholds(adjustedThresholds);
21948
+ }, [requestedAction, setThresholds, adjustedThresholds]);
21926
21949
  React.useEffect(function () {
21927
21950
  setDocumentDetectionBoundaries({
21928
21951
  top: 20,
@@ -21931,19 +21954,19 @@
21931
21954
  bottom: 0
21932
21955
  });
21933
21956
  }, [setDocumentDetectionBoundaries]);
21934
- var _24 = React.useState(0),
21935
- currentDetectionScore = _24[0],
21936
- setCurrentDetectionScore = _24[1];
21937
- var _25 = React.useState('none'),
21938
- currentDetectedDocumentType = _25[0],
21939
- setCurrentDetectedDocumentType = _25[1];
21940
- var _26 = React.useState(0),
21941
- currentFocusScore = _26[0],
21942
- setCurrentFocusScore = _26[1];
21957
+ var _25 = React.useState(0),
21958
+ currentDetectionScore = _25[0],
21959
+ setCurrentDetectionScore = _25[1];
21960
+ var _26 = React.useState('none'),
21961
+ currentDetectedDocumentType = _26[0],
21962
+ setCurrentDetectedDocumentType = _26[1];
21943
21963
  var _27 = React.useState(0),
21944
- goodFramesCount = _27[0],
21945
- setGoodFramesCount = _27[1];
21946
- var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? videoIdCaptureThresholds.goodFrames.idCardFront : videoIdCaptureThresholds.goodFrames.idCardBack;
21964
+ currentFocusScore = _27[0],
21965
+ setCurrentFocusScore = _27[1];
21966
+ var _28 = React.useState(0),
21967
+ goodFramesCount = _28[0],
21968
+ setGoodFramesCount = _28[1];
21969
+ var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
21947
21970
  var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
21948
21971
  React.useEffect(function () {
21949
21972
  if (!idCaptureModelsEnabled || idModelError) return;
@@ -21952,9 +21975,9 @@
21952
21975
  setCurrentDetectionScore(prediction.detectionScore);
21953
21976
  setCurrentDetectedDocumentType(prediction.detectedDocumentType);
21954
21977
  setCurrentFocusScore(prediction.focusScore);
21955
- var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
21978
+ var detectionThresholdMet = requestedAction === 'SHOW_PASSPORT' ? prediction.passportDetectionThresholdMet : requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
21956
21979
  var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
21957
- var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
21980
+ var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= adjustedThresholds.flipShortcutThreshold;
21958
21981
  if (shouldShortcutFlipAnimation) {
21959
21982
  return setRequestedAction('SHOW_ID_BACK');
21960
21983
  }
@@ -21962,16 +21985,16 @@
21962
21985
  return n + 1;
21963
21986
  } : 0);
21964
21987
  });
21965
- }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
21966
- var _28 = React.useState(null),
21967
- idFrontCaptureStartedAt = _28[0],
21968
- setFirstGoodFrameTime = _28[1];
21988
+ }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
21989
+ var _29 = React.useState(null),
21990
+ idFrontCaptureStartedAt = _29[0],
21991
+ setFirstGoodFrameTime = _29[1];
21969
21992
  React.useEffect(function () {
21970
21993
  if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
21971
21994
  }, [goodFramesCount]);
21972
- var delaySatisfied = requestedAction !== 'SHOW_ID_FRONT' || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
21995
+ var delaySatisfied = !['SHOW_ID_FRONT', 'SHOW_PASSPORT'].includes(requestedAction) || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
21973
21996
  var translatedText = useVerbiage(readTextPrompt, '');
21974
- var onIdBackCaptureComplete = React.useCallback(function () {
21997
+ var onIdCaptureComplete = React.useCallback(function () {
21975
21998
  var _a;
21976
21999
  if (translatedText) {
21977
22000
  setRequestedAction('READ_TEXT');
@@ -21986,16 +22009,16 @@
21986
22009
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
21987
22010
  var faceBox = face === null || face === void 0 ? void 0 : face.box;
21988
22011
  var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
21989
- var _29 = React.useState(),
21990
- countdownStartedAt = _29[0],
21991
- setCountdownStartedAt = _29[1];
22012
+ var _30 = React.useState(),
22013
+ countdownStartedAt = _30[0],
22014
+ setCountdownStartedAt = _30[1];
21992
22015
  var photoCanvas = React.useRef(null);
21993
22016
  var frameLock = React.useRef(false);
21994
22017
  var captureFrame = React.useCallback(function () {
21995
22018
  return __awaiter(void 0, void 0, void 0, function () {
21996
- var frameBase64;
21997
- return __generator(this, function (_a) {
21998
- switch (_a.label) {
22019
+ var frameBase64, _a;
22020
+ return __generator(this, function (_b) {
22021
+ switch (_b.label) {
21999
22022
  case 0:
22000
22023
  if (frameLock.current) return [2 /*return*/];
22001
22024
  frameLock.current = true;
@@ -22005,23 +22028,25 @@
22005
22028
  frameLock.current = false;
22006
22029
  return [2 /*return*/];
22007
22030
  }
22008
- _a.label = 1;
22031
+ _b.label = 1;
22009
22032
  case 1:
22010
- _a.trys.push([1,, 7, 8]);
22033
+ _b.trys.push([1,, 7, 8]);
22011
22034
  if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 5];
22012
22035
  if (onIdFrontImageCaptured) {
22013
22036
  onIdFrontImageCaptured(frameBase64);
22014
22037
  }
22015
22038
  if (!skipShowIdCardBack) return [3 /*break*/, 4];
22016
- if (!(skipShowIdCardBack === true)) return [3 /*break*/, 2];
22017
- return [2 /*return*/, onIdBackCaptureComplete()];
22018
- case 2:
22039
+ _a = skipShowIdCardBack === true;
22040
+ if (_a) return [3 /*break*/, 3];
22019
22041
  return [4 /*yield*/, skipShowIdCardBack()];
22042
+ case 2:
22043
+ _a = _b.sent();
22044
+ _b.label = 3;
22020
22045
  case 3:
22021
- if (_a.sent()) {
22022
- return [2 /*return*/, onIdBackCaptureComplete()];
22046
+ if (_a) {
22047
+ return [2 /*return*/, onIdCaptureComplete()];
22023
22048
  }
22024
- _a.label = 4;
22049
+ _b.label = 4;
22025
22050
  case 4:
22026
22051
  setRequestedAction('FLIP_ID');
22027
22052
  return [3 /*break*/, 6];
@@ -22030,9 +22055,14 @@
22030
22055
  if (onIdBackImageCaptured) {
22031
22056
  onIdBackImageCaptured(frameBase64);
22032
22057
  }
22033
- onIdBackCaptureComplete();
22058
+ onIdCaptureComplete();
22059
+ } else if (requestedAction == 'SHOW_PASSPORT') {
22060
+ if (onIdFrontImageCaptured) {
22061
+ onIdFrontImageCaptured(frameBase64);
22062
+ }
22063
+ onIdCaptureComplete();
22034
22064
  }
22035
- _a.label = 6;
22065
+ _b.label = 6;
22036
22066
  case 6:
22037
22067
  return [3 /*break*/, 8];
22038
22068
  case 7:
@@ -22052,7 +22082,7 @@
22052
22082
  }
22053
22083
  });
22054
22084
  });
22055
- }, [onIdBackCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
22085
+ }, [onIdCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
22056
22086
  var isFlipping = requestedAction === 'FLIP_ID';
22057
22087
  React.useEffect(function () {
22058
22088
  if (!isFlipping) return;
@@ -22111,9 +22141,9 @@
22111
22141
  stopSelfieGuidance();
22112
22142
  };
22113
22143
  }, [startSelfieGuidance, stopSelfieGuidance]);
22114
- var _30 = React.useState(0),
22115
- numFramesWithoutFaces = _30[0],
22116
- setNumFramesWithoutFaces = _30[1];
22144
+ var _31 = React.useState(0),
22145
+ numFramesWithoutFaces = _31[0],
22146
+ setNumFramesWithoutFaces = _31[1];
22117
22147
  onSelfiePredictionMade(f(React.useCallback(function (_a) {
22118
22148
  var face = _a.face;
22119
22149
  if (selfieModelError) return;
@@ -22129,12 +22159,12 @@
22129
22159
  }
22130
22160
  }, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
22131
22161
  var theme = styled.useTheme();
22132
- var _31 = useTranslations(rawVerbiage, {
22162
+ var _32 = useTranslations(rawVerbiage, {
22133
22163
  faceNotCenteredText: 'Please move your face to the center...',
22134
22164
  captureBtnText: 'Capture'
22135
22165
  }),
22136
- captureBtnText = _31.captureBtnText,
22137
- faceNotCenteredText = _31.faceNotCenteredText;
22166
+ captureBtnText = _32.captureBtnText,
22167
+ faceNotCenteredText = _32.faceNotCenteredText;
22138
22168
  var debugScalingDetails = useDebugScalingDetails({
22139
22169
  enabled: debugMode,
22140
22170
  pageWidth: width,
@@ -22142,7 +22172,7 @@
22142
22172
  videoWidth: (_g = (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.videoWidth) !== null && _g !== void 0 ? _g : 0,
22143
22173
  videoHeight: (_j = (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.videoHeight) !== null && _j !== void 0 ? _j : 0
22144
22174
  });
22145
- var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction);
22175
+ var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
22146
22176
  var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
22147
22177
  return /*#__PURE__*/React.createElement(PageContainer, {
22148
22178
  ref: ref,
@@ -22161,10 +22191,11 @@
22161
22191
  classNames: classNames.guides,
22162
22192
  verbiage: rawVerbiage.guides,
22163
22193
  requestedAction: requestedAction,
22194
+ idDocumentType: idDocumentType,
22164
22195
  satisfied: satisfied,
22165
22196
  idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
22166
- idCardCaptureProgress: !!countdownStartedAt ? 1 : 0,
22167
- idCardCaptureGuideImages: idCardCaptureGuideImages,
22197
+ idCardCaptureProgress: countdownStartedAt ? 1 : 0,
22198
+ idCaptureGuideImages: idCaptureGuideImages,
22168
22199
  faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
22169
22200
  idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
22170
22201
  }), debugMode && capturingId && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ObjectDetectionDebugOverlayDiv, {
@@ -22359,49 +22390,51 @@
22359
22390
  idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
22360
22391
  customOverlayContent = _a.customOverlayContent,
22361
22392
  onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
22362
- _u = _a.idCaptureGuideType,
22363
- idCaptureGuideType = _u === void 0 ? 'fit' : _u,
22364
- _v = _a.idCaptureGuideImages,
22365
- idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
22366
- _w = _a.idCapturePortraitGuidesOnMobile,
22367
- idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
22368
- _x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
22369
- idCaptureRotateLoadingOverlayImageWhenPortrait = _x === void 0 ? true : _x,
22370
- _y = _a.idCaptureModelLoadTimeoutMs,
22371
- idCaptureModelLoadTimeoutMs = _y === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _y,
22372
- _z = _a.faceLivenessLoadingOverlayMode,
22373
- faceLivenessLoadingOverlayMode = _z === void 0 ? 'default' : _z,
22374
- _0 = _a.disableFaceDetectionWhileAudioCapture,
22375
- disableFaceDetectionWhileAudioCapture = _0 === void 0 ? true : _0,
22376
- _1 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
22377
- disableFaceDetectionWhileAudioCaptureMsDelay = _1 === void 0 ? 2000 : _1,
22378
- _2 = _a.silentFallback,
22379
- silentFallback = _2 === void 0 ? false : _2,
22380
- _3 = _a.mergeAVStreams,
22381
- mergeAVStreams = _3 === void 0 ? false : _3,
22382
- _4 = _a.assets,
22383
- assets = _4 === void 0 ? {} : _4,
22384
- _5 = _a.classNames,
22385
- classNames = _5 === void 0 ? {} : _5,
22386
- _6 = _a.colors,
22387
- colors = _6 === void 0 ? {} : _6,
22388
- _7 = _a.verbiage,
22389
- verbiage = _7 === void 0 ? {} : _7,
22390
- _8 = _a.debugMode,
22391
- debugMode = _8 === void 0 ? false : _8;
22392
- var _9 = React.useContext(SubmissionContext),
22393
- submissionStatus = _9.submissionStatus,
22394
- idCaptureVideoUrl = _9.idCaptureVideoUrl,
22395
- idCaptureVideoAudioUrl = _9.idCaptureVideoAudioUrl,
22396
- idCaptureVideoIdFrontImage = _9.idCaptureVideoIdFrontImage,
22397
- idCaptureVideoIdBackImage = _9.idCaptureVideoIdBackImage,
22398
- setIdCaptureVideoUrl = _9.setIdCaptureVideoUrl,
22399
- setIdCaptureVideoIdFrontImage = _9.setIdCaptureVideoIdFrontImage,
22400
- setIdCaptureVideoIdBackImage = _9.setIdCaptureVideoIdBackImage,
22401
- setIdCaptureVideoAudioUrl = _9.setIdCaptureVideoAudioUrl;
22402
- var _10 = React.useState('CAPTURING_ID'),
22403
- captureState = _10[0],
22404
- setCaptureState = _10[1];
22393
+ _u = _a.idDocumentType,
22394
+ idDocumentType = _u === void 0 ? 'idCard' : _u,
22395
+ _v = _a.idCaptureGuideType,
22396
+ idCaptureGuideType = _v === void 0 ? 'fit' : _v,
22397
+ _w = _a.idCaptureGuideImages,
22398
+ idCaptureGuideImages = _w === void 0 ? defaultIdCaptureGuideImages : _w,
22399
+ _x = _a.idCapturePortraitGuidesOnMobile,
22400
+ idCapturePortraitGuidesOnMobile = _x === void 0 ? true : _x,
22401
+ _y = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
22402
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _y === void 0 ? true : _y,
22403
+ _z = _a.idCaptureModelLoadTimeoutMs,
22404
+ idCaptureModelLoadTimeoutMs = _z === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _z,
22405
+ _0 = _a.faceLivenessLoadingOverlayMode,
22406
+ faceLivenessLoadingOverlayMode = _0 === void 0 ? 'default' : _0,
22407
+ _1 = _a.disableFaceDetectionWhileAudioCapture,
22408
+ disableFaceDetectionWhileAudioCapture = _1 === void 0 ? true : _1,
22409
+ _2 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
22410
+ disableFaceDetectionWhileAudioCaptureMsDelay = _2 === void 0 ? 2000 : _2,
22411
+ _3 = _a.silentFallback,
22412
+ silentFallback = _3 === void 0 ? false : _3,
22413
+ _4 = _a.mergeAVStreams,
22414
+ mergeAVStreams = _4 === void 0 ? false : _4,
22415
+ _5 = _a.assets,
22416
+ assets = _5 === void 0 ? {} : _5,
22417
+ _6 = _a.classNames,
22418
+ classNames = _6 === void 0 ? {} : _6,
22419
+ _7 = _a.colors,
22420
+ colors = _7 === void 0 ? {} : _7,
22421
+ _8 = _a.verbiage,
22422
+ verbiage = _8 === void 0 ? {} : _8,
22423
+ _9 = _a.debugMode,
22424
+ debugMode = _9 === void 0 ? false : _9;
22425
+ var _10 = React.useContext(SubmissionContext),
22426
+ submissionStatus = _10.submissionStatus,
22427
+ idCaptureVideoUrl = _10.idCaptureVideoUrl,
22428
+ idCaptureVideoAudioUrl = _10.idCaptureVideoAudioUrl,
22429
+ idCaptureVideoIdFrontImage = _10.idCaptureVideoIdFrontImage,
22430
+ idCaptureVideoIdBackImage = _10.idCaptureVideoIdBackImage,
22431
+ setIdCaptureVideoUrl = _10.setIdCaptureVideoUrl,
22432
+ setIdCaptureVideoIdFrontImage = _10.setIdCaptureVideoIdFrontImage,
22433
+ setIdCaptureVideoIdBackImage = _10.setIdCaptureVideoIdBackImage,
22434
+ setIdCaptureVideoAudioUrl = _10.setIdCaptureVideoAudioUrl;
22435
+ var _11 = React.useState('CAPTURING_ID'),
22436
+ captureState = _11[0],
22437
+ setCaptureState = _11[1];
22405
22438
  React.useEffect(function () {
22406
22439
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
22407
22440
  }, [captureState, skipIdCapture]);
@@ -22432,9 +22465,9 @@
22432
22465
  var onVideoCaptureFaceNotDetected = React.useCallback(function () {
22433
22466
  setCaptureState('CHECKING_LIVENESS');
22434
22467
  }, []);
22435
- var _11 = React.useState(0),
22436
- attempt = _11[0],
22437
- setAttempt = _11[1];
22468
+ var _12 = React.useState(0),
22469
+ attempt = _12[0],
22470
+ setAttempt = _12[1];
22438
22471
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
22439
22472
  var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
22440
22473
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -22469,10 +22502,11 @@
22469
22502
  var _b, _c, _d, _e;
22470
22503
  var status = _a.status;
22471
22504
  return /*#__PURE__*/React.createElement(IdVideoCaptureGuides, {
22472
- idCardCaptureGuideImages: idCaptureGuideImages,
22473
22505
  classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
22474
22506
  verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
22475
22507
  requestedAction: "VERIFY_LIVENESS",
22508
+ idCaptureGuideImages: idCaptureGuideImages,
22509
+ idDocumentType: idDocumentType,
22476
22510
  faceGuideStatus: status,
22477
22511
  faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
22478
22512
  idCardGuideStatus: "disabled"
@@ -22529,6 +22563,7 @@
22529
22563
  guideType: idCaptureGuideType,
22530
22564
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
22531
22565
  rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
22566
+ captureRequirement: idDocumentType,
22532
22567
  debugMode: debugMode
22533
22568
  }))));
22534
22569
  case 'CHECKING_LIVENESS':
@@ -22565,7 +22600,8 @@
22565
22600
  onRecordingFailed: onRecordingFailed,
22566
22601
  onExitCapture: handleExitCapture,
22567
22602
  idCaptureModelsEnabled: idCaptureModelsEnabled,
22568
- idCardCaptureGuideImages: idCaptureGuideImages,
22603
+ idCaptureGuideImages: idCaptureGuideImages,
22604
+ idDocumentType: idDocumentType,
22569
22605
  videoIdCaptureThresholds: videoIdCaptureThresholds,
22570
22606
  skipShowIdCardBack: skipShowIdCardBack,
22571
22607
  disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
@@ -25106,40 +25142,42 @@
25106
25142
  _p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
25107
25143
  idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
25108
25144
  idCardForFaceMatch = _a.idCardForFaceMatch,
25109
- _q = _a.faceLivenessLoadingOverlayMode,
25110
- faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
25111
- _r = _a.disableFaceDetectionWhileAudioCapture,
25112
- disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
25113
- _s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
25114
- disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
25115
- _t = _a.silentFallback,
25116
- silentFallback = _t === void 0 ? false : _t,
25117
- _u = _a.mergeAVStreams,
25118
- mergeAVStreams = _u === void 0 ? false : _u,
25119
- _v = _a.matchOnly,
25120
- matchOnly = _v === void 0 ? false : _v,
25121
- _w = _a.theme,
25122
- theme = _w === void 0 ? 'default' : _w,
25123
- _x = _a.assets,
25124
- assets = _x === void 0 ? {} : _x,
25125
- _y = _a.classNames,
25126
- classNames = _y === void 0 ? {} : _y,
25127
- _z = _a.colors,
25128
- colors = _z === void 0 ? {} : _z,
25129
- _0 = _a.verbiage,
25130
- verbiage = _0 === void 0 ? {} : _0,
25131
- _1 = _a.captureSignature,
25132
- captureSignature = _1 === void 0 ? false : _1,
25133
- _2 = _a.captureSignatureVideo,
25134
- captureSignatureVideo = _2 === void 0 ? false : _2,
25135
- _3 = _a.captureAdditionalDocuments,
25136
- captureAdditionalDocuments = _3 === void 0 ? [] : _3,
25137
- _4 = _a.geolocationEnabled,
25138
- geolocationEnabled = _4 === void 0 ? true : _4,
25139
- _5 = _a.geolocationRequired,
25140
- geolocationRequired = _5 === void 0 ? false : _5,
25141
- _6 = _a.debugMode,
25142
- debugMode = _6 === void 0 ? false : _6;
25145
+ _q = _a.idDocumentType,
25146
+ idDocumentType = _q === void 0 ? 'idCard' : _q,
25147
+ _r = _a.faceLivenessLoadingOverlayMode,
25148
+ faceLivenessLoadingOverlayMode = _r === void 0 ? 'default' : _r,
25149
+ _s = _a.disableFaceDetectionWhileAudioCapture,
25150
+ disableFaceDetectionWhileAudioCapture = _s === void 0 ? false : _s,
25151
+ _t = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
25152
+ disableFaceDetectionWhileAudioCaptureMsDelay = _t === void 0 ? 2000 : _t,
25153
+ _u = _a.silentFallback,
25154
+ silentFallback = _u === void 0 ? false : _u,
25155
+ _v = _a.mergeAVStreams,
25156
+ mergeAVStreams = _v === void 0 ? false : _v,
25157
+ _w = _a.matchOnly,
25158
+ matchOnly = _w === void 0 ? false : _w,
25159
+ _x = _a.theme,
25160
+ theme = _x === void 0 ? 'default' : _x,
25161
+ _y = _a.assets,
25162
+ assets = _y === void 0 ? {} : _y,
25163
+ _z = _a.classNames,
25164
+ classNames = _z === void 0 ? {} : _z,
25165
+ _0 = _a.colors,
25166
+ colors = _0 === void 0 ? {} : _0,
25167
+ _1 = _a.verbiage,
25168
+ verbiage = _1 === void 0 ? {} : _1,
25169
+ _2 = _a.captureSignature,
25170
+ captureSignature = _2 === void 0 ? false : _2,
25171
+ _3 = _a.captureSignatureVideo,
25172
+ captureSignatureVideo = _3 === void 0 ? false : _3,
25173
+ _4 = _a.captureAdditionalDocuments,
25174
+ captureAdditionalDocuments = _4 === void 0 ? [] : _4,
25175
+ _5 = _a.geolocationEnabled,
25176
+ geolocationEnabled = _5 === void 0 ? true : _5,
25177
+ _6 = _a.geolocationRequired,
25178
+ geolocationRequired = _6 === void 0 ? false : _6,
25179
+ _7 = _a.debugMode,
25180
+ debugMode = _7 === void 0 ? false : _7;
25143
25181
  useLanguage(lang);
25144
25182
  useDebugLogging(debugMode);
25145
25183
  var videoIdCaptureProps = React.useMemo(function () {
@@ -25160,6 +25198,7 @@
25160
25198
  idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
25161
25199
  customOverlayContent: customOverlayContent,
25162
25200
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
25201
+ idDocumentType: idDocumentType,
25163
25202
  idCaptureGuideType: idCaptureGuideType,
25164
25203
  idCaptureGuideImages: idCaptureGuideImages,
25165
25204
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
@@ -25175,7 +25214,7 @@
25175
25214
  verbiage: verbiage,
25176
25215
  debugMode: debugMode
25177
25216
  };
25178
- }, [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]);
25217
+ }, [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]);
25179
25218
  var additionalDocumentCaptureProps = React.useMemo(function () {
25180
25219
  return {
25181
25220
  documents: captureAdditionalDocuments,