import p from "./getWindow.js";
import w from "./getDocumentElement.js";
import d from "./getWindowScrollBarX.js";
import g from "./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
};
//# sourceMappingURL=getViewportRect.js.map
