/**
 * ldesign v0.4.2
 * (c) 2023 ldesign
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var ANCHOR_SHARP_REGEXP = /#(\S+)$/;
function getOffsetTop(target, container) {
  var _target$getBoundingCl = target.getBoundingClientRect(),
    top = _target$getBoundingCl.top;
  if (container === window) {
    return top - document.documentElement.clientTop;
  }
  return top - container.getBoundingClientRect().top;
}

exports.ANCHOR_SHARP_REGEXP = ANCHOR_SHARP_REGEXP;
exports.getOffsetTop = getOffsetTop;
//# sourceMappingURL=utils.js.map
