Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2017-10-12 22:16:02 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2017-10-12 22:16:02 +0300
commit6b9114249aedf7b83fa2289aeb6df1ff1bc412c0 (patch)
tree54bfefd86349a6f559609c9e3b320acaa078393f /assets
parentcd13fec7856d98c1e9eb267724ba9cacc10f4c24 (diff)
rake update[v4-dev]
Diffstat (limited to 'assets')
-rw-r--r--assets/javascripts/bootstrap-sprockets.js10
-rw-r--r--assets/javascripts/bootstrap.js1339
-rw-r--r--assets/javascripts/bootstrap.min.js2
-rw-r--r--assets/javascripts/bootstrap/alert.js199
-rw-r--r--assets/javascripts/bootstrap/button.js151
-rw-r--r--assets/javascripts/bootstrap/carousel.js651
-rw-r--r--assets/javascripts/bootstrap/collapse.js412
-rw-r--r--assets/javascripts/bootstrap/dropdown.js520
-rw-r--r--assets/javascripts/bootstrap/modal.js756
-rw-r--r--assets/javascripts/bootstrap/popover.js195
-rw-r--r--assets/javascripts/bootstrap/scrollspy.js366
-rw-r--r--assets/javascripts/bootstrap/tab.js299
-rw-r--r--assets/javascripts/bootstrap/tooltip.js864
-rw-r--r--assets/javascripts/bootstrap/util.js35
-rw-r--r--assets/stylesheets/_bootstrap-grid.scss2
-rw-r--r--assets/stylesheets/_bootstrap.scss1
-rw-r--r--assets/stylesheets/bootstrap/_alert.scss7
-rw-r--r--assets/stylesheets/bootstrap/_badge.scss2
-rw-r--r--assets/stylesheets/bootstrap/_breadcrumb.scss1
-rw-r--r--assets/stylesheets/bootstrap/_button-group.scss23
-rw-r--r--assets/stylesheets/bootstrap/_buttons.scss7
-rw-r--r--assets/stylesheets/bootstrap/_card.scss57
-rw-r--r--assets/stylesheets/bootstrap/_close.scss4
-rw-r--r--assets/stylesheets/bootstrap/_custom-forms.scss18
-rw-r--r--assets/stylesheets/bootstrap/_dropdown.scss53
-rw-r--r--assets/stylesheets/bootstrap/_forms.scss39
-rw-r--r--assets/stylesheets/bootstrap/_functions.scss8
-rw-r--r--assets/stylesheets/bootstrap/_input-group.scss25
-rw-r--r--assets/stylesheets/bootstrap/_list-group.scss5
-rw-r--r--assets/stylesheets/bootstrap/_mixins.scss1
-rw-r--r--assets/stylesheets/bootstrap/_modal.scss7
-rw-r--r--assets/stylesheets/bootstrap/_nav.scss10
-rw-r--r--assets/stylesheets/bootstrap/_navbar.scss32
-rw-r--r--assets/stylesheets/bootstrap/_pagination.scss4
-rw-r--r--assets/stylesheets/bootstrap/_print.scss5
-rw-r--r--assets/stylesheets/bootstrap/_reboot.scss30
-rw-r--r--assets/stylesheets/bootstrap/_root.scss16
-rw-r--r--assets/stylesheets/bootstrap/_tables.scss1
-rw-r--r--assets/stylesheets/bootstrap/_tooltip.scss12
-rw-r--r--assets/stylesheets/bootstrap/_transitions.scss2
-rw-r--r--assets/stylesheets/bootstrap/_type.scss2
-rw-r--r--assets/stylesheets/bootstrap/_variables.scss869
-rw-r--r--assets/stylesheets/bootstrap/mixins/_background-variant.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_breakpoints.scss14
-rw-r--r--assets/stylesheets/bootstrap/mixins/_buttons.scss8
-rw-r--r--assets/stylesheets/bootstrap/mixins/_caret.scss35
-rw-r--r--assets/stylesheets/bootstrap/mixins/_float.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_forms.scss24
-rw-r--r--assets/stylesheets/bootstrap/mixins/_grid-framework.scss8
-rw-r--r--assets/stylesheets/bootstrap/mixins/_grid.scss11
-rw-r--r--assets/stylesheets/bootstrap/mixins/_hover.scss25
-rw-r--r--assets/stylesheets/bootstrap/mixins/_image.scss6
-rw-r--r--assets/stylesheets/bootstrap/mixins/_list-group.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_navbar-align.scss3
-rw-r--r--assets/stylesheets/bootstrap/mixins/_reset-text.scss3
-rw-r--r--assets/stylesheets/bootstrap/mixins/_screen-reader.scss4
-rw-r--r--assets/stylesheets/bootstrap/mixins/_text-emphasis.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_visibility.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_align.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_background.scss13
-rw-r--r--assets/stylesheets/bootstrap/utilities/_borders.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_display.scss3
-rw-r--r--assets/stylesheets/bootstrap/utilities/_flex.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_position.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_sizing.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_spacing.scss2
-rw-r--r--assets/stylesheets/bootstrap/utilities/_text.scss4
67 files changed, 3527 insertions, 3698 deletions
diff --git a/assets/javascripts/bootstrap-sprockets.js b/assets/javascripts/bootstrap-sprockets.js
index 92f1afc..aa18064 100644
--- a/assets/javascripts/bootstrap-sprockets.js
+++ b/assets/javascripts/bootstrap-sprockets.js
@@ -1,11 +1,11 @@
-//= require ./bootstrap/button
//= require ./bootstrap/util
-//= require ./bootstrap/dropdown
-//= require ./bootstrap/alert
-//= require ./bootstrap/collapse
//= require ./bootstrap/tab
-//= require ./bootstrap/scrollspy
+//= require ./bootstrap/collapse
+//= require ./bootstrap/alert
//= require ./bootstrap/tooltip
//= require ./bootstrap/popover
+//= require ./bootstrap/dropdown
+//= require ./bootstrap/button
+//= require ./bootstrap/scrollspy
//= require ./bootstrap/modal
//= require ./bootstrap/carousel
diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js
index c0579e2..b4cada0 100644
--- a/assets/javascripts/bootstrap.js
+++ b/assets/javascripts/bootstrap.js
@@ -3,7 +3,6 @@
* Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-
var bootstrap = (function (exports,$,Popper) {
'use strict';
@@ -18,33 +17,25 @@ Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper
*/
var Util = function () {
-
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
-
var transition = false;
-
var MAX_UID = 1000000;
-
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend'
+ transition: 'transitionend' // shoutout AngusCroll (https://goo.gl/pxwQGp)
+
};
- // 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,
@@ -53,6 +44,7 @@ var Util = function () {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
+
return undefined; // eslint-disable-line no-undefined
}
};
@@ -80,49 +72,45 @@ var Util = function () {
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 = {
+ var Util = {
TRANSITION_END: 'bsTransitionEnd',
-
getUID: function getUID(prefix) {
do {
// 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');
+
if (!selector || selector === '#') {
selector = element.getAttribute('href') || '';
}
@@ -143,82 +131,52 @@ var Util = function () {
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(transition);
},
+ isElement: function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ },
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
var expectedTypes = configTypes[property];
var value = config[property];
- var valueType = value && isElement(value) ? 'element' : toType(value);
+ var valueType = value && Util.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 + '".'));
+ throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
}
}
}
};
-
setTransitionEndSupport();
-
return Util;
}(jQuery);
-var babelHelpers = {};
-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;
-};
-
-var classCallCheck = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
-};
-
-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);
- }
+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 inherits = function (subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- }
+function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+}
- 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 possibleConstructorReturn = function (self, call) {
- if (!self) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
+var createClass = _createClass;
- return call && (typeof call === "object" || typeof call === "function") ? call : self;
-};
+function _inheritsLoose(subClass, superClass) {
+ subClass.prototype = Object.create(superClass.prototype);
+ subClass.prototype.constructor = subClass;
+ subClass.__proto__ = superClass;
+}
-babelHelpers;
+var inheritsLoose = _inheritsLoose;
/**
* --------------------------------------------------------------------------
@@ -228,58 +186,54 @@ babelHelpers;
*/
var Alert = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'alert';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.alert';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ CLOSE: "close" + EVENT_KEY,
+ CLOSED: "closed" + EVENT_KEY,
+ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
-
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Alert = function () {
+ var Alert =
+ /*#__PURE__*/
+ function () {
function Alert(element) {
- classCallCheck(this, Alert);
-
this._element = element;
- }
+ } // getters
- // getters
- // public
+ var _proto = Alert.prototype;
- Alert.prototype.close = function close(element) {
+ // public
+ _proto.close = function close(element) {
element = element || this._element;
var rootElement = this._getRootElement(element);
+
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
@@ -289,14 +243,13 @@ var Alert = function () {
this._removeElement(rootElement);
};
- Alert.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
- };
+ }; // private
- // private
- Alert.prototype._getRootElement = function _getRootElement(element) {
+ _proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var parent = false;
@@ -305,26 +258,26 @@ var Alert = function () {
}
if (!parent) {
- parent = $(element).closest('.' + ClassName.ALERT)[0];
+ parent = $(element).closest("." + ClassName.ALERT)[0];
}
return parent;
};
- Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
+ _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
-
$(element).trigger(closeEvent);
return closeEvent;
};
- Alert.prototype._removeElement = function _removeElement(element) {
+ _proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.SHOW);
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
this._destroyElement(element);
+
return;
}
@@ -333,11 +286,10 @@ var Alert = function () {
}).emulateTransitionEnd(TRANSITION_DURATION);
};
- Alert.prototype._destroyElement = function _destroyElement(element) {
+ _proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
- };
+ }; // static
- // static
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
@@ -366,22 +318,21 @@ var Alert = function () {
};
createClass(Alert, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return Alert;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
- $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
+ $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
@@ -390,6 +341,7 @@ var Alert = function () {
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
@@ -406,26 +358,22 @@ var Alert = function () {
*/
var Button = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'button';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.button';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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"]',
@@ -433,30 +381,29 @@ var Button = function () {
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)
- };
+ 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
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Button = function () {
+ var Button =
+ /*#__PURE__*/
+ function () {
function Button(element) {
- classCallCheck(this, Button);
-
this._element = element;
- }
+ } // getters
- // getters
- // public
+ var _proto = Button.prototype;
- Button.prototype.toggle = function toggle() {
+ // public
+ _proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
@@ -481,6 +428,7 @@ var Button = function () {
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
return;
}
+
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
$(input).trigger('change');
}
@@ -499,12 +447,11 @@ var Button = function () {
}
};
- Button.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
- };
+ }; // static
- // static
Button._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
@@ -522,23 +469,22 @@ var Button = function () {
};
createClass(Button, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return Button;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
-
var button = event.target;
if (!$(button).hasClass(ClassName.BUTTON)) {
@@ -550,7 +496,6 @@ var Button = function () {
var button = $(event.target).closest(Selector.BUTTON)[0];
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -559,6 +504,7 @@ var Button = function () {
$.fn[NAME] = Button._jQueryInterface;
$.fn[NAME].Constructor = Button;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Button._jQueryInterface;
@@ -575,22 +521,22 @@ var Button = function () {
*/
var Carousel = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'carousel';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.carousel';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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 TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var Default = {
@@ -600,7 +546,6 @@ var Carousel = function () {
pause: 'hover',
wrap: true
};
-
var DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
@@ -608,25 +553,22 @@ var Carousel = function () {
pause: '(string|boolean)',
wrap: 'boolean'
};
-
var Direction = {
NEXT: 'next',
PREV: 'prev',
LEFT: 'left',
RIGHT: 'right'
};
-
var Event = {
- SLIDE: 'slide' + EVENT_KEY,
- SLID: 'slid' + EVENT_KEY,
- KEYDOWN: 'keydown' + EVENT_KEY,
- MOUSEENTER: 'mouseenter' + EVENT_KEY,
- MOUSELEAVE: 'mouseleave' + EVENT_KEY,
- TOUCHEND: 'touchend' + EVENT_KEY,
- LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
+ SLIDE: "slide" + EVENT_KEY,
+ SLID: "slid" + EVENT_KEY,
+ KEYDOWN: "keydown" + EVENT_KEY,
+ MOUSEENTER: "mouseenter" + EVENT_KEY,
+ MOUSELEAVE: "mouseleave" + EVENT_KEY,
+ TOUCHEND: "touchend" + 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',
@@ -637,7 +579,6 @@ var Carousel = function () {
PREV: 'carousel-item-prev',
ITEM: 'carousel-item'
};
-
var Selector = {
ACTIVE: '.active',
ACTIVE_ITEM: '.active.carousel-item',
@@ -646,45 +587,42 @@ var Carousel = function () {
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Carousel = function () {
+ var Carousel =
+ /*#__PURE__*/
+ function () {
function Carousel(element, config) {
- classCallCheck(this, Carousel);
-
this._items = null;
this._interval = null;
this._activeElement = null;
-
this._isPaused = false;
this._isSliding = false;
-
this.touchTimeout = null;
-
this._config = this._getConfig(config);
this._element = $(element)[0];
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
this._addEventListeners();
- }
+ } // getters
- // getters
- // public
+ var _proto = Carousel.prototype;
- Carousel.prototype.next = function next() {
+ // public
+ _proto.next = function next() {
if (!this._isSliding) {
this._slide(Direction.NEXT);
}
};
- Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
+ _proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
@@ -692,13 +630,13 @@ var Carousel = function () {
}
};
- Carousel.prototype.prev = function prev() {
+ _proto.prev = function prev() {
if (!this._isSliding) {
this._slide(Direction.PREV);
}
};
- Carousel.prototype.pause = function pause(event) {
+ _proto.pause = function pause(event) {
if (!event) {
this._isPaused = true;
}
@@ -712,7 +650,7 @@ var Carousel = function () {
this._interval = null;
};
- Carousel.prototype.cycle = function cycle(event) {
+ _proto.cycle = function cycle(event) {
if (!event) {
this._isPaused = false;
}
@@ -727,7 +665,7 @@ var Carousel = function () {
}
};
- Carousel.prototype.to = function to(index) {
+ _proto.to = function to(index) {
var _this = this;
this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
@@ -756,10 +694,9 @@ var Carousel = function () {
this._slide(direction, this._items[index]);
};
- Carousel.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$(this._element).off(EVENT_KEY);
$.removeData(this._element, DATA_KEY);
-
this._items = null;
this._config = null;
this._element = null;
@@ -768,17 +705,16 @@ var Carousel = function () {
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
- };
+ }; // private
- // private
- Carousel.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
- Carousel.prototype._addEventListeners = function _addEventListeners() {
+ _proto._addEventListeners = function _addEventListeners() {
var _this2 = this;
if (this._config.keyboard) {
@@ -793,6 +729,7 @@ var Carousel = function () {
}).on(Event.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
+
if ('ontouchstart' in document.documentElement) {
// if it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel
@@ -803,9 +740,11 @@ var Carousel = function () {
// events to fire) we explicitly restart cycling
$(this._element).on(Event.TOUCHEND, function () {
_this2.pause();
+
if (_this2.touchTimeout) {
clearTimeout(_this2.touchTimeout);
}
+
_this2.touchTimeout = setTimeout(function (event) {
return _this2.cycle(event);
}, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
@@ -814,7 +753,7 @@ var Carousel = function () {
}
};
- Carousel.prototype._keydown = function _keydown(event) {
+ _proto._keydown = function _keydown(event) {
if (/input|textarea/i.test(event.target.tagName)) {
return;
}
@@ -824,24 +763,28 @@ var Carousel = function () {
event.preventDefault();
this.prev();
break;
+
case ARROW_RIGHT_KEYCODE:
event.preventDefault();
this.next();
break;
+
default:
return;
}
};
- Carousel.prototype._getItemIndex = function _getItemIndex(element) {
+ _proto._getItemIndex = function _getItemIndex(element) {
this._items = $.makeArray($(element).parent().find(Selector.ITEM));
return this._items.indexOf(element);
};
- Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {
+ _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
var isNextDirection = direction === Direction.NEXT;
var isPrevDirection = direction === Direction.PREV;
+
var activeIndex = this._getItemIndex(activeElement);
+
var lastItemIndex = this._items.length - 1;
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
@@ -851,26 +794,25 @@ var Carousel = function () {
var delta = direction === Direction.PREV ? -1 : 1;
var itemIndex = (activeIndex + delta) % this._items.length;
-
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
};
- Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
+
var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);
+
var slideEvent = $.Event(Event.SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
-
$(this._element).trigger(slideEvent);
-
return slideEvent;
};
- Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
+ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
@@ -882,18 +824,21 @@ var Carousel = function () {
}
};
- Carousel.prototype._slide = function _slide(direction, element) {
+ _proto._slide = function _slide(direction, element) {
var _this3 = this;
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
+
var activeElementIndex = this._getItemIndex(activeElement);
+
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
+
var nextElementIndex = this._getItemIndex(nextElement);
- var isCycling = Boolean(this._interval);
- var directionalClassName = void 0;
- var orderClassName = void 0;
- var eventDirectionName = void 0;
+ var isCycling = Boolean(this._interval);
+ var directionalClassName;
+ var orderClassName;
+ var eventDirectionName;
if (direction === Direction.NEXT) {
directionalClassName = ClassName.LEFT;
@@ -911,6 +856,7 @@ var Carousel = function () {
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
+
if (slideEvent.isDefaultPrevented()) {
return;
}
@@ -936,21 +882,14 @@ var Carousel = function () {
});
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
-
$(nextElement).addClass(orderClassName);
-
Util.reflow(nextElement);
-
$(activeElement).addClass(directionalClassName);
$(nextElement).addClass(directionalClassName);
-
$(activeElement).one(Util.TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName + ' ' + orderClassName).addClass(ClassName.ACTIVE);
-
- $(activeElement).removeClass(ClassName.ACTIVE + ' ' + orderClassName + ' ' + directionalClassName);
-
+ $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
+ $(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
_this3._isSliding = false;
-
setTimeout(function () {
return $(_this3._element).trigger(slidEvent);
}, 0);
@@ -958,7 +897,6 @@ var Carousel = function () {
} else {
$(activeElement).removeClass(ClassName.ACTIVE);
$(nextElement).addClass(ClassName.ACTIVE);
-
this._isSliding = false;
$(this._element).trigger(slidEvent);
}
@@ -966,16 +904,16 @@ var Carousel = function () {
if (isCycling) {
this.cycle();
}
- };
+ }; // static
- // static
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
+
var _config = $.extend({}, Default, $(this).data());
- if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
+ if (typeof config === 'object') {
$.extend(_config, config);
}
@@ -990,8 +928,9 @@ var Carousel = function () {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
- throw new Error('No method named "' + action + '"');
+ throw new Error("No method named \"" + action + "\"");
}
+
data[action]();
} else if (_config.interval) {
data.pause();
@@ -1030,34 +969,33 @@ var Carousel = function () {
};
createClass(Carousel, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}]);
return Carousel;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
+ $(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
@@ -1066,6 +1004,7 @@ var Carousel = function () {
$.fn[NAME] = Carousel._jQueryInterface;
$.fn[NAME].Constructor = Carousel;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel._jQueryInterface;
@@ -1082,74 +1021,68 @@ var Carousel = function () {
*/
var Collapse = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'collapse';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.collapse';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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'
+ parent: '(string|element)'
};
-
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
+ 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 = {
SHOW: 'show',
COLLAPSE: 'collapse',
COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed'
};
-
var Dimension = {
WIDTH: 'width',
HEIGHT: 'height'
};
-
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Collapse = function () {
+ var Collapse =
+ /*#__PURE__*/
+ 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._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var tabToggles = $(Selector.DATA_TOGGLE);
+
for (var i = 0; i < tabToggles.length; i++) {
var elem = tabToggles[i];
var selector = Util.getSelectorFromElement(elem);
+
if (selector !== null && $(selector).filter(element).length > 0) {
this._triggerArray.push(elem);
}
@@ -1164,13 +1097,13 @@ var Collapse = function () {
if (this._config.toggle) {
this.toggle();
}
- }
+ } // getters
- // getters
- // public
+ var _proto = Collapse.prototype;
- Collapse.prototype.toggle = function toggle() {
+ // public
+ _proto.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.SHOW)) {
this.hide();
} else {
@@ -1178,18 +1111,19 @@ var Collapse = function () {
}
};
- Collapse.prototype.show = function show() {
+ _proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
return;
}
- var actives = void 0;
- var activesData = void 0;
+ var actives;
+ var activesData;
if (this._parent) {
actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
+
if (!actives.length) {
actives = null;
}
@@ -1197,6 +1131,7 @@ var Collapse = function () {
if (actives) {
activesData = $(actives).data(DATA_KEY);
+
if (activesData && activesData._isTransitioning) {
return;
}
@@ -1204,12 +1139,14 @@ var Collapse = function () {
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);
}
@@ -1218,7 +1155,6 @@ var Collapse = function () {
var dimension = this._getDimension();
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
-
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
@@ -1229,7 +1165,6 @@ var Collapse = function () {
var complete = function complete() {
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
-
_this._element.style[dimension] = '';
_this.setTransitioning(false);
@@ -1243,14 +1178,12 @@ var Collapse = function () {
}
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = 'scroll' + capitalizedDimension;
-
+ var scrollSize = "scroll" + capitalizedDimension;
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
-
- this._element.style[dimension] = this._element[scrollSize] + 'px';
+ this._element.style[dimension] = this._element[scrollSize] + "px";
};
- Collapse.prototype.hide = function hide() {
+ _proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
@@ -1259,24 +1192,25 @@ var Collapse = function () {
var startEvent = $.Event(Event.HIDE);
$(this._element).trigger(startEvent);
+
if (startEvent.isDefaultPrevented()) {
return;
}
var dimension = this._getDimension();
- this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + 'px';
-
+ this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
-
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
if (this._triggerArray.length) {
for (var i = 0; i < this._triggerArray.length; i++) {
var trigger = this._triggerArray[i];
var selector = Util.getSelectorFromElement(trigger);
+
if (selector !== null) {
var $elem = $(selector);
+
if (!$elem.hasClass(ClassName.SHOW)) {
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
}
@@ -1288,6 +1222,7 @@ var Collapse = function () {
var complete = function complete() {
_this2.setTransitioning(false);
+
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
};
@@ -1301,48 +1236,56 @@ var Collapse = function () {
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
};
- Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {
+ _proto.setTransitioning = function setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning;
};
- Collapse.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
-
this._config = null;
this._parent = null;
this._element = null;
this._triggerArray = null;
this._isTransitioning = null;
- };
+ }; // private
- // private
- Collapse.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
config.toggle = Boolean(config.toggle); // coerce string values
+
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
- Collapse.prototype._getDimension = function _getDimension() {
+ _proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
};
- Collapse.prototype._getParent = function _getParent() {
+ _proto._getParent = function _getParent() {
var _this3 = this;
- var parent = $(this._config.parent)[0];
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
+ var parent = null;
+
+ if (Util.isElement(this._config.parent)) {
+ parent = this._config.parent; // it's a jQuery object
+
+ if (typeof this._config.parent.jquery !== 'undefined') {
+ parent = this._config.parent[0];
+ }
+ } else {
+ 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;
};
- Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
+ _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) {
var isOpen = $(element).hasClass(ClassName.SHOW);
@@ -1350,9 +1293,8 @@ var Collapse = function () {
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
}
}
- };
+ }; // static
- // static
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
@@ -1363,7 +1305,8 @@ var Collapse = function () {
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);
+
+ var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
@@ -1376,36 +1319,37 @@ var Collapse = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
};
createClass(Collapse, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}]);
return Collapse;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.target.tagName === 'A' && !$.contains(this, event.target)) {
+ if (event.currentTarget.tagName === 'A') {
event.preventDefault();
}
@@ -1415,10 +1359,10 @@ var Collapse = function () {
var $target = $(this);
var data = $target.data(DATA_KEY);
var config = data ? 'toggle' : $trigger.data();
+
Collapse._jQueryInterface.call($target, config);
});
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -1427,6 +1371,7 @@ var Collapse = function () {
$.fn[NAME] = Collapse._jQueryInterface;
$.fn[NAME].Constructor = Collapse;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse._jQueryInterface;
@@ -1443,7 +1388,6 @@ var Collapse = function () {
*/
var Dropdown = function () {
-
/**
* Check for Popper dependency
* Popper - https://popper.js.org
@@ -1451,38 +1395,42 @@ var Dropdown = function () {
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
+
var NAME = 'dropdown';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.dropdown';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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 SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
+
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab 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 REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + '|' + ARROW_DOWN_KEYCODE + '|' + ESCAPE_KEYCODE);
+ var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
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,
- KEYUP_DATA_API: 'keyup' + EVENT_KEY + DATA_API_KEY
+ 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,
+ KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
};
-
var ClassName = {
DISABLED: 'disabled',
SHOW: 'show',
@@ -1490,7 +1438,6 @@ var Dropdown = function () {
MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left'
};
-
var Selector = {
DATA_TOGGLE: '[data-toggle="dropdown"]',
FORM_CHILD: '.dropdown form',
@@ -1498,34 +1445,31 @@ var Dropdown = function () {
NAVBAR_NAV: '.navbar-nav',
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
};
-
var AttachmentMap = {
TOP: 'top-start',
TOPEND: 'top-end',
BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end'
};
-
var Default = {
offset: 0,
flip: true
};
-
var DefaultType = {
offset: '(number|string)',
flip: 'boolean'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Dropdown = function () {
+ var Dropdown =
+ /*#__PURE__*/
+ function () {
function Dropdown(element, config) {
- classCallCheck(this, Dropdown);
-
this._element = element;
this._popper = null;
this._config = this._getConfig(config);
@@ -1533,18 +1477,19 @@ var Dropdown = function () {
this._inNavbar = this._detectNavbar();
this._addEventListeners();
- }
+ } // getters
- // getters
- // public
+ var _proto = Dropdown.prototype;
- Dropdown.prototype.toggle = function toggle() {
+ // public
+ _proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
+
var isActive = $(this._menu).hasClass(ClassName.SHOW);
Dropdown._clearMenus();
@@ -1557,104 +1502,108 @@ var Dropdown = function () {
relatedTarget: this._element
};
var showEvent = $.Event(Event.SHOW, relatedTarget);
-
$(parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
return;
}
- var element = this._element;
- // for dropup with alignment we use the parent as popper container
+ var element = this._element; // for dropup with alignment we use the parent as popper container
+
if ($(parent).hasClass(ClassName.DROPUP)) {
if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {
element = parent;
}
}
- this._popper = new Popper(element, this._menu, this._getPopperConfig());
- // if this is a touch-enabled device we add extra
+ this._popper = new Popper(element, this._menu, this._getPopperConfig()); // if this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
$('body').children().on('mouseover', null, $.noop);
}
this._element.focus();
+
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
};
- Dropdown.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._element).off(EVENT_KEY);
this._element = null;
this._menu = null;
+
if (this._popper !== null) {
this._popper.destroy();
}
+
this._popper = null;
};
- Dropdown.prototype.update = function update() {
+ _proto.update = function update() {
this._inNavbar = this._detectNavbar();
+
if (this._popper !== null) {
this._popper.scheduleUpdate();
}
- };
+ }; // private
- // private
- Dropdown.prototype._addEventListeners = function _addEventListeners() {
+ _proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event.CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
+
_this.toggle();
});
};
- Dropdown.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
-
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
-
return config;
};
- Dropdown.prototype._getMenuElement = function _getMenuElement() {
+ _proto._getMenuElement = function _getMenuElement() {
if (!this._menu) {
var parent = Dropdown._getParentFromElement(this._element);
+
this._menu = $(parent).find(Selector.MENU)[0];
}
+
return this._menu;
};
- Dropdown.prototype._getPlacement = function _getPlacement() {
+ _proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element).parent();
- var placement = AttachmentMap.BOTTOM;
+ var placement = AttachmentMap.BOTTOM; // Handle dropup
- // Handle dropup
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
placement = AttachmentMap.TOP;
+
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
}
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND;
}
+
return placement;
};
- Dropdown.prototype._detectNavbar = function _detectNavbar() {
+ _proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
};
- Dropdown.prototype._getPopperConfig = function _getPopperConfig() {
+ _proto._getPopperConfig = function _getPopperConfig() {
var popperConfig = {
placement: this._getPlacement(),
modifiers: {
@@ -1664,24 +1613,25 @@ var Dropdown = function () {
flip: {
enabled: this._config.flip
}
- }
+ } // Disable Popper.js for Dropdown in Navbar
+
};
- // Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) {
popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar
};
}
+
return popperConfig;
- };
+ }; // static
- // static
Dropdown._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;
+
+ var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(this, _config);
@@ -1690,8 +1640,9 @@ var Dropdown = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
@@ -1703,8 +1654,10 @@ var Dropdown = function () {
}
var toggles = $.makeArray($(Selector.DATA_TOGGLE));
+
for (var i = 0; i < toggles.length; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
+
var context = $(toggles[i]).data(DATA_KEY);
var relatedTarget = {
relatedTarget: toggles[i]
@@ -1715,6 +1668,7 @@ var Dropdown = function () {
}
var dropdownMenu = context._menu;
+
if (!$(parent).hasClass(ClassName.SHOW)) {
continue;
}
@@ -1725,25 +1679,25 @@ var Dropdown = function () {
var hideEvent = $.Event(Event.HIDE, relatedTarget);
$(parent).trigger(hideEvent);
+
if (hideEvent.isDefaultPrevented()) {
continue;
- }
-
- // if this is a touch-enabled device we remove the extra
+ } // if this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
+
+
if ('ontouchstart' in document.documentElement) {
$('body').children().off('mouseover', null, $.noop);
}
toggles[i].setAttribute('aria-expanded', 'false');
-
$(dropdownMenu).removeClass(ClassName.SHOW);
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
}
};
Dropdown._getParentFromElement = function _getParentFromElement(element) {
- var parent = void 0;
+ var parent;
var selector = Util.getSelectorFromElement(element);
if (selector) {
@@ -1766,10 +1720,10 @@ var Dropdown = function () {
}
var parent = Dropdown._getParentFromElement(this);
+
var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
-
if (event.which === ESCAPE_KEYCODE) {
var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
$(toggle).trigger('focus');
@@ -1805,38 +1759,38 @@ var Dropdown = function () {
};
createClass(Dropdown, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
}]);
return Dropdown;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
- $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
+
+ $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
+
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
e.stopPropagation();
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -1845,6 +1799,7 @@ var Dropdown = function () {
$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown._jQueryInterface;
@@ -1861,17 +1816,15 @@ var Dropdown = function () {
*/
var Modal = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'modal';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.modal';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 300;
@@ -1884,28 +1837,25 @@ var Modal = function () {
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
+ 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',
@@ -1913,7 +1863,6 @@ var Modal = function () {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
DIALOG: '.modal-dialog',
DATA_TOGGLE: '[data-toggle="modal"]',
@@ -1921,18 +1870,18 @@ var Modal = function () {
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Modal = function () {
+ var Modal =
+ /*#__PURE__*/
+ function () {
function Modal(element, config) {
- classCallCheck(this, Modal);
-
this._config = this._getConfig(config);
this._element = element;
this._dialog = $(element).find(Selector.DIALOG)[0];
@@ -1942,17 +1891,17 @@ var Modal = function () {
this._ignoreBackdropClick = false;
this._originalBodyPadding = 0;
this._scrollbarWidth = 0;
- }
+ } // getters
- // getters
- // public
+ var _proto = Modal.prototype;
- Modal.prototype.toggle = function toggle(relatedTarget) {
+ // public
+ _proto.toggle = function toggle(relatedTarget) {
return this._isShown ? this.hide() : this.show(relatedTarget);
};
- Modal.prototype.show = function show(relatedTarget) {
+ _proto.show = function show(relatedTarget) {
var _this = this;
if (this._isTransitioning) {
@@ -1966,7 +1915,6 @@ var Modal = function () {
var showEvent = $.Event(Event.SHOW, {
relatedTarget: relatedTarget
});
-
$(this._element).trigger(showEvent);
if (this._isShown || showEvent.isDefaultPrevented()) {
@@ -1976,6 +1924,7 @@ var Modal = function () {
this._isShown = true;
this._checkScrollbar();
+
this._setScrollbar();
this._adjustDialog();
@@ -1983,12 +1932,12 @@ var Modal = function () {
$(document.body).addClass(ClassName.OPEN);
this._setEscapeEvent();
+
this._setResizeEvent();
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
return _this.hide(event);
});
-
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
@@ -2002,7 +1951,7 @@ var Modal = function () {
});
};
- Modal.prototype.hide = function hide(event) {
+ _proto.hide = function hide(event) {
var _this2 = this;
if (event) {
@@ -2020,7 +1969,6 @@ var Modal = function () {
}
var hideEvent = $.Event(Event.HIDE);
-
$(this._element).trigger(hideEvent);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
@@ -2030,17 +1978,15 @@ var Modal = function () {
this._isShown = false;
this._setEscapeEvent();
+
this._setResizeEvent();
$(document).off(Event.FOCUSIN);
-
$(this._element).removeClass(ClassName.SHOW);
-
$(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
if (transition) {
-
$(this._element).one(Util.TRANSITION_END, function (event) {
return _this2._hideModal(event);
}).emulateTransitionEnd(TRANSITION_DURATION);
@@ -2049,11 +1995,9 @@ var Modal = function () {
}
};
- Modal.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
-
$(window, document, this._element, this._backdrop).off(EVENT_KEY);
-
this._config = null;
this._element = null;
this._dialog = null;
@@ -2064,19 +2008,18 @@ var Modal = function () {
this._scrollbarWidth = null;
};
- Modal.prototype.handleUpdate = function handleUpdate() {
+ _proto.handleUpdate = function handleUpdate() {
this._adjustDialog();
- };
+ }; // private
- // private
- Modal.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
- Modal.prototype._showElement = function _showElement(relatedTarget) {
+ _proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
@@ -2087,7 +2030,9 @@ var Modal = function () {
}
this._element.style.display = 'block';
+
this._element.removeAttribute('aria-hidden');
+
this._element.scrollTop = 0;
if (transition) {
@@ -2108,6 +2053,7 @@ var Modal = function () {
if (_this3._config.focus) {
_this3._element.focus();
}
+
_this3._isTransitioning = false;
$(_this3._element).trigger(shownEvent);
};
@@ -2119,7 +2065,7 @@ var Modal = function () {
}
};
- Modal.prototype._enforceFocus = function _enforceFocus() {
+ _proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
@@ -2130,13 +2076,14 @@ var Modal = function () {
});
};
- Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
+ _proto._setEscapeEvent = function _setEscapeEvent() {
var _this5 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) {
event.preventDefault();
+
_this5.hide();
}
});
@@ -2145,7 +2092,7 @@ var Modal = function () {
}
};
- Modal.prototype._setResizeEvent = function _setResizeEvent() {
+ _proto._setResizeEvent = function _setResizeEvent() {
var _this6 = this;
if (this._isShown) {
@@ -2157,35 +2104,40 @@ var Modal = function () {
}
};
- Modal.prototype._hideModal = function _hideModal() {
+ _proto._hideModal = function _hideModal() {
var _this7 = this;
this._element.style.display = 'none';
+
this._element.setAttribute('aria-hidden', true);
+
this._isTransitioning = false;
+
this._showBackdrop(function () {
$(document.body).removeClass(ClassName.OPEN);
+
_this7._resetAdjustments();
+
_this7._resetScrollbar();
+
$(_this7._element).trigger(Event.HIDDEN);
});
};
- Modal.prototype._removeBackdrop = function _removeBackdrop() {
+ _proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
this._backdrop = null;
}
};
- Modal.prototype._showBackdrop = function _showBackdrop(callback) {
+ _proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
if (this._isShown && this._config.backdrop) {
var doAnimate = Util.supportsTransitionEnd() && animate;
-
this._backdrop = document.createElement('div');
this._backdrop.className = ClassName.BACKDROP;
@@ -2194,15 +2146,16 @@ var Modal = function () {
}
$(this._backdrop).appendTo(document.body);
-
$(this._element).on(Event.CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false;
return;
}
+
if (event.target !== event.currentTarget) {
return;
}
+
if (_this8._config.backdrop === 'static') {
_this8._element.focus();
} else {
@@ -2231,6 +2184,7 @@ var Modal = function () {
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();
+
if (callback) {
callback();
}
@@ -2244,96 +2198,92 @@ var Modal = function () {
} else if (callback) {
callback();
}
- };
-
- // ----------------------------------------------------------------------
+ }; // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
// todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
- Modal.prototype._adjustDialog = function _adjustDialog() {
+
+ _proto._adjustDialog = function _adjustDialog() {
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
+ this._element.style.paddingLeft = this._scrollbarWidth + "px";
}
if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = this._scrollbarWidth + 'px';
+ this._element.style.paddingRight = this._scrollbarWidth + "px";
}
};
- Modal.prototype._resetAdjustments = function _resetAdjustments() {
+ _proto._resetAdjustments = function _resetAdjustments() {
this._element.style.paddingLeft = '';
this._element.style.paddingRight = '';
};
- Modal.prototype._checkScrollbar = function _checkScrollbar() {
+ _proto._checkScrollbar = function _checkScrollbar() {
var rect = document.body.getBoundingClientRect();
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
this._scrollbarWidth = this._getScrollbarWidth();
};
- Modal.prototype._setScrollbar = function _setScrollbar() {
+ _proto._setScrollbar = function _setScrollbar() {
var _this9 = this;
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
-
// Adjust fixed content padding
$(Selector.FIXED_CONTENT).each(function (index, element) {
var actualPadding = $(element)[0].style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
- $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + 'px');
- });
+ $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
+ }); // Adjust sticky content margin
- // Adjust sticky content margin
$(Selector.STICKY_CONTENT).each(function (index, element) {
var actualMargin = $(element)[0].style.marginRight;
var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + 'px');
- });
+ $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
+ }); // Adjust navbar-toggler margin
- // Adjust navbar-toggler margin
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
var actualMargin = $(element)[0].style.marginRight;
var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + 'px');
- });
+ $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
+ }); // Adjust body padding
- // Adjust body padding
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $('body').css('padding-right');
- $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + 'px');
+ $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
}
};
- Modal.prototype._resetScrollbar = function _resetScrollbar() {
+ _proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
$(Selector.FIXED_CONTENT).each(function (index, element) {
var padding = $(element).data('padding-right');
+
if (typeof padding !== 'undefined') {
$(element).css('padding-right', padding).removeData('padding-right');
}
- });
+ }); // Restore sticky content and navbar-toggler margin
- // Restore sticky content and navbar-toggler margin
- $(Selector.STICKY_CONTENT + ', ' + Selector.NAVBAR_TOGGLER).each(function (index, element) {
+ $(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) {
var margin = $(element).data('margin-right');
+
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
}
- });
+ }); // Restore body padding
- // Restore body padding
var padding = $('body').data('padding-right');
+
if (typeof padding !== 'undefined') {
$('body').css('padding-right', padding).removeData('padding-right');
}
};
- Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {
+ _proto._getScrollbarWidth = function _getScrollbarWidth() {
// thx d.walsh
var scrollDiv = document.createElement('div');
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
@@ -2341,14 +2291,14 @@ var Modal = function () {
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
- };
+ }; // static
- // static
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);
+
+ var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
if (!data) {
data = new Modal(this, _config);
@@ -2357,8 +2307,9 @@ var Modal = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config](relatedTarget);
} else if (_config.show) {
data.show(relatedTarget);
@@ -2367,29 +2318,29 @@ var Modal = function () {
};
createClass(Modal, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}]);
return Modal;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this10 = this;
- var target = void 0;
+ var target;
var selector = Util.getSelectorFromElement(this);
if (selector) {
@@ -2417,7 +2368,6 @@ var Modal = function () {
Modal._jQueryInterface.call($(target), config, this);
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -2426,6 +2376,7 @@ var Modal = function () {
$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Modal._jQueryInterface;
@@ -2442,7 +2393,6 @@ var Modal = function () {
*/
var Tooltip = function () {
-
/**
* Check for Popper dependency
* Popper - https://popper.js.org
@@ -2450,22 +2400,21 @@ var Tooltip = function () {
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
}
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
+
var NAME = 'tooltip';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.tooltip';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 150;
var CLASS_PREFIX = 'bs-tooltip';
- var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
-
+ var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DefaultType = {
animation: 'boolean',
template: 'string',
@@ -2479,7 +2428,6 @@ var Tooltip = function () {
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)'
};
-
var AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
@@ -2487,7 +2435,6 @@ var Tooltip = function () {
BOTTOM: 'bottom',
LEFT: 'left'
};
-
var Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
@@ -2501,86 +2448,79 @@ var Tooltip = function () {
container: false,
fallbackPlacement: 'flip'
};
-
var HoverState = {
SHOW: 'show',
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
+ 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',
SHOW: 'show'
};
-
var Selector = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
};
-
var Trigger = {
HOVER: 'hover',
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Tooltip = function () {
+ var Tooltip =
+ /*#__PURE__*/
+ function () {
function Tooltip(element, config) {
- classCallCheck(this, Tooltip);
-
-
// private
this._isEnabled = true;
this._timeout = 0;
this._hoverState = '';
this._activeTrigger = {};
- this._popper = null;
+ this._popper = null; // protected
- // protected
this.element = element;
this.config = this._getConfig(config);
this.tip = null;
this._setListeners();
- }
+ } // getters
- // getters
- // public
+ var _proto = Tooltip.prototype;
- Tooltip.prototype.enable = function enable() {
+ // public
+ _proto.enable = function enable() {
this._isEnabled = true;
};
- Tooltip.prototype.disable = function disable() {
+ _proto.disable = function disable() {
this._isEnabled = false;
};
- Tooltip.prototype.toggleEnabled = function toggleEnabled() {
+ _proto.toggleEnabled = function toggleEnabled() {
this._isEnabled = !this._isEnabled;
};
- Tooltip.prototype.toggle = function toggle(event) {
+ _proto.toggle = function toggle(event) {
if (!this._isEnabled) {
return;
}
@@ -2602,9 +2542,9 @@ var Tooltip = function () {
context._leave(null, context);
}
} else {
-
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
this._leave(null, this);
+
return;
}
@@ -2612,11 +2552,9 @@ var Tooltip = function () {
}
};
- Tooltip.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
clearTimeout(this._timeout);
-
$.removeData(this.element, this.constructor.DATA_KEY);
-
$(this.element).off(this.constructor.EVENT_KEY);
$(this.element).closest('.modal').off('hide.bs.modal');
@@ -2628,6 +2566,7 @@ var Tooltip = function () {
this._timeout = null;
this._hoverState = null;
this._activeTrigger = null;
+
if (this._popper !== null) {
this._popper.destroy();
}
@@ -2638,7 +2577,7 @@ var Tooltip = function () {
this.tip = null;
};
- Tooltip.prototype.show = function show() {
+ _proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
@@ -2646,9 +2585,9 @@ var Tooltip = function () {
}
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) {
@@ -2657,10 +2596,8 @@ var Tooltip = function () {
var tip = this.getTipElement();
var tipId = Util.getUID(this.constructor.NAME);
-
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
-
this.setContent();
if (this.config.animation) {
@@ -2670,10 +2607,9 @@ var Tooltip = function () {
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
var attachment = this._getAttachment(placement);
- this.addAttachmentClass(attachment);
+ this.addAttachmentClass(attachment);
var container = this.config.container === false ? document.body : $(this.config.container);
-
$(tip).data(this.constructor.DATA_KEY, this);
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
@@ -2681,7 +2617,6 @@ var Tooltip = function () {
}
$(this.element).trigger(this.constructor.Event.INSERTED);
-
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
@@ -2704,13 +2639,11 @@ var Tooltip = function () {
_this._handlePopperPlacementChange(data);
}
});
-
- $(tip).addClass(ClassName.SHOW);
-
- // if this is a touch-enabled device we add extra
+ $(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+
if ('ontouchstart' in document.documentElement) {
$('body').children().on('mouseover', null, $.noop);
}
@@ -2719,9 +2652,9 @@ var Tooltip = function () {
if (_this.config.animation) {
_this._fixTransition();
}
+
var prevHoverState = _this._hoverState;
_this._hoverState = null;
-
$(_this.element).trigger(_this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
@@ -2737,19 +2670,23 @@ var Tooltip = function () {
}
};
- Tooltip.prototype.hide = function hide(callback) {
+ _proto.hide = 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.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip);
}
_this2._cleanTipClass();
+
_this2.element.removeAttribute('aria-describedby');
+
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
+
if (_this2._popper !== null) {
_this2._popper.destroy();
}
@@ -2765,10 +2702,9 @@ var Tooltip = function () {
return;
}
- $(tip).removeClass(ClassName.SHOW);
-
- // if this is a touch-enabled device we remove the extra
+ $(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
+
if ('ontouchstart' in document.documentElement) {
$('body').children().off('mouseover', null, $.noop);
}
@@ -2778,7 +2714,6 @@ var Tooltip = function () {
this._activeTrigger[Trigger.HOVER] = false;
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
-
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
} else {
complete();
@@ -2787,36 +2722,36 @@ var Tooltip = function () {
this._hoverState = '';
};
- Tooltip.prototype.update = function update() {
+ _proto.update = function update() {
if (this._popper !== null) {
this._popper.scheduleUpdate();
}
- };
+ }; // protected
- // protected
- Tooltip.prototype.isWithContent = function isWithContent() {
+ _proto.isWithContent = function isWithContent() {
return Boolean(this.getTitle());
};
- Tooltip.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
+ _proto.addAttachmentClass = function addAttachmentClass(attachment) {
+ $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
- Tooltip.prototype.getTipElement = function getTipElement() {
+ _proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip;
};
- Tooltip.prototype.setContent = function setContent() {
+ _proto.setContent = function setContent() {
var $tip = $(this.getTipElement());
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
- $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
+ $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
};
- Tooltip.prototype.setElementContent = function setElementContent($element, content) {
+ _proto.setElementContent = function setElementContent($element, content) {
var html = this.config.html;
- if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {
+
+ if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// content is a DOM node or a jQuery
if (html) {
if (!$(content).parent().is($element)) {
@@ -2830,7 +2765,7 @@ var Tooltip = function () {
}
};
- Tooltip.prototype.getTitle = function getTitle() {
+ _proto.getTitle = function getTitle() {
var title = this.element.getAttribute('data-original-title');
if (!title) {
@@ -2838,19 +2773,17 @@ var Tooltip = function () {
}
return title;
- };
+ }; // private
- // private
- Tooltip.prototype._getAttachment = function _getAttachment(placement) {
+ _proto._getAttachment = function _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()];
};
- Tooltip.prototype._setListeners = function _setListeners() {
+ _proto._setListeners = 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, function (event) {
@@ -2859,7 +2792,6 @@ var Tooltip = function () {
} 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, function (event) {
return _this3._enter(event);
}).on(eventOut, _this3.config.selector, function (event) {
@@ -2882,17 +2814,17 @@ var Tooltip = function () {
}
};
- Tooltip.prototype._fixTitle = function _fixTitle() {
- var titleType = _typeof(this.element.getAttribute('data-original-title'));
+ _proto._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', '');
}
};
- Tooltip.prototype._enter = function _enter(event, context) {
+ _proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
-
context = context || $(event.currentTarget).data(dataKey);
if (!context) {
@@ -2910,7 +2842,6 @@ var Tooltip = function () {
}
clearTimeout(context._timeout);
-
context._hoverState = HoverState.SHOW;
if (!context.config.delay || !context.config.delay.show) {
@@ -2925,9 +2856,8 @@ var Tooltip = function () {
}, context.config.delay.show);
};
- Tooltip.prototype._leave = function _leave(event, context) {
+ _proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
-
context = context || $(event.currentTarget).data(dataKey);
if (!context) {
@@ -2944,7 +2874,6 @@ var Tooltip = function () {
}
clearTimeout(context._timeout);
-
context._hoverState = HoverState.OUT;
if (!context.config.delay || !context.config.delay.hide) {
@@ -2959,7 +2888,7 @@ var Tooltip = function () {
}, context.config.delay.hide);
};
- Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {
+ _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
for (var trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true;
@@ -2969,30 +2898,29 @@ var Tooltip = function () {
return false;
};
- Tooltip.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
- if (config.delay && typeof config.delay === 'number') {
+ if (typeof config.delay === 'number') {
config.delay = {
show: config.delay,
hide: config.delay
};
}
- if (config.title && typeof config.title === 'number') {
+ if (typeof config.title === 'number') {
config.title = config.title.toString();
}
- if (config.content && typeof config.content === 'number') {
+ if (typeof config.content === 'number') {
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
-
return config;
};
- Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {
+ _proto._getDelegateConfig = function _getDelegateConfig() {
var config = {};
if (this.config) {
@@ -3006,38 +2934,42 @@ var Tooltip = function () {
return config;
};
- Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
+ _proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
}
};
- Tooltip.prototype._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
+ _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
this._cleanTipClass();
+
this.addAttachmentClass(this._getAttachment(data.placement));
};
- Tooltip.prototype._fixTransition = function _fixTransition() {
+ _proto._fixTransition = function _fixTransition() {
var tip = this.getTipElement();
var initConfigAnimation = this.config.animation;
+
if (tip.getAttribute('x-placement') !== null) {
return;
}
+
$(tip).removeClass(ClassName.FADE);
this.config.animation = false;
this.hide();
this.show();
this.config.animation = initConfigAnimation;
- };
+ }; // static
- // static
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;
+
+ var _config = typeof config === 'object' && config;
if (!data && /dispose|hide/.test(config)) {
return;
@@ -3050,60 +2982,62 @@ var Tooltip = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
};
createClass(Tooltip, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'NAME',
+ key: "NAME",
get: function get() {
return NAME;
}
}, {
- key: 'DATA_KEY',
+ key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}, {
- key: 'Event',
+ key: "Event",
get: function get() {
return Event;
}
}, {
- key: 'EVENT_KEY',
+ key: "EVENT_KEY",
get: function get() {
return EVENT_KEY;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
}]);
return Tooltip;
}();
-
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
@@ -3120,114 +3054,107 @@ var Tooltip = function () {
*/
var Popover = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'popover';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.popover';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
- var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
-
+ var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var Default = $.extend({}, Tooltip.Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
-
var DefaultType = $.extend({}, Tooltip.DefaultType, {
content: '(string|element|function)'
});
-
var ClassName = {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
-
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
- };
+ 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
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Popover = function (_Tooltip) {
- inherits(Popover, _Tooltip);
+ var Popover =
+ /*#__PURE__*/
+ function (_Tooltip) {
+ inheritsLoose(Popover, _Tooltip);
function Popover() {
- classCallCheck(this, Popover);
- return possibleConstructorReturn(this, _Tooltip.apply(this, arguments));
+ return _Tooltip.apply(this, arguments) || this;
}
- // overrides
+ var _proto = Popover.prototype;
- Popover.prototype.isWithContent = function isWithContent() {
+ // overrides
+ _proto.isWithContent = function isWithContent() {
return this.getTitle() || this._getContent();
};
- Popover.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
+ _proto.addAttachmentClass = function addAttachmentClass(attachment) {
+ $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
- Popover.prototype.getTipElement = function getTipElement() {
+ _proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip;
};
- Popover.prototype.setContent = function setContent() {
- var $tip = $(this.getTipElement());
+ _proto.setContent = function setContent() {
+ var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events
- // 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 + " " + ClassName.SHOW);
+ }; // private
- $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
- };
-
- // private
- Popover.prototype._getContent = function _getContent() {
+ _proto._getContent = function _getContent() {
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
};
- Popover.prototype._cleanTipClass = function _cleanTipClass() {
+ _proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
}
- };
+ }; // static
- // static
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;
+
+ var _config = typeof config === 'object' ? config : null;
if (!data && /destroy|hide/.test(config)) {
return;
@@ -3240,64 +3167,63 @@ var Popover = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
};
createClass(Popover, null, [{
- key: 'VERSION',
-
-
+ key: "VERSION",
// getters
-
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'NAME',
+ key: "NAME",
get: function get() {
return NAME;
}
}, {
- key: 'DATA_KEY',
+ key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}, {
- key: 'Event',
+ key: "Event",
get: function get() {
return Event;
}
}, {
- key: 'EVENT_KEY',
+ key: "EVENT_KEY",
get: function get() {
return EVENT_KEY;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
}]);
return Popover;
}(Tooltip);
-
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+
$.fn[NAME] = Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Popover._jQueryInterface;
@@ -3314,111 +3240,97 @@ var Popover = function () {
*/
var ScrollSpy = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'scrollspy';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.scrollspy';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ 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',
ACTIVE: 'active'
};
-
var Selector = {
DATA_SPY: '[data-spy="scroll"]',
ACTIVE: '.active',
NAV_LIST_GROUP: '.nav, .list-group',
NAV_LINKS: '.nav-link',
+ NAV_ITEMS: '.nav-item',
LIST_ITEMS: '.list-group-item',
DROPDOWN: '.dropdown',
DROPDOWN_ITEMS: '.dropdown-item',
DROPDOWN_TOGGLE: '.dropdown-toggle'
};
-
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var ScrollSpy = function () {
+ var ScrollSpy =
+ /*#__PURE__*/
+ function () {
function ScrollSpy(element, config) {
var _this = this;
- 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.LIST_ITEMS + ',') + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);
+ this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
this._offsets = [];
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
-
$(this._scrollElement).on(Event.SCROLL, function (event) {
return _this._process(event);
});
-
this.refresh();
+
this._process();
- }
+ } // getters
- // getters
- // public
+ var _proto = ScrollSpy.prototype;
- ScrollSpy.prototype.refresh = function refresh() {
+ // public
+ _proto.refresh = function refresh() {
var _this2 = 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 = void 0;
+ var target;
var targetSelector = Util.getSelectorFromElement(element);
if (targetSelector) {
@@ -3427,11 +3339,13 @@ var ScrollSpy = function () {
if (target) {
var targetBCR = target.getBoundingClientRect();
+
if (targetBCR.width || targetBCR.height) {
// todo (fat): remove sketch reliance on jQuery position/offset
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
}
}
+
return null;
}).filter(function (item) {
return item;
@@ -3439,14 +3353,14 @@ var ScrollSpy = function () {
return a[0] - b[0];
}).forEach(function (item) {
_this2._offsets.push(item[0]);
+
_this2._targets.push(item[1]);
});
};
- ScrollSpy.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._scrollElement).off(EVENT_KEY);
-
this._element = null;
this._scrollElement = null;
this._config = null;
@@ -3455,42 +3369,44 @@ var ScrollSpy = function () {
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
- };
+ }; // private
- // private
- ScrollSpy.prototype._getConfig = function _getConfig(config) {
+ _proto._getConfig = 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;
+
+ config.target = "#" + id;
}
Util.typeCheckConfig(NAME, config, DefaultType);
-
return config;
};
- ScrollSpy.prototype._getScrollTop = function _getScrollTop() {
+ _proto._getScrollTop = function _getScrollTop() {
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
};
- ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {
+ _proto._getScrollHeight = function _getScrollHeight() {
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
};
- ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
+ _proto._getOffsetHeight = function _getOffsetHeight() {
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
};
- ScrollSpy.prototype._process = function _process() {
+ _proto._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) {
@@ -3503,12 +3419,15 @@ var ScrollSpy = function () {
if (this._activeTarget !== target) {
this._activate(target);
}
+
return;
}
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
this._activeTarget = null;
+
this._clear();
+
return;
}
@@ -3521,17 +3440,17 @@ var ScrollSpy = function () {
}
};
- ScrollSpy.prototype._activate = function _activate(target) {
+ _proto._activate = function _activate(target) {
this._activeTarget = target;
this._clear();
- var queries = this._selector.split(',');
- // eslint-disable-next-line arrow-body-style
+ var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
+
+
queries = queries.map(function (selector) {
- return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
+ return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
});
-
var $link = $(queries.join(','));
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
@@ -3539,10 +3458,12 @@ var ScrollSpy = function () {
$link.addClass(ClassName.ACTIVE);
} else {
// Set triggered link as active
- $link.addClass(ClassName.ACTIVE);
- // Set triggered links parents as active
+ $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
- $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ', ' + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);
+
+ $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
+
+ $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
}
$(this._scrollElement).trigger(Event.ACTIVATE, {
@@ -3550,16 +3471,16 @@ var ScrollSpy = function () {
});
};
- ScrollSpy.prototype._clear = function _clear() {
+ _proto._clear = function _clear() {
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
- };
+ }; // static
- // static
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;
+
+ var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
@@ -3568,42 +3489,43 @@ var ScrollSpy = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
};
createClass(ScrollSpy, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}]);
return ScrollSpy;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(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
@@ -3612,6 +3534,7 @@ var ScrollSpy = function () {
$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy._jQueryInterface;
@@ -3628,29 +3551,25 @@ var ScrollSpy = function () {
*/
var Tab = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'tab';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.tab';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ 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',
@@ -3658,7 +3577,6 @@ var Tab = function () {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
@@ -3667,34 +3585,34 @@ var Tab = function () {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Tab = function () {
+ var Tab =
+ /*#__PURE__*/
+ function () {
function Tab(element) {
- classCallCheck(this, Tab);
-
this._element = element;
- }
+ } // getters
- // getters
- // public
+ var _proto = Tab.prototype;
- Tab.prototype.show = function show() {
+ // public
+ _proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
return;
}
- var target = void 0;
- var previous = void 0;
+ var target;
+ var previous;
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
@@ -3707,7 +3625,6 @@ var Tab = function () {
var hideEvent = $.Event(Event.HIDE, {
relatedTarget: this._element
});
-
var showEvent = $.Event(Event.SHOW, {
relatedTarget: previous
});
@@ -3732,11 +3649,9 @@ var Tab = function () {
var hiddenEvent = $.Event(Event.HIDDEN, {
relatedTarget: _this._element
});
-
var shownEvent = $.Event(Event.SHOWN, {
relatedTarget: previous
});
-
$(previous).trigger(hiddenEvent);
$(_this._element).trigger(shownEvent);
};
@@ -3748,17 +3663,17 @@ var Tab = function () {
}
};
- Tab.prototype.dispose = function dispose() {
+ _proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
- };
+ }; // private
- // private
- Tab.prototype._activate = function _activate(element, container, callback) {
+ _proto._activate = function _activate(element, container, callback) {
var _this2 = this;
- var activeElements = void 0;
+ var activeElements;
+
if (container.nodeName === 'UL') {
activeElements = $(container).find(Selector.ACTIVE_UL);
} else {
@@ -3783,21 +3698,25 @@ var Tab = function () {
}
};
- Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
+ _proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
if (active) {
$(active).removeClass(ClassName.ACTIVE);
-
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName.ACTIVE);
}
- active.setAttribute('aria-expanded', false);
+ if (active.getAttribute('role') === 'tab') {
+ active.setAttribute('aria-selected', false);
+ }
}
$(element).addClass(ClassName.ACTIVE);
- element.setAttribute('aria-expanded', true);
+
+ if (element.getAttribute('role') === 'tab') {
+ element.setAttribute('aria-selected', true);
+ }
if (isTransitioning) {
Util.reflow(element);
@@ -3807,8 +3726,8 @@ var Tab = function () {
}
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);
}
@@ -3819,9 +3738,8 @@ var Tab = function () {
if (callback) {
callback();
}
- };
+ }; // static
- // static
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
@@ -3835,33 +3753,34 @@ var Tab = function () {
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
+ throw new Error("No method named \"" + config + "\"");
}
+
data[config]();
}
});
};
createClass(Tab, null, [{
- key: 'VERSION',
+ key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return Tab;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
+
Tab._jQueryInterface.call($(this), 'show');
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -3870,6 +3789,7 @@ var Tab = function () {
$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME].Constructor = Tab;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tab._jQueryInterface;
@@ -3893,6 +3813,7 @@ var Tab = function () {
var version = $.fn.jquery.split(' ')[0].split('.');
var min = 3;
var max = 4;
+
if (version[0] < min || version[0] >= max) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v3.0.0 but less than v4.0.0');
}
diff --git a/assets/javascripts/bootstrap.min.js b/assets/javascripts/bootstrap.min.js
index f49903d..1db5575 100644
--- a/assets/javascripts/bootstrap.min.js
+++ b/assets/javascripts/bootstrap.min.js
@@ -3,4 +3,4 @@
* Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-var bootstrap=function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var i=function(){function t(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:s.end,delegateType:s.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in a)if("undefined"!=typeof t.style[e])return{end:a[e]};return!1}function r(t){var n=this,i=!1;return e(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},t),this}var s=!1,a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var n=t.getAttribute("data-target");n&&"#"!==n||(n=t.getAttribute("href")||"");try{return e(document).find(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},typeCheckConfig:function(e,i,o){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var s=o[r],a=i[r],l=a&&n(a)?"element":t(a);if(!new RegExp(s).test(l))throw new Error(e.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+s+'".')}}};return s=o(),e.fn.emulateTransitionEnd=r,l.supportsTransitionEnd()&&(e.event.special[l.TRANSITION_END]=i()),l}(jQuery),o="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},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=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}}(),a=function(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)},l=function(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},h=function(){var t="alert",n=e.fn[t],o={DISMISS:'[data-dismiss="alert"]'},a={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",SHOW:"show"},h=function(){function t(e){r(this,t),this._element=e}return t.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.prototype.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},t.prototype._getRootElement=function(t){var n=i.getSelectorFromElement(t),o=!1;return n&&(o=e(n)[0]),o||(o=e(t).closest("."+l.ALERT)[0]),o},t.prototype._triggerCloseEvent=function(t){var n=e.Event(a.CLOSE);return e(t).trigger(n),n},t.prototype._removeElement=function(t){var n=this;e(t).removeClass(l.SHOW),i.supportsTransitionEnd()&&e(t).hasClass(l.FADE)?e(t).one(i.TRANSITION_END,function(e){return n._destroyElement(t,e)}).emulateTransitionEnd(150):this._destroyElement(t)},t.prototype._destroyElement=function(t){e(t).detach().trigger(a.CLOSED).remove()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(a.CLICK_DATA_API,o.DISMISS,h._handleDismiss(new h)),e.fn[t]=h._jQueryInterface,e.fn[t].Constructor=h,e.fn[t].noConflict=function(){return e.fn[t]=n,h._jQueryInterface},h}(jQuery),c=function(){var t="button",n=e.fn[t],i={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},o={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},a={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},l=function(){function t(e){r(this,t),this._element=e}return t.prototype.toggle=function(){var t=!0,n=!0,r=e(this._element).closest(o.DATA_TOGGLE)[0];if(r){var s=e(this._element).find(o.INPUT)[0];if(s){if("radio"===s.type)if(s.checked&&e(this._element).hasClass(i.ACTIVE))t=!1;else{var a=e(r).find(o.ACTIVE)[0];a&&e(a).removeClass(i.ACTIVE)}if(t){if(s.hasAttribute("disabled")||r.hasAttribute("disabled")||s.classList.contains("disabled")||r.classList.contains("disabled"))return;s.checked=!e(this._element).hasClass(i.ACTIVE),e(s).trigger("change")}s.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!e(this._element).hasClass(i.ACTIVE)),t&&e(this._element).toggleClass(i.ACTIVE)},t.prototype.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each(function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(a.CLICK_DATA_API,o.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var n=t.target;e(n).hasClass(i.BUTTON)||(n=e(n).closest(o.BUTTON)),l._jQueryInterface.call(e(n),"toggle")}).on(a.FOCUS_BLUR_DATA_API,o.DATA_TOGGLE_CARROT,function(t){var n=e(t.target).closest(o.BUTTON)[0];e(n).toggleClass(i.FOCUS,/^focus(in)?$/.test(t.type))}),e.fn[t]=l._jQueryInterface,e.fn[t].Constructor=l,e.fn[t].noConflict=function(){return e.fn[t]=n,l._jQueryInterface},l}(jQuery),u=function(){var t="carousel",n="bs.carousel",a="."+n,l=e.fn[t],h={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},u={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},d={SLIDE:"slide"+a,SLID:"slid"+a,KEYDOWN:"keydown"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a,TOUCHEND:"touchend"+a,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},f={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"},p={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"]'},_=function(){function l(t,n){r(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=e(t)[0],this._indicatorsElement=e(this._element).find(p.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(u.NEXT)},l.prototype.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},l.prototype.prev=function(){this._isSliding||this._slide(u.PREV)},l.prototype.pause=function(t){t||(this._isPaused=!0),e(this._element).find(p.NEXT_PREV)[0]&&i.supportsTransitionEnd()&&(i.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.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))},l.prototype.to=function(t){var n=this;this._activeElement=e(this._element).find(p.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(d.SLID,function(){return n.to(t)});else{if(i===t)return this.pause(),void this.cycle();var o=t>i?u.NEXT:u.PREV;this._slide(o,this._items[t])}},l.prototype.dispose=function(){e(this._element).off(a),e.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=e.extend({},h,n),i.typeCheckConfig(t,n,c),n},l.prototype._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(d.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(e(this._element).on(d.MOUSEENTER,function(e){return t.pause(e)}).on(d.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&e(this._element).on(d.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},l.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function(t){return this._items=e.makeArray(e(t).parent().find(p.ITEM)),this._items.indexOf(t)},l.prototype._getItemByDirection=function(t,e){var n=t===u.NEXT,i=t===u.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===u.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(e(this._element).find(p.ACTIVE_ITEM)[0]),r=e.Event(d.SLIDE,{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(r),r},l.prototype._setActiveIndicatorElement=function(t){if(this._indicatorsElement){e(this._indicatorsElement).find(p.ACTIVE).removeClass(f.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&e(n).addClass(f.ACTIVE)}},l.prototype._slide=function(t,n){var o=this,r=e(this._element).find(p.ACTIVE_ITEM)[0],s=this._getItemIndex(r),a=n||r&&this._getItemByDirection(t,r),l=this._getItemIndex(a),h=Boolean(this._interval),c=void 0,_=void 0,g=void 0;if(t===u.NEXT?(c=f.LEFT,_=f.NEXT,g=u.LEFT):(c=f.RIGHT,_=f.PREV,g=u.RIGHT),a&&e(a).hasClass(f.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(a,g).isDefaultPrevented()&&r&&a){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(a);var m=e.Event(d.SLID,{relatedTarget:a,direction:g,from:s,to:l});i.supportsTransitionEnd()&&e(this._element).hasClass(f.SLIDE)?(e(a).addClass(_),i.reflow(a),e(r).addClass(c),e(a).addClass(c),e(r).one(i.TRANSITION_END,function(){e(a).removeClass(c+" "+_).addClass(f.ACTIVE),e(r).removeClass(f.ACTIVE+" "+_+" "+c),o._isSliding=!1,setTimeout(function(){return e(o._element).trigger(m)},0)}).emulateTransitionEnd(600)):(e(r).removeClass(f.ACTIVE),e(a).addClass(f.ACTIVE),this._isSliding=!1,e(this._element).trigger(m)),h&&this.cycle()}},l._jQueryInterface=function(t){return this.each(function(){var i=e(this).data(n),r=e.extend({},h,e(this).data());"object"===("undefined"==typeof t?"undefined":o(t))&&e.extend(r,t);var s="string"==typeof t?t:r.slide;if(i||(i=new l(this,r),e(this).data(n,i)),"number"==typeof t)i.to(t);else if("string"==typeof s){if("undefined"==typeof i[s])throw new Error('No method named "'+s+'"');i[s]()}else r.interval&&(i.pause(),i.cycle())})},l._dataApiClickHandler=function(t){var o=i.getSelectorFromElement(this);if(o){var r=e(o)[0];if(r&&e(r).hasClass(f.CAROUSEL)){var s=e.extend({},e(r).data(),e(this).data()),a=this.getAttribute("data-slide-to");a&&(s.interval=!1),l._jQueryInterface.call(e(r),s),a&&e(r).data(n).to(a),t.preventDefault()}}},s(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return h}}]),l}();return e(document).on(d.CLICK_DATA_API,p.DATA_SLIDE,_._dataApiClickHandler),e(window).on(d.LOAD_DATA_API,function(){e(p.DATA_RIDE).each(function(){var t=e(this);_._jQueryInterface.call(t,t.data())})}),e.fn[t]=_._jQueryInterface,e.fn[t].Constructor=_,e.fn[t].noConflict=function(){return e.fn[t]=l,_._jQueryInterface},_}(jQuery),d=function(){var t="collapse",n="bs.collapse",a=e.fn[t],l={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},c={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},u={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},d={WIDTH:"width",HEIGHT:"height"},f={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},p=function(){function a(t,n){r(this,a),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var o=e(f.DATA_TOGGLE),s=0;s<o.length;s++){var l=o[s],h=i.getSelectorFromElement(l);null!==h&&e(h).filter(t).length>0&&this._triggerArray.push(l)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return a.prototype.toggle=function(){e(this._element).hasClass(u.SHOW)?this.hide():this.show()},a.prototype.show=function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(u.SHOW)){var o=void 0,r=void 0;if(this._parent&&((o=e.makeArray(e(this._parent).children().children(f.ACTIVES))).length||(o=null)),!(o&&(r=e(o).data(n))&&r._isTransitioning)){var s=e.Event(c.SHOW);if(e(this._element).trigger(s),!s.isDefaultPrevented()){o&&(a._jQueryInterface.call(e(o),"hide"),r||e(o).data(n,null));var l=this._getDimension();e(this._element).removeClass(u.COLLAPSE).addClass(u.COLLAPSING),this._element.style[l]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(u.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){e(t._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).addClass(u.SHOW),t._element.style[l]="",t.setTransitioning(!1),e(t._element).trigger(c.SHOWN)};if(i.supportsTransitionEnd()){var d="scroll"+(l[0].toUpperCase()+l.slice(1));e(this._element).one(i.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[d]+"px"}else h()}}}},a.prototype.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(u.SHOW)){var n=e.Event(c.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var o=this._getDimension();if(this._element.style[o]=this._element.getBoundingClientRect()[o]+"px",i.reflow(this._element),e(this._element).addClass(u.COLLAPSING).removeClass(u.COLLAPSE).removeClass(u.SHOW),this._triggerArray.length)for(var r=0;r<this._triggerArray.length;r++){var s=this._triggerArray[r],a=i.getSelectorFromElement(s);null!==a&&(e(a).hasClass(u.SHOW)||e(s).addClass(u.COLLAPSED).attr("aria-expanded",!1))}this.setTransitioning(!0);var l=function(){t.setTransitioning(!1),e(t._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).trigger(c.HIDDEN)};this._element.style[o]="",i.supportsTransitionEnd()?e(this._element).one(i.TRANSITION_END,l).emulateTransitionEnd(600):l()}}},a.prototype.setTransitioning=function(t){this._isTransitioning=t},a.prototype.dispose=function(){e.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a.prototype._getConfig=function(n){return n=e.extend({},l,n),n.toggle=Boolean(n.toggle),i.typeCheckConfig(t,n,h),n},a.prototype._getDimension=function(){return e(this._element).hasClass(d.WIDTH)?d.WIDTH:d.HEIGHT},a.prototype._getParent=function(){var t=this,n=e(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(i).each(function(e,n){t._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n},a.prototype._addAriaAndCollapsedClass=function(t,n){if(t){var i=e(t).hasClass(u.SHOW);n.length&&e(n).toggleClass(u.COLLAPSED,!i).attr("aria-expanded",i)}},a._getTargetFromElement=function(t){var n=i.getSelectorFromElement(t);return n?e(n)[0]:null},a._jQueryInterface=function(t){return this.each(function(){var i=e(this),r=i.data(n),s=e.extend({},l,i.data(),"object"===("undefined"==typeof t?"undefined":o(t))&&t);if(!r&&s.toggle&&/show|hide/.test(t)&&(s.toggle=!1),r||(r=new a(this,s),i.data(n,r)),"string"==typeof t){if("undefined"==typeof r[t])throw new Error('No method named "'+t+'"');r[t]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();return e(document).on(c.CLICK_DATA_API,f.DATA_TOGGLE,function(t){"A"!==t.target.tagName||e.contains(this,t.target)||t.preventDefault();var o=e(this),r=i.getSelectorFromElement(this);e(r).each(function(){var t=e(this),i=t.data(n)?"toggle":o.data();p._jQueryInterface.call(t,i)})}),e.fn[t]=p._jQueryInterface,e.fn[t].Constructor=p,e.fn[t].noConflict=function(){return e.fn[t]=a,p._jQueryInterface},p}(jQuery),f=function(){if("undefined"==typeof n)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var t="dropdown",a="bs.dropdown",l="."+a,h=e.fn[t],c=new RegExp("38|40|27"),u={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,CLICK:"click"+l,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},d={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},f={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},p={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},_={offset:0,flip:!0},g={offset:"(number|string)",flip:"boolean"},m=function(){function h(t,e){r(this,h),this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}return h.prototype.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(d.DISABLED)){var t=h._getParentFromElement(this._element),i=e(this._menu).hasClass(d.SHOW);if(h._clearMenus(),!i){var o={relatedTarget:this._element},r=e.Event(u.SHOW,o);if(e(t).trigger(r),!r.isDefaultPrevented()){var s=this._element;e(t).hasClass(d.DROPUP)&&(e(this._menu).hasClass(d.MENULEFT)||e(this._menu).hasClass(d.MENURIGHT))&&(s=t),this._popper=new n(s,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!e(t).closest(f.NAVBAR_NAV).length&&e("body").children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(d.SHOW),e(t).toggleClass(d.SHOW).trigger(e.Event(u.SHOWN,o))}}}},h.prototype.dispose=function(){e.removeData(this._element,a),e(this._element).off(l),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},h.prototype.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},h.prototype._addEventListeners=function(){var t=this;e(this._element).on(u.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},h.prototype._getConfig=function(n){return n=e.extend({},this.constructor.Default,e(this._element).data(),n),i.typeCheckConfig(t,n,this.constructor.DefaultType),n},h.prototype._getMenuElement=function(){if(!this._menu){var t=h._getParentFromElement(this._element);this._menu=e(t).find(f.MENU)[0]}return this._menu},h.prototype._getPlacement=function(){var t=e(this._element).parent(),n=p.BOTTOM;return t.hasClass(d.DROPUP)?(n=p.TOP,e(this._menu).hasClass(d.MENURIGHT)&&(n=p.TOPEND)):e(this._menu).hasClass(d.MENURIGHT)&&(n=p.BOTTOMEND),n},h.prototype._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},h.prototype._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(t.modifiers.applyStyle={enabled:!this._inNavbar}),t},h._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(a),i="object"===("undefined"==typeof t?"undefined":o(t))?t:null;if(n||(n=new h(this,i),e(this).data(a,n)),"string"==typeof t){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},h._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var n=e.makeArray(e(f.DATA_TOGGLE)),i=0;i<n.length;i++){var o=h._getParentFromElement(n[i]),r=e(n[i]).data(a),s={relatedTarget:n[i]};if(r){var l=r._menu;if(e(o).hasClass(d.SHOW)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&e.contains(o,t.target))){var c=e.Event(u.HIDE,s);e(o).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),n[i].setAttribute("aria-expanded","false"),e(l).removeClass(d.SHOW),e(o).removeClass(d.SHOW).trigger(e.Event(u.HIDDEN,s)))}}}},h._getParentFromElement=function(t){var n=void 0,o=i.getSelectorFromElement(t);return o&&(n=e(o)[0]),n||t.parentNode},h._dataApiKeydownHandler=function(t){if(!(!c.test(t.which)||/button/i.test(t.target.tagName)&&32===t.which||/input|textarea/i.test(t.target.tagName)||(t.preventDefault(),t.stopPropagation(),this.disabled||e(this).hasClass(d.DISABLED)))){var n=h._getParentFromElement(this),i=e(n).hasClass(d.SHOW);if((i||27===t.which&&32===t.which)&&(!i||27!==t.which&&32!==t.which)){var o=e(n).find(f.VISIBLE_ITEMS).get();if(o.length){var r=o.indexOf(t.target);38===t.which&&r>0&&r--,40===t.which&&r<o.length-1&&r++,r<0&&(r=0),o[r].focus()}}else{if(27===t.which){var s=e(n).find(f.DATA_TOGGLE)[0];e(s).trigger("focus")}e(this).trigger("click")}}},s(h,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return _}},{key:"DefaultType",get:function(){return g}}]),h}();return e(document).on(u.KEYDOWN_DATA_API,f.DATA_TOGGLE,m._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.MENU,m._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.KEYUP_DATA_API,m._clearMenus).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),m._jQueryInterface.call(e(this),"toggle")}).on(u.CLICK_DATA_API,f.FORM_CHILD,function(t){t.stopPropagation()}),e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=h,m._jQueryInterface},m}(jQuery),p=function(){var t="modal",n=".bs.modal",a=e.fn[t],l={backdrop:!0,keyboard:!0,focus:!0,show:!0},h={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},u={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},d={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},f=function(){function a(t,n){r(this,a),this._config=this._getConfig(n),this._element=t,this._dialog=e(t).find(d.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return a.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},a.prototype.show=function(t){var n=this;if(!this._isTransitioning){i.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE)&&(this._isTransitioning=!0);var o=e.Event(c.SHOW,{relatedTarget:t});e(this._element).trigger(o),this._isShown||o.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),e(document.body).addClass(u.OPEN),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(c.CLICK_DISMISS,d.DATA_DISMISS,function(t){return n.hide(t)}),e(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){e(n._element).one(c.MOUSEUP_DISMISS,function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(t)}))}},a.prototype.hide=function(t){var n=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var o=i.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE);o&&(this._isTransitioning=!0);var r=e.Event(c.HIDE);e(this._element).trigger(r),this._isShown&&!r.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),e(document).off(c.FOCUSIN),e(this._element).removeClass(u.SHOW),e(this._element).off(c.CLICK_DISMISS),e(this._dialog).off(c.MOUSEDOWN_DISMISS),o?e(this._element).one(i.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal())}},a.prototype.dispose=function(){e.removeData(this._element,"bs.modal"),e(window,document,this._element,this._backdrop).off(n),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},a.prototype.handleUpdate=function(){this._adjustDialog()},a.prototype._getConfig=function(n){return n=e.extend({},l,n),i.typeCheckConfig(t,n,h),n},a.prototype._showElement=function(t){var n=this,o=i.supportsTransitionEnd()&&e(this._element).hasClass(u.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,o&&i.reflow(this._element),e(this._element).addClass(u.SHOW),this._config.focus&&this._enforceFocus();var r=e.Event(c.SHOWN,{relatedTarget:t}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(r)};o?e(this._dialog).one(i.TRANSITION_END,s).emulateTransitionEnd(300):s()},a.prototype._enforceFocus=function(){var t=this;e(document).off(c.FOCUSIN).on(c.FOCUSIN,function(n){document===n.target||t._element===n.target||e(t._element).has(n.target).length||t._element.focus()})},a.prototype._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(c.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(c.KEYDOWN_DISMISS)},a.prototype._setResizeEvent=function(){var t=this;this._isShown?e(window).on(c.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(c.RESIZE)},a.prototype._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(u.OPEN),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(c.HIDDEN)})},a.prototype._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},a.prototype._showBackdrop=function(t){var n=this,o=e(this._element).hasClass(u.FADE)?u.FADE:"";if(this._isShown&&this._config.backdrop){var r=i.supportsTransitionEnd()&&o;if(this._backdrop=document.createElement("div"),this._backdrop.className=u.BACKDROP,o&&e(this._backdrop).addClass(o),e(this._backdrop).appendTo(document.body),e(this._element).on(c.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),r&&i.reflow(this._backdrop),e(this._backdrop).addClass(u.SHOW),!t)return;if(!r)return void t();e(this._backdrop).one(i.TRANSITION_END,t).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(u.SHOW);var s=function(){n._removeBackdrop(),t&&t()};i.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE)?e(this._backdrop).one(i.TRANSITION_END,s).emulateTransitionEnd(150):s()}else t&&t()},a.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")},a.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a.prototype._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a.prototype._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){e(d.FIXED_CONTENT).each(function(n,i){var o=e(i)[0].style.paddingRight,r=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")}),e(d.STICKY_CONTENT).each(function(n,i){var o=e(i)[0].style.marginRight,r=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}),e(d.NAVBAR_TOGGLER).each(function(n,i){var o=e(i)[0].style.marginRight,r=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(r)+t._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=e("body").css("padding-right");e("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},a.prototype._resetScrollbar=function(){e(d.FIXED_CONTENT).each(function(t,n){var i=e(n).data("padding-right");"undefined"!=typeof i&&e(n).css("padding-right",i).removeData("padding-right")}),e(d.STICKY_CONTENT+", "+d.NAVBAR_TOGGLER).each(function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")});var t=e("body").data("padding-right");"undefined"!=typeof t&&e("body").css("padding-right",t).removeData("padding-right")},a.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=u.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},a._jQueryInterface=function(t,n){return this.each(function(){var i=e(this).data("bs.modal"),r=e.extend({},a.Default,e(this).data(),"object"===("undefined"==typeof t?"undefined":o(t))&&t);if(i||(i=new a(this,r),e(this).data("bs.modal",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new Error('No method named "'+t+'"');i[t](n)}else r.show&&i.show(n)})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();return e(document).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(t){var n=this,o=void 0,r=i.getSelectorFromElement(this);r&&(o=e(r)[0]);var s=e(o).data("bs.modal")?"toggle":e.extend({},e(o).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=e(o).one(c.SHOW,function(t){t.isDefaultPrevented()||a.one(c.HIDDEN,function(){e(n).is(":visible")&&n.focus()})});f._jQueryInterface.call(e(o),s,this)}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=a,f._jQueryInterface},f}(jQuery),_=function(){if("undefined"==typeof n)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var t="tooltip",a=".bs.tooltip",l=e.fn[t],h=new RegExp("(^|\\s)bs-tooltip\\S+","g"),c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},u={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},d={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},f={SHOW:"show",OUT:"out"},p={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},_={FADE:"fade",SHOW:"show"},g={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},m={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},E=function(){function l(t,e){r(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(_.SHOW))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var o=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(o);var r=e.contains(this.element.ownerDocument.documentElement,this.element);if(o.isDefaultPrevented()||!r)return;var s=this.getTipElement(),a=i.getUID(this.constructor.NAME);s.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(s).addClass(_.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,c=this._getAttachment(h);this.addAttachmentClass(c);var u=!1===this.config.container?document.body:e(this.config.container);e(s).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(s).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,s,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:g.ARROW}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),e(s).addClass(_.SHOW),"ontouchstart"in document.documentElement&&e("body").children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===f.OUT&&t._leave(null,t)};i.supportsTransitionEnd()&&e(this.tip).hasClass(_.FADE)?e(this.tip).one(i.TRANSITION_END,d).emulateTransitionEnd(l._TRANSITION_DURATION):d()}},l.prototype.hide=function(t){var n=this,o=this.getTipElement(),r=e.Event(this.constructor.Event.HIDE),s=function(){n._hoverState!==f.SHOW&&o.parentNode&&o.parentNode.removeChild(o),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};e(this.element).trigger(r),r.isDefaultPrevented()||(e(o).removeClass(_.SHOW),"ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),this._activeTrigger[m.CLICK]=!1,this._activeTrigger[m.FOCUS]=!1,this._activeTrigger[m.HOVER]=!1,i.supportsTransitionEnd()&&e(this.tip).hasClass(_.FADE)?e(o).one(i.TRANSITION_END,s).emulateTransitionEnd(150):s(),this._hoverState="")},l.prototype.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},l.prototype.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},l.prototype.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(g.TOOLTIP_INNER),this.getTitle()),t.removeClass(_.FADE+" "+_.SHOW)},l.prototype.setElementContent=function(t,n){var i=this.config.html;"object"===("undefined"==typeof n?"undefined":o(n))&&(n.nodeType||n.jquery)?i?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text()):t[i?"html":"text"](n)},l.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},l.prototype._getAttachment=function(t){return u[t.toUpperCase()]},l.prototype._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(n!==m.MANUAL){var i=n===m.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=n===m.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,function(e){return t._enter(e)}).on(o,t.config.selector,function(e){return t._leave(e)})}e(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=e.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var t=o(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",""))},l.prototype._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?m.FOCUS:m.HOVER]=!0),e(n.getTipElement()).hasClass(_.SHOW)||n._hoverState===f.SHOW?n._hoverState=f.SHOW:(clearTimeout(n._timeout),n._hoverState=f.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f.SHOW&&n.show()},n.config.delay.show):n.show())},l.prototype._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?m.FOCUS:m.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=f.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===f.OUT&&n.hide()},n.config.delay.hide):n.hide())},l.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},l.prototype._getConfig=function(n){return(n=e.extend({},this.constructor.Default,e(this.element).data(),n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.title&&"number"==typeof n.title&&(n.title=n.title.toString()),n.content&&"number"==typeof n.content&&(n.content=n.content.toString()),i.typeCheckConfig(t,n,this.constructor.DefaultType),n},l.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},l.prototype._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(h);null!==n&&n.length>0&&t.removeClass(n.join(""))},l.prototype._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},l.prototype._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(_.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},l._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.tooltip"),i="object"===("undefined"==typeof t?"undefined":o(t))&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new l(this,i),e(this).data("bs.tooltip",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},s(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return c}}]),l}();return e.fn[t]=E._jQueryInterface,e.fn[t].Constructor=E,e.fn[t].noConflict=function(){return e.fn[t]=l,E._jQueryInterface},E}(jQuery),g=function(){var t="popover",n=".bs.popover",i=e.fn[t],h=new RegExp("(^|\\s)bs-popover\\S+","g"),c=e.extend({},_.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),u=e.extend({},_.DefaultType,{content:"(string|element|function)"}),d={FADE:"fade",SHOW:"show"},f={TITLE:".popover-header",CONTENT:".popover-body"},p={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,INSERTED:"inserted"+n,CLICK:"click"+n,FOCUSIN:"focusin"+n,FOCUSOUT:"focusout"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n},g=function(i){function _(){return r(this,_),l(this,i.apply(this,arguments))}return a(_,i),_.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},_.prototype.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},_.prototype.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},_.prototype.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(f.TITLE),this.getTitle()),this.setElementContent(t.find(f.CONTENT),this._getContent()),t.removeClass(d.FADE+" "+d.SHOW)},_.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},_.prototype._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(h);null!==n&&n.length>0&&t.removeClass(n.join(""))},_._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.popover"),i="object"===("undefined"==typeof t?"undefined":o(t))?t:null;if((n||!/destroy|hide/.test(t))&&(n||(n=new _(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},s(_,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return c}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return n}},{key:"DefaultType",get:function(){return u}}]),_}(_);return e.fn[t]=g._jQueryInterface,e.fn[t].Constructor=g,e.fn[t].noConflict=function(){return e.fn[t]=i,g._jQueryInterface},g}(jQuery),m=function(){var t="scrollspy",n=e.fn[t],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},c={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d={OFFSET:"offset",POSITION:"position"},f=function(){function n(t,i){var o=this;r(this,n),this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(i),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(h.SCROLL,function(t){return o._process(t)}),this.refresh(),this._process()}return n.prototype.refresh=function(){var t=this,n=this._scrollElement!==this._scrollElement.window?d.POSITION:d.OFFSET,o="auto"===this._config.method?n:this._config.method,r=o===d.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),e.makeArray(e(this._selector)).map(function(t){var n=void 0,s=i.getSelectorFromElement(t);if(s&&(n=e(s)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[e(n)[o]().top+r,s]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},n.prototype.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n.prototype._getConfig=function(n){if("string"!=typeof(n=e.extend({},a,n)).target){var o=e(n.target).attr("id");o||(o=i.getUID(t),e(n.target).attr("id",o)),n.target="#"+o}return i.typeCheckConfig(t,n,l),n},n.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n.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];this._activeTarget!==i&&this._activate(i)}else{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--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},n.prototype._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",");n=n.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var i=e(n.join(","));i.hasClass(c.DROPDOWN_ITEM)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(c.ACTIVE),i.addClass(c.ACTIVE)):(i.addClass(c.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(c.ACTIVE)),e(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:t})},n.prototype._clear=function(){e(this._selector).filter(u.ACTIVE).removeClass(c.ACTIVE)},n._jQueryInterface=function(t){return this.each(function(){var i=e(this).data("bs.scrollspy"),r="object"===("undefined"==typeof t?"undefined":o(t))&&t;if(i||(i=new n(this,r),e(this).data("bs.scrollspy",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new Error('No method named "'+t+'"');i[t]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}}]),n}();return e(window).on(h.LOAD_DATA_API,function(){for(var t=e.makeArray(e(u.DATA_SPY)),n=t.length;n--;){var i=e(t[n]);f._jQueryInterface.call(i,i.data())}}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=n,f._jQueryInterface},f}(jQuery),E=function(){var t=e.fn.tab,n={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},o={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},a={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},l=function(){function t(e){r(this,t),this._element=e}return t.prototype.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(o.ACTIVE)||e(this._element).hasClass(o.DISABLED))){var r=void 0,s=void 0,l=e(this._element).closest(a.NAV_LIST_GROUP)[0],h=i.getSelectorFromElement(this._element);if(l){var c="UL"===l.nodeName?a.ACTIVE_UL:a.ACTIVE;s=e.makeArray(e(l).find(c)),s=s[s.length-1]}var u=e.Event(n.HIDE,{relatedTarget:this._element}),d=e.Event(n.SHOW,{relatedTarget:s});if(s&&e(s).trigger(u),e(this._element).trigger(d),!d.isDefaultPrevented()&&!u.isDefaultPrevented()){h&&(r=e(h)[0]),this._activate(this._element,l);var f=function(){var i=e.Event(n.HIDDEN,{relatedTarget:t._element}),o=e.Event(n.SHOWN,{relatedTarget:s});e(s).trigger(i),e(t._element).trigger(o)};r?this._activate(r,r.parentNode,f):f()}}},t.prototype.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},t.prototype._activate=function(t,n,r){var s=this,l=void 0,h=(l="UL"===n.nodeName?e(n).find(a.ACTIVE_UL):e(n).children(a.ACTIVE))[0],c=r&&i.supportsTransitionEnd()&&h&&e(h).hasClass(o.FADE),u=function(){return s._transitionComplete(t,h,c,r)};h&&c?e(h).one(i.TRANSITION_END,u).emulateTransitionEnd(150):u(),h&&e(h).removeClass(o.SHOW)},t.prototype._transitionComplete=function(t,n,r,s){if(n){e(n).removeClass(o.ACTIVE);var l=e(n.parentNode).find(a.DROPDOWN_ACTIVE_CHILD)[0];l&&e(l).removeClass(o.ACTIVE),n.setAttribute("aria-expanded",!1)}if(e(t).addClass(o.ACTIVE),t.setAttribute("aria-expanded",!0),r?(i.reflow(t),e(t).addClass(o.SHOW)):e(t).removeClass(o.FADE),t.parentNode&&e(t.parentNode).hasClass(o.DROPDOWN_MENU)){var h=e(t).closest(a.DROPDOWN)[0];h&&e(h).find(a.DROPDOWN_TOGGLE).addClass(o.ACTIVE),t.setAttribute("aria-expanded",!0)}s&&s()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new Error('No method named "'+n+'"');o[n]()}})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(n.CLICK_DATA_API,a.DATA_TOGGLE,function(t){t.preventDefault(),l._jQueryInterface.call(e(this),"show")}),e.fn.tab=l._jQueryInterface,e.fn.tab.Constructor=l,e.fn.tab.noConflict=function(){return e.fn.tab=t,l._jQueryInterface},l}(jQuery);return function(){if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<3||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v3.0.0 but less than v4.0.0")}(jQuery),t.Util=i,t.Alert=h,t.Button=c,t.Carousel=u,t.Collapse=d,t.Dropdown=f,t.Modal=p,t.Popover=g,t.Scrollspy=m,t.Tab=E,t.Tooltip=_,t}({},$,Popper); \ No newline at end of file
+var bootstrap=function(t,e,n){"use strict";function i(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)}}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var s=function(){function t(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(){return{bindType:r.end,delegateType:r.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function i(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in o)if("undefined"!=typeof t.style[e])return{end:o[e]};return!1}function s(t){var n=this,i=!1;return e(this).one(a.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||a.triggerTransitionEnd(n)},t),this}var r=!1,o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var n=t.getAttribute("data-target");n&&"#"!==n||(n=t.getAttribute("href")||"");try{return e(document).find(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(r.end)},supportsTransitionEnd:function(){return Boolean(r)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(e,n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var r=i[s],o=n[s],l=o&&a.isElement(o)?"element":t(o);if(!new RegExp(r).test(l))throw new Error(e.toUpperCase()+': Option "'+s+'" provided type "'+l+'" but expected type "'+r+'".')}}};return r=i(),e.fn.emulateTransitionEnd=s,a.supportsTransitionEnd()&&(e.event.special[a.TRANSITION_END]=n()),a}(jQuery),r=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},a=function(){var t="alert",n=e.fn[t],i={DISMISS:'[data-dismiss="alert"]'},o={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},a={ALERT:"alert",FADE:"fade",SHOW:"show"},l=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=s.getSelectorFromElement(t),i=!1;return n&&(i=e(n)[0]),i||(i=e(t).closest("."+a.ALERT)[0]),i},n._triggerCloseEvent=function(t){var n=e.Event(o.CLOSE);return e(t).trigger(n),n},n._removeElement=function(t){var n=this;e(t).removeClass(a.SHOW),s.supportsTransitionEnd()&&e(t).hasClass(a.FADE)?e(t).one(s.TRANSITION_END,function(e){return n._destroyElement(t,e)}).emulateTransitionEnd(150):this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger(o.CLOSED).remove()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),s=i.data("bs.alert");s||(s=new t(this),i.data("bs.alert",s)),"close"===n&&s[n](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(o.CLICK_DATA_API,i.DISMISS,l._handleDismiss(new l)),e.fn[t]=l._jQueryInterface,e.fn[t].Constructor=l,e.fn[t].noConflict=function(){return e.fn[t]=n,l._jQueryInterface},l}(jQuery),l=function(){var t="button",n=e.fn[t],i={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},o={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},a=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,r=e(this._element).closest(s.DATA_TOGGLE)[0];if(r){var o=e(this._element).find(s.INPUT)[0];if(o){if("radio"===o.type)if(o.checked&&e(this._element).hasClass(i.ACTIVE))t=!1;else{var a=e(r).find(s.ACTIVE)[0];a&&e(a).removeClass(i.ACTIVE)}if(t){if(o.hasAttribute("disabled")||r.hasAttribute("disabled")||o.classList.contains("disabled")||r.classList.contains("disabled"))return;o.checked=!e(this._element).hasClass(i.ACTIVE),e(o).trigger("change")}o.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!e(this._element).hasClass(i.ACTIVE)),t&&e(this._element).toggleClass(i.ACTIVE)},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each(function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()})},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(o.CLICK_DATA_API,s.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var n=t.target;e(n).hasClass(i.BUTTON)||(n=e(n).closest(s.BUTTON)),a._jQueryInterface.call(e(n),"toggle")}).on(o.FOCUS_BLUR_DATA_API,s.DATA_TOGGLE_CARROT,function(t){var n=e(t.target).closest(s.BUTTON)[0];e(n).toggleClass(i.FOCUS,/^focus(in)?$/.test(t.type))}),e.fn[t]=a._jQueryInterface,e.fn[t].Constructor=a,e.fn[t].noConflict=function(){return e.fn[t]=n,a._jQueryInterface},a}(jQuery),h=function(){var t="carousel",n="bs.carousel",i="."+n,o=e.fn[t],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},c={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},u={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"},d={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"]'},f=function(){function o(t,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=e(t)[0],this._indicatorsElement=e(this._element).find(d.INDICATORS)[0],this._addEventListeners()}var f=o.prototype;return f.next=function(){this._isSliding||this._slide(h.NEXT)},f.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},f.prev=function(){this._isSliding||this._slide(h.PREV)},f.pause=function(t){t||(this._isPaused=!0),e(this._element).find(d.NEXT_PREV)[0]&&s.supportsTransitionEnd()&&(s.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},f.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))},f.to=function(t){var n=this;this._activeElement=e(this._element).find(d.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(c.SLID,function(){return n.to(t)});else{if(i===t)return this.pause(),void this.cycle();var s=t>i?h.NEXT:h.PREV;this._slide(s,this._items[t])}},f.dispose=function(){e(this._element).off(i),e.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},f._getConfig=function(n){return n=e.extend({},a,n),s.typeCheckConfig(t,n,l),n},f._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(c.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(e(this._element).on(c.MOUSEENTER,function(e){return t.pause(e)}).on(c.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&e(this._element).on(c.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},f._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},f._getItemIndex=function(t){return this._items=e.makeArray(e(t).parent().find(d.ITEM)),this._items.indexOf(t)},f._getItemByDirection=function(t,e){var n=t===h.NEXT,i=t===h.PREV,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===h.PREV?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},f._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),s=this._getItemIndex(e(this._element).find(d.ACTIVE_ITEM)[0]),r=e.Event(c.SLIDE,{relatedTarget:t,direction:n,from:s,to:i});return e(this._element).trigger(r),r},f._setActiveIndicatorElement=function(t){if(this._indicatorsElement){e(this._indicatorsElement).find(d.ACTIVE).removeClass(u.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&e(n).addClass(u.ACTIVE)}},f._slide=function(t,n){var i,r,o,a=this,l=e(this._element).find(d.ACTIVE_ITEM)[0],f=this._getItemIndex(l),_=n||l&&this._getItemByDirection(t,l),g=this._getItemIndex(_),m=Boolean(this._interval);if(t===h.NEXT?(i=u.LEFT,r=u.NEXT,o=h.LEFT):(i=u.RIGHT,r=u.PREV,o=h.RIGHT),_&&e(_).hasClass(u.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(_,o).isDefaultPrevented()&&l&&_){this._isSliding=!0,m&&this.pause(),this._setActiveIndicatorElement(_);var p=e.Event(c.SLID,{relatedTarget:_,direction:o,from:f,to:g});s.supportsTransitionEnd()&&e(this._element).hasClass(u.SLIDE)?(e(_).addClass(r),s.reflow(_),e(l).addClass(i),e(_).addClass(i),e(l).one(s.TRANSITION_END,function(){e(_).removeClass(i+" "+r).addClass(u.ACTIVE),e(l).removeClass(u.ACTIVE+" "+r+" "+i),a._isSliding=!1,setTimeout(function(){return e(a._element).trigger(p)},0)}).emulateTransitionEnd(600)):(e(l).removeClass(u.ACTIVE),e(_).addClass(u.ACTIVE),this._isSliding=!1,e(this._element).trigger(p)),m&&this.cycle()}},o._jQueryInterface=function(t){return this.each(function(){var i=e(this).data(n),s=e.extend({},a,e(this).data());"object"==typeof t&&e.extend(s,t);var r="string"==typeof t?t:s.slide;if(i||(i=new o(this,s),e(this).data(n,i)),"number"==typeof t)i.to(t);else if("string"==typeof r){if("undefined"==typeof i[r])throw new Error('No method named "'+r+'"');i[r]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(t){var i=s.getSelectorFromElement(this);if(i){var r=e(i)[0];if(r&&e(r).hasClass(u.CAROUSEL)){var a=e.extend({},e(r).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(e(r),a),l&&e(r).data(n).to(l),t.preventDefault()}}},r(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}}]),o}();return e(document).on(c.CLICK_DATA_API,d.DATA_SLIDE,f._dataApiClickHandler),e(window).on(c.LOAD_DATA_API,function(){e(d.DATA_RIDE).each(function(){var t=e(this);f._jQueryInterface.call(t,t.data())})}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=o,f._jQueryInterface},f}(jQuery),c=function(){var t="collapse",n="bs.collapse",i=e.fn[t],o={toggle:!0,parent:""},a={toggle:"boolean",parent:"(string|element)"},l={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},h={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},c={WIDTH:"width",HEIGHT:"height"},u={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},d=function(){function i(t,n){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var i=e(u.DATA_TOGGLE),r=0;r<i.length;r++){var o=i[r],a=s.getSelectorFromElement(o);null!==a&&e(a).filter(t).length>0&&this._triggerArray.push(o)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var d=i.prototype;return d.toggle=function(){e(this._element).hasClass(h.SHOW)?this.hide():this.show()},d.show=function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(h.SHOW)){var r,o;if(this._parent&&((r=e.makeArray(e(this._parent).children().children(u.ACTIVES))).length||(r=null)),!(r&&(o=e(r).data(n))&&o._isTransitioning)){var a=e.Event(l.SHOW);if(e(this._element).trigger(a),!a.isDefaultPrevented()){r&&(i._jQueryInterface.call(e(r),"hide"),o||e(r).data(n,null));var c=this._getDimension();e(this._element).removeClass(h.COLLAPSE).addClass(h.COLLAPSING),this._element.style[c]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(h.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var d=function(){e(t._element).removeClass(h.COLLAPSING).addClass(h.COLLAPSE).addClass(h.SHOW),t._element.style[c]="",t.setTransitioning(!1),e(t._element).trigger(l.SHOWN)};if(s.supportsTransitionEnd()){var f="scroll"+(c[0].toUpperCase()+c.slice(1));e(this._element).one(s.TRANSITION_END,d).emulateTransitionEnd(600),this._element.style[c]=this._element[f]+"px"}else d()}}}},d.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(h.SHOW)){var n=e.Event(l.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",s.reflow(this._element),e(this._element).addClass(h.COLLAPSING).removeClass(h.COLLAPSE).removeClass(h.SHOW),this._triggerArray.length)for(var r=0;r<this._triggerArray.length;r++){var o=this._triggerArray[r],a=s.getSelectorFromElement(o);null!==a&&(e(a).hasClass(h.SHOW)||e(o).addClass(h.COLLAPSED).attr("aria-expanded",!1))}this.setTransitioning(!0);var c=function(){t.setTransitioning(!1),e(t._element).removeClass(h.COLLAPSING).addClass(h.COLLAPSE).trigger(l.HIDDEN)};this._element.style[i]="",s.supportsTransitionEnd()?e(this._element).one(s.TRANSITION_END,c).emulateTransitionEnd(600):c()}}},d.setTransitioning=function(t){this._isTransitioning=t},d.dispose=function(){e.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},d._getConfig=function(n){return n=e.extend({},o,n),n.toggle=Boolean(n.toggle),s.typeCheckConfig(t,n,a),n},d._getDimension=function(){return e(this._element).hasClass(c.WIDTH)?c.WIDTH:c.HEIGHT},d._getParent=function(){var t=this,n=null;s.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=e(this._config.parent)[0];var r='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(r).each(function(e,n){t._addAriaAndCollapsedClass(i._getTargetFromElement(n),[n])}),n},d._addAriaAndCollapsedClass=function(t,n){if(t){var i=e(t).hasClass(h.SHOW);n.length&&e(n).toggleClass(h.COLLAPSED,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(t){var n=s.getSelectorFromElement(t);return n?e(n)[0]:null},i._jQueryInterface=function(t){return this.each(function(){var s=e(this),r=s.data(n),a=e.extend({},o,s.data(),"object"==typeof t&&t);if(!r&&a.toggle&&/show|hide/.test(t)&&(a.toggle=!1),r||(r=new i(this,a),s.data(n,r)),"string"==typeof t){if("undefined"==typeof r[t])throw new Error('No method named "'+t+'"');r[t]()}})},r(i,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return o}}]),i}();return e(document).on(l.CLICK_DATA_API,u.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var i=e(this),r=s.getSelectorFromElement(this);e(r).each(function(){var t=e(this),s=t.data(n)?"toggle":i.data();d._jQueryInterface.call(t,s)})}),e.fn[t]=d._jQueryInterface,e.fn[t].Constructor=d,e.fn[t].noConflict=function(){return e.fn[t]=i,d._jQueryInterface},d}(jQuery),u=function(){if("undefined"==typeof n)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var t="dropdown",i="bs.dropdown",o="."+i,a=e.fn[t],l=new RegExp("38|40|27"),h={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},c={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},u={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},d={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},f={offset:0,flip:!0},_={offset:"(number|string)",flip:"boolean"},g=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var g=a.prototype;return g.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(c.DISABLED)){var t=a._getParentFromElement(this._element),i=e(this._menu).hasClass(c.SHOW);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=e.Event(h.SHOW,s);if(e(t).trigger(r),!r.isDefaultPrevented()){var o=this._element;e(t).hasClass(c.DROPUP)&&(e(this._menu).hasClass(c.MENULEFT)||e(this._menu).hasClass(c.MENURIGHT))&&(o=t),this._popper=new n(o,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!e(t).closest(u.NAVBAR_NAV).length&&e("body").children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(c.SHOW),e(t).toggleClass(c.SHOW).trigger(e.Event(h.SHOWN,s))}}}},g.dispose=function(){e.removeData(this._element,i),e(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},g.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},g._addEventListeners=function(){var t=this;e(this._element).on(h.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},g._getConfig=function(n){return n=e.extend({},this.constructor.Default,e(this._element).data(),n),s.typeCheckConfig(t,n,this.constructor.DefaultType),n},g._getMenuElement=function(){if(!this._menu){var t=a._getParentFromElement(this._element);this._menu=e(t).find(u.MENU)[0]}return this._menu},g._getPlacement=function(){var t=e(this._element).parent(),n=d.BOTTOM;return t.hasClass(c.DROPUP)?(n=d.TOP,e(this._menu).hasClass(c.MENURIGHT)&&(n=d.TOPEND)):e(this._menu).hasClass(c.MENURIGHT)&&(n=d.BOTTOMEND),n},g._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},g._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(t.modifiers.applyStyle={enabled:!this._inNavbar}),t},a._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(i),s="object"==typeof t?t:null;if(n||(n=new a(this,s),e(this).data(i,n)),"string"==typeof t){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},a._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var n=e.makeArray(e(u.DATA_TOGGLE)),s=0;s<n.length;s++){var r=a._getParentFromElement(n[s]),o=e(n[s]).data(i),l={relatedTarget:n[s]};if(o){var d=o._menu;if(e(r).hasClass(c.SHOW)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&e.contains(r,t.target))){var f=e.Event(h.HIDE,l);e(r).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),n[s].setAttribute("aria-expanded","false"),e(d).removeClass(c.SHOW),e(r).removeClass(c.SHOW).trigger(e.Event(h.HIDDEN,l)))}}}},a._getParentFromElement=function(t){var n,i=s.getSelectorFromElement(t);return i&&(n=e(i)[0]),n||t.parentNode},a._dataApiKeydownHandler=function(t){if(!(!l.test(t.which)||/button/i.test(t.target.tagName)&&32===t.which||/input|textarea/i.test(t.target.tagName)||(t.preventDefault(),t.stopPropagation(),this.disabled||e(this).hasClass(c.DISABLED)))){var n=a._getParentFromElement(this),i=e(n).hasClass(c.SHOW);if((i||27===t.which&&32===t.which)&&(!i||27!==t.which&&32!==t.which)){var s=e(n).find(u.VISIBLE_ITEMS).get();if(s.length){var r=s.indexOf(t.target);38===t.which&&r>0&&r--,40===t.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}else{if(27===t.which){var o=e(n).find(u.DATA_TOGGLE)[0];e(o).trigger("focus")}e(this).trigger("click")}}},r(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return f}},{key:"DefaultType",get:function(){return _}}]),a}();return e(document).on(h.KEYDOWN_DATA_API,u.DATA_TOGGLE,g._dataApiKeydownHandler).on(h.KEYDOWN_DATA_API,u.MENU,g._dataApiKeydownHandler).on(h.CLICK_DATA_API+" "+h.KEYUP_DATA_API,g._clearMenus).on(h.CLICK_DATA_API,u.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),g._jQueryInterface.call(e(this),"toggle")}).on(h.CLICK_DATA_API,u.FORM_CHILD,function(t){t.stopPropagation()}),e.fn[t]=g._jQueryInterface,e.fn[t].Constructor=g,e.fn[t].noConflict=function(){return e.fn[t]=a,g._jQueryInterface},g}(jQuery),d=function(){var t="modal",n=".bs.modal",i=e.fn[t],o={backdrop:!0,keyboard:!0,focus:!0,show:!0},a={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},l={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},h={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},c={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},u=function(){function i(t,n){this._config=this._getConfig(n),this._element=t,this._dialog=e(t).find(c.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var u=i.prototype;return u.toggle=function(t){return this._isShown?this.hide():this.show(t)},u.show=function(t){var n=this;if(!this._isTransitioning){s.supportsTransitionEnd()&&e(this._element).hasClass(h.FADE)&&(this._isTransitioning=!0);var i=e.Event(l.SHOW,{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),e(document.body).addClass(h.OPEN),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(l.CLICK_DISMISS,c.DATA_DISMISS,function(t){return n.hide(t)}),e(this._dialog).on(l.MOUSEDOWN_DISMISS,function(){e(n._element).one(l.MOUSEUP_DISMISS,function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(t)}))}},u.hide=function(t){var n=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var i=s.supportsTransitionEnd()&&e(this._element).hasClass(h.FADE);i&&(this._isTransitioning=!0);var r=e.Event(l.HIDE);e(this._element).trigger(r),this._isShown&&!r.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),e(document).off(l.FOCUSIN),e(this._element).removeClass(h.SHOW),e(this._element).off(l.CLICK_DISMISS),e(this._dialog).off(l.MOUSEDOWN_DISMISS),i?e(this._element).one(s.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal())}},u.dispose=function(){e.removeData(this._element,"bs.modal"),e(window,document,this._element,this._backdrop).off(n),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},u.handleUpdate=function(){this._adjustDialog()},u._getConfig=function(n){return n=e.extend({},o,n),s.typeCheckConfig(t,n,a),n},u._showElement=function(t){var n=this,i=s.supportsTransitionEnd()&&e(this._element).hasClass(h.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&&s.reflow(this._element),e(this._element).addClass(h.SHOW),this._config.focus&&this._enforceFocus();var r=e.Event(l.SHOWN,{relatedTarget:t}),o=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(r)};i?e(this._dialog).one(s.TRANSITION_END,o).emulateTransitionEnd(300):o()},u._enforceFocus=function(){var t=this;e(document).off(l.FOCUSIN).on(l.FOCUSIN,function(n){document===n.target||t._element===n.target||e(t._element).has(n.target).length||t._element.focus()})},u._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(l.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(l.KEYDOWN_DISMISS)},u._setResizeEvent=function(){var t=this;this._isShown?e(window).on(l.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(l.RESIZE)},u._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(h.OPEN),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(l.HIDDEN)})},u._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},u._showBackdrop=function(t){var n=this,i=e(this._element).hasClass(h.FADE)?h.FADE:"";if(this._isShown&&this._config.backdrop){var r=s.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=h.BACKDROP,i&&e(this._backdrop).addClass(i),e(this._backdrop).appendTo(document.body),e(this._element).on(l.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),r&&s.reflow(this._backdrop),e(this._backdrop).addClass(h.SHOW),!t)return;if(!r)return void t();e(this._backdrop).one(s.TRANSITION_END,t).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(h.SHOW);var o=function(){n._removeBackdrop(),t&&t()};s.supportsTransitionEnd()&&e(this._element).hasClass(h.FADE)?e(this._backdrop).one(s.TRANSITION_END,o).emulateTransitionEnd(150):o()}else t&&t()},u._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")},u._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},u._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},u._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){e(c.FIXED_CONTENT).each(function(n,i){var s=e(i)[0].style.paddingRight,r=e(i).css("padding-right");e(i).data("padding-right",s).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")}),e(c.STICKY_CONTENT).each(function(n,i){var s=e(i)[0].style.marginRight,r=e(i).css("margin-right");e(i).data("margin-right",s).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}),e(c.NAVBAR_TOGGLER).each(function(n,i){var s=e(i)[0].style.marginRight,r=e(i).css("margin-right");e(i).data("margin-right",s).css("margin-right",parseFloat(r)+t._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=e("body").css("padding-right");e("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},u._resetScrollbar=function(){e(c.FIXED_CONTENT).each(function(t,n){var i=e(n).data("padding-right");"undefined"!=typeof i&&e(n).css("padding-right",i).removeData("padding-right")}),e(c.STICKY_CONTENT+", "+c.NAVBAR_TOGGLER).each(function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")});var t=e("body").data("padding-right");"undefined"!=typeof t&&e("body").css("padding-right",t).removeData("padding-right")},u._getScrollbarWidth=function(){var t=document.createElement("div");t.className=h.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},i._jQueryInterface=function(t,n){return this.each(function(){var s=e(this).data("bs.modal"),r=e.extend({},i.Default,e(this).data(),"object"==typeof t&&t);if(s||(s=new i(this,r),e(this).data("bs.modal",s)),"string"==typeof t){if("undefined"==typeof s[t])throw new Error('No method named "'+t+'"');s[t](n)}else r.show&&s.show(n)})},r(i,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return o}}]),i}();return e(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(t){var n,i=this,r=s.getSelectorFromElement(this);r&&(n=e(r)[0]);var o=e(n).data("bs.modal")?"toggle":e.extend({},e(n).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=e(n).one(l.SHOW,function(t){t.isDefaultPrevented()||a.one(l.HIDDEN,function(){e(i).is(":visible")&&i.focus()})});u._jQueryInterface.call(e(n),o,this)}),e.fn[t]=u._jQueryInterface,e.fn[t].Constructor=u,e.fn[t].noConflict=function(){return e.fn[t]=i,u._jQueryInterface},u}(jQuery),f=function(){if("undefined"==typeof n)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var t="tooltip",i=".bs.tooltip",o=e.fn[t],a=new RegExp("(^|\\s)bs-tooltip\\S+","g"),l={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},h={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},c={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},u={SHOW:"show",OUT:"out"},d={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},f={FADE:"fade",SHOW:"show"},_={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},m=function(){function o(t,e){this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var m=o.prototype;return m.enable=function(){this._isEnabled=!0},m.disable=function(){this._isEnabled=!1},m.toggleEnabled=function(){this._isEnabled=!this._isEnabled},m.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(f.SHOW))return void this._leave(null,this);this._enter(null,this)}},m.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},m.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var r=e.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!r)return;var a=this.getTipElement(),l=s.getUID(this.constructor.NAME);a.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&e(a).addClass(f.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,c=this._getAttachment(h);this.addAttachmentClass(c);var d=!1===this.config.container?document.body:e(this.config.container);e(a).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(a).appendTo(d),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,a,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_.ARROW}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),e(a).addClass(f.SHOW),"ontouchstart"in document.documentElement&&e("body").children().on("mouseover",null,e.noop);var g=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===u.OUT&&t._leave(null,t)};s.supportsTransitionEnd()&&e(this.tip).hasClass(f.FADE)?e(this.tip).one(s.TRANSITION_END,g).emulateTransitionEnd(o._TRANSITION_DURATION):g()}},m.hide=function(t){var n=this,i=this.getTipElement(),r=e.Event(this.constructor.Event.HIDE),o=function(){n._hoverState!==u.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};e(this.element).trigger(r),r.isDefaultPrevented()||(e(i).removeClass(f.SHOW),"ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,s.supportsTransitionEnd()&&e(this.tip).hasClass(f.FADE)?e(i).one(s.TRANSITION_END,o).emulateTransitionEnd(150):o(),this._hoverState="")},m.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},m.isWithContent=function(){return Boolean(this.getTitle())},m.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},m.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},m.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(_.TOOLTIP_INNER),this.getTitle()),t.removeClass(f.FADE+" "+f.SHOW)},m.setElementContent=function(t,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text()):t[i?"html":"text"](n)},m.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},m._getAttachment=function(t){return h[t.toUpperCase()]},m._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(n!==g.MANUAL){var i=n===g.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,s=n===g.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,function(e){return t._enter(e)}).on(s,t.config.selector,function(e){return t._leave(e)})}e(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=e.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},m._fixTitle=function(){var t=typeof 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",""))},m._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?g.FOCUS:g.HOVER]=!0),e(n.getTipElement()).hasClass(f.SHOW)||n._hoverState===u.SHOW?n._hoverState=u.SHOW:(clearTimeout(n._timeout),n._hoverState=u.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===u.SHOW&&n.show()},n.config.delay.show):n.show())},m._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?g.FOCUS:g.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=u.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===u.OUT&&n.hide()},n.config.delay.hide):n.hide())},m._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},m._getConfig=function(n){return"number"==typeof(n=e.extend({},this.constructor.Default,e(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),s.typeCheckConfig(t,n,this.constructor.DefaultType),n},m._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},m._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(a);null!==n&&n.length>0&&t.removeClass(n.join(""))},m._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},m._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(f.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},o._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.tooltip"),i="object"==typeof t&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new o(this,i),e(this).data("bs.tooltip",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},r(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return c}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return l}}]),o}();return e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=o,m._jQueryInterface},m}(jQuery),_=function(){var t="popover",n=".bs.popover",i=e.fn[t],s=new RegExp("(^|\\s)bs-popover\\S+","g"),a=e.extend({},f.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),l=e.extend({},f.DefaultType,{content:"(string|element|function)"}),h={FADE:"fade",SHOW:"show"},c={TITLE:".popover-header",CONTENT:".popover-body"},u={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,INSERTED:"inserted"+n,CLICK:"click"+n,FOCUSIN:"focusin"+n,FOCUSOUT:"focusout"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n},d=function(i){function d(){return i.apply(this,arguments)||this}o(d,i);var f=d.prototype;return f.isWithContent=function(){return this.getTitle()||this._getContent()},f.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},f.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},f.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(c.TITLE),this.getTitle()),this.setElementContent(t.find(c.CONTENT),this._getContent()),t.removeClass(h.FADE+" "+h.SHOW)},f._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},f._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(s);null!==n&&n.length>0&&t.removeClass(n.join(""))},d._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/destroy|hide/.test(t))&&(n||(n=new d(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new Error('No method named "'+t+'"');n[t]()}})},r(d,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return u}},{key:"EVENT_KEY",get:function(){return n}},{key:"DefaultType",get:function(){return l}}]),d}(f);return e.fn[t]=d._jQueryInterface,e.fn[t].Constructor=d,e.fn[t].noConflict=function(){return e.fn[t]=i,d._jQueryInterface},d}(jQuery),g=function(){var t="scrollspy",n=e.fn[t],i={offset:10,method:"auto",target:""},o={offset:"number",method:"string",target:"(string|element)"},a={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},l={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},h={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},c={OFFSET:"offset",POSITION:"position"},u=function(){function n(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+h.NAV_LINKS+","+this._config.target+" "+h.LIST_ITEMS+","+this._config.target+" "+h.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(a.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var u=n.prototype;return u.refresh=function(){var t=this,n=this._scrollElement!==this._scrollElement.window?c.POSITION:c.OFFSET,i="auto"===this._config.method?n:this._config.method,r=i===c.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),e.makeArray(e(this._selector)).map(function(t){var n,o=s.getSelectorFromElement(t);if(o&&(n=e(o)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[e(n)[i]().top+r,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},u.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},u._getConfig=function(n){if("string"!=typeof(n=e.extend({},i,n)).target){var r=e(n.target).attr("id");r||(r=s.getUID(t),e(n.target).attr("id",r)),n.target="#"+r}return s.typeCheckConfig(t,n,o),n},u._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},u._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},u._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},u._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];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;)this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t<this._offsets[s+1])&&this._activate(this._targets[s])}},u._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",");n=n.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var i=e(n.join(","));i.hasClass(l.DROPDOWN_ITEM)?(i.closest(h.DROPDOWN).find(h.DROPDOWN_TOGGLE).addClass(l.ACTIVE),i.addClass(l.ACTIVE)):(i.addClass(l.ACTIVE),i.parents(h.NAV_LIST_GROUP).prev(h.NAV_LINKS+", "+h.LIST_ITEMS).addClass(l.ACTIVE),i.parents(h.NAV_LIST_GROUP).prev(h.NAV_ITEMS).children(h.NAV_LINKS).addClass(l.ACTIVE)),e(this._scrollElement).trigger(a.ACTIVATE,{relatedTarget:t})},u._clear=function(){e(this._selector).filter(h.ACTIVE).removeClass(l.ACTIVE)},n._jQueryInterface=function(t){return this.each(function(){var i=e(this).data("bs.scrollspy"),s="object"==typeof t&&t;if(i||(i=new n(this,s),e(this).data("bs.scrollspy",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new Error('No method named "'+t+'"');i[t]()}})},r(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return i}}]),n}();return e(window).on(a.LOAD_DATA_API,function(){for(var t=e.makeArray(e(h.DATA_SPY)),n=t.length;n--;){var i=e(t[n]);u._jQueryInterface.call(i,i.data())}}),e.fn[t]=u._jQueryInterface,e.fn[t].Constructor=u,e.fn[t].noConflict=function(){return e.fn[t]=n,u._jQueryInterface},u}(jQuery),m=function(){var t=e.fn.tab,n={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},i={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},o={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},a=function(){function t(t){this._element=t}var a=t.prototype;return a.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(i.ACTIVE)||e(this._element).hasClass(i.DISABLED))){var r,a,l=e(this._element).closest(o.NAV_LIST_GROUP)[0],h=s.getSelectorFromElement(this._element);if(l){var c="UL"===l.nodeName?o.ACTIVE_UL:o.ACTIVE;a=e.makeArray(e(l).find(c)),a=a[a.length-1]}var u=e.Event(n.HIDE,{relatedTarget:this._element}),d=e.Event(n.SHOW,{relatedTarget:a});if(a&&e(a).trigger(u),e(this._element).trigger(d),!d.isDefaultPrevented()&&!u.isDefaultPrevented()){h&&(r=e(h)[0]),this._activate(this._element,l);var f=function(){var i=e.Event(n.HIDDEN,{relatedTarget:t._element}),s=e.Event(n.SHOWN,{relatedTarget:a});e(a).trigger(i),e(t._element).trigger(s)};r?this._activate(r,r.parentNode,f):f()}}},a.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},a._activate=function(t,n,r){var a,l=this,h=(a="UL"===n.nodeName?e(n).find(o.ACTIVE_UL):e(n).children(o.ACTIVE))[0],c=r&&s.supportsTransitionEnd()&&h&&e(h).hasClass(i.FADE),u=function(){return l._transitionComplete(t,h,c,r)};h&&c?e(h).one(s.TRANSITION_END,u).emulateTransitionEnd(150):u(),h&&e(h).removeClass(i.SHOW)},a._transitionComplete=function(t,n,r,a){if(n){e(n).removeClass(i.ACTIVE);var l=e(n.parentNode).find(o.DROPDOWN_ACTIVE_CHILD)[0];l&&e(l).removeClass(i.ACTIVE),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass(i.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),r?(s.reflow(t),e(t).addClass(i.SHOW)):e(t).removeClass(i.FADE),t.parentNode&&e(t.parentNode).hasClass(i.DROPDOWN_MENU)){var h=e(t).closest(o.DROPDOWN)[0];h&&e(h).find(o.DROPDOWN_TOGGLE).addClass(i.ACTIVE),t.setAttribute("aria-expanded",!0)}a&&a()},t._jQueryInterface=function(n){return this.each(function(){var i=e(this),s=i.data("bs.tab");if(s||(s=new t(this),i.data("bs.tab",s)),"string"==typeof n){if("undefined"==typeof s[n])throw new Error('No method named "'+n+'"');s[n]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();return e(document).on(n.CLICK_DATA_API,o.DATA_TOGGLE,function(t){t.preventDefault(),a._jQueryInterface.call(e(this),"show")}),e.fn.tab=a._jQueryInterface,e.fn.tab.Constructor=a,e.fn.tab.noConflict=function(){return e.fn.tab=t,a._jQueryInterface},a}(jQuery);return function(){if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<3||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v3.0.0 but less than v4.0.0")}(jQuery),t.Util=s,t.Alert=a,t.Button=l,t.Carousel=h,t.Collapse=c,t.Dropdown=u,t.Modal=d,t.Popover=_,t.Scrollspy=g,t.Tab=m,t.Tooltip=f,t}({},$,Popper); \ No newline at end of file
diff --git a/assets/javascripts/bootstrap/alert.js b/assets/javascripts/bootstrap/alert.js
index b3f9db1..5985401 100644
--- a/assets/javascripts/bootstrap/alert.js
+++ b/assets/javascripts/bootstrap/alert.js
@@ -1,8 +1,6 @@
-'use strict';
+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); } }
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -10,159 +8,140 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Alert = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'alert';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.alert';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ CLOSE: "close" + EVENT_KEY,
+ CLOSED: "closed" + EVENT_KEY,
+ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
-
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Alert = function () {
+ var Alert =
+ /*#__PURE__*/
+ function () {
function Alert(element) {
- _classCallCheck(this, Alert);
-
this._element = element;
- }
+ } // getters
- // getters
- _createClass(Alert, [{
- key: 'close',
+ var _proto = Alert.prototype;
+ // public
+ _proto.close = function close(element) {
+ element = element || this._element;
- // public
+ var rootElement = this._getRootElement(element);
- value: function close(element) {
- element = element || this._element;
+ var customEvent = this._triggerCloseEvent(rootElement);
- var rootElement = this._getRootElement(element);
- var customEvent = this._triggerCloseEvent(rootElement);
+ if (customEvent.isDefaultPrevented()) {
+ return;
+ }
- if (customEvent.isDefaultPrevented()) {
- return;
- }
+ this._removeElement(rootElement);
+ };
+
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._element = null;
+ }; // private
+
+
+ _proto._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;
+ _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
+ var closeEvent = $.Event(Event.CLOSE);
+ $(element).trigger(closeEvent);
+ return closeEvent;
+ };
- if (selector) {
- parent = $(selector)[0];
- }
+ _proto._removeElement = function _removeElement(element) {
+ var _this = this;
- if (!parent) {
- parent = $(element).closest('.' + ClassName.ALERT)[0];
- }
+ $(element).removeClass(ClassName.SHOW);
- return parent;
- }
- }, {
- key: '_triggerCloseEvent',
- value: function _triggerCloseEvent(element) {
- var closeEvent = $.Event(Event.CLOSE);
+ if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
+ this._destroyElement(element);
- $(element).trigger(closeEvent);
- return closeEvent;
+ return;
}
- }, {
- key: '_removeElement',
- value: function _removeElement(element) {
- var _this = this;
- $(element).removeClass(ClassName.SHOW);
+ $(element).one(Util.TRANSITION_END, function (event) {
+ return _this._destroyElement(element, event);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ };
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
- this._destroyElement(element);
- return;
- }
+ _proto._destroyElement = function _destroyElement(element) {
+ $(element).detach().trigger(Event.CLOSED).remove();
+ }; // static
- $(element).one(Util.TRANSITION_END, function (event) {
- return _this._destroyElement(element, event);
- }).emulateTransitionEnd(TRANSITION_DURATION);
- }
- }, {
- key: '_destroyElement',
- value: function _destroyElement(element) {
- $(element).detach().trigger(Event.CLOSED).remove();
- }
- // static
+ 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 (config === 'close') {
+ data[config](this);
+ }
+ });
+ };
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ return function (event) {
+ if (event) {
+ event.preventDefault();
+ }
- if (!data) {
- data = new Alert(this);
- $element.data(DATA_KEY, data);
- }
+ alertInstance.close(this);
+ };
+ };
- if (config === 'close') {
- data[config](this);
- }
- });
- }
- }, {
- key: '_handleDismiss',
- value: function _handleDismiss(alertInstance) {
- return function (event) {
- if (event) {
- event.preventDefault();
- }
-
- alertInstance.close(this);
- };
- }
- }, {
- key: 'VERSION',
+ _createClass(Alert, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
@@ -170,15 +149,14 @@ var Alert = function () {
return Alert;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
- $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
+ $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
@@ -187,6 +165,7 @@ var Alert = function () {
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/button.js b/assets/javascripts/bootstrap/button.js
index 9e6bbe4..217fb34 100644
--- a/assets/javascripts/bootstrap/button.js
+++ b/assets/javascripts/bootstrap/button.js
@@ -1,8 +1,6 @@
-'use strict';
+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); } }
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -10,28 +8,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Button = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'button';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.button';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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"]',
@@ -39,102 +32,95 @@ var Button = function () {
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)
- };
+ 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
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Button = function () {
+ var Button =
+ /*#__PURE__*/
+ function () {
function Button(element) {
- _classCallCheck(this, Button);
-
this._element = element;
- }
-
- // getters
+ } // getters
- _createClass(Button, [{
- key: 'toggle',
+ var _proto = Button.prototype;
- // public
+ // public
+ _proto.toggle = function toggle() {
+ var triggerChangeEvent = true;
+ var addAriaPressed = true;
+ var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
- value: function toggle() {
- var triggerChangeEvent = true;
- var addAriaPressed = 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) {
- if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
- return;
- }
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
- $(input).trigger('change');
+ if (triggerChangeEvent) {
+ if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
+ return;
}
- input.focus();
- addAriaPressed = false;
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
+ $(input).trigger('change');
}
- }
- if (addAriaPressed) {
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
+ input.focus();
+ addAriaPressed = false;
}
+ }
- if (triggerChangeEvent) {
- $(this._element).toggleClass(ClassName.ACTIVE);
- }
+ if (addAriaPressed) {
+ 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);
}
+ };
- // static
+ _proto.dispose = 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);
- }
+ Button._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (config === 'toggle') {
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
+ if (!data) {
+ data = new Button(this);
+ $(this).data(DATA_KEY, data);
+ }
+
+ if (config === 'toggle') {
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Button, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
@@ -142,16 +128,15 @@ var Button = function () {
return Button;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
-
var button = event.target;
if (!$(button).hasClass(ClassName.BUTTON)) {
@@ -163,7 +148,6 @@ var Button = function () {
var button = $(event.target).closest(Selector.BUTTON)[0];
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -172,6 +156,7 @@ var Button = function () {
$.fn[NAME] = Button._jQueryInterface;
$.fn[NAME].Constructor = Button;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Button._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js
index 55444d0..16c23a9 100644
--- a/assets/javascripts/bootstrap/carousel.js
+++ b/assets/javascripts/bootstrap/carousel.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,24 +8,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Carousel = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'carousel';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.carousel';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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 TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var Default = {
@@ -39,7 +34,6 @@ var Carousel = function () {
pause: 'hover',
wrap: true
};
-
var DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
@@ -47,25 +41,22 @@ var Carousel = function () {
pause: '(string|boolean)',
wrap: 'boolean'
};
-
var Direction = {
NEXT: 'next',
PREV: 'prev',
LEFT: 'left',
RIGHT: 'right'
};
-
var Event = {
- SLIDE: 'slide' + EVENT_KEY,
- SLID: 'slid' + EVENT_KEY,
- KEYDOWN: 'keydown' + EVENT_KEY,
- MOUSEENTER: 'mouseenter' + EVENT_KEY,
- MOUSELEAVE: 'mouseleave' + EVENT_KEY,
- TOUCHEND: 'touchend' + EVENT_KEY,
- LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
+ SLIDE: "slide" + EVENT_KEY,
+ SLID: "slid" + EVENT_KEY,
+ KEYDOWN: "keydown" + EVENT_KEY,
+ MOUSEENTER: "mouseenter" + EVENT_KEY,
+ MOUSELEAVE: "mouseleave" + EVENT_KEY,
+ TOUCHEND: "touchend" + 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',
@@ -76,7 +67,6 @@ var Carousel = function () {
PREV: 'carousel-item-prev',
ITEM: 'carousel-item'
};
-
var Selector = {
ACTIVE: '.active',
ACTIVE_ITEM: '.active.carousel-item',
@@ -85,417 +75,394 @@ var Carousel = function () {
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Carousel = function () {
+ var Carousel =
+ /*#__PURE__*/
+ function () {
function Carousel(element, config) {
- _classCallCheck(this, Carousel);
-
this._items = null;
this._interval = null;
this._activeElement = null;
-
this._isPaused = false;
this._isSliding = false;
-
this.touchTimeout = null;
-
this._config = this._getConfig(config);
this._element = $(element)[0];
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
this._addEventListeners();
- }
+ } // getters
- // getters
- _createClass(Carousel, [{
- key: 'next',
+ var _proto = Carousel.prototype;
+ // public
+ _proto.next = function next() {
+ if (!this._isSliding) {
+ this._slide(Direction.NEXT);
+ }
+ };
- // public
+ _proto.nextWhenVisible = function nextWhenVisible() {
+ // Don't call next when the page isn't visible
+ // or the carousel or its parent isn't visible
+ if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
+ this.next();
+ }
+ };
- value: function next() {
- if (!this._isSliding) {
- this._slide(Direction.NEXT);
- }
+ _proto.prev = function prev() {
+ if (!this._isSliding) {
+ this._slide(Direction.PREV);
}
- }, {
- key: 'nextWhenVisible',
- value: function nextWhenVisible() {
- // Don't call next when the page isn't visible
- // or the carousel or its parent isn't visible
- if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
- this.next();
- }
+ };
+
+ _proto.pause = function pause(event) {
+ if (!event) {
+ this._isPaused = true;
}
- }, {
- key: 'prev',
- value: function prev() {
- if (!this._isSliding) {
- this._slide(Direction.PREV);
- }
+
+ if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
+ Util.triggerTransitionEnd(this._element);
+ this.cycle(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);
- }
+ clearInterval(this._interval);
+ this._interval = null;
+ };
+ _proto.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((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
- }
+ _proto.to = 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;
}
- }, {
- key: 'to',
- value: function to(index) {
- var _this = this;
- this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
+ if (this._isSliding) {
+ $(this._element).one(Event.SLID, function () {
+ return _this.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.PREV;
- if (this._isSliding) {
- $(this._element).one(Event.SLID, function () {
- return _this.to(index);
- });
- return;
- }
+ this._slide(direction, this._items[index]);
+ };
- if (activeIndex === index) {
- this.pause();
- this.cycle();
- return;
- }
+ _proto.dispose = 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
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
- 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;
- }
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
- // private
+ _proto._addEventListeners = function _addEventListeners() {
+ var _this2 = this;
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
+ if (this._config.keyboard) {
+ $(this._element).on(Event.KEYDOWN, function (event) {
+ return _this2._keydown(event);
+ });
}
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- var _this2 = this;
- if (this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN, function (event) {
- return _this2._keydown(event);
- });
- }
+ if (this._config.pause === 'hover') {
+ $(this._element).on(Event.MOUSEENTER, function (event) {
+ return _this2.pause(event);
+ }).on(Event.MOUSELEAVE, function (event) {
+ return _this2.cycle(event);
+ });
- if (this._config.pause === 'hover') {
- $(this._element).on(Event.MOUSEENTER, function (event) {
- return _this2.pause(event);
- }).on(Event.MOUSELEAVE, function (event) {
- return _this2.cycle(event);
+ if ('ontouchstart' in document.documentElement) {
+ // if it's a touch-enabled device, mouseenter/leave are fired as
+ // part of the mouse compatibility events on first tap - the carousel
+ // would stop cycling until user tapped out of it;
+ // here, we listen for touchend, explicitly pause the carousel
+ // (as if it's the second time we tap on it, mouseenter compat event
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
+ // events to fire) we explicitly restart cycling
+ $(this._element).on(Event.TOUCHEND, function () {
+ _this2.pause();
+
+ if (_this2.touchTimeout) {
+ clearTimeout(_this2.touchTimeout);
+ }
+
+ _this2.touchTimeout = setTimeout(function (event) {
+ return _this2.cycle(event);
+ }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
});
- if ('ontouchstart' in document.documentElement) {
- // if it's a touch-enabled device, mouseenter/leave are fired as
- // part of the mouse compatibility events on first tap - the carousel
- // would stop cycling until user tapped out of it;
- // here, we listen for touchend, explicitly pause the carousel
- // (as if it's the second time we tap on it, mouseenter compat event
- // is NOT fired) and after a timeout (to allow for mouse compatibility
- // events to fire) we explicitly restart cycling
- $(this._element).on(Event.TOUCHEND, function () {
- _this2.pause();
- if (_this2.touchTimeout) {
- clearTimeout(_this2.touchTimeout);
- }
- _this2.touchTimeout = setTimeout(function (event) {
- return _this2.cycle(event);
- }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
- });
- }
}
}
- }, {
- key: '_keydown',
- value: function _keydown(event) {
- if (/input|textarea/i.test(event.target.tagName)) {
- return;
- }
+ };
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
- event.preventDefault();
- this.prev();
- break;
- case ARROW_RIGHT_KEYCODE:
- event.preventDefault();
- this.next();
- break;
- default:
- return;
- }
- }
- }, {
- key: '_getItemIndex',
- value: function _getItemIndex(element) {
- this._items = $.makeArray($(element).parent().find(Selector.ITEM));
- return this._items.indexOf(element);
+ _proto._keydown = function _keydown(event) {
+ if (/input|textarea/i.test(event.target.tagName)) {
+ return;
}
- }, {
- key: '_getItemByDirection',
- value: function _getItemByDirection(direction, activeElement) {
- var isNextDirection = direction === Direction.NEXT;
- var isPrevDirection = direction === Direction.PREV;
- 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.PREV ? -1 : 1;
- var itemIndex = (activeIndex + delta) % this._items.length;
+ switch (event.which) {
+ case ARROW_LEFT_KEYCODE:
+ event.preventDefault();
+ this.prev();
+ break;
+
+ case ARROW_RIGHT_KEYCODE:
+ event.preventDefault();
+ this.next();
+ break;
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ default:
+ return;
}
- }, {
- key: '_triggerSlideEvent',
- value: function _triggerSlideEvent(relatedTarget, eventDirectionName) {
- var targetIndex = this._getItemIndex(relatedTarget);
- var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);
- var slideEvent = $.Event(Event.SLIDE, {
- relatedTarget: relatedTarget,
- direction: eventDirectionName,
- from: fromIndex,
- to: targetIndex
- });
+ };
- $(this._element).trigger(slideEvent);
+ _proto._getItemIndex = function _getItemIndex(element) {
+ this._items = $.makeArray($(element).parent().find(Selector.ITEM));
+ return this._items.indexOf(element);
+ };
- return slideEvent;
- }
- }, {
- key: '_setActiveIndicatorElement',
- value: function _setActiveIndicatorElement(element) {
- if (this._indicatorsElement) {
- $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
+ var isNextDirection = direction === Direction.NEXT;
+ var isPrevDirection = direction === Direction.PREV;
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
+ var activeIndex = this._getItemIndex(activeElement);
- if (nextIndicator) {
- $(nextIndicator).addClass(ClassName.ACTIVE);
- }
- }
+ var lastItemIndex = this._items.length - 1;
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
+
+ if (isGoingToWrap && !this._config.wrap) {
+ return activeElement;
}
- }, {
- key: '_slide',
- value: function _slide(direction, element) {
- var _this3 = this;
-
- var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
- var activeElementIndex = this._getItemIndex(activeElement);
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
- var nextElementIndex = this._getItemIndex(nextElement);
- var isCycling = Boolean(this._interval);
-
- var directionalClassName = void 0;
- var orderClassName = void 0;
- var eventDirectionName = void 0;
-
- if (direction === Direction.NEXT) {
- directionalClassName = ClassName.LEFT;
- orderClassName = ClassName.NEXT;
- eventDirectionName = Direction.LEFT;
- } else {
- directionalClassName = ClassName.RIGHT;
- orderClassName = ClassName.PREV;
- eventDirectionName = Direction.RIGHT;
- }
- if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
- this._isSliding = false;
- return;
- }
+ var delta = direction === Direction.PREV ? -1 : 1;
+ var itemIndex = (activeIndex + delta) % this._items.length;
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ };
- var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (slideEvent.isDefaultPrevented()) {
- return;
- }
+ _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ var targetIndex = this._getItemIndex(relatedTarget);
- if (!activeElement || !nextElement) {
- // some weirdness is happening, so we bail
- return;
- }
+ var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);
- this._isSliding = true;
+ var slideEvent = $.Event(Event.SLIDE, {
+ relatedTarget: relatedTarget,
+ direction: eventDirectionName,
+ from: fromIndex,
+ to: targetIndex
+ });
+ $(this._element).trigger(slideEvent);
+ return slideEvent;
+ };
- if (isCycling) {
- this.pause();
- }
+ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
+ if (this._indicatorsElement) {
+ $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
- this._setActiveIndicatorElement(nextElement);
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
- var slidEvent = $.Event(Event.SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- });
+ if (nextIndicator) {
+ $(nextIndicator).addClass(ClassName.ACTIVE);
+ }
+ }
+ };
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
+ _proto._slide = function _slide(direction, element) {
+ var _this3 = this;
- $(nextElement).addClass(orderClassName);
+ var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
- Util.reflow(nextElement);
+ var activeElementIndex = this._getItemIndex(activeElement);
- $(activeElement).addClass(directionalClassName);
- $(nextElement).addClass(directionalClassName);
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
- $(activeElement).one(Util.TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName + ' ' + orderClassName).addClass(ClassName.ACTIVE);
+ var nextElementIndex = this._getItemIndex(nextElement);
- $(activeElement).removeClass(ClassName.ACTIVE + ' ' + orderClassName + ' ' + directionalClassName);
+ var isCycling = Boolean(this._interval);
+ var directionalClassName;
+ var orderClassName;
+ var eventDirectionName;
- _this3._isSliding = false;
+ if (direction === Direction.NEXT) {
+ directionalClassName = ClassName.LEFT;
+ orderClassName = ClassName.NEXT;
+ eventDirectionName = Direction.LEFT;
+ } else {
+ directionalClassName = ClassName.RIGHT;
+ orderClassName = ClassName.PREV;
+ eventDirectionName = Direction.RIGHT;
+ }
- setTimeout(function () {
- return $(_this3._element).trigger(slidEvent);
- }, 0);
- }).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- $(activeElement).removeClass(ClassName.ACTIVE);
- $(nextElement).addClass(ClassName.ACTIVE);
+ if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
+ this._isSliding = false;
+ return;
+ }
- this._isSliding = false;
- $(this._element).trigger(slidEvent);
- }
+ var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (isCycling) {
- this.cycle();
- }
+ if (slideEvent.isDefaultPrevented()) {
+ return;
}
- // static
+ if (!activeElement || !nextElement) {
+ // some weirdness is happening, so we bail
+ return;
+ }
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = $.extend({}, Default, $(this).data());
+ this._isSliding = true;
- if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
- $.extend(_config, config);
- }
-
- var action = typeof config === 'string' ? config : _config.slide;
+ if (isCycling) {
+ this.pause();
+ }
- if (!data) {
- data = new Carousel(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ this._setActiveIndicatorElement(nextElement);
+
+ var slidEvent = $.Event(Event.SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
+
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
+ $(nextElement).addClass(orderClassName);
+ Util.reflow(nextElement);
+ $(activeElement).addClass(directionalClassName);
+ $(nextElement).addClass(directionalClassName);
+ $(activeElement).one(Util.TRANSITION_END, function () {
+ $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
+ $(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
+ _this3._isSliding = false;
+ setTimeout(function () {
+ return $(_this3._element).trigger(slidEvent);
+ }, 0);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ $(activeElement).removeClass(ClassName.ACTIVE);
+ $(nextElement).addClass(ClassName.ACTIVE);
+ this._isSliding = false;
+ $(this._element).trigger(slidEvent);
+ }
- if (typeof config === 'number') {
- data.to(config);
- } else if (typeof action === 'string') {
- if (typeof data[action] === 'undefined') {
- throw new Error('No method named "' + action + '"');
- }
- data[action]();
- } else if (_config.interval) {
- data.pause();
- data.cycle();
- }
- });
+ if (isCycling) {
+ this.cycle();
}
- }, {
- key: '_dataApiClickHandler',
- value: function _dataApiClickHandler(event) {
- var selector = Util.getSelectorFromElement(this);
+ }; // static
- if (!selector) {
- return;
- }
- var target = $(selector)[0];
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
- return;
+ var _config = $.extend({}, Default, $(this).data());
+
+ if (typeof config === 'object') {
+ $.extend(_config, config);
}
- var config = $.extend({}, $(target).data(), $(this).data());
- var slideIndex = this.getAttribute('data-slide-to');
+ var action = typeof config === 'string' ? config : _config.slide;
- if (slideIndex) {
- config.interval = false;
+ if (!data) {
+ data = new Carousel(this, _config);
+ $(this).data(DATA_KEY, data);
}
- Carousel._jQueryInterface.call($(target), config);
+ if (typeof config === 'number') {
+ data.to(config);
+ } else if (typeof action === 'string') {
+ if (typeof data[action] === 'undefined') {
+ throw new Error("No method named \"" + action + "\"");
+ }
- if (slideIndex) {
- $(target).data(DATA_KEY).to(slideIndex);
+ data[action]();
+ } else if (_config.interval) {
+ data.pause();
+ data.cycle();
}
+ });
+ };
- event.preventDefault();
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
+ var selector = Util.getSelectorFromElement(this);
+
+ if (!selector) {
+ return;
}
- }, {
- key: 'VERSION',
+
+ 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();
+ };
+
+ _createClass(Carousel, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
@@ -503,22 +470,21 @@ var Carousel = function () {
return Carousel;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
+ $(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
@@ -527,6 +493,7 @@ var Carousel = function () {
$.fn[NAME] = Carousel._jQueryInterface;
$.fn[NAME].Constructor = Carousel;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/collapse.js b/assets/javascripts/bootstrap/collapse.js
index 70941b4..6c406bd 100644
--- a/assets/javascripts/bootstrap/collapse.js
+++ b/assets/javascripts/bootstrap/collapse.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,76 +8,69 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Collapse = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'collapse';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.collapse';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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'
+ parent: '(string|element)'
};
-
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
+ 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 = {
SHOW: 'show',
COLLAPSE: 'collapse',
COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed'
};
-
var Dimension = {
WIDTH: 'width',
HEIGHT: 'height'
};
-
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Collapse = function () {
+ var Collapse =
+ /*#__PURE__*/
+ 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._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var tabToggles = $(Selector.DATA_TOGGLE);
+
for (var i = 0; i < tabToggles.length; i++) {
var elem = tabToggles[i];
var selector = Util.getSelectorFromElement(elem);
+
if (selector !== null && $(selector).filter(element).length > 0) {
this._triggerArray.push(elem);
}
@@ -96,247 +85,243 @@ var Collapse = function () {
if (this._config.toggle) {
this.toggle();
}
- }
+ } // getters
- // getters
- _createClass(Collapse, [{
- key: 'toggle',
+ var _proto = Collapse.prototype;
+ // public
+ _proto.toggle = function toggle() {
+ if ($(this._element).hasClass(ClassName.SHOW)) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ };
- // public
+ _proto.show = function show() {
+ var _this = this;
- value: function toggle() {
- if ($(this._element).hasClass(ClassName.SHOW)) {
- this.hide();
- } else {
- this.show();
- }
+ if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
+ return;
}
- }, {
- key: 'show',
- value: function show() {
- var _this = this;
- if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
- return;
- }
+ var actives;
+ var activesData;
- var actives = void 0;
- var activesData = void 0;
+ if (this._parent) {
+ actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
- if (this._parent) {
- actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
- if (!actives.length) {
- actives = null;
- }
+ if (!actives.length) {
+ actives = null;
}
+ }
- if (actives) {
- activesData = $(actives).data(DATA_KEY);
- if (activesData && activesData._isTransitioning) {
- return;
- }
- }
+ if (actives) {
+ activesData = $(actives).data(DATA_KEY);
- var startEvent = $.Event(Event.SHOW);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
+ if (activesData && activesData._isTransitioning) {
return;
}
+ }
- if (actives) {
- Collapse._jQueryInterface.call($(actives), 'hide');
- if (!activesData) {
- $(actives).data(DATA_KEY, null);
- }
- }
-
- var dimension = this._getDimension();
+ var startEvent = $.Event(Event.SHOW);
+ $(this._element).trigger(startEvent);
- $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- this._element.style[dimension] = 0;
+ if (actives) {
+ Collapse._jQueryInterface.call($(actives), 'hide');
- if (this._triggerArray.length) {
- $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
+ if (!activesData) {
+ $(actives).data(DATA_KEY, null);
}
+ }
- this.setTransitioning(true);
+ var dimension = this._getDimension();
- var complete = function complete() {
- $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
+ $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
+ this._element.style[dimension] = 0;
- _this._element.style[dimension] = '';
+ if (this._triggerArray.length) {
+ $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
+ }
- _this.setTransitioning(false);
+ this.setTransitioning(true);
- $(_this._element).trigger(Event.SHOWN);
- };
+ var complete = function complete() {
+ $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
+ _this._element.style[dimension] = '';
- if (!Util.supportsTransitionEnd()) {
- complete();
- return;
- }
+ _this.setTransitioning(false);
+
+ $(_this._element).trigger(Event.SHOWN);
+ };
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = 'scroll' + capitalizedDimension;
+ if (!Util.supportsTransitionEnd()) {
+ complete();
+ return;
+ }
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
+ var scrollSize = "scroll" + capitalizedDimension;
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ this._element.style[dimension] = this._element[scrollSize] + "px";
+ };
- this._element.style[dimension] = this._element[scrollSize] + 'px';
+ _proto.hide = function hide() {
+ var _this2 = this;
+
+ if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
+ return;
}
- }, {
- key: 'hide',
- value: function hide() {
- var _this2 = this;
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
- return;
- }
+ var startEvent = $.Event(Event.HIDE);
+ $(this._element).trigger(startEvent);
- var startEvent = $.Event(Event.HIDE);
- $(this._element).trigger(startEvent);
- if (startEvent.isDefaultPrevented()) {
- return;
- }
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- var dimension = this._getDimension();
+ var dimension = this._getDimension();
- this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + 'px';
+ this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
+ Util.reflow(this._element);
+ $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
- Util.reflow(this._element);
+ if (this._triggerArray.length) {
+ for (var i = 0; i < this._triggerArray.length; i++) {
+ var trigger = this._triggerArray[i];
+ var selector = Util.getSelectorFromElement(trigger);
- $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
+ if (selector !== null) {
+ var $elem = $(selector);
- if (this._triggerArray.length) {
- for (var i = 0; i < this._triggerArray.length; i++) {
- var trigger = this._triggerArray[i];
- var selector = Util.getSelectorFromElement(trigger);
- if (selector !== null) {
- var $elem = $(selector);
- if (!$elem.hasClass(ClassName.SHOW)) {
- $(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
- }
+ if (!$elem.hasClass(ClassName.SHOW)) {
+ $(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
}
}
}
+ }
- this.setTransitioning(true);
+ this.setTransitioning(true);
- var complete = function complete() {
- _this2.setTransitioning(false);
- $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
- };
+ var complete = function complete() {
+ _this2.setTransitioning(false);
- this._element.style[dimension] = '';
+ $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
+ };
- if (!Util.supportsTransitionEnd()) {
- complete();
- return;
- }
+ this._element.style[dimension] = '';
- $(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);
-
- this._config = null;
- this._parent = null;
- this._element = null;
- this._triggerArray = null;
- this._isTransitioning = null;
+ if (!Util.supportsTransitionEnd()) {
+ complete();
+ return;
}
- // private
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ };
- }, {
- 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 _this3 = this;
+ _proto.setTransitioning = function setTransitioning(isTransitioning) {
+ this._isTransitioning = isTransitioning;
+ };
- var parent = $(this._config.parent)[0];
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._config = null;
+ this._parent = null;
+ this._element = null;
+ this._triggerArray = null;
+ this._isTransitioning = null;
+ }; // private
- $(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.SHOW);
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ config.toggle = Boolean(config.toggle); // coerce string values
- if (triggerArray.length) {
- $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
- }
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
+
+ _proto._getDimension = function _getDimension() {
+ var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
+ };
+
+ _proto._getParent = function _getParent() {
+ var _this3 = this;
+
+ var parent = null;
+
+ if (Util.isElement(this._config.parent)) {
+ parent = this._config.parent; // it's a jQuery object
+
+ if (typeof this._config.parent.jquery !== 'undefined') {
+ parent = this._config.parent[0];
}
+ } else {
+ parent = $(this._config.parent)[0];
}
- // static
+ 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;
+ };
+
+ _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
+ if (element) {
+ var isOpen = $(element).hasClass(ClassName.SHOW);
- }], [{
- key: '_getTargetFromElement',
- value: function _getTargetFromElement(element) {
- var selector = Util.getSelectorFromElement(element);
- return selector ? $(selector)[0] : null;
+ if (triggerArray.length) {
+ $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
+ }
}
- }, {
- 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 === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
-
- if (!data && _config.toggle && /show|hide/.test(config)) {
- _config.toggle = false;
- }
+ }; // static
- if (!data) {
- data = new Collapse(this, _config);
- $this.data(DATA_KEY, data);
- }
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ Collapse._getTargetFromElement = function _getTargetFromElement(element) {
+ var selector = Util.getSelectorFromElement(element);
+ return selector ? $(selector)[0] : null;
+ };
+
+ 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 === '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 (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- });
- }
- }, {
- key: 'VERSION',
+
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Collapse, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
@@ -344,16 +329,16 @@ var Collapse = function () {
return Collapse;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.target.tagName === 'A' && !$.contains(this, event.target)) {
+ if (event.currentTarget.tagName === 'A') {
event.preventDefault();
}
@@ -363,10 +348,10 @@ var Collapse = function () {
var $target = $(this);
var data = $target.data(DATA_KEY);
var config = data ? 'toggle' : $trigger.data();
+
Collapse._jQueryInterface.call($target, config);
});
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -375,6 +360,7 @@ var Collapse = function () {
$.fn[NAME] = Collapse._jQueryInterface;
$.fn[NAME].Constructor = Collapse;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/dropdown.js b/assets/javascripts/bootstrap/dropdown.js
index 0c739de..18af2d3 100644
--- a/assets/javascripts/bootstrap/dropdown.js
+++ b/assets/javascripts/bootstrap/dropdown.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,9 +8,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Dropdown = function () {
-
/**
* Check for Popper dependency
* Popper - https://popper.js.org
@@ -22,38 +16,42 @@ var Dropdown = function () {
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
}
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
+
var NAME = 'dropdown';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.dropdown';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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 SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
+
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab 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 REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + '|' + ARROW_DOWN_KEYCODE + '|' + ESCAPE_KEYCODE);
+ var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
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,
- KEYUP_DATA_API: 'keyup' + EVENT_KEY + DATA_API_KEY
+ 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,
+ KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
};
-
var ClassName = {
DISABLED: 'disabled',
SHOW: 'show',
@@ -61,7 +59,6 @@ var Dropdown = function () {
MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left'
};
-
var Selector = {
DATA_TOGGLE: '[data-toggle="dropdown"]',
FORM_CHILD: '.dropdown form',
@@ -69,34 +66,31 @@ var Dropdown = function () {
NAVBAR_NAV: '.navbar-nav',
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
};
-
var AttachmentMap = {
TOP: 'top-start',
TOPEND: 'top-end',
BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end'
};
-
var Default = {
offset: 0,
flip: true
};
-
var DefaultType = {
offset: '(number|string)',
flip: 'boolean'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Dropdown = function () {
+ var Dropdown =
+ /*#__PURE__*/
+ function () {
function Dropdown(element, config) {
- _classCallCheck(this, Dropdown);
-
this._element = element;
this._popper = null;
this._config = this._getConfig(config);
@@ -104,306 +98,299 @@ var Dropdown = function () {
this._inNavbar = this._detectNavbar();
this._addEventListeners();
- }
-
- // getters
+ } // getters
- _createClass(Dropdown, [{
- key: 'toggle',
+ var _proto = Dropdown.prototype;
- // public
+ // public
+ _proto.toggle = function toggle() {
+ if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
+ return;
+ }
- value: function toggle() {
- if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
- return;
- }
+ var parent = Dropdown._getParentFromElement(this._element);
- var parent = Dropdown._getParentFromElement(this._element);
- var isActive = $(this._menu).hasClass(ClassName.SHOW);
+ var isActive = $(this._menu).hasClass(ClassName.SHOW);
- Dropdown._clearMenus();
+ Dropdown._clearMenus();
- if (isActive) {
- return;
- }
+ if (isActive) {
+ return;
+ }
- var relatedTarget = {
- relatedTarget: this._element
- };
- var showEvent = $.Event(Event.SHOW, relatedTarget);
+ var relatedTarget = {
+ relatedTarget: this._element
+ };
+ var showEvent = $.Event(Event.SHOW, relatedTarget);
+ $(parent).trigger(showEvent);
- $(parent).trigger(showEvent);
+ if (showEvent.isDefaultPrevented()) {
+ return;
+ }
- if (showEvent.isDefaultPrevented()) {
- return;
- }
+ var element = this._element; // for dropup with alignment we use the parent as popper container
- var element = this._element;
- // for dropup with alignment we use the parent as popper container
- if ($(parent).hasClass(ClassName.DROPUP)) {
- if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {
- element = parent;
- }
- }
- this._popper = new Popper(element, this._menu, this._getPopperConfig());
-
- // if this is a touch-enabled device we add extra
- // empty mouseover listeners to the body's immediate children;
- // only needed because of broken event delegation on iOS
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
- $('body').children().on('mouseover', null, $.noop);
+ if ($(parent).hasClass(ClassName.DROPUP)) {
+ if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {
+ element = parent;
}
+ }
- this._element.focus();
- this._element.setAttribute('aria-expanded', true);
+ this._popper = new Popper(element, this._menu, this._getPopperConfig()); // if this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- $(this._menu).toggleClass(ClassName.SHOW);
- $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._element).off(EVENT_KEY);
- this._element = null;
- this._menu = null;
- if (this._popper !== null) {
- this._popper.destroy();
- }
- this._popper = null;
+ if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
+ $('body').children().on('mouseover', null, $.noop);
}
- }, {
- key: 'update',
- value: function update() {
- this._inNavbar = this._detectNavbar();
- if (this._popper !== null) {
- this._popper.scheduleUpdate();
- }
+
+ this._element.focus();
+
+ this._element.setAttribute('aria-expanded', true);
+
+ $(this._menu).toggleClass(ClassName.SHOW);
+ $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
+ };
+
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ $(this._element).off(EVENT_KEY);
+ this._element = null;
+ this._menu = null;
+
+ if (this._popper !== null) {
+ this._popper.destroy();
}
- // private
+ this._popper = null;
+ };
- }, {
- key: '_addEventListeners',
- value: function _addEventListeners() {
- var _this = this;
-
- $(this._element).on(Event.CLICK, function (event) {
- event.preventDefault();
- event.stopPropagation();
- _this.toggle();
- });
+ _proto.update = function update() {
+ this._inNavbar = this._detectNavbar();
+
+ if (this._popper !== null) {
+ this._popper.scheduleUpdate();
}
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
+ }; // private
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
- return config;
+ _proto._addEventListeners = function _addEventListeners() {
+ var _this = this;
+
+ $(this._element).on(Event.CLICK, function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ _this.toggle();
+ });
+ };
+
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ return config;
+ };
+
+ _proto._getMenuElement = function _getMenuElement() {
+ if (!this._menu) {
+ var parent = Dropdown._getParentFromElement(this._element);
+
+ this._menu = $(parent).find(Selector.MENU)[0];
}
- }, {
- key: '_getMenuElement',
- value: function _getMenuElement() {
- if (!this._menu) {
- var parent = Dropdown._getParentFromElement(this._element);
- this._menu = $(parent).find(Selector.MENU)[0];
+
+ return this._menu;
+ };
+
+ _proto._getPlacement = function _getPlacement() {
+ var $parentDropdown = $(this._element).parent();
+ var placement = AttachmentMap.BOTTOM; // Handle dropup
+
+ if ($parentDropdown.hasClass(ClassName.DROPUP)) {
+ placement = AttachmentMap.TOP;
+
+ if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
+ placement = AttachmentMap.TOPEND;
}
- return this._menu;
+ } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
+ placement = AttachmentMap.BOTTOMEND;
}
- }, {
- key: '_getPlacement',
- value: function _getPlacement() {
- var $parentDropdown = $(this._element).parent();
- var placement = AttachmentMap.BOTTOM;
-
- // Handle dropup
- if ($parentDropdown.hasClass(ClassName.DROPUP)) {
- placement = AttachmentMap.TOP;
- if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
- placement = AttachmentMap.TOPEND;
+
+ return placement;
+ };
+
+ _proto._detectNavbar = function _detectNavbar() {
+ return $(this._element).closest('.navbar').length > 0;
+ };
+
+ _proto._getPopperConfig = function _getPopperConfig() {
+ var popperConfig = {
+ placement: this._getPlacement(),
+ modifiers: {
+ offset: {
+ offset: this._config.offset
+ },
+ flip: {
+ enabled: this._config.flip
}
- } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
- placement = AttachmentMap.BOTTOMEND;
- }
- return placement;
- }
- }, {
- key: '_detectNavbar',
- value: function _detectNavbar() {
- return $(this._element).closest('.navbar').length > 0;
+ } // Disable Popper.js for Dropdown in Navbar
+
+ };
+
+ if (this._inNavbar) {
+ popperConfig.modifiers.applyStyle = {
+ enabled: !this._inNavbar
+ };
}
- }, {
- key: '_getPopperConfig',
- value: function _getPopperConfig() {
- var popperConfig = {
- placement: this._getPlacement(),
- modifiers: {
- offset: {
- offset: this._config.offset
- },
- flip: {
- enabled: this._config.flip
- }
+
+ return popperConfig;
+ }; // static
+
+
+ Dropdown._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+
+ var _config = typeof config === 'object' ? config : null;
+
+ if (!data) {
+ data = new Dropdown(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
+
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- };
- // Disable Popper.js for Dropdown in Navbar
- if (this._inNavbar) {
- popperConfig.modifiers.applyStyle = {
- enabled: !this._inNavbar
- };
+ data[config]();
}
- return popperConfig;
+ });
+ };
+
+ Dropdown._clearMenus = function _clearMenus(event) {
+ if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
+ return;
}
- // static
+ var toggles = $.makeArray($(Selector.DATA_TOGGLE));
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
+ for (var i = 0; i < toggles.length; i++) {
+ var parent = Dropdown._getParentFromElement(toggles[i]);
- if (!data) {
- data = new Dropdown(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ var context = $(toggles[i]).data(DATA_KEY);
+ var relatedTarget = {
+ relatedTarget: toggles[i]
+ };
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: '_clearMenus',
- value: function _clearMenus(event) {
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
- return;
+ if (!context) {
+ continue;
}
- var toggles = $.makeArray($(Selector.DATA_TOGGLE));
- for (var i = 0; i < toggles.length; i++) {
- var parent = Dropdown._getParentFromElement(toggles[i]);
- var context = $(toggles[i]).data(DATA_KEY);
- var relatedTarget = {
- relatedTarget: toggles[i]
- };
-
- if (!context) {
- continue;
- }
+ var dropdownMenu = context._menu;
- var dropdownMenu = context._menu;
- if (!$(parent).hasClass(ClassName.SHOW)) {
- continue;
- }
+ if (!$(parent).hasClass(ClassName.SHOW)) {
+ continue;
+ }
- if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
- continue;
- }
+ if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
+ continue;
+ }
- var hideEvent = $.Event(Event.HIDE, relatedTarget);
- $(parent).trigger(hideEvent);
- if (hideEvent.isDefaultPrevented()) {
- continue;
- }
+ var hideEvent = $.Event(Event.HIDE, relatedTarget);
+ $(parent).trigger(hideEvent);
- // if this is a touch-enabled device we remove the extra
- // empty mouseover listeners we added for iOS support
- if ('ontouchstart' in document.documentElement) {
- $('body').children().off('mouseover', null, $.noop);
- }
+ if (hideEvent.isDefaultPrevented()) {
+ continue;
+ } // if this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
- toggles[i].setAttribute('aria-expanded', 'false');
- $(dropdownMenu).removeClass(ClassName.SHOW);
- $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
+ if ('ontouchstart' in document.documentElement) {
+ $('body').children().off('mouseover', null, $.noop);
}
+
+ toggles[i].setAttribute('aria-expanded', 'false');
+ $(dropdownMenu).removeClass(ClassName.SHOW);
+ $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
}
- }, {
- key: '_getParentFromElement',
- value: function _getParentFromElement(element) {
- var parent = void 0;
- var selector = Util.getSelectorFromElement(element);
+ };
- if (selector) {
- parent = $(selector)[0];
- }
+ Dropdown._getParentFromElement = function _getParentFromElement(element) {
+ var parent;
+ var selector = Util.getSelectorFromElement(element);
- return parent || element.parentNode;
+ if (selector) {
+ parent = $(selector)[0];
}
- }, {
- key: '_dataApiKeydownHandler',
- value: function _dataApiKeydownHandler(event) {
- if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) {
- return;
- }
- event.preventDefault();
- event.stopPropagation();
+ return parent || element.parentNode;
+ };
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
- return;
- }
+ Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
+ if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) {
+ return;
+ }
- var parent = Dropdown._getParentFromElement(this);
- var isActive = $(parent).hasClass(ClassName.SHOW);
+ event.preventDefault();
+ event.stopPropagation();
- if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
+ return;
+ }
- if (event.which === ESCAPE_KEYCODE) {
- var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
- $(toggle).trigger('focus');
- }
+ var parent = Dropdown._getParentFromElement(this);
- $(this).trigger('click');
- return;
+ var isActive = $(parent).hasClass(ClassName.SHOW);
+
+ if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
+ if (event.which === ESCAPE_KEYCODE) {
+ var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
+ $(toggle).trigger('focus');
}
- var items = $(parent).find(Selector.VISIBLE_ITEMS).get();
+ $(this).trigger('click');
+ return;
+ }
- if (!items.length) {
- return;
- }
+ var items = $(parent).find(Selector.VISIBLE_ITEMS).get();
- var index = items.indexOf(event.target);
+ if (!items.length) {
+ return;
+ }
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
- // up
- index--;
- }
+ var index = items.indexOf(event.target);
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
- // down
- index++;
- }
+ if (event.which === ARROW_UP_KEYCODE && index > 0) {
+ // up
+ index--;
+ }
- if (index < 0) {
- index = 0;
- }
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
+ // down
+ index++;
+ }
- items[index].focus();
+ if (index < 0) {
+ index = 0;
}
- }, {
- key: 'VERSION',
+
+ items[index].focus();
+ };
+
+ _createClass(Dropdown, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
@@ -411,21 +398,21 @@ 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.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
+
+ $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
+
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
e.stopPropagation();
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -434,6 +421,7 @@ var Dropdown = function () {
$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js
index 781f9a3..4873d05 100644
--- a/assets/javascripts/bootstrap/modal.js
+++ b/assets/javascripts/bootstrap/modal.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,19 +8,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Modal = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'modal';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.modal';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 300;
@@ -37,28 +30,25 @@ var Modal = function () {
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
+ 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',
@@ -66,7 +56,6 @@ var Modal = function () {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
DIALOG: '.modal-dialog',
DATA_TOGGLE: '[data-toggle="modal"]',
@@ -74,18 +63,18 @@ var Modal = function () {
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top',
NAVBAR_TOGGLER: '.navbar-toggler'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Modal = function () {
+ var Modal =
+ /*#__PURE__*/
+ function () {
function Modal(element, config) {
- _classCallCheck(this, Modal);
-
this._config = this._getConfig(config);
this._element = element;
this._dialog = $(element).find(Selector.DIALOG)[0];
@@ -95,462 +84,439 @@ var Modal = function () {
this._ignoreBackdropClick = false;
this._originalBodyPadding = 0;
this._scrollbarWidth = 0;
- }
+ } // getters
- // getters
- _createClass(Modal, [{
- key: 'toggle',
+ var _proto = Modal.prototype;
+ // public
+ _proto.toggle = function toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget);
+ };
- // public
+ _proto.show = function show(relatedTarget) {
+ var _this = this;
- value: function toggle(relatedTarget) {
- return this._isShown ? this.hide() : this.show(relatedTarget);
+ if (this._isTransitioning) {
+ return;
}
- }, {
- key: 'show',
- value: function show(relatedTarget) {
- var _this = this;
- if (this._isTransitioning) {
- return;
- }
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true;
+ }
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
- this._isTransitioning = true;
- }
+ var showEvent = $.Event(Event.SHOW, {
+ relatedTarget: relatedTarget
+ });
+ $(this._element).trigger(showEvent);
- var showEvent = $.Event(Event.SHOW, {
- relatedTarget: relatedTarget
- });
+ if (this._isShown || showEvent.isDefaultPrevented()) {
+ return;
+ }
- $(this._element).trigger(showEvent);
+ this._isShown = true;
- if (this._isShown || showEvent.isDefaultPrevented()) {
- return;
- }
+ this._checkScrollbar();
- this._isShown = true;
+ this._setScrollbar();
- this._checkScrollbar();
- this._setScrollbar();
+ this._adjustDialog();
- this._adjustDialog();
+ $(document.body).addClass(ClassName.OPEN);
- $(document.body).addClass(ClassName.OPEN);
+ this._setEscapeEvent();
- this._setEscapeEvent();
- this._setResizeEvent();
+ this._setResizeEvent();
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
- return _this.hide(event);
+ $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
+ return _this.hide(event);
+ });
+ $(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._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(function () {
+ return _this._showElement(relatedTarget);
+ });
+ };
- this._showBackdrop(function () {
- return _this._showElement(relatedTarget);
- });
+ _proto.hide = function hide(event) {
+ var _this2 = this;
+
+ if (event) {
+ event.preventDefault();
}
- }, {
- key: 'hide',
- value: function hide(event) {
- var _this2 = this;
- if (event) {
- event.preventDefault();
- }
+ if (this._isTransitioning || !this._isShown) {
+ return;
+ }
- if (this._isTransitioning || !this._isShown) {
- return;
- }
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
- var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
+ if (transition) {
+ this._isTransitioning = true;
+ }
- if (transition) {
- this._isTransitioning = true;
- }
+ var hideEvent = $.Event(Event.HIDE);
+ $(this._element).trigger(hideEvent);
- var hideEvent = $.Event(Event.HIDE);
+ if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ return;
+ }
- $(this._element).trigger(hideEvent);
+ this._isShown = false;
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
- return;
- }
+ this._setEscapeEvent();
- this._isShown = false;
+ this._setResizeEvent();
- this._setEscapeEvent();
- this._setResizeEvent();
+ $(document).off(Event.FOCUSIN);
+ $(this._element).removeClass(ClassName.SHOW);
+ $(this._element).off(Event.CLICK_DISMISS);
+ $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
- $(document).off(Event.FOCUSIN);
+ if (transition) {
+ $(this._element).one(Util.TRANSITION_END, function (event) {
+ return _this2._hideModal(event);
+ }).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ this._hideModal();
+ }
+ };
+
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ $(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._scrollbarWidth = null;
+ };
- $(this._element).removeClass(ClassName.SHOW);
+ _proto.handleUpdate = function handleUpdate() {
+ this._adjustDialog();
+ }; // private
- $(this._element).off(Event.CLICK_DISMISS);
- $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
- if (transition) {
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
- $(this._element).one(Util.TRANSITION_END, function (event) {
- return _this2._hideModal(event);
- }).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- this._hideModal();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
+ _proto._showElement = function _showElement(relatedTarget) {
+ var _this3 = this;
- $(window, document, this._element, this._backdrop).off(EVENT_KEY);
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
- this._config = null;
- this._element = null;
- this._dialog = null;
- this._backdrop = null;
- this._isShown = null;
- this._isBodyOverflowing = null;
- this._ignoreBackdropClick = null;
- this._scrollbarWidth = null;
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
+ // don't move modals dom position
+ document.body.appendChild(this._element);
}
- }, {
- key: 'handleUpdate',
- value: function handleUpdate() {
- this._adjustDialog();
+
+ this._element.style.display = 'block';
+
+ this._element.removeAttribute('aria-hidden');
+
+ this._element.scrollTop = 0;
+
+ if (transition) {
+ Util.reflow(this._element);
}
- // private
+ $(this._element).addClass(ClassName.SHOW);
- }, {
- key: '_getConfig',
- value: function _getConfig(config) {
- config = $.extend({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
+ if (this._config.focus) {
+ this._enforceFocus();
}
- }, {
- key: '_showElement',
- value: function _showElement(relatedTarget) {
- var _this3 = this;
- var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
+ var shownEvent = $.Event(Event.SHOWN, {
+ relatedTarget: relatedTarget
+ });
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
- // don't move modals dom position
- document.body.appendChild(this._element);
+ var transitionComplete = function transitionComplete() {
+ if (_this3._config.focus) {
+ _this3._element.focus();
}
- this._element.style.display = 'block';
- this._element.removeAttribute('aria-hidden');
- this._element.scrollTop = 0;
+ _this3._isTransitioning = false;
+ $(_this3._element).trigger(shownEvent);
+ };
- if (transition) {
- Util.reflow(this._element);
- }
+ if (transition) {
+ $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ transitionComplete();
+ }
+ };
- $(this._element).addClass(ClassName.SHOW);
+ _proto._enforceFocus = function _enforceFocus() {
+ var _this4 = this;
- if (this._config.focus) {
- this._enforceFocus();
+ $(document).off(Event.FOCUSIN) // guard against infinite focus loop
+ .on(Event.FOCUSIN, function (event) {
+ if (document !== event.target && _this4._element !== event.target && !$(_this4._element).has(event.target).length) {
+ _this4._element.focus();
}
+ });
+ };
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: relatedTarget
- });
+ _proto._setEscapeEvent = function _setEscapeEvent() {
+ var _this5 = this;
- var transitionComplete = function transitionComplete() {
- if (_this3._config.focus) {
- _this3._element.focus();
- }
- _this3._isTransitioning = false;
- $(_this3._element).trigger(shownEvent);
- };
+ if (this._isShown && this._config.keyboard) {
+ $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
+ if (event.which === ESCAPE_KEYCODE) {
+ event.preventDefault();
- if (transition) {
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- transitionComplete();
- }
- }
- }, {
- key: '_enforceFocus',
- value: function _enforceFocus() {
- var _this4 = this;
-
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
- .on(Event.FOCUSIN, function (event) {
- if (document !== event.target && _this4._element !== event.target && !$(_this4._element).has(event.target).length) {
- _this4._element.focus();
+ _this5.hide();
}
});
+ } else if (!this._isShown) {
+ $(this._element).off(Event.KEYDOWN_DISMISS);
}
- }, {
- key: '_setEscapeEvent',
- value: function _setEscapeEvent() {
- var _this5 = this;
-
- if (this._isShown && this._config.keyboard) {
- $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
- if (event.which === ESCAPE_KEYCODE) {
- event.preventDefault();
- _this5.hide();
- }
- });
- } else if (!this._isShown) {
- $(this._element).off(Event.KEYDOWN_DISMISS);
- }
- }
- }, {
- key: '_setResizeEvent',
- value: function _setResizeEvent() {
- var _this6 = this;
-
- if (this._isShown) {
- $(window).on(Event.RESIZE, function (event) {
- return _this6.handleUpdate(event);
- });
- } else {
- $(window).off(Event.RESIZE);
- }
- }
- }, {
- key: '_hideModal',
- value: function _hideModal() {
- var _this7 = this;
-
- this._element.style.display = 'none';
- this._element.setAttribute('aria-hidden', true);
- this._isTransitioning = false;
- this._showBackdrop(function () {
- $(document.body).removeClass(ClassName.OPEN);
- _this7._resetAdjustments();
- _this7._resetScrollbar();
- $(_this7._element).trigger(Event.HIDDEN);
+ };
+
+ _proto._setResizeEvent = function _setResizeEvent() {
+ var _this6 = this;
+
+ if (this._isShown) {
+ $(window).on(Event.RESIZE, function (event) {
+ return _this6.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 _this8 = this;
+ };
- var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
+ _proto._hideModal = function _hideModal() {
+ var _this7 = this;
- if (this._isShown && this._config.backdrop) {
- var doAnimate = Util.supportsTransitionEnd() && animate;
+ this._element.style.display = 'none';
- this._backdrop = document.createElement('div');
- this._backdrop.className = ClassName.BACKDROP;
+ this._element.setAttribute('aria-hidden', true);
- if (animate) {
- $(this._backdrop).addClass(animate);
- }
+ this._isTransitioning = false;
- $(this._backdrop).appendTo(document.body);
-
- $(this._element).on(Event.CLICK_DISMISS, function (event) {
- if (_this8._ignoreBackdropClick) {
- _this8._ignoreBackdropClick = false;
- return;
- }
- if (event.target !== event.currentTarget) {
- return;
- }
- if (_this8._config.backdrop === 'static') {
- _this8._element.focus();
- } else {
- _this8.hide();
- }
- });
-
- if (doAnimate) {
- Util.reflow(this._backdrop);
- }
+ this._showBackdrop(function () {
+ $(document.body).removeClass(ClassName.OPEN);
+
+ _this7._resetAdjustments();
+
+ _this7._resetScrollbar();
+
+ $(_this7._element).trigger(Event.HIDDEN);
+ });
+ };
+
+ _proto._removeBackdrop = function _removeBackdrop() {
+ if (this._backdrop) {
+ $(this._backdrop).remove();
+ this._backdrop = null;
+ }
+ };
+
+ _proto._showBackdrop = function _showBackdrop(callback) {
+ var _this8 = this;
+
+ var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
- $(this._backdrop).addClass(ClassName.SHOW);
+ if (this._isShown && this._config.backdrop) {
+ var doAnimate = Util.supportsTransitionEnd() && animate;
+ this._backdrop = document.createElement('div');
+ this._backdrop.className = ClassName.BACKDROP;
- if (!callback) {
+ if (animate) {
+ $(this._backdrop).addClass(animate);
+ }
+
+ $(this._backdrop).appendTo(document.body);
+ $(this._element).on(Event.CLICK_DISMISS, function (event) {
+ if (_this8._ignoreBackdropClick) {
+ _this8._ignoreBackdropClick = false;
return;
}
- if (!doAnimate) {
- callback();
+ if (event.target !== event.currentTarget) {
return;
}
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
- } else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(ClassName.SHOW);
-
- var callbackRemove = function callbackRemove() {
- _this8._removeBackdrop();
- if (callback) {
- callback();
- }
- };
-
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
+ if (_this8._config.backdrop === 'static') {
+ _this8._element.focus();
} else {
- callbackRemove();
+ _this8.hide();
}
- } else if (callback) {
- callback();
+ });
+
+ if (doAnimate) {
+ Util.reflow(this._backdrop);
}
- }
- // ----------------------------------------------------------------------
- // the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
- // ----------------------------------------------------------------------
+ $(this._backdrop).addClass(ClassName.SHOW);
- }, {
- key: '_adjustDialog',
- value: function _adjustDialog() {
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+ if (!callback) {
+ return;
+ }
- if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
+ if (!doAnimate) {
+ callback();
+ return;
}
- if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = this._scrollbarWidth + 'px';
+ $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
+ } else if (!this._isShown && this._backdrop) {
+ $(this._backdrop).removeClass(ClassName.SHOW);
+
+ var callbackRemove = function callbackRemove() {
+ _this8._removeBackdrop();
+
+ if (callback) {
+ callback();
+ }
+ };
+
+ 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();
}
- }, {
- key: '_resetAdjustments',
- value: function _resetAdjustments() {
- this._element.style.paddingLeft = '';
- this._element.style.paddingRight = '';
- }
- }, {
- key: '_checkScrollbar',
- value: function _checkScrollbar() {
- var rect = document.body.getBoundingClientRect();
- this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
- this._scrollbarWidth = this._getScrollbarWidth();
+ }; // ----------------------------------------------------------------------
+ // the following methods are used to handle overflowing modals
+ // todo (fat): these should probably be refactored out of modal.js
+ // ----------------------------------------------------------------------
+
+
+ _proto._adjustDialog = function _adjustDialog() {
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+
+ if (!this._isBodyOverflowing && isModalOverflowing) {
+ this._element.style.paddingLeft = this._scrollbarWidth + "px";
}
- }, {
- key: '_setScrollbar',
- value: function _setScrollbar() {
- var _this9 = this;
-
- if (this._isBodyOverflowing) {
- // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
- // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
-
- // Adjust fixed content padding
- $(Selector.FIXED_CONTENT).each(function (index, element) {
- var actualPadding = $(element)[0].style.paddingRight;
- var calculatedPadding = $(element).css('padding-right');
- $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + 'px');
- });
-
- // Adjust sticky content margin
- $(Selector.STICKY_CONTENT).each(function (index, element) {
- var actualMargin = $(element)[0].style.marginRight;
- var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + 'px');
- });
-
- // Adjust navbar-toggler margin
- $(Selector.NAVBAR_TOGGLER).each(function (index, element) {
- var actualMargin = $(element)[0].style.marginRight;
- var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + 'px');
- });
-
- // Adjust body padding
- var actualPadding = document.body.style.paddingRight;
- var calculatedPadding = $('body').css('padding-right');
- $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + 'px');
- }
+
+ if (this._isBodyOverflowing && !isModalOverflowing) {
+ this._element.style.paddingRight = this._scrollbarWidth + "px";
}
- }, {
- key: '_resetScrollbar',
- value: function _resetScrollbar() {
- // Restore fixed content padding
+ };
+
+ _proto._resetAdjustments = function _resetAdjustments() {
+ this._element.style.paddingLeft = '';
+ this._element.style.paddingRight = '';
+ };
+
+ _proto._checkScrollbar = function _checkScrollbar() {
+ var rect = document.body.getBoundingClientRect();
+ this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
+ this._scrollbarWidth = this._getScrollbarWidth();
+ };
+
+ _proto._setScrollbar = function _setScrollbar() {
+ var _this9 = this;
+
+ if (this._isBodyOverflowing) {
+ // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
+ // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
+ // Adjust fixed content padding
$(Selector.FIXED_CONTENT).each(function (index, element) {
- var padding = $(element).data('padding-right');
- if (typeof padding !== 'undefined') {
- $(element).css('padding-right', padding).removeData('padding-right');
- }
- });
+ var actualPadding = $(element)[0].style.paddingRight;
+ var calculatedPadding = $(element).css('padding-right');
+ $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
+ }); // Adjust sticky content margin
+
+ $(Selector.STICKY_CONTENT).each(function (index, element) {
+ var actualMargin = $(element)[0].style.marginRight;
+ var calculatedMargin = $(element).css('margin-right');
+ $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
+ }); // Adjust navbar-toggler margin
+
+ $(Selector.NAVBAR_TOGGLER).each(function (index, element) {
+ var actualMargin = $(element)[0].style.marginRight;
+ var calculatedMargin = $(element).css('margin-right');
+ $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
+ }); // Adjust body padding
+
+ var actualPadding = document.body.style.paddingRight;
+ var calculatedPadding = $('body').css('padding-right');
+ $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
+ }
+ };
- // Restore sticky content and navbar-toggler margin
- $(Selector.STICKY_CONTENT + ', ' + Selector.NAVBAR_TOGGLER).each(function (index, element) {
- var margin = $(element).data('margin-right');
- if (typeof margin !== 'undefined') {
- $(element).css('margin-right', margin).removeData('margin-right');
- }
- });
+ _proto._resetScrollbar = function _resetScrollbar() {
+ // Restore fixed content padding
+ $(Selector.FIXED_CONTENT).each(function (index, element) {
+ var padding = $(element).data('padding-right');
- // Restore body padding
- var padding = $('body').data('padding-right');
if (typeof padding !== 'undefined') {
- $('body').css('padding-right', padding).removeData('padding-right');
+ $(element).css('padding-right', padding).removeData('padding-right');
}
+ }); // Restore sticky content and navbar-toggler margin
+
+ $(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) {
+ var margin = $(element).data('margin-right');
+
+ if (typeof margin !== 'undefined') {
+ $(element).css('margin-right', margin).removeData('margin-right');
+ }
+ }); // Restore body padding
+
+ var padding = $('body').data('padding-right');
+
+ if (typeof padding !== 'undefined') {
+ $('body').css('padding-right', padding).removeData('padding-right');
}
- }, {
- 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.getBoundingClientRect().width - scrollDiv.clientWidth;
- document.body.removeChild(scrollDiv);
- return scrollbarWidth;
- }
+ };
- // static
+ _proto._getScrollbarWidth = function _getScrollbarWidth() {
+ // thx d.walsh
+ var scrollDiv = document.createElement('div');
+ scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
+ document.body.appendChild(scrollDiv);
+ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - 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 === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
- if (!data) {
- data = new Modal(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config](relatedTarget);
- } else if (_config.show) {
- data.show(relatedTarget);
+ 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 (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- });
- }
- }, {
- key: 'VERSION',
+
+ data[config](relatedTarget);
+ } else if (_config.show) {
+ data.show(relatedTarget);
+ }
+ });
+ };
+
+ _createClass(Modal, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
@@ -558,17 +524,17 @@ var Modal = function () {
return Modal;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this10 = this;
- var target = void 0;
+ var target;
var selector = Util.getSelectorFromElement(this);
if (selector) {
@@ -596,7 +562,6 @@ var Modal = function () {
Modal._jQueryInterface.call($(target), config, this);
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -605,6 +570,7 @@ var Modal = function () {
$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Modal._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/popover.js b/assets/javascripts/bootstrap/popover.js
index 74891c1..b48520d 100644
--- a/assets/javascripts/bootstrap/popover.js
+++ b/assets/javascripts/bootstrap/popover.js
@@ -1,14 +1,8 @@
-'use strict';
+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); } }
-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; };
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-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"); } }
-
-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; }
-
-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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* --------------------------------------------------------------------------
@@ -16,183 +10,161 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Popover = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'popover';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.popover';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
- var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
-
+ var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var Default = $.extend({}, Tooltip.Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
-
var DefaultType = $.extend({}, Tooltip.DefaultType, {
content: '(string|element|function)'
});
-
var ClassName = {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
-
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
- };
+ 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
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Popover = function (_Tooltip) {
- _inherits(Popover, _Tooltip);
+ var Popover =
+ /*#__PURE__*/
+ function (_Tooltip) {
+ _inheritsLoose(Popover, _Tooltip);
function Popover() {
- _classCallCheck(this, Popover);
-
- return _possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).apply(this, arguments));
+ return _Tooltip.apply(this, arguments) || this;
}
- _createClass(Popover, [{
- key: 'isWithContent',
+ var _proto = Popover.prototype;
+ // overrides
+ _proto.isWithContent = function isWithContent() {
+ return this.getTitle() || this._getContent();
+ };
- // overrides
+ _proto.addAttachmentClass = function addAttachmentClass(attachment) {
+ $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
+ };
- value: function isWithContent() {
- return this.getTitle() || this._getContent();
- }
- }, {
- key: 'addAttachmentClass',
- value: function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
- }
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
- return this.tip;
- }
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
+ _proto.getTipElement = function getTipElement() {
+ this.tip = this.tip || $(this.config.template)[0];
+ return this.tip;
+ };
- // 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());
+ _proto.setContent = function setContent() {
+ var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events
- $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
- }
+ this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
+ this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
+ $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
+ }; // 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);
- }
- }, {
- key: '_cleanTipClass',
- value: function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
- if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''));
- }
+ _proto._getContent = function _getContent() {
+ return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
+ };
+
+ _proto._cleanTipClass = function _cleanTipClass() {
+ var $tip = $(this.getTipElement());
+ var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+
+ if (tabClass !== null && tabClass.length > 0) {
+ $tip.removeClass(tabClass.join(''));
}
+ }; // static
- // static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
+ Popover._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
- if (!data && /destroy|hide/.test(config)) {
- return;
- }
+ var _config = typeof config === 'object' ? config : null;
- if (!data) {
- data = new Popover(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ if (!data && /destroy|hide/.test(config)) {
+ return;
+ }
+
+ if (!data) {
+ data = new Popover(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- });
- }
- }, {
- key: 'VERSION',
+ data[config]();
+ }
+ });
+ };
+ _createClass(Popover, null, [{
+ key: "VERSION",
// getters
-
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'NAME',
+ key: "NAME",
get: function get() {
return NAME;
}
}, {
- key: 'DATA_KEY',
+ key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}, {
- key: 'Event',
+ key: "Event",
get: function get() {
return Event;
}
}, {
- key: 'EVENT_KEY',
+ key: "EVENT_KEY",
get: function get() {
return EVENT_KEY;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
@@ -200,15 +172,16 @@ var Popover = function () {
return Popover;
}(Tooltip);
-
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+
$.fn[NAME] = Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Popover._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/scrollspy.js b/assets/javascripts/bootstrap/scrollspy.js
index 18bdfce..49b4879 100644
--- a/assets/javascripts/bootstrap/scrollspy.js
+++ b/assets/javascripts/bootstrap/scrollspy.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,290 +8,271 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var ScrollSpy = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'scrollspy';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.scrollspy';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ 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',
ACTIVE: 'active'
};
-
var Selector = {
DATA_SPY: '[data-spy="scroll"]',
ACTIVE: '.active',
NAV_LIST_GROUP: '.nav, .list-group',
NAV_LINKS: '.nav-link',
+ NAV_ITEMS: '.nav-item',
LIST_ITEMS: '.list-group-item',
DROPDOWN: '.dropdown',
DROPDOWN_ITEMS: '.dropdown-item',
DROPDOWN_TOGGLE: '.dropdown-toggle'
};
-
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var ScrollSpy = function () {
+ var ScrollSpy =
+ /*#__PURE__*/
+ function () {
function ScrollSpy(element, config) {
var _this = this;
- _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.LIST_ITEMS + ',') + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);
+ this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
this._offsets = [];
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
-
$(this._scrollElement).on(Event.SCROLL, function (event) {
return _this._process(event);
});
-
this.refresh();
- this._process();
- }
- // getters
+ this._process();
+ } // getters
- _createClass(ScrollSpy, [{
- key: 'refresh',
+ var _proto = ScrollSpy.prototype;
- // public
+ // public
+ _proto.refresh = function refresh() {
+ var _this2 = this;
- value: function refresh() {
- var _this2 = 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;
+ var targetSelector = Util.getSelectorFromElement(element);
+
+ if (targetSelector) {
+ target = $(targetSelector)[0];
+ }
- var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
+ if (target) {
+ var targetBCR = target.getBoundingClientRect();
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
+ if (targetBCR.width || targetBCR.height) {
+ // todo (fat): remove sketch reliance on jQuery position/offset
+ return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
+ }
+ }
- var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
+ return null;
+ }).filter(function (item) {
+ return item;
+ }).sort(function (a, b) {
+ return a[0] - b[0];
+ }).forEach(function (item) {
+ _this2._offsets.push(item[0]);
- this._offsets = [];
- this._targets = [];
+ _this2._targets.push(item[1]);
+ });
+ };
+
+ _proto.dispose = 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
- this._scrollHeight = this._getScrollHeight();
- var targets = $.makeArray($(this._selector));
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, Default, config);
- targets.map(function (element) {
- var target = void 0;
- var targetSelector = Util.getSelectorFromElement(element);
+ if (typeof config.target !== 'string') {
+ var id = $(config.target).attr('id');
- if (targetSelector) {
- target = $(targetSelector)[0];
- }
+ if (!id) {
+ id = Util.getUID(NAME);
+ $(config.target).attr('id', id);
+ }
- if (target) {
- var targetBCR = target.getBoundingClientRect();
- if (targetBCR.width || targetBCR.height) {
- // 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) {
- _this2._offsets.push(item[0]);
- _this2._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;
+ config.target = "#" + id;
}
- // private
+ Util.typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ };
- }, {
- 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;
- }
+ _proto._getScrollTop = function _getScrollTop() {
+ return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
+ };
- Util.typeCheckConfig(NAME, config, DefaultType);
+ _proto._getScrollHeight = function _getScrollHeight() {
+ return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
+ };
- return config;
- }
- }, {
- key: '_getScrollTop',
- value: function _getScrollTop() {
- return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
- }
- }, {
- key: '_getScrollHeight',
- value: function _getScrollHeight() {
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
- }
- }, {
- key: '_getOffsetHeight',
- value: function _getOffsetHeight() {
- return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
- }
- }, {
- key: '_process',
- value: 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();
- }
+ _proto._getOffsetHeight = function _getOffsetHeight() {
+ return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
+ };
- if (scrollTop >= maxScroll) {
- var target = this._targets[this._targets.length - 1];
+ _proto._process = function _process() {
+ var scrollTop = this._getScrollTop() + this._config.offset;
- if (this._activeTarget !== target) {
- this._activate(target);
- }
- return;
- }
+ var scrollHeight = this._getScrollHeight();
- if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
- this._activeTarget = null;
- this._clear();
- return;
- }
+ var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
- for (var i = this._offsets.length; i--;) {
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
+ if (this._scrollHeight !== scrollHeight) {
+ this.refresh();
+ }
- if (isActiveTarget) {
- this._activate(this._targets[i]);
- }
+ 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();
- var queries = this._selector.split(',');
- // eslint-disable-next-line arrow-body-style
- 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 {
- // Set triggered link as active
- $link.addClass(ClassName.ACTIVE);
- // Set triggered links parents as active
- // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
- $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ', ' + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);
- }
+ return;
+ }
+
+ for (var i = this._offsets.length; i--;) {
+ var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
- $(this._scrollElement).trigger(Event.ACTIVATE, {
- relatedTarget: target
- });
+ if (isActiveTarget) {
+ this._activate(this._targets[i]);
+ }
}
- }, {
- key: '_clear',
- value: function _clear() {
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ };
+
+ _proto._activate = function _activate(target) {
+ this._activeTarget = target;
+
+ this._clear();
+
+ var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
+
+
+ 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 {
+ // Set triggered link as active
+ $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
+
+ $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
+
+ $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(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 === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
+ _proto._clear = function _clear() {
+ $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ }; // static
- if (!data) {
- data = new ScrollSpy(this, _config);
- $(this).data(DATA_KEY, data);
- }
- if (typeof config === 'string') {
- if (typeof 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 === 'object' && config;
+
+ if (!data) {
+ data = new ScrollSpy(this, _config);
+ $(this).data(DATA_KEY, data);
+ }
+
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- });
- }
- }, {
- key: 'VERSION',
+
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(ScrollSpy, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
@@ -303,22 +280,22 @@ var ScrollSpy = function () {
return ScrollSpy;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(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
@@ -327,6 +304,7 @@ var ScrollSpy = function () {
$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/tab.js b/assets/javascripts/bootstrap/tab.js
index 300aafd..32a362a 100644
--- a/assets/javascripts/bootstrap/tab.js
+++ b/assets/javascripts/bootstrap/tab.js
@@ -1,8 +1,6 @@
-'use strict';
+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); } }
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -10,31 +8,26 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Tab = function () {
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
-
var NAME = 'tab';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.tab';
- var EVENT_KEY = '.' + DATA_KEY;
+ 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
+ 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',
@@ -42,7 +35,6 @@ var Tab = function () {
FADE: 'fade',
SHOW: 'show'
};
-
var Selector = {
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
@@ -51,192 +43,184 @@ var Tab = function () {
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Tab = function () {
+ var Tab =
+ /*#__PURE__*/
+ function () {
function Tab(element) {
- _classCallCheck(this, Tab);
-
this._element = element;
- }
+ } // getters
- // getters
- _createClass(Tab, [{
- key: 'show',
+ var _proto = Tab.prototype;
+ // public
+ _proto.show = function show() {
+ var _this = 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 _this = this;
+ var target;
+ var previous;
+ var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
+ var selector = Util.getSelectorFromElement(this._element);
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
- return;
- }
-
- var target = void 0;
- var previous = void 0;
- var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
- var selector = Util.getSelectorFromElement(this._element);
+ if (listElement) {
+ var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
+ previous = $.makeArray($(listElement).find(itemSelector));
+ previous = previous[previous.length - 1];
+ }
- if (listElement) {
- var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
- previous = $.makeArray($(listElement).find(itemSelector));
- previous = previous[previous.length - 1];
- }
+ var hideEvent = $.Event(Event.HIDE, {
+ relatedTarget: this._element
+ });
+ var showEvent = $.Event(Event.SHOW, {
+ relatedTarget: previous
+ });
- var hideEvent = $.Event(Event.HIDE, {
- relatedTarget: this._element
- });
+ if (previous) {
+ $(previous).trigger(hideEvent);
+ }
- var showEvent = $.Event(Event.SHOW, {
- relatedTarget: previous
- });
+ $(this._element).trigger(showEvent);
- if (previous) {
- $(previous).trigger(hideEvent);
- }
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
+ return;
+ }
- $(this._element).trigger(showEvent);
+ if (selector) {
+ target = $(selector)[0];
+ }
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
- return;
- }
+ this._activate(this._element, listElement);
- if (selector) {
- target = $(selector)[0];
- }
+ 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();
+ }
+ };
- this._activate(this._element, listElement);
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._element = null;
+ }; // private
- var complete = function complete() {
- var hiddenEvent = $.Event(Event.HIDDEN, {
- relatedTarget: _this._element
- });
- var shownEvent = $.Event(Event.SHOWN, {
- relatedTarget: previous
- });
+ _proto._activate = function _activate(element, container, callback) {
+ var _this2 = this;
- $(previous).trigger(hiddenEvent);
- $(_this._element).trigger(shownEvent);
- };
+ var activeElements;
- if (target) {
- this._activate(target, target.parentNode, complete);
- } else {
- complete();
- }
- }
- }, {
- key: 'dispose',
- value: function dispose() {
- $.removeData(this._element, DATA_KEY);
- this._element = null;
+ if (container.nodeName === 'UL') {
+ activeElements = $(container).find(Selector.ACTIVE_UL);
+ } else {
+ activeElements = $(container).children(Selector.ACTIVE);
}
- // private
+ var active = activeElements[0];
+ var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
- }, {
- key: '_activate',
- value: function _activate(element, container, callback) {
- var _this2 = this;
+ var complete = function complete() {
+ return _this2._transitionComplete(element, active, isTransitioning, callback);
+ };
- var activeElements = void 0;
- if (container.nodeName === 'UL') {
- activeElements = $(container).find(Selector.ACTIVE_UL);
- } else {
- activeElements = $(container).children(Selector.ACTIVE);
- }
+ if (active && isTransitioning) {
+ $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ complete();
+ }
- var active = activeElements[0];
- var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
+ if (active) {
+ $(active).removeClass(ClassName.SHOW);
+ }
+ };
- var complete = function complete() {
- return _this2._transitionComplete(element, active, isTransitioning, callback);
- };
+ _proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
+ if (active) {
+ $(active).removeClass(ClassName.ACTIVE);
+ 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.SHOW);
+ if (active.getAttribute('role') === 'tab') {
+ active.setAttribute('aria-selected', false);
}
}
- }, {
- key: '_transitionComplete',
- value: function _transitionComplete(element, active, isTransitioning, callback) {
- if (active) {
- $(active).removeClass(ClassName.ACTIVE);
- var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
+ $(element).addClass(ClassName.ACTIVE);
- if (dropdownChild) {
- $(dropdownChild).removeClass(ClassName.ACTIVE);
- }
+ if (element.getAttribute('role') === 'tab') {
+ element.setAttribute('aria-selected', true);
+ }
- active.setAttribute('aria-expanded', false);
- }
+ if (isTransitioning) {
+ Util.reflow(element);
+ $(element).addClass(ClassName.SHOW);
+ } else {
+ $(element).removeClass(ClassName.FADE);
+ }
- $(element).addClass(ClassName.ACTIVE);
- element.setAttribute('aria-expanded', true);
+ if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
+ var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
- if (isTransitioning) {
- Util.reflow(element);
- $(element).addClass(ClassName.SHOW);
- } else {
- $(element).removeClass(ClassName.FADE);
+ if (dropdownElement) {
+ $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
}
- 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);
- }
+ element.setAttribute('aria-expanded', true);
+ }
- if (callback) {
- callback();
- }
+ if (callback) {
+ callback();
}
+ }; // static
- // static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
+ Tab._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $this = $(this);
+ var data = $this.data(DATA_KEY);
- if (!data) {
- data = new Tab(this);
- $this.data(DATA_KEY, data);
- }
+ if (!data) {
+ data = new Tab(this);
+ $this.data(DATA_KEY, data);
+ }
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- });
- }
- }, {
- key: 'VERSION',
+
+ data[config]();
+ }
+ });
+ };
+
+ _createClass(Tab, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
@@ -244,18 +228,18 @@ var Tab = function () {
return Tab;
}();
-
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
+
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
+
Tab._jQueryInterface.call($(this), 'show');
});
-
/**
* ------------------------------------------------------------------------
* jQuery
@@ -264,6 +248,7 @@ var Tab = function () {
$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME].Constructor = Tab;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tab._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js
index 23877c7..7522fc5 100644
--- a/assets/javascripts/bootstrap/tooltip.js
+++ b/assets/javascripts/bootstrap/tooltip.js
@@ -1,10 +1,6 @@
-'use strict';
+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); } }
-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; };
-
-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"); } }
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* --------------------------------------------------------------------------
@@ -12,9 +8,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Tooltip = function () {
-
/**
* Check for Popper dependency
* Popper - https://popper.js.org
@@ -22,22 +16,21 @@ var Tooltip = function () {
if (typeof Popper === 'undefined') {
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
}
-
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
+
var NAME = 'tooltip';
var VERSION = '4.0.0-beta';
var DATA_KEY = 'bs.tooltip';
- var EVENT_KEY = '.' + DATA_KEY;
+ var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 150;
var CLASS_PREFIX = 'bs-tooltip';
- var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
-
+ var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DefaultType = {
animation: 'boolean',
template: 'string',
@@ -51,7 +44,6 @@ var Tooltip = function () {
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)'
};
-
var AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
@@ -59,7 +51,6 @@ var Tooltip = function () {
BOTTOM: 'bottom',
LEFT: 'left'
};
-
var Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
@@ -73,624 +64,580 @@ var Tooltip = function () {
container: false,
fallbackPlacement: 'flip'
};
-
var HoverState = {
SHOW: 'show',
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
+ 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',
SHOW: 'show'
};
-
var Selector = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
};
-
var Trigger = {
HOVER: 'hover',
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
- };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ };
- var Tooltip = function () {
+ var Tooltip =
+ /*#__PURE__*/
+ function () {
function Tooltip(element, config) {
- _classCallCheck(this, Tooltip);
-
// private
this._isEnabled = true;
this._timeout = 0;
this._hoverState = '';
this._activeTrigger = {};
- this._popper = null;
+ this._popper = null; // protected
- // protected
this.element = element;
this.config = this._getConfig(config);
this.tip = null;
this._setListeners();
- }
+ } // getters
- // getters
- _createClass(Tooltip, [{
- key: 'enable',
+ var _proto = Tooltip.prototype;
+ // public
+ _proto.enable = function enable() {
+ this._isEnabled = true;
+ };
- // public
+ _proto.disable = function disable() {
+ this._isEnabled = false;
+ };
- value: function enable() {
- this._isEnabled = true;
- }
- }, {
- key: 'disable',
- value: function disable() {
- this._isEnabled = false;
- }
- }, {
- key: 'toggleEnabled',
- value: function toggleEnabled() {
- this._isEnabled = !this._isEnabled;
+ _proto.toggleEnabled = function toggleEnabled() {
+ this._isEnabled = !this._isEnabled;
+ };
+
+ _proto.toggle = function toggle(event) {
+ if (!this._isEnabled) {
+ return;
}
- }, {
- key: 'toggle',
- value: function toggle(event) {
- if (!this._isEnabled) {
- return;
- }
- if (event) {
- var dataKey = this.constructor.DATA_KEY;
- var context = $(event.currentTarget).data(dataKey);
+ 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);
- }
+ if (!context) {
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
+ $(event.currentTarget).data(dataKey, context);
+ }
- context._activeTrigger.click = !context._activeTrigger.click;
+ context._activeTrigger.click = !context._activeTrigger.click;
- if (context._isWithActiveTrigger()) {
- context._enter(null, context);
- } else {
- context._leave(null, context);
- }
+ if (context._isWithActiveTrigger()) {
+ context._enter(null, context);
} else {
+ context._leave(null, context);
+ }
+ } else {
+ if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
+ this._leave(null, this);
- if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
- this._leave(null, this);
- return;
- }
-
- this._enter(null, this);
+ return;
}
+
+ this._enter(null, this);
}
- }, {
- key: 'dispose',
- value: function dispose() {
- clearTimeout(this._timeout);
+ };
- $.removeData(this.element, this.constructor.DATA_KEY);
+ _proto.dispose = function dispose() {
+ clearTimeout(this._timeout);
+ $.removeData(this.element, this.constructor.DATA_KEY);
+ $(this.element).off(this.constructor.EVENT_KEY);
+ $(this.element).closest('.modal').off('hide.bs.modal');
- $(this.element).off(this.constructor.EVENT_KEY);
- $(this.element).closest('.modal').off('hide.bs.modal');
+ if (this.tip) {
+ $(this.tip).remove();
+ }
- if (this.tip) {
- $(this.tip).remove();
- }
+ this._isEnabled = null;
+ this._timeout = null;
+ this._hoverState = null;
+ this._activeTrigger = null;
- this._isEnabled = null;
- this._timeout = null;
- this._hoverState = null;
- this._activeTrigger = null;
- if (this._popper !== null) {
- this._popper.destroy();
- }
-
- this._popper = null;
- this.element = null;
- this.config = null;
- this.tip = null;
+ if (this._popper !== null) {
+ this._popper.destroy();
}
- }, {
- key: 'show',
- value: function show() {
- var _this = this;
-
- if ($(this.element).css('display') === 'none') {
- throw new Error('Please use show on visible elements');
- }
- var showEvent = $.Event(this.constructor.Event.SHOW);
- if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent);
+ this._popper = null;
+ this.element = null;
+ this.config = null;
+ this.tip = null;
+ };
- var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
+ _proto.show = function show() {
+ var _this = 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);
- tip.setAttribute('id', tipId);
- this.element.setAttribute('aria-describedby', tipId);
+ if (this.isWithContent() && this._isEnabled) {
+ $(this.element).trigger(showEvent);
+ 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);
+ tip.setAttribute('id', tipId);
+ this.element.setAttribute('aria-describedby', tipId);
+ this.setContent();
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
+ if (this.config.animation) {
+ $(tip).addClass(ClassName.FADE);
+ }
- var attachment = this._getAttachment(placement);
- this.addAttachmentClass(attachment);
+ var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
- var container = this.config.container === false ? document.body : $(this.config.container);
+ var attachment = this._getAttachment(placement);
- $(tip).data(this.constructor.DATA_KEY, this);
+ this.addAttachmentClass(attachment);
+ var container = this.config.container === false ? document.body : $(this.config.container);
+ $(tip).data(this.constructor.DATA_KEY, this);
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
- $(tip).appendTo(container);
- }
+ if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
+ $(tip).appendTo(container);
+ }
- $(this.element).trigger(this.constructor.Event.INSERTED);
-
- this._popper = new Popper(this.element, tip, {
- placement: attachment,
- modifiers: {
- offset: {
- offset: this.config.offset
- },
- flip: {
- behavior: this.config.fallbackPlacement
- },
- arrow: {
- element: Selector.ARROW
- }
+ $(this.element).trigger(this.constructor.Event.INSERTED);
+ this._popper = new Popper(this.element, tip, {
+ placement: attachment,
+ modifiers: {
+ offset: {
+ offset: this.config.offset
},
- onCreate: function onCreate(data) {
- if (data.originalPlacement !== data.placement) {
- _this._handlePopperPlacementChange(data);
- }
+ flip: {
+ behavior: this.config.fallbackPlacement
},
- onUpdate: function onUpdate(data) {
+ arrow: {
+ element: Selector.ARROW
+ }
+ },
+ onCreate: function onCreate(data) {
+ if (data.originalPlacement !== data.placement) {
_this._handlePopperPlacementChange(data);
}
- });
-
- $(tip).addClass(ClassName.SHOW);
-
- // if this is a touch-enabled device we add extra
- // empty mouseover listeners to the body's immediate children;
- // only needed because of broken event delegation on iOS
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- if ('ontouchstart' in document.documentElement) {
- $('body').children().on('mouseover', null, $.noop);
+ },
+ onUpdate: function onUpdate(data) {
+ _this._handlePopperPlacementChange(data);
}
+ });
+ $(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- var complete = function complete() {
- if (_this.config.animation) {
- _this._fixTransition();
- }
- var prevHoverState = _this._hoverState;
- _this._hoverState = null;
-
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
-
- if (prevHoverState === HoverState.OUT) {
- _this._leave(null, _this);
- }
- };
-
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
- } else {
- complete();
- }
+ if ('ontouchstart' in document.documentElement) {
+ $('body').children().on('mouseover', null, $.noop);
}
- }
- }, {
- 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.SHOW && tip.parentNode) {
- tip.parentNode.removeChild(tip);
+ if (_this.config.animation) {
+ _this._fixTransition();
}
- _this2._cleanTipClass();
- _this2.element.removeAttribute('aria-describedby');
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
- if (_this2._popper !== null) {
- _this2._popper.destroy();
- }
+ var prevHoverState = _this._hoverState;
+ _this._hoverState = null;
+ $(_this.element).trigger(_this.constructor.Event.SHOWN);
- if (callback) {
- callback();
+ if (prevHoverState === HoverState.OUT) {
+ _this._leave(null, _this);
}
};
- $(this.element).trigger(hideEvent);
-
- if (hideEvent.isDefaultPrevented()) {
- return;
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
+ } else {
+ complete();
}
+ }
+ };
- $(tip).removeClass(ClassName.SHOW);
+ _proto.hide = function hide(callback) {
+ var _this2 = this;
- // if this is a touch-enabled device we remove the extra
- // empty mouseover listeners we added for iOS support
- if ('ontouchstart' in document.documentElement) {
- $('body').children().off('mouseover', null, $.noop);
+ var tip = this.getTipElement();
+ var hideEvent = $.Event(this.constructor.Event.HIDE);
+
+ var complete = function complete() {
+ if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
+ tip.parentNode.removeChild(tip);
}
- this._activeTrigger[Trigger.CLICK] = false;
- this._activeTrigger[Trigger.FOCUS] = false;
- this._activeTrigger[Trigger.HOVER] = false;
+ _this2._cleanTipClass();
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ _this2.element.removeAttribute('aria-describedby');
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
- } else {
- complete();
+ $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
+
+ if (_this2._popper !== null) {
+ _this2._popper.destroy();
}
- this._hoverState = '';
- }
- }, {
- key: 'update',
- value: function update() {
- if (this._popper !== null) {
- this._popper.scheduleUpdate();
+ if (callback) {
+ callback();
}
- }
+ };
- // protected
+ $(this.element).trigger(hideEvent);
- }, {
- key: 'isWithContent',
- value: function isWithContent() {
- return Boolean(this.getTitle());
+ if (hideEvent.isDefaultPrevented()) {
+ return;
}
- }, {
- key: 'addAttachmentClass',
- value: function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
+
+ $(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
+
+ if ('ontouchstart' in document.documentElement) {
+ $('body').children().off('mouseover', null, $.noop);
}
- }, {
- key: 'getTipElement',
- value: function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
- return this.tip;
+
+ this._activeTrigger[Trigger.CLICK] = false;
+ this._activeTrigger[Trigger.FOCUS] = false;
+ this._activeTrigger[Trigger.HOVER] = false;
+
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
+ } else {
+ complete();
}
- }, {
- key: 'setContent',
- value: function setContent() {
- var $tip = $(this.getTipElement());
- this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
- $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
+
+ this._hoverState = '';
+ };
+
+ _proto.update = function update() {
+ if (this._popper !== null) {
+ this._popper.scheduleUpdate();
}
- }, {
- key: 'setElementContent',
- value: 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.text($(content).text());
+ }; // protected
+
+
+ _proto.isWithContent = function isWithContent() {
+ return Boolean(this.getTitle());
+ };
+
+ _proto.addAttachmentClass = function addAttachmentClass(attachment) {
+ $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
+ };
+
+ _proto.getTipElement = function getTipElement() {
+ this.tip = this.tip || $(this.config.template)[0];
+ return this.tip;
+ };
+
+ _proto.setContent = function setContent() {
+ var $tip = $(this.getTipElement());
+ this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
+ $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
+ };
+
+ _proto.setElementContent = 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[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;
- }
+ _proto.getTitle = function getTitle() {
+ var title = this.element.getAttribute('data-original-title');
- return title;
+ if (!title) {
+ title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
}
- // private
+ return title;
+ }; // 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, function (event) {
- return _this3.toggle(event);
- });
- } 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, function (event) {
- return _this3._enter(event);
- }).on(eventOut, _this3.config.selector, function (event) {
- return _this3._leave(event);
- });
- }
- $(_this3.element).closest('.modal').on('hide.bs.modal', function () {
- return _this3.hide();
- });
- });
+ _proto._getAttachment = function _getAttachment(placement) {
+ return AttachmentMap[placement.toUpperCase()];
+ };
+
+ _proto._setListeners = function _setListeners() {
+ var _this3 = 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') {
+ $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
+ return _this3.toggle(event);
+ });
+ } 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, function (event) {
+ return _this3._enter(event);
+ }).on(eventOut, _this3.config.selector, function (event) {
+ return _this3._leave(event);
});
- } 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', '');
}
+
+ $(_this3.element).closest('.modal').on('hide.bs.modal', function () {
+ return _this3.hide();
+ });
+ });
+
+ if (this.config.selector) {
+ this.config = $.extend({}, this.config, {
+ trigger: 'manual',
+ selector: ''
+ });
+ } else {
+ this._fixTitle();
}
- }, {
- key: '_enter',
- value: function _enter(event, context) {
- var dataKey = this.constructor.DATA_KEY;
+ };
- context = context || $(event.currentTarget).data(dataKey);
+ _proto._fixTitle = function _fixTitle() {
+ var titleType = typeof this.element.getAttribute('data-original-title');
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
+ if (this.element.getAttribute('title') || titleType !== 'string') {
+ this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
+ this.element.setAttribute('title', '');
+ }
+ };
- if (event) {
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
- }
+ _proto._enter = function _enter(event, context) {
+ var dataKey = this.constructor.DATA_KEY;
+ context = context || $(event.currentTarget).data(dataKey);
- if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
- context._hoverState = HoverState.SHOW;
- return;
- }
+ if (!context) {
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
+ $(event.currentTarget).data(dataKey, context);
+ }
- clearTimeout(context._timeout);
+ 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);
+ context._hoverState = HoverState.SHOW;
+
+ 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.SHOW) {
- context.show();
- }
- }, context.config.delay.show);
+ _proto._leave = 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);
}
- }, {
- key: '_leave',
- value: function _leave(event, context) {
- var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ if (event) {
+ context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
+ }
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
- }
+ if (context._isWithActiveTrigger()) {
+ return;
+ }
- if (event) {
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
- }
+ clearTimeout(context._timeout);
+ context._hoverState = HoverState.OUT;
- if (context._isWithActiveTrigger()) {
- return;
+ 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);
+ };
- clearTimeout(context._timeout);
+ _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
+ for (var trigger in this._activeTrigger) {
+ if (this._activeTrigger[trigger]) {
+ return true;
+ }
+ }
- context._hoverState = HoverState.OUT;
+ return false;
+ };
- if (!context.config.delay || !context.config.delay.hide) {
- context.hide();
- return;
- }
+ _proto._getConfig = function _getConfig(config) {
+ config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
- context._timeout = setTimeout(function () {
- if (context._hoverState === HoverState.OUT) {
- context.hide();
- }
- }, context.config.delay.hide);
+ if (typeof config.delay === 'number') {
+ config.delay = {
+ show: config.delay,
+ hide: config.delay
+ };
}
- }, {
- key: '_isWithActiveTrigger',
- value: function _isWithActiveTrigger() {
- for (var trigger in this._activeTrigger) {
- if (this._activeTrigger[trigger]) {
- return true;
- }
- }
- return false;
+ if (typeof config.title === 'number') {
+ config.title = config.title.toString();
}
- }, {
- 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
- };
- }
- if (config.title && typeof config.title === 'number') {
- config.title = config.title.toString();
- }
+ if (typeof config.content === 'number') {
+ config.content = config.content.toString();
+ }
- if (config.content && typeof config.content === 'number') {
- config.content = config.content.toString();
- }
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ return config;
+ };
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ _proto._getDelegateConfig = function _getDelegateConfig() {
+ var config = {};
- 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];
- }
+ if (this.config) {
+ for (var key in this.config) {
+ if (this.constructor.Default[key] !== this.config[key]) {
+ config[key] = this.config[key];
}
}
-
- return config;
}
- }, {
- key: '_cleanTipClass',
- value: function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
- if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''));
- }
+
+ return config;
+ };
+
+ _proto._cleanTipClass = function _cleanTipClass() {
+ var $tip = $(this.getTipElement());
+ var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+
+ if (tabClass !== null && tabClass.length > 0) {
+ $tip.removeClass(tabClass.join(''));
}
- }, {
- key: '_handlePopperPlacementChange',
- value: function _handlePopperPlacementChange(data) {
- this._cleanTipClass();
- this.addAttachmentClass(this._getAttachment(data.placement));
+ };
+
+ _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
+ this._cleanTipClass();
+
+ this.addAttachmentClass(this._getAttachment(data.placement));
+ };
+
+ _proto._fixTransition = function _fixTransition() {
+ var tip = this.getTipElement();
+ var initConfigAnimation = this.config.animation;
+
+ if (tip.getAttribute('x-placement') !== null) {
+ return;
}
- }, {
- key: '_fixTransition',
- value: function _fixTransition() {
- var tip = this.getTipElement();
- var initConfigAnimation = this.config.animation;
- if (tip.getAttribute('x-placement') !== null) {
+
+ $(tip).removeClass(ClassName.FADE);
+ this.config.animation = false;
+ this.hide();
+ this.show();
+ this.config.animation = initConfigAnimation;
+ }; // static
+
+
+ Tooltip._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY);
+
+ var _config = typeof config === 'object' && config;
+
+ if (!data && /dispose|hide/.test(config)) {
return;
}
- $(tip).removeClass(ClassName.FADE);
- this.config.animation = false;
- this.hide();
- this.show();
- this.config.animation = initConfigAnimation;
- }
-
- // static
- }], [{
- key: '_jQueryInterface',
- value: 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 (typeof data[config] === 'undefined') {
+ throw new Error("No method named \"" + config + "\"");
}
- if (!data) {
- data = new Tooltip(this, _config);
- $(this).data(DATA_KEY, data);
- }
+ data[config]();
+ }
+ });
+ };
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new Error('No method named "' + config + '"');
- }
- data[config]();
- }
- });
- }
- }, {
- key: 'VERSION',
+ _createClass(Tooltip, null, [{
+ key: "VERSION",
get: function get() {
return VERSION;
}
}, {
- key: 'Default',
+ key: "Default",
get: function get() {
return Default;
}
}, {
- key: 'NAME',
+ key: "NAME",
get: function get() {
return NAME;
}
}, {
- key: 'DATA_KEY',
+ key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}, {
- key: 'Event',
+ key: "Event",
get: function get() {
return Event;
}
}, {
- key: 'EVENT_KEY',
+ key: "EVENT_KEY",
get: function get() {
return EVENT_KEY;
}
}, {
- key: 'DefaultType',
+ key: "DefaultType",
get: function get() {
return DefaultType;
}
@@ -698,15 +645,16 @@ var Tooltip = function () {
return Tooltip;
}();
-
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
+
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
diff --git a/assets/javascripts/bootstrap/util.js b/assets/javascripts/bootstrap/util.js
index b74fd79..d8396a3 100644
--- a/assets/javascripts/bootstrap/util.js
+++ b/assets/javascripts/bootstrap/util.js
@@ -1,40 +1,29 @@
-'use strict';
-
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0-beta): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
var Util = function () {
-
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
-
var transition = false;
-
var MAX_UID = 1000000;
-
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend'
+ transition: 'transitionend' // shoutout AngusCroll (https://goo.gl/pxwQGp)
+
};
- // 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,
@@ -43,6 +32,7 @@ var Util = function () {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
+
return undefined; // eslint-disable-line no-undefined
}
};
@@ -70,49 +60,45 @@ var Util = function () {
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 = {
+ var Util = {
TRANSITION_END: 'bsTransitionEnd',
-
getUID: function getUID(prefix) {
do {
// 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');
+
if (!selector || selector === '#') {
selector = element.getAttribute('href') || '';
}
@@ -133,22 +119,23 @@ var Util = function () {
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(transition);
},
+ isElement: function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ },
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
var expectedTypes = configTypes[property];
var value = config[property];
- var valueType = value && isElement(value) ? 'element' : toType(value);
+ var valueType = value && Util.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 + '".'));
+ throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
}
}
}
};
-
setTransitionEndSupport();
-
return Util;
}(jQuery);
diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss
index 603ea96..16d5eef 100644
--- a/assets/stylesheets/_bootstrap-grid.scss
+++ b/assets/stylesheets/_bootstrap-grid.scss
@@ -8,7 +8,7 @@
//
@at-root {
- @-ms-viewport { width: device-width; }
+ @-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
}
html {
diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss
index d58a4c8..bb1bb10 100644
--- a/assets/stylesheets/_bootstrap.scss
+++ b/assets/stylesheets/_bootstrap.scss
@@ -8,6 +8,7 @@
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
+@import "bootstrap/root";
@import "bootstrap/print";
@import "bootstrap/reboot";
@import "bootstrap/type";
diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss
index 3dfd13f..66fba24 100644
--- a/assets/stylesheets/bootstrap/_alert.scss
+++ b/assets/stylesheets/bootstrap/_alert.scss
@@ -3,6 +3,7 @@
//
.alert {
+ position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
@@ -28,9 +29,9 @@
.alert-dismissible {
// Adjust close link position
.close {
- position: relative;
- top: -$alert-padding-y;
- right: -$alert-padding-x;
+ position: absolute;
+ top: 0;
+ right: 0;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
diff --git a/assets/stylesheets/bootstrap/_badge.scss b/assets/stylesheets/bootstrap/_badge.scss
index fea10eb..b87a1b0 100644
--- a/assets/stylesheets/bootstrap/_badge.scss
+++ b/assets/stylesheets/bootstrap/_badge.scss
@@ -12,7 +12,7 @@
text-align: center;
white-space: nowrap;
vertical-align: baseline;
- @include border-radius();
+ @include border-radius($badge-border-radius);
// Empty badges collapse automatically
&:empty {
diff --git a/assets/stylesheets/bootstrap/_breadcrumb.scss b/assets/stylesheets/bootstrap/_breadcrumb.scss
index 5d77eea..25b9d85 100644
--- a/assets/stylesheets/bootstrap/_breadcrumb.scss
+++ b/assets/stylesheets/bootstrap/_breadcrumb.scss
@@ -27,6 +27,7 @@
+ .breadcrumb-item:hover::before {
text-decoration: underline;
}
+ // stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}
diff --git a/assets/stylesheets/bootstrap/_button-group.scss b/assets/stylesheets/bootstrap/_button-group.scss
index 4063506..1a373f3 100644
--- a/assets/stylesheets/bootstrap/_button-group.scss
+++ b/assets/stylesheets/bootstrap/_button-group.scss
@@ -1,4 +1,4 @@
-// scss-lint:disable QualifyingElement
+// stylelint-disable selector-no-qualifying-type
// Make the div behave like a button
.btn-group,
@@ -47,7 +47,8 @@
border-radius: 0;
}
-// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
+// Set corners individual because sometimes a single button can be in a .btn-group
+// and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
@@ -55,13 +56,15 @@
@include border-right-radius(0);
}
}
-// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
+// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu
+// immediately after it
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
@include border-left-radius(0);
}
-// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
+// Custom edits for including btn-groups within btn-groups (useful for including
+// dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}
@@ -152,14 +155,14 @@
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
- }
- &:first-child:not(:last-child) {
- @include border-bottom-radius(0);
- }
+ &:first-child:not(:last-child) {
+ @include border-bottom-radius(0);
+ }
- &:last-child:not(:first-child) {
- @include border-top-radius(0);
+ &:last-child:not(:first-child) {
+ @include border-top-radius(0);
+ }
}
> .btn-group:not(:first-child):not(:last-child) > .btn {
diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss
index c6dbb5d..72fc5f3 100644
--- a/assets/stylesheets/bootstrap/_buttons.scss
+++ b/assets/stylesheets/bootstrap/_buttons.scss
@@ -1,4 +1,4 @@
-// scss-lint:disable QualifyingElement
+// stylelint-disable selector-no-qualifying-type
//
// Base styles
@@ -32,8 +32,8 @@
@include box-shadow(none);
}
- &:active,
- &.active {
+ &:not([disabled]):not(.disabled):active,
+ &:not([disabled]):not(.disabled).active {
background-image: none;
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
@@ -76,7 +76,6 @@ fieldset[disabled] a.btn {
font-weight: $font-weight-normal;
color: $link-color;
background-color: transparent;
- border-radius: 0;
@include hover {
color: $link-hover-color;
diff --git a/assets/stylesheets/bootstrap/_card.scss b/assets/stylesheets/bootstrap/_card.scss
index 40fa425..a739f19 100644
--- a/assets/stylesheets/bootstrap/_card.scss
+++ b/assets/stylesheets/bootstrap/_card.scss
@@ -12,6 +12,23 @@
background-clip: border-box;
border: $card-border-width solid $card-border-color;
@include border-radius($card-border-radius);
+
+ > hr {
+ margin-right: 0;
+ margin-left: 0;
+ }
+
+ > .list-group:first-child {
+ .list-group-item:first-child {
+ @include border-top-radius($card-border-radius);
+ }
+ }
+
+ > .list-group:last-child {
+ .list-group-item:last-child {
+ @include border-bottom-radius($card-border-radius);
+ }
+ }
}
.card-body {
@@ -44,25 +61,6 @@
}
}
-.card {
- > .list-group:first-child {
- .list-group-item:first-child {
- @include border-top-radius($card-border-radius);
- }
- }
-
- > .list-group:last-child {
- .list-group-item:last-child {
- @include border-bottom-radius($card-border-radius);
- }
- }
-
- .card-header + .list-group > .list-group-item:first-child {
- border-top: 0;
- }
-}
-
-
//
// Optional textual caps
//
@@ -76,6 +74,12 @@
&:first-child {
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
}
+
+ + .list-group {
+ .list-group-item:first-child {
+ border-top: 0;
+ }
+ }
}
.card-footer {
@@ -149,6 +153,7 @@
.card {
display: flex;
+ // Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
flex: 1 0 0%;
flex-direction: column;
margin-right: $card-deck-margin;
@@ -175,6 +180,7 @@
flex-flow: row wrap;
.card {
+ // Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
flex: 1 0 0%;
margin-bottom: 0;
@@ -207,7 +213,18 @@
}
}
- &:not(:first-child):not(:last-child) {
+ &:only-child {
+ @include border-radius($card-border-radius);
+
+ .card-img-top {
+ @include border-top-radius($card-border-radius);
+ }
+ .card-img-bottom {
+ @include border-bottom-radius($card-border-radius);
+ }
+ }
+
+ &:not(:first-child):not(:last-child):not(:only-child) {
border-radius: 0;
.card-img-top,
diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss
index f181490..897d486 100644
--- a/assets/stylesheets/bootstrap/_close.scss
+++ b/assets/stylesheets/bootstrap/_close.scss
@@ -19,11 +19,11 @@
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
-// scss-lint:disable QualifyingElement
+// stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
button.close {
padding: 0;
background: transparent;
border: 0;
-webkit-appearance: none;
}
-// scss-lint:enable QualifyingElement
+// stylelint-enable
diff --git a/assets/stylesheets/bootstrap/_custom-forms.scss b/assets/stylesheets/bootstrap/_custom-forms.scss
index 1bf268b..41dae4d 100644
--- a/assets/stylesheets/bootstrap/_custom-forms.scss
+++ b/assets/stylesheets/bootstrap/_custom-forms.scss
@@ -1,5 +1,3 @@
-// scss-lint:disable PropertyCount, VendorPrefix
-
// Embedded icons from Open Iconic.
// Released under MIT and copyright 2014 Waybury.
// https://useiconic.com/open
@@ -139,7 +137,6 @@
color: $custom-select-color;
vertical-align: middle;
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
- background-clip: padding-box;
background-size: $custom-select-bg-size;
border: $custom-select-border-width solid $custom-select-border-color;
@if $enable-rounded {
@@ -165,6 +162,11 @@
}
}
+ &[multiple] {
+ height: auto;
+ background-image: none;
+ }
+
&:disabled {
color: $custom-select-disabled-color;
background-color: $custom-select-disabled-bg;
@@ -216,13 +218,11 @@
z-index: 5;
height: $custom-file-height;
padding: $custom-file-padding-y $custom-file-padding-x;
- overflow: hidden;
line-height: $custom-file-line-height;
color: $custom-file-color;
pointer-events: none;
user-select: none;
background-color: $custom-file-bg;
- background-clip: padding-box;
border: $custom-file-border-width solid $custom-file-border-color;
@include border-radius($custom-file-border-radius);
@include box-shadow($custom-file-box-shadow);
@@ -235,8 +235,9 @@
&::before {
position: absolute;
- top: 0;
- right: 0;
+ top: -$custom-file-border-width;
+ right: -$custom-file-border-width;
+ bottom: -$custom-file-border-width;
z-index: 6;
display: block;
height: $custom-file-height;
@@ -244,7 +245,8 @@
line-height: $custom-file-line-height;
color: $custom-file-button-color;
background-color: $custom-file-button-bg;
- border-left: $custom-file-border-width solid $custom-file-border-color;
+ border: $custom-file-border-width solid $custom-file-border-color;
+ @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
}
@each $lang, $text in map-get($custom-file-text, button-label) {
diff --git a/assets/stylesheets/bootstrap/_dropdown.scss b/assets/stylesheets/bootstrap/_dropdown.scss
index 05e8b16..1782d5b 100644
--- a/assets/stylesheets/bootstrap/_dropdown.scss
+++ b/assets/stylesheets/bootstrap/_dropdown.scss
@@ -6,37 +6,7 @@
.dropdown-toggle {
// Generate the caret automatically
- &::after {
- display: inline-block;
- width: 0;
- height: 0;
- margin-left: $caret-width * .85;
- vertical-align: $caret-width * .85;
- content: "";
- border-top: $caret-width solid;
- border-right: $caret-width solid transparent;
- border-left: $caret-width solid transparent;
- }
-
- &:empty::after {
- margin-left: 0;
- }
-}
-
-// Allow for dropdowns to go bottom up (aka, dropup-menu)
-// Just add .dropup after the standard .dropdown class and you're set.
-.dropup {
- .dropdown-menu {
- margin-top: 0;
- margin-bottom: $dropdown-spacer;
- }
-
- .dropdown-toggle {
- &::after {
- border-top: 0;
- border-bottom: $caret-width solid;
- }
- }
+ @include caret;
}
// The dropdown menu
@@ -61,6 +31,19 @@
@include box-shadow($dropdown-box-shadow);
}
+// Allow for dropdowns to go bottom up (aka, dropup-menu)
+// Just add .dropup after the standard .dropdown class and you're set.
+.dropup {
+ .dropdown-menu {
+ margin-top: 0;
+ margin-bottom: $dropdown-spacer;
+ }
+
+ .dropdown-toggle {
+ @include caret(up);
+ }
+}
+
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {
@include nav-divider($dropdown-divider-bg);
@@ -105,14 +88,6 @@
}
}
-// Open state for the dropdown
-.show {
- // Remove the outline when :focus is triggered
- > a {
- outline: 0;
- }
-}
-
.dropdown-menu.show {
display: block;
}
diff --git a/assets/stylesheets/bootstrap/_forms.scss b/assets/stylesheets/bootstrap/_forms.scss
index fb3dc55..0ece186 100644
--- a/assets/stylesheets/bootstrap/_forms.scss
+++ b/assets/stylesheets/bootstrap/_forms.scss
@@ -1,4 +1,4 @@
-// scss-lint:disable QualifyingElement, VendorPrefix
+// stylelint-disable selector-no-qualifying-type
//
// Textual form controls
@@ -88,21 +88,24 @@ select.form-control {
// For use with horizontal and inline forms, when you need the label text to
// align with the form controls.
.col-form-label {
- padding-top: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2);
- padding-bottom: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2);
+ padding-top: calc(#{$input-btn-padding-y} + #{$input-btn-border-width});
+ padding-bottom: calc(#{$input-btn-padding-y} + #{$input-btn-border-width});
margin-bottom: 0; // Override the `<label>` default
+ line-height: $input-btn-line-height;
}
.col-form-label-lg {
- padding-top: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2);
- padding-bottom: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2);
+ padding-top: calc(#{$input-btn-padding-y-lg} + #{$input-btn-border-width});
+ padding-bottom: calc(#{$input-btn-padding-y-lg} + #{$input-btn-border-width});
font-size: $font-size-lg;
+ line-height: $input-btn-line-height-lg;
}
.col-form-label-sm {
- padding-top: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2);
- padding-bottom: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2);
+ padding-top: calc(#{$input-btn-padding-y-sm} + #{$input-btn-border-width});
+ padding-bottom: calc(#{$input-btn-padding-y-sm} + #{$input-btn-border-width});
font-size: $font-size-sm;
+ line-height: $input-btn-line-height-sm;
}
@@ -255,28 +258,6 @@ select.form-control-lg {
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
// server side validation.
-.invalid-feedback {
- display: none;
- margin-top: .25rem;
- font-size: .875rem;
- color: $form-feedback-invalid-color;
-}
-
-.invalid-tooltip {
- position: absolute;
- top: 100%;
- z-index: 5;
- display: none;
- width: 250px;
- padding: .5rem;
- margin-top: .1rem;
- font-size: .875rem;
- line-height: 1;
- color: #fff;
- background-color: rgba($form-feedback-invalid-color,.8);
- border-radius: .2rem;
-}
-
@include form-validation-state("valid", $form-feedback-valid-color);
@include form-validation-state("invalid", $form-feedback-invalid-color);
diff --git a/assets/stylesheets/bootstrap/_functions.scss b/assets/stylesheets/bootstrap/_functions.scss
index a63680a..5d43b57 100644
--- a/assets/stylesheets/bootstrap/_functions.scss
+++ b/assets/stylesheets/bootstrap/_functions.scss
@@ -80,11 +80,7 @@
@function theme-color-level($color-name: "primary", $level: 0) {
$color: theme-color($color-name);
$color-base: if($level > 0, #000, #fff);
+ $level: abs($level);
- @if $level < 0 {
- // Lighter values need a quick double negative for the Sass math to work
- @return mix($color-base, $color, $level * -1 * $theme-color-interval);
- } @else {
- @return mix($color-base, $color, $level * $theme-color-interval);
- }
+ @return mix($color-base, $color, $level * $theme-color-interval);
}
diff --git a/assets/stylesheets/bootstrap/_input-group.scss b/assets/stylesheets/bootstrap/_input-group.scss
index 95b17be..a1d16e3 100644
--- a/assets/stylesheets/bootstrap/_input-group.scss
+++ b/assets/stylesheets/bootstrap/_input-group.scss
@@ -1,3 +1,5 @@
+// stylelint-disable selector-no-qualifying-type
+
//
// Base styles
//
@@ -5,7 +7,7 @@
.input-group {
position: relative;
display: flex;
- align-items: center;
+ align-items: stretch;
width: 100%;
.form-control {
@@ -29,6 +31,8 @@
.input-group-addon,
.input-group-btn,
.input-group .form-control {
+ display: flex;
+ align-items: center;
&:not(:first-child):not(:last-child) {
@include border-radius(0);
}
@@ -70,7 +74,6 @@
color: $input-group-addon-color;
text-align: center;
background-color: $input-group-addon-bg;
- background-clip: padding-box;
border: $input-btn-border-width solid $input-group-addon-border-color;
@include border-radius($input-border-radius);
@@ -87,13 +90,11 @@
@include border-radius($input-border-radius-lg);
}
- // scss-lint:disable QualifyingElement
// Nuke default margins from checkboxes and radios to vertically center within.
input[type="radio"],
input[type="checkbox"] {
margin-top: 0;
}
- // scss-lint:enable QualifyingElement
}
@@ -132,6 +133,7 @@
.input-group-btn {
position: relative;
+ align-items: stretch;
// Jankily prevent input button groups from wrapping with `white-space` and
// `font-size` in combination with `inline-block` on buttons.
font-size: 0;
@@ -141,8 +143,6 @@
// element above the siblings.
> .btn {
position: relative;
- background-clip: padding-box;
- border: $input-btn-border-width solid $input-group-btn-border-color;
+ .btn {
margin-left: (-$input-btn-border-width);
@@ -154,6 +154,10 @@
}
}
+ &:first-child > .btn + .btn {
+ margin-left: 0;
+ }
+
// Negative margin to only have a single, shared border between the two
&:not(:last-child) {
> .btn,
@@ -165,7 +169,14 @@
> .btn,
> .btn-group {
z-index: 2;
- margin-left: (-$input-btn-border-width);
+ // remove nagative margin ($input-btn-border-width) to solve overlapping issue with button.
+ margin-left: 0;
+
+ // When input is first, overlap the right side of it with the button(-group)
+ &:first-child {
+ margin-left: (-$input-btn-border-width);
+ }
+
// Because specificity
@include hover-focus-active {
z-index: 3;
diff --git a/assets/stylesheets/bootstrap/_list-group.scss b/assets/stylesheets/bootstrap/_list-group.scss
index 7e0b19e..ce3876b 100644
--- a/assets/stylesheets/bootstrap/_list-group.scss
+++ b/assets/stylesheets/bootstrap/_list-group.scss
@@ -86,8 +86,13 @@
.list-group-flush {
.list-group-item {
border-right: 0;
+ border-bottom: 0;
border-left: 0;
border-radius: 0;
+
+ &:first-child {
+ border-top: 0;
+ }
}
&:first-child {
diff --git a/assets/stylesheets/bootstrap/_mixins.scss b/assets/stylesheets/bootstrap/_mixins.scss
index 09035bf..d9a1774 100644
--- a/assets/stylesheets/bootstrap/_mixins.scss
+++ b/assets/stylesheets/bootstrap/_mixins.scss
@@ -19,6 +19,7 @@
// // Components
@import "mixins/alert";
@import "mixins/buttons";
+@import "mixins/caret";
@import "mixins/pagination";
@import "mixins/lists";
@import "mixins/list-group";
diff --git a/assets/stylesheets/bootstrap/_modal.scss b/assets/stylesheets/bootstrap/_modal.scss
index a563e6f..e655850 100644
--- a/assets/stylesheets/bootstrap/_modal.scss
+++ b/assets/stylesheets/bootstrap/_modal.scss
@@ -82,13 +82,16 @@
// Top section of the modal w/ title and dismiss
.modal-header {
display: flex;
- align-items: center; // vertically center it
+ align-items: flex-start; // so the close btn always stays on the upper right corner
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: $modal-header-padding;
border-bottom: $modal-header-border-width solid $modal-header-border-color;
+ @include border-top-radius($border-radius-lg);
.close {
- margin-left: auto; // Force icon to the right even when there's no .modal-title
+ padding: $modal-header-padding;
+ // auto on the left force icon to the right even when there is no .modal-title
+ margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
}
}
diff --git a/assets/stylesheets/bootstrap/_nav.scss b/assets/stylesheets/bootstrap/_nav.scss
index ed5d76b..14e76c9 100644
--- a/assets/stylesheets/bootstrap/_nav.scss
+++ b/assets/stylesheets/bootstrap/_nav.scss
@@ -74,12 +74,12 @@
.nav-pills {
.nav-link {
@include border-radius($nav-pills-border-radius);
+ }
- &.active,
- .show > & {
- color: $nav-pills-link-active-color;
- background-color: $nav-pills-link-active-bg;
- }
+ .nav-link.active,
+ .show > .nav-link {
+ color: $nav-pills-link-active-color;
+ background-color: $nav-pills-link-active-bg;
}
}
diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss
index ed49b76..6b023e8 100644
--- a/assets/stylesheets/bootstrap/_navbar.scss
+++ b/assets/stylesheets/bootstrap/_navbar.scss
@@ -98,6 +98,7 @@
// on the `.navbar` parent.
.navbar-collapse {
flex-basis: 100%;
+ flex-grow: 1;
// For always expanded or extra full navbars, ensure content aligns itself
// properly vertically. Can be easily overridden with flex utilities.
align-items: center;
@@ -146,8 +147,7 @@
}
@include media-breakpoint-up($next) {
- flex-direction: row;
- flex-wrap: nowrap;
+ flex-flow: row nowrap;
justify-content: flex-start;
.navbar-nav {
@@ -174,15 +174,23 @@
flex-wrap: nowrap;
}
- // scss-lint:disable ImportantRule
.navbar-collapse {
- display: flex !important;
+ display: flex !important; // stylelint-disable-line declaration-no-important
+
+ // Changes flex-bases to auto because of an IE10 bug
+ flex-basis: auto;
}
- // scss-lint:enable ImportantRule
.navbar-toggler {
display: none;
}
+
+ .dropup {
+ .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ }
+ }
}
}
}
@@ -235,6 +243,13 @@
.navbar-text {
color: $navbar-light-color;
+ a {
+ color: $navbar-light-active-color;
+
+ @include hover-focus {
+ color: $navbar-light-active-color;
+ }
+ }
}
}
@@ -280,5 +295,12 @@
.navbar-text {
color: $navbar-dark-color;
+ a {
+ color: $navbar-dark-active-color;
+
+ @include hover-focus {
+ color: $navbar-dark-active-color;
+ }
+ }
}
}
diff --git a/assets/stylesheets/bootstrap/_pagination.scss b/assets/stylesheets/bootstrap/_pagination.scss
index 4ef1442..69a36ff 100644
--- a/assets/stylesheets/bootstrap/_pagination.scss
+++ b/assets/stylesheets/bootstrap/_pagination.scss
@@ -1,8 +1,6 @@
.pagination {
display: flex;
- // 1-2: Disable browser default list styles
- padding-left: 0; // 1
- list-style: none; // 2
+ @include list-unstyled();
@include border-radius();
}
diff --git a/assets/stylesheets/bootstrap/_print.scss b/assets/stylesheets/bootstrap/_print.scss
index 7f8d990..6505d3e 100644
--- a/assets/stylesheets/bootstrap/_print.scss
+++ b/assets/stylesheets/bootstrap/_print.scss
@@ -1,4 +1,4 @@
-// scss-lint:disable QualifyingElement
+// stylelint-disable declaration-no-important, selector-no-qualifying-type
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
@@ -14,8 +14,7 @@
*::before,
*::after {
// Bootstrap specific; comment out `color` and `background`
- //color: #000 !important; // Black prints faster:
- // http://www.sanbeiji.com/archives/953
+ //color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
text-shadow: none !important;
//background: transparent !important;
box-shadow: none !important;
diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss
index 41f084b..3055cc3 100644
--- a/assets/stylesheets/bootstrap/_reboot.scss
+++ b/assets/stylesheets/bootstrap/_reboot.scss
@@ -1,4 +1,4 @@
-// scss-lint:disable QualifyingElement, DuplicateProperty, VendorPrefix
+// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
// Reboot
//
@@ -35,13 +35,17 @@ html {
// IE10+ doesn't honor `<meta name="viewport">` in some cases.
@at-root {
- @-ms-viewport { width: device-width; }
+ @-ms-viewport {
+ width: device-width;
+ }
}
+// stylelint-disable selector-list-comma-newline-after
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
+// stylelint-enable selector-list-comma-newline-after
// Body
//
@@ -91,10 +95,12 @@ hr {
//
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
// margin for easier control within type scales as it avoids margin collapsing.
+// stylelint-disable selector-list-comma-newline-after
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
- margin-bottom: .5rem;
+ margin-bottom: $headings-margin-bottom;
}
+// stylelint-enable selector-list-comma-newline-after
// Reset margins on paragraphs
//
@@ -157,10 +163,12 @@ dfn {
font-style: italic; // Add the correct font style in Android 4.3-
}
+// stylelint-disable font-weight-notation
b,
strong {
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
}
+// stylelint-enable font-weight-notation
small {
font-size: 80%; // Add the correct font size in all browsers
@@ -224,6 +232,7 @@ a:not([href]):not([tabindex]) {
// Code
//
+// stylelint-disable font-family-no-duplicate-names
pre,
code,
kbd,
@@ -231,6 +240,7 @@ samp {
font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
font-size: 1em; // Correct the odd `em` font sizing in all browsers.
}
+// stylelint-enable font-family-no-duplicate-names
pre {
// Remove browser default top margin
@@ -239,6 +249,9 @@ pre {
margin-bottom: 1rem;
// Don't allow content to break outside
overflow: auto;
+ // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
+ // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
+ -ms-overflow-style: scrollbar;
}
@@ -273,14 +286,14 @@ svg:not(:root) {
// However, they DO support removing the click delay via `touch-action: manipulation`.
// See:
// * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
-// * http://caniuse.com/#feat=css-touch-action
+// * https://caniuse.com/#feat=css-touch-action
// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
a,
area,
button,
[role="button"],
-input:not([type=range]),
+input:not([type="range"]),
label,
select,
summary,
@@ -322,6 +335,13 @@ label {
margin-bottom: .5rem;
}
+// Remove the default `border-radius` that macOS Chrome adds.
+//
+// Details at https://github.com/twbs/bootstrap/issues/24093
+button {
+ border-radius: 0;
+}
+
// Work around a Firefox/IE bug where the transparent `button` background
// results in a loss of the default `button` focus styles.
//
diff --git a/assets/stylesheets/bootstrap/_root.scss b/assets/stylesheets/bootstrap/_root.scss
new file mode 100644
index 0000000..78ac039
--- /dev/null
+++ b/assets/stylesheets/bootstrap/_root.scss
@@ -0,0 +1,16 @@
+:root {
+ @each $color, $value in $colors {
+ --#{$color}: $value;
+ }
+
+ @each $color, $value in $theme-colors {
+ --#{$color}: $value;
+ }
+
+ @each $bp, $value in $grid-breakpoints {
+ --breakpoint-#{$bp}: $value;
+ }
+
+ --font-family-sans-serif: $font-family-sans-serif;
+ --font-family-monospace: $font-family-monospace;
+}
diff --git a/assets/stylesheets/bootstrap/_tables.scss b/assets/stylesheets/bootstrap/_tables.scss
index 3238439..6bd0b91 100644
--- a/assets/stylesheets/bootstrap/_tables.scss
+++ b/assets/stylesheets/bootstrap/_tables.scss
@@ -103,6 +103,7 @@
//
// Same table markup, but inverted color scheme: dark background and light text.
+// stylelint-disable-next-line no-duplicate-selectors
.table {
.thead-dark {
th {
diff --git a/assets/stylesheets/bootstrap/_tooltip.scss b/assets/stylesheets/bootstrap/_tooltip.scss
index fe97fbb..7b5db1c 100644
--- a/assets/stylesheets/bootstrap/_tooltip.scss
+++ b/assets/stylesheets/bootstrap/_tooltip.scss
@@ -21,6 +21,12 @@
height: $tooltip-arrow-height;
}
+ .arrow::before {
+ position: absolute;
+ border-color: transparent;
+ border-style: solid;
+ }
+
&.bs-tooltip-top {
padding: $tooltip-arrow-width 0;
.arrow {
@@ -88,12 +94,6 @@
@extend .bs-tooltip-left;
}
}
-
- .arrow::before {
- position: absolute;
- border-color: transparent;
- border-style: solid;
- }
}
// Wrapper for the tooltip content
diff --git a/assets/stylesheets/bootstrap/_transitions.scss b/assets/stylesheets/bootstrap/_transitions.scss
index 86c04a5..df5744b 100644
--- a/assets/stylesheets/bootstrap/_transitions.scss
+++ b/assets/stylesheets/bootstrap/_transitions.scss
@@ -1,3 +1,5 @@
+// stylelint-disable selector-no-qualifying-type
+
.fade {
opacity: 0;
@include transition($transition-fade);
diff --git a/assets/stylesheets/bootstrap/_type.scss b/assets/stylesheets/bootstrap/_type.scss
index 8928341..b1b8f61 100644
--- a/assets/stylesheets/bootstrap/_type.scss
+++ b/assets/stylesheets/bootstrap/_type.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important, selector-list-comma-newline-after
+
//
// Headings
//
diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss
index c0b5494..1808e4b 100644
--- a/assets/stylesheets/bootstrap/_variables.scss
+++ b/assets/stylesheets/bootstrap/_variables.scss
@@ -8,7 +8,8 @@
// Color system
//
-$white: #fff !default;
+// stylelint-disable
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
@@ -18,19 +19,19 @@ $gray-600: #868e96 !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
$grays: () !default;
$grays: map-merge((
- 100: $gray-100,
- 200: $gray-200,
- 300: $gray-300,
- 400: $gray-400,
- 500: $gray-500,
- 600: $gray-600,
- 700: $gray-700,
- 800: $gray-800,
- 900: $gray-900
+ "100": $gray-100,
+ "200": $gray-200,
+ "300": $gray-300,
+ "400": $gray-400,
+ "500": $gray-500,
+ "600": $gray-600,
+ "700": $gray-700,
+ "800": $gray-800,
+ "900": $gray-900
), $grays);
$blue: #007bff !default;
@@ -46,41 +47,43 @@ $cyan: #17a2b8 !default;
$colors: () !default;
$colors: map-merge((
- blue: $blue,
- indigo: $indigo,
- purple: $purple,
- pink: $pink,
- red: $red,
- orange: $orange,
- yellow: $yellow,
- green: $green,
- teal: $teal,
- cyan: $cyan,
- white: $white,
- gray: $gray-600,
- gray-dark: $gray-800
+ "blue": $blue,
+ "indigo": $indigo,
+ "purple": $purple,
+ "pink": $pink,
+ "red": $red,
+ "orange": $orange,
+ "yellow": $yellow,
+ "green": $green,
+ "teal": $teal,
+ "cyan": $cyan,
+ "white": $white,
+ "gray": $gray-600,
+ "gray-dark": $gray-800
), $colors);
$theme-colors: () !default;
$theme-colors: map-merge((
- primary: $blue,
- secondary: $gray-600,
- success: $green,
- info: $cyan,
- warning: $yellow,
- danger: $red,
- light: $gray-100,
- dark: $gray-800
+ "primary": $blue,
+ "secondary": $gray-600,
+ "success": $green,
+ "info": $cyan,
+ "warning": $yellow,
+ "danger": $red,
+ "light": $gray-100,
+ "dark": $gray-800
), $theme-colors);
+// stylelint-enable
// Set a specific jump point for requesting color jumps
-$theme-color-interval: 8% !default;
+$theme-color-interval: 8% !default;
// Options
//
// Quickly modify global styling by enabling or disabling optional features.
+$enable-caret: true !default;
$enable-rounded: true !default;
$enable-shadows: false !default;
$enable-gradients: false !default;
@@ -118,23 +121,23 @@ $sizes: (
//
// Settings for the `<body>` element.
-$body-bg: $white !default;
-$body-color: $gray-900 !default;
+$body-bg: $white !default;
+$body-color: $gray-900 !default;
// Links
//
// Style anchor elements.
-$link-color: theme-color("primary") !default;
-$link-decoration: none !default;
-$link-hover-color: darken($link-color, 15%) !default;
-$link-hover-decoration: underline !default;
+$link-color: theme-color("primary") !default;
+$link-decoration: none !default;
+$link-hover-color: darken($link-color, 15%) !default;
+$link-hover-decoration: underline !default;
// Paragraphs
//
// Style p element.
-$paragraph-margin-bottom: 1rem !default;
+$paragraph-margin-bottom: 1rem !default;
// Grid breakpoints
@@ -149,6 +152,7 @@ $grid-breakpoints: (
lg: 992px,
xl: 1200px
) !default;
+
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints);
@@ -163,6 +167,7 @@ $container-max-widths: (
lg: 960px,
xl: 1140px
) !default;
+
@include _assert-ascending($container-max-widths, "$container-max-widths");
@@ -170,97 +175,99 @@ $container-max-widths: (
//
// Set the number of columns and specify the width of the gutters.
-$grid-columns: 12 !default;
-$grid-gutter-width: 30px !default;
+$grid-columns: 12 !default;
+$grid-gutter-width: 30px !default;
// Components
//
// Define common padding and border radius sizes and more.
-$line-height-lg: 1.5 !default;
-$line-height-sm: 1.5 !default;
+$line-height-lg: 1.5 !default;
+$line-height-sm: 1.5 !default;
-$border-width: 1px !default;
-$border-color: $gray-200 !default;
+$border-width: 1px !default;
+$border-color: $gray-200 !default;
-$border-radius: .25rem !default;
-$border-radius-lg: .3rem !default;
-$border-radius-sm: .2rem !default;
+$border-radius: .25rem !default;
+$border-radius-lg: .3rem !default;
+$border-radius-sm: .2rem !default;
-$component-active-color: $white !default;
-$component-active-bg: theme-color("primary") !default;
+$component-active-color: $white !default;
+$component-active-bg: theme-color("primary") !default;
-$caret-width: .3em !default;
+$caret-width: .3em !default;
-$transition-base: all .2s ease-in-out !default;
-$transition-fade: opacity .15s linear !default;
-$transition-collapse: height .35s ease !default;
+$transition-base: all .2s ease-in-out !default;
+$transition-fade: opacity .15s linear !default;
+$transition-collapse: height .35s ease !default;
// Fonts
//
// Font, line-height, and color for body text, headings, and more.
-$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$font-family-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
-$font-family-base: $font-family-sans-serif !default;
+// stylelint-disable value-keyword-case
+$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
+$font-family-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
+$font-family-base: $font-family-sans-serif !default;
+// stylelint-enable value-keyword-case
-$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
-$font-size-lg: 1.25rem !default;
-$font-size-sm: .875rem !default;
+$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
+$font-size-lg: 1.25rem !default;
+$font-size-sm: .875rem !default;
-$font-weight-light: 300 !default;
-$font-weight-normal: normal !default;
-$font-weight-bold: bold !default;
+$font-weight-light: 300 !default;
+$font-weight-normal: 400 !default;
+$font-weight-bold: 700 !default;
-$font-weight-base: $font-weight-normal !default;
-$line-height-base: 1.5 !default;
+$font-weight-base: $font-weight-normal !default;
+$line-height-base: 1.5 !default;
-$h1-font-size: 2.5rem !default;
-$h2-font-size: 2rem !default;
-$h3-font-size: 1.75rem !default;
-$h4-font-size: 1.5rem !default;
-$h5-font-size: 1.25rem !default;
-$h6-font-size: 1rem !default;
+$h1-font-size: 2.5rem !default;
+$h2-font-size: 2rem !default;
+$h3-font-size: 1.75rem !default;
+$h4-font-size: 1.5rem !default;
+$h5-font-size: 1.25rem !default;
+$h6-font-size: 1rem !default;
-$headings-margin-bottom: ($spacer / 2) !default;
-$headings-font-family: inherit !default;
-$headings-font-weight: 500 !default;
-$headings-line-height: 1.1 !default;
-$headings-color: inherit !default;
+$headings-margin-bottom: ($spacer / 2) !default;
+$headings-font-family: inherit !default;
+$headings-font-weight: 500 !default;
+$headings-line-height: 1.1 !default;
+$headings-color: inherit !default;
-$display1-size: 6rem !default;
-$display2-size: 5.5rem !default;
-$display3-size: 4.5rem !default;
-$display4-size: 3.5rem !default;
+$display1-size: 6rem !default;
+$display2-size: 5.5rem !default;
+$display3-size: 4.5rem !default;
+$display4-size: 3.5rem !default;
-$display1-weight: 300 !default;
-$display2-weight: 300 !default;
-$display3-weight: 300 !default;
-$display4-weight: 300 !default;
-$display-line-height: $headings-line-height !default;
+$display1-weight: 300 !default;
+$display2-weight: 300 !default;
+$display3-weight: 300 !default;
+$display4-weight: 300 !default;
+$display-line-height: $headings-line-height !default;
-$lead-font-size: 1.25rem !default;
-$lead-font-weight: 300 !default;
+$lead-font-size: 1.25rem !default;
+$lead-font-weight: 300 !default;
-$small-font-size: 80% !default;
+$small-font-size: 80% !default;
-$text-muted: $gray-600 !default;
+$text-muted: $gray-600 !default;
-$blockquote-small-color: $gray-600 !default;
-$blockquote-font-size: ($font-size-base * 1.25) !default;
+$blockquote-small-color: $gray-600 !default;
+$blockquote-font-size: ($font-size-base * 1.25) !default;
-$hr-border-color: rgba($black,.1) !default;
-$hr-border-width: $border-width !default;
+$hr-border-color: rgba($black,.1) !default;
+$hr-border-width: $border-width !default;
-$mark-padding: .2em !default;
+$mark-padding: .2em !default;
-$dt-font-weight: $font-weight-bold !default;
+$dt-font-weight: $font-weight-bold !default;
-$kbd-box-shadow: inset 0 -.1rem 0 rgba($black,.25) !default;
-$nested-kbd-font-weight: $font-weight-bold !default;
+$kbd-box-shadow: inset 0 -.1rem 0 rgba($black,.25) !default;
+$nested-kbd-font-weight: $font-weight-bold !default;
-$list-inline-padding: 5px !default;
+$list-inline-padding: 5px !default;
$mark-bg: #fcf8e3 !default;
@@ -269,180 +276,179 @@ $mark-bg: #fcf8e3 !default;
//
// Customizes the `.table` component with basic values, each used across all table variations.
-$table-cell-padding: .75rem !default;
-$table-cell-padding-sm: .3rem !default;
+$table-cell-padding: .75rem !default;
+$table-cell-padding-sm: .3rem !default;
-$table-bg: transparent !default;
-$table-accent-bg: rgba($black,.05) !default;
-$table-hover-bg: rgba($black,.075) !default;
-$table-active-bg: $table-hover-bg !default;
+$table-bg: transparent !default;
+$table-accent-bg: rgba($black,.05) !default;
+$table-hover-bg: rgba($black,.075) !default;
+$table-active-bg: $table-hover-bg !default;
-$table-border-width: $border-width !default;
-$table-border-color: $gray-200 !default;
+$table-border-width: $border-width !default;
+$table-border-color: $gray-200 !default;
-$table-head-bg: $gray-200 !default;
-$table-head-color: $gray-700 !default;
+$table-head-bg: $gray-200 !default;
+$table-head-color: $gray-700 !default;
-$table-dark-bg: $gray-900 !default;
-$table-dark-accent-bg: rgba($white, .05) !default;
-$table-dark-hover-bg: rgba($white, .075) !default;
-$table-dark-border-color: lighten($gray-900, 7.5%) !default;
-$table-dark-color: $body-bg !default;
+$table-dark-bg: $gray-900 !default;
+$table-dark-accent-bg: rgba($white, .05) !default;
+$table-dark-hover-bg: rgba($white, .075) !default;
+$table-dark-border-color: lighten($gray-900, 7.5%) !default;
+$table-dark-color: $body-bg !default;
// Buttons
//
// For each of Bootstrap's buttons, define text, background and border color.
-$input-btn-padding-y: .5rem !default;
-$input-btn-padding-x: .75rem !default;
-$input-btn-line-height: 1.25 !default;
+$input-btn-padding-y: .375rem !default;
+$input-btn-padding-x: .75rem !default;
+$input-btn-line-height: $line-height-base !default;
-$input-btn-padding-y-sm: .25rem !default;
-$input-btn-padding-x-sm: .5rem !default;
-$input-btn-line-height-sm: 1.5 !default;
+$input-btn-padding-y-sm: .25rem !default;
+$input-btn-padding-x-sm: .5rem !default;
+$input-btn-line-height-sm: $line-height-sm !default;
-$input-btn-padding-y-lg: .5rem !default;
-$input-btn-padding-x-lg: 1rem !default;
-$input-btn-line-height-lg: 1.5 !default;
+$input-btn-padding-y-lg: .5rem !default;
+$input-btn-padding-x-lg: 1rem !default;
+$input-btn-line-height-lg: $line-height-lg !default;
-$btn-font-weight: $font-weight-normal !default;
-$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default;
-$btn-focus-box-shadow: 0 0 0 3px rgba(theme-color("primary"), .25) !default;
-$btn-active-box-shadow: inset 0 3px 5px rgba($black,.125) !default;
+$btn-font-weight: $font-weight-normal !default;
+$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default;
+$btn-focus-box-shadow: 0 0 0 3px rgba(theme-color("primary"), .25) !default;
+$btn-active-box-shadow: inset 0 3px 5px rgba($black,.125) !default;
-$btn-link-disabled-color: $gray-600 !default;
+$btn-link-disabled-color: $gray-600 !default;
-$btn-block-spacing-y: .5rem !default;
+$btn-block-spacing-y: .5rem !default;
// Allows for customizing button radius independently from global border radius
-$btn-border-radius: $border-radius !default;
-$btn-border-radius-lg: $border-radius-lg !default;
-$btn-border-radius-sm: $border-radius-sm !default;
+$btn-border-radius: $border-radius !default;
+$btn-border-radius-lg: $border-radius-lg !default;
+$btn-border-radius-sm: $border-radius-sm !default;
-$btn-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
+$btn-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
// Forms
-$input-bg: $white !default;
-$input-disabled-bg: $gray-200 !default;
+$input-bg: $white !default;
+$input-disabled-bg: $gray-200 !default;
-$input-color: $gray-700 !default;
-$input-border-color: rgba($black,.15) !default;
-$input-btn-border-width: $border-width !default; // For form controls and buttons
-$input-box-shadow: inset 0 1px 1px rgba($black,.075) !default;
+$input-color: $gray-700 !default;
+$input-border-color: $gray-400 !default;
+$input-btn-border-width: $border-width !default; // For form controls and buttons
+$input-box-shadow: inset 0 1px 1px rgba($black,.075) !default;
-$input-border-radius: $border-radius !default;
-$input-border-radius-lg: $border-radius-lg !default;
-$input-border-radius-sm: $border-radius-sm !default;
+$input-border-radius: $border-radius !default;
+$input-border-radius-lg: $border-radius-lg !default;
+$input-border-radius-sm: $border-radius-sm !default;
-$input-focus-bg: $input-bg !default;
-$input-focus-border-color: lighten(theme-color("primary"), 25%) !default;
-$input-focus-box-shadow: $input-box-shadow, $btn-focus-box-shadow !default;
-$input-focus-color: $input-color !default;
+$input-focus-bg: $input-bg !default;
+$input-focus-border-color: lighten(theme-color("primary"), 25%) !default;
+$input-focus-box-shadow: $input-box-shadow, $btn-focus-box-shadow !default;
+$input-focus-color: $input-color !default;
-$input-placeholder-color: $gray-600 !default;
+$input-placeholder-color: $gray-600 !default;
-$input-height-border: $input-btn-border-width * 2 !default;
+$input-height-border: $input-btn-border-width * 2 !default;
-$input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
-$input-height: calc(#{$input-height-inner} + #{$input-height-border}) !default;
+$input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
+$input-height: calc(#{$input-height-inner} + #{$input-height-border}) !default;
-$input-height-inner-sm: ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
-$input-height-sm: calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
+$input-height-inner-sm: ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
+$input-height-sm: calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
-$input-height-inner-lg: ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
-$input-height-lg: calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
+$input-height-inner-lg: ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
+$input-height-lg: calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
-$input-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s !default;
+$input-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s !default;
-$form-text-margin-top: .25rem !default;
+$form-text-margin-top: .25rem !default;
-$form-check-margin-bottom: .5rem !default;
-$form-check-input-gutter: 1.25rem !default;
-$form-check-input-margin-y: .25rem !default;
-$form-check-input-margin-x: .25rem !default;
+$form-check-margin-bottom: .5rem !default;
+$form-check-input-gutter: 1.25rem !default;
+$form-check-input-margin-y: .25rem !default;
+$form-check-input-margin-x: .25rem !default;
-$form-check-inline-margin-x: .75rem !default;
+$form-check-inline-margin-x: .75rem !default;
-$form-group-margin-bottom: 1rem !default;
+$form-group-margin-bottom: 1rem !default;
-$input-group-addon-color: $input-color !default;
-$input-group-addon-bg: $gray-200 !default;
-$input-group-addon-border-color: $input-border-color !default;
-$input-group-btn-border-color: $input-border-color !default;
+$input-group-addon-color: $input-color !default;
+$input-group-addon-bg: $gray-200 !default;
+$input-group-addon-border-color: $input-border-color !default;
-$custom-control-gutter: 1.5rem !default;
-$custom-control-spacer-y: .25rem !default;
-$custom-control-spacer-x: 1rem !default;
+$custom-control-gutter: 1.5rem !default;
+$custom-control-spacer-y: .25rem !default;
+$custom-control-spacer-x: 1rem !default;
-$custom-control-indicator-size: 1rem !default;
-$custom-control-indicator-bg: #ddd !default;
-$custom-control-indicator-bg-size: 50% 50% !default;
-$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black,.1) !default;
+$custom-control-indicator-size: 1rem !default;
+$custom-control-indicator-bg: #ddd !default;
+$custom-control-indicator-bg-size: 50% 50% !default;
+$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black,.1) !default;
-$custom-control-indicator-disabled-bg: $gray-200 !default;
-$custom-control-description-disabled-color: $gray-600 !default;
+$custom-control-indicator-disabled-bg: $gray-200 !default;
+$custom-control-description-disabled-color: $gray-600 !default;
-$custom-control-indicator-checked-color: $white !default;
-$custom-control-indicator-checked-bg: theme-color("primary") !default;
-$custom-control-indicator-checked-box-shadow: none !default;
+$custom-control-indicator-checked-color: $white !default;
+$custom-control-indicator-checked-bg: theme-color("primary") !default;
+$custom-control-indicator-checked-box-shadow: none !default;
-$custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, 0 0 0 3px theme-color("primary") !default;
+$custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, 0 0 0 3px theme-color("primary") !default;
-$custom-control-indicator-active-color: $white !default;
-$custom-control-indicator-active-bg: lighten(theme-color("primary"), 35%) !default;
-$custom-control-indicator-active-box-shadow: none !default;
+$custom-control-indicator-active-color: $white !default;
+$custom-control-indicator-active-bg: lighten(theme-color("primary"), 35%) !default;
+$custom-control-indicator-active-box-shadow: none !default;
-$custom-checkbox-indicator-border-radius: $border-radius !default;
-$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-checkbox-indicator-border-radius: $border-radius !default;
+$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-checkbox-indicator-indeterminate-bg: theme-color("primary") !default;
+$custom-checkbox-indicator-indeterminate-bg: theme-color("primary") !default;
$custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color !default;
-$custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
$custom-checkbox-indicator-indeterminate-box-shadow: none !default;
-$custom-radio-indicator-border-radius: 50% !default;
-$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-radio-indicator-border-radius: 50% !default;
+$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-select-padding-y: .375rem !default;
-$custom-select-padding-x: .75rem !default;
-$custom-select-height: $input-height !default;
+$custom-select-padding-y: .375rem !default;
+$custom-select-padding-x: .75rem !default;
+$custom-select-height: $input-height !default;
$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
$custom-select-line-height: $input-btn-line-height !default;
$custom-select-color: $input-color !default;
$custom-select-disabled-color: $gray-600 !default;
-$custom-select-bg: $white !default;
-$custom-select-disabled-bg: $gray-200 !default;
-$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions
-$custom-select-indicator-color: #333 !default;
-$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-select-border-width: $input-btn-border-width !default;
-$custom-select-border-color: $input-border-color !default;
-$custom-select-border-radius: $border-radius !default;
-
-$custom-select-focus-border-color: lighten(theme-color("primary"), 25%) !default;
-$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
-
-$custom-select-font-size-sm: 75% !default;
-$custom-select-height-sm: $input-height-sm !default;
-
-$custom-file-height: $input-height !default;
-$custom-file-width: 14rem !default;
-$custom-file-focus-box-shadow: 0 0 0 .075rem $white, 0 0 0 .2rem theme-color("primary") !default;
-
-$custom-file-padding-y: $input-btn-padding-y !default;
-$custom-file-padding-x: $input-btn-padding-x !default;
-$custom-file-line-height: $input-btn-line-height !default;
-$custom-file-color: $input-color !default;
-$custom-file-bg: $input-bg !default;
-$custom-file-border-width: $input-btn-border-width !default;
-$custom-file-border-color: $input-border-color !default;
-$custom-file-border-radius: $input-border-radius !default;
-$custom-file-box-shadow: $input-box-shadow !default;
-$custom-file-button-color: $custom-file-color !default;
-$custom-file-button-bg: $input-group-addon-bg !default;
+$custom-select-bg: $white !default;
+$custom-select-disabled-bg: $gray-200 !default;
+$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions
+$custom-select-indicator-color: #333 !default;
+$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-select-border-width: $input-btn-border-width !default;
+$custom-select-border-color: $input-border-color !default;
+$custom-select-border-radius: $border-radius !default;
+
+$custom-select-focus-border-color: lighten(theme-color("primary"), 25%) !default;
+$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
+
+$custom-select-font-size-sm: 75% !default;
+$custom-select-height-sm: $input-height-sm !default;
+
+$custom-file-height: $input-height !default;
+$custom-file-width: 14rem !default;
+$custom-file-focus-box-shadow: 0 0 0 .075rem $white, 0 0 0 .2rem theme-color("primary") !default;
+
+$custom-file-padding-y: $input-btn-padding-y !default;
+$custom-file-padding-x: $input-btn-padding-x !default;
+$custom-file-line-height: $input-btn-line-height !default;
+$custom-file-color: $input-color !default;
+$custom-file-bg: $input-bg !default;
+$custom-file-border-width: $input-btn-border-width !default;
+$custom-file-border-color: $input-border-color !default;
+$custom-file-border-radius: $input-border-radius !default;
+$custom-file-box-shadow: $input-box-shadow !default;
+$custom-file-button-color: $custom-file-color !default;
+$custom-file-button-bg: $input-group-addon-bg !default;
$custom-file-text: (
placeholder: (
en: "Choose file..."
@@ -454,36 +460,36 @@ $custom-file-text: (
// Form validation
-$form-feedback-valid-color: theme-color("success") !default;
-$form-feedback-invalid-color: theme-color("danger") !default;
+$form-feedback-valid-color: theme-color("success") !default;
+$form-feedback-invalid-color: theme-color("danger") !default;
// Dropdowns
//
// Dropdown menu container and contents.
-$dropdown-min-width: 10rem !default;
-$dropdown-padding-y: .5rem !default;
-$dropdown-spacer: .125rem !default;
-$dropdown-bg: $white !default;
-$dropdown-border-color: rgba($black,.15) !default;
-$dropdown-border-width: $border-width !default;
-$dropdown-divider-bg: $gray-200 !default;
-$dropdown-box-shadow: 0 .5rem 1rem rgba($black,.175) !default;
+$dropdown-min-width: 10rem !default;
+$dropdown-padding-y: .5rem !default;
+$dropdown-spacer: .125rem !default;
+$dropdown-bg: $white !default;
+$dropdown-border-color: rgba($black,.15) !default;
+$dropdown-border-width: $border-width !default;
+$dropdown-divider-bg: $gray-200 !default;
+$dropdown-box-shadow: 0 .5rem 1rem rgba($black,.175) !default;
-$dropdown-link-color: $gray-900 !default;
-$dropdown-link-hover-color: darken($gray-900, 5%) !default;
-$dropdown-link-hover-bg: $gray-100 !default;
+$dropdown-link-color: $gray-900 !default;
+$dropdown-link-hover-color: darken($gray-900, 5%) !default;
+$dropdown-link-hover-bg: $gray-100 !default;
-$dropdown-link-active-color: $component-active-color !default;
-$dropdown-link-active-bg: $component-active-bg !default;
+$dropdown-link-active-color: $component-active-color !default;
+$dropdown-link-active-bg: $component-active-bg !default;
-$dropdown-link-disabled-color: $gray-600 !default;
+$dropdown-link-disabled-color: $gray-600 !default;
-$dropdown-item-padding-y: .25rem !default;
-$dropdown-item-padding-x: 1.5rem !default;
+$dropdown-item-padding-y: .25rem !default;
+$dropdown-item-padding-x: 1.5rem !default;
-$dropdown-header-color: $gray-600 !default;
+$dropdown-header-color: $gray-600 !default;
// Z-index master list
@@ -491,31 +497,31 @@ $dropdown-header-color: $gray-600 !default;
// Warning: Avoid customizing these values. They're used for a bird's eye view
// of components dependent on the z-axis and are designed to all work together.
-$zindex-dropdown: 1000 !default;
-$zindex-sticky: 1020 !default;
-$zindex-fixed: 1030 !default;
-$zindex-modal-backdrop: 1040 !default;
-$zindex-modal: 1050 !default;
-$zindex-popover: 1060 !default;
-$zindex-tooltip: 1070 !default;
+$zindex-dropdown: 1000 !default;
+$zindex-sticky: 1020 !default;
+$zindex-fixed: 1030 !default;
+$zindex-modal-backdrop: 1040 !default;
+$zindex-modal: 1050 !default;
+$zindex-popover: 1060 !default;
+$zindex-tooltip: 1070 !default;
// Navs
-$nav-link-padding-y: .5rem !default;
-$nav-link-padding-x: 1rem !default;
-$nav-link-disabled-color: $gray-600 !default;
+$nav-link-padding-y: .5rem !default;
+$nav-link-padding-x: 1rem !default;
+$nav-link-disabled-color: $gray-600 !default;
-$nav-tabs-border-color: #ddd !default;
-$nav-tabs-border-width: $border-width !default;
-$nav-tabs-border-radius: $border-radius !default;
-$nav-tabs-link-hover-border-color: $gray-200 !default;
-$nav-tabs-link-active-color: $gray-700 !default;
-$nav-tabs-link-active-bg: $body-bg !default;
-$nav-tabs-link-active-border-color: #ddd !default;
+$nav-tabs-border-color: #ddd !default;
+$nav-tabs-border-width: $border-width !default;
+$nav-tabs-border-radius: $border-radius !default;
+$nav-tabs-link-hover-border-color: $gray-200 !default;
+$nav-tabs-link-active-color: $gray-700 !default;
+$nav-tabs-link-active-bg: $body-bg !default;
+$nav-tabs-link-active-border-color: #ddd !default;
-$nav-pills-border-radius: $border-radius !default;
-$nav-pills-link-active-color: $component-active-color !default;
-$nav-pills-link-active-bg: $component-active-bg !default;
+$nav-pills-border-radius: $border-radius !default;
+$nav-pills-link-active-color: $component-active-color !default;
+$nav-pills-link-active-bg: $component-active-bg !default;
// Navbar
@@ -528,285 +534,286 @@ $nav-link-height: $navbar-brand-font-size * $line-height-base
$navbar-brand-height: ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default;
$navbar-brand-padding-y: ($navbar-brand-height - $nav-link-height) / 2 !default;
-$navbar-toggler-padding-y: .25rem !default;
-$navbar-toggler-padding-x: .75rem !default;
-$navbar-toggler-font-size: $font-size-lg !default;
-$navbar-toggler-border-radius: $btn-border-radius !default;
+$navbar-toggler-padding-y: .25rem !default;
+$navbar-toggler-padding-x: .75rem !default;
+$navbar-toggler-font-size: $font-size-lg !default;
+$navbar-toggler-border-radius: $btn-border-radius !default;
$navbar-dark-color: rgba($white,.5) !default;
$navbar-dark-hover-color: rgba($white,.75) !default;
-$navbar-dark-active-color: rgba($white,1) !default;
+$navbar-dark-active-color: $white !default;
$navbar-dark-disabled-color: rgba($white,.25) !default;
-$navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
$navbar-dark-toggler-border-color: rgba($white,.1) !default;
$navbar-light-color: rgba($black,.5) !default;
$navbar-light-hover-color: rgba($black,.7) !default;
$navbar-light-active-color: rgba($black,.9) !default;
$navbar-light-disabled-color: rgba($black,.3) !default;
-$navbar-light-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-light-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
$navbar-light-toggler-border-color: rgba($black,.1) !default;
// Pagination
-$pagination-padding-y: .5rem !default;
-$pagination-padding-x: .75rem !default;
-$pagination-padding-y-sm: .25rem !default;
-$pagination-padding-x-sm: .5rem !default;
-$pagination-padding-y-lg: .75rem !default;
-$pagination-padding-x-lg: 1.5rem !default;
-$pagination-line-height: 1.25 !default;
+$pagination-padding-y: .5rem !default;
+$pagination-padding-x: .75rem !default;
+$pagination-padding-y-sm: .25rem !default;
+$pagination-padding-x-sm: .5rem !default;
+$pagination-padding-y-lg: .75rem !default;
+$pagination-padding-x-lg: 1.5rem !default;
+$pagination-line-height: 1.25 !default;
-$pagination-color: $link-color !default;
-$pagination-bg: $white !default;
-$pagination-border-width: $border-width !default;
-$pagination-border-color: #ddd !default;
+$pagination-color: $link-color !default;
+$pagination-bg: $white !default;
+$pagination-border-width: $border-width !default;
+$pagination-border-color: #ddd !default;
-$pagination-hover-color: $link-hover-color !default;
-$pagination-hover-bg: $gray-200 !default;
-$pagination-hover-border-color: #ddd !default;
+$pagination-hover-color: $link-hover-color !default;
+$pagination-hover-bg: $gray-200 !default;
+$pagination-hover-border-color: #ddd !default;
-$pagination-active-color: $white !default;
-$pagination-active-bg: theme-color("primary") !default;
-$pagination-active-border-color: theme-color("primary") !default;
+$pagination-active-color: $white !default;
+$pagination-active-bg: theme-color("primary") !default;
+$pagination-active-border-color: theme-color("primary") !default;
-$pagination-disabled-color: $gray-600 !default;
-$pagination-disabled-bg: $white !default;
-$pagination-disabled-border-color: #ddd !default;
+$pagination-disabled-color: $gray-600 !default;
+$pagination-disabled-bg: $white !default;
+$pagination-disabled-border-color: #ddd !default;
// Jumbotron
-$jumbotron-padding: 2rem !default;
-$jumbotron-bg: $gray-200 !default;
+$jumbotron-padding: 2rem !default;
+$jumbotron-bg: $gray-200 !default;
// Cards
-$card-spacer-y: .75rem !default;
-$card-spacer-x: 1.25rem !default;
-$card-border-width: $border-width !default;
-$card-border-radius: $border-radius !default;
-$card-border-color: rgba($black,.125) !default;
-$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
-$card-cap-bg: rgba($black, .03) !default;
-$card-bg: $white !default;
+$card-spacer-y: .75rem !default;
+$card-spacer-x: 1.25rem !default;
+$card-border-width: $border-width !default;
+$card-border-radius: $border-radius !default;
+$card-border-color: rgba($black,.125) !default;
+$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
+$card-cap-bg: rgba($black, .03) !default;
+$card-bg: $white !default;
-$card-img-overlay-padding: 1.25rem !default;
+$card-img-overlay-padding: 1.25rem !default;
-$card-group-margin: ($grid-gutter-width / 2) !default;
-$card-deck-margin: $card-group-margin !default;
+$card-group-margin: ($grid-gutter-width / 2) !default;
+$card-deck-margin: $card-group-margin !default;
-$card-columns-count: 3 !default;
-$card-columns-gap: 1.25rem !default;
-$card-columns-margin: $card-spacer-y !default;
+$card-columns-count: 3 !default;
+$card-columns-gap: 1.25rem !default;
+$card-columns-margin: $card-spacer-y !default;
// Tooltips
-$tooltip-max-width: 200px !default;
-$tooltip-color: $white !default;
-$tooltip-bg: $black !default;
-$tooltip-opacity: .9 !default;
-$tooltip-padding-y: 3px !default;
-$tooltip-padding-x: 8px !default;
-$tooltip-margin: 0 !default;
+$tooltip-max-width: 200px !default;
+$tooltip-color: $white !default;
+$tooltip-bg: $black !default;
+$tooltip-opacity: .9 !default;
+$tooltip-padding-y: 3px !default;
+$tooltip-padding-x: 8px !default;
+$tooltip-margin: 0 !default;
-$tooltip-arrow-width: 5px !default;
-$tooltip-arrow-height: 5px !default;
-$tooltip-arrow-color: $tooltip-bg !default;
+$tooltip-arrow-width: 5px !default;
+$tooltip-arrow-height: 5px !default;
+$tooltip-arrow-color: $tooltip-bg !default;
// Popovers
-$popover-inner-padding: 1px !default;
-$popover-bg: $white !default;
-$popover-max-width: 276px !default;
-$popover-border-width: $border-width !default;
-$popover-border-color: rgba($black,.2) !default;
-$popover-box-shadow: 0 5px 10px rgba($black,.2) !default;
+$popover-inner-padding: 1px !default;
+$popover-bg: $white !default;
+$popover-max-width: 276px !default;
+$popover-border-width: $border-width !default;
+$popover-border-color: rgba($black,.2) !default;
+$popover-box-shadow: 0 5px 10px rgba($black,.2) !default;
-$popover-header-bg: darken($popover-bg, 3%) !default;
-$popover-header-color: $headings-color !default;
-$popover-header-padding-y: 8px !default;
-$popover-header-padding-x: 14px !default;
+$popover-header-bg: darken($popover-bg, 3%) !default;
+$popover-header-color: $headings-color !default;
+$popover-header-padding-y: 8px !default;
+$popover-header-padding-x: 14px !default;
-$popover-body-color: $body-color !default;
-$popover-body-padding-y: 9px !default;
-$popover-body-padding-x: 14px !default;
+$popover-body-color: $body-color !default;
+$popover-body-padding-y: 9px !default;
+$popover-body-padding-x: 14px !default;
-$popover-arrow-width: 10px !default;
-$popover-arrow-height: 5px !default;
-$popover-arrow-color: $popover-bg !default;
+$popover-arrow-width: 10px !default;
+$popover-arrow-height: 5px !default;
+$popover-arrow-color: $popover-bg !default;
-$popover-arrow-outer-width: ($popover-arrow-width + 1px) !default;
-$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;
+$popover-arrow-outer-width: ($popover-arrow-width + 1px) !default;
+$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;
// Badges
-$badge-font-size: 75% !default;
-$badge-font-weight: $font-weight-bold !default;
-$badge-padding-y: .25em !default;
-$badge-padding-x: .4em !default;
+$badge-font-size: 75% !default;
+$badge-font-weight: $font-weight-bold !default;
+$badge-padding-y: .25em !default;
+$badge-padding-x: .4em !default;
+$badge-border-radius: $border-radius !default;
-$badge-pill-padding-x: .6em !default;
+$badge-pill-padding-x: .6em !default;
// Use a higher than normal value to ensure completely rounded edges when
// customizing padding or font-size on labels.
-$badge-pill-border-radius: 10rem !default;
+$badge-pill-border-radius: 10rem !default;
// Modals
// Padding applied to the modal body
-$modal-inner-padding: 15px !default;
+$modal-inner-padding: 15px !default;
-$modal-dialog-margin: 10px !default;
-$modal-dialog-margin-y-sm-up: 30px !default;
+$modal-dialog-margin: 10px !default;
+$modal-dialog-margin-y-sm-up: 30px !default;
-$modal-title-line-height: $line-height-base !default;
+$modal-title-line-height: $line-height-base !default;
-$modal-content-bg: $white !default;
-$modal-content-border-color: rgba($black,.2) !default;
-$modal-content-border-width: $border-width !default;
-$modal-content-box-shadow-xs: 0 3px 9px rgba($black,.5) !default;
-$modal-content-box-shadow-sm-up: 0 5px 15px rgba($black,.5) !default;
+$modal-content-bg: $white !default;
+$modal-content-border-color: rgba($black,.2) !default;
+$modal-content-border-width: $border-width !default;
+$modal-content-box-shadow-xs: 0 3px 9px rgba($black,.5) !default;
+$modal-content-box-shadow-sm-up: 0 5px 15px rgba($black,.5) !default;
-$modal-backdrop-bg: $black !default;
-$modal-backdrop-opacity: .5 !default;
-$modal-header-border-color: $gray-200 !default;
-$modal-footer-border-color: $modal-header-border-color !default;
-$modal-header-border-width: $modal-content-border-width !default;
-$modal-footer-border-width: $modal-header-border-width !default;
-$modal-header-padding: 15px !default;
+$modal-backdrop-bg: $black !default;
+$modal-backdrop-opacity: .5 !default;
+$modal-header-border-color: $gray-200 !default;
+$modal-footer-border-color: $modal-header-border-color !default;
+$modal-header-border-width: $modal-content-border-width !default;
+$modal-footer-border-width: $modal-header-border-width !default;
+$modal-header-padding: 15px !default;
-$modal-lg: 800px !default;
-$modal-md: 500px !default;
-$modal-sm: 300px !default;
+$modal-lg: 800px !default;
+$modal-md: 500px !default;
+$modal-sm: 300px !default;
-$modal-transition: transform .3s ease-out !default;
+$modal-transition: transform .3s ease-out !default;
// Alerts
//
// Define alert colors, border radius, and padding.
-$alert-padding-y: .75rem !default;
-$alert-padding-x: 1.25rem !default;
-$alert-margin-bottom: 1rem !default;
-$alert-border-radius: $border-radius !default;
-$alert-link-font-weight: $font-weight-bold !default;
-$alert-border-width: $border-width !default;
+$alert-padding-y: .75rem !default;
+$alert-padding-x: 1.25rem !default;
+$alert-margin-bottom: 1rem !default;
+$alert-border-radius: $border-radius !default;
+$alert-link-font-weight: $font-weight-bold !default;
+$alert-border-width: $border-width !default;
// Progress bars
-$progress-height: 1rem !default;
-$progress-font-size: .75rem !default;
-$progress-bg: $gray-200 !default;
-$progress-border-radius: $border-radius !default;
-$progress-box-shadow: inset 0 .1rem .1rem rgba($black,.1) !default;
-$progress-bar-color: $white !default;
-$progress-bar-bg: theme-color("primary") !default;
-$progress-bar-animation-timing: 1s linear infinite !default;
-$progress-bar-transition: width .6s ease !default;
+$progress-height: 1rem !default;
+$progress-font-size: .75rem !default;
+$progress-bg: $gray-200 !default;
+$progress-border-radius: $border-radius !default;
+$progress-box-shadow: inset 0 .1rem .1rem rgba($black,.1) !default;
+$progress-bar-color: $white !default;
+$progress-bar-bg: theme-color("primary") !default;
+$progress-bar-animation-timing: 1s linear infinite !default;
+$progress-bar-transition: width .6s ease !default;
// List group
-$list-group-bg: $white !default;
-$list-group-border-color: rgba($black,.125) !default;
-$list-group-border-width: $border-width !default;
-$list-group-border-radius: $border-radius !default;
+$list-group-bg: $white !default;
+$list-group-border-color: rgba($black,.125) !default;
+$list-group-border-width: $border-width !default;
+$list-group-border-radius: $border-radius !default;
-$list-group-item-padding-y: .75rem !default;
-$list-group-item-padding-x: 1.25rem !default;
+$list-group-item-padding-y: .75rem !default;
+$list-group-item-padding-x: 1.25rem !default;
-$list-group-hover-bg: $gray-100 !default;
-$list-group-active-color: $component-active-color !default;
-$list-group-active-bg: $component-active-bg !default;
-$list-group-active-border-color: $list-group-active-bg !default;
+$list-group-hover-bg: $gray-100 !default;
+$list-group-active-color: $component-active-color !default;
+$list-group-active-bg: $component-active-bg !default;
+$list-group-active-border-color: $list-group-active-bg !default;
-$list-group-disabled-color: $gray-600 !default;
-$list-group-disabled-bg: $list-group-bg !default;
+$list-group-disabled-color: $gray-600 !default;
+$list-group-disabled-bg: $list-group-bg !default;
-$list-group-action-color: $gray-700 !default;
-$list-group-action-hover-color: $list-group-action-color !default;
+$list-group-action-color: $gray-700 !default;
+$list-group-action-hover-color: $list-group-action-color !default;
-$list-group-action-active-color: $body-color !default;
-$list-group-action-active-bg: $gray-200 !default;
+$list-group-action-active-color: $body-color !default;
+$list-group-action-active-bg: $gray-200 !default;
// Image thumbnails
-$thumbnail-padding: .25rem !default;
-$thumbnail-bg: $body-bg !default;
-$thumbnail-border-width: $border-width !default;
-$thumbnail-border-color: #ddd !default;
-$thumbnail-border-radius: $border-radius !default;
-$thumbnail-box-shadow: 0 1px 2px rgba($black,.075) !default;
-$thumbnail-transition: all .2s ease-in-out !default;
+$thumbnail-padding: .25rem !default;
+$thumbnail-bg: $body-bg !default;
+$thumbnail-border-width: $border-width !default;
+$thumbnail-border-color: #ddd !default;
+$thumbnail-border-radius: $border-radius !default;
+$thumbnail-box-shadow: 0 1px 2px rgba($black,.075) !default;
+$thumbnail-transition: all .2s ease-in-out !default;
// Figures
-$figure-caption-font-size: 90% !default;
-$figure-caption-color: $gray-600 !default;
+$figure-caption-font-size: 90% !default;
+$figure-caption-color: $gray-600 !default;
// Breadcrumbs
-$breadcrumb-padding-y: .75rem !default;
-$breadcrumb-padding-x: 1rem !default;
-$breadcrumb-item-padding: .5rem !default;
+$breadcrumb-padding-y: .75rem !default;
+$breadcrumb-padding-x: 1rem !default;
+$breadcrumb-item-padding: .5rem !default;
-$breadcrumb-margin-bottom: 1rem !default;
+$breadcrumb-margin-bottom: 1rem !default;
-$breadcrumb-bg: $gray-200 !default;
-$breadcrumb-divider-color: $gray-600 !default;
-$breadcrumb-active-color: $gray-600 !default;
-$breadcrumb-divider: "/" !default;
+$breadcrumb-bg: $gray-200 !default;
+$breadcrumb-divider-color: $gray-600 !default;
+$breadcrumb-active-color: $gray-600 !default;
+$breadcrumb-divider: "/" !default;
// Carousel
-$carousel-control-color: $white !default;
-$carousel-control-width: 15% !default;
-$carousel-control-opacity: .5 !default;
+$carousel-control-color: $white !default;
+$carousel-control-width: 15% !default;
+$carousel-control-opacity: .5 !default;
-$carousel-indicator-width: 30px !default;
-$carousel-indicator-height: 3px !default;
-$carousel-indicator-spacer: 3px !default;
-$carousel-indicator-active-bg: $white !default;
+$carousel-indicator-width: 30px !default;
+$carousel-indicator-height: 3px !default;
+$carousel-indicator-spacer: 3px !default;
+$carousel-indicator-active-bg: $white !default;
-$carousel-caption-width: 70% !default;
-$carousel-caption-color: $white !default;
+$carousel-caption-width: 70% !default;
+$carousel-caption-color: $white !default;
-$carousel-control-icon-width: 20px !default;
+$carousel-control-icon-width: 20px !default;
-$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M4 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$carousel-transition: transform .6s ease !default;
+$carousel-transition: transform .6s ease !default;
// Close
-$close-font-size: $font-size-base * 1.5 !default;
-$close-font-weight: $font-weight-bold !default;
-$close-color: $black !default;
-$close-text-shadow: 0 1px 0 $white !default;
+$close-font-size: $font-size-base * 1.5 !default;
+$close-font-weight: $font-weight-bold !default;
+$close-color: $black !default;
+$close-text-shadow: 0 1px 0 $white !default;
// Code
-$code-font-size: 90% !default;
-$code-padding-y: .2rem !default;
-$code-padding-x: .4rem !default;
-$code-color: #bd4147 !default;
-$code-bg: $gray-100 !default;
+$code-font-size: 90% !default;
+$code-padding-y: .2rem !default;
+$code-padding-x: .4rem !default;
+$code-color: #bd4147 !default;
+$code-bg: $gray-100 !default;
-$kbd-color: $white !default;
-$kbd-bg: $gray-900 !default;
+$kbd-color: $white !default;
+$kbd-bg: $gray-900 !default;
-$pre-color: $gray-900 !default;
-$pre-scrollable-max-height: 340px !default;
+$pre-color: $gray-900 !default;
+$pre-scrollable-max-height: 340px !default;
diff --git a/assets/stylesheets/bootstrap/mixins/_background-variant.scss b/assets/stylesheets/bootstrap/mixins/_background-variant.scss
index 54a734d..5860d73 100644
--- a/assets/stylesheets/bootstrap/mixins/_background-variant.scss
+++ b/assets/stylesheets/bootstrap/mixins/_background-variant.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Contextual backgrounds
@mixin bg-variant($parent, $color) {
diff --git a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
index 082c5f9..a9866bd 100644
--- a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
+++ b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
@@ -81,8 +81,18 @@
$min: breakpoint-min($lower, $breakpoints);
$max: breakpoint-max($upper, $breakpoints);
- @media (min-width: $min) and (max-width: $max) {
- @content;
+ @if $min != null and $max != null {
+ @media (min-width: $min) and (max-width: $max) {
+ @content;
+ }
+ } @else if $max == null {
+ @include media-breakpoint-up($lower) {
+ @content;
+ }
+ } @else if $min == null {
+ @include media-breakpoint-down($upper) {
+ @content;
+ }
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss
index 44ce4f7..7ce8fef 100644
--- a/assets/stylesheets/bootstrap/mixins/_buttons.scss
+++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss
@@ -32,8 +32,8 @@
border-color: $border;
}
- &:active,
- &.active,
+ &:not([disabled]):not(.disabled):active,
+ &:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle {
background-color: $active-background;
background-image: none; // Remove the gradient for the pressed/active state
@@ -65,8 +65,8 @@
background-color: transparent;
}
- &:active,
- &.active,
+ &:not([disabled]):not(.disabled):active,
+ &:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle {
color: $color-hover;
background-color: $color;
diff --git a/assets/stylesheets/bootstrap/mixins/_caret.scss b/assets/stylesheets/bootstrap/mixins/_caret.scss
new file mode 100644
index 0000000..daab9d0
--- /dev/null
+++ b/assets/stylesheets/bootstrap/mixins/_caret.scss
@@ -0,0 +1,35 @@
+@mixin caret-down {
+ border-top: $caret-width solid;
+ border-right: $caret-width solid transparent;
+ border-bottom: 0;
+ border-left: $caret-width solid transparent;
+}
+
+@mixin caret-up {
+ border-top: 0;
+ border-right: $caret-width solid transparent;
+ border-bottom: $caret-width solid;
+ border-left: $caret-width solid transparent;
+}
+
+@mixin caret($direction: down) {
+ @if $enable-caret {
+ &::after {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: $caret-width * .85;
+ vertical-align: $caret-width * .85;
+ content: "";
+ @if $direction == down {
+ @include caret-down;
+ } @else if $direction == up {
+ @include caret-up;
+ }
+ }
+
+ &:empty::after {
+ margin-left: 0;
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/mixins/_float.scss b/assets/stylesheets/bootstrap/mixins/_float.scss
index b43116f..48fa8b6 100644
--- a/assets/stylesheets/bootstrap/mixins/_float.scss
+++ b/assets/stylesheets/bootstrap/mixins/_float.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
@mixin float-left {
float: left !important;
}
diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss
index 67e198c..6403f46 100644
--- a/assets/stylesheets/bootstrap/mixins/_forms.scss
+++ b/assets/stylesheets/bootstrap/mixins/_forms.scss
@@ -1,7 +1,7 @@
// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
-// which defaults to the `@input-border-color-focus` variable.
+// which defaults to the `$input-focus-border-color` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
@@ -23,6 +23,28 @@
@mixin form-validation-state($state, $color) {
+ .#{$state}-feedback {
+ display: none;
+ margin-top: .25rem;
+ font-size: .875rem;
+ color: $color;
+ }
+
+ .#{$state}-tooltip {
+ position: absolute;
+ top: 100%;
+ z-index: 5;
+ display: none;
+ width: 250px;
+ padding: .5rem;
+ margin-top: .1rem;
+ font-size: .875rem;
+ line-height: 1;
+ color: #fff;
+ background-color: rgba($color,.8);
+ border-radius: .2rem;
+ }
+
.form-control,
.custom-select {
.was-validated &:#{$state},
diff --git a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss
index a9e7c75..41bdf46 100644
--- a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss
+++ b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss
@@ -10,7 +10,7 @@
width: 100%;
min-height: 1px; // Prevent columns from collapsing when empty
padding-right: ($gutter / 2);
- padding-left: ($gutter / 2);
+ padding-left: ($gutter / 2);
}
@each $breakpoint in map-keys($breakpoints) {
@@ -46,6 +46,10 @@
}
}
+ .order#{$infix}-first {
+ order: -1;
+ }
+
@for $i from 1 through $columns {
.order#{$infix}-#{$i} {
order: $i;
@@ -56,7 +60,7 @@
@for $i from 0 through ($columns - 1) {
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
.offset#{$infix}-#{$i} {
- @include make-col-offset($i, $columns)
+ @include make-col-offset($i, $columns);
}
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_grid.scss b/assets/stylesheets/bootstrap/mixins/_grid.scss
index 584c78b..b75ebcb 100644
--- a/assets/stylesheets/bootstrap/mixins/_grid.scss
+++ b/assets/stylesheets/bootstrap/mixins/_grid.scss
@@ -4,10 +4,10 @@
@mixin make-container() {
width: 100%;
+ padding-right: ($grid-gutter-width / 2);
+ padding-left: ($grid-gutter-width / 2);
margin-right: auto;
margin-left: auto;
- padding-right: ($grid-gutter-width / 2);
- padding-left: ($grid-gutter-width / 2);
}
@@ -24,7 +24,7 @@
display: flex;
flex-wrap: wrap;
margin-right: ($grid-gutter-width / -2);
- margin-left: ($grid-gutter-width / -2);
+ margin-left: ($grid-gutter-width / -2);
}
@mixin make-col-ready() {
@@ -35,7 +35,7 @@
width: 100%;
min-height: 1px; // Prevent collapsing
padding-right: ($grid-gutter-width / 2);
- padding-left: ($grid-gutter-width / 2);
+ padding-left: ($grid-gutter-width / 2);
}
@mixin make-col($size, $columns: $grid-columns) {
@@ -47,5 +47,6 @@
}
@mixin make-col-offset($size, $columns: $grid-columns) {
- margin-left: percentage($size / $columns);
+ $num: $size / $columns;
+ margin-left: if($num == 0, 0, percentage($num));
}
diff --git a/assets/stylesheets/bootstrap/mixins/_hover.scss b/assets/stylesheets/bootstrap/mixins/_hover.scss
index 4aa4b1d..fd2f1e2 100644
--- a/assets/stylesheets/bootstrap/mixins/_hover.scss
+++ b/assets/stylesheets/bootstrap/mixins/_hover.scss
@@ -1,3 +1,4 @@
+// stylelint-disable indentation
@mixin hover {
// TODO: re-enable along with mq4-hover-shim
// @if $enable-hover-media-query {
@@ -8,21 +9,21 @@
// }
// }
// @else {
-// scss-lint:disable Indentation
- &:hover { @content }
-// scss-lint:enable Indentation
+ &:hover { @content; }
// }
}
@mixin hover-focus {
@if $enable-hover-media-query {
- &:focus { @content }
- @include hover { @content }
+ &:focus {
+ @content;
+ }
+ @include hover { @content; }
} @else {
&:focus,
&:hover {
- @content
+ @content;
}
}
}
@@ -31,14 +32,14 @@
@if $enable-hover-media-query {
&,
&:focus {
- @content
+ @content;
}
- @include hover { @content }
+ @include hover { @content; }
} @else {
&,
&:focus,
&:hover {
- @content
+ @content;
}
}
}
@@ -47,14 +48,14 @@
@if $enable-hover-media-query {
&:focus,
&:active {
- @content
+ @content;
}
- @include hover { @content }
+ @include hover { @content; }
} @else {
&:focus,
&:active,
&:hover {
- @content
+ @content;
}
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_image.scss b/assets/stylesheets/bootstrap/mixins/_image.scss
index c2b45f2..0544f0d 100644
--- a/assets/stylesheets/bootstrap/mixins/_image.scss
+++ b/assets/stylesheets/bootstrap/mixins/_image.scss
@@ -20,15 +20,15 @@
//
// Short retina mixin for setting background-image and -size.
+// stylelint-disable indentation, media-query-list-comma-newline-after
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
background-image: url($file-1x);
// Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
// but doesn't convert dppx=>dpi.
// There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
- // Compatibility info: http://caniuse.com/#feat=css-media-resolution
- @media
- only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
+ // Compatibility info: https://caniuse.com/#feat=css-media-resolution
+ @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
only screen and (min-resolution: 2dppx) { // Standardized
background-image: url($file-2x);
background-size: $width-1x $height-1x;
diff --git a/assets/stylesheets/bootstrap/mixins/_list-group.scss b/assets/stylesheets/bootstrap/mixins/_list-group.scss
index ba27b50..278787b 100644
--- a/assets/stylesheets/bootstrap/mixins/_list-group.scss
+++ b/assets/stylesheets/bootstrap/mixins/_list-group.scss
@@ -6,7 +6,6 @@
background-color: $background;
}
- //scss-lint:disable QualifyingElement
a.list-group-item-#{$state},
button.list-group-item-#{$state} {
color: $color;
@@ -22,5 +21,4 @@
border-color: $color;
}
}
- // scss-lint:enable QualifyingElement
}
diff --git a/assets/stylesheets/bootstrap/mixins/_navbar-align.scss b/assets/stylesheets/bootstrap/mixins/_navbar-align.scss
index c454a4f..b351660 100644
--- a/assets/stylesheets/bootstrap/mixins/_navbar-align.scss
+++ b/assets/stylesheets/bootstrap/mixins/_navbar-align.scss
@@ -1,7 +1,8 @@
// Navbar vertical align
//
// Vertically center elements in the navbar.
-// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
+// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);`
+// to calculate the appropriate top margin.
// @mixin navbar-vertical-align($element-height) {
// margin-top: (($navbar-height - $element-height) / 2);
diff --git a/assets/stylesheets/bootstrap/mixins/_reset-text.scss b/assets/stylesheets/bootstrap/mixins/_reset-text.scss
index 4cf9e79..71edb00 100644
--- a/assets/stylesheets/bootstrap/mixins/_reset-text.scss
+++ b/assets/stylesheets/bootstrap/mixins/_reset-text.scss
@@ -1,4 +1,3 @@
-// scss-lint:disable DuplicateProperty
@mixin reset-text {
font-family: $font-family-base;
// We deliberately do NOT reset font-size or word-wrap.
@@ -6,7 +5,7 @@
font-weight: $font-weight-normal;
line-height: $line-height-base;
text-align: left; // Fallback for where `start` is not supported
- text-align: start;
+ text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties
text-decoration: none;
text-shadow: none;
text-transform: none;
diff --git a/assets/stylesheets/bootstrap/mixins/_screen-reader.scss b/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
index a5fa51c..31fb68a 100644
--- a/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
+++ b/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
@@ -1,7 +1,7 @@
// Only display content to screen readers
//
-// See: http://a11yproject.com/posts/how-to-hide-content
-// See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
+// See: http://a11yproject.com/posts/how-to-hide-content/
+// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
@mixin sr-only {
position: absolute;
diff --git a/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss b/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
index 9cd4b6a..58db3e0 100644
--- a/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
+++ b/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Typography
@mixin text-emphasis-variant($parent, $color) {
diff --git a/assets/stylesheets/bootstrap/mixins/_visibility.scss b/assets/stylesheets/bootstrap/mixins/_visibility.scss
index f67fc1c..fe523d0 100644
--- a/assets/stylesheets/bootstrap/mixins/_visibility.scss
+++ b/assets/stylesheets/bootstrap/mixins/_visibility.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Visibility
@mixin invisible($visibility) {
diff --git a/assets/stylesheets/bootstrap/utilities/_align.scss b/assets/stylesheets/bootstrap/utilities/_align.scss
index 4dbbbc2..8b7df9f 100644
--- a/assets/stylesheets/bootstrap/utilities/_align.scss
+++ b/assets/stylesheets/bootstrap/utilities/_align.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
.align-baseline { vertical-align: baseline !important; } // Browser default
.align-top { vertical-align: top !important; }
.align-middle { vertical-align: middle !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_background.scss b/assets/stylesheets/bootstrap/utilities/_background.scss
index 1ef34fd..3d2e07d 100644
--- a/assets/stylesheets/bootstrap/utilities/_background.scss
+++ b/assets/stylesheets/bootstrap/utilities/_background.scss
@@ -1,6 +1,13 @@
+// stylelint-disable declaration-no-important
+
@each $color, $value in $theme-colors {
- @include bg-variant('.bg-#{$color}', $value);
+ @include bg-variant(".bg-#{$color}", $value);
+}
+
+.bg-white {
+ background-color: $white !important;
}
-.bg-white { background-color: $white !important; }
-.bg-transparent { background-color: transparent !important; }
+.bg-transparent {
+ background-color: transparent !important;
+}
diff --git a/assets/stylesheets/bootstrap/utilities/_borders.scss b/assets/stylesheets/bootstrap/utilities/_borders.scss
index 3ff603c..ba02f04 100644
--- a/assets/stylesheets/bootstrap/utilities/_borders.scss
+++ b/assets/stylesheets/bootstrap/utilities/_borders.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
//
// Border
//
diff --git a/assets/stylesheets/bootstrap/utilities/_display.scss b/assets/stylesheets/bootstrap/utilities/_display.scss
index 4535362..893b638 100644
--- a/assets/stylesheets/bootstrap/utilities/_display.scss
+++ b/assets/stylesheets/bootstrap/utilities/_display.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
//
// Utilities for common `display` values
//
@@ -11,6 +13,7 @@
.d#{$infix}-inline-block { display: inline-block !important; }
.d#{$infix}-block { display: block !important; }
.d#{$infix}-table { display: table !important; }
+ .d#{$infix}-table-row { display: table-row !important; }
.d#{$infix}-table-cell { display: table-cell !important; }
.d#{$infix}-flex { display: flex !important; }
.d#{$infix}-inline-flex { display: inline-flex !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_flex.scss b/assets/stylesheets/bootstrap/utilities/_flex.scss
index b28c0b9..8e47038 100644
--- a/assets/stylesheets/bootstrap/utilities/_flex.scss
+++ b/assets/stylesheets/bootstrap/utilities/_flex.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Flex variation
//
// Custom styles for additional flex alignment options.
diff --git a/assets/stylesheets/bootstrap/utilities/_position.scss b/assets/stylesheets/bootstrap/utilities/_position.scss
index bddae21..ef962ed 100644
--- a/assets/stylesheets/bootstrap/utilities/_position.scss
+++ b/assets/stylesheets/bootstrap/utilities/_position.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Common values
// Sass list not in variables since it's not intended for customization.
diff --git a/assets/stylesheets/bootstrap/utilities/_sizing.scss b/assets/stylesheets/bootstrap/utilities/_sizing.scss
index a7dc3e4..e95a4db 100644
--- a/assets/stylesheets/bootstrap/utilities/_sizing.scss
+++ b/assets/stylesheets/bootstrap/utilities/_sizing.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Width and height
@each $prop, $abbrev in (width: w, height: h) {
diff --git a/assets/stylesheets/bootstrap/utilities/_spacing.scss b/assets/stylesheets/bootstrap/utilities/_spacing.scss
index 150d316..b2e2354 100644
--- a/assets/stylesheets/bootstrap/utilities/_spacing.scss
+++ b/assets/stylesheets/bootstrap/utilities/_spacing.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
// Margin and Padding
@each $breakpoint in map-keys($grid-breakpoints) {
diff --git a/assets/stylesheets/bootstrap/utilities/_text.scss b/assets/stylesheets/bootstrap/utilities/_text.scss
index 7573f29..f4b6e65 100644
--- a/assets/stylesheets/bootstrap/utilities/_text.scss
+++ b/assets/stylesheets/bootstrap/utilities/_text.scss
@@ -1,3 +1,5 @@
+// stylelint-disable declaration-no-important
+
//
// Text
//
@@ -38,7 +40,7 @@
.text-white { color: #fff !important; }
@each $color, $value in $theme-colors {
- @include text-emphasis-variant('.text-#{$color}', $value);
+ @include text-emphasis-variant(".text-#{$color}", $value);
}
.text-muted { color: $text-muted !important; }