idmission-web-sdk 2.3.34 → 2.3.35

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.
package/dist/sdk2.esm.js CHANGED
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
204
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
205
205
  };
206
206
 
207
- var webSdkVersion = '2.3.34';
207
+ var webSdkVersion = '2.3.35';
208
208
 
209
209
  function getPlatform() {
210
210
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -475,7 +475,7 @@ var OverlayInner$2 = styled.div(templateObject_2$D || (templateObject_2$D = __ma
475
475
  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"])));
476
476
  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"])));
477
477
  var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
478
- 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"])));
478
+ 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"])));
479
479
  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"])));
480
480
  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) {
481
481
  var _a, _b;
@@ -514,7 +514,7 @@ var LoadingOverlayLoadingListItem = styled.li(templateObject_19 || (templateObje
514
514
  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"])));
515
515
  var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
516
516
  var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
517
- 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;
517
+ 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;
518
518
 
519
519
  var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
520
520
  var accessBlockedImageUrl = _a.accessBlockedImageUrl;
@@ -7582,7 +7582,7 @@ var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templ
7582
7582
  var _a, _b, _c, _d, _e, _f;
7583
7583
  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, ";") : '';
7584
7584
  });
7585
- var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
7585
+ var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
7586
7586
  var _a, _b, _c, _d;
7587
7587
  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)';
7588
7588
  }, function (props) {
@@ -7612,7 +7612,7 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_8$3 || (templateObjec
7612
7612
  var _a, _b, _c, _d;
7613
7613
  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';
7614
7614
  });
7615
- 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;
7615
+ 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;
7616
7616
 
7617
7617
  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"])));
7618
7618
  var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
@@ -7863,8 +7863,8 @@ var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$u || (templ
7863
7863
  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"])));
7864
7864
  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"])));
7865
7865
  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"])));
7866
- 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"])));
7867
- var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$7;
7866
+ 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"])));
7867
+ var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$8;
7868
7868
 
7869
7869
  function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
7870
7870
  var _this = this;
@@ -7963,15 +7963,12 @@ function IdCardBorder(_a) {
7963
7963
  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';
7964
7964
  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;
7965
7965
  return /*#__PURE__*/React__default.createElement(IdCardBorderContainer, _assign({}, props, {
7966
- style: {
7966
+ style: _assign(_assign({}, props.style), {
7967
7967
  aspectRatio: aspectRatio
7968
- }
7969
- }), /*#__PURE__*/React__default.createElement("div", {
7968
+ })
7969
+ }), /*#__PURE__*/React__default.createElement(IdCardBorderInner, {
7970
7970
  ref: ref,
7971
7971
  style: {
7972
- maxHeight: '100%',
7973
- maxWidth: '100%',
7974
- display: 'flex',
7975
7972
  aspectRatio: aspectRatio
7976
7973
  }
7977
7974
  }, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IdCardBorderSvg, {
@@ -8071,16 +8068,17 @@ function IdCardBorderSvg(_a) {
8071
8068
  className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
8072
8069
  }));
8073
8070
  }
8074
- 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);
8075
- 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"])));
8076
- 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) {
8071
+ 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);
8072
+ 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"])));
8073
+ 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"])));
8074
+ 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) {
8077
8075
  var _a;
8078
8076
  return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
8079
8077
  }, function (props) {
8080
8078
  var _a;
8081
8079
  return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
8082
8080
  });
8083
- var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a;
8081
+ var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a, templateObject_6$7;
8084
8082
 
8085
8083
  var defaultIdCaptureGuideImages = {
8086
8084
  portrait: {
@@ -8263,6 +8261,53 @@ var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_1$z ||
8263
8261
  });
8264
8262
  var templateObject_1$z;
8265
8263
 
