idmission-web-sdk 0.0.38 → 0.0.39

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.
Files changed (29) hide show
  1. package/README.md +29 -0
  2. package/dist/components/common/GuidanceMessage.d.ts +5 -261
  3. package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +3 -2
  4. package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +5 -2
  5. package/dist/components/customer_flows/CustomerIdentification.d.ts +3 -2
  6. package/dist/components/customer_flows/CustomerVerification.d.ts +3 -2
  7. package/dist/components/customer_flows/FaceValidation.d.ts +3 -2
  8. package/dist/components/customer_flows/IdAndFaceValidation.d.ts +5 -2
  9. package/dist/components/customer_flows/IdValidation.d.ts +3 -1
  10. package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts +4 -2
  11. package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +4 -2
  12. package/dist/components/customer_verification/CustomerVerificationCapture.d.ts +4 -2
  13. package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +4 -1
  14. package/dist/components/face_liveness/FaceLivenessCapture.d.ts +4 -2
  15. package/dist/components/face_liveness/FaceLivenessWizard.d.ts +4 -2
  16. package/dist/components/id_capture/IdCapture.d.ts +6 -1
  17. package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -2
  18. package/dist/components/selfie_capture/SelfieCapture.d.ts +6 -1
  19. package/dist/sdk2.cjs.development.js +276 -234
  20. package/dist/sdk2.cjs.development.js.map +1 -1
  21. package/dist/sdk2.cjs.production.js +1 -1
  22. package/dist/sdk2.cjs.production.js.map +1 -1
  23. package/dist/sdk2.esm.js +276 -234
  24. package/dist/sdk2.esm.js.map +1 -1
  25. package/dist/sdk2.umd.development.js +276 -234
  26. package/dist/sdk2.umd.development.js.map +1 -1
  27. package/dist/sdk2.umd.production.js +1 -1
  28. package/dist/sdk2.umd.production.js.map +1 -1
  29. package/package.json +7 -6
