import p from "./index-getWindow.js";
import w from "./index-getDocumentElement.js";
import d from "./index-getWindowScrollBarX.js";
import g from "./index-isLayoutViewport.js";
function u(i, v) {
  var m = p(i), r = w(i), t = m.visualViewport, o = r.clientWidth, e = r.clientHeight, f = 0, a = 0;
  if (t) {
    o = t.width, e = t.height;
    var h = g();
    (h || !h && v === "fixed") && (f = t.offsetLeft, a = t.offsetTop);
  }
  return {
    width: o,
    height: e,
    x: f + d(i),
    y: a
  };
}
export {
  u as default
};
