import{getClientSize as e}from"../../vc-util/Dom/css.mjs";function t(e,t,n,r){let i=t+n,a=(n-r)/2;if(n>r){if(t>0)return{[e]:a};if(t<0&&i<r)return{[e]:-a}}else if(t<0||i>r)return{[e]:t<0?a:-a};return{}}function n(n,r,i,a){let{width:o,height:s}=e(),c=null;return n<=o&&r<=s?c={x:0,y:0}:(n>o||r>s)&&(c={...t(`x`,i,n,o),...t(`y`,a,r,s)}),c}export{n as default};