diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2021-02-27 00:15:21 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2021-02-27 00:23:45 +0300 |
commit | 083f8d22a9c4231517ea0e5c9e2500cd14cf6901 (patch) | |
tree | 9f646aab30c05a9f543f58be81b515c5169996ec | |
parent | 615e415ec4c4de8852bbc826f78d881a845e8da0 (diff) |
Bump to v5.0.0.beta2
1. Removed `base-component.js` from `js.rb` exclusion list as it is no
longer inlined.
2. `bundle exec rake update '[v5.0.0-beta2]'`
3. Updated version in `version.rb` and `README.md`
52 files changed, 1880 insertions, 1611 deletions
@@ -20,7 +20,7 @@ Please see the appropriate guide for your environment of choice: Add `bootstrap` to your Gemfile: ```ruby -gem 'bootstrap', '~> 5.0.0.beta1' +gem 'bootstrap', '~> 5.0.0.beta2' ``` Ensure that `sprockets-rails` is at least v2.3.2. diff --git a/assets/javascripts/bootstrap-sprockets.js b/assets/javascripts/bootstrap-sprockets.js index da281f4..8b251b1 100644 --- a/assets/javascripts/bootstrap-sprockets.js +++ b/assets/javascripts/bootstrap-sprockets.js @@ -1,4 +1,5 @@ //= require ./bootstrap/dom/data +//= require ./bootstrap/base-component //= require ./bootstrap/dom/event-handler //= require ./bootstrap/alert //= require ./bootstrap/button diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js index 9547ed5..af75bf0 100644 --- a/assets/javascripts/bootstrap.js +++ b/assets/javascripts/bootstrap.js @@ -1,6 +1,6 @@ /*! - * Bootstrap v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -68,12 +68,22 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -107,7 +117,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -185,7 +208,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -256,9 +279,27 @@ var isRTL = document.documentElement.dir === 'rtl'; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ + + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/data.js + * Bootstrap (v5.0.0-beta2): dom/data.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -325,7 +366,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/event-handler.js + * Bootstrap (v5.0.0-beta2): dom/event-handler.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -385,6 +426,7 @@ event.delegateTarget = target; if (handler.oneOff) { + // eslint-disable-next-line unicorn/consistent-destructuring EventHandler.off(element, event.type, fn); } @@ -604,7 +646,7 @@ * ------------------------------------------------------------------------ */ - var VERSION = '5.0.0-beta1'; + var VERSION = '5.0.0-beta2'; var BaseComponent = /*#__PURE__*/function () { function BaseComponent(element) { @@ -653,9 +695,9 @@ var EVENT_CLOSE = "close" + EVENT_KEY; var EVENT_CLOSED = "closed" + EVENT_KEY; var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; - var CLASSNAME_ALERT = 'alert'; - var CLASSNAME_FADE = 'fade'; - var CLASSNAME_SHOW = 'show'; + var CLASS_NAME_ALERT = 'alert'; + var CLASS_NAME_FADE = 'fade'; + var CLASS_NAME_SHOW = 'show'; /** * ------------------------------------------------------------------------ * Class Definition @@ -686,7 +728,7 @@ ; _proto._getRootElement = function _getRootElement(element) { - return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT); + return getElementFromSelector(element) || element.closest("." + CLASS_NAME_ALERT); }; _proto._triggerCloseEvent = function _triggerCloseEvent(element) { @@ -696,16 +738,16 @@ _proto._removeElement = function _removeElement(element) { var _this = this; - element.classList.remove(CLASSNAME_SHOW); + element.classList.remove(CLASS_NAME_SHOW); - if (!element.classList.contains(CLASSNAME_FADE)) { + if (!element.classList.contains(CLASS_NAME_FADE)) { this._destroyElement(element); return; } var transitionDuration = getTransitionDurationFromElement(element); - EventHandler.one(element, TRANSITION_END, function () { + EventHandler.one(element, 'transitionend', function () { return _this._destroyElement(element); }); emulateTransitionEnd(element, transitionDuration); @@ -746,8 +788,8 @@ _createClass(Alert, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); @@ -769,21 +811,7 @@ * add .Alert to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Alert.jQueryInterface; - $.fn[NAME].Constructor = Alert; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Alert.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Alert); /** * ------------------------------------------------------------------------ @@ -836,8 +864,8 @@ _createClass(Button, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY$1; } }]); @@ -869,25 +897,11 @@ * add .Button to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$1]; - $.fn[NAME$1] = Button.jQueryInterface; - $.fn[NAME$1].Constructor = Button; - - $.fn[NAME$1].noConflict = function () { - $.fn[NAME$1] = JQUERY_NO_CONFLICT; - return Button.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$1, Button); /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/manipulator.js + * Bootstrap (v5.0.0-beta2): dom/manipulator.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -959,7 +973,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/selector-engine.js + * Bootstrap (v5.0.0-beta2): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -971,9 +985,6 @@ */ var NODE_TEXT = 3; var SelectorEngine = { - matches: function matches(element, selector) { - return element.matches(selector); - }, find: function find(selector, element) { var _ref; @@ -993,9 +1004,7 @@ children: function children(element, selector) { var _ref2; - var children = (_ref2 = []).concat.apply(_ref2, element.children); - - return children.filter(function (child) { + return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) { return child.matches(selector); }); }, @@ -1004,7 +1013,7 @@ var ancestor = element.parentNode; while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) { - if (this.matches(ancestor, selector)) { + if (ancestor.matches(selector)) { parents.push(ancestor); } @@ -1030,7 +1039,7 @@ var next = element.nextElementSibling; while (next) { - if (this.matches(next, selector)) { + if (next.matches(selector)) { return [next]; } @@ -1103,12 +1112,11 @@ var SELECTOR_ITEM_IMG = '.carousel-item img'; var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; var SELECTOR_INDICATORS = '.carousel-indicators'; + var SELECTOR_INDICATOR = '[data-bs-target]'; var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; - var PointerType = { - TOUCH: 'touch', - PEN: 'pen' - }; + var POINTER_TYPE_TOUCH = 'touch'; + var POINTER_TYPE_PEN = 'pen'; /** * ------------------------------------------------------------------------ * Class Definition @@ -1255,12 +1263,20 @@ this.touchDeltaX = 0; // swipe left if (direction > 0) { - this.prev(); + if (isRTL) { + this.next(); + } else { + this.prev(); + } } // swipe right if (direction < 0) { - this.next(); + if (isRTL) { + this.prev(); + } else { + this.next(); + } } }; @@ -1291,7 +1307,7 @@ var _this4 = this; var start = function start(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchStartX = event.clientX; } else if (!_this4._pointerEvent) { _this4.touchStartX = event.touches[0].clientX; @@ -1308,7 +1324,7 @@ }; var end = function end(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchDeltaX = event.clientX - _this4.touchStartX; } @@ -1367,16 +1383,22 @@ return; } - switch (event.key) { - case ARROW_LEFT_KEY: - event.preventDefault(); + if (event.key === ARROW_LEFT_KEY) { + event.preventDefault(); + + if (isRTL) { + this.next(); + } else { this.prev(); - break; + } + } else if (event.key === ARROW_RIGHT_KEY) { + event.preventDefault(); - case ARROW_RIGHT_KEY: - event.preventDefault(); + if (isRTL) { + this.prev(); + } else { this.next(); - break; + } } }; @@ -1418,16 +1440,17 @@ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { if (this._indicatorsElement) { - var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement); + var activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement); + activeIndicator.classList.remove(CLASS_NAME_ACTIVE$1); + activeIndicator.removeAttribute('aria-current'); + var indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement); for (var i = 0; i < indicators.length; i++) { - indicators[i].classList.remove(CLASS_NAME_ACTIVE$1); - } - - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - - if (nextIndicator) { - nextIndicator.classList.add(CLASS_NAME_ACTIVE$1); + if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) { + indicators[i].classList.add(CLASS_NAME_ACTIVE$1); + indicators[i].setAttribute('aria-current', 'true'); + break; + } } } }; @@ -1461,19 +1484,9 @@ var nextElementIndex = this._getItemIndex(nextElement); var isCycling = Boolean(this._interval); - var directionalClassName; - var orderClassName; - var eventDirectionName; - - if (direction === DIRECTION_NEXT) { - directionalClassName = CLASS_NAME_START; - orderClassName = CLASS_NAME_NEXT; - eventDirectionName = DIRECTION_LEFT; - } else { - directionalClassName = CLASS_NAME_END; - orderClassName = CLASS_NAME_PREV; - eventDirectionName = DIRECTION_RIGHT; - } + var directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END; + var orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV; + var eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT; if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) { this._isSliding = false; @@ -1507,7 +1520,7 @@ activeElement.classList.add(directionalClassName); nextElement.classList.add(directionalClassName); var transitionDuration = getTransitionDurationFromElement(activeElement); - EventHandler.one(activeElement, TRANSITION_END, function () { + EventHandler.one(activeElement, 'transitionend', function () { nextElement.classList.remove(directionalClassName, orderClassName); nextElement.classList.add(CLASS_NAME_ACTIVE$1); activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName); @@ -1635,21 +1648,7 @@ * add .Carousel to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$2]; - $.fn[NAME$2] = Carousel.jQueryInterface; - $.fn[NAME$2].Constructor = Carousel; - - $.fn[NAME$2].noConflict = function () { - $.fn[NAME$2] = JQUERY_NO_CONFLICT; - return Carousel.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$2, Carousel); /** * ------------------------------------------------------------------------ @@ -1674,7 +1673,7 @@ var EVENT_HIDE = "hide" + EVENT_KEY$3; var EVENT_HIDDEN = "hidden" + EVENT_KEY$3; var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3; - var CLASS_NAME_SHOW = 'show'; + var CLASS_NAME_SHOW$1 = 'show'; var CLASS_NAME_COLLAPSE = 'collapse'; var CLASS_NAME_COLLAPSING = 'collapsing'; var CLASS_NAME_COLLAPSED = 'collapsed'; @@ -1732,7 +1731,7 @@ // Public _proto.toggle = function toggle() { - if (this._element.classList.contains(CLASS_NAME_SHOW)) { + if (this._element.classList.contains(CLASS_NAME_SHOW$1)) { this.hide(); } else { this.show(); @@ -1742,7 +1741,7 @@ _proto.show = function show() { var _this2 = this; - if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) { + if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$1)) { return; } @@ -1814,7 +1813,7 @@ var complete = function complete() { _this2._element.classList.remove(CLASS_NAME_COLLAPSING); - _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1); _this2._element.style[dimension] = ''; @@ -1826,7 +1825,7 @@ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var scrollSize = "scroll" + capitalizedDimension; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler.one(this._element, TRANSITION_END, complete); + EventHandler.one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); this._element.style[dimension] = this._element[scrollSize] + "px"; }; @@ -1834,7 +1833,7 @@ _proto.hide = function hide() { var _this3 = this; - if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) { + if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$1)) { return; } @@ -1851,7 +1850,7 @@ this._element.classList.add(CLASS_NAME_COLLAPSING); - this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1); var triggerArrayLength = this._triggerArray.length; @@ -1860,7 +1859,7 @@ var trigger = this._triggerArray[i]; var elem = getElementFromSelector(trigger); - if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) { + if (elem && !elem.classList.contains(CLASS_NAME_SHOW$1)) { trigger.classList.add(CLASS_NAME_COLLAPSED); trigger.setAttribute('aria-expanded', false); } @@ -1881,7 +1880,7 @@ this._element.style[dimension] = ''; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler.one(this._element, TRANSITION_END, complete); + EventHandler.one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); }; @@ -1939,7 +1938,7 @@ return; } - var isOpen = element.classList.contains(CLASS_NAME_SHOW); + var isOpen = element.classList.contains(CLASS_NAME_SHOW$1); triggerArray.forEach(function (elem) { if (isOpen) { elem.classList.remove(CLASS_NAME_COLLAPSED); @@ -2003,7 +2002,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) { // preventDefault only for <a> elements (which change the URL) not inside the collapsible element - if (event.target.tagName === 'A') { + if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { event.preventDefault(); } @@ -2036,21 +2035,7 @@ * add .Collapse to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$3]; - $.fn[NAME$3] = Collapse.jQueryInterface; - $.fn[NAME$3].Constructor = Collapse; - - $.fn[NAME$3].noConflict = function () { - $.fn[NAME$3] = JQUERY_NO_CONFLICT; - return Collapse.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$3, Collapse); /** * ------------------------------------------------------------------------ @@ -2079,7 +2064,7 @@ var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4; var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4; var CLASS_NAME_DISABLED = 'disabled'; - var CLASS_NAME_SHOW$1 = 'show'; + var CLASS_NAME_SHOW$2 = 'show'; var CLASS_NAME_DROPUP = 'dropup'; var CLASS_NAME_DROPEND = 'dropend'; var CLASS_NAME_DROPSTART = 'dropstart'; @@ -2096,7 +2081,7 @@ var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'; var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'; var Default$2 = { - offset: 0, + offset: [0, 2], flip: true, boundary: 'clippingParents', reference: 'toggle', @@ -2104,12 +2089,12 @@ popperConfig: null }; var DefaultType$2 = { - offset: '(number|string|function)', + offset: '(array|string|function)', flip: 'boolean', boundary: '(string|element)', - reference: '(string|element)', + reference: '(string|element|object)', display: 'string', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; /** * ------------------------------------------------------------------------ @@ -2143,7 +2128,7 @@ return; } - var isActive = this._element.classList.contains(CLASS_NAME_SHOW$1); + var isActive = this._element.classList.contains(CLASS_NAME_SHOW$2); Dropdown.clearMenus(); @@ -2155,7 +2140,7 @@ }; _proto.show = function show() { - if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$1)) { + if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$2)) { return; } @@ -2170,7 +2155,9 @@ } // Totally disable Popper for Dropdowns in Navbar - if (!this._inNavbar) { + if (this._inNavbar) { + Manipulator.setDataAttribute(this._menu, 'popper', 'none'); + } else { if (typeof Popper__namespace === 'undefined') { throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); } @@ -2185,9 +2172,20 @@ if (typeof this._config.reference.jquery !== 'undefined') { referenceElement = this._config.reference[0]; } + } else if (typeof this._config.reference === 'object') { + referenceElement = this._config.reference; } - this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig()); + var popperConfig = this._getPopperConfig(); + + var isDisplayStatic = popperConfig.modifiers.find(function (modifier) { + return modifier.name === 'applyStyles' && modifier.enabled === false; + }); + this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig); + + if (isDisplayStatic) { + Manipulator.setDataAttribute(this._menu, 'popper', 'static'); + } } // 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 @@ -2206,23 +2204,22 @@ this._element.setAttribute('aria-expanded', true); - this._menu.classList.toggle(CLASS_NAME_SHOW$1); + this._menu.classList.toggle(CLASS_NAME_SHOW$2); - this._element.classList.toggle(CLASS_NAME_SHOW$1); + this._element.classList.toggle(CLASS_NAME_SHOW$2); - EventHandler.trigger(parent, EVENT_SHOWN$1, relatedTarget); + EventHandler.trigger(this._element, EVENT_SHOWN$1, relatedTarget); }; _proto.hide = function hide() { - if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$1)) { + if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$2)) { return; } - var parent = Dropdown.getParentFromElement(this._element); var relatedTarget = { relatedTarget: this._element }; - var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget); + var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$1, relatedTarget); if (hideEvent.defaultPrevented) { return; @@ -2232,11 +2229,12 @@ this._popper.destroy(); } - this._menu.classList.toggle(CLASS_NAME_SHOW$1); + this._menu.classList.toggle(CLASS_NAME_SHOW$2); - this._element.classList.toggle(CLASS_NAME_SHOW$1); + this._element.classList.toggle(CLASS_NAME_SHOW$2); - EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget); + Manipulator.removeDataAttribute(this._menu, 'popper'); + EventHandler.trigger(this._element, EVENT_HIDDEN$1, relatedTarget); }; _proto.dispose = function dispose() { @@ -2275,6 +2273,12 @@ _proto._getConfig = function _getConfig(config) { config = _extends({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config); typeCheckConfig(NAME$4, config, this.constructor.DefaultType); + + if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { + // Popper virtual elements require a getBoundingClientRect method + throw new TypeError(NAME$4.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method."); + } + return config; }; @@ -2307,26 +2311,51 @@ return this._element.closest("." + CLASS_NAME_NAVBAR) !== null; }; + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = this._config.offset; + + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); + } + + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this3._element); + }; + } + + return offset; + }; + _proto._getPopperConfig = function _getPopperConfig() { - var popperConfig = { + var defaultBsPopperConfig = { placement: this._getPlacement(), modifiers: [{ name: 'preventOverflow', options: { altBoundary: this._config.flip, - rootBoundary: this._config.boundary + boundary: this._config.boundary + } + }, { + name: 'offset', + options: { + offset: this._getOffset() } }] }; // Disable Popper if we have a static display if (this._config.display === 'static') { - popperConfig.modifiers = [{ + defaultBsPopperConfig.modifiers = [{ name: 'applyStyles', enabled: false }]; } - return _extends({}, popperConfig, this._config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig); } // Static ; @@ -2362,7 +2391,6 @@ var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2); for (var i = 0, len = toggles.length; i < len; i++) { - var parent = Dropdown.getParentFromElement(toggles[i]); var context = Data.getData(toggles[i], DATA_KEY$4); var relatedTarget = { relatedTarget: toggles[i] @@ -2378,7 +2406,7 @@ var dropdownMenu = context._menu; - if (!toggles[i].classList.contains(CLASS_NAME_SHOW$1)) { + if (!toggles[i].classList.contains(CLASS_NAME_SHOW$2)) { continue; } @@ -2386,7 +2414,7 @@ continue; } - var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget); + var hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE$1, relatedTarget); if (hideEvent.defaultPrevented) { continue; @@ -2408,9 +2436,10 @@ context._popper.destroy(); } - dropdownMenu.classList.remove(CLASS_NAME_SHOW$1); - toggles[i].classList.remove(CLASS_NAME_SHOW$1); - EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget); + dropdownMenu.classList.remove(CLASS_NAME_SHOW$2); + toggles[i].classList.remove(CLASS_NAME_SHOW$2); + Manipulator.removeDataAttribute(dropdownMenu, 'popper'); + EventHandler.trigger(toggles[i], EVENT_HIDDEN$1, relatedTarget); } }; @@ -2438,7 +2467,7 @@ } var parent = Dropdown.getParentFromElement(this); - var isActive = this.classList.contains(CLASS_NAME_SHOW$1); + var isActive = this.classList.contains(CLASS_NAME_SHOW$2); if (event.key === ESCAPE_KEY) { var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0]; @@ -2447,6 +2476,14 @@ return; } + if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) { + var _button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0]; + + _button.click(); + + return; + } + if (!isActive || event.key === SPACE_KEY) { Dropdown.clearMenus(); return; @@ -2519,21 +2556,7 @@ * add .Dropdown to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$4]; - $.fn[NAME$4] = Dropdown.jQueryInterface; - $.fn[NAME$4].Constructor = Dropdown; - - $.fn[NAME$4].noConflict = function () { - $.fn[NAME$4] = JQUERY_NO_CONFLICT; - return Dropdown.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$4, Dropdown); /** * ------------------------------------------------------------------------ @@ -2571,8 +2594,8 @@ var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'; var CLASS_NAME_BACKDROP = 'modal-backdrop'; var CLASS_NAME_OPEN = 'modal-open'; - var CLASS_NAME_FADE = 'fade'; - var CLASS_NAME_SHOW$2 = 'show'; + var CLASS_NAME_FADE$1 = 'fade'; + var CLASS_NAME_SHOW$3 = 'show'; var CLASS_NAME_STATIC = 'modal-static'; var SELECTOR_DIALOG = '.modal-dialog'; var SELECTOR_MODAL_BODY = '.modal-body'; @@ -2619,7 +2642,7 @@ return; } - if (this._element.classList.contains(CLASS_NAME_FADE)) { + if (this._element.classList.contains(CLASS_NAME_FADE$1)) { this._isTransitioning = true; } @@ -2678,7 +2701,7 @@ this._isShown = false; - var transition = this._element.classList.contains(CLASS_NAME_FADE); + var transition = this._element.classList.contains(CLASS_NAME_FADE$1); if (transition) { this._isTransitioning = true; @@ -2690,14 +2713,14 @@ EventHandler.off(document, EVENT_FOCUSIN); - this._element.classList.remove(CLASS_NAME_SHOW$2); + this._element.classList.remove(CLASS_NAME_SHOW$3); EventHandler.off(this._element, EVENT_CLICK_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); if (transition) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler.one(this._element, TRANSITION_END, function (event) { + EventHandler.one(this._element, 'transitionend', function (event) { return _this3._hideModal(event); }); emulateTransitionEnd(this._element, transitionDuration); @@ -2744,7 +2767,7 @@ _proto._showElement = function _showElement(relatedTarget) { var _this4 = this; - var transition = this._element.classList.contains(CLASS_NAME_FADE); + var transition = this._element.classList.contains(CLASS_NAME_FADE$1); var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog); @@ -2771,7 +2794,7 @@ reflow(this._element); } - this._element.classList.add(CLASS_NAME_SHOW$2); + this._element.classList.add(CLASS_NAME_SHOW$3); if (this._config.focus) { this._enforceFocus(); @@ -2790,7 +2813,7 @@ if (transition) { var transitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler.one(this._dialog, TRANSITION_END, transitionComplete); + EventHandler.one(this._dialog, 'transitionend', transitionComplete); emulateTransitionEnd(this._dialog, transitionDuration); } else { transitionComplete(); @@ -2872,7 +2895,7 @@ _proto._showBackdrop = function _showBackdrop(callback) { var _this9 = this; - var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : ''; + var animate = this._element.classList.contains(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : ''; if (this._isShown && this._config.backdrop) { this._backdrop = document.createElement('div'); @@ -2904,7 +2927,7 @@ reflow(this._backdrop); } - this._backdrop.classList.add(CLASS_NAME_SHOW$2); + this._backdrop.classList.add(CLASS_NAME_SHOW$3); if (!animate) { callback(); @@ -2912,10 +2935,10 @@ } var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler.one(this._backdrop, TRANSITION_END, callback); + EventHandler.one(this._backdrop, 'transitionend', callback); emulateTransitionEnd(this._backdrop, backdropTransitionDuration); } else if (!this._isShown && this._backdrop) { - this._backdrop.classList.remove(CLASS_NAME_SHOW$2); + this._backdrop.classList.remove(CLASS_NAME_SHOW$3); var callbackRemove = function callbackRemove() { _this9._removeBackdrop(); @@ -2923,10 +2946,10 @@ callback(); }; - if (this._element.classList.contains(CLASS_NAME_FADE)) { + if (this._element.classList.contains(CLASS_NAME_FADE$1)) { var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove); + EventHandler.one(this._backdrop, 'transitionend', callbackRemove); emulateTransitionEnd(this._backdrop, _backdropTransitionDuration); } else { callbackRemove(); @@ -2954,12 +2977,12 @@ this._element.classList.add(CLASS_NAME_STATIC); var modalTransitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler.off(this._element, TRANSITION_END); - EventHandler.one(this._element, TRANSITION_END, function () { + EventHandler.off(this._element, 'transitionend'); + EventHandler.one(this._element, 'transitionend', function () { _this10._element.classList.remove(CLASS_NAME_STATIC); if (!isModalOverflowing) { - EventHandler.one(_this10._element, TRANSITION_END, function () { + EventHandler.one(_this10._element, 'transitionend', function () { _this10._element.style.overflowY = ''; }); emulateTransitionEnd(_this10._element, modalTransitionDuration); @@ -3000,60 +3023,50 @@ var _this11 = 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 - SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var actualPadding = element.style.paddingRight; - var calculatedPadding = window.getComputedStyle(element)['padding-right']; - Manipulator.setDataAttribute(element, 'padding-right', actualPadding); - element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px"; - }); // Adjust sticky content margin - - SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) { - var actualMargin = element.style.marginRight; - var calculatedMargin = window.getComputedStyle(element)['margin-right']; - Manipulator.setDataAttribute(element, 'margin-right', actualMargin); - element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px"; - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = window.getComputedStyle(document.body)['padding-right']; - Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding); - document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px"; + this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); + + this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) { + return calculatedValue - _this11._scrollbarWidth; + }); + + this._setElementAttributes('body', 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); } document.body.classList.add(CLASS_NAME_OPEN); }; - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var padding = Manipulator.getDataAttribute(element, 'padding-right'); + _proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) { + SelectorEngine.find(selector).forEach(function (element) { + var actualValue = element.style[styleProp]; + var calculatedValue = window.getComputedStyle(element)[styleProp]; + Manipulator.setDataAttribute(element, styleProp, actualValue); + element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px'; + }); + }; - if (typeof padding !== 'undefined') { - Manipulator.removeDataAttribute(element, 'padding-right'); - element.style.paddingRight = padding; - } - }); // Restore sticky content and navbar-toggler margin + _proto._resetScrollbar = function _resetScrollbar() { + this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight'); - SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) { - var margin = Manipulator.getDataAttribute(element, 'margin-right'); + this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight'); - if (typeof margin !== 'undefined') { - Manipulator.removeDataAttribute(element, 'margin-right'); - element.style.marginRight = margin; - } - }); // Restore body padding + this._resetElementAttributes('body', 'paddingRight'); + }; - var padding = Manipulator.getDataAttribute(document.body, 'padding-right'); + _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) { + SelectorEngine.find(selector).forEach(function (element) { + var value = Manipulator.getDataAttribute(element, styleProp); - if (typeof padding === 'undefined') { - document.body.style.paddingRight = ''; - } else { - Manipulator.removeDataAttribute(document.body, 'padding-right'); - document.body.style.paddingRight = padding; - } + if (typeof value === 'undefined' && element === document.body) { + element.style[styleProp] = ''; + } else { + Manipulator.removeDataAttribute(element, styleProp); + element.style[styleProp] = value; + } + }); }; _proto._getScrollbarWidth = function _getScrollbarWidth() { @@ -3137,7 +3150,7 @@ data = new Modal(target, config); } - data.show(this); + data.toggle(this); }); /** * ------------------------------------------------------------------------ @@ -3146,25 +3159,11 @@ * add .Modal to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$5]; - $.fn[NAME$5] = Modal.jQueryInterface; - $.fn[NAME$5].Constructor = Modal; - - $.fn[NAME$5].noConflict = function () { - $.fn[NAME$5] = JQUERY_NO_CONFLICT; - return Modal.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$5, Modal); /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/sanitizer.js + * Bootstrap (v5.0.0-beta2): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -3190,7 +3189,7 @@ if (allowedAttributeList.includes(attrName)) { if (uriAttrs.has(attrName)) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); + return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue)); } return true; @@ -3201,7 +3200,7 @@ }); // Check if a regular expression validates the attribute. for (var i = 0, len = regExp.length; i < len; i++) { - if (attrName.match(regExp[i])) { + if (regExp[i].test(attrName)) { return true; } } @@ -3310,14 +3309,15 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', + offset: '(array|string|function)', container: '(string|element|boolean)', - fallbackPlacements: '(null|array)', + fallbackPlacements: 'array', boundary: '(string|element)', customClass: '(string|function)', sanitize: 'boolean', sanitizeFn: '(null|function)', allowList: 'object', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; var AttachmentMap = { AUTO: 'auto', @@ -3335,8 +3335,9 @@ html: false, selector: false, placement: 'top', + offset: [0, 0], container: false, - fallbackPlacements: null, + fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', customClass: '', sanitize: true, @@ -3356,9 +3357,9 @@ MOUSEENTER: "mouseenter" + EVENT_KEY$6, MOUSELEAVE: "mouseleave" + EVENT_KEY$6 }; - var CLASS_NAME_FADE$1 = 'fade'; + var CLASS_NAME_FADE$2 = 'fade'; var CLASS_NAME_MODAL = 'modal'; - var CLASS_NAME_SHOW$3 = 'show'; + var CLASS_NAME_SHOW$4 = 'show'; var HOVER_STATE_SHOW = 'show'; var HOVER_STATE_OUT = 'out'; var SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; @@ -3420,13 +3421,7 @@ } if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = Data.getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); - } + var context = this._initializeOnDelegatedTarget(event); context._activeTrigger.click = !context._activeTrigger.click; @@ -3436,7 +3431,7 @@ context._leave(null, context); } } else { - if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) { + if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$4)) { this._leave(null, this); return; @@ -3451,7 +3446,7 @@ EventHandler.off(this._element, this.constructor.EVENT_KEY); EventHandler.off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); - if (this.tip) { + if (this.tip && this.tip.parentNode) { this.tip.parentNode.removeChild(this.tip); } @@ -3478,81 +3473,83 @@ throw new Error('Please use show on visible elements'); } - if (this.isWithContent() && this._isEnabled) { - var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW); - var shadowRoot = findShadowRoot(this._element); - var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); + if (!(this.isWithContent() && this._isEnabled)) { + return; + } - if (showEvent.defaultPrevented || !isInTheDom) { - return; - } + var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW); + var shadowRoot = findShadowRoot(this._element); + var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); - var tip = this.getTipElement(); - var tipId = getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } - this._element.setAttribute('aria-describedby', tipId); + var tip = this.getTipElement(); + var tipId = getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); - this.setContent(); + this._element.setAttribute('aria-describedby', tipId); - if (this.config.animation) { - tip.classList.add(CLASS_NAME_FADE$1); - } + 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.classList.add(CLASS_NAME_FADE$2); + } - var attachment = this._getAttachment(placement); + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; - this._addAttachmentClass(attachment); + var attachment = this._getAttachment(placement); - var container = this._getContainer(); + this._addAttachmentClass(attachment); - Data.setData(tip, this.constructor.DATA_KEY, this); + var container = this._getContainer(); - if (!this._element.ownerDocument.documentElement.contains(this.tip)) { - container.appendChild(tip); - } + Data.setData(tip, this.constructor.DATA_KEY, this); - EventHandler.trigger(this._element, this.constructor.Event.INSERTED); - this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); - tip.classList.add(CLASS_NAME_SHOW$3); - var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.appendChild(tip); + } - if (customClass) { - var _tip$classList; + EventHandler.trigger(this._element, this.constructor.Event.INSERTED); + this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + tip.classList.add(CLASS_NAME_SHOW$4); + var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; - (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); - } // 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 (customClass) { + var _tip$classList; + (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); + } // 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) { - var _ref; - (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { - EventHandler.on(element, 'mouseover', noop()); - }); - } + if ('ontouchstart' in document.documentElement) { + var _ref; - var complete = function complete() { - var prevHoverState = _this2._hoverState; - _this2._hoverState = null; - EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN); + (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { + EventHandler.on(element, 'mouseover', noop()); + }); + } - if (prevHoverState === HOVER_STATE_OUT) { - _this2._leave(null, _this2); - } - }; + var complete = function complete() { + var prevHoverState = _this2._hoverState; + _this2._hoverState = null; + EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN); - if (this.tip.classList.contains(CLASS_NAME_FADE$1)) { - var transitionDuration = getTransitionDurationFromElement(this.tip); - EventHandler.one(this.tip, TRANSITION_END, complete); - emulateTransitionEnd(this.tip, transitionDuration); - } else { - complete(); + if (prevHoverState === HOVER_STATE_OUT) { + _this2._leave(null, _this2); } + }; + + if (this.tip.classList.contains(CLASS_NAME_FADE$2)) { + var transitionDuration = getTransitionDurationFromElement(this.tip); + EventHandler.one(this.tip, 'transitionend', complete); + emulateTransitionEnd(this.tip, transitionDuration); + } else { + complete(); } }; @@ -3589,7 +3586,7 @@ return; } - tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra + tip.classList.remove(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { @@ -3604,9 +3601,9 @@ this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_HOVER] = false; - if (this.tip.classList.contains(CLASS_NAME_FADE$1)) { + if (this.tip.classList.contains(CLASS_NAME_FADE$2)) { var transitionDuration = getTransitionDurationFromElement(tip); - EventHandler.one(tip, TRANSITION_END, complete); + EventHandler.one(tip, 'transitionend', complete); emulateTransitionEnd(tip, transitionDuration); } else { complete(); @@ -3640,7 +3637,7 @@ _proto.setContent = function setContent() { var tip = this.getTipElement(); this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); - tip.classList.remove(CLASS_NAME_FADE$1, CLASS_NAME_SHOW$3); + tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4); }; _proto.setElementContent = function setElementContent(element, content) { @@ -3700,26 +3697,58 @@ } // Private ; - _proto._getPopperConfig = function _getPopperConfig(attachment) { + _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || Data.getData(event.delegateTarget, dataKey); + + if (!context) { + context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); + Data.setData(event.delegateTarget, dataKey, context); + } + + return context; + }; + + _proto._getOffset = function _getOffset() { var _this4 = this; - var flipModifier = { - name: 'flip', - options: { - altBoundary: true - } - }; + var offset = this.config.offset; + + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); + } - if (this.config.fallbackPlacements) { - flipModifier.options.fallbackPlacements = this.config.fallbackPlacements; + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this4._element); + }; } - var defaultBsConfig = { + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig(attachment) { + var _this5 = this; + + var defaultBsPopperConfig = { placement: attachment, - modifiers: [flipModifier, { + modifiers: [{ + name: 'flip', + options: { + altBoundary: true, + fallbackPlacements: this.config.fallbackPlacements + } + }, { + name: 'offset', + options: { + offset: this._getOffset() + } + }, { name: 'preventOverflow', options: { - rootBoundary: this.config.boundary + boundary: this.config.boundary } }, { name: 'arrow', @@ -3731,16 +3760,16 @@ enabled: true, phase: 'afterWrite', fn: function fn(data) { - return _this4._handlePopperPlacementChange(data); + return _this5._handlePopperPlacementChange(data); } }], onFirstUpdate: function onFirstUpdate(data) { if (data.options.placement !== data.placement) { - _this4._handlePopperPlacementChange(data); + _this5._handlePopperPlacementChange(data); } } }; - return _extends({}, defaultBsConfig, this.config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig); }; _proto._addAttachmentClass = function _addAttachmentClass(attachment) { @@ -3764,29 +3793,29 @@ }; _proto._setListeners = function _setListeners() { - var _this5 = this; + var _this6 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - EventHandler.on(_this5._element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) { - return _this5.toggle(event); + EventHandler.on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) { + return _this6.toggle(event); }); } else if (trigger !== TRIGGER_MANUAL) { - var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; - var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; - EventHandler.on(_this5._element, eventIn, _this5.config.selector, function (event) { - return _this5._enter(event); + var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN; + var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT; + EventHandler.on(_this6._element, eventIn, _this6.config.selector, function (event) { + return _this6._enter(event); }); - EventHandler.on(_this5._element, eventOut, _this5.config.selector, function (event) { - return _this5._leave(event); + EventHandler.on(_this6._element, eventOut, _this6.config.selector, function (event) { + return _this6._leave(event); }); } }); this._hideModalHandler = function () { - if (_this5._element) { - _this5.hide(); + if (_this6._element) { + _this6.hide(); } }; @@ -3819,19 +3848,13 @@ }; _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data.getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; } - if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) { + if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) { context._hoverState = HOVER_STATE_SHOW; return; } @@ -3852,13 +3875,7 @@ }; _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data.getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false; @@ -4039,21 +4056,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$6]; - $.fn[NAME$6] = Tooltip.jQueryInterface; - $.fn[NAME$6].Constructor = Tooltip; - - $.fn[NAME$6].noConflict = function () { - $.fn[NAME$6] = JQUERY_NO_CONFLICT; - return Tooltip.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$6, Tooltip); /** * ------------------------------------------------------------------------ @@ -4069,6 +4072,7 @@ var Default$5 = _extends({}, Tooltip.Default, { placement: 'right', + offset: [0, 8], trigger: 'click', content: '', template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>' @@ -4090,8 +4094,8 @@ MOUSEENTER: "mouseenter" + EVENT_KEY$7, MOUSELEAVE: "mouseleave" + EVENT_KEY$7 }; - var CLASS_NAME_FADE$2 = 'fade'; - var CLASS_NAME_SHOW$4 = 'show'; + var CLASS_NAME_FADE$3 = 'fade'; + var CLASS_NAME_SHOW$5 = 'show'; var SELECTOR_TITLE = '.popover-header'; var SELECTOR_CONTENT = '.popover-body'; /** @@ -4126,7 +4130,7 @@ } this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content); - tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4); + tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$5); } // Private ; @@ -4179,8 +4183,8 @@ _createClass(Popover, null, [{ key: "Default", - // Getters - get: function get() { + get: // Getters + function get() { return Default$5; } }, { @@ -4220,21 +4224,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$7]; - $.fn[NAME$7] = Popover.jQueryInterface; - $.fn[NAME$7].Constructor = Popover; - - $.fn[NAME$7].noConflict = function () { - $.fn[NAME$7] = JQUERY_NO_CONFLICT; - return Popover.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$7, Popover); /** * ------------------------------------------------------------------------ @@ -4290,8 +4280,8 @@ _this._targets = []; _this._activeTarget = null; _this._scrollHeight = 0; - EventHandler.on(_this._scrollElement, EVENT_SCROLL, function (event) { - return _this._process(event); + EventHandler.on(_this._scrollElement, EVENT_SCROLL, function () { + return _this._process(); }); _this.refresh(); @@ -4520,21 +4510,7 @@ * add .ScrollSpy to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$8]; - $.fn[NAME$8] = ScrollSpy.jQueryInterface; - $.fn[NAME$8].Constructor = ScrollSpy; - - $.fn[NAME$8].noConflict = function () { - $.fn[NAME$8] = JQUERY_NO_CONFLICT; - return ScrollSpy.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$8, ScrollSpy); /** * ------------------------------------------------------------------------ @@ -4554,8 +4530,8 @@ var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'; var CLASS_NAME_ACTIVE$3 = 'active'; var CLASS_NAME_DISABLED$1 = 'disabled'; - var CLASS_NAME_FADE$3 = 'fade'; - var CLASS_NAME_SHOW$5 = 'show'; + var CLASS_NAME_FADE$4 = 'fade'; + var CLASS_NAME_SHOW$6 = 'show'; var SELECTOR_DROPDOWN$1 = '.dropdown'; var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group'; var SELECTOR_ACTIVE$1 = '.active'; @@ -4597,14 +4573,9 @@ previous = previous[previous.length - 1]; } - var hideEvent = null; - - if (previous) { - hideEvent = EventHandler.trigger(previous, EVENT_HIDE$3, { - relatedTarget: this._element - }); - } - + var hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$3, { + relatedTarget: this._element + }) : null; var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, { relatedTarget: previous }); @@ -4637,7 +4608,7 @@ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1); var active = activeElements[0]; - var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$3); + var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$4); var complete = function complete() { return _this2._transitionComplete(element, active, callback); @@ -4645,8 +4616,8 @@ if (active && isTransitioning) { var transitionDuration = getTransitionDurationFromElement(active); - active.classList.remove(CLASS_NAME_SHOW$5); - EventHandler.one(active, TRANSITION_END, complete); + active.classList.remove(CLASS_NAME_SHOW$6); + EventHandler.one(active, 'transitionend', complete); emulateTransitionEnd(active, transitionDuration); } else { complete(); @@ -4675,8 +4646,8 @@ reflow(element); - if (element.classList.contains(CLASS_NAME_FADE$3)) { - element.classList.add(CLASS_NAME_SHOW$5); + if (element.classList.contains(CLASS_NAME_FADE$4)) { + element.classList.add(CLASS_NAME_SHOW$6); } if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) { @@ -4713,8 +4684,8 @@ _createClass(Tab, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY$9; } }]); @@ -4740,21 +4711,7 @@ * add .Tab to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$9]; - $.fn[NAME$9] = Tab.jQueryInterface; - $.fn[NAME$9].Constructor = Tab; - - $.fn[NAME$9].noConflict = function () { - $.fn[NAME$9] = JQUERY_NO_CONFLICT; - return Tab.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$9, Tab); /** * ------------------------------------------------------------------------ @@ -4770,9 +4727,9 @@ var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a; var EVENT_SHOW$4 = "show" + EVENT_KEY$a; var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a; - var CLASS_NAME_FADE$4 = 'fade'; + var CLASS_NAME_FADE$5 = 'fade'; var CLASS_NAME_HIDE = 'hide'; - var CLASS_NAME_SHOW$6 = 'show'; + var CLASS_NAME_SHOW$7 = 'show'; var CLASS_NAME_SHOWING = 'showing'; var DefaultType$7 = { animation: 'boolean', @@ -4822,13 +4779,13 @@ this._clearTimeout(); if (this._config.animation) { - this._element.classList.add(CLASS_NAME_FADE$4); + this._element.classList.add(CLASS_NAME_FADE$5); } var complete = function complete() { _this2._element.classList.remove(CLASS_NAME_SHOWING); - _this2._element.classList.add(CLASS_NAME_SHOW$6); + _this2._element.classList.add(CLASS_NAME_SHOW$7); EventHandler.trigger(_this2._element, EVENT_SHOWN$4); @@ -4847,7 +4804,7 @@ if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler.one(this._element, TRANSITION_END, complete); + EventHandler.one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -4857,7 +4814,7 @@ _proto.hide = function hide() { var _this3 = this; - if (!this._element.classList.contains(CLASS_NAME_SHOW$6)) { + if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) { return; } @@ -4873,11 +4830,11 @@ EventHandler.trigger(_this3._element, EVENT_HIDDEN$4); }; - this._element.classList.remove(CLASS_NAME_SHOW$6); + this._element.classList.remove(CLASS_NAME_SHOW$7); if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler.one(this._element, TRANSITION_END, complete); + EventHandler.one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -4887,8 +4844,8 @@ _proto.dispose = function dispose() { this._clearTimeout(); - if (this._element.classList.contains(CLASS_NAME_SHOW$6)) { - this._element.classList.remove(CLASS_NAME_SHOW$6); + if (this._element.classList.contains(CLASS_NAME_SHOW$7)) { + this._element.classList.remove(CLASS_NAME_SHOW$7); } EventHandler.off(this._element, EVENT_CLICK_DISMISS$1); @@ -4966,25 +4923,11 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME$a]; - $.fn[NAME$a] = Toast.jQueryInterface; - $.fn[NAME$a].Constructor = Toast; - - $.fn[NAME$a].noConflict = function () { - $.fn[NAME$a] = JQUERY_NO_CONFLICT; - return Toast.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME$a, Toast); /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): index.umd.js + * Bootstrap (v5.0.0-beta2): index.umd.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/assets/javascripts/bootstrap.min.js b/assets/javascripts/bootstrap.min.js index 1bca763..de88021 100644 --- a/assets/javascripts/bootstrap.min.js +++ b/assets/javascripts/bootstrap.min.js @@ -1,6 +1,6 @@ /*! - * Bootstrap v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n=e(t);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)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var a,l,c=function(t){do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},u=function(t){var e=t.getAttribute("data-bs-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():null}return e},d=function(t){var e=u(t);return e&&document.querySelector(e)?e:null},f=function(t){var e=u(t);return e?document.querySelector(e):null},h=function(t){if(!t)return 0;var e=window.getComputedStyle(t),n=e.transitionDuration,i=e.transitionDelay,o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(i))):0},p=function(t){t.dispatchEvent(new Event("transitionend"))},g=function(t){return(t[0]||t).nodeType},m=function(t,e){var n=!1,i=e+5;t.addEventListener("transitionend",(function e(){n=!0,t.removeEventListener("transitionend",e)})),setTimeout((function(){n||p(t)}),i)},_=function(t,e,n){Object.keys(n).forEach((function(i){var o,s=n[i],r=e[i],a=r&&g(r)?"element":null==(o=r)?""+o:{}.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+s+'".')}))},v=function(t){if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){var e=getComputedStyle(t),n=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==n.display&&"hidden"!==e.visibility}return!1},b=function(){return function(){}},y=function(t){return t.offsetHeight},w=function(){var t=window.jQuery;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},E=function(t){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()},T="rtl"===document.documentElement.dir,k=(a={},l=1,{set:function(t,e,n){void 0===t.bsKey&&(t.bsKey={key:e,id:l},l++),a[t.bsKey.id]=n},get:function(t,e){if(!t||void 0===t.bsKey)return null;var n=t.bsKey;return n.key===e?a[n.id]:null},delete:function(t,e){if(void 0!==t.bsKey){var n=t.bsKey;n.key===e&&(delete a[n.id],delete t.bsKey)}}}),A=function(t,e,n){k.set(t,e,n)},L=function(t,e){return k.get(t,e)},C=function(t,e){k.delete(t,e)},D=/[^.]*(?=\..*)\.|.*/,S=/\..*/,N=/::\d+$/,O={},I=1,j={mouseenter:"mouseover",mouseleave:"mouseout"},P=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&e+"::"+I++||t.uidEvent||I++}function H(t){var e=x(t);return t.uidEvent=e,O[e]=O[e]||{},O[e]}function B(t,e,n){void 0===n&&(n=null);for(var i=Object.keys(t),o=0,s=i.length;o<s;o++){var r=t[i[o]];if(r.originalHandler===e&&r.delegationSelector===n)return r}return null}function M(t,e,n){var i="string"==typeof e,o=i?n:e,s=t.replace(S,""),r=j[s];return r&&(s=r),P.has(s)||(s=t),[i,o,s]}function R(t,e,n,i,o){if("string"==typeof e&&t){n||(n=i,i=null);var s=M(e,n,i),r=s[0],a=s[1],l=s[2],c=H(t),u=c[l]||(c[l]={}),d=B(u,a,r?n:null);if(d)d.oneOff=d.oneOff&&o;else{var f=x(a,e.replace(D,"")),h=r?function(t,e,n){return function i(o){for(var s=t.querySelectorAll(e),r=o.target;r&&r!==this;r=r.parentNode)for(var a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&Q.off(t,o.type,n),n.apply(r,[o]);return null}}(t,n,i):function(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&Q.off(t,i.type,e),e.apply(t,[i])}}(t,n);h.delegationSelector=r?n:null,h.originalHandler=a,h.oneOff=o,h.uidEvent=f,u[f]=h,t.addEventListener(l,h,r)}}}function K(t,e,n,i,o){var s=B(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}var Q={on:function(t,e,n,i){R(t,e,n,i,!1)},one:function(t,e,n,i){R(t,e,n,i,!0)},off:function(t,e,n,i){if("string"==typeof e&&t){var o=M(e,n,i),s=o[0],r=o[1],a=o[2],l=a!==e,c=H(t),u=e.startsWith(".");if(void 0===r){u&&Object.keys(c).forEach((function(n){!function(t,e,n,i){var o=e[n]||{};Object.keys(o).forEach((function(s){if(s.includes(i)){var r=o[s];K(t,e,n,r.originalHandler,r.delegationSelector)}}))}(t,c,n,e.slice(1))}));var d=c[a]||{};Object.keys(d).forEach((function(n){var i=n.replace(N,"");if(!l||e.includes(i)){var o=d[n];K(t,c,a,o.originalHandler,o.delegationSelector)}}))}else{if(!c||!c[a])return;K(t,c,a,r,s?n:null)}}},trigger:function(t,e,n){if("string"!=typeof e||!t)return null;var i,o=w(),s=e.replace(S,""),r=e!==s,a=P.has(s),l=!0,c=!0,u=!1,d=null;return r&&o&&(i=o.Event(e,n),o(t).trigger(i),l=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented()),a?(d=document.createEvent("HTMLEvents")).initEvent(s,l,!0):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((function(t){Object.defineProperty(d,t,{get:function(){return n[t]}})})),u&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==i&&i.preventDefault(),d}},U=function(){function t(t){t&&(this._element=t,A(t,this.constructor.DATA_KEY,this))}return t.prototype.dispose=function(){C(this._element,this.constructor.DATA_KEY),this._element=null},t.getInstance=function(t){return L(t,this.DATA_KEY)},o(t,null,[{key:"VERSION",get:function(){return"5.0.0-beta1"}}]),t}(),W="alert",F=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.close=function(t){var e=t?this._getRootElement(t):this._element,n=this._triggerCloseEvent(e);null===n||n.defaultPrevented||this._removeElement(e)},n._getRootElement=function(t){return f(t)||t.closest(".alert")},n._triggerCloseEvent=function(t){return Q.trigger(t,"close.bs.alert")},n._removeElement=function(t){var e=this;if(t.classList.remove("show"),t.classList.contains("fade")){var n=h(t);Q.one(t,"transitionend",(function(){return e._destroyElement(t)})),m(t,n)}else this._destroyElement(t)},n._destroyElement=function(t){t.parentNode&&t.parentNode.removeChild(t),Q.trigger(t,"closed.bs.alert")},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.alert");n||(n=new e(this)),"close"===t&&n[t](this)}))},e.handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.alert"}}]),e}(U);Q.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',F.handleDismiss(new F)),E((function(){var t=w();if(t){var e=t.fn[W];t.fn[W]=F.jQueryInterface,t.fn[W].Constructor=F,t.fn[W].noConflict=function(){return t.fn[W]=e,F.jQueryInterface}}}));var Y=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.toggle=function(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.button");n||(n=new e(this)),"toggle"===t&&n[t]()}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.button"}}]),e}(U);function z(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function X(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))}Q.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',(function(t){t.preventDefault();var e=t.target.closest('[data-bs-toggle="button"]'),n=L(e,"bs.button");n||(n=new Y(e)),n.toggle()})),E((function(){var t=w();if(t){var e=t.fn.button;t.fn.button=Y.jQueryInterface,t.fn.button.Constructor=Y,t.fn.button.noConflict=function(){return t.fn.button=e,Y.jQueryInterface}}}));var q={setDataAttribute:function(t,e,n){t.setAttribute("data-bs-"+X(e),n)},removeDataAttribute:function(t,e){t.removeAttribute("data-bs-"+X(e))},getDataAttributes:function(t){if(!t)return{};var e={};return Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")})).forEach((function(n){var i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[n])})),e},getDataAttribute:function(t,e){return z(t.getAttribute("data-bs-"+X(e)))},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:function(t){return{top:t.offsetTop,left:t.offsetLeft}}},V={matches:function(t,e){return t.matches(e)},find:function(t,e){var n;return void 0===e&&(e=document.documentElement),(n=[]).concat.apply(n,Element.prototype.querySelectorAll.call(e,t))},findOne:function(t,e){return void 0===e&&(e=document.documentElement),Element.prototype.querySelector.call(e,t)},children:function(t,e){var n,i=(n=[]).concat.apply(n,t.children);return i.filter((function(t){return t.matches(e)}))},parents:function(t,e){for(var n=[],i=t.parentNode;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)this.matches(i,e)&&n.push(i),i=i.parentNode;return n},prev:function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next:function(t,e){for(var n=t.nextElementSibling;n;){if(this.matches(n,e))return[n];n=n.nextElementSibling}return[]}},$="carousel",G=".bs.carousel",Z={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},J={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},tt={TOUCH:"touch",PEN:"pen"},et=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._items=null,i._interval=null,i._activeElement=null,i._isPaused=!1,i._isSliding=!1,i.touchTimeout=null,i.touchStartX=0,i.touchDeltaX=0,i._config=i._getConfig(n),i._indicatorsElement=V.findOne(".carousel-indicators",i._element),i._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,i._pointerEvent=Boolean(window.PointerEvent),i._addEventListeners(),i}r(e,t);var n=e.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&v(this._element)&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),V.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(p(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var e=this;this._activeElement=V.findOne(".active.carousel-item",this._element);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)Q.one(this._element,"slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},n.dispose=function(){t.prototype.dispose.call(this),Q.off(this._element,G),this._items=null,this._config=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},Z,t),_($,t,J),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&Q.on(this._element,"keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&(Q.on(this._element,"mouseenter.bs.carousel",(function(e){return t.pause(e)})),Q.on(this._element,"mouseleave.bs.carousel",(function(e){return t.cycle(e)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this,e=function(e){t._pointerEvent&&tt[e.pointerType.toUpperCase()]?t.touchStartX=e.clientX:t._pointerEvent||(t.touchStartX=e.touches[0].clientX)},n=function(e){t._pointerEvent&&tt[e.pointerType.toUpperCase()]&&(t.touchDeltaX=e.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};V.find(".carousel-item img",this._element).forEach((function(t){Q.on(t,"dragstart.bs.carousel",(function(t){return t.preventDefault()}))})),this._pointerEvent?(Q.on(this._element,"pointerdown.bs.carousel",(function(t){return e(t)})),Q.on(this._element,"pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(Q.on(this._element,"touchstart.bs.carousel",(function(t){return e(t)})),Q.on(this._element,"touchmove.bs.carousel",(function(e){return function(e){e.touches&&e.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.touches[0].clientX-t.touchStartX}(e)})),Q.on(this._element,"touchend.bs.carousel",(function(t){return n(t)})))},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?V.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(V.findOne(".active.carousel-item",this._element));return Q.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n})},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){for(var e=V.find(".active",this._indicatorsElement),n=0;n<e.length;n++)e[n].classList.remove("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&i.classList.add("active")}},n._updateInterval=function(){var t=this._activeElement||V.findOne(".active.carousel-item",this._element);if(t){var e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},n._slide=function(t,e){var n,i,o,s=this,r=V.findOne(".active.carousel-item",this._element),a=this._getItemIndex(r),l=e||r&&this._getItemByDirection(t,r),c=this._getItemIndex(l),u=Boolean(this._interval);if("next"===t?(n="carousel-item-start",i="carousel-item-next",o="left"):(n="carousel-item-end",i="carousel-item-prev",o="right"),l&&l.classList.contains("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(l,o).defaultPrevented&&r&&l){if(this._isSliding=!0,u&&this.pause(),this._setActiveIndicatorElement(l),this._activeElement=l,this._element.classList.contains("slide")){l.classList.add(i),y(l),r.classList.add(n),l.classList.add(n);var d=h(r);Q.one(r,"transitionend",(function(){l.classList.remove(n,i),l.classList.add("active"),r.classList.remove("active",i,n),s._isSliding=!1,setTimeout((function(){Q.trigger(s._element,"slid.bs.carousel",{relatedTarget:l,direction:o,from:a,to:c})}),0)})),m(r,d)}else r.classList.remove("active"),l.classList.add("active"),this._isSliding=!1,Q.trigger(this._element,"slid.bs.carousel",{relatedTarget:l,direction:o,from:a,to:c});u&&this.cycle()}},e.carouselInterface=function(t,n){var i=L(t,"bs.carousel"),o=s({},Z,q.getDataAttributes(t));"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new e(t,o)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())},e.jQueryInterface=function(t){return this.each((function(){e.carouselInterface(this,t)}))},e.dataApiClickHandler=function(t){var n=f(this);if(n&&n.classList.contains("carousel")){var i=s({},q.getDataAttributes(n),q.getDataAttributes(this)),o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),e.carouselInterface(n,i),o&&L(n,"bs.carousel").to(o),t.preventDefault()}},o(e,null,[{key:"Default",get:function(){return Z}},{key:"DATA_KEY",get:function(){return"bs.carousel"}}]),e}(U);Q.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",et.dataApiClickHandler),Q.on(window,"load.bs.carousel.data-api",(function(){for(var t=V.find('[data-bs-ride="carousel"]'),e=0,n=t.length;e<n;e++)et.carouselInterface(t[e],L(t[e],"bs.carousel"))})),E((function(){var t=w();if(t){var e=t.fn[$];t.fn[$]=et.jQueryInterface,t.fn[$].Constructor=et,t.fn[$].noConflict=function(){return t.fn[$]=e,et.jQueryInterface}}}));var nt="collapse",it={toggle:!0,parent:""},ot={toggle:"boolean",parent:"(string|element)"},st=function(t){function e(e,n){var i;(i=t.call(this,e)||this)._isTransitioning=!1,i._config=i._getConfig(n),i._triggerArray=V.find('[data-bs-toggle="collapse"][href="#'+e.id+'"],[data-bs-toggle="collapse"][data-bs-target="#'+e.id+'"]');for(var o=V.find('[data-bs-toggle="collapse"]'),s=0,r=o.length;s<r;s++){var a=o[s],l=d(a),c=V.find(l).filter((function(t){return t===e}));null!==l&&c.length&&(i._selector=l,i._triggerArray.push(a))}return i._parent=i._config.parent?i._getParent():null,i._config.parent||i._addAriaAndCollapsedClass(i._element,i._triggerArray),i._config.toggle&&i.toggle(),i}r(e,t);var n=e.prototype;return n.toggle=function(){this._element.classList.contains("show")?this.hide():this.show()},n.show=function(){var t=this;if(!this._isTransitioning&&!this._element.classList.contains("show")){var n,i;this._parent&&0===(n=V.find(".show, .collapsing",this._parent).filter((function(e){return"string"==typeof t._config.parent?e.getAttribute("data-bs-parent")===t._config.parent:e.classList.contains("collapse")}))).length&&(n=null);var o=V.findOne(this._selector);if(n){var s=n.find((function(t){return o!==t}));if((i=s?L(s,"bs.collapse"):null)&&i._isTransitioning)return}if(!Q.trigger(this._element,"show.bs.collapse").defaultPrevented){n&&n.forEach((function(t){o!==t&&e.collapseInterface(t,"hide"),i||A(t,"bs.collapse",null)}));var r=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[r]=0,this._triggerArray.length&&this._triggerArray.forEach((function(t){t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=h(this._element);Q.one(this._element,"transitionend",(function(){t._element.classList.remove("collapsing"),t._element.classList.add("collapse","show"),t._element.style[r]="",t.setTransitioning(!1),Q.trigger(t._element,"shown.bs.collapse")})),m(this._element,l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&this._element.classList.contains("show")&&!Q.trigger(this._element,"hide.bs.collapse").defaultPrevented){var e=this._getDimension();this._element.style[e]=this._element.getBoundingClientRect()[e]+"px",y(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");var n=this._triggerArray.length;if(n>0)for(var i=0;i<n;i++){var o=this._triggerArray[i],s=f(o);s&&!s.classList.contains("show")&&(o.classList.add("collapsed"),o.setAttribute("aria-expanded",!1))}this.setTransitioning(!0);this._element.style[e]="";var r=h(this._element);Q.one(this._element,"transitionend",(function(){t.setTransitioning(!1),t._element.classList.remove("collapsing"),t._element.classList.add("collapse"),Q.trigger(t._element,"hidden.bs.collapse")})),m(this._element,r)}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){t.prototype.dispose.call(this),this._config=null,this._parent=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},it,t)).toggle=Boolean(t.toggle),_(nt,t,ot),t},n._getDimension=function(){return this._element.classList.contains("width")?"width":"height"},n._getParent=function(){var t=this,e=this._config.parent;g(e)?void 0===e.jquery&&void 0===e[0]||(e=e[0]):e=V.findOne(e);var n='[data-bs-toggle="collapse"][data-bs-parent="'+e+'"]';return V.find(n,e).forEach((function(e){var n=f(e);t._addAriaAndCollapsedClass(n,[e])})),e},n._addAriaAndCollapsedClass=function(t,e){if(t&&e.length){var n=t.classList.contains("show");e.forEach((function(t){n?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",n)}))}},e.collapseInterface=function(t,n){var i=L(t,"bs.collapse"),o=s({},it,q.getDataAttributes(t),"object"==typeof n&&n?n:{});if(!i&&o.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(o.toggle=!1),i||(i=new e(t,o)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}},e.jQueryInterface=function(t){return this.each((function(){e.collapseInterface(this,t)}))},o(e,null,[{key:"Default",get:function(){return it}},{key:"DATA_KEY",get:function(){return"bs.collapse"}}]),e}(U);Q.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){"A"===t.target.tagName&&t.preventDefault();var e=q.getDataAttributes(this),n=d(this);V.find(n).forEach((function(t){var n,i=L(t,"bs.collapse");i?(null===i._parent&&"string"==typeof e.parent&&(i._config.parent=e.parent,i._parent=i._getParent()),n="toggle"):n=e,st.collapseInterface(t,n)}))})),E((function(){var t=w();if(t){var e=t.fn[nt];t.fn[nt]=st.jQueryInterface,t.fn[nt].Constructor=st,t.fn[nt].noConflict=function(){return t.fn[nt]=e,st.jQueryInterface}}}));var rt="dropdown",at=new RegExp("ArrowUp|ArrowDown|Escape"),lt=T?"top-end":"top-start",ct=T?"top-start":"top-end",ut=T?"bottom-end":"bottom-start",dt=T?"bottom-start":"bottom-end",ft=T?"left-start":"right-start",ht=T?"right-start":"left-start",pt={offset:0,flip:!0,boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null},gt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},mt=function(e){function i(t,n){var i;return(i=e.call(this,t)||this)._popper=null,i._config=i._getConfig(n),i._menu=i._getMenuElement(),i._inNavbar=i._detectNavbar(),i._addEventListeners(),i}r(i,e);var a=i.prototype;return a.toggle=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")){var t=this._element.classList.contains("show");i.clearMenus(),t||this.show()}},a.show=function(){if(!(this._element.disabled||this._element.classList.contains("disabled")||this._menu.classList.contains("show"))){var e=i.getParentFromElement(this._element),o={relatedTarget:this._element};if(!Q.trigger(this._element,"show.bs.dropdown",o).defaultPrevented){if(!this._inNavbar){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=e:g(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),this._popper=t.createPopper(s,this._menu,this._getPopperConfig())}var r;if("ontouchstart"in document.documentElement&&!e.closest(".navbar-nav"))(r=[]).concat.apply(r,document.body.children).forEach((function(t){return Q.on(t,"mouseover",null,(function(){}))}));this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),Q.trigger(e,"shown.bs.dropdown",o)}}},a.hide=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")&&this._menu.classList.contains("show")){var t=i.getParentFromElement(this._element),e={relatedTarget:this._element};Q.trigger(t,"hide.bs.dropdown",e).defaultPrevented||(this._popper&&this._popper.destroy(),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),Q.trigger(t,"hidden.bs.dropdown",e))}},a.dispose=function(){e.prototype.dispose.call(this),Q.off(this._element,".bs.dropdown"),this._menu=null,this._popper&&(this._popper.destroy(),this._popper=null)},a.update=function(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()},a._addEventListeners=function(){var t=this;Q.on(this._element,"click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},a._getConfig=function(t){return t=s({},this.constructor.Default,q.getDataAttributes(this._element),t),_(rt,t,this.constructor.DefaultType),t},a._getMenuElement=function(){return V.next(this._element,".dropdown-menu")[0]},a._getPlacement=function(){var t=this._element.parentNode;if(t.classList.contains("dropend"))return ft;if(t.classList.contains("dropstart"))return ht;var e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ct:lt:e?dt:ut},a._detectNavbar=function(){return null!==this._element.closest(".navbar")},a._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{altBoundary:this._config.flip,rootBoundary:this._config.boundary}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),s({},t,this._config.popperConfig)},i.dropdownInterface=function(t,e){var n=L(t,"bs.dropdown");if(n||(n=new i(t,"object"==typeof e?e:null)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}},i.jQueryInterface=function(t){return this.each((function(){i.dropdownInterface(this,t)}))},i.clearMenus=function(t){if(!t||2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(var e=V.find('[data-bs-toggle="dropdown"]'),n=0,o=e.length;n<o;n++){var s=i.getParentFromElement(e[n]),r=L(e[n],"bs.dropdown"),a={relatedTarget:e[n]};if(t&&"click"===t.type&&(a.clickEvent=t),r){var l=r._menu;if(e[n].classList.contains("show"))if(!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&"Tab"===t.key)&&l.contains(t.target)))if(!Q.trigger(s,"hide.bs.dropdown",a).defaultPrevented){var c;if("ontouchstart"in document.documentElement)(c=[]).concat.apply(c,document.body.children).forEach((function(t){return Q.off(t,"mouseover",null,(function(){}))}));e[n].setAttribute("aria-expanded","false"),r._popper&&r._popper.destroy(),l.classList.remove("show"),e[n].classList.remove("show"),Q.trigger(s,"hidden.bs.dropdown",a)}}}},i.getParentFromElement=function(t){return f(t)||t.parentNode},i.dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!at.test(t.key))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.classList.contains("disabled"))){var e=i.getParentFromElement(this),n=this.classList.contains("show");if("Escape"===t.key)return(this.matches('[data-bs-toggle="dropdown"]')?this:V.prev(this,'[data-bs-toggle="dropdown"]')[0]).focus(),void i.clearMenus();if(n&&"Space"!==t.key){var o=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",e).filter(v);if(o.length){var s=o.indexOf(t.target);"ArrowUp"===t.key&&s>0&&s--,"ArrowDown"===t.key&&s<o.length-1&&s++,o[s=-1===s?0:s].focus()}}else i.clearMenus()}},o(i,null,[{key:"Default",get:function(){return pt}},{key:"DefaultType",get:function(){return gt}},{key:"DATA_KEY",get:function(){return"bs.dropdown"}}]),i}(U);Q.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',mt.dataApiKeydownHandler),Q.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",mt.dataApiKeydownHandler),Q.on(document,"click.bs.dropdown.data-api",mt.clearMenus),Q.on(document,"keyup.bs.dropdown.data-api",mt.clearMenus),Q.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),mt.dropdownInterface(this,"toggle")})),Q.on(document,"click.bs.dropdown.data-api",".dropdown form",(function(t){return t.stopPropagation()})),E((function(){var t=w();if(t){var e=t.fn[rt];t.fn[rt]=mt.jQueryInterface,t.fn[rt].Constructor=mt,t.fn[rt].noConflict=function(){return t.fn[rt]=e,mt.jQueryInterface}}}));var _t={backdrop:!0,keyboard:!0,focus:!0},vt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},bt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._dialog=V.findOne(".modal-dialog",e),i._backdrop=null,i._isShown=!1,i._isBodyOverflowing=!1,i._ignoreBackdropClick=!1,i._isTransitioning=!1,i._scrollbarWidth=0,i}r(e,t);var n=e.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){this._element.classList.contains("fade")&&(this._isTransitioning=!0);var n=Q.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||n.defaultPrevented||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),Q.on(this._element,"click.dismiss.bs.modal",'[data-bs-dismiss="modal"]',(function(t){return e.hide(t)})),Q.on(this._dialog,"mousedown.dismiss.bs.modal",(function(){Q.one(e._element,"mouseup.dismiss.bs.modal",(function(t){t.target===e._element&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},n.hide=function(t){var e=this;if((t&&t.preventDefault(),this._isShown&&!this._isTransitioning)&&!Q.trigger(this._element,"hide.bs.modal").defaultPrevented){this._isShown=!1;var n=this._element.classList.contains("fade");if(n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),Q.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),Q.off(this._element,"click.dismiss.bs.modal"),Q.off(this._dialog,"mousedown.dismiss.bs.modal"),n){var i=h(this._element);Q.one(this._element,"transitionend",(function(t){return e._hideModal(t)})),m(this._element,i)}else this._hideModal()}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return Q.off(t,".bs.modal")})),t.prototype.dispose.call(this),Q.off(document,"focusin.bs.modal"),this._config=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},_t,t),_("modal",t,vt),t},n._showElement=function(t){var e=this,n=this._element.classList.contains("fade"),i=V.findOne(".modal-body",this._dialog);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.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),n&&y(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus();var o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,Q.trigger(e._element,"shown.bs.modal",{relatedTarget:t})};if(n){var s=h(this._dialog);Q.one(this._dialog,"transitionend",o),m(this._dialog,s)}else o()},n._enforceFocus=function(){var t=this;Q.off(document,"focusin.bs.modal"),Q.on(document,"focusin.bs.modal",(function(e){document===e.target||t._element===e.target||t._element.contains(e.target)||t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?Q.on(this._element,"keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&"Escape"===e.key?(e.preventDefault(),t.hide()):t._config.keyboard||"Escape"!==e.key||t._triggerBackdropTransition()})):Q.off(this._element,"keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?Q.on(window,"resize.bs.modal",(function(){return t._adjustDialog()})):Q.off(window,"resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){document.body.classList.remove("modal-open"),t._resetAdjustments(),t._resetScrollbar(),Q.trigger(t._element,"hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop.parentNode.removeChild(this._backdrop),this._backdrop=null},n._showBackdrop=function(t){var e=this,n=this._element.classList.contains("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),document.body.appendChild(this._backdrop),Q.on(this._element,"click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&y(this._backdrop),this._backdrop.classList.add("show"),!n)return void t();var i=h(this._backdrop);Q.one(this._backdrop,"transitionend",t),m(this._backdrop,i)}else if(!this._isShown&&this._backdrop){this._backdrop.classList.remove("show");var o=function(){e._removeBackdrop(),t()};if(this._element.classList.contains("fade")){var s=h(this._backdrop);Q.one(this._backdrop,"transitionend",o),m(this._backdrop,s)}else o()}else t()},n._triggerBackdropTransition=function(){var t=this;if(!Q.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented){var e=this._element.scrollHeight>document.documentElement.clientHeight;e||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var n=h(this._dialog);Q.off(this._element,"transitionend"),Q.one(this._element,"transitionend",(function(){t._element.classList.remove("modal-static"),e||(Q.one(t._element,"transitionend",(function(){t._element.style.overflowY=""})),m(t._element,n))})),m(this._element,n),this._element.focus()}},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;(!this._isBodyOverflowing&&t&&!T||this._isBodyOverflowing&&!t&&T)&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),(this._isBodyOverflowing&&!t&&!T||!this._isBodyOverflowing&&t&&T)&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){V.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(e){var n=e.style.paddingRight,i=window.getComputedStyle(e)["padding-right"];q.setDataAttribute(e,"padding-right",n),e.style.paddingRight=Number.parseFloat(i)+t._scrollbarWidth+"px"})),V.find(".sticky-top").forEach((function(e){var n=e.style.marginRight,i=window.getComputedStyle(e)["margin-right"];q.setDataAttribute(e,"margin-right",n),e.style.marginRight=Number.parseFloat(i)-t._scrollbarWidth+"px"}));var e=document.body.style.paddingRight,n=window.getComputedStyle(document.body)["padding-right"];q.setDataAttribute(document.body,"padding-right",e),document.body.style.paddingRight=Number.parseFloat(n)+this._scrollbarWidth+"px"}document.body.classList.add("modal-open")},n._resetScrollbar=function(){V.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(t){var e=q.getDataAttribute(t,"padding-right");void 0!==e&&(q.removeDataAttribute(t,"padding-right"),t.style.paddingRight=e)})),V.find(".sticky-top").forEach((function(t){var e=q.getDataAttribute(t,"margin-right");void 0!==e&&(q.removeDataAttribute(t,"margin-right"),t.style.marginRight=e)}));var t=q.getDataAttribute(document.body,"padding-right");void 0===t?document.body.style.paddingRight="":(q.removeDataAttribute(document.body,"padding-right"),document.body.style.paddingRight=t)},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},e.jQueryInterface=function(t,n){return this.each((function(){var i=L(this,"bs.modal"),o=s({},_t,q.getDataAttributes(this),"object"==typeof t&&t?t:{});if(i||(i=new e(this,o)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t](n)}}))},o(e,null,[{key:"Default",get:function(){return _t}},{key:"DATA_KEY",get:function(){return"bs.modal"}}]),e}(U);Q.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){var e=this,n=f(this);"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault(),Q.one(n,"show.bs.modal",(function(t){t.defaultPrevented||Q.one(n,"hidden.bs.modal",(function(){v(e)&&e.focus()}))}));var i=L(n,"bs.modal");if(!i){var o=s({},q.getDataAttributes(n),q.getDataAttributes(this));i=new bt(n,o)}i.show(this)})),E((function(){var t=w();if(t){var e=t.fn.modal;t.fn.modal=bt.jQueryInterface,t.fn.modal.Constructor=bt,t.fn.modal.noConflict=function(){return t.fn.modal=e,bt.jQueryInterface}}}));var yt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),wt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Et=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Tt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function kt(t,e,n){var i;if(!t.length)return t;if(n&&"function"==typeof n)return n(t);for(var o=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),r=(i=[]).concat.apply(i,o.body.querySelectorAll("*")),a=function(t,n){var i,o=r[t],a=o.nodeName.toLowerCase();if(!s.includes(a))return o.parentNode.removeChild(o),"continue";var l=(i=[]).concat.apply(i,o.attributes),c=[].concat(e["*"]||[],e[a]||[]);l.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(e.includes(n))return!yt.has(n)||Boolean(t.nodeValue.match(wt)||t.nodeValue.match(Et));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,c)||o.removeAttribute(t.nodeName)}))},l=0,c=r.length;l<c;l++)a(l);return o.body.innerHTML}var At="tooltip",Lt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Ct=new Set(["sanitize","allowList","sanitizeFn"]),Dt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",container:"(string|element|boolean)",fallbackPlacements:"(null|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object)"},St={AUTO:"auto",TOP:"top",RIGHT:T?"left":"right",BOTTOM:"bottom",LEFT:T?"right":"left"},Nt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",container:!1,fallbackPlacements:null,boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Tt,popperConfig:null},Ot={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},It=function(e){function i(t,i){var o;if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");return(o=e.call(this,t)||this)._isEnabled=!0,o._timeout=0,o._hoverState="",o._activeTrigger={},o._popper=null,o.config=o._getConfig(i),o.tip=null,o._setListeners(),o}r(i,e);var a=i.prototype;return a.enable=function(){this._isEnabled=!0},a.disable=function(){this._isEnabled=!1},a.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=L(t.delegateTarget,e);n||(n=new this.constructor(t.delegateTarget,this._getDelegateConfig()),A(t.delegateTarget,e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}},a.dispose=function(){clearTimeout(this._timeout),Q.off(this._element,this.constructor.EVENT_KEY),Q.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.config=null,this.tip=null,e.prototype.dispose.call(this)},a.show=function(){var e=this;if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){var n=Q.trigger(this._element,this.constructor.Event.SHOW),i=function t(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var n=e.getRootNode();return n instanceof ShadowRoot?n:null}return e instanceof ShadowRoot?e:e.parentNode?t(e.parentNode):null}(this._element),o=null===i?this._element.ownerDocument.documentElement.contains(this._element):i.contains(this._element);if(n.defaultPrevented||!o)return;var s=this.getTipElement(),r=c(this.constructor.NAME);s.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&s.classList.add("fade");var a="function"==typeof this.config.placement?this.config.placement.call(this,s,this._element):this.config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);var u=this._getContainer();A(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||u.appendChild(s),Q.trigger(this._element,this.constructor.Event.INSERTED),this._popper=t.createPopper(this._element,s,this._getPopperConfig(l)),s.classList.add("show");var d,f,p="function"==typeof this.config.customClass?this.config.customClass():this.config.customClass;if(p)(d=s.classList).add.apply(d,p.split(" "));if("ontouchstart"in document.documentElement)(f=[]).concat.apply(f,document.body.children).forEach((function(t){Q.on(t,"mouseover",(function(){}))}));var g=function(){var t=e._hoverState;e._hoverState=null,Q.trigger(e._element,e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};if(this.tip.classList.contains("fade")){var _=h(this.tip);Q.one(this.tip,"transitionend",g),m(this.tip,_)}else g()}},a.hide=function(){var t=this;if(this._popper){var e=this.getTipElement(),n=function(){"show"!==t._hoverState&&e.parentNode&&e.parentNode.removeChild(e),t._cleanTipClass(),t._element.removeAttribute("aria-describedby"),Q.trigger(t._element,t.constructor.Event.HIDDEN),t._popper&&(t._popper.destroy(),t._popper=null)};if(!Q.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented){var i;if(e.classList.remove("show"),"ontouchstart"in document.documentElement)(i=[]).concat.apply(i,document.body.children).forEach((function(t){return Q.off(t,"mouseover",b)}));if(this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){var o=h(e);Q.one(e,"transitionend",n),m(e,o)}else n();this._hoverState=""}}},a.update=function(){null!==this._popper&&this._popper.update()},a.isWithContent=function(){return Boolean(this.getTitle())},a.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},a.setContent=function(){var t=this.getTipElement();this.setElementContent(V.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")},a.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&g(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=kt(e,this.config.allowList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},a.getTitle=function(){var t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this._element):this.config.title),t},a.updateAttachment=function(t){return"right"===t?"end":"left"===t?"start":t},a._getPopperConfig=function(t){var e=this,n={name:"flip",options:{altBoundary:!0}};return this.config.fallbackPlacements&&(n.options.fallbackPlacements=this.config.fallbackPlacements),s({},{placement:t,modifiers:[n,{name:"preventOverflow",options:{rootBoundary:this.config.boundary}},{name:"arrow",options:{element:"."+this.constructor.NAME+"-arrow"}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:function(t){return e._handlePopperPlacementChange(t)}}],onFirstUpdate:function(t){t.options.placement!==t.placement&&e._handlePopperPlacementChange(t)}},this.config.popperConfig)},a._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-tooltip-"+this.updateAttachment(t))},a._getContainer=function(){return!1===this.config.container?document.body:g(this.config.container)?this.config.container:V.findOne(this.config.container)},a._getAttachment=function(t){return St[t.toUpperCase()]},a._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)Q.on(t._element,t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;Q.on(t._element,n,t.config.selector,(function(e){return t._enter(e)})),Q.on(t._element,i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t._element&&t.hide()},Q.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a._fixTitle=function(){var t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))},a._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||L(t.delegateTarget,n))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),A(t.delegateTarget,n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},a._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||L(t.delegateTarget,n))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),A(t.delegateTarget,n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},a._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a._getConfig=function(t){var e=q.getDataAttributes(this._element);return Object.keys(e).forEach((function(t){Ct.has(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=s({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_(At,t,this.constructor.DefaultType),t.sanitize&&(t.template=kt(t.template,t.allowList,t.sanitizeFn)),t},a._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},a._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Lt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},a._handlePopperPlacementChange=function(t){var e=t.state;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))},i.jQueryInterface=function(t){return this.each((function(){var e=L(this,"bs.tooltip"),n="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},o(i,null,[{key:"Default",get:function(){return Nt}},{key:"NAME",get:function(){return At}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Ot}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Dt}}]),i}(U);E((function(){var t=w();if(t){var e=t.fn[At];t.fn[At]=It.jQueryInterface,t.fn[At].Constructor=It,t.fn[At].noConflict=function(){return t.fn[At]=e,It.jQueryInterface}}}));var jt="popover",Pt=new RegExp("(^|\\s)bs-popover\\S+","g"),xt=s({},It.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ht=s({},It.DefaultType,{content:"(string|element|function)"}),Bt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Mt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.setContent=function(){var t=this.getTipElement();this.setElementContent(V.findOne(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(V.findOne(".popover-body",t),e),t.classList.remove("fade","show")},n._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-popover-"+this.updateAttachment(t))},n._getContent=function(){return this._element.getAttribute("data-bs-content")||this.config.content},n._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Pt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,i),A(this,"bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return xt}},{key:"NAME",get:function(){return jt}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Bt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Ht}}]),e}(It);E((function(){var t=w();if(t){var e=t.fn[jt];t.fn[jt]=Mt.jQueryInterface,t.fn[jt].Constructor=Mt,t.fn[jt].noConflict=function(){return t.fn[jt]=e,Mt.jQueryInterface}}}));var Rt="scrollspy",Kt={offset:10,method:"auto",target:""},Qt={offset:"number",method:"string",target:"(string|element)"},Ut=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._scrollElement="BODY"===e.tagName?window:e,i._config=i._getConfig(n),i._selector=i._config.target+" .nav-link, "+i._config.target+" .list-group-item, "+i._config.target+" .dropdown-item",i._offsets=[],i._targets=[],i._activeTarget=null,i._scrollHeight=0,Q.on(i._scrollElement,"scroll.bs.scrollspy",(function(t){return i._process(t)})),i.refresh(),i._process(),i}r(e,t);var n=e.prototype;return n.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),V.find(this._selector).map((function(t){var e=d(t),o=e?V.findOne(e):null;if(o){var s=o.getBoundingClientRect();if(s.width||s.height)return[q[n](o).top+i,e]}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.dispose=function(){t.prototype.dispose.call(this),Q.off(this._scrollElement,".bs.scrollspy"),this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},Kt,"object"==typeof t&&t?t:{})).target&&g(t.target)){var e=t.target.id;e||(e=c(Rt),t.target.id=e),t.target="#"+e}return _(Rt,t,Qt),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._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]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-bs-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=V.findOne(e.join(","));n.classList.contains("dropdown-item")?(V.findOne(".dropdown-toggle",n.closest(".dropdown")).classList.add("active"),n.classList.add("active")):(n.classList.add("active"),V.parents(n,".nav, .list-group").forEach((function(t){V.prev(t,".nav-link, .list-group-item").forEach((function(t){return t.classList.add("active")})),V.prev(t,".nav-item").forEach((function(t){V.children(t,".nav-link").forEach((function(t){return t.classList.add("active")}))}))}))),Q.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){V.find(this._selector).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.scrollspy");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return Kt}},{key:"DATA_KEY",get:function(){return"bs.scrollspy"}}]),e}(U);Q.on(window,"load.bs.scrollspy.data-api",(function(){V.find('[data-bs-spy="scroll"]').forEach((function(t){return new Ut(t,q.getDataAttributes(t))}))})),E((function(){var t=w();if(t){var e=t.fn[Rt];t.fn[Rt]=Ut.jQueryInterface,t.fn[Rt].Constructor=Ut,t.fn[Rt].noConflict=function(){return t.fn[Rt]=e,Ut.jQueryInterface}}}));var Wt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active")||this._element.classList.contains("disabled"))){var e,n=f(this._element),i=this._element.closest(".nav, .list-group");if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?":scope > li > .active":".active";e=(e=V.find(o,i))[e.length-1]}var s=null;if(e&&(s=Q.trigger(e,"hide.bs.tab",{relatedTarget:this._element})),!(Q.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)){this._activate(this._element,i);var r=function(){Q.trigger(e,"hidden.bs.tab",{relatedTarget:t._element}),Q.trigger(t._element,"shown.bs.tab",{relatedTarget:e})};n?this._activate(n,n.parentNode,r):r()}}},n._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V.children(e,".active"):V.find(":scope > li > .active",e))[0],s=n&&o&&o.classList.contains("fade"),r=function(){return i._transitionComplete(t,o,n)};if(o&&s){var a=h(o);o.classList.remove("show"),Q.one(o,"transitionend",r),m(o,a)}else r()},n._transitionComplete=function(t,e,n){if(e){e.classList.remove("active");var i=V.findOne(":scope > .dropdown-menu .active",e.parentNode);i&&i.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}(t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),y(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu"))&&(t.closest(".dropdown")&&V.find(".dropdown-toggle").forEach((function(t){return t.classList.add("active")})),t.setAttribute("aria-expanded",!0));n&&n()},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.tab")||new e(this);if("string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.tab"}}]),e}(U);Q.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){t.preventDefault(),(L(this,"bs.tab")||new Wt(this)).show()})),E((function(){var t=w();if(t){var e=t.fn.tab;t.fn.tab=Wt.jQueryInterface,t.fn.tab.Constructor=Wt,t.fn.tab.noConflict=function(){return t.fn.tab=e,Wt.jQueryInterface}}}));var Ft={animation:"boolean",autohide:"boolean",delay:"number"},Yt={animation:!0,autohide:!0,delay:5e3},zt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._timeout=null,i._setListeners(),i}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!Q.trigger(this._element,"show.bs.toast").defaultPrevented){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var e=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),Q.trigger(t._element,"shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),y(this._element),this._element.classList.add("showing"),this._config.animation){var n=h(this._element);Q.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.hide=function(){var t=this;if(this._element.classList.contains("show")&&!Q.trigger(this._element,"hide.bs.toast").defaultPrevented){var e=function(){t._element.classList.add("hide"),Q.trigger(t._element,"hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=h(this._element);Q.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),Q.off(this._element,"click.dismiss.bs.toast"),t.prototype.dispose.call(this),this._config=null},n._getConfig=function(t){return t=s({},Yt,q.getDataAttributes(this._element),"object"==typeof t&&t?t:{}),_("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;Q.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',(function(){return t.hide()}))},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.toast");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t](this)}}))},o(e,null,[{key:"DefaultType",get:function(){return Ft}},{key:"Default",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.toast"}}]),e}(U);return E((function(){var t=w();if(t){var e=t.fn.toast;t.fn.toast=zt.jQueryInterface,t.fn.toast.Constructor=zt,t.fn.toast.noConflict=function(){return t.fn.toast=e,zt.jQueryInterface}}})),{Alert:F,Button:Y,Carousel:et,Collapse:st,Dropdown:mt,Modal:bt,Popover:Mt,ScrollSpy:Ut,Tab:Wt,Toast:zt,Tooltip:It}})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n=e(t);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)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function r(t,e){var n,i;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n=t,i=e,(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(n,i)}var a,l,c=function(t){do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},u=function(t){var e=t.getAttribute("data-bs-target");if(!e||"#"===e){var n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#"+n.split("#")[1]),e=n&&"#"!==n?n.trim():null}return e},h=function(t){var e=u(t);return e&&document.querySelector(e)?e:null},d=function(t){var e=u(t);return e?document.querySelector(e):null},f=function(t){if(!t)return 0;var e=window.getComputedStyle(t),n=e.transitionDuration,i=e.transitionDelay,o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(i))):0},p=function(t){t.dispatchEvent(new Event("transitionend"))},g=function(t){return(t[0]||t).nodeType},m=function(t,e){var n=!1,i=e+5;t.addEventListener("transitionend",(function e(){n=!0,t.removeEventListener("transitionend",e)})),setTimeout((function(){n||p(t)}),i)},_=function(t,e,n){Object.keys(n).forEach((function(i){var o,s=n[i],r=e[i],a=r&&g(r)?"element":null==(o=r)?""+o:{}.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new TypeError(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+s+'".')}))},v=function(t){if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){var e=getComputedStyle(t),n=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==n.display&&"hidden"!==e.visibility}return!1},b=function(){return function(){}},y=function(t){return t.offsetHeight},w=function(){var t=window.jQuery;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},E="rtl"===document.documentElement.dir,T=function(t,e){var n;n=function(){var n=w();if(n){var i=n.fn[t];n.fn[t]=e.jQueryInterface,n.fn[t].Constructor=e,n.fn[t].noConflict=function(){return n.fn[t]=i,e.jQueryInterface}}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()},A=(a={},l=1,{set:function(t,e,n){void 0===t.bsKey&&(t.bsKey={key:e,id:l},l++),a[t.bsKey.id]=n},get:function(t,e){if(!t||void 0===t.bsKey)return null;var n=t.bsKey;return n.key===e?a[n.id]:null},delete:function(t,e){if(void 0!==t.bsKey){var n=t.bsKey;n.key===e&&(delete a[n.id],delete t.bsKey)}}}),k=function(t,e,n){A.set(t,e,n)},L=function(t,e){return A.get(t,e)},C=/[^.]*(?=\..*)\.|.*/,D=/\..*/,S=/::\d+$/,N={},O=1,I={mouseenter:"mouseover",mouseleave:"mouseout"},j=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function P(t,e){return e&&e+"::"+O++||t.uidEvent||O++}function x(t){var e=P(t);return t.uidEvent=e,N[e]=N[e]||{},N[e]}function H(t,e,n){void 0===n&&(n=null);for(var i=Object.keys(t),o=0,s=i.length;o<s;o++){var r=t[i[o]];if(r.originalHandler===e&&r.delegationSelector===n)return r}return null}function B(t,e,n){var i="string"==typeof e,o=i?n:e,s=t.replace(D,""),r=I[s];return r&&(s=r),j.has(s)||(s=t),[i,o,s]}function M(t,e,n,i,o){if("string"==typeof e&&t){n||(n=i,i=null);var s=B(e,n,i),r=s[0],a=s[1],l=s[2],c=x(t),u=c[l]||(c[l]={}),h=H(u,a,r?n:null);if(h)h.oneOff=h.oneOff&&o;else{var d=P(a,e.replace(C,"")),f=r?function(t,e,n){return function i(o){for(var s=t.querySelectorAll(e),r=o.target;r&&r!==this;r=r.parentNode)for(var a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&K.off(t,o.type,n),n.apply(r,[o]);return null}}(t,n,i):function(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&K.off(t,i.type,e),e.apply(t,[i])}}(t,n);f.delegationSelector=r?n:null,f.originalHandler=a,f.oneOff=o,f.uidEvent=d,u[d]=f,t.addEventListener(l,f,r)}}}function R(t,e,n,i,o){var s=H(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}var K={on:function(t,e,n,i){M(t,e,n,i,!1)},one:function(t,e,n,i){M(t,e,n,i,!0)},off:function(t,e,n,i){if("string"==typeof e&&t){var o=B(e,n,i),s=o[0],r=o[1],a=o[2],l=a!==e,c=x(t),u=e.startsWith(".");if(void 0===r){u&&Object.keys(c).forEach((function(n){!function(t,e,n,i){var o=e[n]||{};Object.keys(o).forEach((function(s){if(s.includes(i)){var r=o[s];R(t,e,n,r.originalHandler,r.delegationSelector)}}))}(t,c,n,e.slice(1))}));var h=c[a]||{};Object.keys(h).forEach((function(n){var i=n.replace(S,"");if(!l||e.includes(i)){var o=h[n];R(t,c,a,o.originalHandler,o.delegationSelector)}}))}else{if(!c||!c[a])return;R(t,c,a,r,s?n:null)}}},trigger:function(t,e,n){if("string"!=typeof e||!t)return null;var i,o=w(),s=e.replace(D,""),r=e!==s,a=j.has(s),l=!0,c=!0,u=!1,h=null;return r&&o&&(i=o.Event(e,n),o(t).trigger(i),l=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented()),a?(h=document.createEvent("HTMLEvents")).initEvent(s,l,!0):h=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((function(t){Object.defineProperty(h,t,{get:function(){return n[t]}})})),u&&h.preventDefault(),c&&t.dispatchEvent(h),h.defaultPrevented&&void 0!==i&&i.preventDefault(),h}},W=function(){function t(t){t&&(this._element=t,k(t,this.constructor.DATA_KEY,this))}return t.prototype.dispose=function(){var t,e;t=this._element,e=this.constructor.DATA_KEY,A.delete(t,e),this._element=null},t.getInstance=function(t){return L(t,this.DATA_KEY)},o(t,null,[{key:"VERSION",get:function(){return"5.0.0-beta2"}}]),t}(),U=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.close=function(t){var e=t?this._getRootElement(t):this._element,n=this._triggerCloseEvent(e);null===n||n.defaultPrevented||this._removeElement(e)},n._getRootElement=function(t){return d(t)||t.closest(".alert")},n._triggerCloseEvent=function(t){return K.trigger(t,"close.bs.alert")},n._removeElement=function(t){var e=this;if(t.classList.remove("show"),t.classList.contains("fade")){var n=f(t);K.one(t,"transitionend",(function(){return e._destroyElement(t)})),m(t,n)}else this._destroyElement(t)},n._destroyElement=function(t){t.parentNode&&t.parentNode.removeChild(t),K.trigger(t,"closed.bs.alert")},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.alert");n||(n=new e(this)),"close"===t&&n[t](this)}))},e.handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.alert"}}]),e}(W);K.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',U.handleDismiss(new U)),T("alert",U);var F=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.toggle=function(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.button");n||(n=new e(this)),"toggle"===t&&n[t]()}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.button"}}]),e}(W);function z(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function Y(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))}K.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',(function(t){t.preventDefault();var e=t.target.closest('[data-bs-toggle="button"]'),n=L(e,"bs.button");n||(n=new F(e)),n.toggle()})),T("button",F);var X={setDataAttribute:function(t,e,n){t.setAttribute("data-bs-"+Y(e),n)},removeDataAttribute:function(t,e){t.removeAttribute("data-bs-"+Y(e))},getDataAttributes:function(t){if(!t)return{};var e={};return Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")})).forEach((function(n){var i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[n])})),e},getDataAttribute:function(t,e){return z(t.getAttribute("data-bs-"+Y(e)))},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:function(t){return{top:t.offsetTop,left:t.offsetLeft}}},q=function(t,e){var n;return void 0===e&&(e=document.documentElement),(n=[]).concat.apply(n,Element.prototype.querySelectorAll.call(e,t))},Q=function(t,e){return void 0===e&&(e=document.documentElement),Element.prototype.querySelector.call(e,t)},V=function(t,e){var n;return(n=[]).concat.apply(n,t.children).filter((function(t){return t.matches(e)}))},$=function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Z={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},J=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._items=null,i._interval=null,i._activeElement=null,i._isPaused=!1,i._isSliding=!1,i.touchTimeout=null,i.touchStartX=0,i.touchDeltaX=0,i._config=i._getConfig(n),i._indicatorsElement=Q(".carousel-indicators",i._element),i._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,i._pointerEvent=Boolean(window.PointerEvent),i._addEventListeners(),i}r(e,t);var n=e.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&v(this._element)&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),Q(".carousel-item-next, .carousel-item-prev",this._element)&&(p(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var e=this;this._activeElement=Q(".active.carousel-item",this._element);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)K.one(this._element,"slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},n.dispose=function(){t.prototype.dispose.call(this),K.off(this._element,".bs.carousel"),this._items=null,this._config=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},G,t),_("carousel",t,Z),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&(E?this.next():this.prev()),e<0&&(E?this.prev():this.next())}},n._addEventListeners=function(){var t=this;this._config.keyboard&&K.on(this._element,"keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&(K.on(this._element,"mouseenter.bs.carousel",(function(e){return t.pause(e)})),K.on(this._element,"mouseleave.bs.carousel",(function(e){return t.cycle(e)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this,e=function(e){!t._pointerEvent||"pen"!==e.pointerType&&"touch"!==e.pointerType?t._pointerEvent||(t.touchStartX=e.touches[0].clientX):t.touchStartX=e.clientX},n=function(e){!t._pointerEvent||"pen"!==e.pointerType&&"touch"!==e.pointerType||(t.touchDeltaX=e.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};q(".carousel-item img",this._element).forEach((function(t){K.on(t,"dragstart.bs.carousel",(function(t){return t.preventDefault()}))})),this._pointerEvent?(K.on(this._element,"pointerdown.bs.carousel",(function(t){return e(t)})),K.on(this._element,"pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(K.on(this._element,"touchstart.bs.carousel",(function(t){return e(t)})),K.on(this._element,"touchmove.bs.carousel",(function(e){return function(e){e.touches&&e.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.touches[0].clientX-t.touchStartX}(e)})),K.on(this._element,"touchend.bs.carousel",(function(t){return n(t)})))},n._keydown=function(t){/input|textarea/i.test(t.target.tagName)||("ArrowLeft"===t.key?(t.preventDefault(),E?this.next():this.prev()):"ArrowRight"===t.key&&(t.preventDefault(),E?this.prev():this.next()))},n._getItemIndex=function(t){return this._items=t&&t.parentNode?q(".carousel-item",t.parentNode):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(Q(".active.carousel-item",this._element));return K.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n})},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=Q(".active",this._indicatorsElement);e.classList.remove("active"),e.removeAttribute("aria-current");for(var n=q("[data-bs-target]",this._indicatorsElement),i=0;i<n.length;i++)if(Number.parseInt(n[i].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){n[i].classList.add("active"),n[i].setAttribute("aria-current","true");break}}},n._updateInterval=function(){var t=this._activeElement||Q(".active.carousel-item",this._element);if(t){var e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},n._slide=function(t,e){var n=this,i=Q(".active.carousel-item",this._element),o=this._getItemIndex(i),s=e||i&&this._getItemByDirection(t,i),r=this._getItemIndex(s),a=Boolean(this._interval),l="next"===t?"carousel-item-start":"carousel-item-end",c="next"===t?"carousel-item-next":"carousel-item-prev",u="next"===t?"left":"right";if(s&&s.classList.contains("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(s,u).defaultPrevented&&i&&s){if(this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s),this._activeElement=s,this._element.classList.contains("slide")){s.classList.add(c),y(s),i.classList.add(l),s.classList.add(l);var h=f(i);K.one(i,"transitionend",(function(){s.classList.remove(l,c),s.classList.add("active"),i.classList.remove("active",c,l),n._isSliding=!1,setTimeout((function(){K.trigger(n._element,"slid.bs.carousel",{relatedTarget:s,direction:u,from:o,to:r})}),0)})),m(i,h)}else i.classList.remove("active"),s.classList.add("active"),this._isSliding=!1,K.trigger(this._element,"slid.bs.carousel",{relatedTarget:s,direction:u,from:o,to:r});a&&this.cycle()}},e.carouselInterface=function(t,n){var i=L(t,"bs.carousel"),o=s({},G,X.getDataAttributes(t));"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new e(t,o)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())},e.jQueryInterface=function(t){return this.each((function(){e.carouselInterface(this,t)}))},e.dataApiClickHandler=function(t){var n=d(this);if(n&&n.classList.contains("carousel")){var i=s({},X.getDataAttributes(n),X.getDataAttributes(this)),o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),e.carouselInterface(n,i),o&&L(n,"bs.carousel").to(o),t.preventDefault()}},o(e,null,[{key:"Default",get:function(){return G}},{key:"DATA_KEY",get:function(){return"bs.carousel"}}]),e}(W);K.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",J.dataApiClickHandler),K.on(window,"load.bs.carousel.data-api",(function(){for(var t=q('[data-bs-ride="carousel"]'),e=0,n=t.length;e<n;e++)J.carouselInterface(t[e],L(t[e],"bs.carousel"))})),T("carousel",J);var tt={toggle:!0,parent:""},et={toggle:"boolean",parent:"(string|element)"},nt=function(t){function e(e,n){var i;(i=t.call(this,e)||this)._isTransitioning=!1,i._config=i._getConfig(n),i._triggerArray=q('[data-bs-toggle="collapse"][href="#'+e.id+'"],[data-bs-toggle="collapse"][data-bs-target="#'+e.id+'"]');for(var o=q('[data-bs-toggle="collapse"]'),s=0,r=o.length;s<r;s++){var a=o[s],l=h(a),c=q(l).filter((function(t){return t===e}));null!==l&&c.length&&(i._selector=l,i._triggerArray.push(a))}return i._parent=i._config.parent?i._getParent():null,i._config.parent||i._addAriaAndCollapsedClass(i._element,i._triggerArray),i._config.toggle&&i.toggle(),i}r(e,t);var n=e.prototype;return n.toggle=function(){this._element.classList.contains("show")?this.hide():this.show()},n.show=function(){var t=this;if(!this._isTransitioning&&!this._element.classList.contains("show")){var n,i;this._parent&&0===(n=q(".show, .collapsing",this._parent).filter((function(e){return"string"==typeof t._config.parent?e.getAttribute("data-bs-parent")===t._config.parent:e.classList.contains("collapse")}))).length&&(n=null);var o=Q(this._selector);if(n){var s=n.find((function(t){return o!==t}));if((i=s?L(s,"bs.collapse"):null)&&i._isTransitioning)return}if(!K.trigger(this._element,"show.bs.collapse").defaultPrevented){n&&n.forEach((function(t){o!==t&&e.collapseInterface(t,"hide"),i||k(t,"bs.collapse",null)}));var r=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[r]=0,this._triggerArray.length&&this._triggerArray.forEach((function(t){t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=f(this._element);K.one(this._element,"transitionend",(function(){t._element.classList.remove("collapsing"),t._element.classList.add("collapse","show"),t._element.style[r]="",t.setTransitioning(!1),K.trigger(t._element,"shown.bs.collapse")})),m(this._element,l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&this._element.classList.contains("show")&&!K.trigger(this._element,"hide.bs.collapse").defaultPrevented){var e=this._getDimension();this._element.style[e]=this._element.getBoundingClientRect()[e]+"px",y(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");var n=this._triggerArray.length;if(n>0)for(var i=0;i<n;i++){var o=this._triggerArray[i],s=d(o);s&&!s.classList.contains("show")&&(o.classList.add("collapsed"),o.setAttribute("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[e]="";var r=f(this._element);K.one(this._element,"transitionend",(function(){t.setTransitioning(!1),t._element.classList.remove("collapsing"),t._element.classList.add("collapse"),K.trigger(t._element,"hidden.bs.collapse")})),m(this._element,r)}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){t.prototype.dispose.call(this),this._config=null,this._parent=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},tt,t)).toggle=Boolean(t.toggle),_("collapse",t,et),t},n._getDimension=function(){return this._element.classList.contains("width")?"width":"height"},n._getParent=function(){var t=this,e=this._config.parent;return g(e)?void 0===e.jquery&&void 0===e[0]||(e=e[0]):e=Q(e),q('[data-bs-toggle="collapse"][data-bs-parent="'+e+'"]',e).forEach((function(e){var n=d(e);t._addAriaAndCollapsedClass(n,[e])})),e},n._addAriaAndCollapsedClass=function(t,e){if(t&&e.length){var n=t.classList.contains("show");e.forEach((function(t){n?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",n)}))}},e.collapseInterface=function(t,n){var i=L(t,"bs.collapse"),o=s({},tt,X.getDataAttributes(t),"object"==typeof n&&n?n:{});if(!i&&o.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(o.toggle=!1),i||(i=new e(t,o)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}},e.jQueryInterface=function(t){return this.each((function(){e.collapseInterface(this,t)}))},o(e,null,[{key:"Default",get:function(){return tt}},{key:"DATA_KEY",get:function(){return"bs.collapse"}}]),e}(W);K.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();var e=X.getDataAttributes(this),n=h(this);q(n).forEach((function(t){var n,i=L(t,"bs.collapse");i?(null===i._parent&&"string"==typeof e.parent&&(i._config.parent=e.parent,i._parent=i._getParent()),n="toggle"):n=e,nt.collapseInterface(t,n)}))})),T("collapse",nt);var it=new RegExp("ArrowUp|ArrowDown|Escape"),ot=E?"top-end":"top-start",st=E?"top-start":"top-end",rt=E?"bottom-end":"bottom-start",at=E?"bottom-start":"bottom-end",lt=E?"left-start":"right-start",ct=E?"right-start":"left-start",ut={offset:[0,2],flip:!0,boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null},ht={offset:"(array|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)"},dt=function(e){function i(t,n){var i;return(i=e.call(this,t)||this)._popper=null,i._config=i._getConfig(n),i._menu=i._getMenuElement(),i._inNavbar=i._detectNavbar(),i._addEventListeners(),i}r(i,e);var a=i.prototype;return a.toggle=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")){var t=this._element.classList.contains("show");i.clearMenus(),t||this.show()}},a.show=function(){if(!(this._element.disabled||this._element.classList.contains("disabled")||this._menu.classList.contains("show"))){var e=i.getParentFromElement(this._element),o={relatedTarget:this._element};if(!K.trigger(this._element,"show.bs.dropdown",o).defaultPrevented){if(this._inNavbar)X.setDataAttribute(this._menu,"popper","none");else{if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=e:g(this._config.reference)?(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])):"object"==typeof this._config.reference&&(s=this._config.reference);var r=this._getPopperConfig(),a=r.modifiers.find((function(t){return"applyStyles"===t.name&&!1===t.enabled}));this._popper=t.createPopper(s,this._menu,r),a&&X.setDataAttribute(this._menu,"popper","static")}var l;"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&(l=[]).concat.apply(l,document.body.children).forEach((function(t){return K.on(t,"mouseover",null,(function(){}))})),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),K.trigger(this._element,"shown.bs.dropdown",o)}}},a.hide=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")&&this._menu.classList.contains("show")){var t={relatedTarget:this._element};K.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||(this._popper&&this._popper.destroy(),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),X.removeDataAttribute(this._menu,"popper"),K.trigger(this._element,"hidden.bs.dropdown",t))}},a.dispose=function(){e.prototype.dispose.call(this),K.off(this._element,".bs.dropdown"),this._menu=null,this._popper&&(this._popper.destroy(),this._popper=null)},a.update=function(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()},a._addEventListeners=function(){var t=this;K.on(this._element,"click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},a._getConfig=function(t){if(t=s({},this.constructor.Default,X.getDataAttributes(this._element),t),_("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!g(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t},a._getMenuElement=function(){return function(t,e){for(var n=t.nextElementSibling;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]}(this._element,".dropdown-menu")[0]},a._getPlacement=function(){var t=this._element.parentNode;if(t.classList.contains("dropend"))return lt;if(t.classList.contains("dropstart"))return ct;var e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?st:ot:e?at:rt},a._detectNavbar=function(){return null!==this._element.closest(".navbar")},a._getOffset=function(){var t=this,e=this._config.offset;return"string"==typeof e?e.split(",").map((function(t){return Number.parseInt(t,10)})):"function"==typeof e?function(n){return e(n,t._element)}:e},a._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{altBoundary:this._config.flip,boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),s({},t,"function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig)},i.dropdownInterface=function(t,e){var n=L(t,"bs.dropdown");if(n||(n=new i(t,"object"==typeof e?e:null)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}},i.jQueryInterface=function(t){return this.each((function(){i.dropdownInterface(this,t)}))},i.clearMenus=function(t){if(!t||2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(var e=q('[data-bs-toggle="dropdown"]'),n=0,i=e.length;n<i;n++){var o=L(e[n],"bs.dropdown"),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),o){var r,a=o._menu;if(e[n].classList.contains("show")&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&"Tab"===t.key)&&a.contains(t.target)||K.trigger(e[n],"hide.bs.dropdown",s).defaultPrevented))"ontouchstart"in document.documentElement&&(r=[]).concat.apply(r,document.body.children).forEach((function(t){return K.off(t,"mouseover",null,(function(){}))})),e[n].setAttribute("aria-expanded","false"),o._popper&&o._popper.destroy(),a.classList.remove("show"),e[n].classList.remove("show"),X.removeDataAttribute(a,"popper"),K.trigger(e[n],"hidden.bs.dropdown",s)}}},i.getParentFromElement=function(t){return d(t)||t.parentNode},i.dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!it.test(t.key))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.classList.contains("disabled"))){var e=i.getParentFromElement(this),n=this.classList.contains("show");if("Escape"===t.key)return(this.matches('[data-bs-toggle="dropdown"]')?this:$(this,'[data-bs-toggle="dropdown"]')[0]).focus(),void i.clearMenus();if(n||"ArrowUp"!==t.key&&"ArrowDown"!==t.key)if(n&&"Space"!==t.key){var o=q(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",e).filter(v);if(o.length){var s=o.indexOf(t.target);"ArrowUp"===t.key&&s>0&&s--,"ArrowDown"===t.key&&s<o.length-1&&s++,o[s=-1===s?0:s].focus()}}else i.clearMenus();else(this.matches('[data-bs-toggle="dropdown"]')?this:$(this,'[data-bs-toggle="dropdown"]')[0]).click()}},o(i,null,[{key:"Default",get:function(){return ut}},{key:"DefaultType",get:function(){return ht}},{key:"DATA_KEY",get:function(){return"bs.dropdown"}}]),i}(W);K.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',dt.dataApiKeydownHandler),K.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",dt.dataApiKeydownHandler),K.on(document,"click.bs.dropdown.data-api",dt.clearMenus),K.on(document,"keyup.bs.dropdown.data-api",dt.clearMenus),K.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),dt.dropdownInterface(this,"toggle")})),K.on(document,"click.bs.dropdown.data-api",".dropdown form",(function(t){return t.stopPropagation()})),T("dropdown",dt);var ft={backdrop:!0,keyboard:!0,focus:!0},pt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},gt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._dialog=Q(".modal-dialog",e),i._backdrop=null,i._isShown=!1,i._isBodyOverflowing=!1,i._ignoreBackdropClick=!1,i._isTransitioning=!1,i._scrollbarWidth=0,i}r(e,t);var n=e.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){this._element.classList.contains("fade")&&(this._isTransitioning=!0);var n=K.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||n.defaultPrevented||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),K.on(this._element,"click.dismiss.bs.modal",'[data-bs-dismiss="modal"]',(function(t){return e.hide(t)})),K.on(this._dialog,"mousedown.dismiss.bs.modal",(function(){K.one(e._element,"mouseup.dismiss.bs.modal",(function(t){t.target===e._element&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},n.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning&&!K.trigger(this._element,"hide.bs.modal").defaultPrevented){this._isShown=!1;var n=this._element.classList.contains("fade");if(n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),K.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),K.off(this._element,"click.dismiss.bs.modal"),K.off(this._dialog,"mousedown.dismiss.bs.modal"),n){var i=f(this._element);K.one(this._element,"transitionend",(function(t){return e._hideModal(t)})),m(this._element,i)}else this._hideModal()}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return K.off(t,".bs.modal")})),t.prototype.dispose.call(this),K.off(document,"focusin.bs.modal"),this._config=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},ft,t),_("modal",t,pt),t},n._showElement=function(t){var e=this,n=this._element.classList.contains("fade"),i=Q(".modal-body",this._dialog);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.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),n&&y(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus();var o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,K.trigger(e._element,"shown.bs.modal",{relatedTarget:t})};if(n){var s=f(this._dialog);K.one(this._dialog,"transitionend",o),m(this._dialog,s)}else o()},n._enforceFocus=function(){var t=this;K.off(document,"focusin.bs.modal"),K.on(document,"focusin.bs.modal",(function(e){document===e.target||t._element===e.target||t._element.contains(e.target)||t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?K.on(this._element,"keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&"Escape"===e.key?(e.preventDefault(),t.hide()):t._config.keyboard||"Escape"!==e.key||t._triggerBackdropTransition()})):K.off(this._element,"keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?K.on(window,"resize.bs.modal",(function(){return t._adjustDialog()})):K.off(window,"resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){document.body.classList.remove("modal-open"),t._resetAdjustments(),t._resetScrollbar(),K.trigger(t._element,"hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop.parentNode.removeChild(this._backdrop),this._backdrop=null},n._showBackdrop=function(t){var e=this,n=this._element.classList.contains("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),document.body.appendChild(this._backdrop),K.on(this._element,"click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&y(this._backdrop),this._backdrop.classList.add("show"),!n)return void t();var i=f(this._backdrop);K.one(this._backdrop,"transitionend",t),m(this._backdrop,i)}else if(!this._isShown&&this._backdrop){this._backdrop.classList.remove("show");var o=function(){e._removeBackdrop(),t()};if(this._element.classList.contains("fade")){var s=f(this._backdrop);K.one(this._backdrop,"transitionend",o),m(this._backdrop,s)}else o()}else t()},n._triggerBackdropTransition=function(){var t=this;if(!K.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented){var e=this._element.scrollHeight>document.documentElement.clientHeight;e||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var n=f(this._dialog);K.off(this._element,"transitionend"),K.one(this._element,"transitionend",(function(){t._element.classList.remove("modal-static"),e||(K.one(t._element,"transitionend",(function(){t._element.style.overflowY=""})),m(t._element,n))})),m(this._element,n),this._element.focus()}},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;(!this._isBodyOverflowing&&t&&!E||this._isBodyOverflowing&&!t&&E)&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),(this._isBodyOverflowing&&!t&&!E||!this._isBodyOverflowing&&t&&E)&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;this._isBodyOverflowing&&(this._setElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",(function(e){return e+t._scrollbarWidth})),this._setElementAttributes(".sticky-top","marginRight",(function(e){return e-t._scrollbarWidth})),this._setElementAttributes("body","paddingRight",(function(e){return e+t._scrollbarWidth}))),document.body.classList.add("modal-open")},n._setElementAttributes=function(t,e,n){q(t).forEach((function(t){var i=t.style[e],o=window.getComputedStyle(t)[e];X.setDataAttribute(t,e,i),t.style[e]=n(Number.parseFloat(o))+"px"}))},n._resetScrollbar=function(){this._resetElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),this._resetElementAttributes(".sticky-top","marginRight"),this._resetElementAttributes("body","paddingRight")},n._resetElementAttributes=function(t,e){q(t).forEach((function(t){var n=X.getDataAttribute(t,e);void 0===n&&t===document.body?t.style[e]="":(X.removeDataAttribute(t,e),t.style[e]=n)}))},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},e.jQueryInterface=function(t,n){return this.each((function(){var i=L(this,"bs.modal"),o=s({},ft,X.getDataAttributes(this),"object"==typeof t&&t?t:{});if(i||(i=new e(this,o)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t](n)}}))},o(e,null,[{key:"Default",get:function(){return ft}},{key:"DATA_KEY",get:function(){return"bs.modal"}}]),e}(W);K.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){var e=this,n=d(this);"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault(),K.one(n,"show.bs.modal",(function(t){t.defaultPrevented||K.one(n,"hidden.bs.modal",(function(){v(e)&&e.focus()}))}));var i=L(n,"bs.modal");if(!i){var o=s({},X.getDataAttributes(n),X.getDataAttributes(this));i=new gt(n,o)}i.toggle(this)})),T("modal",gt);var mt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),_t=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,vt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function bt(t,e,n){var i;if(!t.length)return t;if(n&&"function"==typeof n)return n(t);for(var o=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),r=(i=[]).concat.apply(i,o.body.querySelectorAll("*")),a=function(t,n){var i,o=r[t],a=o.nodeName.toLowerCase();if(!s.includes(a))return o.parentNode.removeChild(o),"continue";var l=(i=[]).concat.apply(i,o.attributes),c=[].concat(e["*"]||[],e[a]||[]);l.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(e.includes(n))return!mt.has(n)||Boolean(_t.test(t.nodeValue)||vt.test(t.nodeValue));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(i[o].test(n))return!0;return!1})(t,c)||o.removeAttribute(t.nodeName)}))},l=0,c=r.length;l<c;l++)a(l);return o.body.innerHTML}var yt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),wt=new Set(["sanitize","allowList","sanitizeFn"]),Et={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Tt={AUTO:"auto",TOP:"top",RIGHT:E?"left":"right",BOTTOM:"bottom",LEFT:E?"right":"left"},At={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},kt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Lt=function(e){function i(t,i){var o;if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");return(o=e.call(this,t)||this)._isEnabled=!0,o._timeout=0,o._hoverState="",o._activeTrigger={},o._popper=null,o.config=o._getConfig(i),o.tip=null,o._setListeners(),o}r(i,e);var a=i.prototype;return a.enable=function(){this._isEnabled=!0},a.disable=function(){this._isEnabled=!1},a.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.toggle=function(t){if(this._isEnabled)if(t){var e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}},a.dispose=function(){clearTimeout(this._timeout),K.off(this._element,this.constructor.EVENT_KEY),K.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.config=null,this.tip=null,e.prototype.dispose.call(this)},a.show=function(){var e=this;if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){var n=K.trigger(this._element,this.constructor.Event.SHOW),i=function t(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var n=e.getRootNode();return n instanceof ShadowRoot?n:null}return e instanceof ShadowRoot?e:e.parentNode?t(e.parentNode):null}(this._element),o=null===i?this._element.ownerDocument.documentElement.contains(this._element):i.contains(this._element);if(!n.defaultPrevented&&o){var s=this.getTipElement(),r=c(this.constructor.NAME);s.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&s.classList.add("fade");var a="function"==typeof this.config.placement?this.config.placement.call(this,s,this._element):this.config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);var u=this._getContainer();k(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||u.appendChild(s),K.trigger(this._element,this.constructor.Event.INSERTED),this._popper=t.createPopper(this._element,s,this._getPopperConfig(l)),s.classList.add("show");var h,d,p="function"==typeof this.config.customClass?this.config.customClass():this.config.customClass;p&&(h=s.classList).add.apply(h,p.split(" ")),"ontouchstart"in document.documentElement&&(d=[]).concat.apply(d,document.body.children).forEach((function(t){K.on(t,"mouseover",(function(){}))}));var g=function(){var t=e._hoverState;e._hoverState=null,K.trigger(e._element,e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};if(this.tip.classList.contains("fade")){var _=f(this.tip);K.one(this.tip,"transitionend",g),m(this.tip,_)}else g()}}},a.hide=function(){var t=this;if(this._popper){var e=this.getTipElement(),n=function(){"show"!==t._hoverState&&e.parentNode&&e.parentNode.removeChild(e),t._cleanTipClass(),t._element.removeAttribute("aria-describedby"),K.trigger(t._element,t.constructor.Event.HIDDEN),t._popper&&(t._popper.destroy(),t._popper=null)};if(!K.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented){var i;if(e.classList.remove("show"),"ontouchstart"in document.documentElement&&(i=[]).concat.apply(i,document.body.children).forEach((function(t){return K.off(t,"mouseover",b)})),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){var o=f(e);K.one(e,"transitionend",n),m(e,o)}else n();this._hoverState=""}}},a.update=function(){null!==this._popper&&this._popper.update()},a.isWithContent=function(){return Boolean(this.getTitle())},a.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},a.setContent=function(){var t=this.getTipElement();this.setElementContent(Q(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")},a.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&g(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=bt(e,this.config.allowList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},a.getTitle=function(){var t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this._element):this.config.title),t},a.updateAttachment=function(t){return"right"===t?"end":"left"===t?"start":t},a._initializeOnDelegatedTarget=function(t,e){var n=this.constructor.DATA_KEY;return(e=e||L(t.delegateTarget,n))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),k(t.delegateTarget,n,e)),e},a._getOffset=function(){var t=this,e=this.config.offset;return"string"==typeof e?e.split(",").map((function(t){return Number.parseInt(t,10)})):"function"==typeof e?function(n){return e(n,t._element)}:e},a._getPopperConfig=function(t){var e=this,n={placement:t,modifiers:[{name:"flip",options:{altBoundary:!0,fallbackPlacements:this.config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this.config.boundary}},{name:"arrow",options:{element:"."+this.constructor.NAME+"-arrow"}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:function(t){return e._handlePopperPlacementChange(t)}}],onFirstUpdate:function(t){t.options.placement!==t.placement&&e._handlePopperPlacementChange(t)}};return s({},n,"function"==typeof this.config.popperConfig?this.config.popperConfig(n):this.config.popperConfig)},a._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-tooltip-"+this.updateAttachment(t))},a._getContainer=function(){return!1===this.config.container?document.body:g(this.config.container)?this.config.container:Q(this.config.container)},a._getAttachment=function(t){return Tt[t.toUpperCase()]},a._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)K.on(t._element,t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;K.on(t._element,n,t.config.selector,(function(e){return t._enter(e)})),K.on(t._element,i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t._element&&t.hide()},K.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a._fixTitle=function(){var t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))},a._enter=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},a._leave=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},a._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a._getConfig=function(t){var e=X.getDataAttributes(this._element);return Object.keys(e).forEach((function(t){wt.has(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=s({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=bt(t.template,t.allowList,t.sanitizeFn)),t},a._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},a._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(yt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},a._handlePopperPlacementChange=function(t){var e=t.state;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))},i.jQueryInterface=function(t){return this.each((function(){var e=L(this,"bs.tooltip"),n="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},o(i,null,[{key:"Default",get:function(){return At}},{key:"NAME",get:function(){return"tooltip"}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return kt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Et}}]),i}(W);T("tooltip",Lt);var Ct=new RegExp("(^|\\s)bs-popover\\S+","g"),Dt=s({},Lt.Default,{placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),St=s({},Lt.DefaultType,{content:"(string|element|function)"}),Nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Ot=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.setContent=function(){var t=this.getTipElement();this.setElementContent(Q(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(Q(".popover-body",t),e),t.classList.remove("fade","show")},n._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-popover-"+this.updateAttachment(t))},n._getContent=function(){return this._element.getAttribute("data-bs-content")||this.config.content},n._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Ct);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,i),k(this,"bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return Dt}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return St}}]),e}(Lt);T("popover",Ot);var It={offset:10,method:"auto",target:""},jt={offset:"number",method:"string",target:"(string|element)"},Pt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._scrollElement="BODY"===e.tagName?window:e,i._config=i._getConfig(n),i._selector=i._config.target+" .nav-link, "+i._config.target+" .list-group-item, "+i._config.target+" .dropdown-item",i._offsets=[],i._targets=[],i._activeTarget=null,i._scrollHeight=0,K.on(i._scrollElement,"scroll.bs.scrollspy",(function(){return i._process()})),i.refresh(),i._process(),i}r(e,t);var n=e.prototype;return n.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),q(this._selector).map((function(t){var e=h(t),o=e?Q(e):null;if(o){var s=o.getBoundingClientRect();if(s.width||s.height)return[X[n](o).top+i,e]}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.dispose=function(){t.prototype.dispose.call(this),K.off(this._scrollElement,".bs.scrollspy"),this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},It,"object"==typeof t&&t?t:{})).target&&g(t.target)){var e=t.target.id;e||(e=c("scrollspy"),t.target.id=e),t.target="#"+e}return _("scrollspy",t,jt),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._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]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},n._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-bs-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=Q(e.join(","));n.classList.contains("dropdown-item")?(Q(".dropdown-toggle",n.closest(".dropdown")).classList.add("active"),n.classList.add("active")):(n.classList.add("active"),function(t,e){for(var n=[],i=t.parentNode;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(e)&&n.push(i),i=i.parentNode;return n}(n,".nav, .list-group").forEach((function(t){$(t,".nav-link, .list-group-item").forEach((function(t){return t.classList.add("active")})),$(t,".nav-item").forEach((function(t){V(t,".nav-link").forEach((function(t){return t.classList.add("active")}))}))}))),K.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){q(this._selector).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.scrollspy");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return It}},{key:"DATA_KEY",get:function(){return"bs.scrollspy"}}]),e}(W);K.on(window,"load.bs.scrollspy.data-api",(function(){q('[data-bs-spy="scroll"]').forEach((function(t){return new Pt(t,X.getDataAttributes(t))}))})),T("scrollspy",Pt);var xt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active")||this._element.classList.contains("disabled"))){var e,n=d(this._element),i=this._element.closest(".nav, .list-group");if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?":scope > li > .active":".active";e=(e=q(o,i))[e.length-1]}var s=e?K.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if(!(K.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)){this._activate(this._element,i);var r=function(){K.trigger(e,"hidden.bs.tab",{relatedTarget:t._element}),K.trigger(t._element,"shown.bs.tab",{relatedTarget:e})};n?this._activate(n,n.parentNode,r):r()}}},n._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V(e,".active"):q(":scope > li > .active",e))[0],s=n&&o&&o.classList.contains("fade"),r=function(){return i._transitionComplete(t,o,n)};if(o&&s){var a=f(o);o.classList.remove("show"),K.one(o,"transitionend",r),m(o,a)}else r()},n._transitionComplete=function(t,e,n){if(e){e.classList.remove("active");var i=Q(":scope > .dropdown-menu .active",e.parentNode);i&&i.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),y(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu")&&(t.closest(".dropdown")&&q(".dropdown-toggle").forEach((function(t){return t.classList.add("active")})),t.setAttribute("aria-expanded",!0)),n&&n()},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.tab")||new e(this);if("string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.tab"}}]),e}(W);K.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){t.preventDefault(),(L(this,"bs.tab")||new xt(this)).show()})),T("tab",xt);var Ht={animation:"boolean",autohide:"boolean",delay:"number"},Bt={animation:!0,autohide:!0,delay:5e3},Mt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._timeout=null,i._setListeners(),i}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!K.trigger(this._element,"show.bs.toast").defaultPrevented){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var e=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),K.trigger(t._element,"shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),y(this._element),this._element.classList.add("showing"),this._config.animation){var n=f(this._element);K.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.hide=function(){var t=this;if(this._element.classList.contains("show")&&!K.trigger(this._element,"hide.bs.toast").defaultPrevented){var e=function(){t._element.classList.add("hide"),K.trigger(t._element,"hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=f(this._element);K.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),K.off(this._element,"click.dismiss.bs.toast"),t.prototype.dispose.call(this),this._config=null},n._getConfig=function(t){return t=s({},Bt,X.getDataAttributes(this._element),"object"==typeof t&&t?t:{}),_("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;K.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',(function(){return t.hide()}))},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.toast");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t](this)}}))},o(e,null,[{key:"DefaultType",get:function(){return Ht}},{key:"Default",get:function(){return Bt}},{key:"DATA_KEY",get:function(){return"bs.toast"}}]),e}(W);return T("toast",Mt),{Alert:U,Button:F,Carousel:J,Collapse:nt,Dropdown:dt,Modal:gt,Popover:Ot,ScrollSpy:Pt,Tab:xt,Toast:Mt,Tooltip:Lt}})); diff --git a/assets/javascripts/bootstrap/alert.js b/assets/javascripts/bootstrap/alert.js index 7ce77e1..ab127c1 100644 --- a/assets/javascripts/bootstrap/alert.js +++ b/assets/javascripts/bootstrap/alert.js @@ -1,22 +1,55 @@ /*! - * Bootstrap alert.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap alert.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler)); -}(this, (function (Data, EventHandler) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base)); +}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -27,7 +60,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -103,57 +149,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + document.documentElement.dir === 'rtl'; - var _proto = BaseComponent.prototype; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -168,9 +183,9 @@ var EVENT_CLOSE = "close" + EVENT_KEY; var EVENT_CLOSED = "closed" + EVENT_KEY; var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; - var CLASSNAME_ALERT = 'alert'; - var CLASSNAME_FADE = 'fade'; - var CLASSNAME_SHOW = 'show'; + var CLASS_NAME_ALERT = 'alert'; + var CLASS_NAME_FADE = 'fade'; + var CLASS_NAME_SHOW = 'show'; /** * ------------------------------------------------------------------------ * Class Definition @@ -201,7 +216,7 @@ ; _proto._getRootElement = function _getRootElement(element) { - return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT); + return getElementFromSelector(element) || element.closest("." + CLASS_NAME_ALERT); }; _proto._triggerCloseEvent = function _triggerCloseEvent(element) { @@ -211,16 +226,16 @@ _proto._removeElement = function _removeElement(element) { var _this = this; - element.classList.remove(CLASSNAME_SHOW); + element.classList.remove(CLASS_NAME_SHOW); - if (!element.classList.contains(CLASSNAME_FADE)) { + if (!element.classList.contains(CLASS_NAME_FADE)) { this._destroyElement(element); return; } var transitionDuration = getTransitionDurationFromElement(element); - EventHandler__default['default'].one(element, TRANSITION_END, function () { + EventHandler__default['default'].one(element, 'transitionend', function () { return _this._destroyElement(element); }); emulateTransitionEnd(element, transitionDuration); @@ -259,16 +274,16 @@ }; }; - _createClass$1(Alert, null, [{ + _createClass(Alert, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Alert; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -284,21 +299,7 @@ * add .Alert to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Alert.jQueryInterface; - $.fn[NAME].Constructor = Alert; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Alert.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Alert); return Alert; diff --git a/assets/javascripts/bootstrap/base-component.js b/assets/javascripts/bootstrap/base-component.js new file mode 100644 index 0000000..bb397bc --- /dev/null +++ b/assets/javascripts/bootstrap/base-component.js @@ -0,0 +1,75 @@ +/*! + * Bootstrap base-component.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data)); +}(this, (function (Data) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var VERSION = '5.0.0-beta2'; + + var BaseComponent = /*#__PURE__*/function () { + function BaseComponent(element) { + if (!element) { + return; + } + + this._element = element; + Data__default['default'].setData(element, this.constructor.DATA_KEY, this); + } + + var _proto = BaseComponent.prototype; + + _proto.dispose = function dispose() { + Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); + this._element = null; + } + /** Static */ + ; + + BaseComponent.getInstance = function getInstance(element) { + return Data__default['default'].getData(element, this.DATA_KEY); + }; + + _createClass(BaseComponent, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); + + return BaseComponent; + }(); + + return BaseComponent; + +}))); diff --git a/assets/javascripts/bootstrap/button.js b/assets/javascripts/bootstrap/button.js index b66105b..983d5d0 100644 --- a/assets/javascripts/bootstrap/button.js +++ b/assets/javascripts/bootstrap/button.js @@ -1,22 +1,55 @@ /*! - * Bootstrap button.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap button.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler)); -}(this, (function (Data, EventHandler) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base)); +}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -40,57 +73,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -140,16 +142,16 @@ }); }; - _createClass$1(Button, null, [{ + _createClass(Button, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Button; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -175,21 +177,7 @@ * add .Button to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Button.jQueryInterface; - $.fn[NAME].Constructor = Button; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Button.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Button); return Button; diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js index e8f84c6..0080bd5 100644 --- a/assets/javascripts/bootstrap/carousel.js +++ b/assets/javascripts/bootstrap/carousel.js @@ -1,13 +1,13 @@ /*! - * Bootstrap carousel.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap carousel.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -105,7 +169,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -149,57 +213,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -262,12 +293,11 @@ var SELECTOR_ITEM_IMG = '.carousel-item img'; var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; var SELECTOR_INDICATORS = '.carousel-indicators'; + var SELECTOR_INDICATOR = '[data-bs-target]'; var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; - var PointerType = { - TOUCH: 'touch', - PEN: 'pen' - }; + var POINTER_TYPE_TOUCH = 'touch'; + var POINTER_TYPE_PEN = 'pen'; /** * ------------------------------------------------------------------------ * Class Definition @@ -414,12 +444,20 @@ this.touchDeltaX = 0; // swipe left if (direction > 0) { - this.prev(); + if (isRTL) { + this.next(); + } else { + this.prev(); + } } // swipe right if (direction < 0) { - this.next(); + if (isRTL) { + this.prev(); + } else { + this.next(); + } } }; @@ -450,7 +488,7 @@ var _this4 = this; var start = function start(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchStartX = event.clientX; } else if (!_this4._pointerEvent) { _this4.touchStartX = event.touches[0].clientX; @@ -467,7 +505,7 @@ }; var end = function end(event) { - if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { + if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) { _this4.touchDeltaX = event.clientX - _this4.touchStartX; } @@ -526,16 +564,22 @@ return; } - switch (event.key) { - case ARROW_LEFT_KEY: - event.preventDefault(); + if (event.key === ARROW_LEFT_KEY) { + event.preventDefault(); + + if (isRTL) { + this.next(); + } else { this.prev(); - break; + } + } else if (event.key === ARROW_RIGHT_KEY) { + event.preventDefault(); - case ARROW_RIGHT_KEY: - event.preventDefault(); + if (isRTL) { + this.prev(); + } else { this.next(); - break; + } } }; @@ -577,16 +621,17 @@ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { if (this._indicatorsElement) { - var indicators = SelectorEngine__default['default'].find(SELECTOR_ACTIVE, this._indicatorsElement); + var activeIndicator = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE, this._indicatorsElement); + activeIndicator.classList.remove(CLASS_NAME_ACTIVE); + activeIndicator.removeAttribute('aria-current'); + var indicators = SelectorEngine__default['default'].find(SELECTOR_INDICATOR, this._indicatorsElement); for (var i = 0; i < indicators.length; i++) { - indicators[i].classList.remove(CLASS_NAME_ACTIVE); - } - - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - - if (nextIndicator) { - nextIndicator.classList.add(CLASS_NAME_ACTIVE); + if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) { + indicators[i].classList.add(CLASS_NAME_ACTIVE); + indicators[i].setAttribute('aria-current', 'true'); + break; + } } } }; @@ -620,19 +665,9 @@ var nextElementIndex = this._getItemIndex(nextElement); var isCycling = Boolean(this._interval); - var directionalClassName; - var orderClassName; - var eventDirectionName; - - if (direction === DIRECTION_NEXT) { - directionalClassName = CLASS_NAME_START; - orderClassName = CLASS_NAME_NEXT; - eventDirectionName = DIRECTION_LEFT; - } else { - directionalClassName = CLASS_NAME_END; - orderClassName = CLASS_NAME_PREV; - eventDirectionName = DIRECTION_RIGHT; - } + var directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END; + var orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV; + var eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT; if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) { this._isSliding = false; @@ -666,7 +701,7 @@ activeElement.classList.add(directionalClassName); nextElement.classList.add(directionalClassName); var transitionDuration = getTransitionDurationFromElement(activeElement); - EventHandler__default['default'].one(activeElement, TRANSITION_END, function () { + EventHandler__default['default'].one(activeElement, 'transitionend', function () { nextElement.classList.remove(directionalClassName, orderClassName); nextElement.classList.add(CLASS_NAME_ACTIVE); activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName); @@ -758,7 +793,7 @@ event.preventDefault(); }; - _createClass$1(Carousel, null, [{ + _createClass(Carousel, null, [{ key: "Default", get: function get() { return Default; @@ -771,7 +806,7 @@ }]); return Carousel; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -794,21 +829,7 @@ * add .Carousel to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Carousel.jQueryInterface; - $.fn[NAME].Constructor = Carousel; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Carousel.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Carousel); return Carousel; diff --git a/assets/javascripts/bootstrap/collapse.js b/assets/javascripts/bootstrap/collapse.js index 67efbd9..8cdafaa 100644 --- a/assets/javascripts/bootstrap/collapse.js +++ b/assets/javascripts/bootstrap/collapse.js @@ -1,13 +1,13 @@ /*! - * Bootstrap collapse.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap collapse.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -115,7 +179,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -143,59 +207,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -371,7 +402,7 @@ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var scrollSize = "scroll" + capitalizedDimension; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); this._element.style[dimension] = this._element[scrollSize] + "px"; }; @@ -426,7 +457,7 @@ this._element.style[dimension] = ''; var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); }; @@ -525,7 +556,7 @@ }); }; - _createClass$1(Collapse, null, [{ + _createClass(Collapse, null, [{ key: "Default", get: function get() { return Default; @@ -538,7 +569,7 @@ }]); return Collapse; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -548,7 +579,7 @@ EventHandler__default['default'].on(document, 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') { + if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { event.preventDefault(); } @@ -581,21 +612,7 @@ * add .Collapse to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Collapse.jQueryInterface; - $.fn[NAME].Constructor = Collapse; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Collapse.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Collapse); return Collapse; diff --git a/assets/javascripts/bootstrap/dom/data.js b/assets/javascripts/bootstrap/dom/data.js index c9f98bf..724243d 100644 --- a/assets/javascripts/bootstrap/dom/data.js +++ b/assets/javascripts/bootstrap/dom/data.js @@ -1,6 +1,6 @@ /*! - * Bootstrap data.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap data.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/data.js + * Bootstrap (v5.0.0-beta2): dom/data.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/assets/javascripts/bootstrap/dom/event-handler.js b/assets/javascripts/bootstrap/dom/event-handler.js index 13732d5..a0ec3eb 100644 --- a/assets/javascripts/bootstrap/dom/event-handler.js +++ b/assets/javascripts/bootstrap/dom/event-handler.js @@ -1,6 +1,6 @@ /*! - * Bootstrap event-handler.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap event-handler.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -27,11 +27,11 @@ return null; }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/event-handler.js + * Bootstrap (v5.0.0-beta2): dom/event-handler.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -91,6 +91,7 @@ event.delegateTarget = target; if (handler.oneOff) { + // eslint-disable-next-line unicorn/consistent-destructuring EventHandler.off(element, event.type, fn); } diff --git a/assets/javascripts/bootstrap/dom/manipulator.js b/assets/javascripts/bootstrap/dom/manipulator.js index f0a7132..8e322bd 100644 --- a/assets/javascripts/bootstrap/dom/manipulator.js +++ b/assets/javascripts/bootstrap/dom/manipulator.js @@ -1,6 +1,6 @@ /*! - * Bootstrap manipulator.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap manipulator.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/manipulator.js + * Bootstrap (v5.0.0-beta2): dom/manipulator.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ diff --git a/assets/javascripts/bootstrap/dom/selector-engine.js b/assets/javascripts/bootstrap/dom/selector-engine.js index ffc7f44..bcb4b94 100644 --- a/assets/javascripts/bootstrap/dom/selector-engine.js +++ b/assets/javascripts/bootstrap/dom/selector-engine.js @@ -1,6 +1,6 @@ /*! - * Bootstrap selector-engine.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap selector-engine.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,7 +11,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): dom/selector-engine.js + * Bootstrap (v5.0.0-beta2): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -23,9 +23,6 @@ */ var NODE_TEXT = 3; var SelectorEngine = { - matches: function matches(element, selector) { - return element.matches(selector); - }, find: function find(selector, element) { var _ref; @@ -45,9 +42,7 @@ children: function children(element, selector) { var _ref2; - var children = (_ref2 = []).concat.apply(_ref2, element.children); - - return children.filter(function (child) { + return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) { return child.matches(selector); }); }, @@ -56,7 +51,7 @@ var ancestor = element.parentNode; while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) { - if (this.matches(ancestor, selector)) { + if (ancestor.matches(selector)) { parents.push(ancestor); } @@ -82,7 +77,7 @@ var next = element.nextElementSibling; while (next) { - if (this.matches(next, selector)) { + if (next.matches(selector)) { return [next]; } diff --git a/assets/javascripts/bootstrap/dropdown.js b/assets/javascripts/bootstrap/dropdown.js index a1496cc..c2933f2 100644 --- a/assets/javascripts/bootstrap/dropdown.js +++ b/assets/javascripts/bootstrap/dropdown.js @@ -1,13 +1,13 @@ /*! - * Bootstrap dropdown.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap dropdown.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -36,10 +36,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -56,7 +107,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -79,7 +143,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -123,57 +187,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -218,7 +249,7 @@ var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'; var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'; var Default = { - offset: 0, + offset: [0, 2], flip: true, boundary: 'clippingParents', reference: 'toggle', @@ -226,12 +257,12 @@ popperConfig: null }; var DefaultType = { - offset: '(number|string|function)', + offset: '(array|string|function)', flip: 'boolean', boundary: '(string|element)', - reference: '(string|element)', + reference: '(string|element|object)', display: 'string', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; /** * ------------------------------------------------------------------------ @@ -292,7 +323,9 @@ } // Totally disable Popper for Dropdowns in Navbar - if (!this._inNavbar) { + if (this._inNavbar) { + Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none'); + } else { if (typeof Popper__namespace === 'undefined') { throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); } @@ -307,9 +340,20 @@ if (typeof this._config.reference.jquery !== 'undefined') { referenceElement = this._config.reference[0]; } + } else if (typeof this._config.reference === 'object') { + referenceElement = this._config.reference; } - this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig()); + var popperConfig = this._getPopperConfig(); + + var isDisplayStatic = popperConfig.modifiers.find(function (modifier) { + return modifier.name === 'applyStyles' && modifier.enabled === false; + }); + this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig); + + if (isDisplayStatic) { + Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static'); + } } // 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 @@ -332,7 +376,7 @@ this._element.classList.toggle(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget); + EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget); }; _proto.hide = function hide() { @@ -340,11 +384,10 @@ return; } - var parent = Dropdown.getParentFromElement(this._element); var relatedTarget = { relatedTarget: this._element }; - var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); + var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget); if (hideEvent.defaultPrevented) { return; @@ -358,7 +401,8 @@ this._element.classList.toggle(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget); + Manipulator__default['default'].removeDataAttribute(this._menu, 'popper'); + EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN, relatedTarget); }; _proto.dispose = function dispose() { @@ -397,6 +441,12 @@ _proto._getConfig = function _getConfig(config) { config = _extends({}, this.constructor.Default, Manipulator__default['default'].getDataAttributes(this._element), config); typeCheckConfig(NAME, config, this.constructor.DefaultType); + + if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { + // Popper virtual elements require a getBoundingClientRect method + throw new TypeError(NAME.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method."); + } + return config; }; @@ -429,26 +479,51 @@ return this._element.closest("." + CLASS_NAME_NAVBAR) !== null; }; + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = this._config.offset; + + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); + } + + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this3._element); + }; + } + + return offset; + }; + _proto._getPopperConfig = function _getPopperConfig() { - var popperConfig = { + var defaultBsPopperConfig = { placement: this._getPlacement(), modifiers: [{ name: 'preventOverflow', options: { altBoundary: this._config.flip, - rootBoundary: this._config.boundary + boundary: this._config.boundary + } + }, { + name: 'offset', + options: { + offset: this._getOffset() } }] }; // Disable Popper if we have a static display if (this._config.display === 'static') { - popperConfig.modifiers = [{ + defaultBsPopperConfig.modifiers = [{ name: 'applyStyles', enabled: false }]; } - return _extends({}, popperConfig, this._config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig); } // Static ; @@ -484,7 +559,6 @@ var toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE); for (var i = 0, len = toggles.length; i < len; i++) { - var parent = Dropdown.getParentFromElement(toggles[i]); var context = Data__default['default'].getData(toggles[i], DATA_KEY); var relatedTarget = { relatedTarget: toggles[i] @@ -508,7 +582,7 @@ continue; } - var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); + var hideEvent = EventHandler__default['default'].trigger(toggles[i], EVENT_HIDE, relatedTarget); if (hideEvent.defaultPrevented) { continue; @@ -532,7 +606,8 @@ dropdownMenu.classList.remove(CLASS_NAME_SHOW); toggles[i].classList.remove(CLASS_NAME_SHOW); - EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget); + Manipulator__default['default'].removeDataAttribute(dropdownMenu, 'popper'); + EventHandler__default['default'].trigger(toggles[i], EVENT_HIDDEN, relatedTarget); } }; @@ -569,6 +644,14 @@ return; } + if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) { + var _button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0]; + + _button.click(); + + return; + } + if (!isActive || event.key === SPACE_KEY) { Dropdown.clearMenus(); return; @@ -596,7 +679,7 @@ items[index].focus(); }; - _createClass$1(Dropdown, null, [{ + _createClass(Dropdown, null, [{ key: "Default", get: function get() { return Default; @@ -614,7 +697,7 @@ }]); return Dropdown; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -641,21 +724,7 @@ * add .Dropdown to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Dropdown.jQueryInterface; - $.fn[NAME].Constructor = Dropdown; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Dropdown.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Dropdown); return Dropdown; diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js index 2cd83e9..f130feb 100644 --- a/assets/javascripts/bootstrap/modal.js +++ b/assets/javascripts/bootstrap/modal.js @@ -1,13 +1,13 @@ /*! - * Bootstrap modal.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap modal.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -37,7 +88,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -105,7 +169,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -149,57 +213,24 @@ var isRTL = document.documentElement.dir === 'rtl'; - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -362,7 +393,7 @@ if (transition) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, function (event) { + EventHandler__default['default'].one(this._element, 'transitionend', function (event) { return _this3._hideModal(event); }); emulateTransitionEnd(this._element, transitionDuration); @@ -455,7 +486,7 @@ if (transition) { var transitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler__default['default'].one(this._dialog, TRANSITION_END, transitionComplete); + EventHandler__default['default'].one(this._dialog, 'transitionend', transitionComplete); emulateTransitionEnd(this._dialog, transitionDuration); } else { transitionComplete(); @@ -577,7 +608,7 @@ } var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callback); + EventHandler__default['default'].one(this._backdrop, 'transitionend', callback); emulateTransitionEnd(this._backdrop, backdropTransitionDuration); } else if (!this._isShown && this._backdrop) { this._backdrop.classList.remove(CLASS_NAME_SHOW); @@ -591,7 +622,7 @@ if (this._element.classList.contains(CLASS_NAME_FADE)) { var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); - EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callbackRemove); + EventHandler__default['default'].one(this._backdrop, 'transitionend', callbackRemove); emulateTransitionEnd(this._backdrop, _backdropTransitionDuration); } else { callbackRemove(); @@ -619,12 +650,12 @@ this._element.classList.add(CLASS_NAME_STATIC); var modalTransitionDuration = getTransitionDurationFromElement(this._dialog); - EventHandler__default['default'].off(this._element, TRANSITION_END); - EventHandler__default['default'].one(this._element, TRANSITION_END, function () { + EventHandler__default['default'].off(this._element, 'transitionend'); + EventHandler__default['default'].one(this._element, 'transitionend', function () { _this10._element.classList.remove(CLASS_NAME_STATIC); if (!isModalOverflowing) { - EventHandler__default['default'].one(_this10._element, TRANSITION_END, function () { + EventHandler__default['default'].one(_this10._element, 'transitionend', function () { _this10._element.style.overflowY = ''; }); emulateTransitionEnd(_this10._element, modalTransitionDuration); @@ -665,60 +696,50 @@ var _this11 = 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 - SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var actualPadding = element.style.paddingRight; - var calculatedPadding = window.getComputedStyle(element)['padding-right']; - Manipulator__default['default'].setDataAttribute(element, 'padding-right', actualPadding); - element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px"; - }); // Adjust sticky content margin - - SelectorEngine__default['default'].find(SELECTOR_STICKY_CONTENT).forEach(function (element) { - var actualMargin = element.style.marginRight; - var calculatedMargin = window.getComputedStyle(element)['margin-right']; - Manipulator__default['default'].setDataAttribute(element, 'margin-right', actualMargin); - element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px"; - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = window.getComputedStyle(document.body)['padding-right']; - Manipulator__default['default'].setDataAttribute(document.body, 'padding-right', actualPadding); - document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px"; + this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); + + this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) { + return calculatedValue - _this11._scrollbarWidth; + }); + + this._setElementAttributes('body', 'paddingRight', function (calculatedValue) { + return calculatedValue + _this11._scrollbarWidth; + }); } document.body.classList.add(CLASS_NAME_OPEN); }; - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { - var padding = Manipulator__default['default'].getDataAttribute(element, 'padding-right'); + _proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) { + SelectorEngine__default['default'].find(selector).forEach(function (element) { + var actualValue = element.style[styleProp]; + var calculatedValue = window.getComputedStyle(element)[styleProp]; + Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue); + element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px'; + }); + }; - if (typeof padding !== 'undefined') { - Manipulator__default['default'].removeDataAttribute(element, 'padding-right'); - element.style.paddingRight = padding; - } - }); // Restore sticky content and navbar-toggler margin + _proto._resetScrollbar = function _resetScrollbar() { + this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight'); - SelectorEngine__default['default'].find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) { - var margin = Manipulator__default['default'].getDataAttribute(element, 'margin-right'); + this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight'); - if (typeof margin !== 'undefined') { - Manipulator__default['default'].removeDataAttribute(element, 'margin-right'); - element.style.marginRight = margin; - } - }); // Restore body padding + this._resetElementAttributes('body', 'paddingRight'); + }; - var padding = Manipulator__default['default'].getDataAttribute(document.body, 'padding-right'); + _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) { + SelectorEngine__default['default'].find(selector).forEach(function (element) { + var value = Manipulator__default['default'].getDataAttribute(element, styleProp); - if (typeof padding === 'undefined') { - document.body.style.paddingRight = ''; - } else { - Manipulator__default['default'].removeDataAttribute(document.body, 'padding-right'); - document.body.style.paddingRight = padding; - } + if (typeof value === 'undefined' && element === document.body) { + element.style[styleProp] = ''; + } else { + Manipulator__default['default'].removeDataAttribute(element, styleProp); + element.style[styleProp] = value; + } + }); }; _proto._getScrollbarWidth = function _getScrollbarWidth() { @@ -752,7 +773,7 @@ }); }; - _createClass$1(Modal, null, [{ + _createClass(Modal, null, [{ key: "Default", get: function get() { return Default; @@ -765,7 +786,7 @@ }]); return Modal; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -802,7 +823,7 @@ data = new Modal(target, config); } - data.show(this); + data.toggle(this); }); /** * ------------------------------------------------------------------------ @@ -811,21 +832,7 @@ * add .Modal to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Modal.jQueryInterface; - $.fn[NAME].Constructor = Modal; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Modal.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Modal); return Modal; diff --git a/assets/javascripts/bootstrap/popover.js b/assets/javascripts/bootstrap/popover.js index cfeeb9b..693b50e 100644 --- a/assets/javascripts/bootstrap/popover.js +++ b/assets/javascripts/bootstrap/popover.js @@ -1,6 +1,6 @@ /*! - * Bootstrap popover.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap popover.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -15,9 +15,59 @@ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -41,15 +91,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; - 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 defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /** * ------------------------------------------------------------------------ * Constants @@ -64,6 +125,7 @@ var Default = _extends({}, Tooltip__default['default'].Default, { placement: 'right', + offset: [0, 8], trigger: 'click', content: '', template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>' @@ -174,8 +236,8 @@ _createClass(Popover, null, [{ key: "Default", - // Getters - get: function get() { + get: // Getters + function get() { return Default; } }, { @@ -215,21 +277,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Popover.jQueryInterface; - $.fn[NAME].Constructor = Popover; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Popover.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Popover); return Popover; diff --git a/assets/javascripts/bootstrap/scrollspy.js b/assets/javascripts/bootstrap/scrollspy.js index f7503c9..601937f 100644 --- a/assets/javascripts/bootstrap/scrollspy.js +++ b/assets/javascripts/bootstrap/scrollspy.js @@ -1,13 +1,13 @@ /*! - * Bootstrap scrollspy.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap scrollspy.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -15,10 +15,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -50,7 +101,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -78,7 +142,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -102,59 +166,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; + document.documentElement.dir === 'rtl'; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -209,8 +240,8 @@ _this._targets = []; _this._activeTarget = null; _this._scrollHeight = 0; - EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function (event) { - return _this._process(event); + EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function () { + return _this._process(); }); _this.refresh(); @@ -406,7 +437,7 @@ }); }; - _createClass$1(ScrollSpy, null, [{ + _createClass(ScrollSpy, null, [{ key: "Default", get: function get() { return Default; @@ -419,7 +450,7 @@ }]); return ScrollSpy; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -439,21 +470,7 @@ * add .ScrollSpy to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = ScrollSpy.jQueryInterface; - $.fn[NAME].Constructor = ScrollSpy; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return ScrollSpy.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, ScrollSpy); return ScrollSpy; diff --git a/assets/javascripts/bootstrap/tab.js b/assets/javascripts/bootstrap/tab.js index a56a900..d430f03 100644 --- a/assets/javascripts/bootstrap/tab.js +++ b/assets/javascripts/bootstrap/tab.js @@ -1,23 +1,56 @@ /*! - * Bootstrap tab.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tab.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine)); -}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine, global.Base)); +}(this, (function (Data, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -28,7 +61,20 @@ var selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { - var hrefAttr = element.getAttribute('href'); + var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, + // so everything starting with `#` or `.`. If a "real" URL is used as the selector, + // `document.querySelector` will rightfully complain it is invalid. + // See https://github.com/twbs/bootstrap/issues/32273 + + if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { + return null; + } // Just in case some CMS puts out a full URL with the anchor appended + + + if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { + hrefAttr = '#' + hrefAttr.split('#')[1]; + } + selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } @@ -108,57 +154,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; + document.documentElement.dir === 'rtl'; - 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 defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } + }); + }; - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); - - return BaseComponent; - }(); - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } - - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -220,14 +235,9 @@ previous = previous[previous.length - 1]; } - var hideEvent = null; - - if (previous) { - hideEvent = EventHandler__default['default'].trigger(previous, EVENT_HIDE, { - relatedTarget: this._element - }); - } - + var hideEvent = previous ? EventHandler__default['default'].trigger(previous, EVENT_HIDE, { + relatedTarget: this._element + }) : null; var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, { relatedTarget: previous }); @@ -269,7 +279,7 @@ if (active && isTransitioning) { var transitionDuration = getTransitionDurationFromElement(active); active.classList.remove(CLASS_NAME_SHOW); - EventHandler__default['default'].one(active, TRANSITION_END, complete); + EventHandler__default['default'].one(active, 'transitionend', complete); emulateTransitionEnd(active, transitionDuration); } else { complete(); @@ -334,16 +344,16 @@ }); }; - _createClass$1(Tab, null, [{ + _createClass(Tab, null, [{ key: "DATA_KEY", - // Getters - get: function get() { + get: // Getters + function get() { return DATA_KEY; } }]); return Tab; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -363,21 +373,7 @@ * add .Tab to jQuery only if jQuery is present */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tab.jQueryInterface; - $.fn[NAME].Constructor = Tab; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tab.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Tab); return Tab; diff --git a/assets/javascripts/bootstrap/toast.js b/assets/javascripts/bootstrap/toast.js index 7a1cd83..24176b5 100644 --- a/assets/javascripts/bootstrap/toast.js +++ b/assets/javascripts/bootstrap/toast.js @@ -1,23 +1,74 @@ /*! - * Bootstrap toast.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap toast.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator)); -}(this, (function (Data, EventHandler, Manipulator) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator, global.Base)); +}(this, (function (Data, EventHandler, Manipulator, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -88,7 +139,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -116,59 +167,26 @@ } }; - var isRTL = document.documentElement.dir === 'rtl'; - - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } + document.documentElement.dir === 'rtl'; - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - var _proto = BaseComponent.prototype; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } + }); + }; - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -260,7 +278,7 @@ if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -290,7 +308,7 @@ if (this._config.animation) { var transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, TRANSITION_END, complete); + EventHandler__default['default'].one(this._element, 'transitionend', complete); emulateTransitionEnd(this._element, transitionDuration); } else { complete(); @@ -352,7 +370,7 @@ }); }; - _createClass$1(Toast, null, [{ + _createClass(Toast, null, [{ key: "DefaultType", get: function get() { return DefaultType; @@ -370,7 +388,7 @@ }]); return Toast; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * jQuery @@ -379,21 +397,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Toast.jQueryInterface; - $.fn[NAME].Constructor = Toast; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Toast.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Toast); return Toast; diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js index 930edb4..33ce1ea 100644 --- a/assets/javascripts/bootstrap/tooltip.js +++ b/assets/javascripts/bootstrap/tooltip.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tooltip.js v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tooltip.js v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : - typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); -}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : + typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); +}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -36,10 +36,61 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); + + 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 _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/index.js + * Bootstrap (v5.0.0-beta2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -125,7 +176,7 @@ var valueType = value && isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } }); }; @@ -178,9 +229,27 @@ var isRTL = document.documentElement.dir === 'rtl'; + var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) { + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ + + if ($) { + var JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + + $.fn[name].noConflict = function () { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-beta1): util/sanitizer.js + * Bootstrap (v5.0.0-beta2): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -206,7 +275,7 @@ if (allowedAttributeList.includes(attrName)) { if (uriAttrs.has(attrName)) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); + return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue)); } return true; @@ -217,7 +286,7 @@ }); // Check if a regular expression validates the attribute. for (var i = 0, len = regExp.length; i < len; i++) { - if (attrName.match(regExp[i])) { + if (regExp[i].test(attrName)) { return true; } } @@ -305,57 +374,6 @@ return createdDocument.body.innerHTML; } - 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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var VERSION = '5.0.0-beta1'; - - var BaseComponent = /*#__PURE__*/function () { - function BaseComponent(element) { - if (!element) { - return; - } - - this._element = element; - Data__default['default'].setData(element, this.constructor.DATA_KEY, this); - } - - var _proto = BaseComponent.prototype; - - _proto.dispose = function dispose() { - Data__default['default'].removeData(this._element, this.constructor.DATA_KEY); - this._element = null; - } - /** Static */ - ; - - BaseComponent.getInstance = function getInstance(element) { - return Data__default['default'].getData(element, this.DATA_KEY); - }; - - _createClass(BaseComponent, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); - - return BaseComponent; - }(); - - function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - - function _defineProperties$1(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 _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; } - - function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /** * ------------------------------------------------------------------------ * Constants @@ -377,14 +395,15 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', + offset: '(array|string|function)', container: '(string|element|boolean)', - fallbackPlacements: '(null|array)', + fallbackPlacements: 'array', boundary: '(string|element)', customClass: '(string|function)', sanitize: 'boolean', sanitizeFn: '(null|function)', allowList: 'object', - popperConfig: '(null|object)' + popperConfig: '(null|object|function)' }; var AttachmentMap = { AUTO: 'auto', @@ -402,8 +421,9 @@ html: false, selector: false, placement: 'top', + offset: [0, 0], container: false, - fallbackPlacements: null, + fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', customClass: '', sanitize: true, @@ -487,13 +507,7 @@ } if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + var context = this._initializeOnDelegatedTarget(event); context._activeTrigger.click = !context._activeTrigger.click; @@ -518,7 +532,7 @@ EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY); EventHandler__default['default'].off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); - if (this.tip) { + if (this.tip && this.tip.parentNode) { this.tip.parentNode.removeChild(this.tip); } @@ -545,81 +559,83 @@ throw new Error('Please use show on visible elements'); } - if (this.isWithContent() && this._isEnabled) { - var showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW); - var shadowRoot = findShadowRoot(this._element); - var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); + if (!(this.isWithContent() && this._isEnabled)) { + return; + } - if (showEvent.defaultPrevented || !isInTheDom) { - return; - } + var showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW); + var shadowRoot = findShadowRoot(this._element); + var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); - var tip = this.getTipElement(); - var tipId = getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } - this._element.setAttribute('aria-describedby', tipId); + var tip = this.getTipElement(); + var tipId = getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); - this.setContent(); + this._element.setAttribute('aria-describedby', tipId); - if (this.config.animation) { - tip.classList.add(CLASS_NAME_FADE); - } + 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.classList.add(CLASS_NAME_FADE); + } - var attachment = this._getAttachment(placement); + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; - this._addAttachmentClass(attachment); + var attachment = this._getAttachment(placement); - var container = this._getContainer(); + this._addAttachmentClass(attachment); - Data__default['default'].setData(tip, this.constructor.DATA_KEY, this); + var container = this._getContainer(); - if (!this._element.ownerDocument.documentElement.contains(this.tip)) { - container.appendChild(tip); - } + Data__default['default'].setData(tip, this.constructor.DATA_KEY, this); - EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED); - this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); - tip.classList.add(CLASS_NAME_SHOW); - var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.appendChild(tip); + } - if (customClass) { - var _tip$classList; + EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED); + this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + tip.classList.add(CLASS_NAME_SHOW); + var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; - (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); - } // 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 (customClass) { + var _tip$classList; + (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); + } // 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) { - var _ref; - (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { - EventHandler__default['default'].on(element, 'mouseover', noop()); - }); - } + if ('ontouchstart' in document.documentElement) { + var _ref; - var complete = function complete() { - var prevHoverState = _this2._hoverState; - _this2._hoverState = null; - EventHandler__default['default'].trigger(_this2._element, _this2.constructor.Event.SHOWN); + (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { + EventHandler__default['default'].on(element, 'mouseover', noop()); + }); + } - if (prevHoverState === HOVER_STATE_OUT) { - _this2._leave(null, _this2); - } - }; + var complete = function complete() { + var prevHoverState = _this2._hoverState; + _this2._hoverState = null; + EventHandler__default['default'].trigger(_this2._element, _this2.constructor.Event.SHOWN); - if (this.tip.classList.contains(CLASS_NAME_FADE)) { - var transitionDuration = getTransitionDurationFromElement(this.tip); - EventHandler__default['default'].one(this.tip, TRANSITION_END, complete); - emulateTransitionEnd(this.tip, transitionDuration); - } else { - complete(); + if (prevHoverState === HOVER_STATE_OUT) { + _this2._leave(null, _this2); } + }; + + if (this.tip.classList.contains(CLASS_NAME_FADE)) { + var transitionDuration = getTransitionDurationFromElement(this.tip); + EventHandler__default['default'].one(this.tip, 'transitionend', complete); + emulateTransitionEnd(this.tip, transitionDuration); + } else { + complete(); } }; @@ -673,7 +689,7 @@ if (this.tip.classList.contains(CLASS_NAME_FADE)) { var transitionDuration = getTransitionDurationFromElement(tip); - EventHandler__default['default'].one(tip, TRANSITION_END, complete); + EventHandler__default['default'].one(tip, 'transitionend', complete); emulateTransitionEnd(tip, transitionDuration); } else { complete(); @@ -767,26 +783,58 @@ } // Private ; - _proto._getPopperConfig = function _getPopperConfig(attachment) { + _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || Data__default['default'].getData(event.delegateTarget, dataKey); + + if (!context) { + context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); + Data__default['default'].setData(event.delegateTarget, dataKey, context); + } + + return context; + }; + + _proto._getOffset = function _getOffset() { var _this4 = this; - var flipModifier = { - name: 'flip', - options: { - altBoundary: true - } - }; + var offset = this.config.offset; - if (this.config.fallbackPlacements) { - flipModifier.options.fallbackPlacements = this.config.fallbackPlacements; + if (typeof offset === 'string') { + return offset.split(',').map(function (val) { + return Number.parseInt(val, 10); + }); } - var defaultBsConfig = { + if (typeof offset === 'function') { + return function (popperData) { + return offset(popperData, _this4._element); + }; + } + + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig(attachment) { + var _this5 = this; + + var defaultBsPopperConfig = { placement: attachment, - modifiers: [flipModifier, { + modifiers: [{ + name: 'flip', + options: { + altBoundary: true, + fallbackPlacements: this.config.fallbackPlacements + } + }, { + name: 'offset', + options: { + offset: this._getOffset() + } + }, { name: 'preventOverflow', options: { - rootBoundary: this.config.boundary + boundary: this.config.boundary } }, { name: 'arrow', @@ -798,16 +846,16 @@ enabled: true, phase: 'afterWrite', fn: function fn(data) { - return _this4._handlePopperPlacementChange(data); + return _this5._handlePopperPlacementChange(data); } }], onFirstUpdate: function onFirstUpdate(data) { if (data.options.placement !== data.placement) { - _this4._handlePopperPlacementChange(data); + _this5._handlePopperPlacementChange(data); } } }; - return _extends({}, defaultBsConfig, this.config.popperConfig); + return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig); }; _proto._addAttachmentClass = function _addAttachmentClass(attachment) { @@ -831,29 +879,29 @@ }; _proto._setListeners = function _setListeners() { - var _this5 = this; + var _this6 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - EventHandler__default['default'].on(_this5._element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) { - return _this5.toggle(event); + EventHandler__default['default'].on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) { + return _this6.toggle(event); }); } else if (trigger !== TRIGGER_MANUAL) { - var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; - var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; - EventHandler__default['default'].on(_this5._element, eventIn, _this5.config.selector, function (event) { - return _this5._enter(event); + var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN; + var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT; + EventHandler__default['default'].on(_this6._element, eventIn, _this6.config.selector, function (event) { + return _this6._enter(event); }); - EventHandler__default['default'].on(_this5._element, eventOut, _this5.config.selector, function (event) { - return _this5._leave(event); + EventHandler__default['default'].on(_this6._element, eventOut, _this6.config.selector, function (event) { + return _this6._leave(event); }); } }); this._hideModalHandler = function () { - if (_this5._element) { - _this5.hide(); + if (_this6._element) { + _this6.hide(); } }; @@ -886,13 +934,7 @@ }; _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; @@ -919,13 +961,7 @@ }; _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || Data__default['default'].getData(event.delegateTarget, dataKey); - - if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data__default['default'].setData(event.delegateTarget, dataKey, context); - } + context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false; @@ -1064,7 +1100,7 @@ }); }; - _createClass$1(Tooltip, null, [{ + _createClass(Tooltip, null, [{ key: "Default", get: function get() { return Default; @@ -1097,7 +1133,7 @@ }]); return Tooltip; - }(BaseComponent); + }(BaseComponent__default['default']); /** * ------------------------------------------------------------------------ * jQuery @@ -1106,21 +1142,7 @@ */ - onDOMContentLoaded(function () { - var $ = getjQuery(); - /* istanbul ignore if */ - - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tooltip.jQueryInterface; - $.fn[NAME].Constructor = Tooltip; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tooltip.jQueryInterface; - }; - } - }); + defineJQueryPlugin(NAME, Tooltip); return Tooltip; diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss index c222d8c..d21c149 100644 --- a/assets/stylesheets/_bootstrap-grid.scss +++ b/assets/stylesheets/_bootstrap-grid.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Grid v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors - * Copyright 2011-2020 Twitter, Inc. + * Bootstrap Grid v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ diff --git a/assets/stylesheets/_bootstrap-reboot.scss b/assets/stylesheets/_bootstrap-reboot.scss index 36d9d3b..a57e6e4 100644 --- a/assets/stylesheets/_bootstrap-reboot.scss +++ b/assets/stylesheets/_bootstrap-reboot.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors - * Copyright 2011-2020 Twitter, Inc. + * Bootstrap Reboot v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */ diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss index 63520f0..2b21774 100644 --- a/assets/stylesheets/_bootstrap.scss +++ b/assets/stylesheets/_bootstrap.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors - * Copyright 2011-2020 Twitter, Inc. + * Bootstrap v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ diff --git a/assets/stylesheets/bootstrap/_accordion.scss b/assets/stylesheets/bootstrap/_accordion.scss index a68aaa7..298a553 100644 --- a/assets/stylesheets/bootstrap/_accordion.scss +++ b/assets/stylesheets/bootstrap/_accordion.scss @@ -10,6 +10,7 @@ padding: $accordion-button-padding-y $accordion-button-padding-x; @include font-size($font-size-base); color: $accordion-button-color; + text-align: left; // Reset button style background-color: $accordion-button-bg; border: $accordion-border-width solid $accordion-border-color; @include border-radius(0); diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss index 3d9b69b..34f1e84 100644 --- a/assets/stylesheets/bootstrap/_alert.scss +++ b/assets/stylesheets/bootstrap/_alert.scss @@ -44,14 +44,14 @@ // Generate contextual modifier classes for colorizing the alert. @each $state, $value in $theme-colors { - $background: shift-color($value, $alert-bg-scale); - $border: shift-color($value, $alert-border-scale); - $color: shift-color($value, $alert-color-scale); - @if (contrast-ratio($background, $color) < $min-contrast-ratio) { - $color: mix($value, color-contrast($background), abs($alert-color-scale)); + $alert-background: shift-color($value, $alert-bg-scale); + $alert-border: shift-color($value, $alert-border-scale); + $alert-color: shift-color($value, $alert-color-scale); + @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) { + $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale)); } .alert-#{$state} { - @include alert-variant($background, $border, $color); + @include alert-variant($alert-background, $alert-border, $alert-color); } } // scss-docs-end alert-modifiers diff --git a/assets/stylesheets/bootstrap/_carousel.scss b/assets/stylesheets/bootstrap/_carousel.scss index d2e42bc..d389c30 100644 --- a/assets/stylesheets/bootstrap/_carousel.scss +++ b/assets/stylesheets/bootstrap/_carousel.scss @@ -98,8 +98,11 @@ align-items: center; // 2. vertically center contents justify-content: center; // 3. horizontally center contents width: $carousel-control-width; + padding: 0; color: $carousel-control-color; text-align: center; + background: none; + border: 0; opacity: $carousel-control-opacity; @include transition($carousel-control-transition); @@ -147,10 +150,10 @@ background-image: escape-svg($carousel-control-next-icon-bg); } -// Optional indicator pips +// Optional indicator pips/controls // -// Add an ordered list with the following class and add a list item for each -// slide your carousel holds. +// Add a container (such as a list) with the following class and add an item (ideally a focusable control, +// like a button) with data-bs-target for each slide your carousel holds. .carousel-indicators { position: absolute; @@ -160,23 +163,26 @@ z-index: 2; display: flex; justify-content: center; - padding-left: 0; // override <ol> default + padding: 0; // Use the .carousel-control's width as margin so we don't overlay those margin-right: $carousel-control-width; + margin-bottom: 1rem; margin-left: $carousel-control-width; list-style: none; - li { + [data-bs-target] { box-sizing: content-box; flex: 0 1 auto; width: $carousel-indicator-width; height: $carousel-indicator-height; + padding: 0; margin-right: $carousel-indicator-spacer; margin-left: $carousel-indicator-spacer; text-indent: -999px; cursor: pointer; background-color: $carousel-indicator-active-bg; background-clip: padding-box; + border: 0; // Use transparent borders to increase the hit area by 10px on top and bottom. border-top: $carousel-indicator-hit-area-height solid transparent; border-bottom: $carousel-indicator-hit-area-height solid transparent; @@ -213,7 +219,7 @@ filter: $carousel-dark-control-icon-filter; } - .carousel-indicators li { + .carousel-indicators [data-bs-target] { background-color: $carousel-dark-indicator-active-bg; } diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss index db5d027..32a0f68 100644 --- a/assets/stylesheets/bootstrap/_close.scss +++ b/assets/stylesheets/bootstrap/_close.scss @@ -22,7 +22,7 @@ } &:focus { - outline: none; + outline: 0; box-shadow: $btn-close-focus-shadow; opacity: $btn-close-focus-opacity; } diff --git a/assets/stylesheets/bootstrap/_dropdown.scss b/assets/stylesheets/bootstrap/_dropdown.scss index f9ad977..b71058c 100644 --- a/assets/stylesheets/bootstrap/_dropdown.scss +++ b/assets/stylesheets/bootstrap/_dropdown.scss @@ -17,12 +17,11 @@ .dropdown-menu { position: absolute; top: 100%; - left: 0; z-index: $zindex-dropdown; display: none; // none by default, but block on "open" of the menu min-width: $dropdown-min-width; padding: $dropdown-padding-y $dropdown-padding-x; - margin: $dropdown-spacer 0 0; // override default ul + margin: 0; // Override default margin of ul @include font-size($dropdown-font-size); color: $dropdown-color; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) @@ -33,9 +32,9 @@ @include border-radius($dropdown-border-radius); @include box-shadow($dropdown-box-shadow); - // Reset positioning when positioned with Popper - &[style] { - right: auto !important; // stylelint-disable-line declaration-no-important + &[data-bs-popper] { + left: 0; + margin-top: $dropdown-spacer; } } @@ -49,14 +48,20 @@ .dropdown-menu#{$infix}-start { --bs-position: start; - right: auto #{"/* rtl:ignore */"}; - left: 0 #{"/* rtl:ignore */"}; + + &[data-bs-popper] { + right: auto #{"/* rtl:ignore */"}; + left: 0 #{"/* rtl:ignore */"}; + } } .dropdown-menu#{$infix}-end { --bs-position: end; - right: 0 #{"/* rtl:ignore */"}; - left: auto #{"/* rtl:ignore */"}; + + &[data-bs-popper] { + right: 0 #{"/* rtl:ignore */"}; + left: auto #{"/* rtl:ignore */"}; + } } } } @@ -68,8 +73,11 @@ .dropdown-menu { top: auto; bottom: 100%; - margin-top: 0; - margin-bottom: $dropdown-spacer; + + &[data-bs-popper] { + margin-top: 0; + margin-bottom: $dropdown-spacer; + } } .dropdown-toggle { @@ -82,8 +90,11 @@ top: 0; right: auto; left: 100%; - margin-top: 0; - margin-left: $dropdown-spacer; + + &[data-bs-popper] { + margin-top: 0; + margin-left: $dropdown-spacer; + } } .dropdown-toggle { @@ -99,8 +110,11 @@ top: 0; right: 100%; left: auto; - margin-top: 0; - margin-right: $dropdown-spacer; + + &[data-bs-popper] { + margin-top: 0; + margin-right: $dropdown-spacer; + } } .dropdown-toggle { diff --git a/assets/stylesheets/bootstrap/_list-group.scss b/assets/stylesheets/bootstrap/_list-group.scss index a95adc1..7e23b8e 100644 --- a/assets/stylesheets/bootstrap/_list-group.scss +++ b/assets/stylesheets/bootstrap/_list-group.scss @@ -152,12 +152,12 @@ // Organizationally, this must come after the `:hover` states. @each $state, $value in $theme-colors { - $background: shift-color($value, $list-group-item-bg-scale); - $color: shift-color($value, $list-group-item-color-scale); - @if (contrast-ratio($background, $color) < $min-contrast-ratio) { - $color: mix($value, color-contrast($background), abs($alert-color-scale)); + $list-group-background: shift-color($value, $list-group-item-bg-scale); + $list-group-color: shift-color($value, $list-group-item-color-scale); + @if (contrast-ratio($list-group-background, $list-group-color) < $min-contrast-ratio) { + $list-group-color: mix($value, color-contrast($list-group-background), abs($alert-color-scale)); } - @include list-group-item-variant($state, $background, $color); + @include list-group-item-variant($state, $list-group-background, $list-group-color); } // scss-docs-end list-group-modifiers diff --git a/assets/stylesheets/bootstrap/_nav.scss b/assets/stylesheets/bootstrap/_nav.scss index 30c2c81..2534f7f 100644 --- a/assets/stylesheets/bootstrap/_nav.scss +++ b/assets/stylesheets/bootstrap/_nav.scss @@ -43,12 +43,15 @@ .nav-link { margin-bottom: -$nav-tabs-border-width; + background: none; border: $nav-tabs-border-width solid transparent; @include border-top-radius($nav-tabs-border-radius); &:hover, &:focus { border-color: $nav-tabs-link-hover-border-color; + // Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link + isolation: isolate; } &.disabled { @@ -80,6 +83,8 @@ .nav-pills { .nav-link { + background: none; + border: 0; @include border-radius($nav-pills-border-radius); } diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss index 852328a..21126b4 100644 --- a/assets/stylesheets/bootstrap/_navbar.scss +++ b/assets/stylesheets/bootstrap/_navbar.scss @@ -109,10 +109,11 @@ // the default flexbox row orientation. Requires the use of `flex-wrap: wrap` // 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; - width: 100%; } // Button for toggling the navbar when in its collapsed state @@ -148,6 +149,11 @@ background-size: 100%; } +.navbar-nav-scroll { + max-height: var(--#{$variable-prefix}scroll-height, 75vh); + overflow-y: auto; +} + // Generate series of `.navbar-expand-*` responsive classes for configuring // where your navbar collapses. .navbar-expand { @@ -174,8 +180,13 @@ } } + .navbar-nav-scroll { + overflow: visible; + } + .navbar-collapse { display: flex !important; // stylelint-disable-line declaration-no-important + flex-basis: auto; } .navbar-toggler { diff --git a/assets/stylesheets/bootstrap/_pagination.scss b/assets/stylesheets/bootstrap/_pagination.scss index 04bf825..9c46666 100644 --- a/assets/stylesheets/bootstrap/_pagination.scss +++ b/assets/stylesheets/bootstrap/_pagination.scss @@ -56,9 +56,9 @@ @include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-border-radius); .pagination-lg { - @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $border-radius-lg); + @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg); } .pagination-sm { - @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $border-radius-sm); + @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm); } diff --git a/assets/stylesheets/bootstrap/_popover.scss b/assets/stylesheets/bootstrap/_popover.scss index e4f6860..a55555e 100644 --- a/assets/stylesheets/bootstrap/_popover.scss +++ b/assets/stylesheets/bootstrap/_popover.scss @@ -22,7 +22,6 @@ display: block; width: $popover-arrow-width; height: $popover-arrow-height; - margin: 0 $popover-border-radius; &::before, &::after { @@ -36,9 +35,6 @@ } .bs-popover-top { - // Overrule margin set by popper.js - margin-bottom: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important - > .popover-arrow { bottom: subtract(-$popover-arrow-height, $popover-border-width); @@ -57,14 +53,10 @@ } .bs-popover-end { - // Overrule margin set by popper.js - margin-left: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important - > .popover-arrow { left: subtract(-$popover-arrow-height, $popover-border-width); width: $popover-arrow-height; height: $popover-arrow-width; - margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners &::before { left: 0; @@ -81,9 +73,6 @@ } .bs-popover-bottom { - // Overrule margin set by popper.js - margin-top: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important - > .popover-arrow { top: subtract(-$popover-arrow-height, $popover-border-width); @@ -114,14 +103,10 @@ } .bs-popover-start { - // Overrule margin set by popper.js - margin-right: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important - > .popover-arrow { right: subtract(-$popover-arrow-height, $popover-border-width); width: $popover-arrow-height; height: $popover-arrow-width; - margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners &::before { right: 0; diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss index 50ba743..973b5d1 100644 --- a/assets/stylesheets/bootstrap/_reboot.scss +++ b/assets/stylesheets/bootstrap/_reboot.scss @@ -411,13 +411,13 @@ button { border-radius: 0; } -// Work around a Firefox bug where the transparent `button` background -// results in a loss of the default `button` focus styles. -// Credit https://github.com/suitcss/base/ +// Explicitly remove focus outline in Chromium when it shouldn't be +// visible (e.g. as result of mouse click or touch tap). It already +// should be doing this automatically, but seems to currently be +// confused and applies its very visible two-tone outline anyway. -button:focus { - outline: dotted 1px; - outline: -webkit-focus-ring-color auto 5px; +button:focus:not(:focus-visible) { + outline: 0; } // 1. Remove the margin in Firefox and Safari diff --git a/assets/stylesheets/bootstrap/_tables.scss b/assets/stylesheets/bootstrap/_tables.scss index 506c60b..5036829 100644 --- a/assets/stylesheets/bootstrap/_tables.scss +++ b/assets/stylesheets/bootstrap/_tables.scss @@ -25,8 +25,8 @@ > :not(caption) > * > * { padding: $table-cell-padding-y $table-cell-padding-x; background-color: var(--#{$variable-prefix}table-bg); - background-image: linear-gradient(var(--#{$variable-prefix}table-accent-bg), var(--#{$variable-prefix}table-accent-bg)); border-bottom-width: $table-border-width; + box-shadow: inset 0 0 0 9999px var(--#{$variable-prefix}table-accent-bg); } > tbody { diff --git a/assets/stylesheets/bootstrap/_toasts.scss b/assets/stylesheets/bootstrap/_toasts.scss index 7a1cf73..5c533d7 100644 --- a/assets/stylesheets/bootstrap/_toasts.scss +++ b/assets/stylesheets/bootstrap/_toasts.scss @@ -47,4 +47,5 @@ .toast-body { padding: $toast-padding-x; // apply to both vertical and horizontal + word-wrap: break-word; } diff --git a/assets/stylesheets/bootstrap/_utilities.scss b/assets/stylesheets/bootstrap/_utilities.scss index 89bf168..82f3db1 100644 --- a/assets/stylesheets/bootstrap/_utilities.scss +++ b/assets/stylesheets/bootstrap/_utilities.scss @@ -22,6 +22,7 @@ $utilities: map-merge( property: overflow, values: auto hidden visible scroll, ), + // scss-docs-start utils-display "display": ( responsive: true, print: true, @@ -29,6 +30,7 @@ $utilities: map-merge( class: d, values: inline inline-block block grid table table-row table-cell flex inline-flex none ), + // scss-docs-end utils-display "shadow": ( property: box-shadow, class: shadow, @@ -440,6 +442,7 @@ $utilities: map-merge( center: center, ) ), + // scss-docs-start utils-color "color": ( property: color, class: text, @@ -455,6 +458,7 @@ $utilities: map-merge( ) ) ), + // scss-docs-end utils-color "line-height": ( property: line-height, class: lh, @@ -465,6 +469,7 @@ $utilities: map-merge( lg: $line-height-lg, ) ), + // scss-docs-start utils-bg-color "background-color": ( property: background-color, class: bg, @@ -477,6 +482,7 @@ $utilities: map-merge( ) ) ), + // scss-docs-end utils-bg-color "gradient": ( property: background-image, class: bg, diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index d9acaca..3f80144 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -5,6 +5,7 @@ // Color system +// scss-docs-start gray-color-variables $white: #fff !default; $gray-100: #f8f9fa !default; $gray-200: #e9ecef !default; @@ -16,8 +17,10 @@ $gray-700: #495057 !default; $gray-800: #343a40 !default; $gray-900: #212529 !default; $black: #000 !default; +// scss-docs-end gray-color-variables // fusv-disable +// scss-docs-start gray-colors-map $grays: ( "100": $gray-100, "200": $gray-200, @@ -29,8 +32,10 @@ $grays: ( "800": $gray-800, "900": $gray-900 ) !default; +// scss-docs-end gray-colors-map // fusv-enable +// scss-docs-start color-variables $blue: #0d6efd !default; $indigo: #6610f2 !default; $purple: #6f42c1 !default; @@ -41,6 +46,7 @@ $yellow: #ffc107 !default; $green: #198754 !default; $teal: #20c997 !default; $cyan: #0dcaf0 !default; +// scss-docs-end color-variables // scss-docs-start colors-map $colors: ( @@ -60,6 +66,7 @@ $colors: ( ) !default; // scss-docs-end colors-map +// scss-docs-start theme-color-variables $primary: $blue !default; $secondary: $gray-600 !default; $success: $green !default; @@ -68,6 +75,7 @@ $warning: $yellow !default; $danger: $red !default; $light: $gray-100 !default; $dark: $gray-900 !default; +// scss-docs-end theme-color-variables // scss-docs-start theme-colors-map $theme-colors: ( @@ -228,7 +236,9 @@ $variable-prefix: bs- !default; // // The gradient which is added to components if `$enable-gradients` is `true` // This gradient is also added to elements with `.bg-gradient` +// scss-docs-start variable-gradient $gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default; +// scss-docs-end variable-gradient // Spacing // @@ -612,6 +622,15 @@ $btn-border-radius-lg: $border-radius-lg !default; $btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; +$btn-hover-bg-shade-amount: 15% !default; +$btn-hover-bg-tint-amount: 15% !default; +$btn-hover-border-shade-amount: 20% !default; +$btn-hover-border-tint-amount: 10% !default; +$btn-active-bg-shade-amount: 20% !default; +$btn-active-bg-tint-amount: 20% !default; +$btn-active-border-shade-amount: 25% !default; +$btn-active-border-tint-amount: 10% !default; + // Forms @@ -683,11 +702,11 @@ $form-check-padding-start: $form-check-input-width + .5em !defaul $form-check-margin-bottom: .125rem !default; $form-check-label-color: null !default; $form-check-label-cursor: null !default; -$form-check-transition: background-color .15s ease-in-out, background-position .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; +$form-check-transition: null !default; $form-check-input-active-filter: brightness(90%) !default; -$form-check-input-bg: $body-bg !default; +$form-check-input-bg: $input-bg !default; $form-check-input-border: 1px solid rgba(0, 0, 0, .25) !default; $form-check-input-border-radius: .25em !default; $form-check-radio-border-radius: 50% !default; @@ -714,6 +733,7 @@ $form-switch-width: 2em !default; $form-switch-padding-start: $form-switch-width + .5em !default; $form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default; $form-switch-border-radius: $form-switch-width !default; +$form-switch-transition: background-position .15s ease-in-out !default; $form-switch-focus-color: $input-focus-border-color !default; $form-switch-focus-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-focus-color}'/></svg>") !default; @@ -735,7 +755,7 @@ $form-select-padding-y: $input-padding-y !default; $form-select-padding-x: $input-padding-x !default; $form-select-font-family: $input-font-family !default; $form-select-font-size: $input-font-size !default; -$form-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator +$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image $form-select-font-weight: $input-font-weight !default; $form-select-line-height: $input-line-height !default; $form-select-color: $input-color !default; @@ -748,8 +768,8 @@ $form-select-bg-size: 16px 12px !default; // In pixels because ima $form-select-indicator-color: $gray-800 !default; $form-select-indicator: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-select-indicator-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>") !default; -$form-select-feedback-icon-padding-end: add(1em * .75, (2 * $form-select-padding-y * .75) + $form-select-padding-x + $form-select-indicator-padding) !default; -$form-select-feedback-icon-position: center right ($form-select-padding-x + $form-select-indicator-padding) !default; +$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default; +$form-select-feedback-icon-position: center right $form-select-indicator-padding !default; $form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default; $form-select-border-width: $input-border-width !default; @@ -929,12 +949,12 @@ $dropdown-box-shadow: $box-shadow !default; $dropdown-link-color: $gray-900 !default; $dropdown-link-hover-color: shade-color($gray-900, 10%) !default; -$dropdown-link-hover-bg: $gray-100 !default; +$dropdown-link-hover-bg: $gray-200 !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-500 !default; $dropdown-item-padding-y: $spacer / 4 !default; $dropdown-item-padding-x: $spacer !default; @@ -991,6 +1011,9 @@ $pagination-disabled-border-color: $gray-300 !default; $pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; +$pagination-border-radius-sm: $border-radius-sm !default; +$pagination-border-radius-lg: $border-radius-lg !default; + // Cards $card-spacer-y: $spacer !default; diff --git a/assets/stylesheets/bootstrap/bootstrap-utilities.scss b/assets/stylesheets/bootstrap/bootstrap-utilities.scss index 8d96cf9..6c818b6 100644 --- a/assets/stylesheets/bootstrap/bootstrap-utilities.scss +++ b/assets/stylesheets/bootstrap/bootstrap-utilities.scss @@ -1,18 +1,18 @@ /*! - * Bootstrap Utilities v5.0.0-beta1 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors - * Copyright 2011-2020 Twitter, Inc. + * Bootstrap Utilities v5.0.0-beta2 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ // Configuration - @import "functions"; @import "variables"; @import "mixins"; @import "utilities"; +// Helpers +@import "helpers"; // Utilities - @import "utilities/api"; diff --git a/assets/stylesheets/bootstrap/forms/_form-check.scss b/assets/stylesheets/bootstrap/forms/_form-check.scss index 1d6d873..b34250a 100644 --- a/assets/stylesheets/bootstrap/forms/_form-check.scss +++ b/assets/stylesheets/bootstrap/forms/_form-check.scss @@ -113,6 +113,7 @@ background-image: escape-svg($form-switch-bg-image); background-position: left center; @include border-radius($form-switch-border-radius); + @include transition($form-switch-transition); &:focus { background-image: escape-svg($form-switch-focus-bg-image); diff --git a/assets/stylesheets/bootstrap/forms/_form-range.scss b/assets/stylesheets/bootstrap/forms/_form-range.scss index b603a7b..ae1d841 100644 --- a/assets/stylesheets/bootstrap/forms/_form-range.scss +++ b/assets/stylesheets/bootstrap/forms/_form-range.scss @@ -12,7 +12,7 @@ appearance: none; &:focus { - outline: none; + outline: 0; // Pseudo-elements must be split across multiple rulesets to have an effect. // No box-shadow() mixin for focus accessibility. diff --git a/assets/stylesheets/bootstrap/forms/_form-select.scss b/assets/stylesheets/bootstrap/forms/_form-select.scss index 1866da9..15d5061 100644 --- a/assets/stylesheets/bootstrap/forms/_form-select.scss +++ b/assets/stylesheets/bootstrap/forms/_form-select.scss @@ -6,13 +6,12 @@ .form-select { display: block; width: 100%; - padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x; + padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x; font-family: $form-select-font-family; @include font-size($form-select-font-size); font-weight: $form-select-font-weight; line-height: $form-select-line-height; color: $form-select-color; - vertical-align: middle; background-color: $form-select-bg; background-image: escape-svg($form-select-indicator); background-repeat: no-repeat; diff --git a/assets/stylesheets/bootstrap/forms/_validation.scss b/assets/stylesheets/bootstrap/forms/_validation.scss index acd68f2..c48123a 100644 --- a/assets/stylesheets/bootstrap/forms/_validation.scss +++ b/assets/stylesheets/bootstrap/forms/_validation.scss @@ -7,6 +7,6 @@ // scss-docs-start form-validation-states-loop @each $state, $data in $form-validation-states { - @include form-validation-state($state, map-get($data, color), map-get($data, icon)); + @include form-validation-state($state, $data...); } // scss-docs-end form-validation-states-loop diff --git a/assets/stylesheets/bootstrap/helpers/_ratio.scss b/assets/stylesheets/bootstrap/helpers/_ratio.scss index 3c0ff33..2390ee3 100644 --- a/assets/stylesheets/bootstrap/helpers/_ratio.scss +++ b/assets/stylesheets/bootstrap/helpers/_ratio.scss @@ -6,7 +6,7 @@ &::before { display: block; - padding-top: var(--aspect-ratio); + padding-top: var(--#{$variable-prefix}aspect-ratio); content: ""; } @@ -21,6 +21,6 @@ @each $key, $ratio in $aspect-ratios { .ratio-#{$key} { - --aspect-ratio: #{$ratio}; + --#{$variable-prefix}aspect-ratio: #{$ratio}; } } diff --git a/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss b/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss index 0a843d3..4760ff0 100644 --- a/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +++ b/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss @@ -3,6 +3,6 @@ // .visually-hidden, -.visually-hidden-focusable:not(:focus) { +.visually-hidden-focusable:not(:focus):not(:focus-within) { @include visually-hidden(); } diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss index 3aabd89..3fbd708 100644 --- a/assets/stylesheets/bootstrap/mixins/_buttons.scss +++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss @@ -7,11 +7,11 @@ $background, $border, $color: color-contrast($background), - $hover-background: if($color == $color-contrast-light, shade-color($background, 15%), tint-color($background, 15%)), - $hover-border: if($color == $color-contrast-light, shade-color($border, 20%), tint-color($border, 10%)), + $hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)), + $hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)), $hover-color: color-contrast($hover-background), - $active-background: if($color == $color-contrast-light, shade-color($background, 20%), tint-color($background, 20%)), - $active-border: if($color == $color-contrast-light, shade-color($border, 25%), tint-color($border, 10%)), + $active-background: if($color == $color-contrast-light, shade-color($background,$btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)), + $active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)), $active-color: color-contrast($active-background), $disabled-background: $background, $disabled-border: $border, diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss index 5e4cfd4..8be4d2e 100644 --- a/assets/stylesheets/bootstrap/mixins/_forms.scss +++ b/assets/stylesheets/bootstrap/mixins/_forms.scss @@ -13,7 +13,14 @@ } } -@mixin form-validation-state($state, $color, $icon) { +@mixin form-validation-state( + $state, + $color, + $icon, + $tooltip-color: color-contrast($color), + $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity), + $focus-box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity) +) { .#{$state}-feedback { display: none; width: 100%; @@ -33,8 +40,8 @@ margin-top: .1rem; @include font-size($form-feedback-tooltip-font-size); line-height: $form-feedback-tooltip-line-height; - color: color-contrast($color); - background-color: rgba($color, $form-feedback-tooltip-opacity); + color: $tooltip-color; + background-color: $tooltip-bg-color; @include border-radius($form-feedback-tooltip-border-radius); } @@ -59,7 +66,7 @@ &:focus { border-color: $color; - box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity); + box-shadow: $focus-box-shadow; } } } @@ -87,7 +94,7 @@ &:focus { border-color: $color; - box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + box-shadow: $focus-box-shadow; } } } @@ -101,7 +108,7 @@ } &:focus { - box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + box-shadow: $focus-box-shadow; } ~ .form-check-label { diff --git a/assets/stylesheets/bootstrap/mixins/_gradients.scss b/assets/stylesheets/bootstrap/mixins/_gradients.scss index ec38ca1..44167d1 100644 --- a/assets/stylesheets/bootstrap/mixins/_gradients.scss +++ b/assets/stylesheets/bootstrap/mixins/_gradients.scss @@ -1,5 +1,6 @@ // Gradients +// scss-docs-start gradient-bg-mixin @mixin gradient-bg($color: null) { background-color: $color; @@ -7,7 +8,9 @@ background-image: var(--#{$variable-prefix}gradient); } } +// scss-docs-end gradient-bg-mixin +// scss-docs-start gradient-mixins // Horizontal gradient, from left to right // // Creates two color stops, start and end, by specifying a color and position for each color stop. @@ -41,3 +44,4 @@ @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) { background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent); } +// scss-docs-end gradient-mixins diff --git a/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss b/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss index d980696..ed7bc9c 100644 --- a/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +++ b/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss @@ -17,12 +17,13 @@ border: 0 !important; } -// Use to only display content when it's focused. +// Use to only display content when it's focused, or one of its child elements is focused +// (i.e. when focus is within the element/container that the class was applied to) // // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 @mixin visually-hidden-focusable() { - &:not(:focus) { + &:not(:focus):not(:focus-within) { @include visually-hidden(); } } diff --git a/assets/stylesheets/bootstrap/utilities/_api.scss b/assets/stylesheets/bootstrap/utilities/_api.scss index f1545b9..62e1d39 100644 --- a/assets/stylesheets/bootstrap/utilities/_api.scss +++ b/assets/stylesheets/bootstrap/utilities/_api.scss @@ -26,7 +26,7 @@ @each $key, $utility in $utilities { // The utility can be disabled with `false`, thus check if the utility is a map first // Only proceed if responsive media queries are enabled or if it's the base media query - @if type-of($utility) == "map" and map-get($utility, rfs) { + @if type-of($utility) == "map" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == "") { @include generate-utility($utility, $infix, true); } } diff --git a/lib/bootstrap/version.rb b/lib/bootstrap/version.rb index 61f1e7b..f071231 100644 --- a/lib/bootstrap/version.rb +++ b/lib/bootstrap/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Bootstrap - VERSION = '5.0.0.beta1' - BOOTSTRAP_SHA = '63f3d939eaceeb84dcc77a7392953bcc8c5bc0a3' + VERSION = '5.0.0.beta2' + BOOTSTRAP_SHA = 'e50c11b8c6434b6d68ea5897771e4d35fe12f5c3' end diff --git a/tasks/updater/js.rb b/tasks/updater/js.rb index 407f03f..4337170 100644 --- a/tasks/updater/js.rb +++ b/tasks/updater/js.rb @@ -2,7 +2,7 @@ require 'tsort' class Updater module Js - INLINED_SRCS = %w[base-component.js util/index.js util/sanitizer.js].freeze + INLINED_SRCS = %w[util/index.js util/sanitizer.js].freeze def update_javascript_assets log_status 'Updating javascripts...' |