package/dist/sdk2.esm.js CHANGED
@@ -8492,43 +8492,45 @@ var IdCapture = function IdCapture(_a) {
8492
8492
  processingDelay = _s === void 0 ? 0 : _s,
8493
8493
  _t = _a.assets,
8494
8494
  assets = _t === void 0 ? {} : _t,
8495
- _u = _a.verbiage,
8496
- verbiage = _u === void 0 ? {} : _u,
8497
- _v = _a.debugMode,
8498
- debugMode = _v === void 0 ? false : _v;
8499
- var _w = useResizeObserver(),
8500
- ref = _w.ref,
8501
- _x = _w.width,
8502
- width = _x === void 0 ? 1 : _x,
8503
- _y = _w.height,
8504
- height = _y === void 0 ? 1 : _y;
8505
- var _z = useReducer(reducer$5, initialState$5),
8506
- state = _z[0],
8507
- dispatch = _z[1];
8508
- var _0 = useState(''),
8509
- imageURL = _0[0],
8510
- setImageURL = _0[1];
8511
- var _1 = useState(false),
8512
- processingFrame = _1[0],
8513
- setProcessingFrame = _1[1];
8514
- var _2 = useContext(CameraStateContext),
8515
- cameraRef = _2.cameraRef,
8516
- cameraReady = _2.cameraReady,
8517
- takePhoto = _2.takePhoto,
8518
- videoRef = _2.videoRef,
8519
- videoLoaded = _2.videoLoaded;
8495
+ _u = _a.colors,
8496
+ colors = _u === void 0 ? {} : _u,
8497
+ _v = _a.verbiage,
8498
+ verbiage = _v === void 0 ? {} : _v,
8499
+ _w = _a.debugMode,
8500
+ debugMode = _w === void 0 ? false : _w;
8501
+ var _x = useResizeObserver(),
8502
+ ref = _x.ref,
8503
+ _y = _x.width,
8504
+ width = _y === void 0 ? 1 : _y,
8505
+ _z = _x.height,
8506
+ height = _z === void 0 ? 1 : _z;
8507
+ var _0 = useReducer(reducer$5, initialState$5),
8508
+ state = _0[0],
8509
+ dispatch = _0[1];
8510
+ var _1 = useState(''),
8511
+ imageURL = _1[0],
8512
+ setImageURL = _1[1];
8513
+ var _2 = useState(false),
8514
+ processingFrame = _2[0],
8515
+ setProcessingFrame = _2[1];
8516
+ var _3 = useContext(CameraStateContext),
8517
+ cameraRef = _3.cameraRef,
8518
+ cameraReady = _3.cameraReady,
8519
+ takePhoto = _3.takePhoto,
8520
+ videoRef = _3.videoRef,
8521
+ videoLoaded = _3.videoLoaded;
8520
8522
  var t = useTranslation().t;
8521
8523
  var captureStartedAt = useRef();
8522
- var _3 = useContext(IdCaptureModelsContext),
8523
- modelsReady = _3.ready,
8524
- modelsWorking = _3.working,
8525
- setThresholds = _3.setThresholds,
8526
- makePrediction = _3.makePrediction,
8527
- onPredictionMade = _3.onPredictionMade,
8528
- detectionTime = _3.detectionTime,
8529
- focusPredictionTime = _3.focusPredictionTime,
8530
- getBestFrame = _3.getBestFrame,
8531
- resetBestFrame = _3.resetBestFrame;
8524
+ var _4 = useContext(IdCaptureModelsContext),
8525
+ modelsReady = _4.ready,
8526
+ modelsWorking = _4.working,
8527
+ setThresholds = _4.setThresholds,
8528
+ makePrediction = _4.makePrediction,
8529
+ onPredictionMade = _4.onPredictionMade,
8530
+ detectionTime = _4.detectionTime,
8531
+ focusPredictionTime = _4.focusPredictionTime,
8532
+ getBestFrame = _4.getBestFrame,
8533
+ resetBestFrame = _4.resetBestFrame;
8532
8534
  useEffect(function () {
8533
8535
  captureStartedAt.current = new Date();
8534
8536
  }, []);
@@ -8557,9 +8559,9 @@ var IdCapture = function IdCapture(_a) {
8557
8559
  useEffect(function () {
8558
8560
  shouldCaptureFrames.current = videoLoaded && cameraReady && modelsReady && !state.capturing && !state.captured;
8559
8561
  }, [cameraReady, state.captured, state.capturing, modelsReady, videoLoaded]);
8560
- var _4 = useState(null),
8561
- lastFrame = _4[0],
8562
- setLastFrame = _4[1];
8562
+ var _5 = useState(null),
8563
+ lastFrame = _5[0],
8564
+ setLastFrame = _5[1];
8563
8565
  useEffect(function () {
8564
8566
  if (!modelsReady || !cameraReady || !videoLoaded) return;
8565
8567
  animationFrame.current = requestAnimationFrame(function runFrame() {
@@ -8734,9 +8736,11 @@ var IdCapture = function IdCapture(_a) {
8734
8736
  }
8735
8737
  });
8736
8738
  }
8737
- verbiage.instructionText = verbiage.instructionText || t('Scan the front of ID');
8738
- verbiage.capturingText = verbiage.capturingText || t('Capturing...');
8739
- verbiage.captureFailedText = verbiage.captureFailedText || t('Capture failed!');
8739
+ colors.guideBoxUnsatisfiedColor || (colors.guideBoxUnsatisfiedColor = 'white');
8740
+ colors.guideBoxSatisfiedColor || (colors.guideBoxSatisfiedColor = 'green');
8741
+ verbiage.instructionText || (verbiage.instructionText = t('Scan the front of ID'));
8742
+ verbiage.capturingText || (verbiage.capturingText = t('Capturing...'));
8743
+ verbiage.captureFailedText || (verbiage.captureFailedText = t('Capture failed!'));
8740
8744
  return /*#__PURE__*/React__default.createElement(PageContainer, {
8741
8745
  ref: ref,
8742
8746
  className: "flex"
@@ -8747,7 +8751,7 @@ var IdCapture = function IdCapture(_a) {
8747
8751
  portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
8748
8752
  landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
8749
8753
  isMirrored: !((_c = cameraRef.current) === null || _c === void 0 ? void 0 : _c.isRearFacing),
8750
- borderColor: state.isGoodFrame ? 'green' : 'white'
8754
+ borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
8751
8755
  }), debugMode && state.detectedObjects.length > 0 && /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlay, {
8752
8756
  "$flipX": !((_d = cameraRef.current) === null || _d === void 0 ? void 0 : _d.isRearFacing)
8753
8757
  }, state.detectedObjects.map(function (obj, i) {
@@ -9342,25 +9346,27 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9342
9346
  passportFocusScoreThreshold = _k === void 0 ? 0.3 : _k,
9343
9347
  _l = _a.assets,
9344
9348
  assets = _l === void 0 ? {} : _l,
9345
- _m = _a.verbiage,
9346
- verbiage = _m === void 0 ? {} : _m,
9347
- _o = _a.debugMode,
9348
- debugMode = _o === void 0 ? false : _o;
9349
- var _p = useReducer(reducer$4, initialState$4),
9350
- state = _p[0],
9351
- dispatch = _p[1];
9349
+ _m = _a.colors,
9350
+ colors = _m === void 0 ? {} : _m,
9351
+ _o = _a.verbiage,
9352
+ verbiage = _o === void 0 ? {} : _o,
9353
+ _p = _a.debugMode,
9354
+ debugMode = _p === void 0 ? false : _p;
9355
+ var _q = useReducer(reducer$4, initialState$4),
9356
+ state = _q[0],
9357
+ dispatch = _q[1];
9352
9358
  var releaseCameraAccess = useContext(CameraStateContext).releaseCameraAccess;
9353
- var _q = useState(false),
9354
- overlayDismissed = _q[0],
9355
- setOverlayDismissed = _q[1];
9356
- var _r = useContext(SubmissionContext),
9357
- submissionStatus = _r.submissionStatus,
9358
- submissionResponse = _r.submissionResponse,
9359
- setIdFrontImage = _r.setIdFrontImage,
9360
- setIdBackImage = _r.setIdBackImage,
9361
- setPassportImage = _r.setPassportImage,
9362
- logIdFrontCaptureAttempt = _r.logIdFrontCaptureAttempt,
9363
- logIdBackCaptureAttempt = _r.logIdBackCaptureAttempt;
9359
+ var _r = useState(false),
9360
+ overlayDismissed = _r[0],
9361
+ setOverlayDismissed = _r[1];
9362
+ var _s = useContext(SubmissionContext),
9363
+ submissionStatus = _s.submissionStatus,
9364
+ submissionResponse = _s.submissionResponse,
9365
+ setIdFrontImage = _s.setIdFrontImage,
9366
+ setIdBackImage = _s.setIdBackImage,
9367
+ setPassportImage = _s.setPassportImage,
9368
+ logIdFrontCaptureAttempt = _s.logIdFrontCaptureAttempt,
9369
+ logIdBackCaptureAttempt = _s.logIdBackCaptureAttempt;
9364
9370
  var t = useTranslation().t;
9365
9371
  var operationStartedAt = useRef();
9366
9372
  useEffect(function () {
@@ -9452,9 +9458,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9452
9458
  type: 'reset'
9453
9459
  });
9454
9460
  }, []);
9455
- var _s = useState(0),
9456
- attempt = _s[0],
9457
- setAttempt = _s[1];
9461
+ var _t = useState(0),
9462
+ attempt = _t[0],
9463
+ setAttempt = _t[1];
9458
9464
  var onExit = useCallback(function () {
9459
9465
  setOverlayDismissed(false);
9460
9466
  setAttempt(function (n) {
@@ -9469,16 +9475,16 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9469
9475
  releaseCameraAccess();
9470
9476
  }
9471
9477
  }, [releaseCameraAccess, submissionStatus]);
9472
- assets.idCardFrontPortraitGuidesImageUrl = assets.idCardFrontPortraitGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg");
9473
- assets.idCardFrontLandscapeGuidesImageUrl = assets.idCardFrontLandscapeGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg");
9474
- assets.idCardBackPortraitGuidesImageUrl = assets.idCardBackPortraitGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg");
9475
- assets.idCardBackLandscapeGuidesImageUrl = assets.idCardBackLandscapeGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg");
9476
- assets.passportPortraitGuidesImageUrl = assets.passportPortraitGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg");
9477
- assets.passportLandscapeGuidesImageUrl = assets.passportLandscapeGuidesImageUrl || "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg");
9478
- assets.loadingOverlayInstructionImageUrl = assets.loadingOverlayInstructionImageUrl || "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
9479
- verbiage.idCardFrontInstructionText = verbiage.idCardFrontInstructionText || t('Scan the front of ID');
9480
- verbiage.idCardBackInstructionText = verbiage.idCardBackInstructionText || t('Scan the back of ID');
9481
- verbiage.passportInstructionText = verbiage.passportInstructionText || t('Scan the ID page of passport');
9478
+ assets.idCardFrontPortraitGuidesImageUrl || (assets.idCardFrontPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg"));
9479
+ assets.idCardFrontLandscapeGuidesImageUrl || (assets.idCardFrontLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
9480
+ assets.idCardBackPortraitGuidesImageUrl || (assets.idCardBackPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg"));
9481
+ assets.idCardBackLandscapeGuidesImageUrl || (assets.idCardBackLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
9482
+ assets.passportPortraitGuidesImageUrl || (assets.passportPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
9483
+ assets.passportLandscapeGuidesImageUrl || (assets.passportLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
9484
+ assets.loadingOverlayInstructionImageUrl || (assets.loadingOverlayInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png"));
9485
+ verbiage.idCardFrontInstructionText || (verbiage.idCardFrontInstructionText = t('Scan the front of ID'));
9486
+ verbiage.idCardBackInstructionText || (verbiage.idCardBackInstructionText = t('Scan the back of ID'));
9487
+ verbiage.passportInstructionText || (verbiage.passportInstructionText = t('Scan the ID page of passport'));
9482
9488
  var idCardFrontAssets = useMemo(function () {
9483
9489
  return {
9484
9490
  portraitGuidesImageUrl: assets.idCardFrontPortraitGuidesImageUrl,
@@ -9549,6 +9555,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9549
9555
  processingScreen: flipIdPrompt,
9550
9556
  processingDelay: 3500,
9551
9557
  assets: idCardFrontAssets,
9558
+ colors: colors,
9552
9559
  verbiage: idCardFrontVerbiage,
9553
9560
  debugMode: debugMode
9554
9561
  });
@@ -9568,6 +9575,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9568
9575
  onCapture: onCapture,
9569
9576
  onExit: onExit,
9570
9577
  assets: idCardBackAssets,
9578
+ colors: colors,
9571
9579
  verbiage: idCardBackVerbiage,
9572
9580
  debugMode: debugMode
9573
9581
  });
@@ -9587,6 +9595,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9587
9595
  onCapture: onCapture,
9588
9596
  onExit: onExit,
9589
9597
  assets: passportAssets,
9598
+ colors: colors,
9590
9599
  verbiage: passportVerbiage,
9591
9600
  debugMode: debugMode
9592
9601
  });
@@ -9895,6 +9904,19 @@ var HighPerformanceSelfieGuidanceModelsProvider = function HighPerformanceSelfie
9895
9904
  }, children);
9896
9905
  };
9897
9906
 
9907
+ var GuidanceMessageContainer = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
9908
+ var $top = _a.$top;
9909
+ return $top !== null && $top !== void 0 ? $top : '10vh';
9910
+ });
9911
+ var GuidanceMessage = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n"])), function (_a) {
9912
+ var $background = _a.$background;
9913
+ return $background !== null && $background !== void 0 ? $background : '#ccc';
9914
+ }, function (_a) {
9915
+ var $textColor = _a.$textColor;
9916
+ return $textColor !== null && $textColor !== void 0 ? $textColor : 'black';
9917
+ });
9918
+ var templateObject_1$2, templateObject_2$1;
9919
+
9898
9920
  var initialState$3 = {
9899
9921
  videoWidth: 0,
9900
9922
  videoHeight: 0,
@@ -9998,24 +10020,26 @@ var SelfieCapture = function SelfieCapture(_a) {
9998
10020
  _e = _a.timeoutDurationMs,
9999
10021
  timeoutDurationMs = _e === void 0 ? 15000 : _e,
10000
10022
  guidanceMessage = _a.guidanceMessage,
10001
- _f = _a.verbiage,
10002
- verbiage = _f === void 0 ? {} : _f,
10023
+ _f = _a.colors,
10024
+ colors = _f === void 0 ? {} : _f,
10025
+ _g = _a.verbiage,
10026
+ verbiage = _g === void 0 ? {} : _g,
10003
10027
  debugMode = _a.debugMode;
10004
10028
  var t = useTranslation().t;
10005
- var _g = useResizeObserver(),
10006
- ref = _g.ref,
10007
- _h = _g.width,
10008
- width = _h === void 0 ? 1 : _h,
10009
- _j = _g.height,
10010
- height = _j === void 0 ? 1 : _j;
10011
- var _k = useReducer(reducer$3, initialState$3),
10012
- state = _k[0],
10013
- dispatch = _k[1];
10014
- var _l = useContext(CameraStateContext),
10015
- cameraRef = _l.cameraRef,
10016
- cameraReady = _l.cameraReady,
10017
- takePhoto = _l.takePhoto,
10018
- videoRef = _l.videoRef;
10029
+ var _h = useResizeObserver(),
10030
+ ref = _h.ref,
10031
+ _j = _h.width,
10032
+ width = _j === void 0 ? 1 : _j,
10033
+ _k = _h.height,
10034
+ height = _k === void 0 ? 1 : _k;
10035
+ var _l = useReducer(reducer$3, initialState$3),
10036
+ state = _l[0],
10037
+ dispatch = _l[1];
10038
+ var _m = useContext(CameraStateContext),
10039
+ cameraRef = _m.cameraRef,
10040
+ cameraReady = _m.cameraReady,
10041
+ takePhoto = _m.takePhoto,
10042
+ videoRef = _m.videoRef;
10019
10043
  var onPredictionMade = useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
10020
10044
  useEffect(function () {
10021
10045
  if (cameraReady && videoRef.current && videoRef.current.videoWidth !== 0) {
@@ -10038,9 +10062,9 @@ var SelfieCapture = function SelfieCapture(_a) {
10038
10062
  });
10039
10063
  });
10040
10064
  }, [onPredictionMade]);
10041
- var _m = useState(false),
10042
- captureReady = _m[0],
10043
- setCaptureReady = _m[1];
10065
+ var _o = useState(false),
10066
+ captureReady = _o[0],
10067
+ setCaptureReady = _o[1];
10044
10068
  useEffect(function () {
10045
10069
  var timer;
10046
10070
  if (state.faceReady) {
@@ -10084,12 +10108,12 @@ var SelfieCapture = function SelfieCapture(_a) {
10084
10108
  });
10085
10109
  })();
10086
10110
  }, [captureReady, onSelfieCaptured, state.faces, takePhoto]);
