define('@cardstack/tools/scroll-to-bounds', ['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = scrollToBounds;
  function scrollToBounds(box) {
    var midScreen = Ember.$(window).height() / 2;
    if (box && (box.bottom < midScreen || box.top > midScreen)) {
      Ember.$('html').velocity('scroll', { offset: box.top - midScreen + Ember.$('body').scrollTop() });
    }
  }
});