text: define("theme_boost/scroll",["exports"],(function(_exports){function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;
  /**
     * Manage user scroll in Moodle for future floating elements.
     *
     * @module theme_boost/scroll
     * @copyright  2020 Ferran Recio <ferran@moodle.org>
     * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
  var MoodleScroll=function(){function MoodleScroll(){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,MoodleScroll)}var Constructor,protoProps,staticProps;return Constructor=MoodleScroll,(protoProps=[{key:"init",value:function(){return this.scrollY=0,window.addEventListener("scroll",this.scrollHandler.bind(this)),this}},{key:"getScrollPosition",value:function(){return window.pageYOffset||document.documentElement.scrollTop}},{key:"scrollHandler",value:function(){var body=document.querySelector("body");this.getScrollPosition()>=window.innerHeight?body.classList.add("scrolled"):body.classList.remove("scrolled")}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),MoodleScroll}();return _exports.default=MoodleScroll,_exports.default}));
  
  //# sourceMappingURL=scroll.min.js.map