"use strict";

exports.__esModule = true;
exports.default = void 0;
var createRangeOrig = typeof document === 'undefined' ? function () {} : document.createRange;
var install = () => {
  if (typeof document === 'undefined') {
    return;
  }
  if (!document.createRange) {
    document.createRange = () => {
      return function () {
        var pub = {};
        pub.selectNodeContents = () => {};
        pub.setEnd = function (elem) {
          pub.commonAncestorContainer = elem;
        };
        pub.setStart = function (elem) {
          pub.commonAncestorContainer = elem;
        };
        pub.getBoundingClientRect = function () {
          return {
            right: 0
          };
        };
        pub.getClientRects = () => [];
        return pub;
      }();
    };
  }
};
var uninstall = () => {
  document.createRange = createRangeOrig;
};
var _default = exports.default = {
  install,
  uninstall
};
//# sourceMappingURL=range.js.map