aboutsummaryrefslogtreecommitdiff
path: root/docs/dist/js
diff options
context:
space:
mode:
authorPierre-Denis Vanduynslager <[email protected]>2016-12-28 19:57:38 -0500
committerPierre-Denis Vanduynslager <[email protected]>2016-12-28 19:57:38 -0500
commit425d156df27fa6c18e979aa000bfe5a346ee3450 (patch)
tree4157dfcbdf8334e9d9fb2bb239f4ae78706bbc71 /docs/dist/js
parentab2fc63d08b8c53d6f29bcfd73b7f2d5ceaacacd (diff)
parente1e621be046a4541a2fd36e445015ee44de3c67e (diff)
downloadbootstrap-425d156df27fa6c18e979aa000bfe5a346ee3450.tar.xz
bootstrap-425d156df27fa6c18e979aa000bfe5a346ee3450.zip
Merge branch 'twbs/v4-dev' into dropdown-keyboard
Diffstat (limited to 'docs/dist/js')
-rw-r--r--docs/dist/js/bootstrap.js3564
-rw-r--r--docs/dist/js/bootstrap.min.js8
-rw-r--r--docs/dist/js/npm.js12
-rw-r--r--docs/dist/js/umd/alert.js211
-rw-r--r--docs/dist/js/umd/button.js189
-rw-r--r--docs/dist/js/umd/carousel.js497
-rw-r--r--docs/dist/js/umd/collapse.js383
-rw-r--r--docs/dist/js/umd/dropdown.js312
-rw-r--r--docs/dist/js/umd/modal.js549
-rw-r--r--docs/dist/js/umd/popover.js220
-rw-r--r--docs/dist/js/umd/scrollspy.js339
-rw-r--r--docs/dist/js/umd/tab.js282
-rw-r--r--docs/dist/js/umd/tooltip.js638
-rw-r--r--docs/dist/js/umd/util.js174
14 files changed, 1774 insertions, 5604 deletions
diff --git a/docs/dist/js/bootstrap.js b/docs/dist/js/bootstrap.js
index e335cb484..b9e5f56f9 100644
--- a/docs/dist/js/bootstrap.js
+++ b/docs/dist/js/bootstrap.js
@@ -1,41 +1,41 @@
/*!
- * Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
+ * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)
+ * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if (typeof jQuery === 'undefined') {
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
+ throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
}
+function ($) {
var version = $.fn.jquery.split(' ')[0].split('.')
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0')
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
+ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
}
}(jQuery);
-+function ($) {
++function () {
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): util.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-'use strict';
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.5): util.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
-var Util = (function ($) {
+var Util = function ($) {
/**
* ------------------------------------------------------------------------
@@ -45,6 +45,8 @@ var Util = (function ($) {
var transition = false;
+ var MAX_UID = 1000000;
+
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
@@ -54,7 +56,7 @@ var Util = (function ($) {
// shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
- return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
+ return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
}
function isElement(obj) {
@@ -67,8 +69,9 @@ var Util = (function ($) {
delegateType: transition.end,
handle: function handle(event) {
if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments);
+ return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
+ return undefined;
}
};
}
@@ -80,9 +83,11 @@ var Util = (function ($) {
var el = document.createElement('bootstrap');
- for (var _name in TransitionEndEvent) {
- if (el.style[_name] !== undefined) {
- return { end: TransitionEndEvent[_name] };
+ for (var name in TransitionEndEvent) {
+ if (el.style[name] !== undefined) {
+ return {
+ end: TransitionEndEvent[name]
+ };
}
}
@@ -129,13 +134,11 @@ var Util = (function ($) {
getUID: function getUID(prefix) {
do {
- /* eslint-disable no-bitwise */
- prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here
- /* eslint-enable no-bitwise */
+ // eslint-disable-next-line no-bitwise
+ prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
},
-
getSelectorFromElement: function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
@@ -146,31 +149,21 @@ var Util = (function ($) {
return selector;
},
-
reflow: function reflow(element) {
- new Function('bs', 'return bs')(element.offsetHeight);
+ return element.offsetHeight;
},
-
triggerTransitionEnd: function triggerTransitionEnd(element) {
$(element).trigger(transition.end);
},
-
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(transition);
},
-
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (configTypes.hasOwnProperty(property)) {
var expectedTypes = configTypes[property];
var value = config[property];
- var valueType = undefined;
-
- if (value && isElement(value)) {
- valueType = 'element';
- } else {
- valueType = toType(value);
- }
+ var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
@@ -183,16 +176,16 @@ var Util = (function ($) {
setTransitionEndSupport();
return Util;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): alert.js
+ * Bootstrap (v4.0.0-alpha.5): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Alert = (function ($) {
+var Alert = function ($) {
/**
* ------------------------------------------------------------------------
@@ -201,7 +194,7 @@ var Alert = (function ($) {
*/
var NAME = 'alert';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -221,7 +214,7 @@ var Alert = (function ($) {
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
- IN: 'in'
+ SHOW: 'show'
};
/**
@@ -230,120 +223,107 @@ var Alert = (function ($) {
* ------------------------------------------------------------------------
*/
- var Alert = (function () {
+ var Alert = function () {
function Alert(element) {
_classCallCheck(this, Alert);
this._element = element;
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Alert, [{
- key: 'close',
+ // public
+
+ Alert.prototype.close = function close(element) {
+ element = element || this._element;
- // public
+ var rootElement = this._getRootElement(element);
+ var customEvent = this._triggerCloseEvent(rootElement);
- value: function close(element) {
- element = element || this._element;
+ if (customEvent.isDefaultPrevented()) {
+ return;
+ }
- var rootElement = this._getRootElement(element);
- var customEvent = this._triggerCloseEvent(rootElement);
+ this._removeElement(rootElement);
+ };
- if (customEvent.isDefaultPrevented()) {
- return;
- }
+ Alert.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._element = null;
+ };
+
+ // private
+
+ Alert.prototype._getRootElement = function _getRootElement(element) {
+ var selector = Util.getSelectorFromElement(element);
+ var parent = false;
- this._removeElement(rootElement);
+ if (selector) {
+ parent = $(selector)[0];
}
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- this._element = null;
+
+ if (!parent) {
+ parent = $(element).closest('.' + ClassName.ALERT)[0];
}
- // private
+ return parent;
+ };
- }, {
- key: '_getRootElement',
- value: function _getRootElement(element) {
- var selector = Util.getSelectorFromElement(element);
- var parent = false;
+ Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
+ var closeEvent = $.Event(Event.CLOSE);
- if (selector) {
- parent = $(selector)[0];
- }
+ $(element).trigger(closeEvent);
+ return closeEvent;
+ };
- if (!parent) {
- parent = $(element).closest('.' + ClassName.ALERT)[0];
- }
+ Alert.prototype._removeElement = function _removeElement(element) {
+ var _this2 = this;
- return parent;
- }
- }, {
- key: '_triggerCloseEvent',
- value: function _triggerCloseEvent(element) {
- var closeEvent = $.Event(Event.CLOSE);
+ $(element).removeClass(ClassName.SHOW);
- $(element).trigger(closeEvent);
- return closeEvent;
+ if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
+ this._destroyElement(element);
+ return;
}
- }, {
- key: '_removeElement',
- value: function _removeElement(element) {
- $(element).removeClass(ClassName.IN);
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
- this._destroyElement(element);
- return;
- }
+ $(element).one(Util.TRANSITION_END, function (event) {
+ return _this2._destroyElement(element, event);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ };
- $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
- }
- }, {
- key: '_destroyElement',
- value: function _destroyElement(element) {
- $(element).detach().trigger(Event.CLOSED).remove();
- }
+ Alert.prototype._destroyElement = function _destroyElement(element) {
+ $(element).detach().trigger(Event.CLOSED).remove();
+ };
- // static
+ // static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
+ Alert._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $element = $(this);
+ var data = $element.data(DATA_KEY);
- if (!data) {
- data = new Alert(this);
- $element.data(DATA_KEY, data);
- }
+ if (!data) {
+ data = new Alert(this);
+ $element.data(DATA_KEY, data);
+ }
- if (config === 'close') {
- data[config](this);
- }
- });
- }
- }, {
- key: '_handleDismiss',
- value: function _handleDismiss(alertInstance) {
- return function (event) {
- if (event) {
- event.preventDefault();
- }
+ if (config === 'close') {
+ data[config](this);
+ }
+ });
+ };
- alertInstance.close(this);
- };
- }
- }, {
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ return function (event) {
+ if (event) {
+ event.preventDefault();
+ }
+
+ alertInstance.close(this);
+ };
+ };
+
+ _createClass(Alert, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -351,7 +331,13 @@ var Alert = (function ($) {
}]);
return Alert;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
@@ -369,16 +355,16 @@ var Alert = (function ($) {
};
return Alert;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): button.js
+ * Bootstrap (v4.0.0-alpha.5): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Button = (function ($) {
+var Button = function ($) {
/**
* ------------------------------------------------------------------------
@@ -387,7 +373,7 @@ var Button = (function ($) {
*/
var NAME = 'button';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.button';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -418,87 +404,76 @@ var Button = (function ($) {
* ------------------------------------------------------------------------
*/
- var Button = (function () {
+ var Button = function () {
function Button(element) {
_classCallCheck(this, Button);
this._element = element;
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Button, [{
- key: 'toggle',
-
- // public
+ // public
- value: function toggle() {
- var triggerChangeEvent = true;
- var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
+ Button.prototype.toggle = function toggle() {
+ var triggerChangeEvent = true;
+ var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
- if (rootElement) {
- var input = $(this._element).find(Selector.INPUT)[0];
+ if (rootElement) {
+ var input = $(this._element).find(Selector.INPUT)[0];
- if (input) {
- if (input.type === 'radio') {
- if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
- triggerChangeEvent = false;
- } else {
- var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
+ if (input) {
+ if (input.type === 'radio') {
+ if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
+ triggerChangeEvent = false;
+ } else {
+ var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
- if (activeElement) {
- $(activeElement).removeClass(ClassName.ACTIVE);
- }
+ if (activeElement) {
+ $(activeElement).removeClass(ClassName.ACTIVE);
}
}
+ }
- if (triggerChangeEvent) {
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
- $(this._element).trigger('change');
- }
-
- input.focus();
+ if (triggerChangeEvent) {
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
+ $(input).trigger('change');
}
- } else {
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
- }
- if (triggerChangeEvent) {
- $(this._element).toggleClass(ClassName.ACTIVE);
+ input.focus();
}
+ } else {
+ this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
}
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- this._element = null;
+
+ if (triggerChangeEvent) {
+ $(this._element).toggleClass(ClassName.ACTIVE);
}
+ };
+
+ Button.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._element = null;
+ };
- // static
+ // static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ Button._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (!data) {
- data = new Button(this);
- $(this).data(DATA_KEY, data);
- }
+ if (!data) {
+ data = new Button(this);
+ $(this).data(DATA_KEY, data);
+ }
- if (config === 'toggle') {
- data[config]();
- }
- });
- }
- }, {
+ if (config === 'toggle') {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Button, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -506,7 +481,13 @@ var Button = (function ($) {
}]);
return Button;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
@@ -537,16 +518,16 @@ var Button = (function ($) {
};
return Button;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): carousel.js
+ * Bootstrap (v4.0.0-alpha.5): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Carousel = (function ($) {
+var Carousel = function ($) {
/**
* ------------------------------------------------------------------------
@@ -555,12 +536,14 @@ var Carousel = (function ($) {
*/
var NAME = 'carousel';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 600;
+ var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
+ var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
var Default = {
interval: 5000,
@@ -580,7 +563,9 @@ var Carousel = (function ($) {
var Direction = {
NEXT: 'next',
- PREVIOUS: 'prev'
+ PREV: 'prev',
+ LEFT: 'left',
+ RIGHT: 'right'
};
var Event = {
@@ -597,8 +582,10 @@ var Carousel = (function ($) {
CAROUSEL: 'carousel',
ACTIVE: 'active',
SLIDE: 'slide',
- RIGHT: 'right',
- LEFT: 'left',
+ RIGHT: 'carousel-item-right',
+ LEFT: 'carousel-item-left',
+ NEXT: 'carousel-item-next',
+ PREV: 'carousel-item-prev',
ITEM: 'carousel-item'
};
@@ -606,7 +593,7 @@ var Carousel = (function ($) {
ACTIVE: '.active',
ACTIVE_ITEM: '.active.carousel-item',
ITEM: '.carousel-item',
- NEXT_PREV: '.next, .prev',
+ NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
@@ -618,7 +605,7 @@ var Carousel = (function ($) {
* ------------------------------------------------------------------------
*/
- var Carousel = (function () {
+ var Carousel = function () {
function Carousel(element, config) {
_classCallCheck(this, Carousel);
@@ -636,342 +623,338 @@ var Carousel = (function ($) {
this._addEventListeners();
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Carousel, [{
- key: 'next',
+ // public
- // public
+ Carousel.prototype.next = function next() {
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding');
+ }
+ this._slide(Direction.NEXT);
+ };
- value: function next() {
- if (!this._isSliding) {
- this._slide(Direction.NEXT);
- }
+ Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
+ // Don't call next when the page isn't visible
+ if (!document.hidden) {
+ this.next();
}
- }, {
- key: 'nextWhenVisible',
- value: function nextWhenVisible() {
- // Don't call next when the page isn't visible
- if (!document.hidden) {
- this.next();
- }
+ };
+
+ Carousel.prototype.prev = function prev() {
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding');
}
- }, {
- key: 'prev',
- value: function prev() {
- if (!this._isSliding) {
- this._slide(Direction.PREVIOUS);
- }
+ this._slide(Direction.PREVIOUS);
+ };
+
+ Carousel.prototype.pause = function pause(event) {
+ if (!event) {
+ this._isPaused = true;
}
- }, {
- key: 'pause',
- value: function pause(event) {
- if (!event) {
- this._isPaused = true;
- }
- if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
- Util.triggerTransitionEnd(this._element);
- this.cycle(true);
- }
+ if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
+ Util.triggerTransitionEnd(this._element);
+ this.cycle(true);
+ }
+ clearInterval(this._interval);
+ this._interval = null;
+ };
+
+ Carousel.prototype.cycle = function cycle(event) {
+ if (!event) {
+ this._isPaused = false;
+ }
+
+ if (this._interval) {
clearInterval(this._interval);
this._interval = null;
}
- }, {
- key: 'cycle',
- value: function cycle(event) {
- if (!event) {
- this._isPaused = false;
- }
- if (this._interval) {
- clearInterval(this._interval);
- this._interval = null;
- }
+ if (this._config.interval && !this._isPaused) {
+ this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
+ }
+ };
- if (this._config.interval && !this._isPaused) {
- this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
- }
+ Carousel.prototype.to = function to(index) {
+ var _this3 = this;
+
+ this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
+
+ var activeIndex = this._getItemIndex(this._activeElement);
+
+ if (index > this._items.length - 1 || index < 0) {
+ return;
}
- }, {
- key: 'to',
- value: function to(index) {
- var _this2 = this;
- this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
+ if (this._isSliding) {
+ $(this._element).one(Event.SLID, function () {
+ return _this3.to(index);
+ });
+ return;
+ }
- var activeIndex = this._getItemIndex(this._activeElement);
+ if (activeIndex === index) {
+ this.pause();
+ this.cycle();
+ return;
+ }
- if (index > this._items.length - 1 || index < 0) {
- return;
- }
+ var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
- if (this._isSliding) {
- $(this._element).one(Event.SLID, function () {
- return _this2.to(index);
- });
- return;
- }
+ this._slide(direction, this._items[index]);
+ };
- if (activeIndex === index) {
- this.pause();
- this.cycle();
- return;
- }
+ Carousel.prototype.dispose = function dispose() {
+ $(this._element).off(EVENT_KEY);
+ $.removeData(this._element, DATA_KEY);
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
+ this._items = null;
+ this._config = null;
+ this._element = null;
+ this._interval = null;
+ this._isPaused = null;
+ this._isSliding = null;
+ this._activeElement = null;
+ this._indicatorsElement = null;
+ };
- this._slide(direction, this._items[index]);
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $(this._element).off(EVENT_KEY);
- $.removeData(this._element, DATA_KEY);
-
- this._items = null;
- this._config = null;
- this._element = null;
- this._interval = null;
- this._isPaused = null;
- this._isSliding = null;
- this._activeElement = null;
- this._indicatorsElement = null;
- }
+ // private
- // private
+ Carousel.prototype._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
- }
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- if (this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
- }
+ Carousel.prototype._addEventListeners = function _addEventListeners() {
+ var _this4 = this;
- if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
- $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
- }
+ if (this._config.keyboard) {
+ $(this._element).on(Event.KEYDOWN, function (event) {
+ return _this4._keydown(event);
+ });
}
- }, {
- key: '_keydown',
- value: function _keydown(event) {
- event.preventDefault();
- if (/input|textarea/i.test(event.target.tagName)) {
- return;
- }
+ if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
+ $(this._element).on(Event.MOUSEENTER, function (event) {
+ return _this4.pause(event);
+ }).on(Event.MOUSELEAVE, function (event) {
+ return _this4.cycle(event);
+ });
+ }
+ };
- switch (event.which) {
- case 37:
- this.prev();break;
- case 39:
- this.next();break;
- default:
- return;
- }
+ Carousel.prototype._keydown = function _keydown(event) {
+ if (/input|textarea/i.test(event.target.tagName)) {
+ return;
}
- }, {
- key: '_getItemIndex',
- value: function _getItemIndex(element) {
- this._items = $.makeArray($(element).parent().find(Selector.ITEM));
- return this._items.indexOf(element);
+
+ switch (event.which) {
+ case ARROW_LEFT_KEYCODE:
+ event.preventDefault();
+ this.prev();
+ break;
+ case ARROW_RIGHT_KEYCODE:
+ event.preventDefault();
+ this.next();
+ break;
+ default:
+ return;
}
- }, {
- key: '_getItemByDirection',
- value: function _getItemByDirection(direction, activeElement) {
- var isNextDirection = direction === Direction.NEXT;
- var isPrevDirection = direction === Direction.PREVIOUS;
- var activeIndex = this._getItemIndex(activeElement);
- var lastItemIndex = this._items.length - 1;
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
+ };
- if (isGoingToWrap && !this._config.wrap) {
- return activeElement;
- }
+ Carousel.prototype._getItemIndex = function _getItemIndex(element) {
+ this._items = $.makeArray($(element).parent().find(Selector.ITEM));
+ return this._items.indexOf(element);
+ };
- var delta = direction === Direction.PREVIOUS ? -1 : 1;
- var itemIndex = (activeIndex + delta) % this._items.length;
+ Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {
+ var isNextDirection = direction === Direction.NEXT;
+ var isPrevDirection = direction === Direction.PREVIOUS;
+ var activeIndex = this._getItemIndex(activeElement);
+ var lastItemIndex = this._items.length - 1;
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ if (isGoingToWrap && !this._config.wrap) {
+ return activeElement;
}
- }, {
- key: '_triggerSlideEvent',
- value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
- var slideEvent = $.Event(Event.SLIDE, {
- relatedTarget: relatedTarget,
- direction: directionalClassname
- });
- $(this._element).trigger(slideEvent);
+ var delta = direction === Direction.PREVIOUS ? -1 : 1;
+ var itemIndex = (activeIndex + delta) % this._items.length;
- return slideEvent;
- }
- }, {
- key: '_setActiveIndicatorElement',
- value: function _setActiveIndicatorElement(element) {
- if (this._indicatorsElement) {
- $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ };
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
+ Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ var slideEvent = $.Event(Event.SLIDE, {
+ relatedTarget: relatedTarget,
+ direction: eventDirectionName
+ });
- if (nextIndicator) {
- $(nextIndicator).addClass(ClassName.ACTIVE);
- }
+ $(this._element).trigger(slideEvent);
+
+ return slideEvent;
+ };
+
+ Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
+ if (this._indicatorsElement) {
+ $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
+
+ if (nextIndicator) {
+ $(nextIndicator).addClass(ClassName.ACTIVE);
}
}
- }, {
- key: '_slide',
- value: function _slide(direction, element) {
- var _this3 = this;
+ };
- var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
+ Carousel.prototype._slide = function _slide(direction, element) {
+ var _this5 = this;
- var isCycling = Boolean(this._interval);
+ var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
- var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
+ var isCycling = Boolean(this._interval);
- if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
- this._isSliding = false;
- return;
- }
+ var directionalClassName = void 0;
+ var orderClassName = void 0;
+ var eventDirectionName = void 0;
- var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
- if (slideEvent.isDefaultPrevented()) {
- return;
- }
+ if (direction === Direction.NEXT) {
+ directionalClassName = ClassName.LEFT;
+ orderClassName = ClassName.NEXT;
+ eventDirectionName = Direction.LEFT;
+ } else {
+ directionalClassName = ClassName.RIGHT;
+ orderClassName = ClassName.PREV;
+ eventDirectionName = Direction.RIGHT;
+ }
- if (!activeElement || !nextElement) {
- // some weirdness is happening, so we bail
- return;
- }
+ if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
+ this._isSliding = false;
+ return;
+ }
- this._isSliding = true;
+ var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
+ if (slideEvent.isDefaultPrevented()) {
+ return;
+ }
- if (isCycling) {
- this.pause();
- }
+ if (!activeElement || !nextElement) {
+ // some weirdness is happening, so we bail
+ return;
+ }
- this._setActiveIndicatorElement(nextElement);
+ this._isSliding = true;
- var slidEvent = $.Event(Event.SLID, {
- relatedTarget: nextElement,
- direction: directionalClassName
- });
+ if (isCycling) {
+ this.pause();
+ }
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
+ this._setActiveIndicatorElement(nextElement);
- $(nextElement).addClass(direction);
+ var slidEvent = $.Event(Event.SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName
+ });
- Util.reflow(nextElement);
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
- $(activeElement).addClass(directionalClassName);
- $(nextElement).addClass(directionalClassName);
+ $(nextElement).addClass(orderClassName);
- $(activeElement).one(Util.TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName).removeClass(direction);
+ Util.reflow(nextElement);
- $(nextElement).addClass(ClassName.ACTIVE);
+ $(activeElement).addClass(directionalClassName);
+ $(nextElement).addClass(directionalClassName);
- $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
+ $(activeElement).one(Util.TRANSITION_END, function () {
+ $(nextElement).removeClass(directionalClassName + ' ' + orderClassName).addClass(ClassName.ACTIVE);
- _this3._isSliding = false;
+ $(activeElement).removeClass(ClassName.ACTIVE + ' ' + orderClassName + ' ' + directionalClassName);
- setTimeout(function () {
- return $(_this3._element).trigger(slidEvent);
- }, 0);
- }).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- $(activeElement).removeClass(ClassName.ACTIVE);
- $(nextElement).addClass(ClassName.ACTIVE);
+ _this5._isSliding = false;
- this._isSliding = false;
- $(this._element).trigger(slidEvent);
- }
+ setTimeout(function () {
+ return $(_this5._element).trigger(slidEvent);
+ }, 0);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ $(activeElement).removeClass(ClassName.ACTIVE);
+ $(nextElement).addClass(ClassName.ACTIVE);
- if (isCycling) {
- this.cycle();
- }
+ this._isSliding = false;
+ $(this._element).trigger(slidEvent);
}
- // static
+ if (isCycling) {
+ this.cycle();
+ }
+ };
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = $.extend({}, Default, $(this).data());
+ // static
- if (typeof config === 'object') {
- $.extend(_config, config);
- }
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+ var _config = $.extend({}, Default, $(this).data());
- var action = typeof config === 'string' ? config : _config.slide;
+ if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
+ $.extend(_config, config);
+ }
- if (!data) {
- data = new Carousel(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ var action = typeof config === 'string' ? config : _config.slide;
- if (typeof config === 'number') {
- data.to(config);
- } else if (typeof action === 'string') {
- if (data[action] === undefined) {
- throw new Error('No method named "' + action + '"');
- }
- data[action]();
- } else if (_config.interval) {
- data.pause();
- data.cycle();
- }
- });
- }
- }, {
- key: '_dataApiClickHandler',
- value: function _dataApiClickHandler(event) {
- var selector = Util.getSelectorFromElement(this);
+ if (!data) {
+ data = new Carousel(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
- if (!selector) {
- return;
+ if (typeof config === 'number') {
+ data.to(config);
+ } else if (typeof action === 'string') {
+ if (data[action] === undefined) {
+ throw new Error('No method named "' + action + '"');
+ }
+ data[action]();
+ } else if (_config.interval) {
+ data.pause();
+ data.cycle();
}
+ });
+ };
- var target = $(selector)[0];
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
+ var selector = Util.getSelectorFromElement(this);
- if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
- return;
- }
+ if (!selector) {
+ return;
+ }
- var config = $.extend({}, $(target).data(), $(this).data());
- var slideIndex = this.getAttribute('data-slide-to');
+ var target = $(selector)[0];
- if (slideIndex) {
- config.interval = false;
- }
+ if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
+ return;
+ }
- Carousel._jQueryInterface.call($(target), config);
+ var config = $.extend({}, $(target).data(), $(this).data());
+ var slideIndex = this.getAttribute('data-slide-to');
- if (slideIndex) {
- $(target).data(DATA_KEY).to(slideIndex);
- }
+ if (slideIndex) {
+ config.interval = false;
+ }
- event.preventDefault();
+ Carousel._jQueryInterface.call($(target), config);
+
+ if (slideIndex) {
+ $(target).data(DATA_KEY).to(slideIndex);
}
- }, {
+
+ event.preventDefault();
+ };
+
+ _createClass(Carousel, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -984,7 +967,13 @@ var Carousel = (function ($) {
}]);
return Carousel;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
@@ -1009,16 +998,16 @@ var Carousel = (function ($) {
};
return Carousel;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): collapse.js
+ * Bootstrap (v4.0.0-alpha.5): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Collapse = (function ($) {
+var Collapse = function ($) {
/**
* ------------------------------------------------------------------------
@@ -1027,7 +1016,7 @@ var Collapse = (function ($) {
*/
var NAME = 'collapse';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -1053,7 +1042,7 @@ var Collapse = (function ($) {
};
var ClassName = {
- IN: 'in',
+ SHOW: 'show',
COLLAPSE: 'collapse',
COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed'
@@ -1065,7 +1054,7 @@ var Collapse = (function ($) {
};
var Selector = {
- ACTIVES: '.panel > .in, .panel > .collapsing',
+ ACTIVES: '.card > .show, .card > .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
};
@@ -1075,7 +1064,7 @@ var Collapse = (function ($) {
* ------------------------------------------------------------------------
*/
- var Collapse = (function () {
+ var Collapse = function () {
function Collapse(element, config) {
_classCallCheck(this, Collapse);
@@ -1095,240 +1084,228 @@ var Collapse = (function ($) {
}
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Collapse, [{
- key: 'toggle',
+ // public
+
+ Collapse.prototype.toggle = function toggle() {
+ if ($(this._element).hasClass(ClassName.SHOW)) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ };
- // public
+ Collapse.prototype.show = function show() {
+ var _this6 = this;
- value: function toggle() {
- if ($(this._element).hasClass(ClassName.IN)) {
- this.hide();
- } else {
- this.show();
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning');
+ }
+
+ if ($(this._element).hasClass(ClassName.SHOW)) {
+ return;
+ }
+
+ var actives = void 0;
+ var activesData = void 0;
+
+ if (this._parent) {
+ actives = $.makeArray($(this._parent).find(Selector.ACTIVES));
+ if (!actives.length) {
+ actives = null;
}
}
- }, {
- key: 'show',
- value: function show() {
- var _this4 = this;
- if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
+ if (actives) {
+ activesData = $(actives).data(DATA_KEY);
+ if (activesData && activesData._isTransitioning) {
return;
}
+ }
- var actives = undefined;
- var activesData = undefined;
+ var startEvent = $.Event(Event.SHOW);
+ $(this._element).trigger(startEvent);
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- if (this._parent) {
- actives = $.makeArray($(Selector.ACTIVES));
- if (!actives.length) {
- actives = null;
- }
+ if (actives) {
+ Collapse._jQueryInterface.call($(actives), 'hide');
+ if (!activesData) {
+ $(actives).data(DATA_KEY, null);
}
+ }
- if (actives) {
- activesData = $(actives).data(DATA_KEY);
- if (activesData && activesData._isTransitioning) {
- return;
- }
- }
+ var dimension = this._getDimension();
- var startEvent = $.Event(Event.SHOW);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
- return;
- }
+ $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
- if (actives) {
- Collapse._jQueryInterface.call($(actives), 'hide');
- if (!activesData) {
- $(actives).data(DATA_KEY, null);
- }
- }
+ this._element.style[dimension] = 0;
+ this._element.setAttribute('aria-expanded', true);
- var dimension = this._getDimension();
+ if (this._triggerArray.length) {
+ $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
+ }
- $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
+ this.setTransitioning(true);
- this._element.style[dimension] = 0;
- this._element.setAttribute('aria-expanded', true);
+ var complete = function complete() {
+ $(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
- if (this._triggerArray.length) {
- $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
- }
+ _this6._element.style[dimension] = '';
- this.setTransitioning(true);
+ _this6.setTransitioning(false);
- var complete = function complete() {
- $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
+ $(_this6._element).trigger(Event.SHOWN);
+ };
- _this4._element.style[dimension] = '';
+ if (!Util.supportsTransitionEnd()) {
+ complete();
+ return;
+ }
- _this4.setTransitioning(false);
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
+ var scrollSize = 'scroll' + capitalizedDimension;
- $(_this4._element).trigger(Event.SHOWN);
- };
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- if (!Util.supportsTransitionEnd()) {
- complete();
- return;
- }
+ this._element.style[dimension] = this._element[scrollSize] + 'px';
+ };
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = 'scroll' + capitalizedDimension;
+ Collapse.prototype.hide = function hide() {
+ var _this7 = this;
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning');
+ }
- this._element.style[dimension] = this._element[scrollSize] + 'px';
+ if (!$(this._element).hasClass(ClassName.SHOW)) {
+ return;
}
- }, {
- key: 'hide',
- value: function hide() {
- var _this5 = this;
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
- return;
- }
+ var startEvent = $.Event(Event.HIDE);
+ $(this._element).trigger(startEvent);
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- var startEvent = $.Event(Event.HIDE);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
- return;
- }
+ var dimension = this._getDimension();
+ var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
- var dimension = this._getDimension();
- var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
+ this._element.style[dimension] = this._element[offsetDimension] + 'px';
- this._element.style[dimension] = this._element[offsetDimension] + 'px';
+ Util.reflow(this._element);
- Util.reflow(this._element);
+ $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
- $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
+ this._element.setAttribute('aria-expanded', false);
- this._element.setAttribute('aria-expanded', false);
+ if (this._triggerArray.length) {
+ $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
+ }
- if (this._triggerArray.length) {
- $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
- }
+ this.setTransitioning(true);
- this.setTransitioning(true);
+ var complete = function complete() {
+ _this7.setTransitioning(false);
+ $(_this7._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
+ };
- var complete = function complete() {
- _this5.setTransitioning(false);
- $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
- };
+ this._element.style[dimension] = '';
- this._element.style[dimension] = 0;
+ if (!Util.supportsTransitionEnd()) {
+ complete();
+ return;
+ }
- if (!Util.supportsTransitionEnd()) {
- complete();
- return;
- }
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ };
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- }
- }, {
- key: 'setTransitioning',
- value: function setTransitioning(isTransitioning) {
- this._isTransitioning = isTransitioning;
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {
+ this._isTransitioning = isTransitioning;
+ };
- this._config = null;
- this._parent = null;
- this._element = null;
- this._triggerArray = null;
- this._isTransitioning = null;
- }
+ Collapse.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
- // private
+ this._config = null;
+ this._parent = null;
+ this._element = null;
+ this._triggerArray = null;
+ this._isTransitioning = null;
+ };
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- config.toggle = Boolean(config.toggle); // coerce string values
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
- }
- }, {
- key: '_getDimension',
- value: function _getDimension() {
- var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
- return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
- }
- }, {
- key: '_getParent',
- value: function _getParent() {
- var _this6 = this;
+ // private
+
+ Collapse.prototype._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ config.toggle = Boolean(config.toggle); // coerce string values
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
- var parent = $(this._config.parent)[0];
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
+ Collapse.prototype._getDimension = function _getDimension() {
+ var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
+ };
- $(parent).find(selector).each(function (i, element) {
- _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
- });
+ Collapse.prototype._getParent = function _getParent() {
+ var _this8 = this;
- return parent;
- }
- }, {
- key: '_addAriaAndCollapsedClass',
- value: function _addAriaAndCollapsedClass(element, triggerArray) {
- if (element) {
- var isOpen = $(element).hasClass(ClassName.IN);
- element.setAttribute('aria-expanded', isOpen);
-
- if (triggerArray.length) {
- $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
- }
+ var parent = $(this._config.parent)[0];
+ var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
+
+ $(parent).find(selector).each(function (i, element) {
+ _this8._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
+ });
+
+ return parent;
+ };
+
+ Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
+ if (element) {
+ var isOpen = $(element).hasClass(ClassName.SHOW);
+ element.setAttribute('aria-expanded', isOpen);
+
+ if (triggerArray.length) {
+ $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
}
}
+ };
- // static
+ // static
- }], [{
- key: '_getTargetFromElement',
- value: function _getTargetFromElement(element) {
- var selector = Util.getSelectorFromElement(element);
- return selector ? $(selector)[0] : null;
- }
- }, {
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
- var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
-
- if (!data && _config.toggle && /show|hide/.test(config)) {
- _config.toggle = false;
- }
+ Collapse._getTargetFromElement = function _getTargetFromElement(element) {
+ var selector = Util.getSelectorFromElement(element);
+ return selector ? $(selector)[0] : null;
+ };
- if (!data) {
- data = new Collapse(this, _config);
- $this.data(DATA_KEY, data);
- }
+ Collapse._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $this = $(this);
+ var data = $this.data(DATA_KEY);
+ var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ if (!data && _config.toggle && /show|hide/.test(config)) {
+ _config.toggle = false;
+ }
+
+ if (!data) {
+ data = new Collapse(this, _config);
+ $this.data(DATA_KEY, data);
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
- });
- }
- }, {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Collapse, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -1341,7 +1318,13 @@ var Collapse = (function ($) {
}]);
return Collapse;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
@@ -1367,16 +1350,16 @@ var Collapse = (function ($) {
};
return Collapse;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): dropdown.js
+ * Bootstrap (v4.0.0-alpha.5): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Dropdown = (function ($) {
+var Dropdown = function ($) {
/**
* ------------------------------------------------------------------------
@@ -1385,11 +1368,15 @@ var Dropdown = (function ($) {
*/
var NAME = 'dropdown';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
+ var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
+ var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
+ var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var Event = {
HIDE: 'hide' + EVENT_KEY,
@@ -1404,7 +1391,7 @@ var Dropdown = (function ($) {
var ClassName = {
BACKDROP: 'dropdown-backdrop',
DISABLED: 'disabled',
- OPEN: 'open'
+ SHOW: 'show'
};
var Selector = {
@@ -1423,7 +1410,7 @@ var Dropdown = (function ($) {
* ------------------------------------------------------------------------
*/
- var Dropdown = (function () {
+ var Dropdown = function () {
function Dropdown(element) {
_classCallCheck(this, Dropdown);
@@ -1432,201 +1419,186 @@ var Dropdown = (function ($) {
this._addEventListeners();
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Dropdown, [{
- key: 'toggle',
-
- // public
+ // public
- value: function toggle() {
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
- return false;
- }
+ Dropdown.prototype.toggle = function toggle() {
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
+ return false;
+ }
- var parent = Dropdown._getParentFromElement(this);
- var isActive = $(parent).hasClass(ClassName.OPEN);
+ var parent = Dropdown._getParentFromElement(this);
+ var isActive = $(parent).hasClass(ClassName.SHOW);
- Dropdown._clearMenus();
+ Dropdown._clearMenus();
- if (isActive) {
- return false;
- }
+ if (isActive) {
+ return false;
+ }
- if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
+ if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
- // if mobile we use a backdrop because click events don't delegate
- var dropdown = document.createElement('div');
- dropdown.className = ClassName.BACKDROP;
- $(dropdown).insertBefore(this);
- $(dropdown).on('click', Dropdown._clearMenus);
- }
+ // if mobile we use a backdrop because click events don't delegate
+ var dropdown = document.createElement('div');
+ dropdown.className = ClassName.BACKDROP;
+ $(dropdown).insertBefore(this);
+ $(dropdown).on('click', Dropdown._clearMenus);
+ }
- var relatedTarget = { relatedTarget: this };
- var showEvent = $.Event(Event.SHOW, relatedTarget);
+ var relatedTarget = {
+ relatedTarget: this
+ };
+ var showEvent = $.Event(Event.SHOW, relatedTarget);
- $(parent).trigger(showEvent);
+ $(parent).trigger(showEvent);
- if (showEvent.isDefaultPrevented()) {
- return false;
- }
+ if (showEvent.isDefaultPrevented()) {
+ return false;
+ }
- this.focus();
- this.setAttribute('aria-expanded', 'true');
+ this.focus();
+ this.setAttribute('aria-expanded', true);
- $(parent).toggleClass(ClassName.OPEN);
- $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
+ $(parent).toggleClass(ClassName.SHOW);
+ $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
- return false;
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._element).off(EVENT_KEY);
- this._element = null;
- }
+ return false;
+ };
- // private
+ Dropdown.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ $(this._element).off(EVENT_KEY);
+ this._element = null;
+ };
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- $(this._element).on(Event.CLICK, this.toggle);
- }
+ // private
- // static
+ Dropdown.prototype._addEventListeners = function _addEventListeners() {
+ $(this._element).on(Event.CLICK, this.toggle);
+ };
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ // static
- if (!data) {
- $(this).data(DATA_KEY, data = new Dropdown(this));
- }
+ Dropdown._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config].call(this);
- }
- });
- }
- }, {
- key: '_clearMenus',
- value: function _clearMenus(event) {
- if (event && event.which === 3) {
- return;
+ if (!data) {
+ data = new Dropdown(this);
+ $(this).data(DATA_KEY, data);
}
- var backdrop = $(Selector.BACKDROP)[0];
- if (backdrop) {
- backdrop.parentNode.removeChild(backdrop);
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
+ }
+ data[config].call(this);
}
+ });
+ };
- var toggles = $.makeArray($(Selector.DATA_TOGGLE));
-
- for (var i = 0; i < toggles.length; i++) {
- var _parent = Dropdown._getParentFromElement(toggles[i]);
- var relatedTarget = { relatedTarget: toggles[i] };
+ Dropdown._clearMenus = function _clearMenus(event) {
+ if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
+ return;
+ }
- if (!$(_parent).hasClass(ClassName.OPEN)) {
- continue;
- }
+ var backdrop = $(Selector.BACKDROP)[0];
+ if (backdrop) {
+ backdrop.parentNode.removeChild(backdrop);
+ }
- if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) {
- continue;
- }
+ var toggles = $.makeArray($(Selector.DATA_TOGGLE));
- var hideEvent = $.Event(Event.HIDE, relatedTarget);
- $(_parent).trigger(hideEvent);
- if (hideEvent.isDefaultPrevented()) {
- continue;
- }
+ for (var i = 0; i < toggles.length; i++) {
+ var parent = Dropdown._getParentFromElement(toggles[i]);
+ var relatedTarget = {
+ relatedTarget: toggles[i]
+ };
- toggles[i].setAttribute('aria-expanded', 'false');
+ if (!$(parent).hasClass(ClassName.SHOW)) {
+ continue;
+ }
- $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
+ if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) {
+ continue;
}
- }
- }, {
- key: '_getParentFromElement',
- value: function _getParentFromElement(element) {
- var parent = undefined;
- var selector = Util.getSelectorFromElement(element);
- if (selector) {
- parent = $(selector)[0];
+ var hideEvent = $.Event(Event.HIDE, relatedTarget);
+ $(parent).trigger(hideEvent);
+ if (hideEvent.isDefaultPrevented()) {
+ continue;
}
- return parent || element.parentNode;
+ toggles[i].setAttribute('aria-expanded', 'false');
+
+ $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
}
- }, {
- key: '_dataApiKeydownHandler',
- value: function _dataApiKeydownHandler(event) {
- if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
- return;
- }
+ };
- event.preventDefault();
- event.stopPropagation();
+ Dropdown._getParentFromElement = function _getParentFromElement(element) {
+ var parent = void 0;
+ var selector = Util.getSelectorFromElement(element);
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
- return;
- }
+ if (selector) {
+ parent = $(selector)[0];
+ }
- var parent = Dropdown._getParentFromElement(this);
- var isActive = $(parent).hasClass(ClassName.OPEN);
+ return parent || element.parentNode;
+ };
- if (!isActive && event.which !== 27 || isActive && event.which === 27) {
+ Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
+ if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
+ return;
+ }
- if (event.which === 27) {
- var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
- $(toggle).trigger('focus');
- }
+ event.preventDefault();
+ event.stopPropagation();
- $(this).trigger('click');
- return;
- }
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
+ return;
+ }
- var items = $.makeArray($(Selector.VISIBLE_ITEMS));
+ var parent = Dropdown._getParentFromElement(this);
+ var isActive = $(parent).hasClass(ClassName.SHOW);
- items = items.filter(function (item) {
- return item.offsetWidth || item.offsetHeight;
- });
+ if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
- if (!items.length) {
- return;
+ if (event.which === ESCAPE_KEYCODE) {
+ var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
+ $(toggle).trigger('focus');
}
- var index = items.indexOf(event.target);
+ $(this).trigger('click');
+ return;
+ }
+
+ var items = $(parent).find(Selector.VISIBLE_ITEMS).get();
- if (event.which === 38 && index > 0) {
- // up
- index--;
- }
+ if (!items.length) {
+ return;
+ }
- if (event.which === 40 && index < items.length - 1) {
- // down
- index++;
- }
+ var index = items.indexOf(event.target);
- if (index < 0) {
- index = 0;
- }
+ if (event.which === ARROW_UP_KEYCODE && index > 0) {
+ // up
+ index--;
+ }
- items[index].focus();
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
+ // down
+ index++;
}
- }, {
+
+ if (index < 0) {
+ index = 0;
+ }
+
+ items[index].focus();
+ };
+
+ _createClass(Dropdown, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -1634,7 +1606,13 @@ var Dropdown = (function ($) {
}]);
return Dropdown;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
e.stopPropagation();
@@ -1654,16 +1632,16 @@ var Dropdown = (function ($) {
};
return Dropdown;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): modal.js
+ * Bootstrap (v4.0.0-alpha.5): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Modal = (function ($) {
+var Modal = function ($) {
/**
* ------------------------------------------------------------------------
@@ -1672,13 +1650,14 @@ var Modal = (function ($) {
*/
var NAME = 'modal';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 300;
var BACKDROP_TRANSITION_DURATION = 150;
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default = {
backdrop: true,
@@ -1713,7 +1692,7 @@ var Modal = (function ($) {
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
- IN: 'in'
+ SHOW: 'show'
};
var Selector = {
@@ -1729,7 +1708,7 @@ var Modal = (function ($) {
* ------------------------------------------------------------------------
*/
- var Modal = (function () {
+ var Modal = function () {
function Modal(element, config) {
_classCallCheck(this, Modal);
@@ -1740,384 +1719,382 @@ var Modal = (function ($) {
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
+ this._isTransitioning = false;
this._originalBodyPadding = 0;
this._scrollbarWidth = 0;
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Modal, [{
- key: 'toggle',
+ // public
+
+ Modal.prototype.toggle = function toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget);
+ };
- // public
+ Modal.prototype.show = function show(relatedTarget) {
+ var _this9 = this;
- value: function toggle(relatedTarget) {
- return this._isShown ? this.hide() : this.show(relatedTarget);
+ if (this._isTransitioning) {
+ throw new Error('Modal is transitioning');
}
- }, {
- key: 'show',
- value: function show(relatedTarget) {
- var _this7 = this;
- var showEvent = $.Event(Event.SHOW, {
- relatedTarget: relatedTarget
- });
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true;
+ }
+ var showEvent = $.Event(Event.SHOW, {
+ relatedTarget: relatedTarget
+ });
- $(this._element).trigger(showEvent);
+ $(this._element).trigger(showEvent);
- if (this._isShown || showEvent.isDefaultPrevented()) {
- return;
- }
+ if (this._isShown || showEvent.isDefaultPrevented()) {
+ return;
+ }
- this._isShown = true;
+ this._isShown = true;
- this._checkScrollbar();
- this._setScrollbar();
+ this._checkScrollbar();
+ this._setScrollbar();
- $(document.body).addClass(ClassName.OPEN);
+ $(document.body).addClass(ClassName.OPEN);
- this._setEscapeEvent();
- this._setResizeEvent();
+ this._setEscapeEvent();
+ this._setResizeEvent();
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
+ $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
+ return _this9.hide(event);
+ });
- $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
- $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
- if ($(event.target).is(_this7._element)) {
- _this7._ignoreBackdropClick = true;
- }
- });
+ $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
+ $(_this9._element).one(Event.MOUSEUP_DISMISS, function (event) {
+ if ($(event.target).is(_this9._element)) {
+ _this9._ignoreBackdropClick = true;
+ }
});
+ });
+
+ this._showBackdrop(function () {
+ return _this9._showElement(relatedTarget);
+ });
+ };
- this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
+ Modal.prototype.hide = function hide(event) {
+ var _this10 = this;
+
+ if (event) {
+ event.preventDefault();
}
- }, {
- key: 'hide',
- value: function hide(event) {
- if (event) {
- event.preventDefault();
- }
- var hideEvent = $.Event(Event.HIDE);
+ if (this._isTransitioning) {
+ throw new Error('Modal is transitioning');
+ }
- $(this._element).trigger(hideEvent);
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
+ if (transition) {
+ this._isTransitioning = true;
+ }
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
- return;
- }
+ var hideEvent = $.Event(Event.HIDE);
+ $(this._element).trigger(hideEvent);
- this._isShown = false;
+ if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ return;
+ }
- this._setEscapeEvent();
- this._setResizeEvent();
+ this._isShown = false;
- $(document).off(Event.FOCUSIN);
+ this._setEscapeEvent();
+ this._setResizeEvent();
- $(this._element).removeClass(ClassName.IN);
+ $(document).off(Event.FOCUSIN);
- $(this._element).off(Event.CLICK_DISMISS);
- $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
+ $(this._element).removeClass(ClassName.SHOW);
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
+ $(this._element).off(Event.CLICK_DISMISS);
+ $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
- $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- this._hideModal();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
-
- $(window).off(EVENT_KEY);
- $(document).off(EVENT_KEY);
- $(this._element).off(EVENT_KEY);
- $(this._backdrop).off(EVENT_KEY);
-
- this._config = null;
- this._element = null;
- this._dialog = null;
- this._backdrop = null;
- this._isShown = null;
- this._isBodyOverflowing = null;
- this._ignoreBackdropClick = null;
- this._originalBodyPadding = null;
- this._scrollbarWidth = null;
+ if (transition) {
+ $(this._element).one(Util.TRANSITION_END, function (event) {
+ return _this10._hideModal(event);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ this._hideModal();
}
+ };
- // private
+ Modal.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
+ $(window, document, this._element, this._backdrop).off(EVENT_KEY);
+
+ this._config = null;
+ this._element = null;
+ this._dialog = null;
+ this._backdrop = null;
+ this._isShown = null;
+ this._isBodyOverflowing = null;
+ this._ignoreBackdropClick = null;
+ this._originalBodyPadding = null;
+ this._scrollbarWidth = null;
+ };
+
+ // private
+
+ Modal.prototype._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
+
+ Modal.prototype._showElement = function _showElement(relatedTarget) {
+ var _this11 = this;
+
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
+
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
+ // don't move modals dom position
+ document.body.appendChild(this._element);
}
- }, {
- key: '_showElement',
- value: function _showElement(relatedTarget) {
- var _this8 = this;
- var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
+ this._element.style.display = 'block';
+ this._element.removeAttribute('aria-hidden');
+ this._element.scrollTop = 0;
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
- // don't move modals dom position
- document.body.appendChild(this._element);
- }
+ if (transition) {
+ Util.reflow(this._element);
+ }
- this._element.style.display = 'block';
- this._element.scrollTop = 0;
+ $(this._element).addClass(ClassName.SHOW);
- if (transition) {
- Util.reflow(this._element);
- }
+ if (this._config.focus) {
+ this._enforceFocus();
+ }
- $(this._element).addClass(ClassName.IN);
+ var shownEvent = $.Event(Event.SHOWN, {
+ relatedTarget: relatedTarget
+ });
- if (this._config.focus) {
- this._enforceFocus();
+ var transitionComplete = function transitionComplete() {
+ if (_this11._config.focus) {
+ _this11._element.focus();
}
+ _this11._isTransitioning = false;
+ $(_this11._element).trigger(shownEvent);
+ };
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: relatedTarget
- });
+ if (transition) {
+ $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ transitionComplete();
+ }
+ };
- var transitionComplete = function transitionComplete() {
- if (_this8._config.focus) {
- _this8._element.focus();
- }
- $(_this8._element).trigger(shownEvent);
- };
+ Modal.prototype._enforceFocus = function _enforceFocus() {
+ var _this12 = this;
- if (transition) {
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- transitionComplete();
+ $(document).off(Event.FOCUSIN) // guard against infinite focus loop
+ .on(Event.FOCUSIN, function (event) {
+ if (document !== event.target && _this12._element !== event.target && !$(_this12._element).has(event.target).length) {
+ _this12._element.focus();
}
- }
- }, {
- key: '_enforceFocus',
- value: function _enforceFocus() {
- var _this9 = this;
-
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
- .on(Event.FOCUSIN, function (event) {
- if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {
- _this9._element.focus();
+ });
+ };
+
+ Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
+ var _this13 = this;
+
+ if (this._isShown && this._config.keyboard) {
+ $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
+ if (event.which === ESCAPE_KEYCODE) {
+ _this13.hide();
}
});
+ } else if (!this._isShown) {
+ $(this._element).off(Event.KEYDOWN_DISMISS);
}
- }, {
- key: '_setEscapeEvent',
- value: function _setEscapeEvent() {
- var _this10 = this;
-
- if (this._isShown && this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
- if (event.which === 27) {
- _this10.hide();
- }
- });
- } else if (!this._isShown) {
- $(this._element).off(Event.KEYDOWN_DISMISS);
- }
- }
- }, {
- key: '_setResizeEvent',
- value: function _setResizeEvent() {
- if (this._isShown) {
- $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
- } else {
- $(window).off(Event.RESIZE);
- }
- }
- }, {
- key: '_hideModal',
- value: function _hideModal() {
- var _this11 = this;
-
- this._element.style.display = 'none';
- this._showBackdrop(function () {
- $(document.body).removeClass(ClassName.OPEN);
- _this11._resetAdjustments();
- _this11._resetScrollbar();
- $(_this11._element).trigger(Event.HIDDEN);
+ };
+
+ Modal.prototype._setResizeEvent = function _setResizeEvent() {
+ var _this14 = this;
+
+ if (this._isShown) {
+ $(window).on(Event.RESIZE, function (event) {
+ return _this14._handleUpdate(event);
});
+ } else {
+ $(window).off(Event.RESIZE);
}
- }, {
- key: '_removeBackdrop',
- value: function _removeBackdrop() {
- if (this._backdrop) {
- $(this._backdrop).remove();
- this._backdrop = null;
- }
- }
- }, {
- key: '_showBackdrop',
- value: function _showBackdrop(callback) {
- var _this12 = this;
+ };
- var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
+ Modal.prototype._hideModal = function _hideModal() {
+ var _this15 = this;
+
+ this._element.style.display = 'none';
+ this._element.setAttribute('aria-hidden', 'true');
+ this._isTransitioning = false;
+ this._showBackdrop(function () {
+ $(document.body).removeClass(ClassName.OPEN);
+ _this15._resetAdjustments();
+ _this15._resetScrollbar();
+ $(_this15._element).trigger(Event.HIDDEN);
+ });
+ };
- if (this._isShown && this._config.backdrop) {
- var doAnimate = Util.supportsTransitionEnd() && animate;
+ Modal.prototype._removeBackdrop = function _removeBackdrop() {
+ if (this._backdrop) {
+ $(this._backdrop).remove();
+ this._backdrop = null;
+ }
+ };
- this._backdrop = document.createElement('div');
- this._backdrop.className = ClassName.BACKDROP;
+ Modal.prototype._showBackdrop = function _showBackdrop(callback) {
+ var _this16 = this;
- if (animate) {
- $(this._backdrop).addClass(animate);
- }
+ var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
- $(this._backdrop).appendTo(document.body);
+ if (this._isShown && this._config.backdrop) {
+ var doAnimate = Util.supportsTransitionEnd() && animate;
- $(this._element).on(Event.CLICK_DISMISS, function (event) {
- if (_this12._ignoreBackdropClick) {
- _this12._ignoreBackdropClick = false;
- return;
- }
- if (event.target !== event.currentTarget) {
- return;
- }
- if (_this12._config.backdrop === 'static') {
- _this12._element.focus();
- } else {
- _this12.hide();
- }
- });
+ this._backdrop = document.createElement('div');
+ this._backdrop.className = ClassName.BACKDROP;
- if (doAnimate) {
- Util.reflow(this._backdrop);
- }
+ if (animate) {
+ $(this._backdrop).addClass(animate);
+ }
- $(this._backdrop).addClass(ClassName.IN);
+ $(this._backdrop).appendTo(document.body);
- if (!callback) {
+ $(this._element).on(Event.CLICK_DISMISS, function (event) {
+ if (_this16._ignoreBackdropClick) {
+ _this16._ignoreBackdropClick = false;
return;
}
-
- if (!doAnimate) {
- callback();
+ if (event.target !== event.currentTarget) {
return;
}
+ if (_this16._config.backdrop === 'static') {
+ _this16._element.focus();
+ } else {
+ _this16.hide();
+ }
+ });
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
- } else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(ClassName.IN);
+ if (doAnimate) {
+ Util.reflow(this._backdrop);
+ }
- var callbackRemove = function callbackRemove() {
- _this12._removeBackdrop();
- if (callback) {
- callback();
- }
- };
+ $(this._backdrop).addClass(ClassName.SHOW);
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
- } else {
- callbackRemove();
- }
- } else if (callback) {
+ if (!callback) {
+ return;
+ }
+
+ if (!doAnimate) {
callback();
+ return;
}
- }
- // ----------------------------------------------------------------------
- // the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
- // ----------------------------------------------------------------------
+ $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
+ } else if (!this._isShown && this._backdrop) {
+ $(this._backdrop).removeClass(ClassName.SHOW);
- }, {
- key: '_handleUpdate',
- value: function _handleUpdate() {
- this._adjustDialog();
- }
- }, {
- key: '_adjustDialog',
- value: function _adjustDialog() {
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+ var callbackRemove = function callbackRemove() {
+ _this16._removeBackdrop();
+ if (callback) {
+ callback();
+ }
+ };
- if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
+ $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
+ } else {
+ callbackRemove();
}
+ } else if (callback) {
+ callback();
+ }
+ };
- if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = this._scrollbarWidth + 'px~';
- }
+ // ----------------------------------------------------------------------
+ // the following methods are used to handle overflowing modals
+ // todo (fat): these should probably be refactored out of modal.js
+ // ----------------------------------------------------------------------
+
+ Modal.prototype._handleUpdate = function _handleUpdate() {
+ this._adjustDialog();
+ };
+
+ Modal.prototype._adjustDialog = function _adjustDialog() {
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+
+ if (!this._isBodyOverflowing && isModalOverflowing) {
+ this._element.style.paddingLeft = this._scrollbarWidth + 'px';
}
- }, {
- key: '_resetAdjustments',
- value: function _resetAdjustments() {
- this._element.style.paddingLeft = '';
- this._element.style.paddingRight = '';
+
+ if (this._isBodyOverflowing && !isModalOverflowing) {
+ this._element.style.paddingRight = this._scrollbarWidth + 'px';
}
- }, {
- key: '_checkScrollbar',
- value: function _checkScrollbar() {
- this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
- this._scrollbarWidth = this._getScrollbarWidth();
+ };
+
+ Modal.prototype._resetAdjustments = function _resetAdjustments() {
+ this._element.style.paddingLeft = '';
+ this._element.style.paddingRight = '';
+ };
+
+ Modal.prototype._checkScrollbar = function _checkScrollbar() {
+ this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
+ this._scrollbarWidth = this._getScrollbarWidth();
+ };
+
+ Modal.prototype._setScrollbar = function _setScrollbar() {
+ var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
+
+ this._originalBodyPadding = document.body.style.paddingRight || '';
+
+ if (this._isBodyOverflowing) {
+ document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
}
- }, {
- key: '_setScrollbar',
- value: function _setScrollbar() {
- var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
+ };
- this._originalBodyPadding = document.body.style.paddingRight || '';
+ Modal.prototype._resetScrollbar = function _resetScrollbar() {
+ document.body.style.paddingRight = this._originalBodyPadding;
+ };
+
+ Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {
+ // thx d.walsh
+ var scrollDiv = document.createElement('div');
+ scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
+ document.body.appendChild(scrollDiv);
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
+ document.body.removeChild(scrollDiv);
+ return scrollbarWidth;
+ };
+
+ // static
- if (this._isBodyOverflowing) {
- document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
+ Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+ var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
+
+ if (!data) {
+ data = new Modal(this, _config);
+ $(this).data(DATA_KEY, data);
}
- }
- }, {
- key: '_resetScrollbar',
- value: function _resetScrollbar() {
- document.body.style.paddingRight = this._originalBodyPadding;
- }
- }, {
- key: '_getScrollbarWidth',
- value: function _getScrollbarWidth() {
- // thx d.walsh
- var scrollDiv = document.createElement('div');
- scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
- document.body.appendChild(scrollDiv);
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
- document.body.removeChild(scrollDiv);
- return scrollbarWidth;
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config, relatedTarget) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
-
- if (!data) {
- data = new Modal(this, _config);
- $(this).data(DATA_KEY, data);
- }
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config](relatedTarget);
- } else if (_config.show) {
- data.show(relatedTarget);
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
- });
- }
- }, {
+ data[config](relatedTarget);
+ } else if (_config.show) {
+ data.show(relatedTarget);
+ }
+ });
+ };
+
+ _createClass(Modal, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -2130,12 +2107,18 @@ var Modal = (function ($) {
}]);
return Modal;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
- var _this13 = this;
+ var _this17 = this;
- var target = undefined;
+ var target = void 0;
var selector = Util.getSelectorFromElement(this);
if (selector) {
@@ -2144,7 +2127,7 @@ var Modal = (function ($) {
var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
- if (this.tagName === 'A') {
+ if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
@@ -2155,8 +2138,8 @@ var Modal = (function ($) {
}
$target.one(Event.HIDDEN, function () {
- if ($(_this13).is(':visible')) {
- _this13.focus();
+ if ($(_this17).is(':visible')) {
+ _this17.focus();
}
});
});
@@ -2178,16 +2161,16 @@ var Modal = (function ($) {
};
return Modal;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): scrollspy.js
+ * Bootstrap (v4.0.0-alpha.5): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var ScrollSpy = (function ($) {
+var ScrollSpy = function ($) {
/**
* ------------------------------------------------------------------------
@@ -2196,7 +2179,7 @@ var ScrollSpy = (function ($) {
*/
var NAME = 'scrollspy';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -2251,8 +2234,10 @@ var ScrollSpy = (function ($) {
* ------------------------------------------------------------------------
*/
- var ScrollSpy = (function () {
+ var ScrollSpy = function () {
function ScrollSpy(element, config) {
+ var _this18 = this;
+
_classCallCheck(this, ScrollSpy);
this._element = element;
@@ -2264,197 +2249,187 @@ var ScrollSpy = (function ($) {
this._activeTarget = null;
this._scrollHeight = 0;
- $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));
+ $(this._scrollElement).on(Event.SCROLL, function (event) {
+ return _this18._process(event);
+ });
this.refresh();
this._process();
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(ScrollSpy, [{
- key: 'refresh',
+ // public
- // public
+ ScrollSpy.prototype.refresh = function refresh() {
+ var _this19 = this;
- value: function refresh() {
- var _this14 = this;
+ var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
- var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
+ var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
+ var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
- var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
+ this._offsets = [];
+ this._targets = [];
- this._offsets = [];
- this._targets = [];
+ this._scrollHeight = this._getScrollHeight();
- this._scrollHeight = this._getScrollHeight();
+ var targets = $.makeArray($(this._selector));
- var targets = $.makeArray($(this._selector));
+ targets.map(function (element) {
+ var target = void 0;
+ var targetSelector = Util.getSelectorFromElement(element);
- targets.map(function (element) {
- var target = undefined;
- var targetSelector = Util.getSelectorFromElement(element);
+ if (targetSelector) {
+ target = $(targetSelector)[0];
+ }
- if (targetSelector) {
- target = $(targetSelector)[0];
- }
+ if (target && (target.offsetWidth || target.offsetHeight)) {
+ // todo (fat): remove sketch reliance on jQuery position/offset
+ return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
+ }
+ return null;
+ }).filter(function (item) {
+ return item;
+ }).sort(function (a, b) {
+ return a[0] - b[0];
+ }).forEach(function (item) {
+ _this19._offsets.push(item[0]);
+ _this19._targets.push(item[1]);
+ });
+ };
- if (target && (target.offsetWidth || target.offsetHeight)) {
- // todo (fat): remove sketch reliance on jQuery position/offset
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
- }
- }).filter(function (item) {
- return item;
- }).sort(function (a, b) {
- return a[0] - b[0];
- }).forEach(function (item) {
- _this14._offsets.push(item[0]);
- _this14._targets.push(item[1]);
- });
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._scrollElement).off(EVENT_KEY);
-
- this._element = null;
- this._scrollElement = null;
- this._config = null;
- this._selector = null;
- this._offsets = null;
- this._targets = null;
- this._activeTarget = null;
- this._scrollHeight = null;
- }
+ ScrollSpy.prototype.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ $(this._scrollElement).off(EVENT_KEY);
- // private
+ this._element = null;
+ this._scrollElement = null;
+ this._config = null;
+ this._selector = null;
+ this._offsets = null;
+ this._targets = null;
+ this._activeTarget = null;
+ this._scrollHeight = null;
+ };
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
-
- if (typeof config.target !== 'string') {
- var id = $(config.target).attr('id');
- if (!id) {
- id = Util.getUID(NAME);
- $(config.target).attr('id', id);
- }
- config.target = '#' + id;
- }
+ // private
- Util.typeCheckConfig(NAME, config, DefaultType);
+ ScrollSpy.prototype._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
- return config;
- }
- }, {
- key: '_getScrollTop',
- value: function _getScrollTop() {
- return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
- }
- }, {
- key: '_getScrollHeight',
- value: function _getScrollHeight() {
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
+ if (typeof config.target !== 'string') {
+ var id = $(config.target).attr('id');
+ if (!id) {
+ id = Util.getUID(NAME);
+ $(config.target).attr('id', id);
+ }
+ config.target = '#' + id;
}
- }, {
- key: '_process',
- value: function _process() {
- var scrollTop = this._getScrollTop() + this._config.offset;
- var scrollHeight = this._getScrollHeight();
- var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
- if (this._scrollHeight !== scrollHeight) {
- this.refresh();
- }
+ Util.typeCheckConfig(NAME, config, DefaultType);
- if (scrollTop >= maxScroll) {
- var target = this._targets[this._targets.length - 1];
+ return config;
+ };
- if (this._activeTarget !== target) {
- this._activate(target);
- }
- }
+ ScrollSpy.prototype._getScrollTop = function _getScrollTop() {
+ return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
+ };
- if (this._activeTarget && scrollTop < this._offsets[0]) {
- this._activeTarget = null;
- this._clear();
- return;
- }
+ ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {
+ return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
+ };
- for (var i = this._offsets.length; i--;) {
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
+ ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
+ return this._scrollElement === window ? window.innerHeight : this._scrollElement.offsetHeight;
+ };
- if (isActiveTarget) {
- this._activate(this._targets[i]);
- }
+ ScrollSpy.prototype._process = function _process() {
+ var scrollTop = this._getScrollTop() + this._config.offset;
+ var scrollHeight = this._getScrollHeight();
+ var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
+
+ if (this._scrollHeight !== scrollHeight) {
+ this.refresh();
+ }
+
+ if (scrollTop >= maxScroll) {
+ var target = this._targets[this._targets.length - 1];
+
+ if (this._activeTarget !== target) {
+ this._activate(target);
}
+ return;
}
- }, {
- key: '_activate',
- value: function _activate(target) {
- this._activeTarget = target;
+ if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
+ this._activeTarget = null;
this._clear();
+ return;
+ }
- var queries = this._selector.split(',');
- queries = queries.map(function (selector) {
- return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
- });
-
- var $link = $(queries.join(','));
+ for (var i = this._offsets.length; i--;) {
+ var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
- if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
- $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
- $link.addClass(ClassName.ACTIVE);
- } else {
- // todo (fat) this is kinda sus...
- // recursively add actives to tested nav-links
- $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
+ if (isActiveTarget) {
+ this._activate(this._targets[i]);
}
-
- $(this._scrollElement).trigger(Event.ACTIVATE, {
- relatedTarget: target
- });
}
- }, {
- key: '_clear',
- value: function _clear() {
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ };
+
+ ScrollSpy.prototype._activate = function _activate(target) {
+ this._activeTarget = target;
+
+ this._clear();
+
+ var queries = this._selector.split(',');
+ queries = queries.map(function (selector) {
+ return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
+ });
+
+ var $link = $(queries.join(','));
+
+ if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
+ $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
+ $link.addClass(ClassName.ACTIVE);
+ } else {
+ // todo (fat) this is kinda sus...
+ // recursively add actives to tested nav-links
+ $link.parents(Selector.LI).find('> ' + Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
}
- // static
+ $(this._scrollElement).trigger(Event.ACTIVATE, {
+ relatedTarget: target
+ });
+ };
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' && config || null;
+ ScrollSpy.prototype._clear = function _clear() {
+ $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ };
- if (!data) {
- data = new ScrollSpy(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ // static
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
+
+ if (!data) {
+ data = new ScrollSpy(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
- });
- }
- }, {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(ScrollSpy, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -2467,7 +2442,13 @@ var ScrollSpy = (function ($) {
}]);
return ScrollSpy;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(window).on(Event.LOAD_DATA_API, function () {
var scrollSpys = $.makeArray($(Selector.DATA_SPY));
@@ -2492,16 +2473,16 @@ var ScrollSpy = (function ($) {
};
return ScrollSpy;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): tab.js
+ * Bootstrap (v4.0.0-alpha.5): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Tab = (function ($) {
+var Tab = function ($) {
/**
* ------------------------------------------------------------------------
@@ -2510,7 +2491,7 @@ var Tab = (function ($) {
*/
var NAME = 'tab';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.tab';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -2528,15 +2509,16 @@ var Tab = (function ($) {
var ClassName = {
DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active',
+ DISABLED: 'disabled',
FADE: 'fade',
- IN: 'in'
+ SHOW: 'show'
};
var Selector = {
A: 'a',
LI: 'li',
DROPDOWN: '.dropdown',
- UL: 'ul:not(.dropdown-menu)',
+ LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu)',
FADE_CHILD: '> .nav-item .fade, > .fade',
ACTIVE: '.active',
ACTIVE_CHILD: '> .nav-item > .active, > .active',
@@ -2551,176 +2533,166 @@ var Tab = (function ($) {
* ------------------------------------------------------------------------
*/
- var Tab = (function () {
+ var Tab = function () {
function Tab(element) {
_classCallCheck(this, Tab);
this._element = element;
}
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Tab, [{
- key: 'show',
+ // public
+
+ Tab.prototype.show = function show() {
+ var _this20 = this;
- // public
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
+ return;
+ }
- value: function show() {
- var _this15 = this;
+ var target = void 0;
+ var previous = void 0;
+ var listElement = $(this._element).closest(Selector.LIST)[0];
+ var selector = Util.getSelectorFromElement(this._element);
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
- return;
- }
+ if (listElement) {
+ previous = $.makeArray($(listElement).find(Selector.ACTIVE));
+ previous = previous[previous.length - 1];
+ }
- var target = undefined;
- var previous = undefined;
- var ulElement = $(this._element).closest(Selector.UL)[0];
- var selector = Util.getSelectorFromElement(this._element);
+ var hideEvent = $.Event(Event.HIDE, {
+ relatedTarget: this._element
+ });
- if (ulElement) {
- previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
- previous = previous[previous.length - 1];
- }
+ var showEvent = $.Event(Event.SHOW, {
+ relatedTarget: previous
+ });
+
+ if (previous) {
+ $(previous).trigger(hideEvent);
+ }
+
+ $(this._element).trigger(showEvent);
+
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
+ return;
+ }
+
+ if (selector) {
+ target = $(selector)[0];
+ }
- var hideEvent = $.Event(Event.HIDE, {
- relatedTarget: this._element
+ this._activate(this._element, listElement);
+
+ var complete = function complete() {
+ var hiddenEvent = $.Event(Event.HIDDEN, {
+ relatedTarget: _this20._element
});
- var showEvent = $.Event(Event.SHOW, {
+ var shownEvent = $.Event(Event.SHOWN, {
relatedTarget: previous
});
- if (previous) {
- $(previous).trigger(hideEvent);
- }
+ $(previous).trigger(hiddenEvent);
+ $(_this20._element).trigger(shownEvent);
+ };
- $(this._element).trigger(showEvent);
+ if (target) {
+ this._activate(target, target.parentNode, complete);
+ } else {
+ complete();
+ }
+ };
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
- return;
- }
+ Tab.prototype.dispose = function dispose() {
+ $.removeClass(this._element, DATA_KEY);
+ this._element = null;
+ };
- if (selector) {
- target = $(selector)[0];
- }
+ // private
- this._activate(this._element, ulElement);
+ Tab.prototype._activate = function _activate(element, container, callback) {
+ var _this21 = this;
- var complete = function complete() {
- var hiddenEvent = $.Event(Event.HIDDEN, {
- relatedTarget: _this15._element
- });
+ var active = $(container).find(Selector.ACTIVE_CHILD)[0];
+ var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: previous
- });
+ var complete = function complete() {
+ return _this21._transitionComplete(element, active, isTransitioning, callback);
+ };
- $(previous).trigger(hiddenEvent);
- $(_this15._element).trigger(shownEvent);
- };
-
- if (target) {
- this._activate(target, target.parentNode, complete);
- } else {
- complete();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeClass(this._element, DATA_KEY);
- this._element = null;
+ if (active && isTransitioning) {
+ $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ complete();
}
- // private
+ if (active) {
+ $(active).removeClass(ClassName.SHOW);
+ }
+ };
- }, {
- key: '_activate',
- value: function _activate(element, container, callback) {
- var active = $(container).find(Selector.ACTIVE_CHILD)[0];
- var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
+ Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
+ if (active) {
+ $(active).removeClass(ClassName.ACTIVE);
- var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
+ var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
- if (active && isTransitioning) {
- $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- complete();
+ if (dropdownChild) {
+ $(dropdownChild).removeClass(ClassName.ACTIVE);
}
- if (active) {
- $(active).removeClass(ClassName.IN);
- }
+ active.setAttribute('aria-expanded', false);
}
- }, {
- key: '_transitionComplete',
- value: function _transitionComplete(element, active, isTransitioning, callback) {
- if (active) {
- $(active).removeClass(ClassName.ACTIVE);
- var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
+ $(element).addClass(ClassName.ACTIVE);
+ element.setAttribute('aria-expanded', true);
- if (dropdownChild) {
- $(dropdownChild).removeClass(ClassName.ACTIVE);
- }
+ if (isTransitioning) {
+ Util.reflow(element);
+ $(element).addClass(ClassName.SHOW);
+ } else {
+ $(element).removeClass(ClassName.FADE);
+ }
+
+ if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
- active.setAttribute('aria-expanded', false);
+ var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
+ if (dropdownElement) {
+ $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
}
- $(element).addClass(ClassName.ACTIVE);
element.setAttribute('aria-expanded', true);
+ }
- if (isTransitioning) {
- Util.reflow(element);
- $(element).addClass(ClassName.IN);
- } else {
- $(element).removeClass(ClassName.FADE);
- }
+ if (callback) {
+ callback();
+ }
+ };
- if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
+ // static
- var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
- if (dropdownElement) {
- $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
- }
+ Tab._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $this = $(this);
+ var data = $this.data(DATA_KEY);
- element.setAttribute('aria-expanded', true);
+ if (!data) {
+ data = new Tab(this);
+ $this.data(DATA_KEY, data);
}
- if (callback) {
- callback();
- }
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
-
- if (!data) {
- data = data = new Tab(this);
- $this.data(DATA_KEY, data);
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
+ data[config]();
+ }
+ });
+ };
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
+ _createClass(Tab, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -2728,7 +2700,13 @@ var Tab = (function ($) {
}]);
return Tab;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
@@ -2749,25 +2727,25 @@ var Tab = (function ($) {
};
return Tab;
-})(jQuery);
+}(jQuery);
/* global Tether */
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): tooltip.js
+ * Bootstrap (v4.0.0-alpha.5): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Tooltip = (function ($) {
+var Tooltip = function ($) {
/**
* Check for Tether dependency
- * Tether - http://github.hubspot.com/tether/
+ * Tether - http://tether.io/
*/
- if (window.Tether === undefined) {
- throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
+ if (typeof Tether === 'undefined') {
+ throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
}
/**
@@ -2777,7 +2755,7 @@ var Tooltip = (function ($) {
*/
var NAME = 'tooltip';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = '.' + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -2786,7 +2764,7 @@ var Tooltip = (function ($) {
var Default = {
animation: true,
- template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
@@ -2794,7 +2772,8 @@ var Tooltip = (function ($) {
selector: false,
placement: 'top',
offset: '0 0',
- constraints: []
+ constraints: [],
+ container: false
};
var DefaultType = {
@@ -2807,7 +2786,8 @@ var Tooltip = (function ($) {
selector: '(string|boolean)',
placement: '(string|function)',
offset: 'string',
- constraints: 'array'
+ constraints: 'array',
+ container: '(string|element|boolean)'
};
var AttachmentMap = {
@@ -2818,7 +2798,7 @@ var Tooltip = (function ($) {
};
var HoverState = {
- IN: 'in',
+ SHOW: 'show',
OUT: 'out'
};
@@ -2837,7 +2817,7 @@ var Tooltip = (function ($) {
var ClassName = {
FADE: 'fade',
- IN: 'in'
+ SHOW: 'show'
};
var Selector = {
@@ -2863,7 +2843,7 @@ var Tooltip = (function ($) {
* ------------------------------------------------------------------------
*/
- var Tooltip = (function () {
+ var Tooltip = function () {
function Tooltip(element, config) {
_classCallCheck(this, Tooltip);
@@ -2872,6 +2852,7 @@ var Tooltip = (function ($) {
this._timeout = 0;
this._hoverState = '';
this._activeTrigger = {};
+ this._isTransitioning = false;
this._tether = null;
// protected
@@ -2882,439 +2863,436 @@ var Tooltip = (function ($) {
this._setListeners();
}
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
// getters
- _createClass(Tooltip, [{
- key: 'enable',
+ // public
- // public
+ Tooltip.prototype.enable = function enable() {
+ this._isEnabled = true;
+ };
- value: function enable() {
- this._isEnabled = true;
- }
- }, {
- key: 'disable',
- value: function disable() {
- this._isEnabled = false;
- }
- }, {
- key: 'toggleEnabled',
- value: function toggleEnabled() {
- this._isEnabled = !this._isEnabled;
- }
- }, {
- key: 'toggle',
- value: function toggle(event) {
- if (event) {
- var dataKey = this.constructor.DATA_KEY;
- var context = $(event.currentTarget).data(dataKey);
+ Tooltip.prototype.disable = function disable() {
+ this._isEnabled = false;
+ };
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
+ Tooltip.prototype.toggleEnabled = function toggleEnabled() {
+ this._isEnabled = !this._isEnabled;
+ };
- context._activeTrigger.click = !context._activeTrigger.click;
+ Tooltip.prototype.toggle = function toggle(event) {
+ if (event) {
+ var dataKey = this.constructor.DATA_KEY;
+ var context = $(event.currentTarget).data(dataKey);
- if (context._isWithActiveTrigger()) {
- context._enter(null, context);
- } else {
- context._leave(null, context);
- }
- } else {
+ if (!context) {
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
+ $(event.currentTarget).data(dataKey, context);
+ }
- if ($(this.getTipElement()).hasClass(ClassName.IN)) {
- this._leave(null, this);
- return;
- }
+ context._activeTrigger.click = !context._activeTrigger.click;
- this._enter(null, this);
+ if (context._isWithActiveTrigger()) {
+ context._enter(null, context);
+ } else {
+ context._leave(null, context);
}
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- clearTimeout(this._timeout);
+ } else {
- this.cleanupTether();
+ if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
+ this._leave(null, this);
+ return;
+ }
+
+ this._enter(null, this);
+ }
+ };
- $.removeData(this.element, this.constructor.DATA_KEY);
+ Tooltip.prototype.dispose = function dispose() {
+ clearTimeout(this._timeout);
- $(this.element).off(this.constructor.EVENT_KEY);
+ this.cleanupTether();
- if (this.tip) {
- $(this.tip).remove();
- }
+ $.removeData(this.element, this.constructor.DATA_KEY);
- this._isEnabled = null;
- this._timeout = null;
- this._hoverState = null;
- this._activeTrigger = null;
- this._tether = null;
+ $(this.element).off(this.constructor.EVENT_KEY);
+ $(this.element).closest('.modal').off('hide.bs.modal');
- this.element = null;
- this.config = null;
- this.tip = null;
+ if (this.tip) {
+ $(this.tip).remove();
}
- }, {
- key: 'show',
- value: function show() {
- var _this16 = this;
- var showEvent = $.Event(this.constructor.Event.SHOW);
+ this._isEnabled = null;
+ this._timeout = null;
+ this._hoverState = null;
+ this._activeTrigger = null;
+ this._tether = null;
- if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent);
+ this.element = null;
+ this.config = null;
+ this.tip = null;
+ };
- var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
+ Tooltip.prototype.show = function show() {
+ var _this22 = this;
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
- return;
- }
+ if ($(this.element).css('display') === 'none') {
+ throw new Error('Please use show on visible elements');
+ }
- var tip = this.getTipElement();
- var tipId = Util.getUID(this.constructor.NAME);
+ var showEvent = $.Event(this.constructor.Event.SHOW);
+ if (this.isWithContent() && this._isEnabled) {
+ if (this._isTransitioning) {
+ throw new Error('Tooltip is transitioning');
+ }
+ $(this.element).trigger(showEvent);
- tip.setAttribute('id', tipId);
- this.element.setAttribute('aria-describedby', tipId);
+ var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
- this.setContent();
+ if (showEvent.isDefaultPrevented() || !isInTheDom) {
+ return;
+ }
- if (this.config.animation) {
- $(tip).addClass(ClassName.FADE);
- }
+ var tip = this.getTipElement();
+ var tipId = Util.getUID(this.constructor.NAME);
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
+ tip.setAttribute('id', tipId);
+ this.element.setAttribute('aria-describedby', tipId);
- var attachment = this._getAttachment(placement);
+ this.setContent();
- $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
+ if (this.config.animation) {
+ $(tip).addClass(ClassName.FADE);
+ }
- $(this.element).trigger(this.constructor.Event.INSERTED);
+ var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
- this._tether = new Tether({
- attachment: attachment,
- element: tip,
- target: this.element,
- classes: TetherClass,
- classPrefix: CLASS_PREFIX,
- offset: this.config.offset,
- constraints: this.config.constraints,
- addTargetClasses: false
- });
+ var attachment = this._getAttachment(placement);
- Util.reflow(tip);
- this._tether.position();
+ var container = this.config.container === false ? document.body : $(this.config.container);
- $(tip).addClass(ClassName.IN);
+ $(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
- var complete = function complete() {
- var prevHoverState = _this16._hoverState;
- _this16._hoverState = null;
+ $(this.element).trigger(this.constructor.Event.INSERTED);
- $(_this16.element).trigger(_this16.constructor.Event.SHOWN);
+ this._tether = new Tether({
+ attachment: attachment,
+ element: tip,
+ target: this.element,
+ classes: TetherClass,
+ classPrefix: CLASS_PREFIX,
+ offset: this.config.offset,
+ constraints: this.config.constraints,
+ addTargetClasses: false
+ });
- if (prevHoverState === HoverState.OUT) {
- _this16._leave(null, _this16);
- }
- };
+ Util.reflow(tip);
+ this._tether.position();
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
- return;
- }
+ $(tip).addClass(ClassName.SHOW);
- complete();
- }
- }
- }, {
- key: 'hide',
- value: function hide(callback) {
- var _this17 = this;
-
- var tip = this.getTipElement();
- var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
- if (_this17._hoverState !== HoverState.IN && tip.parentNode) {
- tip.parentNode.removeChild(tip);
- }
+ var prevHoverState = _this22._hoverState;
+ _this22._hoverState = null;
+ _this22._isTransitioning = false;
- _this17.element.removeAttribute('aria-describedby');
- $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);
- _this17.cleanupTether();
+ $(_this22.element).trigger(_this22.constructor.Event.SHOWN);
- if (callback) {
- callback();
+ if (prevHoverState === HoverState.OUT) {
+ _this22._leave(null, _this22);
}
};
- $(this.element).trigger(hideEvent);
-
- if (hideEvent.isDefaultPrevented()) {
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true;
+ $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
return;
}
- $(tip).removeClass(ClassName.IN);
+ complete();
+ }
+ };
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ Tooltip.prototype.hide = function hide(callback) {
+ var _this23 = this;
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- complete();
+ var tip = this.getTipElement();
+ var hideEvent = $.Event(this.constructor.Event.HIDE);
+ if (this._isTransitioning) {
+ throw new Error('Tooltip is transitioning');
+ }
+ var complete = function complete() {
+ if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
+ tip.parentNode.removeChild(tip);
}
- this._hoverState = '';
- }
+ _this23.element.removeAttribute('aria-describedby');
+ $(_this23.element).trigger(_this23.constructor.Event.HIDDEN);
+ _this23._isTransitioning = false;
+ _this23.cleanupTether();
- // protected
+ if (callback) {
+ callback();
+ }
+ };
- }, {
- key: 'isWithContent',
- value: function isWithContent() {
- return Boolean(this.getTitle());
- }
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- return this.tip = this.tip || $(this.config.template)[0];
+ $(this.element).trigger(hideEvent);
+
+ if (hideEvent.isDefaultPrevented()) {
+ return;
}
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
- this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
+ $(tip).removeClass(ClassName.SHOW);
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
+ this._activeTrigger[Trigger.CLICK] = false;
+ this._activeTrigger[Trigger.FOCUS] = false;
+ this._activeTrigger[Trigger.HOVER] = false;
- this.cleanupTether();
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true;
+ $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ complete();
}
- }, {
- key: 'setElementContent',
- value: function setElementContent($element, content) {
- var html = this.config.html;
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // content is a DOM node or a jQuery
- if (html) {
- if (!$(content).parent().is($element)) {
- $element.empty().append(content);
- }
- } else {
- $element.text($(content).text());
+
+ this._hoverState = '';
+ };
+
+ // protected
+
+ Tooltip.prototype.isWithContent = function isWithContent() {
+ return Boolean(this.getTitle());
+ };
+
+ Tooltip.prototype.getTipElement = function getTipElement() {
+ return this.tip = this.tip || $(this.config.template)[0];
+ };
+
+ Tooltip.prototype.setContent = function setContent() {
+ var $tip = $(this.getTipElement());
+
+ this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
+
+ $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
+
+ this.cleanupTether();
+ };
+
+ Tooltip.prototype.setElementContent = function setElementContent($element, content) {
+ var html = this.config.html;
+ if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {
+ // content is a DOM node or a jQuery
+ if (html) {
+ if (!$(content).parent().is($element)) {
+ $element.empty().append(content);
}
} else {
- $element[html ? 'html' : 'text'](content);
+ $element.text($(content).text());
}
+ } else {
+ $element[html ? 'html' : 'text'](content);
}
- }, {
- key: 'getTitle',
- value: function getTitle() {
- var title = this.element.getAttribute('data-original-title');
+ };
- if (!title) {
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
- }
+ Tooltip.prototype.getTitle = function getTitle() {
+ var title = this.element.getAttribute('data-original-title');
- return title;
- }
- }, {
- key: 'cleanupTether',
- value: function cleanupTether() {
- if (this._tether) {
- this._tether.destroy();
- }
+ if (!title) {
+ title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
}
- // private
+ return title;
+ };
- }, {
- key: '_getAttachment',
- value: function _getAttachment(placement) {
- return AttachmentMap[placement.toUpperCase()];
+ Tooltip.prototype.cleanupTether = function cleanupTether() {
+ if (this._tether) {
+ this._tether.destroy();
}
- }, {
- key: '_setListeners',
- value: function _setListeners() {
- var _this18 = this;
+ };
- var triggers = this.config.trigger.split(' ');
+ // private
- triggers.forEach(function (trigger) {
- if (trigger === 'click') {
- $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));
- } else if (trigger !== Trigger.MANUAL) {
- var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;
- var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;
+ Tooltip.prototype._getAttachment = function _getAttachment(placement) {
+ return AttachmentMap[placement.toUpperCase()];
+ };
- $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));
- }
- });
+ Tooltip.prototype._setListeners = function _setListeners() {
+ var _this24 = this;
- if (this.config.selector) {
- this.config = $.extend({}, this.config, {
- trigger: 'manual',
- selector: ''
+ var triggers = this.config.trigger.split(' ');
+
+ triggers.forEach(function (trigger) {
+ if (trigger === 'click') {
+ $(_this24.element).on(_this24.constructor.Event.CLICK, _this24.config.selector, function (event) {
+ return _this24.toggle(event);
+ });
+ } else if (trigger !== Trigger.MANUAL) {
+ var eventIn = trigger === Trigger.HOVER ? _this24.constructor.Event.MOUSEENTER : _this24.constructor.Event.FOCUSIN;
+ var eventOut = trigger === Trigger.HOVER ? _this24.constructor.Event.MOUSELEAVE : _this24.constructor.Event.FOCUSOUT;
+
+ $(_this24.element).on(eventIn, _this24.config.selector, function (event) {
+ return _this24._enter(event);
+ }).on(eventOut, _this24.config.selector, function (event) {
+ return _this24._leave(event);
});
- } else {
- this._fixTitle();
}
+
+ $(_this24.element).closest('.modal').on('hide.bs.modal', function () {
+ return _this24.hide();
+ });
+ });
+
+ if (this.config.selector) {
+ this.config = $.extend({}, this.config, {
+ trigger: 'manual',
+ selector: ''
+ });
+ } else {
+ this._fixTitle();
}
- }, {
- key: '_fixTitle',
- value: function _fixTitle() {
- var titleType = typeof this.element.getAttribute('data-original-title');
- if (this.element.getAttribute('title') || titleType !== 'string') {
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
- this.element.setAttribute('title', '');
- }
+ };
+
+ Tooltip.prototype._fixTitle = function _fixTitle() {
+ var titleType = _typeof(this.element.getAttribute('data-original-title'));
+ if (this.element.getAttribute('title') || titleType !== 'string') {
+ this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
+ this.element.setAttribute('title', '');
}
- }, {
- key: '_enter',
- value: function _enter(event, context) {
- var dataKey = this.constructor.DATA_KEY;
+ };
- context = context || $(event.currentTarget).data(dataKey);
+ Tooltip.prototype._enter = function _enter(event, context) {
+ var dataKey = this.constructor.DATA_KEY;
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
+ context = context || $(event.currentTarget).data(dataKey);
- if (event) {
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
- }
+ if (!context) {
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
+ $(event.currentTarget).data(dataKey, context);
+ }
- if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
- context._hoverState = HoverState.IN;
- return;
- }
+ if (event) {
+ context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
+ }
+
+ if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
+ context._hoverState = HoverState.SHOW;
+ return;
+ }
+
+ clearTimeout(context._timeout);
- clearTimeout(context._timeout);
+ context._hoverState = HoverState.SHOW;
- context._hoverState = HoverState.IN;
+ if (!context.config.delay || !context.config.delay.show) {
+ context.show();
+ return;
+ }
- if (!context.config.delay || !context.config.delay.show) {
+ context._timeout = setTimeout(function () {
+ if (context._hoverState === HoverState.SHOW) {
context.show();
- return;
}
+ }, context.config.delay.show);
+ };
- context._timeout = setTimeout(function () {
- if (context._hoverState === HoverState.IN) {
- context.show();
- }
- }, context.config.delay.show);
- }
- }, {
- key: '_leave',
- value: function _leave(event, context) {
- var dataKey = this.constructor.DATA_KEY;
+ Tooltip.prototype._leave = function _leave(event, context) {
+ var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ context = context || $(event.currentTarget).data(dataKey);
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
+ if (!context) {
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
+ $(event.currentTarget).data(dataKey, context);
+ }
- if (event) {
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
- }
+ if (event) {
+ context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
+ }
- if (context._isWithActiveTrigger()) {
- return;
- }
+ if (context._isWithActiveTrigger()) {
+ return;
+ }
+
+ clearTimeout(context._timeout);
- clearTimeout(context._timeout);
+ context._hoverState = HoverState.OUT;
- context._hoverState = HoverState.OUT;
+ if (!context.config.delay || !context.config.delay.hide) {
+ context.hide();
+ return;
+ }
- if (!context.config.delay || !context.config.delay.hide) {
+ context._timeout = setTimeout(function () {
+ if (context._hoverState === HoverState.OUT) {
context.hide();
- return;
}
+ }, context.config.delay.hide);
+ };
- context._timeout = setTimeout(function () {
- if (context._hoverState === HoverState.OUT) {
- context.hide();
- }
- }, context.config.delay.hide);
- }
- }, {
- key: '_isWithActiveTrigger',
- value: function _isWithActiveTrigger() {
- for (var trigger in this._activeTrigger) {
- if (this._activeTrigger[trigger]) {
- return true;
- }
+ Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {
+ for (var trigger in this._activeTrigger) {
+ if (this._activeTrigger[trigger]) {
+ return true;
}
-
- return false;
}
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
- if (config.delay && typeof config.delay === 'number') {
- config.delay = {
- show: config.delay,
- hide: config.delay
- };
- }
+ return false;
+ };
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ Tooltip.prototype._getConfig = function _getConfig(config) {
+ config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
- return config;
+ if (config.delay && typeof config.delay === 'number') {
+ config.delay = {
+ show: config.delay,
+ hide: config.delay
+ };
}
- }, {
- key: '_getDelegateConfig',
- value: function _getDelegateConfig() {
- var config = {};
-
- if (this.config) {
- for (var key in this.config) {
- if (this.constructor.Default[key] !== this.config[key]) {
- config[key] = this.config[key];
- }
+
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+
+ return config;
+ };
+
+ Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {
+ var config = {};
+
+ if (this.config) {
+ for (var key in this.config) {
+ if (this.constructor.Default[key] !== this.config[key]) {
+ config[key] = this.config[key];
}
}
-
- return config;
}
- // static
+ return config;
+ };
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' ? config : null;
+ // static
- if (!data && /destroy|hide/.test(config)) {
- return;
- }
+ Tooltip._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
- if (!data) {
- data = new Tooltip(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ if (!data && /dispose|hide/.test(config)) {
+ return;
+ }
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ if (!data) {
+ data = new Tooltip(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
- });
- }
- }, {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Tooltip, null, [{
key: 'VERSION',
get: function get() {
return VERSION;
@@ -3352,7 +3330,13 @@ var Tooltip = (function ($) {
}]);
return Tooltip;
- })();
+ }();
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
@@ -3362,16 +3346,16 @@ var Tooltip = (function ($) {
};
return Tooltip;
-})(jQuery);
+}(jQuery);
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): popover.js
+ * Bootstrap (v4.0.0-alpha.5): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-var Popover = (function ($) {
+var Popover = function ($) {
/**
* ------------------------------------------------------------------------
@@ -3380,7 +3364,7 @@ var Popover = (function ($) {
*/
var NAME = 'popover';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.5';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = '.' + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -3389,7 +3373,7 @@ var Popover = (function ($) {
placement: 'right',
trigger: 'click',
content: '',
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
+ template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
});
var DefaultType = $.extend({}, Tooltip.DefaultType, {
@@ -3398,13 +3382,12 @@ var Popover = (function ($) {
var ClassName = {
FADE: 'fade',
- IN: 'in'
+ SHOW: 'show'
};
var Selector = {
TITLE: '.popover-title',
- CONTENT: '.popover-content',
- ARROW: '.popover-arrow'
+ CONTENT: '.popover-content'
};
var Event = {
@@ -3426,85 +3409,72 @@ var Popover = (function ($) {
* ------------------------------------------------------------------------
*/
- var Popover = (function (_Tooltip) {
+ var Popover = function (_Tooltip) {
_inherits(Popover, _Tooltip);
function Popover() {
_classCallCheck(this, Popover);
- _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
+ return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments));
}
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
+ // overrides
- _createClass(Popover, [{
- key: 'isWithContent',
+ Popover.prototype.isWithContent = function isWithContent() {
+ return this.getTitle() || this._getContent();
+ };
- // overrides
+ Popover.prototype.getTipElement = function getTipElement() {
+ return this.tip = this.tip || $(this.config.template)[0];
+ };
- value: function isWithContent() {
- return this.getTitle() || this._getContent();
- }
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- return this.tip = this.tip || $(this.config.template)[0];
- }
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
+ Popover.prototype.setContent = function setContent() {
+ var $tip = $(this.getTipElement());
- // we use append for html objects to maintain js events
- this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
- this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
+ // we use append for html objects to maintain js events
+ this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
+ this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
+ $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
- this.cleanupTether();
- }
+ this.cleanupTether();
+ };
- // private
+ // private
- }, {
- key: '_getContent',
- value: function _getContent() {
- return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
- }
+ Popover.prototype._getContent = function _getContent() {
+ return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
+ };
- // static
+ // static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' ? config : null;
+ Popover._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
- if (!data && /destroy|hide/.test(config)) {
- return;
- }
+ if (!data && /destroy|hide/.test(config)) {
+ return;
+ }
- if (!data) {
- data = new Popover(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ if (!data) {
+ data = new Popover(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error('No method named "' + config + '"');
}
- });
- }
- }, {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Popover, null, [{
key: 'VERSION',
+
// getters
get: function get() {
@@ -3543,7 +3513,13 @@ var Popover = (function ($) {
}]);
return Popover;
- })(Tooltip);
+ }(Tooltip);
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
$.fn[NAME] = Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover;
@@ -3553,6 +3529,6 @@ var Popover = (function ($) {
};
return Popover;
-})(jQuery);
-
}(jQuery);
+
+}();
diff --git a/docs/dist/js/bootstrap.min.js b/docs/dist/js/bootstrap.min.js
index e3fa716f0..848488c8c 100644
--- a/docs/dist/js/bootstrap.min.js
+++ b/docs/dist/js/bootstrap.min.js
@@ -1,7 +1,7 @@
/*!
- * Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
+ * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)
+ * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>=3)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v3.0.0")}(jQuery),+function(a){"use strict";function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(a){return(a[0]||a).nodeType}function d(){return{bindType:h.end,delegateType:h.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}}}function e(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in i)if(void 0!==a.style[b])return{end:i[b]};return!1}function f(b){var c=this,d=!1;return a(this).one(j.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||j.triggerTransitionEnd(c)},b),this}function g(){h=e(),a.fn.emulateTransitionEnd=f,j.supportsTransitionEnd()&&(a.event.special[j.TRANSITION_END]=d())}var h=!1,i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},j={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},typeCheckConfig:function(a,d,e){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=d[f],i=void 0;if(i=h&&c(h)?"element":b(h),!new RegExp(g).test(i))throw new Error(a.toUpperCase()+": "+('Option "'+f+'" provided type "'+i+'" ')+('but expected type "'+g+'".'))}}};return g(),j}(jQuery),g=(function(a){var b="alert",d="4.0.0-alpha.2",g="bs.alert",h="."+g,i=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+i},n={ALERT:"alert",FADE:"fade",IN:"in"},o=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,g),this._element=null}},{key:"_getRootElement",value:function(b){var c=f.getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest("."+n.ALERT)[0]),d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){return a(b).removeClass(n.IN),f.supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(f.TRANSITION_END,a.proxy(this._destroyElement,this,b)).emulateTransitionEnd(k):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);e||(e=new b(this),d.data(g,e)),"close"===c&&e[c](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){var b="button",d="4.0.0-alpha.2",f="bs.button",g="."+f,h=".data-api",i=a.fn[b],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click"+g+h,FOCUS_BLUR_DATA_API:"focus"+g+h+" "+("blur"+g+h)},m=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"toggle",value:function(){var b=!0,c=a(this._element).closest(k.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(k.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var e=a(c).find(k.ACTIVE)[0];e&&a(e).removeClass(j.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(j.ACTIVE),a(this._element).trigger("change")),d.focus()}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE));b&&a(this._element).toggleClass(j.ACTIVE)}},{key:"dispose",value:function(){a.removeData(this._element,f),this._element=null}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(f);d||(d=new b(this),a(this).data(f,d)),"toggle"===c&&d[c]()})}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[b]=m._jQueryInterface,a.fn[b].Constructor=m,a.fn[b].noConflict=function(){return a.fn[b]=i,m._jQueryInterface},m}(jQuery),function(a){var b="carousel",d="4.0.0-alpha.2",g="bs.carousel",h="."+g,i=".data-api",j=a.fn[b],k=600,l={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},m={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},n={NEXT:"next",PREVIOUS:"prev"},o={SLIDE:"slide"+h,SLID:"slid"+h,KEYDOWN:"keydown"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h,LOAD_DATA_API:"load"+h+i,CLICK_DATA_API:"click"+h+i},p={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},q={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},r=function(){function i(b,d){c(this,i),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(d),this._element=a(b)[0],this._indicatorsElement=a(this._element).find(q.INDICATORS)[0],this._addEventListeners()}return e(i,[{key:"next",value:function(){this._isSliding||this._slide(n.NEXT)}},{key:"nextWhenVisible",value:function(){document.hidden||this.next()}},{key:"prev",value:function(){this._isSliding||this._slide(n.PREVIOUS)}},{key:"pause",value:function(b){b||(this._isPaused=!0),a(this._element).find(q.NEXT_PREV)[0]&&f.supportsTransitionEnd()&&(f.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function(b){b||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(a.proxy(document.visibilityState?this.nextWhenVisible:this.next,this),this._config.interval))}},{key:"to",value:function(b){var c=this;this._activeElement=a(this._element).find(q.ACTIVE_ITEM)[0];var d=this._getItemIndex(this._activeElement);if(!(b>this._items.length-1||0>b)){if(this._isSliding)return void a(this._element).one(o.SLID,function(){return c.to(b)});if(d===b)return this.pause(),void this.cycle();var e=b>d?n.NEXT:n.PREVIOUS;this._slide(e,this._items[b])}}},{key:"dispose",value:function(){a(this._element).off(h),a.removeData(this._element,g),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}},{key:"_getConfig",value:function(c){return c=a.extend({},l,c),f.typeCheckConfig(b,c,m),c}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on(o.KEYDOWN,a.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(o.MOUSEENTER,a.proxy(this.pause,this)).on(o.MOUSELEAVE,a.proxy(this.cycle,this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(q.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===n.NEXT,d=a===n.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e===f;if(g&&!this._config.wrap)return b;var h=a===n.PREVIOUS?-1:1,i=(e+h)%this._items.length;return-1===i?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(o.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(q.ACTIVE).removeClass(p.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(p.ACTIVE)}}},{key:"_slide",value:function(b,c){var d=this,e=a(this._element).find(q.ACTIVE_ITEM)[0],g=c||e&&this._getItemByDirection(b,e),h=Boolean(this._interval),i=b===n.NEXT?p.LEFT:p.RIGHT;if(g&&a(g).hasClass(p.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&e&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var l=a.Event(o.SLID,{relatedTarget:g,direction:i});f.supportsTransitionEnd()&&a(this._element).hasClass(p.SLIDE)?(a(g).addClass(b),f.reflow(g),a(e).addClass(i),a(g).addClass(i),a(e).one(f.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(p.ACTIVE),a(e).removeClass(p.ACTIVE).removeClass(b).removeClass(i),d._isSliding=!1,setTimeout(function(){return a(d._element).trigger(l)},0)}).emulateTransitionEnd(k)):(a(e).removeClass(p.ACTIVE),a(g).addClass(p.ACTIVE),this._isSliding=!1,a(this._element).trigger(l)),h&&this.cycle()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},l,a(this).data());"object"==typeof b&&a.extend(d,b);var e="string"==typeof b?b:d.slide;if(c||(c=new i(this,d),a(this).data(g,c)),"number"==typeof b)c.to(b);else if("string"==typeof e){if(void 0===c[e])throw new Error('No method named "'+e+'"');c[e]()}else d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=f.getSelectorFromElement(this);if(c){var d=a(c)[0];if(d&&a(d).hasClass(p.CAROUSEL)){var e=a.extend({},a(d).data(),a(this).data()),h=this.getAttribute("data-slide-to");h&&(e.interval=!1),i._jQueryInterface.call(a(d),e),h&&a(d).data(g).to(h),b.preventDefault()}}}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}}]),i}();return a(document).on(o.CLICK_DATA_API,q.DATA_SLIDE,r._dataApiClickHandler),a(window).on(o.LOAD_DATA_API,function(){a(q.DATA_RIDE).each(function(){var b=a(this);r._jQueryInterface.call(b,b.data())})}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="collapse",d="4.0.0-alpha.2",g="bs.collapse",h="."+g,i=".data-api",j=a.fn[b],k=600,l={toggle:!0,parent:""},m={toggle:"boolean",parent:"string"},n={SHOW:"show"+h,SHOWN:"shown"+h,HIDE:"hide"+h,HIDDEN:"hidden"+h,CLICK_DATA_API:"click"+h+i},o={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},q={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},r=function(){function h(b,d){c(this,h),this._isTransitioning=!1,this._element=b,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+b.id+'"],'+('[data-toggle="collapse"][data-target="#'+b.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return e(h,[{key:"toggle",value:function(){a(this._element).hasClass(o.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(o.IN)){var c=void 0,d=void 0;if(this._parent&&(c=a.makeArray(a(q.ACTIVES)),c.length||(c=null)),!(c&&(d=a(c).data(g),d&&d._isTransitioning))){var e=a.Event(n.SHOW);if(a(this._element).trigger(e),!e.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c),"hide"),d||a(c).data(g,null));var i=this._getDimension();a(this._element).removeClass(o.COLLAPSE).addClass(o.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(o.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).addClass(o.IN),b._element.style[i]="",b.setTransitioning(!1),a(b._element).trigger(n.SHOWN)};if(!f.supportsTransitionEnd())return void j();var l=i[0].toUpperCase()+i.slice(1),m="scroll"+l;a(this._element).one(f.TRANSITION_END,j).emulateTransitionEnd(k),this._element.style[i]=this._element[m]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(o.IN)){var c=a.Event(n.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension(),e=d===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[d]=this._element[e]+"px",f.reflow(this._element),a(this._element).addClass(o.COLLAPSING).removeClass(o.COLLAPSE).removeClass(o.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(o.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).trigger(n.HIDDEN)};return this._element.style[d]=0,f.supportsTransitionEnd()?void a(this._element).one(f.TRANSITION_END,g).emulateTransitionEnd(k):void g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"dispose",value:function(){a.removeData(this._element,g),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(c){return c=a.extend({},l,c),c.toggle=Boolean(c.toggle),f.typeCheckConfig(b,c,m),c}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(p.WIDTH);return b?p.WIDTH:p.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(h._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(o.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(o.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"_getTargetFromElement",value:function(b){var c=f.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),e=a.extend({},l,c.data(),"object"==typeof b&&b);if(!d&&e.toggle&&/show|hide/.test(b)&&(e.toggle=!1),d||(d=new h(this,e),c.data(g,d)),"string"==typeof b){if(void 0===d[b])throw new Error('No method named "'+b+'"');d[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}}]),h}();return a(document).on(n.CLICK_DATA_API,q.DATA_TOGGLE,function(b){b.preventDefault();var c=r._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();r._jQueryInterface.call(a(c),e)}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="dropdown",d="4.0.0-alpha.2",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[b],k={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},l={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},m={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},n=function(){function b(a){c(this,b),this._element=a,this._addEventListeners()}return e(b,[{key:"toggle",value:function(){if(this.disabled||a(this).hasClass(l.DISABLED))return!1;var c=b._getParentFromElement(this),d=a(c).hasClass(l.OPEN);if(b._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(c).closest(m.NAVBAR_NAV).length){var e=document.createElement("div");e.className=l.BACKDROP,a(e).insertBefore(this),a(e).on("click",b._clearMenus)}var f={relatedTarget:this},g=a.Event(k.SHOW,f);return a(c).trigger(g),g.isDefaultPrevented()?!1:(this.focus(),this.setAttribute("aria-expanded","true"),a(c).toggleClass(l.OPEN),a(c).trigger(a.Event(k.SHOWN,f)),!1)}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(k.CLICK,this.toggle)}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(g);if(d||a(this).data(g,d=new b(this)),"string"==typeof c){if(void 0===d[c])throw new Error('No method named "'+c+'"');d[c].call(this)}})}},{key:"_clearMenus",value:function(c){if(!c||3!==c.which){var d=a(m.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(m.DATA_TOGGLE)),f=0;f<e.length;f++){var g=b._getParentFromElement(e[f]),h={relatedTarget:e[f]};if(a(g).hasClass(l.OPEN)&&!(c&&"click"===c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(g,c.target))){var i=a.Event(k.HIDE,h);a(g).trigger(i),i.isDefaultPrevented()||(e[f].setAttribute("aria-expanded","false"),a(g).removeClass(l.OPEN).trigger(a.Event(k.HIDDEN,h)))}}}}},{key:"_getParentFromElement",value:function(b){var c=void 0,d=f.getSelectorFromElement(b);return d&&(c=a(d)[0]),c||b.parentNode}},{key:"_dataApiKeydownHandler",value:function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)&&(c.preventDefault(),c.stopPropagation(),!this.disabled&&!a(this).hasClass(l.DISABLED))){var d=b._getParentFromElement(this),e=a(d).hasClass(l.OPEN);if(!e&&27!==c.which||e&&27===c.which){if(27===c.which){var f=a(d).find(m.DATA_TOGGLE)[0];a(f).trigger("focus")}return void a(this).trigger("click")}var g=a.makeArray(a(m.VISIBLE_ITEMS));if(g=g.filter(function(a){return a.offsetWidth||a.offsetHeight}),g.length){var h=g.indexOf(c.target);38===c.which&&h>0&&h--,40===c.which&&h<g.length-1&&h++,0>h&&(h=0),g[h].focus()}}}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(k.KEYDOWN_DATA_API,m.DATA_TOGGLE,n._dataApiKeydownHandler).on(k.KEYDOWN_DATA_API,m.ROLE_MENU,n._dataApiKeydownHandler).on(k.KEYDOWN_DATA_API,m.ROLE_LISTBOX,n._dataApiKeydownHandler).on(k.CLICK_DATA_API,n._clearMenus).on(k.CLICK_DATA_API,m.DATA_TOGGLE,n.prototype.toggle).on(k.CLICK_DATA_API,m.FORM_CHILD,function(a){a.stopPropagation()}),a.fn[b]=n._jQueryInterface,a.fn[b].Constructor=n,a.fn[b].noConflict=function(){return a.fn[b]=j,n._jQueryInterface},n}(jQuery),function(a){var b="modal",d="4.0.0-alpha.2",g="bs.modal",h="."+g,i=".data-api",j=a.fn[b],k=300,l=150,m={backdrop:!0,keyboard:!0,focus:!0,show:!0},n={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},o={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,FOCUSIN:"focusin"+h,RESIZE:"resize"+h,CLICK_DISMISS:"click.dismiss"+h,KEYDOWN_DISMISS:"keydown.dismiss"+h,MOUSEUP_DISMISS:"mouseup.dismiss"+h,MOUSEDOWN_DISMISS:"mousedown.dismiss"+h,CLICK_DATA_API:"click"+h+i},p={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},q={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},r=function(){function i(b,d){c(this,i),this._config=this._getConfig(d),this._element=b,this._dialog=a(b).find(q.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return e(i,[{key:"toggle",value:function(a){return this._isShown?this.hide():this.show(a)}},{key:"show",value:function(b){var c=this,d=a.Event(o.SHOW,{relatedTarget:b});a(this._element).trigger(d),this._isShown||d.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),a(document.body).addClass(p.OPEN),this._setEscapeEvent(),this._setResizeEvent(),a(this._element).on(o.CLICK_DISMISS,q.DATA_DISMISS,a.proxy(this.hide,this)),a(this._dialog).on(o.MOUSEDOWN_DISMISS,function(){a(c._element).one(o.MOUSEUP_DISMISS,function(b){a(b.target).is(c._element)&&(c._ignoreBackdropClick=!0)})}),this._showBackdrop(a.proxy(this._showElement,this,b)))}},{key:"hide",value:function(b){b&&b.preventDefault();var c=a.Event(o.HIDE);a(this._element).trigger(c),this._isShown&&!c.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),a(document).off(o.FOCUSIN),a(this._element).removeClass(p.IN),a(this._element).off(o.CLICK_DISMISS),a(this._dialog).off(o.MOUSEDOWN_DISMISS),f.supportsTransitionEnd()&&a(this._element).hasClass(p.FADE)?a(this._element).one(f.TRANSITION_END,a.proxy(this._hideModal,this)).emulateTransitionEnd(k):this._hideModal())}},{key:"dispose",value:function(){a.removeData(this._element,g),a(window).off(h),a(document).off(h),a(this._element).off(h),a(this._backdrop).off(h),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null}},{key:"_getConfig",value:function(c){return c=a.extend({},m,c),f.typeCheckConfig(b,c,n),c}},{key:"_showElement",value:function(b){var c=this,d=f.supportsTransitionEnd()&&a(this._element).hasClass(p.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.scrollTop=0,d&&f.reflow(this._element),a(this._element).addClass(p.IN),this._config.focus&&this._enforceFocus();var e=a.Event(o.SHOWN,{relatedTarget:b}),g=function(){c._config.focus&&c._element.focus(),a(c._element).trigger(e)};d?a(this._dialog).one(f.TRANSITION_END,g).emulateTransitionEnd(k):g()}},{key:"_enforceFocus",value:function(){var b=this;a(document).off(o.FOCUSIN).on(o.FOCUSIN,function(c){document===c.target||b._element===c.target||a(b._element).has(c.target).length||b._element.focus()})}},{key:"_setEscapeEvent",value:function(){var b=this;this._isShown&&this._config.keyboard?a(this._element).on(o.KEYDOWN_DISMISS,function(a){27===a.which&&b.hide()}):this._isShown||a(this._element).off(o.KEYDOWN_DISMISS)}},{key:"_setResizeEvent",value:function(){this._isShown?a(window).on(o.RESIZE,a.proxy(this._handleUpdate,this)):a(window).off(o.RESIZE)}},{key:"_hideModal",value:function(){var b=this;this._element.style.display="none",this._showBackdrop(function(){a(document.body).removeClass(p.OPEN),b._resetAdjustments(),b._resetScrollbar(),a(b._element).trigger(o.HIDDEN)})}},{key:"_removeBackdrop",value:function(){this._backdrop&&(a(this._backdrop).remove(),this._backdrop=null)}},{key:"_showBackdrop",value:function(b){var c=this,d=a(this._element).hasClass(p.FADE)?p.FADE:"";if(this._isShown&&this._config.backdrop){var e=f.supportsTransitionEnd()&&d;if(this._backdrop=document.createElement("div"),this._backdrop.className=p.BACKDROP,d&&a(this._backdrop).addClass(d),a(this._backdrop).appendTo(document.body),a(this._element).on(o.CLICK_DISMISS,function(a){return c._ignoreBackdropClick?void(c._ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"===c._config.backdrop?c._element.focus():c.hide()))}),e&&f.reflow(this._backdrop),a(this._backdrop).addClass(p.IN),!b)return;if(!e)return void b();a(this._backdrop).one(f.TRANSITION_END,b).emulateTransitionEnd(l)}else if(!this._isShown&&this._backdrop){a(this._backdrop).removeClass(p.IN);var g=function(){c._removeBackdrop(),b&&b()};f.supportsTransitionEnd()&&a(this._element).hasClass(p.FADE)?a(this._backdrop).one(f.TRANSITION_END,g).emulateTransitionEnd(l):g()}else b&&b()}},{key:"_handleUpdate",value:function(){this._adjustDialog()}},{key:"_adjustDialog",value:function(){var a=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px~")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()}},{key:"_setScrollbar",value:function(){var b=parseInt(a(q.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=b+this._scrollbarWidth+"px")}},{key:"_resetScrollbar",value:function(){document.body.style.paddingRight=this._originalBodyPadding}},{key:"_getScrollbarWidth",value:function(){var a=document.createElement("div");a.className=p.SCROLLBAR_MEASURER,document.body.appendChild(a);var b=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),b}}],[{key:"_jQueryInterface",value:function(b,c){return this.each(function(){var d=a(this).data(g),e=a.extend({},i.Default,a(this).data(),"object"==typeof b&&b);if(d||(d=new i(this,e),a(this).data(g,d)),"string"==typeof b){if(void 0===d[b])throw new Error('No method named "'+b+'"');d[b](c)}else e.show&&d.show(c)})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return m}}]),i}();return a(document).on(o.CLICK_DATA_API,q.DATA_TOGGLE,function(b){var c=this,d=void 0,e=f.getSelectorFromElement(this);e&&(d=a(e)[0]);var h=a(d).data(g)?"toggle":a.extend({},a(d).data(),a(this).data());"A"===this.tagName&&b.preventDefault();var i=a(d).one(o.SHOW,function(b){b.isDefaultPrevented()||i.one(o.HIDDEN,function(){a(c).is(":visible")&&c.focus()})});r._jQueryInterface.call(a(d),h,this)}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="scrollspy",d="4.0.0-alpha.2",g="bs.scrollspy",h="."+g,i=".data-api",j=a.fn[b],k={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},m={ACTIVATE:"activate"+h,SCROLL:"scroll"+h,LOAD_DATA_API:"load"+h+i},n={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},o={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},p={OFFSET:"offset",POSITION:"position"},q=function(){function i(b,d){c(this,i),this._element=b,this._scrollElement="BODY"===b.tagName?window:b,this._config=this._getConfig(d),this._selector=this._config.target+" "+o.NAV_LINKS+","+(this._config.target+" "+o.DROPDOWN_ITEMS),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(m.SCROLL,a.proxy(this._process,this)),this.refresh(),this._process()}return e(i,[{key:"refresh",value:function(){var b=this,c=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,d="auto"===this._config.method?c:this._config.method,e=d===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var g=a.makeArray(a(this._selector));g.map(function(b){var c=void 0,g=f.getSelectorFromElement(b);return g&&(c=a(g)[0]),c&&(c.offsetWidth||c.offsetHeight)?[a(c)[d]().top+e,g]:void 0}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(c){if(c=a.extend({},k,c),"string"!=typeof c.target){var d=a(c.target).attr("id");d||(d=f.getUID(b),a(c.target).attr("id",d)),c.target="#"+d}return f.typeCheckConfig(b,c,l),c}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a<this._offsets[0])return this._activeTarget=null,void this._clear();for(var e=this._offsets.length;e--;){var f=this._activeTarget!==this._targets[e]&&a>=this._offsets[e]&&(void 0===this._offsets[e+1]||a<this._offsets[e+1]);f&&this._activate(this._targets[e])}}},{key:"_activate",value:function(b){this._activeTarget=b,this._clear();var c=this._selector.split(",");c=c.map(function(a){return a+'[data-target="'+b+'"],'+(a+'[href="'+b+'"]')});var d=a(c.join(","));d.hasClass(n.DROPDOWN_ITEM)?(d.closest(o.DROPDOWN).find(o.DROPDOWN_TOGGLE).addClass(n.ACTIVE),d.addClass(n.ACTIVE)):d.parents(o.LI).find(o.NAV_LINKS).addClass(n.ACTIVE),a(this._scrollElement).trigger(m.ACTIVATE,{relatedTarget:b})}},{key:"_clear",value:function(){a(this._selector).filter(o.ACTIVE).removeClass(n.ACTIVE)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b&&b||null;if(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return k}}]),i}();return a(window).on(m.LOAD_DATA_API,function(){for(var b=a.makeArray(a(o.DATA_SPY)),c=b.length;c--;){var d=a(b[c]);q._jQueryInterface.call(d,d.data())}}),a.fn[b]=q._jQueryInterface,a.fn[b].Constructor=q,a.fn[b].noConflict=function(){return a.fn[b]=j,q._jQueryInterface},q}(jQuery),function(a){var b="tab",d="4.0.0-alpha.2",g="bs.tab",h="."+g,i=".data-api",j=a.fn[b],k=150,l={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK_DATA_API:"click"+h+i},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},n={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',
-DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,e=a(this._element).closest(n.UL)[0],g=f.getSelectorFromElement(this._element);e&&(d=a.makeArray(a(e).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,e);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var e=a(c).find(n.ACTIVE_CHILD)[0],g=d&&f.supportsTransitionEnd()&&(e&&a(e).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,e,g,d);e&&g?a(e).one(f.TRANSITION_END,h).emulateTransitionEnd(k):h(),e&&a(e).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,e){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(f.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}e&&e()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)");var b="tooltip",d="4.0.0-alpha.2",g="bs.tooltip",h="."+g,i=a.fn[b],j=150,k="bs-tether",l={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},m={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},n={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},o={IN:"in",OUT:"out"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},q={FADE:"fade",IN:"in"},r={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},s={element:!1,enabled:!1},t={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},u=function(){function i(a,b){c(this,i),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(b),this.tip=null,this._setListeners()}return e(i,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){if(b){var c=this.constructor.DATA_KEY,d=a(b.currentTarget).data(c);d||(d=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(c,d)),d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(a(this.getTipElement()).hasClass(q.IN))return void this._leave(null,this);this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var d=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!d)return;var e=this.getTipElement(),g=f.getUID(this.constructor.NAME);e.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(e).addClass(q.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,j=this._getAttachment(h);a(e).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:j,element:e,target:this.element,classes:s,classPrefix:k,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),f.reflow(e),this._tether.position(),a(e).addClass(q.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===o.OUT&&b._leave(null,b)};if(f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE))return void a(this.tip).one(f.TRANSITION_END,l).emulateTransitionEnd(i._TRANSITION_DURATION);l()}}},{key:"hide",value:function(b){var c=this,d=this.getTipElement(),e=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==o.IN&&d.parentNode&&d.parentNode.removeChild(d),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(e),e.isDefaultPrevented()||(a(d).removeClass(q.IN),f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(d).one(f.TRANSITION_END,g).emulateTransitionEnd(j):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return Boolean(this.getTitle())}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(r.TOOLTIP_INNER),this.getTitle()),b.removeClass(q.FADE).removeClass(q.IN),this.cleanupTether()}},{key:"setElementContent",value:function(b,c){var d=this.config.html;"object"==typeof c&&(c.nodeType||c.jquery)?d?a(c).parent().is(b)||b.empty().append(c):b.text(a(c).text()):b[d?"html":"text"](c)}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&this._tether.destroy()}},{key:"_getAttachment",value:function(a){return n[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==t.MANUAL){var d=c===t.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===t.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"===b.type?t.FOCUS:t.HOVER]=!0),a(c.getTipElement()).hasClass(q.IN)||c._hoverState===o.IN?void(c._hoverState=o.IN):(clearTimeout(c._timeout),c._hoverState=o.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===o.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"===b.type?t.FOCUS:t.HOVER]=!1),c._isWithActiveTrigger()?void 0:(clearTimeout(c._timeout),c._hoverState=o.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===o.OUT&&c.hide()},c.config.delay.hide)):void c.hide())}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(c){return c=a.extend({},this.constructor.Default,a(this.element).data(),c),c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay}),f.typeCheckConfig(b,c,this.constructor.DefaultType),c}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config)this.constructor.Default[b]!==this.config[b]&&(a[b]=this.config[b]);return a}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return h}},{key:"DefaultType",get:function(){return m}}]),i}();return a.fn[b]=u._jQueryInterface,a.fn[b].Constructor=u,a.fn[b].noConflict=function(){return a.fn[b]=i,u._jQueryInterface},u}(jQuery));(function(a){var f="popover",h="4.0.0-alpha.2",i="bs.popover",j="."+i,k=a.fn[f],l=a.extend({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),m=a.extend({},g.DefaultType,{content:"(string|element|function)"}),n={FADE:"fade",IN:"in"},o={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},p={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},q=function(g){function k(){c(this,k),d(Object.getPrototypeOf(k.prototype),"constructor",this).apply(this,arguments)}return b(k,g),e(k,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(o.TITLE),this.getTitle()),this.setElementContent(b.find(o.CONTENT),this._getContent()),b.removeClass(n.FADE).removeClass(n.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(i),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new k(this,d),a(this).data(i,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return h}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return j}},{key:"DefaultType",get:function(){return m}}]),k}(g);return a.fn[f]=q._jQueryInterface,a.fn[f].Constructor=q,a.fn[f].noConflict=function(){return a.fn[f]=k,q._jQueryInterface},q})(jQuery)}(jQuery); \ No newline at end of file
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:a.end,delegateType:a.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in h)if(void 0!==t.style[e])return{end:h[e]};return!1}function r(e){var n=this,i=!1;return t(this).one(c.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||c.triggerTransitionEnd(n)},e),this}function s(){a=o(),t.fn.emulateTransitionEnd=r,c.supportsTransitionEnd()&&(t.event.special[c.TRANSITION_END]=i())}var a=!1,l=1e6,h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do t+=~~(Math.random()*l);while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");return e||(e=t.getAttribute("href")||"",e=/^#[a-z]/i.test(e)?e:null),e},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(t,i,o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r],a=i[r],l=a&&n(a)?"element":e(a);if(!new RegExp(s).test(l))throw new Error(t.toUpperCase()+": "+('Option "'+r+'" provided type "'+l+'" ')+('but expected type "'+s+'".'))}}};return s(),c}(jQuery),s=(function(t){var e="alert",i="4.0.0-alpha.5",s="bs.alert",a="."+s,l=".data-api",h=t.fn[e],c=150,u={DISMISS:'[data-dismiss="alert"]'},d={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+l},f={ALERT:"alert",FADE:"fade",SHOW:"show"},_=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t),n=this._triggerCloseEvent(e);n.isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,s),this._element=null},e.prototype._getRootElement=function(e){var n=r.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+f.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(d.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){var n=this;return t(e).removeClass(f.SHOW),r.supportsTransitionEnd()&&t(e).hasClass(f.FADE)?void t(e).one(r.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(c):void this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(d.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);o||(o=new e(this),i.data(s,o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(d.CLICK_DATA_API,u.DISMISS,_._handleDismiss(new _)),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=h,_._jQueryInterface},_}(jQuery),function(t){var e="button",i="4.0.0-alpha.5",r="bs.button",s="."+r,a=".data-api",l=t.fn[e],h={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},c={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},u={CLICK_DATA_API:"click"+s+a,FOCUS_BLUR_DATA_API:"focus"+s+a+" "+("blur"+s+a)},d=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=t(this._element).closest(c.DATA_TOGGLE)[0];if(n){var i=t(this._element).find(c.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&t(this._element).hasClass(h.ACTIVE))e=!1;else{var o=t(n).find(c.ACTIVE)[0];o&&t(o).removeClass(h.ACTIVE)}e&&(i.checked=!t(this._element).hasClass(h.ACTIVE),t(i).trigger("change")),i.focus()}}else this._element.setAttribute("aria-pressed",!t(this._element).hasClass(h.ACTIVE));e&&t(this._element).toggleClass(h.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,r),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(r);i||(i=new e(this),t(this).data(r,i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(u.CLICK_DATA_API,c.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(h.BUTTON)||(n=t(n).closest(c.BUTTON)),d._jQueryInterface.call(t(n),"toggle")}).on(u.FOCUS_BLUR_DATA_API,c.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(c.BUTTON)[0];t(n).toggleClass(h.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=l,d._jQueryInterface},d}(jQuery),function(t){var e="carousel",s="4.0.0-alpha.5",a="bs.carousel",l="."+a,h=".data-api",c=t.fn[e],u=600,d=37,f=39,_={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},g={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},p={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},m={SLIDE:"slide"+l,SLID:"slid"+l,KEYDOWN:"keydown"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l,LOAD_DATA_API:"load"+l+h,CLICK_DATA_API:"click"+l+h},E={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},v={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},T=function(){function h(e,i){n(this,h),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(v.INDICATORS)[0],this._addEventListeners()}return h.prototype.next=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(p.NEXT)},h.prototype.nextWhenVisible=function(){document.hidden||this.next()},h.prototype.prev=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(p.PREVIOUS)},h.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(v.NEXT_PREV)[0]&&r.supportsTransitionEnd()&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},h.prototype.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},h.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(v.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(m.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?p.NEXT:p.PREVIOUS;this._slide(o,this._items[e])}},h.prototype.dispose=function(){t(this._element).off(l),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},h.prototype._getConfig=function(n){return n=t.extend({},_,n),r.typeCheckConfig(e,n,g),n},h.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(m.KEYDOWN,function(t){return e._keydown(t)}),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(m.MOUSEENTER,function(t){return e.pause(t)}).on(m.MOUSELEAVE,function(t){return e.cycle(t)})},h.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case d:t.preventDefault(),this.prev();break;case f:t.preventDefault(),this.next();break;default:return}},h.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(v.ITEM)),this._items.indexOf(e)},h.prototype._getItemByDirection=function(t,e){var n=t===p.NEXT,i=t===p.PREVIOUS,o=this._getItemIndex(e),r=this._items.length-1,s=i&&0===o||n&&o===r;if(s&&!this._config.wrap)return e;var a=t===p.PREVIOUS?-1:1,l=(o+a)%this._items.length;return l===-1?this._items[this._items.length-1]:this._items[l]},h.prototype._triggerSlideEvent=function(e,n){var i=t.Event(m.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},h.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(v.ACTIVE).removeClass(E.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(E.ACTIVE)}},h.prototype._slide=function(e,n){var i=this,o=t(this._element).find(v.ACTIVE_ITEM)[0],s=n||o&&this._getItemByDirection(e,o),a=Boolean(this._interval),l=void 0,h=void 0,c=void 0;if(e===p.NEXT?(l=E.LEFT,h=E.NEXT,c=p.LEFT):(l=E.RIGHT,h=E.PREV,c=p.RIGHT),s&&t(s).hasClass(E.ACTIVE))return void(this._isSliding=!1);var d=this._triggerSlideEvent(s,c);if(!d.isDefaultPrevented()&&o&&s){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s);var f=t.Event(m.SLID,{relatedTarget:s,direction:c});r.supportsTransitionEnd()&&t(this._element).hasClass(E.SLIDE)?(t(s).addClass(h),r.reflow(s),t(o).addClass(l),t(s).addClass(l),t(o).one(r.TRANSITION_END,function(){t(s).removeClass(l+" "+h).addClass(E.ACTIVE),t(o).removeClass(E.ACTIVE+" "+h+" "+l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(f)},0)}).emulateTransitionEnd(u)):(t(o).removeClass(E.ACTIVE),t(s).addClass(E.ACTIVE),this._isSliding=!1,t(this._element).trigger(f)),a&&this.cycle()}},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o=t.extend({},_,t(this).data());"object"===("undefined"==typeof e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new h(this,o),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(void 0===n[r])throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},h._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(E.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),h._jQueryInterface.call(t(i),o),s&&t(i).data(a).to(s),e.preventDefault()}}},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return _}}]),h}();return t(document).on(m.CLICK_DATA_API,v.DATA_SLIDE,T._dataApiClickHandler),t(window).on(m.LOAD_DATA_API,function(){t(v.DATA_RIDE).each(function(){var e=t(this);T._jQueryInterface.call(e,e.data())})}),t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=c,T._jQueryInterface},T}(jQuery),function(t){var e="collapse",s="4.0.0-alpha.5",a="bs.collapse",l="."+a,h=".data-api",c=t.fn[e],u=600,d={toggle:!0,parent:""},f={toggle:"boolean",parent:"string"},_={SHOW:"show"+l,SHOWN:"shown"+l,HIDE:"hide"+l,HIDDEN:"hidden"+l,CLICK_DATA_API:"click"+l+h},g={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},E=function(){function l(e,i){n(this,l),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],'+('[data-toggle="collapse"][data-target="#'+e.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return l.prototype.toggle=function(){t(this._element).hasClass(g.SHOW)?this.hide():this.show()},l.prototype.show=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!t(this._element).hasClass(g.SHOW)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(this._parent).find(m.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a),i&&i._isTransitioning))){var o=t.Event(_.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(l._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var s=this._getDimension();t(this._element).removeClass(g.COLLAPSE).addClass(g.COLLAPSING),this._element.style[s]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(g.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).addClass(g.SHOW),e._element.style[s]="",e.setTransitioning(!1),t(e._element).trigger(_.SHOWN)};if(!r.supportsTransitionEnd())return void h();var c=s[0].toUpperCase()+s.slice(1),d="scroll"+c;t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(u),this._element.style[s]=this._element[d]+"px"}}}},l.prototype.hide=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(t(this._element).hasClass(g.SHOW)){var n=t.Event(_.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),o=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[o]+"px",r.reflow(this._element),t(this._element).addClass(g.COLLAPSING).removeClass(g.COLLAPSE).removeClass(g.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(g.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var s=function(){e.setTransitioning(!1),t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).trigger(_.HIDDEN)};return this._element.style[i]="",r.supportsTransitionEnd()?void t(this._element).one(r.TRANSITION_END,s).emulateTransitionEnd(u):void s()}}},l.prototype.setTransitioning=function(t){this._isTransitioning=t},l.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},l.prototype._getConfig=function(n){return n=t.extend({},d,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,f),n},l.prototype._getDimension=function(){var e=t(this._element).hasClass(p.WIDTH);return e?p.WIDTH:p.HEIGHT},l.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(l._getTargetFromElement(n),[n])}),n},l.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(g.SHOW);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(g.COLLAPSED,!i).attr("aria-expanded",i)}},l._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},l._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(a),r=t.extend({},d,n.data(),"object"===("undefined"==typeof e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new l(this,r),n.data(a,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e]()}})},o(l,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}}]),l}();return t(document).on(_.CLICK_DATA_API,m.DATA_TOGGLE,function(e){e.preventDefault();var n=E._getTargetFromElement(this),i=t(n).data(a),o=i?"toggle":t(this).data();E._jQueryInterface.call(t(n),o)}),t.fn[e]=E._jQueryInterface,t.fn[e].Constructor=E,t.fn[e].noConflict=function(){return t.fn[e]=c,E._jQueryInterface},E}(jQuery),function(t){var e="dropdown",i="4.0.0-alpha.5",s="bs.dropdown",a="."+s,l=".data-api",h=t.fn[e],c=27,u=38,d=40,f=3,_={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+l,KEYDOWN_DATA_API:"keydown"+a+l},g={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},p={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},m=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(g.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(g.SHOW);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(p.NAVBAR_NAV).length){var o=document.createElement("div");o.className=g.BACKDROP,t(o).insertBefore(this),t(o).on("click",e._clearMenus)}var r={relatedTarget:this},s=t.Event(_.SHOW,r);return t(n).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),t(n).toggleClass(g.SHOW),t(n).trigger(t.Event(_.SHOWN,r)),!1)},e.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(_.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(s);if(i||(i=new e(this),t(this).data(s,i)),"string"==typeof n){if(void 0===i[n])throw new Error('No method named "'+n+'"');i[n].call(this)}})},e._clearMenus=function(n){if(!n||n.which!==f){var i=t(p.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var o=t.makeArray(t(p.DATA_TOGGLE)),r=0;r<o.length;r++){var s=e._getParentFromElement(o[r]),a={relatedTarget:o[r]};if(t(s).hasClass(g.SHOW)&&!(n&&"click"===n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(s,n.target))){var l=t.Event(_.HIDE,a);t(s).trigger(l),l.isDefaultPrevented()||(o[r].setAttribute("aria-expanded","false"),t(s).removeClass(g.SHOW).trigger(t.Event(_.HIDDEN,a)))}}}},e._getParentFromElement=function(e){var n=void 0,i=r.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},e._dataApiKeydownHandler=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)&&(n.preventDefault(),n.stopPropagation(),!this.disabled&&!t(this).hasClass(g.DISABLED))){var i=e._getParentFromElement(this),o=t(i).hasClass(g.SHOW);if(!o&&n.which!==c||o&&n.which===c){if(n.which===c){var r=t(i).find(p.DATA_TOGGLE)[0];t(r).trigger("focus")}return void t(this).trigger("click")}var s=t(i).find(p.VISIBLE_ITEMS).get();if(s.length){var a=s.indexOf(n.target);n.which===u&&a>0&&a--,n.which===d&&a<s.length-1&&a++,a<0&&(a=0),s[a].focus()}}},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(_.KEYDOWN_DATA_API,p.DATA_TOGGLE,m._dataApiKeydownHandler).on(_.KEYDOWN_DATA_API,p.ROLE_MENU,m._dataApiKeydownHandler).on(_.KEYDOWN_DATA_API,p.ROLE_LISTBOX,m._dataApiKeydownHandler).on(_.CLICK_DATA_API,m._clearMenus).on(_.CLICK_DATA_API,p.DATA_TOGGLE,m.prototype.toggle).on(_.CLICK_DATA_API,p.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=h,m._jQueryInterface},m}(jQuery),function(t){var e="modal",s="4.0.0-alpha.5",a="bs.modal",l="."+a,h=".data-api",c=t.fn[e],u=300,d=150,f=27,_={backdrop:!0,keyboard:!0,focus:!0,show:!0},g={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},p={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,FOCUSIN:"focusin"+l,RESIZE:"resize"+l,CLICK_DISMISS:"click.dismiss"+l,KEYDOWN_DISMISS:"keydown.dismiss"+l,MOUSEUP_DISMISS:"mouseup.dismiss"+l,MOUSEDOWN_DISMISS:"mousedown.dismiss"+l,CLICK_DATA_API:"click"+l+h},m={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},E={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},v=function(){function h(e,i){n(this,h),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(E.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return h.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},h.prototype.show=function(e){var n=this;if(this._isTransitioning)throw new Error("Modal is transitioning");r.supportsTransitionEnd()&&t(this._element).hasClass(m.FADE)&&(this._isTransitioning=!0);var i=t.Event(p.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(m.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(p.CLICK_DISMISS,E.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(p.MOUSEDOWN_DISMISS,function(){t(n._element).one(p.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))},h.prototype.hide=function(e){var n=this;if(e&&e.preventDefault(),this._isTransitioning)throw new Error("Modal is transitioning");var i=r.supportsTransitionEnd()&&t(this._element).hasClass(m.FADE);i&&(this._isTransitioning=!0);var o=t.Event(p.HIDE);t(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(p.FOCUSIN),t(this._element).removeClass(m.SHOW),t(this._element).off(p.CLICK_DISMISS),t(this._dialog).off(p.MOUSEDOWN_DISMISS),i?t(this._element).one(r.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(u):this._hideModal())},h.prototype.dispose=function(){t.removeData(this._element,a),t(window,document,this._element,this._backdrop).off(l),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},h.prototype._getConfig=function(n){return n=t.extend({},_,n),r.typeCheckConfig(e,n,g),n},h.prototype._showElement=function(e){var n=this,i=r.supportsTransitionEnd()&&t(this._element).hasClass(m.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&r.reflow(this._element),t(this._element).addClass(m.SHOW),this._config.focus&&this._enforceFocus();var o=t.Event(p.SHOWN,{relatedTarget:e}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(o)};i?t(this._dialog).one(r.TRANSITION_END,s).emulateTransitionEnd(u):s()},h.prototype._enforceFocus=function(){var e=this;t(document).off(p.FOCUSIN).on(p.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},h.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(p.KEYDOWN_DISMISS,function(t){t.which===f&&e.hide()}):this._isShown||t(this._element).off(p.KEYDOWN_DISMISS)},h.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(p.RESIZE,function(t){return e._handleUpdate(t)}):t(window).off(p.RESIZE)},h.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(m.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(p.HIDDEN)})},h.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},h.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(m.FADE)?m.FADE:"";if(this._isShown&&this._config.backdrop){var o=r.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=m.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(p.CLICK_DISMISS,function(t){return n._ignoreBackdropClick?void(n._ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide()))}),o&&r.reflow(this._backdrop),t(this._backdrop).addClass(m.SHOW),!e)return;if(!o)return void e();t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(d)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(m.SHOW);var s=function(){n._removeBackdrop(),e&&e()};r.supportsTransitionEnd()&&t(this._element).hasClass(m.FADE)?t(this._backdrop).one(r.TRANSITION_END,s).emulateTransitionEnd(d):s()}else e&&e()},h.prototype._handleUpdate=function(){this._adjustDialog()},h.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},h.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},h.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},h.prototype._setScrollbar=function(){var e=parseInt(t(E.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=e+this._scrollbarWidth+"px")},h.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},h.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=m.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},h._jQueryInterface=function(e,n){return this.each(function(){var o=t(this).data(a),r=t.extend({},h.Default,t(this).data(),"object"===("undefined"==typeof e?"undefined":i(e))&&e);if(o||(o=new h(this,r),t(this).data(a,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return _}}]),h}();return t(document).on(p.CLICK_DATA_API,E.DATA_TOGGLE,function(e){var n=this,i=void 0,o=r.getSelectorFromElement(this);o&&(i=t(o)[0]);var s=t(i).data(a)?"toggle":t.extend({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(i).one(p.SHOW,function(e){e.isDefaultPrevented()||l.one(p.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});v._jQueryInterface.call(t(i),s,this)}),t.fn[e]=v._jQueryInterface,t.fn[e].Constructor=v,t.fn[e].noConflict=function(){return t.fn[e]=c,v._jQueryInterface},v}(jQuery),function(t){var e="scrollspy",s="4.0.0-alpha.5",a="bs.scrollspy",l="."+a,h=".data-api",c=t.fn[e],u={offset:10,method:"auto",target:""},d={offset:"number",method:"string",target:"(string|element)"},f={ACTIVATE:"activate"+l,SCROLL:"scroll"+l,LOAD_DATA_API:"load"+l+h},_={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},g={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},p={OFFSET:"offset",POSITION:"position"},m=function(){function h(e,i){var o=this;n(this,h),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+g.NAV_LINKS+","+(this._config.target+" "+g.DROPDOWN_ITEMS),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(f.SCROLL,function(t){return o._process(t)}),this.refresh(),this._process()}return h.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,i="auto"===this._config.method?n:this._config.method,o=i===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var s=t.makeArray(t(this._selector));s.map(function(e){var n=void 0,s=r.getSelectorFromElement(e);return s&&(n=t(s)[0]),n&&(n.offsetWidth||n.offsetHeight)?[t(n)[i]().top+o,s]:null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},h.prototype.dispose=function(){t.removeData(this._element,a),t(this._scrollElement).off(l),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},h.prototype._getConfig=function(n){if(n=t.extend({},u,n),"string"!=typeof n.target){var i=t(n.target).attr("id");i||(i=r.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return r.typeCheckConfig(e,n,d),n},h.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop},h.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},h.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.offsetHeight},h.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];return void(this._activeTarget!==i&&this._activate(i))}if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){var r=this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1]);r&&this._activate(this._targets[o])}},h.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+(t+'[href="'+e+'"]')});var i=t(n.join(","));i.hasClass(_.DROPDOWN_ITEM)?(i.closest(g.DROPDOWN).find(g.DROPDOWN_TOGGLE).addClass(_.ACTIVE),i.addClass(_.ACTIVE)):i.parents(g.LI).find("> "+g.NAV_LINKS).addClass(_.ACTIVE),t(this._scrollElement).trigger(f.ACTIVATE,{relatedTarget:e})},h.prototype._clear=function(){t(this._selector).filter(g.ACTIVE).removeClass(_.ACTIVE)},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e;if(n||(n=new h(this,o),
+t(this).data(a,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return u}}]),h}();return t(window).on(f.LOAD_DATA_API,function(){for(var e=t.makeArray(t(g.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);m._jQueryInterface.call(i,i.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=c,m._jQueryInterface},m}(jQuery),function(t){var e="tab",i="4.0.0-alpha.5",s="bs.tab",a="."+s,l=".data-api",h=t.fn[e],c=150,u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+l},d={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},f={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},_=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(d.ACTIVE)||t(this._element).hasClass(d.DISABLED))){var n=void 0,i=void 0,o=t(this._element).closest(f.LIST)[0],s=r.getSelectorFromElement(this._element);o&&(i=t.makeArray(t(o).find(f.ACTIVE)),i=i[i.length-1]);var a=t.Event(u.HIDE,{relatedTarget:this._element}),l=t.Event(u.SHOW,{relatedTarget:i});if(i&&t(i).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=t(s)[0]),this._activate(this._element,o);var h=function(){var n=t.Event(u.HIDDEN,{relatedTarget:e._element}),o=t.Event(u.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},e.prototype.dispose=function(){t.removeClass(this._element,s),this._element=null},e.prototype._activate=function(e,n,i){var o=this,s=t(n).find(f.ACTIVE_CHILD)[0],a=i&&r.supportsTransitionEnd()&&(s&&t(s).hasClass(d.FADE)||Boolean(t(n).find(f.FADE_CHILD)[0])),l=function(){return o._transitionComplete(e,s,a,i)};s&&a?t(s).one(r.TRANSITION_END,l).emulateTransitionEnd(c):l(),s&&t(s).removeClass(d.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(d.ACTIVE);var s=t(n.parentNode).find(f.DROPDOWN_ACTIVE_CHILD)[0];s&&t(s).removeClass(d.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(d.SHOW)):t(e).removeClass(d.FADE),e.parentNode&&t(e.parentNode).hasClass(d.DROPDOWN_MENU)){var a=t(e).closest(f.DROPDOWN)[0];a&&t(a).find(f.DROPDOWN_TOGGLE).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);if(o||(o=new e(this),i.data(s,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(e){e.preventDefault(),_._jQueryInterface.call(t(this),"show")}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=h,_._jQueryInterface},_}(jQuery),function(t){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",s="4.0.0-alpha.5",a="bs.tooltip",l="."+a,h=t.fn[e],c=150,u="bs-tether",d={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},f={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},_={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},g={SHOW:"show",OUT:"out"},p={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},m={FADE:"fade",SHOW:"show"},E={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},v={element:!1,enabled:!1},T={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},I=function(){function h(t,e){n(this,h),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return h.prototype.enable=function(){this._isEnabled=!0},h.prototype.disable=function(){this._isEnabled=!1},h.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},h.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(m.SHOW))return void this._leave(null,this);this._enter(null,this)}},h.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},h.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(m.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(a),c=this.config.container===!1?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:l,element:o,target:this.element,classes:v,classPrefix:u,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),r.reflow(o),this._tether.position(),t(o).addClass(m.SHOW);var d=function(){var n=e._hoverState;e._hoverState=null,e._isTransitioning=!1,t(e.element).trigger(e.constructor.Event.SHOWN),n===g.OUT&&e._leave(null,e)};if(r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE))return this._isTransitioning=!0,void t(this.tip).one(r.TRANSITION_END,d).emulateTransitionEnd(h._TRANSITION_DURATION);d()}},h.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var s=function(){n._hoverState!==g.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n._isTransitioning=!1,n.cleanupTether(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(m.SHOW),this._activeTrigger[T.CLICK]=!1,this._activeTrigger[T.FOCUS]=!1,this._activeTrigger[T.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE)?(this._isTransitioning=!0,t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(c)):s(),this._hoverState="")},h.prototype.isWithContent=function(){return Boolean(this.getTitle())},h.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},h.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(E.TOOLTIP_INNER),this.getTitle()),e.removeClass(m.FADE+" "+m.SHOW),this.cleanupTether()},h.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===("undefined"==typeof n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},h.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},h.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},h.prototype._getAttachment=function(t){return _[t.toUpperCase()]},h.prototype._setListeners=function(){var e=this,n=this.config.trigger.split(" ");n.forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==T.MANUAL){var i=n===T.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===T.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},h.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},h.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T.FOCUS:T.HOVER]=!0),t(n.getTipElement()).hasClass(m.SHOW)||n._hoverState===g.SHOW?void(n._hoverState=g.SHOW):(clearTimeout(n._timeout),n._hoverState=g.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===g.SHOW&&n.show()},n.config.delay.show)):void n.show())},h.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T.FOCUS:T.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=g.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===g.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},h.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},h.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},h.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return f}}]),h}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=h,I._jQueryInterface},I}(jQuery));(function(r){var a="popover",l="4.0.0-alpha.5",h="bs.popover",c="."+h,u=r.fn[a],d=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),f=r.extend({},s.DefaultType,{content:"(string|element|function)"}),_={FADE:"fade",SHOW:"show"},g={TITLE:".popover-title",CONTENT:".popover-content"},p={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,INSERTED:"inserted"+c,CLICK:"click"+c,FOCUSIN:"focusin"+c,FOCUSOUT:"focusout"+c,MOUSEENTER:"mouseenter"+c,MOUSELEAVE:"mouseleave"+c},m=function(s){function u(){return n(this,u),t(this,s.apply(this,arguments))}return e(u,s),u.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},u.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},u.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(g.TITLE),this.getTitle()),this.setElementContent(t.find(g.CONTENT),this._getContent()),t.removeClass(_.FADE+" "+_.SHOW),this.cleanupTether()},u.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},u._jQueryInterface=function(t){return this.each(function(){var e=r(this).data(h),n="object"===("undefined"==typeof t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new u(this,n),r(this).data(h,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},o(u,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return c}},{key:"DefaultType",get:function(){return f}}]),u}(s);return r.fn[a]=m._jQueryInterface,r.fn[a].Constructor=m,r.fn[a].noConflict=function(){return r.fn[a]=u,m._jQueryInterface},m})(jQuery)}(); \ No newline at end of file
diff --git a/docs/dist/js/npm.js b/docs/dist/js/npm.js
deleted file mode 100644
index d0564681c..000000000
--- a/docs/dist/js/npm.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
-require('./umd/util.js')
-require('./umd/alert.js')
-require('./umd/button.js')
-require('./umd/carousel.js')
-require('./umd/collapse.js')
-require('./umd/dropdown.js')
-require('./umd/modal.js')
-require('./umd/scrollspy.js')
-require('./umd/tab.js')
-require('./umd/tooltip.js')
-require('./umd/popover.js') \ No newline at end of file
diff --git a/docs/dist/js/umd/alert.js b/docs/dist/js/umd/alert.js
deleted file mode 100644
index bdda50861..000000000
--- a/docs/dist/js/umd/alert.js
+++ /dev/null
@@ -1,211 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.alert = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): alert.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Alert = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'alert';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.alert';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 150;
-
- var Selector = {
- DISMISS: '[data-dismiss="alert"]'
- };
-
- var Event = {
- CLOSE: 'close' + EVENT_KEY,
- CLOSED: 'closed' + EVENT_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- ALERT: 'alert',
- FADE: 'fade',
- IN: 'in'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Alert = (function () {
- function Alert(element) {
- _classCallCheck(this, Alert);
-
- this._element = element;
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Alert, [{
- key: 'close',
-
- // public
-
- value: function close(element) {
- element = element || this._element;
-
- var rootElement = this._getRootElement(element);
- var customEvent = this._triggerCloseEvent(rootElement);
-
- if (customEvent.isDefaultPrevented()) {
- return;
- }
-
- this._removeElement(rootElement);
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- this._element = null;
- }
-
- // private
-
- }, {
- key: '_getRootElement',
- value: function _getRootElement(element) {
- var selector = _Util['default'].getSelectorFromElement(element);
- var parent = false;
-
- if (selector) {
- parent = $(selector)[0];
- }
-
- if (!parent) {
- parent = $(element).closest('.' + ClassName.ALERT)[0];
- }
-
- return parent;
- }
- }, {
- key: '_triggerCloseEvent',
- value: function _triggerCloseEvent(element) {
- var closeEvent = $.Event(Event.CLOSE);
-
- $(element).trigger(closeEvent);
- return closeEvent;
- }
- }, {
- key: '_removeElement',
- value: function _removeElement(element) {
- $(element).removeClass(ClassName.IN);
-
- if (!_Util['default'].supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
- this._destroyElement(element);
- return;
- }
-
- $(element).one(_Util['default'].TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
- }
- }, {
- key: '_destroyElement',
- value: function _destroyElement(element) {
- $(element).detach().trigger(Event.CLOSED).remove();
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
-
- if (!data) {
- data = new Alert(this);
- $element.data(DATA_KEY, data);
- }
-
- if (config === 'close') {
- data[config](this);
- }
- });
- }
- }, {
- key: '_handleDismiss',
- value: function _handleDismiss(alertInstance) {
- return function (event) {
- if (event) {
- event.preventDefault();
- }
-
- alertInstance.close(this);
- };
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Alert;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Alert._jQueryInterface;
- $.fn[NAME].Constructor = Alert;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Alert._jQueryInterface;
- };
-
- return Alert;
- })(jQuery);
-
- module.exports = Alert;
-});
diff --git a/docs/dist/js/umd/button.js b/docs/dist/js/umd/button.js
deleted file mode 100644
index dd6c5f7af..000000000
--- a/docs/dist/js/umd/button.js
+++ /dev/null
@@ -1,189 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module);
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod);
- global.button = mod.exports;
- }
-})(this, function (exports, module) {
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): button.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var Button = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'button';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.button';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
-
- var ClassName = {
- ACTIVE: 'active',
- BUTTON: 'btn',
- FOCUS: 'focus'
- };
-
- var Selector = {
- DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
- DATA_TOGGLE: '[data-toggle="buttons"]',
- INPUT: 'input',
- ACTIVE: '.active',
- BUTTON: '.btn'
- };
-
- var Event = {
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
- FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Button = (function () {
- function Button(element) {
- _classCallCheck(this, Button);
-
- this._element = element;
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Button, [{
- key: 'toggle',
-
- // public
-
- value: function toggle() {
- var triggerChangeEvent = true;
- var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
-
- if (rootElement) {
- var input = $(this._element).find(Selector.INPUT)[0];
-
- if (input) {
- if (input.type === 'radio') {
- if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
- triggerChangeEvent = false;
- } else {
- var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
-
- if (activeElement) {
- $(activeElement).removeClass(ClassName.ACTIVE);
- }
- }
- }
-
- if (triggerChangeEvent) {
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
- $(this._element).trigger('change');
- }
-
- input.focus();
- }
- } else {
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
- }
-
- if (triggerChangeEvent) {
- $(this._element).toggleClass(ClassName.ACTIVE);
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- this._element = null;
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
-
- if (!data) {
- data = new Button(this);
- $(this).data(DATA_KEY, data);
- }
-
- if (config === 'toggle') {
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Button;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
- event.preventDefault();
-
- var button = event.target;
-
- if (!$(button).hasClass(ClassName.BUTTON)) {
- button = $(button).closest(Selector.BUTTON);
- }
-
- Button._jQueryInterface.call($(button), 'toggle');
- }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
- var button = $(event.target).closest(Selector.BUTTON)[0];
- $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Button._jQueryInterface;
- $.fn[NAME].Constructor = Button;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Button._jQueryInterface;
- };
-
- return Button;
- })(jQuery);
-
- module.exports = Button;
-});
diff --git a/docs/dist/js/umd/carousel.js b/docs/dist/js/umd/carousel.js
deleted file mode 100644
index d4753c558..000000000
--- a/docs/dist/js/umd/carousel.js
+++ /dev/null
@@ -1,497 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.carousel = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): carousel.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Carousel = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'carousel';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.carousel';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 600;
-
- var Default = {
- interval: 5000,
- keyboard: true,
- slide: false,
- pause: 'hover',
- wrap: true
- };
-
- var DefaultType = {
- interval: '(number|boolean)',
- keyboard: 'boolean',
- slide: '(boolean|string)',
- pause: '(string|boolean)',
- wrap: 'boolean'
- };
-
- var Direction = {
- NEXT: 'next',
- PREVIOUS: 'prev'
- };
-
- var Event = {
- SLIDE: 'slide' + EVENT_KEY,
- SLID: 'slid' + EVENT_KEY,
- KEYDOWN: 'keydown' + EVENT_KEY,
- MOUSEENTER: 'mouseenter' + EVENT_KEY,
- MOUSELEAVE: 'mouseleave' + EVENT_KEY,
- LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- CAROUSEL: 'carousel',
- ACTIVE: 'active',
- SLIDE: 'slide',
- RIGHT: 'right',
- LEFT: 'left',
- ITEM: 'carousel-item'
- };
-
- var Selector = {
- ACTIVE: '.active',
- ACTIVE_ITEM: '.active.carousel-item',
- ITEM: '.carousel-item',
- NEXT_PREV: '.next, .prev',
- INDICATORS: '.carousel-indicators',
- DATA_SLIDE: '[data-slide], [data-slide-to]',
- DATA_RIDE: '[data-ride="carousel"]'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Carousel = (function () {
- function Carousel(element, config) {
- _classCallCheck(this, Carousel);
-
- this._items = null;
- this._interval = null;
- this._activeElement = null;
-
- this._isPaused = false;
- this._isSliding = false;
-
- this._config = this._getConfig(config);
- this._element = $(element)[0];
- this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
-
- this._addEventListeners();
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Carousel, [{
- key: 'next',
-
- // public
-
- value: function next() {
- if (!this._isSliding) {
- this._slide(Direction.NEXT);
- }
- }
- }, {
- key: 'nextWhenVisible',
- value: function nextWhenVisible() {
- // Don't call next when the page isn't visible
- if (!document.hidden) {
- this.next();
- }
- }
- }, {
- key: 'prev',
- value: function prev() {
- if (!this._isSliding) {
- this._slide(Direction.PREVIOUS);
- }
- }
- }, {
- key: 'pause',
- value: function pause(event) {
- if (!event) {
- this._isPaused = true;
- }
-
- if ($(this._element).find(Selector.NEXT_PREV)[0] && _Util['default'].supportsTransitionEnd()) {
- _Util['default'].triggerTransitionEnd(this._element);
- this.cycle(true);
- }
-
- clearInterval(this._interval);
- this._interval = null;
- }
- }, {
- key: 'cycle',
- value: function cycle(event) {
- if (!event) {
- this._isPaused = false;
- }
-
- if (this._interval) {
- clearInterval(this._interval);
- this._interval = null;
- }
-
- if (this._config.interval && !this._isPaused) {
- this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
- }
- }
- }, {
- key: 'to',
- value: function to(index) {
- var _this = this;
-
- this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
-
- var activeIndex = this._getItemIndex(this._activeElement);
-
- if (index > this._items.length - 1 || index < 0) {
- return;
- }
-
- if (this._isSliding) {
- $(this._element).one(Event.SLID, function () {
- return _this.to(index);
- });
- return;
- }
-
- if (activeIndex === index) {
- this.pause();
- this.cycle();
- return;
- }
-
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
-
- this._slide(direction, this._items[index]);
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $(this._element).off(EVENT_KEY);
- $.removeData(this._element, DATA_KEY);
-
- this._items = null;
- this._config = null;
- this._element = null;
- this._interval = null;
- this._isPaused = null;
- this._isSliding = null;
- this._activeElement = null;
- this._indicatorsElement = null;
- }
-
- // private
-
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- _Util['default'].typeCheckConfig(NAME, config, DefaultType);
- return config;
- }
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- if (this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
- }
-
- if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
- $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
- }
- }
- }, {
- key: '_keydown',
- value: function _keydown(event) {
- event.preventDefault();
-
- if (/input|textarea/i.test(event.target.tagName)) {
- return;
- }
-
- switch (event.which) {
- case 37:
- this.prev();break;
- case 39:
- this.next();break;
- default:
- return;
- }
- }
- }, {
- key: '_getItemIndex',
- value: function _getItemIndex(element) {
- this._items = $.makeArray($(element).parent().find(Selector.ITEM));
- return this._items.indexOf(element);
- }
- }, {
- key: '_getItemByDirection',
- value: function _getItemByDirection(direction, activeElement) {
- var isNextDirection = direction === Direction.NEXT;
- var isPrevDirection = direction === Direction.PREVIOUS;
- var activeIndex = this._getItemIndex(activeElement);
- var lastItemIndex = this._items.length - 1;
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
-
- if (isGoingToWrap && !this._config.wrap) {
- return activeElement;
- }
-
- var delta = direction === Direction.PREVIOUS ? -1 : 1;
- var itemIndex = (activeIndex + delta) % this._items.length;
-
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
- }
- }, {
- key: '_triggerSlideEvent',
- value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
- var slideEvent = $.Event(Event.SLIDE, {
- relatedTarget: relatedTarget,
- direction: directionalClassname
- });
-
- $(this._element).trigger(slideEvent);
-
- return slideEvent;
- }
- }, {
- key: '_setActiveIndicatorElement',
- value: function _setActiveIndicatorElement(element) {
- if (this._indicatorsElement) {
- $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
-
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
-
- if (nextIndicator) {
- $(nextIndicator).addClass(ClassName.ACTIVE);
- }
- }
- }
- }, {
- key: '_slide',
- value: function _slide(direction, element) {
- var _this2 = this;
-
- var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
-
- var isCycling = Boolean(this._interval);
-
- var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
-
- if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
- this._isSliding = false;
- return;
- }
-
- var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
- if (slideEvent.isDefaultPrevented()) {
- return;
- }
-
- if (!activeElement || !nextElement) {
- // some weirdness is happening, so we bail
- return;
- }
-
- this._isSliding = true;
-
- if (isCycling) {
- this.pause();
- }
-
- this._setActiveIndicatorElement(nextElement);
-
- var slidEvent = $.Event(Event.SLID, {
- relatedTarget: nextElement,
- direction: directionalClassName
- });
-
- if (_Util['default'].supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
-
- $(nextElement).addClass(direction);
-
- _Util['default'].reflow(nextElement);
-
- $(activeElement).addClass(directionalClassName);
- $(nextElement).addClass(directionalClassName);
-
- $(activeElement).one(_Util['default'].TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName).removeClass(direction);
-
- $(nextElement).addClass(ClassName.ACTIVE);
-
- $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
-
- _this2._isSliding = false;
-
- setTimeout(function () {
- return $(_this2._element).trigger(slidEvent);
- }, 0);
- }).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- $(activeElement).removeClass(ClassName.ACTIVE);
- $(nextElement).addClass(ClassName.ACTIVE);
-
- this._isSliding = false;
- $(this._element).trigger(slidEvent);
- }
-
- if (isCycling) {
- this.cycle();
- }
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = $.extend({}, Default, $(this).data());
-
- if (typeof config === 'object') {
- $.extend(_config, config);
- }
-
- var action = typeof config === 'string' ? config : _config.slide;
-
- if (!data) {
- data = new Carousel(this, _config);
- $(this).data(DATA_KEY, data);
- }
-
- if (typeof config === 'number') {
- data.to(config);
- } else if (typeof action === 'string') {
- if (data[action] === undefined) {
- throw new Error('No method named "' + action + '"');
- }
- data[action]();
- } else if (_config.interval) {
- data.pause();
- data.cycle();
- }
- });
- }
- }, {
- key: '_dataApiClickHandler',
- value: function _dataApiClickHandler(event) {
- var selector = _Util['default'].getSelectorFromElement(this);
-
- if (!selector) {
- return;
- }
-
- var target = $(selector)[0];
-
- if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
- return;
- }
-
- var config = $.extend({}, $(target).data(), $(this).data());
- var slideIndex = this.getAttribute('data-slide-to');
-
- if (slideIndex) {
- config.interval = false;
- }
-
- Carousel._jQueryInterface.call($(target), config);
-
- if (slideIndex) {
- $(target).data(DATA_KEY).to(slideIndex);
- }
-
- event.preventDefault();
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }]);
-
- return Carousel;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
-
- $(window).on(Event.LOAD_DATA_API, function () {
- $(Selector.DATA_RIDE).each(function () {
- var $carousel = $(this);
- Carousel._jQueryInterface.call($carousel, $carousel.data());
- });
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Carousel._jQueryInterface;
- $.fn[NAME].Constructor = Carousel;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Carousel._jQueryInterface;
- };
-
- return Carousel;
- })(jQuery);
-
- module.exports = Carousel;
-});
diff --git a/docs/dist/js/umd/collapse.js b/docs/dist/js/umd/collapse.js
deleted file mode 100644
index 8b2ae42d4..000000000
--- a/docs/dist/js/umd/collapse.js
+++ /dev/null
@@ -1,383 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.collapse = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): collapse.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Collapse = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'collapse';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.collapse';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 600;
-
- var Default = {
- toggle: true,
- parent: ''
- };
-
- var DefaultType = {
- toggle: 'boolean',
- parent: 'string'
- };
-
- var Event = {
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- IN: 'in',
- COLLAPSE: 'collapse',
- COLLAPSING: 'collapsing',
- COLLAPSED: 'collapsed'
- };
-
- var Dimension = {
- WIDTH: 'width',
- HEIGHT: 'height'
- };
-
- var Selector = {
- ACTIVES: '.panel > .in, .panel > .collapsing',
- DATA_TOGGLE: '[data-toggle="collapse"]'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Collapse = (function () {
- function Collapse(element, config) {
- _classCallCheck(this, Collapse);
-
- this._isTransitioning = false;
- this._element = element;
- this._config = this._getConfig(config);
- this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
-
- this._parent = this._config.parent ? this._getParent() : null;
-
- if (!this._config.parent) {
- this._addAriaAndCollapsedClass(this._element, this._triggerArray);
- }
-
- if (this._config.toggle) {
- this.toggle();
- }
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Collapse, [{
- key: 'toggle',
-
- // public
-
- value: function toggle() {
- if ($(this._element).hasClass(ClassName.IN)) {
- this.hide();
- } else {
- this.show();
- }
- }
- }, {
- key: 'show',
- value: function show() {
- var _this = this;
-
- if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
- return;
- }
-
- var actives = undefined;
- var activesData = undefined;
-
- if (this._parent) {
- actives = $.makeArray($(Selector.ACTIVES));
- if (!actives.length) {
- actives = null;
- }
- }
-
- if (actives) {
- activesData = $(actives).data(DATA_KEY);
- if (activesData && activesData._isTransitioning) {
- return;
- }
- }
-
- var startEvent = $.Event(Event.SHOW);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
- return;
- }
-
- if (actives) {
- Collapse._jQueryInterface.call($(actives), 'hide');
- if (!activesData) {
- $(actives).data(DATA_KEY, null);
- }
- }
-
- var dimension = this._getDimension();
-
- $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
-
- this._element.style[dimension] = 0;
- this._element.setAttribute('aria-expanded', true);
-
- if (this._triggerArray.length) {
- $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
- }
-
- this.setTransitioning(true);
-
- var complete = function complete() {
- $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
-
- _this._element.style[dimension] = '';
-
- _this.setTransitioning(false);
-
- $(_this._element).trigger(Event.SHOWN);
- };
-
- if (!_Util['default'].supportsTransitionEnd()) {
- complete();
- return;
- }
-
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = 'scroll' + capitalizedDimension;
-
- $(this._element).one(_Util['default'].TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
-
- this._element.style[dimension] = this._element[scrollSize] + 'px';
- }
- }, {
- key: 'hide',
- value: function hide() {
- var _this2 = this;
-
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
- return;
- }
-
- var startEvent = $.Event(Event.HIDE);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
- return;
- }
-
- var dimension = this._getDimension();
- var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
-
- this._element.style[dimension] = this._element[offsetDimension] + 'px';
-
- _Util['default'].reflow(this._element);
-
- $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
-
- this._element.setAttribute('aria-expanded', false);
-
- if (this._triggerArray.length) {
- $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
- }
-
- this.setTransitioning(true);
-
- var complete = function complete() {
- _this2.setTransitioning(false);
- $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
- };
-
- this._element.style[dimension] = 0;
-
- if (!_Util['default'].supportsTransitionEnd()) {
- complete();
- return;
- }
-
- $(this._element).one(_Util['default'].TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- }
- }, {
- key: 'setTransitioning',
- value: function setTransitioning(isTransitioning) {
- this._isTransitioning = isTransitioning;
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
-
- this._config = null;
- this._parent = null;
- this._element = null;
- this._triggerArray = null;
- this._isTransitioning = null;
- }
-
- // private
-
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- config.toggle = Boolean(config.toggle); // coerce string values
- _Util['default'].typeCheckConfig(NAME, config, DefaultType);
- return config;
- }
- }, {
- key: '_getDimension',
- value: function _getDimension() {
- var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
- return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
- }
- }, {
- key: '_getParent',
- value: function _getParent() {
- var _this3 = this;
-
- var parent = $(this._config.parent)[0];
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
-
- $(parent).find(selector).each(function (i, element) {
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
- });
-
- return parent;
- }
- }, {
- key: '_addAriaAndCollapsedClass',
- value: function _addAriaAndCollapsedClass(element, triggerArray) {
- if (element) {
- var isOpen = $(element).hasClass(ClassName.IN);
- element.setAttribute('aria-expanded', isOpen);
-
- if (triggerArray.length) {
- $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
- }
- }
- }
-
- // static
-
- }], [{
- key: '_getTargetFromElement',
- value: function _getTargetFromElement(element) {
- var selector = _Util['default'].getSelectorFromElement(element);
- return selector ? $(selector)[0] : null;
- }
- }, {
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
- var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
-
- if (!data && _config.toggle && /show|hide/.test(config)) {
- _config.toggle = false;
- }
-
- if (!data) {
- data = new Collapse(this, _config);
- $this.data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }]);
-
- return Collapse;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
- event.preventDefault();
-
- var target = Collapse._getTargetFromElement(this);
- var data = $(target).data(DATA_KEY);
- var config = data ? 'toggle' : $(this).data();
-
- Collapse._jQueryInterface.call($(target), config);
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Collapse._jQueryInterface;
- $.fn[NAME].Constructor = Collapse;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Collapse._jQueryInterface;
- };
-
- return Collapse;
- })(jQuery);
-
- module.exports = Collapse;
-});
diff --git a/docs/dist/js/umd/dropdown.js b/docs/dist/js/umd/dropdown.js
deleted file mode 100644
index 336faff27..000000000
--- a/docs/dist/js/umd/dropdown.js
+++ /dev/null
@@ -1,312 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.dropdown = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): dropdown.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Dropdown = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'dropdown';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.dropdown';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
-
- var Event = {
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- CLICK: 'click' + EVENT_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
- KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- BACKDROP: 'dropdown-backdrop',
- DISABLED: 'disabled',
- OPEN: 'open'
- };
-
- var Selector = {
- BACKDROP: '.dropdown-backdrop',
- DATA_TOGGLE: '[data-toggle="dropdown"]',
- FORM_CHILD: '.dropdown form',
- ROLE_MENU: '[role="menu"]',
- ROLE_LISTBOX: '[role="listbox"]',
- NAVBAR_NAV: '.navbar-nav',
- VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Dropdown = (function () {
- function Dropdown(element) {
- _classCallCheck(this, Dropdown);
-
- this._element = element;
-
- this._addEventListeners();
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Dropdown, [{
- key: 'toggle',
-
- // public
-
- value: function toggle() {
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
- return false;
- }
-
- var parent = Dropdown._getParentFromElement(this);
- var isActive = $(parent).hasClass(ClassName.OPEN);
-
- Dropdown._clearMenus();
-
- if (isActive) {
- return false;
- }
-
- if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
-
- // if mobile we use a backdrop because click events don't delegate
- var dropdown = document.createElement('div');
- dropdown.className = ClassName.BACKDROP;
- $(dropdown).insertBefore(this);
- $(dropdown).on('click', Dropdown._clearMenus);
- }
-
- var relatedTarget = { relatedTarget: this };
- var showEvent = $.Event(Event.SHOW, relatedTarget);
-
- $(parent).trigger(showEvent);
-
- if (showEvent.isDefaultPrevented()) {
- return false;
- }
-
- this.focus();
- this.setAttribute('aria-expanded', 'true');
-
- $(parent).toggleClass(ClassName.OPEN);
- $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
-
- return false;
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._element).off(EVENT_KEY);
- this._element = null;
- }
-
- // private
-
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- $(this._element).on(Event.CLICK, this.toggle);
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
-
- if (!data) {
- $(this).data(DATA_KEY, data = new Dropdown(this));
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config].call(this);
- }
- });
- }
- }, {
- key: '_clearMenus',
- value: function _clearMenus(event) {
- if (event && event.which === 3) {
- return;
- }
-
- var backdrop = $(Selector.BACKDROP)[0];
- if (backdrop) {
- backdrop.parentNode.removeChild(backdrop);
- }
-
- var toggles = $.makeArray($(Selector.DATA_TOGGLE));
-
- for (var i = 0; i < toggles.length; i++) {
- var _parent = Dropdown._getParentFromElement(toggles[i]);
- var relatedTarget = { relatedTarget: toggles[i] };
-
- if (!$(_parent).hasClass(ClassName.OPEN)) {
- continue;
- }
-
- if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) {
- continue;
- }
-
- var hideEvent = $.Event(Event.HIDE, relatedTarget);
- $(_parent).trigger(hideEvent);
- if (hideEvent.isDefaultPrevented()) {
- continue;
- }
-
- toggles[i].setAttribute('aria-expanded', 'false');
-
- $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
- }
- }
- }, {
- key: '_getParentFromElement',
- value: function _getParentFromElement(element) {
- var parent = undefined;
- var selector = _Util['default'].getSelectorFromElement(element);
-
- if (selector) {
- parent = $(selector)[0];
- }
-
- return parent || element.parentNode;
- }
- }, {
- key: '_dataApiKeydownHandler',
- value: function _dataApiKeydownHandler(event) {
- if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
- return;
- }
-
- event.preventDefault();
- event.stopPropagation();
-
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
- return;
- }
-
- var parent = Dropdown._getParentFromElement(this);
- var isActive = $(parent).hasClass(ClassName.OPEN);
-
- if (!isActive && event.which !== 27 || isActive && event.which === 27) {
-
- if (event.which === 27) {
- var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
- $(toggle).trigger('focus');
- }
-
- $(this).trigger('click');
- return;
- }
-
- var items = $.makeArray($(Selector.VISIBLE_ITEMS));
-
- items = items.filter(function (item) {
- return item.offsetWidth || item.offsetHeight;
- });
-
- if (!items.length) {
- return;
- }
-
- var index = items.indexOf(event.target);
-
- if (event.which === 38 && index > 0) {
- // up
- index--;
- }
-
- if (event.which === 40 && index < items.length - 1) {
- // down
- index++;
- }
-
- if (index < 0) {
- index = 0;
- }
-
- items[index].focus();
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Dropdown;
- })();
-
- $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
- e.stopPropagation();
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Dropdown._jQueryInterface;
- $.fn[NAME].Constructor = Dropdown;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Dropdown._jQueryInterface;
- };
-
- return Dropdown;
- })(jQuery);
-
- module.exports = Dropdown;
-});
diff --git a/docs/dist/js/umd/modal.js b/docs/dist/js/umd/modal.js
deleted file mode 100644
index 93db6f0cb..000000000
--- a/docs/dist/js/umd/modal.js
+++ /dev/null
@@ -1,549 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.modal = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): modal.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Modal = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'modal';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.modal';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 300;
- var BACKDROP_TRANSITION_DURATION = 150;
-
- var Default = {
- backdrop: true,
- keyboard: true,
- focus: true,
- show: true
- };
-
- var DefaultType = {
- backdrop: '(boolean|string)',
- keyboard: 'boolean',
- focus: 'boolean',
- show: 'boolean'
- };
-
- var Event = {
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- FOCUSIN: 'focusin' + EVENT_KEY,
- RESIZE: 'resize' + EVENT_KEY,
- CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,
- KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,
- MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,
- MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
- BACKDROP: 'modal-backdrop',
- OPEN: 'modal-open',
- FADE: 'fade',
- IN: 'in'
- };
-
- var Selector = {
- DIALOG: '.modal-dialog',
- DATA_TOGGLE: '[data-toggle="modal"]',
- DATA_DISMISS: '[data-dismiss="modal"]',
- FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Modal = (function () {
- function Modal(element, config) {
- _classCallCheck(this, Modal);
-
- this._config = this._getConfig(config);
- this._element = element;
- this._dialog = $(element).find(Selector.DIALOG)[0];
- this._backdrop = null;
- this._isShown = false;
- this._isBodyOverflowing = false;
- this._ignoreBackdropClick = false;
- this._originalBodyPadding = 0;
- this._scrollbarWidth = 0;
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Modal, [{
- key: 'toggle',
-
- // public
-
- value: function toggle(relatedTarget) {
- return this._isShown ? this.hide() : this.show(relatedTarget);
- }
- }, {
- key: 'show',
- value: function show(relatedTarget) {
- var _this = this;
-
- var showEvent = $.Event(Event.SHOW, {
- relatedTarget: relatedTarget
- });
-
- $(this._element).trigger(showEvent);
-
- if (this._isShown || showEvent.isDefaultPrevented()) {
- return;
- }
-
- this._isShown = true;
-
- this._checkScrollbar();
- this._setScrollbar();
-
- $(document.body).addClass(ClassName.OPEN);
-
- this._setEscapeEvent();
- this._setResizeEvent();
-
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
-
- $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
- $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
- if ($(event.target).is(_this._element)) {
- _this._ignoreBackdropClick = true;
- }
- });
- });
-
- this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
- }
- }, {
- key: 'hide',
- value: function hide(event) {
- if (event) {
- event.preventDefault();
- }
-
- var hideEvent = $.Event(Event.HIDE);
-
- $(this._element).trigger(hideEvent);
-
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
- return;
- }
-
- this._isShown = false;
-
- this._setEscapeEvent();
- this._setResizeEvent();
-
- $(document).off(Event.FOCUSIN);
-
- $(this._element).removeClass(ClassName.IN);
-
- $(this._element).off(Event.CLICK_DISMISS);
- $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
-
- if (_Util['default'].supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
-
- $(this._element).one(_Util['default'].TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- this._hideModal();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
-
- $(window).off(EVENT_KEY);
- $(document).off(EVENT_KEY);
- $(this._element).off(EVENT_KEY);
- $(this._backdrop).off(EVENT_KEY);
-
- this._config = null;
- this._element = null;
- this._dialog = null;
- this._backdrop = null;
- this._isShown = null;
- this._isBodyOverflowing = null;
- this._ignoreBackdropClick = null;
- this._originalBodyPadding = null;
- this._scrollbarWidth = null;
- }
-
- // private
-
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- _Util['default'].typeCheckConfig(NAME, config, DefaultType);
- return config;
- }
- }, {
- key: '_showElement',
- value: function _showElement(relatedTarget) {
- var _this2 = this;
-
- var transition = _Util['default'].supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
-
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
- // don't move modals dom position
- document.body.appendChild(this._element);
- }
-
- this._element.style.display = 'block';
- this._element.scrollTop = 0;
-
- if (transition) {
- _Util['default'].reflow(this._element);
- }
-
- $(this._element).addClass(ClassName.IN);
-
- if (this._config.focus) {
- this._enforceFocus();
- }
-
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: relatedTarget
- });
-
- var transitionComplete = function transitionComplete() {
- if (_this2._config.focus) {
- _this2._element.focus();
- }
- $(_this2._element).trigger(shownEvent);
- };
-
- if (transition) {
- $(this._dialog).one(_Util['default'].TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- transitionComplete();
- }
- }
- }, {
- key: '_enforceFocus',
- value: function _enforceFocus() {
- var _this3 = this;
-
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
- .on(Event.FOCUSIN, function (event) {
- if (document !== event.target && _this3._element !== event.target && !$(_this3._element).has(event.target).length) {
- _this3._element.focus();
- }
- });
- }
- }, {
- key: '_setEscapeEvent',
- value: function _setEscapeEvent() {
- var _this4 = this;
-
- if (this._isShown && this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
- if (event.which === 27) {
- _this4.hide();
- }
- });
- } else if (!this._isShown) {
- $(this._element).off(Event.KEYDOWN_DISMISS);
- }
- }
- }, {
- key: '_setResizeEvent',
- value: function _setResizeEvent() {
- if (this._isShown) {
- $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
- } else {
- $(window).off(Event.RESIZE);
- }
- }
- }, {
- key: '_hideModal',
- value: function _hideModal() {
- var _this5 = this;
-
- this._element.style.display = 'none';
- this._showBackdrop(function () {
- $(document.body).removeClass(ClassName.OPEN);
- _this5._resetAdjustments();
- _this5._resetScrollbar();
- $(_this5._element).trigger(Event.HIDDEN);
- });
- }
- }, {
- key: '_removeBackdrop',
- value: function _removeBackdrop() {
- if (this._backdrop) {
- $(this._backdrop).remove();
- this._backdrop = null;
- }
- }
- }, {
- key: '_showBackdrop',
- value: function _showBackdrop(callback) {
- var _this6 = this;
-
- var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
-
- if (this._isShown && this._config.backdrop) {
- var doAnimate = _Util['default'].supportsTransitionEnd() && animate;
-
- this._backdrop = document.createElement('div');
- this._backdrop.className = ClassName.BACKDROP;
-
- if (animate) {
- $(this._backdrop).addClass(animate);
- }
-
- $(this._backdrop).appendTo(document.body);
-
- $(this._element).on(Event.CLICK_DISMISS, function (event) {
- if (_this6._ignoreBackdropClick) {
- _this6._ignoreBackdropClick = false;
- return;
- }
- if (event.target !== event.currentTarget) {
- return;
- }
- if (_this6._config.backdrop === 'static') {
- _this6._element.focus();
- } else {
- _this6.hide();
- }
- });
-
- if (doAnimate) {
- _Util['default'].reflow(this._backdrop);
- }
-
- $(this._backdrop).addClass(ClassName.IN);
-
- if (!callback) {
- return;
- }
-
- if (!doAnimate) {
- callback();
- return;
- }
-
- $(this._backdrop).one(_Util['default'].TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
- } else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(ClassName.IN);
-
- var callbackRemove = function callbackRemove() {
- _this6._removeBackdrop();
- if (callback) {
- callback();
- }
- };
-
- if (_Util['default'].supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
- $(this._backdrop).one(_Util['default'].TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
- } else {
- callbackRemove();
- }
- } else if (callback) {
- callback();
- }
- }
-
- // ----------------------------------------------------------------------
- // the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
- // ----------------------------------------------------------------------
-
- }, {
- key: '_handleUpdate',
- value: function _handleUpdate() {
- this._adjustDialog();
- }
- }, {
- key: '_adjustDialog',
- value: function _adjustDialog() {
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
-
- if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
- }
-
- if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = this._scrollbarWidth + 'px~';
- }
- }
- }, {
- key: '_resetAdjustments',
- value: function _resetAdjustments() {
- this._element.style.paddingLeft = '';
- this._element.style.paddingRight = '';
- }
- }, {
- key: '_checkScrollbar',
- value: function _checkScrollbar() {
- this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
- this._scrollbarWidth = this._getScrollbarWidth();
- }
- }, {
- key: '_setScrollbar',
- value: function _setScrollbar() {
- var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
-
- this._originalBodyPadding = document.body.style.paddingRight || '';
-
- if (this._isBodyOverflowing) {
- document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
- }
- }
- }, {
- key: '_resetScrollbar',
- value: function _resetScrollbar() {
- document.body.style.paddingRight = this._originalBodyPadding;
- }
- }, {
- key: '_getScrollbarWidth',
- value: function _getScrollbarWidth() {
- // thx d.walsh
- var scrollDiv = document.createElement('div');
- scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
- document.body.appendChild(scrollDiv);
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
- document.body.removeChild(scrollDiv);
- return scrollbarWidth;
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config, relatedTarget) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
-
- if (!data) {
- data = new Modal(this, _config);
- $(this).data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config](relatedTarget);
- } else if (_config.show) {
- data.show(relatedTarget);
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }]);
-
- return Modal;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
- var _this7 = this;
-
- var target = undefined;
- var selector = _Util['default'].getSelectorFromElement(this);
-
- if (selector) {
- target = $(selector)[0];
- }
-
- var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
-
- if (this.tagName === 'A') {
- event.preventDefault();
- }
-
- var $target = $(target).one(Event.SHOW, function (showEvent) {
- if (showEvent.isDefaultPrevented()) {
- // only register focus restorer if modal will actually get shown
- return;
- }
-
- $target.one(Event.HIDDEN, function () {
- if ($(_this7).is(':visible')) {
- _this7.focus();
- }
- });
- });
-
- Modal._jQueryInterface.call($(target), config, this);
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Modal._jQueryInterface;
- $.fn[NAME].Constructor = Modal;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Modal._jQueryInterface;
- };
-
- return Modal;
- })(jQuery);
-
- module.exports = Modal;
-});
diff --git a/docs/dist/js/umd/popover.js b/docs/dist/js/umd/popover.js
deleted file mode 100644
index 000228016..000000000
--- a/docs/dist/js/umd/popover.js
+++ /dev/null
@@ -1,220 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './tooltip'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./tooltip'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Tooltip);
- global.popover = mod.exports;
- }
-})(this, function (exports, module, _tooltip) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
- var _Tooltip2 = _interopRequireDefault(_tooltip);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): popover.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Popover = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'popover';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.popover';
- var EVENT_KEY = '.' + DATA_KEY;
- var JQUERY_NO_CONFLICT = $.fn[NAME];
-
- var Default = $.extend({}, _Tooltip2['default'].Default, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
- });
-
- var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, {
- content: '(string|element|function)'
- });
-
- var ClassName = {
- FADE: 'fade',
- IN: 'in'
- };
-
- var Selector = {
- TITLE: '.popover-title',
- CONTENT: '.popover-content',
- ARROW: '.popover-arrow'
- };
-
- var Event = {
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- INSERTED: 'inserted' + EVENT_KEY,
- CLICK: 'click' + EVENT_KEY,
- FOCUSIN: 'focusin' + EVENT_KEY,
- FOCUSOUT: 'focusout' + EVENT_KEY,
- MOUSEENTER: 'mouseenter' + EVENT_KEY,
- MOUSELEAVE: 'mouseleave' + EVENT_KEY
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Popover = (function (_Tooltip) {
- _inherits(Popover, _Tooltip);
-
- function Popover() {
- _classCallCheck(this, Popover);
-
- _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
- }
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- _createClass(Popover, [{
- key: 'isWithContent',
-
- // overrides
-
- value: function isWithContent() {
- return this.getTitle() || this._getContent();
- }
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- return this.tip = this.tip || $(this.config.template)[0];
- }
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
-
- // we use append for html objects to maintain js events
- this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
- this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
-
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
-
- this.cleanupTether();
- }
-
- // private
-
- }, {
- key: '_getContent',
- value: function _getContent() {
- return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' ? config : null;
-
- if (!data && /destroy|hide/.test(config)) {
- return;
- }
-
- if (!data) {
- data = new Popover(this, _config);
- $(this).data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
-
- // getters
-
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }, {
- key: 'NAME',
- get: function get() {
- return NAME;
- }
- }, {
- key: 'DATA_KEY',
- get: function get() {
- return DATA_KEY;
- }
- }, {
- key: 'Event',
- get: function get() {
- return Event;
- }
- }, {
- key: 'EVENT_KEY',
- get: function get() {
- return EVENT_KEY;
- }
- }, {
- key: 'DefaultType',
- get: function get() {
- return DefaultType;
- }
- }]);
-
- return Popover;
- })(_Tooltip2['default']);
-
- $.fn[NAME] = Popover._jQueryInterface;
- $.fn[NAME].Constructor = Popover;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Popover._jQueryInterface;
- };
-
- return Popover;
- })(jQuery);
-
- module.exports = Popover;
-});
diff --git a/docs/dist/js/umd/scrollspy.js b/docs/dist/js/umd/scrollspy.js
deleted file mode 100644
index 24f6d88d5..000000000
--- a/docs/dist/js/umd/scrollspy.js
+++ /dev/null
@@ -1,339 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.scrollspy = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): scrollspy.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var ScrollSpy = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'scrollspy';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.scrollspy';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
-
- var Default = {
- offset: 10,
- method: 'auto',
- target: ''
- };
-
- var DefaultType = {
- offset: 'number',
- method: 'string',
- target: '(string|element)'
- };
-
- var Event = {
- ACTIVATE: 'activate' + EVENT_KEY,
- SCROLL: 'scroll' + EVENT_KEY,
- LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- DROPDOWN_ITEM: 'dropdown-item',
- DROPDOWN_MENU: 'dropdown-menu',
- NAV_LINK: 'nav-link',
- NAV: 'nav',
- ACTIVE: 'active'
- };
-
- var Selector = {
- DATA_SPY: '[data-spy="scroll"]',
- ACTIVE: '.active',
- LIST_ITEM: '.list-item',
- LI: 'li',
- LI_DROPDOWN: 'li.dropdown',
- NAV_LINKS: '.nav-link',
- DROPDOWN: '.dropdown',
- DROPDOWN_ITEMS: '.dropdown-item',
- DROPDOWN_TOGGLE: '.dropdown-toggle'
- };
-
- var OffsetMethod = {
- OFFSET: 'offset',
- POSITION: 'position'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var ScrollSpy = (function () {
- function ScrollSpy(element, config) {
- _classCallCheck(this, ScrollSpy);
-
- this._element = element;
- this._scrollElement = element.tagName === 'BODY' ? window : element;
- this._config = this._getConfig(config);
- this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);
- this._offsets = [];
- this._targets = [];
- this._activeTarget = null;
- this._scrollHeight = 0;
-
- $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));
-
- this.refresh();
- this._process();
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(ScrollSpy, [{
- key: 'refresh',
-
- // public
-
- value: function refresh() {
- var _this = this;
-
- var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
-
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
-
- var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
-
- this._offsets = [];
- this._targets = [];
-
- this._scrollHeight = this._getScrollHeight();
-
- var targets = $.makeArray($(this._selector));
-
- targets.map(function (element) {
- var target = undefined;
- var targetSelector = _Util['default'].getSelectorFromElement(element);
-
- if (targetSelector) {
- target = $(targetSelector)[0];
- }
-
- if (target && (target.offsetWidth || target.offsetHeight)) {
- // todo (fat): remove sketch reliance on jQuery position/offset
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
- }
- }).filter(function (item) {
- return item;
- }).sort(function (a, b) {
- return a[0] - b[0];
- }).forEach(function (item) {
- _this._offsets.push(item[0]);
- _this._targets.push(item[1]);
- });
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._scrollElement).off(EVENT_KEY);
-
- this._element = null;
- this._scrollElement = null;
- this._config = null;
- this._selector = null;
- this._offsets = null;
- this._targets = null;
- this._activeTarget = null;
- this._scrollHeight = null;
- }
-
- // private
-
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
-
- if (typeof config.target !== 'string') {
- var id = $(config.target).attr('id');
- if (!id) {
- id = _Util['default'].getUID(NAME);
- $(config.target).attr('id', id);
- }
- config.target = '#' + id;
- }
-
- _Util['default'].typeCheckConfig(NAME, config, DefaultType);
-
- return config;
- }
- }, {
- key: '_getScrollTop',
- value: function _getScrollTop() {
- return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
- }
- }, {
- key: '_getScrollHeight',
- value: function _getScrollHeight() {
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
- }
- }, {
- key: '_process',
- value: function _process() {
- var scrollTop = this._getScrollTop() + this._config.offset;
- var scrollHeight = this._getScrollHeight();
- var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
-
- if (this._scrollHeight !== scrollHeight) {
- this.refresh();
- }
-
- if (scrollTop >= maxScroll) {
- var target = this._targets[this._targets.length - 1];
-
- if (this._activeTarget !== target) {
- this._activate(target);
- }
- }
-
- if (this._activeTarget && scrollTop < this._offsets[0]) {
- this._activeTarget = null;
- this._clear();
- return;
- }
-
- for (var i = this._offsets.length; i--;) {
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
-
- if (isActiveTarget) {
- this._activate(this._targets[i]);
- }
- }
- }
- }, {
- key: '_activate',
- value: function _activate(target) {
- this._activeTarget = target;
-
- this._clear();
-
- var queries = this._selector.split(',');
- queries = queries.map(function (selector) {
- return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
- });
-
- var $link = $(queries.join(','));
-
- if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
- $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
- $link.addClass(ClassName.ACTIVE);
- } else {
- // todo (fat) this is kinda sus...
- // recursively add actives to tested nav-links
- $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
- }
-
- $(this._scrollElement).trigger(Event.ACTIVATE, {
- relatedTarget: target
- });
- }
- }, {
- key: '_clear',
- value: function _clear() {
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' && config || null;
-
- if (!data) {
- data = new ScrollSpy(this, _config);
- $(this).data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }]);
-
- return ScrollSpy;
- })();
-
- $(window).on(Event.LOAD_DATA_API, function () {
- var scrollSpys = $.makeArray($(Selector.DATA_SPY));
-
- for (var i = scrollSpys.length; i--;) {
- var $spy = $(scrollSpys[i]);
- ScrollSpy._jQueryInterface.call($spy, $spy.data());
- }
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = ScrollSpy._jQueryInterface;
- $.fn[NAME].Constructor = ScrollSpy;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return ScrollSpy._jQueryInterface;
- };
-
- return ScrollSpy;
- })(jQuery);
-
- module.exports = ScrollSpy;
-});
diff --git a/docs/dist/js/umd/tab.js b/docs/dist/js/umd/tab.js
deleted file mode 100644
index ad768e66d..000000000
--- a/docs/dist/js/umd/tab.js
+++ /dev/null
@@ -1,282 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.tab = mod.exports;
- }
-})(this, function (exports, module, _util) {
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): tab.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Tab = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'tab';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.tab';
- var EVENT_KEY = '.' + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 150;
-
- var Event = {
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
- };
-
- var ClassName = {
- DROPDOWN_MENU: 'dropdown-menu',
- ACTIVE: 'active',
- FADE: 'fade',
- IN: 'in'
- };
-
- var Selector = {
- A: 'a',
- LI: 'li',
- DROPDOWN: '.dropdown',
- UL: 'ul:not(.dropdown-menu)',
- FADE_CHILD: '> .nav-item .fade, > .fade',
- ACTIVE: '.active',
- ACTIVE_CHILD: '> .nav-item > .active, > .active',
- DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]',
- DROPDOWN_TOGGLE: '.dropdown-toggle',
- DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Tab = (function () {
- function Tab(element) {
- _classCallCheck(this, Tab);
-
- this._element = element;
- }
-
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Tab, [{
- key: 'show',
-
- // public
-
- value: function show() {
- var _this = this;
-
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
- return;
- }
-
- var target = undefined;
- var previous = undefined;
- var ulElement = $(this._element).closest(Selector.UL)[0];
- var selector = _Util['default'].getSelectorFromElement(this._element);
-
- if (ulElement) {
- previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
- previous = previous[previous.length - 1];
- }
-
- var hideEvent = $.Event(Event.HIDE, {
- relatedTarget: this._element
- });
-
- var showEvent = $.Event(Event.SHOW, {
- relatedTarget: previous
- });
-
- if (previous) {
- $(previous).trigger(hideEvent);
- }
-
- $(this._element).trigger(showEvent);
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
- return;
- }
-
- if (selector) {
- target = $(selector)[0];
- }
-
- this._activate(this._element, ulElement);
-
- var complete = function complete() {
- var hiddenEvent = $.Event(Event.HIDDEN, {
- relatedTarget: _this._element
- });
-
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: previous
- });
-
- $(previous).trigger(hiddenEvent);
- $(_this._element).trigger(shownEvent);
- };
-
- if (target) {
- this._activate(target, target.parentNode, complete);
- } else {
- complete();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeClass(this._element, DATA_KEY);
- this._element = null;
- }
-
- // private
-
- }, {
- key: '_activate',
- value: function _activate(element, container, callback) {
- var active = $(container).find(Selector.ACTIVE_CHILD)[0];
- var isTransitioning = callback && _Util['default'].supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
-
- var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
-
- if (active && isTransitioning) {
- $(active).one(_Util['default'].TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- complete();
- }
-
- if (active) {
- $(active).removeClass(ClassName.IN);
- }
- }
- }, {
- key: '_transitionComplete',
- value: function _transitionComplete(element, active, isTransitioning, callback) {
- if (active) {
- $(active).removeClass(ClassName.ACTIVE);
-
- var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
-
- if (dropdownChild) {
- $(dropdownChild).removeClass(ClassName.ACTIVE);
- }
-
- active.setAttribute('aria-expanded', false);
- }
-
- $(element).addClass(ClassName.ACTIVE);
- element.setAttribute('aria-expanded', true);
-
- if (isTransitioning) {
- _Util['default'].reflow(element);
- $(element).addClass(ClassName.IN);
- } else {
- $(element).removeClass(ClassName.FADE);
- }
-
- if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
-
- var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
- if (dropdownElement) {
- $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
- }
-
- element.setAttribute('aria-expanded', true);
- }
-
- if (callback) {
- callback();
- }
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
-
- if (!data) {
- data = data = new Tab(this);
- $this.data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Tab;
- })();
-
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
- event.preventDefault();
- Tab._jQueryInterface.call($(this), 'show');
- });
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $.fn[NAME] = Tab._jQueryInterface;
- $.fn[NAME].Constructor = Tab;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Tab._jQueryInterface;
- };
-
- return Tab;
- })(jQuery);
-
- module.exports = Tab;
-});
diff --git a/docs/dist/js/umd/tooltip.js b/docs/dist/js/umd/tooltip.js
deleted file mode 100644
index a1527add1..000000000
--- a/docs/dist/js/umd/tooltip.js
+++ /dev/null
@@ -1,638 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module', './util'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module, require('./util'));
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod, global.Util);
- global.tooltip = mod.exports;
- }
-})(this, function (exports, module, _util) {
- /* global Tether */
-
- 'use strict';
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- var _Util = _interopRequireDefault(_util);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): tooltip.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- var Tooltip = (function ($) {
-
- /**
- * Check for Tether dependency
- * Tether - http://github.hubspot.com/tether/
- */
- if (window.Tether === undefined) {
- throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
- }
-
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
-
- var NAME = 'tooltip';
- var VERSION = '4.0.0-alpha.2';
- var DATA_KEY = 'bs.tooltip';
- var EVENT_KEY = '.' + DATA_KEY;
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var TRANSITION_DURATION = 150;
- var CLASS_PREFIX = 'bs-tether';
-
- var Default = {
- animation: true,
- template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- selector: false,
- placement: 'top',
- offset: '0 0',
- constraints: []
- };
-
- var DefaultType = {
- animation: 'boolean',
- template: 'string',
- title: '(string|element|function)',
- trigger: 'string',
- delay: '(number|object)',
- html: 'boolean',
- selector: '(string|boolean)',
- placement: '(string|function)',
- offset: 'string',
- constraints: 'array'
- };
-
- var AttachmentMap = {
- TOP: 'bottom center',
- RIGHT: 'middle left',
- BOTTOM: 'top center',
- LEFT: 'middle right'
- };
-
- var HoverState = {
- IN: 'in',
- OUT: 'out'
- };
-
- var Event = {
- HIDE: 'hide' + EVENT_KEY,
- HIDDEN: 'hidden' + EVENT_KEY,
- SHOW: 'show' + EVENT_KEY,
- SHOWN: 'shown' + EVENT_KEY,
- INSERTED: 'inserted' + EVENT_KEY,
- CLICK: 'click' + EVENT_KEY,
- FOCUSIN: 'focusin' + EVENT_KEY,
- FOCUSOUT: 'focusout' + EVENT_KEY,
- MOUSEENTER: 'mouseenter' + EVENT_KEY,
- MOUSELEAVE: 'mouseleave' + EVENT_KEY
- };
-
- var ClassName = {
- FADE: 'fade',
- IN: 'in'
- };
-
- var Selector = {
- TOOLTIP: '.tooltip',
- TOOLTIP_INNER: '.tooltip-inner'
- };
-
- var TetherClass = {
- element: false,
- enabled: false
- };
-
- var Trigger = {
- HOVER: 'hover',
- FOCUS: 'focus',
- CLICK: 'click',
- MANUAL: 'manual'
- };
-
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
- var Tooltip = (function () {
- function Tooltip(element, config) {
- _classCallCheck(this, Tooltip);
-
- // private
- this._isEnabled = true;
- this._timeout = 0;
- this._hoverState = '';
- this._activeTrigger = {};
- this._tether = null;
-
- // protected
- this.element = element;
- this.config = this._getConfig(config);
- this.tip = null;
-
- this._setListeners();
- }
-
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- // getters
-
- _createClass(Tooltip, [{
- key: 'enable',
-
- // public
-
- value: function enable() {
- this._isEnabled = true;
- }
- }, {
- key: 'disable',
- value: function disable() {
- this._isEnabled = false;
- }
- }, {
- key: 'toggleEnabled',
- value: function toggleEnabled() {
- this._isEnabled = !this._isEnabled;
- }
- }, {
- key: 'toggle',
- value: function toggle(event) {
- if (event) {
- var dataKey = this.constructor.DATA_KEY;
- var context = $(event.currentTarget).data(dataKey);
-
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
-
- context._activeTrigger.click = !context._activeTrigger.click;
-
- if (context._isWithActiveTrigger()) {
- context._enter(null, context);
- } else {
- context._leave(null, context);
- }
- } else {
-
- if ($(this.getTipElement()).hasClass(ClassName.IN)) {
- this._leave(null, this);
- return;
- }
-
- this._enter(null, this);
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- clearTimeout(this._timeout);
-
- this.cleanupTether();
-
- $.removeData(this.element, this.constructor.DATA_KEY);
-
- $(this.element).off(this.constructor.EVENT_KEY);
-
- if (this.tip) {
- $(this.tip).remove();
- }
-
- this._isEnabled = null;
- this._timeout = null;
- this._hoverState = null;
- this._activeTrigger = null;
- this._tether = null;
-
- this.element = null;
- this.config = null;
- this.tip = null;
- }
- }, {
- key: 'show',
- value: function show() {
- var _this = this;
-
- var showEvent = $.Event(this.constructor.Event.SHOW);
-
- if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent);
-
- var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
-
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
- return;
- }
-
- var tip = this.getTipElement();
- var tipId = _Util['default'].getUID(this.constructor.NAME);
-
- tip.setAttribute('id', tipId);
- this.element.setAttribute('aria-describedby', tipId);
-
- this.setContent();
-
- if (this.config.animation) {
- $(tip).addClass(ClassName.FADE);
- }
-
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
-
- var attachment = this._getAttachment(placement);
-
- $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
-
- $(this.element).trigger(this.constructor.Event.INSERTED);
-
- this._tether = new Tether({
- attachment: attachment,
- element: tip,
- target: this.element,
- classes: TetherClass,
- classPrefix: CLASS_PREFIX,
- offset: this.config.offset,
- constraints: this.config.constraints,
- addTargetClasses: false
- });
-
- _Util['default'].reflow(tip);
- this._tether.position();
-
- $(tip).addClass(ClassName.IN);
-
- var complete = function complete() {
- var prevHoverState = _this._hoverState;
- _this._hoverState = null;
-
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
-
- if (prevHoverState === HoverState.OUT) {
- _this._leave(null, _this);
- }
- };
-
- if (_Util['default'].supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
- $(this.tip).one(_Util['default'].TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
- return;
- }
-
- complete();
- }
- }
- }, {
- key: 'hide',
- value: function hide(callback) {
- var _this2 = this;
-
- var tip = this.getTipElement();
- var hideEvent = $.Event(this.constructor.Event.HIDE);
- var complete = function complete() {
- if (_this2._hoverState !== HoverState.IN && tip.parentNode) {
- tip.parentNode.removeChild(tip);
- }
-
- _this2.element.removeAttribute('aria-describedby');
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
- _this2.cleanupTether();
-
- if (callback) {
- callback();
- }
- };
-
- $(this.element).trigger(hideEvent);
-
- if (hideEvent.isDefaultPrevented()) {
- return;
- }
-
- $(tip).removeClass(ClassName.IN);
-
- if (_Util['default'].supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
-
- $(tip).one(_Util['default'].TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- complete();
- }
-
- this._hoverState = '';
- }
-
- // protected
-
- }, {
- key: 'isWithContent',
- value: function isWithContent() {
- return Boolean(this.getTitle());
- }
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- return this.tip = this.tip || $(this.config.template)[0];
- }
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
-
- this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
-
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
-
- this.cleanupTether();
- }
- }, {
- key: 'setElementContent',
- value: function setElementContent($element, content) {
- var html = this.config.html;
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // content is a DOM node or a jQuery
- if (html) {
- if (!$(content).parent().is($element)) {
- $element.empty().append(content);
- }
- } else {
- $element.text($(content).text());
- }
- } else {
- $element[html ? 'html' : 'text'](content);
- }
- }
- }, {
- key: 'getTitle',
- value: function getTitle() {
- var title = this.element.getAttribute('data-original-title');
-
- if (!title) {
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
- }
-
- return title;
- }
- }, {
- key: 'cleanupTether',
- value: function cleanupTether() {
- if (this._tether) {
- this._tether.destroy();
- }
- }
-
- // private
-
- }, {
- key: '_getAttachment',
- value: function _getAttachment(placement) {
- return AttachmentMap[placement.toUpperCase()];
- }
- }, {
- key: '_setListeners',
- value: function _setListeners() {
- var _this3 = this;
-
- var triggers = this.config.trigger.split(' ');
-
- triggers.forEach(function (trigger) {
- if (trigger === 'click') {
- $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3));
- } else if (trigger !== Trigger.MANUAL) {
- var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
- var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
-
- $(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3));
- }
- });
-
- if (this.config.selector) {
- this.config = $.extend({}, this.config, {
- trigger: 'manual',
- selector: ''
- });
- } else {
- this._fixTitle();
- }
- }
- }, {
- key: '_fixTitle',
- value: function _fixTitle() {
- var titleType = typeof this.element.getAttribute('data-original-title');
- if (this.element.getAttribute('title') || titleType !== 'string') {
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
- this.element.setAttribute('title', '');
- }
- }
- }, {
- key: '_enter',
- value: function _enter(event, context) {
- var dataKey = this.constructor.DATA_KEY;
-
- context = context || $(event.currentTarget).data(dataKey);
-
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
-
- if (event) {
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
- }
-
- if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
- context._hoverState = HoverState.IN;
- return;
- }
-
- clearTimeout(context._timeout);
-
- context._hoverState = HoverState.IN;
-
- if (!context.config.delay || !context.config.delay.show) {
- context.show();
- return;
- }
-
- context._timeout = setTimeout(function () {
- if (context._hoverState === HoverState.IN) {
- context.show();
- }
- }, context.config.delay.show);
- }
- }, {
- key: '_leave',
- value: function _leave(event, context) {
- var dataKey = this.constructor.DATA_KEY;
-
- context = context || $(event.currentTarget).data(dataKey);
-
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
-
- if (event) {
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
- }
-
- if (context._isWithActiveTrigger()) {
- return;
- }
-
- clearTimeout(context._timeout);
-
- context._hoverState = HoverState.OUT;
-
- if (!context.config.delay || !context.config.delay.hide) {
- context.hide();
- return;
- }
-
- context._timeout = setTimeout(function () {
- if (context._hoverState === HoverState.OUT) {
- context.hide();
- }
- }, context.config.delay.hide);
- }
- }, {
- key: '_isWithActiveTrigger',
- value: function _isWithActiveTrigger() {
- for (var trigger in this._activeTrigger) {
- if (this._activeTrigger[trigger]) {
- return true;
- }
- }
-
- return false;
- }
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
-
- if (config.delay && typeof config.delay === 'number') {
- config.delay = {
- show: config.delay,
- hide: config.delay
- };
- }
-
- _Util['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
-
- return config;
- }
- }, {
- key: '_getDelegateConfig',
- value: function _getDelegateConfig() {
- var config = {};
-
- if (this.config) {
- for (var key in this.config) {
- if (this.constructor.Default[key] !== this.config[key]) {
- config[key] = this.config[key];
- }
- }
- }
-
- return config;
- }
-
- // static
-
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = typeof config === 'object' ? config : null;
-
- if (!data && /destroy|hide/.test(config)) {
- return;
- }
-
- if (!data) {
- data = new Tooltip(this, _config);
- $(this).data(DATA_KEY, data);
- }
-
- if (typeof config === 'string') {
- if (data[config] === undefined) {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
- get: function get() {
- return VERSION;
- }
- }, {
- key: 'Default',
- get: function get() {
- return Default;
- }
- }, {
- key: 'NAME',
- get: function get() {
- return NAME;
- }
- }, {
- key: 'DATA_KEY',
- get: function get() {
- return DATA_KEY;
- }
- }, {
- key: 'Event',
- get: function get() {
- return Event;
- }
- }, {
- key: 'EVENT_KEY',
- get: function get() {
- return EVENT_KEY;
- }
- }, {
- key: 'DefaultType',
- get: function get() {
- return DefaultType;
- }
- }]);
-
- return Tooltip;
- })();
-
- $.fn[NAME] = Tooltip._jQueryInterface;
- $.fn[NAME].Constructor = Tooltip;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Tooltip._jQueryInterface;
- };
-
- return Tooltip;
- })(jQuery);
-
- module.exports = Tooltip;
-});
diff --git a/docs/dist/js/umd/util.js b/docs/dist/js/umd/util.js
deleted file mode 100644
index 99dcaaf6d..000000000
--- a/docs/dist/js/umd/util.js
+++ /dev/null
@@ -1,174 +0,0 @@
-(function (global, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['exports', 'module'], factory);
- } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
- factory(exports, module);
- } else {
- var mod = {
- exports: {}
- };
- factory(mod.exports, mod);
- global.util = mod.exports;
- }
-})(this, function (exports, module) {
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): util.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- 'use strict';
-
- var Util = (function ($) {
-
- /**
- * ------------------------------------------------------------------------
- * Private TransitionEnd Helpers
- * ------------------------------------------------------------------------
- */
-
- var transition = false;
-
- var TransitionEndEvent = {
- WebkitTransition: 'webkitTransitionEnd',
- MozTransition: 'transitionend',
- OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend'
- };
-
- // shoutout AngusCroll (https://goo.gl/pxwQGp)
- function toType(obj) {
- return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
- }
-
- function isElement(obj) {
- return (obj[0] || obj).nodeType;
- }
-
- function getSpecialTransitionEndEvent() {
- return {
- bindType: transition.end,
- delegateType: transition.end,
- handle: function handle(event) {
- if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments);
- }
- }
- };
- }
-
- function transitionEndTest() {
- if (window.QUnit) {
- return false;
- }
-
- var el = document.createElement('bootstrap');
-
- for (var _name in TransitionEndEvent) {
- if (el.style[_name] !== undefined) {
- return { end: TransitionEndEvent[_name] };
- }
- }
-
- return false;
- }
-
- function transitionEndEmulator(duration) {
- var _this = this;
-
- var called = false;
-
- $(this).one(Util.TRANSITION_END, function () {
- called = true;
- });
-
- setTimeout(function () {
- if (!called) {
- Util.triggerTransitionEnd(_this);
- }
- }, duration);
-
- return this;
- }
-
- function setTransitionEndSupport() {
- transition = transitionEndTest();
-
- $.fn.emulateTransitionEnd = transitionEndEmulator;
-
- if (Util.supportsTransitionEnd()) {
- $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
- }
- }
-
- /**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
- var Util = {
-
- TRANSITION_END: 'bsTransitionEnd',
-
- getUID: function getUID(prefix) {
- do {
- /* eslint-disable no-bitwise */
- prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here
- /* eslint-enable no-bitwise */
- } while (document.getElementById(prefix));
- return prefix;
- },
-
- getSelectorFromElement: function getSelectorFromElement(element) {
- var selector = element.getAttribute('data-target');
-
- if (!selector) {
- selector = element.getAttribute('href') || '';
- selector = /^#[a-z]/i.test(selector) ? selector : null;
- }
-
- return selector;
- },
-
- reflow: function reflow(element) {
- new Function('bs', 'return bs')(element.offsetHeight);
- },
-
- triggerTransitionEnd: function triggerTransitionEnd(element) {
- $(element).trigger(transition.end);
- },
-
- supportsTransitionEnd: function supportsTransitionEnd() {
- return Boolean(transition);
- },
-
- typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
- for (var property in configTypes) {
- if (configTypes.hasOwnProperty(property)) {
- var expectedTypes = configTypes[property];
- var value = config[property];
- var valueType = undefined;
-
- if (value && isElement(value)) {
- valueType = 'element';
- } else {
- valueType = toType(value);
- }
-
- if (!new RegExp(expectedTypes).test(valueType)) {
- throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
- }
- }
- }
- }
- };
-
- setTransitionEndSupport();
-
- return Util;
- })(jQuery);
-
- module.exports = Util;
-});