import{F as a,G as u,g as f,d as w,q as i}from"./factory-BR3bc_RM.js";function c(t){const o=a(t);return u(o)?f(o).body:w(o)&&s(o)?o:c(o)}function d(t,o=[]){const n=c(t),e=n===t.ownerDocument.body,r=i(n);return e?o.concat(r,r.visualViewport||[],s(n)?n:[]):o.concat(n,d(n,[]))}var v=/auto|scroll|overlay|hidden|clip/,g=new Set(["inline","contents"]);function s(t){const o=i(t),{overflow:n,overflowX:e,overflowY:r,display:l}=o.getComputedStyle(t);return v.test(n+r+e)&&!g.has(l)}function m(t){return t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth}function O(t,o){const{rootEl:n,...e}=o||{};!t||!n||!s(n)||!m(n)||t.scrollIntoView(e)}export{c as a,d as g,O as s};
