import{useEffect as t}from"react";var n=function(n,e,r){void 0===r&&(r=[".MuiPopover-root",".MuiDialog-container",".ReactModalPortal"]);var o=r.filter((function(t){return"string"==typeof t})),i=r.filter((function(t){return!!t&&"string"!=typeof t})),u=function(t){var r=o.some((function(n){return t.target.closest(n)}))||i.some((function(n){return n.contains(t.target)}));!n.current||n.current.contains(t.target)||r||e(t)};t((function(){return document.addEventListener("mousedown",u),function(){document.removeEventListener("mousedown",u)}}))};export{n as default};
