function getOuterWidth(el) {
  if (el === document.body)
    return document.documentElement.clientWidth;
  return el.offsetWidth;
}
function getOuterHeight(el) {
  if (el === document.body)
    return window.innerHeight || document.documentElement.clientHeight;
  return el.offsetHeight;
}
function getDocSize() {
  const width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
  const height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
  return {
    width,
    height
  };
}
function getClientSize() {
  const width = document.documentElement.clientWidth;
  const height = window.innerHeight || document.documentElement.clientHeight;
  return {
    width,
    height
  };
}
function getOffset(node) {
  const box = node.getBoundingClientRect();
  const docElem = document.documentElement;
  return {
    left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
    top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
  };
}

export { getClientSize, getDocSize, getOffset, getOuterHeight, getOuterWidth };
//# sourceMappingURL=css.mjs.map
