From e233094d2cd473fc8694de67ed93565b5ec0c39d Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 9 Jan 2021 19:51:56 +0000 Subject: [PATCH] Revert "refactor: format code" This reverts commit 067b2a7f Github Action didn't pick up ignored file list. --- wowchemy/assets/css/reveal.css | 2 +- .../assets/js/_vendor/bootstrap.bundle.js | 1907 +++++++---------- wowchemy/assets/js/wowchemy-search.js | 2 +- .../assets/scss/_vendor/bootstrap/_alert.scss | 8 +- .../scss/_vendor/bootstrap/_button-group.scss | 28 +- .../scss/_vendor/bootstrap/_buttons.scss | 26 +- .../assets/scss/_vendor/bootstrap/_card.scss | 5 + .../scss/_vendor/bootstrap/_carousel.scss | 10 +- .../assets/scss/_vendor/bootstrap/_close.scss | 4 +- .../scss/_vendor/bootstrap/_custom-forms.scss | 37 +- .../scss/_vendor/bootstrap/_dropdown.scss | 8 +- .../assets/scss/_vendor/bootstrap/_forms.scss | 8 +- .../scss/_vendor/bootstrap/_functions.scss | 23 +- .../assets/scss/_vendor/bootstrap/_grid.scss | 3 +- .../scss/_vendor/bootstrap/_images.scss | 1 + .../scss/_vendor/bootstrap/_input-group.scss | 33 +- .../scss/_vendor/bootstrap/_list-group.scss | 5 + .../scss/_vendor/bootstrap/_mixins.scss | 64 +- .../assets/scss/_vendor/bootstrap/_modal.scss | 19 +- .../assets/scss/_vendor/bootstrap/_nav.scss | 3 + .../scss/_vendor/bootstrap/_navbar.scss | 8 +- .../scss/_vendor/bootstrap/_pagination.scss | 17 +- .../scss/_vendor/bootstrap/_popover.scss | 13 +- .../assets/scss/_vendor/bootstrap/_print.scss | 2 +- .../scss/_vendor/bootstrap/_progress.scss | 8 +- .../scss/_vendor/bootstrap/_reboot.scss | 78 +- .../scss/_vendor/bootstrap/_spinners.scss | 8 +- .../scss/_vendor/bootstrap/_tables.scss | 12 +- .../scss/_vendor/bootstrap/_tooltip.scss | 14 +- .../assets/scss/_vendor/bootstrap/_type.scss | 50 +- .../scss/_vendor/bootstrap/_utilities.scss | 34 +- .../scss/_vendor/bootstrap/_variables.scss | 1422 ++++++------ .../scss/_vendor/bootstrap/_vendor/_rfs.scss | 59 +- .../_vendor/bootstrap/bootstrap-grid.scss | 18 +- .../_vendor/bootstrap/bootstrap-reboot.scss | 8 +- .../scss/_vendor/bootstrap/bootstrap.scss | 74 +- .../bootstrap/mixins/_background-variant.scss | 2 +- .../scss/_vendor/bootstrap/mixins/_badge.scss | 2 +- .../bootstrap/mixins/_border-radius.scss | 3 +- .../_vendor/bootstrap/mixins/_box-shadow.scss | 4 +- .../bootstrap/mixins/_breakpoints.scss | 4 +- .../_vendor/bootstrap/mixins/_buttons.scss | 30 +- .../scss/_vendor/bootstrap/mixins/_caret.scss | 4 +- .../_vendor/bootstrap/mixins/_clearfix.scss | 2 +- .../scss/_vendor/bootstrap/mixins/_float.scss | 6 +- .../scss/_vendor/bootstrap/mixins/_forms.scss | 21 +- .../_vendor/bootstrap/mixins/_gradients.scss | 13 +- .../bootstrap/mixins/_grid-framework.scss | 15 +- .../scss/_vendor/bootstrap/mixins/_grid.scss | 1 + .../scss/_vendor/bootstrap/mixins/_hover.scss | 4 +- .../scss/_vendor/bootstrap/mixins/_image.scss | 9 +- .../bootstrap/mixins/_nav-divider.scss | 2 +- .../scss/_vendor/bootstrap/mixins/_size.scss | 2 +- .../bootstrap/mixins/_text-emphasis.scss | 2 +- .../_vendor/bootstrap/mixins/_text-hide.scss | 2 +- .../_vendor/bootstrap/mixins/_visibility.scss | 2 +- .../_vendor/bootstrap/utilities/_align.scss | 24 +- .../bootstrap/utilities/_background.scss | 4 +- .../_vendor/bootstrap/utilities/_borders.scss | 40 +- .../_vendor/bootstrap/utilities/_display.scss | 9 +- .../_vendor/bootstrap/utilities/_embed.scss | 2 +- .../_vendor/bootstrap/utilities/_flex.scss | 136 +- .../_vendor/bootstrap/utilities/_float.scss | 12 +- .../bootstrap/utilities/_overflow.scss | 4 +- .../bootstrap/utilities/_position.scss | 4 +- .../_vendor/bootstrap/utilities/_shadows.scss | 16 +- .../_vendor/bootstrap/utilities/_sizing.scss | 28 +- .../_vendor/bootstrap/utilities/_spacing.scss | 12 +- .../bootstrap/utilities/_stretched-link.scss | 2 +- .../_vendor/bootstrap/utilities/_text.scss | 98 +- .../js/vendor/reveal.js/plugin/notes/notes.js | 144 +- 71 files changed, 2086 insertions(+), 2600 deletions(-) diff --git a/wowchemy/assets/css/reveal.css b/wowchemy/assets/css/reveal.css index 7283295a..ca174e39 100644 --- a/wowchemy/assets/css/reveal.css +++ b/wowchemy/assets/css/reveal.css @@ -27,5 +27,5 @@ border: 0; margin: 0; padding: 1px 0; - font-family: MJXc-TeX-math-I, MJXc-TeX-math-Ix, MJXc-TeX-math-Iw; + font-family: MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw; } diff --git a/wowchemy/assets/js/_vendor/bootstrap.bundle.js b/wowchemy/assets/js/_vendor/bootstrap.bundle.js index 7ea880a1..d9236dac 100644 --- a/wowchemy/assets/js/_vendor/bootstrap.bundle.js +++ b/wowchemy/assets/js/_vendor/bootstrap.bundle.js @@ -1,16 +1,13 @@ /*! - * Bootstrap v4.5.0 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ + * Bootstrap v4.5.0 (https://getbootstrap.com/) + * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports, require('jquery')) - : typeof define === 'function' && define.amd - ? define(['exports', 'jquery'], factory) - : ((global = global || self), factory((global.bootstrap = {}), global.jQuery)); -})(this, function (exports, $) { - 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : + typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : + (global = global || self, factory(global.bootstrap = {}, global.jQuery)); +}(this, (function (exports, $) { 'use strict'; $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; @@ -19,7 +16,7 @@ var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; - if ('value' in descriptor) descriptor.writable = true; + if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } @@ -36,7 +33,7 @@ value: value, enumerable: true, configurable: true, - writable: true, + writable: true }); } else { obj[key] = value; @@ -50,10 +47,9 @@ if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) - symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); keys.push.apply(keys, symbols); } @@ -104,13 +100,10 @@ function toType(obj) { if (obj === null || typeof obj === 'undefined') { - return '' + obj; + return "" + obj; } - return {}.toString - .call(obj) - .match(/\s([a-z]+)/i)[1] - .toLowerCase(); + return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); } function getSpecialTransitionEndEvent() { @@ -123,7 +116,7 @@ } return undefined; - }, + } }; } @@ -152,6 +145,7 @@ * -------------------------------------------------------------------------- */ + var Util = { TRANSITION_END: 'bsTransitionEnd', getUID: function getUID(prefix) { @@ -181,6 +175,7 @@ return 0; } // Get transition-duration of the element + var transitionDuration = $(element).css('transition-duration'); var transitionDelay = $(element).css('transition-delay'); var floatTransitionDuration = parseFloat(transitionDuration); @@ -190,6 +185,7 @@ return 0; } // If multiple durations are defined, take the first + transitionDuration = transitionDuration.split(',')[0]; transitionDelay = transitionDelay.split(',')[0]; return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; @@ -215,12 +211,7 @@ var valueType = value && Util.isElement(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { - throw new Error( - componentName.toUpperCase() + - ': ' + - ('Option "' + property + '" provided type "' + valueType + '" ') + - ('but expected type "' + expectedTypes + '".'), - ); + throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); } } } @@ -230,6 +221,7 @@ return null; } // Can find the shadow root otherwise it'll return the document + if (typeof element.getRootNode === 'function') { var root = element.getRootNode(); return root instanceof ShadowRoot ? root : null; @@ -239,6 +231,7 @@ return element; } // when we don't find a shadow root + if (!element.parentNode) { return null; } @@ -247,9 +240,7 @@ }, jQueryDetection: function jQueryDetection() { if (typeof $ === 'undefined') { - throw new TypeError( - "Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.", - ); + throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); } var version = $.fn.jquery.split(' ')[0].split('.'); @@ -259,14 +250,10 @@ var minPatch = 1; var maxMajor = 4; - if ( - (version[0] < ltMajor && version[1] < minMinor) || - (version[0] === minMajor && version[1] === minMinor && version[2] < minPatch) || - version[0] >= maxMajor - ) { - throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0"); + if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { + throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); } - }, + } }; Util.jQueryDetection(); setTransitionEndSupport(); @@ -280,13 +267,13 @@ var NAME = 'alert'; var VERSION = '4.5.0'; var DATA_KEY = 'bs.alert'; - var EVENT_KEY = '.' + DATA_KEY; + var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; var JQUERY_NO_CONFLICT = $.fn[NAME]; var SELECTOR_DISMISS = '[data-dismiss="alert"]'; - var EVENT_CLOSE = 'close' + EVENT_KEY; - var EVENT_CLOSED = 'closed' + EVENT_KEY; - var EVENT_CLICK_DATA_API = 'click' + EVENT_KEY + DATA_API_KEY; + var EVENT_CLOSE = "close" + EVENT_KEY; + var EVENT_CLOSED = "closed" + EVENT_KEY; + var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; var CLASS_NAME_ALERT = 'alert'; var CLASS_NAME_FADE = 'fade'; var CLASS_NAME_SHOW = 'show'; @@ -296,11 +283,12 @@ * ------------------------------------------------------------------------ */ - var Alert = /*#__PURE__*/ (function () { + var Alert = /*#__PURE__*/function () { function Alert(element) { this._element = element; } // Getters + var _proto = Alert.prototype; // Public @@ -323,7 +311,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Private + } // Private + ; _proto._getRootElement = function _getRootElement(element) { var selector = Util.getSelectorFromElement(element); @@ -334,7 +323,7 @@ } if (!parent) { - parent = $(element).closest('.' + CLASS_NAME_ALERT)[0]; + parent = $(element).closest("." + CLASS_NAME_ALERT)[0]; } return parent; @@ -358,16 +347,15 @@ } var transitionDuration = Util.getTransitionDurationFromElement(element); - $(element) - .one(Util.TRANSITION_END, function (event) { - return _this._destroyElement(element, event); - }) - .emulateTransitionEnd(transitionDuration); + $(element).one(Util.TRANSITION_END, function (event) { + return _this._destroyElement(element, event); + }).emulateTransitionEnd(transitionDuration); }; _proto._destroyElement = function _destroyElement(element) { $(element).detach().trigger(EVENT_CLOSED).remove(); - }; // Static + } // Static + ; Alert._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -395,23 +383,22 @@ }; }; - _createClass(Alert, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION; - }, - }, - ]); + _createClass(Alert, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); return Alert; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ + $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert())); /** * ------------------------------------------------------------------------ @@ -436,7 +423,7 @@ var NAME$1 = 'button'; var VERSION$1 = '4.5.0'; var DATA_KEY$1 = 'bs.button'; - var EVENT_KEY$1 = '.' + DATA_KEY$1; + var EVENT_KEY$1 = "." + DATA_KEY$1; var DATA_API_KEY$1 = '.data-api'; var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1]; var CLASS_NAME_ACTIVE = 'active'; @@ -449,21 +436,21 @@ var SELECTOR_INPUT = 'input:not([type="hidden"])'; var SELECTOR_ACTIVE = '.active'; var SELECTOR_BUTTON = '.btn'; - var EVENT_CLICK_DATA_API$1 = 'click' + EVENT_KEY$1 + DATA_API_KEY$1; - var EVENT_FOCUS_BLUR_DATA_API = - 'focus' + EVENT_KEY$1 + DATA_API_KEY$1 + ' ' + ('blur' + EVENT_KEY$1 + DATA_API_KEY$1); - var EVENT_LOAD_DATA_API = 'load' + EVENT_KEY$1 + DATA_API_KEY$1; + var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1; + var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1); + var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$1 + DATA_API_KEY$1; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ - var Button = /*#__PURE__*/ (function () { + var Button = /*#__PURE__*/function () { function Button(element) { this._element = element; } // Getters + var _proto = Button.prototype; // Public @@ -516,7 +503,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$1); this._element = null; - }; // Static + } // Static + ; Button._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -533,54 +521,51 @@ }); }; - _createClass(Button, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$1; - }, - }, - ]); + _createClass(Button, null, [{ + key: "VERSION", + get: function get() { + return VERSION$1; + } + }]); return Button; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ - $(document) - .on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE_CARROT, function (event) { - var button = event.target; - var initialButton = button; - if (!$(button).hasClass(CLASS_NAME_BUTTON)) { - button = $(button).closest(SELECTOR_BUTTON)[0]; - } + $(document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE_CARROT, function (event) { + var button = event.target; + var initialButton = button; - if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) { + if (!$(button).hasClass(CLASS_NAME_BUTTON)) { + button = $(button).closest(SELECTOR_BUTTON)[0]; + } + + if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) { + event.preventDefault(); // work around Firefox bug #1540995 + } else { + var inputBtn = button.querySelector(SELECTOR_INPUT); + + if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) { event.preventDefault(); // work around Firefox bug #1540995 - } else { - var inputBtn = button.querySelector(SELECTOR_INPUT); - if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) { - event.preventDefault(); // work around Firefox bug #1540995 - - return; - } - - if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') { - event.preventDefault(); // work around event sent to label and input - } - - Button._jQueryInterface.call($(button), 'toggle'); + return; } - }) - .on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { - var button = $(event.target).closest(SELECTOR_BUTTON)[0]; - $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type)); - }); + + if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') { + event.preventDefault(); // work around event sent to label and input + } + + Button._jQueryInterface.call($(button), 'toggle'); + } + }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(SELECTOR_BUTTON)[0]; + $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type)); + }); $(window).on(EVENT_LOAD_DATA_API, function () { // ensure correct active class is set to match the controls' actual values/states // find all checkboxes/readio buttons inside data-toggle groups @@ -597,6 +582,7 @@ } } // find all button toggles + buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE)); for (var _i = 0, _len = buttons.length; _i < _len; _i++) { @@ -632,7 +618,7 @@ var NAME$2 = 'carousel'; var VERSION$2 = '4.5.0'; var DATA_KEY$2 = 'bs.carousel'; - var EVENT_KEY$2 = '.' + DATA_KEY$2; + var EVENT_KEY$2 = "." + DATA_KEY$2; var DATA_API_KEY$2 = '.data-api'; var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2]; var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key @@ -648,7 +634,7 @@ slide: false, pause: 'hover', wrap: true, - touch: true, + touch: true }; var DefaultType = { interval: '(number|boolean)', @@ -656,25 +642,25 @@ slide: '(boolean|string)', pause: '(string|boolean)', wrap: 'boolean', - touch: 'boolean', + touch: 'boolean' }; var DIRECTION_NEXT = 'next'; var DIRECTION_PREV = 'prev'; var DIRECTION_LEFT = 'left'; var DIRECTION_RIGHT = 'right'; - var EVENT_SLIDE = 'slide' + EVENT_KEY$2; - var EVENT_SLID = 'slid' + EVENT_KEY$2; - var EVENT_KEYDOWN = 'keydown' + EVENT_KEY$2; - var EVENT_MOUSEENTER = 'mouseenter' + EVENT_KEY$2; - var EVENT_MOUSELEAVE = 'mouseleave' + EVENT_KEY$2; - var EVENT_TOUCHSTART = 'touchstart' + EVENT_KEY$2; - var EVENT_TOUCHMOVE = 'touchmove' + EVENT_KEY$2; - var EVENT_TOUCHEND = 'touchend' + EVENT_KEY$2; - var EVENT_POINTERDOWN = 'pointerdown' + EVENT_KEY$2; - var EVENT_POINTERUP = 'pointerup' + EVENT_KEY$2; - var EVENT_DRAG_START = 'dragstart' + EVENT_KEY$2; - var EVENT_LOAD_DATA_API$1 = 'load' + EVENT_KEY$2 + DATA_API_KEY$2; - var EVENT_CLICK_DATA_API$2 = 'click' + EVENT_KEY$2 + DATA_API_KEY$2; + var EVENT_SLIDE = "slide" + EVENT_KEY$2; + var EVENT_SLID = "slid" + EVENT_KEY$2; + var EVENT_KEYDOWN = "keydown" + EVENT_KEY$2; + var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$2; + var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$2; + var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$2; + var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$2; + var EVENT_TOUCHEND = "touchend" + EVENT_KEY$2; + var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2; + var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2; + var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2; + var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$2 + DATA_API_KEY$2; + var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2; var CLASS_NAME_CAROUSEL = 'carousel'; var CLASS_NAME_ACTIVE$1 = 'active'; var CLASS_NAME_SLIDE = 'slide'; @@ -693,7 +679,7 @@ var SELECTOR_DATA_RIDE = '[data-ride="carousel"]'; var PointerType = { TOUCH: 'touch', - PEN: 'pen', + PEN: 'pen' }; /** * ------------------------------------------------------------------------ @@ -701,7 +687,7 @@ * ------------------------------------------------------------------------ */ - var Carousel = /*#__PURE__*/ (function () { + var Carousel = /*#__PURE__*/function () { function Carousel(element, config) { this._items = null; this._interval = null; @@ -720,6 +706,7 @@ this._addEventListeners(); } // Getters + var _proto = Carousel.prototype; // Public @@ -768,10 +755,7 @@ } if (this._config.interval && !this._isPaused) { - this._interval = setInterval( - (document.visibilityState ? this.nextWhenVisible : this.next).bind(this), - this._config.interval, - ); + this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); } }; @@ -815,7 +799,8 @@ this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; - }; // Private + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread2(_objectSpread2({}, Default), config); @@ -837,6 +822,7 @@ this.prev(); } // swipe right + if (direction < 0) { this.next(); } @@ -852,13 +838,11 @@ } if (this._config.pause === 'hover') { - $(this._element) - .on(EVENT_MOUSEENTER, function (event) { - return _this2.pause(event); - }) - .on(EVENT_MOUSELEAVE, function (event) { - return _this2.cycle(event); - }); + $(this._element).on(EVENT_MOUSEENTER, function (event) { + return _this2.pause(event); + }).on(EVENT_MOUSELEAVE, function (event) { + return _this2.cycle(event); + }); } if (this._config.touch) { @@ -962,8 +946,7 @@ }; _proto._getItemIndex = function _getItemIndex(element) { - this._items = - element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : []; + this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : []; return this._items.indexOf(element); }; @@ -974,7 +957,7 @@ var activeIndex = this._getItemIndex(activeElement); var lastItemIndex = this._items.length - 1; - var isGoingToWrap = (isPrevDirection && activeIndex === 0) || (isNextDirection && activeIndex === lastItemIndex); + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; if (isGoingToWrap && !this._config.wrap) { return activeElement; @@ -994,7 +977,7 @@ relatedTarget: relatedTarget, direction: eventDirectionName, from: fromIndex, - to: targetIndex, + to: targetIndex }); $(this._element).trigger(slideEvent); return slideEvent; @@ -1020,7 +1003,7 @@ var activeElementIndex = this._getItemIndex(activeElement); - var nextElement = element || (activeElement && this._getItemByDirection(direction, activeElement)); + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); var nextElementIndex = this._getItemIndex(nextElement); @@ -1067,7 +1050,7 @@ relatedTarget: nextElement, direction: eventDirectionName, from: activeElementIndex, - to: nextElementIndex, + to: nextElementIndex }); if ($(this._element).hasClass(CLASS_NAME_SLIDE)) { @@ -1085,18 +1068,14 @@ } var transitionDuration = Util.getTransitionDurationFromElement(activeElement); - $(activeElement) - .one(Util.TRANSITION_END, function () { - $(nextElement) - .removeClass(directionalClassName + ' ' + orderClassName) - .addClass(CLASS_NAME_ACTIVE$1); - $(activeElement).removeClass(CLASS_NAME_ACTIVE$1 + ' ' + orderClassName + ' ' + directionalClassName); - _this4._isSliding = false; - setTimeout(function () { - return $(_this4._element).trigger(slidEvent); - }, 0); - }) - .emulateTransitionEnd(transitionDuration); + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$1); + $(activeElement).removeClass(CLASS_NAME_ACTIVE$1 + " " + orderClassName + " " + directionalClassName); + _this4._isSliding = false; + setTimeout(function () { + return $(_this4._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(transitionDuration); } else { $(activeElement).removeClass(CLASS_NAME_ACTIVE$1); $(nextElement).addClass(CLASS_NAME_ACTIVE$1); @@ -1107,7 +1086,8 @@ if (isCycling) { this.cycle(); } - }; // Static + } // Static + ; Carousel._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -1130,7 +1110,7 @@ data.to(config); } else if (typeof action === 'string') { if (typeof data[action] === 'undefined') { - throw new TypeError('No method named "' + action + '"'); + throw new TypeError("No method named \"" + action + "\""); } data[action](); @@ -1171,29 +1151,27 @@ event.preventDefault(); }; - _createClass(Carousel, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$2; - }, - }, - { - key: 'Default', - get: function get() { - return Default; - }, - }, - ]); + _createClass(Carousel, null, [{ + key: "VERSION", + get: function get() { + return VERSION$2; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); return Carousel; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ + $(document).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler); $(window).on(EVENT_LOAD_DATA_API$1, function () { var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE)); @@ -1227,22 +1205,22 @@ var NAME$3 = 'collapse'; var VERSION$3 = '4.5.0'; var DATA_KEY$3 = 'bs.collapse'; - var EVENT_KEY$3 = '.' + DATA_KEY$3; + var EVENT_KEY$3 = "." + DATA_KEY$3; var DATA_API_KEY$3 = '.data-api'; var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3]; var Default$1 = { toggle: true, - parent: '', + parent: '' }; var DefaultType$1 = { toggle: 'boolean', - parent: '(string|element)', + parent: '(string|element)' }; - var EVENT_SHOW = 'show' + EVENT_KEY$3; - var EVENT_SHOWN = 'shown' + EVENT_KEY$3; - 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 EVENT_SHOW = "show" + EVENT_KEY$3; + var EVENT_SHOWN = "shown" + EVENT_KEY$3; + 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$1 = 'show'; var CLASS_NAME_COLLAPSE = 'collapse'; var CLASS_NAME_COLLAPSING = 'collapsing'; @@ -1257,19 +1235,12 @@ * ------------------------------------------------------------------------ */ - var Collapse = /*#__PURE__*/ (function () { + var Collapse = /*#__PURE__*/function () { function Collapse(element, config) { this._isTransitioning = false; this._element = element; this._config = this._getConfig(config); - this._triggerArray = [].slice.call( - document.querySelectorAll( - '[data-toggle="collapse"][href="#' + - element.id + - '"],' + - ('[data-toggle="collapse"][data-target="#' + element.id + '"]'), - ), - ); + this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$1)); for (var i = 0, len = toggleList.length; i < len; i++) { @@ -1297,6 +1268,7 @@ } } // Getters + var _proto = Collapse.prototype; // Public @@ -1367,9 +1339,7 @@ this.setTransitioning(true); var complete = function complete() { - $(_this._element) - .removeClass(CLASS_NAME_COLLAPSING) - .addClass(CLASS_NAME_COLLAPSE + ' ' + CLASS_NAME_SHOW$1); + $(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1); _this._element.style[dimension] = ''; _this.setTransitioning(false); @@ -1378,10 +1348,10 @@ }; var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); - var scrollSize = 'scroll' + capitalizedDimension; + var scrollSize = "scroll" + capitalizedDimension; var transitionDuration = Util.getTransitionDurationFromElement(this._element); $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - this._element.style[dimension] = this._element[scrollSize] + 'px'; + this._element.style[dimension] = this._element[scrollSize] + "px"; }; _proto.hide = function hide() { @@ -1400,11 +1370,9 @@ var dimension = this._getDimension(); - this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + 'px'; + this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; Util.reflow(this._element); - $(this._element) - .addClass(CLASS_NAME_COLLAPSING) - .removeClass(CLASS_NAME_COLLAPSE + ' ' + CLASS_NAME_SHOW$1); + $(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1); var triggerArrayLength = this._triggerArray.length; if (triggerArrayLength > 0) { @@ -1446,7 +1414,8 @@ this._element = null; this._triggerArray = null; this._isTransitioning = null; - }; // Private + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread2(_objectSpread2({}, Default$1), config); @@ -1476,7 +1445,7 @@ parent = document.querySelector(this._config.parent); } - var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; + var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; var children = [].slice.call(parent.querySelectorAll(selector)); $(children).each(function (i, element) { _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); @@ -1490,7 +1459,8 @@ if (triggerArray.length) { $(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } - }; // Static + } // Static + ; Collapse._getTargetFromElement = function _getTargetFromElement(element) { var selector = Util.getSelectorFromElement(element); @@ -1502,10 +1472,7 @@ var $this = $(this); var data = $this.data(DATA_KEY$3); - var _config = _objectSpread2( - _objectSpread2(_objectSpread2({}, Default$1), $this.data()), - typeof config === 'object' && config ? config : {}, - ); + var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$1), $this.data()), typeof config === 'object' && config ? config : {}); if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { _config.toggle = false; @@ -1518,7 +1485,7 @@ if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new TypeError('No method named "' + config + '"'); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -1526,29 +1493,27 @@ }); }; - _createClass(Collapse, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$3; - }, - }, - { - key: 'Default', - get: function get() { - return Default$1; - }, - }, - ]); + _createClass(Collapse, null, [{ + key: "VERSION", + get: function get() { + return VERSION$3; + } + }, { + key: "Default", + get: function get() { + return Default$1; + } + }]); return Collapse; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ + $(document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) { // preventDefault only for elements (which change the URL) not inside the collapsible element if (event.currentTarget.tagName === 'A') { @@ -1606,7 +1571,7 @@ */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined'; - var timeoutDuration = (function () { + var timeoutDuration = function () { var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { @@ -1614,7 +1579,7 @@ } } return 0; - })(); + }(); function microtaskDebounce(fn) { var called = false; @@ -1646,14 +1611,14 @@ var supportsMicroTasks = isBrowser && window.Promise; /** - * Create a debounced version of a method, that's asynchronously deferred - * but called in the minimum time possible. - * - * @method - * @memberof Popper.Utils - * @argument {Function} fn - * @returns {Function} - */ + * Create a debounced version of a method, that's asynchronously deferred + * but called in the minimum time possible. + * + * @method + * @memberof Popper.Utils + * @argument {Function} fn + * @returns {Function} + */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** @@ -1723,9 +1688,9 @@ // Firefox want us to check `-x` and `-y` variations as well var _getStyleComputedProp = getStyleComputedProperty(element), - overflow = _getStyleComputedProp.overflow, - overflowX = _getStyleComputedProp.overflowX, - overflowY = _getStyleComputedProp.overflowY; + overflow = _getStyleComputedProp.overflow, + overflowX = _getStyleComputedProp.overflowX, + overflowY = _getStyleComputedProp.overflowY; if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; @@ -1794,10 +1759,7 @@ // .offsetParent will return the closest TH, TD or TABLE in case // no offsetParent is present, I hate this job... - if ( - ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && - getStyleComputedProperty(offsetParent, 'position') === 'static' - ) { + if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { return getOffsetParent(offsetParent); } @@ -1855,7 +1817,7 @@ // Both nodes are inside #document - if ((element1 !== commonAncestorContainer && element2 !== commonAncestorContainer) || start.contains(end)) { + if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { if (isOffsetContainer(commonAncestorContainer)) { return commonAncestorContainer; } @@ -1935,18 +1897,7 @@ } function getSize(axis, body, html, computedStyle) { - return Math.max( - body['offset' + axis], - body['scroll' + axis], - html['client' + axis], - html['offset' + axis], - html['scroll' + axis], - isIE(10) - ? parseInt(html['offset' + axis]) + - parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + - parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) - : 0, - ); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); } function getWindowSizes(document) { @@ -1956,23 +1907,23 @@ return { height: getSize('Height', body, html, computedStyle), - width: getSize('Width', body, html, computedStyle), + width: getSize('Width', body, html, computedStyle) }; } var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { - throw new TypeError('Cannot call a class as a function'); + throw new TypeError("Cannot call a class as a function"); } }; - var createClass = (function () { + var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; - if ('value' in descriptor) descriptor.writable = true; + if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } @@ -1982,7 +1933,11 @@ if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; - })(); + }(); + + + + var defineProperty = function (obj, key, value) { if (key in obj) { @@ -1990,7 +1945,7 @@ value: value, enumerable: true, configurable: true, - writable: true, + writable: true }); } else { obj[key] = value; @@ -1999,21 +1954,19 @@ return obj; }; - var _extends = - Object.assign || - function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; + var _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]; - } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; } } + } - return target; - }; + return target; + }; /** * Given element offsets, generate an output similar to getBoundingClientRect @@ -2025,7 +1978,7 @@ function getClientRect(offsets) { return _extends({}, offsets, { right: offsets.left + offsets.width, - bottom: offsets.top + offsets.height, + bottom: offsets.top + offsets.height }); } @@ -2060,7 +2013,7 @@ left: rect.left, top: rect.top, width: rect.right - rect.left, - height: rect.bottom - rect.top, + height: rect.bottom - rect.top }; // subtract scrollbar size from sizes @@ -2107,7 +2060,7 @@ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, - height: childrenRect.height, + height: childrenRect.height }); offsets.marginTop = 0; offsets.marginLeft = 0; @@ -2130,11 +2083,7 @@ offsets.marginLeft = marginLeft; } - if ( - isIE10 && !fixedPosition - ? parent.contains(scrollParent) - : parent === scrollParent && scrollParent.nodeName !== 'BODY' - ) { + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } @@ -2156,7 +2105,7 @@ top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, - height: height, + height: height }; return getClientRect(offset); @@ -2221,10 +2170,8 @@ // NOTE: 1 DOM access here - var boundaries = {top: 0, left: 0}; - var offsetParent = fixedPosition - ? getFixedPositionOffsetParent(popper) - : findCommonOffsetParent(popper, getReferenceNode(reference)); + var boundaries = { top: 0, left: 0 }; + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); // Handle viewport case if (boundariesElement === 'viewport') { @@ -2248,8 +2195,8 @@ // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { var _getWindowSizes = getWindowSizes(popper.ownerDocument), - height = _getWindowSizes.height, - width = _getWindowSizes.width; + height = _getWindowSizes.height, + width = _getWindowSizes.width; boundaries.top += offsets.top - offsets.marginTop; boundaries.bottom = height + offsets.top; @@ -2274,7 +2221,7 @@ function getArea(_ref) { var width = _ref.width, - height = _ref.height; + height = _ref.height; return width * height; } @@ -2300,41 +2247,35 @@ var rects = { top: { width: boundaries.width, - height: refRect.top - boundaries.top, + height: refRect.top - boundaries.top }, right: { width: boundaries.right - refRect.right, - height: boundaries.height, + height: boundaries.height }, bottom: { width: boundaries.width, - height: boundaries.bottom - refRect.bottom, + height: boundaries.bottom - refRect.bottom }, left: { width: refRect.left - boundaries.left, - height: boundaries.height, - }, + height: boundaries.height + } }; - var sortedAreas = Object.keys(rects) - .map(function (key) { - return _extends( - { - key: key, - }, - rects[key], - { - area: getArea(rects[key]), - }, - ); - }) - .sort(function (a, b) { - return b.area - a.area; + var sortedAreas = Object.keys(rects).map(function (key) { + return _extends({ + key: key + }, rects[key], { + area: getArea(rects[key]) }); + }).sort(function (a, b) { + return b.area - a.area; + }); var filteredAreas = sortedAreas.filter(function (_ref2) { var width = _ref2.width, - height = _ref2.height; + height = _ref2.height; return width >= popper.clientWidth && height >= popper.clientHeight; }); @@ -2358,9 +2299,7 @@ function getReferenceOffsets(state, popper, reference) { var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - var commonOffsetParent = fixedPosition - ? getFixedPositionOffsetParent(popper) - : findCommonOffsetParent(popper, getReferenceNode(reference)); + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } @@ -2378,7 +2317,7 @@ var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); var result = { width: element.offsetWidth + y, - height: element.offsetHeight + x, + height: element.offsetHeight + x }; return result; } @@ -2391,7 +2330,7 @@ * @returns {String} flipped placement */ function getOppositePlacement(placement) { - var hash = {left: 'right', right: 'left', bottom: 'top', top: 'bottom'}; + var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); @@ -2416,7 +2355,7 @@ // Add position, width and height to our offsets object var popperOffsets = { width: popperRect.width, - height: popperRect.height, + height: popperRect.height }; // depending by the popper placement we have to compute its offsets slightly differently @@ -2426,8 +2365,7 @@ var measurement = isHoriz ? 'height' : 'width'; var secondaryMeasurement = !isHoriz ? 'height' : 'width'; - popperOffsets[mainSide] = - referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; + popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; if (placement === secondarySide) { popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; } else { @@ -2532,7 +2470,7 @@ arrowStyles: {}, attributes: {}, flipped: false, - offsets: {}, + offsets: {} }; // compute reference element offsets @@ -2541,14 +2479,7 @@ // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value - data.placement = computeAutoPlacement( - this.options.placement, - data.offsets.reference, - this.popper, - this.reference, - this.options.modifiers.flip.boundariesElement, - this.options.modifiers.flip.padding, - ); + data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; @@ -2582,7 +2513,7 @@ function isModifierEnabled(modifiers, modifierName) { return modifiers.some(function (_ref) { var name = _ref.name, - enabled = _ref.enabled; + enabled = _ref.enabled; return enabled && name === modifierName; }); } @@ -2651,7 +2582,7 @@ function attachToScrollParents(scrollParent, event, callback, scrollParents) { var isBody = scrollParent.nodeName === 'BODY'; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; - target.addEventListener(event, callback, {passive: true}); + target.addEventListener(event, callback, { passive: true }); if (!isBody) { attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); @@ -2668,7 +2599,7 @@ function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; - getWindow(reference).addEventListener('resize', state.updateBound, {passive: true}); + getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); @@ -2822,20 +2753,13 @@ // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value - var placement = computeAutoPlacement( - options.placement, - referenceOffsets, - popper, - reference, - options.modifiers.flip.boundariesElement, - options.modifiers.flip.padding, - ); + var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations - setStyles(popper, {position: options.positionFixed ? 'fixed' : 'absolute'}); + setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); return options; } @@ -2861,10 +2785,10 @@ */ function getRoundedOffsets(data, shouldRound) { var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; var round = Math.round, - floor = Math.floor; + floor = Math.floor; var noRound = function noRound(v) { return v; @@ -2885,7 +2809,7 @@ left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), top: verticalToInteger(popper.top), bottom: verticalToInteger(popper.bottom), - right: horizontalToInteger(popper.right), + right: horizontalToInteger(popper.right) }; } @@ -2900,7 +2824,7 @@ */ function computeStyle(data, options) { var x = options.x, - y = options.y; + y = options.y; var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2 @@ -2909,19 +2833,16 @@ return modifier.name === 'applyStyle'; }).gpuAcceleration; if (legacyGpuAccelerationOption !== undefined) { - console.warn( - 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!', - ); + console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); } - var gpuAcceleration = - legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; + var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; var offsetParent = getOffsetParent(data.instance.popper); var offsetParentRect = getBoundingClientRect(offsetParent); // Styles var styles = { - position: popper.position, + position: popper.position }; var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); @@ -2944,7 +2865,7 @@ // `x` to `top` to make the popper grow towards its top instead of // its bottom. var left = void 0, - top = void 0; + top = void 0; if (sideA === 'bottom') { // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar) // and not the bottom of the html element @@ -2981,7 +2902,7 @@ // Attributes var attributes = { - 'x-placement': data.placement, + 'x-placement': data.placement }; // Update `data` attributes, styles and arrowStyles @@ -3008,23 +2929,14 @@ return name === requestingName; }); - var isRequired = - !!requesting && - modifiers.some(function (modifier) { - return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; - }); + var isRequired = !!requesting && modifiers.some(function (modifier) { + return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; + }); if (!isRequired) { var _requesting = '`' + requestingName + '`'; var requested = '`' + requestedName + '`'; - console.warn( - requested + - ' modifier is required by ' + - _requesting + - ' modifier in order to work, be sure to include it before ' + - _requesting + - '!', - ); + console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); } return isRequired; } @@ -3065,8 +2977,8 @@ var placement = data.placement.split('-')[0]; var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; var isVertical = ['left', 'right'].indexOf(placement) !== -1; @@ -3106,11 +3018,7 @@ sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; - data.offsets.arrow = - ((_data$offsets$arrow = {}), - defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), - defineProperty(_data$offsets$arrow, altSide, ''), - _data$offsets$arrow); + data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); return data; } @@ -3162,23 +3070,7 @@ * @method placements * @memberof Popper */ - var placements = [ - 'auto-start', - 'auto', - 'auto-end', - 'top-start', - 'top', - 'top-end', - 'right-start', - 'right', - 'right-end', - 'bottom-end', - 'bottom', - 'bottom-start', - 'left-end', - 'left', - 'left-start', - ]; + var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end` var validPlacements = placements.slice(3); @@ -3204,7 +3096,7 @@ var BEHAVIORS = { FLIP: 'flip', CLOCKWISE: 'clockwise', - COUNTERCLOCKWISE: 'counterclockwise', + COUNTERCLOCKWISE: 'counterclockwise' }; /** @@ -3225,13 +3117,7 @@ return data; } - var boundaries = getBoundaries( - data.instance.popper, - data.instance.reference, - options.padding, - options.boundariesElement, - data.positionFixed, - ); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); @@ -3266,41 +3152,23 @@ // using floor because the reference offsets may contain decimals we are not going to consider here var floor = Math.floor; - var overlapsRef = - (placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left)) || - (placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right)) || - (placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top)) || - (placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom)); + var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); - var overflowsBoundaries = - (placement === 'left' && overflowsLeft) || - (placement === 'right' && overflowsRight) || - (placement === 'top' && overflowsTop) || - (placement === 'bottom' && overflowsBottom); + var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; // flips variation if reference element overflows boundaries - var flippedVariationByRef = - !!options.flipVariations && - ((isVertical && variation === 'start' && overflowsLeft) || - (isVertical && variation === 'end' && overflowsRight) || - (!isVertical && variation === 'start' && overflowsTop) || - (!isVertical && variation === 'end' && overflowsBottom)); + var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); // flips variation if popper content overflows boundaries - var flippedVariationByContent = - !!options.flipVariationsByContent && - ((isVertical && variation === 'start' && overflowsRight) || - (isVertical && variation === 'end' && overflowsLeft) || - (!isVertical && variation === 'start' && overflowsBottom) || - (!isVertical && variation === 'end' && overflowsTop)); + var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop); var flippedVariation = flippedVariationByRef || flippedVariationByContent; @@ -3320,11 +3188,7 @@ // this object contains `position`, we want to preserve it along with // any additional property we may add in the future - data.offsets.popper = _extends( - {}, - data.offsets.popper, - getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement), - ); + data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); data = runModifiers(data.instance.modifiers, data, 'flip'); } @@ -3341,8 +3205,8 @@ */ function keepTogether(data) { var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; var placement = data.placement.split('-')[0]; var floor = Math.floor; @@ -3397,7 +3261,7 @@ } var rect = getClientRect(element); - return (rect[measurement] / 100) * value; + return rect[measurement] / 100 * value; } else if (unit === 'vh' || unit === 'vw') { // if is a vh or vw, we calculate the size based on the viewport var size = void 0; @@ -3406,7 +3270,7 @@ } else { size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } - return (size / 100) * value; + return size / 100 * value; } else { // if is an explicit pixel unit, we get rid of the unit and keep the value // if is an implicit unit, it's px, and we return just the value @@ -3441,11 +3305,9 @@ // Detect if the offset string contains a pair of values or a single one // they could be separated by comma or space - var divider = fragments.indexOf( - find(fragments, function (frag) { - return frag.search(/,|\s/) !== -1; - }), - ); + var divider = fragments.indexOf(find(fragments, function (frag) { + return frag.search(/,|\s/) !== -1; + })); if (fragments[divider] && fragments[divider].indexOf(',') === -1) { console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); @@ -3454,41 +3316,33 @@ // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var splitRegex = /\s*,\s*|\s+/; - var ops = - divider !== -1 - ? [ - fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), - [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1)), - ] - : [fragments]; + var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations ops = ops.map(function (op, index) { // Most of the units rely on the orientation of the popper var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; var mergeWithPrevious = false; - return ( - op - // This aggregates any `+` or `-` sign that aren't considered operators - // e.g.: 10 + +5 => [10, +, +5] - .reduce(function (a, b) { - if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { - a[a.length - 1] = b; - mergeWithPrevious = true; - return a; - } else if (mergeWithPrevious) { - a[a.length - 1] += b; - mergeWithPrevious = false; - return a; - } else { - return a.concat(b); - } - }, []) - // Here we convert the string values into number values (in px) - .map(function (str) { - return toValue(str, measurement, popperOffsets, referenceOffsets); - }) - ); + return op + // This aggregates any `+` or `-` sign that aren't considered operators + // e.g.: 10 + +5 => [10, +, +5] + .reduce(function (a, b) { + if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { + a[a.length - 1] = b; + mergeWithPrevious = true; + return a; + } else if (mergeWithPrevious) { + a[a.length - 1] += b; + mergeWithPrevious = false; + return a; + } else { + return a.concat(b); + } + }, []) + // Here we convert the string values into number values (in px) + .map(function (str) { + return toValue(str, measurement, popperOffsets, referenceOffsets); + }); }); // Loop trough the offsets arrays and execute the operations @@ -3514,9 +3368,9 @@ function offset(data, _ref) { var offset = _ref.offset; var placement = data.placement, - _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; var basePlacement = placement.split('-')[0]; @@ -3568,20 +3422,14 @@ var transformProp = getSupportedPropertyName('transform'); var popperStyles = data.instance.popper.style; // assignment to help minification var top = popperStyles.top, - left = popperStyles.left, - transform = popperStyles[transformProp]; + left = popperStyles.left, + transform = popperStyles[transformProp]; popperStyles.top = ''; popperStyles.left = ''; popperStyles[transformProp] = ''; - var boundaries = getBoundaries( - data.instance.popper, - data.instance.reference, - options.padding, - boundariesElement, - data.positionFixed, - ); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here // restores the original style properties after the offsets have been computed @@ -3606,13 +3454,10 @@ var mainSide = placement === 'right' ? 'left' : 'top'; var value = popper[mainSide]; if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { - value = Math.min( - popper[mainSide], - boundaries[placement] - (placement === 'right' ? popper.width : popper.height), - ); + value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); } return defineProperty({}, mainSide, value); - }, + } }; order.forEach(function (placement) { @@ -3640,8 +3485,8 @@ // if shift shiftvariation is specified, run the modifier if (shiftvariation) { var _data$offsets = data.offsets, - reference = _data$offsets.reference, - popper = _data$offsets.popper; + reference = _data$offsets.reference, + popper = _data$offsets.popper; var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; var side = isVertical ? 'left' : 'top'; @@ -3649,7 +3494,7 @@ var shiftOffsets = { start: defineProperty({}, side, reference[side]), - end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]), + end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) }; data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); @@ -3675,12 +3520,7 @@ return modifier.name === 'preventOverflow'; }).boundaries; - if ( - refRect.bottom < bound.top || - refRect.left > bound.right || - refRect.top > bound.bottom || - refRect.right < bound.left - ) { + if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === true) { return data; @@ -3712,15 +3552,14 @@ var placement = data.placement; var basePlacement = placement.split('-')[0]; var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; - popper[isHoriz ? 'left' : 'top'] = - reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); + popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); data.placement = getOppositePlacement(placement); data.offsets.popper = getClientRect(popper); @@ -3764,7 +3603,7 @@ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: shift, + fn: shift }, /** @@ -3815,7 +3654,7 @@ /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ - offset: 0, + offset: 0 }, /** @@ -3860,7 +3699,7 @@ * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ - boundariesElement: 'scrollParent', + boundariesElement: 'scrollParent' }, /** @@ -3878,7 +3717,7 @@ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: keepTogether, + fn: keepTogether }, /** @@ -3899,7 +3738,7 @@ /** @prop {ModifierFn} */ fn: arrow, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ - element: '[x-arrow]', + element: '[x-arrow]' }, /** @@ -3954,7 +3793,7 @@ * * The original placement should have a set variation. */ - flipVariationsByContent: false, + flipVariationsByContent: false }, /** @@ -3970,7 +3809,7 @@ /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled: false, /** @prop {ModifierFn} */ - fn: inner, + fn: inner }, /** @@ -3989,7 +3828,7 @@ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: hide, + fn: hide }, /** @@ -4031,7 +3870,7 @@ * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ - y: 'right', + y: 'right' }, /** @@ -4064,8 +3903,8 @@ * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ - gpuAcceleration: undefined, - }, + gpuAcceleration: undefined + } }; /** @@ -4152,7 +3991,7 @@ * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ - modifiers: modifiers, + modifiers: modifiers }; /** @@ -4167,7 +4006,7 @@ // Utils // Methods - var Popper = (function () { + var Popper = function () { /** * Creates a new Popper.js instance. * @class Popper @@ -4196,7 +4035,7 @@ this.state = { isDestroyed: false, isCreated: false, - scrollParents: [], + scrollParents: [] }; // get reference and popper elements (allow jQuery wrappers) @@ -4206,27 +4045,19 @@ // Deep merge modifiers options this.options.modifiers = {}; Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { - _this.options.modifiers[name] = _extends( - {}, - Popper.Defaults.modifiers[name] || {}, - options.modifiers ? options.modifiers[name] : {}, - ); + _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); }); // Refactoring modifiers' list (Object => Array) - this.modifiers = Object.keys(this.options.modifiers) - .map(function (name) { - return _extends( - { - name: name, - }, - _this.options.modifiers[name], - ); - }) - // sort the modifiers by order - .sort(function (a, b) { - return a.order - b.order; - }); + this.modifiers = Object.keys(this.options.modifiers).map(function (name) { + return _extends({ + name: name + }, _this.options.modifiers[name]); + }) + // sort the modifiers by order + .sort(function (a, b) { + return a.order - b.order; + }); // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier @@ -4253,57 +4084,55 @@ // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs - createClass(Popper, [ - { - key: 'update', - value: function update$$1() { - return update.call(this); - }, - }, - { - key: 'destroy', - value: function destroy$$1() { - return destroy.call(this); - }, - }, - { - key: 'enableEventListeners', - value: function enableEventListeners$$1() { - return enableEventListeners.call(this); - }, - }, - { - key: 'disableEventListeners', - value: function disableEventListeners$$1() { - return disableEventListeners.call(this); - }, - /** - * Schedules an update. It will run on the next UI update available. - * @method scheduleUpdate - * @memberof Popper - */ + createClass(Popper, [{ + key: 'update', + value: function update$$1() { + return update.call(this); + } + }, { + key: 'destroy', + value: function destroy$$1() { + return destroy.call(this); + } + }, { + key: 'enableEventListeners', + value: function enableEventListeners$$1() { + return enableEventListeners.call(this); + } + }, { + key: 'disableEventListeners', + value: function disableEventListeners$$1() { + return disableEventListeners.call(this); + } - /** - * Collection of utilities useful when writing custom modifiers. - * Starting from version 1.7, this method is available only if you - * include `popper-utils.js` before `popper.js`. - * - * **DEPRECATION**: This way to access PopperUtils is deprecated - * and will be removed in v2! Use the PopperUtils module directly instead. - * Due to the high instability of the methods contained in Utils, we can't - * guarantee them to follow semver. Use them at your own risk! - * @static - * @private - * @type {Object} - * @deprecated since version 1.8 - * @member Utils - * @memberof Popper - */ - }, - ]); + /** + * Schedules an update. It will run on the next UI update available. + * @method scheduleUpdate + * @memberof Popper + */ + + + /** + * Collection of utilities useful when writing custom modifiers. + * Starting from version 1.7, this method is available only if you + * include `popper-utils.js` before `popper.js`. + * + * **DEPRECATION**: This way to access PopperUtils is deprecated + * and will be removed in v2! Use the PopperUtils module directly instead. + * Due to the high instability of the methods contained in Utils, we can't + * guarantee them to follow semver. Use them at your own risk! + * @static + * @private + * @type {Object} + * @deprecated since version 1.8 + * @member Utils + * @memberof Popper + */ + + }]); return Popper; - })(); + }(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js @@ -4325,6 +4154,7 @@ * An ES6 getter that will return the height of the virtual reference element. */ + Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults; @@ -4338,7 +4168,7 @@ var NAME$4 = 'dropdown'; var VERSION$4 = '4.5.0'; var DATA_KEY$4 = 'bs.dropdown'; - var EVENT_KEY$4 = '.' + DATA_KEY$4; + var EVENT_KEY$4 = "." + DATA_KEY$4; var DATA_API_KEY$4 = '.data-api'; var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4]; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key @@ -4353,15 +4183,15 @@ var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) - var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + '|' + ARROW_DOWN_KEYCODE + '|' + ESCAPE_KEYCODE); - var EVENT_HIDE$1 = 'hide' + EVENT_KEY$4; - var EVENT_HIDDEN$1 = 'hidden' + EVENT_KEY$4; - var EVENT_SHOW$1 = 'show' + EVENT_KEY$4; - var EVENT_SHOWN$1 = 'shown' + EVENT_KEY$4; - var EVENT_CLICK = 'click' + EVENT_KEY$4; - var EVENT_CLICK_DATA_API$4 = 'click' + EVENT_KEY$4 + DATA_API_KEY$4; - 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 REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); + var EVENT_HIDE$1 = "hide" + EVENT_KEY$4; + var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4; + var EVENT_SHOW$1 = "show" + EVENT_KEY$4; + var EVENT_SHOWN$1 = "shown" + EVENT_KEY$4; + var EVENT_CLICK = "click" + EVENT_KEY$4; + var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$4 + DATA_API_KEY$4; + 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$2 = 'show'; var CLASS_NAME_DROPUP = 'dropup'; @@ -4386,7 +4216,7 @@ boundary: 'scrollParent', reference: 'toggle', display: 'dynamic', - popperConfig: null, + popperConfig: null }; var DefaultType$2 = { offset: '(number|string|function)', @@ -4394,7 +4224,7 @@ boundary: '(string|element)', reference: '(string|element)', display: 'string', - popperConfig: '(null|object)', + popperConfig: '(null|object)' }; /** * ------------------------------------------------------------------------ @@ -4402,7 +4232,7 @@ * ------------------------------------------------------------------------ */ - var Dropdown = /*#__PURE__*/ (function () { + var Dropdown = /*#__PURE__*/function () { function Dropdown(element, config) { this._element = element; this._popper = null; @@ -4413,6 +4243,7 @@ this._addEventListeners(); } // Getters + var _proto = Dropdown.prototype; // Public @@ -4437,16 +4268,12 @@ usePopper = false; } - if ( - this._element.disabled || - $(this._element).hasClass(CLASS_NAME_DISABLED) || - $(this._menu).hasClass(CLASS_NAME_SHOW$2) - ) { + if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW$2)) { return; } var relatedTarget = { - relatedTarget: this._element, + relatedTarget: this._element }; var showEvent = $.Event(EVENT_SHOW$1, relatedTarget); @@ -4458,13 +4285,14 @@ return; } // Disable totally Popper.js for Dropdown in Navbar + if (!this._inNavbar && usePopper) { /** * Check for Popper dependency * Popper - https://popper.js.org */ if (typeof Popper === 'undefined') { - throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)"); + throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); } var referenceElement = this._element; @@ -4481,6 +4309,7 @@ // to allow the menu to "escape" the scroll parent's boundaries // https://github.com/twbs/bootstrap/issues/24251 + if (this._config.boundary !== 'scrollParent') { $(parent).addClass(CLASS_NAME_POSITION_STATIC); } @@ -4491,6 +4320,7 @@ // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + if ('ontouchstart' in document.documentElement && $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) { $(document.body).children().on('mouseover', null, $.noop); } @@ -4504,16 +4334,12 @@ }; _proto.hide = function hide() { - if ( - this._element.disabled || - $(this._element).hasClass(CLASS_NAME_DISABLED) || - !$(this._menu).hasClass(CLASS_NAME_SHOW$2) - ) { + if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW$2)) { return; } var relatedTarget = { - relatedTarget: this._element, + relatedTarget: this._element }; var hideEvent = $.Event(EVENT_HIDE$1, relatedTarget); @@ -4552,7 +4378,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Private + } // Private + ; _proto._addEventListeners = function _addEventListeners() { var _this = this; @@ -4566,10 +4393,7 @@ }; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2( - _objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), - config, - ); + config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config); Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); return config; }; @@ -4614,10 +4438,7 @@ if (typeof this._config.offset === 'function') { offset.fn = function (data) { - data.offsets = _objectSpread2( - _objectSpread2({}, data.offsets), - _this2._config.offset(data.offsets, _this2._element) || {}, - ); + data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { @@ -4633,22 +4454,23 @@ modifiers: { offset: this._getOffset(), flip: { - enabled: this._config.flip, + enabled: this._config.flip }, preventOverflow: { - boundariesElement: this._config.boundary, - }, - }, + boundariesElement: this._config.boundary + } + } }; // Disable Popper.js if we have a static display if (this._config.display === 'static') { popperConfig.modifiers.applyStyle = { - enabled: false, + enabled: false }; } return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig); - }; // Static + } // Static + ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -4663,7 +4485,7 @@ if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new TypeError('No method named "' + config + '"'); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -4672,10 +4494,7 @@ }; Dropdown._clearMenus = function _clearMenus(event) { - if ( - event && - (event.which === RIGHT_MOUSE_BUTTON_WHICH || (event.type === 'keyup' && event.which !== TAB_KEYCODE)) - ) { + if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { return; } @@ -4686,7 +4505,7 @@ var context = $(toggles[i]).data(DATA_KEY$4); var relatedTarget = { - relatedTarget: toggles[i], + relatedTarget: toggles[i] }; if (event && event.type === 'click') { @@ -4703,12 +4522,7 @@ continue; } - if ( - event && - ((event.type === 'click' && /input|textarea/i.test(event.target.tagName)) || - (event.type === 'keyup' && event.which === TAB_KEYCODE)) && - $.contains(parent, event.target) - ) { + if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { continue; } @@ -4720,6 +4534,7 @@ } // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support + if ('ontouchstart' in document.documentElement) { $(document.body).children().off('mouseover', null, $.noop); } @@ -4744,7 +4559,8 @@ } return parent || element.parentNode; - }; // eslint-disable-next-line complexity + } // eslint-disable-next-line complexity + ; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: @@ -4754,14 +4570,7 @@ // - If key is other than escape // - If key is not up or down => not a dropdown command // - If trigger inside the menu => not a dropdown command - if ( - /input|textarea/i.test(event.target.tagName) - ? event.which === SPACE_KEYCODE || - (event.which !== ESCAPE_KEYCODE && - ((event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE) || - $(event.target).closest(SELECTOR_MENU).length)) - : !REGEXP_KEYDOWN.test(event.which) - ) { + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { return; } @@ -4780,7 +4589,7 @@ event.preventDefault(); event.stopPropagation(); - if (!isActive || (isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE))) { + if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { if (event.which === ESCAPE_KEYCODE) { $(parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus'); } @@ -4816,48 +4625,40 @@ items[index].focus(); }; - _createClass(Dropdown, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$4; - }, - }, - { - key: 'Default', - get: function get() { - return Default$2; - }, - }, - { - key: 'DefaultType', - get: function get() { - return DefaultType$2; - }, - }, - ]); + _createClass(Dropdown, null, [{ + key: "VERSION", + get: function get() { + return VERSION$4; + } + }, { + key: "Default", + get: function get() { + return Default$2; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$2; + } + }]); return Dropdown; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ - $(document) - .on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler) - .on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler) - .on(EVENT_CLICK_DATA_API$4 + ' ' + EVENT_KEYUP_DATA_API, Dropdown._clearMenus) - .on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) { - event.preventDefault(); - event.stopPropagation(); - Dropdown._jQueryInterface.call($(this), 'toggle'); - }) - .on(EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) { - e.stopPropagation(); - }); + $(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$4 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) { + event.preventDefault(); + event.stopPropagation(); + + Dropdown._jQueryInterface.call($(this), 'toggle'); + }).on(EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) { + e.stopPropagation(); + }); /** * ------------------------------------------------------------------------ * jQuery @@ -4881,7 +4682,7 @@ var NAME$5 = 'modal'; var VERSION$5 = '4.5.0'; var DATA_KEY$5 = 'bs.modal'; - var EVENT_KEY$5 = '.' + DATA_KEY$5; + var EVENT_KEY$5 = "." + DATA_KEY$5; var DATA_API_KEY$5 = '.data-api'; var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5]; var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key @@ -4890,26 +4691,26 @@ backdrop: true, keyboard: true, focus: true, - show: true, + show: true }; var DefaultType$3 = { backdrop: '(boolean|string)', keyboard: 'boolean', focus: 'boolean', - show: 'boolean', + show: 'boolean' }; - var EVENT_HIDE$2 = 'hide' + EVENT_KEY$5; - var EVENT_HIDE_PREVENTED = 'hidePrevented' + EVENT_KEY$5; - var EVENT_HIDDEN$2 = 'hidden' + EVENT_KEY$5; - var EVENT_SHOW$2 = 'show' + EVENT_KEY$5; - var EVENT_SHOWN$2 = 'shown' + EVENT_KEY$5; - var EVENT_FOCUSIN = 'focusin' + EVENT_KEY$5; - var EVENT_RESIZE = 'resize' + EVENT_KEY$5; - var EVENT_CLICK_DISMISS = 'click.dismiss' + EVENT_KEY$5; - var EVENT_KEYDOWN_DISMISS = 'keydown.dismiss' + EVENT_KEY$5; - var EVENT_MOUSEUP_DISMISS = 'mouseup.dismiss' + EVENT_KEY$5; - var EVENT_MOUSEDOWN_DISMISS = 'mousedown.dismiss' + EVENT_KEY$5; - var EVENT_CLICK_DATA_API$5 = 'click' + EVENT_KEY$5 + DATA_API_KEY$5; + var EVENT_HIDE$2 = "hide" + EVENT_KEY$5; + var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5; + var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5; + var EVENT_SHOW$2 = "show" + EVENT_KEY$5; + var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5; + var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5; + var EVENT_RESIZE = "resize" + EVENT_KEY$5; + var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$5; + var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5; + var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5; + var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5; + var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5; var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'; var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'; var CLASS_NAME_BACKDROP = 'modal-backdrop'; @@ -4929,7 +4730,7 @@ * ------------------------------------------------------------------------ */ - var Modal = /*#__PURE__*/ (function () { + var Modal = /*#__PURE__*/function () { function Modal(element, config) { this._config = this._getConfig(config); this._element = element; @@ -4942,6 +4743,7 @@ this._scrollbarWidth = 0; } // Getters + var _proto = Modal.prototype; // Public @@ -4961,7 +4763,7 @@ } var showEvent = $.Event(EVENT_SHOW$2, { - relatedTarget: relatedTarget, + relatedTarget: relatedTarget }); $(this._element).trigger(showEvent); @@ -5033,11 +4835,9 @@ if (transition) { var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element) - .one(Util.TRANSITION_END, function (event) { - return _this2._hideModal(event); - }) - .emulateTransitionEnd(transitionDuration); + $(this._element).one(Util.TRANSITION_END, function (event) { + return _this2._hideModal(event); + }).emulateTransitionEnd(transitionDuration); } else { this._hideModal(); } @@ -5068,7 +4868,8 @@ _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // Private + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread2(_objectSpread2({}, Default$3), config); @@ -5090,11 +4891,9 @@ this._element.classList.add(CLASS_NAME_STATIC); var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element) - .one(Util.TRANSITION_END, function () { - _this3._element.classList.remove(CLASS_NAME_STATIC); - }) - .emulateTransitionEnd(modalTransitionDuration); + $(this._element).one(Util.TRANSITION_END, function () { + _this3._element.classList.remove(CLASS_NAME_STATIC); + }).emulateTransitionEnd(modalTransitionDuration); this._element.focus(); } else { @@ -5136,7 +4935,7 @@ } var shownEvent = $.Event(EVENT_SHOWN$2, { - relatedTarget: relatedTarget, + relatedTarget: relatedTarget }); var transitionComplete = function transitionComplete() { @@ -5159,17 +4958,12 @@ _proto._enforceFocus = function _enforceFocus() { var _this5 = this; - $(document) - .off(EVENT_FOCUSIN) // Guard against infinite focus loop - .on(EVENT_FOCUSIN, function (event) { - if ( - document !== event.target && - _this5._element !== event.target && - $(_this5._element).has(event.target).length === 0 - ) { - _this5._element.focus(); - } - }); + $(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop + .on(EVENT_FOCUSIN, function (event) { + if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) { + _this5._element.focus(); + } + }); }; _proto._setEscapeEvent = function _setEscapeEvent() { @@ -5296,20 +5090,21 @@ } else if (callback) { callback(); } - }; // ---------------------------------------------------------------------- + } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- + ; _proto._adjustDialog = function _adjustDialog() { var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; if (!this._isBodyOverflowing && isModalOverflowing) { - this._element.style.paddingLeft = this._scrollbarWidth + 'px'; + this._element.style.paddingLeft = this._scrollbarWidth + "px"; } if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + 'px'; + this._element.style.paddingRight = this._scrollbarWidth + "px"; } }; @@ -5336,24 +5131,18 @@ $(fixedContent).each(function (index, element) { var actualPadding = element.style.paddingRight; var calculatedPadding = $(element).css('padding-right'); - $(element) - .data('padding-right', actualPadding) - .css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + 'px'); + $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px"); }); // Adjust sticky content margin $(stickyContent).each(function (index, element) { var actualMargin = element.style.marginRight; var calculatedMargin = $(element).css('margin-right'); - $(element) - .data('margin-right', actualMargin) - .css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + 'px'); + $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px"); }); // Adjust body padding var actualPadding = document.body.style.paddingRight; var calculatedPadding = $(document.body).css('padding-right'); - $(document.body) - .data('padding-right', actualPadding) - .css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + 'px'); + $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); } $(document.body).addClass(CLASS_NAME_OPEN); @@ -5368,7 +5157,7 @@ element.style.paddingRight = padding ? padding : ''; }); // Restore sticky content - var elements = [].slice.call(document.querySelectorAll('' + SELECTOR_STICKY_CONTENT)); + var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT)); $(elements).each(function (index, element) { var margin = $(element).data('margin-right'); @@ -5390,16 +5179,14 @@ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; - }; // Static + } // Static + ; Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { return this.each(function () { var data = $(this).data(DATA_KEY$5); - var _config = _objectSpread2( - _objectSpread2(_objectSpread2({}, Default$3), $(this).data()), - typeof config === 'object' && config ? config : {}, - ); + var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$3), $(this).data()), typeof config === 'object' && config ? config : {}); if (!data) { data = new Modal(this, _config); @@ -5408,7 +5195,7 @@ if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new TypeError('No method named "' + config + '"'); + throw new TypeError("No method named \"" + config + "\""); } data[config](relatedTarget); @@ -5418,29 +5205,27 @@ }); }; - _createClass(Modal, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$5; - }, - }, - { - key: 'Default', - get: function get() { - return Default$3; - }, - }, - ]); + _createClass(Modal, null, [{ + key: "VERSION", + get: function get() { + return VERSION$5; + } + }, { + key: "Default", + get: function get() { + return Default$3; + } + }]); return Modal; - })(); + }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ + $(document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) { var _this11 = this; @@ -5451,9 +5236,7 @@ target = document.querySelector(selector); } - var config = $(target).data(DATA_KEY$5) - ? 'toggle' - : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); + var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); if (this.tagName === 'A' || this.tagName === 'AREA') { event.preventDefault(); @@ -5527,7 +5310,7 @@ sup: [], strong: [], u: [], - ul: [], + ul: [] }; /** * A pattern that recognizes a commonly useful subset of URLs that are safe. @@ -5588,7 +5371,7 @@ if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { el.parentNode.removeChild(el); - return 'continue'; + return "continue"; } var attributeList = [].slice.call(el.attributes); @@ -5603,7 +5386,7 @@ for (var i = 0, len = elements.length; i < len; i++) { var _ret = _loop(i); - if (_ret === 'continue') continue; + if (_ret === "continue") continue; } return createdDocument.body.innerHTML; @@ -5618,10 +5401,10 @@ var NAME$6 = 'tooltip'; var VERSION$6 = '4.5.0'; var DATA_KEY$6 = 'bs.tooltip'; - var EVENT_KEY$6 = '.' + DATA_KEY$6; + var EVENT_KEY$6 = "." + DATA_KEY$6; var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; var CLASS_PREFIX = 'bs-tooltip'; - var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g'); + var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; var DefaultType$4 = { animation: 'boolean', @@ -5639,19 +5422,18 @@ sanitize: 'boolean', sanitizeFn: '(null|function)', whiteList: 'object', - popperConfig: '(null|object)', + popperConfig: '(null|object)' }; var AttachmentMap = { AUTO: 'auto', TOP: 'top', RIGHT: 'right', BOTTOM: 'bottom', - LEFT: 'left', + LEFT: 'left' }; var Default$4 = { animation: true, - template: - '', + template: '', trigger: 'hover focus', title: '', delay: 0, @@ -5665,21 +5447,21 @@ sanitize: true, sanitizeFn: null, whiteList: DefaultWhitelist, - popperConfig: null, + popperConfig: null }; var HOVER_STATE_SHOW = 'show'; var HOVER_STATE_OUT = 'out'; var Event = { - HIDE: 'hide' + EVENT_KEY$6, - HIDDEN: 'hidden' + EVENT_KEY$6, - SHOW: 'show' + EVENT_KEY$6, - SHOWN: 'shown' + EVENT_KEY$6, - INSERTED: 'inserted' + EVENT_KEY$6, - CLICK: 'click' + EVENT_KEY$6, - FOCUSIN: 'focusin' + EVENT_KEY$6, - FOCUSOUT: 'focusout' + EVENT_KEY$6, - MOUSEENTER: 'mouseenter' + EVENT_KEY$6, - MOUSELEAVE: 'mouseleave' + EVENT_KEY$6, + HIDE: "hide" + EVENT_KEY$6, + HIDDEN: "hidden" + EVENT_KEY$6, + SHOW: "show" + EVENT_KEY$6, + SHOWN: "shown" + EVENT_KEY$6, + INSERTED: "inserted" + EVENT_KEY$6, + CLICK: "click" + EVENT_KEY$6, + FOCUSIN: "focusin" + EVENT_KEY$6, + FOCUSOUT: "focusout" + EVENT_KEY$6, + MOUSEENTER: "mouseenter" + EVENT_KEY$6, + MOUSELEAVE: "mouseleave" + EVENT_KEY$6 }; var CLASS_NAME_FADE$2 = 'fade'; var CLASS_NAME_SHOW$4 = 'show'; @@ -5695,12 +5477,13 @@ * ------------------------------------------------------------------------ */ - var Tooltip = /*#__PURE__*/ (function () { + var Tooltip = /*#__PURE__*/function () { function Tooltip(element, config) { if (typeof Popper === 'undefined') { - throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)"); + throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); } // private + this._isEnabled = true; this._timeout = 0; this._hoverState = ''; @@ -5714,6 +5497,7 @@ this._setListeners(); } // Getters + var _proto = Tooltip.prototype; // Public @@ -5798,10 +5582,7 @@ if (this.isWithContent() && this._isEnabled) { $(this.element).trigger(showEvent); var shadowRoot = Util.findShadowRoot(this.element); - var isInTheDom = $.contains( - shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, - this.element, - ); + var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); if (showEvent.isDefaultPrevented() || !isInTheDom) { return; @@ -5817,10 +5598,7 @@ $(tip).addClass(CLASS_NAME_FADE$2); } - var placement = - typeof this.config.placement === 'function' - ? this.config.placement.call(this, tip, this.element) - : this.config.placement; + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; var attachment = this._getAttachment(placement); @@ -5925,14 +5703,15 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Protected + } // Protected + ; _proto.isWithContent = function isWithContent() { return Boolean(this.getTitle()); }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment); + $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement = function getTipElement() { @@ -5943,7 +5722,7 @@ _proto.setContent = function setContent() { var tip = this.getTipElement(); this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle()); - $(tip).removeClass(CLASS_NAME_FADE$2 + ' ' + CLASS_NAME_SHOW$4); + $(tip).removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$4); }; _proto.setElementContent = function setElementContent($element, content) { @@ -5979,7 +5758,8 @@ } return title; - }; // Private + } // Private + ; _proto._getPopperConfig = function _getPopperConfig(attachment) { var _this3 = this; @@ -5989,14 +5769,14 @@ modifiers: { offset: this._getOffset(), flip: { - behavior: this.config.fallbackPlacement, + behavior: this.config.fallbackPlacement }, arrow: { - element: SELECTOR_ARROW, + element: SELECTOR_ARROW }, preventOverflow: { - boundariesElement: this.config.boundary, - }, + boundariesElement: this.config.boundary + } }, onCreate: function onCreate(data) { if (data.originalPlacement !== data.placement) { @@ -6005,7 +5785,7 @@ }, onUpdate: function onUpdate(data) { return _this3._handlePopperPlacementChange(data); - }, + } }; return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig); }; @@ -6017,10 +5797,7 @@ if (typeof this.config.offset === 'function') { offset.fn = function (data) { - data.offsets = _objectSpread2( - _objectSpread2({}, data.offsets), - _this4.config.offset(data.offsets, _this4.element) || {}, - ); + data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {}); return data; }; } else { @@ -6056,17 +5833,13 @@ return _this5.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; - $(_this5.element) - .on(eventIn, _this5.config.selector, function (event) { - return _this5._enter(event); - }) - .on(eventOut, _this5.config.selector, function (event) { - return _this5._leave(event); - }); + 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; + $(_this5.element).on(eventIn, _this5.config.selector, function (event) { + return _this5._enter(event); + }).on(eventOut, _this5.config.selector, function (event) { + return _this5._leave(event); + }); } }); @@ -6079,14 +5852,10 @@ $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler); if (this.config.selector) { - this.config = _objectSpread2( - _objectSpread2({}, this.config), - {}, - { - trigger: 'manual', - selector: '', - }, - ); + this.config = _objectSpread2(_objectSpread2({}, this.config), {}, { + trigger: 'manual', + selector: '' + }); } else { this._fixTitle(); } @@ -6183,15 +5952,12 @@ delete dataAttributes[dataAttr]; } }); - config = _objectSpread2( - _objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), - typeof config === 'object' && config ? config : {}, - ); + config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { show: config.delay, - hide: config.delay, + hide: config.delay }; } @@ -6256,7 +6022,8 @@ this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // Static + } // Static + ; Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -6275,7 +6042,7 @@ if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new TypeError('No method named "' + config + '"'); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -6283,59 +6050,52 @@ }); }; - _createClass(Tooltip, null, [ - { - key: 'VERSION', - get: function get() { - return VERSION$6; - }, - }, - { - key: 'Default', - get: function get() { - return Default$4; - }, - }, - { - key: 'NAME', - get: function get() { - return NAME$6; - }, - }, - { - key: 'DATA_KEY', - get: function get() { - return DATA_KEY$6; - }, - }, - { - key: 'Event', - get: function get() { - return Event; - }, - }, - { - key: 'EVENT_KEY', - get: function get() { - return EVENT_KEY$6; - }, - }, - { - key: 'DefaultType', - get: function get() { - return DefaultType$4; - }, - }, - ]); + _createClass(Tooltip, null, [{ + key: "VERSION", + get: function get() { + return VERSION$6; + } + }, { + key: "Default", + get: function get() { + return Default$4; + } + }, { + key: "NAME", + get: function get() { + return NAME$6; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$6; + } + }, { + key: "Event", + get: function get() { + return Event; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$6; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$4; + } + }]); return Tooltip; - })(); + }(); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ + $.fn[NAME$6] = Tooltip._jQueryInterface; $.fn[NAME$6].Constructor = Tooltip; @@ -6353,49 +6113,37 @@ var NAME$7 = 'popover'; var VERSION$7 = '4.5.0'; var DATA_KEY$7 = 'bs.popover'; - var EVENT_KEY$7 = '.' + DATA_KEY$7; + var EVENT_KEY$7 = "." + DATA_KEY$7; var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; var CLASS_PREFIX$1 = 'bs-popover'; - var BSCLS_PREFIX_REGEX$1 = new RegExp('(^|\\s)' + CLASS_PREFIX$1 + '\\S+', 'g'); + var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); - var Default$5 = _objectSpread2( - _objectSpread2({}, Tooltip.Default), - {}, - { - placement: 'right', - trigger: 'click', - content: '', - template: - '', - }, - ); + var Default$5 = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }); - var DefaultType$5 = _objectSpread2( - _objectSpread2({}, Tooltip.DefaultType), - {}, - { - content: '(string|element|function)', - }, - ); + var DefaultType$5 = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, { + content: '(string|element|function)' + }); var CLASS_NAME_FADE$3 = 'fade'; var CLASS_NAME_SHOW$5 = 'show'; var SELECTOR_TITLE = '.popover-header'; var SELECTOR_CONTENT = '.popover-body'; var Event$1 = { - HIDE: 'hide' + EVENT_KEY$7, - HIDDEN: 'hidden' + EVENT_KEY$7, - SHOW: 'show' + EVENT_KEY$7, - SHOWN: 'shown' + EVENT_KEY$7, - INSERTED: 'inserted' + EVENT_KEY$7, - CLICK: 'click' + EVENT_KEY$7, - FOCUSIN: 'focusin' + EVENT_KEY$7, - FOCUSOUT: 'focusout' + EVENT_KEY$7, - MOUSEENTER: 'mouseenter' + EVENT_KEY$7, - MOUSELEAVE: 'mouseleave' + EVENT_KEY$7, + HIDE: "hide" + EVENT_KEY$7, + HIDDEN: "hidden" + EVENT_KEY$7, + SHOW: "show" + EVENT_KEY$7, + SHOWN: "shown" + EVENT_KEY$7, + INSERTED: "inserted" + EVENT_KEY$7, + CLICK: "click" + EVENT_KEY$7, + FOCUSIN: "focusin" + EVENT_KEY$7, + FOCUSOUT: "focusout" + EVENT_KEY$7, + MOUSEENTER: "mouseenter" + EVENT_KEY$7, + MOUSELEAVE: "mouseleave" + EVENT_KEY$7 }; /** * ------------------------------------------------------------------------ @@ -6403,7 +6151,7 @@ * ------------------------------------------------------------------------ */ - var Popover = /*#__PURE__*/ (function (_Tooltip) { + var Popover = /*#__PURE__*/function (_Tooltip) { _inheritsLoose(Popover, _Tooltip); function Popover() { @@ -6418,7 +6166,7 @@ }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX$1 + '-' + attachment); + $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); }; _proto.getTipElement = function getTipElement() { @@ -6438,8 +6186,9 @@ } this.setElementContent($tip.find(SELECTOR_CONTENT), content); - $tip.removeClass(CLASS_NAME_FADE$3 + ' ' + CLASS_NAME_SHOW$5); - }; // Private + $tip.removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$5); + } // Private + ; _proto._getContent = function _getContent() { return this.element.getAttribute('data-content') || this.config.content; @@ -6452,7 +6201,8 @@ if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // Static + } // Static + ; Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -6471,7 +6221,7 @@ if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new TypeError('No method named "' + config + '"'); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -6479,60 +6229,53 @@ }); }; - _createClass(Popover, null, [ - { - key: 'VERSION', - // Getters - get: function get() { - return VERSION$7; - }, - }, - { - key: 'Default', - get: function get() { - return Default$5; - }, - }, - { - key: 'NAME', - get: function get() { - return NAME$7; - }, - }, - { - key: 'DATA_KEY', - get: function get() { - return DATA_KEY$7; - }, - }, - { - key: 'Event', - get: function get() { - return Event$1; - }, - }, - { - key: 'EVENT_KEY', - get: function get() { - return EVENT_KEY$7; - }, - }, - { - key: 'DefaultType', - get: function get() { - return DefaultType$5; - }, - }, - ]); + _createClass(Popover, null, [{ + key: "VERSION", + // Getters + get: function get() { + return VERSION$7; + } + }, { + key: "Default", + get: function get() { + return Default$5; + } + }, { + key: "NAME", + get: function get() { + return NAME$7; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$7; + } + }, { + key: "Event", + get: function get() { + return Event$1; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$7; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$5; + } + }]); return Popover; - })(Tooltip); + }(Tooltip); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ + $.fn[NAME$7] = Popover._jQueryInterface; $.fn[NAME$7].Constructor = Popover; @@ -6550,22 +6293,22 @@ var NAME$8 = 'scrollspy'; var VERSION$8 = '4.5.0'; var DATA_KEY$8 = 'bs.scrollspy'; - var EVENT_KEY$8 = '.' + DATA_KEY$8; + var EVENT_KEY$8 = "." + DATA_KEY$8; var DATA_API_KEY$6 = '.data-api'; var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8]; var Default$6 = { offset: 10, method: 'auto', - target: '', + target: '' }; var DefaultType$6 = { offset: 'number', method: 'string', - target: '(string|element)', + target: '(string|element)' }; - var EVENT_ACTIVATE = 'activate' + EVENT_KEY$8; - var EVENT_SCROLL = 'scroll' + EVENT_KEY$8; - var EVENT_LOAD_DATA_API$2 = 'load' + EVENT_KEY$8 + DATA_API_KEY$6; + var EVENT_ACTIVATE = "activate" + EVENT_KEY$8; + var EVENT_SCROLL = "scroll" + EVENT_KEY$8; + var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$8 + DATA_API_KEY$6; var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; var CLASS_NAME_ACTIVE$2 = 'active'; var SELECTOR_DATA_SPY = '[data-spy="scroll"]'; @@ -6584,20 +6327,14 @@ * ------------------------------------------------------------------------ */ - var ScrollSpy = /*#__PURE__*/ (function () { + var ScrollSpy = /*#__PURE__*/function () { function ScrollSpy(element, config) { var _this = this; this._element = element; this._scrollElement = element.tagName === 'BODY' ? window : element; this._config = this._getConfig(config); - this._selector = - this._config.target + - ' ' + - SELECTOR_NAV_LINKS + - ',' + - (this._config.target + ' ' + SELECTOR_LIST_ITEMS + ',') + - (this._config.target + ' ' + SELECTOR_DROPDOWN_ITEMS); + this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS); this._offsets = []; this._targets = []; this._activeTarget = null; @@ -6610,6 +6347,7 @@ this._process(); } // Getters + var _proto = ScrollSpy.prototype; // Public @@ -6623,37 +6361,33 @@ this._targets = []; this._scrollHeight = this._getScrollHeight(); var targets = [].slice.call(document.querySelectorAll(this._selector)); - targets - .map(function (element) { - var target; - var targetSelector = Util.getSelectorFromElement(element); + targets.map(function (element) { + var target; + var targetSelector = Util.getSelectorFromElement(element); - if (targetSelector) { - target = document.querySelector(targetSelector); + if (targetSelector) { + target = document.querySelector(targetSelector); + } + + if (target) { + var targetBCR = target.getBoundingClientRect(); + + if (targetBCR.width || targetBCR.height) { + // TODO (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; } + } - if (target) { - var targetBCR = target.getBoundingClientRect(); + return null; + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this2._offsets.push(item[0]); - if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset - return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; - } - } - - return null; - }) - .filter(function (item) { - return item; - }) - .sort(function (a, b) { - return a[0] - b[0]; - }) - .forEach(function (item) { - _this2._offsets.push(item[0]); - - _this2._targets.push(item[1]); - }); + _this2._targets.push(item[1]); + }); }; _proto.dispose = function dispose() { @@ -6667,7 +6401,8 @@ this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // Private + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread2(_objectSpread2({}, Default$6), typeof config === 'object' && config ? config : {}); @@ -6680,7 +6415,7 @@ $(config.target).attr('id', id); } - config.target = '#' + id; + config.target = "#" + id; } Util.typeCheckConfig(NAME$8, config, DefaultType$6); @@ -6692,9 +6427,7 @@ }; _proto._getScrollHeight = function _getScrollHeight() { - return ( - this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - ); + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); }; _proto._getOffsetHeight = function _getOffsetHeight() { @@ -6730,11 +6463,8 @@ return; } - for (var i = this._offsets.length; i--; ) { - var isActiveTarget = - this._activeTarget !== this._targets[i] && - scrollTop >= this._offsets[i] && - (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); if (isActiveTarget) { this._activate(this._targets[i]); @@ -6748,7 +6478,7 @@ this._clear(); var queries = this._selector.split(',').map(function (selector) { - return selector + '[data-target="' + target + '"],' + selector + '[href="' + target + '"]'; + return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; }); var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); @@ -6761,33 +6491,24 @@ $link.addClass(CLASS_NAME_ACTIVE$2); // Set triggered links parents as active // With both