define(["exports","jquery","./Component"],function(e,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=l(t),o=l(a);function l(e){return e&&e.__esModule?e:{default:e}}var r=function(e,t,a){return t&&c(e.prototype,t),a&&c(e,a),e};function c(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var s=(0,n.default)("body"),i=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,o.default),r(u,[{key:"process",value:function(){var l=this;(s.is(".page-aside-fixed")||s.is(".page-aside-scroll"))&&this.$el.on("transitionend",function(){l.scrollable.update()}),Breakpoints.on("change",function(){var e=Breakpoints.current().name;s.is(".page-aside-fixed")||s.is(".page-aside-scroll")||("xs"===e?(l.scrollable.enable(),l.$el.on("transitionend",function(){l.scrollable.update()})):(l.$el.off("transitionend"),l.scrollable.update()))}),(0,n.default)(document).on("click.pageAsideScroll",".page-aside-switch",function(){l.$el.hasClass("open")?l.$el.removeClass("open"):(l.scrollable.update(),l.$el.addClass("open"))}),(0,n.default)(document).on("click.pageAsideScroll",'[data-toggle="collapse"]',function(e){var t=(0,n.default)(e.target);t.is('[data-toggle="collapse"]')||(t=t.parents('[data-toggle="collapse"]'));var a=void 0,o=t.attr("data-target")||(a=t.attr("href"))&&a.replace(/.*(?=#[^\s]+$)/,"");"site-navbar-collapse"===(0,n.default)(o).attr("id")&&l.scrollable.update()})}}]),u);function u(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,a=Array(t),o=0;o<t;o++)a[o]=arguments[o];var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=u.__proto__||Object.getPrototypeOf(u)).call.apply(e,[this].concat(a)));return l.$scroll=l.$el.find(".page-aside-scroll"),l.scrollable=l.$scroll.asScrollable({namespace:"scrollable",contentSelector:"> [data-role='content']",containerSelector:"> [data-role='container']"}).data("asScrollable"),l}e.default=i});