import h from"../node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs";import d from"../vc-util/Dom/contains.mjs";function m(i,n){return i===n?!0:!i||!n?!1:"pageX"in n&&"pageY"in n?i.pageX===n.pageX&&i.pageY===n.pageY:"clientX"in n&&"clientY"in n?i.clientX===n.clientX&&i.clientY===n.clientY:!1}function p(i,n){i!==document.activeElement&&d(n,i)&&typeof i.focus=="function"&&i.focus()}function X(i,n){let t=null,r=null;function u([{target:f}]){if(!document.documentElement.contains(f))return;const{width:s,height:l}=f.getBoundingClientRect(),e=Math.floor(s),o=Math.floor(l);(t!==e||r!==o)&&Promise.resolve().then(()=>{n({width:e,height:o})}),t=e,r=o}const c=new h(u);return i&&c.observe(i),()=>{c.disconnect()}}export{m as isSamePoint,X as monitorResize,p as restoreFocus};
