function s(){return typeof window<"u"}function f(n){return w(n)?(n.nodeName||"").toLowerCase():"#document"}function c(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function L(n){var e;return(e=(w(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function w(n){return s()?n instanceof Node||n instanceof c(n).Node:!1}function v(n){return s()?n instanceof Element||n instanceof c(n).Element:!1}function h(n){return s()?n instanceof HTMLElement||n instanceof c(n).HTMLElement:!1}function p(n){return!s()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof c(n).ShadowRoot}function y(n){const{overflow:e,overflowX:r,overflowY:u,display:o}=b(n);return/auto|scroll|overlay|hidden|clip/.test(e+u+r)&&o!=="inline"&&o!=="contents"}function V(n){return/^(table|td|th)$/.test(f(n))}function T(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const g=/transform|translate|scale|rotate|perspective|filter/,k=/paint|layout|strict|content/,t=n=>!!n&&n!=="none";let a;function D(n){const e=v(n)?b(n):n;return t(e.transform)||t(e.translate)||t(e.scale)||t(e.rotate)||t(e.perspective)||!N()&&(t(e.backdropFilter)||t(e.filter))||g.test(e.willChange||"")||k.test(e.contain||"")}function $(n){let e=i(n);for(;h(e)&&!S(e);){if(D(e))return e;if(T(e))return null;e=i(e)}return null}function N(){return a==null&&(a=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),a}function S(n){return/^(html|body|#document)$/.test(f(n))}function b(n){return c(n).getComputedStyle(n)}function j(n){return v(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function i(n){if(f(n)==="html")return n;const e=n.assignedSlot||n.parentNode||p(n)&&n.host||L(n);return p(e)?e.host:e}function C(n){const e=i(n);return S(e)?(n.ownerDocument||n).body:h(e)&&y(e)?e:C(e)}function m(n,e,r){var u;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=C(n),E=o===((u=n.ownerDocument)==null?void 0:u.body),l=c(o);if(E){const d=R(l);return e.concat(l,l.visualViewport||[],y(o)?o:[],d&&r?m(d):[])}else return e.concat(o,m(o,[],r))}function R(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}export{L as a,c as b,h as c,b as d,T as e,i as f,m as g,S as h,v as i,V as j,D as k,$ as l,f as m,y as n,j as o,N as p,R as q};
//# sourceMappingURL=floating-ui.utils.dom-Ceub-oJ0.chunk.mjs.map
