import{a as e}from"./chunk-BNv3lrIs.js";import{n as t}from"./jsx-runtime-pmtNMKr4.js";var n=e(t());function r(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e},[e]),t}function i(e){let t=r(e);return(0,n.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function a(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}export{i as n,a as t};