import{createPortal as t}from"react-dom";import e,{forwardRef as r,useRef as o,useMemo as n,useCallback as i,useEffect as a,cloneElement as l,isValidElement as c}from"react";function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function f(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,o=new Array(e);r0&&st+at>0&&(j?Ot-=(st+at)/2:z-st-at0&&dt+ct>0&&(j?xt-=(dt+ct)/2:A-dt-cti+e&&f>=s&&"bottom"===et&&(ft-=R+A,et="top")),l||(L+ito?L+it-o:-z+it+wt,st)),I-at>n&&(st=y(L+wtn&&d>h&&"right"===et&&(ut-=z+W,et="left")),l||(C+lte?C+lt-e:-A+lt+gt,dt)),X-ct>r&&(dt=y(C+gtMath.round(Math.abs(e))?t:e}export{m as default};