"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var createRangeOrig = typeof document === 'undefined' ? function () {} : document.createRange;
var install = function install() {
  if (typeof document === 'undefined') {
    return;
  }
  if (!document.createRange) {
    document.createRange = function () {
      return function () {
        var pub = {};
        pub.selectNodeContents = function () {};
        pub.setEnd = function (elem) {
          pub.commonAncestorContainer = elem;
        };
        pub.setStart = function (elem) {
          pub.commonAncestorContainer = elem;
        };
        pub.getBoundingClientRect = function () {
          return {
            right: 0
          };
        };
        pub.getClientRects = function () {
          return [];
        };
        return pub;
      }();
    };
  }
};
var uninstall = function uninstall() {
  document.createRange = createRangeOrig;
};
var _default = exports["default"] = {
  install: install,
  uninstall: uninstall
};