function l(n){return n!=null&&n===n.window}function f(n,i){if(typeof window>"u")return 0;const o="scrollTop";let e=0;return l(n)?e=n.scrollY:n instanceof Document?e=n.documentElement[o]:(n instanceof HTMLElement||n)&&(e=n[o]),n&&!l(n)&&typeof e!="number"&&(e=(n.ownerDocument??n).documentElement?.[o]),e}export{f as default,l as isWindow};
