Liferay.Loader.define("frontend-js-web@5.0.31/liferay/util/get_crop_region.es",["module","exports","require","./is_object"],(function(e,t,a){var r;window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!(0,i.default)(e)||(0,i.default)(e)&&"IMG"!==e.tagName)throw new TypeError("Parameter imagePreview must be an image");if(!(0,i.default)(t))throw new TypeError("Parameter region must be an object");const a=e.naturalWidth/e.offsetWidth,r=e.naturalHeight/e.offsetHeight,o=t.height?t.height*r:e.naturalHeight,n=t.width?t.width*a:e.naturalWidth,u=t.x?Math.max(t.x*a,0):0,d=t.y?Math.max(t.y*r,0):0;return{height:o,width:n,x:u,y:d}};var i=(r=a("./is_object"))&&r.__esModule?r:{default:r}}));
//# sourceMappingURL=get_crop_region.es.js.map