idmission-web-sdk 2.3.34 → 2.3.36

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.3.34';
214
+ var webSdkVersion = '2.3.36';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -482,7 +482,7 @@
482
482
  var OverlayImageContainer = styled.div(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
483
483
  var OverlayImageRow = styled.div(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
484
484
  var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
485
- var ButtonsColumn = styled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
485
+ var ButtonsColumn = styled.div(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
486
486
  var WideButton = styled(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
487
487
  var WideBorderButton = styled(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
488
488
  var _a, _b;
@@ -521,7 +521,7 @@
521
521
  var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
522
522
  var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
523
523
  var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
524
- var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$9, templateObject_7$6, templateObject_8$4, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
524
+ var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$6, templateObject_8$4, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
525
525
 
526
526
  function _extends() {
527
527
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
@@ -16720,7 +16720,7 @@
16720
16720
  var _a, _b, _c, _d, _e, _f;
16721
16721
  return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
16722
16722
  });
16723
- var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
16723
+ var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
16724
16724
  var _a, _b, _c, _d;
16725
16725
  return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
16726
16726
  }, function (props) {
@@ -16750,7 +16750,7 @@
16750
16750
  var _a, _b, _c, _d;
16751
16751
  return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
16752
16752
  });
16753
- var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$8, templateObject_7$5, templateObject_8$3;
16753
+ var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$5, templateObject_8$3;
16754
16754
 
16755
16755
  var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
16756
16756
  var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
@@ -17001,8 +17001,8 @@
17001
17001
  var ImageRow = styled(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
17002
17002
  var ImageCol$1 = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
17003
17003
  var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
17004
- var DebugPre = styled.pre(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
17005
- var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$7;
17004
+ var DebugPre = styled.pre(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
17005
+ var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$8;
17006
17006
 
17007
17007
  function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
17008
17008
  var _this = this;
@@ -17101,15 +17101,12 @@
17101
17101
  var progressBarIndicatorColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.progressBarIndicatorColor) !== null && _o !== void 0 ? _o : '#287ec6';
17102
17102
  var progressBarWidth = (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.progressBarWidth) !== null && _r !== void 0 ? _r : borderWidth;
17103
17103
  return /*#__PURE__*/React.createElement(IdCardBorderContainer, _assign({}, props, {
17104
- style: {
17104
+ style: _assign(_assign({}, props.style), {
17105
17105
  aspectRatio: aspectRatio
17106
- }
17107
- }), /*#__PURE__*/React.createElement("div", {
17106
+ })
17107
+ }), /*#__PURE__*/React.createElement(IdCardBorderInner, {
17108
17108
  ref: ref,
17109
17109
  style: {
17110
- maxHeight: '100%',
17111
- maxWidth: '100%',
17112
- display: 'flex',
17113
17110
  aspectRatio: aspectRatio
17114
17111
  }
17115
17112
  }, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdCardBorderSvg, {
@@ -17172,6 +17169,7 @@
17172
17169
  totalLength = _f[0],
17173
17170
  setTotalLength = _f[1];
17174
17171
  var resolvedProgress = progress * totalLength;
17172
+ var scaledBorderRadius = borderRadius * (typeof props.height === 'number' ? props.height / 500 : 1);
17175
17173
  var rectRef = function rectRef(r) {
17176
17174
  try {
17177
17175
  if (isProgressBar && r) setTotalLength(r.getTotalLength());
@@ -17190,16 +17188,16 @@
17190
17188
  y: "0",
17191
17189
  width: props.width || '100%',
17192
17190
  height: props.height || '100%',
17193
- rx: borderRadius,
17194
- ry: borderRadius
17191
+ rx: scaledBorderRadius,
17192
+ ry: scaledBorderRadius
17195
17193
  }))), /*#__PURE__*/React.createElement(IdCardBorderRect, {
17196
17194
  ref: rectRef,
17197
17195
  x: "0",
17198
17196
  y: "0",
17199
17197
  width: props.width || '100%',
17200
17198
  height: props.height || '100%',
17201
- rx: borderRadius,
17202
- ry: borderRadius,
17199
+ rx: scaledBorderRadius,
17200
+ ry: scaledBorderRadius,
17203
17201
  clipPath: "url(#round-corner)",
17204
17202
  stroke: borderColor,
17205
17203
  strokeWidth: borderWidth,
@@ -17209,16 +17207,17 @@
17209
17207
  className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
17210
17208
  }));
17211
17209
  }
17212
- var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
17213
- var SvgOverlay = styled.svg(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
17214
- var IdCardBorderRect = styled.rect(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
17210
+ var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
17211
+ var IdCardBorderInner = styled.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
17212
+ var SvgOverlay = styled.svg(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
17213
+ var IdCardBorderRect = styled.rect(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
17215
17214
  var _a;
17216
17215
  return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
17217
17216
  }, function (props) {
17218
17217
  var _a;
17219
17218
  return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
17220
17219
  });
17221
- var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a;
17220
+ var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a, templateObject_6$7;
17222
17221
 
17223
17222
  var defaultIdCaptureGuideImages = {
17224
17223
  portrait: {
@@ -17401,6 +17400,53 @@
17401
17400
  });
17402
17401
  var templateObject_1$z;
17403
17402
 
17403
+ var GuideOrientationContext = /*#__PURE__*/React.createContext({
17404
+ orientation: 'landscape',
17405
+ wrapperWidth: 1,
17406
+ wrapperHeight: 1,
17407
+ wrapperAspectRatio: 0,
17408
+ imageAspectRatio: 0,
17409
+ wrapperRef: null,
17410
+ setImageAspectRatio: function setImageAspectRatio() {
17411
+ return null;
17412
+ }
17413
+ });
17414
+ function GuideOrientationContextProvider(_a) {
17415
+ var children = _a.children;
17416
+ var _b = React.useState(1),
17417
+ imageAspectRatio = _b[0],
17418
+ setImageAspectRatio = _b[1];
17419
+ var _c = useResizeObserver(),
17420
+ wrapperRef = _c.ref,
17421
+ _d = _c.width,
17422
+ wrapperWidth = _d === void 0 ? 1 : _d,
17423
+ _e = _c.height,
17424
+ wrapperHeight = _e === void 0 ? 1 : _e;
17425
+ var wrapperAspectRatio = React.useMemo(function () {
17426
+ return wrapperWidth / wrapperHeight;
17427
+ }, [wrapperHeight, wrapperWidth]);
17428
+ var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
17429
+ var value = React.useMemo(function () {
17430
+ return {
17431
+ orientation: orientation,
17432
+ wrapperWidth: wrapperWidth,
17433
+ wrapperHeight: wrapperHeight,
17434
+ wrapperAspectRatio: wrapperAspectRatio,
17435
+ imageAspectRatio: imageAspectRatio,
17436
+ setImageAspectRatio: setImageAspectRatio,
17437
+ wrapperRef: wrapperRef
17438
+ };
17439
+ }, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
17440
+ return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
17441
+ value: value
17442
+ }, children);
17443
+ }
17444
+ function useGuideOrientationContext() {
17445
+ var ctx = React.useContext(GuideOrientationContext);
17446
+ if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
17447
+ return ctx;
17448
+ }
17449
+
17404
17450
  var FlipIdPrompt = function FlipIdPrompt(_a) {
17405
17451
  var _b = _a.images,
17406
17452
  images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
@@ -17418,6 +17464,7 @@
17418
17464
  portraitGuidesOnMobile = _g === void 0 ? true : _g,
17419
17465
  _h = _a.classNames,
17420
17466
  classNames = _h === void 0 ? {} : _h;
17467
+ var imageAspectRatio = useGuideOrientationContext().imageAspectRatio;
17421
17468
  var orientation = getOrientation(portraitGuidesOnMobile);
17422
17469
  var _j = React.useState(1),
17423
17470
  transitionTime = _j[0],
@@ -17454,6 +17501,7 @@
17454
17501
  borderRadius: borderRadius,
17455
17502
  "$transforms": frontTransforms.join(' '),
17456
17503
  "$transitionTime": transitionTime,
17504
+ aspectRatio: imageAspectRatio,
17457
17505
  "$isVisible": true
17458
17506
  }, /*#__PURE__*/React.createElement(IdCardGuideImage, {
17459
17507
  alt: "",
@@ -17469,6 +17517,7 @@
17469
17517
  borderRadius: borderRadius,
17470
17518
  "$transforms": backTransforms.join(' '),
17471
17519
  "$transitionTime": transitionTime,
17520
+ aspectRatio: imageAspectRatio,
17472
17521
  "$isVisible": true
17473
17522
  }, /*#__PURE__*/React.createElement(IdCardGuideImage, {
17474
17523
  alt: "",
@@ -17479,53 +17528,6 @@
17479
17528
  })));
17480
17529
  };
17481
17530
 
17482
- var GuideOrientationContext = /*#__PURE__*/React.createContext({
17483
- orientation: 'landscape',
17484
- wrapperWidth: 1,
17485
- wrapperHeight: 1,
17486
- wrapperAspectRatio: 0,
17487
- imageAspectRatio: 0,
17488
- wrapperRef: null,
17489
- setImageAspectRatio: function setImageAspectRatio() {
17490
- return null;
17491
- }
17492
- });
17493
- function GuideOrientationContextProvider(_a) {
17494
- var children = _a.children;
17495
- var _b = React.useState(1),
17496
- imageAspectRatio = _b[0],
17497
- setImageAspectRatio = _b[1];
17498
- var _c = useResizeObserver(),
17499
- wrapperRef = _c.ref,
17500
- _d = _c.width,
17501
- wrapperWidth = _d === void 0 ? 1 : _d,
17502
- _e = _c.height,
17503
- wrapperHeight = _e === void 0 ? 1 : _e;
17504
- var wrapperAspectRatio = React.useMemo(function () {
17505
- return wrapperWidth / wrapperHeight;
17506
- }, [wrapperHeight, wrapperWidth]);
17507
- var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
17508
- var value = React.useMemo(function () {
17509
- return {
17510
- orientation: orientation,
17511
- wrapperWidth: wrapperWidth,
17512
- wrapperHeight: wrapperHeight,
17513
- wrapperAspectRatio: wrapperAspectRatio,
17514
- imageAspectRatio: imageAspectRatio,
17515
- setImageAspectRatio: setImageAspectRatio,
17516
- wrapperRef: wrapperRef
17517
- };
17518
- }, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
17519
- return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
17520
- value: value
17521
- }, children);
17522
- }
17523
- function useGuideOrientationContext() {
17524
- var ctx = React.useContext(GuideOrientationContext);
17525
- if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
17526
- return ctx;
17527
- }
17528
-
17529
17531
  var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
17530
17532
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
17531
17533
  var _s = _a.classNames,
@@ -17577,8 +17579,10 @@
17577
17579
  var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
17578
17580
  var imagePadding = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : isMobile() ? (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.mobileImagePadding) !== null && _o !== void 0 ? _o : 0 : (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.imagePadding) !== null && _r !== void 0 ? _r : 50;
17579
17581
  var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
17580
- function onImageLoaded() {
17582
+ React.useEffect(function () {
17581
17583
  setImageAspectRatio(currentImage.width / currentImage.height);
17584
+ }, [currentImage.height, currentImage.width, setImageAspectRatio]);
17585
+ function onImageLoaded() {
17582
17586
  dispatchIdCaptureAction({
17583
17587
  type: 'guideImageLoaded',
17584
17588
  payload: {
@@ -17644,8 +17648,8 @@
17644
17648
  portraitGuidesOnMobile: portraitGuidesOnMobile,
17645
17649
  isMirrored: isMirrored,
17646
17650
  classNames: classNames.flipIdPrompt,
17647
- width: currentImage.width,
17648
- height: currentImage.height
17651
+ width: innerWidth,
17652
+ height: innerHeight
17649
17653
  }))))), /*#__PURE__*/React.createElement(Spacer, {
17650
17654
  "$maskColor": maskColor,
17651
17655
  "$minWidth": padding,