10087
- var _o = useState(),
10088
- timeoutStartedAt = _o[0],
10089
- setTimeoutStartedAt = _o[1];
10090
- var _p = useState(false),
10091
- timedOut = _p[0],
10092
- setTimedOut = _p[1];
10111
+ var _p = useState(),
10112
+ timeoutStartedAt = _p[0],
10113
+ setTimeoutStartedAt = _p[1];
10114
+ var _q = useState(false),
10115
+ timedOut = _q[0],
10116
+ setTimedOut = _q[1];
10093
10117
  useEffect(function () {
10094
10118
  if (!timeoutDurationMs) return;
10095
10119
  setTimeoutStartedAt(new Date());
@@ -10110,36 +10134,24 @@ var SelfieCapture = function SelfieCapture(_a) {
10110
10134
  videoWidth: state.videoWidth,
10111
10135
  videoHeight: state.videoHeight
10112
10136
  });
10137
+ colors.guidesUnsatisfiedColor || (colors.guidesUnsatisfiedColor = 'white');
10138
+ colors.guidesSatisfiedColor || (colors.guidesSatisfiedColor = 'green');
10113
10139
  if (!guidanceMessage) {
10114
- verbiage.guidanceHoldStillText = verbiage.guidanceHoldStillText || t('Hold still for a few seconds...');
10115
- verbiage.guidanceLookStraightText = verbiage.guidanceLookStraightText || t('Look straight into the camera...');
10116
- verbiage.guidanceMoveBackText = verbiage.guidanceMoveBackText || t('Move back...');
10117
- verbiage.guidanceMoveForwardText = verbiage.guidanceMoveForwardText || t('Move forward...');
10118
- verbiage.guidanceMoveToCenterText = verbiage.guidanceMoveToCenterText || t('Move to the center...');
10140
+ verbiage.guidanceHoldStillText || (verbiage.guidanceHoldStillText = t('Hold still for a few seconds...'));
10141
+ verbiage.guidanceLookStraightText || (verbiage.guidanceLookStraightText = t('Look straight into the camera...'));
10142
+ verbiage.guidanceMoveBackText || (verbiage.guidanceMoveBackText = t('Move back...'));
10143
+ verbiage.guidanceMoveForwardText || (verbiage.guidanceMoveForwardText = t('Move forward...'));
10144
+ verbiage.guidanceMoveToCenterText || (verbiage.guidanceMoveToCenterText = t('Move to the center...'));
10119
10145
  guidanceMessage = state.faceReady ? verbiage.guidanceHoldStillText : state.faceLookingAway ? verbiage.guidanceLookStraightText : state.faceTooClose ? verbiage.guidanceMoveBackText : state.faceTooFar ? verbiage.guidanceMoveForwardText : state.faceNotCentered ? verbiage.guidanceMoveToCenterText : '';
10120
10146
  }
10121
10147
  return /*#__PURE__*/React__default.createElement(PageContainer, {
10122
10148
  ref: ref,
10123
10149
  className: "flex"
10124
10150
  }, /*#__PURE__*/React__default.createElement(CameraVideoTag, null), /*#__PURE__*/React__default.createElement(FaceCaptureGuideOverlay, {
10125
- borderColor: state.faceReady ? 'green' : 'white'
10126
- }), guidanceMessage !== '' && /*#__PURE__*/React__default.createElement("div", {
10127
- style: {
10128
- position: 'absolute',
10129
- top: 'calc(10vh)',
10130
- fontWeight: 'bold',
10131
- width: '100%',
10132
- display: 'flex'
10133
- }
10134
- }, /*#__PURE__*/React__default.createElement("div", {
10135
- style: {
10136
- marginLeft: 'auto',
10137
- marginRight: 'auto',
10138
- background: state.faceReady ? 'green' : 'red',
10139
- color: 'white',
10140
- padding: '10px 12px 8px',
10141
- borderRadius: 8
10142
- }
10151
+ borderColor: state.faceReady ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
10152
+ }), guidanceMessage !== '' && /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, null, /*#__PURE__*/React__default.createElement(GuidanceMessage, {
10153
+ "$background": state.faceReady ? 'green' : 'red',
10154
+ "$textColor": "white"
10143
10155
  }, guidanceMessage)), debugMode && state.faces.length > 0 && /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlay, {
10144
10156
  "$flipX": !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing)
10145
10157
  }, state.faces.map(function (face, i) {
@@ -10244,14 +10256,16 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10244
10256
  onExit = _a.onExit,
10245
10257
  _b = _a.timeoutDurationMs,
10246
10258
  timeoutDurationMs = _b === void 0 ? 15000 : _b,
10247
- _c = _a.verbiage,
10248
- verbiage = _c === void 0 ? {} : _c,
10259
+ _c = _a.colors,
10260
+ colors = _c === void 0 ? {} : _c,
10261
+ _d = _a.verbiage,
10262
+ verbiage = _d === void 0 ? {} : _d,
10249
10263
  debugMode = _a.debugMode;
10250
10264
  var t = useTranslation().t;
10251
10265
  var checkLiveness = useContext(SubmissionContext).checkLiveness;
10252
- var _d = useReducer(reducer$2, initialState$2),
10253
- state = _d[0],
10254
- dispatch = _d[1];
10266
+ var _e = useReducer(reducer$2, initialState$2),
10267
+ state = _e[0],
10268
+ dispatch = _e[1];
10255
10269
  var onSelfieCaptured = useCallback(function (frame, face) {
10256
10270
  onCapture === null || onCapture === void 0 ? void 0 : onCapture();
10257
10271
  dispatch({
@@ -10319,9 +10333,9 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10319
10333
  onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
10320
10334
  }
10321
10335
  }, [onTimeout, state.timesLivenessCheckFailed]);
10322
- verbiage.guidanceRemoveEyeCoveringsText = verbiage.guidanceRemoveEyeCoveringsText || t('Please remove your eye coverings (sunglasses, eye patch, etc.)...');
10323
- verbiage.guidanceRemoveHeadCoveringsText = verbiage.guidanceRemoveHeadCoveringsText || t('Please remove your head coverings (hat, scarf, etc.)...');
10324
- verbiage.guidanceRemoveMaskText = verbiage.guidanceRemoveMaskText || t('Please remove your mask...');
10336
+ verbiage.guidanceRemoveEyeCoveringsText || (verbiage.guidanceRemoveEyeCoveringsText = t('Please remove your eye coverings (sunglasses, eye patch, etc.)...'));
10337
+ verbiage.guidanceRemoveHeadCoveringsText || (verbiage.guidanceRemoveHeadCoveringsText = t('Please remove your head coverings (hat, scarf, etc.)...'));
10338
+ verbiage.guidanceRemoveMaskText || (verbiage.guidanceRemoveMaskText = t('Please remove your mask...'));
10325
10339
  var guidanceMessage = state.eyeCoveringDetected ? verbiage.guidanceRemoveEyeCoveringsText : state.headCoveringDetected ? verbiage.guidanceRemoveHeadCoveringsText : state.maskDetected ? verbiage.guidanceRemoveMaskText : undefined;
10326
10340
  return /*#__PURE__*/React__default.createElement(SelfieCapture, {
10327
10341
  onSelfieCaptured: onSelfieCaptured,
@@ -10329,6 +10343,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
10329
10343
  onExit: onExit,
10330
10344
  timeoutDurationMs: timeoutDurationMs,
10331
10345
  guidanceMessage: guidanceMessage,
10346
+ colors: colors,
10332
10347
  verbiage: verbiage,
10333
10348
  debugMode: debugMode
10334
10349
  });
@@ -10520,26 +10535,28 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
10520
10535
  timeoutDurationMs = _b === void 0 ? 15000 : _b,
10521
10536
  _c = _a.maxRetries,
10522
10537
  maxRetries = _c === void 0 ? 2 : _c,
10523
- _d = _a.debugMode,
10524
- debugMode = _d === void 0 ? false : _d,
10525
- _e = _a.verbiage,
10526
- verbiage = _e === void 0 ? {} : _e,
10527
- _f = _a.assets,
10528
- assets = _f === void 0 ? {} : _f;
10529
- var _g = useContext(SubmissionContext),
10530
- submissionResponse = _g.submissionResponse,
10531
- setSelfieImage = _g.setSelfieImage,
10532
- logSelfieCaptureAttempt = _g.logSelfieCaptureAttempt;
10538
+ _d = _a.assets,
10539
+ assets = _d === void 0 ? {} : _d,
10540
+ _e = _a.colors,
10541
+ colors = _e === void 0 ? {} : _e,
10542
+ _f = _a.verbiage,
10543
+ verbiage = _f === void 0 ? {} : _f,
10544
+ _g = _a.debugMode,
10545
+ debugMode = _g === void 0 ? false : _g;
10546
+ var _h = useContext(SubmissionContext),
10547
+ submissionResponse = _h.submissionResponse,
10548
+ setSelfieImage = _h.setSelfieImage,
10549
+ logSelfieCaptureAttempt = _h.logSelfieCaptureAttempt;
10533
10550
  var releaseCameraAccess = useContext(CameraStateContext).releaseCameraAccess;
10534
- var _h = useState(''),
10535
- faceCropImageUrl = _h[0],
10536
- setFaceCropImageUrl = _h[1];
10537
- var _j = useState(0),
10538
- retryCount = _j[0],
10539
- setRetryCount = _j[1];
10540
- var _k = useState('LOADING'),
10541
- captureState = _k[0],
10542
- setCaptureState = _k[1];
10551
+ var _j = useState(''),
10552
+ faceCropImageUrl = _j[0],
10553
+ setFaceCropImageUrl = _j[1];
10554
+ var _k = useState(0),
10555
+ retryCount = _k[0],
10556
+ setRetryCount = _k[1];
10557
+ var _l = useState('LOADING'),
10558
+ captureState = _l[0],
10559
+ setCaptureState = _l[1];
10543
10560
  var captureStartedAt = useRef();
10544
10561
  var captureEndedAt = useRef();
10545
10562
  var operationStartedAt = useRef();
@@ -10585,9 +10602,9 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
10585
10602
  setCaptureState('FAILED');
10586
10603
  onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout(submissionResponse);
10587
10604
  }, [onTimeout, submissionResponse]);
10588
- var _l = useState(0),
10589
- attempt = _l[0],
10590
- setAttempt = _l[1];
10605
+ var _m = useState(0),
10606
+ attempt = _m[0],
10607
+ setAttempt = _m[1];
10591
10608
  var onExitCallback = useCallback(function () {
10592
10609
  setAttempt(function (n) {
10593
10610
  return n + 1;
@@ -10604,6 +10621,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
10604
10621
  onTimeout: onTimeoutCallback,
10605
10622
  onExit: onExitCallback,
10606
10623
  timeoutDurationMs: timeoutDurationMs,
10624
+ colors: colors,
10607
10625
  verbiage: verbiage,
10608
10626
  debugMode: debugMode
10609
10627
  });
@@ -11131,8 +11149,8 @@ function truncate(str, max_chars) {
11131
11149
  return truncated;
11132
11150
  }
11133
11151
 
11134
- var Spinner = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
11135
- var templateObject_1$2;
11152
+ var Spinner = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
11153
+ var templateObject_1$1;
11136
11154
 
11137
11155
  var AdditionalDocumentCapture = function AdditionalDocumentCapture(_a) {
11138
11156
  var document = _a.document,
@@ -11278,18 +11296,11 @@ function signatureDataToIdmissionFormat(signatureCanvas) {
11278
11296
  return signatureData;
11279
11297
  }
11280
11298
 
11281
- var SignatureCanvasContainer = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
11282
- var SignaturePad = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"], ["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"])));
11299
+ var SignatureCanvasContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
11300
+ var SignaturePad = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"], ["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"])));
11283
11301
  var SignatureButtonsContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"], ["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"])));
11284
11302
  var SignaturePaperBacking = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"])));
11285
- var templateObject_1$1, templateObject_2$1, templateObject_3, templateObject_4;
11286
-
11287
- var GuidanceMessageContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
11288
- var $top = _a.$top;
11289
- return $top !== null && $top !== void 0 ? $top : '10vh';
11290
- });
11291
- var GuidanceMessage = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"])));
11292
- var templateObject_1, templateObject_2;
11303
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
11293
11304
 
11294
11305
  var SignatureCapture = function SignatureCapture(_a) {
11295
11306
  var onAccept = _a.onAccept,
@@ -11990,20 +12001,22 @@ var IdValidation = function IdValidation(_a) {
11990
12001
  onDenied = _a.onDenied,
11991
12002
  _j = _a.assets,
11992
12003
  assets = _j === void 0 ? {} : _j,
11993
- _k = _a.verbiage,
11994
- verbiage = _k === void 0 ? {} : _k,
11995
- _l = _a.captureSignature,
11996
- captureSignature = _l === void 0 ? false : _l,
11997
- _m = _a.captureSignatureVideo,
11998
- captureSignatureVideo = _m === void 0 ? false : _m,
11999
- _o = _a.captureAdditionalDocuments,
12000
- captureAdditionalDocuments = _o === void 0 ? [] : _o,
12001
- _p = _a.geolocationEnabled,
12002
- geolocationEnabled = _p === void 0 ? true : _p,
12003
- _q = _a.geolocationRequired,
12004
- geolocationRequired = _q === void 0 ? false : _q,
12005
- _r = _a.debugMode,
12006
- debugMode = _r === void 0 ? false : _r;
12004
+ _k = _a.colors,
12005
+ colors = _k === void 0 ? {} : _k,
12006
+ _l = _a.verbiage,
12007
+ verbiage = _l === void 0 ? {} : _l,
12008
+ _m = _a.captureSignature,
12009
+ captureSignature = _m === void 0 ? false : _m,
12010
+ _o = _a.captureSignatureVideo,
12011
+ captureSignatureVideo = _o === void 0 ? false : _o,
12012
+ _p = _a.captureAdditionalDocuments,
12013
+ captureAdditionalDocuments = _p === void 0 ? [] : _p,
12014
+ _q = _a.geolocationEnabled,
12015
+ geolocationEnabled = _q === void 0 ? true : _q,
12016
+ _r = _a.geolocationRequired,
12017
+ geolocationRequired = _r === void 0 ? false : _r,
12018
+ _s = _a.debugMode,
12019
+ debugMode = _s === void 0 ? false : _s;
12007
12020
  useLanguage(lang);
12008
12021
  var idCaptureProps = useMemo(function () {
12009
12022
  return {
@@ -12015,10 +12028,11 @@ var IdValidation = function IdValidation(_a) {
12015
12028
  passportFocusScoreThreshold: passportFocusScoreThreshold,
12016
12029
  barcodeScanningEnabled: false,
12017
12030
  assets: assets,
12031
+ colors: colors,
12018
12032
  verbiage: verbiage,
12019
12033
  debugMode: debugMode
12020
12034
  };
12021
- }, [assets, debugMode, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, verbiage]);
12035
+ }, [assets, colors, debugMode, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, verbiage]);
12022
12036
  var signatureCaptureProps = useMemo(function () {
12023
12037
  return {
12024
12038
  verbiage: {
@@ -12093,6 +12107,7 @@ var FaceValidation = function FaceValidation(_a) {
12093
12107
  onDenied = _a.onDenied,
12094
12108
  onExitAfterFailure = _a.onExitAfterFailure,
12095
12109
  assets = _a.assets,
12110
+ colors = _a.colors,
12096
12111
  verbiage = _a.verbiage,
12097
12112
  _e = _a.geolocationEnabled,
12098
12113
  geolocationEnabled = _e === void 0 ? true : _e,
@@ -12109,10 +12124,11 @@ var FaceValidation = function FaceValidation(_a) {
12109
12124
  onTimeout: onDenied,
12110
12125
  onExitAfterFailure: onExitAfterFailure,
12111
12126
  assets: assets,
12127
+ colors: colors,
12112
12128
  verbiage: verbiage,
12113
12129
  debugMode: debugMode
12114
12130
  };
12115
- }, [assets, debugMode, onApproved, onComplete, onDenied, onExitAfterFailure, timeoutDurationMs, verbiage]);
12131
+ }, [assets, colors, debugMode, onApproved, onComplete, onDenied, onExitAfterFailure, timeoutDurationMs, verbiage]);
12116
12132
  return /*#__PURE__*/React__default.createElement(SubmissionProvider, {
12117
12133
  action: SubmissionAction.NONE,
12118
12134
  environment: submissionEnvironment,
@@ -12162,10 +12178,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
12162
12178
  _j = _a.passportFocusScoreThreshold,
12163
12179
  passportFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
12164
12180
  idCaptureAssets = _a.idCaptureAssets,
12181
+ idCaptureColors = _a.idCaptureColors,
12165
12182
  idCaptureVerbiage = _a.idCaptureVerbiage,
12166
12183
  _k = _a.faceLivenessTimeoutDurationMs,
12167
12184
  faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
12168
12185
  faceLivenessAssets = _a.faceLivenessAssets,
12186
+ faceLivenessColors = _a.faceLivenessColors,
12169
12187
  faceLivenessVerbiage = _a.faceLivenessVerbiage,
12170
12188
  onBeforeSubmit = _a.onBeforeSubmit,
12171
12189
  onComplete = _a.onComplete,
@@ -12188,6 +12206,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
12188
12206
  var idCaptureProps = useMemo(function () {
12189
12207
  return {
12190
12208
  assets: idCaptureAssets,
12209
+ colors: idCaptureColors,
12191
12210
  verbiage: idCaptureVerbiage,
12192
12211
  autoCaptureEnabled: idAutoCaptureEnabled,
12193
12212
  idCardAutoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
@@ -12197,17 +12216,18 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
12197
12216
  passportFocusScoreThreshold: passportFocusScoreThreshold,
12198
12217
  debugMode: debugMode
12199
12218
  };
12200
- }, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
12219
+ }, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureColors, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
12201
12220
  var faceLivenessProps = useMemo(function () {
12202
12221
  return {
12203
12222
  timeoutDurationMs: faceLivenessTimeoutDurationMs,
12204
12223
  onTimeout: onDenied,
12205
12224
  onExitAfterFailure: onExitAfterFailure,
12206
12225
  assets: faceLivenessAssets,
12226
+ colors: faceLivenessColors,
12207
12227
  verbiage: faceLivenessVerbiage,
12208
12228
  debugMode: debugMode
12209
12229
  };
12210
- }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied, onExitAfterFailure]);
12230
+ }, [debugMode, faceLivenessAssets, faceLivenessColors, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied, onExitAfterFailure]);
12211
12231
  var signatureCaptureProps = useMemo(function () {
12212
12232
  return {
12213
12233
  verbiage: {
@@ -12295,10 +12315,12 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12295
12315
  _j = _a.passportFocusScoreThreshold,
12296
12316
  passportFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
12297
12317
  idCaptureAssets = _a.idCaptureAssets,
12318
+ idCaptureColors = _a.idCaptureColors,
12298
12319
  idCaptureVerbiage = _a.idCaptureVerbiage,
12299
12320
  _k = _a.faceLivenessTimeoutDurationMs,
12300
12321
  faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
12301
12322
  faceLivenessAssets = _a.faceLivenessAssets,
12323
+ faceLivenessColors = _a.faceLivenessColors,
12302
12324
  faceLivenessVerbiage = _a.faceLivenessVerbiage,
12303
12325
  onBeforeSubmit = _a.onBeforeSubmit,
12304
12326
  onComplete = _a.onComplete,
@@ -12321,6 +12343,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12321
12343
  var idCaptureProps = useMemo(function () {
12322
12344
  return {
12323
12345
  assets: idCaptureAssets,
12346
+ colors: idCaptureColors,
12324
12347
  verbiage: idCaptureVerbiage,
12325
12348
  autoCaptureEnabled: idAutoCaptureEnabled,
12326
12349
  idCardAutoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
@@ -12330,16 +12353,17 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12330
12353
  passportFocusScoreThreshold: passportFocusScoreThreshold,
12331
12354
  debugMode: debugMode
12332
12355
  };
12333
- }, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
12356
+ }, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureColors, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
12334
12357
  var faceLivenessProps = useMemo(function () {
12335
12358
  return {
12336
12359
  onExitAfterFailure: onExitAfterFailure,
12337
12360
  timeoutDurationMs: faceLivenessTimeoutDurationMs,
12338
12361
  assets: faceLivenessAssets,
12362
+ colors: faceLivenessColors,
12339
12363
  verbiage: faceLivenessVerbiage,
12340
12364
  debugMode: debugMode
12341
12365
  };
12342
- }, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onExitAfterFailure]);
12366
+ }, [debugMode, faceLivenessAssets, faceLivenessColors, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onExitAfterFailure]);
12343
12367
  var signatureCaptureProps = useMemo(function () {
12344
12368
  return {
12345
12369
  verbiage: {
@@ -12472,20 +12496,22 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
12472
12496
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
12473
12497
  onExit = _a.onExit,
12474
12498
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
12475
- _b = _a.verbiage,
12476
- verbiage = _b === void 0 ? {} : _b,
12477
- _c = _a.debugMode,
12478
- debugMode = _c === void 0 ? false : _c;
12479
- var _d = useReducer(reducer$1, initialState$1),
12480
- state = _d[0],
12481
- dispatch = _d[1];
12499
+ _b = _a.colors,
12500
+ colors = _b === void 0 ? {} : _b,
12501
+ _c = _a.verbiage,
12502
+ verbiage = _c === void 0 ? {} : _c,
12503
+ _d = _a.debugMode,
12504
+ debugMode = _d === void 0 ? false : _d;
12505
+ var _e = useReducer(reducer$1, initialState$1),
12506
+ state = _e[0],
12507
+ dispatch = _e[1];
12482
12508
  var frame = state.frame,
12483
12509
  face = state.face;
12484
- var _e = useContext(SubmissionContext),
12485
- submit = _e.submit,
12486
- submissionResponse = _e.submissionResponse,
12487
- selfieImage = _e.selfieImage,
12488
- setSelfieImage = _e.setSelfieImage;
12510
+ var _f = useContext(SubmissionContext),
12511
+ submit = _f.submit,
12512
+ submissionResponse = _f.submissionResponse,
12513
+ selfieImage = _f.selfieImage,
12514
+ setSelfieImage = _f.setSelfieImage;
12489
12515
  var onSelfieCaptured = useCallback(function (frame, face) {
12490
12516
  dispatch({
12491
12517
  type: 'verificationReady',
@@ -12558,6 +12584,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
12558
12584
  onTimeout: onCaptureGuidanceTimeout,
12559
12585
  onExit: onExit,
12560
12586
  timeoutDurationMs: captureGuidanceTimeoutDurationMs,
12587
+ colors: colors,
12561
12588
  verbiage: verbiage,
12562
12589
  debugMode: debugMode
12563
12590
  });
@@ -12668,17 +12695,19 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12668
12695
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
12669
12696
  _b = _a.assets,
12670
12697
  assets = _b === void 0 ? {} : _b,
12671
- _c = _a.verbiage,
12672
- verbiage = _c === void 0 ? {} : _c,
12673
- _d = _a.debugMode,
12674
- debugMode = _d === void 0 ? false : _d;
12675
- var _e = useContext(SubmissionContext),
12676
- submissionResponse = _e.submissionResponse,
12677
- selfieImage = _e.selfieImage;
12698
+ _c = _a.colors,
12699
+ colors = _c === void 0 ? {} : _c,
12700
+ _d = _a.verbiage,
12701
+ verbiage = _d === void 0 ? {} : _d,
12702
+ _e = _a.debugMode,
12703
+ debugMode = _e === void 0 ? false : _e;
12704
+ var _f = useContext(SubmissionContext),
12705
+ submissionResponse = _f.submissionResponse,
12706
+ selfieImage = _f.selfieImage;
12678
12707
  var releaseCameraAccess = useContext(CameraStateContext).releaseCameraAccess;
12679
- var _f = useState('LOADING'),
12680
- captureState = _f[0],
12681
- setCaptureState = _f[1];
12708
+ var _g = useState('LOADING'),
12709
+ captureState = _g[0],
12710
+ setCaptureState = _g[1];
12682
12711
  var onCustomerMatchedCallback = useCallback(function (response) {
12683
12712
  return __awaiter(void 0, void 0, void 0, function () {
12684
12713
  return __generator(this, function (_a) {
@@ -12710,9 +12739,9 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12710
12739
  onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
12711
12740
  }, 0);
12712
12741
  }, [onCaptureGuidanceTimeout, releaseCameraAccess]);
12713
- var _g = useState(0),
12714
- attempt = _g[0],
12715
- setAttempt = _g[1];
12742
+ var _h = useState(0),
12743
+ attempt = _h[0],
12744
+ setAttempt = _h[1];
12716
12745
  var onExitCallback = useCallback(function () {
12717
12746
  setAttempt(function (n) {
12718
12747
  return n + 1;
@@ -12728,6 +12757,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12728
12757
  onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
12729
12758
  onExit: onExitCallback,
12730
12759
  captureGuidanceTimeoutDurationMs: captureGuidanceTimeoutDurationMs,
12760
+ colors: colors,
12731
12761
  verbiage: verbiage,
12732
12762
  debugMode: debugMode
12733
12763
  });
@@ -12786,6 +12816,7 @@ var CustomerVerification = function CustomerVerification(_a) {
12786
12816
  _d = _a.timeoutDurationMs,
12787
12817
  timeoutDurationMs = _d === void 0 ? 15000 : _d,
12788
12818
  assets = _a.assets,
12819
+ colors = _a.colors,
12789
12820
  verbiage = _a.verbiage,
12790
12821
  onBeforeSubmit = _a.onBeforeSubmit,
12791
12822
  onComplete = _a.onComplete,
@@ -12821,6 +12852,7 @@ var CustomerVerification = function CustomerVerification(_a) {
12821
12852
  onExitAfterFailure: onExitAfterFailure,
12822
12853
  captureGuidanceTimeoutDurationMs: timeoutDurationMs,
12823
12854
  assets: assets,
12855
+ colors: colors,
12824
12856
  verbiage: verbiage,
12825
12857
  debugMode: debugMode
12826
12858
  }))));
@@ -12899,18 +12931,20 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
12899
12931
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
12900
12932
  onExit = _a.onExit,
12901
12933
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
12902
- _b = _a.verbiage,
12903
- verbiage = _b === void 0 ? {} : _b,
12904
- _c = _a.debugMode,
12905
- debugMode = _c === void 0 ? false : _c;
12906
- var _d = useReducer(reducer, initialState),
12907
- state = _d[0],
12908
- dispatch = _d[1];
12909
- var _e = useContext(SubmissionContext),
12910
- submit = _e.submit,
12911
- submissionResponse = _e.submissionResponse,
12912
- selfieImage = _e.selfieImage,
12913
- setSelfieImage = _e.setSelfieImage;
12934
+ _b = _a.colors,
12935
+ colors = _b === void 0 ? {} : _b,
12936
+ _c = _a.verbiage,
12937
+ verbiage = _c === void 0 ? {} : _c,
12938
+ _d = _a.debugMode,
12939
+ debugMode = _d === void 0 ? false : _d;
12940
+ var _e = useReducer(reducer, initialState),
12941
+ state = _e[0],
12942
+ dispatch = _e[1];
12943
+ var _f = useContext(SubmissionContext),
12944
+ submit = _f.submit,
12945
+ submissionResponse = _f.submissionResponse,
12946
+ selfieImage = _f.selfieImage,
12947
+ setSelfieImage = _f.setSelfieImage;
12914
12948
  var onSelfieCaptured = useCallback(function (frame, face) {
12915
12949
  dispatch({
12916
12950
  type: 'identificationReady',
@@ -12985,6 +13019,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
12985
13019
  onTimeout: onCaptureGuidanceTimeout,
12986
13020
  onExit: onExit,
12987
13021
  timeoutDurationMs: captureGuidanceTimeoutDurationMs,
13022
+ colors: colors,
12988
13023
  verbiage: verbiage,
12989
13024
  debugMode: debugMode
12990
13025
  });
@@ -13095,17 +13130,19 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13095
13130
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
13096
13131
  _b = _a.assets,
13097
13132
  assets = _b === void 0 ? {} : _b,
13098
- _c = _a.verbiage,
13099
- verbiage = _c === void 0 ? {} : _c,
13100
- _d = _a.debugMode,
13101
- debugMode = _d === void 0 ? false : _d;
13102
- var _e = useContext(SubmissionContext),
13103
- submissionResponse = _e.submissionResponse,
13104
- selfieImage = _e.selfieImage;
13133
+ _c = _a.colors,
13134
+ colors = _c === void 0 ? {} : _c,
13135
+ _d = _a.verbiage,
13136
+ verbiage = _d === void 0 ? {} : _d,
13137
+ _e = _a.debugMode,
13138
+ debugMode = _e === void 0 ? false : _e;
13139
+ var _f = useContext(SubmissionContext),
13140
+ submissionResponse = _f.submissionResponse,
13141
+ selfieImage = _f.selfieImage;
13105
13142
  var releaseCameraAccess = useContext(CameraStateContext).releaseCameraAccess;
13106
- var _f = useState('LOADING'),
13107
- captureState = _f[0],
13108
- setCaptureState = _f[1];
13143
+ var _g = useState('LOADING'),
13144
+ captureState = _g[0],
13145
+ setCaptureState = _g[1];
13109
13146
  var onCustomerMatchedCallback = useCallback(function (response) {
13110
13147
  return __awaiter(void 0, void 0, void 0, function () {
13111
13148
  return __generator(this, function (_a) {
@@ -13137,9 +13174,9 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13137
13174
  onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
13138
13175
  }, 0);
13139
13176
  }, [onCaptureGuidanceTimeout, releaseCameraAccess]);
13140
- var _g = useState(0),
13141
- attempt = _g[0],
13142
- setAttempt = _g[1];
13177
+ var _h = useState(0),
13178
+ attempt = _h[0],
13179
+ setAttempt = _h[1];
13143
13180
  var onExitCallback = useCallback(function () {
13144
13181
  setAttempt(function (n) {
13145
13182
  return n + 1;
@@ -13155,6 +13192,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13155
13192
  onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
13156
13193
  onExit: onExitCallback,
13157
13194
  captureGuidanceTimeoutDurationMs: captureGuidanceTimeoutDurationMs,
13195
+ colors: colors,
13158
13196
  verbiage: verbiage,
13159
13197
  debugMode: debugMode
13160
13198
  });
@@ -13219,6 +13257,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
13219
13257
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
13220
13258
  onExitAfterFailure = _a.onExitAfterFailure,
13221
13259
  assets = _a.assets,
13260
+ colors = _a.colors,
13222
13261
  verbiage = _a.verbiage,
13223
13262
  geolocationEnabled = _a.geolocationEnabled,
13224
13263
  _e = _a.geolocationRequired,
@@ -13248,6 +13287,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
13248
13287
  onCaptureGuidanceTimeout: onCaptureGuidanceTimeout,
13249
13288
  captureGuidanceTimeoutDurationMs: timeoutDurationMs,
13250
13289
  assets: assets,
13290
+ colors: colors,
13251
13291
  verbiage: verbiage,
13252
13292
  debugMode: debugMode
13253
13293
  }))));
@@ -13305,6 +13345,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
13305
13345
  _d = _a.timeoutDurationMs,
13306
13346
  timeoutDurationMs = _d === void 0 ? 15000 : _d,
13307
13347
  assets = _a.assets,
13348
+ colors = _a.colors,
13308
13349
  verbiage = _a.verbiage,
13309
13350
  onBeforeSubmit = _a.onBeforeSubmit,
13310
13351
  onComplete = _a.onComplete,
@@ -13329,10 +13370,11 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
13329
13370
  onExitAfterFailure: onExitAfterFailure,
13330
13371
  timeoutDurationMs: timeoutDurationMs,
13331
13372
  assets: assets,
13373
+ colors: colors,
13332
13374
  verbiage: verbiage,
13333
13375
  debugMode: debugMode
13334
13376
  };
13335
- }, [assets, debugMode, onExitAfterFailure, timeoutDurationMs, verbiage]);
13377
+ }, [assets, colors, debugMode, onExitAfterFailure, timeoutDurationMs, verbiage]);
13336
13378
  var signatureCaptureProps = useMemo(function () {
13337
13379
  return {
13338
13380
  verbiage: {