8264
+ var GuideOrientationContext = /*#__PURE__*/createContext({
8265
+ orientation: 'landscape',
8266
+ wrapperWidth: 1,
8267
+ wrapperHeight: 1,
8268
+ wrapperAspectRatio: 0,
8269
+ imageAspectRatio: 0,
8270
+ wrapperRef: null,
8271
+ setImageAspectRatio: function setImageAspectRatio() {
8272
+ return null;
8273
+ }
8274
+ });
8275
+ function GuideOrientationContextProvider(_a) {
8276
+ var children = _a.children;
8277
+ var _b = useState(1),
8278
+ imageAspectRatio = _b[0],
8279
+ setImageAspectRatio = _b[1];
8280
+ var _c = useResizeObserver(),
8281
+ wrapperRef = _c.ref,
8282
+ _d = _c.width,
8283
+ wrapperWidth = _d === void 0 ? 1 : _d,
8284
+ _e = _c.height,
8285
+ wrapperHeight = _e === void 0 ? 1 : _e;
8286
+ var wrapperAspectRatio = useMemo(function () {
8287
+ return wrapperWidth / wrapperHeight;
8288
+ }, [wrapperHeight, wrapperWidth]);
8289
+ var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
8290
+ var value = useMemo(function () {
8291
+ return {
8292
+ orientation: orientation,
8293
+ wrapperWidth: wrapperWidth,
8294
+ wrapperHeight: wrapperHeight,
8295
+ wrapperAspectRatio: wrapperAspectRatio,
8296
+ imageAspectRatio: imageAspectRatio,
8297
+ setImageAspectRatio: setImageAspectRatio,
8298
+ wrapperRef: wrapperRef
8299
+ };
8300
+ }, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
8301
+ return /*#__PURE__*/React__default.createElement(GuideOrientationContext.Provider, {
8302
+ value: value
8303
+ }, children);
8304
+ }
8305
+ function useGuideOrientationContext() {
8306
+ var ctx = useContext(GuideOrientationContext);
8307
+ if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
8308
+ return ctx;
8309
+ }
8310
+
8266
8311
  var FlipIdPrompt = function FlipIdPrompt(_a) {
8267
8312
  var _b = _a.images,
8268
8313
  images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
@@ -8280,6 +8325,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
8280
8325
  portraitGuidesOnMobile = _g === void 0 ? true : _g,
8281
8326
  _h = _a.classNames,
8282
8327
  classNames = _h === void 0 ? {} : _h;
8328
+ var imageAspectRatio = useGuideOrientationContext().imageAspectRatio;
8283
8329
  var orientation = getOrientation(portraitGuidesOnMobile);
8284
8330
  var _j = useState(1),
8285
8331
  transitionTime = _j[0],
@@ -8316,6 +8362,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
8316
8362
  borderRadius: borderRadius,
8317
8363
  "$transforms": frontTransforms.join(' '),
8318
8364
  "$transitionTime": transitionTime,
8365
+ aspectRatio: imageAspectRatio,
8319
8366
  "$isVisible": true
8320
8367
  }, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
8321
8368
  alt: "",
@@ -8331,6 +8378,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
8331
8378
  borderRadius: borderRadius,
8332
8379
  "$transforms": backTransforms.join(' '),
8333
8380
  "$transitionTime": transitionTime,
8381
+ aspectRatio: imageAspectRatio,
8334
8382
  "$isVisible": true
8335
8383
  }, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
8336
8384
  alt: "",
@@ -8341,53 +8389,6 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
8341
8389
  })));
8342
8390
  };
8343
8391
 
8344
- var GuideOrientationContext = /*#__PURE__*/createContext({
8345
- orientation: 'landscape',
8346
- wrapperWidth: 1,
8347
- wrapperHeight: 1,
8348
- wrapperAspectRatio: 0,
8349
- imageAspectRatio: 0,
8350
- wrapperRef: null,
8351
- setImageAspectRatio: function setImageAspectRatio() {
8352
- return null;
8353
- }
8354
- });
8355
- function GuideOrientationContextProvider(_a) {
8356
- var children = _a.children;
8357
- var _b = useState(1),
8358
- imageAspectRatio = _b[0],
8359
- setImageAspectRatio = _b[1];
8360
- var _c = useResizeObserver(),
8361
- wrapperRef = _c.ref,
8362
- _d = _c.width,
8363
- wrapperWidth = _d === void 0 ? 1 : _d,
8364
- _e = _c.height,
8365
- wrapperHeight = _e === void 0 ? 1 : _e;
8366
- var wrapperAspectRatio = useMemo(function () {
8367
- return wrapperWidth / wrapperHeight;
8368
- }, [wrapperHeight, wrapperWidth]);
8369
- var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
8370
- var value = useMemo(function () {
8371
- return {
8372
- orientation: orientation,
8373
- wrapperWidth: wrapperWidth,
8374
- wrapperHeight: wrapperHeight,
8375
- wrapperAspectRatio: wrapperAspectRatio,
8376
- imageAspectRatio: imageAspectRatio,
8377
- setImageAspectRatio: setImageAspectRatio,
8378
- wrapperRef: wrapperRef
8379
- };
8380
- }, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
8381
- return /*#__PURE__*/React__default.createElement(GuideOrientationContext.Provider, {
8382
- value: value
8383
- }, children);
8384
- }
8385
- function useGuideOrientationContext() {
8386
- var ctx = useContext(GuideOrientationContext);
8387
- if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
8388
- return ctx;
8389
- }
8390
-
8391
8392
  var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8392
8393
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8393
8394
  var _s = _a.classNames,
@@ -8439,8 +8440,10 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8439
8440
  var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
8440
8441
  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;
8441
8442
  var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
8442
- function onImageLoaded() {
8443
+ useEffect(function () {
8443
8444
  setImageAspectRatio(currentImage.width / currentImage.height);
8445
+ }, [currentImage.height, currentImage.width, setImageAspectRatio]);
8446
+ function onImageLoaded() {
8444
8447
  dispatchIdCaptureAction({
8445
8448
  type: 'guideImageLoaded',
8446
8449
  payload: {
@@ -8506,8 +8509,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8506
8509
  portraitGuidesOnMobile: portraitGuidesOnMobile,
8507
8510
  isMirrored: isMirrored,
8508
8511
  classNames: classNames.flipIdPrompt,
8509
- width: currentImage.width,
8510
- height: currentImage.height
8512
+ width: innerWidth,
8513
+ height: innerHeight
8511
8514
  }))))), /*#__PURE__*/React__default.createElement(Spacer, {
8512
8515
  "$maskColor": maskColor,
8513
8516
  "$minWidth": padding,